From b8104602be0493760bf82359af3108ae15f51f75 Mon Sep 17 00:00:00 2001 From: Emery Berger Date: Sun, 12 Jan 2025 10:28:18 -0600 Subject: [PATCH] Fix UTF-8 encoding issue (#900) * Force UTF-8 generation. * Rebuilt UTF-8 clean. * Force reading in utf-8. --- scalene/scalene-gui/package.json | 1 + scalene/scalene-gui/scalene-gui-bundle.js | 3 +- scalene/scalene-gui/webpack.config.js | 48 +++++++++++++++-------- scalene/scalene_utility.py | 18 ++++++++- 4 files changed, 50 insertions(+), 20 deletions(-) diff --git a/scalene/scalene-gui/package.json b/scalene/scalene-gui/package.json index 3d97b96e0..b4ec2c4e1 100644 --- a/scalene/scalene-gui/package.json +++ b/scalene/scalene-gui/package.json @@ -24,6 +24,7 @@ "process": "^0.11.10", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", + "terser-webpack-plugin": "^5.3.11", "url": "^0.11.4", "util": "^0.12.5", "webpack": "^5.96.1", diff --git a/scalene/scalene-gui/scalene-gui-bundle.js b/scalene/scalene-gui/scalene-gui-bundle.js index 640a6c159..4f3ef8e84 100644 --- a/scalene/scalene-gui/scalene-gui-bundle.js +++ b/scalene/scalene-gui/scalene-gui-bundle.js @@ -1,2 +1,3 @@ /*! For license information please see scalene-gui-bundle.js.LICENSE.txt */ -(()=>{var e={90217:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sendPromptToAmazon:()=>i});var r=n(6995);async function i(e){const t=document.getElementById("aws-access-key").value||localStorage.getItem("aws-access-key"),n=document.getElementById("aws-secret-key").value||localStorage.getItem("aws-secret-key"),i=document.getElementById("aws-region").value||localStorage.getItem("aws-region")||"us-east-1",a={accessKeyId:t,secretAccessKey:n},o=new r.BedrockRuntimeClient({region:i,credentials:a}),s={modelId:"us.anthropic.claude-3-5-sonnet-20241022-v2:0",body:JSON.stringify({anthropic_version:"bedrock-2023-05-31",max_tokens:65536,messages:[{role:"user",content:[{type:"text",text:e}]}]})};try{const e=new r.InvokeModelCommand(s),t=await o.send(e),n=new Blob([t.body]),i=await n.text();return JSON.parse(i).content[0].text.trim()}catch(e){return console.error(e),`# Error: ${e.message}`}}},26026:(e,t,n)=>{"use strict";async function r(e,t,n,r){const i=`${n}/openai/deployments/${r}/chat/completions?api-version=${document.getElementById("azure-api-model-version").value}`,a=JSON.stringify({messages:[{role:"system",content:"You are a Python programming assistant who ONLY responds with blocks of commented, optimized code. You never respond with text. Just code, starting with ``` and ending with ```."},{role:"user",content:e}],user:"scalene-user"});console.log(a);const o=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","api-key":t},body:a}),s=await o.json();if(s.error&&s.error.code in{invalid_request_error:!0,model_not_found:!0,insufficient_quota:!0})return"";try{console.log(`Debugging info: Retrieved ${JSON.stringify(s.choices[0],null,4)}`)}catch{console.log(`Debugging info: Failed to retrieve data.choices from the server. data = ${JSON.stringify(s)}`)}try{return s.choices[0].message.content.replace(/^\s*[\r\n]/gm,"")}catch{return"# Query failed. See JavaScript console (in Chrome: View > Developer > JavaScript Console) for more info.\n"}}n.r(t),n.d(t,{sendPromptToAzureOpenAI:()=>r})},43270:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DownTriangle:()=>u,Explosion:()=>a,Lightning:()=>i,RightTriangle:()=>l,WhiteExplosion:()=>s,WhiteLightning:()=>o,makeBar:()=>d,makeGPUBar:()=>p,makeGPUPie:()=>f,makeMemoryBar:()=>g,makeMemoryPie:()=>h,makeSparkline:()=>m});var r=n(12672);const i="⚡",a="💥",o=`${i}`,s=`${a}`,l="►",u="▼";function c(e,t){let n=t/100*globalThis.profile.elapsed_time_sec;return`(${e}) `+t.toFixed(1)+"% ["+(0,r.time_consumed_str)(1e3*n)+"]"}function d(e,t,n,r){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{view:{stroke:"transparent"}},autosize:{contains:"padding"},width:r.width,height:r.height,padding:0,data:{values:[{x:0,y:e.toFixed(1),c:c("Python",e),d:e>=20?e.toFixed(0)+"%":e>=10?e.toFixed(0):"",q:e/2},{x:0,y:t.toFixed(1),c:c("native",t),d:t>=20?t.toFixed(0)+"%":t>=10?t.toFixed(0):"",q:e+t/2},{x:0,y:n.toFixed(1),c:c("system",n),d:n>=20?n.toFixed(0)+"%":n>=10?n.toFixed(0):"",q:e+t+n/2}]},layer:[{mark:{type:"bar"},encoding:{x:{aggregate:"sum",field:"y",axis:!1,stack:"zero",scale:{domain:[0,100]}},color:{field:"c",type:"nominal",legend:!1,scale:{range:["darkblue","#6495ED","blue"]}},tooltip:[{field:"c",type:"nominal",title:"time"}]}},{mark:{type:"text",align:"center",baseline:"middle",dx:0},encoding:{x:{aggregate:"sum",field:"q",axis:!1},text:{field:"d"},color:{value:"white"},tooltip:[{field:"c",type:"nominal",title:"time"}]}}]}}function f(e,t,n){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{view:{stroke:"transparent"}},autosize:{contains:"padding"},width:n.width,height:n.height,padding:0,data:{values:[{category:1,value:e.toFixed(1),c:"in use: "+e.toFixed(1)+"%"}]},mark:"arc",encoding:{theta:{field:"value",type:"quantitative",scale:{domain:[0,100]}},color:{field:"c",type:"nominal",legend:!1,scale:{range:["goldenrod","#f4e6c2"]}},tooltip:[{field:"c",type:"nominal",title:t}]}}}function p(e,t,n){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{view:{stroke:"transparent"}},autosize:{contains:"padding"},width:n.width,height:n.height,padding:0,data:{values:[{x:0,y:e.toFixed(0),q:(e/2).toFixed(0),d:e>=20?e.toFixed(0)+"%":"",dd:"in use: "+e.toFixed(0)+"%"}]},layer:[{mark:{type:"bar"},encoding:{x:{aggregate:"sum",field:"y",axis:!1,scale:{domain:[0,100]}},color:{field:"dd",type:"nominal",legend:!1,scale:{range:["goldenrod","#f4e6c2"]}},tooltip:[{field:"dd",type:"nominal",title:t+":"}]}},{mark:{type:"text",align:"center",baseline:"middle",dx:0},encoding:{x:{aggregate:"sum",field:"q",axis:!1},text:{field:"d"},color:{value:"white"},tooltip:[{field:"dd",type:"nominal",title:t+":"}]}}]}}function h(e,t,n){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",width:n.width,height:20,padding:0,data:{values:[{category:1,value:e.toFixed(1),c:"native: "+e.toFixed(1)+"%"},{category:2,value:t.toFixed(1),c:"Python: "+t.toFixed(1)+"%"}]},mark:"arc",encoding:{theta:{field:"value",type:"quantitative",scale:{domain:[0,100]}},color:{field:"c",type:"nominal",legend:!1,scale:{range:["darkgreen","#50C878"]}},tooltip:[{field:"c",type:"nominal",title:"memory"}]}}}function g(e,t,n,i,a,o){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{view:{stroke:"transparent"}},autosize:{contains:"padding"},width:o.width,height:o.height,padding:0,data:{values:[{x:0,y:n*e,c:"(Python) "+(0,r.memory_consumed_str)(n*e),d:n*e>.2*i?(0,r.memory_consumed_str)(n*e):"",q:n*e/2},{x:0,y:(1-n)*e,c:"(native) "+(0,r.memory_consumed_str)((1-n)*e),d:(1-n)*e>.2*i?(0,r.memory_consumed_str)((1-n)*e):"",q:n*e+(1-n)*e/2}]},layer:[{mark:{type:"bar"},encoding:{x:{aggregate:"sum",field:"y",axis:!1,scale:{domain:[0,i]}},color:{field:"c",type:"nominal",legend:!1,scale:{range:[a,"#50C878","green"]}}}},{mark:{type:"text",align:"center",baseline:"middle",dx:0},encoding:{x:{aggregate:"sum",field:"q",axis:!1},text:{field:"d"},color:{value:"white"}}}]}}function m(e,t,n,i=0,a){const o=e.map((e=>{let t="";return 0!=i&&(t=`; possible leak (${(0,r.memory_consumed_str)(i)}/s)`),{x:e[0],y:e[1],y_text:(0,r.memory_consumed_str)(e[1])+" (@ "+(0,r.time_consumed_str)(e[0]/1e6)+")"+t}}));let s="";return 0!=i&&(s="possible leak",a.height-=10),{$schema:"https://vega.github.io/schema/vega-lite/v5.json",data:{values:o},width:a.width,height:a.height,padding:0,title:{text:s,baseline:"line-bottom",color:"red",offset:0,lineHeight:10,orient:"bottom",fontStyle:"italic"},encoding:{x:{field:"x",type:"quantitative",title:"",axis:{tickCount:10,tickSize:0,labelExpr:""},scale:{domain:[0,t]}}},layer:[{encoding:{y:{field:"y",type:"quantitative",axis:null,scale:{domain:[0,n]}},color:{field:"c",type:"nominal",legend:null,scale:{range:["darkgreen"]}}},layer:[{mark:"line"},{transform:[{filter:{param:"hover",empty:!1}}],mark:"point"}]},{mark:"rule",encoding:{opacity:{condition:{value:.3,param:"hover",empty:!1},value:0},tooltip:[{field:"y_text",type:"nominal",title:"memory"}]},params:[{name:"hover",select:{type:"point",fields:["y"],nearest:!0,on:"mousemove"}}]}]}}},9779:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AwsCrc32:()=>o});var r=n(31635),i=n(45193),a=n(60442),o=function(){function e(){this.crc32=new a.Crc32}return e.prototype.update=function(e){(0,i.isEmptyData)(e)||this.crc32.update((0,i.convertToBuffer)(e))},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,(0,i.numToUint8)(this.crc32.digest())]}))}))},e.prototype.reset=function(){this.crc32=new a.Crc32},e}()},60442:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AwsCrc32:()=>a.AwsCrc32,Crc32:()=>s,crc32:()=>o});var r=n(31635),i=n(45193),a=n(9779);function o(e){return(new s).update(e).digest()}var s=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var i=(0,r.__values)(e),a=i.next();!a.done;a=i.next()){var o=a.value;this.checksum=this.checksum>>>8^l[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),l=(0,i.uint32ArrayFrom)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117])},81713:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EMPTY_DATA_SHA_256:()=>a,SHA_256_HASH:()=>r,SHA_256_HMAC_ALGO:()=>i});var r={name:"SHA-256"},i={name:"HMAC",hash:r},a=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},97963:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sha256:()=>l});var r=n(36171),i=n(20928),a=n(81566),o=n(77226),s=n(45193),l=function(){function e(e){(0,a.supportsWebCrypto)((0,o.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update((0,s.convertToBuffer)(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}()},25147:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sha256:()=>r.Sha256,WebCryptoSha256:()=>i.Sha256});var r=n(97963),i=n(36171)},36171:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sha256:()=>o});var r=n(45193),i=n(81713),a=n(77226),o=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,a.locateWindow)().crypto.subtle.sign(i.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(i.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,a.locateWindow)().crypto.subtle.digest(i.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,n){(0,a.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e.secret),i.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}()},91025:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RawSha256:()=>i});var r=n(16661),i=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var i=this.bufferLength;i>>24&255,a[4*i+1]=this.state[i]>>>16&255,a[4*i+2]=this.state[i]>>>8&255,a[4*i+3]=this.state[i]>>>0&255;return a},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=0;d>>17|f<<15)^(f>>>19|f<<13)^f>>>10,h=((f=this.temp[d-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(h+this.temp[d-16]|0)}var g=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&l^~s&u)|0)+(c+(r.KEY[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&a^i&a)|0;c=u,u=l,l=s,s=o+g|0,o=a,a=i,i=n,n=g+m|0}t[0]+=n,t[1]+=i,t[2]+=a,t[3]+=o,t[4]+=s,t[5]+=l,t[6]+=u,t[7]+=c},e}()},16661:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BLOCK_SIZE:()=>r,DIGEST_LENGTH:()=>i,INIT:()=>o,KEY:()=>a,MAX_HASHABLE_LENGTH:()=>s});var r=64,i=32,a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),o=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],s=Math.pow(2,53)-1},20928:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sha256:()=>r.Sha256});var r=n(92342)},92342:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sha256:()=>s});var r=n(31635),i=n(16661),a=n(91025),o=n(45193),s=function(){function e(e){this.secret=e,this.hash=new a.RawSha256,this.reset()}return e.prototype.update=function(e){if(!(0,o.isEmptyData)(e)&&!this.error)try{this.hash.update((0,o.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new a.RawSha256,this.secret){this.outer=new a.RawSha256;var e=function(e){var t=(0,o.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var n=new a.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(i.BLOCK_SIZE);return r.set(t),r}(this.secret),t=new Uint8Array(i.BLOCK_SIZE);t.set(e);for(var n=0;n{"use strict";n.r(t),n.d(t,{supportsSecureRandom:()=>r.supportsSecureRandom,supportsSubtleCrypto:()=>r.supportsSubtleCrypto,supportsWebCrypto:()=>r.supportsWebCrypto,supportsZeroByteGCM:()=>r.supportsZeroByteGCM});var r=n(74573)},74573:(e,t,n)=>{"use strict";n.r(t),n.d(t,{supportsSecureRandom:()=>o,supportsSubtleCrypto:()=>s,supportsWebCrypto:()=>a,supportsZeroByteGCM:()=>l});var r=n(31635),i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function a(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&s(e.crypto.subtle)}function o(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function s(e){return e&&i.every((function(t){return"function"==typeof e[t]}))}function l(e){return(0,r.__awaiter)(this,void 0,void 0,(function(){var t;return(0,r.__generator)(this,(function(n){switch(n.label){case 0:if(!s(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},24773:(e,t,n)=>{"use strict";n.r(t),n.d(t,{convertToBuffer:()=>a});var r=n(15424),i="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:r.fromUtf8;function a(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},45193:(e,t,n)=>{"use strict";n.r(t),n.d(t,{convertToBuffer:()=>r.convertToBuffer,isEmptyData:()=>i.isEmptyData,numToUint8:()=>a.numToUint8,uint32ArrayFrom:()=>o.uint32ArrayFrom});var r=n(24773),i=n(72384),a=n(49470),o=n(34635)},72384:(e,t,n)=>{"use strict";function r(e){return"string"==typeof e?0===e.length:0===e.byteLength}n.r(t),n.d(t,{isEmptyData:()=>r})},49470:(e,t,n)=>{"use strict";function r(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}n.r(t),n.d(t,{numToUint8:()=>r})},34635:(e,t,n)=>{"use strict";function r(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;nr})},46499:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromUtf8:()=>r});const r=e=>(new TextEncoder).encode(e)},15424:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromUtf8:()=>r.fromUtf8,toUint8Array:()=>i.toUint8Array,toUtf8:()=>a.toUtf8});var r=n(46499),i=n(32498),a=n(2358)},32498:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toUint8Array:()=>i});var r=n(46499);const i=e=>"string"==typeof e?(0,r.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)},2358:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toUtf8:()=>r});const r=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)}},2169:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BedrockRuntime:()=>d});var r=n(31796),i=n(52046),a=n(87216),o=n(32804),s=n(43340),l=n(24266),u=n(31755);const c={ApplyGuardrailCommand:a.ApplyGuardrailCommand,ConverseCommand:o.ConverseCommand,ConverseStreamCommand:s.ConverseStreamCommand,InvokeModelCommand:l.InvokeModelCommand,InvokeModelWithResponseStreamCommand:u.InvokeModelWithResponseStreamCommand};class d extends i.BedrockRuntimeClient{}(0,r.createAggregatedClient)(c,d)},52046:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BedrockRuntimeClient:()=>v,__Client:()=>p.Client});var r=n(81095),i=n(50165),a=n(48377),o=n(44130),s=n(61329),l=n(40033),u=n(78504),c=n(70649),d=n(72540),f=n(41069),p=n(31796),h=n(19772),g=n(60756),m=n(47411),y=n(52793);class v extends p.Client{constructor(...[e]){const t=(0,m.getRuntimeConfig)(e||{}),n=(0,g.resolveClientEndpointParameters)(t),p=(0,o.resolveUserAgentConfig)(n),v=(0,f.resolveRetryConfig)(p),b=(0,s.resolveRegionConfig)(v),w=(0,r.resolveHostHeaderConfig)(b),x=(0,d.resolveEndpointConfig)(w),E=(0,u.resolveEventStreamSerdeConfig)(x),S=(0,h.resolveHttpAuthSchemeConfig)(E),_=(0,y.resolveRuntimeExtensions)(S,e?.extensions||[]);super(_),this.config=_,this.middlewareStack.use((0,o.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,f.getRetryPlugin)(this.config)),this.middlewareStack.use((0,c.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,r.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,i.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,a.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,l.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:h.defaultBedrockRuntimeHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new l.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,l.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}}},21167:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpAuthExtensionConfiguration:()=>r,resolveHttpAuthRuntimeConfig:()=>i});const r=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}},i=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})},19772:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultBedrockRuntimeHttpAuthSchemeParametersProvider:()=>a,defaultBedrockRuntimeHttpAuthSchemeProvider:()=>o,resolveHttpAuthSchemeConfig:()=>s});var r=n(44445),i=n(40805);const a=async(e,t,n)=>({operation:(0,i.getSmithyContext)(t).operation,region:await(0,i.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),o=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},s=e=>({...(0,r.resolveAwsSdkSigV4Config)(e)})},87216:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,ApplyGuardrailCommand:()=>l});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(43712);class l extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","ApplyGuardrail",{}).n("BedrockRuntimeClient","ApplyGuardrailCommand").f(void 0,void 0).ser(s.se_ApplyGuardrailCommand).de(s.de_ApplyGuardrailCommand).build()){}},32804:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,ConverseCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","Converse",{}).n("BedrockRuntimeClient","ConverseCommand").f(s.ConverseRequestFilterSensitiveLog,void 0).ser(l.se_ConverseCommand).de(l.de_ConverseCommand).build()){}},43340:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,ConverseStreamCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","ConverseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","ConverseStreamCommand").f(s.ConverseStreamRequestFilterSensitiveLog,s.ConverseStreamResponseFilterSensitiveLog).ser(l.se_ConverseStreamCommand).de(l.de_ConverseStreamCommand).build()){}},24266:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,InvokeModelCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(s.InvokeModelRequestFilterSensitiveLog,s.InvokeModelResponseFilterSensitiveLog).ser(l.se_InvokeModelCommand).de(l.de_InvokeModelCommand).build()){}},31755:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,InvokeModelWithResponseStreamCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(s.InvokeModelWithResponseStreamRequestFilterSensitiveLog,s.InvokeModelWithResponseStreamResponseFilterSensitiveLog).ser(l.se_InvokeModelWithResponseStreamCommand).de(l.de_InvokeModelWithResponseStreamCommand).build()){}},51322:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>r.$Command,ApplyGuardrailCommand:()=>r.ApplyGuardrailCommand,ConverseCommand:()=>i.ConverseCommand,ConverseStreamCommand:()=>a.ConverseStreamCommand,InvokeModelCommand:()=>o.InvokeModelCommand,InvokeModelWithResponseStreamCommand:()=>s.InvokeModelWithResponseStreamCommand});var r=n(87216),i=n(32804),a=n(43340),o=n(24266),s=n(31755)},60756:(e,t,n)=>{"use strict";n.r(t),n.d(t,{commonParams:()=>i,resolveClientEndpointParameters:()=>r});const r=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}),i={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}},87010:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultEndpointResolver:()=>s});var r=n(95417),i=n(7069),a=n(66603);const o=new i.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),s=(e,t={})=>o.get(e,(()=>(0,i.resolveEndpoint)(a.ruleSet,{endpointParams:e,logger:t.logger})));i.customEndpointFunctions.aws=r.awsEndpointFunctions},66603:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ruleSet:()=>A});const r="required",i="fn",a="argv",o="ref",s=!0,l="isSet",u="booleanEquals",c="error",d="endpoint",f="tree",p="PartitionResult",h={[r]:!1,type:"String"},g={[r]:!0,default:!1,type:"Boolean"},m={[o]:"Endpoint"},y={[i]:u,[a]:[{[o]:"UseFIPS"},!0]},v={[i]:u,[a]:[{[o]:"UseDualStack"},!0]},b={},w={[i]:"getAttr",[a]:[{[o]:p},"supportsFIPS"]},x={[i]:u,[a]:[!0,{[i]:"getAttr",[a]:[{[o]:p},"supportsDualStack"]}]},E=[y],S=[v],_=[{[o]:"Region"}],A={version:"1.0",parameters:{Region:h,UseDualStack:g,UseFIPS:g,Endpoint:h},rules:[{conditions:[{[i]:l,[a]:[m]}],rules:[{conditions:E,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{rules:[{conditions:S,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:m,properties:b,headers:b},type:d}],type:f}],type:f},{rules:[{conditions:[{[i]:l,[a]:_}],rules:[{conditions:[{[i]:"aws.partition",[a]:_,assign:p}],rules:[{conditions:[y,v],rules:[{conditions:[{[i]:u,[a]:[s,w]},x],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b,headers:b},type:d}],type:f}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}],type:f},{conditions:E,rules:[{conditions:[{[i]:u,[a]:[w,s]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:b,headers:b},type:d}],type:f}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:c}],type:f},{conditions:S,rules:[{conditions:[x],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b,headers:b},type:d}],type:f}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:c}],type:f},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:b,headers:b},type:d}],type:f}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:c}],type:f}]}},6995:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.$Command,AccessDeniedException:()=>o.AccessDeniedException,ApplyGuardrailCommand:()=>a.ApplyGuardrailCommand,BedrockRuntime:()=>i.BedrockRuntime,BedrockRuntimeClient:()=>r.BedrockRuntimeClient,BedrockRuntimeServiceException:()=>s.BedrockRuntimeServiceException,ContentBlock:()=>o.ContentBlock,ContentBlockDelta:()=>o.ContentBlockDelta,ContentBlockStart:()=>o.ContentBlockStart,ConversationRole:()=>o.ConversationRole,ConverseCommand:()=>a.ConverseCommand,ConverseOutput:()=>o.ConverseOutput,ConverseRequestFilterSensitiveLog:()=>o.ConverseRequestFilterSensitiveLog,ConverseStreamCommand:()=>a.ConverseStreamCommand,ConverseStreamOutput:()=>o.ConverseStreamOutput,ConverseStreamOutputFilterSensitiveLog:()=>o.ConverseStreamOutputFilterSensitiveLog,ConverseStreamRequestFilterSensitiveLog:()=>o.ConverseStreamRequestFilterSensitiveLog,ConverseStreamResponseFilterSensitiveLog:()=>o.ConverseStreamResponseFilterSensitiveLog,DocumentFormat:()=>o.DocumentFormat,DocumentSource:()=>o.DocumentSource,GuardrailAction:()=>o.GuardrailAction,GuardrailContentBlock:()=>o.GuardrailContentBlock,GuardrailContentFilterConfidence:()=>o.GuardrailContentFilterConfidence,GuardrailContentFilterStrength:()=>o.GuardrailContentFilterStrength,GuardrailContentFilterType:()=>o.GuardrailContentFilterType,GuardrailContentPolicyAction:()=>o.GuardrailContentPolicyAction,GuardrailContentQualifier:()=>o.GuardrailContentQualifier,GuardrailContentSource:()=>o.GuardrailContentSource,GuardrailContextualGroundingFilterType:()=>o.GuardrailContextualGroundingFilterType,GuardrailContextualGroundingPolicyAction:()=>o.GuardrailContextualGroundingPolicyAction,GuardrailConverseContentBlock:()=>o.GuardrailConverseContentBlock,GuardrailConverseContentQualifier:()=>o.GuardrailConverseContentQualifier,GuardrailManagedWordType:()=>o.GuardrailManagedWordType,GuardrailPiiEntityType:()=>o.GuardrailPiiEntityType,GuardrailSensitiveInformationPolicyAction:()=>o.GuardrailSensitiveInformationPolicyAction,GuardrailStreamProcessingMode:()=>o.GuardrailStreamProcessingMode,GuardrailTopicPolicyAction:()=>o.GuardrailTopicPolicyAction,GuardrailTopicType:()=>o.GuardrailTopicType,GuardrailTrace:()=>o.GuardrailTrace,GuardrailWordPolicyAction:()=>o.GuardrailWordPolicyAction,ImageFormat:()=>o.ImageFormat,ImageSource:()=>o.ImageSource,InternalServerException:()=>o.InternalServerException,InvokeModelCommand:()=>a.InvokeModelCommand,InvokeModelRequestFilterSensitiveLog:()=>o.InvokeModelRequestFilterSensitiveLog,InvokeModelResponseFilterSensitiveLog:()=>o.InvokeModelResponseFilterSensitiveLog,InvokeModelWithResponseStreamCommand:()=>a.InvokeModelWithResponseStreamCommand,InvokeModelWithResponseStreamRequestFilterSensitiveLog:()=>o.InvokeModelWithResponseStreamRequestFilterSensitiveLog,InvokeModelWithResponseStreamResponseFilterSensitiveLog:()=>o.InvokeModelWithResponseStreamResponseFilterSensitiveLog,ModelErrorException:()=>o.ModelErrorException,ModelNotReadyException:()=>o.ModelNotReadyException,ModelStreamErrorException:()=>o.ModelStreamErrorException,ModelTimeoutException:()=>o.ModelTimeoutException,PayloadPartFilterSensitiveLog:()=>o.PayloadPartFilterSensitiveLog,PromptVariableValues:()=>o.PromptVariableValues,ResourceNotFoundException:()=>o.ResourceNotFoundException,ResponseStream:()=>o.ResponseStream,ResponseStreamFilterSensitiveLog:()=>o.ResponseStreamFilterSensitiveLog,ServiceQuotaExceededException:()=>o.ServiceQuotaExceededException,ServiceUnavailableException:()=>o.ServiceUnavailableException,StopReason:()=>o.StopReason,SystemContentBlock:()=>o.SystemContentBlock,ThrottlingException:()=>o.ThrottlingException,Tool:()=>o.Tool,ToolChoice:()=>o.ToolChoice,ToolInputSchema:()=>o.ToolInputSchema,ToolResultContentBlock:()=>o.ToolResultContentBlock,ToolResultStatus:()=>o.ToolResultStatus,Trace:()=>o.Trace,ValidationException:()=>o.ValidationException,__Client:()=>r.__Client});var r=n(52046),i=n(2169),a=n(51322),o=n(66926),s=n(37474)},37474:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BedrockRuntimeServiceException:()=>i,__ServiceException:()=>r.ServiceException});var r=n(31796);class i extends r.ServiceException{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}}},66926:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AccessDeniedException:()=>r.AccessDeniedException,ContentBlock:()=>r.ContentBlock,ContentBlockDelta:()=>r.ContentBlockDelta,ContentBlockStart:()=>r.ContentBlockStart,ConversationRole:()=>r.ConversationRole,ConverseOutput:()=>r.ConverseOutput,ConverseRequestFilterSensitiveLog:()=>r.ConverseRequestFilterSensitiveLog,ConverseStreamOutput:()=>r.ConverseStreamOutput,ConverseStreamOutputFilterSensitiveLog:()=>r.ConverseStreamOutputFilterSensitiveLog,ConverseStreamRequestFilterSensitiveLog:()=>r.ConverseStreamRequestFilterSensitiveLog,ConverseStreamResponseFilterSensitiveLog:()=>r.ConverseStreamResponseFilterSensitiveLog,DocumentFormat:()=>r.DocumentFormat,DocumentSource:()=>r.DocumentSource,GuardrailAction:()=>r.GuardrailAction,GuardrailContentBlock:()=>r.GuardrailContentBlock,GuardrailContentFilterConfidence:()=>r.GuardrailContentFilterConfidence,GuardrailContentFilterStrength:()=>r.GuardrailContentFilterStrength,GuardrailContentFilterType:()=>r.GuardrailContentFilterType,GuardrailContentPolicyAction:()=>r.GuardrailContentPolicyAction,GuardrailContentQualifier:()=>r.GuardrailContentQualifier,GuardrailContentSource:()=>r.GuardrailContentSource,GuardrailContextualGroundingFilterType:()=>r.GuardrailContextualGroundingFilterType,GuardrailContextualGroundingPolicyAction:()=>r.GuardrailContextualGroundingPolicyAction,GuardrailConverseContentBlock:()=>r.GuardrailConverseContentBlock,GuardrailConverseContentQualifier:()=>r.GuardrailConverseContentQualifier,GuardrailManagedWordType:()=>r.GuardrailManagedWordType,GuardrailPiiEntityType:()=>r.GuardrailPiiEntityType,GuardrailSensitiveInformationPolicyAction:()=>r.GuardrailSensitiveInformationPolicyAction,GuardrailStreamProcessingMode:()=>r.GuardrailStreamProcessingMode,GuardrailTopicPolicyAction:()=>r.GuardrailTopicPolicyAction,GuardrailTopicType:()=>r.GuardrailTopicType,GuardrailTrace:()=>r.GuardrailTrace,GuardrailWordPolicyAction:()=>r.GuardrailWordPolicyAction,ImageFormat:()=>r.ImageFormat,ImageSource:()=>r.ImageSource,InternalServerException:()=>r.InternalServerException,InvokeModelRequestFilterSensitiveLog:()=>r.InvokeModelRequestFilterSensitiveLog,InvokeModelResponseFilterSensitiveLog:()=>r.InvokeModelResponseFilterSensitiveLog,InvokeModelWithResponseStreamRequestFilterSensitiveLog:()=>r.InvokeModelWithResponseStreamRequestFilterSensitiveLog,InvokeModelWithResponseStreamResponseFilterSensitiveLog:()=>r.InvokeModelWithResponseStreamResponseFilterSensitiveLog,ModelErrorException:()=>r.ModelErrorException,ModelNotReadyException:()=>r.ModelNotReadyException,ModelStreamErrorException:()=>r.ModelStreamErrorException,ModelTimeoutException:()=>r.ModelTimeoutException,PayloadPartFilterSensitiveLog:()=>r.PayloadPartFilterSensitiveLog,PromptVariableValues:()=>r.PromptVariableValues,ResourceNotFoundException:()=>r.ResourceNotFoundException,ResponseStream:()=>r.ResponseStream,ResponseStreamFilterSensitiveLog:()=>r.ResponseStreamFilterSensitiveLog,ServiceQuotaExceededException:()=>r.ServiceQuotaExceededException,ServiceUnavailableException:()=>r.ServiceUnavailableException,StopReason:()=>r.StopReason,SystemContentBlock:()=>r.SystemContentBlock,ThrottlingException:()=>r.ThrottlingException,Tool:()=>r.Tool,ToolChoice:()=>r.ToolChoice,ToolInputSchema:()=>r.ToolInputSchema,ToolResultContentBlock:()=>r.ToolResultContentBlock,ToolResultStatus:()=>r.ToolResultStatus,Trace:()=>r.Trace,ValidationException:()=>r.ValidationException});var r=n(285)},285:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AccessDeniedException:()=>a,ContentBlock:()=>I,ContentBlockDelta:()=>K,ContentBlockStart:()=>J,ConversationRole:()=>$,ConverseOutput:()=>j,ConverseRequestFilterSensitiveLog:()=>ne,ConverseStreamOutput:()=>Q,ConverseStreamOutputFilterSensitiveLog:()=>ie,ConverseStreamRequestFilterSensitiveLog:()=>re,ConverseStreamResponseFilterSensitiveLog:()=>ae,DocumentFormat:()=>k,DocumentSource:()=>R,GuardrailAction:()=>u,GuardrailContentBlock:()=>s,GuardrailContentFilterConfidence:()=>d,GuardrailContentFilterStrength:()=>f,GuardrailContentFilterType:()=>p,GuardrailContentPolicyAction:()=>c,GuardrailContentQualifier:()=>o,GuardrailContentSource:()=>l,GuardrailContextualGroundingFilterType:()=>g,GuardrailContextualGroundingPolicyAction:()=>h,GuardrailConverseContentBlock:()=>O,GuardrailConverseContentQualifier:()=>D,GuardrailManagedWordType:()=>x,GuardrailPiiEntityType:()=>y,GuardrailSensitiveInformationPolicyAction:()=>m,GuardrailStreamProcessingMode:()=>X,GuardrailTopicPolicyAction:()=>v,GuardrailTopicType:()=>b,GuardrailTrace:()=>T,GuardrailWordPolicyAction:()=>w,ImageFormat:()=>N,ImageSource:()=>F,InternalServerException:()=>E,InvokeModelRequestFilterSensitiveLog:()=>oe,InvokeModelResponseFilterSensitiveLog:()=>se,InvokeModelWithResponseStreamRequestFilterSensitiveLog:()=>le,InvokeModelWithResponseStreamResponseFilterSensitiveLog:()=>de,ModelErrorException:()=>G,ModelNotReadyException:()=>V,ModelStreamErrorException:()=>Z,ModelTimeoutException:()=>W,PayloadPartFilterSensitiveLog:()=>ue,PromptVariableValues:()=>L,ResourceNotFoundException:()=>S,ResponseStream:()=>te,ResponseStreamFilterSensitiveLog:()=>ce,ServiceQuotaExceededException:()=>_,ServiceUnavailableException:()=>Y,StopReason:()=>H,SystemContentBlock:()=>B,ThrottlingException:()=>A,Tool:()=>q,ToolChoice:()=>U,ToolInputSchema:()=>z,ToolResultContentBlock:()=>P,ToolResultStatus:()=>M,Trace:()=>ee,ValidationException:()=>C});var r=n(31796),i=n(37474);class a extends i.BedrockRuntimeServiceException{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,a.prototype)}}const o={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"};var s;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(s||(s={}));const l={INPUT:"INPUT",OUTPUT:"OUTPUT"},u={GUARDRAIL_INTERVENED:"GUARDRAIL_INTERVENED",NONE:"NONE"},c={BLOCKED:"BLOCKED"},d={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},f={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},p={HATE:"HATE",INSULTS:"INSULTS",MISCONDUCT:"MISCONDUCT",PROMPT_ATTACK:"PROMPT_ATTACK",SEXUAL:"SEXUAL",VIOLENCE:"VIOLENCE"},h={BLOCKED:"BLOCKED",NONE:"NONE"},g={GROUNDING:"GROUNDING",RELEVANCE:"RELEVANCE"},m={ANONYMIZED:"ANONYMIZED",BLOCKED:"BLOCKED"},y={ADDRESS:"ADDRESS",AGE:"AGE",AWS_ACCESS_KEY:"AWS_ACCESS_KEY",AWS_SECRET_KEY:"AWS_SECRET_KEY",CA_HEALTH_NUMBER:"CA_HEALTH_NUMBER",CA_SOCIAL_INSURANCE_NUMBER:"CA_SOCIAL_INSURANCE_NUMBER",CREDIT_DEBIT_CARD_CVV:"CREDIT_DEBIT_CARD_CVV",CREDIT_DEBIT_CARD_EXPIRY:"CREDIT_DEBIT_CARD_EXPIRY",CREDIT_DEBIT_CARD_NUMBER:"CREDIT_DEBIT_CARD_NUMBER",DRIVER_ID:"DRIVER_ID",EMAIL:"EMAIL",INTERNATIONAL_BANK_ACCOUNT_NUMBER:"INTERNATIONAL_BANK_ACCOUNT_NUMBER",IP_ADDRESS:"IP_ADDRESS",LICENSE_PLATE:"LICENSE_PLATE",MAC_ADDRESS:"MAC_ADDRESS",NAME:"NAME",PASSWORD:"PASSWORD",PHONE:"PHONE",PIN:"PIN",SWIFT_CODE:"SWIFT_CODE",UK_NATIONAL_HEALTH_SERVICE_NUMBER:"UK_NATIONAL_HEALTH_SERVICE_NUMBER",UK_NATIONAL_INSURANCE_NUMBER:"UK_NATIONAL_INSURANCE_NUMBER",UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER:"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",URL:"URL",USERNAME:"USERNAME",US_BANK_ACCOUNT_NUMBER:"US_BANK_ACCOUNT_NUMBER",US_BANK_ROUTING_NUMBER:"US_BANK_ROUTING_NUMBER",US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER:"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",US_PASSPORT_NUMBER:"US_PASSPORT_NUMBER",US_SOCIAL_SECURITY_NUMBER:"US_SOCIAL_SECURITY_NUMBER",VEHICLE_IDENTIFICATION_NUMBER:"VEHICLE_IDENTIFICATION_NUMBER"},v={BLOCKED:"BLOCKED"},b={DENY:"DENY"},w={BLOCKED:"BLOCKED"},x={PROFANITY:"PROFANITY"};class E extends i.BedrockRuntimeServiceException{constructor(e){super({name:"InternalServerException",$fault:"server",...e}),this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,E.prototype)}}class S extends i.BedrockRuntimeServiceException{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}class _ extends i.BedrockRuntimeServiceException{constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),this.name="ServiceQuotaExceededException",this.$fault="client",Object.setPrototypeOf(this,_.prototype)}}class A extends i.BedrockRuntimeServiceException{constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,A.prototype)}}class C extends i.BedrockRuntimeServiceException{constructor(e){super({name:"ValidationException",$fault:"client",...e}),this.name="ValidationException",this.$fault="client",Object.setPrototypeOf(this,C.prototype)}}const T={DISABLED:"disabled",ENABLED:"enabled"},k={CSV:"csv",DOC:"doc",DOCX:"docx",HTML:"html",MD:"md",PDF:"pdf",TXT:"txt",XLS:"xls",XLSX:"xlsx"};var R;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(R||(R={}));const D={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"};var O;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(O||(O={}));const N={GIF:"gif",JPEG:"jpeg",PNG:"png",WEBP:"webp"};var F,P;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(F||(F={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):t._(e.$unknown[0],e.$unknown[1])}(P||(P={}));const M={ERROR:"error",SUCCESS:"success"};var I;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(I||(I={}));const $={ASSISTANT:"assistant",USER:"user"};var L,B,U,z,q,j;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(L||(L={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(B||(B={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(U||(U={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(z||(z={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):t._(e.$unknown[0],e.$unknown[1])}(q||(q={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(j||(j={}));const H={CONTENT_FILTERED:"content_filtered",END_TURN:"end_turn",GUARDRAIL_INTERVENED:"guardrail_intervened",MAX_TOKENS:"max_tokens",STOP_SEQUENCE:"stop_sequence",TOOL_USE:"tool_use"};class G extends i.BedrockRuntimeServiceException{constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),this.name="ModelErrorException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class V extends i.BedrockRuntimeServiceException{constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),this.name="ModelNotReadyException",this.$fault="client",this.$retryable={},Object.setPrototypeOf(this,V.prototype)}}class W extends i.BedrockRuntimeServiceException{constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),this.name="ModelTimeoutException",this.$fault="client",Object.setPrototypeOf(this,W.prototype)}}class Y extends i.BedrockRuntimeServiceException{constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),this.name="ServiceUnavailableException",this.$fault="server",Object.setPrototypeOf(this,Y.prototype)}}const X={ASYNC:"async",SYNC:"sync"};var K,J,Q;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(K||(K={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(J||(J={}));class Z extends i.BedrockRuntimeServiceException{constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),this.name="ModelStreamErrorException",this.$fault="client",Object.setPrototypeOf(this,Z.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(Q||(Q={}));const ee={DISABLED:"DISABLED",ENABLED:"ENABLED"};var te;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(te||(te={}));const ne=e=>({...e,...e.messages&&{messages:e.messages.map((e=>e))},...e.system&&{system:e.system.map((e=>e))},...e.toolConfig&&{toolConfig:e.toolConfig},...e.promptVariables&&{promptVariables:r.SENSITIVE_STRING}}),re=e=>({...e,...e.messages&&{messages:e.messages.map((e=>e))},...e.system&&{system:e.system.map((e=>e))},...e.toolConfig&&{toolConfig:e.toolConfig},...e.promptVariables&&{promptVariables:r.SENSITIVE_STRING}}),ie=e=>void 0!==e.messageStart?{messageStart:e.messageStart}:void 0!==e.contentBlockStart?{contentBlockStart:e.contentBlockStart}:void 0!==e.contentBlockDelta?{contentBlockDelta:e.contentBlockDelta}:void 0!==e.contentBlockStop?{contentBlockStop:e.contentBlockStop}:void 0!==e.messageStop?{messageStop:e.messageStop}:void 0!==e.metadata?{metadata:e.metadata}:void 0!==e.internalServerException?{internalServerException:e.internalServerException}:void 0!==e.modelStreamErrorException?{modelStreamErrorException:e.modelStreamErrorException}:void 0!==e.validationException?{validationException:e.validationException}:void 0!==e.throttlingException?{throttlingException:e.throttlingException}:void 0!==e.serviceUnavailableException?{serviceUnavailableException:e.serviceUnavailableException}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,ae=e=>({...e,...e.stream&&{stream:"STREAMING_CONTENT"}}),oe=e=>({...e,...e.body&&{body:r.SENSITIVE_STRING}}),se=e=>({...e,...e.body&&{body:r.SENSITIVE_STRING}}),le=e=>({...e,...e.body&&{body:r.SENSITIVE_STRING}}),ue=e=>({...e,...e.bytes&&{bytes:r.SENSITIVE_STRING}}),ce=e=>void 0!==e.chunk?{chunk:r.SENSITIVE_STRING}:void 0!==e.internalServerException?{internalServerException:e.internalServerException}:void 0!==e.modelStreamErrorException?{modelStreamErrorException:e.modelStreamErrorException}:void 0!==e.validationException?{validationException:e.validationException}:void 0!==e.throttlingException?{throttlingException:e.throttlingException}:void 0!==e.modelTimeoutException?{modelTimeoutException:e.modelTimeoutException}:void 0!==e.serviceUnavailableException?{serviceUnavailableException:e.serviceUnavailableException}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,de=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}})},43712:(e,t,n)=>{"use strict";n.r(t),n.d(t,{de_ApplyGuardrailCommand:()=>p,de_ConverseCommand:()=>h,de_ConverseStreamCommand:()=>g,de_InvokeModelCommand:()=>m,de_InvokeModelWithResponseStreamCommand:()=>y,se_ApplyGuardrailCommand:()=>l,se_ConverseCommand:()=>u,se_ConverseStreamCommand:()=>c,se_InvokeModelCommand:()=>d,se_InvokeModelWithResponseStreamCommand:()=>f});var r=n(44445),i=n(40033),a=n(31796),o=n(37474),s=n(285);const l=async(e,t)=>{const n=(0,i.requestBuilder)(e,t);let r;return n.bp("/guardrail/{guardrailIdentifier}/version/{guardrailVersion}/apply"),n.p("guardrailIdentifier",(()=>e.guardrailIdentifier),"{guardrailIdentifier}",!1),n.p("guardrailVersion",(()=>e.guardrailVersion),"{guardrailVersion}",!1),r=JSON.stringify((0,a.take)(e,{content:e=>(0,a._json)(e),source:[]})),n.m("POST").h({"content-type":"application/json"}).b(r),n.build()},u=async(e,t)=>{const n=(0,i.requestBuilder)(e,t);let r;return n.bp("/model/{modelId}/converse"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),r=JSON.stringify((0,a.take)(e,{additionalModelRequestFields:e=>ie(e,t),additionalModelResponseFieldPaths:e=>(0,a._json)(e),guardrailConfig:e=>(0,a._json)(e),inferenceConfig:e=>K(e,t),messages:e=>J(e,t),promptVariables:e=>(0,a._json)(e),system:e=>(0,a._json)(e),toolConfig:e=>Q(e,t)})),n.m("POST").h({"content-type":"application/json"}).b(r),n.build()},c=async(e,t)=>{const n=(0,i.requestBuilder)(e,t);let r;return n.bp("/model/{modelId}/converse-stream"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),r=JSON.stringify((0,a.take)(e,{additionalModelRequestFields:e=>ie(e,t),additionalModelResponseFieldPaths:e=>(0,a._json)(e),guardrailConfig:e=>(0,a._json)(e),inferenceConfig:e=>K(e,t),messages:e=>J(e,t),promptVariables:e=>(0,a._json)(e),system:e=>(0,a._json)(e),toolConfig:e=>Q(e,t)})),n.m("POST").h({"content-type":"application/json"}).b(r),n.build()},d=async(e,t)=>{const n=(0,i.requestBuilder)(e,t),r=(0,a.map)({},a.isSerializableHeaderValue,{[Te]:e[Ce]||"application/octet-stream",[Ae]:e[Ae],[Me]:e[De],[Fe]:e[ke],[Pe]:e[Re]});let o;return n.bp("/model/{modelId}/invoke"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),void 0!==e.body&&(o=e.body),n.m("POST").h(r).b(o),n.build()},f=async(e,t)=>{const n=(0,i.requestBuilder)(e,t),r=(0,a.map)({},a.isSerializableHeaderValue,{[Te]:e[Ce]||"application/octet-stream",[Oe]:e[Ae],[Me]:e[De],[Fe]:e[ke],[Pe]:e[Re]});let o;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),void 0!==e.body&&(o=e.body),n.m("POST").h(r).b(o),n.build()},p=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return v(e,t);const n=(0,a.map)({$metadata:_e(e)}),i=(0,a.expectNonNull)((0,a.expectObject)(await(0,r.parseJsonBody)(e.body,t)),"body"),o=(0,a.take)(i,{action:a.expectString,assessments:e=>fe(e,t),guardrailCoverage:a._json,outputs:a._json,usage:a._json});return Object.assign(n,o),n},h=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return v(e,t);const n=(0,a.map)({$metadata:_e(e)}),i=(0,a.expectNonNull)((0,a.expectObject)(await(0,r.parseJsonBody)(e.body,t)),"body"),o=(0,a.take)(i,{additionalModelResponseFields:e=>Se(e,t),metrics:a._json,output:e=>ae((0,r.awsExpectUnion)(e),t),stopReason:a.expectString,trace:e=>le(e,t),usage:a._json});return Object.assign(n,o),n},g=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return v(e,t);const n=(0,a.map)({$metadata:_e(e)}),r=e.body;return n.stream=O(r,t),n},m=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return v(e,t);const n=(0,a.map)({$metadata:_e(e),[Ce]:[,e.headers[Te]]}),r=await(0,a.collectBody)(e.body,t);return n.body=r,n},y=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return v(e,t);const n=(0,a.map)({$metadata:_e(e),[Ce]:[,e.headers[Ne]]}),r=e.body;return n.body=N(r,t),n},v=async(e,t)=>{const n={...e,body:await(0,r.parseJsonErrorBody)(e.body,t)},i=(0,r.loadRestJsonErrorCode)(e,n.body);switch(i){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await w(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await x(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await C(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await T(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await R(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await D(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await E(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await S(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await A(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await k(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await _(n,t);default:const r=n.body;return b({output:e,parsedBody:r,errorCode:i})}},b=(0,a.withBaseException)(o.BedrockRuntimeServiceException),w=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new s.AccessDeniedException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},x=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new s.InternalServerException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},E=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString,originalStatusCode:a.expectInt32,resourceName:a.expectString});Object.assign(n,i);const o=new s.ModelErrorException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},S=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new s.ModelNotReadyException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},_=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString,originalMessage:a.expectString,originalStatusCode:a.expectInt32});Object.assign(n,i);const o=new s.ModelStreamErrorException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},A=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new s.ModelTimeoutException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},C=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new s.ResourceNotFoundException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},T=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new s.ServiceQuotaExceededException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},k=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new s.ServiceUnavailableException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},R=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new s.ThrottlingException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},D=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new s.ValidationException({$metadata:_e(e),...n});return(0,a.decorateServiceException)(o,e.body)},O=(e,t)=>t.eventStreamMarshaller.deserialize(e,(async n=>null!=n.messageStart?{messageStart:await L(n.messageStart,t)}:null!=n.contentBlockStart?{contentBlockStart:await P(n.contentBlockStart,t)}:null!=n.contentBlockDelta?{contentBlockDelta:await F(n.contentBlockDelta,t)}:null!=n.contentBlockStop?{contentBlockStop:await M(n.contentBlockStop,t)}:null!=n.messageStop?{messageStop:await B(n.messageStop,t)}:null!=n.metadata?{metadata:await I(n.metadata,t)}:null!=n.internalServerException?{internalServerException:await $(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await U(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await G(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await H(n.throttlingException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await j(n.serviceUnavailableException,t)}:{$unknown:e})),N=(e,t)=>t.eventStreamMarshaller.deserialize(e,(async n=>null!=n.chunk?{chunk:await q(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await $(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await U(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await G(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await H(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await z(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await j(n.serviceUnavailableException,t)}:{$unknown:e})),F=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,(0,a._json)(i)),n},P=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,(0,a._json)(i)),n},M=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,(0,a._json)(i)),n},I=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,oe(i,t)),n},$=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return x(n,t)},L=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,(0,a._json)(i)),n},B=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,ve(i,t)),n},U=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return _(n,t)},z=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return A(n,t)},q=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,be(i,t)),n},j=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return k(n,t)},H=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return R(n,t)},G=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return D(n,t)},V=(e,t)=>(0,a.take)(e,{format:[],name:[],source:e=>W(e,t)}),W=(e,t)=>s.DocumentSource.visit(e,{bytes:e=>({bytes:t.base64Encoder(e)}),_:(e,t)=>({name:t})}),Y=(e,t)=>(0,a.take)(e,{format:[],source:e=>X(e,t)}),X=(e,t)=>s.ImageSource.visit(e,{bytes:e=>({bytes:t.base64Encoder(e)}),_:(e,t)=>({name:t})}),K=(e,t)=>(0,a.take)(e,{maxTokens:[],stopSequences:a._json,temperature:a.serializeFloat,topP:a.serializeFloat}),J=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>(0,a.take)(e,{content:e=>((e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>s.ContentBlock.visit(e,{document:e=>({document:V(e,t)}),guardContent:e=>({guardContent:(0,a._json)(e)}),image:e=>({image:Y(e,t)}),text:e=>({text:e}),toolResult:e=>({toolResult:Z(e,t)}),toolUse:e=>({toolUse:re(e,t)}),_:(e,t)=>({name:t})}))(e,t))))(e,t),role:[]}))(e,t))),Q=(e,t)=>(0,a.take)(e,{toolChoice:a._json,tools:e=>te(e,t)}),Z=(e,t)=>(0,a.take)(e,{content:e=>ee(e,t),status:[],toolUseId:[]}),ee=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>s.ToolResultContentBlock.visit(e,{document:e=>({document:V(e,t)}),image:e=>({image:Y(e,t)}),json:e=>({json:ie(e,t)}),text:e=>({text:e}),_:(e,t)=>({name:t})}))(e,t))),te=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>s.Tool.visit(e,{toolSpec:e=>({toolSpec:ne(e,t)}),_:(e,t)=>({name:t})}))(e,t))),ne=(e,t)=>(0,a.take)(e,{description:[],inputSchema:e=>((e,t)=>s.ToolInputSchema.visit(e,{json:e=>({json:ie(e,t)}),_:(e,t)=>({name:t})}))(e,t),name:[]}),re=(e,t)=>(0,a.take)(e,{input:e=>ie(e,t),name:[],toolUseId:[]}),ie=(e,t)=>e,ae=(e,t)=>null!=e.message?{message:ye(e.message,t)}:{$unknown:Object.entries(e)[0]},oe=(e,t)=>(0,a.take)(e,{metrics:a._json,trace:e=>se(e,t),usage:a._json}),se=(e,t)=>(0,a.take)(e,{guardrail:e=>he(e,t)}),le=(e,t)=>(0,a.take)(e,{guardrail:e=>he(e,t)}),ue=(e,t)=>(0,a.take)(e,{format:a.expectString,name:a.expectString,source:e=>ce((0,r.awsExpectUnion)(e),t)}),ce=(e,t)=>null!=e.bytes?{bytes:t.base64Decoder(e.bytes)}:{$unknown:Object.entries(e)[0]},de=(e,t)=>(0,a.take)(e,{contentPolicy:a._json,contextualGroundingPolicy:e=>pe(e,t),invocationMetrics:a._json,sensitiveInformationPolicy:a._json,topicPolicy:a._json,wordPolicy:a._json}),fe=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de(e,t))),pe=(e,t)=>(0,a.take)(e,{filters:e=>(e=>(e||[]).filter((e=>null!=e)).map((e=>(e=>(0,a.take)(e,{action:a.expectString,score:a.limitedParseDouble,threshold:a.limitedParseDouble,type:a.expectString}))(e))))(e)}),he=(e,t)=>(0,a.take)(e,{inputAssessment:e=>((e,t)=>Object.entries(e).reduce(((e,[n,r])=>(null===r||(e[n]=de(r,t)),e)),{}))(e,t),modelOutput:a._json,outputAssessments:e=>((e,t)=>Object.entries(e).reduce(((e,[n,r])=>(null===r||(e[n]=fe(r,t)),e)),{}))(e,t)}),ge=(e,t)=>(0,a.take)(e,{format:a.expectString,source:e=>me((0,r.awsExpectUnion)(e),t)}),me=(e,t)=>null!=e.bytes?{bytes:t.base64Decoder(e.bytes)}:{$unknown:Object.entries(e)[0]},ye=(e,t)=>(0,a.take)(e,{content:e=>((e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>null!=e.document?{document:ue(e.document,t)}:null!=e.guardContent?{guardContent:(0,a._json)((0,r.awsExpectUnion)(e.guardContent))}:null!=e.image?{image:ge(e.image,t)}:void 0!==(0,a.expectString)(e.text)?{text:(0,a.expectString)(e.text)}:null!=e.toolResult?{toolResult:we(e.toolResult,t)}:null!=e.toolUse?{toolUse:Ee(e.toolUse,t)}:{$unknown:Object.entries(e)[0]})((0,r.awsExpectUnion)(e),t)));return n})(e,t),role:a.expectString}),ve=(e,t)=>(0,a.take)(e,{additionalModelResponseFields:e=>Se(e,t),stopReason:a.expectString}),be=(e,t)=>(0,a.take)(e,{bytes:t.base64Decoder}),we=(e,t)=>(0,a.take)(e,{content:e=>xe(e,t),status:a.expectString,toolUseId:a.expectString}),xe=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>null!=e.document?{document:ue(e.document,t)}:null!=e.image?{image:ge(e.image,t)}:null!=e.json?{json:Se(e.json,t)}:void 0!==(0,a.expectString)(e.text)?{text:(0,a.expectString)(e.text)}:{$unknown:Object.entries(e)[0]})((0,r.awsExpectUnion)(e),t)));return n},Ee=(e,t)=>(0,a.take)(e,{input:e=>Se(e,t),name:a.expectString,toolUseId:a.expectString}),Se=(e,t)=>e,_e=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Ae="accept",Ce="contentType",Te="content-type",ke="guardrailIdentifier",Re="guardrailVersion",De="trace",Oe="x-amzn-bedrock-accept",Ne="x-amzn-bedrock-content-type",Fe="x-amzn-bedrock-guardrailidentifier",Pe="x-amzn-bedrock-guardrailversion",Me="x-amzn-bedrock-trace"},47411:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRuntimeConfig:()=>g});var r=n(99960),i=n(25147),a=n(81772),o=n(61329),s=n(9519),l=n(61664),u=n(70913),c=n(25441),d=n(56265),f=n(66042),p=n(31796),h=n(89124);const g=e=>{const t=(0,h.resolveDefaultsModeConfig)(e),n=()=>t().then(p.loadConfigsForDefaultMode),g=(0,f.getRuntimeConfig)(e);return{...g,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??c.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,a.createDefaultUserAgentProvider)({serviceId:g.serviceId,clientVersion:r.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??s.eventStreamSerdeProvider,maxAttempts:e?.maxAttempts??d.DEFAULT_MAX_ATTEMPTS,region:e?.region??(0,u.invalidProvider)("Region is missing"),requestHandler:l.FetchHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||d.DEFAULT_RETRY_MODE),sha256:e?.sha256??i.Sha256,streamCollector:e?.streamCollector??l.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(o.DEFAULT_USE_DUALSTACK_ENDPOINT)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(o.DEFAULT_USE_FIPS_ENDPOINT))}}},66042:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRuntimeConfig:()=>c});var r=n(44445),i=n(31796),a=n(18065),o=n(33470),s=n(14246),l=n(19772),u=n(87010);const c=e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??o.fromBase64,base64Encoder:e?.base64Encoder??o.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??u.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??l.defaultBedrockRuntimeHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new r.AwsSdkSigV4Signer}],logger:e?.logger??new i.NoOpLogger,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??a.parseUrl,utf8Decoder:e?.utf8Decoder??s.fromUtf8,utf8Encoder:e?.utf8Encoder??s.toUtf8})},52793:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveRuntimeExtensions:()=>s});var r=n(95020),i=n(14065),a=n(31796),o=n(21167);const s=(e,t)=>{const n={...(0,r.getAwsRegionExtensionConfiguration)(e),...(0,a.getDefaultExtensionConfiguration)(e),...(0,i.getHttpHandlerExtensionConfiguration)(e),...(0,o.getHttpAuthExtensionConfiguration)(e)};return t.forEach((e=>e.configure(n))),{...e,...(0,r.resolveAwsRegionExtensionConfiguration)(n),...(0,a.resolveDefaultRuntimeConfig)(n),...(0,i.resolveHttpHandlerRuntimeConfig)(n),...(0,o.resolveHttpAuthRuntimeConfig)(n)}}},44445:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AWSSDKSigV4Signer:()=>i.AWSSDKSigV4Signer,AwsSdkSigV4ASigner:()=>i.AwsSdkSigV4ASigner,AwsSdkSigV4Signer:()=>i.AwsSdkSigV4Signer,NODE_SIGV4A_CONFIG_OPTIONS:()=>i.NODE_SIGV4A_CONFIG_OPTIONS,_toBool:()=>a._toBool,_toNum:()=>a._toNum,_toStr:()=>a._toStr,awsExpectUnion:()=>a.awsExpectUnion,emitWarningIfUnsupportedVersion:()=>r.emitWarningIfUnsupportedVersion,loadRestJsonErrorCode:()=>a.loadRestJsonErrorCode,loadRestXmlErrorCode:()=>a.loadRestXmlErrorCode,parseJsonBody:()=>a.parseJsonBody,parseJsonErrorBody:()=>a.parseJsonErrorBody,parseXmlBody:()=>a.parseXmlBody,parseXmlErrorBody:()=>a.parseXmlErrorBody,resolveAWSSDKSigV4Config:()=>i.resolveAWSSDKSigV4Config,resolveAwsSdkSigV4AConfig:()=>i.resolveAwsSdkSigV4AConfig,resolveAwsSdkSigV4Config:()=>i.resolveAwsSdkSigV4Config,setCredentialFeature:()=>r.setCredentialFeature,setFeature:()=>r.setFeature,state:()=>r.state,validateSigningProperties:()=>i.validateSigningProperties});var r=n(10573),i=n(60304),a=n(62755)},85122:(e,t,n)=>{"use strict";n.r(t),n.d(t,{emitWarningIfUnsupportedVersion:()=>a,state:()=>i});var r=n(65606);const i={warningEmitted:!1},a=e=>{e&&!i.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<18&&(i.warningEmitted=!0,r.emitWarning("NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js 16.x on January 6, 2025.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/74kJMmI"))}},10573:(e,t,n)=>{"use strict";n.r(t),n.d(t,{emitWarningIfUnsupportedVersion:()=>r.emitWarningIfUnsupportedVersion,setCredentialFeature:()=>i.setCredentialFeature,setFeature:()=>a.setFeature,state:()=>r.state});var r=n(85122),i=n(40244),a=n(63415)},40244:(e,t,n)=>{"use strict";function r(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}n.r(t),n.d(t,{setCredentialFeature:()=>r})},63415:(e,t,n)=>{"use strict";function r(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}n.r(t),n.d(t,{setFeature:()=>r})},21006:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AwsSdkSigV4ASigner:()=>o});var r=n(14065),i=n(78626),a=n(77113);class o extends a.AwsSdkSigV4Signer{async sign(e,t,n){if(!r.HttpRequest.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:o,signer:s,signingRegion:l,signingRegionSet:u,signingName:c}=await(0,a.validateSigningProperties)(n),d=(await(o.sigv4aSigningRegionSet?.())??u??[l]).join(",");return await s.sign(e,{signingDate:(0,i.getSkewCorrectedDate)(o.systemClockOffset),signingRegion:d,signingService:c})}}},77113:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AWSSDKSigV4Signer:()=>l,AwsSdkSigV4Signer:()=>s,validateSigningProperties:()=>o});var r=n(14065),i=n(78626);const a=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},o=async e=>{const t=a("context",e.context),n=a("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=a("signer",n.signer),o=await i(r),s=e?.signingRegion,l=e?.signingRegionSet,u=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:l,signingName:u}};class s{async sign(e,t,n){if(!r.HttpRequest.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const a=await o(n),{config:s,signer:l}=a;let{signingRegion:u,signingName:c}=a;const d=n.context;if(d?.authSchemes?.length){const[e,t]=d.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(u=t?.signingRegion??u,c=t?.signingName??c)}return await l.sign(e,{signingDate:(0,i.getSkewCorrectedDate)(s.systemClockOffset),signingRegion:u,signingService:c})}errorHandler(e){return t=>{const n=t.ServerTime??(0,i.getDateHeader)(t.$response);if(n){const r=a("config",e.config),o=r.systemClockOffset;r.systemClockOffset=(0,i.getUpdatedSystemClockOffset)(n,r.systemClockOffset),r.systemClockOffset!==o&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=(0,i.getDateHeader)(e);if(n){const e=a("config",t.config);e.systemClockOffset=(0,i.getUpdatedSystemClockOffset)(n,e.systemClockOffset)}}}const l=s},909:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AWSSDKSigV4Signer:()=>r.AWSSDKSigV4Signer,AwsSdkSigV4ASigner:()=>i.AwsSdkSigV4ASigner,AwsSdkSigV4Signer:()=>r.AwsSdkSigV4Signer,NODE_SIGV4A_CONFIG_OPTIONS:()=>a.NODE_SIGV4A_CONFIG_OPTIONS,resolveAWSSDKSigV4Config:()=>o.resolveAWSSDKSigV4Config,resolveAwsSdkSigV4AConfig:()=>a.resolveAwsSdkSigV4AConfig,resolveAwsSdkSigV4Config:()=>o.resolveAwsSdkSigV4Config,validateSigningProperties:()=>r.validateSigningProperties});var r=n(77113),i=n(21006),a=n(1942),o=n(25669)},1942:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_SIGV4A_CONFIG_OPTIONS:()=>o,resolveAwsSdkSigV4AConfig:()=>a});var r=n(40033),i=n(10223);const a=e=>(e.sigv4aSigningRegionSet=(0,r.normalizeProvider)(e.sigv4aSigningRegionSet),e),o={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET)return e.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((e=>e.trim()));throw new i.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(e){if(e.sigv4a_signing_region_set)return(e.sigv4a_signing_region_set??"").split(",").map((e=>e.trim()));throw new i.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0}},25669:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveAWSSDKSigV4Config:()=>s,resolveAwsSdkSigV4Config:()=>o});var r=n(10573),i=n(40033),a=n(82505);const o=e=>{let t,n=!1;e.credentials&&(n=!0,t=(0,i.memoizeIdentityProvider)(e.credentials,i.isIdentityExpired,i.doesIdentityRequireRefresh)),t||(t=e.credentialDefaultProvider?(0,i.normalizeProvider)(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:o=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:l}=e;let u;return u=e.signer?(0,i.normalizeProvider)(e.signer):e.regionInfoProvider?()=>(0,i.normalizeProvider)(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,r])=>{const{signingRegion:i,signingService:s}=n;e.signingRegion=e.signingRegion||i||r,e.signingName=e.signingName||s||e.serviceId;const u={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:o};return new(e.signerConstructor||a.SignatureV4)(u)})):async n=>{const r=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await(0,i.normalizeProvider)(e.region)(),properties:{}},n)).signingRegion,s=n.signingName;e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||s||e.serviceId;const u={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:o};return new(e.signerConstructor||a.SignatureV4)(u)},{...e,systemClockOffset:s,signingEscapePath:o,credentials:n?async()=>t().then((e=>(0,r.setCredentialFeature)(e,"CREDENTIALS_CODE","e"))):t,signer:u}},s=o},60304:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AWSSDKSigV4Signer:()=>r.AWSSDKSigV4Signer,AwsSdkSigV4ASigner:()=>r.AwsSdkSigV4ASigner,AwsSdkSigV4Signer:()=>r.AwsSdkSigV4Signer,NODE_SIGV4A_CONFIG_OPTIONS:()=>r.NODE_SIGV4A_CONFIG_OPTIONS,resolveAWSSDKSigV4Config:()=>r.resolveAWSSDKSigV4Config,resolveAwsSdkSigV4AConfig:()=>r.resolveAwsSdkSigV4AConfig,resolveAwsSdkSigV4Config:()=>r.resolveAwsSdkSigV4Config,validateSigningProperties:()=>r.validateSigningProperties});var r=n(909)},54171:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDateHeader:()=>i});var r=n(14065);const i=e=>r.HttpResponse.isInstance(e)?e.headers?.date??e.headers?.Date:void 0},60369:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSkewCorrectedDate:()=>r});const r=e=>new Date(Date.now()+e)},42153:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getUpdatedSystemClockOffset:()=>i});var r=n(98895);const i=(e,t)=>{const n=Date.parse(e);return(0,r.isClockSkewed)(n,t)?n-Date.now():t}},78626:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDateHeader:()=>r.getDateHeader,getSkewCorrectedDate:()=>i.getSkewCorrectedDate,getUpdatedSystemClockOffset:()=>a.getUpdatedSystemClockOffset});var r=n(54171),i=n(60369),a=n(42153)},98895:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isClockSkewed:()=>i});var r=n(60369);const i=(e,t)=>Math.abs((0,r.getSkewCorrectedDate)(t).getTime()-e)>=3e5},22341:(e,t,n)=>{"use strict";n.r(t),n.d(t,{_toBool:()=>i,_toNum:()=>a,_toStr:()=>r});const r=e=>{if(null==e)return e;if("number"==typeof e||"bigint"==typeof e){const t=new Error(`Received number ${e} where a string was expected.`);return t.name="Warning",console.warn(t),String(e)}if("boolean"==typeof e){const t=new Error(`Received boolean ${e} where a string was expected.`);return t.name="Warning",console.warn(t),String(e)}return e},i=e=>{if(null==e)return e;if("string"==typeof e){const t=e.toLowerCase();if(""!==e&&"false"!==t&&"true"!==t){const t=new Error(`Received string "${e}" where a boolean was expected.`);t.name="Warning",console.warn(t)}return""!==e&&"false"!==t}return e},a=e=>{if(null==e)return e;if("string"==typeof e){const t=Number(e);if(t.toString()!==e){const t=new Error(`Received string "${e}" where a number was expected.`);return t.name="Warning",console.warn(t),e}return t}return e}},68218:(e,t,n)=>{"use strict";n.r(t),n.d(t,{collectBodyString:()=>i});var r=n(31796);const i=(e,t)=>(0,r.collectBody)(e,t).then((e=>t.utf8Encoder(e)))},62755:(e,t,n)=>{"use strict";n.r(t),n.d(t,{_toBool:()=>r._toBool,_toNum:()=>r._toNum,_toStr:()=>r._toStr,awsExpectUnion:()=>i.awsExpectUnion,loadRestJsonErrorCode:()=>a.loadRestJsonErrorCode,loadRestXmlErrorCode:()=>o.loadRestXmlErrorCode,parseJsonBody:()=>a.parseJsonBody,parseJsonErrorBody:()=>a.parseJsonErrorBody,parseXmlBody:()=>o.parseXmlBody,parseXmlErrorBody:()=>o.parseXmlErrorBody});var r=n(22341),i=n(54475),a=n(21919),o=n(15469)},54475:(e,t,n)=>{"use strict";n.r(t),n.d(t,{awsExpectUnion:()=>i});var r=n(31796);const i=e=>{if(null!=e)return"object"==typeof e&&"__type"in e&&delete e.__type,(0,r.expectUnion)(e)}},21919:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loadRestJsonErrorCode:()=>o,parseJsonBody:()=>i,parseJsonErrorBody:()=>a});var r=n(68218);const i=(e,t)=>(0,r.collectBodyString)(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),a=async(e,t)=>{const n=await i(e,t);return n.message=n.message??n.Message,n},o=(e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=(i=e.headers,Object.keys(i).find((e=>e.toLowerCase()==="x-amzn-errortype".toLowerCase())));var i;return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0}},15469:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loadRestXmlErrorCode:()=>l,parseXmlBody:()=>o,parseXmlErrorBody:()=>s});var r=n(31796),i=n(86454),a=n(68218);const o=(e,t)=>(0,a.collectBodyString)(e,t).then((e=>{if(e.length){const t=new i.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});let n;t.addEntity("#xD","\r"),t.addEntity("#10","\n");try{n=t.parse(e,!0)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const a="#text",o=Object.keys(n)[0],s=n[o];return s[a]&&(s[o]=s[a],delete s[a]),(0,r.getValueFromTextNode)(s)}return{}})),s=async(e,t)=>{const n=await o(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},l=(e,t)=>void 0!==t?.Error?.Code?t.Error.Code:void 0!==t?.Code?t.Code:404==e.statusCode?"NotFound":void 0},81095:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHostHeaderPlugin:()=>s,hostHeaderMiddleware:()=>a,hostHeaderMiddlewareOptions:()=>o,resolveHostHeaderConfig:()=>i});var r=n(14065);function i(e){return e}const a=e=>t=>async n=>{if(!r.HttpRequest.isInstance(n.request))return t(n);const{request:i}=n,{handlerProtocol:a=""}=e.requestHandler.metadata||{};if(a.indexOf("h2")>=0&&!i.headers[":authority"])delete i.headers.host,i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"");else if(!i.headers.host){let e=i.hostname;null!=i.port&&(e+=`:${i.port}`),i.headers.host=e}return t(n)},o={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},s=e=>({applyToStack:t=>{t.add(a(e),o)}})},50165:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getLoggerPlugin:()=>r.getLoggerPlugin,loggerMiddleware:()=>r.loggerMiddleware,loggerMiddlewareOptions:()=>r.loggerMiddlewareOptions});var r=n(77813)},77813:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getLoggerPlugin:()=>a,loggerMiddleware:()=>r,loggerMiddlewareOptions:()=>i});const r=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:a,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:u}=s,c=l??t.inputFilterSensitiveLog,d=u??t.outputFilterSensitiveLog,{$metadata:f,...p}=r.output;return o?.info?.({clientName:i,commandName:a,input:c(n.input),output:d(p),metadata:f}),r}catch(e){const{clientName:r,commandName:i,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:s}=o,l=s??t.inputFilterSensitiveLog;throw a?.error?.({clientName:r,commandName:i,input:l(n.input),error:e,metadata:e.$metadata}),e}},i={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},a=e=>({applyToStack:e=>{e.add(r(),i)}})},48377:(e,t,n)=>{"use strict";n.r(t),n.d(t,{addRecursionDetectionMiddlewareOptions:()=>s,getRecursionDetectionPlugin:()=>l,recursionDetectionMiddleware:()=>o});var r=n(14065),i=n(65606);const a="X-Amzn-Trace-Id",o=e=>t=>async n=>{const{request:o}=n;if(!r.HttpRequest.isInstance(o)||"node"!==e.runtime||o.headers.hasOwnProperty(a))return t(n);const s=i.env.AWS_LAMBDA_FUNCTION_NAME,l=i.env._X_AMZN_TRACE_ID,u=e=>"string"==typeof e&&e.length>0;return u(s)&&u(l)&&(o.headers[a]=l),t({...n,request:o})},s={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},l=e=>({applyToStack:t=>{t.add(o(e),s)}})},63684:(e,t,n)=>{"use strict";n.r(t),n.d(t,{checkFeatures:()=>a});var r=n(44445);const i=/\d{12}\.ddb/;async function a(e,t,n){const a=n.request;if("rpc-v2-cbor"===a?.headers?.["smithy-protocol"]&&(0,r.setFeature)(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?(0,r.setFeature)(e,"RETRY_MODE_ADAPTIVE","F"):(0,r.setFeature)(e,"RETRY_MODE_STANDARD","E"):(0,r.setFeature)(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(i)&&(0,r.setFeature)(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":(0,r.setFeature)(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":(0,r.setFeature)(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":(0,r.setFeature)(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const o=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(o?.$source){const t=o;t.accountId&&(0,r.setFeature)(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))(0,r.setFeature)(e,n,i)}}},97287:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_UA_APP_ID:()=>i,resolveUserAgentConfig:()=>a});var r=n(40033);const i=void 0;function a(e){const t=(0,r.normalizeProvider)(e.userAgentAppId??i);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}}}},36883:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SPACE:()=>a,UA_ESCAPE_CHAR:()=>u,UA_NAME_ESCAPE_REGEX:()=>s,UA_NAME_SEPARATOR:()=>o,UA_VALUE_ESCAPE_REGEX:()=>l,USER_AGENT:()=>r,X_AMZ_USER_AGENT:()=>i});const r="user-agent",i="x-amz-user-agent",a=" ",o="/",s=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,l=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,u="-"},59240:(e,t,n)=>{"use strict";n.r(t),n.d(t,{encodeFeatures:()=>i});const r=1024;function i(e){let t="";for(const n in e){const i=e[n];if(!(t.length+i.length+1<=r))break;t.length?t+=","+i:t+=i}return t}},44130:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_UA_APP_ID:()=>r.DEFAULT_UA_APP_ID,getUserAgentMiddlewareOptions:()=>i.getUserAgentMiddlewareOptions,getUserAgentPlugin:()=>i.getUserAgentPlugin,resolveUserAgentConfig:()=>r.resolveUserAgentConfig,userAgentMiddleware:()=>i.userAgentMiddleware});var r=n(97287),i=n(41576)},41576:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getUserAgentMiddlewareOptions:()=>c,getUserAgentPlugin:()=>d,userAgentMiddleware:()=>l});var r=n(95417),i=n(14065),a=n(63684),o=n(36883),s=n(59240);const l=e=>(t,n)=>async l=>{const{request:c}=l;if(!i.HttpRequest.isInstance(c))return t(l);const{headers:d}=c,f=n?.userAgent?.map(u)||[],p=(await e.defaultUserAgentProvider()).map(u);await(0,a.checkFeatures)(n,e,l);const h=n;p.push(`m/${(0,s.encodeFeatures)(Object.assign({},n.__smithy_context?.features,h.__aws_sdk_context?.features))}`);const g=e?.customUserAgent?.map(u)||[],m=await e.userAgentAppId();m&&p.push(u([`app/${m}`]));const y=(0,r.getUserAgentPrefix)(),v=(y?[y]:[]).concat([...p,...f,...g]).join(o.SPACE),b=[...p.filter((e=>e.startsWith("aws-sdk-"))),...g].join(o.SPACE);return"browser"!==e.runtime?(b&&(d[o.X_AMZ_USER_AGENT]=d[o.X_AMZ_USER_AGENT]?`${d[o.USER_AGENT]} ${b}`:b),d[o.USER_AGENT]=v):d[o.X_AMZ_USER_AGENT]=v,t({...l,request:c})},u=e=>{const t=e[0].split(o.UA_NAME_SEPARATOR).map((e=>e.replace(o.UA_NAME_ESCAPE_REGEX,o.UA_ESCAPE_CHAR))).join(o.UA_NAME_SEPARATOR),n=e[1]?.replace(o.UA_VALUE_ESCAPE_REGEX,o.UA_ESCAPE_CHAR),r=t.indexOf(o.UA_NAME_SEPARATOR),i=t.substring(0,r);let a=t.substring(r+1);return"api"===i&&(a=a.toLowerCase()),[i,a,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},c={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},d=e=>({applyToStack:t=>{t.add(l(e),c)}})},24163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAwsRegionExtensionConfiguration:()=>r,resolveAwsRegionExtensionConfiguration:()=>i});const r=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},i=e=>({region:e.region()})},95020:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>i.NODE_REGION_CONFIG_FILE_OPTIONS,NODE_REGION_CONFIG_OPTIONS:()=>i.NODE_REGION_CONFIG_OPTIONS,REGION_ENV_NAME:()=>i.REGION_ENV_NAME,REGION_INI_NAME:()=>i.REGION_INI_NAME,getAwsRegionExtensionConfiguration:()=>r.getAwsRegionExtensionConfiguration,resolveAwsRegionExtensionConfiguration:()=>r.resolveAwsRegionExtensionConfiguration,resolveRegionConfig:()=>i.resolveRegionConfig});var r=n(24163),i=n(20207)},8677:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>o,NODE_REGION_CONFIG_OPTIONS:()=>a,REGION_ENV_NAME:()=>r,REGION_INI_NAME:()=>i});const r="AWS_REGION",i="region",a={environmentVariableSelector:e=>e[r],configFileSelector:e=>e[i],default:()=>{throw new Error("Region is missing")}},o={preferredFile:"credentials"}},91663:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRealRegion:()=>i});var r=n(21615);const i=e=>(0,r.isFipsRegion)(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e},20207:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>r.NODE_REGION_CONFIG_FILE_OPTIONS,NODE_REGION_CONFIG_OPTIONS:()=>r.NODE_REGION_CONFIG_OPTIONS,REGION_ENV_NAME:()=>r.REGION_ENV_NAME,REGION_INI_NAME:()=>r.REGION_INI_NAME,resolveRegionConfig:()=>i.resolveRegionConfig});var r=n(8677),i=n(66277)},21615:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isFipsRegion:()=>r});const r=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},66277:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveRegionConfig:()=>a});var r=n(91663),i=n(21615);const a=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return(0,r.getRealRegion)(t);const e=await t();return(0,r.getRealRegion)(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!(0,i.isFipsRegion)(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}}},63560:(e,t,n)=>{"use strict";n.r(t),n.d(t,{awsEndpointFunctions:()=>s});var r=n(7069),i=n(28110),a=n(26169),o=n(73205);const s={isVirtualHostableS3Bucket:i.isVirtualHostableS3Bucket,parseArn:a.parseArn,partition:o.partition};r.customEndpointFunctions.aws=s},95417:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointError:()=>s.EndpointError,awsEndpointFunctions:()=>r.awsEndpointFunctions,getUserAgentPrefix:()=>i.getUserAgentPrefix,isIpAddress:()=>a.isIpAddress,partition:()=>i.partition,resolveEndpoint:()=>o.resolveEndpoint,setPartitionInfo:()=>i.setPartitionInfo,useDefaultPartitionInfo:()=>i.useDefaultPartitionInfo});var r=n(63560),i=n(73205),a=n(42150),o=n(59996),s=n(66367)},28110:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isVirtualHostableS3Bucket:()=>a});var r=n(7069),i=n(42150);const a=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!a(t))return!1;return!0}return!(!(0,r.isValidHostLabel)(e)||e.length<3||e.length>63||e!==e.toLowerCase()||(0,i.isIpAddress)(e))}},26169:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseArn:()=>r});const r=e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,a,o,...s]=t;return"arn"!==n||""===r||""===i||""===s.join(":")?null:{partition:r,service:i,region:a,accountId:o,resourceId:s.map((e=>e.split("/"))).flat()}}},73205:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getUserAgentPrefix:()=>u,partition:()=>o,setPartitionInfo:()=>s,useDefaultPartitionInfo:()=>l});var r=n(4787);let i=r,a="";const o=e=>{const{partitions:t}=i;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},s=(e,t="")=>{i=e,a=t},l=()=>{s(r,"")},u=()=>a},42150:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isIpAddress:()=>r.isIpAddress});var r=n(7069)},59996:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEndpoint:()=>r.resolveEndpoint});var r=n(7069)},43090:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointError:()=>r.EndpointError});var r=n(7069)},85767:(e,t,n)=>{"use strict";n.r(t)},73904:(e,t,n)=>{"use strict";n.r(t)},7234:(e,t,n)=>{"use strict";n.r(t)},16882:(e,t,n)=>{"use strict";n.r(t)},66367:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointError:()=>r.EndpointError});var r=n(43090);n(85767),n(73904),n(7234),n(16882),n(8890)},8890:(e,t,n)=>{"use strict";n.r(t)},77226:(e,t,n)=>{"use strict";n.r(t),n.d(t,{locateWindow:()=>i});const r={};function i(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},81772:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createDefaultUserAgentProvider:()=>a,defaultUserAgent:()=>o});var r=n(46880),i=n.n(r);const a=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?i().parse(window.navigator.userAgent):void 0,a=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&a.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&a.push([`app/${o}`]),a},o=a},22184:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>a,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>o,ENV_USE_DUALSTACK_ENDPOINT:()=>i,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>s});var r=n(20235);const i="AWS_USE_DUALSTACK_ENDPOINT",a="use_dualstack_endpoint",o=!1,s={environmentVariableSelector:e=>(0,r.booleanSelector)(e,i,r.SelectorType.ENV),configFileSelector:e=>(0,r.booleanSelector)(e,a,r.SelectorType.CONFIG),default:!1}},24570:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONFIG_USE_FIPS_ENDPOINT:()=>a,DEFAULT_USE_FIPS_ENDPOINT:()=>o,ENV_USE_FIPS_ENDPOINT:()=>i,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>s});var r=n(20235);const i="AWS_USE_FIPS_ENDPOINT",a="use_fips_endpoint",o=!1,s={environmentVariableSelector:e=>(0,r.booleanSelector)(e,i,r.SelectorType.ENV),configFileSelector:e=>(0,r.booleanSelector)(e,a,r.SelectorType.CONFIG),default:!1}},77918:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>r.CONFIG_USE_DUALSTACK_ENDPOINT,CONFIG_USE_FIPS_ENDPOINT:()=>i.CONFIG_USE_FIPS_ENDPOINT,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>r.DEFAULT_USE_DUALSTACK_ENDPOINT,DEFAULT_USE_FIPS_ENDPOINT:()=>i.DEFAULT_USE_FIPS_ENDPOINT,ENV_USE_DUALSTACK_ENDPOINT:()=>r.ENV_USE_DUALSTACK_ENDPOINT,ENV_USE_FIPS_ENDPOINT:()=>i.ENV_USE_FIPS_ENDPOINT,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>r.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>i.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,resolveCustomEndpointsConfig:()=>a.resolveCustomEndpointsConfig,resolveEndpointsConfig:()=>o.resolveEndpointsConfig});var r=n(22184),i=n(24570),a=n(93741),o=n(27392)},93741:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveCustomEndpointsConfig:()=>i});var r=n(40805);const i=e=>{const{endpoint:t,urlParser:n}=e;return{...e,tls:e.tls??!0,endpoint:(0,r.normalizeProvider)("string"==typeof t?n(t):t),isCustomEndpoint:!0,useDualstackEndpoint:(0,r.normalizeProvider)(e.useDualstackEndpoint??!1)}}},27392:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEndpointsConfig:()=>a});var r=n(40805),i=n(12621);const a=e=>{const t=(0,r.normalizeProvider)(e.useDualstackEndpoint??!1),{endpoint:n,useFipsEndpoint:a,urlParser:o}=e;return{...e,tls:e.tls??!0,endpoint:n?(0,r.normalizeProvider)("string"==typeof n?o(n):n):()=>(0,i.getEndpointFromRegion)({...e,useDualstackEndpoint:t,useFipsEndpoint:a}),isCustomEndpoint:!!n,useDualstackEndpoint:t}}},12621:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointFromRegion:()=>r});const r=async e=>{const{tls:t=!0}=e,n=await e.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw new Error("Invalid region in client config");const r=await e.useDualstackEndpoint(),i=await e.useFipsEndpoint(),{hostname:a}=await e.regionInfoProvider(n,{useDualstackEndpoint:r,useFipsEndpoint:i})??{};if(!a)throw new Error("Cannot resolve hostname from client config");return e.urlParser(`${t?"https:":"http:"}//${a}`)}},61329:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>r.CONFIG_USE_DUALSTACK_ENDPOINT,CONFIG_USE_FIPS_ENDPOINT:()=>r.CONFIG_USE_FIPS_ENDPOINT,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>r.DEFAULT_USE_DUALSTACK_ENDPOINT,DEFAULT_USE_FIPS_ENDPOINT:()=>r.DEFAULT_USE_FIPS_ENDPOINT,ENV_USE_DUALSTACK_ENDPOINT:()=>r.ENV_USE_DUALSTACK_ENDPOINT,ENV_USE_FIPS_ENDPOINT:()=>r.ENV_USE_FIPS_ENDPOINT,NODE_REGION_CONFIG_FILE_OPTIONS:()=>i.NODE_REGION_CONFIG_FILE_OPTIONS,NODE_REGION_CONFIG_OPTIONS:()=>i.NODE_REGION_CONFIG_OPTIONS,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>r.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>r.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,REGION_ENV_NAME:()=>i.REGION_ENV_NAME,REGION_INI_NAME:()=>i.REGION_INI_NAME,getRegionInfo:()=>a.getRegionInfo,resolveCustomEndpointsConfig:()=>r.resolveCustomEndpointsConfig,resolveEndpointsConfig:()=>r.resolveEndpointsConfig,resolveRegionConfig:()=>i.resolveRegionConfig});var r=n(77918),i=n(74800),a=n(69402)},54836:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>o,NODE_REGION_CONFIG_OPTIONS:()=>a,REGION_ENV_NAME:()=>r,REGION_INI_NAME:()=>i});const r="AWS_REGION",i="region",a={environmentVariableSelector:e=>e[r],configFileSelector:e=>e[i],default:()=>{throw new Error("Region is missing")}},o={preferredFile:"credentials"}},11168:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRealRegion:()=>i});var r=n(43154);const i=e=>(0,r.isFipsRegion)(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e},74800:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>r.NODE_REGION_CONFIG_FILE_OPTIONS,NODE_REGION_CONFIG_OPTIONS:()=>r.NODE_REGION_CONFIG_OPTIONS,REGION_ENV_NAME:()=>r.REGION_ENV_NAME,REGION_INI_NAME:()=>r.REGION_INI_NAME,resolveRegionConfig:()=>i.resolveRegionConfig});var r=n(54836),i=n(66658)},43154:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isFipsRegion:()=>r});const r=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},66658:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveRegionConfig:()=>a});var r=n(11168),i=n(43154);const a=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return(0,r.getRealRegion)(t);const e=await t();return(0,r.getRealRegion)(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!(0,i.isFipsRegion)(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}}},49028:(e,t,n)=>{"use strict";n.r(t)},2024:(e,t,n)=>{"use strict";n.r(t)},77053:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHostnameFromVariants:()=>r});const r=(e=[],{useFipsEndpoint:t,useDualstackEndpoint:n})=>e.find((({tags:e})=>t===e.includes("fips")&&n===e.includes("dualstack")))?.hostname},68374:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRegionInfo:()=>s});var r=n(77053),i=n(35675),a=n(49962),o=n(79391);const s=(e,{useFipsEndpoint:t=!1,useDualstackEndpoint:n=!1,signingService:s,regionHash:l,partitionHash:u})=>{const c=(0,a.getResolvedPartition)(e,{partitionHash:u}),d=e in l?e:u[c]?.endpoint??e,f={useFipsEndpoint:t,useDualstackEndpoint:n},p=(0,r.getHostnameFromVariants)(l[d]?.variants,f),h=(0,r.getHostnameFromVariants)(u[c]?.variants,f),g=(0,i.getResolvedHostname)(d,{regionHostname:p,partitionHostname:h});if(void 0===g)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:d,useFipsEndpoint:t,useDualstackEndpoint:n}}`);const m=(0,o.getResolvedSigningRegion)(g,{signingRegion:l[d]?.signingRegion,regionRegex:u[c].regionRegex,useFipsEndpoint:t});return{partition:c,signingService:s,hostname:g,...m&&{signingRegion:m},...l[d]?.signingService&&{signingService:l[d].signingService}}}},35675:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getResolvedHostname:()=>r});const r=(e,{regionHostname:t,partitionHostname:n})=>t||(n?n.replace("{region}",e):void 0)},49962:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getResolvedPartition:()=>r});const r=(e,{partitionHash:t})=>Object.keys(t||{}).find((n=>t[n].regions.includes(e)))??"aws"},79391:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getResolvedSigningRegion:()=>r});const r=(e,{signingRegion:t,regionRegex:n,useFipsEndpoint:r})=>{if(t)return t;if(r){const t=n.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),r=e.match(t);if(r)return r[0].slice(1,-1)}}},69402:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRegionInfo:()=>r.getRegionInfo}),n(49028),n(2024);var r=n(68374)},6752:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSmithyContext:()=>i});var r=n(23911);const i=e=>e[r.SMITHY_CONTEXT_KEY]||(e[r.SMITHY_CONTEXT_KEY]={})},40033:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultIdentityProviderConfig:()=>c.DefaultIdentityProviderConfig,EXPIRATION_MS:()=>c.EXPIRATION_MS,HttpApiKeyAuthSigner:()=>c.HttpApiKeyAuthSigner,HttpBearerAuthSigner:()=>c.HttpBearerAuthSigner,NoAuthSigner:()=>c.NoAuthSigner,createIsIdentityExpiredFunction:()=>c.createIsIdentityExpiredFunction,createPaginator:()=>s.createPaginator,doesIdentityRequireRefresh:()=>c.doesIdentityRequireRefresh,getHttpAuthSchemeEndpointRuleSetPlugin:()=>i.getHttpAuthSchemeEndpointRuleSetPlugin,getHttpAuthSchemePlugin:()=>i.getHttpAuthSchemePlugin,getHttpSigningPlugin:()=>a.getHttpSigningPlugin,getSmithyContext:()=>r.getSmithyContext,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>i.httpAuthSchemeEndpointRuleSetMiddlewareOptions,httpAuthSchemeMiddleware:()=>i.httpAuthSchemeMiddleware,httpAuthSchemeMiddlewareOptions:()=>i.httpAuthSchemeMiddlewareOptions,httpSigningMiddleware:()=>a.httpSigningMiddleware,httpSigningMiddlewareOptions:()=>a.httpSigningMiddlewareOptions,isIdentityExpired:()=>c.isIdentityExpired,memoizeIdentityProvider:()=>c.memoizeIdentityProvider,normalizeProvider:()=>o.normalizeProvider,requestBuilder:()=>l.requestBuilder,setFeature:()=>u.setFeature});var r=n(6752),i=n(61922),a=n(55667),o=n(54367),s=n(52809),l=n(34727),u=n(52067),c=n(93927)},14761:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpAuthSchemeEndpointRuleSetPlugin:()=>a,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>i});var r=n(70909);const i={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},a=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:a=>{a.addRelativeTo((0,r.httpAuthSchemeMiddleware)(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),i)}})},50476:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpAuthSchemePlugin:()=>o,httpAuthSchemeMiddlewareOptions:()=>a});var r=n(32754),i=n(70909);const a={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:r.serializerMiddlewareOption.name},o=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo((0,i.httpAuthSchemeMiddleware)(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),a)}})},70909:(e,t,n)=>{"use strict";n.r(t),n.d(t,{httpAuthSchemeMiddleware:()=>i}),n(23911);var r=n(40805);const i=(e,t)=>(n,i)=>async a=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,i,a.input)),s=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),l=(0,r.getSmithyContext)(i),u=[];for(const n of o){const r=s.get(n.schemeId);if(!r){u.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const a=r.identityProvider(await t.identityProviderConfigProvider(e));if(!a){u.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:o={},signingProperties:c={}}=n.propertiesExtractor?.(e,i)||{};n.identityProperties=Object.assign(n.identityProperties||{},o),n.signingProperties=Object.assign(n.signingProperties||{},c),l.selectedHttpAuthScheme={httpAuthOption:n,identity:await a(n.identityProperties),signer:r.signer};break}if(!l.selectedHttpAuthScheme)throw new Error(u.join("\n"));return n(a)}},61922:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpAuthSchemeEndpointRuleSetPlugin:()=>i.getHttpAuthSchemeEndpointRuleSetPlugin,getHttpAuthSchemePlugin:()=>a.getHttpAuthSchemePlugin,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>i.httpAuthSchemeEndpointRuleSetMiddlewareOptions,httpAuthSchemeMiddleware:()=>r.httpAuthSchemeMiddleware,httpAuthSchemeMiddlewareOptions:()=>a.httpAuthSchemeMiddlewareOptions});var r=n(70909),i=n(14761),a=n(50476)},17656:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpSigningPlugin:()=>a,httpSigningMiddlewareOptions:()=>i});var r=n(56596);const i={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},a=e=>({applyToStack:t=>{t.addRelativeTo((0,r.httpSigningMiddleware)(e),i)}})},56596:(e,t,n)=>{"use strict";n.r(t),n.d(t,{httpSigningMiddleware:()=>s});var r=n(14065),i=(n(23911),n(40805));const a=e=>e=>{throw e},o=(e,t)=>{},s=e=>(e,t)=>async n=>{if(!r.HttpRequest.isInstance(n.request))return e(n);const s=(0,i.getSmithyContext)(t).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:u,signer:c}=s,d=await e({...n,request:await c.sign(n.request,u,l)}).catch((c.errorHandler||a)(l));return(c.successHandler||o)(d.response,l),d}},55667:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpSigningPlugin:()=>i.getHttpSigningPlugin,httpSigningMiddleware:()=>r.httpSigningMiddleware,httpSigningMiddlewareOptions:()=>i.httpSigningMiddlewareOptions});var r=n(56596),i=n(17656)},54367:(e,t,n)=>{"use strict";n.r(t),n.d(t,{normalizeProvider:()=>r});const r=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t}},52809:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createPaginator:()=>i});const r=async(e,t,n,...r)=>await t.send(new e(n),...r);function i(e,t,n,i,o){return async function*(s,l,...u){let c,d=s.startingToken||void 0,f=!0;for(;f;){if(l[n]=d,o&&(l[o]=l[o]??s.pageSize),!(s.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);c=await r(t,s.client,l,...u),yield c;const p=d;d=a(c,i),f=!(!d||s.stopOnSameToken&&d===p)}}}const a=(e,t)=>{let n=e;const r=t.split(".");for(const e of r){if(!n||"object"!=typeof n)return;n=n[e]}return n}},34727:(e,t,n)=>{"use strict";n.r(t),n.d(t,{requestBuilder:()=>r.requestBuilder});var r=n(4351)},52067:(e,t,n)=>{"use strict";function r(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}n.r(t),n.d(t,{setFeature:()=>r})},72847:(e,t,n)=>{"use strict";n.r(t),n.d(t,{collectBody:()=>i});var r=n(42357);const i=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return r.Uint8ArrayBlobAdapter.mutate(e);if(!e)return r.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const n=t.streamCollector(e);return r.Uint8ArrayBlobAdapter.mutate(await n)}},27916:(e,t,n)=>{"use strict";function r(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}n.r(t),n.d(t,{extendedEncodeURIComponent:()=>r})},4351:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RequestBuilder:()=>a.RequestBuilder,collectBody:()=>r.collectBody,extendedEncodeURIComponent:()=>i.extendedEncodeURIComponent,requestBuilder:()=>a.requestBuilder,resolvedPath:()=>o.resolvedPath});var r=n(72847),i=n(27916),a=n(21591),o=n(63351)},21591:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RequestBuilder:()=>o,requestBuilder:()=>a});var r=n(4351),i=n(14065);function a(e,t){return new o(e,t)}class o{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new i.HttpRequest({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,n,i){return this.resolvePathStack.push((a=>{this.path=(0,r.resolvedPath)(a,this.input,e,t,n,i)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}},63351:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolvedPath:()=>i});var r=n(27916);const i=(e,t,n,i,a,o)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=i();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(a,o?t.split("/").map((e=>(0,r.extendedEncodeURIComponent)(e))).join("/"):(0,r.extendedEncodeURIComponent)(t))}return e}},30612:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultIdentityProviderConfig:()=>r});class r{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}},59732:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpApiKeyAuthSigner:()=>a});var r=n(14065),i=n(23911);class a{async sign(e,t,n){if(!n)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!n.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!n.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!t.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const a=r.HttpRequest.clone(e);if(n.in===i.HttpApiKeyAuthLocation.QUERY)a.query[n.name]=t.apiKey;else{if(n.in!==i.HttpApiKeyAuthLocation.HEADER)throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+n.in+"`");a.headers[n.name]=n.scheme?`${n.scheme} ${t.apiKey}`:t.apiKey}return a}}},20442:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpBearerAuthSigner:()=>i});var r=n(14065);class i{async sign(e,t,n){const i=r.HttpRequest.clone(e);if(!t.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return i.headers.Authorization=`Bearer ${t.token}`,i}}},54849:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpApiKeyAuthSigner:()=>r.HttpApiKeyAuthSigner,HttpBearerAuthSigner:()=>i.HttpBearerAuthSigner,NoAuthSigner:()=>a.NoAuthSigner});var r=n(59732),i=n(20442),a=n(45536)},45536:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NoAuthSigner:()=>r});class r{async sign(e,t,n){return e}}},93927:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultIdentityProviderConfig:()=>r.DefaultIdentityProviderConfig,EXPIRATION_MS:()=>a.EXPIRATION_MS,HttpApiKeyAuthSigner:()=>i.HttpApiKeyAuthSigner,HttpBearerAuthSigner:()=>i.HttpBearerAuthSigner,NoAuthSigner:()=>i.NoAuthSigner,createIsIdentityExpiredFunction:()=>a.createIsIdentityExpiredFunction,doesIdentityRequireRefresh:()=>a.doesIdentityRequireRefresh,isIdentityExpired:()=>a.isIdentityExpired,memoizeIdentityProvider:()=>a.memoizeIdentityProvider});var r=n(30612),i=n(54849),a=n(91431)},91431:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EXPIRATION_MS:()=>i,createIsIdentityExpiredFunction:()=>r,doesIdentityRequireRefresh:()=>o,isIdentityExpired:()=>a,memoizeIdentityProvider:()=>s});const r=e=>t=>o(t)&&t.expiration.getTime()-Date.now()void 0!==e.expiration,s=(e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,a,o,s=!1;const l=async e=>{a||(a=r(e));try{i=await a,o=!0,s=!1}finally{a=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await l(e)),i):async e=>(o&&!e?.forceRefresh||(i=await l(e)),s?i:n(i)?t(i)?(await l(e),i):i:(s=!0,i))}},47083:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventStreamCodec:()=>o});var r=n(60442),i=n(82281),a=n(60414);class o{constructor(e,t){this.headerMarshaller=new i.HeaderMarshaller(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),i=n.byteLength+t.byteLength+16,a=new Uint8Array(i),o=new DataView(a.buffer,a.byteOffset,a.byteLength),s=new r.Crc32;return o.setUint32(0,i,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,s.update(a.subarray(0,8)).digest(),!1),a.set(n,12),a.set(t,n.byteLength+12),o.setUint32(i-4,s.update(a.subarray(8,i-4)).digest(),!1),a}decode(e){const{headers:t,body:n}=(0,a.splitMessage)(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}},82281:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HeaderMarshaller:()=>o});var r,i=n(68004),a=n(24494);class o{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(o.buffer);return s.set(e.value,3),s;case"string":const l=this.fromUtf8(e.value),u=new DataView(new ArrayBuffer(3+l.byteLength));u.setUint8(0,7),u.setUint16(1,l.byteLength,!1);const c=new Uint8Array(u.buffer);return c.set(l,3),c;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(a.Int64.fromNumber(e.value.valueOf()).bytes,1),d;case"uuid":if(!m.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const f=new Uint8Array(17);return f[0]=9,f.set((0,i.fromHex)(e.value.replace(/\-/g,"")),1),f}}parse(e){const t={};let n=0;for(;n{"use strict";n.r(t),n.d(t,{Int64:()=>i});var r=n(68004);class i{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&a(t),new i(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&a(e),parseInt((0,r.toHex)(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function a(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}},19678:(e,t,n)=>{"use strict";n.r(t)},1796:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MessageDecoderStream:()=>r});class r{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}},89660:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MessageEncoderStream:()=>r});class r{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}},67178:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SmithyMessageDecoderStream:()=>r});class r{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}},82334:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SmithyMessageEncoderStream:()=>r});class r{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}},67709:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventStreamCodec:()=>r.EventStreamCodec,HeaderMarshaller:()=>i.HeaderMarshaller,Int64:()=>a.Int64,MessageDecoderStream:()=>o.MessageDecoderStream,MessageEncoderStream:()=>s.MessageEncoderStream,SmithyMessageDecoderStream:()=>l.SmithyMessageDecoderStream,SmithyMessageEncoderStream:()=>u.SmithyMessageEncoderStream});var r=n(47083),i=n(82281),a=n(24494),o=(n(19678),n(1796)),s=n(89660),l=n(67178),u=n(82334)},60414:(e,t,n)=>{"use strict";n.r(t),n.d(t,{splitMessage:()=>l});var r=n(60442);const i=4,a=2*i,o=4,s=a+2*o;function l({byteLength:e,byteOffset:t,buffer:n}){if(e{"use strict";n.r(t),n.d(t,{EventStreamMarshaller:()=>a});var r=n(59694),i=n(21258);class a{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new r.EventStreamMarshaller({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=o(e)?(0,i.readableStreamtoIterable)(e):e;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(0,i.iterableToReadableStream)(n):n}}const o=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream},9519:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventStreamMarshaller:()=>r.EventStreamMarshaller,eventStreamSerdeProvider:()=>i.eventStreamSerdeProvider,iterableToReadableStream:()=>a.iterableToReadableStream,readableStreamtoIterable:()=>a.readableStreamtoIterable});var r=n(55710),i=n(37034),a=n(21258)},37034:(e,t,n)=>{"use strict";n.r(t),n.d(t,{eventStreamSerdeProvider:()=>i});var r=n(55710);const i=e=>new r.EventStreamMarshaller(e)},21258:(e,t,n)=>{"use strict";n.r(t),n.d(t,{iterableToReadableStream:()=>i,readableStreamtoIterable:()=>r});const r=e=>({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)return;yield n}}finally{t.releaseLock()}}}),i=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})}},13001:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEventStreamSerdeConfig:()=>r});const r=e=>({...e,eventStreamMarshaller:e.eventStreamSerdeProvider(e)})},78504:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEventStreamSerdeConfig:()=>r.resolveEventStreamSerdeConfig});var r=n(13001)},86359:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventStreamMarshaller:()=>o});var r=n(67709),i=n(92964),a=n(96326);class o{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new r.EventStreamCodec(e,t),this.utfEncoder=e}deserialize(e,t){const n=(0,i.getChunkedStream)(e);return new r.SmithyMessageDecoderStream({messageStream:new r.MessageDecoderStream({inputStream:n,decoder:this.eventStreamCodec}),deserializer:(0,a.getMessageUnmarshaller)(t,this.utfEncoder)})}serialize(e,t){return new r.MessageEncoderStream({messageStream:new r.SmithyMessageEncoderStream({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}},92964:(e,t,n)=>{"use strict";function r(e){let t=0,n=0,r=null,i=null;const a=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:s}=await o.next();if(s){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const l=e.length;let u=0;for(;ur})},96326:(e,t,n)=>{"use strict";function r(e,t){const n=i(t.deserializer,t.toUtf8);return{[Symbol.asyncIterator]:async function*(){for await(const r of e){const e=t.eventStreamCodec.decode(r),i=await n(e);void 0!==i&&(yield i)}}}}function i(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},a=await e(i);if(a.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw a[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}n.r(t),n.d(t,{getMessageUnmarshaller:()=>i,getUnmarshalledStream:()=>r})},59694:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventStreamMarshaller:()=>r.EventStreamMarshaller,eventStreamSerdeProvider:()=>i.eventStreamSerdeProvider});var r=n(86359),i=n(78590)},78590:(e,t,n)=>{"use strict";n.r(t),n.d(t,{eventStreamSerdeProvider:()=>i});var r=n(86359);const i=e=>new r.EventStreamMarshaller(e)},47896:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FetchHttpHandler:()=>s,keepAliveSupport:()=>o});var r=n(14065),i=n(65901),a=n(61455);const o={supported:void 0};class s{static create(e){return"function"==typeof e?.handle?e:new s(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===o.supported&&(o.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,s=!0===this.config.keepAlive,l=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let u=e.path;const c=(0,i.buildQueryString)(e.query||{});c&&(u+=`?${c}`),e.fragment&&(u+=`#${e.fragment}`);let d="";null==e.username&&null==e.password||(d=`${e.username??""}:${e.password??""}@`);const{port:f,method:p}=e,h=`${e.protocol}//${d}${e.hostname}${f?`:${f}`:""}${u}`,g="GET"===p||"HEAD"===p?void 0:e.body,m={body:g,headers:new Headers(e.headers),method:p,credentials:l};this.config?.cache&&(m.cache=this.config.cache),g&&(m.duplex="half"),"undefined"!=typeof AbortController&&(m.signal=t),o.supported&&(m.keepalive=s),"function"==typeof this.config.requestInit&&Object.assign(m,this.config.requestInit(e));let y=()=>{};const v=new Request(h,m),b=[fetch(v).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new r.HttpResponse({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new r.HttpResponse({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),(0,a.requestTimeout)(n)];return t&&b.push(new Promise(((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),y=()=>e.removeEventListener("abort",r)}else t.onabort=r}))),Promise.race(b).finally(y)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}},61664:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FetchHttpHandler:()=>r.FetchHttpHandler,keepAliveSupport:()=>r.keepAliveSupport,streamCollector:()=>i.streamCollector});var r=n(47896),i=n(8612)},61455:(e,t,n)=>{"use strict";function r(e=0){return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}n.r(t),n.d(t,{requestTimeout:()=>r})},8612:(e,t,n)=>{"use strict";n.r(t),n.d(t,{streamCollector:()=>r});const r=async e=>"function"==typeof Blob&&e instanceof Blob?new Uint8Array(await e.arrayBuffer()):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:a}=await n.read();a&&(t.push(a),i+=a.length),r=e}const a=new Uint8Array(i);let o=0;for(const e of t)a.set(e,o),o+=e.length;return a}(e)},70913:(e,t,n)=>{"use strict";n.r(t),n.d(t,{invalidFunction:()=>r.invalidFunction,invalidProvider:()=>i.invalidProvider});var r=n(90566),i=n(32423)},90566:(e,t,n)=>{"use strict";n.r(t),n.d(t,{invalidFunction:()=>r});const r=e=>()=>{throw new Error(e)}},32423:(e,t,n)=>{"use strict";n.r(t),n.d(t,{invalidProvider:()=>r});const r=e=>()=>Promise.reject(e)},43695:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isArrayBuffer:()=>r});const r=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e)},70649:(e,t,n)=>{"use strict";n.r(t),n.d(t,{contentLengthMiddleware:()=>a,contentLengthMiddlewareOptions:()=>o,getContentLengthPlugin:()=>s});var r=n(14065);const i="content-length";function a(e){return t=>async n=>{const a=n.request;if(r.HttpRequest.isInstance(a)){const{body:t,headers:n}=a;if(t&&-1===Object.keys(n).map((e=>e.toLowerCase())).indexOf(i))try{const n=e(t);a.headers={...a.headers,[i]:String(n)}}catch(e){}}return t({...n,request:a})}}const o={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},s=e=>({applyToStack:t=>{t.add(a(e.bodyLengthChecker),o)}})},26393:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createConfigValueProvider:()=>r});const r=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r}},110:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointFromConfig:()=>r});const r=async e=>{}},45935:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointFromInstructions:()=>s,resolveParams:()=>l});var r=n(35421),i=n(26393),a=n(110),o=n(18462);const s=async(e,t,n,r)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await(0,a.getEndpointFromConfig)(n.serviceId),e&&(n.endpoint=()=>Promise.resolve((0,o.toEndpointV1)(e)))}const i=await l(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},l=async(e,t,n)=>{const a={},o=t?.getEndpointParameterInstructions?.()||{};for(const[t,r]of Object.entries(o))switch(r.type){case"staticContextParams":a[t]=r.value;break;case"contextParams":a[t]=e[r.name];break;case"clientContextParams":case"builtInParams":a[t]=await(0,i.createConfigValueProvider)(r.name,t,n)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(r))}return 0===Object.keys(o).length&&Object.assign(a,n),"s3"===String(n.serviceId).toLowerCase()&&await(0,r.resolveParamsForS3)(a),a}},18399:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointFromInstructions:()=>r.getEndpointFromInstructions,resolveParams:()=>r.resolveParams,toEndpointV1:()=>i.toEndpointV1});var r=n(45935),i=n(18462)},18462:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toEndpointV1:()=>i});var r=n(18065);const i=e=>"object"==typeof e?"url"in e?(0,r.parseUrl)(e.url):e:(0,r.parseUrl)(e)},2439:(e,t,n)=>{"use strict";n.r(t),n.d(t,{endpointMiddleware:()=>o});var r=n(40033),i=n(40805),a=n(45935);const o=({config:e,instructions:t})=>(n,o)=>async s=>{e.endpoint&&(0,r.setFeature)(o,"ENDPOINT_OVERRIDE","N");const l=await(0,a.getEndpointFromInstructions)(s.input,{getEndpointParameterInstructions:()=>t},{...e},o);o.endpointV2=l,o.authSchemes=l.properties?.authSchemes;const u=o.authSchemes?.[0];if(u){o.signing_region=u.signingRegion,o.signing_service=u.signingName;const e=(0,i.getSmithyContext)(o),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:u.signingRegion,signingRegion:u.signingRegion,signing_service:u.signingName,signingName:u.signingName,signingRegionSet:u.signingRegionSet},u.properties))}return n({...s})}},58626:(e,t,n)=>{"use strict";n.r(t),n.d(t,{endpointMiddlewareOptions:()=>a,getEndpointPlugin:()=>o});var r=n(32754),i=n(2439);const a={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:r.serializerMiddlewareOption.name},o=(e,t)=>({applyToStack:n=>{n.addRelativeTo((0,i.endpointMiddleware)({config:e,instructions:t}),a)}})},72540:(e,t,n)=>{"use strict";n.r(t),n.d(t,{endpointMiddleware:()=>i.endpointMiddleware,endpointMiddlewareOptions:()=>a.endpointMiddlewareOptions,getEndpointFromInstructions:()=>r.getEndpointFromInstructions,getEndpointPlugin:()=>a.getEndpointPlugin,resolveEndpointConfig:()=>o.resolveEndpointConfig,resolveParams:()=>r.resolveParams,toEndpointV1:()=>r.toEndpointV1});var r=n(18399),i=n(2439),a=n(58626),o=n(42795);n(51385)},42795:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEndpointConfig:()=>o});var r=n(40805),i=n(110),a=n(18462);const o=e=>{const t=e.tls??!0,{endpoint:n}=e,o=null!=n?async()=>(0,a.toEndpointV1)(await(0,r.normalizeProvider)(n)()):void 0,s=!!n,l={...e,endpoint:o,tls:t,isCustomEndpoint:s,useDualstackEndpoint:(0,r.normalizeProvider)(e.useDualstackEndpoint??!1),useFipsEndpoint:(0,r.normalizeProvider)(e.useFipsEndpoint??!1)};let u;return l.serviceConfiguredEndpoint=async()=>(e.serviceId&&!u&&(u=(0,i.getEndpointFromConfig)(e.serviceId)),u),l}},35421:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DOT_PATTERN:()=>r.DOT_PATTERN,S3_HOSTNAME_PATTERN:()=>r.S3_HOSTNAME_PATTERN,isArnBucketName:()=>r.isArnBucketName,isDnsCompatibleBucketName:()=>r.isDnsCompatibleBucketName,resolveParamsForS3:()=>r.resolveParamsForS3});var r=n(49467)},49467:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DOT_PATTERN:()=>s,S3_HOSTNAME_PATTERN:()=>l,isArnBucketName:()=>c,isDnsCompatibleBucketName:()=>u,resolveParamsForS3:()=>r});const r=async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),c(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!u(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},i=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,a=/(\d+\.){3}\d+/,o=/\.\./,s=/\./,l=/^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./,u=e=>i.test(e)&&!a.test(e)&&!o.test(e),c=e=>{const[t,n,r,,,i]=e.split(":"),a="arn"===t&&e.split(":").length>=6,o=Boolean(a&&n&&r&&i);if(a&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o}},51385:(e,t,n)=>{"use strict";n.r(t)},52952:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AdaptiveRetryStrategy:()=>a});var r=n(56265),i=n(21973);class a extends i.StandardRetryStrategy{constructor(e,t){const{rateLimiter:n,...i}=t??{};super(e,i),this.rateLimiter=n??new r.DefaultRateLimiter,this.mode=r.RETRY_MODES.ADAPTIVE}async retry(e,t){return super.retry(e,t,{beforeRequest:async()=>this.rateLimiter.getSendToken(),afterRequest:e=>{this.rateLimiter.updateClientSendingRate(e)}})}}},21973:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StandardRetryStrategy:()=>d});var r=n(14065),i=n(42653),a=n(56265),o=n(12634),s=n(97701),l=n(31038),u=n(99933),c=n(15901);class d{constructor(e,t){this.maxAttemptsProvider=e,this.mode=a.RETRY_MODES.STANDARD,this.retryDecider=t?.retryDecider??u.defaultRetryDecider,this.delayDecider=t?.delayDecider??l.defaultDelayDecider,this.retryQuota=t?.retryQuota??(0,s.getDefaultRetryQuota)(a.INITIAL_RETRY_TOKENS)}shouldRetry(e,t,n){return tsetTimeout(e,r)));continue}throw t.$metadata||(t.$metadata={}),t.$metadata.attempts=l,t.$metadata.totalRetryDelay=u,t}}}const f=e=>{if(!r.HttpResponse.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],i=Number(n);return Number.isNaN(i)?new Date(n).getTime()-Date.now():1e3*i}},25998:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONFIG_MAX_ATTEMPTS:()=>o,CONFIG_RETRY_MODE:()=>c,ENV_MAX_ATTEMPTS:()=>a,ENV_RETRY_MODE:()=>u,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>s,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>d,resolveRetryConfig:()=>l});var r=n(40805),i=n(56265);const a="AWS_MAX_ATTEMPTS",o="max_attempts",s={environmentVariableSelector:e=>{const t=e[a];if(!t)return;const n=parseInt(t);if(Number.isNaN(n))throw new Error(`Environment variable ${a} mast be a number, got "${t}"`);return n},configFileSelector:e=>{const t=e[o];if(!t)return;const n=parseInt(t);if(Number.isNaN(n))throw new Error(`Shared config file entry ${o} mast be a number, got "${t}"`);return n},default:i.DEFAULT_MAX_ATTEMPTS},l=e=>{const{retryStrategy:t}=e,n=(0,r.normalizeProvider)(e.maxAttempts??i.DEFAULT_MAX_ATTEMPTS);return{...e,maxAttempts:n,retryStrategy:async()=>t||(await(0,r.normalizeProvider)(e.retryMode)()===i.RETRY_MODES.ADAPTIVE?new i.AdaptiveRetryStrategy(n):new i.StandardRetryStrategy(n))}},u="AWS_RETRY_MODE",c="retry_mode",d={environmentVariableSelector:e=>e[u],configFileSelector:e=>e[c],default:i.DEFAULT_RETRY_MODE}},97701:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDefaultRetryQuota:()=>i});var r=n(56265);const i=(e,t)=>{const n=e,i=t?.noRetryIncrement??r.NO_RETRY_INCREMENT,a=t?.retryCost??r.RETRY_COST,o=t?.timeoutRetryCost??r.TIMEOUT_RETRY_COST;let s=e;const l=e=>"TimeoutError"===e.name?o:a,u=e=>l(e)<=s;return Object.freeze({hasRetryTokens:u,retrieveRetryTokens:e=>{if(!u(e))throw new Error("No retry token available");const t=l(e);return s-=t,t},releaseRetryTokens:e=>{s+=e??i,s=Math.min(s,n)}})}},31038:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultDelayDecider:()=>i});var r=n(56265);const i=(e,t)=>Math.floor(Math.min(r.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e))},41069:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AdaptiveRetryStrategy:()=>r.AdaptiveRetryStrategy,CONFIG_MAX_ATTEMPTS:()=>a.CONFIG_MAX_ATTEMPTS,CONFIG_RETRY_MODE:()=>a.CONFIG_RETRY_MODE,ENV_MAX_ATTEMPTS:()=>a.ENV_MAX_ATTEMPTS,ENV_RETRY_MODE:()=>a.ENV_RETRY_MODE,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>a.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>a.NODE_RETRY_MODE_CONFIG_OPTIONS,StandardRetryStrategy:()=>i.StandardRetryStrategy,defaultDelayDecider:()=>o.defaultDelayDecider,defaultRetryDecider:()=>l.defaultRetryDecider,getOmitRetryHeadersPlugin:()=>s.getOmitRetryHeadersPlugin,getRetryAfterHint:()=>u.getRetryAfterHint,getRetryPlugin:()=>u.getRetryPlugin,omitRetryHeadersMiddleware:()=>s.omitRetryHeadersMiddleware,omitRetryHeadersMiddlewareOptions:()=>s.omitRetryHeadersMiddlewareOptions,resolveRetryConfig:()=>a.resolveRetryConfig,retryMiddleware:()=>u.retryMiddleware,retryMiddlewareOptions:()=>u.retryMiddlewareOptions});var r=n(52952),i=n(21973),a=n(25998),o=n(31038),s=n(56908),l=n(99933),u=n(34923)},81738:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isStreamingPayload:()=>r});const r=e=>e?.body instanceof ReadableStream},56908:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getOmitRetryHeadersPlugin:()=>s,omitRetryHeadersMiddleware:()=>a,omitRetryHeadersMiddlewareOptions:()=>o});var r=n(14065),i=n(56265);const a=()=>e=>async t=>{const{request:n}=t;return r.HttpRequest.isInstance(n)&&(delete n.headers[i.INVOCATION_ID_HEADER],delete n.headers[i.REQUEST_HEADER]),e(t)},o={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},s=e=>({applyToStack:e=>{e.addRelativeTo(a(),o)}})},99933:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultRetryDecider:()=>i});var r=n(42653);const i=e=>!!e&&((0,r.isRetryableByTrait)(e)||(0,r.isClockSkewError)(e)||(0,r.isThrottlingError)(e)||(0,r.isTransientError)(e))},34923:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRetryAfterHint:()=>m,getRetryPlugin:()=>g,retryMiddleware:()=>c,retryMiddlewareOptions:()=>h});var r=n(14065),i=n(42653),a=n(31796),o=n(56265),s=n(12634),l=n(81738),u=n(15901);const c=e=>(t,n)=>async i=>{let c=await e.retryStrategy();const p=await e.maxAttempts();if(!d(c))return c?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",c.mode]]),c.retry(t,i);{let e=await c.acquireInitialRetryToken(n.partition_id),d=new Error,h=0,g=0;const{request:m}=i,y=r.HttpRequest.isInstance(m);for(y&&(m.headers[o.INVOCATION_ID_HEADER]=(0,s.v4)());;)try{y&&(m.headers[o.REQUEST_HEADER]=`attempt=${h+1}; max=${p}`);const{response:n,output:r}=await t(i);return c.recordSuccess(e),r.$metadata.attempts=h+1,r.$metadata.totalRetryDelay=g,{response:n,output:r}}catch(t){const r=f(t);if(d=(0,u.asSdkError)(t),y&&(0,l.isStreamingPayload)(m))throw(n.logger instanceof a.NoOpLogger?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),d;try{e=await c.refreshRetryTokenForRetry(e,r)}catch(e){throw d.$metadata||(d.$metadata={}),d.$metadata.attempts=h+1,d.$metadata.totalRetryDelay=g,d}h=e.getRetryCount();const i=e.getRetryDelay();g+=i,await new Promise((e=>setTimeout(e,i)))}}},d=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,f=e=>{const t={error:e,errorType:p(e)},n=m(e.$response);return n&&(t.retryAfterHint=n),t},p=e=>(0,i.isThrottlingError)(e)?"THROTTLING":(0,i.isTransientError)(e)?"TRANSIENT":(0,i.isServerError)(e)?"SERVER_ERROR":"CLIENT_ERROR",h={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},g=e=>({applyToStack:t=>{t.add(c(e),h)}}),m=e=>{if(!r.HttpResponse.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],i=Number(n);return Number.isNaN(i)?new Date(n):new Date(1e3*i)}},15901:(e,t,n)=>{"use strict";n.r(t),n.d(t,{asSdkError:()=>r});const r=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`)},47755:(e,t,n)=>{"use strict";n.r(t),n.d(t,{deserializerMiddleware:()=>r});const r=(e,t)=>n=>async r=>{const{response:i}=await n(r);try{return{response:i,output:await t(i,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:i}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}}},32754:(e,t,n)=>{"use strict";n.r(t),n.d(t,{deserializerMiddleware:()=>r.deserializerMiddleware,deserializerMiddlewareOption:()=>i.deserializerMiddlewareOption,getSerdePlugin:()=>i.getSerdePlugin,serializerMiddleware:()=>a.serializerMiddleware,serializerMiddlewareOption:()=>i.serializerMiddlewareOption});var r=n(47755),i=n(54340),a=n(64860)},54340:(e,t,n)=>{"use strict";n.r(t),n.d(t,{deserializerMiddlewareOption:()=>a,getSerdePlugin:()=>s,serializerMiddlewareOption:()=>o});var r=n(47755),i=n(64860);const a={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},o={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function s(e,t,n){return{applyToStack:s=>{s.add((0,r.deserializerMiddleware)(e,n),a),s.add((0,i.serializerMiddleware)(e,t),o)}}}},64860:(e,t,n)=>{"use strict";n.r(t),n.d(t,{serializerMiddleware:()=>r});const r=(e,t)=>(n,r)=>async i=>{const a=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!a)throw new Error("No valid endpoint provider available.");const o=await t(i.input,{...e,endpoint:a});return n({...i,request:o})}},61671:(e,t,n)=>{"use strict";n.r(t),n.d(t,{constructStack:()=>a});const r=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},i=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,a=()=>{let e=[],t=[],n=!1;const l=new Set,u=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(f.identifyOnResolve()),n),c=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t},d=(n=!1)=>{const a=[],l=[],u={};var d;return e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of r(t.name,t.aliases))u[e]=t;a.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of r(t.name,t.aliases))u[e]=t;l.push(t)})),l.forEach((e=>{if(e.toMiddleware){const t=u[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${i(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(d=a,d.sort(((e,t)=>o[t.step]-o[e.step]||s[t.priority||"normal"]-s[e.priority||"normal"]))).map(c).reduce(((e,t)=>(e.push(...t),e)),[])},f={add:(t,n={})=>{const{name:a,override:o,aliases:s}=n,u={step:"initialize",priority:"normal",middleware:t,...n},c=r(a,s);if(c.length>0){if(c.some((e=>l.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${i(a,s)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const r=e[n];if(r.step!==u.step||u.priority!==r.priority)throw new Error(`"${i(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${i(a,s)}" middleware with ${u.priority} priority in ${u.step} step.`);e.splice(n,1)}}for(const e of c)l.add(e)}e.push(u)},addRelativeTo:(e,n)=>{const{name:a,override:o,aliases:s}=n,u={middleware:e,...n},c=r(a,s);if(c.length>0){if(c.some((e=>l.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${i(a,s)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==u.toMiddleware||r.relation!==u.relation)throw new Error(`"${i(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${i(a,s)}" middleware ${u.relation} "${u.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)l.add(e)}t.push(u)},clone:()=>u(a()),use:e=>{e.applyToStack(f)},remove:n=>"string"==typeof n?(n=>{let i=!1;const a=e=>{const t=r(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)l.delete(e);return!1}return!0};return e=e.filter(a),t=t.filter(a),i})(n):(n=>{let i=!1;const a=e=>{if(e.middleware===n){i=!0;for(const t of r(e.name,e.aliases))l.delete(t);return!1}return!0};return e=e.filter(a),t=t.filter(a),i})(n),removeByTag:n=>{let i=!1;const a=e=>{const{tags:t,name:a,aliases:o}=e;if(t&&t.includes(n)){const e=r(a,o);for(const t of e)l.delete(t);return i=!0,!1}return!0};return e=e.filter(a),t=t.filter(a),i},concat:e=>{const t=u(a());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:u,identify:()=>d(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return i(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of d().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(f.identify()),e}};return f},o={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},s={high:3,normal:2,low:1}},14795:(e,t,n)=>{"use strict";n.r(t),n.d(t,{constructStack:()=>r.constructStack});var r=n(61671)},83052:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CredentialsProviderError:()=>i});var r=n(96014);class i extends r.ProviderError{constructor(e,t=!0){super(e,t),this.name="CredentialsProviderError",Object.setPrototypeOf(this,i.prototype)}}},96014:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ProviderError:()=>r});class r extends Error{constructor(e,t=!0){let n,i=!0;"boolean"==typeof t?(n=void 0,i=t):null!=t&&"object"==typeof t&&(n=t.logger,i=t.tryNextLink??!0),super(e),this.name="ProviderError",this.tryNextLink=i,Object.setPrototypeOf(this,r.prototype),n?.debug?.(`@smithy/property-provider ${i?"->":"(!)"} ${e}`)}static from(e,t=!0){return Object.assign(new this(e.message,t),e)}}},97513:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TokenProviderError:()=>i});var r=n(96014);class i extends r.ProviderError{constructor(e,t=!0){super(e,t),this.name="TokenProviderError",Object.setPrototypeOf(this,i.prototype)}}},78062:(e,t,n)=>{"use strict";n.r(t),n.d(t,{chain:()=>i});var r=n(96014);const i=(...e)=>async()=>{if(0===e.length)throw new r.ProviderError("No providers in chain");let t;for(const n of e)try{return await n()}catch(e){if(t=e,e?.tryNextLink)continue;throw e}throw t}},72269:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromStatic:()=>r});const r=e=>()=>Promise.resolve(e)},10223:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CredentialsProviderError:()=>r.CredentialsProviderError,ProviderError:()=>i.ProviderError,TokenProviderError:()=>a.TokenProviderError,chain:()=>o.chain,fromStatic:()=>s.fromStatic,memoize:()=>l.memoize});var r=n(83052),i=n(96014),a=n(97513),o=n(78062),s=n(72269),l=n(63783)},63783:(e,t,n)=>{"use strict";n.r(t),n.d(t,{memoize:()=>r});const r=(e,t,n)=>{let r,i,a,o=!1;const s=async()=>{i||(i=e());try{r=await i,a=!0,o=!1}finally{i=void 0}return r};return void 0===t?async e=>(a&&!e?.forceRefresh||(r=await s()),r):async e=>(a&&!e?.forceRefresh||(r=await s()),o?r:n&&!n(r)?(o=!0,r):t(r)?(await s(),r):r)}},28281:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Field:()=>i});var r=n(23911);class i{constructor({name:e,kind:t=r.FieldPosition.HEADER,values:n=[]}){this.name=e,this.kind=t,this.values=n}add(e){this.values.push(e)}set(e){this.values=e}remove(e){this.values=this.values.filter((t=>t!==e))}toString(){return this.values.map((e=>e.includes(",")||e.includes(" ")?`"${e}"`:e)).join(", ")}get(){return this.values}}},99260:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Fields:()=>r});class r{constructor({fields:e=[],encoding:t="utf-8"}){this.entries={},e.forEach(this.setField.bind(this)),this.encoding=t}setField(e){this.entries[e.name.toLowerCase()]=e}getField(e){return this.entries[e.toLowerCase()]}removeField(e){delete this.entries[e.toLowerCase()]}getByType(e){return Object.values(this.entries).filter((t=>t.kind===e))}}},22927:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpHandlerExtensionConfiguration:()=>r,resolveHttpHandlerRuntimeConfig:()=>i});const r=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},i=e=>({httpHandler:e.httpHandler()})},9640:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpHandlerExtensionConfiguration:()=>r.getHttpHandlerExtensionConfiguration,resolveHttpHandlerRuntimeConfig:()=>r.resolveHttpHandlerRuntimeConfig});var r=n(22927)},83229:(e,t,n)=>{"use strict";n.r(t)},67324:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpRequest:()=>r});class r{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new r({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce(((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return r.clone(this)}}},4094:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpResponse:()=>r});class r{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}},14065:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Field:()=>i.Field,Fields:()=>a.Fields,HttpRequest:()=>o.HttpRequest,HttpResponse:()=>s.HttpResponse,getHttpHandlerExtensionConfiguration:()=>r.getHttpHandlerExtensionConfiguration,isValidHostname:()=>l.isValidHostname,resolveHttpHandlerRuntimeConfig:()=>r.resolveHttpHandlerRuntimeConfig});var r=n(9640),i=n(28281),a=n(99260),o=(n(83229),n(67324)),s=n(4094),l=n(38610);n(76576)},38610:(e,t,n)=>{"use strict";function r(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}n.r(t),n.d(t,{isValidHostname:()=>r})},76576:(e,t,n)=>{"use strict";n.r(t)},65901:(e,t,n)=>{"use strict";n.r(t),n.d(t,{buildQueryString:()=>i});var r=n(78611);function i(e){const t=[];for(let n of Object.keys(e).sort()){const i=e[n];if(n=(0,r.escapeUri)(n),Array.isArray(i))for(let e=0,a=i.length;e{"use strict";function r(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}n.r(t),n.d(t,{parseQueryString:()=>r})},98388:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CLOCK_SKEW_ERROR_CODES:()=>r,NODEJS_TIMEOUT_ERROR_CODES:()=>s,THROTTLING_ERROR_CODES:()=>i,TRANSIENT_ERROR_CODES:()=>a,TRANSIENT_ERROR_STATUS_CODES:()=>o});const r=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],i=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],a=["TimeoutError","RequestTimeout","RequestTimeoutException"],o=[500,502,503,504],s=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]},42653:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isClockSkewCorrectedError:()=>o,isClockSkewError:()=>a,isRetryableByTrait:()=>i,isServerError:()=>u,isThrottlingError:()=>s,isTransientError:()=>l});var r=n(98388);const i=e=>void 0!==e.$retryable,a=e=>r.CLOCK_SKEW_ERROR_CODES.includes(e.name),o=e=>e.$metadata?.clockSkewCorrected,s=e=>429===e.$metadata?.httpStatusCode||r.THROTTLING_ERROR_CODES.includes(e.name)||1==e.$retryable?.throttling,l=e=>o(e)||r.TRANSIENT_ERROR_CODES.includes(e.name)||r.NODEJS_TIMEOUT_ERROR_CODES.includes(e?.code||"")||r.TRANSIENT_ERROR_STATUS_CODES.includes(e.$metadata?.httpStatusCode||0),u=e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!l(e)}return!1}},52364:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HeaderFormatter:()=>o,Int64:()=>l});var r,i=n(68004),a=n(14246);class o{format(e){const t=[];for(const n of Object.keys(e)){const r=(0,a.fromUtf8)(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);const u=new Uint8Array(o.buffer);return u.set(e.value,3),u;case"string":const c=(0,a.fromUtf8)(e.value),d=new DataView(new ArrayBuffer(3+c.byteLength));d.setUint8(0,7),d.setUint16(1,c.byteLength,!1);const f=new Uint8Array(d.buffer);return f.set(c,3),f;case"timestamp":const p=new Uint8Array(9);return p[0]=8,p.set(l.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!s.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const h=new Uint8Array(17);return h[0]=9,h.set((0,i.fromHex)(e.value.replace(/\-/g,"")),1),h}}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(r||(r={}));const s=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class l{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&u(t),new l(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&u(e),parseInt((0,i.toHex)(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function u(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}},97045:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SignatureV4:()=>y});var r=n(68004),i=n(40805),a=n(78611),o=n(14246),s=n(67120),l=n(3321),u=n(3245),c=n(48859),d=n(58755),f=n(52364),p=n(79092),h=n(38737),g=n(1969),m=n(73533);class y{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:a,uriEscapePath:o=!0}){this.headerFormatter=new f.HeaderFormatter,this.service=r,this.sha256=a,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,i.normalizeProvider)(n),this.credentialProvider=(0,i.normalizeProvider)(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:a,signableHeaders:o,hoistableHeaders:c,signingRegion:f,signingService:p}=t,m=await this.credentialProvider();this.validateResolvedCredentials(m);const y=f??await this.regionProvider(),{longDate:w,shortDate:x}=v(n);if(r>s.MAX_PRESIGNED_TTL)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=(0,l.createScope)(x,y,p??this.service),S=(0,h.moveHeadersToQuery)((0,g.prepareRequest)(e),{unhoistableHeaders:a,hoistableHeaders:c});m.sessionToken&&(S.query[s.TOKEN_QUERY_PARAM]=m.sessionToken),S.query[s.ALGORITHM_QUERY_PARAM]=s.ALGORITHM_IDENTIFIER,S.query[s.CREDENTIAL_QUERY_PARAM]=`${m.accessKeyId}/${E}`,S.query[s.AMZ_DATE_QUERY_PARAM]=w,S.query[s.EXPIRES_QUERY_PARAM]=r.toString(10);const _=(0,u.getCanonicalHeaders)(S,i,o);return S.query[s.SIGNED_HEADERS_QUERY_PARAM]=b(_),S.query[s.SIGNATURE_QUERY_PARAM]=await this.getSignature(w,E,this.getSigningKey(m,y,x,p),this.createCanonicalRequest(S,_,await(0,d.getPayloadHash)(e,this.sha256))),S}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:i,signingRegion:a,signingService:o}){const u=a??await this.regionProvider(),{shortDate:c,longDate:f}=v(n),p=(0,l.createScope)(c,u,o??this.service),h=await(0,d.getPayloadHash)({headers:{},body:t},this.sha256),g=new this.sha256;g.update(e);const m=(0,r.toHex)(await g.digest()),y=[s.EVENT_ALGORITHM_IDENTIFIER,f,p,i,m,h].join("\n");return this.signString(y,{signingDate:n,signingRegion:u,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:i}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const s=n??await this.regionProvider(),{shortDate:l}=v(t),u=new this.sha256(await this.getSigningKey(a,s,l,i));return u.update((0,o.toUint8Array)(e)),(0,r.toHex)(await u.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:a}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const c=i??await this.regionProvider(),f=(0,g.prepareRequest)(e),{longDate:h,shortDate:m}=v(t),y=(0,l.createScope)(m,c,a??this.service);f.headers[s.AMZ_DATE_HEADER]=h,o.sessionToken&&(f.headers[s.TOKEN_HEADER]=o.sessionToken);const w=await(0,d.getPayloadHash)(f,this.sha256);!(0,p.hasHeader)(s.SHA256_HEADER,f.headers)&&this.applyChecksum&&(f.headers[s.SHA256_HEADER]=w);const x=(0,u.getCanonicalHeaders)(f,r,n),E=await this.getSignature(h,y,this.getSigningKey(o,c,m,a),this.createCanonicalRequest(f,x,w));return f.headers[s.AUTH_HEADER]=`${s.ALGORITHM_IDENTIFIER} Credential=${o.accessKeyId}/${y}, SignedHeaders=${b(x)}, Signature=${E}`,f}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(0,c.getCanonicalQuery)(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n){const i=new this.sha256;i.update((0,o.toUint8Array)(n));const a=await i.digest();return`${s.ALGORITHM_IDENTIFIER}\n${e}\n${t}\n${(0,r.toHex)(a)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return(0,a.escapeUri)(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,i){const a=await this.createStringToSign(e,t,i),s=new this.sha256(await n);return s.update((0,o.toUint8Array)(a)),(0,r.toHex)(await s.digest())}getSigningKey(e,t,n,r){return(0,l.getSigningKey)(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const v=e=>{const t=(0,m.iso8601)(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},b=e=>Object.keys(e).sort().join(";")},67120:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ALGORITHM_IDENTIFIER:()=>S,ALGORITHM_IDENTIFIER_V4A:()=>_,ALGORITHM_QUERY_PARAM:()=>r,ALWAYS_UNSIGNABLE_HEADERS:()=>b,AMZ_DATE_HEADER:()=>f,AMZ_DATE_QUERY_PARAM:()=>a,AUTH_HEADER:()=>d,CREDENTIAL_QUERY_PARAM:()=>i,DATE_HEADER:()=>p,EVENT_ALGORITHM_IDENTIFIER:()=>A,EXPIRES_QUERY_PARAM:()=>s,GENERATED_HEADERS:()=>h,HOST_HEADER:()=>v,KEY_TYPE_IDENTIFIER:()=>k,MAX_CACHE_SIZE:()=>T,MAX_PRESIGNED_TTL:()=>R,PROXY_HEADER_PATTERN:()=>w,REGION_SET_PARAM:()=>c,SEC_HEADER_PATTERN:()=>x,SHA256_HEADER:()=>m,SIGNATURE_HEADER:()=>g,SIGNATURE_QUERY_PARAM:()=>l,SIGNED_HEADERS_QUERY_PARAM:()=>o,TOKEN_HEADER:()=>y,TOKEN_QUERY_PARAM:()=>u,UNSIGNABLE_PATTERNS:()=>E,UNSIGNED_PAYLOAD:()=>C});const r="X-Amz-Algorithm",i="X-Amz-Credential",a="X-Amz-Date",o="X-Amz-SignedHeaders",s="X-Amz-Expires",l="X-Amz-Signature",u="X-Amz-Security-Token",c="X-Amz-Region-Set",d="authorization",f=a.toLowerCase(),p="date",h=[d,f,p],g=l.toLowerCase(),m="x-amz-content-sha256",y=u.toLowerCase(),v="host",b={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},w=/^proxy-/,x=/^sec-/,E=[/^proxy-/i,/^sec-/i],S="AWS4-HMAC-SHA256",_="AWS4-ECDSA-P256-SHA256",A="AWS4-HMAC-SHA256-PAYLOAD",C="UNSIGNED-PAYLOAD",T=50,k="aws4_request",R=604800},3321:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clearCredentialCache:()=>c,createScope:()=>l,getSigningKey:()=>u});var r=n(68004),i=n(14246),a=n(67120);const o={},s=[],l=(e,t,n)=>`${e}/${t}/${n}/${a.KEY_TYPE_IDENTIFIER}`,u=async(e,t,n,i,l)=>{const u=await d(e,t.secretAccessKey,t.accessKeyId),c=`${n}:${i}:${l}:${(0,r.toHex)(u)}:${t.sessionToken}`;if(c in o)return o[c];for(s.push(c);s.length>a.MAX_CACHE_SIZE;)delete o[s.shift()];let f=`AWS4${t.secretAccessKey}`;for(const t of[n,i,l,a.KEY_TYPE_IDENTIFIER])f=await d(e,f,t);return o[c]=f},c=()=>{s.length=0,Object.keys(o).forEach((e=>{delete o[e]}))},d=(e,t,n)=>{const r=new e(t);return r.update((0,i.toUint8Array)(n)),r.digest()}},3245:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getCanonicalHeaders:()=>i});var r=n(67120);const i=({headers:e},t,n)=>{const i={};for(const a of Object.keys(e).sort()){if(null==e[a])continue;const o=a.toLowerCase();(o in r.ALWAYS_UNSIGNABLE_HEADERS||t?.has(o)||r.PROXY_HEADER_PATTERN.test(o)||r.SEC_HEADER_PATTERN.test(o))&&(!n||n&&!n.has(o))||(i[o]=e[a].trim().replace(/\s+/g," "))}return i}},48859:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getCanonicalQuery:()=>a});var r=n(78611),i=n(67120);const a=({query:e={}})=>{const t=[],n={};for(const a of Object.keys(e)){if(a.toLowerCase()===i.SIGNATURE_HEADER)continue;const o=(0,r.escapeUri)(a);t.push(o);const s=e[a];"string"==typeof s?n[o]=`${o}=${(0,r.escapeUri)(s)}`:Array.isArray(s)&&(n[o]=s.slice(0).reduce(((e,t)=>e.concat([`${o}=${(0,r.escapeUri)(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")}},58755:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getPayloadHash:()=>s});var r=n(43695),i=n(68004),a=n(14246),o=n(67120);const s=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===o.SHA256_HEADER)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(0,r.isArrayBuffer)(t)){const e=new n;return e.update((0,a.toUint8Array)(t)),(0,i.toHex)(await e.digest())}return o.UNSIGNED_PAYLOAD}},79092:(e,t,n)=>{"use strict";n.r(t),n.d(t,{deleteHeader:()=>a,getHeaderValue:()=>i,hasHeader:()=>r});const r=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},i=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return t[n]},a=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))e===n.toLowerCase()&&delete t[n]}},82505:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SignatureV4:()=>r.SignatureV4,clearCredentialCache:()=>u.clearCredentialCache,createScope:()=>u.createScope,getCanonicalHeaders:()=>i.getCanonicalHeaders,getCanonicalQuery:()=>a.getCanonicalQuery,getPayloadHash:()=>o.getPayloadHash,getSigningKey:()=>u.getSigningKey,moveHeadersToQuery:()=>s.moveHeadersToQuery,prepareRequest:()=>l.prepareRequest});var r=n(97045),i=n(3245),a=n(48859),o=n(58755),s=n(38737),l=n(1969),u=n(3321)},38737:(e,t,n)=>{"use strict";n.r(t),n.d(t,{moveHeadersToQuery:()=>i});var r=n(14065);const i=(e,t={})=>{const{headers:n,query:i={}}=r.HttpRequest.clone(e);for(const e of Object.keys(n)){const r=e.toLowerCase();("x-amz-"===r.slice(0,6)&&!t.unhoistableHeaders?.has(r)||t.hoistableHeaders?.has(r))&&(i[e]=n[e],delete n[e])}return{...e,headers:n,query:i}}},1969:(e,t,n)=>{"use strict";n.r(t),n.d(t,{prepareRequest:()=>a});var r=n(14065),i=n(67120);const a=e=>{e=r.HttpRequest.clone(e);for(const t of Object.keys(e.headers))i.GENERATED_HEADERS.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e}},73533:(e,t,n)=>{"use strict";n.r(t),n.d(t,{iso8601:()=>r,toDate:()=>i});const r=e=>i(e).toISOString().replace(/\.\d{3}Z$/,"Z"),i=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e},4098:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NoOpLogger:()=>r});class r{trace(){}debug(){}info(){}warn(){}error(){}}},67821:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Client:()=>i});var r=n(14795);class i{constructor(e){this.config=e,this.middlewareStack=(0,r.constructStack)()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let a;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?a=t.get(e.constructor):(a=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,a))}else delete this.handlers,a=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return a(e).then((e=>e.output));a(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}},12916:(e,t,n)=>{"use strict";n.r(t),n.d(t,{collectBody:()=>r.collectBody});var r=n(4351)},32249:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Command:()=>a});var r=n(14795),i=n(23911);class a{constructor(){this.middlewareStack=(0,r.constructStack)()}static classBuilder(){return new o}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:a,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,smithyContext:u,additionalContext:c,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const f=e.concat(this.middlewareStack),{logger:p}=t,h={logger:p,clientName:a,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,[i.SMITHY_CONTEXT_KEY]:{commandInstance:this,...u},...c},{requestHandler:g}=t;return f.resolve((e=>g.handle(e.request,n||{})),h)}}class o{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends a{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}},22809:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SENSITIVE_STRING:()=>r});const r="***SensitiveInformation***"},63496:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createAggregatedClient:()=>r});const r=(e,t)=>{for(const n of Object.keys(e)){const r=e[n],i=async function(e,t,n){const i=new r(e);if("function"==typeof t)this.send(i,t);else{if("function"!=typeof n)return this.send(i,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(i,t||{},n)}},a=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[a]=i}}},28550:(e,t,n)=>{"use strict";n.r(t),n.d(t,{dateToUtcString:()=>o,parseEpochTimestamp:()=>g,parseRfc3339DateTime:()=>l,parseRfc3339DateTimeWithOffset:()=>c,parseRfc7231DateTime:()=>h});var r=n(93479);const i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function o(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),o=e.getUTCDate(),s=e.getUTCHours(),l=e.getUTCMinutes(),u=e.getUTCSeconds(),c=o<10?`0${o}`:`${o}`,d=s<10?`0${s}`:`${s}`,f=l<10?`0${l}`:`${l}`,p=u<10?`0${u}`:`${u}`;return`${i[r]}, ${c} ${a[n]} ${t} ${d}:${f}:${p} GMT`}const s=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),l=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=s.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,i,a,o,l,u,c,d]=t,f=(0,r.strictParseShort)(C(i)),p=S(a,"month",1,12),h=S(o,"day",1,31);return m(f,p,h,{hours:l,minutes:u,seconds:c,fractionalMilliseconds:d})},u=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),c=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=u.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,i,a,o,s,l,c,d,f]=t,p=(0,r.strictParseShort)(C(i)),h=S(a,"month",1,12),g=S(o,"day",1,31),y=m(p,h,g,{hours:s,minutes:l,seconds:c,fractionalMilliseconds:d});return"Z"!=f.toUpperCase()&&y.setTime(y.getTime()-A(f)),y},d=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),f=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),p=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),h=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=d.exec(e);if(t){const[e,n,i,a,o,s,l,u]=t;return m((0,r.strictParseShort)(C(a)),b(i),S(n,"day",1,31),{hours:o,minutes:s,seconds:l,fractionalMilliseconds:u})}if(t=f.exec(e),t){const[e,n,r,i,a,o,s,l]=t;return v(m(y(i),b(r),S(n,"day",1,31),{hours:a,minutes:o,seconds:s,fractionalMilliseconds:l}))}if(t=p.exec(e),t){const[e,n,i,a,o,s,l,u]=t;return m((0,r.strictParseShort)(C(u)),b(n),S(i.trimLeft(),"day",1,31),{hours:a,minutes:o,seconds:s,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},g=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=(0,r.strictParseDouble)(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))},m=(e,t,n,r)=>{const i=t-1;return x(e,i,n),new Date(Date.UTC(e,i,n,S(r.hours,"hour",0,23),S(r.minutes,"minute",0,59),S(r.seconds,"seconds",0,60),_(r.fractionalMilliseconds)))},y=e=>{const t=(new Date).getUTCFullYear(),n=100*Math.floor(t/100)+(0,r.strictParseShort)(C(e));return ne.getTime()-(new Date).getTime()>15768e8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,b=e=>{const t=a.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},w=[31,28,31,30,31,30,31,31,30,31,30,31],x=(e,t,n)=>{let r=w[t];if(1===t&&E(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${a[t]} in ${e}: ${n}`)},E=e=>e%4==0&&(e%100!=0||e%400==0),S=(e,t,n,i)=>{const a=(0,r.strictParseByte)(C(e));if(ai)throw new TypeError(`${t} must be between ${n} and ${i}, inclusive`);return a},_=e=>null==e?0:1e3*(0,r.strictParseFloat32)("0."+e),A=e=>{const t=e[0];let n=1;if("+"==t)n=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);n=-1}return n*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},C=e=>{let t=0;for(;t{"use strict";n.r(t),n.d(t,{throwDefaultError:()=>i,withBaseException:()=>a});var r=n(94384);const i=({output:e,parsedBody:t,exceptionCtor:n,errorCode:i})=>{const a=o(e),s=a.httpStatusCode?a.httpStatusCode+"":void 0,l=new n({name:t?.code||t?.Code||i||s||"UnknownError",$fault:"client",$metadata:a});throw(0,r.decorateServiceException)(l,t)},a=e=>({output:t,parsedBody:n,errorCode:r})=>{i({output:t,parsedBody:n,exceptionCtor:e,errorCode:r})},o=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]})},60666:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loadConfigsForDefaultMode:()=>r});const r=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}}},52339:(e,t,n)=>{"use strict";n.r(t),n.d(t,{emitWarningIfUnsupportedVersion:()=>i});let r=!1;const i=e=>{e&&!r&&parseInt(e.substring(1,e.indexOf(".")))<16&&(r=!0)}},94384:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ServiceException:()=>r,decorateServiceException:()=>i});class r extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,r.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const i=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e}},8131:(e,t,n)=>{"use strict";n.r(t),n.d(t,{extendedEncodeURIComponent:()=>r.extendedEncodeURIComponent});var r=n(4351)},90728:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlgorithmId:()=>r.AlgorithmId,getChecksumConfiguration:()=>i,resolveChecksumRuntimeConfig:()=>a});var r=n(23911);const i=e=>{const t=[];for(const n in r.AlgorithmId){const i=r.AlgorithmId[n];void 0!==e[i]&&t.push({algorithmId:()=>i,checksumConstructor:()=>e[i]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},a=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t}},14591:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDefaultClientConfiguration:()=>o,getDefaultExtensionConfiguration:()=>a,resolveDefaultRuntimeConfig:()=>s});var r=n(90728),i=n(64005);const a=e=>({...(0,r.getChecksumConfiguration)(e),...(0,i.getRetryConfiguration)(e)}),o=a,s=e=>({...(0,r.resolveChecksumRuntimeConfig)(e),...(0,i.resolveRetryRuntimeConfig)(e)})},57403:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDefaultClientConfiguration:()=>r.getDefaultClientConfiguration,getDefaultExtensionConfiguration:()=>r.getDefaultExtensionConfiguration,resolveDefaultRuntimeConfig:()=>r.resolveDefaultRuntimeConfig});var r=n(14591)},64005:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRetryConfiguration:()=>r,resolveRetryRuntimeConfig:()=>i});const r=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},i=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t}},53707:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getArrayIfSingleItem:()=>r});const r=e=>Array.isArray(e)?e:[e]},39430:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getValueFromTextNode:()=>r});const r=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&void 0!==e[n][t]?e[n]=e[n][t]:"object"==typeof e[n]&&null!==e[n]&&(e[n]=r(e[n]));return e}},31796:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Client:()=>r.Client,Command:()=>a.Command,LazyJsonString:()=>v.LazyJsonString,NoOpLogger:()=>b.NoOpLogger,SENSITIVE_STRING:()=>o.SENSITIVE_STRING,ServiceException:()=>f.ServiceException,StringWrapper:()=>v.StringWrapper,_json:()=>A._json,collectBody:()=>i.collectBody,convertMap:()=>w.convertMap,createAggregatedClient:()=>s.createAggregatedClient,dateToUtcString:()=>l.dateToUtcString,decorateServiceException:()=>f.decorateServiceException,emitWarningIfUnsupportedVersion:()=>d.emitWarningIfUnsupportedVersion,expectBoolean:()=>x.expectBoolean,expectByte:()=>x.expectByte,expectFloat32:()=>x.expectFloat32,expectInt:()=>x.expectInt,expectInt32:()=>x.expectInt32,expectLong:()=>x.expectLong,expectNonNull:()=>x.expectNonNull,expectNumber:()=>x.expectNumber,expectObject:()=>x.expectObject,expectShort:()=>x.expectShort,expectString:()=>x.expectString,expectUnion:()=>x.expectUnion,extendedEncodeURIComponent:()=>p.extendedEncodeURIComponent,getArrayIfSingleItem:()=>g.getArrayIfSingleItem,getDefaultClientConfiguration:()=>h.getDefaultClientConfiguration,getDefaultExtensionConfiguration:()=>h.getDefaultExtensionConfiguration,getValueFromTextNode:()=>m.getValueFromTextNode,handleFloat:()=>x.handleFloat,isSerializableHeaderValue:()=>y.isSerializableHeaderValue,limitedParseDouble:()=>x.limitedParseDouble,limitedParseFloat:()=>x.limitedParseFloat,limitedParseFloat32:()=>x.limitedParseFloat32,loadConfigsForDefaultMode:()=>c.loadConfigsForDefaultMode,logger:()=>x.logger,map:()=>w.map,parseBoolean:()=>x.parseBoolean,parseEpochTimestamp:()=>l.parseEpochTimestamp,parseRfc3339DateTime:()=>l.parseRfc3339DateTime,parseRfc3339DateTimeWithOffset:()=>l.parseRfc3339DateTimeWithOffset,parseRfc7231DateTime:()=>l.parseRfc7231DateTime,quoteHeader:()=>E.quoteHeader,resolveDefaultRuntimeConfig:()=>h.resolveDefaultRuntimeConfig,resolvedPath:()=>S.resolvedPath,serializeDateTime:()=>_.serializeDateTime,serializeFloat:()=>_.serializeFloat,splitEvery:()=>C.splitEvery,splitHeader:()=>T.splitHeader,strictParseByte:()=>x.strictParseByte,strictParseDouble:()=>x.strictParseDouble,strictParseFloat:()=>x.strictParseFloat,strictParseFloat32:()=>x.strictParseFloat32,strictParseInt:()=>x.strictParseInt,strictParseInt32:()=>x.strictParseInt32,strictParseLong:()=>x.strictParseLong,strictParseShort:()=>x.strictParseShort,take:()=>w.take,throwDefaultError:()=>u.throwDefaultError,withBaseException:()=>u.withBaseException});var r=n(67821),i=n(12916),a=n(32249),o=n(22809),s=n(63496),l=n(28550),u=n(22967),c=n(60666),d=n(52339),f=n(94384),p=n(8131),h=n(57403),g=n(53707),m=n(39430),y=n(10212),v=n(24259),b=n(4098),w=n(18845),x=n(93479),E=n(92192),S=n(29542),_=n(64650),A=n(87268),C=n(13094),T=n(28444)},10212:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isSerializableHeaderValue:()=>r});const r=e=>null!=e},24259:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LazyJsonString:()=>i,StringWrapper:()=>r});const r=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};r.prototype=Object.create(String.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(r,String);class i extends r{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(e){return e instanceof i?e:new i(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}},18845:(e,t,n)=>{"use strict";function r(e,t,n){let r,i,a;if(void 0===t&&void 0===n)r={},a=e;else{if(r=e,"function"==typeof t)return i=t,a=n,o(r,i,a);a=t}for(const e of Object.keys(a))Array.isArray(a[e])?s(r,null,a,e):r[e]=a[e];return r}n.r(t),n.d(t,{convertMap:()=>i,map:()=>r,take:()=>a});const i=e=>{const t={};for(const[n,r]of Object.entries(e||{}))t[n]=[,r];return t},a=(e,t)=>{const n={};for(const r in t)s(n,e,t,r);return n},o=(e,t,n)=>r(e,Object.entries(n).reduce(((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e)),{})),s=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[a=l,o=u,s=r]=i;return void(("function"==typeof a&&a(t[s])||"function"!=typeof a&&a)&&(e[r]=o(t[s])))}let[i,a]=n[r];if("function"==typeof a){let t;const n=void 0===i&&null!=(t=a()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=a())}else{const t=void 0===i&&null!=a,n="function"==typeof i&&!!i(a)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=a)}},l=e=>null!=e,u=e=>e},93479:(e,t,n)=>{"use strict";n.r(t),n.d(t,{expectBoolean:()=>i,expectByte:()=>f,expectFloat32:()=>s,expectInt:()=>u,expectInt32:()=>c,expectLong:()=>l,expectNonNull:()=>g,expectNumber:()=>a,expectObject:()=>m,expectShort:()=>d,expectString:()=>y,expectUnion:()=>v,handleFloat:()=>A,limitedParseDouble:()=>_,limitedParseFloat:()=>C,limitedParseFloat32:()=>T,logger:()=>M,parseBoolean:()=>r,strictParseByte:()=>F,strictParseDouble:()=>b,strictParseFloat:()=>w,strictParseFloat32:()=>x,strictParseInt:()=>D,strictParseInt32:()=>O,strictParseLong:()=>R,strictParseShort:()=>N});const r=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},i=e=>{if(null!=e){if("number"==typeof e){if(0!==e&&1!==e||M.warn(P(`Expected boolean, got ${typeof e}: ${e}`)),0===e)return!1;if(1===e)return!0}if("string"==typeof e){const t=e.toLowerCase();if("false"!==t&&"true"!==t||M.warn(P(`Expected boolean, got ${typeof e}: ${e}`)),"false"===t)return!1;if("true"===t)return!0}if("boolean"==typeof e)return e;throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)}},a=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&M.warn(P(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},o=Math.ceil(2**127*(2-2**-23)),s=e=>{const t=a(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>o)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},l=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},u=l,c=e=>p(e,32),d=e=>p(e,16),f=e=>p(e,8),p=(e,t)=>{const n=l(e);if(void 0!==n&&h(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},h=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},g=(e,t)=>{if(null==e){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},m=e=>{if(null==e)return;if("object"==typeof e&&!Array.isArray(e))return e;const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},y=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return M.warn(P(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},v=e=>{if(null==e)return;const t=m(e),n=Object.entries(t).filter((([,e])=>null!=e)).map((([e])=>e));if(0===n.length)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(n.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${n} were not null.`);return t},b=e=>a("string"==typeof e?S(e):e),w=b,x=e=>s("string"==typeof e?S(e):e),E=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,S=e=>{const t=e.match(E);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},_=e=>"string"==typeof e?k(e):a(e),A=_,C=_,T=e=>"string"==typeof e?k(e):s(e),k=e=>{switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${e}`)}},R=e=>l("string"==typeof e?S(e):e),D=R,O=e=>c("string"==typeof e?S(e):e),N=e=>d("string"==typeof e?S(e):e),F=e=>f("string"==typeof e?S(e):e),P=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),M={warn:console.warn}},92192:(e,t,n)=>{"use strict";function r(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}n.r(t),n.d(t,{quoteHeader:()=>r})},29542:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolvedPath:()=>r.resolvedPath});var r=n(4351)},64650:(e,t,n)=>{"use strict";n.r(t),n.d(t,{serializeDateTime:()=>i,serializeFloat:()=>r});const r=e=>{if(e!=e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}},i=e=>e.toISOString().replace(".000Z","Z")},87268:(e,t,n)=>{"use strict";n.r(t),n.d(t,{_json:()=>r});const r=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(r);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=r(e[n]));return t}return e}},13094:(e,t,n)=>{"use strict";function r(e,t,n){if(n<=0||!Number.isInteger(n))throw new Error("Invalid number of delimiters ("+n+") for splitEvery.");const r=e.split(t);if(1===n)return r;const i=[];let a="";for(let e=0;er})},28444:(e,t,n)=>{"use strict";n.r(t),n.d(t,{splitHeader:()=>r});const r=e=>{const t=e.length,n=[];let r,i=!1,a=0;for(let o=0;o{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))}))}},40361:(e,t,n)=>{"use strict";n.r(t)},45157:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{HttpApiKeyAuthLocation:()=>r}),function(e){e.HEADER="header",e.QUERY="query"}(r||(r={}))},61137:(e,t,n)=>{"use strict";n.r(t)},97704:(e,t,n)=>{"use strict";n.r(t)},6934:(e,t,n)=>{"use strict";n.r(t)},89497:(e,t,n)=>{"use strict";n.r(t)},10450:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{HttpAuthLocation:()=>r}),function(e){e.HEADER="header",e.QUERY="query"}(r||(r={}))},79638:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpApiKeyAuthLocation:()=>i.HttpApiKeyAuthLocation,HttpAuthLocation:()=>r.HttpAuthLocation});var r=n(10450),i=n(45157);n(61137),n(97704),n(6934),n(89497)},1386:(e,t,n)=>{"use strict";n.r(t)},67932:(e,t,n)=>{"use strict";n.r(t)},26304:(e,t,n)=>{"use strict";n.r(t)},27382:(e,t,n)=>{"use strict";n.r(t)},39560:(e,t,n)=>{"use strict";n.r(t)},8468:(e,t,n)=>{"use strict";n.r(t),n(39560),n(76183),n(33276)},76183:(e,t,n)=>{"use strict";n.r(t)},33276:(e,t,n)=>{"use strict";n.r(t)},42017:(e,t,n)=>{"use strict";n.r(t)},43585:(e,t,n)=>{"use strict";n.r(t)},9134:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{EndpointURLScheme:()=>r}),function(e){e.HTTP="http",e.HTTPS="https"}(r||(r={}))},82320:(e,t,n)=>{"use strict";n.r(t)},43561:(e,t,n)=>{"use strict";n.r(t)},70827:(e,t,n)=>{"use strict";n.r(t)},27013:(e,t,n)=>{"use strict";n.r(t)},40462:(e,t,n)=>{"use strict";n.r(t),n(82320),n(43561),n(70827),n(73881),n(27013)},73881:(e,t,n)=>{"use strict";n.r(t)},75675:(e,t,n)=>{"use strict";n.r(t)},76839:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{AlgorithmId:()=>r,getChecksumConfiguration:()=>i,resolveChecksumRuntimeConfig:()=>a}),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(r||(r={}));const i=e=>{const t=[];return void 0!==e.sha256&&t.push({algorithmId:()=>r.SHA256,checksumConstructor:()=>e.sha256}),null!=e.md5&&t.push({algorithmId:()=>r.MD5,checksumConstructor:()=>e.md5}),{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},a=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t}},29208:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDefaultClientConfiguration:()=>i,resolveDefaultRuntimeConfig:()=>a});var r=n(76839);const i=e=>({...(0,r.getChecksumConfiguration)(e)}),a=e=>({...(0,r.resolveChecksumRuntimeConfig)(e)})},22358:(e,t,n)=>{"use strict";n.r(t)},72938:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlgorithmId:()=>i.AlgorithmId,getDefaultClientConfiguration:()=>r.getDefaultClientConfiguration,resolveDefaultRuntimeConfig:()=>r.resolveDefaultRuntimeConfig});var r=n(29208),i=(n(22358),n(76839))},29138:(e,t,n)=>{"use strict";n.r(t)},12739:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{FieldPosition:()=>r}),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(r||(r={}))},4096:(e,t,n)=>{"use strict";n.r(t)},26845:(e,t,n)=>{"use strict";n.r(t)},31828:(e,t,n)=>{"use strict";n.r(t)},7750:(e,t,n)=>{"use strict";n.r(t)},84482:(e,t,n)=>{"use strict";n.r(t),n(26845),n(31828),n(7750),n(37237)},37237:(e,t,n)=>{"use strict";n.r(t)},23911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlgorithmId:()=>a.AlgorithmId,EndpointURLScheme:()=>i.EndpointURLScheme,FieldPosition:()=>o.FieldPosition,HttpApiKeyAuthLocation:()=>r.HttpApiKeyAuthLocation,HttpAuthLocation:()=>r.HttpAuthLocation,IniSectionType:()=>l.IniSectionType,RequestHandlerProtocol:()=>u.RequestHandlerProtocol,SMITHY_CONTEXT_KEY:()=>s.SMITHY_CONTEXT_KEY,getDefaultClientConfiguration:()=>a.getDefaultClientConfiguration,resolveDefaultRuntimeConfig:()=>a.resolveDefaultRuntimeConfig}),n(40361);var r=n(79638),i=(n(1386),n(67932),n(26304),n(27382),n(8468),n(42017),n(43585),n(9134)),a=(n(40462),n(75675),n(72938)),o=(n(29138),n(12739)),s=(n(4096),n(84482),n(28607),n(7267)),l=(n(7867),n(25578)),u=(n(47168),n(24105),n(31722),n(8489),n(88321),n(34755),n(7773),n(3265),n(29424),n(92236));n(46001),n(73072),n(1987),n(88561),n(78119),n(19057)},28607:(e,t,n)=>{"use strict";n.r(t)},7267:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SMITHY_CONTEXT_KEY:()=>r});const r="__smithy_context"},7867:(e,t,n)=>{"use strict";n.r(t)},25578:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{IniSectionType:()=>r}),function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(r||(r={}))},47168:(e,t,n)=>{"use strict";n.r(t)},24105:(e,t,n)=>{"use strict";n.r(t)},31722:(e,t,n)=>{"use strict";n.r(t)},8489:(e,t,n)=>{"use strict";n.r(t)},88321:(e,t,n)=>{"use strict";n.r(t)},34755:(e,t,n)=>{"use strict";n.r(t)},7773:(e,t,n)=>{"use strict";n.r(t)},3265:(e,t,n)=>{"use strict";n.r(t)},29424:(e,t,n)=>{"use strict";n.r(t)},92236:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{RequestHandlerProtocol:()=>r}),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(r||(r={}))},46001:(e,t,n)=>{"use strict";n.r(t)},73072:(e,t,n)=>{"use strict";n.r(t)},1987:(e,t,n)=>{"use strict";n.r(t)},88561:(e,t,n)=>{"use strict";n.r(t)},78119:(e,t,n)=>{"use strict";n.r(t)},19057:(e,t,n)=>{"use strict";n.r(t)},18065:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseUrl:()=>i});var r=n(14757);const i=e=>{if("string"==typeof e)return i(new URL(e));const{hostname:t,pathname:n,port:a,protocol:o,search:s}=e;let l;return s&&(l=(0,r.parseQueryString)(s)),{hostname:t,port:a?parseInt(a):void 0,protocol:o,path:n,query:l}}},23193:(e,t,n)=>{"use strict";n.r(t),n.d(t,{alphabetByEncoding:()=>r,alphabetByValue:()=>i,bitsPerByte:()=>o,bitsPerLetter:()=>a,maxLetterValue:()=>s});const r={},i=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);r[n]=e,i[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),a=e+26;r[n]=a,i[a]=n}for(let e=0;e<10;e++){r[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;r[t]=n,i[n]=t}r["+"]=62,i[62]="+",r["/"]=63,i[63]="/";const a=6,o=8,s=63},88893:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromBase64:()=>i});var r=n(23193);const i=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),i=new DataView(n);for(let t=0;t>=r.bitsPerLetter;const o=t/4*3;n>>=a%r.bitsPerByte;const s=Math.floor(a/r.bitsPerByte);for(let e=0;e>t)}}return new Uint8Array(n)}},33470:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromBase64:()=>r.fromBase64,toBase64:()=>i.toBase64});var r=n(88893),i=n(19328)},19328:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toBase64:()=>a});var r=n(14246),i=n(23193);function a(e){let t;t="string"==typeof e?(0,r.fromUtf8)(e):e;const n="object"==typeof t&&"number"==typeof t.length,a="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!a)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let o="";for(let e=0;e>t]}o+="==".slice(0,4-a)}return o}},42117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{calculateBodyLength:()=>i});const r="function"==typeof TextEncoder?new TextEncoder:null,i=e=>{if("string"==typeof e){if(r)return r.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)}},25441:(e,t,n)=>{"use strict";n.r(t),n.d(t,{calculateBodyLength:()=>r.calculateBodyLength});var r=n(42117)},65938:(e,t,n)=>{"use strict";n.r(t),n.d(t,{booleanSelector:()=>r});const r=(e,t,n)=>{if(t in e){if("true"===e[t])return!0;if("false"===e[t])return!1;throw new Error(`Cannot load ${n} "${t}". Expected "true" or "false", got ${e[t]}.`)}}},20235:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SelectorType:()=>a.SelectorType,booleanSelector:()=>r.booleanSelector,numberSelector:()=>i.numberSelector});var r=n(65938),i=n(19663),a=n(63466)},19663:(e,t,n)=>{"use strict";n.r(t),n.d(t,{numberSelector:()=>r});const r=(e,t,n)=>{if(!(t in e))return;const r=parseInt(e[t],10);if(Number.isNaN(r))throw new TypeError(`Cannot load ${n} '${t}'. Expected number, got '${e[t]}'.`);return r}},63466:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{SelectorType:()=>r}),function(e){e.ENV="env",e.CONFIG="shared config entry"}(r||(r={}))},63401:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULTS_MODE_OPTIONS:()=>r});const r=["in-region","cross-region","mobile","standard","legacy"]},89124:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveDefaultsModeConfig:()=>r.resolveDefaultsModeConfig});var r=n(48695)},48695:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveDefaultsModeConfig:()=>s});var r=n(10223),i=n(46880),a=n.n(i),o=n(63401);const s=({defaultsMode:e}={})=>(0,r.memoize)((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(l()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${o.DEFAULTS_MODE_OPTIONS.join(", ")}, got ${t}`)}})),l=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?a().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t}},97461:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointCache:()=>r});class r{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}},27567:(e,t,n)=>{"use strict";n.r(t),n.d(t,{debugId:()=>r});const r="endpoints"},19105:(e,t,n)=>{"use strict";n.r(t),n.d(t,{debugId:()=>r.debugId,toDebugString:()=>i.toDebugString});var r=n(27567),i=n(84244)},84244:(e,t,n)=>{"use strict";function r(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${r(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(r).join(", ")})`:JSON.stringify(e,null,2)}n.r(t),n.d(t,{toDebugString:()=>r})},7069:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointCache:()=>r.EndpointCache,EndpointError:()=>l.EndpointError,customEndpointFunctions:()=>o.customEndpointFunctions,isIpAddress:()=>i.isIpAddress,isValidHostLabel:()=>a.isValidHostLabel,resolveEndpoint:()=>s.resolveEndpoint});var r=n(97461),i=n(81466),a=n(18883),o=n(70468),s=n(36704),l=n(97531)},46664:(e,t,n)=>{"use strict";n.r(t),n.d(t,{booleanEquals:()=>r});const r=(e,t)=>e===t},62786:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAttr:()=>a});var r=n(97531),i=n(6305);const a=(e,t)=>(0,i.getAttrPathList)(t).reduce(((n,i)=>{if("object"!=typeof n)throw new r.EndpointError(`Index '${i}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(i)]:n[i]}),e)},6305:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAttrPathList:()=>i});var r=n(97531);const i=e=>{const t=e.split("."),n=[];for(const i of t){const t=i.indexOf("[");if(-1!==t){if(i.indexOf("]")!==i.length-1)throw new r.EndpointError(`Path: '${e}' does not end with ']'`);const a=i.slice(t+1,-1);if(Number.isNaN(parseInt(a)))throw new r.EndpointError(`Invalid array index: '${a}' in path: '${e}'`);0!==t&&n.push(i.slice(0,t)),n.push(a)}else n.push(i)}return n}},13317:(e,t,n)=>{"use strict";n.r(t),n.d(t,{booleanEquals:()=>r.booleanEquals,getAttr:()=>i.getAttr,isSet:()=>a.isSet,isValidHostLabel:()=>o.isValidHostLabel,not:()=>s.not,parseURL:()=>l.parseURL,stringEquals:()=>u.stringEquals,substring:()=>c.substring,uriEncode:()=>d.uriEncode});var r=n(46664),i=n(62786),a=n(2829),o=n(18883),s=n(19568),l=n(96989),u=n(30773),c=n(74454),d=n(13141)},81466:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isIpAddress:()=>i});const r=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),i=e=>r.test(e)||e.startsWith("[")&&e.endsWith("]")},2829:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isSet:()=>r});const r=e=>null!=e},18883:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isValidHostLabel:()=>i});const r=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),i=(e,t=!1)=>{if(!t)return r.test(e);const n=e.split(".");for(const e of n)if(!i(e))return!1;return!0}},19568:(e,t,n)=>{"use strict";n.r(t),n.d(t,{not:()=>r});const r=e=>!e},96989:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseURL:()=>o});var r=n(23911),i=n(81466);const a={[r.EndpointURLScheme.HTTP]:80,[r.EndpointURLScheme.HTTPS]:443},o=e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:a={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(a).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:o,hostname:s,pathname:l,protocol:u,search:c}=t;if(c)return null;const d=u.slice(0,-1);if(!Object.values(r.EndpointURLScheme).includes(d))return null;const f=(0,i.isIpAddress)(s);return{scheme:d,authority:`${o}${n.includes(`${o}:${a[d]}`)||"string"==typeof e&&e.includes(`${o}:${a[d]}`)?`:${a[d]}`:""}`,path:l,normalizedPath:l.endsWith("/")?l:`${l}/`,isIp:f}}},30773:(e,t,n)=>{"use strict";n.r(t),n.d(t,{stringEquals:()=>r});const r=(e,t)=>e===t},74454:(e,t,n)=>{"use strict";n.r(t),n.d(t,{substring:()=>r});const r=(e,t,n,r)=>t>=n||e.length{"use strict";n.r(t),n.d(t,{uriEncode:()=>r});const r=e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},36704:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEndpoint:()=>o});var r=n(19105),i=n(97531),a=n(52479);const o=(e,t)=>{const{endpointParams:n,logger:o}=t,{parameters:s,rules:l}=e;t.logger?.debug?.(`${r.debugId} Initial EndpointParams: ${(0,r.toDebugString)(n)}`);const u=Object.entries(s).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(u.length>0)for(const[e,t]of u)n[e]=n[e]??t;const c=Object.entries(s).filter((([,e])=>e.required)).map((([e])=>e));for(const e of c)if(null==n[e])throw new i.EndpointError(`Missing required parameter: '${e}'`);const d=(0,a.evaluateRules)(l,{endpointParams:n,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${r.debugId} Resolved endpoint: ${(0,r.toDebugString)(d)}`),d}},70246:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointError:()=>r});class r extends Error{constructor(e){super(e),this.name="EndpointError"}}},85845:(e,t,n)=>{"use strict";n.r(t)},18195:(e,t,n)=>{"use strict";n.r(t)},85060:(e,t,n)=>{"use strict";n.r(t)},32534:(e,t,n)=>{"use strict";n.r(t)},27174:(e,t,n)=>{"use strict";n.r(t)},97531:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointError:()=>r.EndpointError});var r=n(70246);n(85845),n(18195),n(85060),n(32534),n(27174),n(63526)},63526:(e,t,n)=>{"use strict";n.r(t)},88307:(e,t,n)=>{"use strict";n.r(t),n.d(t,{callFunction:()=>o});var r=n(70468),i=n(49905),a=n(22226);const o=({fn:e,argv:t},n)=>{const o=t.map((e=>["boolean","number"].includes(typeof e)?e:(0,a.evaluateExpression)(e,"arg",n))),s=e.split(".");return s[0]in r.customEndpointFunctions&&null!=s[1]?r.customEndpointFunctions[s[0]][s[1]](...o):i.endpointFunctions[e](...o)}},70468:(e,t,n)=>{"use strict";n.r(t),n.d(t,{customEndpointFunctions:()=>r});const r={}},49905:(e,t,n)=>{"use strict";n.r(t),n.d(t,{endpointFunctions:()=>i});var r=n(13317);const i={booleanEquals:r.booleanEquals,getAttr:r.getAttr,isSet:r.isSet,isValidHostLabel:r.isValidHostLabel,not:r.not,parseURL:r.parseURL,stringEquals:r.stringEquals,substring:r.substring,uriEncode:r.uriEncode}},62183:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateCondition:()=>o});var r=n(19105),i=n(97531),a=n(88307);const o=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new i.EndpointError(`'${e}' is already defined in Reference Record.`);const o=(0,a.callFunction)(t,n);return n.logger?.debug?.(`${r.debugId} evaluateCondition: ${(0,r.toDebugString)(t)} = ${(0,r.toDebugString)(o)}`),{result:""===o||!!o,...null!=e&&{toAssign:{name:e,value:o}}}}},20082:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateConditions:()=>a});var r=n(19105),i=n(62183);const a=(e=[],t)=>{const n={};for(const a of e){const{result:e,toAssign:o}=(0,i.evaluateCondition)(a,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};o&&(n[o.name]=o.value,t.logger?.debug?.(`${r.debugId} assign: ${o.name} := ${(0,r.toDebugString)(o.value)}`))}return{result:!0,referenceRecord:n}}},16075:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateEndpointRule:()=>l});var r=n(19105),i=n(20082),a=n(11398),o=n(67911),s=n(99981);const l=(e,t)=>{const{conditions:n,endpoint:l}=e,{result:u,referenceRecord:c}=(0,i.evaluateConditions)(n,t);if(!u)return;const d={...t,referenceRecord:{...t.referenceRecord,...c}},{url:f,properties:p,headers:h}=l;return t.logger?.debug?.(`${r.debugId} Resolving endpoint from template: ${(0,r.toDebugString)(l)}`),{...null!=h&&{headers:(0,a.getEndpointHeaders)(h,d)},...null!=p&&{properties:(0,o.getEndpointProperties)(p,d)},url:(0,s.getEndpointUrl)(f,d)}}},88562:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateErrorRule:()=>o});var r=n(97531),i=n(20082),a=n(22226);const o=(e,t)=>{const{conditions:n,error:o}=e,{result:s,referenceRecord:l}=(0,i.evaluateConditions)(n,t);if(s)throw new r.EndpointError((0,a.evaluateExpression)(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...l}}))}},22226:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateExpression:()=>s});var r=n(97531),i=n(88307),a=n(27206),o=n(29445);const s=(e,t,n)=>{if("string"==typeof e)return(0,a.evaluateTemplate)(e,n);if(e.fn)return(0,i.callFunction)(e,n);if(e.ref)return(0,o.getReferenceValue)(e,n);throw new r.EndpointError(`'${t}': ${String(e)} is not a string, function or reference.`)}},78985:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateRules:()=>s});var r=n(97531),i=n(16075),a=n(88562),o=n(67414);const s=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=(0,i.evaluateEndpointRule)(n,t);if(e)return e}else if("error"===n.type)(0,a.evaluateErrorRule)(n,t);else{if("tree"!==n.type)throw new r.EndpointError(`Unknown endpoint rule: ${n}`);{const e=(0,o.evaluateTreeRule)(n,t);if(e)return e}}throw new r.EndpointError("Rules evaluation failed")}},27206:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateTemplate:()=>i});var r=n(13317);const i=(e,t)=>{const n=[],i={...t.endpointParams,...t.referenceRecord};let a=0;for(;a{"use strict";n.r(t),n.d(t,{evaluateTreeRule:()=>a});var r=n(20082),i=n(78985);const a=(e,t)=>{const{conditions:n,rules:a}=e,{result:o,referenceRecord:s}=(0,r.evaluateConditions)(n,t);if(o)return(0,i.evaluateRules)(a,{...t,referenceRecord:{...t.referenceRecord,...s}})}},11398:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointHeaders:()=>a});var r=n(97531),i=n(22226);const a=(e,t)=>Object.entries(e).reduce(((e,[n,a])=>({...e,[n]:a.map((e=>{const a=(0,i.evaluateExpression)(e,"Header value entry",t);if("string"!=typeof a)throw new r.EndpointError(`Header '${n}' value '${a}' is not a string`);return a}))})),{})},67911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointProperties:()=>i});var r=n(63355);const i=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:(0,r.getEndpointProperty)(i,t)})),{})},63355:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointProperty:()=>o});var r=n(97531),i=n(27206),a=n(67911);const o=(e,t)=>{if(Array.isArray(e))return e.map((e=>o(e,t)));switch(typeof e){case"string":return(0,i.evaluateTemplate)(e,t);case"object":if(null===e)throw new r.EndpointError(`Unexpected endpoint property: ${e}`);return(0,a.getEndpointProperties)(e,t);case"boolean":return e;default:throw new r.EndpointError("Unexpected endpoint property type: "+typeof e)}}},99981:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointUrl:()=>a});var r=n(97531),i=n(22226);const a=(e,t)=>{const n=(0,i.evaluateExpression)(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new r.EndpointError("Endpoint URL must be a string, got "+typeof n)}},29445:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getReferenceValue:()=>r});const r=({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e])},52479:(e,t,n)=>{"use strict";n.r(t),n.d(t,{customEndpointFunctions:()=>r.customEndpointFunctions,evaluateRules:()=>i.evaluateRules});var r=n(70468),i=n(78985)},68004:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromHex:()=>a,toHex:()=>o});const r={},i={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),r[e]=t,i[t]=e}function a(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n{"use strict";n.r(t),n.d(t,{getSmithyContext:()=>i});var r=n(23911);const i=e=>e[r.SMITHY_CONTEXT_KEY]||(e[r.SMITHY_CONTEXT_KEY]={})},40805:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSmithyContext:()=>r.getSmithyContext,normalizeProvider:()=>i.normalizeProvider});var r=n(26116),i=n(28947)},28947:(e,t,n)=>{"use strict";n.r(t),n.d(t,{normalizeProvider:()=>r});const r=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t}},18892:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AdaptiveRetryStrategy:()=>o});var r=n(17355),i=n(2816),a=n(16281);class o{constructor(e,t){this.maxAttemptsProvider=e,this.mode=r.RETRY_MODES.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new i.DefaultRateLimiter,this.standardRetryStrategy=new a.StandardRetryStrategy(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}},39366:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ConfiguredRetryStrategy:()=>a});var r=n(77072),i=n(16281);class a extends i.StandardRetryStrategy{constructor(e,t=r.DEFAULT_RETRY_DELAY_BASE){super("function"==typeof e?e:async()=>e),this.computeNextBackoffDelay="number"==typeof t?()=>t:t}async refreshRetryTokenForRetry(e,t){const n=await super.refreshRetryTokenForRetry(e,t);return n.getRetryDelay=()=>this.computeNextBackoffDelay(n.getRetryCount()),n}}},2816:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultRateLimiter:()=>i});var r=n(42653);class i{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),(0,r.isThrottlingError)(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}},16281:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StandardRetryStrategy:()=>s});var r=n(17355),i=n(77072),a=n(73467),o=n(651);class s{constructor(e){this.maxAttempts=e,this.mode=r.RETRY_MODES.STANDARD,this.capacity=i.INITIAL_RETRY_TOKENS,this.retryBackoffStrategy=(0,a.getDefaultRetryBackoffStrategy)(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return(0,o.createDefaultRetryToken)({retryDelay:i.DEFAULT_RETRY_DELAY_BASE,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?i.THROTTLING_RETRY_DELAY_BASE:i.DEFAULT_RETRY_DELAY_BASE);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),a=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,(0,o.createDefaultRetryToken)({retryDelay:a,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(i.INITIAL_RETRY_TOKENS,this.capacity+(e.getRetryCost()??i.NO_RETRY_INCREMENT))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${r.DEFAULT_MAX_ATTEMPTS}`),r.DEFAULT_MAX_ATTEMPTS}}shouldRetry(e,t,n){return e.getRetryCount()+1=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?i.TIMEOUT_RETRY_COST:i.RETRY_COST}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}},17355:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{DEFAULT_MAX_ATTEMPTS:()=>i,DEFAULT_RETRY_MODE:()=>a,RETRY_MODES:()=>r}),function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(r||(r={}));const i=3,a=r.STANDARD},77072:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_RETRY_DELAY_BASE:()=>r,INITIAL_RETRY_TOKENS:()=>o,INVOCATION_ID_HEADER:()=>c,MAXIMUM_RETRY_DELAY:()=>i,NO_RETRY_INCREMENT:()=>u,REQUEST_HEADER:()=>d,RETRY_COST:()=>s,THROTTLING_RETRY_DELAY_BASE:()=>a,TIMEOUT_RETRY_COST:()=>l});const r=100,i=2e4,a=500,o=500,s=5,l=10,u=1,c="amz-sdk-invocation-id",d="amz-sdk-request"},73467:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDefaultRetryBackoffStrategy:()=>i});var r=n(77072);const i=()=>{let e=r.DEFAULT_RETRY_DELAY_BASE;return{computeNextBackoffDelay:t=>Math.floor(Math.min(r.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}}},651:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createDefaultRetryToken:()=>i});var r=n(77072);const i=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(r.MAXIMUM_RETRY_DELAY,e),getRetryCost:()=>n})},56265:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AdaptiveRetryStrategy:()=>r.AdaptiveRetryStrategy,ConfiguredRetryStrategy:()=>i.ConfiguredRetryStrategy,DEFAULT_MAX_ATTEMPTS:()=>s.DEFAULT_MAX_ATTEMPTS,DEFAULT_RETRY_DELAY_BASE:()=>l.DEFAULT_RETRY_DELAY_BASE,DEFAULT_RETRY_MODE:()=>s.DEFAULT_RETRY_MODE,DefaultRateLimiter:()=>a.DefaultRateLimiter,INITIAL_RETRY_TOKENS:()=>l.INITIAL_RETRY_TOKENS,INVOCATION_ID_HEADER:()=>l.INVOCATION_ID_HEADER,MAXIMUM_RETRY_DELAY:()=>l.MAXIMUM_RETRY_DELAY,NO_RETRY_INCREMENT:()=>l.NO_RETRY_INCREMENT,REQUEST_HEADER:()=>l.REQUEST_HEADER,RETRY_COST:()=>l.RETRY_COST,RETRY_MODES:()=>s.RETRY_MODES,StandardRetryStrategy:()=>o.StandardRetryStrategy,THROTTLING_RETRY_DELAY_BASE:()=>l.THROTTLING_RETRY_DELAY_BASE,TIMEOUT_RETRY_COST:()=>l.TIMEOUT_RETRY_COST});var r=n(18892),i=n(39366),a=n(2816),o=n(16281),s=n(17355),l=n(77072);n(87128)},87128:(e,t,n)=>{"use strict";n.r(t)},36444:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Uint8ArrayBlobAdapter:()=>i});var r=n(84068);class i extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return(0,r.transformFromString)(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,i.prototype),e}transformToString(e="utf-8"){return(0,r.transformToString)(this,e)}}},84068:(e,t,n)=>{"use strict";n.r(t),n.d(t,{transformFromString:()=>s,transformToString:()=>o});var r=n(33470),i=n(14246),a=n(36444);function o(e,t="utf-8"){return"base64"===t?(0,r.toBase64)(e):(0,i.toUtf8)(e)}function s(e,t){return"base64"===t?a.Uint8ArrayBlobAdapter.mutate((0,r.fromBase64)(e)):a.Uint8ArrayBlobAdapter.mutate((0,i.fromUtf8)(e))}},44312:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ChecksumStream:()=>i});const r="function"==typeof ReadableStream?ReadableStream:function(){};class i extends r{}},48188:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createChecksumStream:()=>o});var r=n(33470),i=n(55163),a=n(44312);const o=({expectedChecksum:e,checksum:t,source:n,checksumSourceLocation:o,base64Encoder:s})=>{if(!(0,i.isReadableStream)(n))throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`);const l=s??r.toBase64;if("function"!=typeof TransformStream)throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const u=new TransformStream({start(){},async transform(e,n){t.update(e),n.enqueue(e)},async flush(n){const r=await t.digest(),i=l(r);if(e!==i){const t=new Error(`Checksum mismatch: expected "${e}" but received "${i}" in response header "${o}".`);n.error(t)}else n.terminate()}});n.pipeThrough(u);const c=u.readable;return Object.setPrototypeOf(c,a.ChecksumStream.prototype),c}},41125:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAwsChunkedEncodingStream:()=>r});const r=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:i,checksumLocationName:a,streamHasher:o}=t,s=void 0!==n&&void 0!==r&&void 0!==i&&void 0!==a&&void 0!==o,l=s?o(i,e):void 0,u=e.getReader();return new ReadableStream({async pull(e){const{value:t,done:i}=await u.read();if(i){if(e.enqueue("0\r\n"),s){const t=n(await l);e.enqueue(`${a}:${t}\r\n`),e.enqueue("\r\n")}e.close()}else e.enqueue(`${(r(t)||0).toString(16)}\r\n${t}\r\n`)}})}},7769:(e,t,n)=>{"use strict";async function r(e,t){let n=0;const r=[],i=e.getReader();let a=!1;for(;!a;){const{done:e,value:o}=await i.read();if(o&&(r.push(o),n+=o?.byteLength??0),n>=t)break;a=e}i.releaseLock();const o=new Uint8Array(Math.min(t,n));let s=0;for(const e of r){if(e.byteLength>o.byteLength-s){o.set(e.subarray(0,o.byteLength-s),s);break}o.set(e,s),s+=e.length}return o}n.r(t),n.d(t,{headStream:()=>r})},42357:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ChecksumStream:()=>c.ChecksumStream,Uint8ArrayBlobAdapter:()=>r.Uint8ArrayBlobAdapter,createChecksumStream:()=>u.createChecksumStream,getAwsChunkedEncodingStream:()=>i.getAwsChunkedEncodingStream,headStream:()=>s.headStream,isReadableStream:()=>l.isReadableStream,sdkStreamMixin:()=>a.sdkStreamMixin,splitStream:()=>o.splitStream});var r=n(36444),i=n(41125),a=n(23880),o=n(67231),s=n(7769),l=n(55163),u=n(48188),c=n(44312)},23880:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sdkStreamMixin:()=>u});var r=n(61664),i=n(33470),a=n(68004),o=n(14246),s=n(55163);const l="The stream has already been transformed.",u=e=>{if(!c(e)&&!(0,s.isReadableStream)(e))throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`);let t=!1;const n=async()=>{if(t)throw new Error(l);return t=!0,await(0,r.streamCollector)(e)};return Object.assign(e,{transformToByteArray:n,transformToString:async e=>{const t=await n();if("base64"===e)return(0,i.toBase64)(t);if("hex"===e)return(0,a.toHex)(t);if(void 0===e||"utf8"===e||"utf-8"===e)return(0,o.toUtf8)(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(l);if(t=!0,c(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if((0,s.isReadableStream)(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},c=e=>"function"==typeof Blob&&e instanceof Blob},67231:(e,t,n)=>{"use strict";async function r(e){return"function"==typeof e.stream&&(e=e.stream()),e.tee()}n.r(t),n.d(t,{splitStream:()=>r})},55163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isReadableStream:()=>r});const r=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream)},34915:(e,t,n)=>{"use strict";n.r(t),n.d(t,{escapeUriPath:()=>i});var r=n(72531);const i=e=>e.split("/").map(r.escapeUri).join("/")},72531:(e,t,n)=>{"use strict";n.r(t),n.d(t,{escapeUri:()=>r});const r=e=>encodeURIComponent(e).replace(/[!'()*]/g,i),i=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`},78611:(e,t,n)=>{"use strict";n.r(t),n.d(t,{escapeUri:()=>r.escapeUri,escapeUriPath:()=>i.escapeUriPath});var r=n(72531),i=n(34915)},42637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromUtf8:()=>r});const r=e=>(new TextEncoder).encode(e)},14246:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromUtf8:()=>r.fromUtf8,toUint8Array:()=>i.toUint8Array,toUtf8:()=>a.toUtf8});var r=n(42637),i=n(74424),a=n(65792)},74424:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toUint8Array:()=>i});var r=n(42637);const i=e=>"string"==typeof e?(0,r.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)},65792:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toUtf8:()=>r});const r=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)}},67526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=s(e),o=a[0],l=a[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,l)),c=0,d=l>0?o-4:o;for(n=0;n>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,u=r-i;su?u:s+o));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,a,o=[],s=t;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},46880:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,l=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=o-Math.min(i,a)),o-=1;o>=s;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===s)return 0;o-=1}else if(l[0][o]1?i-1:0),o=1;o0){var o=Object.keys(n),l=s.default.find(o,(function(e){return t.isOS(e)}));if(l){var u=this.satisfies(n[l]);if(void 0!==u)return u}var c=s.default.find(o,(function(e){return t.isPlatform(e)}));if(c){var d=this.satisfies(n[c]);if(void 0!==d)return d}}if(a>0){var f=Object.keys(i),p=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:a.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:a.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:a.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},48287:(e,t,n)=>{"use strict";const r=n(67526),i=n(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let r=s(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|h(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?s(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return c(e),s(e<0?0:0|h(e))}function f(e){const t=e.length<0?0:0|h(e.length),n=s(t);for(let r=0;r=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let r=-1;for(a=n;as&&(n=s-l),a=n;a>=0;a--){let n=!0;for(let r=0;ri&&(r=i):r=i;const a=t.length;let o;for(r>a/2&&(r=a/2),o=0;o>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(a=l));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=o}return function(e){const t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(X(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0);const s=Math.min(a,o),u=this.slice(r,i),c=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let a=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function k(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;ir)&&(n=r);let i="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,n,r,i,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function P(e,t,n,r,i){q(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function M(e,t,n,r,i){q(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function I(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function $(e,t,n,r,a){return t=+t,n>>>=0,a||I(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,a){return t=+t,n>>>=0,a||I(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q((function(e){j(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,a=0;for(;++a=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q((function(e){j(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||N(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||F(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,a=0;for(this[t]=255&e;++a>>=0,n>>>=0,r||F(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Q((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Q((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);F(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=255&e;++i>>=0,!r){const r=Math.pow(2,8*n-1);F(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Q((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Q((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return $(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return $(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function q(e,t,n,r,i,a){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(a+1)}${r}`:`>= -(2${r} ** ${8*(a+1)-1}${r}) and < 2 ** ${8*(a+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){j(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,a)}function j(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw j(e,n),new B.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=z(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const a=[];for(let o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function W(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},86454:(e,t,n)=>{"use strict";const r=n(43918),i=n(32923),a=n(8904);e.exports={XMLParser:i,XMLValidator:r,XMLBuilder:a}},35334:(e,t)=>{"use strict";const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+r+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let a=0;a{"use strict";const r=n(35334),i={allowBooleanAttributes:!1,unpairedTags:[]};function a(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function o(e,t){const n=t;for(;t5&&"xml"===r)return h("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},i,t);const n=[];let l=!1,u=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)v+=e[i];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),i--),d=v,!r.isName(d)){let t;return t=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",h("InvalidTag",t,m(e,i))}const b=c(e,i);if(!1===b)return h("InvalidAttr","Attributes for '"+v+"' have open quote.",m(e,i));let w=b.value;if(i=b.index,"/"===w[w.length-1]){const n=i-w.length;w=w.substring(0,w.length-1);const r=f(w,t);if(!0!==r)return h(r.err.code,r.err.msg,m(e,n+r.err.line));l=!0}else if(y){if(!b.tagClosed)return h("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",m(e,i));if(w.trim().length>0)return h("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",m(e,g));if(0===n.length)return h("InvalidTag","Closing tag '"+v+"' has not been opened.",m(e,g));{const t=n.pop();if(v!==t.tagName){let n=m(e,t.tagStartPos);return h("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+v+"'.",m(e,g))}0==n.length&&(u=!0)}}else{const r=f(w,t);if(!0!==r)return h(r.err.code,r.err.msg,m(e,i-w.length+r.err.line));if(!0===u)return h("InvalidXml","Multiple possible root nodes found.",m(e,i));-1!==t.unpairedTags.indexOf(v)||n.push({tagName:v,tagStartPos:g}),l=!0}for(i++;i0)||h("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};const l='"',u="'";function c(e,t){let n="",r="",i=!1;for(;t"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function f(e,t){const n=r.getAllMatches(e,d),i={};for(let e=0;e{"use strict";const r=n(12788),i={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function a(e){this.options=Object.assign({},i,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=o,this.options.format?(this.indentate=s,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function o(e,t,n){const r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjectNode(r.val,t,r.attrStr,n)}function s(e){return this.options.indentBy.repeat(e)}function l(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}a.prototype.build=function(e){return this.options.preserveOrder?r(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},a.prototype.j2x=function(e,t){let n="",r="";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i))if(void 0===e[i])this.isAttribute(i)&&(r+="");else if(null===e[i])this.isAttribute(i)?r+="":"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)r+=this.buildTextValNode(e[i],i,"",t);else if("object"!=typeof e[i]){const a=this.isAttribute(i);if(a)n+=this.buildAttrPairStr(a,""+e[i]);else if(i===this.options.textNodeName){let t=this.options.tagValueProcessor(i,""+e[i]);r+=this.replaceEntitiesValue(t)}else r+=this.buildTextValNode(e[i],i,"",t)}else if(Array.isArray(e[i])){const n=e[i].length;let a="",o="";for(let s=0;s"+e+i}},a.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"0&&this.options.processEntities)for(let t=0;t{function t(e,o,s,l){let u="",c=!1;for(let d=0;d`,c=!1;continue}if(p===o.commentPropName){u+=l+`\x3c!--${f[p][0][o.textNodeName]}--\x3e`,c=!0;continue}if("?"===p[0]){const e=r(f[":@"],o),t="?xml"===p?"":l;let n=f[p][0][o.textNodeName];n=0!==n.length?" "+n:"",u+=t+`<${p}${n}${e}?>`,c=!0;continue}let g=l;""!==g&&(g+=o.indentBy);const m=l+`<${p}${r(f[":@"],o)}`,y=t(f[p],o,h,g);-1!==o.unpairedTags.indexOf(p)?o.suppressUnpairedNode?u+=m+">":u+=m+"/>":y&&0!==y.length||!o.suppressEmptyNode?y&&y.endsWith(">")?u+=m+`>${y}${l}`:(u+=m+">",y&&""!==l&&(y.includes("/>")||y.includes("`):u+=m+"/>",c=!0}return u}function n(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(r="\n"),t(e,n,"",r)}},9400:(e,t,n)=>{const r=n(35334);function i(e,t){let n="";for(;t"===e[t]){if(f?"-"===e[t-1]&&"-"===e[t-2]&&(f=!1,r--):r--,0===r)break}else"["===e[t]?d=!0:p+=e[t];else{if(d&&o(e,t))t+=7,[entityName,val,t]=i(e,t+1),-1===val.indexOf("&")&&(n[c(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(d&&s(e,t))t+=8;else if(d&&l(e,t))t+=8;else if(d&&u(e,t))t+=9;else{if(!a)throw new Error("Invalid DOCTYPE");f=!0}r++,p=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}}},50460:(e,t)=>{const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};t.buildOptions=function(e){return Object.assign({},n,e)},t.defaultOptions=n},17680:(e,t,n)=>{"use strict";const r=n(35334),i=n(23832),a=n(9400),o=n(17983);function s(e){const t=Object.keys(e);for(let n=0;n0)){o||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,a);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?w(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const c=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=r.getAllMatches(e,c),i=n.length,a={};for(let e=0;e",s,"Closing Tag is not closed.");let i=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,o));const a=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=o.lastIndexOf("."),o=o.substring(0,l),n=this.tagsNodeStack.pop(),r="",s=t}else if("?"===e[s+1]){let t=v(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new i(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o,t.tagName)),this.addChild(n,e,o)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=y(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=t}else if("!D"===e.substr(s+1,2)){const t=a(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=y(e,"]]>",s,"CDATA is not closed.")-2,i=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,o);let a=this.parseTextData(i,n.tagname,o,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,a),s=t+2}else{let a=v(e,s,this.options.removeNSPrefix),l=a.tagName;const u=a.rawTagName;let c=a.tagExp,d=a.attrExpPresent,f=a.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,o,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),l!==t.tagname&&(o+=o?"."+l:l),this.isItStopNode(this.options.stopNodes,o,l)){let t="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),c=l):c=c.substr(0,c.length-1),s=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))s=a.closeIndex;else{const n=this.readStopNodeData(e,u,f+1);if(!n)throw new Error(`Unexpected end of ${u}`);s=n.i,t=n.tagContent}const r=new i(l);l!==c&&d&&(r[":@"]=this.buildAttributesMap(c,o,l)),t&&(t=this.parseTextData(t,l,o,!0,d,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,o)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),c=l):c=c.substr(0,c.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const e=new i(l);l!==c&&d&&(e[":@"]=this.buildAttributesMap(c,o,l)),this.addChild(n,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new i(l);this.tagsNodeStack.push(n),l!==c&&d&&(e[":@"]=this.buildAttributesMap(c,o,l)),this.addChild(n,e,o),n=e}r="",s=f}}else r+=e[s];return t.child};function p(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r?(t.tagname=r,e.addChild(t)):e.addChild(t))}const h=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function g(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function m(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function y(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function v(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let a=t;a",n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:a};n=a}else if("?"===e[n+1])n=y(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=y(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=y(e,"]]>",n,"StopNode is not closed.")-2;else{const r=v(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function w(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&o(e,n)}return r.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"Â¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=s,this.parseXml=f,this.parseTextData=l,this.resolveNameSpace=u,this.buildAttributesMap=d,this.isItStopNode=m,this.replaceEntitiesValue=h,this.readStopNodeData=b,this.saveTextToParentTag=g,this.addChild=p}}},32923:(e,t,n)=>{const{buildOptions:r}=n(50460),i=n(17680),{prettify:a}=n(75629),o=n(43918);e.exports=class{constructor(e){this.externalEntities={},this.options=r(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=o.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:a(r,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},75629:(e,t)=>{"use strict";function n(e,t,o){let s;const l={};for(let u=0;u0&&(l[t.textNodeName]=s):void 0!==s&&(l[t.textNodeName]=s),l}function r(e){const t=Object.keys(e);for(let e=0;e{"use strict";e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},251:(e,t)=>{t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+d],d+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),a-=u}return(p?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&s,p+=h,s/=256,i-=8);for(o=o<0;e[n+p]=255&o,p+=h,o/=256,u-=8);e[n+p-h]|=128*g}},65606:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var s,l=[],u=!1,c=-1;function d(){u&&s&&(u=!1,s.length?l=s.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=o(d);u=!0;for(var t=l.length;t;){for(s=l,l=[];++c1)for(var n=1;n{const t=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,i={}){if(i=Object.assign({},r,i),!e||"string"!=typeof e)return e;let a=e.trim();if(void 0!==i.skipLike&&i.skipLike.test(a))return e;if(i.hex&&t.test(a))return Number.parseInt(a,16);{const t=n.exec(a);if(t){const n=t[1],r=t[2];let s=(o=t[3])&&-1!==o.indexOf(".")?("."===(o=o.replace(/0+$/,""))?o="0":"."===o[0]?o="0"+o:"."===o[o.length-1]&&(o=o.substr(0,o.length-1)),o):o;const l=t[4]||t[6];if(!i.leadingZeros&&r.length>0&&n&&"."!==a[2])return e;if(!i.leadingZeros&&r.length>0&&!n&&"."!==a[1])return e;{const t=Number(a),o=""+t;return-1!==o.search(/[eE]/)||l?i.eNotation?t:e:-1!==a.indexOf(".")?"0"===o&&""===s||o===s||n&&o==="-"+s?t:e:r?s===o||n+s===o?t:e:a===o||a===n+o?t:e}}return e}var o}},84729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(51636);function i(e){var t,n=(0,r.default)(e.transform),i=1/0,a=i,o=-i,s=-i;function l(e){(e=n(e))[0]o&&(o=e[0]),e[1]s&&(s=e[1])}function u(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(u);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,r=-1,l=e.length;++ro&&(o=t[0]),t[1]s&&(s=t[1])})),e.objects)u(e.objects[t]);return[i,a,o,s]}},78200:(e,t,n)=>{"use strict";function r(e,t){for(var n=0,r=e.length;n>>1;e[i]r})},80658:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,object:()=>s});var r=n(35258),i=n(51636);function a(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return o(e,t)}))}:o(e,t)}function o(e,t){var n=t.id,r=t.bbox,i=null==t.properties?{}:t.properties,a=s(e,t);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function s(e,t){var n=(0,i.default)(e.transform),a=e.arcs;function o(e,t){t.length&&t.pop();for(var i=a[e<0?~e:e],o=0,s=i.length;o{"use strict";function r(e){return e}n.r(t),n.d(t,{default:()=>r})},12196:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bbox:()=>r.default,feature:()=>i.default,merge:()=>o.default,mergeArcs:()=>o.mergeArcs,mesh:()=>a.default,meshArcs:()=>a.meshArcs,neighbors:()=>s.default,quantize:()=>l.default,transform:()=>u.default,untransform:()=>c.default});var r=n(84729),i=n(80658),a=n(35623),o=n(92264),s=n(76747),l=n(10157),u=n(51636),c=n(56953)},92264:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,mergeArcs:()=>o});var r=n(80658),i=n(59391);function a(e){return(0,r.object)(e,o.apply(this,arguments))}function o(e,t){var n={},a=[],o=[];function s(e){e.forEach((function(t){t.forEach((function(t){(n[t=t<0?~t:t]||(n[t]=[])).push(e)}))})),a.push(e)}function l(t){return function(e){for(var t,n=-1,r=e.length,i=e[r-1],a=0;++n1)for(var o,s,u=1,c=l(a[0]);uc&&(s=a[0],a[0]=a[u],a[u]=s,c=o);return a})).filter((function(e){return e.length>0}))}}},35623:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,meshArcs:()=>o});var r=n(80658),i=n(59391);function a(e){return(0,r.object)(e,o.apply(this,arguments))}function o(e,t,n){var r,a,o;if(arguments.length>1)r=function(e,t,n){var r,i=[],a=[];function o(e){var t=e<0?~e:e;(a[t]||(a[t]=[])).push({i:e,g:r})}function s(e){e.forEach(o)}function l(e){e.forEach(s)}return function e(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(l)}(t.arcs)}}(t),a.forEach(null==n?function(e){i.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}(0,t,n);else for(a=0,r=new Array(o=e.arcs.length);a{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(78200);function i(e){var t={},n=e.map((function(){return[]}));function i(e,n){e.forEach((function(e){e<0&&(e=~e);var r=t[e];r?r.push(n):t[e]=[n]}))}function a(e,t){e.forEach((function(e){i(e,t)}))}var o={LineString:i,MultiLineString:a,Polygon:a,MultiPolygon:function(e,t){e.forEach((function(e){a(e,t)}))}};for(var s in e.forEach((function e(t,n){"GeometryCollection"===t.type?t.geometries.forEach((function(t){e(t,n)})):t.type in o&&o[t.type](t.arcs,n)})),t)for(var l=t[s],u=l.length,c=0;c{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(84729),i=n(56953);function a(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)u=e.bbox;else{if(!((n=Math.floor(t))>=2))throw new Error("n must be ≥2");var n,a=(u=e.bbox||(0,r.default)(e))[0],o=u[1],s=u[2],l=u[3];t={scale:[s-a?(s-a)/(n-1):1,l-o?(l-o)/(n-1):1],translate:[a,o]}}var u,c,d=(0,i.default)(t),f=e.objects,p={};function h(e){return d(e)}function g(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(g)};break;case"Point":t={type:"Point",coordinates:h(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(h)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(c in f)p[c]=g(f[c]);return{type:"Topology",bbox:u,transform:t,objects:p,arcs:e.arcs.map((function(e){var t,n=0,r=1,i=e.length,a=new Array(i);for(a[0]=d(e[0],0);++n{"use strict";function r(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}n.r(t),n.d(t,{default:()=>r})},59391:(e,t,n)=>{"use strict";function r(e,t){var n={},r={},i={},a=[],o=-1;function s(e,t){for(var r in e){var i=e[r];delete t[i.start],delete i.start,delete i.end,i.forEach((function(e){n[e<0?~e:e]=1})),a.push(i)}}return t.forEach((function(n,r){var i,a=e.arcs[n<0?~n:n];a.length<3&&!a[1][0]&&!a[1][1]&&(i=t[++o],t[o]=n,t[r]=i)})),t.forEach((function(t){var n,a,o=function(t){var n,r=e.arcs[t<0?~t:t],i=r[0];return e.transform?(n=[0,0],r.forEach((function(e){n[0]+=e[0],n[1]+=e[1]}))):n=r[r.length-1],t<0?[n,i]:[i,n]}(t),s=o[0],l=o[1];if(n=i[s])if(delete i[n.end],n.push(t),n.end=l,a=r[l]){delete r[a.start];var u=a===n?n:n.concat(a);r[u.start=n.start]=i[u.end=a.end]=u}else r[n.start]=i[n.end]=n;else if(n=r[l])if(delete r[n.start],n.unshift(t),n.start=s,a=i[s]){delete i[a.end];var c=a===n?n:a.concat(n);r[c.start=a.start]=i[c.end=n.end]=c}else r[n.start]=i[n.end]=n;else r[(n=[t]).start=s]=i[n.end=l]=n})),s(i,r),s(r,i),t.forEach((function(e){n[e<0?~e:e]||a.push([e])})),a}n.r(t),n.d(t,{default:()=>r})},51636:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(94644);function i(e){if(null==e)return r.default;var t,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],s=e.translate[1];return function(e,r){r||(t=n=0);var l=2,u=e.length,c=new Array(u);for(c[0]=(t+=e[0])*i+o,c[1]=(n+=e[1])*a+s;l{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(94644);function i(e){if(null==e)return r.default;var t,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],s=e.translate[1];return function(e,r){r||(t=n=0);var l=2,u=e.length,c=new Array(u),d=Math.round((e[0]-o)/i),f=Math.round((e[1]-s)/a);for(c[0]=d-t,t=d,c[1]=f-n,n=f;l{"use strict";n.r(t),n.d(t,{NIL:()=>s.default,parse:()=>d.default,stringify:()=>c.default,v1:()=>r.default,v3:()=>i.default,v4:()=>a.default,v5:()=>o.default,validate:()=>u.default,version:()=>l.default});var r=n(47661),i=n(4523),a=n(18562),o=n(86449),s=n(62805),l=n(69870),u=n(66382),c=n(38823),d=n(78537)},90278:(e,t,n)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function i(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t,n,r,a,o){return i((s=i(i(t,e),i(r,o)))<<(l=a)|s>>>32-l,n);var s,l}function o(e,t,n,r,i,o,s){return a(t&n|~t&r,e,t,i,o,s)}function s(e,t,n,r,i,o,s){return a(t&r|n&~r,e,t,i,o,s)}function l(e,t,n,r,i,o,s){return a(t^n^r,e,t,i,o,s)}function u(e,t,n,r,i,o,s){return a(n^(t|~r),e,t,i,o,s)}n.r(t),n.d(t,{default:()=>c});const c=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n>5]>>>i%32&255,a=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<{"use strict";n.r(t),n.d(t,{default:()=>r});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}},62805:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r="00000000-0000-0000-0000-000000000000"},78537:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(66382);const i=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}},13469:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},43407:(e,t,n)=>{"use strict";let r;n.r(t),n.d(t,{default:()=>a});const i=new Uint8Array(16);function a(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}},59761:(e,t,n)=>{"use strict";function r(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function i(e,t){return e<>>32-t}n.r(t),n.d(t,{default:()=>a});const a=function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n>>0;d=c,c=u,u=i(l,30)>>>0,l=o,o=s}n[0]=n[0]+o>>>0,n[1]=n[1]+l>>>0,n[2]=n[2]+u>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+d>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}},38823:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,unsafeStringify:()=>a});var r=n(66382);const i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function a(e,t=0){return i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]}const o=function(e,t=0){const n=a(e,t);if(!(0,r.default)(n))throw TypeError("Stringified UUID is invalid");return n}},47661:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(43407),i=n(38823);let a,o,s=0,l=0;const u=function(e,t,n){let u=t&&n||0;const c=t||new Array(16);let d=(e=e||{}).node||a,f=void 0!==e.clockseq?e.clockseq:o;if(null==d||null==f){const t=e.random||(e.rng||r.default)();null==d&&(d=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==f&&(f=o=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),h=void 0!==e.nsecs?e.nsecs:l+1;const g=p-s+(h-l)/1e4;if(g<0&&void 0===e.clockseq&&(f=f+1&16383),(g<0||p>s)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,l=h,o=f,p+=122192928e5;const m=(1e4*(268435455&p)+h)%4294967296;c[u++]=m>>>24&255,c[u++]=m>>>16&255,c[u++]=m>>>8&255,c[u++]=255&m;const y=p/4294967296*1e4&268435455;c[u++]=y>>>8&255,c[u++]=255&y,c[u++]=y>>>24&15|16,c[u++]=y>>>16&255,c[u++]=f>>>8|128,c[u++]=255&f;for(let e=0;e<6;++e)c[u+e]=d[e];return t||(0,i.unsafeStringify)(c)}},4523:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(90312),i=n(90278);const a=(0,r.default)("v3",48,i.default)},90312:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DNS:()=>a,URL:()=>o,default:()=>s});var r=n(38823),i=n(78537);const a="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function s(e,t,n){function s(e,a,o,s){var l;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(91943),i=n(43407),a=n(38823);const o=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const o=(e=e||{}).random||(e.rng||i.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return(0,a.unsafeStringify)(o)}},86449:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(90312),i=n(59761);const a=(0,r.default)("v5",80,i.default)},66382:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(13469);const i=function(e){return"string"==typeof e&&r.default.test(e)}},69870:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(66382);const i=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},14958:(e,t,n)=>{"use strict";function r(e,t){if("undefined"!=typeof document&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}n.r(t),n.d(t,{canvas:()=>r,domCanvas:()=>r,image:()=>i});const i=()=>"undefined"!=typeof Image?Image:null},37788:(e,t,n)=>{"use strict";n.r(t),n.d(t,{crossfilter:()=>f,resolvefilter:()=>p});var r=n(61388),i=n(24988),a=n(26372);const o=e=>new Uint8Array(e),s=e=>new Uint16Array(e),l=e=>new Uint32Array(e);function u(e,t,n){const r=(t<257?o:t<65537?s:l)(e);return n&&r.set(n),r}function c(e,t,n){const r=1<{const r=e[t],i=e[n];return ri?1:0})),(0,r.permute)(e,t)}(h,c),s)d=t,f=e,t=Array(s+u),e=l(s+u),function(e,t,n,r,i,a,o,s,l){let u,c=0,d=0;for(u=0;c0)for(p=0;pe,size:()=>n}}function f(e){i.Transform.call(this,function(){let e=8,t=[],n=l(0),r=u(0,e),i=u(0,e);return{data:()=>t,seen:()=>n=function(e,t,n){return e.length>=t?e:((n=n||new e.constructor(t)).set(e),n)}(n,t.length),add(e){for(let n,r=0,i=t.length,a=e.length;rt.length,curr:()=>r,prev:()=>i,reset:e=>i[e]=r[e],all:()=>e<257?255:e<65537?65535:4294967295,set(e,t){r[e]|=t},clear(e,t){r[e]&=~t},resize(t,n){(t>r.length||n>e)&&(e=Math.max(n,e),r=u(t,e,r),i=u(t,e))}}}(),e),this._indices=null,this._dims=null}function p(e){i.Transform.call(this,null,e)}f.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]},(0,a.inherits)(f,i.Transform,{transform(e,t){return this._dims?e.modified("fields")||e.fields.some((e=>t.modified(e.fields)))?this.reinit(e,t):this.eval(e,t):this.init(e,t)},init(e,t){const n=e.fields,r=e.query,i=this._indices={},a=this._dims=[],o=r.length;let s,l,u=0;for(;u{const e=i.remove(t,n);for(const t in r)r[t].reindex(e)}))},update(e,t,n){const r=this._dims,i=e.query,a=t.stamp,o=r.length;let s,l,u=0;for(n.filters=0,l=0;lp)for(m=p,y=Math.min(d,h);mh)for(m=Math.max(d,h),y=f;mc)for(p=c,h=Math.min(l,d);pd)for(p=Math.max(l,d),h=u;ps[e]&n?null:o[e];return a.filter(a.MOD,u),i&i-1?(a.filter(a.ADD,(e=>{const t=s[e]&n;return!t&&t^l[e]&n?o[e]:null})),a.filter(a.REM,(e=>!(s[e]&n)||l[e]&n?null:o[e]))):(a.filter(a.ADD,u),a.filter(a.REM,(e=>(s[e]&n)===i?o[e]:null))),a.filter(a.SOURCE,(e=>u(e._index)))}})},24988:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Dataflow:()=>z,EventStream:()=>T,MultiPulse:()=>$,Operator:()=>_,Parameters:()=>x,Pulse:()=>F,Transform:()=>j,UniqueList:()=>o,asyncCallback:()=>s,changeset:()=>b,definition:()=>G,derive:()=>h,ingest:()=>p,isChangeSet:()=>v,isTuple:()=>c,rederive:()=>g,replace:()=>m,stableCompare:()=>y,transform:()=>V,transforms:()=>H,tupleid:()=>d});var r=n(26372),i=n(83418),a=n(40300);function o(e){const t=e||r.identity,n=[],i={};return n.add=e=>{const r=t(e);return i[r]||(i[r]=1,n.push(e)),n},n.remove=e=>{const r=t(e);if(i[r]){i[r]=0;const t=n.indexOf(e);t>=0&&n.splice(t,1)}return n},n}async function s(e,t){try{await t(e)}catch(t){e.error(t)}}const l=Symbol("vega_id");let u=1;function c(e){return!(!e||!d(e))}function d(e){return e[l]}function f(e,t){return e[l]=t,e}function p(e){const t=e===Object(e)?e:{data:e};return d(t)?t:f(t,u++)}function h(e){return g(e,p({}))}function g(e,t){for(const n in e)t[n]=e[n];return t}function m(e,t){return f(t,d(e))}function y(e,t){return e?t?(n,r)=>e(n,r)||d(t(n))-d(t(r)):(t,n)=>e(t,n)||d(t)-d(n):null}function v(e){return e&&e.constructor===b}function b(){const e=[],t=[],n=[],i=[],a=[];let o=null,s=!1;return{constructor:b,insert(t){const n=(0,r.array)(t),i=n.length;for(let t=0;t{m(e)&&(u[d(e)]=-1)}));for(f=0,h=e.length;f0&&(b(y,m,g.value),r.modifies(m));for(f=0,h=a.length;f{m(e)&&u[d(e)]>0&&b(e,g.field,g.value)})),r.modifies(g.field);if(s)r.mod=t.length||i.length?l.filter((e=>u[d(e)]>0)):l.slice();else for(v in c)r.mod.push(c[v]);return(o||null==o&&(t.length||i.length))&&r.clean(!0),r}}}const w="_:mod:_";function x(){Object.defineProperty(this,w,{writable:!0,value:{}})}x.prototype={set(e,t,n,i){const a=this,o=a[e],s=a[w];return null!=t&&t>=0?(o[t]!==n||i)&&(o[t]=n,s[t+":"+e]=-1,s[e]=-1):(o!==n||i)&&(a[e]=n,s[e]=(0,r.isArray)(n)?1+n.length:-1),a},modified(e,t){const n=this[w];if(!arguments.length){for(const e in n)if(n[e])return!0;return!1}if((0,r.isArray)(e)){for(let t=0;t=0?t+1{r instanceof _?(r!==this&&(t&&r.targets().add(this),o.push(r)),a.push({op:r,name:e,index:n})):i.set(e,n,r)};for(s in e)if(l=e[s],"pulse"===s)(0,r.array)(l).forEach((e=>{e instanceof _?e!==this&&(e.targets().add(this),o.push(e)):(0,r.error)("Pulse parameters must be operator instances.")})),this.source=l;else if((0,r.isArray)(l))for(i.set(s,-1,Array(u=l.length)),c=0;c{const n=Date.now();return n-t>e?(t=n,1):0}))},debounce(e){const t=k();return this.targets().add(k(null,null,(0,r.debounce)(e,(e=>{const n=e.dataflow;t.receive(e),n&&n.run&&n.run()})))),t},between(e,t){let n=!1;return e.targets().add(k(null,null,(()=>n=!0))),t.targets().add(k(null,null,(()=>n=!1))),this.filter((()=>n))},detach(){this._filter=r.truthy,this._targets=null}};const R={skip:!0};function D(e,t,n,i,a,o){const s=(0,r.extend)({},o,R);let l,u;(0,r.isFunction)(n)||(n=(0,r.constant)(n)),void 0===i?l=t=>e.touch(n(t)):(0,r.isFunction)(i)?(u=new _(null,i,a,!1),l=t=>{u.evaluate(t);const r=n(t),i=u.value;v(i)?e.pulse(r,i,o):e.update(r,i,s)}):l=t=>e.update(n(t),i,s),t.apply(l)}function O(e,t,n,i,a,o){if(void 0===i)t.targets().add(n);else{const s=o||{},l=new _(null,function(e,t){return t=(0,r.isFunction)(t)?t:(0,r.constant)(t),e?function(n,r){const i=t(n,r);return e.skip()||(e.skip(i!==this.value).value=i),i}:t}(n,i),a,!1);l.modified(s.force),l.rank=t.rank,t.targets().add(l),n&&(l.skip(!0),l.value=n.value,l.targets().add(n),e.connect(n,[l]))}}const N={};function F(e,t,n){this.dataflow=e,this.stamp=null==t?-1:t,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function P(e,t){const n=[];return(0,r.visitArray)(e,t,(e=>n.push(e))),n}function M(e,t){const n={};return e.visit(t,(e=>{n[d(e)]=1})),e=>n[d(e)]?null:e}function I(e,t){return e?(n,r)=>e(n,r)&&t(n,r):t}function $(e,t,n,r){const i=this;let a=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=r||null,this.pulses=n;for(const e of n)if(e.stamp===t){if(e.fields){const t=i.fields||(i.fields={});for(const n in e.fields)t[n]=1}e.changed(i.ADD)&&(a|=i.ADD),e.changed(i.REM)&&(a|=i.REM),e.changed(i.MOD)&&(a|=i.MOD)}this.changes=a}function L(e){return e.error("Dataflow already running. Use runAsync() to chain invocations."),e}F.prototype={StopPropagation:N,ADD:1,REM:2,MOD:4,ADD_REM:3,ADD_MOD:5,ALL:7,REFLOW:8,SOURCE:16,NO_SOURCE:32,NO_FIELDS:64,fork(e){return new F(this.dataflow).init(this,e)},clone(){const e=this.fork(7);return e.add=e.add.slice(),e.rem=e.rem.slice(),e.mod=e.mod.slice(),e.source&&(e.source=e.source.slice()),e.materialize(23)},addAll(){let e=this;return!e.source||e.add===e.rem||!e.rem.length&&e.source.length===e.add.length||(e=new F(this.dataflow).init(this),e.add=e.source,e.rem=[]),e},init(e,t){const n=this;return n.stamp=e.stamp,n.encode=e.encode,!e.fields||64&t||(n.fields=e.fields),1&t?(n.addF=e.addF,n.add=e.add):(n.addF=null,n.add=[]),2&t?(n.remF=e.remF,n.rem=e.rem):(n.remF=null,n.rem=[]),4&t?(n.modF=e.modF,n.mod=e.mod):(n.modF=null,n.mod=[]),32&t?(n.srcF=null,n.source=null):(n.srcF=e.srcF,n.source=e.source,e.cleans&&(n.cleans=e.cleans)),n},runAfter(e){this.dataflow.runAfter(e)},changed(e){const t=e||7;return 1&t&&this.add.length||2&t&&this.rem.length||4&t&&this.mod.length},reflow(e){if(e)return this.fork(7).reflow();const t=this.add.length,n=this.source&&this.source.length;return n&&n!==t&&(this.mod=this.source,t&&this.filter(4,M(this,1))),this},clean(e){return arguments.length?(this.cleans=!!e,this):this.cleans},modifies(e){const t=this.fields||(this.fields={});return(0,r.isArray)(e)?e.forEach((e=>t[e]=!0)):t[e]=!0,this},modified(e,t){const n=this.fields;return!(!t&&!this.mod.length||!n)&&(arguments.length?(0,r.isArray)(e)?e.some((e=>n[e])):n[e]:!!n)},filter(e,t){const n=this;return 1&e&&(n.addF=I(n.addF,t)),2&e&&(n.remF=I(n.remF,t)),4&e&&(n.modF=I(n.modF,t)),16&e&&(n.srcF=I(n.srcF,t)),n},materialize(e){const t=this;return 1&(e=e||7)&&t.addF&&(t.add=P(t.add,t.addF),t.addF=null),2&e&&t.remF&&(t.rem=P(t.rem,t.remF),t.remF=null),4&e&&t.modF&&(t.mod=P(t.mod,t.modF),t.modF=null),16&e&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const n=this,i=t;if(16&e)return(0,r.visitArray)(n.source,n.srcF,i),n;1&e&&(0,r.visitArray)(n.add,n.addF,i),2&e&&(0,r.visitArray)(n.rem,n.remF,i),4&e&&(0,r.visitArray)(n.mod,n.modF,i);const a=n.source;if(8&e&&a){const e=n.add.length+n.mod.length;e===a.length||(e?(0,r.visitArray)(a,M(n,5),i):(0,r.visitArray)(a,n.srcF,i))}return n}},(0,r.inherits)($,F,{fork(e){const t=new F(this.dataflow).init(this,e&this.NO_FIELDS);return void 0!==e&&(e&t.ADD&&this.visit(t.ADD,(e=>t.add.push(e))),e&t.REM&&this.visit(t.REM,(e=>t.rem.push(e))),e&t.MOD&&this.visit(t.MOD,(e=>t.mod.push(e)))),t},changed(e){return this.changes&e},modified(e){const t=this,n=t.fields;return n&&t.changes&t.MOD?(0,r.isArray)(e)?e.some((e=>n[e])):n[e]:0},filter(){(0,r.error)("MultiPulse does not support filtering.")},materialize(){(0,r.error)("MultiPulse does not support materialization.")},visit(e,t){const n=this,r=n.pulses,i=r.length;let a=0;if(e&n.SOURCE)for(;at&&(a=n-1>>1,i=e[a],r(o,i)<0);)e[n]=i,n=a;return e[n]=o}function z(){this.logger((0,r.logger)()),this.logLevel(r.Error),this._clock=0,this._rank=0,this._locale=(0,a.defaultLocale)();try{this._loader=(0,i.loader)()}catch(e){}this._touched=o(r.id),this._input={},this._pulse=null,this._heap=function(e){let t=[];return{clear:()=>t=[],size:()=>t.length,peek:()=>t[0],push:n=>(t.push(n),U(t,0,t.length-1,e)),pop:()=>{const n=t.pop();let r;return t.length?(r=t[0],t[0]=n,function(e,t,n){const r=t,i=e.length,a=e[t];let o,s=1+(t<<1);for(;s=0&&(s=o),e[t]=e[s],s=1+((t=s)<<1);e[t]=a,U(e,r,t,n)}(t,0,e)):r=n,r}}}(((e,t)=>e.qrank-t.qrank)),this._postrun=[]}function q(e){return function(){return this._log[e].apply(this,arguments)}}function j(e,t){_.call(this,e,null,t)}z.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:q("error"),warn:q("warn"),info:q("info"),debug:q("debug"),logLevel:q("level"),cleanThreshold:1e4,add:function(e,t,n,i){let a,o=1;return e instanceof _?a=e:e&&e.prototype instanceof _?a=new e:(0,r.isFunction)(e)?a=new _(null,e):(o=0,a=new _(e,t)),this.rank(a),o&&(i=n,n=t),n&&this.connect(a,a.parameters(n,i)),this.touch(a),a},connect:function(e,t){const n=e.rank,r=t.length;for(let i=0;i=0;)t.push(n=i[a]),n===e&&(0,r.error)("Cycle detected in dataflow graph.")},pulse:function(e,t,n){this.touch(e,n||B);const r=new F(this,this._clock+(this._pulse?0:1)),i=e.pulse&&e.pulse.source||[];return r.target=e,this._input[e.id]=t.pulse(r,i),this},touch:function(e,t){const n=t||B;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this},update:function(e,t,n){const r=n||B;return(e.set(t)||r.force)&&this.touch(e,r),this},changeset:b,ingest:function(e,t,n){return t=this.parse(t,n),this.pulse(e,this.changeset().insert(t))},parse:function(e,t){const n=this.locale();return(0,i.read)(e,t,n.timeParse,n.utcParse)},preload:async function(e,t,n){const i=this,a=i._pending||function(e){let t;const n=new Promise((e=>t=e));return n.requests=0,n.done=()=>{0==--n.requests&&(e._pending=null,t(e))},e._pending=n}(i);a.requests+=1;const o=await i.request(t,n);return i.pulse(e,i.changeset().remove(r.truthy).insert(o.data||[])),a.done(),o},request:async function(e,t){const n=this;let r,a=0;try{r=await n.loader().load(e,{context:"dataflow",response:(0,i.responseType)(t&&t.type)});try{r=n.parse(r,t)}catch(t){a=-2,n.warn("Data ingestion failed",e,t)}}catch(t){a=-1,n.warn("Loading failed",e,t)}return{data:r,status:a}},events:function(e,t,n,i){const a=this,o=k(n,i),s=function(e){e.dataflow=a;try{o.receive(e)}catch(e){a.error(e)}finally{a.run()}};let l;l="string"==typeof e&&"undefined"!=typeof document?document.querySelectorAll(e):(0,r.array)(e);const u=l.length;for(let e=0;ei._enqueue(e,!0))),i._touched=o(r.id);let u,c,d,f=0;try{for(;i._heap.size()>0;)u=i._heap.pop(),u.rank===u.qrank?(c=u.run(i._getPulse(u,e)),c.then?c=await c:c.async&&(a.push(c.async),c=N),c!==N&&u._targets&&u._targets.forEach((e=>i._enqueue(e))),++f):i._enqueue(u,!0)}catch(e){i._heap.clear(),d=e}if(i._input={},i._pulse=null,i.debug(`Pulse ${l}: ${f} operators`),d&&(i._postrun=[],i.error(d)),i._postrun.length){const e=i._postrun.sort(((e,t)=>t.priority-e.priority));i._postrun=[];for(let t=0;ti.runAsync(null,(()=>{e.forEach((e=>{try{e(i)}catch(e){i.error(e)}}))})))),i},run:function(e,t,n){return this._pulse?L(this):(this.evaluate(e,t,n),this)},runAsync:async function(e,t,n){for(;this._running;)await this._running;const r=()=>this._running=null;return(this._running=this.evaluate(e,t,n)).then(r,r),this._running},runAfter:function(e,t,n){if(this._pulse||t)this._postrun.push({priority:n||0,callback:e});else try{e(this)}catch(e){this.error(e)}},_enqueue:function(e,t){const n=e.stampe.pulse)),t):this._input[e.id]||function(e,t){return t&&t.stamp===e.stamp?t:(e=e.fork(),t&&t!==N&&(e.source=t.source),e)}(this._pulse,n&&n.pulse)}},(0,r.inherits)(j,_,{run(e){if(e.stampthis.pulse=e)):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},transform(){}});const H={};function G(e){const t=V(e);return t&&t.Definition||null}function V(e){return e=e&&e.toLowerCase(),(0,r.hasOwnProperty)(H,e)?H[e]:null}},47990:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_ACTIONS:()=>Ue,default:()=>Je,guessMode:()=>Ye,vega:()=>$e,vegaLite:()=>Le,version:()=>Ie});var r,i=n(48487),a=n.n(i),o=n(77390),s=n(48196),l=n(78405),u=n(73706),c=n(80632),d=n(41570),f=n(65606),p=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=Object.prototype.hasOwnProperty;function g(e,t){return h.call(e,t)}function m(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n=48&&t<=57))return!1;n++}return!0}function b(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function w(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function x(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,n=e.length;t0&&"constructor"==s[u-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===d&&(void 0===l[f]?d=s.slice(0,u).join("/"):u==c-1&&(d=t.path),void 0!==d&&p(t,0,e,d)),u++,Array.isArray(l)){if("-"===f)f=l.length;else{if(n&&!v(f))throw new _("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);v(f)&&(f=~~f)}if(u>=c){if(n&&"add"===t.op&&f>l.length)throw new _("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);if(!1===(o=T[t.op].call(t,l,f,e)).test)throw new _("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}}else if(u>=c){if(!1===(o=C[t.op].call(t,l,f,e)).test)throw new _("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}if(l=l[f],n&&u0)throw new _('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new _("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new _("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&x(e.value))throw new _("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new _("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new _("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var o=N([{op:"_get",path:e.from,value:void 0}],n);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new _("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function N(e,t,n){try{if(!Array.isArray(e))throw new _("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)D(y(t),y(e),n||!0);else{n=n||O;for(var r=0;r0&&(e.patches=[],e.callback&&e.callback(r)),r}function B(e,t,n,r,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var a=m(t),o=m(e),s=!1,l=o.length-1;l>=0;l--){var u=e[d=o[l]];if(!g(t,d)||void 0===t[d]&&void 0!==u&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+b(d),value:y(u)}),n.push({op:"remove",path:r+"/"+b(d)}),s=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}));else{var c=t[d];"object"==typeof u&&null!=u&&"object"==typeof c&&null!=c&&Array.isArray(u)===Array.isArray(c)?B(u,c,n,r+"/"+b(d),i):u!==c&&(i&&n.push({op:"test",path:r+"/"+b(d),value:y(u)}),n.push({op:"replace",path:r+"/"+b(d),value:y(c)}))}}if(s||a.length!=o.length)for(l=0;ln?"object"!=typeof n?e:n:t}Object.assign({},P,H,{JsonPatchError:S,deepClone:y,escapePathComponent:b,unescapePathComponent:w});var W,Y,X,K,J,Q,Z,ee,te,ne,re,ie,ae,oe,se,le,ue,ce,de,fe,pe,he,ge,me,ye,ve,be,we,xe,Ee,Se,_e={exports:{}};function Ae(){if(Y)return W;Y=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return W={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function Ce(){if(K)return X;K=1;const e="object"==typeof f&&f.env&&f.env.NODE_DEBUG&&/\bsemver\b/i.test(f.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return X=e}function Te(){return J||(J=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Ae(),a=Ce(),o=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],u=t.t={};let c=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[d,r]],p=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=c++;a(e,i,t),u[e]=i,l[i]=t,o[i]=new RegExp(t,n?"g":void 0),s[i]=new RegExp(r,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),p("FULL",`^${l[u.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),p("LOOSE",`^${l[u.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),p("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[u.COERCE],!0),p("COERCERTLFULL",l[u.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(_e,_e.exports)),_e.exports}function ke(){if(te)return ee;te=1;const e=Ce(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Ae(),{safeRe:r,t:i}=Te(),a=V(),{compareIdentifiers:o}=function(){if(Z)return Q;Z=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:tt(n,e)}}();class s{constructor(o,l){if(l=a(l),o instanceof s){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if("string"!=typeof o)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const u=o.trim().match(l.loose?r[i.LOOSE]:r[i.FULL]);if(!u)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===o(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return ee=s}function Re(){if(re)return ne;re=1;const e=ke();return ne=(t,n,r)=>new e(t,r).compare(new e(n,r))}function De(){if(xe)return we;xe=1;const e=/\s+/g;class t{constructor(n,a){if(a=r(a),n instanceof t)return n.loose===!!a.loose&&n.includePrerelease===!!a.includePrerelease?n:new t(n.raw,a);if(n instanceof i)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&p))+":"+e,r=n.get(t);if(r)return r;const o=this.options.loose,g=o?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(g,T(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],u),a("comparator trim",e),e=e.replace(s[l.TILDETRIM],c),a("tilde trim",e),e=e.replace(s[l.CARETTRIM],d),a("caret trim",e);let m=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>C(e,this.options)));o&&(m=m.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(s[l.COMPARATORLOOSE]))))),a("range list",m);const v=new Map,b=m.map((e=>new i(e,this.options)));for(const e of b){if(h(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const w=[...v.values()];return n.set(t,w),w}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>m(t,n)&&e.set.some((e=>m(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(e){return!1}for(let t=0;t=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}})),r=V(),i=function(){if(be)return ve;be=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),o("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],a=t.match(n);if(!a)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==a[1]?a[1]:"","="===this.operator&&(this.operator=""),a[2]?this.semver=new s(a[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(o("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return a(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):!((r=n(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(a(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(a(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}ve=t;const n=V(),{safeRe:r,t:i}=Te(),a=function(){if(ye)return me;ye=1;const e=function(){if(ae)return ie;ae=1;const e=Re();return ie=(t,n,r)=>0===e(t,n,r)}(),t=function(){if(se)return oe;se=1;const e=Re();return oe=(t,n,r)=>0!==e(t,n,r)}(),n=function(){if(ue)return le;ue=1;const e=Re();return le=(t,n,r)=>e(t,n,r)>0}(),r=function(){if(de)return ce;de=1;const e=Re();return ce=(t,n,r)=>e(t,n,r)>=0}(),i=function(){if(pe)return fe;pe=1;const e=Re();return fe=(t,n,r)=>e(t,n,r)<0}(),a=function(){if(ge)return he;ge=1;const e=Re();return he=(t,n,r)=>e(t,n,r)<=0}();return me=(o,s,l,u)=>{switch(s){case"===":return"object"==typeof o&&(o=o.version),"object"==typeof l&&(l=l.version),o===l;case"!==":return"object"==typeof o&&(o=o.version),"object"==typeof l&&(l=l.version),o!==l;case"":case"=":case"==":return e(o,l,u);case"!=":return t(o,l,u);case">":return n(o,l,u);case">=":return r(o,l,u);case"<":return i(o,l,u);case"<=":return a(o,l,u);default:throw new TypeError(`Invalid operator: ${s}`)}}}(),o=Ce(),s=ke(),l=De();return ve}(),a=Ce(),o=ke(),{safeRe:s,t:l,comparatorTrimReplace:u,tildeTrimReplace:c,caretTrimReplace:d}=Te(),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:p}=Ae(),h=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},y=(e,t)=>(a("comp",e,t),e=x(e,t),a("caret",e),e=b(e,t),a("tildes",e),e=S(e,t),a("xrange",e),e=A(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,i,o)=>{let s;return a("tilde",e,t,n,r,i,o),v(n)?s="":v(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",s),s}))},x=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{a("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,s)=>{let l;return a("caret",e,t,n,i,o,s),v(n)?l="":v(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(o)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${o}-${s} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),a("caret return",l),l}))},S=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>_(e,t))).join(" ")),_=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,i,o,s,l)=>{a("xRange",e,n,r,i,o,s,l);const u=v(i),c=u||v(o),d=c||v(s),f=d;return"="===r&&f&&(r=""),l=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(c&&(o=0),s=0,">"===r?(r=">=",c?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",c?i=+i+1:o=+o+1),"<"===r&&(l="-0"),n=`${r+i}.${o}.${s}${l}`):c?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${o}.0${l} <${i}.${+o+1}.0-0`),a("xRange return",n),n}))},A=(e,t)=>(a("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),C=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),T=e=>(t,n,r,i,a,o,s,l,u,c,d,f)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(a)?`>=${r}.${i}.0${e?"-0":""}`:o?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(u)?"":v(c)?`<${+u+1}.0.0-0`:v(d)?`<${u}.${+c+1}.0-0`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`}`.trim(),k=(e,t,n)=>{for(let n=0;n0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return we}var Oe=function(){if(Se)return Ee;Se=1;const e=De();return Ee=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Ee}(),Ne=G(Oe),Fe='.vega-embed {\n position: relative;\n display: inline-block;\n box-sizing: border-box;\n}\n.vega-embed.has-actions {\n padding-right: 38px;\n}\n.vega-embed details:not([open]) > :not(summary) {\n display: none !important;\n}\n.vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n cursor: pointer;\n line-height: 0px;\n}\n.vega-embed summary::-webkit-details-marker {\n display: none;\n}\n.vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset;\n}\n.vega-embed summary svg {\n width: 14px;\n height: 14px;\n}\n.vega-embed details[open] summary {\n opacity: 0.7;\n}\n.vega-embed:hover summary, .vega-embed:focus-within summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease;\n}\n.vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left;\n}\n.vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none;\n}\n.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {\n background-color: #f7f7f9;\n color: black;\n}\n.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute;\n}\n.vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid rgba(0, 0, 0, 0);\n border-bottom-color: #d9d9d9;\n}\n.vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid rgba(0, 0, 0, 0);\n border-bottom-color: #fff;\n}\n.vega-embed .chart-wrapper.fit-x {\n width: 100%;\n}\n.vega-embed .chart-wrapper.fit-y {\n height: 100%;\n}\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: auto;\n padding-right: 14px;\n}\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n';function Pe(e,...t){for(const n of t)Me(e,n);return e}function Me(e,t){for(const n of Object.keys(t))(0,o.writeConfig)(e,n,t[n],!0)}const Ie="6.28.0",$e=o;let Le=l;const Be="undefined"!=typeof window?window:void 0;void 0===Le&&Be?.vl?.compile&&(Le=Be.vl);const Ue={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},ze={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},qe={vega:"Vega","vega-lite":"Vega-Lite"},je={vega:$e.version,"vega-lite":Le?Le.version:"not available"},He={vega:e=>e,"vega-lite":(e,t)=>Le.compile(e,{config:t}).spec},Ge='\n\n \n \n \n',Ve="chart-wrapper";function We(e,t,n,r){const i=`${t}
`,a=`
${n}`,o=window.open("");o.document.write(i+e+a),o.document.title=`${qe[r]} JSON Source`}function Ye(e,t){if(e.$schema){const n=(0,u.default)(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${qe[n.library]}, but mode argument sets ${qe[t]??t}.`);const r=n.library;return Ne(je[r],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${qe[r]} ${n.version}, but the current version of ${qe[r]} is v${je[r]}.`),r}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t??"vega"}function Xe(e){return!(!e||!("load"in e))}function Ke(e){return Xe(e)?e:$e.loader(e)}async function Je(e,t,n={}){let r,i;(0,o.isString)(t)?(i=Ke(n.loader),r=JSON.parse(await i.load(t))):r=t;const l=function(e){const t=e.usermeta?.embedOptions??{};return(0,o.isString)(t.defaultStyle)&&(t.defaultStyle=!1),t}(r),f=l.loader;i&&!f||(i=Ke(n.loader??f));const p=await Qe(l,i),h=await Qe(n,i),g={...Pe(h,p),config:(0,o.mergeConfig)(h.config??{},p.config??{})};return await async function(e,t,n={},r){const i=n.theme?(0,o.mergeConfig)(c[n.theme],n.config??{}):n.config,l=(0,o.isBoolean)(n.actions)?n.actions:Pe({},Ue,n.actions??{}),f={...ze,...n.i18n},p=n.renderer??"canvas",h=n.logLevel??$e.Warn,g=n.downloadFileName??"visualization",m="string"==typeof e?document.querySelector(e):e;if(!m)throw new Error(`${e} does not exist`);if(!1!==n.defaultStyle){const e="vega-embed-style",{root:t,rootContainer:r}=function(e){const t=e.getRootNode?e.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}(m);if(!t.getElementById(e)){const t=document.createElement("style");t.id=e,t.innerHTML=void 0===n.defaultStyle||!0===n.defaultStyle?Fe.toString():n.defaultStyle,r.appendChild(t)}}const y=Ye(t,n.mode);let v=He[y](t,i);if("vega-lite"===y&&v.$schema){const e=(0,u.default)(v.$schema);Ne(je.vega,`^${e.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${e.version}, but current version is v${je.vega}.`)}m.classList.add("vega-embed"),l&&m.classList.add("has-actions"),m.innerHTML="";let b=m;if(l){const e=document.createElement("div");e.classList.add(Ve),m.appendChild(e),b=e}const w=n.patch;if(w&&(v=w instanceof Function?w(v):D(v,w,!0,!1).newDocument),n.formatLocale&&$e.formatLocale(n.formatLocale),n.timeFormatLocale&&$e.timeFormatLocale(n.timeFormatLocale),n.expressionFunctions)for(const e in n.expressionFunctions){const t=n.expressionFunctions[e];"fn"in t?$e.expressionFunction(e,t.fn,t.visitor):t instanceof Function&&$e.expressionFunction(e,t)}const{ast:x}=n,E=$e.parse(v,"vega-lite"===y?{}:i,{ast:x}),S=new(n.viewClass||$e.View)(E,{loader:r,logLevel:h,renderer:p,...x?{expr:$e.expressionInterpreter??n.expr??s.expressionInterpreter}:{}});if(S.addSignalListener("autosize",((e,t)=>{const{type:n}=t;"fit-x"==n?(b.classList.add("fit-x"),b.classList.remove("fit-y")):"fit-y"==n?(b.classList.remove("fit-x"),b.classList.add("fit-y")):"fit"==n?b.classList.add("fit-x","fit-y"):b.classList.remove("fit-x","fit-y")})),!1!==n.tooltip){const{loader:e,tooltip:t}=n,r=e&&!Xe(e)?e?.baseURL:void 0,i="function"==typeof t?t:new d.Handler({baseURL:r,...!0===t?{}:t}).call;S.tooltip(i)}let _,{hover:A}=n;if(void 0===A&&(A="vega"===y),A){const{hoverSet:e,updateSet:t}="boolean"==typeof A?{}:A;S.hover(e,t)}if(n&&(null!=n.width&&S.width(n.width),null!=n.height&&S.height(n.height),null!=n.padding&&S.padding(n.padding)),await S.initialize(b,n.bind).runAsync(),!1!==l){let e=m;if(!1!==n.defaultStyle||n.forceActionsMenu){const t=document.createElement("details");t.title=f.CLICK_TO_VIEW_ACTIONS,m.append(t),e=t;const n=document.createElement("summary");n.innerHTML=Ge,t.append(n),_=e=>{t.contains(e.target)||t.removeAttribute("open")},document.addEventListener("click",_)}const r=document.createElement("div");if(e.append(r),r.classList.add("vega-actions"),!0===l||!1!==l.export)for(const e of["svg","png"])if(!0===l||!0===l.export||l.export[e]){const t=f[`${e.toUpperCase()}_ACTION`],i=document.createElement("a"),a=(0,o.isObject)(n.scaleFactor)?n.scaleFactor[e]:n.scaleFactor;i.text=t,i.href="#",i.target="_blank",i.download=`${g}.${e}`,i.addEventListener("mousedown",(async function(t){t.preventDefault();const n=await S.toImageURL(e,a);this.href=n})),r.append(i)}if(!0===l||!1!==l.source){const e=document.createElement("a");e.text=f.SOURCE_ACTION,e.href="#",e.addEventListener("click",(function(e){We(a()(t),n.sourceHeader??"",n.sourceFooter??"",y),e.preventDefault()})),r.append(e)}if("vega-lite"===y&&(!0===l||!1!==l.compiled)){const e=document.createElement("a");e.text=f.COMPILED_ACTION,e.href="#",e.addEventListener("click",(function(e){We(a()(v),n.sourceHeader??"",n.sourceFooter??"","vega"),e.preventDefault()})),r.append(e)}if(!0===l||!1!==l.editor){const e=n.editorUrl??"https://vega.github.io/editor/",o=document.createElement("a");o.text=f.EDITOR_ACTION,o.href="#",o.addEventListener("click",(function(n){!function(e,t,n){const r=e.open(t),{origin:i}=new URL(t);let a=40;e.addEventListener("message",(function t(n){n.source===r&&(a=0,e.removeEventListener("message",t,!1))}),!1),setTimeout((function e(){a<=0||(r.postMessage(n,i),setTimeout(e,250),a-=1)}),250)}(window,e,{config:i,mode:w?"vega":y,renderer:p,spec:a()(w?v:t)}),n.preventDefault()})),r.append(o)}}return{view:S,spec:t,vgSpec:v,finalize:function(){_&&document.removeEventListener("click",_),S.finalize()},embedOptions:n}}(e,r,g,i)}async function Qe(e,t){const n=(0,o.isString)(e.config)?JSON.parse(await t.load(e.config)):e.config??{},r=(0,o.isString)(e.patch)?JSON.parse(await t.load(e.patch)):e.patch;return{...e,...r?{patch:r}:{},...n?{config:n}:{}}}},73784:(e,t,n)=>{"use strict";n.r(t),n.d(t,{axisticks:()=>l,datajoin:()=>u,encode:()=>d,legendentries:()=>f,linkpath:()=>y,pie:()=>E,scale:()=>A,sortitems:()=>R,stack:()=>P});var r=n(24988),i=n(14588),a=n(26372),o=n(61388),s=n(82226);function l(e){r.Transform.call(this,null,e)}function u(e){r.Transform.call(this,null,e)}function c(){return(0,r.ingest)({})}function d(e){r.Transform.call(this,null,e)}function f(e){r.Transform.call(this,[],e)}(0,a.inherits)(l,r.Transform,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),a=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=this.value,s=e.scale,l=null==e.count?e.values?e.values.length:10:e.count,u=(0,i.tickCount)(s,l,e.minstep),c=e.format||(0,i.tickFormat)(n,s,u,e.formatSpecifier,e.formatType,!!e.values),d=e.values?(0,i.validTicks)(s,e.values,u):(0,i.tickValues)(s,u);return o&&(a.rem=o),o=d.map(((e,t)=>(0,r.ingest)({index:t/(d.length-1||1),value:e,label:c(e)}))),e.extra&&o.length&&o.push((0,r.ingest)({index:-1,extra:{value:o[0].value},label:""})),a.source=o,a.add=o,this.value=o,a}}),(0,a.inherits)(u,r.Transform,{transform(e,t){var n=t.dataflow,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=e.item||c,s=e.key||r.tupleid,l=this.value;return(0,a.isArray)(i.encode)&&(i.encode=null),l&&(e.modified("key")||t.modified(s))&&(0,a.error)("DataJoin does not support modified key function or fields."),l||(t=t.addAll(),this.value=l=function(e){const t=(0,a.fastmap)().test((e=>e.exit));return t.lookup=n=>t.get(e(n)),t}(s)),t.visit(t.ADD,(e=>{const t=s(e);let n=l.get(t);n?n.exit?(l.empty--,i.add.push(n)):i.mod.push(n):(n=o(e),l.set(t,n),i.add.push(n)),n.datum=e,n.exit=!1})),t.visit(t.MOD,(e=>{const t=s(e),n=l.get(t);n&&(n.datum=e,i.mod.push(n))})),t.visit(t.REM,(e=>{const t=s(e),n=l.get(t);e!==n.datum||n.exit||(i.rem.push(n),n.exit=!0,++l.empty)})),t.changed(t.ADD_MOD)&&i.modifies("datum"),(t.clean()||e.clean&&l.empty>n.cleanThreshold)&&n.runAfter(l.clean),i}}),(0,a.inherits)(d,r.Transform,{transform(e,t){var n=t.fork(t.ADD_REM),r=e.mod||!1,i=e.encoders,o=t.encode;if((0,a.isArray)(o)){if(!n.changed()&&!o.every((e=>i[e])))return t.StopPropagation;o=o[0],n.encode=null}var s="enter"===o,l=i.update||a.falsy,u=i.enter||a.falsy,c=i.exit||a.falsy,d=(o&&!s?i[o]:l)||a.falsy;if(t.changed(t.ADD)&&(t.visit(t.ADD,(t=>{u(t,e),l(t,e)})),n.modifies(u.output),n.modifies(l.output),d!==a.falsy&&d!==l&&(t.visit(t.ADD,(t=>{d(t,e)})),n.modifies(d.output))),t.changed(t.REM)&&c!==a.falsy&&(t.visit(t.REM,(t=>{c(t,e)})),n.modifies(c.output)),s||d!==a.falsy){const i=t.MOD|(e.modified()?t.REFLOW:0);s?(t.visit(i,(t=>{const i=u(t,e)||r;(d(t,e)||i)&&n.mod.push(t)})),n.mod.length&&n.modifies(u.output)):t.visit(i,(t=>{(d(t,e)||r)&&n.mod.push(t)})),n.mod.length&&n.modifies(d.output)}return n.changed()?n:t.StopPropagation}}),(0,a.inherits)(f,r.Transform,{transform(e,t){if(null!=this.value&&!e.modified())return t.StopPropagation;var n,o,s,l,u,c=t.dataflow.locale(),d=t.fork(t.NO_SOURCE|t.NO_FIELDS),f=this.value,p=e.type||i.SymbolLegend,h=e.scale,g=+e.limit,m=(0,i.tickCount)(h,null==e.count?5:e.count,e.minstep),y=!!e.values||p===i.SymbolLegend,v=e.format||(0,i.labelFormat)(c,h,m,p,e.formatSpecifier,e.formatType,y),b=e.values||(0,i.labelValues)(h,m);return f&&(d.rem=f),p===i.SymbolLegend?(g&&b.length>g?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),f=b.slice(0,g-1),u=!0):f=b,(0,a.isFunction)(s=e.size)?(e.values||0!==h(f[0])||(f=f.slice(1)),l=f.reduce(((t,n)=>Math.max(t,s(n,e))),0)):s=(0,a.constant)(l=s||8),f=f.map(((t,n)=>(0,r.ingest)({index:n,label:v(t,n,f),value:t,offset:l,size:s(t,e)}))),u&&(u=b[f.length],f.push((0,r.ingest)({index:f.length,label:`…${b.length-f.length} entries`,value:u,offset:l,size:s(u,e)})))):p===i.GradientLegend?(n=h.domain(),o=(0,i.scaleFraction)(h,n[0],(0,a.peek)(n)),b.length<3&&!e.values&&n[0]!==(0,a.peek)(n)&&(b=[n[0],(0,a.peek)(n)]),f=b.map(((e,t)=>(0,r.ingest)({index:t,label:v(e,t,b),value:e,perc:o(e)})))):(s=b.length-1,o=(0,i.labelFraction)(h),f=b.map(((e,t)=>(0,r.ingest)({index:t,label:v(e,t,b),value:e,perc:t?o(e):0,perc2:t===s?1:o(b[t+1])})))),d.source=f,d.add=f,this.value=f,d}});const p=e=>e.source.x,h=e=>e.source.y,g=e=>e.target.x,m=e=>e.target.y;function y(e){r.Transform.call(this,{},e)}y.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},(0,a.inherits)(y,r.Transform,{transform(e,t){var n=e.sourceX||p,r=e.sourceY||h,i=e.targetX||g,o=e.targetY||m,s=e.as||"path",l=e.orient||"vertical",u=e.shape||"line",c=x.get(u+"-"+l)||x.get(u);return c||(0,a.error)("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,(e=>{e[s]=c(n(e),r(e),i(e),o(e))})),t.reflow(e.modified()).modifies(s)}});const v=(e,t,n,r)=>"M"+e+","+t+"L"+n+","+r,b=(e,t,n,r)=>{var i=n-e,a=r-t,o=Math.hypot(i,a)/2;return"M"+e+","+t+"A"+o+","+o+" "+180*Math.atan2(a,i)/Math.PI+" 0 1 "+n+","+r},w=(e,t,n,r)=>{const i=n-e,a=r-t,o=.2*(i+a),s=.2*(a-i);return"M"+e+","+t+"C"+(e+o)+","+(t+s)+" "+(n+s)+","+(r-o)+" "+n+","+r},x=(0,a.fastmap)({line:v,"line-radial":(e,t,n,r)=>v(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),arc:b,"arc-radial":(e,t,n,r)=>b(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),curve:w,"curve-radial":(e,t,n,r)=>w(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),"orthogonal-horizontal":(e,t,n,r)=>"M"+e+","+t+"V"+r+"H"+n,"orthogonal-vertical":(e,t,n,r)=>"M"+e+","+t+"H"+n+"V"+r,"orthogonal-radial":(e,t,n,r)=>{const i=Math.cos(e),a=Math.sin(e),o=Math.cos(n),s=Math.sin(n);return"M"+t*i+","+t*a+"A"+t+","+t+" 0 0,"+((Math.abs(n-e)>Math.PI?n<=e:n>e)?1:0)+" "+t*o+","+t*s+"L"+r*o+","+r*s},"diagonal-horizontal":(e,t,n,r)=>{const i=(e+n)/2;return"M"+e+","+t+"C"+i+","+t+" "+i+","+r+" "+n+","+r},"diagonal-vertical":(e,t,n,r)=>{const i=(t+r)/2;return"M"+e+","+t+"C"+e+","+i+" "+n+","+i+" "+n+","+r},"diagonal-radial":(e,t,n,r)=>{const i=Math.cos(e),a=Math.sin(e),o=Math.cos(n),s=Math.sin(n),l=(t+r)/2;return"M"+t*i+","+t*a+"C"+l*i+","+l*a+" "+l*o+","+l*s+" "+r*o+","+r*s}});function E(e){r.Transform.call(this,null,e)}function S(e){return(0,i.isContinuous)(e)&&e!==i.Sequential}E.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},(0,a.inherits)(E,r.Transform,{transform(e,t){var n,r,i,s=e.as||["startAngle","endAngle"],l=s[0],u=s[1],c=e.field||a.one,d=e.startAngle||0,f=null!=e.endAngle?e.endAngle:2*Math.PI,p=t.source,h=p.map(c),g=h.length,m=d,y=(f-d)/(0,o.sum)(h),v=(0,o.range)(g);for(e.sort&&v.sort(((e,t)=>h[e]-h[t])),n=0;ne+(t<0?-1:t>0?1:0)),0))!==t.length&&n.warn("Log scale domain includes zero: "+(0,a.stringValue)(t)),t}function T(e,t,n){return(0,a.isFunction)(e)&&(t||n)?(0,i.interpolateRange)(e,k(t||[0,1],n)):e}function k(e,t){return t?e.slice().reverse():e}function R(e){r.Transform.call(this,null,e)}(0,a.inherits)(A,r.Transform,{transform(e,t){var n=t.dataflow,r=this.value,l=function(e){var t,n=e.type,r="";return n===i.Sequential?i.Sequential+"-"+i.Linear:(function(e){const t=e.type;return(0,i.isContinuous)(t)&&t!==i.Time&&t!==i.UTC&&(e.scheme||e.range&&e.range.length&&e.range.every(a.isString))}(e)&&(r=2===(t=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(null!=e.domainMid):0)?i.Sequential+"-":3===t?i.Diverging+"-":""),(r+n||i.Linear).toLowerCase())}(e);for(l in r&&l===r.type||(this.value=r=(0,i.scale)(l)()),e)if(!_[l]){if("padding"===l&&S(r.type))continue;(0,a.isFunction)(r[l])?r[l](e[l]):n.warn("Unsupported scale property: "+l)}return function(e,t,n){var r=e.type,o=t.round||!1,l=t.range;if(null!=t.rangeStep)l=function(e,t,n){e!==i.Band&&e!==i.Point&&(0,a.error)("Only band and point scales support rangeStep.");var r=(null!=t.paddingOuter?t.paddingOuter:t.padding)||0,o=e===i.Point?1:(null!=t.paddingInner?t.paddingInner:t.padding)||0;return[0,t.rangeStep*(0,i.bandSpace)(n,o,r)]}(r,t,n);else if(t.scheme&&(l=function(e,t,n){var r,o,s=t.schemeExtent;return(0,a.isArray)(t.scheme)?o=(0,i.interpolateColors)(t.scheme,t.interpolate,t.interpolateGamma):(r=t.scheme.toLowerCase(),(o=(0,i.scheme)(r))||(0,a.error)(`Unrecognized scheme name: ${t.scheme}`)),n=e===i.Threshold?n+1:e===i.BinOrdinal?n-1:e===i.Quantile||e===i.Quantize?+t.schemeCount||5:n,(0,i.isInterpolating)(e)?T(o,s,t.reverse):(0,a.isFunction)(o)?(0,i.quantizeInterpolator)(T(o,s),n):e===i.Ordinal?o:o.slice(0,n)}(r,t,n),(0,a.isFunction)(l))){if(e.interpolator)return e.interpolator(l);(0,a.error)(`Scale type ${r} does not support interpolating color schemes.`)}if(l&&(0,i.isInterpolating)(r))return e.interpolator((0,i.interpolateColors)(k(l,t.reverse),t.interpolate,t.interpolateGamma));l&&t.interpolate&&e.interpolate?e.interpolate((0,i.interpolate)(t.interpolate,t.interpolateGamma)):(0,a.isFunction)(e.round)?e.round(o):(0,a.isFunction)(e.rangeRound)&&e.interpolate(o?s.interpolateRound:s.interpolate),l&&e.range(k(l,t.reverse))}(r,e,function(e,t,n){let r=t.bins;if(r&&!(0,a.isArray)(r)){const t=e.domain(),n=t[0],i=(0,a.peek)(t),s=r.step;let l=null==r.start?n:r.start,u=null==r.stop?i:r.stop;s||(0,a.error)("Scale bins parameter missing step property."),li&&(u=s*Math.floor(i/s)),r=(0,o.range)(l,u+s/2,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===i.BinOrdinal&&(r?t.domain||t.domainRaw||(e.domain(r),n=r.length):e.bins=e.domain()),n}(r,e,function(e,t,n){const r=function(e,t,n){return t?(e.domain(C(e.type,t,n)),t.length):-1}(e,t.domainRaw,n);if(r>-1)return r;var o,s,l=t.domain,u=e.type,c=t.zero||void 0===t.zero&&function(e){const t=e.type;return!e.bins&&(t===i.Linear||t===i.Pow||t===i.Sqrt)}(e);if(!l)return 0;if((c||null!=t.domainMin||null!=t.domainMax||null!=t.domainMid)&&(o=(l=l.slice()).length-1||1,c&&(l[0]>0&&(l[0]=0),l[o]<0&&(l[o]=0)),null!=t.domainMin&&(l[0]=t.domainMin),null!=t.domainMax&&(l[o]=t.domainMax),null!=t.domainMid)){const e=(s=t.domainMid)>l[o]?o+1:se(l);if(null==t)p.push(e.slice());else for(i={},a=0,o=e.length;af&&(f=d),n&&c.sort(n)}return p.max=f,p}(t.source,e.groupby,d,f),i=0,o=n.length,s=n.max;i{"use strict";n.r(t),n.d(t,{parseSelector:()=>m});const r="view",i="[",a="]",o="{",s="}",l=":",u=",",c="@",d=">",f=/[[\]{}]/,p={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let h,g;function m(e,t,n){return h=t||r,g=n||p,v(e.trim()).map(b)}function y(e,t,n,r,i){const a=e.length;let o,s=0;for(;t=0?--s:r&&r.indexOf(o)>=0&&++s}return t}function v(e){const t=[],n=e.length;let r=0,l=0;for(;l' after between selector: "+e;n=n.map(b);const o=b(e.slice(1).trim());return o.between?{between:n,stream:o}:(o.between=n,o)}(e):function(e){const t={source:h},n=[];let r,d,p=[0,0],m=0,v=0,b=e.length,w=0;if(e[b-1]===s){if(w=e.lastIndexOf(o),!(w>=0))throw"Unmatched right brace: "+e;try{p=function(e){const t=e.split(u);if(!e.length||t.length>2)throw e;return t.map((t=>{const n=+t;if(n!=n)throw e;return n}))}(e.substring(w+1,b-1))}catch(t){throw"Invalid throttle specification: "+e}b=(e=e.slice(0,w).trim()).length,w=0}if(!b)throw e;if(e[0]===c&&(m=++w),r=y(e,w,l),r1?(t.type=n[1],m?t.markname=n[0].slice(1):(x=n[0],g[x]?t.marktype=n[0]:t.source=n[0])):t.type=n[0],"!"===t.type.slice(-1)&&(t.consume=!0,t.type=t.type.slice(0,-1)),null!=d&&(t.filter=d),p[0]&&(t.throttle=p[0]),p[1]&&(t.debounce=p[1]),t}(e)}},21720:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ASTNode:()=>m,ArrayExpression:()=>l,BinaryExpression:()=>u,CallExpression:()=>c,ConditionalExpression:()=>d,Identifier:()=>s,Literal:()=>a,LogicalExpression:()=>f,MemberExpression:()=>p,ObjectExpression:()=>h,Property:()=>o,RawCode:()=>i,UnaryExpression:()=>g,codegenExpression:()=>Ge,constants:()=>je,functions:()=>He,parseExpression:()=>qe});var r=n(26372);const i="RawCode",a="Literal",o="Property",s="Identifier",l="ArrayExpression",u="BinaryExpression",c="CallExpression",d="ConditionalExpression",f="LogicalExpression",p="MemberExpression",h="ObjectExpression",g="UnaryExpression";function m(e){this.type=e}var y,v,b,w,x;m.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=function(e){switch(e.type){case l:return e.elements;case u:case f:return[e.left,e.right];case c:return[e.callee].concat(e.arguments);case d:return[e.test,e.consequent,e.alternate];case p:return[e.object,e.property];case h:return e.properties;case o:return[e.key,e.value];case g:return[e.argument];default:return[]}}(this),n=0,r=t.length;n",y[_]="Identifier",y[A]="Keyword",y[C]="Null",y[T]="Numeric",y[k]="Punctuator",y[R]="String",y[9]="RegularExpression";var D="ArrayExpression",O="BinaryExpression",N="CallExpression",F="ConditionalExpression",P="Identifier",M="Literal",I="LogicalExpression",$="MemberExpression",L="ObjectExpression",B="Property",U="UnaryExpression",z="Unexpected token %0",q="Unexpected number",j="Unexpected string",H="Unexpected identifier",G="Unexpected reserved word",V="Unexpected end of input",W="Invalid regular expression",Y="Invalid regular expression: missing /",X="Octal literals are not allowed in strict mode.",K="Duplicate data property in object literal not allowed in strict mode",J="ILLEGAL",Q="Disabled.",Z=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),ee=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function te(e,t){if(!e)throw new Error("ASSERT: "+t)}function ne(e){return e>=48&&e<=57}function re(e){return"0123456789abcdefABCDEF".includes(e)}function ie(e){return"01234567".includes(e)}function ae(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e)}function oe(e){return 10===e||13===e||8232===e||8233===e}function se(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Z.test(String.fromCharCode(e))}function le(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&ee.test(String.fromCharCode(e))}const ue={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function ce(){for(;b1114111||"}"!==e)&&Ae({},z,J),t<=65535?String.fromCharCode(t):(n=55296+(t-65536>>10),r=56320+(t-65536&1023),String.fromCharCode(n,r))}function pe(){var e,t;for(e=v.charCodeAt(b++),t=String.fromCharCode(e),92===e&&(117!==v.charCodeAt(b)&&Ae({},z,J),++b,(e=de("u"))&&"\\"!==e&&se(e.charCodeAt(0))||Ae({},z,J),t=e);b>>="===(r=v.substr(b,4))?{type:k,value:r,start:i,end:b+=4}:">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?{type:k,value:n,start:i,end:b+=3}:o===(t=n.substr(0,2))[1]&&"+-<>&|".includes(o)||"=>"===t?{type:k,value:t,start:i,end:b+=2}:("//"===t&&Ae({},z,J),"<>=!+-*%&|^/".includes(o)?(++b,{type:k,value:o,start:i,end:b}):void Ae({},z,J))}function ge(){var e,t,n;if(te(ne((n=v[b]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),t=b,e="","."!==n){if(e=v[b++],n=v[b],"0"===e){if("x"===n||"X"===n)return++b,function(e){let t="";for(;b=w)return{type:S,start:b,end:b};const e=v.charCodeAt(b);return se(e)?(t=b,n=92===v.charCodeAt(b)?pe():function(){var e,t;for(e=b++;b(te(t=0&&Ae({},W,n),{value:n,literal:t}}(),o=function(e,t){let n=e;t.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,((e,t)=>{if(parseInt(t,16)<=1114111)return"x";Ae({},W)})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch(e){Ae({},W)}try{return new RegExp(e,t)}catch(e){return null}}(i.value,a.value),{literal:i.literal+a.literal,value:o,regex:{pattern:i.value,flags:a.value},start:r,end:b})),ve()):Ce(ye())}return n}function Pe(){const e=[];if(Te("("),!ke(")"))for(;b":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function Ue(){var e,t;return e=function(){var e,t,n,r,i,a,o,s,l,u;if(e=x,l=Le(),0===(i=Be(r=x)))return l;for(r.prec=i,ye(),t=[e,x],a=[l,r,o=Le()];(i=Be(x))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,l=a.pop(),t.pop(),n=be(s,l,o),a.push(n);(r=ye()).prec=i,a.push(r),t.push(x),n=Le(),a.push(n)}for(n=a[u=a.length-1],t.pop();u>1;)t.pop(),n=be(a[u-1].value,a[u-2],n),u-=2;return n}(),ke("?")&&(ye(),t=Ue(),Te(":"),e=function(e,t,n){const r=new m(F);return r.test=e,r.consequent=t,r.alternate=n,r}(e,t,Ue())),e}function ze(){const e=Ue();if(ke(","))throw new Error(Q);return e}function qe(e){b=0,w=(v=e).length,x=null,ve();const t=ze();if(x.type!==S)throw new Error("Unexpect token after expression.");return t}var je={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function He(e){function t(t,n,r){return i=>function(t,n,r,i){let a=e(n[0]);return r&&(a=r+"("+a+")",0===r.lastIndexOf("new ",0)&&(a="("+a+")")),a+"."+t+(i<0?"":0===i?"()":"("+n.slice(1).map(e).join(",")+")")}(t,i,n,r)}const n="new Date",i="String",a="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(t){t.length<3&&(0,r.error)("Missing arguments to clamp function."),t.length>3&&(0,r.error)("Too many arguments to clamp function.");const n=t.map(e);return"Math.max("+n[1]+", Math.min("+n[2]+","+n[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:n,date:t("getDate",n,0),day:t("getDay",n,0),year:t("getFullYear",n,0),month:t("getMonth",n,0),hours:t("getHours",n,0),minutes:t("getMinutes",n,0),seconds:t("getSeconds",n,0),milliseconds:t("getMilliseconds",n,0),time:t("getTime",n,0),timezoneoffset:t("getTimezoneOffset",n,0),utcdate:t("getUTCDate",n,0),utcday:t("getUTCDay",n,0),utcyear:t("getUTCFullYear",n,0),utcmonth:t("getUTCMonth",n,0),utchours:t("getUTCHours",n,0),utcminutes:t("getUTCMinutes",n,0),utcseconds:t("getUTCSeconds",n,0),utcmilliseconds:t("getUTCMilliseconds",n,0),length:t("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:t("toUpperCase",i,0),lower:t("toLowerCase",i,0),substring:t("substring",i),split:t("split",i),trim:t("trim",i,0),regexp:a,test:t("test",a),if:function(t){t.length<3&&(0,r.error)("Missing arguments to if function."),t.length>3&&(0,r.error)("Too many arguments to if function.");const n=t.map(e);return"("+n[0]+"?"+n[1]+":"+n[2]+")"}}}function Ge(e){const t=(e=e||{}).allowed?(0,r.toSet)(e.allowed):{},n=e.forbidden?(0,r.toSet)(e.forbidden):{},i=e.constants||je,a=(e.functions||He)(f),o=e.globalvar,s=e.fieldvar,l=(0,r.isFunction)(o)?o:e=>`${o}["${e}"]`;let u={},c={},d=0;function f(e){if((0,r.isString)(e))return e;const t=p[e.type];return null==t&&(0,r.error)("Unsupported type: "+e.type),t(e)}const p={Literal:e=>e.raw,Identifier:e=>{const a=e.name;return d>0?a:(0,r.hasOwnProperty)(n,a)?(0,r.error)("Illegal identifier: "+a):(0,r.hasOwnProperty)(i,a)?i[a]:(0,r.hasOwnProperty)(t,a)?a:(u[a]=1,l(a))},MemberExpression:e=>{const t=!e.computed,n=f(e.object);t&&(d+=1);const r=f(e.property);return n===s&&(c[function(e){const t=e&&e.length-1;return t&&('"'===e[0]&&'"'===e[t]||"'"===e[0]&&"'"===e[t])?e.slice(1,-1):e}(r)]=1),t&&(d-=1),n+(t?"."+r:"["+r+"]")},CallExpression:e=>{"Identifier"!==e.callee.type&&(0,r.error)("Illegal callee type: "+e.callee.type);const t=e.callee.name,n=e.arguments,i=(0,r.hasOwnProperty)(a,t)&&a[t];return i||(0,r.error)("Unrecognized function: "+t),(0,r.isFunction)(i)?i(n):i+"("+n.map(f).join(",")+")"},ArrayExpression:e=>"["+e.elements.map(f).join(",")+"]",BinaryExpression:e=>"("+f(e.left)+" "+e.operator+" "+f(e.right)+")",UnaryExpression:e=>"("+e.operator+f(e.argument)+")",ConditionalExpression:e=>"("+f(e.test)+"?"+f(e.consequent)+":"+f(e.alternate)+")",LogicalExpression:e=>"("+f(e.left)+e.operator+f(e.right)+")",ObjectExpression:e=>"{"+e.properties.map(f).join(",")+"}",Property:e=>{d+=1;const t=f(e.key);return d-=1,t+":"+f(e.value)}};function h(e){const t={code:f(e),globals:Object.keys(u),fields:Object.keys(c)};return u={},c={},t}return h.functions=a,h.constants=i,h}},65294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{force:()=>d});var r=n(24988),i=n(26372),a=n(14310);const o={center:a.forceCenter,collide:a.forceCollide,nbody:a.forceManyBody,link:a.forceLink,x:a.forceX,y:a.forceY},s="forces",l=["alpha","alphaMin","alphaTarget","velocityDecay","forces"],u=["static","iterations"],c=["x","y","vx","vy"];function d(e){r.Transform.call(this,null,e)}function f(e,t,n,r){var a,o,u,c,d=(0,i.array)(t.forces);for(a=0,o=l.length;at(e,n):t)}d.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30,expr:!0},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:c}]},(0,i.inherits)(d,r.Transform,{transform(e,t){var n,r,i=this.value,o=t.changed(t.ADD_REM),s=e.modified(l),c=e.iterations||300;if(i?(o&&(t.modifies("index"),i.nodes(t.source)),(s||t.changed(t.MOD))&&f(i,e,0,t)):(this.value=i=function(e,t){const n=(0,a.forceSimulation)(e),r=n.stop,i=n.restart;let o=!1;return n.stopped=()=>o,n.restart=()=>(o=!1,i()),n.stop=()=>(o=!0,r()),f(n,t,!0).on("end",(()=>o=!0))}(t.source,e),i.on("tick",(n=t.dataflow,r=this,()=>n.touch(r).run())),e.static||(o=!0,i.tick()),t.modifies("index")),s||o||e.modified(u)||t.changed()&&e.restart)if(i.alpha(Math.max(i.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(i.alphaMin(),1/c)),e.static)for(i.stop();--c>=0;)i.tick();else if(i.stopped()&&i.restart(),!o)return t.StopPropagation;return this.finish(e,t)},finish(e,t){const n=t.dataflow;for(let e,t=this._argops,l=0,u=t.length;l{"use strict";n.r(t),n.d(t,{defaultLocale:()=>E,locale:()=>x,numberFormatDefaultLocale:()=>h,numberFormatLocale:()=>p,resetDefaultLocale:()=>S,resetNumberFormatDefaultLocale:()=>f,resetTimeFormatDefaultLocale:()=>y,timeFormatDefaultLocale:()=>b,timeFormatLocale:()=>v});var r=n(61388),i=n(4710),a=n(71652),o=n(26372),s=n(98090);function l(e){const t={};return n=>t[n]||(t[n]=e(n))}function u(e){const t=l(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(e){const n=(0,i.formatSpecifier)(e||",");if(null==n.precision){switch(n.precision=12,n.type){case"%":n.precision-=2;break;case"e":n.precision-=1}return r=t(n),a=t(".1f")(1)[1],e=>{const t=r(e),n=t.indexOf(a);if(n<0)return t;let i=function(e,t){let n,r=e.lastIndexOf("e");if(r>0)return r;for(r=e.length;--r>t;)if(n=e.charCodeAt(r),n>=48&&n<=57)return r+1}(t,n);const o=in;)if("0"!==t[i]){++i;break}return t.slice(0,i)+o}}return t(n);var r,a},formatSpan(e,a,o,s){s=(0,i.formatSpecifier)(null==s?",f":s);const l=(0,r.tickStep)(e,a,o),u=Math.max(Math.abs(e),Math.abs(a));let c;if(null==s.precision)switch(s.type){case"s":return isNaN(c=(0,i.precisionPrefix)(l,u))||(s.precision=c),n(s,u);case"":case"e":case"g":case"p":case"r":isNaN(c=(0,i.precisionRound)(l,u))||(s.precision=c-("e"===s.type));break;case"f":case"%":isNaN(c=(0,i.precisionFixed)(l))||(s.precision=c-2*("%"===s.type))}return t(s)}}}let c,d;function f(){return c=u({format:i.format,formatPrefix:i.formatPrefix})}function p(e){return u((0,i.formatLocale)(e))}function h(e){return arguments.length?c=p(e):c}function g(e,t,n){n=n||{},(0,o.isObject)(n)||(0,o.error)(`Invalid time multi-format specifier: ${n}`);const r=t(a.SECONDS),i=t(a.MINUTES),s=t(a.HOURS),l=t(a.DATE),u=t(a.WEEK),c=t(a.MONTH),d=t(a.QUARTER),f=t(a.YEAR),p=e(n[a.MILLISECONDS]||".%L"),h=e(n[a.SECONDS]||":%S"),g=e(n[a.MINUTES]||"%I:%M"),m=e(n[a.HOURS]||"%I %p"),y=e(n[a.DATE]||n[a.DAY]||"%a %d"),v=e(n[a.WEEK]||"%b %d"),b=e(n[a.MONTH]||"%B"),w=e(n[a.QUARTER]||"%B"),x=e(n[a.YEAR]||"%Y");return e=>(r(e)(0,o.isString)(e)?t(e):g(t,a.timeInterval,e),utcFormat:e=>(0,o.isString)(e)?n(e):g(n,a.utcInterval,e),timeParse:l(e.parse),utcParse:l(e.utcParse)}}function y(){return d=m({format:s.timeFormat,parse:s.timeParse,utcFormat:s.utcFormat,utcParse:s.utcParse})}function v(e){return m((0,s.timeFormatLocale)(e))}function b(e){return arguments.length?d=v(e):d}f(),y();const w=(e,t)=>(0,o.extend)({},e,t);function x(e,t){const n=e?p(e):h(),r=t?v(t):b();return w(n,r)}function E(e,t){const n=arguments.length;return n&&2!==n&&(0,o.error)("defaultLocale expects either zero or two arguments."),n?w(h(e),b(t)):w(h(),b())}function S(){return f(),y(),E()}},31926:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DataPrefix:()=>D,IndexPrefix:()=>O,ScalePrefix:()=>N,SignalPrefix:()=>F,bandspace:()=>ge,bandwidth:()=>me,codeGenerator:()=>Be,codegenParams:()=>Le,containerSize:()=>Ne,contrast:()=>J,copy:()=>ye,data:()=>h,dataVisitor:()=>P,dayAbbrevFormat:()=>R,dayFormat:()=>k,debug:()=>Y,domain:()=>ve,encode:()=>y,expressionFunction:()=>Ue,format:()=>b,functionContext:()=>Pe,geoArea:()=>U,geoBounds:()=>z,geoCentroid:()=>q,geoScale:()=>j,geoShape:()=>Se,inScope:()=>H,indata:()=>g,indataVisitor:()=>M,indexof:()=>ce,info:()=>W,invert:()=>be,join:()=>ue,lastindexof:()=>de,luminance:()=>K,merge:()=>Q,modify:()=>ne,monthAbbrevFormat:()=>T,monthFormat:()=>C,parseExpression:()=>ze,pathShape:()=>_e,pinchAngle:()=>ie,pinchDistance:()=>re,pluck:()=>oe,range:()=>we,replace:()=>pe,reverse:()=>he,scale:()=>xe,scaleGradient:()=>Ee,scaleVisitor:()=>I,screen:()=>De,setdata:()=>m,slice:()=>fe,timeFormat:()=>w,timeParse:()=>E,treeAncestors:()=>ke,treePath:()=>Te,utcFormat:()=>x,utcParse:()=>S,warn:()=>V,windowSize:()=>Oe});var r=n(26372),i=n(21720),a=n(14588),o=n(51300),s=n(72090),l=n(24988),u=n(84636),c=n(76187),d=n(48872),f=n(71652),p=n(61388);function h(e){const t=this.context.data[e];return t?t.values.value:[]}function g(e,t,n){const r=this.context.data[e]["index:"+t],i=r?r.value.get(n):void 0;return i?i.count:i}function m(e,t){const n=this.context.dataflow,i=this.context.data[e].input;return n.pulse(i,n.changeset().remove(r.truthy).insert(t)),1}function y(e,t,n){if(e){const n=this.context.dataflow,r=e.mark.source;n.pulse(r,n.changeset().encode(e,t))}return void 0!==n?n:e}const v=e=>function(t,n){const r=this.context.dataflow.locale();return null===t?"null":r[e](n)(t)},b=v("format"),w=v("timeFormat"),x=v("utcFormat"),E=v("timeParse"),S=v("utcParse"),_=new Date(2e3,0,1);function A(e,t,n){return Number.isInteger(e)&&Number.isInteger(t)?(_.setYear(2e3),_.setMonth(e),_.setDate(t),w.call(this,_,n)):""}function C(e){return A.call(this,e,1,"%B")}function T(e){return A.call(this,e,1,"%b")}function k(e){return A.call(this,0,2+e,"%A")}function R(e){return A.call(this,0,2+e,"%a")}const D=":",O="@",N="%",F="$";function P(e,t,n,a){t[0].type!==i.Literal&&(0,r.error)("First argument to data functions must be a string literal.");const o=t[0].value,s=D+o;if(!(0,r.hasOwnProperty)(s,a))try{a[s]=n.getData(o).tuplesRef()}catch(e){}}function M(e,t,n,a){t[0].type!==i.Literal&&(0,r.error)("First argument to indata must be a string literal."),t[1].type!==i.Literal&&(0,r.error)("Second argument to indata must be a string literal.");const o=t[0].value,s=t[1].value,l=O+s;(0,r.hasOwnProperty)(l,a)||(a[l]=n.getData(o).indataRef(n,s))}function I(e,t,n,r){if(t[0].type===i.Literal)$(n,r,t[0].value);else for(e in n.scales)$(n,r,e)}function $(e,t,n){const i=N+n;if(!(0,r.hasOwnProperty)(t,i))try{t[i]=e.scaleRef(n)}catch(e){}}function L(e,t){if((0,r.isFunction)(e))return e;if((0,r.isString)(e)){const n=t.scales[e];return n&&(0,a.isRegisteredScale)(n.value)?n.value:void 0}}function B(e,t){return function(n,r,i){if(n){const t=L(n,(i||this).context);return t&&t.path[e](r)}return t(r)}}const U=B("area",o.geoArea),z=B("bounds",o.geoBounds),q=B("centroid",o.geoCentroid);function j(e,t){const n=L(e,(t||this).context);return n&&n.scale()}function H(e){const t=this.context.group;let n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n}function G(e,t,n){try{e[t].apply(e,["EXPRESSION"].concat([].slice.call(n)))}catch(t){e.warn(t)}return n[n.length-1]}function V(){return G(this.context.dataflow,"warn",arguments)}function W(){return G(this.context.dataflow,"info",arguments)}function Y(){return G(this.context.dataflow,"debug",arguments)}function X(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function K(e){const t=(0,s.rgb)(e);return.2126*X(t.r)+.7152*X(t.g)+.0722*X(t.b)}function J(e,t){const n=K(e),r=K(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Q(){const e=[].slice.call(arguments);return e.unshift({}),(0,r.extend)(...e)}function Z(e,t){return e===t||e!=e&&t!=t||((0,r.isArray)(e)?!(!(0,r.isArray)(t)||e.length!==t.length)&&function(e,t){for(let n=0,r=e.length;nee(e,t)}function ne(e,t,n,i,a,o){const s=this.context.dataflow,u=this.context.data[e],c=u.input,d=s.stamp();let f,p,h=u.changes;if(!1===s._trigger||!(c.value.length||t||i))return 0;if((!h||h.stamp{u.modified=!0,s.pulse(c,h).run()}),!0,1)),n&&(f=!0===n?r.truthy:(0,r.isArray)(n)||(0,l.isTuple)(n)?n:te(n),h.remove(f)),t&&h.insert(t),i&&(f=te(i),c.value.some(f)?h.remove(f):h.insert(i)),a)for(p in o)h.modify(a,p,o[p]);return 1}function re(e){const t=e.touches,n=t[0].clientX-t[1].clientX,r=t[0].clientY-t[1].clientY;return Math.hypot(n,r)}function ie(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)}const ae={};function oe(e,t){const n=ae[t]||(ae[t]=(0,r.field)(t));return(0,r.isArray)(e)?e.map(n):n(e)}function se(e){return(0,r.isArray)(e)||ArrayBuffer.isView(e)?e:null}function le(e){return se(e)||((0,r.isString)(e)?e:null)}function ue(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;rs.stop(f(t),e(t)))),s}function Se(e,t,n){const r=L(e,(n||this).context);return function(e){return r?r.path.context(e)(t):""}}function _e(e){let t=null;return function(n){return n?(0,u.pathRender)(n,t=t||(0,u.pathParse)(e)):e}}const Ae=e=>e.data;function Ce(e,t){const n=h.call(t,e);return n.root&&n.root.lookup||{}}function Te(e,t,n){const r=Ce(e,this),i=r[t],a=r[n];return i&&a?i.path(a).map(Ae):void 0}function ke(e,t){const n=Ce(e,this)[t];return n?n.ancestors().map(Ae):void 0}const Re=()=>"undefined"!=typeof window&&window||null;function De(){const e=Re();return e?e.screen:{}}function Oe(){const e=Re();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]}function Ne(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]}function Fe(e,t,n){if(!e)return[];const[i,a]=e,o=(new u.Bounds).set(i[0],i[1],a[0],a[1]),s=n||this.context.dataflow.scenegraph().root;return(0,u.intersect)(s,o,function(e){let t=null;if(e){const n=(0,r.array)(e.marktype),i=(0,r.array)(e.markname);t=e=>(!n.length||n.some((t=>e.marktype===t)))&&(!i.length||i.some((t=>e.name===t)))}return t}(t))}const Pe={random:()=>(0,d.random)(),cumulativeNormal:d.cumulativeNormal,cumulativeLogNormal:d.cumulativeLogNormal,cumulativeUniform:d.cumulativeUniform,densityNormal:d.densityNormal,densityLogNormal:d.densityLogNormal,densityUniform:d.densityUniform,quantileNormal:d.quantileNormal,quantileLogNormal:d.quantileLogNormal,quantileUniform:d.quantileUniform,sampleNormal:d.sampleNormal,sampleLogNormal:d.sampleLogNormal,sampleUniform:d.sampleUniform,isArray:r.isArray,isBoolean:r.isBoolean,isDate:r.isDate,isDefined:e=>void 0!==e,isNumber:r.isNumber,isObject:r.isObject,isRegExp:r.isRegExp,isString:r.isString,isTuple:l.isTuple,isValid:e=>null!=e&&e==e,toBoolean:r.toBoolean,toDate:e=>(0,r.toDate)(e),toNumber:r.toNumber,toString:r.toString,indexof:ce,join:ue,lastindexof:de,replace:pe,reverse:he,slice:fe,flush:r.flush,lerp:r.lerp,merge:Q,pad:r.pad,peek:r.peek,pluck:oe,span:r.span,inrange:r.inrange,truncate:r.truncate,rgb:s.rgb,lab:s.lab,hcl:s.hcl,hsl:s.hsl,luminance:K,contrast:J,sequence:p.range,format:b,utcFormat:x,utcParse:S,utcOffset:f.utcOffset,utcSequence:f.utcSequence,timeFormat:w,timeParse:E,timeOffset:f.timeOffset,timeSequence:f.timeSequence,timeUnitSpecifier:f.timeUnitSpecifier,monthFormat:C,monthAbbrevFormat:T,dayFormat:k,dayAbbrevFormat:R,quarter:r.quarter,utcquarter:r.utcquarter,week:f.week,utcweek:f.utcweek,dayofyear:f.dayofyear,utcdayofyear:f.utcdayofyear,warn:V,info:W,debug:Y,extent:e=>(0,r.extent)(e),inScope:H,intersect:Fe,clampRange:r.clampRange,pinchDistance:re,pinchAngle:ie,screen:De,containerSize:Ne,windowSize:Oe,bandspace:ge,setdata:m,pathShape:_e,panLinear:r.panLinear,panLog:r.panLog,panPow:r.panPow,panSymlog:r.panSymlog,zoomLinear:r.zoomLinear,zoomLog:r.zoomLog,zoomPow:r.zoomPow,zoomSymlog:r.zoomSymlog,encode:y,modify:ne,lassoAppend:function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5;const a=(e=(0,r.array)(e))[e.length-1];return void 0===a||Math.hypot(a[0]-t,a[1]-n)>i?[...e,[t,n]]:e},lassoPath:function(e){return(0,r.array)(e).reduce(((t,n,r)=>{let[i,a]=n;return t+(0==r?`M ${i},${a} `:r===e.length-1?" Z":`L ${i},${a} `)}),"")},intersectLasso:function(e,t,n){const{x:r,y:i,mark:a}=n,o=(new u.Bounds).set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[e,n]of t)eo.x2&&(o.x2=e),no.y2&&(o.y2=n);return o.translate(r,i),Fe([[o.x1,o.y1],[o.x2,o.y2]],e,a).filter((e=>function(e,t,n){let r=0;for(let i=0,a=n.length-1;it!=s>t&&e<(o-l)*(t-u)/(s-u)+l&&r++}return 1&r}(e.x,e.y,t)))}},Me=["view","item","group","xy","x","y"],Ie="this.",$e={},Le={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>`_[${(0,r.stringValue)(F+e)}]`,functions:function(e){const t=(0,i.functions)(e);Me.forEach((e=>t[e]="event.vega."+e));for(const e in Pe)t[e]=Ie+e;return(0,r.extend)(t,function(e,t,n){t.__bandwidth=e=>e&&e.bandwidth?e.bandwidth():0,n._bandwidth=I,n._range=I,n._scale=I;const a=t=>"_["+(t.type===i.Literal?(0,r.stringValue)(N+t.value):(0,r.stringValue)(N)+"+"+e(t))+"]";return{_bandwidth:e=>`this.__bandwidth(${a(e[0])})`,_range:e=>`${a(e[0])}.range()`,_scale:t=>`${a(t[0])}(${e(t[1])})`}}(e,Pe,$e)),t},constants:i.constants,visitors:$e},Be=(0,i.codegenExpression)(Le);function Ue(e,t,n){return 1===arguments.length?Pe[e]:(Pe[e]=t,n&&($e[e]=n),Be&&(Be.functions[e]=Ie+e),this)}function ze(e,t){const n={};let a;try{e=(0,r.isString)(e)?e:(0,r.stringValue)(e)+"",a=(0,i.parseExpression)(e)}catch(t){(0,r.error)("Expression parse error: "+e)}a.visit((e=>{if(e.type!==i.CallExpression)return;const r=e.callee.name,a=Le.visitors[r];a&&a(r,e.arguments,t,n)}));const o=Be(a);return o.globals.forEach((e=>{const i=F+e;!(0,r.hasOwnProperty)(n,i)&&t.getSignal(e)&&(n[i]=t.signalRef(e))})),{$expr:(0,r.extend)({code:o.code},t.options.ast?{ast:a}:null),$fields:o.fields,$params:n}}Ue("bandwidth",me,I),Ue("copy",ye,I),Ue("domain",ve,I),Ue("range",we,I),Ue("invert",be,I),Ue("scale",xe,I),Ue("gradient",Ee,I),Ue("geoArea",U,I),Ue("geoBounds",z,I),Ue("geoCentroid",q,I),Ue("geoShape",Se,I),Ue("geoScale",j,I),Ue("indata",g,M),Ue("data",h,P),Ue("treePath",Te,P),Ue("treeAncestors",ke,P),Ue("vlSelectionTest",c.selectionTest,c.selectionVisitor),Ue("vlSelectionIdTest",c.selectionIdTest,c.selectionVisitor),Ue("vlSelectionResolve",c.selectionResolve,c.selectionVisitor),Ue("vlSelectionTuples",c.selectionTuples)},35886:(e,t,n)=>{"use strict";n.r(t),n.d(t,{contour:()=>k,geojson:()=>O,geopath:()=>N,geopoint:()=>F,geoshape:()=>P,graticule:()=>M,heatmap:()=>I,isocontour:()=>v,kde2d:()=>A,projection:()=>L});var r=n(24988),i=n(26372),a=n(61388),o=n(48872),s=n(63316),l=n(51300),u=n(72090),c=n(14958);function d(){}const f=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function p(){var e=1,t=1,n=s;function r(e,t){return t.map((t=>a(e,t)))}function a(r,i){var a=[],s=[];return function(n,r,i){var a,s,l,u,c,d,p=[],h=[];for(a=s=-1,u=n[0]>=r,f[u<<1].forEach(g);++a=r,f[l|u<<1].forEach(g);for(f[0|u].forEach(g);++s=r,c=n[s*e]>=r,f[u<<1|c<<2].forEach(g);++a=r,d=c,c=n[s*e+a+1]>=r,f[l|u<<1|c<<2|d<<3].forEach(g);f[u|c<<3].forEach(g)}for(a=-1,c=n[s*e]>=r,f[c<<2].forEach(g);++a=r,f[c<<2|d<<3].forEach(g);function g(e){var t,n,r=[e[0][0]+a,e[0][1]+s],l=[e[1][0]+a,e[1][1]+s],u=o(r),c=o(l);(t=h[u])?(n=p[c])?(delete h[t.end],delete p[n.start],t===n?(t.ring.push(l),i(t.ring)):p[t.start]=h[n.end]={start:t.start,end:n.end,ring:t.ring.concat(n.ring)}):(delete h[t.end],t.ring.push(l),h[t.end=c]=t):(t=p[c])?(n=h[u])?(delete p[t.start],delete h[n.end],t===n?(t.ring.push(l),i(t.ring)):p[n.start]=h[t.end]={start:n.start,end:t.end,ring:n.ring.concat(t.ring)}):(delete p[t.start],t.ring.unshift(r),p[t.start=u]=t):p[u]=h[c]={start:u,end:c,ring:[r,l]}}f[c<<3].forEach(g)}(r,i,(e=>{n(e,r,i),function(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t0?a.push([e]):s.push(e)})),s.forEach((e=>{for(var t,n=0,r=a.length;n{var a,o=n[0],s=n[1],l=0|o,u=0|s,c=r[u*e+l];o>0&&o0&&s=0&&o>=0||(0,i.error)("invalid size"),e=a,t=o,r},r.smooth=function(e){return arguments.length?(n=e?s:d,r):n===s},r}function h(e,t){for(var n,r=-1,i=t.length;++rr!=p>r&&n<(f-u)*(r-c)/(p-c)+u&&(i=-i)}return i}function m(e,t,n){var r,i,a,o;return function(e,t,n){return(t[0]-e[0])*(n[1]-e[1])==(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&(i=e[r=+(e[0]===t[0])],a=n[r],o=t[r],i<=a&&a<=o||o<=a&&a<=i)}function y(e,t,n){return function(r){var o=(0,i.extent)(r),s=n?Math.min(o[0],0):o[0],l=o[1],u=l-s,c=t?(0,a.tickStep)(s,l,e):u/(e+1);return(0,a.range)(s+c,l,c)}}function v(e){r.Transform.call(this,null,e)}function b(e,t,n,r,i){const a=e.x1||0,o=e.y1||0,s=t*n<0;function l(e){e.forEach(u)}function u(e){s&&e.reverse(),e.forEach(c)}function c(e){e[0]=(e[0]-a)*t+r,e[1]=(e[1]-o)*n+i}return function(e){return e.coordinates.forEach(l),e}}function w(e,t,n){const r=e>=0?e:(0,o.bandwidthNRD)(t,n);return Math.round((Math.sqrt(4*r*r+1)-1)/2)}function x(e){return(0,i.isFunction)(e)?e:(0,i.constant)(+e)}function E(){var e=e=>e[0],t=e=>e[1],n=i.one,r=[-1,-1],o=960,s=500,l=2;function u(i,u){const c=w(r[0],i,e)>>l,d=w(r[1],i,t)>>l,f=c?c+2:0,p=d?d+2:0,h=2*f+(o>>l),g=2*p+(s>>l),m=new Float32Array(h*g),y=new Float32Array(h*g);let v=m;i.forEach((r=>{const i=f+(+e(r)>>l),a=p+(+t(r)>>l);i>=0&&i=0&&a0&&d>0?(S(h,g,m,y,c),_(h,g,y,m,d),S(h,g,m,y,c),_(h,g,y,m,d),S(h,g,m,y,c),_(h,g,y,m,d)):c>0?(S(h,g,m,y,c),S(h,g,y,m,c),S(h,g,m,y,c),v=y):d>0&&(_(h,g,m,y,d),_(h,g,y,m,d),_(h,g,m,y,d),v=y);const b=u?Math.pow(2,-2*l):1/(0,a.sum)(v);for(let e=0,t=h*g;e>l),y2:p+(s>>l)}}return u.x=function(t){return arguments.length?(e=x(t),u):e},u.y=function(e){return arguments.length?(t=x(e),u):t},u.weight=function(e){return arguments.length?(n=x(e),u):n},u.size=function(e){if(!arguments.length)return[o,s];var t=+e[0],n=+e[1];return t>=0&&n>=0||(0,i.error)("invalid size"),o=t,s=n,u},u.cellSize=function(e){return arguments.length?((e=+e)>=1||(0,i.error)("invalid cell size"),l=Math.floor(Math.log(e)/Math.LN2),u):1<=i&&(t>=a&&(s-=n[t-a+o*e]),r[t-i+o*e]=s/Math.min(t+1,e-1+a-t,a))}function _(e,t,n,r,i){const a=1+(i<<1);for(let o=0;o=i&&(s>=a&&(l-=n[o+(s-a)*e]),r[o+(s-i)*e]=l/Math.min(s+1,t-1+a-s,a))}function A(e){r.Transform.call(this,null,e)}v.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},(0,i.inherits)(v,r.Transform,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=t.materialize(t.SOURCE).source,s=e.field||i.identity,l=p().smooth(!1!==e.smooth),u=e.thresholds||function(e,t,n){const r=y(n.levels||10,n.nice,!1!==n.zero);return"shared"!==n.resolve?r:r(e.map((e=>(0,a.max)(t(e).values))))}(o,s,e),c=null===e.as?null:e.as||"contour",d=[];return o.forEach((t=>{const n=s(t),a=l.size([n.width,n.height])(n.values,(0,i.isArray)(u)?u:u(n.values));!function(e,t,n,r){let a=r.scale||t.scale,o=r.translate||t.translate;if((0,i.isFunction)(a)&&(a=a(n,r)),(0,i.isFunction)(o)&&(o=o(n,r)),(1===a||null==a)&&!o)return;const s=((0,i.isNumber)(a)?a:a[0])||1,l=((0,i.isNumber)(a)?a:a[1])||1,u=o&&o[0]||0,c=o&&o[1]||0;e.forEach(b(t,s,l,u,c))}(a,n,t,e),a.forEach((e=>{d.push((0,r.rederive)(t,(0,r.ingest)(null!=c?{[c]:e}:e)))}))})),this.value&&(n.rem=this.value),this.value=n.source=n.add=d,n}}),A.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const C=["x","y","weight","size","cellSize","bandwidth"];function T(e,t){return C.forEach((n=>null!=t[n]?e[n](t[n]):0)),e}function k(e){r.Transform.call(this,null,e)}(0,i.inherits)(A,r.Transform,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n,a=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=function(e,t){var n,r,i,a,o,s,l=[],u=e=>e(a);if(null==t)l.push(e);else for(n={},r=0,i=e.length;r(0,r.ingest)(function(e,t){for(let n=0;nr.push(u(e)))),s&&l&&(t.visit(c,(e=>{var t=s(e),n=l(e);null!=t&&null!=n&&(t=+t)===t&&(n=+n)===n&&a.push([t,n])})),r=r.concat({type:R,geometry:{type:"MultiPoint",coordinates:a}})),this.value={type:D,features:r}}}),N.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},(0,i.inherits)(N,r.Transform,{transform(e,t){var n=t.fork(t.ALL),r=this.value,a=e.field||i.identity,o=e.as||"path",l=n.SOURCE;!r||e.modified()?(this.value=r=(0,s.getProjectionPath)(e.projection),n.materialize().reflow()):l=a===i.identity||t.modified(a.fields)?n.ADD_MOD:n.ADD;const u=function(e,t){const n=e.pointRadius();return e.context(null),null!=t&&e.pointRadius(t),n}(r,e.pointRadius);return n.visit(l,(e=>e[o]=r(a(e)))),r.pointRadius(u),n.modifies(o)}}),F.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},(0,i.inherits)(F,r.Transform,{transform(e,t){var n,r=e.projection,i=e.fields[0],a=e.fields[1],o=e.as||["x","y"],s=o[0],l=o[1];function u(e){const t=r([i(e),a(e)]);t?(e[s]=t[0],e[l]=t[1]):(e[s]=void 0,e[l]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,u):(n=t.modified(i.fields)||t.modified(a.fields),t.visit(n?t.ADD_MOD:t.ADD,u)),t.modifies(o)}}),P.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},(0,i.inherits)(P,r.Transform,{transform(e,t){var n=t.fork(t.ALL),r=this.value,a=e.as||"shape",o=n.ADD;return r&&!e.modified()||(this.value=r=function(e,t,n){const r=null==n?n=>e(t(n)):r=>{var i=e.pointRadius(),a=e.pointRadius(n)(t(r));return e.pointRadius(i),a};return r.context=t=>(e.context(t),r),r}((0,s.getProjectionPath)(e.projection),e.field||(0,i.field)("datum"),e.pointRadius),n.materialize().reflow(),o=n.SOURCE),n.visit(o,(e=>e[a]=r)),n.modifies(a)}}),M.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},(0,i.inherits)(M,r.Transform,{transform(e,t){var n,a=this.value,o=this.generator;if(!a.length||e.modified())for(const t in e)(0,i.isFunction)(o[t])&&o[t](e[t]);return n=o(),a.length?t.mod.push((0,r.replace)(a[0],n)):t.add.push((0,r.ingest)(n)),a[0]=n,t}}),I.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},(0,i.inherits)(I,r.Transform,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,r="shared"===e.resolve,o=e.field||i.identity,s=function(e,t){let n;return(0,i.isFunction)(e)?(n=n=>e(n,t),n.dep=$(e)):e?n=(0,i.constant)(e):(n=e=>e.$value/e.$max||0,n.dep=!0),n}(e.opacity,e),l=function(e,t){let n;return(0,i.isFunction)(e)?(n=n=>(0,u.rgb)(e(n,t)),n.dep=$(e)):n=(0,i.constant)((0,u.rgb)(e||"#888")),n}(e.color,e),d=e.as||"image",f={$x:0,$y:0,$value:0,$max:r?(0,a.max)(n.map((e=>(0,a.max)(o(e).values)))):0};return n.forEach((e=>{const t=o(e),n=(0,i.extend)({},e,f);r||(n.$max=(0,a.max)(t.values||[])),e[d]=function(e,t,n,r){const a=e.width,o=e.height,s=e.x1||0,l=e.y1||0,u=e.x2||a,d=e.y2||o,f=e.values,p=f?e=>f[e]:i.zero,h=(0,c.canvas)(u-s,d-l),g=h.getContext("2d"),m=g.getImageData(0,0,u-s,d-l),y=m.data;for(let e=l,i=0;e{null!=e[t]&&B(n,t,e[t])}))):s.projectionProperties.forEach((t=>{e.modified(t)&&B(n,t,e[t])})),null!=e.pointRadius&&n.path.pointRadius(e.pointRadius),e.fit&&function(e,t){const n=function(e){return 1===(e=(0,i.array)(e)).length?e[0]:{type:D,features:e.reduce(((e,t)=>e.concat(function(e){return e.type===D?e.features:(0,i.array)(e).filter((e=>null!=e)).map((e=>e.type===R?e:{type:R,geometry:e}))}(t))),[])}}(t.fit);t.extent?e.fitExtent(t.extent,n):t.size&&e.fitSize(t.size,n)}(n,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}})},91434:(e,t,n)=>{"use strict";n.r(t),n.d(t,{nest:()=>s,pack:()=>p,partition:()=>g,stratify:()=>m,tree:()=>b,treelinks:()=>w,treemap:()=>S});var r=n(24988),i=n(26372),a=n(37750);function o(e,t,n){const r={};return e.each((e=>{const i=e.data;n(i)&&(r[t(i)]=e)})),e.lookup=r,e}function s(e){r.Transform.call(this,null,e)}s.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const l=e=>e.values;function u(){const e=[],t={entries:e=>r(n(e,0),0),key:n=>(e.push(n),t)};function n(t,r){if(r>=e.length)return t;const i=t.length,a=e[r++],o={},s={};let l,u,c,d=-1;for(;++de.length)return t;const i=[];for(const e in t)i.push({key:e,values:r(t[e],n)});return i}return t}function c(e){r.Transform.call(this,null,e)}(0,i.inherits)(s,r.Transform,{transform(e,t){t.source||(0,i.error)("Nest transform requires an upstream data source.");var n=e.generate,s=e.modified(),c=t.clone(),d=this.value;return(!d||s||t.changed())&&(d&&d.each((e=>{e.children&&(0,r.isTuple)(e.data)&&c.rem.push(e.data)})),this.value=d=(0,a.hierarchy)({values:(0,i.array)(e.keys).reduce(((e,t)=>(e.key(t),e)),u()).entries(c.source)},l),n&&d.each((e=>{e.children&&(e=(0,r.ingest)(e.data),c.add.push(e),c.source.push(e))})),o(d,r.tupleid,r.tupleid)),c.source.root=d,c}});const d=(e,t)=>e.parent===t.parent?1:2;(0,i.inherits)(c,r.Transform,{transform(e,t){t.source&&t.source.root||(0,i.error)(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(e.method),a=this.fields,o=t.source.root,s=e.as||a;e.field?o.sum(e.field):o.count(),e.sort&&o.sort((0,r.stableCompare)(e.sort,(e=>e.data))),function(e,t,n){for(let r,i=0,a=t.length;ifunction(e,t,n){const r=e.data,i=t.length-1;for(let a=0;as[(0,r.tupleid)(e)]=1)),a.each((e=>{const t=e.data,n=e.parent&&e.parent.data;n&&s[(0,r.tupleid)(t)]&&s[(0,r.tupleid)(n)]&&o.add.push((0,r.ingest)({source:n,target:t}))})),this.value=o.add):t.changed(t.MOD)&&(t.visit(t.MOD,(e=>s[(0,r.tupleid)(e)]=1)),n.forEach((e=>{(s[(0,r.tupleid)(e.source)]||s[(0,r.tupleid)(e.target)])&&o.mod.push(e)}))),o}});const x={binary:a.treemapBinary,dice:a.treemapDice,slice:a.treemapSlice,slicedice:a.treemapSliceDice,squarify:a.treemapSquarify,resquarify:a.treemapResquarify},E=["x0","y0","x1","y1","depth","children"];function S(e){c.call(this,e)}S.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:E.length,default:E}]},(0,i.inherits)(S,c,{layout(){const e=(0,a.treemap)();return e.ratio=t=>{const n=e.tile();n.ratio&&e.tile(n.ratio(t))},e.method=t=>{(0,i.hasOwnProperty)(x,t)?e.tile(x[t]):(0,i.error)("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:E})},48196:(e,t,n)=>{"use strict";n.r(t),n.d(t,{expressionInterpreter:()=>p});var r={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},i={"*":(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)=>ee<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},a={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const o=Array.prototype.slice,s=(e,t,n)=>{const r=n?n(t[0]):t[0];return r[e].apply(r,o.call(t,1))};var l={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:(e,t,n,r,i,a,o)=>new Date(e,t||0,null!=n?n:1,r||0,i||0,a||0,o||0),date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return s("join",arguments)},indexof:function(){return s("indexOf",arguments)},lastindexof:function(){return s("lastIndexOf",arguments)},slice:function(){return s("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return s("substring",arguments,String)},split:function(){return s("split",arguments,String)},replace:function(){return s("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const u=["view","item","group","xy","x","y"],c=new Set([Function,eval,setTimeout,setInterval]);"function"==typeof setImmediate&&c.add(setImmediate);const d={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:"datum"===n?e.datum:"event"===n?e.event:"item"===n?e.item:r[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,r=e(t.object);n&&(e.memberDepth+=1);const i=e(t.property);if(n&&(e.memberDepth-=1),!c.has(r[i]))return r[i];console.error(`Prevented interpretation of member "${i}" which could lead to insecure code execution`)},CallExpression:(e,t)=>{const n=t.arguments;let r=t.callee.name;return r.startsWith("_")&&(r=r.slice(1)),"if"===r?e(n[0])?e(n[1]):e(n[2]):(e.fn[r]||l[r]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>i[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>a[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>"&&"===t.operator?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce(((t,n)=>{e.memberDepth+=1;const r=e(n.key);return e.memberDepth-=1,c.has(e(n.value))?console.error(`Prevented interpretation of property "${r}" which could lead to insecure code execution`):t[r]=e(n.value),t}),{})};function f(e,t,n,r,i,a){const o=e=>d[e.type](o,e);return o.memberDepth=0,o.fn=Object.create(t),o.params=n,o.datum=r,o.event=i,o.item=a,u.forEach((e=>o.fn[e]=function(){return i.vega[e](...arguments)})),o(e)}var p={operator(e,t){const n=t.ast,r=e.functions;return e=>f(n,r,e)},parameter(e,t){const n=t.ast,r=e.functions;return(e,t)=>f(n,r,t,e)},event(e,t){const n=t.ast,r=e.functions;return e=>f(n,r,void 0,void 0,e)},handler(e,t){const n=t.ast,r=e.functions;return(e,t)=>{const i=t.item&&t.item.datum;return f(n,r,e,i,t)}},encode(e,t){const{marktype:n,channels:r}=t,i=e.functions,a="group"===n||"image"===n||"rect"===n;return(e,t)=>{const o=e.datum;let s,l=0;for(const n in r)s=f(r[n].ast,i,t,o,void 0,e),e[n]!==s&&(e[n]=s,l=1);return"rule"!==n&&function(e,t,n){let r;t.x2&&(t.x?(n&&e.x>e.x2&&(r=e.x,e.x=e.x2,e.x2=r),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(r=e.y,e.y=e.y2,e.y2=r),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.height||0)/2)}(e,r,a),l}}}},43308:(e,t,n)=>{"use strict";n.r(t),n.d(t,{label:()=>C});var r=n(84636),i=n(14958),a=n(24988),o=n(26372);const s=4278190080;function l(e,t,n){return new Uint32Array(e.getImageData(0,0,t,n).data.buffer)}function u(e,t,n){if(!t.length)return;const i=t[0].mark.marktype;"group"===i?t.forEach((t=>{t.items.forEach((t=>u(e,t.items,n)))})):r.Marks[i].draw(e,{items:n?t.map(c):t})}function c(e){const t=(0,a.rederive)(e,{});return t.stroke&&0!==t.strokeOpacity||t.fill&&0!==t.fillOpacity?{...t,strokeOpacity:1,stroke:"#000",fillOpacity:0}:t}const d=31,f=new Uint32Array(33),p=new Uint32Array(33);p[0]=0,f[0]=~p[0];for(let e=1;e<=32;++e)p[e]=p[e-1]<<1|1,f[e]=~p[e];function h(e,t,n,r,i,a){let o=n/2;return e-o<0||e+o>i||t-(o=r/2)<0||t+o>a}function g(e,t,n,r,i,a,o,s){const l=i*a/(2*r),u=e(t-l),c=e(t+l),d=e(n-(a/=2)),f=e(n+a);return o.outOfBounds(u,d,c,f)||o.getRange(u,d,c,f)||s&&s.getRange(u,d,c,f)}const m=[-1,-1,1,1],y=[-1,1,-1,1],v=["right","center","left"],b=["bottom","middle","top"];function w(e,t,n,r,i,a,o,s,l,u,c,d){return!(i.outOfBounds(e,n,t,r)||(d&&a||i).getRange(e,n,t,r))}const x={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},E={naive:function(e,t,n,i){const a=e.width,o=e.height;return function(e){const t=e.datum.datum.items[i].items,n=t.length,s=e.datum.fontSize,l=r.textMetrics.width(e.datum,e.datum.text);let u,c,d,f,p,h,g,m=0;for(let r=0;r=m&&(m=g,e.x=p,e.y=h);return p=l/2,h=s/2,u=e.x-p,c=e.x+p,d=e.y-h,f=e.y+h,e.align="center",u<0&&c<=a?e.align="left":0<=u&&a=1;)f=(p+m)/2,g(e,c,d,u,i,f,s,l)?m=f:p=f;if(p>r)return[c,d,p,!0]}}return function(t){const l=t.datum.datum.items[i].items,c=l.length,d=t.datum.fontSize,f=r.textMetrics.width(t.datum,t.datum.text);let p,m,y,v,b,w,x,E,S,_,A,C,T,k,R,D,O,N=n?d:0,F=!1,P=!1,M=0;for(let r=0;rm&&(O=p,p=m,m=O),y>v&&(O=y,y=v,v=O),S=e(p),A=e(m),_=~~((S+A)/2),C=e(y),k=e(v),T=~~((C+k)/2),x=_;x>=S;--x)for(E=T;E>=C;--E)D=u(x,E,N,f,d),D&&([t.x,t.y,N,F]=D);for(x=_;x<=A;++x)for(E=T;E<=k;++E)D=u(x,E,N,f,d),D&&([t.x,t.y,N,F]=D);F||n||(R=Math.abs(m-p+v-y),b=(p+m)/2,w=(y+v)/2,R>=M&&!h(b,w,f,d,a,o)&&!g(e,b,w,d,f,d,s,null)&&(M=R,t.x=b,t.y=w,P=!0))}return!(!F&&!P||(b=f/2,w=d/2,s.setRange(e(t.x-b),e(t.y-w),e(t.x+b),e(t.y+w)),t.align="center",t.baseline="middle",0))}},floodfill:function(e,t,n,i){const a=e.width,o=e.height,s=t[0],l=t[1],u=e.bitmap();return function(t){const c=t.datum.datum.items[i].items,d=c.length,f=t.datum.fontSize,p=r.textMetrics.width(t.datum,t.datum.text),v=[];let b,w,x,E,S,_,A,C,T,k,R,D,O=n?f:0,N=!1,F=!1,P=0;for(let r=0;r=1;)R=(T+k)/2,g(e,S,_,f,p,R,s,l)?k=R:T=R;T>O&&(t.x=S,t.y=_,O=T,N=!0)}}N||n||(D=Math.abs(w-b+E-x),S=(b+w)/2,_=(x+E)/2,D>=P&&!h(S,_,p,f,a,o)&&!g(e,S,_,f,p,f,s,null)&&(P=D,t.x=S,t.y=_,F=!0))}return!(!N&&!F||(S=p/2,_=f/2,s.setRange(e(t.x-S),e(t.y-_),e(t.x+S),e(t.y+_)),t.align="center",t.baseline="middle",0))}}};function S(e,t,n,a,o,c,h,g,m,y,S){if(!e.length)return e;const _=Math.max(a.length,o.length),A=function(e,t){const n=new Float64Array(t),r=e.length;for(let t=0;t[e.x,e.x,e.x,e.y,e.y,e.y];return e?"line"===e||"area"===e?e=>i(e.datum):"line"===t?e=>{const t=e.datum.items[r].items;return i(t.length?t["start"===n?0:t.length-1]:{x:NaN,y:NaN})}:e=>{const t=e.datum.bounds;return[t.x1,(t.x1+t.x2)/2,t.x2,t.y1,(t.y1+t.y2)/2,t.y2]}:i}(T,k,g,m),O=null===y||y===1/0,N=R&&"naive"===S;var F;let P=-1,M=-1;const I=e.map((e=>{const t=O?r.textMetrics.width(e,e.text):void 0;return P=Math.max(P,t),M=Math.max(M,e.fontSize),{datum:e,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:D(e),textWidth:t}}));y=null===y||y===1/0?Math.max(P,M)+Math.max(...a):y;const $=function(e,t,n){const r=Math.max(1,Math.sqrt(e*t/1e6)),i=~~((e+2*n+r)/r),a=~~((t+2*n+r)/r),o=e=>~~((e+n)/r);return o.invert=e=>e*r-n,o.bitmap=()=>function(e,t){const n=new Uint32Array(~~((e*t+32)/32));function r(e,t){n[e]|=t}function i(e,t){n[e]&=t}return{array:n,get:(t,r)=>{const i=r*e+t;return n[i>>>5]&1<<(i&d)},set:(t,n)=>{const i=n*e+t;r(i>>>5,1<<(i&d))},clear:(t,n)=>{const r=n*e+t;i(r>>>5,~(1<<(r&d)))},getRange:(t,r,i,a)=>{let o,s,l,u,c=a;for(;c>=r;--c)if(o=c*e+t,s=c*e+i,l=o>>>5,u=s>>>5,l===u){if(n[l]&f[o&d]&p[1+(s&d)])return!0}else{if(n[l]&f[o&d])return!0;if(n[u]&p[1+(s&d)])return!0;for(let e=l+1;e{let o,s,l,u,c;for(;n<=a;++n)if(o=n*e+t,s=n*e+i,l=o>>>5,u=s>>>5,l===u)r(l,f[o&d]&p[1+(s&d)]);else for(r(l,f[o&d]),r(u,p[1+(s&d)]),c=l+1;c{let o,s,l,u,c;for(;n<=a;++n)if(o=n*e+t,s=n*e+r,l=o>>>5,u=s>>>5,l===u)i(l,p[o&d]|f[1+(s&d)]);else for(i(l,p[o&d]),i(u,f[1+(s&d)]),c=l+1;cn<0||r<0||a>=t||i>=e}}(i,a),o.ratio=r,o.padding=n,o.width=e,o.height=t,o}(t[0],t[1],y);let L;if(!N){n&&I.sort(((e,t)=>n(e.datum,t.datum)));let t=!1;for(let e=0;ee.datum));L=c.length||r?function(e,t,n,r,a){const o=e.width,c=e.height,d=r||a,f=(0,i.canvas)(o,c).getContext("2d"),p=(0,i.canvas)(o,c).getContext("2d"),h=d&&(0,i.canvas)(o,c).getContext("2d");n.forEach((e=>u(f,e,!1))),u(p,t,!1),d&&u(h,t,!0);const g=l(f,o,c),m=l(p,o,c),y=d&&l(h,o,c),v=e.bitmap(),b=d&&e.bitmap();let w,x,E,S,_,A,C,T;for(x=0;xn.set(e(t.boundary[0]),e(t.boundary[3])))),[n,void 0]}($,h&&I)}const B=R?E[S]($,L,h,m):function(e,t,n,i){const a=e.width,o=e.height,s=t[0],l=t[1],u=i.length;return function(t){const c=t.boundary,d=t.datum.fontSize;if(c[2]<0||c[5]<0||c[0]>a||c[3]>o)return!1;let f,p,h,g,m,y,x,E,S,_,A,C,T,k,R,D=t.textWidth??0;for(let a=0;a>>2&3)-1,h=0===f&&0===p||i[a]<0,g=f&&p?Math.SQRT1_2:1,m=i[a]<0?-1:1,y=c[1+f]+i[a]*f*g,A=c[4+p]+m*d*p/2+i[a]*p*g,E=A-d/2,S=A+d/2,C=e(y),k=e(E),R=e(S),!D){if(!w(C,C,k,R,s,l,0,0,0,0,0,h))continue;D=r.textMetrics.width(t.datum,t.datum.text)}if(_=y+m*D*f/2,y=_-D/2,x=_+D/2,C=e(y),T=e(x),w(C,T,k,R,s,l,0,0,0,0,0,h))return t.x=f?f*m<0?x:y:_,t.y=p?p*m<0?S:E:A,t.align=v[f*m+1],t.baseline=b[p*m+1],s.setRange(C,k,T,R),!0}return!1}}($,L,C,A);return I.forEach((e=>e.opacity=+B(e))),I}const _=["x","y","opacity","align","baseline"],A=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function C(e){a.Transform.call(this,null,e)}C.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:A},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:_.length,default:_}]},(0,o.inherits)(C,a.Transform,{transform(e,t){const n=e.modified();if(!(n||t.changed(t.ADD_REM)||function(){const n=e.sort;return(0,o.isFunction)(n)&&t.modified(n.fields)}()))return;e.size&&2===e.size.length||(0,o.error)("Size parameter should be specified as a [width, height] array.");const r=e.as||_;return S(t.materialize(t.SOURCE).source||[],e.size,e.sort,(0,o.array)(null==e.offset?1:e.offset),(0,o.array)(e.anchor||A),e.avoidMarks||[],!1!==e.avoidBaseMark,e.lineAnchor||"end",e.markIndex||0,void 0===e.padding?0:e.padding,e.method||"naive").forEach((e=>{const t=e.datum;t[r[0]]=e.x,t[r[1]]=e.y,t[r[2]]=e.opacity,t[r[3]]=e.align,t[r[4]]=e.baseline})),t.reflow(n).modifies(r)}})},54814:(e,t,n)=>{"use strict";n.r(t),n.d(t,{COUNTING_OPS:()=>c,MULTIDOMAIN_SORT_OP_INDEX:()=>o,SHARED_DOMAIN_OPS:()=>h,SUM_OPS:()=>p,isAggregateOp:()=>u,isArgmaxDef:()=>l,isArgminDef:()=>s,isCountingAggregateOp:()=>d,isMinMaxOp:()=>f});var r=n(26372),i=n(79989);const a={argmax:1,argmin:1,average:1,count:1,distinct:1,exponential:1,exponentialb:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},o={count:1,min:1,max:1};function s(e){return(0,i.hasProperty)(e,"argmin")}function l(e){return(0,i.hasProperty)(e,"argmax")}function u(e){return(0,r.isString)(e)&&(0,r.hasOwnProperty)(a,e)}const c=new Set(["count","valid","missing","distinct"]);function d(e){return(0,r.isString)(e)&&c.has(e)}function f(e){return(0,r.isString)(e)&&(0,i.contains)(["min","max"],e)}const p=new Set(["count","sum","distinct","valid","missing"]),h=new Set(["mean","average","median","q1","q3","min","max"])},65032:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AXIS_CONFIGS:()=>p,AXIS_PARTS:()=>s,AXIS_PROPERTIES:()=>f,AXIS_PROPERTY_TYPE:()=>l,COMMON_AXIS_PROPERTIES_INDEX:()=>u,CONDITIONAL_AXIS_PROP_INDEX:()=>a,isAxisProperty:()=>d,isConditionalAxisValue:()=>o});var r=n(79989),i=n(26372);const a={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function o(e){return e?.condition}const s=["domain","grid","labels","ticks","title"],l={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},u={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},c={...u,style:1,labelExpr:1,encoding:1};function d(e){return(0,i.hasOwnProperty)(c,e)}const f=(0,r.keys)(c),p=(0,r.keys)({axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1})},19664:(e,t,n)=>{"use strict";n.r(t),n.d(t,{autoMaxBins:()=>f,binToString:()=>s,isBinParams:()=>c,isBinned:()=>u,isBinning:()=>l,isParameterExtent:()=>d});var r=n(26372),i=n(95290),a=n(79543),o=n(79989);function s(e){return(0,r.isBoolean)(e)&&(e=(0,a.normalizeBin)(e,void 0)),"bin"+(0,o.keys)(e).map((t=>d(e[t])?(0,o.varName)(`_${t}_${(0,o.entries)(e[t])}`):(0,o.varName)(`_${t}_${e[t]}`))).join("")}function l(e){return!0===e||c(e)&&!e.binned}function u(e){return"binned"===e||c(e)&&!0===e.binned}function c(e){return(0,r.isObject)(e)}function d(e){return(0,o.hasProperty)(e,"param")}function f(e){switch(e){case i.ROW:case i.COLUMN:case i.SIZE:case i.COLOR:case i.FILL:case i.STROKE:case i.STROKEWIDTH:case i.OPACITY:case i.FILLOPACITY:case i.STROKEOPACITY:case i.SHAPE:return 6;case i.STROKEDASH:return 4;default:return 10}}},95290:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ANGLE:()=>T,CHANNELS:()=>Q,COLOR:()=>E,COLUMN:()=>o,DESCRIPTION:()=>U,DETAIL:()=>M,FACET:()=>s,FACET_CHANNELS:()=>K,FILL:()=>S,FILLOPACITY:()=>R,GEOPOSITION_CHANNELS:()=>V,HREF:()=>L,KEY:()=>I,LATITUDE:()=>v,LATITUDE2:()=>w,LONGITUDE:()=>b,LONGITUDE2:()=>x,NONPOSITION_CHANNELS:()=>Ie,NONPOSITION_SCALE_CHANNELS:()=>tt,OFFSET_SCALE_CHANNELS:()=>He,OPACITY:()=>k,ORDER:()=>P,POLAR_POSITION_SCALE_CHANNELS:()=>ze,POLAR_POSITION_SCALE_CHANNEL_INDEX:()=>Ue,POSITION_SCALE_CHANNELS:()=>Le,RADIUS:()=>h,RADIUS2:()=>g,ROW:()=>a,SCALE_CHANNELS:()=>at,SECONDARY_RANGE_CHANNEL:()=>de,SHAPE:()=>A,SINGLE_DEF_CHANNELS:()=>se,SINGLE_DEF_UNIT_CHANNELS:()=>le,SIZE:()=>C,STROKE:()=>_,STROKEDASH:()=>N,STROKEOPACITY:()=>D,STROKEWIDTH:()=>O,TEXT:()=>F,THETA:()=>m,THETA2:()=>y,TOOLTIP:()=>$,UNIT_CHANNELS:()=>we,URL:()=>B,X:()=>l,X2:()=>c,XOFFSET:()=>f,Y:()=>u,Y2:()=>d,YOFFSET:()=>p,getMainChannelFromOffsetChannel:()=>be,getMainRangeChannel:()=>pe,getOffsetChannel:()=>ye,getOffsetScaleChannel:()=>ve,getPositionChannelFromLatLong:()=>H,getPositionScaleChannel:()=>qe,getSecondaryRangeChannel:()=>ge,getSizeChannel:()=>me,getVgPositionChannel:()=>he,isChannel:()=>ce,isColorChannel:()=>Y,isGeoPositionChannel:()=>G,isNonPositionScaleChannel:()=>nt,isPolarPositionChannel:()=>q,isScaleChannel:()=>ot,isSecondaryRangeChannel:()=>fe,isSingleDefUnitChannel:()=>ue,isXorY:()=>Be,isXorYOffset:()=>Ge,rangeType:()=>dt,supportLegend:()=>rt,supportMark:()=>st});var r=n(26372),i=n(79989);const a="row",o="column",s="facet",l="x",u="y",c="x2",d="y2",f="xOffset",p="yOffset",h="radius",g="radius2",m="theta",y="theta2",v="latitude",b="longitude",w="latitude2",x="longitude2",E="color",S="fill",_="stroke",A="shape",C="size",T="angle",k="opacity",R="fillOpacity",D="strokeOpacity",O="strokeWidth",N="strokeDash",F="text",P="order",M="detail",I="key",$="tooltip",L="href",B="url",U="description",z={theta:1,theta2:1,radius:1,radius2:1};function q(e){return(0,r.hasOwnProperty)(z,e)}const j={longitude:1,longitude2:1,latitude:1,latitude2:1};function H(e){switch(e){case v:return"y";case w:return"y2";case b:return"x";case x:return"x2"}}function G(e){return(0,r.hasOwnProperty)(j,e)}const V=(0,i.keys)(j),W={x:1,y:1,x2:1,y2:1,...z,...j,xOffset:1,yOffset:1,color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1};function Y(e){return e===E||e===S||e===_}const X={row:1,column:1,facet:1},K=(0,i.keys)(X),J={...W,...X},Q=(0,i.keys)(J),{order:Z,detail:ee,tooltip:te,...ne}=J,{row:re,column:ie,facet:ae,...oe}=ne,se=(0,i.keys)(ne),le=(0,i.keys)(oe);function ue(e){return(0,r.hasOwnProperty)(oe,e)}function ce(e){return(0,r.hasOwnProperty)(J,e)}const de=[c,d,w,x,y,g];function fe(e){return pe(e)!==e}function pe(e){switch(e){case c:return l;case d:return u;case w:return v;case x:return b;case y:return m;case g:return h}return e}function he(e){if(q(e))switch(e){case m:return"startAngle";case y:return"endAngle";case h:return"outerRadius";case g:return"innerRadius"}return e}function ge(e){switch(e){case l:return c;case u:return d;case v:return w;case b:return x;case m:return y;case h:return g}}function me(e){switch(e){case l:case c:return"width";case u:case d:return"height"}}function ye(e){switch(e){case l:return"xOffset";case u:return"yOffset";case c:return"x2Offset";case d:return"y2Offset";case m:return"thetaOffset";case h:return"radiusOffset";case y:return"theta2Offset";case g:return"radius2Offset"}}function ve(e){switch(e){case l:return"xOffset";case u:return"yOffset"}}function be(e){switch(e){case"xOffset":return"x";case"yOffset":return"y"}}const we=(0,i.keys)(W),{x:xe,y:Ee,x2:Se,y2:_e,xOffset:Ae,yOffset:Ce,latitude:Te,longitude:ke,latitude2:Re,longitude2:De,theta:Oe,theta2:Ne,radius:Fe,radius2:Pe,...Me}=W,Ie=(0,i.keys)(Me),$e={x:1,y:1},Le=(0,i.keys)($e);function Be(e){return(0,r.hasOwnProperty)($e,e)}const Ue={theta:1,radius:1},ze=(0,i.keys)(Ue);function qe(e){return"width"===e?l:u}const je={xOffset:1,yOffset:1},He=(0,i.keys)(je);function Ge(e){return(0,r.hasOwnProperty)(je,e)}const{text:Ve,tooltip:We,href:Ye,url:Xe,description:Ke,detail:Je,key:Qe,order:Ze,...et}=Me,tt=(0,i.keys)(et);function nt(e){return(0,r.hasOwnProperty)(Me,e)}function rt(e){switch(e){case E:case S:case _:case C:case A:case k:case O:case N:return!0;case R:case D:case T:return!1}}const it={...$e,...Ue,...je,...et},at=(0,i.keys)(it);function ot(e){return(0,r.hasOwnProperty)(it,e)}function st(e,t){return function(e){switch(e){case E:case S:case _:case U:case M:case I:case $:case L:case P:case k:case R:case D:case O:case s:case a:case o:return lt;case l:case u:case f:case p:case v:case b:return ct;case c:case d:case w:case x:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case C:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case N:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case A:return{point:"always",geoshape:"always"};case F:return{text:"always"};case T:return{point:"always",square:"always",text:"always"};case B:return{image:"always"};case m:case h:return{text:"always",arc:"always"};case y:case g:return{arc:"always"}}}(e)[t]}const lt={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},{geoshape:ut,...ct}=lt;function dt(e){switch(e){case l:case u:case m:case h:case f:case p:case C:case T:case O:case k:case R:case D:case c:case d:case y:case g:return;case s:case a:case o:case A:case N:case F:case $:case L:case B:case U:return"discrete";case E:case S:case _:return"flexible";case v:case b:case w:case x:case M:case I:case P:return}}},79543:(e,t,n)=>{"use strict";n.r(t),n.d(t,{binRequiresRange:()=>be,channelCompatibility:()=>he,channelDefType:()=>F,defaultTitle:()=>ie,defaultTitleFormatter:()=>Q,defaultType:()=>oe,functionalTitleFormatter:()=>J,getBandPosition:()=>_,getBandSize:()=>A,getFieldDef:()=>se,getFieldOrDatumDef:()=>le,getFormatMixins:()=>ae,getGuide:()=>re,hasBandEnd:()=>C,hasConditionalFieldDef:()=>R,hasConditionalFieldOrDatumDef:()=>D,hasConditionalValueDef:()=>O,initChannelDef:()=>ue,initFieldDef:()=>de,initFieldOrDatumDef:()=>ce,isConditionalDef:()=>k,isConditionalParameter:()=>w,isContinuousFieldOrDatumDef:()=>M,isCount:()=>X,isDatumDef:()=>P,isDiscrete:()=>W,isDiscretizing:()=>Y,isFieldDef:()=>N,isFieldOrDatumDef:()=>L,isFieldOrDatumDefForTimeFormat:()=>ge,isMarkPropFieldOrDatumDef:()=>j,isNumericDataDef:()=>$,isOrderOnlyDef:()=>T,isPositionFieldOrDatumDef:()=>q,isRepeatRef:()=>x,isScaleFieldDef:()=>z,isSortableFieldDef:()=>S,isStringFieldOrDatumDef:()=>H,isTimeFieldDef:()=>me,isTypedFieldDef:()=>B,isUnbinnedQuantitativeFieldOrDatumDef:()=>I,isValueDef:()=>U,normalizeBin:()=>fe,resetTitleFormatter:()=>te,setTitleFormatter:()=>ee,title:()=>ne,toFieldDefBase:()=>E,toStringFieldDef:()=>G,valueArray:()=>ve,valueExpr:()=>ye,verbalTitleFormatter:()=>K,vgField:()=>V});var r=n(26372),i=n(54814),a=n(19664),o=n(95290),s=n(15058),l=n(6032),u=n(20032),c=n(3802),d=n(20916),f=n(75028),p=n(31179),h=n(46681),g=n(51894),m=n(96598),y=n(99273),v=n(79989),b=n(5711);function w(e){return(0,v.hasProperty)(e,"param")}function x(e){return!(0,r.isString)(e)&&(0,v.hasProperty)(e,"repeat")}function E(e){const{field:t,timeUnit:n,bin:r,aggregate:i}=e;return{...n?{timeUnit:n}:{},...r?{bin:r}:{},...i?{aggregate:i}:{},field:t}}function S(e){return(0,v.hasProperty)(e,"sort")}function _({fieldDef:e,fieldDef2:t,markDef:n,config:r}){if(L(e)&&void 0!==e.bandPosition)return e.bandPosition;if(N(e)){const{timeUnit:i,bin:o}=e;if(i&&!t)return(0,s.getMarkConfig)("timeUnitBandPosition",n,r);if((0,a.isBinning)(o))return.5}}function A({channel:e,fieldDef:t,fieldDef2:n,markDef:r,config:i,scaleType:l,useVlSizeChannel:u}){const c=(0,o.getSizeChannel)(e),d=(0,s.getMarkPropOrConfig)(u?"size":c,r,i,{vgChannel:c});if(void 0!==d)return d;if(N(t)){const{timeUnit:e,bin:o}=t;if(e&&!n)return{band:(0,s.getMarkConfig)("timeUnitBandSize",r,i)};if((0,a.isBinning)(o)&&!(0,p.hasDiscreteDomain)(l))return{band:1}}return(0,f.isRectBasedMark)(r.type)?l?(0,p.hasDiscreteDomain)(l)?i[r.type]?.discreteBandSize||{band:1}:i[r.type]?.continuousBandSize:i[r.type]?.discreteBandSize:void 0}function C(e,t,n,r){return!!((0,a.isBinning)(e.bin)||e.timeUnit&&B(e)&&"temporal"===e.type)&&void 0!==_({fieldDef:e,fieldDef2:t,markDef:n,config:r})}function T(e){return(0,v.hasProperty)(e,"sort")&&!(0,v.hasProperty)(e,"field")}function k(e){return(0,v.hasProperty)(e,"condition")}function R(e){const t=e?.condition;return!!t&&!(0,r.isArray)(t)&&N(t)}function D(e){const t=e?.condition;return!!t&&!(0,r.isArray)(t)&&L(t)}function O(e){const t=e?.condition;return!!t&&((0,r.isArray)(t)||U(t))}function N(e){return(0,v.hasProperty)(e,"field")||"count"===e?.aggregate}function F(e){return e?.type}function P(e){return(0,v.hasProperty)(e,"datum")}function M(e){return B(e)&&!W(e)||$(e)}function I(e){return B(e)&&"quantitative"===e.type&&!e.bin||$(e)}function $(e){return P(e)&&(0,r.isNumber)(e.datum)}function L(e){return N(e)||P(e)}function B(e){return e&&((0,v.hasProperty)(e,"field")||"count"===e.aggregate)&&(0,v.hasProperty)(e,"type")}function U(e){return(0,v.hasProperty)(e,"value")}function z(e){return(0,v.hasProperty)(e,"scale")||(0,v.hasProperty)(e,"sort")}function q(e){return(0,v.hasProperty)(e,"axis")||(0,v.hasProperty)(e,"stack")||(0,v.hasProperty)(e,"impute")}function j(e){return(0,v.hasProperty)(e,"legend")}function H(e){return(0,v.hasProperty)(e,"format")||(0,v.hasProperty)(e,"formatType")}function G(e){return(0,v.omit)(e,["legend","axis","header","scale"])}function V(e,t={}){let n=e.field;const r=t.prefix;let o=t.suffix,s="";if(X(e))n=(0,v.internalField)("count");else{let r;if(!t.nofn)if(function(e){return(0,v.hasProperty)(e,"op")}(e))r=e.op;else{const{bin:l,aggregate:u,timeUnit:c}=e;(0,a.isBinning)(l)?(r=(0,a.binToString)(l),o=(t.binSuffix??"")+(t.suffix??"")):u?(0,i.isArgmaxDef)(u)?(s=`["${n}"]`,n=`argmax_${u.argmax}`):(0,i.isArgminDef)(u)?(s=`["${n}"]`,n=`argmin_${u.argmin}`):r=String(u):c&&!(0,m.isBinnedTimeUnit)(c)&&(r=(0,m.timeUnitToString)(c),o=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}r&&(n=n?`${r}_${n}`:r)}return o&&(n=`${n}_${o}`),r&&(n=`${r}_${n}`),t.forAs?(0,v.removePathFromField)(n):t.expr?(0,v.flatAccessWithDatum)(n,t.expr)+s:(0,v.replacePathInField)(n)+s}function W(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return N(e)&&!!e.bin;case"temporal":return!1}throw new Error(d.message.invalidFieldType(e.type))}function Y(e){return z(e)&&(0,p.isContinuousToDiscrete)(e.scale?.type)}function X(e){return"count"===e.aggregate}function K(e,t){const{field:n,bin:r,timeUnit:o,aggregate:s}=e;if("count"===s)return t.countTitle;if((0,a.isBinning)(r))return`${n} (binned)`;if(o&&!(0,m.isBinnedTimeUnit)(o)){const e=(0,m.normalizeTimeUnit)(o)?.unit;if(e)return`${n} (${(0,m.getTimeUnitParts)(e).join("-")})`}else if(s)return(0,i.isArgmaxDef)(s)?`${n} for max ${s.argmax}`:(0,i.isArgminDef)(s)?`${n} for min ${s.argmin}`:`${(0,v.titleCase)(s)} of ${n}`;return n}function J(e){const{aggregate:t,bin:n,timeUnit:r,field:o}=e;if((0,i.isArgmaxDef)(t))return`${o} for argmax(${t.argmax})`;if((0,i.isArgminDef)(t))return`${o} for argmin(${t.argmin})`;const s=r&&!(0,m.isBinnedTimeUnit)(r)?(0,m.normalizeTimeUnit)(r):void 0,l=t||s?.unit||s?.maxbins&&"timeunit"||(0,a.isBinning)(n)&&"bin";return l?`${l.toUpperCase()}(${o})`:o}const Q=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return J(e);default:return K(e,t)}};let Z=Q;function ee(e){Z=e}function te(){ee(Q)}function ne(e,t,{allowDisabling:n,includeDefault:r=!0}){const i=re(e)?.title;if(!N(e))return i??e.title;const a=e,o=r?ie(a,t):void 0;return n?(0,v.getFirstDefined)(i,a.title,o):i??a.title??o}function re(e){return q(e)&&e.axis?e.axis:j(e)&&e.legend?e.legend:(0,g.isFacetFieldDef)(e)&&e.header?e.header:void 0}function ie(e,t){return Z(e,t)}function ae(e){if(H(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}{const t=re(e)??{},{format:n,formatType:r}=t;return{format:n,formatType:r}}}function oe(e,t){switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(S(e)&&(0,r.isArray)(e.sort))return"ordinal";const{aggregate:n,bin:a,timeUnit:o}=e;if(o)return"temporal";if(a||n&&!(0,i.isArgmaxDef)(n)&&!(0,i.isArgminDef)(n))return"quantitative";if(z(e)&&e.scale?.type)switch(p.SCALE_CATEGORY_INDEX[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function se(e){return N(e)?e:R(e)?e.condition:void 0}function le(e){return L(e)?e:D(e)?e.condition:void 0}function ue(e,t,n,i={}){if((0,r.isString)(e)||(0,r.isNumber)(e)||(0,r.isBoolean)(e)){const n=(0,r.isString)(e)?"string":(0,r.isNumber)(e)?"number":"boolean";return d.warn(d.message.primitiveChannelDef(t,n,e)),{value:e}}return L(e)?ce(e,t,n,i):D(e)?{...e,condition:ce(e.condition,t,n,i)}:e}function ce(e,t,n,i){if(H(e)){const{format:r,formatType:a,...o}=e;if((0,l.isCustomFormatType)(a)&&!n.customFormatTypes)return d.warn(d.message.customFormatTypeNotAllowed(t)),ce(o,t,n,i)}else{const r=q(e)?"axis":j(e)?"legend":(0,g.isFacetFieldDef)(e)?"header":null;if(r&&e[r]){const{format:a,formatType:o,...s}=e[r];if((0,l.isCustomFormatType)(o)&&!n.customFormatTypes)return d.warn(d.message.customFormatTypeNotAllowed(t)),ce({...e,[r]:s},t,n,i)}}return N(e)?de(e,t,i):function(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=(0,r.isNumber)(n)?"quantitative":(0,r.isString)(n)?"nominal":(0,u.isDateTime)(n)?"temporal":void 0,{...e,type:t}}(e)}function de(e,t,{compositeMark:n=!1}={}){const{aggregate:s,timeUnit:l,bin:u,field:c}=e,f={...e};if(n||!s||(0,i.isAggregateOp)(s)||(0,i.isArgmaxDef)(s)||(0,i.isArgminDef)(s)||(d.warn(d.message.invalidAggregate(s)),delete f.aggregate),l&&(f.timeUnit=(0,m.normalizeTimeUnit)(l)),c&&(f.field=`${c}`),(0,a.isBinning)(u)&&(f.bin=fe(u,t)),(0,a.isBinned)(u)&&!(0,o.isXorY)(t)&&d.warn(d.message.channelShouldNotBeUsedForBinned(t)),B(f)){const{type:e}=f,t=(0,y.getFullName)(e);e!==t&&(f.type=t),"quantitative"!==e&&(0,i.isCountingAggregateOp)(s)&&(d.warn(d.message.invalidFieldTypeForCountAggregate(e,s)),f.type="quantitative")}else if(!(0,o.isSecondaryRangeChannel)(t)){const e=oe(f,t);f.type=e}if(B(f)){const{compatible:e,warning:n}=he(f,t)||{};!1===e&&d.warn(n)}if(S(f)&&(0,r.isString)(f.sort)){const{sort:e}=f;if((0,h.isSortByChannel)(e))return{...f,sort:{encoding:e}};const t=e.substring(1);if("-"===e.charAt(0)&&(0,h.isSortByChannel)(t))return{...f,sort:{encoding:t,order:"descending"}}}if((0,g.isFacetFieldDef)(f)){const{header:e}=f;if(e){const{orient:t,...n}=e;if(t)return{...f,header:{...n,labelOrient:e.labelOrient||t,titleOrient:e.titleOrient||t}}}}return f}function fe(e,t){return(0,r.isBoolean)(e)?{maxbins:(0,a.autoMaxBins)(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:{...e,maxbins:(0,a.autoMaxBins)(t)}}const pe={compatible:!0};function he(e,t){const n=e.type;if("geojson"===n&&"shape"!==t)return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case o.ROW:case o.COLUMN:case o.FACET:return W(e)?pe:{compatible:!1,warning:d.message.channelShouldBeDiscrete(t)};case o.X:case o.Y:case o.XOFFSET:case o.YOFFSET:case o.COLOR:case o.FILL:case o.STROKE:case o.TEXT:case o.DETAIL:case o.KEY:case o.TOOLTIP:case o.HREF:case o.URL:case o.ANGLE:case o.THETA:case o.RADIUS:case o.DESCRIPTION:return pe;case o.LONGITUDE:case o.LONGITUDE2:case o.LATITUDE:case o.LATITUDE2:return n!==y.QUANTITATIVE?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:pe;case o.OPACITY:case o.FILLOPACITY:case o.STROKEOPACITY:case o.STROKEWIDTH:case o.SIZE:case o.THETA2:case o.RADIUS2:case o.X2:case o.Y2:return"nominal"!==n||e.sort?pe:{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`};case o.SHAPE:case o.STROKEDASH:return W(e)||Y(e)?pe:{compatible:!1,warning:d.message.channelShouldBeDiscreteOrDiscretizing(t)};case o.ORDER:return"nominal"!==e.type||"sort"in e?pe:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}function ge(e){const{formatType:t}=ae(e);return"time"===t||!t&&me(e)}function me(e){return e&&("temporal"===e.type||N(e)&&!!e.timeUnit)}function ye(e,{timeUnit:t,type:n,wrapTime:i,undefinedIfExprNotRequired:a}){const o=t&&(0,m.normalizeTimeUnit)(t)?.unit;let s,l=o||"temporal"===n;return(0,c.isExprRef)(e)?s=e.expr:(0,b.isSignalRef)(e)?s=e.signal:(0,u.isDateTime)(e)?(l=!0,s=(0,u.dateTimeToExpr)(e)):((0,r.isString)(e)||(0,r.isNumber)(e))&&l&&(s=`datetime(${(0,v.stringify)(e)})`,(0,m.isLocalSingleTimeUnit)(o)&&((0,r.isNumber)(e)&&e<1e4||(0,r.isString)(e)&&isNaN(Date.parse(e)))&&(s=(0,u.dateTimeToExpr)({[o]:e}))),s?i&&l?`time(${s})`:s:a?void 0:(0,v.stringify)(e)}function ve(e,t){const{type:n}=e;return t.map((t=>{const r=ye(t,{timeUnit:N(e)&&!(0,m.isBinnedTimeUnit)(e.timeUnit)?e.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return void 0!==r?{signal:r}:t}))}function be(e,t){return(0,a.isBinning)(e.bin)?(0,o.isScaleChannel)(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}},5593:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleAxes:()=>g,assembleAxis:()=>p,assembleAxisSignals:()=>h});var r=n(26372),i=n(65032),a=n(95290),o=n(79543),s=n(76447),l=n(79989),u=n(5711),c=n(15058),d=n(95370);function f(e,t,n,r){var i,a;e.encode??(e.encode={}),(i=e.encode)[t]??(i[t]={}),(a=e.encode[t]).update??(a.update={}),e.encode[t].update[n]=r}function p(e,t,n,a={header:!1}){const{disable:p,orient:h,scale:g,labelExpr:m,title:y,zindex:v,...b}=e.combine();if(!p){for(const e in b){const n=e,a=i.AXIS_PROPERTY_TYPE[n],o=b[n];if(a&&a!==t&&"both"!==a)delete b[n];else if((0,i.isConditionalAxisValue)(o)){const{condition:e,...t}=o,a=(0,r.array)(e),s=i.CONDITIONAL_AXIS_PROP_INDEX[n];if(s){const{vgProp:e,part:r}=s;f(b,r,e,[...a.map((e=>{const{test:t,...n}=e;return{test:(0,d.expression)(null,t),...n}})),t]),delete b[n]}else if(null===s){const e={signal:a.map((e=>{const{test:t,...n}=e;return`${(0,d.expression)(null,t)} ? ${(0,c.exprFromValueRefOrSignalRef)(n)} : `})).join("")+(0,c.exprFromValueRefOrSignalRef)(t)};b[n]=e}}else if((0,u.isSignalRef)(o)){const e=i.CONDITIONAL_AXIS_PROP_INDEX[n];if(e){const{vgProp:t,part:r}=e;f(b,r,t,o),delete b[n]}}(0,l.contains)(["labelAlign","labelBaseline"],n)&&null===b[n]&&delete b[n]}if("grid"===t){if(!b.grid)return;if(b.encode){const{grid:e}=b.encode;b.encode={...e?{grid:e}:{}},(0,l.isEmpty)(b.encode)&&delete b.encode}return{scale:g,orient:h,...b,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:(0,l.getFirstDefined)(v,0)}}{if(!a.header&&e.mainExtracted)return;if(void 0!==m){let e=m;b.encode?.labels?.update&&(0,u.isSignalRef)(b.encode.labels.update.text)&&(e=(0,l.replaceAll)(m,"datum.label",b.encode.labels.update.text.signal)),f(b,"labels","text",{signal:e})}if(null===b.labelAlign&&delete b.labelAlign,b.encode){for(const t of i.AXIS_PARTS)e.hasAxisPart(t)||delete b.encode[t];(0,l.isEmpty)(b.encode)&&delete b.encode}const t=function(e,t){if(e)return(0,r.isArray)(e)&&!(0,s.isText)(e)?e.map((e=>(0,o.defaultTitle)(e,t))).join(", "):e}(y,n);return{scale:g,orient:h,grid:!1,...t?{title:t}:{},...b,...!1===n.aria?{aria:!1}:{},zindex:(0,l.getFirstDefined)(v,0)}}}}function h(e){const{axes:t}=e.component,n=[];for(const r of a.POSITION_SCALE_CHANNELS)if(t[r])for(const i of t[r])if(!i.get("disable")&&!i.get("gridScale")){const t="x"===r?"height":"width",i=e.getSizeSignalRef(t).signal;t!==i&&n.push({name:t,update:i})}return n}function g(e,t){const{x:n=[],y:r=[]}=e;return[...n.map((e=>p(e,"grid",t))),...r.map((e=>p(e,"grid",t))),...n.map((e=>p(e,"main",t))),...r.map((e=>p(e,"main",t)))].filter((e=>e))}},33434:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AXIS_COMPONENT_PROPERTIES:()=>l,AxisComponent:()=>u});var r=n(65032),i=n(79989),a=n(5711),o=n(96159);const s={disable:1,gridScale:1,scale:1,...r.COMMON_AXIS_PROPERTIES_INDEX,labelExpr:1,encode:1},l=(0,i.keys)(s);class u extends o.Split{constructor(e={},t={},n=!1){super(),this.explicit=e,this.implicit=t,this.mainExtracted=n}clone(){return new u((0,i.duplicate)(this.explicit),(0,i.duplicate)(this.implicit),this.mainExtracted)}hasAxisPart(e){return!("axis"!==e&&("grid"===e||"title"===e?!this.get(e):!1===(t=this.get(e))||null===t));var t}hasOrientSignalRef(){return(0,a.isSignalRef)(this.explicit.orient)}}},22115:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAxisConfig:()=>d,getAxisConfigStyle:()=>c,getAxisConfigs:()=>u});var r=n(26372),i=n(31179),a=n(79989),o=n(5711),s=n(15058);function l(e,t,n,r){return Object.assign.apply(null,[{},...e.map((e=>{if("axisOrient"===e){const e="x"===n?"bottom":"left",i=t["x"===n?"axisBottom":"axisLeft"]||{},o=t["x"===n?"axisTop":"axisRight"]||{},l=new Set([...(0,a.keys)(i),...(0,a.keys)(o)]),u={};for(const t of l.values())u[t]={signal:`${r.signal} === "${e}" ? ${(0,s.signalOrStringValue)(i[t])} : ${(0,s.signalOrStringValue)(o[t])}`};return u}return t[e]}))])}function u(e,t,n,r){const s="band"===t?["axisDiscrete","axisBand"]:"point"===t?["axisDiscrete","axisPoint"]:(0,i.isQuantitative)(t)?["axisQuantitative"]:"time"===t||"utc"===t?["axisTemporal"]:[],u="x"===e?"axisX":"axisY",d=(0,o.isSignalRef)(n)?"axisOrient":`axis${(0,a.titleCase)(n)}`,f=[...s,...s.map((e=>u+e.substr(4)))],p=["axis",d,u];return{vlOnlyAxisConfig:l(f,r,e,n),vgAxisConfig:l(p,r,e,n),axisConfigStyle:c([...p,...f],r)}}function c(e,t){const n=[{}];for(const i of e){let e=t[i]?.style;if(e){e=(0,r.array)(e);for(const r of e)n.push(t.style[r])}}return Object.assign.apply(null,n)}function d(e,t,n,r={}){const i=(0,s.getStyleConfig)(e,n,t);if(void 0!==i)return{configFrom:"style",configValue:i};for(const t of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==r[t]?.[e])return{configFrom:t,configValue:r[t][e]};return{}}},57807:(e,t,n)=>{"use strict";n.r(t),n.d(t,{labels:()=>o});var r=n(95290),i=n(79543),a=n(6032);function o(e,t,n){const{encoding:o,config:s}=e,l=(0,i.getFieldOrDatumDef)(o[t])??(0,i.getFieldOrDatumDef)(o[(0,r.getSecondaryRangeChannel)(t)]),u=e.axis(t)||{},{format:c,formatType:d}=u;if((0,a.isCustomFormatType)(d))return{text:(0,a.formatCustomType)({fieldOrDatumDef:l,field:"datum.value",format:c,formatType:d,config:s}),...n};if(void 0===c&&void 0===d&&s.customFormatTypes){if("quantitative"===(0,i.channelDefType)(l)){if((0,i.isPositionFieldOrDatumDef)(l)&&"normalize"===l.stack&&s.normalizedNumberFormatType)return{text:(0,a.formatCustomType)({fieldOrDatumDef:l,field:"datum.value",format:s.normalizedNumberFormat,formatType:s.normalizedNumberFormatType,config:s}),...n};if(s.numberFormatType)return{text:(0,a.formatCustomType)({fieldOrDatumDef:l,field:"datum.value",format:s.numberFormat,formatType:s.numberFormatType,config:s}),...n}}if("temporal"===(0,i.channelDefType)(l)&&s.timeFormatType&&(0,i.isFieldDef)(l)&&!l.timeUnit)return{text:(0,a.formatCustomType)({fieldOrDatumDef:l,field:"datum.value",format:s.timeFormat,formatType:s.timeFormatType,config:s}),...n}}return n}},32134:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseLayerAxes:()=>b,parseUnitAxes:()=>y});var r=n(65032),i=n(95290),a=n(79543),o=n(79989),s=n(5711),l=n(15058),u=n(16039),c=n(91387),d=n(96159),f=n(33434),p=n(22115),h=n(57807),g=n(43852),m=n(6032);function y(e){return i.POSITION_SCALE_CHANNELS.reduce(((t,n)=>(e.component.scales[n]&&(t[n]=[_(n,e)]),t)),{})}const v={bottom:"top",top:"bottom",left:"right",right:"left"};function b(e){const{axes:t,resolve:n}=e.component,r={top:0,bottom:0,right:0,left:0};for(const r of e.children){r.parseAxesAndHeaders();for(const i of(0,o.keys)(r.component.axes))n.axis[i]=(0,c.parseGuideResolve)(e.component.resolve,i),"shared"===n.axis[i]&&(t[i]=w(t[i],r.component.axes[i]),t[i]||(n.axis[i]="independent",delete t[i]))}for(const a of i.POSITION_SCALE_CHANNELS){for(const i of e.children)if(i.component.axes[a]){if("independent"===n.axis[a]){t[a]=(t[a]??[]).concat(i.component.axes[a]);for(const e of i.component.axes[a]){const{value:t,explicit:n}=e.getWithExplicit("orient");if(!(0,s.isSignalRef)(t)){if(r[t]>0&&!n){const n=v[t];r[t]>r[n]&&e.set("orient",n,!1)}r[t]++}}}delete i.component.axes[a]}if("independent"===n.axis[a]&&t[a]&&t[a].length>1)for(const[e,n]of(t[a]||[]).entries())e>0&&n.get("grid")&&!n.explicit.grid&&(n.implicit.grid=!1)}}function w(e,t){if(!e)return t.map((e=>e.clone()));{if(e.length!==t.length)return;const n=e.length;for(let r=0;r{switch(n){case"title":return(0,l.mergeTitleComponent)(e,t);case"gridScale":return{explicit:e.explicit,value:(0,o.getFirstDefined)(e.value,t.value)}}return(0,d.defaultTieBreaker)(e,t,n,"axis")}));e.setWithExplicit(n,r)}return e}function E(e,t,n,r,i){if("disable"===t)return void 0!==n;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===((0,s.isSignalRef)(n.labelAngle)?n.labelAngle:(0,o.normalizeAngle)(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===(0,g.getFieldDefTitle)(r,i))return!0}return e===n[t]}const S=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function _(e,t){let n=t.axis(e);const i=new f.AxisComponent,l=(0,a.getFieldOrDatumDef)(t.encoding[e]),{mark:c,config:d}=t,y=n?.orient||d["x"===e?"axisX":"axisY"]?.orient||d.axis?.orient||(0,g.defaultOrient)(e),v=t.getScaleComponent(e).get("type"),b=(0,p.getAxisConfigs)(e,v,y,t.config),w=void 0!==n?!n:(0,p.getAxisConfig)("disable",d.style,n?.style,b).configValue;if(i.set("disable",w,void 0!==n),w)return i;n=n||{};const x=(0,g.getLabelAngle)(l,n,e,d.style,b),_=(0,m.guideFormatType)(n.formatType,l,v),A=(0,m.guideFormat)(l,l.type,n.format,n.formatType,d,!0),C={fieldOrDatumDef:l,axis:n,channel:e,model:t,scaleType:v,orient:y,labelAngle:x,format:A,formatType:_,mark:c,config:d};for(const a of f.AXIS_COMPONENT_PROPERTIES){const o=a in g.axisRules?g.axisRules[a](C):(0,r.isAxisProperty)(a)?n[a]:void 0,l=void 0!==o,u=E(o,a,n,t,e);if(l&&u)i.set(a,o,u);else{const{configValue:e,configFrom:t}=(0,r.isAxisProperty)(a)&&"values"!==a?(0,p.getAxisConfig)(a,d.style,n.style,b):{},c=void 0!==e;l&&!c?i.set(a,o,u):("vgAxisConfig"!==t||S.has(a)&&c||(0,r.isConditionalAxisValue)(e)||(0,s.isSignalRef)(e))&&i.set(a,e,!1)}}const T=n.encoding??{},k=r.AXIS_PARTS.reduce(((n,r)=>{if(!i.hasAxisPart(r))return n;const a=(0,u.guideEncodeEntry)(T[r]??{},t),s="labels"===r?h.labels(t,e,a):a;return void 0===s||(0,o.isEmpty)(s)||(n[r]={update:s}),n}),{});return(0,o.isEmpty)(k)||i.set("encode",k,!!n.encoding||void 0!==n.labelAngle),i}},43852:(e,t,n)=>{"use strict";n.r(t),n.d(t,{axisRules:()=>h,defaultGrid:()=>g,defaultLabelAlign:()=>w,defaultLabelBaseline:()=>b,defaultLabelFlush:()=>x,defaultLabelOverlap:()=>E,defaultOrient:()=>S,defaultTickCount:()=>_,defaultTickMinStep:()=>A,defaultZindex:()=>k,getFieldDefTitle:()=>C,getLabelAngle:()=>y,gridScale:()=>m,normalizeAngleExpr:()=>v,values:()=>T});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(31179),l=n(96598),u=n(99273),c=n(79989),d=n(5711),f=n(15058),p=n(22115);const h={scale:({model:e,channel:t})=>e.scaleName(t),format:({format:e})=>e,formatType:({formatType:e})=>e,grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>t.grid??g(n,e),gridScale:({model:e,channel:t})=>m(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:r})=>e.labelAlign||w(t,n,r),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:r})=>e.labelBaseline||b(t,n,r),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>e.labelFlush??x(t.type,n),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>e.labelOverlap??E(t.type,n,(0,o.isFieldDef)(t)&&!!t.timeUnit,(0,o.isFieldDef)(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:r,scaleType:i})=>{const a="x"===e?"width":"y"===e?"height":void 0,o=a?t.getSizeSignalRef(a):void 0;return n.tickCount??_({fieldOrDatumDef:r,scaleType:i,size:o,values:n.values})},tickMinStep:A,title:({axis:e,model:t,channel:n})=>{if(void 0!==e.title)return e.title;const r=C(t,n);if(void 0!==r)return r;const i=t.typedFieldDef(n),a="x"===n?"x2":"y2",s=t.fieldDef(a);return(0,f.mergeTitleFieldDefs)(i?[(0,o.toFieldDefBase)(i)]:[],(0,o.isFieldDef)(s)?[(0,o.toFieldDefBase)(s)]:[])},values:({axis:e,fieldOrDatumDef:t})=>T(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>e.zindex??k(n,t)};function g(e,t){return!(0,s.hasDiscreteDomain)(e)&&(0,o.isFieldDef)(t)&&!(0,i.isBinning)(t?.bin)&&!(0,i.isBinned)(t?.bin)}function m(e,t){const n="x"===t?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}function y(e,t,n,r,i){const s=t?.labelAngle;if(void 0!==s)return(0,d.isSignalRef)(s)?s:(0,c.normalizeAngle)(s);{const{configValue:s}=(0,p.getAxisConfig)("labelAngle",r,t?.style,i);return void 0!==s?(0,c.normalizeAngle)(s):n!==a.X||!(0,c.contains)([u.NOMINAL,u.ORDINAL],e.type)||(0,o.isFieldDef)(e)&&e.timeUnit?void 0:270}}function v(e){return`(((${e.signal} % 360) + 360) % 360)`}function b(e,t,n,r){if(void 0!==e){if("x"===n){if((0,d.isSignalRef)(e)){const n=v(e);return{signal:`(45 < ${n} && ${n} < 135) || (225 < ${n} && ${n} < 315) ? "middle" :(${n} <= 45 || 315 <= ${n}) === ${(0,d.isSignalRef)(t)?`(${t.signal} === "top")`:"top"===t} ? "bottom" : "top"`}}if(45{"use strict";n.r(t),n.d(t,{buildModel:()=>u});var r=n(20916),i=n(24777),a=n(73799),o=n(33828),s=n(51878),l=n(92649);function u(e,t,n,u,c){if((0,i.isFacetSpec)(e))return new o.FacetModel(e,t,n,c);if((0,i.isLayerSpec)(e))return new s.LayerModel(e,t,n,u,c);if((0,i.isUnitSpec)(e))return new l.UnitModel(e,t,n,u,c);if((0,i.isAnyConcatSpec)(e))return new a.ConcatModel(e,t,n,c);throw new Error(r.message.invalidSpec(e))}},15058:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BIN_RANGE_DELIMITER:()=>u,applyMarkConfig:()=>y,conditionalSignalRefOrValue:()=>f,exprFromSignalRefOrValue:()=>h,exprFromValueRefOrSignalRef:()=>g,getMarkConfig:()=>w,getMarkPropOrConfig:()=>b,getMarkStyleConfig:()=>x,getStyleConfig:()=>E,getStyles:()=>v,mergeTitle:()=>A,mergeTitleComponent:()=>C,mergeTitleFieldDefs:()=>_,signalOrStringValue:()=>m,signalOrValueRef:()=>p,signalOrValueRefWithCondition:()=>c,signalRefOrValue:()=>d,sortParams:()=>S});var r=n(26372),i=n(79543),a=n(3802),o=n(76447),s=n(79989),l=n(5711);const u=" – ";function c(e){const t=(0,r.isArray)(e.condition)?e.condition.map(f):f(e.condition);return{...d(e),condition:t}}function d(e){if((0,a.isExprRef)(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function f(e){if((0,a.isExprRef)(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function p(e){if((0,a.isExprRef)(e)){const{expr:t,...n}=e;return{signal:t,...n}}return(0,l.isSignalRef)(e)?e:void 0!==e?{value:e}:void 0}function h(e){return(0,l.isSignalRef)(e)?e.signal:(0,r.stringValue)(e)}function g(e){return(0,l.isSignalRef)(e)?e.signal:(0,r.stringValue)(e.value)}function m(e){return(0,l.isSignalRef)(e)?e.signal:null==e?null:(0,r.stringValue)(e)}function y(e,t,n){for(const r of n){const n=w(r,t.markDef,t.config);void 0!==n&&(e[r]=p(n))}return e}function v(e){return[].concat(e.type,e.style??[])}function b(e,t,n,r={}){const{vgChannel:i,ignoreVgConfig:a}=r;return i&&(0,s.hasProperty)(t,i)?t[i]:void 0!==t[e]?t[e]:!a||i&&i!==e?w(e,t,n,r):void 0}function w(e,t,n,{vgChannel:r}={}){const i=x(e,t,n.style);return(0,s.getFirstDefined)(r?i:void 0,i,r?n[t.type][r]:void 0,n[t.type][e],r?n.mark[r]:n.mark[e])}function x(e,t,n){return E(e,v(t),n)}function E(e,t,n){let i;t=(0,r.array)(t);for(const r of t){const t=n[r];(0,s.hasProperty)(t,e)&&(i=t[e])}return i}function S(e,t){return(0,r.array)(e).reduce(((e,n)=>(e.field.push((0,i.vgField)(n,t)),e.order.push(n.sort??"ascending"),e)),{field:[],order:[]})}function _(e,t){const n=[...e];return t.forEach((e=>{for(const t of n)if((0,s.deepEqual)(t,e))return;n.push(e)})),n}function A(e,t){return(0,s.deepEqual)(e,t)||!t?e:e?[...(0,r.array)(e),...(0,r.array)(t)].join(", "):t}function C(e,t){const n=e.value,r=t.value;if(null==n||null===r)return{explicit:e.explicit,value:null};if(((0,o.isText)(n)||(0,l.isSignalRef)(n))&&((0,o.isText)(r)||(0,l.isSignalRef)(r)))return{explicit:e.explicit,value:A(n,r)};if((0,o.isText)(n)||(0,l.isSignalRef)(n))return{explicit:e.explicit,value:n};if((0,o.isText)(r)||(0,l.isSignalRef)(r))return{explicit:e.explicit,value:r};if(!((0,o.isText)(n)||(0,l.isSignalRef)(n)||(0,o.isText)(r)||(0,l.isSignalRef)(r)))return{explicit:e.explicit,value:_(n,r)};throw new Error("It should never reach here")}},48166:(e,t,n)=>{"use strict";n.r(t),n.d(t,{compile:()=>g});var r=n(26372),i=n(95290),a=n(79543),o=n(24007),s=n(20916),l=n(59621),u=n(54778),c=n(48110),d=n(79989),f=n(36598),p=n(81458),h=n(80449);function g(e,t={}){t.logger&&s.set(t.logger),t.fieldTitle&&a.setTitleFormatter(t.fieldTitle);try{const n=(0,o.initConfig)((0,r.mergeConfig)(t.config,e.config)),a=(0,l.normalize)(e,n),g=(0,f.buildModel)(a,null,"",void 0,n);g.parse(),(0,h.optimizeDataflow)(g.component.data,g);const m=function(e,t,n={},r){const i=e.config?(0,o.stripAndRedirectConfig)(e.config):void 0,a=[].concat(e.assembleSelectionData([]),(0,p.assembleRootData)(e.component.data,n)),s=e.assembleProjections(),l=e.assembleTitle(),c=e.assembleGroupStyle(),d=e.assembleGroupEncodeEntry(!0);let f=e.assembleLayoutSignals();f=f.filter((e=>"width"!==e.name&&"height"!==e.name||void 0===e.value||(t[e.name]=+e.value,!1)));const{params:h,...g}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...g,...l?{title:l}:{},...c?{style:c}:{},...d?{encode:{update:d}}:{},data:a,...s.length>0?{projections:s}:{},...e.assembleGroup([...f,...e.assembleSelectionTopLevelSignals([]),...(0,u.assembleParameterSignals)(h)]),...i?{config:i}:{},...r?{usermeta:r}:{}}}(g,function(e,t,n,a){const o=a.component.layoutSize.get("width"),l=a.component.layoutSize.get("height");if(void 0===t?(t={type:"pad"},a.hasAxisOrientSignalRef()&&(t.resize=!0)):(0,r.isString)(t)&&(t={type:t}),o&&l&&(0,c.isFitType)(t.type))if("step"===o&&"step"===l)s.warn(s.message.droppingFit()),t.type="pad";else if("step"===o||"step"===l){const e="step"===o?"width":"height";s.warn(s.message.droppingFit((0,i.getPositionScaleChannel)(e)));const n="width"===e?"height":"width";t.type=(0,c.getFitType)(n)}return{...1===(0,d.keys)(t).length&&t.type?"pad"===t.type?{}:{autosize:t.type}:{autosize:t},...(0,c.extractTopLevelProperties)(n,!1),...(0,c.extractTopLevelProperties)(e,!0)}}(e,a.autosize,n,g),e.datasets,e.usermeta);return{spec:m,normalized:a}}finally{t.logger&&s.reset(),t.fieldTitle&&a.resetTitleFormatter()}}},73799:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ConcatModel:()=>d});var r=n(20916),i=n(24777),a=n(79989),o=n(36598),s=n(80219),l=n(6871),u=n(27588),c=n(7302);class d extends c.Model{constructor(e,t,n,i){super(e,"concat",t,n,i,e.resolve),"shared"!==e.resolve?.axis?.x&&"shared"!==e.resolve?.axis?.y||r.warn(r.message.CONCAT_CANNOT_SHARE_AXIS),this.children=this.getChildren(e).map(((e,t)=>(0,o.buildModel)(e,this,this.getName(`concat_${t}`),void 0,i)))}parseData(){this.component.data=(0,s.parseData)(this);for(const e of this.children)e.parseData()}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of(0,a.keys)(e.component.selection))this.component.selection[t]=e.component.selection[t]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){for(const e of this.children)e.parseAxesAndHeaders()}getChildren(e){return(0,i.isVConcatSpec)(e)?e.vconcat:(0,i.isHConcatSpec)(e)?e.hconcat:e.concat}parseLayoutSize(){(0,u.parseConcatLayoutSize)(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.forEach((e=>e.assembleSignals())),[]}assembleLayoutSignals(){const e=(0,l.assembleLayoutSignals)(this);for(const t of this.children)e.push(...t.assembleLayoutSignals());return e}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleMarks(){return this.children.map((e=>{const t=e.assembleTitle(),n=e.assembleGroupStyle(),r=e.assembleGroupEncodeEntry(!1);return{type:"group",name:e.getName("group"),...t?{title:t}:{},...n?{style:n}:{},...r?{encode:{update:r}}:{},...e.assembleGroup()}}))}assembleGroupStyle(){}assembleDefaultLayout(){const e=this.layout.columns;return{...null!=e?{columns:e}:{},bounds:"full",align:"each"}}}},69687:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AggregateNode:()=>p});var r=n(54814),i=n(95290),a=n(79543),o=n(20916),s=n(31179),l=n(79989),u=n(7302),c=n(74686),d=n(75028),f=n(62277);class p extends c.DataFlowNode{clone(){return new p(null,new Set(this.dimensions),(0,l.duplicate)(this.measures))}constructor(e,t,n){super(e),this.dimensions=t,this.measures=n}get groupBy(){return this.dimensions}static makeFromEncoding(e,t){let n=!1;t.forEachFieldDef((e=>{e.aggregate&&(n=!0)}));const o={},c=new Set;return n?(t.forEachFieldDef(((e,n)=>{const{aggregate:l,field:p}=e;if(l)if("count"===l)o["*"]??(o["*"]={}),o["*"].count=new Set([(0,a.vgField)(e,{forAs:!0})]);else{if((0,r.isArgminDef)(l)||(0,r.isArgmaxDef)(l)){const e=(0,r.isArgminDef)(l)?"argmin":"argmax",t=l[e];o[t]??(o[t]={}),o[t][e]=new Set([(0,a.vgField)({op:e,field:t},{forAs:!0})])}else o[p]??(o[p]={}),o[p][l]=new Set([(0,a.vgField)(e,{forAs:!0})]);(0,i.isScaleChannel)(n)&&"unaggregated"===t.scaleDomain(n)&&(o[p]??(o[p]={}),o[p].min=new Set([(0,a.vgField)({field:p,aggregate:"min"},{forAs:!0})]),o[p].max=new Set([(0,a.vgField)({field:p,aggregate:"max"},{forAs:!0})]))}else!function(e,t,n,r){const o=(0,u.isUnitModel)(r)?r.encoding[(0,i.getSecondaryRangeChannel)(t)]:void 0;if((0,a.isTypedFieldDef)(n)&&(0,u.isUnitModel)(r)&&(0,a.hasBandEnd)(n,o,r.markDef,r.config)){e.add((0,a.vgField)(n,{})),e.add((0,a.vgField)(n,{suffix:"end"}));const{mark:o,markDef:s,config:l}=r,u=(0,a.getBandPosition)({fieldDef:n,markDef:s,config:l});(0,d.isRectBasedMark)(o)&&.5!==u&&(0,i.isXorY)(t)&&(e.add((0,a.vgField)(n,{suffix:f.OFFSETTED_RECT_START_SUFFIX})),e.add((0,a.vgField)(n,{suffix:f.OFFSETTED_RECT_END_SUFFIX}))),n.bin&&(0,a.binRequiresRange)(n,t)&&e.add((0,a.vgField)(n,{binSuffix:"range"}))}else if((0,i.isGeoPositionChannel)(t)){const n=(0,i.getPositionChannelFromLatLong)(t);e.add(r.getName(n))}else e.add((0,a.vgField)(n));(0,a.isScaleFieldDef)(n)&&(0,s.isFieldRange)(n.scale?.range)&&e.add(n.scale.range.field)}(c,n,e,t)})),c.size+(0,l.keys)(o).length===0?null:new p(e,c,o)):null}static makeFromTransform(e,t){var n;const r=new Set,i={};for(const e of t.aggregate){const{op:t,field:r,as:o}=e;t&&("count"===t?(i["*"]??(i["*"]={}),i["*"].count=new Set([o||(0,a.vgField)(e,{forAs:!0})])):(i[r]??(i[r]={}),(n=i[r])[t]??(n[t]=new Set),i[r][t].add(o||(0,a.vgField)(e,{forAs:!0}))))}for(const e of t.groupby??[])r.add(e);return r.size+(0,l.keys)(i).length===0?null:new p(e,r,i)}merge(e){return(0,l.setEqual)(this.dimensions,e.dimensions)?(function(e,t){for(const n of(0,l.keys)(t)){const r=t[n];for(const t of(0,l.keys)(r))n in e?e[n][t]=new Set([...e[n][t]??[],...r[t]]):e[n]={[t]:r[t]}}}(this.measures,e.measures),!0):(o.debug("different dimensions, cannot merge"),!1)}addDimensions(e){e.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...(0,l.keys)(this.measures)])}producedFields(){const e=new Set;for(const t of(0,l.keys)(this.measures))for(const n of(0,l.keys)(this.measures[t])){const r=this.measures[t][n];0===r.size?e.add(`${n}_${t}`):r.forEach(e.add,e)}return e}hash(){return`Aggregate ${(0,l.hash)({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const e=[],t=[],n=[];for(const r of(0,l.keys)(this.measures))for(const i of(0,l.keys)(this.measures[r]))for(const a of this.measures[r][i])n.push(a),e.push(i),t.push("*"===r?null:(0,l.replacePathInField)(r));return{type:"aggregate",groupby:[...this.dimensions].map(l.replacePathInField),ops:e,fields:t,as:n}}}},81458:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleFacetData:()=>P,assembleRootData:()=>M});var r=n(89081),i=n(69687),a=n(89153),o=n(77524),s=n(74686),l=n(97872),u=n(96578),c=n(69151),d=n(68860),f=n(78825),p=n(75138),h=n(4821),g=n(30366),m=n(13995),y=n(58211),v=n(65340),b=n(3297),w=n(47628),x=n(56123),E=n(63186),S=n(55320),_=n(40763),A=n(6799),C=n(38380),T=n(56948),k=n(79351),R=n(455),D=n(89764),O=n(62277),N=n(51422);function F(e){let t=0;return function n(F,P){if(F instanceof R.SourceNode&&!F.isGenerator&&!(0,r.isUrlData)(F.data)&&(e.push(P),P={name:null,source:P.name,transform:[]}),F instanceof g.ParseNode&&(F.parent instanceof R.SourceNode&&!P.source?(P.format={...P.format,parse:F.assembleFormatParse()},P.transform.push(...F.assembleTransforms(!0))):P.transform.push(...F.assembleTransforms())),F instanceof c.FacetNode)return P.name||(P.name="data_"+t++),!P.source||P.transform.length>0?(e.push(P),F.data=P.name):F.data=P.source,void e.push(...F.assemble());switch((F instanceof v.GraticuleNode||F instanceof k.SequenceNode||F instanceof f.FilterInvalidNode||F instanceof d.FilterNode||F instanceof o.CalculateNode||F instanceof y.GeoPointNode||F instanceof i.AggregateNode||F instanceof S.LookupNode||F instanceof N.WindowTransformNode||F instanceof x.JoinAggregateTransformNode||F instanceof h.FoldTransformNode||F instanceof p.FlattenTransformNode||F instanceof l.DensityTransformNode||F instanceof E.LoessTransformNode||F instanceof _.QuantileTransformNode||F instanceof A.RegressionTransformNode||F instanceof b.IdentifierNode||F instanceof T.SampleTransformNode||F instanceof C.PivotTransformNode||F instanceof u.ExtentTransformNode)&&P.transform.push(F.assemble()),(F instanceof a.BinNode||F instanceof O.TimeUnitNode||F instanceof w.ImputeNode||F instanceof D.StackNode||F instanceof m.GeoJSONNode)&&P.transform.push(...F.assemble()),F instanceof s.OutputNode&&(P.source&&0===P.transform.length?F.setSource(P.source):F.parent instanceof s.OutputNode?F.setSource(P.name):(P.name||(P.name="data_"+t++),F.setSource(P.name),1===F.numChildren()&&(e.push(P),P={name:null,source:P.name,transform:[]}))),F.numChildren()){case 0:F instanceof s.OutputNode&&(!P.source||P.transform.length>0)&&e.push(P);break;case 1:n(F.children[0],P);break;default:{P.name||(P.name="data_"+t++);let r=P.name;!P.source||P.transform.length>0?e.push(P):r=P.source;for(const e of F.children)n(e,{name:null,source:r,transform:[]});break}}}}function P(e){const t=[],n=F(t);for(const t of e.children)n(t,{source:e.name,name:null,transform:[]});return t}function M(e,t){const n=[],r=F(n);let i=0;for(const t of e.sources){t.hasName()||(t.dataName="source_"+i++);const e=t.assemble();r(t,e)}for(const e of n)0===e.transform.length&&delete e.transform;let a=0;for(const[e,t]of n.entries())0!==(t.transform??[]).length||t.source||n.splice(a++,0,n.splice(e,1)[0]);for(const t of n)for(const n of t.transform??[])"lookup"===n.type&&(n.from=e.outputNodes[n.from].getSource());for(const e of n)e.name in t&&(e.values=t[e.name]);return n}},89153:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BinNode:()=>g,getBinSignalName:()=>p});var r=n(26372),i=n(19664),a=n(79543),o=n(79989),s=n(6032),l=n(7302),u=n(83937),c=n(74686);function d(e,t,n,r){if((0,a.binRequiresRange)(t,n)){const i=(0,l.isUnitModel)(e)?e.axis(n)??e.legend(n)??{}:{},o=(0,a.vgField)(t,{expr:"datum"}),u=(0,a.vgField)(t,{expr:"datum",binSuffix:"end"});return{formulaAs:(0,a.vgField)(t,{binSuffix:"range",forAs:!0}),formula:(0,s.binFormatExpression)(o,u,i.format,i.formatType,r)}}return{}}function f(e,t){return`${(0,i.binToString)(e)}_${t}`}function p(e,t,n){const r=f((0,a.normalizeBin)(n,void 0)??{},t);return e.getName(`${r}_bins`)}function h(e,t,n){let o,s;o=function(e){return"as"in e}(e)?(0,r.isString)(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:[(0,a.vgField)(e,{forAs:!0}),(0,a.vgField)(e,{binSuffix:"end",forAs:!0})];const l={...(0,a.normalizeBin)(t,void 0)},c=f(l,e.field),{signal:d,extentSignal:p}=function(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}(n,c);if((0,i.isParameterExtent)(l.extent)){const e=l.extent;s=(0,u.parseSelectionExtent)(n,e.param,e),delete l.extent}return{key:c,binComponent:{bin:l,field:e.field,as:[o],...d?{signal:d}:{},...p?{extentSignal:p}:{},...s?{span:s}:{}}}}class g extends c.DataFlowNode{clone(){return new g(null,(0,o.duplicate)(this.bins))}constructor(e,t){super(e),this.bins=t}static makeFromEncoding(e,t){const n=t.reduceFieldDef(((e,n,r)=>{if((0,a.isTypedFieldDef)(n)&&(0,i.isBinning)(n.bin)){const{key:i,binComponent:a}=h(n,n.bin,t);e[i]={...a,...e[i],...d(t,n,r,t.config)}}return e}),{});return(0,o.isEmpty)(n)?null:new g(e,n)}static makeFromTransform(e,t,n){const{key:r,binComponent:i}=h(t,t.bin,n);return new g(e,{[r]:i})}merge(e,t){for(const n of(0,o.keys)(e.bins))n in this.bins?(t(e.bins[n].signal,this.bins[n].signal),this.bins[n].as=(0,o.unique)([...this.bins[n].as,...e.bins[n].as],o.hash)):this.bins[n]=e.bins[n];for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}producedFields(){return new Set((0,o.vals)(this.bins).map((e=>e.as)).flat(2))}dependentFields(){return new Set((0,o.vals)(this.bins).map((e=>e.field)))}hash(){return`Bin ${(0,o.hash)(this.bins)}`}assemble(){return(0,o.vals)(this.bins).flatMap((e=>{const t=[],[n,...r]=e.as,{extent:s,...l}=e.bin,u={type:"bin",field:(0,o.replacePathInField)(e.field),as:n,signal:e.signal,...(0,i.isParameterExtent)(s)?{extent:null}:{extent:s},...e.span?{span:{signal:`span(${e.span})`}}:{},...l};!s&&e.extentSignal&&(t.push({type:"extent",field:(0,o.replacePathInField)(e.field),signal:e.extentSignal}),u.extent={signal:e.extentSignal}),t.push(u);for(const e of r)for(let r=0;r<2;r++)t.push({type:"formula",expr:(0,a.vgField)({field:n[r]},{expr:"datum"}),as:e[r]});return e.formula&&t.push({type:"formula",expr:e.formula,as:e.formulaAs}),t}))}}},77524:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CalculateNode:()=>u,sortArrayIndexField:()=>c});var r=n(79543),i=n(4976),a=n(46681),o=n(79989),s=n(74686),l=n(62135);class u extends s.DataFlowNode{clone(){return new u(null,(0,o.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this._dependentFields=(0,l.getDependentFields)(this.transform.calculate)}static parseAllForSortIndex(e,t){return t.forEachFieldDef(((t,n)=>{if((0,r.isScaleFieldDef)(t)&&(0,a.isSortArray)(t.sort)){const{field:r,timeUnit:a}=t,o=t.sort,s=o.map(((e,t)=>`${(0,i.fieldFilterExpression)({field:r,timeUnit:a,equal:e})} ? ${t} : `)).join("")+o.length;e=new u(e,{calculate:s,as:c(t,n,{forAs:!0})})}})),e}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${(0,o.hash)(this.transform)}`}}function c(e,t,n){return(0,r.vgField)(e,{prefix:t,suffix:"sort_index",...n})}},74686:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DataFlowNode:()=>a,OutputNode:()=>o});var r=n(20916),i=n(79989);class a{constructor(e,t){this.debugName=t,this._children=[],this._parent=null,e&&(this.parent=e)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(e){this._parent=e,e&&e.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(e,t){this._children.includes(e)?r.warn(r.message.ADD_SAME_CHILD_TWICE):void 0!==t?this._children.splice(t,0,e):this._children.push(e)}removeChild(e){const t=this._children.indexOf(e);return this._children.splice(t,1),t}remove(){let e=this._parent.removeChild(this);for(const t of this._children)t._parent=this._parent,this._parent.addChild(t,e++)}insertAsParentOf(e){const t=e.parent;t.removeChild(this),this.parent=t,e.parent=this}swapWithParent(){const e=this._parent,t=e.parent;for(const t of this._children)t.parent=e;this._children=[],e.removeChild(this);const n=e.parent.removeChild(e);this._parent=t,t.addChild(this,n),e.parent=this}}class o extends a{clone(){const e=new this.constructor;return e.debugName=`clone_${this.debugName}`,e._source=this._source,e._name=`clone_${this._name}`,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}constructor(e,t,n,r){super(e,t),this.type=n,this.refCounts=r,this._source=this._name=t,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}dependentFields(){return new Set}producedFields(){return new Set}hash(){return void 0===this._hash&&(this._hash=`Output ${(0,i.uniqueId)()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(e){this._source=e}}},97872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DensityTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??"value",n[1]??"density"];const i=this.transform.resolve??"shared";this.transform.resolve=i}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${(0,r.hash)(this.transform)}`}assemble(){const{density:e,...t}=this.transform,n={type:"kde",field:e,...t};return n.resolve=this.transform.resolve,n}}},62135:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDependentFields:()=>o});var r=n(21720);function i(e){const t=[];return"Identifier"===e.type?[e.name]:"Literal"===e.type?[e.value]:("MemberExpression"===e.type&&(t.push(...i(e.object)),t.push(...i(e.property))),t)}function a(e){return"MemberExpression"===e.object.type?a(e.object):"datum"===e.object.name}function o(e){const t=(0,r.parseExpression)(e),n=new Set;return t.visit((e=>{"MemberExpression"===e.type&&a(e)&&n.add(i(e).slice(1).join("."))})),n}},96578:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ExtentTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${(0,r.hash)(this.transform)}`}assemble(){const{extent:e,param:t}=this.transform;return{type:"extent",field:e,signal:t}}}},69151:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FacetNode:()=>m});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(20916),l=n(31179),u=n(46681),c=n(79989),d=n(5711),f=n(10078),p=n(63760),h=n(77524),g=n(74686);class m extends g.DataFlowNode{constructor(e,t,n,s){super(e),this.model=t,this.name=n,this.data=s;for(const e of a.FACET_CHANNELS){const n=t.facet[e];if(n){const{bin:a,sort:s}=n;this[e]={name:t.getName(`${e}_domain`),fields:[(0,o.vgField)(n),...(0,i.isBinning)(a)?[(0,o.vgField)(n,{binSuffix:"end"})]:[]],...(0,u.isSortField)(s)?{sortField:s}:(0,r.isArray)(s)?{sortIndexField:(0,h.sortArrayIndexField)(n,e)}:{}}}}this.childModel=t.child}hash(){let e="Facet";for(const t of a.FACET_CHANNELS)this[t]&&(e+=` ${t.charAt(0)}:${(0,c.hash)(this[t])}`);return e}get fields(){const e=[];for(const t of a.FACET_CHANNELS)this[t]?.fields&&e.push(...this[t].fields);return e}dependentFields(){const e=new Set(this.fields);for(const t of a.FACET_CHANNELS)this[t]&&(this[t].sortField&&e.add(this[t].sortField.field),this[t].sortIndexField&&e.add(this[t].sortIndexField));return e}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const e={};for(const t of a.POSITION_SCALE_CHANNELS){const n=this.childModel.component.scales[t];if(n&&!n.merged){const r=n.get("type"),i=n.get("range");if((0,l.hasDiscreteDomain)(r)&&(0,d.isVgRangeStep)(i)){const n=(0,p.assembleDomain)(this.childModel,t),r=(0,p.getFieldFromDomain)(n);r?e[t]=r:s.warn(s.message.unknownField(t))}}}return e}assembleRowColumnHeaderData(e,t,n){const r={row:"y",column:"x",facet:void 0}[e],i=[],a=[],s=[];r&&n&&n[r]&&(t?(i.push(`distinct_${n[r]}`),a.push("max")):(i.push(n[r]),a.push("distinct")),s.push(`distinct_${n[r]}`));const{sortField:l,sortIndexField:c}=this[e];if(l){const{op:e=u.DEFAULT_SORT_OP,field:t}=l;i.push(t),a.push(e),s.push((0,o.vgField)(l,{forAs:!0}))}else c&&(i.push(c),a.push("max"),s.push(c));return{name:this[e].name,source:t??this.data,transform:[{type:"aggregate",groupby:this[e].fields,...i.length?{fields:i,ops:a,as:s}:{}}]}}assembleFacetHeaderData(e){const{columns:t}=this.model.layout,{layoutHeaders:n}=this.model.component,r=[],i={};for(const e of f.HEADER_CHANNELS){for(const t of f.HEADER_TYPES){const r=(n[e]&&n[e][t])??[];for(const t of r)if(t.axes?.length>0){i[e]=!0;break}}if(i[e]){const n=`length(data("${this.facet.name}"))`,i="row"===e?t?{signal:`ceil(${n} / ${t})`}:1:t?{signal:`min(${n}, ${t})`}:{signal:n};r.push({name:`${this.facet.name}_${e}`,transform:[{type:"sequence",start:0,stop:i}]})}}const{row:a,column:o}=i;return(a||o)&&r.unshift(this.assembleRowColumnHeaderData("facet",null,e)),r}assemble(){const e=[];let t=null;const n=this.getChildIndependentFieldsWithStep(),{column:r,row:i,facet:o}=this;if(r&&i&&(n.x||n.y)){t=`cross_${this.column.name}_${this.row.name}`;const r=[].concat(n.x??[],n.y??[]),i=r.map((()=>"distinct"));e.push({name:t,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:r,ops:i}]})}for(const r of[a.COLUMN,a.ROW])this[r]&&e.push(this.assembleRowColumnHeaderData(r,t,n));if(o){const t=this.assembleFacetHeaderData(n);t&&e.push(...t)}return e}}},68860:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FilterNode:()=>s});var r=n(79989),i=n(95370),a=n(74686),o=n(62135);class s extends a.DataFlowNode{clone(){return new s(null,this.model,(0,r.duplicate)(this.filter))}constructor(e,t,n){super(e),this.model=t,this.filter=n,this.expr=(0,i.expression)(this.model,this.filter,this),this._dependentFields=(0,o.getDependentFields)(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}},78825:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FilterInvalidNode:()=>u,isValidFiniteNumberExpr:()=>c});var r=n(95290),i=n(79543),a=n(79989),o=n(59845),s=n(74686),l=n(54814);class u extends s.DataFlowNode{clone(){return new u(null,{...this.filter})}constructor(e,t){super(e),this.filter=t}static make(e,t,n){const{config:i,markDef:s}=t,{marks:c,scales:d}=n;if("include-invalid-values"===c&&"include-invalid-values"===d)return null;const f=t.reduceFieldDef(((e,n,a)=>{const u=(0,r.isScaleChannel)(a)&&t.getScaleComponent(a);if(u){const t=u.get("type"),{aggregate:r}=n,c=(0,o.getScaleInvalidDataMode)({scaleChannel:a,markDef:s,config:i,scaleType:t,isCountAggregate:(0,l.isCountingAggregateOp)(r)});"show"!==c&&"always-valid"!==c&&(e[n.field]=n)}return e}),{});return(0,a.keys)(f).length?new u(e,f):null}dependentFields(){return new Set((0,a.keys)(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${(0,a.hash)(this.filter)}`}assemble(){const e=(0,a.keys)(this.filter).reduce(((e,t)=>{const n=this.filter[t],r=(0,i.vgField)(n,{expr:"datum"});return null!==n&&("temporal"===n.type?e.push(`(isDate(${r}) || (${c(r)}))`):"quantitative"===n.type&&e.push(c(r))),e}),[]);return e.length>0?{type:"filter",expr:e.join(" && ")}:null}}function c(e){return`isValid(${e}) && isFinite(+${e})`}},75138:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FlattenTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(this.parent,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const{flatten:n,as:i=[]}=this.transform;this.transform.as=n.map(((e,t)=>i[t]??e))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${(0,r.hash)(this.transform)}`}assemble(){const{flatten:e,as:t}=this.transform;return{type:"flatten",fields:e,as:t}}}},4821:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FoldTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??"key",n[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${(0,r.hash)(this.transform)}`}assemble(){const{fold:e,as:t}=this.transform;return{type:"fold",fields:e,as:t}}}},30366:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ParseNode:()=>S,getImplicitFromEncoding:()=>x,getImplicitFromFilterTransform:()=>w,getImplicitFromSelection:()=>E});var r=n(26372),i=n(54814),a=n(95290),o=n(79543),s=n(89081),l=n(20032),u=n(20916),c=n(90386),d=n(75028),f=n(4976),p=n(46681),h=n(79989),g=n(15058),m=n(7302),y=n(96159),v=n(74686);function b(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function w(e){const t={};return(0,c.forEachLeaf)(e.filter,(e=>{if((0,f.isFieldPredicate)(e)){let n=null;(0,f.isFieldEqualPredicate)(e)?n=(0,g.signalRefOrValue)(e.equal):(0,f.isFieldLTEPredicate)(e)?n=(0,g.signalRefOrValue)(e.lte):(0,f.isFieldLTPredicate)(e)?n=(0,g.signalRefOrValue)(e.lt):(0,f.isFieldGTPredicate)(e)?n=(0,g.signalRefOrValue)(e.gt):(0,f.isFieldGTEPredicate)(e)?n=(0,g.signalRefOrValue)(e.gte):(0,f.isFieldRangePredicate)(e)?n=e.range[0]:(0,f.isFieldOneOfPredicate)(e)&&(n=(e.oneOf??e.in)[0]),n&&((0,l.isDateTime)(n)?t[e.field]="date":(0,r.isNumber)(n)?t[e.field]="number":(0,r.isString)(n)&&(t[e.field]="string")),e.timeUnit&&(t[e.field]="date")}})),t}function x(e){const t={};function n(e){(0,o.isFieldOrDatumDefForTimeFormat)(e)?t[e.field]="date":"quantitative"===e.type&&(0,i.isMinMaxOp)(e.aggregate)?t[e.field]="number":(0,h.accessPathDepth)(e.field)>1?e.field in t||(t[e.field]="flatten"):(0,o.isScaleFieldDef)(e)&&(0,p.isSortField)(e.sort)&&(0,h.accessPathDepth)(e.sort.field)>1&&(e.sort.field in t||(t[e.sort.field]="flatten"))}if(((0,m.isUnitModel)(e)||(0,m.isFacetModel)(e))&&e.forEachFieldDef(((t,r)=>{if((0,o.isTypedFieldDef)(t))n(t);else{const i=(0,a.getMainRangeChannel)(r),o=e.fieldDef(i);n({...t,type:o.type})}})),(0,m.isUnitModel)(e)){const{mark:n,markDef:r,encoding:i}=e;if((0,d.isPathMark)(n)&&!e.encoding.order){const e=i["horizontal"===r.orient?"y":"x"];(0,o.isFieldDef)(e)&&"quantitative"===e.type&&!(e.field in t)&&(t[e.field]="number")}}return t}function E(e){const t={};if((0,m.isUnitModel)(e)&&e.component.selection)for(const n of(0,h.keys)(e.component.selection)){const r=e.component.selection[n];for(const e of r.project.items)!e.channel&&(0,h.accessPathDepth)(e.field)>1&&(t[e.field]="flatten")}return t}class S extends v.DataFlowNode{clone(){return new S(null,(0,h.duplicate)(this._parse))}constructor(e,t){super(e),this._parse=t}hash(){return`Parse ${(0,h.hash)(this._parse)}`}static makeExplicit(e,t,n){let r={};const i=t.data;return!(0,s.isGenerator)(i)&&i?.format?.parse&&(r=i.format.parse),this.makeWithAncestors(e,r,{},n)}static makeWithAncestors(e,t,n,r){for(const e of(0,h.keys)(n)){const t=r.getWithExplicit(e);void 0!==t.value&&(t.explicit||t.value===n[e]||"derived"===t.value||"flatten"===n[e]?delete n[e]:u.warn(u.message.differentParse(e,n[e],t.value)))}for(const e of(0,h.keys)(t)){const n=r.get(e);void 0!==n&&(n===t[e]?delete t[e]:u.warn(u.message.differentParse(e,t[e],n)))}const i=new y.Split(t,n);r.copyAll(i);const a={};for(const e of(0,h.keys)(i.combine())){const t=i.get(e);null!==t&&(a[e]=t)}return 0===(0,h.keys)(a).length||r.parseNothing?null:new S(e,a)}get parse(){return this._parse}merge(e){this._parse={...this._parse,...e.parse},e.remove()}assembleFormatParse(){const e={};for(const t of(0,h.keys)(this._parse)){const n=this._parse[t];1===(0,h.accessPathDepth)(t)&&(e[t]=n)}return e}producedFields(){return new Set((0,h.keys)(this._parse))}dependentFields(){return new Set((0,h.keys)(this._parse))}assembleTransforms(e=!1){return(0,h.keys)(this._parse).filter((t=>!e||(0,h.accessPathDepth)(t)>1)).map((e=>{const t=function(e,t){const n=(0,h.accessPathWithDatum)(e);return"number"===t?`toNumber(${n})`:"boolean"===t?`toBoolean(${n})`:"string"===t?`toString(${n})`:"date"===t?`toDate(${n})`:"flatten"===t?n:t.startsWith("date:")?`timeParse(${n},'${b(t.slice(5,t.length))}')`:t.startsWith("utc:")?`utcParse(${n},'${b(t.slice(4,t.length))}')`:(u.warn(u.message.unrecognizedParse(t)),null)}(e,this._parse[e]);return t?{type:"formula",expr:t,as:(0,h.removePathFromField)(e)}:null})).filter((e=>null!==e))}}},13995:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GeoJSONNode:()=>u});var r=n(26372),i=n(95290),a=n(79543),o=n(99273),s=n(79989),l=n(74686);class u extends l.DataFlowNode{clone(){return new u(null,(0,s.duplicate)(this.fields),this.geojson,this.signal)}static parseAll(e,t){if(t.component.projection&&!t.component.projection.isFit)return e;let n=0;for(const r of[[i.LONGITUDE,i.LATITUDE],[i.LONGITUDE2,i.LATITUDE2]]){const i=r.map((e=>{const n=(0,a.getFieldOrDatumDef)(t.encoding[e]);return(0,a.isFieldDef)(n)?n.field:(0,a.isDatumDef)(n)?{expr:`${n.datum}`}:(0,a.isValueDef)(n)?{expr:`${n.value}`}:void 0}));(i[0]||i[1])&&(e=new u(e,i,null,t.getName("geojson_"+n++)))}if(t.channelHasField(i.SHAPE)){const r=t.typedFieldDef(i.SHAPE);r.type===o.GEOJSON&&(e=new u(e,null,r.field,t.getName("geojson_"+n++)))}return e}constructor(e,t,n,r){super(e),this.fields=t,this.geojson=n,this.signal=r}dependentFields(){const e=(this.fields??[]).filter(r.isString);return new Set([...this.geojson?[this.geojson]:[],...e])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${(0,s.hash)(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}},58211:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GeoPointNode:()=>l});var r=n(26372),i=n(95290),a=n(79543),o=n(79989),s=n(74686);class l extends s.DataFlowNode{clone(){return new l(null,this.projection,(0,o.duplicate)(this.fields),(0,o.duplicate)(this.as))}constructor(e,t,n,r){super(e),this.projection=t,this.fields=n,this.as=r}static parseAll(e,t){if(!t.projectionName())return e;for(const n of[[i.LONGITUDE,i.LATITUDE],[i.LONGITUDE2,i.LATITUDE2]]){const r=n.map((e=>{const n=(0,a.getFieldOrDatumDef)(t.encoding[e]);return(0,a.isFieldDef)(n)?n.field:(0,a.isDatumDef)(n)?{expr:`${n.datum}`}:(0,a.isValueDef)(n)?{expr:`${n.value}`}:void 0})),o=n[0]===i.LONGITUDE2?"2":"";(r[0]||r[1])&&(e=new l(e,t.projectionName(),r,[t.getName(`x${o}`),t.getName(`y${o}`)]))}return e}dependentFields(){return new Set(this.fields.filter(r.isString))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${(0,o.hash)(this.fields)} ${(0,o.hash)(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}},65340:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GraticuleNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,this.params)}constructor(e,t){super(e),this.params=t}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${(0,r.hash)(this.params)}`}assemble(){return{type:"graticule",...!0===this.params?{}:this.params}}}},3297:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IdentifierNode:()=>a});var r=n(84847),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null)}constructor(e){super(e)}dependentFields(){return new Set}producedFields(){return new Set([r.SELECTION_ID])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:r.SELECTION_ID}}}},47628:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ImputeNode:()=>l});var r=n(79543),i=n(98348),a=n(65393),o=n(79989),s=n(74686);class l extends s.DataFlowNode{clone(){return new l(null,(0,o.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(e){const{start:t=0,stop:n,step:r}=e;return{signal:`sequence(${[t,n,...r?[r]:[]].join(",")})`}}static makeFromTransform(e,t){return new l(e,t)}static makeFromEncoding(e,t){const n=t.encoding,a=n.x,o=n.y;if((0,r.isFieldDef)(a)&&(0,r.isFieldDef)(o)){const r=a.impute?a:o.impute?o:void 0;if(void 0===r)return;const s=a.impute?o:o.impute?a:void 0,{method:u,value:c,frame:d,keyvals:f}=r.impute,p=(0,i.pathGroupingFields)(t.mark,n);return new l(e,{impute:r.field,key:s.field,...u?{method:u}:{},...void 0!==c?{value:c}:{},...d?{frame:d}:{},...void 0!==f?{keyvals:f}:{},...p.length?{groupby:p}:{}})}return null}hash(){return`Impute ${(0,o.hash)(this.transform)}`}assemble(){const{impute:e,key:t,keyvals:n,method:r,groupby:i,value:o,frame:s=[null,null]}=this.transform,l={type:"impute",field:e,key:t,...n?{keyvals:(0,a.isImputeSequence)(n)?this.processSequence(n):n}:{},method:"value",...i?{groupby:i}:{},value:r&&"value"!==r?null:o};return r&&"value"!==r?[l,{type:"window",as:[`imputed_${e}_value`],ops:[r],fields:[e],frame:s,ignorePeers:!1,...i?{groupby:i}:{}},{type:"formula",expr:`datum.${e} === null ? datum.imputed_${e}_value : datum.${e}`,as:e}]:[l]}}},95848:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AncestorParse:()=>i});var r=n(96159);class i extends r.Split{constructor(e={},t={},n=!1){super(e,t),this.explicit=e,this.implicit=t,this.parseNothing=n}clone(){const e=super.clone();return e.parseNothing=this.parseNothing,e}}},56123:(e,t,n)=>{"use strict";n.r(t),n.d(t,{JoinAggregateTransformNode:()=>o});var r=n(79543),i=n(79989),a=n(74686);class o extends a.DataFlowNode{clone(){return new o(null,(0,i.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t}addDimensions(e){this.transform.groupby=(0,i.unique)(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return this.transform.groupby&&this.transform.groupby.forEach(e.add,e),this.transform.joinaggregate.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(e){return e.as??(0,r.vgField)(e)}hash(){return`JoinAggregateTransform ${(0,i.hash)(this.transform)}`}assemble(){const e=[],t=[],n=[];for(const r of this.transform.joinaggregate)t.push(r.op),n.push(this.getDefaultName(r)),e.push(void 0===r.field?null:r.field);const r=this.transform.groupby;return{type:"joinaggregate",as:n,ops:t,fields:e,...void 0!==r?{groupby:r}:{}}}}},94808:(e,t,n)=>{"use strict";n.r(t),n.d(t,{makeJoinAggregateFromFacet:()=>s});var r=n(79543),i=n(46681),a=n(33828),o=n(56123);function s(e,t){const{row:n,column:s}=t;if(n&&s){let t=null;for(const l of[n,s])if((0,i.isSortField)(l.sort)){const{field:n,op:s=i.DEFAULT_SORT_OP}=l.sort;e=t=new o.JoinAggregateTransformNode(e,{joinaggregate:[{op:s,field:n,as:(0,a.facetSortFieldName)(l,l.sort,{forAs:!0})}],groupby:[(0,r.vgField)(l)]})}return t}return null}},63186:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LoessTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??t.on,n[1]??t.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${(0,r.hash)(this.transform)}`}assemble(){const{loess:e,on:t,...n}=this.transform;return{type:"loess",x:t,y:e,...n}}}},55320:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LookupNode:()=>d});var r=n(26372),i=n(20916),a=n(65393),o=n(79989),s=n(74686),l=n(80219),u=n(455),c=n(89081);class d extends s.DataFlowNode{clone(){return new d(null,(0,o.duplicate)(this.transform),this.secondary)}constructor(e,t,n){super(e),this.transform=t,this.secondary=n}static make(e,t,n,r){const f=t.component.data.sources,{from:p}=n;let h=null;if((0,a.isLookupData)(p)){let e=(0,l.findSource)(p.data,f);e||(e=new u.SourceNode(p.data),f.push(e));const n=t.getName(`lookup_${r}`);h=new s.OutputNode(e,n,c.DataSourceType.Lookup,t.component.data.outputNodeRefCounts),t.component.data.outputNodes[n]=h}else if((0,a.isLookupSelection)(p)){const e=p.param;let r;n={as:e,...n};try{r=t.getSelectionComponent((0,o.varName)(e),e)}catch(t){throw new Error(i.message.cannotLookupVariableParameter(e))}if(h=r.materialized,!h)throw new Error(i.message.noSameUnitLookup(e))}return new d(e,n,h.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?(0,r.array)(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${(0,o.hash)({transform:this.transform,secondary:this.secondary})}`}assemble(){let e;if(this.transform.from.fields)e={values:this.transform.from.fields,...this.transform.as?{as:(0,r.array)(this.transform.as)}:{}};else{let t=this.transform.as;(0,r.isString)(t)||(i.warn(i.message.NO_FIELDS_NEEDS_AS),t="_lookup"),e={as:[t]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...e,...this.transform.default?{default:this.transform.default}:{}}}}},80449:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FACET_SCALE_PREFIX:()=>o,MAX_OPTIMIZATION_RUNS:()=>s,checkLinks:()=>l,optimizeDataflow:()=>d});var r=n(20916),i=n(72398),a=n(10646);const o="scale_",s=5;function l(e){for(const t of e){for(const e of t.children)if(e.parent!==t)return!1;if(!l(t.children))return!1}return!0}function u(e,t){let n=!1;for(const r of t)n=e.optimize(r)||n;return n}function c(e,t,n){let r=e.sources,a=!1;return a=u(new i.RemoveUnnecessaryOutputNodes,r)||a,a=u(new i.RemoveUnnecessaryIdentifierNodes(t),r)||a,r=r.filter((e=>e.numChildren()>0)),a=u(new i.RemoveUnusedSubtrees,r)||a,r=r.filter((e=>e.numChildren()>0)),n||(a=u(new i.MoveParseUp,r)||a,a=u(new i.MergeBins(t),r)||a,a=u(new i.RemoveDuplicateTimeUnits,r)||a,a=u(new i.MergeParse,r)||a,a=u(new i.MergeAggregates,r)||a,a=u(new i.MergeTimeUnits,r)||a,a=u(new i.MergeIdenticalNodes,r)||a,a=u(new i.MergeOutputs,r)||a),e.sources=r,a}function d(e,t){l(e.sources);let n=0,i=0;for(let r=0;r{"use strict";n.r(t),n.d(t,{BottomUpOptimizer:()=>c,Optimizer:()=>u,TopDownOptimizer:()=>d,isDataSourceNode:()=>l});var r,i=n(65340),a=n(79351),o=n(455),s=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};function l(e){return e instanceof o.SourceNode||e instanceof i.GraticuleNode||e instanceof a.SequenceNode}class u{constructor(){r.set(this,void 0),s(this,r,!1,"f")}setModified(){s(this,r,!0,"f")}get modifiedFlag(){return function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}(this,r,"f")}}r=new WeakMap;class c extends u{getNodeDepths(e,t,n){n.set(e,t);for(const r of e.children)this.getNodeDepths(r,t+1,n);return n}optimize(e){const t=[...this.getNodeDepths(e,0,new Map).entries()].sort(((e,t)=>t[1]-e[1]));for(const e of t)this.run(e[0]);return this.modifiedFlag}}class d extends u{optimize(e){this.run(e);for(const t of e.children)this.optimize(t);return this.modifiedFlag}}},72398:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MergeAggregates:()=>S,MergeBins:()=>_,MergeIdenticalNodes:()=>g,MergeOutputs:()=>A,MergeParse:()=>w,MergeTimeUnits:()=>E,MoveParseUp:()=>b,RemoveDuplicateTimeUnits:()=>y,RemoveUnnecessaryIdentifierNodes:()=>m,RemoveUnnecessaryOutputNodes:()=>v,RemoveUnusedSubtrees:()=>x});var r=n(79989),i=n(93794),a=n(69687),o=n(89153),s=n(74686),l=n(69151),u=n(68860),c=n(30366),d=n(3297),f=n(11259),p=n(455),h=n(62277);class g extends f.TopDownOptimizer{mergeNodes(e,t){const n=t.shift();for(const r of t)e.removeChild(r),r.parent=n,r.remove()}run(e){const t=e.children.map((e=>e.hash())),n={};for(let r=0;r1&&(this.setModified(),this.mergeNodes(e,n[t]))}}class m extends f.TopDownOptimizer{constructor(e){super(),this.requiresSelectionId=e&&(0,i.requiresSelectionId)(e)}run(e){e instanceof d.IdentifierNode&&(this.requiresSelectionId&&((0,f.isDataSourceNode)(e.parent)||e.parent instanceof a.AggregateNode||e.parent instanceof c.ParseNode)||(this.setModified(),e.remove()))}}class y extends f.Optimizer{optimize(e){return this.run(e,new Set),this.modifiedFlag}run(e,t){let n=new Set;e instanceof h.TimeUnitNode&&(n=e.producedFields(),(0,r.hasIntersection)(n,t)&&(this.setModified(),e.removeFormulas(t),0===e.producedFields.length&&e.remove()));for(const r of e.children)this.run(r,new Set([...t,...n]))}}class v extends f.TopDownOptimizer{constructor(){super()}run(e){e instanceof s.OutputNode&&!e.isRequired()&&(this.setModified(),e.remove())}}class b extends f.BottomUpOptimizer{run(e){if(!((0,f.isDataSourceNode)(e)||e.numChildren()>1))for(const t of e.children)if(t instanceof c.ParseNode)if(e instanceof c.ParseNode)this.setModified(),e.merge(t);else{if((0,r.fieldIntersection)(e.producedFields(),t.dependentFields()))continue;this.setModified(),t.swapWithParent()}}}class w extends f.BottomUpOptimizer{run(e){const t=[...e.children],n=e.children.filter((e=>e instanceof c.ParseNode));if(e.numChildren()>1&&n.length>=1){const i={},a=new Set;for(const e of n){const t=e.parse;for(const e of(0,r.keys)(t))e in i?i[e]!==t[e]&&a.add(e):i[e]=t[e]}for(const e of a)delete i[e];if(!(0,r.isEmpty)(i)){this.setModified();const n=new c.ParseNode(e,i);for(const a of t){if(a instanceof c.ParseNode)for(const e of(0,r.keys)(i))delete a.parse[e];e.removeChild(a),a.parent=n,a instanceof c.ParseNode&&0===(0,r.keys)(a.parse).length&&a.remove()}}}}}class x extends f.BottomUpOptimizer{run(e){e instanceof s.OutputNode||e.numChildren()>0||e instanceof l.FacetNode||e instanceof p.SourceNode||(this.setModified(),e.remove())}}class E extends f.BottomUpOptimizer{run(e){const t=e.children.filter((e=>e instanceof h.TimeUnitNode)),n=t.pop();for(const e of t)this.setModified(),n.merge(e)}}class S extends f.BottomUpOptimizer{run(e){const t=e.children.filter((e=>e instanceof a.AggregateNode)),n={};for(const e of t){const t=(0,r.hash)(e.groupBy);t in n||(n[t]=[]),n[t].push(e)}for(const t of(0,r.keys)(n)){const r=n[t];if(r.length>1){const t=r.pop();for(const n of r)t.merge(n)&&(e.removeChild(n),n.parent=t,n.remove(),this.setModified())}}}}class _ extends f.BottomUpOptimizer{constructor(e){super(),this.model=e}run(e){const t=!((0,f.isDataSourceNode)(e)||e instanceof u.FilterNode||e instanceof c.ParseNode||e instanceof d.IdentifierNode),n=[],i=[];for(const a of e.children)a instanceof o.BinNode&&(t&&!(0,r.fieldIntersection)(e.producedFields(),a.dependentFields())?n.push(a):i.push(a));if(n.length>0){const t=n.pop();for(const e of n)t.merge(e,this.model.renameSignal.bind(this.model));this.setModified(),e instanceof o.BinNode?e.merge(t,this.model.renameSignal.bind(this.model)):t.swapWithParent()}if(i.length>1){const e=i.pop();for(const t of i)e.merge(t,this.model.renameSignal.bind(this.model));this.setModified()}}}class A extends f.BottomUpOptimizer{run(e){const t=[...e.children];if(!(0,r.some)(t,(e=>e instanceof s.OutputNode))||e.numChildren()<=1)return;const n=[];let i;for(const r of t)if(r instanceof s.OutputNode){let t=r;for(;1===t.numChildren();){const[e]=t.children;if(!(e instanceof s.OutputNode))break;t=e}n.push(...t.children),i?(e.removeChild(r),r.parent=i.parent,i.parent.removeChild(i),i.parent=t,this.setModified()):i=t}else n.push(r);if(n.length){this.setModified();for(const e of n)e.parent.removeChild(e),e.parent=i}}}},80219:(e,t,n)=>{"use strict";n.r(t),n.d(t,{findSource:()=>H,parseData:()=>V,parseTransformArray:()=>G});var r=n(95848),i=n(89081),a=n(37761),o=n(20916),s=n(75028),l=n(65393),u=n(79989),c=n(15058),d=n(7302),f=n(93794),p=n(83937),h=n(69687),g=n(89153),m=n(77524),y=n(74686),v=n(97872),b=n(96578),w=n(69151),x=n(68860),E=n(78825),S=n(75138),_=n(4821),A=n(30366),C=n(13995),T=n(58211),k=n(65340),R=n(3297),D=n(47628),O=n(56123),N=n(94808),F=n(63186),P=n(55320),M=n(38380),I=n(40763),$=n(6799),L=n(56948),B=n(79351),U=n(455),z=n(89764),q=n(62277),j=n(51422);function H(e,t){for(const n of t){const t=n.data;if(e.name&&n.hasName()&&e.name!==n.dataName)continue;const r=e.format?.mesh,a=t.format?.feature;if(r&&a)continue;const o=e.format?.feature;if((o||a)&&o!==a)continue;const s=t.format?.mesh;if(!r&&!s||r===s)if((0,i.isInlineData)(e)&&(0,i.isInlineData)(t)){if((0,u.deepEqual)(e.values,t.values))return n}else if((0,i.isUrlData)(e)&&(0,i.isUrlData)(t)){if(e.url===t.url)return n}else if((0,i.isNamedData)(e)&&e.name===n.dataName)return n}return null}function G(e,t,n){let r=0;for(const i of t.transforms){let a,s;if((0,l.isCalculate)(i))s=e=new m.CalculateNode(e,i),a="derived";else if((0,l.isFilter)(i)){const r=(0,A.getImplicitFromFilterTransform)(i);s=e=A.ParseNode.makeWithAncestors(e,{},r,n)??e,e=new x.FilterNode(e,t,i.filter)}else if((0,l.isBin)(i))s=e=g.BinNode.makeFromTransform(e,i,t),a="number";else if((0,l.isTimeUnit)(i))a="date",void 0===n.getWithExplicit(i.field).value&&(e=new A.ParseNode(e,{[i.field]:a}),n.set(i.field,a,!1)),s=e=q.TimeUnitNode.makeFromTransform(e,i);else if((0,l.isAggregate)(i))s=e=h.AggregateNode.makeFromTransform(e,i),a="number",(0,f.requiresSelectionId)(t)&&(e=new R.IdentifierNode(e));else if((0,l.isLookup)(i))s=e=P.LookupNode.make(e,t,i,r++),a="derived";else if((0,l.isWindow)(i))s=e=new j.WindowTransformNode(e,i),a="number";else if((0,l.isJoinAggregate)(i))s=e=new O.JoinAggregateTransformNode(e,i),a="number";else if((0,l.isStack)(i))s=e=z.StackNode.makeFromTransform(e,i),a="derived";else if((0,l.isFold)(i))s=e=new _.FoldTransformNode(e,i),a="derived";else if((0,l.isExtent)(i))s=e=new b.ExtentTransformNode(e,i),a="derived";else if((0,l.isFlatten)(i))s=e=new S.FlattenTransformNode(e,i),a="derived";else if((0,l.isPivot)(i))s=e=new M.PivotTransformNode(e,i),a="derived";else if((0,l.isSample)(i))e=new L.SampleTransformNode(e,i);else if((0,l.isImpute)(i))s=e=D.ImputeNode.makeFromTransform(e,i),a="derived";else if((0,l.isDensity)(i))s=e=new v.DensityTransformNode(e,i),a="derived";else if((0,l.isQuantile)(i))s=e=new I.QuantileTransformNode(e,i),a="derived";else if((0,l.isRegression)(i))s=e=new $.RegressionTransformNode(e,i),a="derived";else{if(!(0,l.isLoess)(i)){o.warn(o.message.invalidTransformIgnored(i));continue}s=e=new F.LoessTransformNode(e,i),a="derived"}if(s&&void 0!==a)for(const e of s.producedFields()??[])n.set(e,a,!1)}return e}function V(e){let t=function(e,t){if(e.data||!e.parent){if(null===e.data){const e=new U.SourceNode({values:[]});return t.push(e),e}const n=H(e.data,t);if(n)return(0,i.isGenerator)(e.data)||(n.data.format=(0,u.mergeDeep)({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const n=new U.SourceNode(e.data);return t.push(n),n}}return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}(e,e.component.data.sources);const{outputNodes:n,outputNodeRefCounts:o}=e.component.data,l=e.data,y=l&&((0,i.isGenerator)(l)||(0,i.isUrlData)(l)||(0,i.isInlineData)(l))||!e.parent?new r.AncestorParse:e.parent.component.data.ancestorParse.clone();(0,i.isGenerator)(l)?((0,i.isSequenceGenerator)(l)?t=new B.SequenceNode(t,l.sequence):(0,i.isGraticuleGenerator)(l)&&(t=new k.GraticuleNode(t,l.graticule)),y.parseNothing=!0):null===l?.format?.parse&&(y.parseNothing=!0),t=A.ParseNode.makeExplicit(t,e,y)??t,t=new R.IdentifierNode(t);const v=e.parent&&(0,d.isLayerModel)(e.parent);((0,d.isUnitModel)(e)||(0,d.isFacetModel)(e))&&v&&(t=g.BinNode.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=G(t,e,y));const b=(0,A.getImplicitFromSelection)(e),x=(0,A.getImplicitFromEncoding)(e);t=A.ParseNode.makeWithAncestors(t,{},{...b,...x},y)??t,(0,d.isUnitModel)(e)&&(t=C.GeoJSONNode.parseAll(t,e),t=T.GeoPointNode.parseAll(t,e)),((0,d.isUnitModel)(e)||(0,d.isFacetModel)(e))&&(v||(t=g.BinNode.makeFromEncoding(t,e)??t),t=q.TimeUnitNode.makeFromEncoding(t,e)??t,t=m.CalculateNode.parseAllForSortIndex(t,e));const S=t=W(i.DataSourceType.Raw,e,t);if((0,d.isUnitModel)(e)){const n=h.AggregateNode.makeFromEncoding(t,e);n&&(t=n,(0,f.requiresSelectionId)(e)&&(t=new R.IdentifierNode(t))),t=D.ImputeNode.makeFromEncoding(t,e)??t,t=z.StackNode.makeFromEncoding(t,e)??t}let _,O;if((0,d.isUnitModel)(e)){const{markDef:n,mark:r,config:o}=e,l=(0,c.getMarkPropOrConfig)("invalid",n,o),{marks:u,scales:d}=O=(0,a.getDataSourcesForHandlingInvalidValues)({invalid:l,isPath:(0,s.isPathMark)(r)});u!==d&&"include-invalid-values"===d&&(_=t=W(i.DataSourceType.PreFilterInvalid,e,t)),"exclude-invalid-values"===u&&(t=E.FilterInvalidNode.make(t,e,O)??t)}const F=t=W(i.DataSourceType.Main,e,t);let P;if((0,d.isUnitModel)(e)&&O){const{marks:n,scales:r}=O;"include-invalid-values"===n&&"exclude-invalid-values"===r&&(t=E.FilterInvalidNode.make(t,e,O)??t,P=t=W(i.DataSourceType.PostFilterInvalid,e,t))}(0,d.isUnitModel)(e)&&(0,p.materializeSelections)(e,F);let M=null;if((0,d.isFacetModel)(e)){const r=e.getName("facet");t=(0,N.makeJoinAggregateFromFacet)(t,e.facet)??t,M=new w.FacetNode(t,e,r,F.getSource()),n[r]=M}return{...e.component.data,outputNodes:n,outputNodeRefCounts:o,raw:S,main:F,facetRoot:M,ancestorParse:y,preFilterInvalid:_,postFilterInvalid:P}}function W(e,t,n){const{outputNodes:r,outputNodeRefCounts:i}=t.component.data,a=t.getDataName(e),o=new y.OutputNode(n,a,e,i);return r[a]=o,o}},38380:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PivotTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t}addDimensions(e){this.transform.groupby=(0,r.unique)((this.transform.groupby??[]).concat(e),(e=>e))}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${(0,r.hash)(this.transform)}`}assemble(){const{pivot:e,value:t,groupby:n,limit:r,op:i}=this.transform;return{type:"pivot",field:e,value:t,...void 0!==r?{limit:r}:{},...void 0!==i?{op:i}:{},...void 0!==n?{groupby:n}:{}}}}},40763:(e,t,n)=>{"use strict";n.r(t),n.d(t,{QuantileTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??"prob",n[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${(0,r.hash)(this.transform)}`}assemble(){const{quantile:e,...t}=this.transform;return{type:"quantile",field:e,...t}}}},6799:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RegressionTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??t.on,n[1]??t.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${(0,r.hash)(this.transform)}`}assemble(){const{regression:e,on:t,...n}=this.transform;return{type:"regression",x:t,y:e,...n}}}},56948:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SampleTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${(0,r.hash)(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}},79351:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SequenceNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,this.params)}constructor(e,t){super(e),this.params=t}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${(0,r.hash)(this.params)}`}assemble(){return{type:"sequence",...this.params}}}},455:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SourceNode:()=>o});var r=n(89081),i=n(79989),a=n(74686);class o extends a.DataFlowNode{constructor(e){let t;if(super(null),e??(e={name:"source"}),(0,r.isGenerator)(e)||(t=e.format?{...(0,i.omit)(e.format,["parse"])}:{}),(0,r.isInlineData)(e))this._data={values:e.values};else if((0,r.isUrlData)(e)){if(this._data={url:e.url},!t.type){let n=/(?:\.([^.]+))?$/.exec(e.url)[1];(0,i.contains)(["json","csv","tsv","dsv","topojson"],n)||(n="json"),t.type=n}}else(0,r.isSphereGenerator)(e)?this._data={values:[{type:"Sphere"}]}:((0,r.isNamedData)(e)||(0,r.isGenerator)(e))&&(this._data={});this._generator=(0,r.isGenerator)(e),e.name&&(this._name=e.name),t&&!(0,i.isEmpty)(t)&&(this._data.format=t)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(e){this._name=e}set parent(e){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return{name:this._name,...this._data,transform:[]}}}},89764:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StackNode:()=>u});var r=n(26372),i=n(79543),a=n(79989),o=n(15058),s=n(74686),l=n(78825);class u extends s.DataFlowNode{clone(){return new u(null,(0,a.duplicate)(this._stack))}constructor(e,t){super(e),this._stack=t}static makeFromTransform(e,t){const{stack:n,groupby:i,as:o,offset:s="zero"}=t,l=[],c=[];if(void 0!==t.sort)for(const e of t.sort)l.push(e.field),c.push((0,a.getFirstDefined)(e.order,"ascending"));const d={field:l,order:c};let f;return f=function(e){return(0,r.isArray)(e)&&e.every((e=>(0,r.isString)(e)))&&e.length>1}(o)?o:(0,r.isString)(o)?[o,`${o}_end`]:[`${t.stack}_start`,`${t.stack}_end`],new u(e,{dimensionFieldDefs:[],stackField:n,groupby:i,offset:s,sort:d,facetby:[],as:f})}static makeFromEncoding(e,t){const n=t.stack,{encoding:a}=t;if(!n)return null;const{groupbyChannels:s,fieldChannel:l,offset:c,impute:d}=n,f=s.map((e=>{const t=a[e];return(0,i.getFieldDef)(t)})).filter((e=>!!e)),p=function(e){return e.stack.stackBy.reduce(((e,t)=>{const n=t.fieldDef,r=(0,i.vgField)(n);return r&&e.push(r),e}),[])}(t),h=t.encoding.order;let g;if((0,r.isArray)(h)||(0,i.isFieldDef)(h))g=(0,o.sortParams)(h);else{const e=(0,i.isOrderOnlyDef)(h)?h.sort:"y"===l?"descending":"ascending";g=p.reduce(((t,n)=>(t.field.includes(n)||(t.field.push(n),t.order.push(e)),t)),{field:[],order:[]})}return new u(e,{dimensionFieldDefs:f,stackField:t.vgField(l),facetby:[],stackby:p,sort:g,offset:c,impute:d,as:[t.vgField(l,{suffix:"start",forAs:!0}),t.vgField(l,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(e){this._stack.facetby.push(...e)}dependentFields(){const e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach(e.add,e),this._stack.facetby.forEach(e.add,e),this._stack.sort.field.forEach(e.add,e),e}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${(0,a.hash)(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:e,impute:t,groupby:n}=this._stack;return e.length>0?e.map((e=>e.bin?t?[(0,i.vgField)(e,{binSuffix:"mid"})]:[(0,i.vgField)(e,{}),(0,i.vgField)(e,{binSuffix:"end"})]:[(0,i.vgField)(e)])).flat():n??[]}assemble(){const e=[],{facetby:t,dimensionFieldDefs:n,stackField:r,stackby:a,sort:o,offset:s,impute:u,as:c}=this._stack;if(u)for(const o of n){const{bandPosition:n=.5,bin:s}=o;if(s){const t=(0,i.vgField)(o,{expr:"datum"}),r=(0,i.vgField)(o,{expr:"datum",binSuffix:"end"});e.push({type:"formula",expr:`${(0,l.isValidFiniteNumberExpr)(t)} ? ${n}*${t}+${1-n}*${r} : ${t}`,as:(0,i.vgField)(o,{binSuffix:"mid",forAs:!0})})}e.push({type:"impute",field:r,groupby:[...a,...t],key:(0,i.vgField)(o,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[...this.getGroupbyFields(),...t],field:r,sort:o,as:c,offset:s}),e}}},10646:(e,t,n)=>{"use strict";n.r(t),n.d(t,{moveFacetDown:()=>d});var r=n(89081),i=n(69687),a=n(74686),o=n(69151),s=n(56123),l=n(80449),u=n(89764),c=n(51422);function d(e){if(e instanceof o.FacetNode)if(1!==e.numChildren()||e.children[0]instanceof a.OutputNode){const n=e.model.component.data.main;f(n);const r=(t=e,function e(n){if(!(n instanceof o.FacetNode)){const r=n.clone();if(r instanceof a.OutputNode){const e=l.FACET_SCALE_PREFIX+r.getSource();r.setSource(e),t.model.component.data.outputNodes[e]=r}else(r instanceof i.AggregateNode||r instanceof u.StackNode||r instanceof c.WindowTransformNode||r instanceof s.JoinAggregateTransformNode)&&r.addDimensions(t.fields);for(const t of n.children.flatMap(e))t.parent=r;return[r]}return n.children.flatMap(e)}),d=e.children.map(r).flat();for(const e of d)e.parent=n}else{const t=e.children[0];(t instanceof i.AggregateNode||t instanceof u.StackNode||t instanceof c.WindowTransformNode||t instanceof s.JoinAggregateTransformNode)&&t.addDimensions(e.fields),t.swapWithParent(),d(e)}else e.children.map(d);var t}function f(e){if(e instanceof a.OutputNode&&e.type===r.DataSourceType.Main&&1===e.numChildren()){const t=e.children[0];t instanceof o.FacetNode||(t.swapWithParent(),f(e))}}},62277:(e,t,n)=>{"use strict";n.r(t),n.d(t,{OFFSETTED_RECT_END_SUFFIX:()=>h,OFFSETTED_RECT_START_SUFFIX:()=>p,TimeUnitNode:()=>f});var r=n(79543),i=n(96598),a=n(79989),o=n(7302),s=n(74686),l=n(75028),u=n(95290);function c(e){return void 0!==e.as}function d(e){return`${e}_end`}class f extends s.DataFlowNode{clone(){return new f(null,(0,a.duplicate)(this.timeUnits))}constructor(e,t){super(e),this.timeUnits=t}static makeFromEncoding(e,t){const n=t.reduceFieldDef(((e,n,s)=>{const{field:c,timeUnit:d}=n;if(d){let f;if((0,i.isBinnedTimeUnit)(d)){if((0,o.isUnitModel)(t)){const{mark:e,markDef:a,config:o}=t,s=(0,r.getBandPosition)({fieldDef:n,markDef:a,config:o});((0,l.isRectBasedMark)(e)||s)&&(f={timeUnit:(0,i.normalizeTimeUnit)(d),field:c})}}else f={as:(0,r.vgField)(n,{forAs:!0}),field:c,timeUnit:d};if((0,o.isUnitModel)(t)){const{mark:e,markDef:i,config:a}=t,o=(0,r.getBandPosition)({fieldDef:n,markDef:i,config:a});(0,l.isRectBasedMark)(e)&&(0,u.isXorY)(s)&&.5!==o&&(f.rectBandPosition=o)}f&&(e[(0,a.hash)(f)]=f)}return e}),{});return(0,a.isEmpty)(n)?null:new f(e,n)}static makeFromTransform(e,t){const{timeUnit:n,...r}={...t},o={...r,timeUnit:(0,i.normalizeTimeUnit)(n)};return new f(e,{[(0,a.hash)(o)]:o})}merge(e){this.timeUnits={...this.timeUnits};for(const t in e.timeUnits)this.timeUnits[t]||(this.timeUnits[t]=e.timeUnits[t]);for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}removeFormulas(e){const t={};for(const[n,r]of(0,a.entries)(this.timeUnits)){const i=c(r)?r.as:`${r.field}_end`;e.has(i)||(t[n]=r)}this.timeUnits=t}producedFields(){return new Set((0,a.vals)(this.timeUnits).map((e=>c(e)?e.as:d(e.field))))}dependentFields(){return new Set((0,a.vals)(this.timeUnits).map((e=>e.field)))}hash(){return`TimeUnit ${(0,a.hash)(this.timeUnits)}`}assemble(){const e=[];for(const t of(0,a.vals)(this.timeUnits)){const{rectBandPosition:n}=t,r=(0,i.normalizeTimeUnit)(t.timeUnit);if(c(t)){const{field:o,as:s}=t,{unit:l,utc:u,...c}=r,d=[s,`${s}_end`];e.push({field:(0,a.replacePathInField)(o),type:"timeunit",...l?{units:(0,i.getTimeUnitParts)(l)}:{},...u?{timezone:"utc"}:{},...c,as:d}),e.push(...m(d,n,r))}else if(t){const{field:i}=t,a=i.replaceAll("\\.","."),o=g({timeUnit:r,field:a}),s=d(a);e.push({type:"formula",expr:o,as:s}),e.push(...m([a,s],n,r))}}return e}}const p="offsetted_rect_start",h="offsetted_rect_end";function g({timeUnit:e,field:t,reverse:n}){const{unit:r,utc:a}=e,o=(0,i.getSmallestTimeUnitPart)(r),{part:s,step:l}=(0,i.getDateTimePartAndStep)(o,e.step);return`${a?"utcOffset":"timeOffset"}('${s}', datum['${t}'], ${n?-l:l})`}function m([e,t],n,r){if(void 0!==n&&.5!==n){const i=`datum['${e}']`,a=`datum['${t}']`;return[{type:"formula",expr:y([g({timeUnit:r,field:e,reverse:!0}),i],n+.5),as:`${e}_${p}`},{type:"formula",expr:y([i,a],n+.5),as:`${e}_${h}`}]}return[]}function y([e,t],n){return`${1-n} * ${e} + ${n} * ${t}`}},51422:(e,t,n)=>{"use strict";n.r(t),n.d(t,{WindowTransformNode:()=>s});var r=n(54814),i=n(79543),a=n(79989),o=n(74686);class s extends o.DataFlowNode{clone(){return new s(null,(0,a.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t}addDimensions(e){this.transform.groupby=(0,a.unique)(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return(this.transform.groupby??[]).forEach(e.add,e),(this.transform.sort??[]).forEach((t=>e.add(t.field))),this.transform.window.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(e){return e.as??(0,i.vgField)(e)}hash(){return`WindowTransform ${(0,a.hash)(this.transform)}`}assemble(){const e=[],t=[],n=[],i=[];for(const r of this.transform.window)t.push(r.op),n.push(this.getDefaultName(r)),i.push(void 0===r.param?null:r.param),e.push(void 0===r.field?null:r.field);const a=this.transform.frame,o=this.transform.groupby;if(a&&null===a[0]&&null===a[1]&&t.every((e=>(0,r.isAggregateOp)(e))))return{type:"joinaggregate",as:n,ops:t,fields:e,...void 0!==o?{groupby:o}:{}};const s=[],l=[];if(void 0!==this.transform.sort)for(const e of this.transform.sort)s.push(e.field),l.push(e.order??"ascending");const u={field:s,order:l},c=this.transform.ignorePeers;return{type:"window",params:i,as:n,ops:t,fields:e,sort:u,...void 0!==c?{ignorePeers:c}:{},...void 0!==o?{groupby:o}:{},...void 0!==a?{frame:a}:{}}}}},33828:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FacetModel:()=>T,facetSortFieldName:()=>C});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(3802),l=n(20916),u=n(31179),c=n(46681),d=n(51894),f=n(79989),p=n(5711),h=n(36598),g=n(81458),m=n(77524),y=n(80219),v=n(51885),b=n(18020),w=n(10078),x=n(99354),E=n(27588),S=n(7302),_=n(63760),A=n(52128);function C(e,t,n){return(0,o.vgField)(t,{suffix:`by_${(0,o.vgField)(e)}`,...n})}class T extends S.ModelWithField{constructor(e,t,n,r){super(e,"facet",t,n,r,e.resolve),this.child=(0,h.buildModel)(e.spec,this,this.getName("child"),void 0,r),this.children=[this.child],this.facet=this.initFacet(e.facet)}initFacet(e){if(!(0,d.isFacetMapping)(e))return{facet:this.initFacetFieldDef(e,"facet")};const t=(0,f.keys)(e),n={};for(const r of t){if(![a.ROW,a.COLUMN].includes(r)){l.warn(l.message.incompatibleChannel(r,"facet"));break}const t=e[r];if(void 0===t.field){l.warn(l.message.emptyFieldDef(t,r));break}n[r]=this.initFacetFieldDef(t,r)}return n}initFacetFieldDef(e,t){const n=(0,o.initFieldDef)(e,t);return n.header?n.header=(0,s.replaceExprRef)(n.header):null===n.header&&(n.header=null),n}channelHasField(e){return(0,f.hasProperty)(this.facet,e)}fieldDef(e){return this.facet[e]}parseData(){this.component.data=(0,y.parseData)(this),this.child.parseData()}parseLayoutSize(){(0,E.parseChildrenLayoutSize)(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),(0,x.parseFacetHeaders)(this)}assembleSelectionTopLevelSignals(e){return this.child.assembleSelectionTopLevelSignals(e)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(e){return this.child.assembleSelectionData(e)}getHeaderLayoutMixins(){const e={};for(const t of a.FACET_CHANNELS)for(const n of w.HEADER_TYPES){const r=this.component.layoutHeaders[t],i=r[n],{facetFieldDef:a}=r;if(a){const n=(0,b.getHeaderProperty)("titleOrient",a.header,this.config,t);if(["right","bottom"].includes(n)){const r=(0,b.getHeaderChannel)(t,n);e.titleAnchor??(e.titleAnchor={}),e.titleAnchor[r]="end"}}if(i?.[0]){const i="row"===t?"height":"width",a="header"===n?"headerBand":"footerBand";"facet"===t||this.child.component.layoutSize.get(i)||(e[a]??(e[a]={}),e[a][t]=.5),r.title&&(e.offset??(e.offset={}),e.offset["row"===t?"rowTitle":"columnTitle"]=10)}}return e}assembleDefaultLayout(){const{column:e,row:t}=this.facet,n=e?this.columnDistinctSignal():t?1:void 0;let r="all";return(t||"independent"!==this.component.resolve.scale.x)&&(e||"independent"!==this.component.resolve.scale.y)||(r="none"),{...this.getHeaderLayoutMixins(),...n?{columns:n}:{},bounds:"full",align:r}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof T))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(e){return this.parent&&this.parent instanceof T?{...this.channelHasField("column")?{encode:{update:{columns:{field:(0,o.vgField)(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(e)}:super.assembleGroup(e)}getCardinalityAggregateForChild(){const e=[],t=[],n=[];if(this.child instanceof T){if(this.child.channelHasField("column")){const r=(0,o.vgField)(this.child.facet.column);e.push(r),t.push("distinct"),n.push(`distinct_${r}`)}}else for(const r of a.POSITION_SCALE_CHANNELS){const i=this.child.component.scales[r];if(i&&!i.merged){const a=i.get("type"),o=i.get("range");if((0,u.hasDiscreteDomain)(a)&&(0,p.isVgRangeStep)(o)){const i=(0,_.assembleDomain)(this.child,r),a=(0,_.getFieldFromDomain)(i);a?(e.push(a),t.push("distinct"),n.push(`distinct_${a}`)):l.warn(l.message.unknownField(r))}}}return{fields:e,ops:t,as:n}}assembleFacet(){const{name:e,data:t}=this.component.data.facetRoot,{row:n,column:s}=this.facet,{fields:l,ops:u,as:d}=this.getCardinalityAggregateForChild(),f=[];for(const e of a.FACET_CHANNELS){const t=this.facet[e];if(t){f.push((0,o.vgField)(t));const{bin:a,sort:p}=t;if((0,i.isBinning)(a)&&f.push((0,o.vgField)(t,{binSuffix:"end"})),(0,c.isSortField)(p)){const{field:e,op:r=c.DEFAULT_SORT_OP}=p,i=C(t,p);n&&s?(l.push(i),u.push("max"),d.push(i)):(l.push(e),u.push(r),d.push(i))}else if((0,r.isArray)(p)){const n=(0,m.sortArrayIndexField)(t,e);l.push(n),u.push("max"),d.push(n)}}}const p=!!n&&!!s;return{name:e,data:t,groupby:f,...p||l.length>0?{aggregate:{...p?{cross:p}:{},...l.length?{fields:l,ops:u,as:d}:{}}}:{}}}facetSortFields(e){const{facet:t}=this,n=t[e];return n?(0,c.isSortField)(n.sort)?[C(n,n.sort,{expr:"datum"})]:(0,r.isArray)(n.sort)?[(0,m.sortArrayIndexField)(n,e,{expr:"datum"})]:[(0,o.vgField)(n,{expr:"datum"})]:[]}facetSortOrder(e){const{facet:t}=this,n=t[e];if(n){const{sort:e}=n;return[((0,c.isSortField)(e)?e.order:!(0,r.isArray)(e)&&e)||"ascending"]}return[]}assembleLabelTitle(){const{facet:e,config:t}=this;if(e.facet)return(0,v.assembleLabelTitle)(e.facet,"facet",t);const n={row:["top","bottom"],column:["left","right"]};for(const r of w.HEADER_CHANNELS)if(e[r]){const i=(0,b.getHeaderProperty)("labelOrient",e[r]?.header,t,r);if(n[r].includes(i))return(0,v.assembleLabelTitle)(e[r],r,t)}}assembleMarks(){const{child:e}=this,t=this.component.data.facetRoot,n=(0,g.assembleFacetData)(t),r=e.assembleGroupEncodeEntry(!1),i=this.assembleLabelTitle()||e.assembleTitle(),o=e.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...i?{title:i}:{},...o?{style:o}:{},from:{facet:this.assembleFacet()},sort:{field:a.FACET_CHANNELS.map((e=>this.facetSortFields(e))).flat(),order:a.FACET_CHANNELS.map((e=>this.facetSortOrder(e))).flat()},...n.length>0?{data:n}:{},...r?{encode:{update:r}}:{},...e.assembleGroup((0,A.assembleFacetSignals)(this,[]))}]}getMapping(){return this.facet}}},6032:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BIN_RANGE_DELIMITER:()=>g,binFormatExpression:()=>A,formatCustomType:()=>v,formatSignalRef:()=>m,guideFormat:()=>b,guideFormatType:()=>w,isCustomFormatType:()=>p,numberFormat:()=>x,timeFormat:()=>E,timeFormatExpression:()=>C});var r=n(26372),i=n(19664),a=n(79543),o=n(4976),s=n(31179),l=n(96598),u=n(99273),c=n(79989),d=n(5711),f=n(42104);function p(e){return e&&"number"!==e&&"time"!==e}function h(e,t,n){return`${e}(${t}${n?`, ${(0,c.stringify)(n)}`:""})`}const g=" – ";function m({fieldOrDatumDef:e,format:t,formatType:n,expr:r,normalizeStack:o,config:u}){if(p(n))return v({fieldOrDatumDef:e,format:t,formatType:n,expr:r,config:u});const c=y(e,r,o),d=(0,a.channelDefType)(e);if(void 0===t&&void 0===n&&u.customFormatTypes){if("quantitative"===d){if(o&&u.normalizedNumberFormatType)return v({fieldOrDatumDef:e,format:u.normalizedNumberFormat,formatType:u.normalizedNumberFormatType,expr:r,config:u});if(u.numberFormatType)return v({fieldOrDatumDef:e,format:u.numberFormat,formatType:u.numberFormatType,expr:r,config:u})}if("temporal"===d&&u.timeFormatType&&(0,a.isFieldDef)(e)&&void 0===e.timeUnit)return v({fieldOrDatumDef:e,format:u.timeFormat,formatType:u.timeFormatType,expr:r,config:u})}if((0,a.isFieldOrDatumDefForTimeFormat)(e)){const n=C({field:c,timeUnit:(0,a.isFieldDef)(e)?(0,l.normalizeTimeUnit)(e.timeUnit)?.unit:void 0,format:t,formatType:u.timeFormatType,rawTimeFormat:u.timeFormat,isUTCScale:(0,a.isScaleFieldDef)(e)&&e.scale?.type===s.ScaleType.UTC});return n?{signal:n}:void 0}return t=x({type:d,specifiedFormat:t,config:u,normalizeStack:o}),(0,a.isFieldDef)(e)&&(0,i.isBinning)(e.bin)?{signal:A(c,(0,a.vgField)(e,{expr:r,binSuffix:"end"}),t,n,u)}:t||"quantitative"===(0,a.channelDefType)(e)?{signal:`${S(c,t)}`}:{signal:`isValid(${c}) ? ${c} : ""+${c}`}}function y(e,t,n){return(0,a.isFieldDef)(e)?n?`${(0,a.vgField)(e,{expr:t,suffix:"end"})}-${(0,a.vgField)(e,{expr:t,suffix:"start"})}`:(0,a.vgField)(e,{expr:t}):(0,f.datumDefToExpr)(e)}function v({fieldOrDatumDef:e,format:t,formatType:n,expr:r,normalizeStack:o,config:s,field:l}){return l??(l=y(e,r,o)),"datum.value"!==l&&(0,a.isFieldDef)(e)&&(0,i.isBinning)(e.bin)?{signal:A(l,(0,a.vgField)(e,{expr:r,binSuffix:"end"}),t,n,s)}:{signal:h(n,l,t)}}function b(e,t,n,i,o,s){if(!(0,r.isString)(i)||!p(i)){if(void 0===n&&void 0===i&&o.customFormatTypes&&"quantitative"===(0,a.channelDefType)(e)){if(o.normalizedNumberFormatType&&(0,a.isPositionFieldOrDatumDef)(e)&&"normalize"===e.stack)return;if(o.numberFormatType)return}if((0,a.isPositionFieldOrDatumDef)(e)&&"normalize"===e.stack&&o.normalizedNumberFormat)return x({type:"quantitative",config:o,normalizeStack:!0});if((0,a.isFieldOrDatumDefForTimeFormat)(e)){const t=(0,a.isFieldDef)(e)?(0,l.normalizeTimeUnit)(e.timeUnit)?.unit:void 0;if(void 0===t&&o.customFormatTypes&&o.timeFormatType)return;return E({specifiedFormat:n,timeUnit:t,config:o,omitTimeFormatConfig:s})}return x({type:t,specifiedFormat:n,config:o})}}function w(e,t,n){return e&&((0,d.isSignalRef)(e)||"number"===e||"time"===e)?e:(0,a.isFieldOrDatumDefForTimeFormat)(t)&&"time"!==n&&"utc"!==n?(0,a.isFieldDef)(t)&&(0,l.normalizeTimeUnit)(t?.timeUnit)?.utc?"utc":"time":void 0}function x({type:e,specifiedFormat:t,config:n,normalizeStack:i}){return(0,r.isString)(t)?t:e===u.QUANTITATIVE?i?n.normalizedNumberFormat:n.numberFormat:void 0}function E({specifiedFormat:e,timeUnit:t,config:n,omitTimeFormatConfig:r}){return e||(t?{signal:(0,l.timeUnitSpecifierExpression)(t)}:r?void 0:n.timeFormat)}function S(e,t){return`format(${e}, "${t||""}")`}function _(e,t,n,i){return p(n)?h(n,e,t):S(e,((0,r.isString)(t)?t:void 0)??i.numberFormat)}function A(e,t,n,r,i){if(void 0===n&&void 0===r&&i.customFormatTypes&&i.numberFormatType)return A(e,t,i.numberFormat,i.numberFormatType,i);const a=_(e,n,r,i),s=_(t,n,r,i);return`${(0,o.fieldValidPredicate)(e,!1)} ? "null" : ${a} + "${g}" + ${s}`}function C({field:e,timeUnit:t,format:n,formatType:i,rawTimeFormat:a,isUTCScale:o}){return!t||n?!t&&i?`${i}(${e}, '${n}')`:`${o?"utc":"time"}Format(${e}, '${n=(0,r.isString)(n)?n:a}')`:(0,l.formatExpression)(t,e,o)}},16039:(e,t,n)=>{"use strict";n.r(t),n.d(t,{guideEncodeEntry:()=>o});var r=n(79989),i=n(15058),a=n(49144);function o(e,t){return(0,r.keys)(e).reduce(((n,r)=>({...n,...(0,a.wrapCondition)({model:t,channelDef:e[r],vgChannel:r,mainRefFn:e=>(0,i.signalOrValueRef)(e.value),invalidValueRef:void 0})})),{})}},51885:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleHeaderGroup:()=>E,assembleHeaderGroups:()=>b,assembleHeaderProperties:()=>C,assembleLabelTitle:()=>x,assembleLayoutTitleBand:()=>A,assembleTitleGroup:()=>m,defaultHeaderGuideAlign:()=>y,defaultHeaderGuideBaseline:()=>v,getLayoutTitleBand:()=>_});var r=n(26372),i=n(95290),a=n(79543),o=n(41028),s=n(46681),l=n(51894),u=n(79989),c=n(43852),d=n(77524),f=n(6032),p=n(7302),h=n(18020),g=n(10078);function m(e,t){const n=e.component.layoutHeaders[t].title,r=e.config?e.config:void 0,i=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:a,titleAngle:s,titleOrient:l}=(0,h.getHeaderProperties)(["titleAnchor","titleAngle","titleOrient"],i.header,r,t),c=(0,h.getHeaderChannel)(t,l),d=(0,u.normalizeAngle)(s);return{name:`${t}-title`,type:"group",role:`${c}-title`,title:{text:n,..."row"===t?{orient:"left"}:{},style:"guide-title",...v(d,c),...y(c,d,a),...C(r,i,t,o.HEADER_TITLE_PROPERTIES,o.HEADER_TITLE_PROPERTIES_MAP)}}}function y(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const r=(0,c.defaultLabelAlign)(t,"row"===e?"left":"top","row"===e?"y":"x");return r?{align:r}:{}}function v(e,t){const n=(0,c.defaultLabelBaseline)(e,"row"===t?"left":"top","row"===t?"y":"x",!0);return n?{baseline:n}:{}}function b(e,t){const n=e.component.layoutHeaders[t],r=[];for(const i of g.HEADER_TYPES)if(n[i])for(const a of n[i]){const o=E(e,t,i,n,a);null!=o&&r.push(o)}return r}function w(e,t){const{sort:n}=e;return(0,s.isSortField)(n)?{field:(0,a.vgField)(n,{expr:"datum"}),order:n.order??"ascending"}:(0,r.isArray)(n)?{field:(0,d.sortArrayIndexField)(e,t,{expr:"datum"}),order:"ascending"}:{field:(0,a.vgField)(e,{expr:"datum"}),order:n??"ascending"}}function x(e,t,n){const{format:r,formatType:i,labelAngle:s,labelAnchor:l,labelOrient:c,labelExpr:d}=(0,h.getHeaderProperties)(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),p=(0,f.formatSignalRef)({fieldOrDatumDef:e,format:r,formatType:i,expr:"parent",config:n}).signal,g=(0,h.getHeaderChannel)(t,c);return{text:{signal:d?(0,u.replaceAll)((0,u.replaceAll)(d,"datum.label",p),"datum.value",(0,a.vgField)(e,{expr:"parent"})):p},..."row"===t?{orient:"left"}:{},style:"guide-label",frame:"group",...v(s,g),...y(g,s,l),...C(n,e,t,o.HEADER_LABEL_PROPERTIES,o.HEADER_LABEL_PROPERTIES_MAP)}}function E(e,t,n,r,i){if(i){let a=null;const{facetFieldDef:o}=r,s=e.config?e.config:void 0;if(o&&i.labels){const{labelOrient:e}=(0,h.getHeaderProperties)(["labelOrient"],o.header,s,t);("row"===t&&!(0,u.contains)(["top","bottom"],e)||"column"===t&&!(0,u.contains)(["left","right"],e))&&(a=x(o,t,s))}const c=(0,p.isFacetModel)(e)&&!(0,l.isFacetMapping)(e.facet),d=i.axes,f=d?.length>0;if(a||f){const s="row"===t?"height":"width";return{name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`,...r.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:w(o,t)}:{},...f&&c?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...a?{title:a}:{},...i.sizeSignal?{encode:{update:{[s]:i.sizeSignal}}}:{},...f?{axes:d}:{}}}}return null}const S={column:{start:0,end:1},row:{start:1,end:0}};function _(e,t){return S[t][e]}function A(e,t){const n={};for(const r of i.FACET_CHANNELS){const i=e[r];if(i?.facetFieldDef){const{titleAnchor:e,titleOrient:a}=(0,h.getHeaderProperties)(["titleAnchor","titleOrient"],i.facetFieldDef.header,t,r),o=(0,h.getHeaderChannel)(r,a),s=_(e,o);void 0!==s&&(n[o]=s)}}return(0,u.isEmpty)(n)?void 0:n}function C(e,t,n,r,i){const a={};for(const o of r){if(!i[o])continue;const r=(0,h.getHeaderProperty)(o,t?.header,e,n);void 0!==r&&(a[i[o]]=r)}return a}},18020:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHeaderChannel:()=>i,getHeaderProperties:()=>o,getHeaderProperty:()=>a});var r=n(79989);function i(e,t){return(0,r.contains)(["top","bottom"],t)?"column":(0,r.contains)(["left","right"],t)||"row"===e?"row":"column"}function a(e,t,n,i){const a="row"===i?n.headerRow:"column"===i?n.headerColumn:n.headerFacet;return(0,r.getFirstDefined)((t||{})[e],a[e],n.header[e])}function o(e,t,n,r){const i={};for(const o of e){const e=a(o,t||{},n,r);void 0!==e&&(i[o]=e)}return i}},10078:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HEADER_CHANNELS:()=>r,HEADER_TYPES:()=>i});const r=["row","column"],i=["header","footer"]},99354:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHeaderType:()=>d,parseFacetHeaders:()=>f});var r=n(26372),i=n(95290),a=n(79543),o=n(79989),s=n(5711),l=n(5593),u=n(91387),c=n(18020);function d(e){return"top"===e||"left"===e||(0,s.isSignalRef)(e)?"header":"footer"}function f(e){for(const t of i.FACET_CHANNELS)p(e,t);g(e,"x"),g(e,"y")}function p(e,t){const{facet:n,config:i,child:s,component:l}=e;if(e.channelHasField(t)){const u=n[t],d=(0,c.getHeaderProperty)("title",null,i,t);let f=(0,a.title)(u,i,{allowDisabling:!0,includeDefault:void 0===d||!!d});s.component.layoutHeaders[t].title&&(f=(0,r.isArray)(f)?f.join(", "):f,f+=` / ${s.component.layoutHeaders[t].title}`,s.component.layoutHeaders[t].title=null);const p=(0,c.getHeaderProperty)("labelOrient",u.header,i,t),g=null!==u.header&&(0,o.getFirstDefined)(u.header?.labels,i.header.labels,!0),m=(0,o.contains)(["bottom","right"],p)?"footer":"header";l.layoutHeaders[t]={title:null!==u.header?f:null,facetFieldDef:u,[m]:"facet"===t?[]:[h(e,t,g)]}}}function h(e,t,n){const r="row"===t?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(r)?e.child.getSizeSignalRef(r):void 0,axes:[]}}function g(e,t){const{child:n}=e;if(n.component.axes[t]){const{layoutHeaders:r,resolve:i}=e.component;if(i.axis[t]=(0,u.parseGuideResolve)(i,t),"shared"===i.axis[t]){const i="x"===t?"column":"row",a=r[i];for(const r of n.component.axes[t]){const t=d(r.get("orient"));a[t]??(a[t]=[h(e,i,!1)]);const n=(0,l.assembleAxis)(r,"main",e.config,{header:!0});n&&a[t][0].axes.push(n),r.mainExtracted=!0}}}}},59845:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getScaleInvalidDataMode:()=>s,shouldBreakPath:()=>l});var r=n(75028),i=n(31179),a=n(15058),o=n(96430);function s({markDef:e,config:t,scaleChannel:n,scaleType:s,isCountAggregate:l}){if(!s||!(0,i.hasContinuousDomain)(s)||l)return"always-valid";const u=(0,o.normalizeInvalidDataMode)((0,a.getMarkPropOrConfig)("invalid",e,t),{isPath:(0,r.isPathMark)(e.type)}),c=t.scale?.invalid?.[n];return void 0!==c?"show":u}function l(e){return"break-paths-filter-domains"===e||"break-paths-show-domains"===e}},37761:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDataSourcesForHandlingInvalidValues:()=>a,getScaleDataSourceForHandlingInvalidValues:()=>o});var r=n(89081),i=n(96430);function a({invalid:e,isPath:t}){switch((0,i.normalizeInvalidDataMode)(e,{isPath:t})){case"filter":return{marks:"exclude-invalid-values",scales:"exclude-invalid-values"};case"break-paths-show-domains":return{marks:t?"include-invalid-values":"exclude-invalid-values",scales:"include-invalid-values"};case"break-paths-filter-domains":return{marks:t?"include-invalid-values":"exclude-invalid-values",scales:"exclude-invalid-values"};case"show":return{marks:"include-invalid-values",scales:"include-invalid-values"}}}function o(e){const{marks:t,scales:n}=a(e);return t===n?r.DataSourceType.Main:"include-invalid-values"===n?r.DataSourceType.PreFilterInvalid:r.DataSourceType.PostFilterInvalid}},96430:(e,t,n)=>{"use strict";function r(e,{isPath:t}){return void 0===e||"break-paths-show-path-domains"===e?t?"break-paths-show-domains":"filter":null===e?"show":e}n.r(t),n.d(t,{normalizeInvalidDataMode:()=>r})},51878:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LayerModel:()=>m});var r=n(26372),i=n(20916),a=n(24777),o=n(79989),s=n(5593),l=n(32134),u=n(80219),c=n(6871),d=n(27588),f=n(86985),p=n(7302),h=n(52128),g=n(92649);class m extends p.Model{constructor(e,t,n,r,o){super(e,"layer",t,n,o,e.resolve,e.view);const s={...r,...e.width?{width:e.width}:{},...e.height?{height:e.height}:{}};this.children=e.layer.map(((e,t)=>{if((0,a.isLayerSpec)(e))return new m(e,this,this.getName(`layer_${t}`),s,o);if((0,a.isUnitSpec)(e))return new g.UnitModel(e,this,this.getName(`layer_${t}`),s,o);throw new Error(i.message.invalidSpec(e))}))}parseData(){this.component.data=(0,u.parseData)(this);for(const e of this.children)e.parseData()}parseLayoutSize(){(0,d.parseLayerLayoutSize)(this)}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of(0,o.keys)(e.component.selection))this.component.selection[t]=e.component.selection[t]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){(0,l.parseLayerAxes)(this)}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleSignals())),(0,s.assembleAxisSignals)(this))}assembleLayoutSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleLayoutSignals())),(0,c.assembleLayoutSignals)(this))}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleGroupStyle(){const e=new Set;for(const t of this.children)for(const n of(0,r.array)(t.assembleGroupStyle()))e.add(n);const t=Array.from(e);return t.length>1?t:1===t.length?t[0]:void 0}assembleTitle(){let e=super.assembleTitle();if(e)return e;for(const t of this.children)if(e=t.assembleTitle(),e)return e}assembleLayout(){return null}assembleMarks(){return(0,h.assembleLayerSelectionMarks)(this,this.children.flatMap((e=>e.assembleMarks())))}assembleLegends(){return this.children.reduce(((e,t)=>e.concat(t.assembleLegends())),(0,f.assembleLegends)(this))}}},6871:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleLayoutSignals:()=>u,sizeExpr:()=>f,sizeSignals:()=>c});var r=n(24007),i=n(31179),a=n(79989),o=n(5711),s=n(15058),l=n(7302);function u(e){return[...c(e,"width"),...c(e,"height"),...c(e,"childWidth"),...c(e,"childHeight")]}function c(e,t){const n="width"===t?"x":"y",a=e.component.layoutSize.get(t);if(!a||"merged"===a)return[];const s=e.getSizeSignalRef(t).signal;if("step"===a){const t=e.getScaleComponent(n);if(t){const r=t.get("type"),a=t.get("range");if((0,i.hasDiscreteDomain)(r)&&(0,o.isVgRangeStep)(a)){const r=e.scaleName(n);return(0,l.isFacetModel)(e.parent)&&"independent"===e.parent.component.resolve.scale[n]?[d(r,a)]:[d(r,a),{name:s,update:f(r,t,`domain('${r}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==a){const t=s.endsWith("width"),n=t?"containerSize()[0]":"containerSize()[1]",i=`isFinite(${n}) ? ${n} : ${(0,r.getViewConfigContinuousSize)(e.config.view,t?"width":"height")}`;return[{name:s,init:i,on:[{update:i,events:"window:resize"}]}]}return[{name:s,value:a}]}function d(e,t){const n=`${e}_step`;return(0,o.isSignalRef)(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function f(e,t,n){const r=t.get("type"),i=t.get("padding"),o=(0,a.getFirstDefined)(t.get("paddingOuter"),i);let l=t.get("paddingInner");return l="band"===r?void 0!==l?l:i:1,`bandspace(${n}, ${(0,s.signalOrStringValue)(l)}, ${(0,s.signalOrStringValue)(o)}) * ${e}_step`}},19492:(e,t,n)=>{"use strict";function r(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}n.r(t),n.d(t,{getSizeTypeFromLayoutSizeType:()=>r})},81693:(e,t,n)=>{"use strict";n.r(t),n.d(t,{initLayoutSize:()=>s});var r=n(95290),i=n(79543),a=n(20916),o=n(89820);function s({encoding:e,size:t}){for(const n of r.POSITION_SCALE_CHANNELS){const s=(0,r.getSizeChannel)(n);(0,o.isStep)(t[s])&&(0,i.isContinuousFieldOrDatumDef)(e[n])&&(delete t[s],a.warn(a.message.stepDropped(s)))}return t}},27588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseChildrenLayoutSize:()=>p,parseConcatLayoutSize:()=>f,parseLayerLayoutSize:()=>d,parseUnitLayoutSize:()=>g});var r=n(95290),i=n(24007),a=n(31179),o=n(89820),s=n(5711),l=n(91387),u=n(96159),c=n(19492);function d(e){p(e),h(e,"width"),h(e,"height")}function f(e){p(e);const t=1===e.layout.columns?"width":"childWidth",n=void 0===e.layout.columns?"height":"childHeight";h(e,t),h(e,n)}function p(e){for(const t of e.children)t.parseLayoutSize()}function h(e,t){const n=(0,c.getSizeTypeFromLayoutSizeType)(t),i=(0,r.getPositionScaleChannel)(n),a=e.component.resolve,o=e.component.layoutSize;let s;for(const t of e.children){const r=t.component.layoutSize.getWithExplicit(n),o=a.scale[i]??(0,l.defaultScaleResolve)(i,e);if("independent"===o&&"step"===r.value){s=void 0;break}if(s){if("independent"===o&&s.value!==r.value){s=void 0;break}s=(0,u.mergeValuesWithExplicit)(s,r,n,"")}else s=r}if(s){for(const r of e.children)e.renameSignal(r.getName(n),e.getName(t)),r.component.layoutSize.set(n,"merged",!1);o.setWithExplicit(t,s)}else o.setWithExplicit(t,{explicit:!1,value:void 0})}function g(e){const{size:t,component:n}=e;for(const i of r.POSITION_SCALE_CHANNELS){const a=(0,r.getSizeChannel)(i);if(t[a]){const e=t[a];n.layoutSize.set(a,(0,o.isStep)(e)?"step":e,!0)}else{const t=m(e,a);n.layoutSize.set(a,t,!1)}}}function m(e,t){const n="width"===t?"x":"y",r=e.config,l=e.getScaleComponent(n);if(l){const e=l.get("type"),n=l.get("range");if((0,a.hasDiscreteDomain)(e)){const e=(0,i.getViewConfigDiscreteSize)(r.view,t);return(0,s.isVgRangeStep)(n)||(0,o.isStep)(e)?"step":e}return(0,i.getViewConfigContinuousSize)(r.view,t)}if(e.hasProjection||"arc"===e.mark)return(0,i.getViewConfigContinuousSize)(r.view,t);{const e=(0,i.getViewConfigDiscreteSize)(r.view,t);return(0,o.isStep)(e)?e.step:e}}},86985:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleLegend:()=>l,assembleLegends:()=>s});var r=n(54116),i=n(79989),a=n(5711),o=n(16182);function s(e){const t=e.component.legends,n={};for(const r of(0,i.keys)(t)){const a=e.getScaleComponent(r),s=(0,i.stringify)(a.get("domains"));if(n[s])for(const e of n[s])(0,o.mergeLegendComponent)(e,t[r])||n[s].push(t[r]);else n[s]=[t[r].clone()]}return(0,i.vals)(n).flat().map((t=>l(t,e.config))).filter((e=>void 0!==e))}function l(e,t){const{disable:n,labelExpr:o,selections:s,...l}=e.combine();if(!n){if(!1===t.aria&&null==l.aria&&(l.aria=!1),l.encode?.symbols){const e=l.encode.symbols.update;!e.fill||"transparent"===e.fill.value||e.stroke||l.stroke||(e.stroke={value:"transparent"});for(const t of r.LEGEND_SCALE_CHANNELS)l[t]&&delete e[t]}if(l.title||delete l.title,void 0!==o){let e=o;l.encode?.labels?.update&&(0,a.isSignalRef)(l.encode.labels.update.text)&&(e=(0,i.replaceAll)(o,"datum.label",l.encode.labels.update.text.signal)),function(e,t,n,r){var i,a;e.encode??(e.encode={}),(i=e.encode)[t]??(i[t]={}),(a=e.encode[t]).update??(a.update={}),e.encode[t].update.text=r}(l,"labels",0,{signal:e})}return l}}},46602:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LEGEND_COMPONENT_PROPERTIES:()=>s,LegendComponent:()=>l});var r=n(54116),i=n(79989),a=n(96159);const o={...r.COMMON_LEGEND_PROPERTY_INDEX,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},s=(0,i.keys)(o);class l extends a.Split{}},33375:(e,t,n)=>{"use strict";n.r(t),n.d(t,{entries:()=>m,getFirstConditionValue:()=>v,gradient:()=>h,labels:()=>g,legendEncodeRules:()=>f,symbols:()=>p});var r=n(26372),i=n(95290),a=n(79543),o=n(75028),s=n(79989),l=n(15058),u=n(6032),c=n(55792),d=n(93794);const f={symbols:p,gradient:h,labels:g,entries:m};function p(e,{fieldOrDatumDef:t,model:n,channel:u,legendCmpt:d,legendType:f}){if("symbol"!==f)return;const{markDef:p,encoding:h,config:g,mark:m}=n,b=p.filled&&"trail"!==m;let x={...(0,l.applyMarkConfig)({},n,o.FILL_STROKE_CONFIG),...c.color(n,{filled:b})};const E=d.get("symbolOpacity")??g.legend.symbolOpacity,S=d.get("symbolFillColor")??g.legend.symbolFillColor,_=d.get("symbolStrokeColor")??g.legend.symbolStrokeColor,A=void 0===E?y(h.opacity)??p.opacity:void 0;if(x.fill)if("fill"===u||b&&u===i.COLOR)delete x.fill;else if((0,s.hasProperty)(x.fill,"field"))S?delete x.fill:(x.fill=(0,l.signalOrValueRef)(g.legend.symbolBaseFillColor??"black"),x.fillOpacity=(0,l.signalOrValueRef)(A??1));else if((0,r.isArray)(x.fill)){const e=v(h.fill??h.color)??p.fill??(b&&p.color);e&&(x.fill=(0,l.signalOrValueRef)(e))}if(x.stroke)if("stroke"===u||!b&&u===i.COLOR)delete x.stroke;else if((0,s.hasProperty)(x.stroke,"field")||_)delete x.stroke;else if((0,r.isArray)(x.stroke)){const e=(0,s.getFirstDefined)(v(h.stroke||h.color),p.stroke,b?p.color:void 0);e&&(x.stroke={value:e})}if(u!==i.OPACITY){const e=(0,a.isFieldDef)(t)&&w(0,d,t);e?x.opacity=[{test:e,...(0,l.signalOrValueRef)(A??1)},(0,l.signalOrValueRef)(g.legend.unselectedOpacity)]:A&&(x.opacity=(0,l.signalOrValueRef)(A))}return x={...x,...e},(0,s.isEmpty)(x)?void 0:x}function h(e,{model:t,legendType:n,legendCmpt:r}){if("gradient"!==n)return;const{config:i,markDef:a,encoding:o}=t;let u={};const c=void 0===(r.get("gradientOpacity")??i.legend.gradientOpacity)?y(o.opacity)||a.opacity:void 0;return c&&(u.opacity=(0,l.signalOrValueRef)(c)),u={...u,...e},(0,s.isEmpty)(u)?void 0:u}function g(e,{fieldOrDatumDef:t,model:n,channel:r,legendCmpt:i}){const o=n.legend(r)||{},l=n.config,c=(0,a.isFieldDef)(t)?w(0,i,t):void 0,d=c?[{test:c,value:1},{value:l.legend.unselectedOpacity}]:void 0,{format:f,formatType:p}=o;let h;(0,u.isCustomFormatType)(p)?h=(0,u.formatCustomType)({fieldOrDatumDef:t,field:"datum.value",format:f,formatType:p,config:l}):void 0===f&&void 0===p&&l.customFormatTypes&&("quantitative"===t.type&&l.numberFormatType?h=(0,u.formatCustomType)({fieldOrDatumDef:t,field:"datum.value",format:l.numberFormat,formatType:l.numberFormatType,config:l}):"temporal"===t.type&&l.timeFormatType&&(0,a.isFieldDef)(t)&&void 0===t.timeUnit&&(h=(0,u.formatCustomType)({fieldOrDatumDef:t,field:"datum.value",format:l.timeFormat,formatType:l.timeFormatType,config:l})));const g={...d?{opacity:d}:{},...h?{text:h}:{},...e};return(0,s.isEmpty)(g)?void 0:g}function m(e,{legendCmpt:t}){const n=t.get("selections");return n?.length?{...e,fill:{value:"transparent"}}:e}function y(e){return b(e,((e,t)=>Math.max(e,t.value)))}function v(e){return b(e,((e,t)=>(0,s.getFirstDefined)(e,t.value)))}function b(e,t){return(0,a.hasConditionalValueDef)(e)?(0,r.array)(e.condition).reduce(t,e.value):(0,a.isValueDef)(e)?e.value:void 0}function w(e,t,n){const i=t.get("selections");if(!i?.length)return;const a=(0,r.stringValue)(n.field);return i.map((e=>`(!length(data(${(0,r.stringValue)((0,s.varName)(e)+d.STORE)})) || (${e}[${a}] && indexof(${e}[${a}], datum.value) >= 0))`)).join(" || ")}},16182:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mergeLegendComponent:()=>x,parseLegend:()=>v,parseLegendForChannel:()=>w});var r=n(95290),i=n(79543),a=n(54116),o=n(96598),s=n(99273),l=n(79989),u=n(15058),c=n(16039),d=n(7302),f=n(91387),p=n(46608),h=n(96159),g=n(46602),m=n(33375),y=n(55516);function v(e){const t=(0,d.isUnitModel)(e)?function(e){const{encoding:t}=e,n={};for(const o of[r.COLOR,...a.LEGEND_SCALE_CHANNELS]){const a=(0,i.getFieldOrDatumDef)(t[o]);a&&e.getScaleComponent(o)&&(o===r.SHAPE&&(0,i.isFieldDef)(a)&&a.type===s.GEOJSON||(n[o]=w(e,o)))}return n}(e):function(e){const{legends:t,resolve:n}=e.component;for(const r of e.children){v(r);for(const i of(0,l.keys)(r.component.legends))n.legend[i]=(0,f.parseGuideResolve)(e.component.resolve,i),"shared"===n.legend[i]&&(t[i]=x(t[i],r.component.legends[i]),t[i]||(n.legend[i]="independent",delete t[i]))}for(const r of(0,l.keys)(t))for(const t of e.children)t.component.legends[r]&&"shared"===n.legend[r]&&delete t.component.legends[r];return t}(e);return e.component.legends=t,t}function b(e,t,n,r){switch(t){case"disable":return void 0!==n;case"values":return!!n?.values;case"title":if("title"===t&&e===r?.title)return!0}return e===(n||{})[t]}function w(e,t){let n=e.legend(t);const{markDef:r,encoding:a,config:s}=e,u=s.legend,d=new g.LegendComponent({},function(e,t){const n=e.scaleName(t);if("trail"===e.mark){if("color"===t)return{stroke:n};if("size"===t)return{strokeWidth:n}}return"color"===t?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}(e,t));(0,p.parseInteractiveLegend)(e,t,d);const f=void 0!==n?!n:u.disable;if(d.set("disable",f,void 0!==n),f)return d;n=n||{};const h=e.getScaleComponent(t).get("type"),v=(0,i.getFieldOrDatumDef)(a[t]),w=(0,i.isFieldDef)(v)?(0,o.normalizeTimeUnit)(v.timeUnit)?.unit:void 0,x=n.orient||s.legend.orient||"right",E=(0,y.getLegendType)({legend:n,channel:t,timeUnit:w,scaleType:h}),S={legend:n,channel:t,model:e,markDef:r,encoding:a,fieldOrDatumDef:v,legendConfig:u,config:s,scaleType:h,orient:x,legendType:E,direction:(0,y.getDirection)({legend:n,legendType:E,orient:x,legendConfig:u})};for(const r of g.LEGEND_COMPONENT_PROPERTIES){if("gradient"===E&&r.startsWith("symbol")||"symbol"===E&&r.startsWith("gradient"))continue;const i=r in y.legendRules?y.legendRules[r](S):n[r];if(void 0!==i){const a=b(i,r,n,e.fieldDef(t));(a||void 0===s.legend[r])&&d.set(r,i,a)}}const _=n?.encoding??{},A=d.get("selections"),C={},T={fieldOrDatumDef:v,model:e,channel:t,legendCmpt:d,legendType:E};for(const t of["labels","legend","title","symbols","gradient","entries"]){const n=(0,c.guideEncodeEntry)(_[t]??{},e),r=t in m.legendEncodeRules?m.legendEncodeRules[t](n,T):n;void 0===r||(0,l.isEmpty)(r)||(C[t]={...A?.length&&(0,i.isFieldDef)(v)?{name:`${(0,l.varName)(v.field)}_legend_${t}`}:{},...A?.length?{interactive:!!A}:{},update:r})}return(0,l.isEmpty)(C)||d.set("encode",C,!!n?.encoding),d}function x(e,t){if(!e)return t.clone();const n=e.getWithExplicit("orient"),r=t.getWithExplicit("orient");if(n.explicit&&r.explicit&&n.value!==r.value)return;let i=!1;for(const n of g.LEGEND_COMPONENT_PROPERTIES){const r=(0,h.mergeValuesWithExplicit)(e.getWithExplicit(n),t.getWithExplicit(n),n,"legend",((e,t)=>{switch(n){case"symbolType":return r=e,"circle"===(a=t).value?a:r;case"title":return(0,u.mergeTitleComponent)(e,t);case"type":return i=!0,(0,h.makeImplicit)("symbol")}var r,a;return(0,h.defaultTieBreaker)(e,t,n,"legend")}));e.setWithExplicit(n,r)}return i&&(e.implicit?.encode?.gradient&&(0,l.deleteNestedProperty)(e.implicit,["encode","gradient"]),e.explicit?.encode?.gradient&&(0,l.deleteNestedProperty)(e.explicit,["encode","gradient"])),e}},55516:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clipHeight:()=>h,defaultDirection:()=>v,defaultGradientLength:()=>b,defaultLabelOverlap:()=>x,defaultSymbolType:()=>p,defaultType:()=>m,getDirection:()=>y,getLegendType:()=>g,legendRules:()=>d,values:()=>f});var r=n(26372),i=n(95290),a=n(79543),o=n(31179),s=n(79989),l=n(5711),u=n(6032),c=n(33375);const d={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:r,formatType:i}=t;return(0,u.guideFormat)(e,e.type,r,i,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:r}=e;return(0,u.guideFormatType)(r,t,n)},gradientLength:e=>{const{legend:t,legendConfig:n}=e;return t.gradientLength??n.gradientLength??b(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>e.labelOverlap??t.labelOverlap??x(n),symbolType:({legend:e,markDef:t,channel:n,encoding:r})=>e.symbolType??p(t.type,n,r.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>(0,a.title)(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if((0,i.isColorChannel)(n)&&(0,o.isContinuousToContinuous)(t)){if("gradient"===e)return}else if("symbol"===e)return;return e},values:({fieldOrDatumDef:e,legend:t})=>f(t,e)};function f(e,t){const n=e.values;return(0,r.isArray)(n)?(0,a.valueArray)(t,n):(0,l.isSignalRef)(n)?n:void 0}function p(e,t,n,r){if("shape"!==t){const e=(0,c.getFirstConditionValue)(n)??r;if(e)return e}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function h(e){if("gradient"===e)return 20}function g(e){const{legend:t}=e;return(0,s.getFirstDefined)(t.type,m(e))}function m({channel:e,timeUnit:t,scaleType:n}){if((0,i.isColorChannel)(e)){if((0,s.contains)(["quarter","month","day"],t))return"symbol";if((0,o.isContinuousToContinuous)(n))return"gradient"}return"symbol"}function y({legendConfig:e,legendType:t,orient:n,legend:r}){return r.direction??e[t?"gradientDirection":"symbolDirection"]??v(n,t)}function v(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}function b({legendConfig:e,model:t,direction:n,orient:r,scaleType:i}){const{gradientHorizontalMaxLength:a,gradientHorizontalMinLength:s,gradientVerticalMaxLength:l,gradientVerticalMinLength:u}=e;if((0,o.isContinuousToContinuous)(i))return"horizontal"===n?"top"===r||"bottom"===r?w(t,"width",s,a):s:w(t,"height",u,l)}function w(e,t,n,r){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${r})`}}function x(e){if((0,s.contains)(["quantile","threshold","log","symlog"],e))return"greedy"}},56017:(e,t,n)=>{"use strict";n.r(t),n.d(t,{arc:()=>i});var r=n(55792);const i={vgMark:"arc",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...r.pointPosition("x",e,{defaultPos:"mid"}),...r.pointPosition("y",e,{defaultPos:"mid"}),...r.rectPosition(e,"radius"),...r.rectPosition(e,"theta")})}},26052:(e,t,n)=>{"use strict";n.r(t),n.d(t,{area:()=>i});var r=n(55792);const i={vgMark:"area",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...r.pointOrRangePosition("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient}),...r.pointOrRangePosition("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient}),...r.defined(e)})}},47880:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bar:()=>i});var r=n(55792);const i={vgMark:"rect",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...r.rectPosition(e,"x"),...r.rectPosition(e,"y")})}},57543:(e,t,n)=>{"use strict";n.r(t),n.d(t,{aria:()=>c,description:()=>f});var r=n(26372),i=n(79989),a=n(15058),o=n(5711),s=n(49144),l=n(22449),u=n(14607);function c(e){const{markDef:t,config:n}=e,r=(0,a.getMarkPropOrConfig)("aria",t,n);return!1===r?{}:{...r?{aria:r}:{},...d(e),...f(e)}}function d(e){const{mark:t,markDef:n,config:i}=e;if(!1===i.aria)return{};const s=(0,a.getMarkPropOrConfig)("ariaRoleDescription",n,i);return null!=s?{ariaRoleDescription:{value:s}}:(0,r.hasOwnProperty)(o.VG_MARK_INDEX,t)?{}:{ariaRoleDescription:{value:t}}}function f(e){const{encoding:t,markDef:n,config:r,stack:o}=e,c=t.description;if(c)return(0,s.wrapCondition)({model:e,channelDef:c,vgChannel:"description",mainRefFn:t=>(0,l.textRef)(t,e.config),invalidValueRef:void 0});const d=(0,a.getMarkPropOrConfig)("description",n,r);if(null!=d)return{description:(0,a.signalOrValueRef)(d)};if(!1===r.aria)return{};const f=(0,u.tooltipData)(t,o,r);return(0,i.isEmpty)(f)?void 0:{description:{signal:(0,i.entries)(f).map((([e,t],n)=>`"${n>0?"; ":""}${e}: " + (${t})`)).join(" + ")}}}},96975:(e,t,n)=>{"use strict";n.r(t),n.d(t,{baseEncodeEntry:()=>m,color:()=>s.color,nonPosition:()=>l.nonPosition,pointOrRangePosition:()=>p.pointOrRangePosition,pointPosition:()=>f.pointPosition,rangePosition:()=>p.rangePosition,rectPosition:()=>h.rectPosition,text:()=>u.text,tooltip:()=>c.tooltip});var r=n(79989),i=n(5711),a=n(15058),o=n(57543),s=n(62663),l=n(34796),u=n(22449),c=n(14607),d=n(27536),f=n(47274),p=n(80261),h=n(24900);const g=new Set(["aria","width","height"]);function m(e,t){const{fill:n,stroke:r}="include"===t.color?(0,s.color)(e):{};return{...v(e.markDef,t),...y("fill",n),...y("stroke",r),...(0,l.nonPosition)("opacity",e),...(0,l.nonPosition)("fillOpacity",e),...(0,l.nonPosition)("strokeOpacity",e),...(0,l.nonPosition)("strokeWidth",e),...(0,l.nonPosition)("strokeDash",e),...(0,d.zindex)(e),...(0,c.tooltip)(e),...(0,u.text)(e,"href"),...(0,o.aria)(e)}}function y(e,t){return t?{[e]:t}:{}}function v(e,t){return i.VG_MARK_CONFIGS.reduce(((n,i)=>(!g.has(i)&&(0,r.hasProperty)(e,i)&&"ignore"!==t[i]&&(n[i]=(0,a.signalOrValueRef)(e[i])),n)),{})}},62663:(e,t,n)=>{"use strict";n.r(t),n.d(t,{color:()=>s});var r=n(20916),i=n(79989),a=n(15058),o=n(34796);function s(e,t={filled:void 0}){const{markDef:n,encoding:s,config:l}=e,{type:u}=n,c=t.filled??(0,a.getMarkPropOrConfig)("filled",n,l),d=(0,i.contains)(["bar","point","circle","square","geoshape"],u)?"transparent":void 0,f=(0,a.getMarkPropOrConfig)(!0===c?"color":void 0,n,l,{vgChannel:"fill"})??l.mark[!0===c&&"color"]??d,p=(0,a.getMarkPropOrConfig)(!1===c?"color":void 0,n,l,{vgChannel:"stroke"})??l.mark[!1===c&&"color"],h=c?"fill":"stroke",g={...f?{fill:(0,a.signalOrValueRef)(f)}:{},...p?{stroke:(0,a.signalOrValueRef)(p)}:{}};return n.color&&(c?n.fill:n.stroke)&&r.warn(r.message.droppingColor("property",{fill:"fill"in n,stroke:"stroke"in n})),{...g,...(0,o.nonPosition)("color",e,{vgChannel:h,defaultValue:c?f:p}),...(0,o.nonPosition)("fill",e,{defaultValue:s.fill?f:void 0}),...(0,o.nonPosition)("stroke",e,{defaultValue:s.stroke?p:void 0})}}},49144:(e,t,n)=>{"use strict";n.r(t),n.d(t,{wrapCondition:()=>s});var r=n(26372),i=n(79543),a=n(95370),o=n(83937);function s({model:e,channelDef:t,vgChannel:n,invalidValueRef:s,mainRefFn:l}){const u=(0,i.isConditionalDef)(t)&&t.condition;let c=[];u&&(c=(0,r.array)(u).map((t=>{const n=l(t);if((0,i.isConditionalParameter)(t)){const{param:r,empty:i}=t;return{test:(0,o.parseSelectionPredicate)(e,{param:r,empty:i}),...n}}return{test:(0,a.expression)(e,t.test),...n}}))),void 0!==s&&c.push(s);const d=l(t);return void 0!==d&&c.push(d),c.length>1||1===c.length&&Boolean(c[0].test)?{[n]:c}:1===c.length?{[n]:c[0]}:{}}},13853:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defined:()=>l,valueIfDefined:()=>u});var r=n(54814),i=n(95290),a=n(4976),o=n(15058),s=n(59845);function l(e){const{config:t,markDef:n}=e,o=new Set;if(e.forEachFieldDef(((a,l)=>{let u;if(!(0,i.isScaleChannel)(l)||!(u=e.getScaleType(l)))return;const c=(0,r.isCountingAggregateOp)(a.aggregate),d=(0,s.getScaleInvalidDataMode)({scaleChannel:l,markDef:n,config:t,scaleType:u,isCountAggregate:c});if((0,s.shouldBreakPath)(d)){const t=e.vgField(l,{expr:"datum",binSuffix:e.stack?.impute?"mid":void 0});t&&o.add(t)}})),o.size>0)return{defined:{signal:[...o].map((e=>(0,a.fieldValidPredicate)(e,!0))).join(" && ")}}}function u(e,t){if(void 0!==t)return{[e]:(0,o.signalOrValueRef)(t)}}},55792:(e,t,n)=>{"use strict";n.r(t),n.d(t,{aria:()=>r.aria,baseEncodeEntry:()=>i.baseEncodeEntry,color:()=>a.color,defined:()=>o.defined,nonPosition:()=>s.nonPosition,pointOrRangePosition:()=>u.pointOrRangePosition,pointPosition:()=>l.pointPosition,rangePosition:()=>u.rangePosition,rectPosition:()=>c.rectPosition,text:()=>d.text,tooltip:()=>f.tooltip,tooltipRefForEncoding:()=>f.tooltipRefForEncoding,valueIfDefined:()=>o.valueIfDefined});var r=n(57543),i=n(96975),a=n(62663),o=n(13853),s=n(34796),l=n(47274),u=n(80261),c=n(24900),d=n(22449),f=n(14607)},91463:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getConditionalValueRefForIncludingInvalidValue:()=>c});var r=n(54814),i=n(79543),a=n(68278),o=n(4976),s=n(5711),l=n(59845),u=n(71390);function c({scaleChannel:e,channelDef:t,scale:n,scaleName:a,markDef:s,config:u}){const c=n?.get("type"),f=(0,i.getFieldDef)(t),p=(0,r.isCountingAggregateOp)(f?.aggregate),h=(0,l.getScaleInvalidDataMode)({scaleChannel:e,markDef:s,config:u,scaleType:c,isCountAggregate:p});if(f&&"show"===h){const t=u.scale.invalid?.[e]??"zero-or-min";return{test:(0,o.fieldValidPredicate)((0,i.vgField)(f,{expr:"datum"}),!1),...d(t,n,a)}}}function d(e,t,n){if((0,a.isScaleInvalidDataIncludeAsValue)(e)){const{value:t}=e;return(0,s.isSignalRef)(t)?{signal:t.signal}:{value:t}}return(0,u.scaledZeroOrMinOrMax)({scale:t,scaleName:n,mode:"zeroOrMin"})}},34796:(e,t,n)=>{"use strict";n.r(t),n.d(t,{nonPosition:()=>l});var r=n(79543),i=n(15058),a=n(49144),o=n(42104),s=n(91463);function l(e,t,n={}){const{markDef:l,encoding:u,config:c}=t,{vgChannel:d}=n;let{defaultRef:f,defaultValue:p}=n;const h=u[e];void 0===f&&(p??(p=(0,i.getMarkPropOrConfig)(e,l,c,{vgChannel:d,ignoreVgConfig:!(0,r.isConditionalDef)(h)})),void 0!==p&&(f=(0,i.signalOrValueRef)(p)));const g={markDef:l,config:c,scaleName:t.scaleName(e),scale:t.getScaleComponent(e)},m=(0,s.getConditionalValueRefForIncludingInvalidValue)({...g,scaleChannel:e,channelDef:h});return(0,a.wrapCondition)({model:t,channelDef:h,vgChannel:d??e,invalidValueRef:m,mainRefFn:t=>o.midPoint({...g,channel:e,channelDef:t,stack:null,defaultRef:f})})}},43301:(e,t,n)=>{"use strict";n.r(t),n.d(t,{positionOffset:()=>a});var r=n(15058),i=n(42104);function a({channel:e,markDef:t,encoding:n={},model:a,bandPosition:o}){const s=`${e}Offset`,l=t[s],u=n[s];if(("xOffset"===s||"yOffset"===s)&&u)return{offsetType:"encoding",offset:(0,i.midPoint)({channel:s,channelDef:u,markDef:t,config:a?.config,scaleName:a.scaleName(s),scale:a.getScaleComponent(s),stack:null,defaultRef:(0,r.signalOrValueRef)(l),bandPosition:o})};const c=t[s];return c?{offsetType:"visual",offset:c}:{}}},9513:(e,t,n)=>{"use strict";n.r(t),n.d(t,{vgAlignedPositionChannel:()=>u});var r=n(95290),i=n(20916),a=n(5711),o=n(15058);const s={left:"x",center:"xc",right:"x2"},l={top:"y",middle:"yc",bottom:"y2"};function u(e,t,n,u="middle"){if("radius"===e||"theta"===e)return(0,r.getVgPositionChannel)(e);const c="x"===e?"align":"baseline",d=(0,o.getMarkPropOrConfig)(c,t,n);let f;return(0,a.isSignalRef)(d)?(i.warn(i.message.rangeMarkAlignmentCannotBeExpression(c)),f=void 0):f=d,"x"===e?s[f||("top"===u?"left":"center")]:l[f||u]}},47274:(e,t,n)=>{"use strict";n.r(t),n.d(t,{pointPosition:()=>u,pointPositionDefaultRef:()=>d,positionRef:()=>c});var r=n(95290),i=n(79543),a=n(15058),o=n(43301),s=n(42104),l=n(71390);function u(e,t,{defaultPos:n,vgChannel:i}){const{encoding:a,markDef:s,config:l,stack:u}=t,f=a[e],p=a[(0,r.getSecondaryRangeChannel)(e)],h=t.scaleName(e),g=t.getScaleComponent(e),{offset:m,offsetType:y}=(0,o.positionOffset)({channel:e,markDef:s,encoding:a,model:t,bandPosition:.5}),v=d({model:t,defaultPos:n,channel:e,scaleName:h,scale:g}),b=!f&&(0,r.isXorY)(e)&&(a.latitude||a.longitude)?{field:t.getName(e)}:c({channel:e,channelDef:f,channel2Def:p,markDef:s,config:l,scaleName:h,scale:g,stack:u,offset:m,defaultRef:v,bandPosition:"encoding"===y?0:void 0});return b?{[i||e]:b}:void 0}function c(e){const{channel:t,channelDef:n,scaleName:r,stack:a,offset:o,markDef:l}=e;if((0,i.isFieldOrDatumDef)(n)&&a&&t===a.fieldChannel){if((0,i.isFieldDef)(n)){let e=n.bandPosition;if(void 0!==e||"text"!==l.type||"radius"!==t&&"theta"!==t||(e=.5),void 0!==e)return s.interpolatedSignalRef({scaleName:r,fieldOrDatumDef:n,startSuffix:"start",bandPosition:e,offset:o})}return s.valueRefForFieldOrDatumDef(n,r,{suffix:"end"},{offset:o})}return s.midPointRefWithPositionInvalidTest(e)}function d({model:e,defaultPos:t,channel:n,scaleName:i,scale:o}){const{markDef:l,config:u}=e;return()=>{const c=(0,r.getMainRangeChannel)(n),d=(0,r.getVgPositionChannel)(n),p=(0,a.getMarkPropOrConfig)(n,l,u,{vgChannel:d});if(void 0!==p)return s.widthHeightValueOrSignalRef(n,p);switch(t){case"zeroOrMin":return f({scaleName:i,scale:o,mode:"zeroOrMin",mainChannel:c,config:u});case"zeroOrMax":return f({scaleName:i,scale:o,mode:{zeroOrMax:{widthSignal:e.width.signal,heightSignal:e.height.signal}},mainChannel:c,config:u});case"mid":return{...e[(0,r.getSizeChannel)(n)],mult:.5}}}}function f({mainChannel:e,config:t,...n}){const r=(0,l.scaledZeroOrMinOrMax)(n),{mode:i}=n;if(r)return r;switch(e){case"radius":{if("zeroOrMin"===i)return{value:0};const{widthSignal:e,heightSignal:t}=i.zeroOrMax;return{signal:`min(${e},${t})/2`}}case"theta":return"zeroOrMin"===i?{value:0}:{signal:"2*PI"};case"x":return"zeroOrMin"===i?{value:0}:{field:{group:"width"}};case"y":return"zeroOrMin"===i?{field:{group:"height"}}:{value:0}}}},80261:(e,t,n)=>{"use strict";n.r(t),n.d(t,{pointOrRangePosition:()=>f,position2Ref:()=>h,rangePosition:()=>p});var r=n(95290),i=n(79543),a=n(20916),o=n(75028),s=n(15058),l=n(43301),u=n(9513),c=n(47274),d=n(42104);function f(e,t,{defaultPos:n,defaultPos2:r,range:i}){return i?p(e,t,{defaultPos:n,defaultPos2:r}):(0,c.pointPosition)(e,t,{defaultPos:n})}function p(e,t,{defaultPos:n,defaultPos2:i}){const{markDef:a,config:o}=t,d=(0,r.getSecondaryRangeChannel)(e),f=(0,r.getSizeChannel)(e),p=function(e,t,n){const{encoding:i,mark:a,markDef:o,stack:u,config:d}=e,f=(0,r.getMainRangeChannel)(n),p=(0,r.getSizeChannel)(n),m=(0,r.getVgPositionChannel)(n),y=i[f],v=e.scaleName(f),b=e.getScaleComponent(f),{offset:w}=n in i||n in o?(0,l.positionOffset)({channel:n,markDef:o,encoding:i,model:e}):(0,l.positionOffset)({channel:f,markDef:o,encoding:i,model:e});if(!y&&("x2"===n||"y2"===n)&&(i.latitude||i.longitude)){const t=(0,r.getSizeChannel)(n),i=e.markDef[t];return null!=i?{[t]:{value:i}}:{[m]:{field:e.getName(n)}}}const x=h({channel:n,channelDef:y,channel2Def:i[n],markDef:o,config:d,scaleName:v,scale:b,stack:u,offset:w,defaultRef:void 0});return void 0!==x?{[m]:x}:g(n,o)||g(n,{[n]:(0,s.getMarkStyleConfig)(n,o,d.style),[p]:(0,s.getMarkStyleConfig)(p,o,d.style)})||g(n,d[a])||g(n,d.mark)||{[m]:(0,c.pointPositionDefaultRef)({model:e,defaultPos:t,channel:n,scaleName:v,scale:b})()}}(t,i,d),m=p[f]?(0,u.vgAlignedPositionChannel)(e,a,o):(0,r.getVgPositionChannel)(e);return{...(0,c.pointPosition)(e,t,{defaultPos:n,vgChannel:m}),...p}}function h({channel:e,channelDef:t,channel2Def:n,markDef:r,config:a,scaleName:o,scale:s,stack:l,offset:u,defaultRef:c}){return(0,i.isFieldOrDatumDef)(t)&&l&&e.charAt(0)===l.fieldChannel.charAt(0)?d.valueRefForFieldOrDatumDef(t,o,{suffix:"start"},{offset:u}):d.midPointRefWithPositionInvalidTest({channel:e,channelDef:n,scaleName:o,scale:s,stack:l,markDef:r,config:a,offset:u,defaultRef:c})}function g(e,t){const n=(0,r.getSizeChannel)(e),i=(0,r.getVgPositionChannel)(e);if(void 0!==t[i])return{[i]:d.widthHeightValueOrSignalRef(e,t[i])};if(void 0!==t[e])return{[i]:d.widthHeightValueOrSignalRef(e,t[e])};if(t[n]){const r=t[n];if(!(0,o.isRelativeBandSize)(r))return{[n]:d.widthHeightValueOrSignalRef(e,r)};a.warn(a.message.relativeBandSizeNotSupported(n))}}},24900:(e,t,n)=>{"use strict";n.r(t),n.d(t,{rectPosition:()=>x});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(24007),l=n(20916),u=n(75028),c=n(31179),d=n(5711),f=n(15058),p=n(34796),h=n(43301),g=n(9513),m=n(47274),y=n(80261),v=n(42104),b=n(79989),w=n(62277);function x(e,t){const{config:n,encoding:s,markDef:b}=e,w=b.type,x=(0,a.getSecondaryRangeChannel)(t),A=(0,a.getSizeChannel)(t),C=s[t],T=s[x],k=e.getScaleComponent(t),R=k?k.get("type"):void 0,D=b.orient,O=s[A]??s.size??(0,f.getMarkPropOrConfig)("size",b,n,{vgChannel:A}),N=(0,a.getOffsetChannel)(t),F="bar"===w&&("x"===t?"vertical"===D:"horizontal"===D)||"tick"===w&&("y"===t?"vertical"===D:"horizontal"===D);return!(0,o.isFieldDef)(C)||!((0,i.isBinning)(C.bin)||(0,i.isBinned)(C.bin)||C.timeUnit&&!T)||O&&!(0,u.isRelativeBandSize)(O)||s[N]||(0,c.hasDiscreteDomain)(R)?((0,o.isFieldOrDatumDef)(C)&&(0,c.hasDiscreteDomain)(R)||F)&&!T?function(e,t,n){const{markDef:i,encoding:s,config:c,stack:y}=n,b=i.orient,w=n.scaleName(t),x=n.getScaleComponent(t),S=(0,a.getSizeChannel)(t),_=(0,a.getSecondaryRangeChannel)(t),A=(0,a.getOffsetChannel)(t),C=n.scaleName(A),T=n.getScaleComponent((0,a.getOffsetScaleChannel)(t)),k="tick"===i.type||"horizontal"===b&&"y"===t||"vertical"===b&&"x"===t;let R;(s.size||i.size)&&(k?R=(0,p.nonPosition)("size",n,{vgChannel:S,defaultRef:(0,f.signalOrValueRef)(i.size)}):l.warn(l.message.cannotApplySizeToNonOrientedMark(i.type)));const D=!!R,O=(0,o.getBandSize)({channel:t,fieldDef:e,markDef:i,config:c,scaleType:(x||T)?.get("type"),useVlSizeChannel:k});R=R||{[S]:E(S,C||w,T||x,c,O,!!e,i.type)};const N="band"===(x||T)?.get("type")&&(0,u.isRelativeBandSize)(O)&&!D?"top":"middle",F=(0,g.vgAlignedPositionChannel)(t,i,c,N),P="xc"===F||"yc"===F,{offset:M,offsetType:I}=(0,h.positionOffset)({channel:t,markDef:i,encoding:s,model:n,bandPosition:P?.5:0}),$=v.midPointRefWithPositionInvalidTest({channel:t,channelDef:e,markDef:i,config:c,scaleName:w,scale:x,stack:y,offset:M,defaultRef:(0,m.pointPositionDefaultRef)({model:n,defaultPos:"mid",channel:t,scaleName:w,scale:x}),bandPosition:P?"encoding"===I?0:.5:(0,d.isSignalRef)(O)?{signal:`(1-${O})/2`}:(0,u.isRelativeBandSize)(O)?(1-O.band)/2:0});if(S)return{[F]:$,...R};{const e=(0,a.getVgPositionChannel)(_),t=R[S],n=M?{...t,offset:M}:t;return{[F]:$,[e]:(0,r.isArray)($)?[$[0],{...$[1],offset:n}]:{...$,offset:n}}}}(C,t,e):(0,y.rangePosition)(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"}):function({fieldDef:e,fieldDef2:t,channel:n,model:r}){const{config:s,markDef:c,encoding:p}=r,g=r.getScaleComponent(n),m=r.scaleName(n),y=g?g.get("type"):void 0,b=g.get("reverse"),w=(0,o.getBandSize)({channel:n,fieldDef:e,markDef:c,config:s,scaleType:y}),x=r.component.axes[n]?.[0],E=x?.get("translate")??.5,A=(0,a.isXorY)(n)?(0,f.getMarkPropOrConfig)("binSpacing",c,s)??0:0,C=(0,a.getSecondaryRangeChannel)(n),T=(0,a.getVgPositionChannel)(n),k=(0,a.getVgPositionChannel)(C),R=(0,f.getMarkConfig)("minBandSize",c,s),{offset:D}=(0,h.positionOffset)({channel:n,markDef:c,encoding:p,model:r,bandPosition:0}),{offset:O}=(0,h.positionOffset)({channel:C,markDef:c,encoding:p,model:r,bandPosition:0}),N=v.binSizeExpr({fieldDef:e,scaleName:m}),F=S(n,A,b,E,D,R,N),P=S(C,A,b,E,O??D,R,N),M=(0,d.isSignalRef)(w)?{signal:`(1-${w.signal})/2`}:(0,u.isRelativeBandSize)(w)?(1-w.band)/2:.5,I=(0,o.getBandPosition)({fieldDef:e,fieldDef2:t,markDef:c,config:s});if((0,i.isBinning)(e.bin)||e.timeUnit){const t=e.timeUnit&&.5!==I;return{[k]:_({fieldDef:e,scaleName:m,bandPosition:M,offset:P,useRectOffsetField:t}),[T]:_({fieldDef:e,scaleName:m,bandPosition:(0,d.isSignalRef)(M)?{signal:`1-${M.signal}`}:1-M,offset:F,useRectOffsetField:t})}}if((0,i.isBinned)(e.bin)){const n=v.valueRefForFieldOrDatumDef(e,m,{},{offset:P});if((0,o.isFieldDef)(t))return{[k]:n,[T]:v.valueRefForFieldOrDatumDef(t,m,{},{offset:F})};if((0,i.isBinParams)(e.bin)&&e.bin.step)return{[k]:n,[T]:{signal:`scale("${m}", ${(0,o.vgField)(e,{expr:"datum"})} + ${e.bin.step})`,offset:F}}}l.warn(l.message.channelRequiredForBinned(C))}({fieldDef:C,fieldDef2:T,channel:t,model:e})}function E(e,t,n,i,a,o,c){if((0,u.isRelativeBandSize)(a)){if(!n)return{mult:a.band,field:{group:e}};{const e=n.get("type");if("band"===e){let e=`bandwidth('${t}')`;1!==a.band&&(e=`${a.band} * ${e}`);const n=(0,f.getMarkConfig)("minBandSize",{type:c},i);return{signal:n?`max(${(0,f.signalOrStringValue)(n)}, ${e})`:e}}1!==a.band&&(l.warn(l.message.cannotUseRelativeBandSizeWithNonBandScale(e)),a=void 0)}}else{if((0,d.isSignalRef)(a))return a;if(a)return{value:a}}if(n){const e=n.get("range");if((0,d.isVgRangeStep)(e)&&(0,r.isNumber)(e.step))return{value:e.step-2}}if(!o){const{bandPaddingInner:t,barBandPaddingInner:n,rectBandPaddingInner:a,tickBandPaddingInner:o}=i.scale,s=(0,b.getFirstDefined)(t,"tick"===c?o:"bar"===c?n:a);if((0,d.isSignalRef)(s))return{signal:`(1 - (${s.signal})) * ${e}`};if((0,r.isNumber)(s))return{signal:`${1-s} * ${e}`}}return{value:(0,s.getViewConfigDiscreteStep)(i.view,e)-2}}function S(e,t,n,r,i,o,s){if((0,a.isPolarPositionChannel)(e))return 0;const l="x"===e||"y2"===e,u=l?-t/2:t/2;if((0,d.isSignalRef)(n)||(0,d.isSignalRef)(i)||(0,d.isSignalRef)(r)||o){const e=(0,f.signalOrStringValue)(n),t=(0,f.signalOrStringValue)(i),a=(0,f.signalOrStringValue)(r),c=(0,f.signalOrStringValue)(o),d=o?`(${s} < ${c} ? ${l?"":"-"}0.5 * (${c} - (${s})) : ${u})`:u;return{signal:(a?`${a} + `:"")+(e?`(${e} ? -1 : 1) * `:"")+(t?`(${t} + ${d})`:d)}}return i=i||0,r+(n?-i-u:+i+u)}function _({fieldDef:e,scaleName:t,bandPosition:n,offset:r,useRectOffsetField:i}){return v.interpolatedSignalRef({scaleName:t,fieldOrDatumDef:e,bandPosition:n,offset:r,...i?{startSuffix:w.OFFSETTED_RECT_START_SUFFIX,endSuffix:w.OFFSETTED_RECT_END_SUFFIX}:{}})}},71390:(e,t,n)=>{"use strict";function r({scaleName:e,scale:t,mode:n}){const r=`domain('${e}')`;if(!t||!e)return;const i=`${r}[0]`,a=`peek(${r})`,o=t.domainHasZero();return"definitely"===o?{scale:e,value:0}:"maybe"===o?{signal:`scale('${e}', inrange(0, ${r}) ? 0 : ${"zeroOrMin"===n?i:a})`}:{signal:`scale('${e}', ${"zeroOrMin"===n?i:a})`}}n.r(t),n.d(t,{scaledZeroOrMinOrMax:()=>r})},22449:(e,t,n)=>{"use strict";n.r(t),n.d(t,{text:()=>s,textRef:()=>l});var r=n(79543),i=n(15058),a=n(6032),o=n(49144);function s(e,t="text"){const n=e.encoding[t];return(0,o.wrapCondition)({model:e,channelDef:n,vgChannel:t,mainRefFn:t=>l(t,e.config),invalidValueRef:void 0})}function l(e,t,n="datum"){if(e){if((0,r.isValueDef)(e))return(0,i.signalOrValueRef)(e.value);if((0,r.isFieldOrDatumDef)(e)){const{format:i,formatType:o}=(0,r.getFormatMixins)(e);return(0,a.formatSignalRef)({fieldOrDatumDef:e,format:i,formatType:o,expr:n,config:t})}}}},14607:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tooltip:()=>h,tooltipData:()=>g,tooltipRefForEncoding:()=>m});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(98348),l=n(79989),u=n(5711),c=n(15058),d=n(6032),f=n(49144),p=n(22449);function h(e,t={}){const{encoding:n,markDef:i,config:a,stack:o}=e,s=n.tooltip;if((0,r.isArray)(s))return{tooltip:m({tooltip:s},o,a,t)};{const l=t.reactiveGeom?"datum.datum":"datum",d=e=>{const s=(0,p.textRef)(e,a,l);if(s)return s;if(null===e)return;let d=(0,c.getMarkPropOrConfig)("tooltip",i,a);return!0===d&&(d={content:"encoding"}),(0,r.isString)(d)?{value:d}:(0,r.isObject)(d)?(0,u.isSignalRef)(d)?d:"encoding"===d.content?m(n,o,a,t):{signal:l}:void 0};return(0,f.wrapCondition)({model:e,channelDef:s,vgChannel:"tooltip",mainRefFn:d,invalidValueRef:void 0})}}function g(e,t,n,{reactiveGeom:l}={}){const u={...n,...n.tooltipFormat},c=new Set,f=l?"datum.datum":"datum",h=[];function g(n,s){const l=(0,a.getMainRangeChannel)(s),g=(0,o.isTypedFieldDef)(n)?n:{...n,type:e[l].type},m=g.title||(0,o.defaultTitle)(g,u),y=(0,r.array)(m).join(", ").replaceAll(/"/g,'\\"');let v;if((0,a.isXorY)(s)){const t="x"===s?"x2":"y2",n=(0,o.getFieldDef)(e[t]);if((0,i.isBinned)(g.bin)&&n){const e=(0,o.vgField)(g,{expr:f}),r=(0,o.vgField)(n,{expr:f}),{format:i,formatType:a}=(0,o.getFormatMixins)(g);v=(0,d.binFormatExpression)(e,r,i,a,u),c.add(t)}}if(((0,a.isXorY)(s)||s===a.THETA||s===a.RADIUS)&&t&&t.fieldChannel===s&&"normalize"===t.offset){const{format:e,formatType:t}=(0,o.getFormatMixins)(g);v=(0,d.formatSignalRef)({fieldOrDatumDef:g,format:e,formatType:t,expr:f,config:u,normalizeStack:!0}).signal}v??(v=(0,p.textRef)(g,u,f).signal),h.push({channel:s,key:y,value:v})}(0,s.forEach)(e,((e,t)=>{(0,o.isFieldDef)(e)?g(e,t):(0,o.hasConditionalFieldDef)(e)&&g(e.condition,t)}));const m={};for(const{channel:e,key:t,value:n}of h)c.has(e)||m[t]||(m[t]=n);return m}function m(e,t,n,{reactiveGeom:r}={}){const i=g(e,t,n,{reactiveGeom:r}),a=(0,l.entries)(i).map((([e,t])=>`"${e}": ${t}`));return a.length>0?{signal:`{${a.join(", ")}}`}:void 0}},42104:(e,t,n)=>{"use strict";n.r(t),n.d(t,{binSizeExpr:()=>w,datumDefToExpr:()=>y,interpolatedSignalRef:()=>b,midPoint:()=>x,midPointRefWithPositionInvalidTest:()=>m,valueRefForFieldOrDatumDef:()=>v,widthHeightValueOrSignalRef:()=>E});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(20032),l=n(3802),u=n(20916),c=n(31179),d=n(99273),f=n(79989),p=n(5711),h=n(15058),g=n(91463);function m(e){const{channel:t,channelDef:n,markDef:r,scale:i,scaleName:o,config:s}=e,l=(0,a.getMainRangeChannel)(t),u=x(e),c=(0,g.getConditionalValueRefForIncludingInvalidValue)({scaleChannel:l,channelDef:n,scale:i,scaleName:o,markDef:r,config:s});return void 0!==c?[c,u]:u}function y(e){const{datum:t}=e;return(0,s.isDateTime)(t)?(0,s.dateTimeToExpr)(t):`${(0,f.stringify)(t)}`}function v(e,t,n,r){const i={};if(t&&(i.scale=t),(0,o.isDatumDef)(e)){const{datum:t}=e;(0,s.isDateTime)(t)?i.signal=(0,s.dateTimeToExpr)(t):(0,p.isSignalRef)(t)?i.signal=t.signal:(0,l.isExprRef)(t)?i.signal=t.expr:i.value=t}else i.field=(0,o.vgField)(e,n);if(r){const{offset:e,band:t}=r;e&&(i.offset=e),t&&(i.band=t)}return i}function b({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:r,startSuffix:i,endSuffix:a="end",bandPosition:s=.5}){const l=!(0,p.isSignalRef)(s)&&0{"use strict";n.r(t),n.d(t,{zindex:()=>s});var r=n(79543),i=n(75028),a=n(15058),o=n(49144);function s(e){const{encoding:t,mark:n}=e,s=t.order;return!(0,i.isPathMark)(n)&&(0,r.isValueDef)(s)?(0,o.wrapCondition)({model:e,channelDef:s,vgChannel:"zindex",mainRefFn:e=>(0,a.signalOrValueRef)(e.value),invalidValueRef:void 0}):{}}},98363:(e,t,n)=>{"use strict";n.r(t),n.d(t,{geoshape:()=>o});var r=n(79543),i=n(99273),a=n(55792);const o={vgMark:"shape",encodeEntry:e=>({...a.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[{type:"geoshape",projection:e.projectionName(),...n&&(0,r.isFieldDef)(n)&&n.type===i.GEOJSON?{field:(0,r.vgField)(n,{expr:"datum"})}:{}}]}}},24812:(e,t,n)=>{"use strict";n.r(t),n.d(t,{image:()=>i});var r=n(55792);const i={vgMark:"image",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...r.rectPosition(e,"x"),...r.rectPosition(e,"y"),...r.text(e,"url")})}},55823:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultFilled:()=>p,initMarkdef:()=>f});var r=n(19664),i=n(79543),a=n(98348),o=n(3802),s=n(20916),l=n(75028),u=n(99273),c=n(79989),d=n(15058);function f(e,t,n){const f=(0,o.replaceExprRef)(e),p=(0,d.getMarkPropOrConfig)("orient",f,n);if(f.orient=function(e,t,n){switch(e){case l.POINT:case l.CIRCLE:case l.SQUARE:case l.TEXT:case l.RECT:case l.IMAGE:return}const{x:a,y:o,x2:s,y2:c}=t;switch(e){case l.BAR:if((0,i.isFieldDef)(a)&&((0,r.isBinned)(a.bin)||(0,i.isFieldDef)(o)&&o.aggregate&&!a.aggregate))return"vertical";if((0,i.isFieldDef)(o)&&((0,r.isBinned)(o.bin)||(0,i.isFieldDef)(a)&&a.aggregate&&!o.aggregate))return"horizontal";if(c||s){if(n)return n;if(!s)return((0,i.isFieldDef)(a)&&a.type===u.QUANTITATIVE&&!(0,r.isBinning)(a.bin)||(0,i.isNumericDataDef)(a))&&(0,i.isFieldDef)(o)&&(0,r.isBinned)(o.bin)?"horizontal":"vertical";if(!c)return((0,i.isFieldDef)(o)&&o.type===u.QUANTITATIVE&&!(0,r.isBinning)(o.bin)||(0,i.isNumericDataDef)(o))&&(0,i.isFieldDef)(a)&&(0,r.isBinned)(a.bin)?"vertical":"horizontal"}case l.RULE:if(s&&(!(0,i.isFieldDef)(a)||!(0,r.isBinned)(a.bin))&&c&&(!(0,i.isFieldDef)(o)||!(0,r.isBinned)(o.bin)))return;case l.AREA:if(c)return(0,i.isFieldDef)(o)&&(0,r.isBinned)(o.bin)?"horizontal":"vertical";if(s)return(0,i.isFieldDef)(a)&&(0,r.isBinned)(a.bin)?"vertical":"horizontal";if(e===l.RULE){if(a&&!o)return"vertical";if(o&&!a)return"horizontal"}case l.LINE:case l.TICK:{const t=(0,i.isUnbinnedQuantitativeFieldOrDatumDef)(a),r=(0,i.isUnbinnedQuantitativeFieldOrDatumDef)(o);if(n)return n;if(t&&!r)return"tick"!==e?"horizontal":"vertical";if(!t&&r)return"tick"!==e?"vertical":"horizontal";if(t&&r)return"vertical";{const e=(0,i.isTypedFieldDef)(a)&&a.type===u.TEMPORAL,t=(0,i.isTypedFieldDef)(o)&&o.type===u.TEMPORAL;if(e&&!t)return"vertical";if(!e&&t)return"horizontal"}return}}return"vertical"}(f.type,t,p),void 0!==p&&p!==f.orient&&s.warn(s.message.orientOverridden(f.orient,p)),"bar"===f.type&&f.orient){const e=(0,d.getMarkPropOrConfig)("cornerRadiusEnd",f,n);if(void 0!==e){const n="horizontal"===f.orient&&t.x2||"vertical"===f.orient&&t.y2?["cornerRadius"]:l.BAR_CORNER_RADIUS_INDEX[f.orient];for(const t of n)f[t]=e;void 0!==f.cornerRadiusEnd&&delete f.cornerRadiusEnd}}const h=(0,d.getMarkPropOrConfig)("opacity",f,n),g=(0,d.getMarkPropOrConfig)("fillOpacity",f,n);return void 0===h&&void 0===g&&(f.opacity=function(e,t){if((0,c.contains)([l.POINT,l.TICK,l.CIRCLE,l.SQUARE],e)&&!(0,a.isAggregate)(t))return.7}(f.type,t)),void 0===(0,d.getMarkPropOrConfig)("cursor",f,n)&&(f.cursor=function(e,t,n){return t.href||e.href||(0,d.getMarkPropOrConfig)("href",e,n)?"pointer":e.cursor}(f,t,n)),f}function p(e,t,{graticule:n}){if(n)return!1;const r=(0,d.getMarkConfig)("filled",e,t),i=e.type;return(0,c.getFirstDefined)(r,i!==l.POINT&&i!==l.LINE&&i!==l.RULE)}},99519:(e,t,n)=>{"use strict";n.r(t),n.d(t,{line:()=>i,trail:()=>a});var r=n(55792);const i={vgMark:"line",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...r.pointPosition("x",e,{defaultPos:"mid"}),...r.pointPosition("y",e,{defaultPos:"mid"}),...r.nonPosition("size",e,{vgChannel:"strokeWidth"}),...r.defined(e)})},a={vgMark:"trail",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...r.pointPosition("x",e,{defaultPos:"mid"}),...r.pointPosition("y",e,{defaultPos:"mid"}),...r.nonPosition("size",e),...r.defined(e)})}},60288:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSort:()=>C,parseMarkGroups:()=>S});var r=n(26372),i=n(79543),a=n(89081),o=n(98348),s=n(75028),l=n(79989),u=n(5711),c=n(15058),d=n(56017),f=n(26052),p=n(47880),h=n(98363),g=n(24812),m=n(99519),y=n(91539),v=n(69895),b=n(95035),w=n(8674),x=n(48116);const E={arc:d.arc,area:f.area,bar:p.bar,circle:y.circle,geoshape:h.geoshape,image:g.image,line:m.line,point:y.point,rect:v.rect,rule:b.rule,square:y.square,text:w.text,tick:x.tick,trail:m.trail};function S(e){if((0,l.contains)([s.LINE,s.AREA,s.TRAIL],e.mark)){const t=(0,o.pathGroupingFields)(e.mark,e.encoding);if(t.length>0)return function(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:_+e.requestDataName(a.DataSourceType.Main),data:e.requestDataName(a.DataSourceType.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:T(e,{fromPrefix:_})}]}(e,t)}else if(e.mark===s.BAR){const t=u.VG_CORNERRADIUS_CHANNELS.some((t=>(0,c.getMarkPropOrConfig)(t,e.markDef,e.config)));if(e.stack&&!e.fieldDef("size")&&t)return function(e){const[t]=T(e,{fromPrefix:A}),n=e.scaleName(e.stack.fieldChannel),r=(t={})=>e.vgField(e.stack.fieldChannel,t),o=(e,t)=>`${e}(${[r({prefix:"min",suffix:"start",expr:t}),r({prefix:"max",suffix:"start",expr:t}),r({prefix:"min",suffix:"end",expr:t}),r({prefix:"max",suffix:"end",expr:t})].map((e=>`scale('${n}',${e})`)).join(",")})`;let s,d;"x"===e.stack.fieldChannel?(s={...(0,l.pick)(t.encode.update,["y","yc","y2","height",...u.VG_CORNERRADIUS_CHANNELS]),x:{signal:o("min","datum")},x2:{signal:o("max","datum")},clip:{value:!0}},d={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...(0,l.omit)(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(s={...(0,l.pick)(t.encode.update,["x","xc","x2","width"]),y:{signal:o("min","datum")},y2:{signal:o("max","datum")},clip:{value:!0}},d={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...(0,l.omit)(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const n of u.VG_CORNERRADIUS_CHANNELS){const r=(0,c.getMarkConfig)(n,e.markDef,e.config);t.encode.update[n]?(s[n]=t.encode.update[n],delete t.encode.update[n]):r&&(s[n]=(0,c.signalOrValueRef)(r)),r&&(t.encode.update[n]={value:0})}const f=[];if(e.stack.groupbyChannels?.length>0)for(const t of e.stack.groupbyChannels){const n=e.fieldDef(t),r=(0,i.vgField)(n);r&&f.push(r),(n?.bin||n?.timeUnit)&&f.push((0,i.vgField)(n,{binSuffix:"end"}))}return s=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce(((n,r)=>{if(t.encode.update[r])return{...n,[r]:t.encode.update[r]};{const t=(0,c.getMarkConfig)(r,e.markDef,e.config);return void 0!==t?{...n,[r]:(0,c.signalOrValueRef)(t)}:n}}),s),s.stroke&&(s.strokeForeground={value:!0},s.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(a.DataSourceType.Main),name:A+e.requestDataName(a.DataSourceType.Main),groupby:f,aggregate:{fields:[r({suffix:"start"}),r({suffix:"start"}),r({suffix:"end"}),r({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:s},marks:[{type:"group",encode:{update:d},marks:[t]}]}]}(e)}return T(e)}const _="faceted_path_",A="stack_group_";function C(e){const{encoding:t,stack:n,mark:a,markDef:o,config:u}=e,d=t.order;if(!(!(0,r.isArray)(d)&&(0,i.isValueDef)(d)&&(0,l.isNullOrFalse)(d.value)||!d&&(0,l.isNullOrFalse)((0,c.getMarkPropOrConfig)("order",o,u)))){if(((0,r.isArray)(d)||(0,i.isFieldDef)(d))&&!n)return(0,c.sortParams)(d,{expr:"datum"});if((0,s.isPathMark)(a)){const e="horizontal"===o.orient?"y":"x",n=t[e];if((0,i.isFieldDef)(n))return{field:e}}}}function T(e,t={fromPrefix:""}){const{mark:n,markDef:r,encoding:i,config:o}=e,s=(0,l.getFirstDefined)(r.clip,function(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return!(!t?.get("selectionExtent")&&!n?.get("selectionExtent"))||void 0}(e),function(e){const t=e.component.projection;return!(!t||t.isFit)||void 0}(e)),u=(0,c.getStyles)(r),d=i.key,f=C(e),p=function(e){if(!e.component.selection)return null;const t=(0,l.keys)(e.component.selection).length;let n=t,r=e.parent;for(;r&&0===n;)n=(0,l.keys)(r.component.selection).length,r=r.parent;return n?{interactive:t>0||"geoshape"===e.mark||!!e.encoding.tooltip||!!e.markDef.tooltip}:null}(e),h=(0,c.getMarkPropOrConfig)("aria",r,o),g=E[n].postEncodingTransform?E[n].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:E[n].vgMark,...s?{clip:s}:{},...u?{style:u}:{},...d?{key:d.field}:{},...f?{sort:f}:{},...p||{},...!1===h?{aria:h}:{},from:{data:t.fromPrefix+e.requestDataName(a.DataSourceType.Main)},encode:{update:E[n].encodeEntry(e)},...g?{transform:g}:{}}]}},91539:(e,t,n)=>{"use strict";n.r(t),n.d(t,{circle:()=>s,point:()=>o,shapeMixins:()=>a,square:()=>l});var r=n(55792);function i(e,t){const{config:n}=e;return{...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...r.pointPosition("x",e,{defaultPos:"mid"}),...r.pointPosition("y",e,{defaultPos:"mid"}),...r.nonPosition("size",e),...r.nonPosition("angle",e),...a(e,0,t)}}function a(e,t,n){return n?{shape:{value:n}}:r.nonPosition("shape",e)}const o={vgMark:"symbol",encodeEntry:e=>i(e)},s={vgMark:"symbol",encodeEntry:e=>i(e,"circle")},l={vgMark:"symbol",encodeEntry:e=>i(e,"square")}},69895:(e,t,n)=>{"use strict";n.r(t),n.d(t,{rect:()=>i});var r=n(55792);const i={vgMark:"rect",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...r.rectPosition(e,"x"),...r.rectPosition(e,"y")})}},95035:(e,t,n)=>{"use strict";n.r(t),n.d(t,{rule:()=>i});var r=n(55792);const i={vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?{...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...r.pointOrRangePosition("x",e,{defaultPos:"horizontal"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==n}),...r.pointOrRangePosition("y",e,{defaultPos:"vertical"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==n}),...r.nonPosition("size",e,{vgChannel:"strokeWidth"})}:{}}}},8674:(e,t,n)=>{"use strict";n.r(t),n.d(t,{text:()=>a});var r=n(15058),i=n(55792);const a={vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return{...i.baseEncodeEntry(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...i.pointPosition("x",e,{defaultPos:"mid"}),...i.pointPosition("y",e,{defaultPos:"mid"}),...i.text(e),...i.nonPosition("size",e,{vgChannel:"fontSize"}),...i.nonPosition("angle",e),...i.valueIfDefined("align",o(e.markDef,0,t)),...i.valueIfDefined("baseline",s(e.markDef,0,t)),...i.pointPosition("radius",e,{defaultPos:null}),...i.pointPosition("theta",e,{defaultPos:null})}}};function o(e,t,n){if(void 0===(0,r.getMarkPropOrConfig)("align",e,n))return"center"}function s(e,t,n){if(void 0===(0,r.getMarkPropOrConfig)("baseline",e,n))return"middle"}},48116:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tick:()=>a});var r=n(15058),i=n(55792);const a={vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,a=n.orient,o="horizontal"===a?"x":"y",s="horizontal"===a?"y":"x",l="horizontal"===a?"height":"width";return{...i.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...i.rectPosition(e,o),...i.pointPosition(s,e,{defaultPos:"mid",vgChannel:"y"===s?"yc":"xc"}),[l]:(0,r.signalOrValueRef)((0,r.getMarkPropOrConfig)("thickness",n,t))}}}},7302:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Model:()=>M,ModelWithField:()=>I,NameMap:()=>D,isConcatModel:()=>F,isFacetModel:()=>N,isLayerModel:()=>P,isUnitModel:()=>O});var r=n(95290),i=n(79543),a=n(89081),o=n(98348),s=n(3802),l=n(20916),u=n(31179),c=n(24777),d=n(89820),f=n(76447),p=n(65393),h=n(79989),g=n(5711),m=n(5593),y=n(15058),v=n(51885),b=n(10078),w=n(6871),x=n(19492),E=n(86985),S=n(16182),_=n(85013),A=n(98066),C=n(39276),T=n(63760),k=n(9021),R=n(96159);class D{constructor(){this.nameMap={}}rename(e,t){this.nameMap[e]=t}has(e){return void 0!==this.nameMap[e]}get(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e}}function O(e){return"unit"===e?.type}function N(e){return"facet"===e?.type}function F(e){return"concat"===e?.type}function P(e){return"layer"===e?.type}class M{constructor(e,t,n,r,i,a,o){this.type=t,this.parent=n,this.config=i,this.correctDataNames=e=>(e.from?.data&&(e.from.data=this.lookupDataSource(e.from.data)),e.from?.facet?.data&&(e.from.facet.data=this.lookupDataSource(e.from.facet.data)),e),this.parent=n,this.config=i,this.view=(0,s.replaceExprRef)(o),this.name=e.name??r,this.title=(0,f.isText)(e.title)?{text:e.title}:e.title?(0,s.replaceExprRef)(e.title):void 0,this.scaleNameMap=n?n.scaleNameMap:new D,this.projectionNameMap=n?n.projectionNameMap:new D,this.signalNameMap=n?n.signalNameMap:new D,this.data=e.data,this.description=e.description,this.transforms=(0,p.normalizeTransform)(e.transform??[]),this.layout="layer"===t||"unit"===t?{}:(0,d.extractCompositionLayout)(e,t,i),this.component={data:{sources:n?n.component.data.sources:[],outputNodes:n?n.component.data.outputNodes:{},outputNodeRefCounts:n?n.component.data.outputNodeRefCounts:{},isFaceted:(0,c.isFacetSpec)(e)||n?.component.data.isFaceted&&void 0===e.data},layoutSize:new R.Split,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...a?(0,h.duplicate)(a):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){(0,k.parseScales)(this)}parseProjection(){(0,A.parseProjection)(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){(0,S.parseLegend)(this)}assembleEncodeFromView(e){const{style:t,...n}=e,r={};for(const e of(0,h.keys)(n)){const t=n[e];void 0!==t&&(r[e]=(0,y.signalOrValueRef)(t))}return r}assembleGroupEncodeEntry(e){let t={};return this.view&&(t=this.assembleEncodeFromView(this.view)),e||(this.description&&(t.description=(0,y.signalOrValueRef)(this.description)),"unit"!==this.type&&"layer"!==this.type)?(0,h.isEmpty)(t)?void 0:t:{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...t}}assembleLayout(){if(!this.layout)return;const{spacing:e,...t}=this.layout,{component:n,config:r}=this,i=(0,v.assembleLayoutTitleBand)(n.layoutHeaders,r);return{padding:e,...this.assembleDefaultLayout(),...t,...i?{titleBand:i}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:e}=this.component;let t=[];for(const n of r.FACET_CHANNELS)e[n].title&&t.push((0,v.assembleTitleGroup)(this,n));for(const e of b.HEADER_CHANNELS)t=t.concat((0,v.assembleHeaderGroups)(this,e));return t}assembleAxes(){return(0,m.assembleAxes)(this.component.axes,this.config)}assembleLegends(){return(0,E.assembleLegends)(this)}assembleProjections(){return(0,_.assembleProjections)(this)}assembleTitle(){const{encoding:e,...t}=this.title??{},n={...(0,f.extractTitleConfig)(this.config.title).nonMarkTitleProperties,...t,...e?{encode:{update:e}}:{}};if(n.text)return(0,h.contains)(["unit","layer"],this.type)?(0,h.contains)(["middle",void 0],n.anchor)&&(n.frame??(n.frame="group")):n.anchor??(n.anchor="start"),(0,h.isEmpty)(n)?void 0:n}assembleGroup(e=[]){const t={};(e=e.concat(this.assembleSignals())).length>0&&(t.signals=e);const n=this.assembleLayout();n&&(t.layout=n),t.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const r=!this.parent||N(this.parent)?(0,C.assembleScales)(this):[];r.length>0&&(t.scales=r);const i=this.assembleAxes();i.length>0&&(t.axes=i);const a=this.assembleLegends();return a.length>0&&(t.legends=a),t}getName(e){return(0,h.varName)((this.name?`${this.name}_`:"")+e)}getDataName(e){return this.getName(a.DataSourceType[e].toLowerCase())}requestDataName(e){const t=this.getDataName(e),n=this.component.data.outputNodeRefCounts;return n[t]=(n[t]||0)+1,t}getSizeSignalRef(e){if(N(this.parent)){const t=(0,x.getSizeTypeFromLayoutSizeType)(e),n=(0,r.getPositionScaleChannel)(t),a=this.component.scales[n];if(a&&!a.merged){const e=a.get("type"),t=a.get("range");if((0,u.hasDiscreteDomain)(e)&&(0,g.isVgRangeStep)(t)){const e=a.get("name"),t=(0,T.assembleDomain)(this,n),r=(0,T.getFieldFromDomain)(t);if(r){const t=(0,i.vgField)({aggregate:"distinct",field:r},{expr:"datum"});return{signal:(0,w.sizeExpr)(e,a,t)}}return l.warn(l.message.unknownField(n)),null}}}return{signal:this.signalNameMap.get(this.getName(e))}}lookupDataSource(e){const t=this.component.data.outputNodes[e];return t?t.getSource():e}getSignalName(e){return this.signalNameMap.get(e)}renameSignal(e,t){this.signalNameMap.rename(e,t)}renameScale(e,t){this.scaleNameMap.rename(e,t)}renameProjection(e,t){this.projectionNameMap.rename(e,t)}scaleName(e,t){return t?this.getName(e):(0,r.isChannel)(e)&&(0,r.isScaleChannel)(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e))?this.scaleNameMap.get(this.getName(e)):void 0}projectionName(e){return e?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}getScaleComponent(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const t=this.component.scales[e];return t&&!t.merged?t:this.parent?this.parent.getScaleComponent(e):void 0}getScaleType(e){const t=this.getScaleComponent(e);return t?t.get("type"):void 0}getSelectionComponent(e,t){let n=this.component.selection[e];if(!n&&this.parent&&(n=this.parent.getSelectionComponent(e,t)),!n)throw new Error(l.message.selectionNotFound(t));return n}hasAxisOrientSignalRef(){return this.component.axes.x?.some((e=>e.hasOrientSignalRef()))||this.component.axes.y?.some((e=>e.hasOrientSignalRef()))}}class I extends M{vgField(e,t={}){const n=this.fieldDef(e);if(n)return(0,i.vgField)(n,t)}reduceFieldDef(e,t){return(0,o.reduce)(this.getMapping(),((t,n,r)=>{const a=(0,i.getFieldDef)(n);return a?e(t,a,r):t}),t)}forEachFieldDef(e,t){(0,o.forEach)(this.getMapping(),((t,n)=>{const r=(0,i.getFieldDef)(t);r&&e(r,n)}),t)}}},95370:(e,t,n)=>{"use strict";n.r(t),n.d(t,{expression:()=>s});var r=n(26372),i=n(4976),a=n(79989),o=n(83937);function s(e,t,n){return(0,a.logicalExpr)(t,(t=>(0,r.isString)(t)?t:(0,i.isSelectionPredicate)(t)?(0,o.parseSelectionPredicate)(e,t,n):(0,i.fieldFilterExpression)(t)))}},85013:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleProjectionForModel:()=>l,assembleProjections:()=>o,assembleProjectionsForModelAndChildren:()=>s});var r=n(79989),i=n(5711),a=n(7302);function o(e){return(0,a.isLayerModel)(e)||(0,a.isConcatModel)(e)?s(e):l(e)}function s(e){return e.children.reduce(((e,t)=>e.concat(t.assembleProjections())),l(e))}function l(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:a}=n;if(t.data){const o={signal:`[${t.size.map((e=>e.signal)).join(", ")}]`},s=t.data.reduce(((t,n)=>{const a=(0,i.isSignalRef)(n)?n.signal:`data('${e.lookupDataSource(n)}')`;return(0,r.contains)(t,a)||t.push(a),t}),[]);if(s.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:a,size:o,fit:{signal:s.length>1?`[${s.join(", ")}]`:s[0]},...n}]}return[{name:a,translate:{signal:"[width / 2, height / 2]"},...n}]}},51494:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ProjectionComponent:()=>i});var r=n(96159);class i extends r.Split{constructor(e,t,n,r){super({...t},{name:e}),this.specifiedProjection=t,this.size=n,this.data=r,this.merged=!1}get isFit(){return!!this.data}}},98066:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseProjection:()=>p});var r=n(26372),i=n(95290),a=n(79543),o=n(89081),s=n(3802),l=n(15176),u=n(99273),c=n(79989),d=n(7302),f=n(51494);function p(e){e.component.projection=(0,d.isUnitModel)(e)?function(e){if(e.hasProjection){const t=(0,s.replaceExprRef)(e.specifiedProjection),n=!(t&&(null!=t.scale||null!=t.translate)),r=n?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,l=n?function(e){const t=[],{encoding:n}=e;for(const r of[[i.LONGITUDE,i.LATITUDE],[i.LONGITUDE2,i.LATITUDE2]])((0,a.getFieldOrDatumDef)(n[r[0]])||(0,a.getFieldOrDatumDef)(n[r[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(i.SHAPE)&&e.typedFieldDef(i.SHAPE).type===u.GEOJSON&&t.push({signal:e.getName(`geojson_${t.length}`)}),0===t.length&&t.push(e.requestDataName(o.DataSourceType.Main)),t}(e):void 0,c=new f.ProjectionComponent(e.projectionName(!0),{...(0,s.replaceExprRef)(e.config.projection),...t},r,l);return c.get("type")||c.set("type","equalEarth",!1),c}}(e):function(e){if(0===e.children.length)return;let t;for(const t of e.children)p(t);const n=(0,c.every)(e.children,(e=>{const n=e.component.projection;if(n){if(t){const e=function(e,t){const n=(0,c.every)(l.PROJECTION_PROPERTIES,(n=>!(0,r.hasOwnProperty)(e.explicit,n)&&!(0,r.hasOwnProperty)(t.explicit,n)||!!((0,r.hasOwnProperty)(e.explicit,n)&&(0,r.hasOwnProperty)(t.explicit,n)&&(0,c.deepEqual)(e.get(n),t.get(n)))));if((0,c.deepEqual)(e.size,t.size)){if(n)return e;if((0,c.deepEqual)(e.explicit,{}))return t;if((0,c.deepEqual)(t.explicit,{}))return e}return null}(t,n);return e&&(t=e),!!e}return t=n,!0}return!0}));if(t&&n){const n=e.projectionName(!0),r=new f.ProjectionComponent(n,t.specifiedProjection,t.size,(0,c.duplicate)(t.data));for(const t of e.children){const e=t.component.projection;e&&(e.isFit&&r.data.push(...t.component.projection.data),t.renameProjection(e.get("name"),n),e.merged=!0)}return r}}(e)}},91387:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultScaleResolve:()=>o,parseGuideResolve:()=>s});var r=n(95290),i=n(20916),a=n(7302);function o(e,t){if((0,a.isFacetModel)(t))return"theta"===e?"independent":"shared";if((0,a.isLayerModel)(t))return"shared";if((0,a.isConcatModel)(t))return(0,r.isXorY)(e)||"theta"===e||"radius"===e?"independent":"shared";throw new Error("invalid model type for resolve")}function s(e,t){const n=e.scale[t],a=(0,r.isXorY)(t)?"axis":"legend";return"independent"===n?("shared"===e[a][t]&&i.warn(i.message.independentScaleMeansIndependentGuide(t)),"independent"):e[a][t]||"shared"}},39276:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleScaleRange:()=>f,assembleScales:()=>c,assembleScalesForModel:()=>d});var r=n(26372),i=n(95290),a=n(79989),o=n(5711),s=n(7302),l=n(52128),u=n(63760);function c(e){return(0,s.isLayerModel)(e)||(0,s.isConcatModel)(e)?e.children.reduce(((e,t)=>e.concat(c(t))),d(e)):d(e)}function d(e){return(0,a.keys)(e.component.scales).reduce(((t,n)=>{const r=e.component.scales[n];if(r.merged)return t;const i=r.combine(),{name:a,type:o,selectionExtent:s,domains:c,range:d,reverse:p,...h}=i,g=f(i.range,a,n,e),m=(0,u.assembleDomain)(e,n),y=s?(0,l.assembleSelectionScaleDomain)(e,s,r,m):null;return t.push({name:a,type:o,...m?{domain:m}:{},...y?{domainRaw:y}:{},range:g,...void 0!==p?{reverse:p}:{},...h}),t}),[])}function f(e,t,n,a){if((0,i.isXorY)(n)){if((0,o.isVgRangeStep)(e))return{step:{signal:`${t}_step`}}}else if((0,r.isObject)(e)&&(0,o.isDataRefDomain)(e))return{...e,data:a.lookupDataSource(e.data)};return e}},39621:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ScaleComponent:()=>s});var r=n(26372),i=n(31179),a=n(79989),o=n(96159);class s extends o.Split{constructor(e,t){super({},{name:e}),this.merged=!1,this.setWithExplicit("type",t)}domainHasZero(){const e=this.get("type");if((0,a.contains)([i.ScaleType.LOG,i.ScaleType.TIME,i.ScaleType.UTC],e))return"definitely-not";const t=this.get("zero");if(!0===t||void 0===t&&(0,a.contains)([i.ScaleType.LINEAR,i.ScaleType.SQRT,i.ScaleType.POW],e))return"definitely";const n=this.get("domains");if(n.length>0){let e=!1,t=!1,i=!1;for(const a of n){if((0,r.isArray)(a)){const n=a[0],i=a[a.length-1];if((0,r.isNumber)(n)&&(0,r.isNumber)(i)){if(n<=0&&i>=0){e=!0;continue}t=!0;continue}}i=!0}if(e)return"definitely";if(t&&!i)return"definitely-not"}return"maybe"}}},63760:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleDomain:()=>I,canUseUnaggregatedDomain:()=>N,domainSort:()=>O,getFieldFromDomain:()=>M,mergeDomains:()=>P,parseDomainForChannel:()=>C,parseScaleDomain:()=>A});var r=n(26372),i=n(54814),a=n(19664),o=n(95290),s=n(79543),l=n(89081),u=n(20916),c=n(75028),d=n(31179),f=n(46681),p=n(96598),h=n(79989),g=n(5711),m=n(15058),y=n(89153),v=n(77524),b=n(80449),w=n(62277),x=n(37761),E=n(7302),S=n(77547),_=n(96159);function A(e){(0,E.isUnitModel)(e)?function(e){const t=e.component.scales;for(const n of h.keys(t)){const r=C(e,n);if(t[n].setWithExplicit("domains",r),D(e,n),e.component.data.isFaceted){let t=e;for(;!(0,E.isFacetModel)(t)&&t.parent;)t=t.parent;if("shared"===t.component.resolve.scale[n])for(const e of r.value)(0,g.isDataRefDomain)(e)&&(e.data=b.FACET_SCALE_PREFIX+e.data.replace(b.FACET_SCALE_PREFIX,""))}}}(e):function(e){for(const t of e.children)A(t);const t=e.component.scales;for(const n of h.keys(t)){let r,i=null;for(const t of e.children){const e=t.component.scales[n];if(e){r=void 0===r?e.getWithExplicit("domains"):(0,_.mergeValuesWithExplicit)(r,e.getWithExplicit("domains"),"domains","scale",F);const t=e.get("selectionExtent");i&&t&&i.param!==t.param&&u.warn(u.message.NEEDS_SAME_SELECTION),i=t}}t[n].setWithExplicit("domains",r),i&&t[n].set("selectionExtent",i,!0)}}(e)}function C(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:r}=e,i=function(e,t,n,r){if("unaggregated"===e){const{valid:e,reason:r}=N(t,n);if(!e)return void u.warn(r)}else if(void 0===e&&r.useUnaggregatedDomain){const{valid:e}=N(t,n);if(e)return"unaggregated"}return e}(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return i!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:i}),"x"===t&&(0,s.getFieldOrDatumDef)(r.x2)?(0,s.getFieldOrDatumDef)(r.x)?(0,_.mergeValuesWithExplicit)(k(n,i,e,"x"),k(n,i,e,"x2"),"domain","scale",F):k(n,i,e,"x2"):"y"===t&&(0,s.getFieldOrDatumDef)(r.y2)?(0,s.getFieldOrDatumDef)(r.y)?(0,_.mergeValuesWithExplicit)(k(n,i,e,"y"),k(n,i,e,"y2"),"domain","scale",F):k(n,i,e,"y2"):k(n,i,e,t)}function T(e,t,n){const r=(0,p.normalizeTimeUnit)(n)?.unit;return"temporal"===t||r?function(e,t,n){return e.map((e=>({signal:`{data: ${(0,s.valueExpr)(e,{timeUnit:n,type:t})}}`})))}(e,t,r):[e]}function k(e,t,n,i){const{encoding:u,markDef:f,mark:p,config:v,stack:b}=n,E=(0,s.getFieldOrDatumDef)(u[i]),{type:A}=E,C=E.timeUnit,R=(0,x.getScaleDataSourceForHandlingInvalidValues)({invalid:(0,m.getMarkConfig)("invalid",f,v),isPath:(0,c.isPathMark)(p)});if((0,d.isDomainUnionWith)(t)){const r=k(e,void 0,n,i),a=T(t.unionWith,A,C);return(0,_.makeExplicit)([...a,...r.value])}if((0,g.isSignalRef)(t))return(0,_.makeExplicit)([t]);if(t&&"unaggregated"!==t&&!(0,d.isParameterDomain)(t))return(0,_.makeExplicit)(T(t,A,C));if(b&&i===b.fieldChannel){if("normalize"===b.offset)return(0,_.makeImplicit)([[0,1]]);const e=n.requestDataName(R);return(0,_.makeImplicit)([{data:e,field:n.vgField(i,{suffix:"start"})},{data:e,field:n.vgField(i,{suffix:"end"})}])}const D=(0,o.isScaleChannel)(i)&&(0,s.isFieldDef)(E)?O(n,i,e):void 0;if((0,s.isDatumDef)(E)){const e=T([E.datum],A,C);return(0,_.makeImplicit)(e)}const N=E;if("unaggregated"===t){const{field:e}=E;return(0,_.makeImplicit)([{data:n.requestDataName(R),field:(0,s.vgField)({field:e,aggregate:"min"})},{data:n.requestDataName(R),field:(0,s.vgField)({field:e,aggregate:"max"})}])}if((0,a.isBinning)(N.bin)){if((0,d.hasDiscreteDomain)(e))return"bin-ordinal"===e?(0,_.makeImplicit)([]):(0,_.makeImplicit)([{data:h.isBoolean(D)?n.requestDataName(R):n.requestDataName(l.DataSourceType.Raw),field:n.vgField(i,(0,s.binRequiresRange)(N,i)?{binSuffix:"range"}:{}),sort:!0!==D&&(0,r.isObject)(D)?D:{field:n.vgField(i,{}),op:"min"}}]);{const{bin:e}=N;if((0,a.isBinning)(e)){const t=(0,y.getBinSignalName)(n,N.field,e);return(0,_.makeImplicit)([new S.SignalRefWrapper((()=>{const e=n.getSignalName(t);return`[${e}.start, ${e}.stop]`}))])}return(0,_.makeImplicit)([{data:n.requestDataName(R),field:n.vgField(i,{})}])}}if(N.timeUnit&&h.contains(["time","utc"],e)){const e=u[(0,o.getSecondaryRangeChannel)(i)];if((0,s.hasBandEnd)(N,e,f,v)){const t=n.requestDataName(R),r=(0,s.getBandPosition)({fieldDef:N,fieldDef2:e,markDef:f,config:v}),a=(0,c.isRectBasedMark)(p)&&.5!==r&&(0,o.isXorY)(i);return(0,_.makeImplicit)([{data:t,field:n.vgField(i,a?{suffix:w.OFFSETTED_RECT_START_SUFFIX}:{})},{data:t,field:n.vgField(i,{suffix:a?w.OFFSETTED_RECT_END_SUFFIX:"end"})}])}}return D?(0,_.makeImplicit)([{data:h.isBoolean(D)?n.requestDataName(R):n.requestDataName(l.DataSourceType.Raw),field:n.vgField(i),sort:D}]):(0,_.makeImplicit)([{data:n.requestDataName(R),field:n.vgField(i)}])}function R(e,t){const{op:n,field:r,order:i}=e;return{op:n??(t?"sum":f.DEFAULT_SORT_OP),...r?{field:h.replacePathInField(r)}:{},...i?{order:i}:{}}}function D(e,t){const n=e.component.scales[t],r=e.specifiedScales[t].domain,i=e.fieldDef(t)?.bin,o=(0,d.isParameterDomain)(r)?r:void 0,s=(0,a.isBinParams)(i)&&(0,a.isParameterExtent)(i.extent)?i.extent:void 0;(o||s)&&n.set("selectionExtent",o??s,!0)}function O(e,t,n){if(!(0,d.hasDiscreteDomain)(n))return;const r=e.fieldDef(t),a=r.sort;if((0,f.isSortArray)(a))return{op:"min",field:(0,v.sortArrayIndexField)(r,t),order:"ascending"};const{stack:o}=e,l=o?new Set([...o.groupbyFields,...o.stackBy.map((e=>e.fieldDef.field))]):void 0;if((0,f.isSortField)(a))return R(a,o&&!l.has(a.field));if((0,f.isSortByEncoding)(a)){const{encoding:t,order:n}=a,r=e.fieldDef(t),{aggregate:u,field:c}=r,d=o&&!l.has(c);if((0,i.isArgminDef)(u)||(0,i.isArgmaxDef)(u))return R({field:(0,s.vgField)(r),order:n},d);if((0,i.isAggregateOp)(u)||!u)return R({op:u,field:c,order:n},d)}else{if("descending"===a)return{op:"min",field:e.vgField(t),order:"descending"};if(h.contains(["ascending",void 0],a))return!0}}function N(e,t){const{aggregate:n,type:a}=e;return n?(0,r.isString)(n)&&!i.SHARED_DOMAIN_OPS.has(n)?{valid:!1,reason:u.message.unaggregateDomainWithNonSharedDomainOp(n)}:"quantitative"===a&&"log"===t?{valid:!1,reason:u.message.unaggregatedDomainWithLogScale(e)}:{valid:!0}:{valid:!1,reason:u.message.unaggregateDomainHasNoEffectForRawField(e)}}function F(e,t,n,r){return e.explicit&&t.explicit&&u.warn(u.message.mergeConflictingDomainProperty(n,r,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function P(e){const t=h.unique(e.map((e=>{if((0,g.isDataRefDomain)(e)){const{sort:t,...n}=e;return n}return e})),h.hash),n=h.unique(e.map((e=>{if((0,g.isDataRefDomain)(e)){const t=e.sort;return void 0===t||h.isBoolean(t)||("op"in t&&"count"===t.op&&delete t.field,"ascending"===t.order&&delete t.order),t}})).filter((e=>void 0!==e)),h.hash);if(0===t.length)return;if(1===t.length){const t=e[0];if((0,g.isDataRefDomain)(t)&&n.length>0){let e=n[0];if(n.length>1){u.warn(u.message.MORE_THAN_ONE_SORT);const t=n.filter((e=>(0,r.isObject)(e)&&"op"in e&&"min"!==e.op));e=!n.every((e=>(0,r.isObject)(e)&&"op"in e))||1!==t.length||t[0]}else if((0,r.isObject)(e)&&"field"in e){const n=e.field;t.field===n&&(e=!e.order||{order:e.order})}return{...t,sort:e}}return t}const a=h.unique(n.map((e=>h.isBoolean(e)||!("op"in e)||(0,r.isString)(e.op)&&(0,r.hasOwnProperty)(i.MULTIDOMAIN_SORT_OP_INDEX,e.op)?e:(u.warn(u.message.domainSortDropped(e)),!0))),h.hash);let o;1===a.length?o=a[0]:a.length>1&&(u.warn(u.message.MORE_THAN_ONE_SORT),o=!0);const s=h.unique(e.map((e=>(0,g.isDataRefDomain)(e)?e.data:null)),(e=>e));return 1===s.length&&null!==s[0]?{data:s[0],fields:t.map((e=>e.field)),...o?{sort:o}:{}}:{fields:t,...o?{sort:o}:{}}}function M(e){if((0,g.isDataRefDomain)(e)&&(0,r.isString)(e.field))return e.field;if((0,g.isDataRefUnionedDomain)(e)){let t;for(const n of e.fields)if((0,g.isDataRefDomain)(n)&&(0,r.isString)(n.field))if(t){if(t!==n.field)return u.warn(u.message.FACETED_INDEPENDENT_DIFFERENT_SOURCES),t}else t=n.field;return u.warn(u.message.FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES),t}if((0,g.isFieldRefUnionDomain)(e)){u.warn(u.message.FACETED_INDEPENDENT_SAME_SOURCE);const t=e.fields[0];return(0,r.isString)(t)?t:void 0}}function I(e,t){return P(e.component.scales[t].get("domains").map((t=>((0,g.isDataRefDomain)(t)&&(t.data=e.lookupDataSource(t.data)),t))))}},9021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseScaleCore:()=>v,parseScales:()=>y});var r=n(95290),i=n(79543),a=n(98348),o=n(75028),s=n(31179),l=n(99273),u=n(79989),c=n(7302),d=n(91387),f=n(96159),p=n(39621),h=n(63760),g=n(70585),m=n(78540);function y(e,{ignoreRange:t}={}){v(e),(0,h.parseScaleDomain)(e);for(const t of s.NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTIES)(0,g.parseScaleProperty)(e,t);t||(0,g.parseScaleRange)(e)}function v(e){(0,c.isUnitModel)(e)?e.component.scales=function(e){const{encoding:t,mark:n,markDef:s}=e,u={};for(const c of r.SCALE_CHANNELS){const d=(0,i.getFieldOrDatumDef)(t[c]);if(d&&n===o.GEOSHAPE&&c===r.SHAPE&&d.type===l.GEOJSON)continue;let f=d&&d.scale;if(d&&null!==f&&!1!==f){f??(f={});const n=(0,a.channelHasNestedOffsetScale)(t,c),r=(0,m.scaleType)(f,c,d,s,n);u[c]=new p.ScaleComponent(e.scaleName(`${c}`,!0),{value:r,explicit:f.type===r})}}return u}(e):e.component.scales=function(e){var t;const n=e.component.scales={},r={},i=e.component.resolve;for(const n of e.children){v(n);for(const a of(0,u.keys)(n.component.scales))if((t=i.scale)[a]??(t[a]=(0,d.defaultScaleResolve)(a,e)),"shared"===i.scale[a]){const e=r[a],t=n.component.scales[a].getWithExplicit("type");e?(0,s.scaleCompatible)(e.value,t.value)?r[a]=(0,f.mergeValuesWithExplicit)(e,t,"type","scale",b):(i.scale[a]="independent",delete r[a]):r[a]=t}}for(const t of(0,u.keys)(r)){const i=e.scaleName(t,!0),a=r[t];n[t]=new p.ScaleComponent(i,a);for(const n of e.children){const e=n.component.scales[t];e&&(n.renameScale(e.get("name"),i),e.merged=!0)}}return n}(e)}const b=(0,f.tieBreakByComparing)(((e,t)=>(0,s.scaleTypePrecedence)(e)-(0,s.scaleTypePrecedence)(t)))},70585:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bins:()=>E,interpolate:()=>S,nice:()=>_,padding:()=>A,paddingInner:()=>C,paddingOuter:()=>T,parseNonUnitScaleProperty:()=>x,parseScaleProperty:()=>v,parseScaleRange:()=>w,reverse:()=>k,scaleRules:()=>b,zero:()=>R});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(20032),l=n(98348),u=n(20916),c=n(31179),d=n(79989),f=n(5711),p=n(89153),h=n(7302),g=n(77547),m=n(96159),y=n(76387);function v(e,t){(0,h.isUnitModel)(e)?function(e,t){const n=e.component.scales,{config:r,encoding:i,markDef:f,specifiedScales:p}=e;for(const h of(0,d.keys)(n)){const g=p[h],m=n[h],y=e.getScaleComponent(h),v=(0,o.getFieldOrDatumDef)(i[h]),w=g[t],x=y.get("type"),E=y.get("padding"),S=y.get("paddingInner"),_=(0,c.scaleTypeSupportProperty)(x,t),A=(0,c.channelScalePropertyIncompatability)(h,t);if(void 0!==w&&(_?A&&u.warn(A):u.warn(u.message.scalePropertyNotWorkWithScaleType(x,t,h))),_&&void 0===A)if(void 0!==w){const e=v.timeUnit,n=v.type;switch(t){case"domainMax":case"domainMin":(0,s.isDateTime)(g[t])||"temporal"===n||e?m.set(t,{signal:(0,o.valueExpr)(g[t],{type:n,timeUnit:e})},!0):m.set(t,g[t],!0);break;default:m.copyKeyFromObject(t,g)}}else{const n=d.hasProperty(b,t)?b[t]({model:e,channel:h,fieldOrDatumDef:v,scaleType:x,scalePadding:E,scalePaddingInner:S,domain:g.domain,domainMin:g.domainMin,domainMax:g.domainMax,markDef:f,config:r,hasNestedOffsetScale:(0,l.channelHasNestedOffsetScale)(i,h),hasSecondaryRangeChannel:!!i[(0,a.getSecondaryRangeChannel)(h)]}):r.scale[t];void 0!==n&&m.set(t,n,!1)}}}(e,t):x(e,t)}const b={bins:({model:e,fieldOrDatumDef:t})=>(0,o.isFieldDef)(t)?E(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>S(e,t.type),nice:({scaleType:e,channel:t,domain:n,domainMin:r,domainMax:i,fieldOrDatumDef:a})=>_(e,t,n,r,i,a),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:r,config:i})=>A(e,t,i.scale,n,r,i.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,scaleType:r,config:i,hasNestedOffsetScale:a})=>C(e,t,n.type,r,i.scale,a),paddingOuter:({scalePadding:e,channel:t,scaleType:n,scalePaddingInner:r,config:i,hasNestedOffsetScale:a})=>T(e,t,n,r,i.scale,a),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:r})=>k(t,(0,o.isFieldDef)(e)?e.sort:void 0,n,r.scale),zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:r,scaleType:i,config:a,hasSecondaryRangeChannel:o})=>R(e,t,n,r,i,a.scale,o)};function w(e){(0,h.isUnitModel)(e)?(0,y.parseUnitScaleRange)(e):x(e,"range")}function x(e,t){const n=e.component.scales;for(const n of e.children)"range"===t?w(n):v(n,t);for(const r of(0,d.keys)(n)){let i;for(const n of e.children){const e=n.component.scales[r];if(e){const n=e.getWithExplicit(t);i=(0,m.mergeValuesWithExplicit)(i,n,t,"scale",(0,m.tieBreakByComparing)(((e,n)=>"range"===t&&e.step&&n.step?e.step-n.step:0)))}}n[r].setWithExplicit(t,i)}}function E(e,t){const n=t.bin;if((0,i.isBinning)(n)){const r=(0,p.getBinSignalName)(e,t.field,n);return new g.SignalRefWrapper((()=>e.getSignalName(r)))}if((0,i.isBinned)(n)&&(0,i.isBinParams)(n)&&void 0!==n.step)return{step:n.step}}function S(e,t){if((0,d.contains)([a.COLOR,a.FILL,a.STROKE],e)&&"nominal"!==t)return"hcl"}function _(e,t,n,i,s,l){if(!((0,o.getFieldDef)(l)?.bin||(0,r.isArray)(n)||null!=s||null!=i||d.contains([c.ScaleType.TIME,c.ScaleType.UTC],e)))return!!(0,a.isXorY)(t)||void 0}function A(e,t,n,r,i,s){if((0,a.isXorY)(e)){if((0,c.isContinuousToContinuous)(t)){if(void 0!==n.continuousPadding)return n.continuousPadding;const{type:t,orient:a}=i;if("bar"===t&&(!(0,o.isFieldDef)(r)||!r.bin&&!r.timeUnit)&&("vertical"===a&&"x"===e||"horizontal"===a&&"y"===e))return s.continuousBandSize}if(t===c.ScaleType.POINT)return n.pointPadding}}function C(e,t,n,r,i,o=!1){if(void 0===e){if((0,a.isXorY)(t)){const{bandPaddingInner:e,barBandPaddingInner:t,rectBandPaddingInner:r,tickBandPaddingInner:a,bandWithNestedOffsetPaddingInner:s}=i;return o?s:(0,d.getFirstDefined)(e,"bar"===n?t:"tick"===n?a:r)}return(0,a.isXorYOffset)(t)&&r===c.ScaleType.BAND?i.offsetBandPaddingInner:void 0}}function T(e,t,n,r,i,o=!1){if(void 0===e)if((0,a.isXorY)(t)){const{bandPaddingOuter:e,bandWithNestedOffsetPaddingOuter:t}=i;if(o)return t;if(n===c.ScaleType.BAND)return(0,d.getFirstDefined)(e,(0,f.isSignalRef)(r)?{signal:`${r.signal}/2`}:r/2)}else if((0,a.isXorYOffset)(t)){if(n===c.ScaleType.POINT)return.5;if(n===c.ScaleType.BAND)return i.offsetBandPaddingOuter}}function k(e,t,n,r){return"x"===n&&void 0!==r.xReverse?(0,c.hasContinuousDomain)(e)&&"descending"===t?(0,f.isSignalRef)(r.xReverse)?{signal:`!${r.xReverse.signal}`}:!r.xReverse:r.xReverse:!(!(0,c.hasContinuousDomain)(e)||"descending"!==t)||void 0}function R(e,t,n,i,s,l,u){if(n&&"unaggregated"!==n&&(0,c.hasContinuousDomain)(s)){if((0,r.isArray)(n)){const e=n[0],t=n[n.length-1];if((0,r.isNumber)(e)&&e<=0&&(0,r.isNumber)(t)&&t>=0)return!0}return!1}if("size"===e&&"quantitative"===t.type&&!(0,c.isContinuousToDiscrete)(s))return!0;if((!(0,o.isFieldDef)(t)||!t.bin)&&d.contains([...a.POSITION_SCALE_CHANNELS,...a.POLAR_POSITION_SCALE_CHANNELS],e)){const{orient:t,type:n}=i;return(!(0,d.contains)(["bar","area","line","trail"],n)||!("horizontal"===t&&"y"===e||"vertical"===t&&"x"===e))&&(!(!(0,d.contains)(["bar","area"],n)||u)||l?.zero)}return!1}},76387:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MAX_SIZE_RANGE_STEP_RATIO:()=>N,RANGE_PROPERTIES:()=>E,defaultContinuousToDiscreteCount:()=>D,interpolateRange:()=>O,parseRangeForChannel:()=>A,parseUnitScaleRange:()=>S});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(24007),l=n(89081),u=n(98348),c=n(20916),d=n(31179),f=n(89820),p=n(99273),h=n(79989),g=n(5711),m=n(15058),y=n(89153),v=n(77547),b=n(96159),w=n(96598),x=n(7302);const E=["range","scheme"];function S(e){const t=e.component.scales;for(const n of a.SCALE_CHANNELS){const r=t[n];if(!r)continue;const i=A(n,e);r.setWithExplicit("range",i)}}function _(e,t){const n=e.fieldDef(t);if(n?.bin){const{bin:o,field:s}=n,l=(0,a.getSizeChannel)(t),u=e.getName(l);if((0,r.isObject)(o)&&o.binned&&void 0!==o.step)return new v.SignalRefWrapper((()=>{const n=e.scaleName(t),r=`(domain("${n}")[1] - domain("${n}")[0]) / ${o.step}`;return`${e.getSignalName(u)} / (${r})`}));if((0,i.isBinning)(o)){const t=(0,y.getBinSignalName)(e,s,o);return new v.SignalRefWrapper((()=>{const n=e.getSignalName(t),r=`(${n}.stop - ${n}.start) / ${n}.step`;return`${e.getSignalName(u)} / (${r})`}))}}}function A(e,t){const n=t.specifiedScales[e],{size:i}=t,s=t.getScaleComponent(e).get("type");for(const i of E)if(void 0!==n[i]){const o=(0,d.scaleTypeSupportProperty)(s,i),f=(0,d.channelScalePropertyIncompatability)(e,i);if(o)if(f)c.warn(f);else switch(i){case"range":{const i=n.range;if((0,r.isArray)(i)){if((0,a.isXorY)(e))return(0,b.makeExplicit)(i.map((e=>{if("width"===e||"height"===e){const n=t.getName(e),r=t.getSignalName.bind(t);return v.SignalRefWrapper.fromName(r,n)}return e})))}else if((0,r.isObject)(i))return(0,b.makeExplicit)({data:t.requestDataName(l.DataSourceType.Main),field:i.field,sort:{op:"min",field:t.vgField(e)}});return(0,b.makeExplicit)(i)}case"scheme":return(0,b.makeExplicit)((u=n[i],(0,d.isExtendedScheme)(u)?{scheme:u.name,...h.omit(u,["name"])}:{scheme:u}))}else c.warn(c.message.scalePropertyNotWorkWithScaleType(s,i,e))}var u;const p=e===a.X||"xOffset"===e?"width":"height",m=i[p];if((0,f.isStep)(m))if((0,a.isXorY)(e))if((0,d.hasDiscreteDomain)(s)){const n=T(m,t,e);if(n)return(0,b.makeExplicit)({step:n})}else c.warn(c.message.stepDropped(p));else if((0,a.isXorYOffset)(e)){const n=e===a.XOFFSET?"x":"y";if("band"===t.getScaleComponent(n).get("type")){const e=k(m,s);if(e)return(0,b.makeExplicit)(e)}}const{rangeMin:y,rangeMax:S}=n,A=function(e,t){const{size:n,config:i,mark:s,encoding:l}=t,{type:u}=(0,o.getFieldOrDatumDef)(l[e]),p=t.getScaleComponent(e).get("type"),{domain:m,domainMid:y}=t.specifiedScales[e];switch(e){case a.X:case a.Y:if(h.contains(["point","band"],p)){const r=R(e,n,i.view);if((0,f.isStep)(r))return{step:T(r,t,e)}}return C(e,t,p);case a.XOFFSET:case a.YOFFSET:return function(e,t,n){const r=e===a.XOFFSET?"x":"y",i=t.getScaleComponent(r);if(!i)return C(r,t,n,{center:!0});const s=i.get("type"),l=t.scaleName(r),{markDef:u,config:c}=t;if("band"===s){const e=R(r,t.size,t.config.view);if((0,f.isStep)(e)){const t=k(e,n);if(t)return t}return[0,{signal:`bandwidth('${l}')`}]}{const n=t.encoding[r];if((0,o.isFieldDef)(n)&&n.timeUnit){const e=(0,w.durationExpr)(n.timeUnit,(e=>`scale('${l}', ${e})`)),r=t.config.scale.bandWithNestedOffsetPaddingInner,i=(0,o.getBandPosition)({fieldDef:n,markDef:u,config:c})-.5,a=0!==i?` + ${i}`:"";return r?[{signal:`${(0,g.isSignalRef)(r)?`${r.signal}/2`+a:`${r/2+i}`} * (${e})`},{signal:`${(0,g.isSignalRef)(r)?`(1 - ${r.signal}/2)`+a:`${1-r/2+i}`} * (${e})`}]:[0,{signal:e}]}return h.never(`Cannot use ${e} scale if ${r} scale is not discrete.`)}}(e,t,p);case a.SIZE:{const a=function(e,t){switch(e){case"bar":case"tick":return t.scale.minBandSize;case"line":case"trail":case"rule":return t.scale.minStrokeWidth;case"text":return t.scale.minFontSize;case"point":case"square":case"circle":return t.scale.minSize}throw new Error(c.message.incompatibleChannel("size",e))}(s,i),o=function(e,t,n,i){const a={x:_(n,"x"),y:_(n,"y")};switch(e){case"bar":case"tick":{if(void 0!==i.scale.maxBandSize)return i.scale.maxBandSize;const e=F(t,a,i.view);return(0,r.isNumber)(e)?e-1:new v.SignalRefWrapper((()=>`${e.signal} - 1`))}case"line":case"trail":case"rule":return i.scale.maxStrokeWidth;case"text":return i.scale.maxFontSize;case"point":case"square":case"circle":{if(i.scale.maxSize)return i.scale.maxSize;const e=F(t,a,i.view);return(0,r.isNumber)(e)?Math.pow(N*e,2):new v.SignalRefWrapper((()=>`pow(${N} * ${e.signal}, 2)`))}}throw new Error(c.message.incompatibleChannel("size",e))}(s,n,t,i);return(0,d.isContinuousToDiscrete)(p)?O(a,o,D(p,i,m,e)):[a,o]}case a.THETA:return[0,2*Math.PI];case a.ANGLE:return[0,360];case a.RADIUS:return[0,new v.SignalRefWrapper((()=>`min(${t.getSignalName((0,x.isFacetModel)(t.parent)?"child_width":"width")},${t.getSignalName((0,x.isFacetModel)(t.parent)?"child_height":"height")})/2`))];case a.STROKEWIDTH:return[i.scale.minStrokeWidth,i.scale.maxStrokeWidth];case a.STROKEDASH:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case a.SHAPE:return"symbol";case a.COLOR:case a.FILL:case a.STROKE:return"ordinal"===p?"nominal"===u?"category":"ordinal":void 0!==y?"diverging":"rect"===s||"geoshape"===s?"heatmap":"ramp";case a.OPACITY:case a.FILLOPACITY:case a.STROKEOPACITY:return[i.scale.minOpacity,i.scale.maxOpacity]}}(e,t);return(void 0!==y||void 0!==S)&&(0,d.scaleTypeSupportProperty)(s,"rangeMin")&&(0,r.isArray)(A)&&2===A.length?(0,b.makeExplicit)([y??A[0],S??A[1]]):(0,b.makeImplicit)(A)}function C(e,t,n,{center:r}={}){const i=(0,a.getSizeChannel)(e),o=t.getName(i),s=t.getSignalName.bind(t);return e===a.Y&&(0,d.hasContinuousDomain)(n)?r?[v.SignalRefWrapper.fromName((e=>`${s(e)}/2`),o),v.SignalRefWrapper.fromName((e=>`-${s(e)}/2`),o)]:[v.SignalRefWrapper.fromName(s,o),0]:r?[v.SignalRefWrapper.fromName((e=>`-${s(e)}/2`),o),v.SignalRefWrapper.fromName((e=>`${s(e)}/2`),o)]:[0,v.SignalRefWrapper.fromName(s,o)]}function T(e,t,n){const{encoding:r}=t,i=t.getScaleComponent(n),s=(0,a.getOffsetScaleChannel)(n),l=r[s];if("offset"===(0,f.getStepFor)({step:e,offsetIsDiscrete:(0,o.isFieldOrDatumDef)(l)&&(0,p.isDiscrete)(l.type)})&&(0,u.channelHasFieldOrDatum)(r,s)){const n=t.getScaleComponent(s);let r=`domain('${t.scaleName(s)}').length`;"band"===n.get("type")&&(r=`bandspace(${r}, ${n.get("paddingInner")??n.get("padding")??0}, ${n.get("paddingOuter")??n.get("padding")??0})`);const a=i.get("paddingInner")??i.get("padding");return{signal:`${e.step} * ${r} / (1-${(0,m.exprFromSignalRefOrValue)(a)})`}}return e.step}function k(e,t){if("offset"===(0,f.getStepFor)({step:e,offsetIsDiscrete:(0,d.hasDiscreteDomain)(t)}))return{step:e.step}}function R(e,t,n){const r=e===a.X?"width":"height";return t[r]||(0,s.getViewConfigDiscreteSize)(n,r)}function D(e,t,n,i){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return void 0!==n&&(0,r.isArray)(n)?n.length+1:(c.warn(c.message.domainRequiredForThresholdScale(i)),3)}}function O(e,t,n){const r=()=>{const r=(0,m.signalOrStringValue)(t),i=(0,m.signalOrStringValue)(e),a=`(${r} - ${i}) / (${n} - 1)`;return`sequence(${i}, ${r} + ${a}, ${a})`};return(0,g.isSignalRef)(t)?new v.SignalRefWrapper(r):{signal:r()}}const N=.95;function F(e,t,n){const r=(0,f.isStep)(e.width)?e.width.step:(0,s.getViewConfigDiscreteStep)(n,"width"),i=(0,f.isStep)(e.height)?e.height.step:(0,s.getViewConfigDiscreteStep)(n,"height");return t.x||t.y?new v.SignalRefWrapper((()=>`min(${[t.x?t.x.signal:r,t.y?t.y.signal:i].join(", ")})`)):Math.min(r,i)}},78540:(e,t,n)=>{"use strict";n.r(t),n.d(t,{scaleType:()=>d});var r=n(19664),i=n(95290),a=n(79543),o=n(20916),s=n(75028),l=n(31179),u=n(96598),c=n(79989);function d(e,t,n,d,f=!1){const p=function(e,t,n,l){switch(t.type){case"nominal":case"ordinal":{if((0,i.isColorChannel)(e)||"discrete"===(0,i.rangeType)(e))return"shape"===e&&"ordinal"===t.type&&o.warn(o.message.discreteChannelCannotEncode(e,"ordinal")),"ordinal";if((0,i.isXorY)(e)||(0,i.isXorYOffset)(e)){if(c.contains(["rect","bar","image","rule","tick"],n.type))return"band";if(l)return"band"}else if("arc"===n.type&&e in i.POLAR_POSITION_SCALE_CHANNEL_INDEX)return"band";const r=n[(0,i.getSizeChannel)(e)];return(0,s.isRelativeBandSize)(r)||(0,a.isPositionFieldOrDatumDef)(t)&&t.axis?.tickBand?"band":"point"}case"temporal":return(0,i.isColorChannel)(e)?"time":"discrete"===(0,i.rangeType)(e)?(o.warn(o.message.discreteChannelCannotEncode(e,"temporal")),"ordinal"):(0,a.isFieldDef)(t)&&t.timeUnit&&(0,u.normalizeTimeUnit)(t.timeUnit).utc?"utc":"time";case"quantitative":return(0,i.isColorChannel)(e)?(0,a.isFieldDef)(t)&&(0,r.isBinning)(t.bin)?"bin-ordinal":"linear":"discrete"===(0,i.rangeType)(e)?(o.warn(o.message.discreteChannelCannotEncode(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(o.message.invalidFieldType(t.type))}(t,n,d,f),{type:h}=e;return(0,i.isScaleChannel)(t)?void 0!==h?(0,l.channelSupportScaleType)(t,h)?(0,a.isFieldDef)(n)&&!(0,l.scaleTypeSupportDataType)(h,n.type)?(o.warn(o.message.scaleTypeNotWorkWithFieldDef(h,p)),p):h:(o.warn(o.message.scaleTypeNotWorkWithChannel(t,h,p)),p):p:null}},52128:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleFacetSignals:()=>g,assembleInit:()=>p,assembleLayerSelectionMarks:()=>b,assembleProjection:()=>f,assembleSelectionScaleDomain:()=>w,assembleTopLevelSignals:()=>m,assembleUnitSelectionData:()=>y,assembleUnitSelectionMarks:()=>v,assembleUnitSelectionSignals:()=>h});var r=n(45948),i=n(26372),a=n(93794),o=n(20032),s=n(31179),l=n(84847),u=n(79989),c=n(7302),d=n(83937);function f(e){const{signals:t,hasLegend:n,index:r,...i}=e;return i.field=(0,u.replacePathInField)(i.field),i}function p(e,t=!0,n=i.identity){if((0,i.isArray)(e)){const r=e.map((e=>p(e,t,n)));return t?`[${r.join(", ")}]`:r}return(0,o.isDateTime)(e)?n(t?(0,o.dateTimeToExpr)(e):(0,o.dateTimeToTimestamp)(e)):t?n((0,u.stringify)(e)):e}function h(e,t){for(const n of(0,u.vals)(e.component.selection??{})){const r=n.name;let o=`${r}${a.TUPLE}, ${"global"===n.resolve?"true":`{unit: ${(0,a.unitName)(e)}}`}`;for(const r of a.selectionCompilers)r.defined(n)&&(r.signals&&(t=r.signals(e,n,t)),r.modifyExpr&&(o=r.modifyExpr(e,n,o)));t.push({name:r+a.MODIFY,on:[{events:{signal:n.name+a.TUPLE},update:`modify(${(0,i.stringValue)(n.name+a.STORE)}, ${o})`}]})}return x(t)}function g(e,t){if(e.component.selection&&(0,u.keys)(e.component.selection).length){const n=(0,i.stringValue)(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:(0,r.parseSelector)("pointermove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return x(t)}function m(e,t){let n=!1;for(const r of(0,u.vals)(e.component.selection??{})){const o=r.name,s=(0,i.stringValue)(o+a.STORE);if(0===t.filter((e=>e.name===o)).length){const e="global"===r.resolve?"union":r.resolve,n="point"===r.type?", true, true)":")";t.push({name:r.name,update:`${a.VL_SELECTION_RESOLVE}(${s}, ${(0,i.stringValue)(e)}${n}`})}n=!0;for(const n of a.selectionCompilers)n.defined(r)&&n.topLevelSignals&&(t=n.topLevelSignals(e,r,t))}return n&&0===t.filter((e=>"unit"===e.name)).length&&t.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]}),x(t)}function y(e,t){const n=[...t],r=(0,a.unitName)(e,{escape:!1});for(const t of(0,u.vals)(e.component.selection??{})){const e={name:t.name+a.STORE};if(t.project.hasSelectionId&&(e.transform=[{type:"collect",sort:{field:l.SELECTION_ID}}]),t.init){const n=t.project.items.map(f);e.values=t.project.hasSelectionId?t.init.map((e=>({unit:r,[l.SELECTION_ID]:p(e,!1)[0]}))):t.init.map((e=>({unit:r,fields:n,values:p(e,!1)})))}n.filter((e=>e.name===t.name+a.STORE)).length||n.push(e)}return n}function v(e,t){for(const n of(0,u.vals)(e.component.selection??{}))for(const r of a.selectionCompilers)r.defined(n)&&r.marks&&(t=r.marks(e,n,t));return t}function b(e,t){for(const n of e.children)(0,c.isUnitModel)(n)&&(t=v(n,t));return t}function w(e,t,n,r){const a=(0,d.parseSelectionExtent)(e,t.param,t);return{signal:(0,s.hasContinuousDomain)(n.get("type"))&&(0,i.isArray)(r)&&r[0]>r[1]?`isValid(${a}) && reverse(${a})`:a}}function x(e){return e.map((e=>(e.on&&!e.on.length&&delete e.on,e)))}},75163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(45948),i=n(26372),a=n(93794),o=n(79989),s=n(53177),l=n(72164);const u={defined:e=>void 0!==e.clear&&!1!==e.clear,parse:(e,t)=>{t.clear&&(t.clear=(0,i.isString)(t.clear)?(0,r.parseSelector)(t.clear,"view"):t.clear)},topLevelSignals:(e,t,n)=>{if(s.default.defined(t))for(const e of t.project.items){const r=n.findIndex((n=>n.name===(0,o.varName)(`${t.name}_${e.field}`)));-1!==r&&n[r].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function r(e,r){-1!==e&&n[e].on&&n[e].on.push({events:t.clear,update:r})}if("interval"===t.type)for(const e of t.project.items){const t=n.findIndex((t=>t.name===e.signals.visual));r(t,"[0, 0]"),-1===t&&r(n.findIndex((t=>t.name===e.signals.data)),"null")}else{let e=n.findIndex((e=>e.name===t.name+a.TUPLE));r(e,"null"),l.default.defined(t)&&(e=n.findIndex((e=>e.name===t.name+l.TOGGLE)),r(e,"false"))}return n}}},93794:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MODIFY:()=>x,SELECTION_DOMAIN:()=>E,STORE:()=>b,TUPLE:()=>w,VL_SELECTION_RESOLVE:()=>S,disableDirectManipulation:()=>T,requiresSelectionId:()=>C,selectionCompilers:()=>_,unitName:()=>A});var r=n(77390),i=n(26372),a=n(95290),o=n(79989),s=n(7302),l=n(56133),u=n(34960),c=n(75163),d=n(53177),f=n(16108),p=n(95967),h=n(70439),g=n(46608),m=n(72164),y=n(65800),v=n(62539);const b="_store",w="_tuple",x="_modify",E="_selection_domain_",S="vlSelectionResolve",_=[u.default,l.default,p.default,m.default,d.default,h.default,g.default,c.default,y.default,v.default,f.default];function A(e,{escape:t}={escape:!0}){let n=t?(0,i.stringValue)(e.name):e.name;const r=function(e){let t=e.parent;for(;t&&!(0,s.isFacetModel)(t);)t=t.parent;return t}(e);if(r){const{facet:e}=r;for(const t of a.FACET_CHANNELS)e[t]&&(n+=` + '__facet_${t}_' + (facet[${(0,i.stringValue)(r.vgField(t))}])`)}return n}function C(e){return(0,o.vals)(e.component.selection??{}).reduce(((e,t)=>e||t.project.hasSelectionId),!1)}function T(e,t){!(0,r.isString)(t.select)&&t.select.on||delete e.events,!(0,r.isString)(t.select)&&t.select.clear||delete e.clear,!(0,r.isString)(t.select)&&t.select.toggle||delete e.toggle}},53177:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(26372),i=n(93794),a=n(79989),o=n(52128),s=n(16108),l=n(95967),u=n(84847);const c={defined:e=>"point"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind&&!(0,u.isLegendBinding)(e.bind),parse:(e,t,n)=>(0,i.disableDirectManipulation)(t,n),topLevelSignals:(e,t,n)=>{const i=t.name,l=t.project,u=t.bind,c=t.init&&t.init[0],d=s.default.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return l.items.forEach(((e,s)=>{const l=(0,a.varName)(`${i}_${e.field}`);n.filter((e=>e.name===l)).length||n.unshift({name:l,...c?{init:(0,o.assembleInit)(c[s])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${d}[${(0,r.stringValue)(e.field)}] : null`}]:[],bind:u[e.field]??u[e.channel]??u})})),n},signals:(e,t,n)=>{const r=t.name,o=t.project,s=n.find((e=>e.name===r+i.TUPLE)),u=r+l.TUPLE_FIELDS,c=o.items.map((e=>(0,a.varName)(`${r}_${e.field}`))),d=c.map((e=>`${e} !== null`)).join(" && ");return c.length&&(s.update=`${d} ? {fields: ${u}, values: [${c.join(", ")}]} : null`),delete s.value,delete s.on,n}},d=c},56133:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BRUSH:()=>g,GEO_INIT_TICK:()=>y,SCALE_TRIGGER:()=>m,default:()=>b});var r=n(77390),i=n(26372),a=n(93794),o=n(95290),s=n(20916),l=n(31179),u=n(84847),c=n(79989),d=n(7302),f=n(52128),p=n(95967),h=n(70439);const g="_brush",m="_scale_trigger",y="geo_interval_init_tick",v="_init",b={defined:e=>"interval"===e.type,parse:(e,t,n)=>{var a;if(e.hasProjection){const e={...(0,r.isObject)(n.select)?n.select:{}};e.fields=[u.SELECTION_ID],e.encodings||(e.encodings=n.value?(0,c.keys)(n.value):[o.LONGITUDE,o.LATITUDE]),n.select={type:"interval",...e}}if(t.translate&&!h.default.defined(t)){const e=`!event.item || event.item.mark.name !== ${(0,i.stringValue)(t.name+g)}`;for(const n of t.events){if(!n.between){(0,s.warn)(`${n} is not an ordered event stream for interval selections.`);continue}const t=(0,i.array)((a=n.between[0]).filter??(a.filter=[]));t.includes(e)||t.push(e)}}},signals:(e,t,n)=>{const r=t.name,s=r+a.TUPLE,u=(0,c.vals)(t.project.hasChannel).filter((e=>e.channel===o.X||e.channel===o.Y)),d=t.init?t.init[0]:null;if(n.push(...u.reduce(((n,r)=>n.concat(function(e,t,n,r){const a=!e.hasProjection,s=n.channel,u=n.signals.visual,c=(0,i.stringValue)(a?e.scaleName(s):e.projectionName()),d=e=>`scale(${c}, ${e})`,p=e.getSizeSignalRef(s===o.X?"width":"height").signal,g=`${s}(unit)`,y=t.events.reduce(((e,t)=>[...e,{events:t.between[0],update:`[${g}, ${g}]`},{events:t,update:`[${u}[0], clamp(${g}, 0, ${p})]`}]),[]);if(a){const i=n.signals.data,a=h.default.defined(t),o=e.getScaleComponent(s),p=o?o.get("type"):void 0,g=r?{init:(0,f.assembleInit)(r,!0,d)}:{value:[]};return y.push({events:{signal:t.name+m},update:(0,l.hasContinuousDomain)(p)?`[${d(`${i}[0]`)}, ${d(`${i}[1]`)}]`:"[0, 0]"}),a?[{name:i,on:[]}]:[{name:u,...g,on:y},{name:i,...r?{init:(0,f.assembleInit)(r)}:{},on:[{events:{signal:u},update:`${u}[0] === ${u}[1] ? null : invert(${c}, ${u})`}]}]}{const e=s===o.X?0:1,n=t.name+v;return[{name:u,...r?{init:`[${n}[0][${e}], ${n}[1][${e}]]`}:{value:[]},on:y}]}}(e,t,r,d&&d[r.index]))),[])),e.hasProjection){const o=(0,i.stringValue)(e.projectionName()),l=e.projectionName()+"_center",{x:c,y:f}=t.project.hasChannel,p=c&&c.signals.visual,h=f&&f.signals.visual,g=c?d&&d[c.index]:`${l}[0]`,m=f?d&&d[f.index]:`${l}[1]`,b=t=>e.getSizeSignalRef(t).signal,w=`[[${p?p+"[0]":"0"}, ${h?h+"[0]":"0"}],[${p?p+"[1]":b("width")}, ${h?h+"[1]":b("height")}]]`;!d||(n.unshift({name:r+v,init:`[scale(${o}, [${c?g[0]:g}, ${f?m[0]:m}]), scale(${o}, [${c?g[1]:g}, ${f?m[1]:m}])]`}),c&&f)||n.find((e=>e.name===l))||n.unshift({name:l,update:`invert(${o}, [${b("width")}/2, ${b("height")}/2])`});const x=`vlSelectionTuples(intersect(${w}, {markname: ${(0,i.stringValue)(e.getName("marks"))}}, unit.mark), {unit: ${(0,a.unitName)(e)}})`,E=u.map((e=>e.signals.visual));return n.concat({name:s,on:[{events:[...E.length?[{signal:E.join(" || ")}]:[],...d?[{signal:y}]:[]],update:x}]})}{if(!h.default.defined(t)){const t=r+m,a=u.map((t=>{const n=t.channel,{data:r,visual:a}=t.signals,o=(0,i.stringValue)(e.scaleName(n)),s=e.getScaleComponent(n).get("type"),u=(0,l.hasContinuousDomain)(s)?"+":"";return`(!isArray(${r}) || (${u}invert(${o}, ${a})[0] === ${u}${r}[0] && ${u}invert(${o}, ${a})[1] === ${u}${r}[1]))`}));a.length&&n.push({name:t,value:{},on:[{events:u.map((t=>({scale:e.scaleName(t.channel)}))),update:a.join(" && ")+` ? ${t} : {}`}]})}const o=u.map((e=>e.signals.data)),c=`unit: ${(0,a.unitName)(e)}, fields: ${r+p.TUPLE_FIELDS}, values`;return n.concat({name:s,...d?{init:`{${c}: ${(0,f.assembleInit)(d)}}`}:{},...o.length?{on:[{events:[{signal:o.join(" || ")}],update:`${o.join(" && ")} ? {${c}: [${o}]} : null`}]}:{}})}},topLevelSignals:(e,t,n)=>((0,d.isUnitModel)(e)&&e.hasProjection&&t.init&&(n.filter((e=>e.name===y)).length||n.unshift({name:y,value:null,on:[{events:"timer{1}",update:`${y} === null ? {} : ${y}`}]})),n),marks:(e,t,n)=>{const r=t.name,{x:o,y:s}=t.project.hasChannel,l=o?.signals.visual,u=s?.signals.visual,d=`data(${(0,i.stringValue)(t.name+a.STORE)})`;if(h.default.defined(t)||!o&&!s)return n;const f={x:void 0!==o?{signal:`${l}[0]`}:{value:0},y:void 0!==s?{signal:`${u}[0]`}:{value:0},x2:void 0!==o?{signal:`${l}[1]`}:{field:{group:"width"}},y2:void 0!==s?{signal:`${u}[1]`}:{field:{group:"height"}}};if("global"===t.resolve)for(const t of(0,c.keys)(f))f[t]=[{test:`${d}.length && ${d}[0].unit === ${(0,a.unitName)(e)}`,...f[t]},{value:0}];const{fill:p,fillOpacity:m,cursor:y,...v}=t.mark,b=(0,c.keys)(v).reduce(((e,t)=>(e[t]=[{test:[void 0!==o&&`${l}[0] !== ${l}[1]`,void 0!==s&&`${u}[0] !== ${u}[1]`].filter((e=>e)).join(" && "),value:v[t]},{value:null}],e)),{}),w=y??(t.translate?"move":null);return[{name:`${r+g}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:p},fillOpacity:{value:m}},update:f}},...n,{name:r+g,type:"rect",clip:!0,encode:{enter:{...w?{cursor:{value:w}}:{},fill:{value:"transparent"}},update:{...f,...b}}}]}}},46608:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p,parseInteractiveLegend:()=>h});var r=n(77390),i=n(45948),a=n(26372),o=n(93794),s=n(20916),l=n(84847),u=n(79989),c=n(95967),d=n(72164);const f={defined:e=>{const t="global"===e.resolve&&e.bind&&(0,l.isLegendBinding)(e.bind),n=1===e.project.items.length&&e.project.items[0].field!==l.SELECTION_ID;return t&&!n&&s.warn(s.message.LEGEND_BINDINGS_MUST_HAVE_PROJECTION),t&&n},parse:(e,t,n)=>{const s=(0,u.duplicate)(n);if(s.select=(0,a.isString)(s.select)?{type:s.select,toggle:t.toggle}:{...s.select,toggle:t.toggle},(0,o.disableDirectManipulation)(t,s),(0,r.isObject)(n.select)&&(n.select.on||n.select.clear)){const e='event.item && indexof(event.item.mark.role, "legend") < 0';for(const n of t.events)n.filter=(0,a.array)(n.filter??[]),n.filter.includes(e)||n.filter.push(e)}const c=(0,l.isLegendStreamBinding)(t.bind)?t.bind.legend:"click",d=(0,a.isString)(c)?(0,i.parseSelector)(c,"view"):(0,a.array)(c);t.bind={legend:{merge:d}}},topLevelSignals:(e,t,n)=>{const r=t.name,i=(0,l.isLegendStreamBinding)(t.bind)&&t.bind.legend,a=e=>t=>{const n=(0,u.duplicate)(t);return n.markname=e,n};for(const e of t.project.items){if(!e.hasLegend)continue;const o=`${(0,u.varName)(e.field)}_legend`,s=`${r}_${o}`;if(0===n.filter((e=>e.name===s)).length){const e=i.merge.map(a(`${o}_symbols`)).concat(i.merge.map(a(`${o}_labels`))).concat(i.merge.map(a(`${o}_entries`)));n.unshift({name:s,...t.init?{}:{value:null},on:[{events:e,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:i.merge,update:`!event.item || !datum ? null : ${s}`,force:!0}]})}}return n},signals:(e,t,n)=>{const r=t.name,i=t.project,a=n.find((e=>e.name===r+o.TUPLE)),s=r+c.TUPLE_FIELDS,f=i.items.filter((e=>e.hasLegend)).map((e=>(0,u.varName)(`${r}_${(0,u.varName)(e.field)}_legend`))),p=`${f.map((e=>`${e} !== null`)).join(" && ")} ? {fields: ${s}, values: [${f.join(", ")}]} : null`;t.events&&f.length>0?a.on.push({events:f.map((e=>({signal:e}))),update:p}):f.length>0&&(a.update=p,delete a.value,delete a.on);const h=n.find((e=>e.name===r+d.TOGGLE)),g=(0,l.isLegendStreamBinding)(t.bind)&&t.bind.legend;return h&&(t.events?h.on.push({...h.on[0],events:g}):h.on[0].events=g),n}},p=f;function h(e,t,n){const r=e.fieldDef(t)?.field;for(const i of(0,u.vals)(e.component.selection??{})){const e=i.project.hasField[r]??i.project.hasChannel[t];if(e&&f.defined(i)){const t=n.get("selections")??[];t.push(i.name),n.set("selections",t,!1),e.hasLegend=!0}}}},16108:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(20916),i=n(75028),a=n(55792);const o="voronoi",s={defined:e=>"point"===e.type&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(o)},marks:(e,t,n)=>{const{x:s,y:l}=t.project.hasChannel,u=e.mark;if((0,i.isPathMark)(u))return r.warn(r.message.nearestNotSupportForContinuous(u)),n;const c={name:e.getName(o),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...(0,a.tooltip)(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:s||!l?"datum.datum.x || 0":"0"},y:{expr:l||!s?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let d=0,f=!1;return n.forEach(((t,n)=>{const r=t.name??"";r===e.component.mark[0].name?d=n:r.includes(o)&&(f=!0)})),f||n.splice(d+1,0,c),n}},l=s},83937:(e,t,n)=>{"use strict";n.r(t),n.d(t,{materializeSelections:()=>h,parseSelectionExtent:()=>p,parseSelectionPredicate:()=>f,parseUnitSelection:()=>d});var r=n(45948),i=n(26372),a=n(93794),o=n(20916),s=n(79989),l=n(74686),u=n(68860),c=n(89081);function d(e,t){const n={},o=e.config.selection;if(!t||!t.length)return n;for(const l of t){const t=(0,s.varName)(l.name),u=l.select,c=(0,i.isString)(u)?u:u.type,d=(0,i.isObject)(u)?(0,s.duplicate)(u):{type:c},f=o[c];for(const e in f)"fields"!==e&&"encodings"!==e&&("mark"===e&&(d.mark={...f.mark,...d.mark}),void 0!==d[e]&&!0!==d[e]||(d[e]=(0,s.duplicate)(f[e]??d[e])));const p=n[t]={...d,name:t,type:c,init:l.value,bind:l.bind,events:(0,i.isString)(d.on)?(0,r.parseSelector)(d.on,"scope"):(0,i.array)((0,s.duplicate)(d.on))},h=(0,s.duplicate)(l);for(const t of a.selectionCompilers)t.defined(p)&&t.parse&&t.parse(e,p,h)}return n}function f(e,t,n,r="datum"){const o=(0,i.isString)(t)?t:t.param,l=(0,s.varName)(o),u=(0,i.stringValue)(l+a.STORE);let c;try{c=e.getSelectionComponent(l,o)}catch(e){return`!!${l}`}if(c.project.timeUnit){const t=n??e.component.data.raw,r=c.project.timeUnit.clone();t.parent?r.insertAsParentOf(t):t.parent=r}const d=`${c.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest("}${u}, ${r}${"global"===c.resolve?")":`, ${(0,i.stringValue)(c.resolve)})`}`,f=`length(data(${u}))`;return!1===t.empty?`${f} && ${d}`:`!${f} || ${d}`}function p(e,t,n){const r=(0,s.varName)(t),a=n.encoding;let l,u=n.field;try{l=e.getSelectionComponent(r,t)}catch(e){return r}if(a||u){if(a&&!u){const e=l.project.items.filter((e=>e.channel===a));!e.length||e.length>1?(u=l.project.items[0].field,(0,o.warn)((e.length?"Multiple ":"No ")+`matching ${(0,i.stringValue)(a)} encoding found for selection ${(0,i.stringValue)(n.param)}. `+`Using "field": ${(0,i.stringValue)(u)}.`)):u=e[0].field}}else u=l.project.items[0].field,l.project.items.length>1&&(0,o.warn)(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${(0,i.stringValue)(u)}.`);return`${l.name}[${(0,i.stringValue)((0,s.replacePathInField)(u))}]`}function h(e,t){for(const[n,r]of(0,s.entries)(e.component.selection??{})){const i=e.getName(`lookup_${n}`);e.component.data.outputNodes[i]=r.materialized=new l.OutputNode(new u.FilterNode(t,e,{param:n}),i,c.DataSourceType.Lookup,e.component.data.outputNodeRefCounts)}}},34960:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(26372),i=n(93794),a=n(84847),o=n(79989),s=n(56133),l=n(95967);const u={defined:e=>"point"===e.type,signals:(e,t,n)=>{const u=t.name,c=u+l.TUPLE_FIELDS,d=t.project,f="(item().isVoronoi ? datum.datum : datum)",p=(0,o.vals)(e.component.selection??{}).reduce(((e,t)=>"interval"===t.type?e.concat(t.name+s.BRUSH):e),[]).map((e=>`indexof(item().mark.name, '${e}') < 0`)).join(" && "),h="datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0"+(p?` && ${p}`:"");let g=`unit: ${(0,i.unitName)(e)}, `;t.project.hasSelectionId?g+=`${a.SELECTION_ID}: ${f}[${(0,r.stringValue)(a.SELECTION_ID)}]`:g+=`fields: ${c}, values: [${d.items.map((t=>{const n=e.fieldDef(t.channel);return n?.bin?`[${f}[${(0,r.stringValue)(e.vgField(t.channel,{}))}], ${f}[${(0,r.stringValue)(e.vgField(t.channel,{binSuffix:"end"}))}]]`:`${f}[${(0,r.stringValue)(t.field)}]`})).join(", ")}]`;const m=t.events;return n.concat([{name:u+i.TUPLE,on:m?[{events:m,update:`${h} ? {${g}} : null`,force:!0}]:[]}])}}},95967:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SelectionProjectionComponent:()=>p,TUPLE_FIELDS:()=>f,default:()=>h});var r=n(26372),i=n(95290),a=n(20916),o=n(31179),s=n(84847),l=n(79989),u=n(62277),c=n(52128),d=n(96598);const f="_tuple_fields";class p{constructor(...e){this.items=e,this.hasChannel={},this.hasField={},this.hasSelectionId=!1}}const h={defined:()=>!0,parse:(e,t,n)=>{const c=t.name,f=t.project??(t.project=new p),h={},g={},m=new Set,y=(e,t)=>{const n="visual"===t?e.channel:e.field;let r=(0,l.varName)(`${c}_${n}`);for(let e=1;m.has(r);e++)r=(0,l.varName)(`${c}_${n}_${e}`);return m.add(r),{[t]:r}},v=t.type,b=e.config.selection[v],w=void 0!==n.value?(0,r.array)(n.value):null;let{fields:x,encodings:E}=(0,r.isObject)(n.select)?n.select:{};if(!x&&!E&&w)for(const e of w)if((0,r.isObject)(e))for(const t of(0,l.keys)(e))(0,i.isSingleDefUnitChannel)(t)?(E||(E=[])).push(t):"interval"===v?(a.warn(a.message.INTERVAL_INITIALIZED_WITH_POS),E=b.encodings):(x??(x=[])).push(t);x||E||(E=b.encodings,"fields"in b&&(x=b.fields));for(const t of E??[]){const n=e.fieldDef(t);if(n){let r=n.field;if(n.aggregate){a.warn(a.message.cannotProjectAggregate(t,n.aggregate));continue}if(!r){a.warn(a.message.cannotProjectOnChannelWithoutField(t));continue}if(n.timeUnit&&!(0,d.isBinnedTimeUnit)(n.timeUnit)){r=e.vgField(t);const i={timeUnit:n.timeUnit,as:r,field:n.field};g[(0,l.hash)(i)]=i}if(!h[r]){const a={field:r,channel:t,type:"interval"===v&&(0,i.isScaleChannel)(t)&&(0,o.hasContinuousDomain)(e.getScaleComponent(t).get("type"))?"R":n.bin?"R-RE":"E",index:f.items.length};a.signals={...y(a,"data"),...y(a,"visual")},f.items.push(h[r]=a),f.hasField[r]=h[r],f.hasSelectionId=f.hasSelectionId||r===s.SELECTION_ID,(0,i.isGeoPositionChannel)(t)?(a.geoChannel=t,a.channel=(0,i.getPositionChannelFromLatLong)(t),f.hasChannel[a.channel]=h[r]):f.hasChannel[t]=h[r]}}else a.warn(a.message.cannotProjectOnChannelWithoutField(t))}for(const e of x??[]){if(f.hasField[e])continue;const t={type:"E",field:e,index:f.items.length};t.signals={...y(t,"data")},f.items.push(t),f.hasField[e]=t,f.hasSelectionId=f.hasSelectionId||e===s.SELECTION_ID}w&&(t.init=w.map((e=>f.items.map((t=>(0,r.isObject)(e)?void 0!==e[t.geoChannel||t.channel]?e[t.geoChannel||t.channel]:e[t.field]:e))))),(0,l.isEmpty)(g)||(f.timeUnit=new u.TimeUnitNode(null,g))},signals:(e,t,n)=>{const r=t.name+f;return n.filter((e=>e.name===r)).length>0||t.project.hasSelectionId?n:n.concat({name:r,value:t.project.items.map(c.assembleProjection)})}}},70439:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c,domain:()=>d});var r=n(26372),i=n(93794),a=n(95290),o=n(20916),s=n(31179),l=n(7302),u=n(79989);const c={defined:e=>"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind,parse:(e,t)=>{const n=t.scales=[];for(const r of t.project.items){const i=r.channel;if(!(0,a.isScaleChannel)(i))continue;const l=e.getScaleComponent(i),u=l?l.get("type"):void 0;"sequential"==u&&o.warn(o.message.SEQUENTIAL_SCALE_DEPRECATED),l&&(0,s.hasContinuousDomain)(u)?(l.set("selectionExtent",{param:t.name,field:r.field},!0),n.push(r)):o.warn(o.message.SCALE_BINDINGS_CONTINUOUS)}},topLevelSignals:(e,t,n)=>{const a=t.scales.filter((e=>0===n.filter((t=>t.name===e.signals.data)).length));if(!e.parent||f(e)||0===a.length)return n;const o=n.find((e=>e.name===t.name));let s=o.update;if(s.includes(i.VL_SELECTION_RESOLVE))o.update=`{${a.map((e=>`${(0,r.stringValue)((0,u.replacePathInField)(e.field))}: ${e.signals.data}`)).join(", ")}}`;else{for(const e of a){const t=`${(0,r.stringValue)((0,u.replacePathInField)(e.field))}: ${e.signals.data}`;s.includes(t)||(s=`${s.substring(0,s.length-1)}, ${t}}`)}o.update=s}return n.concat(a.map((e=>({name:e.signals.data}))))},signals:(e,t,n)=>{if(e.parent&&!f(e))for(const e of t.scales){const t=n.find((t=>t.name===e.signals.data));t.push="outer",delete t.value,delete t.update}return n}};function d(e,t){return`domain(${(0,r.stringValue)(e.scaleName(t))})`}function f(e){return e.parent&&(0,l.isLayerModel)(e.parent)&&(!e.parent.parent??f(e.parent.parent))}},72164:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TOGGLE:()=>i,default:()=>a});var r=n(93794);const i="_toggle",a={defined:e=>"point"===e.type&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+i,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+r.TUPLE,a=t.name+i;return`${a} ? null : ${n}, `+("global"===t.resolve?`${a} ? null : true, `:`${a} ? null : {unit: ${(0,r.unitName)(e)}}, `)+`${a} ? ${n} : null`}}},65800:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(45948),i=n(95290),a=n(56133),o=n(70439);const s="_translate_anchor",l="_translate_delta",u={defined:e=>"interval"===e.type&&e.translate,signals:(e,t,n)=>{const u=t.name,d=o.default.defined(t),f=u+s,{x:p,y:h}=t.project.hasChannel;let g=(0,r.parseSelector)(t.translate,"scope");return d||(g=g.map((e=>(e.between[0].markname=u+a.BRUSH,e)))),n.push({name:f,value:{},on:[{events:g.map((e=>e.between[0])),update:"{x: x(unit), y: y(unit)"+(void 0!==p?`, extent_x: ${d?(0,o.domain)(e,i.X):`slice(${p.signals.visual})`}`:"")+(void 0!==h?`, extent_y: ${d?(0,o.domain)(e,i.Y):`slice(${h.signals.visual})`}`:"")+"}"}]},{name:u+l,value:{},on:[{events:g,update:`{x: ${f}.x - x(unit), y: ${f}.y - y(unit)}`}]}),void 0!==p&&c(e,t,p,"width",n),void 0!==h&&c(e,t,h,"height",n),n}};function c(e,t,n,r,a){const u=t.name,c=u+s,d=u+l,f=n.channel,p=o.default.defined(t),h=a.find((e=>e.name===n.signals[p?"data":"visual"])),g=e.getSizeSignalRef(r).signal,m=e.getScaleComponent(f),y=m&&m.get("type"),v=m&&m.get("reverse"),b=p?f===i.X?v?"":"-":v?"-":"":"",w=`${c}.extent_${f}`,x=`${p&&m?"log"===y?"panLog":"symlog"===y?"panSymlog":"pow"===y?"panPow":"panLinear":"panLinear"}(${w}, ${b}${d}.${f} / ${p?`${g}`:`span(${w})`}${p?"pow"===y?`, ${m.get("exponent")??1}`:"symlog"===y?`, ${m.get("constant")??1}`:"":""})`;h.on.push({events:{signal:d},update:p?x:`clampRange(${x}, 0, ${g})`})}},62539:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(45948),i=n(26372),a=n(95290),o=n(56133),s=n(70439);const l="_zoom_anchor",u="_zoom_delta",c={defined:e=>"interval"===e.type&&e.zoom,signals:(e,t,n)=>{const c=t.name,f=s.default.defined(t),p=c+u,{x:h,y:g}=t.project.hasChannel,m=(0,i.stringValue)(e.scaleName(a.X)),y=(0,i.stringValue)(e.scaleName(a.Y));let v=(0,r.parseSelector)(t.zoom,"scope");return f||(v=v.map((e=>(e.markname=c+o.BRUSH,e)))),n.push({name:c+l,on:[{events:v,update:f?"{"+[m?`x: invert(${m}, x(unit))`:"",y?`y: invert(${y}, y(unit))`:""].filter((e=>e)).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:p,on:[{events:v,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==h&&d(e,t,h,"width",n),void 0!==g&&d(e,t,g,"height",n),n}};function d(e,t,n,r,i){const a=t.name,o=n.channel,c=s.default.defined(t),d=i.find((e=>e.name===n.signals[c?"data":"visual"])),f=e.getSizeSignalRef(r).signal,p=e.getScaleComponent(o),h=p&&p.get("type"),g=c?(0,s.domain)(e,o):d.name,m=a+u,y=`${c&&p?"log"===h?"zoomLog":"symlog"===h?"zoomSymlog":"pow"===h?"zoomPow":"zoomLinear":"zoomLinear"}(${g}, ${a}${l}.${o}, ${m}${c?"pow"===h?`, ${p.get("exponent")??1}`:"symlog"===h?`, ${p.get("constant")??1}`:"":""})`;d.on.push({events:{signal:m},update:c?y:`clampRange(${y}, 0, ${f})`})}},77547:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SignalRefWrapper:()=>r});class r{constructor(e){Object.defineProperty(this,"signal",{enumerable:!0,get:e})}static fromName(e,t){return new r((()=>e(t)))}}},96159:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Split:()=>a,defaultTieBreaker:()=>u,makeExplicit:()=>o,makeImplicit:()=>s,mergeValuesWithExplicit:()=>c,tieBreakByComparing:()=>l});var r=n(20916),i=n(79989);class a{constructor(e={},t={}){this.explicit=e,this.implicit=t}clone(){return new a((0,i.duplicate)(this.explicit),(0,i.duplicate)(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(e){return(0,i.getFirstDefined)(this.explicit[e],this.implicit[e])}getWithExplicit(e){return void 0!==this.explicit[e]?{explicit:!0,value:this.explicit[e]}:void 0!==this.implicit[e]?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}setWithExplicit(e,{value:t,explicit:n}){void 0!==t&&this.set(e,t,n)}set(e,t,n){return delete this[n?"implicit":"explicit"][e],this[n?"explicit":"implicit"][e]=t,this}copyKeyFromSplit(e,{explicit:t,implicit:n}){void 0!==t[e]?this.set(e,t[e],!0):void 0!==n[e]&&this.set(e,n[e],!1)}copyKeyFromObject(e,t){void 0!==t[e]&&this.set(e,t[e],!0)}copyAll(e){for(const t of(0,i.keys)(e.combine())){const n=e.getWithExplicit(t);this.setWithExplicit(t,n)}}}function o(e){return{explicit:!0,value:e}}function s(e){return{explicit:!1,value:e}}function l(e){return(t,n,r,i)=>{const a=e(t.value,n.value);return a>0?t:a<0?n:u(t,n,r,i)}}function u(e,t,n,i){return e.explicit&&t.explicit&&r.warn(r.message.mergeConflictingProperty(n,i,e.value,t.value)),e}function c(e,t,n,r,a=u){return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:(0,i.deepEqual)(e.value,t.value)?e:a(e,t,n,r)}},92649:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnitModel:()=>T});var r=n(26372),i=n(65032),a=n(95290),o=n(79543),s=n(89081),l=n(98348),u=n(3802),c=n(75028),d=n(84847),f=n(89820),p=n(68889),h=n(79989),g=n(5593),m=n(32134),y=n(15058),v=n(80219),b=n(6871),w=n(81693),x=n(27588),E=n(55823),S=n(60288),_=n(7302),A=n(52128),C=n(83937);class T extends _.ModelWithField{constructor(e,t,n,r={},i){super(e,"unit",t,n,i,void 0,(0,f.isFrameMixins)(e)?e.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const a=(0,c.isMarkDef)(e.mark)?{...e.mark}:{type:e.mark},o=a.type;void 0===a.filled&&(a.filled=(0,E.defaultFilled)(a,i,{graticule:e.data&&(0,s.isGraticuleGenerator)(e.data)}));const u=this.encoding=(0,l.initEncoding)(e.encoding||{},o,a.filled,i);this.markDef=(0,E.initMarkdef)(a,u,i),this.size=(0,w.initLayoutSize)({encoding:u,size:(0,f.isFrameMixins)(e)?{...r,...e.width?{width:e.width}:{},...e.height?{height:e.height}:{}}:r}),this.stack=(0,p.stack)(this.markDef,u),this.specifiedScales=this.initScales(o,u),this.specifiedAxes=this.initAxes(u),this.specifiedLegends=this.initLegends(u),this.specifiedProjection=e.projection,this.selection=(e.params??[]).filter((e=>(0,d.isSelectionParameter)(e)))}get hasProjection(){const{encoding:e}=this,t=this.mark===c.GEOSHAPE,n=e&&a.GEOPOSITION_CHANNELS.some((t=>(0,o.isFieldOrDatumDef)(e[t])));return t||n}scaleDomain(e){const t=this.specifiedScales[e];return t?t.domain:void 0}axis(e){return this.specifiedAxes[e]}legend(e){return this.specifiedLegends[e]}initScales(e,t){return a.SCALE_CHANNELS.reduce(((e,n)=>{const r=(0,o.getFieldOrDatumDef)(t[n]);return r&&(e[n]=this.initScale(r.scale??{})),e}),{})}initScale(e){const{domain:t,range:n}=e,i=(0,u.replaceExprRef)(e);return(0,r.isArray)(t)&&(i.domain=t.map(y.signalRefOrValue)),(0,r.isArray)(n)&&(i.range=n.map(y.signalRefOrValue)),i}initAxes(e){return a.POSITION_SCALE_CHANNELS.reduce(((t,n)=>{const r=e[n];if((0,o.isFieldOrDatumDef)(r)||n===a.X&&(0,o.isFieldOrDatumDef)(e.x2)||n===a.Y&&(0,o.isFieldOrDatumDef)(e.y2)){const e=(0,o.isFieldOrDatumDef)(r)?r.axis:void 0;t[n]=e?this.initAxis({...e}):e}return t}),{})}initAxis(e){const t=(0,h.keys)(e),n={};for(const r of t){const t=e[r];n[r]=(0,i.isConditionalAxisValue)(t)?(0,y.signalOrValueRefWithCondition)(t):(0,y.signalRefOrValue)(t)}return n}initLegends(e){return a.NONPOSITION_SCALE_CHANNELS.reduce(((t,n)=>{const r=(0,o.getFieldOrDatumDef)(e[n]);if(r&&(0,a.supportLegend)(n)){const e=r.legend;t[n]=e?(0,u.replaceExprRef)(e):e}return t}),{})}parseData(){this.component.data=(0,v.parseData)(this)}parseLayoutSize(){(0,x.parseUnitLayoutSize)(this)}parseSelections(){this.component.selection=(0,C.parseUnitSelection)(this,this.selection)}parseMarkGroup(){this.component.mark=(0,S.parseMarkGroups)(this)}parseAxesAndHeaders(){this.component.axes=(0,m.parseUnitAxes)(this)}assembleSelectionTopLevelSignals(e){return(0,A.assembleTopLevelSignals)(this,e)}assembleSignals(){return[...(0,g.assembleAxisSignals)(this),...(0,A.assembleUnitSelectionSignals)(this,[])]}assembleSelectionData(e){return(0,A.assembleUnitSelectionData)(this,e)}assembleLayout(){return null}assembleLayoutSignals(){return(0,b.assembleLayoutSignals)(this)}assembleMarks(){let e=this.component.mark??[];return this.parent&&(0,_.isLayerModel)(this.parent)||(e=(0,A.assembleUnitSelectionMarks)(this,e)),e.map(this.correctDataNames)}assembleGroupStyle(){const{style:e}=this.view||{};return void 0!==e?e:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(e){return l.channelHasField(this.encoding,e)}fieldDef(e){const t=this.encoding[e];return(0,o.getFieldDef)(t)}typedFieldDef(e){const t=this.fieldDef(e);return(0,o.isTypedFieldDef)(t)?t:null}}},88655:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CompositeMarkNormalizer:()=>a});var r=n(75028),i=n(68859);class a{constructor(e,t){this.name=e,this.run=t}hasMatchingType(e){return!!(0,i.isUnitSpec)(e)&&(0,r.getMarkType)(e.mark)===this.name}}},67982:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BOXPLOT:()=>d,BOXPLOT_PARTS:()=>f,boxPlotNormalizer:()=>p,getBoxPlotType:()=>h,normalizeBoxPlot:()=>g});var r=n(26372),i=n(15058),a=n(98348),o=n(20916),s=n(75028),l=n(79989),u=n(88655),c=n(867);const d="boxplot",f=["box","median","outliers","rule","ticks"],p=new u.CompositeMarkNormalizer(d,g);function h(e){return(0,r.isNumber)(e)?"tukey":e}function g(e,{config:t}){e={...e,encoding:(0,a.normalizeEncoding)(e.encoding,t)};const{mark:n,encoding:u,params:f,projection:p,...g}=e,y=(0,s.isMarkDef)(n)?n:{type:n};f&&o.warn(o.message.selectionNotSupported("boxplot"));const v=y.extent??t.boxplot.extent,b=(0,i.getMarkPropOrConfig)("size",y,t),w=y.invalid,x=h(v),{bins:E,timeUnits:S,transform:_,continuousAxisChannelDef:A,continuousAxis:C,groupby:T,aggregate:k,encodingWithoutContinuousAxis:R,ticksOrient:D,boxOrient:O,customTooltipWithoutAggregatedField:N}=function(e,t,n){const r=(0,c.compositeMarkOrient)(e,d),{continuousAxisChannelDef:i,continuousAxis:o}=(0,c.compositeMarkContinuousAxis)(e,r,d),s=i.field,u=(0,l.removePathFromField)(s),f=h(t),p=[...m(s),{op:"median",field:s,as:`mid_box_${u}`},{op:"min",field:s,as:("min-max"===f?"lower_whisker_":"min_")+u},{op:"max",field:s,as:("min-max"===f?"upper_whisker_":"max_")+u}],g="min-max"===f||"tukey"===f?[]:[{calculate:`datum["upper_box_${u}"] - datum["lower_box_${u}"]`,as:`iqr_${u}`},{calculate:`min(datum["upper_box_${u}"] + datum["iqr_${u}"] * ${t}, datum["max_${u}"])`,as:`upper_whisker_${u}`},{calculate:`max(datum["lower_box_${u}"] - datum["iqr_${u}"] * ${t}, datum["min_${u}"])`,as:`lower_whisker_${u}`}],{[o]:y,...v}=e.encoding,{customTooltipWithoutAggregatedField:b,filteredEncoding:w}=(0,c.filterTooltipWithAggregatedField)(v),{bins:x,timeUnits:E,aggregate:S,groupby:_,encoding:A}=(0,a.extractTransformsFromEncoding)(w,n),C="vertical"===r?"horizontal":"vertical",T=r;return{bins:x,timeUnits:E,transform:[...x,...E,{aggregate:[...S,...p],groupby:_},...g],groupby:_,aggregate:S,continuousAxisChannelDef:i,continuousAxis:o,encodingWithoutContinuousAxis:A,ticksOrient:C,boxOrient:T,customTooltipWithoutAggregatedField:b}}(e,v,t),F=(0,l.removePathFromField)(A.field),{color:P,size:M,...I}=R,$=e=>(0,c.makeCompositeAggregatePartFactory)(y,C,A,e,t.boxplot),L=$(I),B=$(R),U=((0,r.isObject)(t.boxplot.box)?t.boxplot.box.color:t.mark.color)||"#4c78a8",z=$({...I,...M?{size:M}:{},color:{condition:{test:`datum['lower_box_${A.field}'] >= datum['upper_box_${A.field}']`,...P||{value:U}}}}),q=(0,c.getCompositeMarkTooltip)([{fieldPrefix:"min-max"===x?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===x?"lower_whisker_":"min_",titlePrefix:"Min"}],A,R),j={type:"tick",color:"black",opacity:1,orient:D,invalid:w,aria:!1},H="min-max"===x?q:(0,c.getCompositeMarkTooltip)([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],A,R),G=[...L({partName:"rule",mark:{type:"rule",invalid:w,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:H}),...L({partName:"rule",mark:{type:"rule",invalid:w,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:H}),...L({partName:"ticks",mark:j,positionPrefix:"lower_whisker",extraEncoding:H}),...L({partName:"ticks",mark:j,positionPrefix:"upper_whisker",extraEncoding:H})],V=[..."tukey"!==x?G:[],...B({partName:"box",mark:{type:"bar",...b?{size:b}:{},orient:O,invalid:w,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:q}),...z({partName:"median",mark:{type:"tick",invalid:w,...(0,r.isObject)(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...b?{size:b}:{},orient:D,aria:!1},positionPrefix:"mid_box",extraEncoding:q})];if("min-max"===x)return{...g,transform:(g.transform??[]).concat(_),layer:V};const W=`datum["lower_box_${A.field}"]`,Y=`datum["upper_box_${A.field}"]`,X=`(${Y} - ${W})`,K=`${W} - ${v} * ${X}`,J=`${Y} + ${v} * ${X}`,Q=`datum["${A.field}"]`,Z={joinaggregate:m(A.field),groupby:T},ee={transform:[{filter:`(${K} <= ${Q}) && (${Q} <= ${J})`},{aggregate:[{op:"min",field:A.field,as:`lower_whisker_${F}`},{op:"max",field:A.field,as:`upper_whisker_${F}`},{op:"min",field:`lower_box_${A.field}`,as:`lower_box_${F}`},{op:"max",field:`upper_box_${A.field}`,as:`upper_box_${F}`},...k],groupby:T}],layer:G},{tooltip:te,...ne}=I,{scale:re,axis:ie}=A,ae=(0,c.getTitle)(A),oe=(0,l.omit)(ie,["title"]),se=(0,c.partLayerMixins)(y,"outliers",t.boxplot,{transform:[{filter:`(${Q} < ${K}) || (${Q} > ${J})`}],mark:"point",encoding:{[C]:{field:A.field,type:A.type,...void 0!==ae?{title:ae}:{},...void 0!==re?{scale:re}:{},...(0,l.isEmpty)(oe)?{}:{axis:oe}},...ne,...P?{color:P}:{},...N?{tooltip:N}:{}}})[0];let le;const ue=[...E,...S,Z];return se?le={transform:ue,layer:[se,ee]}:(le=ee,le.transform.unshift(...ue)),{...g,layer:[le,{transform:_,layer:V}]}}function m(e){const t=(0,l.removePathFromField)(e);return[{op:"q1",field:e,as:`lower_box_${t}`},{op:"q3",field:e,as:`upper_box_${t}`}]}},867:(e,t,n)=>{"use strict";n.r(t),n.d(t,{compositeMarkContinuousAxis:()=>g,compositeMarkOrient:()=>y,filterTooltipWithAggregatedField:()=>c,getCompositeMarkTooltip:()=>d,getTitle:()=>f,makeCompositeAggregatePartFactory:()=>p,partLayerMixins:()=>h});var r=n(26372),i=n(79543),a=n(98348),o=n(20916),s=n(75028),l=n(79989),u=n(5711);function c(e){const{tooltip:t,...n}=e;if(!t)return{filteredEncoding:n};let i,a;if((0,r.isArray)(t)){for(const e of t)e.aggregate?(i||(i=[]),i.push(e)):(a||(a=[]),a.push(e));i&&(n.tooltip=i)}else t.aggregate?n.tooltip=t:a=t;return(0,r.isArray)(a)&&1===a.length&&(a=a[0]),{customTooltipWithoutAggregatedField:a,filteredEncoding:n}}function d(e,t,n,r=!0){if("tooltip"in n)return{tooltip:n.tooltip};const o=e.map((({fieldPrefix:e,titlePrefix:n})=>{const i=r?` of ${f(t)}`:"";return{field:e+t.field,type:t.type,title:(0,u.isSignalRef)(n)?{signal:`${n}"${escape(i)}"`}:n+i}})),s=(0,a.fieldDefs)(n).map(i.toStringFieldDef);return{tooltip:[...o,...(0,l.unique)(s,l.hash)]}}function f(e){const{title:t,field:n}=e;return(0,l.getFirstDefined)(t,n)}function p(e,t,n,i,a){const{scale:o,axis:s}=n;return({partName:l,mark:u,positionPrefix:c,endPositionPrefix:d,extraEncoding:p={}})=>{const g=f(n);return h(e,l,a,{mark:u,encoding:{[t]:{field:`${c}_${n.field}`,type:n.type,...void 0!==g?{title:g}:{},...void 0!==o?{scale:o}:{},...void 0!==s?{axis:s}:{}},...(0,r.isString)(d)?{[`${t}2`]:{field:`${d}_${n.field}`}}:{},...i,...p}})}}function h(e,t,n,i){const{clip:a,color:o,opacity:l}=e,u=e.type;return e[t]||void 0===e[t]&&n[t]?[{...i,mark:{...n[t],...a?{clip:a}:{},...o?{color:o}:{},...l?{opacity:l}:{},...(0,s.isMarkDef)(i.mark)?i.mark:{type:i.mark},style:`${u}-${String(t)}`,...(0,r.isBoolean)(e[t])?{}:e[t]}}]:[]}function g(e,t,n){const{encoding:r}=e,i="vertical"===t?"y":"x",a=r[i],o=r[`${i}2`],s=r[`${i}Error`],l=r[`${i}Error2`];return{continuousAxisChannelDef:m(a,n),continuousAxisChannelDef2:m(o,n),continuousAxisChannelDefError:m(s,n),continuousAxisChannelDefError2:m(l,n),continuousAxis:i}}function m(e,t){if(e?.aggregate){const{aggregate:n,...r}=e;return n!==t&&o.warn(o.message.errorBarContinuousAxisHasCustomizedAggregate(n,t)),r}return e}function y(e,t){const{mark:n,encoding:r}=e,{x:a,y:o}=r;if((0,s.isMarkDef)(n)&&n.orient)return n.orient;if((0,i.isContinuousFieldOrDatumDef)(a)){if((0,i.isContinuousFieldOrDatumDef)(o)){const e=(0,i.isFieldDef)(a)&&a.aggregate,n=(0,i.isFieldDef)(o)&&o.aggregate;if(e||n!==t){if(n||e!==t){if(e===t&&n===t)throw new Error("Both x and y cannot have aggregate");return(0,i.isFieldOrDatumDefForTimeFormat)(o)&&!(0,i.isFieldOrDatumDefForTimeFormat)(a)?"horizontal":"vertical"}return"horizontal"}return"vertical"}return"horizontal"}if((0,i.isContinuousFieldOrDatumDef)(o))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}},52365:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ERRORBAND:()=>l,ERRORBAND_PARTS:()=>u,errorBandNormalizer:()=>c,normalizeErrorBand:()=>d});var r=n(98348),i=n(20916),a=n(88655),o=n(867),s=n(55833);const l="errorband",u=["band","borders"],c=new a.CompositeMarkNormalizer(l,d);function d(e,{config:t}){e={...e,encoding:(0,r.normalizeEncoding)(e.encoding,t)};const{transform:n,continuousAxisChannelDef:a,continuousAxis:u,encodingWithoutContinuousAxis:c,markDef:d,outerSpec:f,tooltipEncoding:p}=(0,s.errorBarParams)(e,l,t),h=d,g=(0,o.makeCompositeAggregatePartFactory)(h,u,a,c,t.errorband),m=void 0!==e.encoding.x&&void 0!==e.encoding.y;let y={type:m?"area":"rect"},v={type:m?"line":"rule"};const b={...h.interpolate?{interpolate:h.interpolate}:{},...h.tension&&h.interpolate?{tension:h.tension}:{}};return m?(y={...y,...b,ariaRoleDescription:"errorband"},v={...v,...b,aria:!1}):h.interpolate?i.warn(i.message.errorBand1DNotSupport("interpolate")):h.tension&&i.warn(i.message.errorBand1DNotSupport("tension")),{...f,transform:n,layer:[...g({partName:"band",mark:y,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:p}),...g({partName:"borders",mark:v,positionPrefix:"lower",extraEncoding:p}),...g({partName:"borders",mark:v,positionPrefix:"upper",extraEncoding:p})]}}},55833:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ERRORBAR:()=>c,ERRORBAR_PARTS:()=>d,errorBarNormalizer:()=>f,errorBarParams:()=>h,normalizeErrorBar:()=>p});var r=n(79543),i=n(98348),a=n(20916),o=n(75028),s=n(79989),l=n(88655),u=n(867);const c="errorbar",d=["ticks","rule"],f=new l.CompositeMarkNormalizer(c,p);function p(e,{config:t}){e={...e,encoding:(0,i.normalizeEncoding)(e.encoding,t)};const{transform:n,continuousAxisChannelDef:r,continuousAxis:a,encodingWithoutContinuousAxis:o,ticksOrient:s,markDef:l,outerSpec:d,tooltipEncoding:f}=h(e,c,t);delete o.size;const p=(0,u.makeCompositeAggregatePartFactory)(l,a,r,o,t.errorbar),g=l.thickness,m=l.size,y={type:"tick",orient:s,aria:!1,...void 0!==g?{thickness:g}:{},...void 0!==m?{size:m}:{}},v=[...p({partName:"ticks",mark:y,positionPrefix:"lower",extraEncoding:f}),...p({partName:"ticks",mark:y,positionPrefix:"upper",extraEncoding:f}),...p({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...void 0!==g?{size:g}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:f})];return{...d,transform:n,...v.length>1?{layer:v}:{...v[0]}}}function h(e,t,n){const{mark:l,encoding:c,params:d,projection:f,...p}=e,h=(0,o.isMarkDef)(l)?l:{type:l};d&&a.warn(a.message.selectionNotSupported(t));const{orient:m,inputType:y}=function(e,t){const{encoding:n}=e;if(function(e){return((0,r.isFieldOrDatumDef)(e.x)||(0,r.isFieldOrDatumDef)(e.y))&&!(0,r.isFieldOrDatumDef)(e.x2)&&!(0,r.isFieldOrDatumDef)(e.y2)&&!(0,r.isFieldOrDatumDef)(e.xError)&&!(0,r.isFieldOrDatumDef)(e.xError2)&&!(0,r.isFieldOrDatumDef)(e.yError)&&!(0,r.isFieldOrDatumDef)(e.yError2)}(n))return{orient:(0,u.compositeMarkOrient)(e,t),inputType:"raw"};const i=function(e){return(0,r.isFieldOrDatumDef)(e.x2)||(0,r.isFieldOrDatumDef)(e.y2)}(n),a=function(e){return(0,r.isFieldOrDatumDef)(e.xError)||(0,r.isFieldOrDatumDef)(e.xError2)||(0,r.isFieldOrDatumDef)(e.yError)||(0,r.isFieldOrDatumDef)(e.yError2)}(n),o=n.x,s=n.y;if(i){if(a)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const e=n.x2,i=n.y2;if((0,r.isFieldOrDatumDef)(e)&&(0,r.isFieldOrDatumDef)(i))throw new Error(`${t} cannot have both x2 and y2`);if((0,r.isFieldOrDatumDef)(e)){if((0,r.isContinuousFieldOrDatumDef)(o))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}if((0,r.isFieldOrDatumDef)(i)){if((0,r.isContinuousFieldOrDatumDef)(s))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}{const e=n.xError,i=n.xError2,a=n.yError,l=n.yError2;if((0,r.isFieldOrDatumDef)(i)&&!(0,r.isFieldOrDatumDef)(e))throw new Error(`${t} cannot have xError2 without xError`);if((0,r.isFieldOrDatumDef)(l)&&!(0,r.isFieldOrDatumDef)(a))throw new Error(`${t} cannot have yError2 without yError`);if((0,r.isFieldOrDatumDef)(e)&&(0,r.isFieldOrDatumDef)(a))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if((0,r.isFieldOrDatumDef)(e)){if((0,r.isContinuousFieldOrDatumDef)(o))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if((0,r.isFieldOrDatumDef)(a)){if((0,r.isContinuousFieldOrDatumDef)(s))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}(e,t),{continuousAxisChannelDef:v,continuousAxisChannelDef2:b,continuousAxisChannelDefError:w,continuousAxisChannelDefError2:x,continuousAxis:E}=(0,u.compositeMarkContinuousAxis)(e,m,t),{errorBarSpecificAggregate:S,postAggregateCalculates:_,tooltipSummary:A,tooltipTitleWithFieldName:C}=function(e,t,n,i,o,l,u,c){let d=[],f=[];const p=t.field;let h,m=!1;if("raw"===l){const t=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":c.errorbar.center,n=e.extent?e.extent:"mean"===t?"stderr":"iqr";if("median"===t!=("iqr"===n)&&a.warn(a.message.errorBarCenterIsUsedWithWrongExtent(t,n,u)),"stderr"===n||"stdev"===n)d=[{op:n,field:p,as:`extent_${p}`},{op:t,field:p,as:`center_${p}`}],f=[{calculate:`datum["center_${p}"] + datum["extent_${p}"]`,as:`upper_${p}`},{calculate:`datum["center_${p}"] - datum["extent_${p}"]`,as:`lower_${p}`}],h=[{fieldPrefix:"center_",titlePrefix:(0,s.titleCase)(t)},{fieldPrefix:"upper_",titlePrefix:g(t,n,"+")},{fieldPrefix:"lower_",titlePrefix:g(t,n,"-")}],m=!0;else{let e,t,i;"ci"===n?(e="mean",t="ci0",i="ci1"):(e="median",t="q1",i="q3"),d=[{op:t,field:p,as:`lower_${p}`},{op:i,field:p,as:`upper_${p}`},{op:e,field:p,as:`center_${p}`}],h=[{fieldPrefix:"upper_",titlePrefix:(0,r.title)({field:p,aggregate:i,type:"quantitative"},c,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:(0,r.title)({field:p,aggregate:t,type:"quantitative"},c,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:(0,r.title)({field:p,aggregate:e,type:"quantitative"},c,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&a.warn(a.message.errorBarCenterAndExtentAreNotNeeded(e.center,e.extent)),"aggregated-upper-lower"===l?(h=[],f=[{calculate:`datum["${n.field}"]`,as:`upper_${p}`},{calculate:`datum["${p}"]`,as:`lower_${p}`}]):"aggregated-error"===l&&(h=[{fieldPrefix:"",titlePrefix:p}],f=[{calculate:`datum["${p}"] + datum["${i.field}"]`,as:`upper_${p}`}],o?f.push({calculate:`datum["${p}"] + datum["${o.field}"]`,as:`lower_${p}`}):f.push({calculate:`datum["${p}"] - datum["${i.field}"]`,as:`lower_${p}`}));for(const e of f)h.push({fieldPrefix:e.as.substring(0,6),titlePrefix:(0,s.replaceAll)((0,s.replaceAll)(e.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:f,errorBarSpecificAggregate:d,tooltipSummary:h,tooltipTitleWithFieldName:m}}(h,v,b,w,x,y,t,n),{[E]:T,["x"===E?"x2":"y2"]:k,["x"===E?"xError":"yError"]:R,["x"===E?"xError2":"yError2"]:D,...O}=c,{bins:N,timeUnits:F,aggregate:P,groupby:M,encoding:I}=(0,i.extractTransformsFromEncoding)(O,n),$=[...P,...S],L="raw"!==y?[]:M,B=(0,u.getCompositeMarkTooltip)(A,v,I,C);return{transform:[...p.transform??[],...N,...F,...0===$.length?[]:[{aggregate:$,groupby:L}],..._],groupby:L,continuousAxisChannelDef:v,continuousAxis:E,encodingWithoutContinuousAxis:I,ticksOrient:"vertical"===m?"horizontal":"vertical",markDef:h,outerSpec:p,tooltipEncoding:B}}function g(e,t,n){return`${(0,s.titleCase)(e)} ${n} ${t}`}},19760:(e,t,n)=>{"use strict";n.r(t),n.d(t,{add:()=>u,getAllCompositeMarks:()=>d,remove:()=>c});var r=n(79989),i=n(88655),a=n(67982),o=n(52365),s=n(55833);const l={};function u(e,t,n){const r=new i.CompositeMarkNormalizer(e,t);l[e]={normalizer:r,parts:n}}function c(e){delete l[e]}function d(){return(0,r.keys)(l)}u(a.BOXPLOT,a.normalizeBoxPlot,a.BOXPLOT_PARTS),u(s.ERRORBAR,s.normalizeErrorBar,s.ERRORBAR_PARTS),u(o.ERRORBAND,o.normalizeErrorBand,o.ERRORBAND_PARTS)},24007:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_COLOR:()=>T,DEFAULT_FONT_SIZE:()=>C,DEFAULT_STEP:()=>x,colorSignalConfig:()=>k,defaultConfig:()=>_,defaultViewConfig:()=>E,fontConfig:()=>D,fontSizeSignalConfig:()=>R,getViewConfigContinuousSize:()=>v,getViewConfigDiscreteSize:()=>w,getViewConfigDiscreteStep:()=>b,initConfig:()=>F,isVgScheme:()=>S,stripAndRedirectConfig:()=>$});var r=n(26372),i=n(65032),a=n(15058),o=n(19760),s=n(3802),l=n(19609),u=n(41028),c=n(54116),d=n(75028),f=n(54778),p=n(31179),h=n(84847),g=n(89820),m=n(76447),y=n(79989);function v(e,t){return e[t]??e["width"===t?"continuousWidth":"continuousHeight"]}function b(e,t){const n=w(e,t);return(0,g.isStep)(n)?n.step:x}function w(e,t){const n=e[t]??e["width"===t?"discreteWidth":"discreteHeight"];return(0,y.getFirstDefined)(n,{step:e.step})}const x=20,E={continuousWidth:200,continuousHeight:200,step:x};function S(e){return(0,y.hasProperty)(e,"scheme")}const _={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:E,mark:d.defaultMarkConfig,arc:{},area:{},bar:d.defaultBarConfig,circle:{},geoshape:{},image:{},line:{},point:{},rect:d.defaultRectConfig,rule:{color:"black"},square:{},text:{color:"black"},tick:d.defaultTickConfig,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:p.defaultScaleConfig,projection:{},legend:c.defaultLegendConfig,header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:h.defaultConfig,style:{},title:{},facet:{spacing:g.DEFAULT_SPACING},concat:{spacing:g.DEFAULT_SPACING},normalizedNumberFormat:".0%"},A=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],C={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},T={blue:A[0],orange:A[1],red:A[2],teal:A[3],green:A[4],yellow:A[5],purple:A[6],pink:A[7],brown:A[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function k(e={}){return{signals:[{name:"color",value:(0,r.isObject)(e)?{...T,...e}:T}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function R(e){return{signals:[{name:"fontSize",value:(0,r.isObject)(e)?{...C,...e}:C}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function D(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}function O(e){const t=(0,y.keys)(e||{}),n={};for(const r of t){const t=e[r];n[r]=(0,i.isConditionalAxisValue)(t)?(0,a.signalOrValueRefWithCondition)(t):(0,a.signalRefOrValue)(t)}return n}const N=[...d.MARK_CONFIGS,...i.AXIS_CONFIGS,...u.HEADER_CONFIGS,"background","padding","legend","lineBreak","scale","style","title","view"];function F(e={}){const{color:t,font:n,fontSize:o,selection:l,...c}=e,f=(0,r.mergeConfig)({},(0,y.duplicate)(_),n?D(n):{},t?k(t):{},o?R(o):{},c||{});l&&(0,r.writeConfig)(f,"selection",l,!0);const p=(0,y.omit)(f,N);for(const e of["background","lineBreak","padding"])f[e]&&(p[e]=(0,a.signalRefOrValue)(f[e]));for(const e of d.MARK_CONFIGS)f[e]&&(p[e]=(0,s.replaceExprRef)(f[e]));for(const e of i.AXIS_CONFIGS)f[e]&&(p[e]=O(f[e]));for(const e of u.HEADER_CONFIGS)f[e]&&(p[e]=(0,s.replaceExprRef)(f[e]));if(f.legend&&(p.legend=(0,s.replaceExprRef)(f.legend)),f.scale){const{invalid:e,...t}=f.scale,n=(0,s.replaceExprRef)(e,{level:1});p.scale={...(0,s.replaceExprRef)(t),...(0,y.keys)(n).length>0?{invalid:n}:{}}}return f.style&&(p.style=function(e){const t=(0,y.keys)(e),n={};for(const r of t)n[r]=O(e[r]);return n}(f.style)),f.title&&(p.title=(0,s.replaceExprRef)(f.title)),f.view&&(p.view=(0,s.replaceExprRef)(f.view)),p}const P=new Set(["view",...d.PRIMITIVE_MARKS]),M=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],I={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],...d.VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX};function $(e){e=(0,y.duplicate)(e);for(const t of M)delete e[t];if(e.axis)for(const t in e.axis)(0,i.isConditionalAxisValue)(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of l.VL_ONLY_LEGEND_CONFIG)delete e.legend[t];if(e.mark){for(const t of d.VL_ONLY_MARK_CONFIG_PROPERTIES)delete e.mark[t];e.mark.tooltip&&(0,r.isObject)(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat((0,f.assembleParameterSignals)(e.params)),delete e.params);for(const t of P){for(const n of d.VL_ONLY_MARK_CONFIG_PROPERTIES)delete e[t][n];const n=I[t];if(n)for(const r of n)delete e[t][r];L(e,t)}for(const t of(0,o.getAllCompositeMarks)())delete e[t];!function(e){const{titleMarkConfig:t,subtitleMarkConfig:n,subtitle:r}=(0,m.extractTitleConfig)(e.title);(0,y.isEmpty)(t)||(e.style["group-title"]={...e.style["group-title"],...t}),(0,y.isEmpty)(n)||(e.style["group-subtitle"]={...e.style["group-subtitle"],...n}),(0,y.isEmpty)(r)?delete e.title:e.title=r}(e);for(const t in e)(0,r.isObject)(e[t])&&(0,y.isEmpty)(e[t])&&delete e[t];return(0,y.isEmpty)(e)?void 0:e}function L(e,t,n,r){"view"===t&&(n="cell");const i={...r?e[t][r]:e[t],...e.style[n??t]};(0,y.isEmpty)(i)||(e.style[n??t]=i),r||delete e[t]}},89081:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DataSourceType:()=>r,isGenerator:()=>l,isGraticuleGenerator:()=>d,isInlineData:()=>o,isNamedData:()=>s,isSequenceGenerator:()=>u,isSphereGenerator:()=>c,isUrlData:()=>a});var r,i=n(79989);function a(e){return(0,i.hasProperty)(e,"url")}function o(e){return(0,i.hasProperty)(e,"values")}function s(e){return(0,i.hasProperty)(e,"name")&&!a(e)&&!o(e)&&!l(e)}function l(e){return e&&(u(e)||c(e)||d(e))}function u(e){return(0,i.hasProperty)(e,"sequence")}function c(e){return(0,i.hasProperty)(e,"sphere")}function d(e){return(0,i.hasProperty)(e,"graticule")}!function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup",e[e.PreFilterInvalid=5]="PreFilterInvalid",e[e.PostFilterInvalid=6]="PostFilterInvalid"}(r||(r={}))},20032:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DAYS:()=>c,MONTHS:()=>l,SHORT_DAYS:()=>d,SHORT_MONTHS:()=>u,dateTimeExprToExpr:()=>h,dateTimeToExpr:()=>p,dateTimeToTimestamp:()=>g,isDateTime:()=>s});var r=n(26372),i=n(20916),a=n(96598),o=n(79989);function s(e){if(e&&(0,r.isObject)(e))for(const t of a.TIMEUNIT_PARTS)if((0,o.hasProperty)(e,t))return!0;return!1}const l=["january","february","march","april","may","june","july","august","september","october","november","december"],u=l.map((e=>e.substr(0,3))),c=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],d=c.map((e=>e.substr(0,3)));function f(e,t){const n=[];if(t&&void 0!==e.day&&(0,o.keys)(e).length>1&&(i.warn(i.message.droppedDay(e)),delete(e=(0,o.duplicate)(e)).day),void 0!==e.year?n.push(e.year):n.push(2012),void 0!==e.month){const a=t?function(e){if((0,o.isNumeric)(e)&&(e=+e),(0,r.isNumber)(e))return e-1;{const t=e.toLowerCase(),n=l.indexOf(t);if(-1!==n)return n;const r=t.substr(0,3),a=u.indexOf(r);if(-1!==a)return a;throw new Error(i.message.invalidTimeUnit("month",e))}}(e.month):e.month;n.push(a)}else if(void 0!==e.quarter){const a=t?function(e){if((0,o.isNumeric)(e)&&(e=+e),(0,r.isNumber)(e))return e>4&&i.warn(i.message.invalidTimeUnit("quarter",e)),e-1;throw new Error(i.message.invalidTimeUnit("quarter",e))}(e.quarter):e.quarter;n.push((0,r.isNumber)(a)?3*a:`${a}*3`)}else n.push(0);if(void 0!==e.date)n.push(e.date);else if(void 0!==e.day){const a=t?function(e){if((0,o.isNumeric)(e)&&(e=+e),(0,r.isNumber)(e))return e%7;{const t=e.toLowerCase(),n=c.indexOf(t);if(-1!==n)return n;const r=t.substr(0,3),a=d.indexOf(r);if(-1!==a)return a;throw new Error(i.message.invalidTimeUnit("day",e))}}(e.day):e.day;n.push((0,r.isNumber)(a)?a+1:`${a}+1`)}else n.push(1);for(const t of["hours","minutes","seconds","milliseconds"]){const r=e[t];n.push(void 0===r?0:r)}return n}function p(e){const t=f(e,!0).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}function h(e){const t=f(e,!1).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}function g(e){const t=f(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}},98348:(e,t,n)=>{"use strict";n.r(t),n.d(t,{channelHasField:()=>p,channelHasFieldOrDatum:()=>h,channelHasNestedOffsetScale:()=>g,extractTransformsFromEncoding:()=>y,fieldDefs:()=>x,forEach:()=>E,initEncoding:()=>b,isAggregate:()=>m,markChannelCompatible:()=>v,normalizeEncoding:()=>w,pathGroupingFields:()=>_,reduce:()=>S});var r=n(26372),i=n(54814),a=n(19664),o=n(95290),s=n(79543),l=n(20916),u=n(99273),c=n(79989),d=n(5711),f=n(96598);function p(e,t){const n=e&&e[t];return!!n&&((0,r.isArray)(n)?(0,c.some)(n,(e=>!!e.field)):(0,s.isFieldDef)(n)||(0,s.hasConditionalFieldDef)(n))}function h(e,t){const n=e&&e[t];return!!n&&((0,r.isArray)(n)?(0,c.some)(n,(e=>!!e.field)):(0,s.isFieldDef)(n)||(0,s.isDatumDef)(n)||(0,s.hasConditionalFieldOrDatumDef)(n))}function g(e,t){if((0,o.isXorY)(t)){const n=e[t];if(((0,s.isFieldDef)(n)||(0,s.isDatumDef)(n))&&((0,u.isDiscrete)(n.type)||(0,s.isFieldDef)(n)&&n.timeUnit))return h(e,(0,o.getOffsetScaleChannel)(t))}return!1}function m(e){return(0,c.some)(o.CHANNELS,(t=>{if(p(e,t)){const n=e[t];if((0,r.isArray)(n))return(0,c.some)(n,(e=>!!e.aggregate));{const e=(0,s.getFieldDef)(n);return e&&!!e.aggregate}}return!1}))}function y(e,t){const n=[],r=[],l=[],c=[],d={};return E(e,((p,h)=>{if((0,s.isFieldDef)(p)){const{field:g,aggregate:m,bin:y,timeUnit:v,...b}=p;if(m||v||y){const e=(0,s.getGuide)(p),w=e?.title;let x=(0,s.vgField)(p,{forAs:!0});const E={...w?[]:{title:(0,s.title)(p,t,{allowDisabling:!0})},...b,field:x};if(m){let e;if((0,i.isArgmaxDef)(m)?(e="argmax",x=(0,s.vgField)({op:"argmax",field:m.argmax},{forAs:!0}),E.field=`${x}.${g}`):(0,i.isArgminDef)(m)?(e="argmin",x=(0,s.vgField)({op:"argmin",field:m.argmin},{forAs:!0}),E.field=`${x}.${g}`):"boxplot"!==m&&"errorbar"!==m&&"errorband"!==m&&(e=m),e){const t={op:e,as:x};g&&(t.field=g),c.push(t)}}else if(n.push(x),(0,s.isTypedFieldDef)(p)&&(0,a.isBinning)(y)){if(r.push({bin:y,field:g,as:x}),n.push((0,s.vgField)(p,{binSuffix:"end"})),(0,s.binRequiresRange)(p,h)&&n.push((0,s.vgField)(p,{binSuffix:"range"})),(0,o.isXorY)(h)){const e={field:`${x}_end`};d[`${h}2`]=e}E.bin="binned",(0,o.isSecondaryRangeChannel)(h)||(E.type=u.QUANTITATIVE)}else if(v&&!(0,f.isBinnedTimeUnit)(v)){l.push({timeUnit:v,field:g,as:x});const e=(0,s.isTypedFieldDef)(p)&&p.type!==u.TEMPORAL&&"time";e&&(h===o.TEXT||h===o.TOOLTIP?E.formatType=e:(0,o.isNonPositionScaleChannel)(h)?E.legend={formatType:e,...E.legend}:(0,o.isXorY)(h)&&(E.axis={formatType:e,...E.axis}))}d[h]=E}else n.push(g),d[h]=e[h]}else d[h]=e[h]})),{bins:r,timeUnits:l,aggregate:c,groupby:n,encoding:d}}function v(e,t,n){const r=(0,o.supportMark)(t,n);if(!r)return!1;if("binned"===r){const n=e[t===o.X2?o.X:o.Y];return!!((0,s.isFieldDef)(n)&&(0,s.isFieldDef)(e[t])&&(0,a.isBinned)(n.bin))}return!0}function b(e,t,n,i){const a={};for(const t of(0,c.keys)(e))(0,o.isChannel)(t)||l.warn(l.message.invalidEncodingChannel(t));for(let c of o.UNIT_CHANNELS){if(!e[c])continue;const f=e[c];if((0,o.isXorYOffset)(c)){const e=(0,o.getMainChannelFromOffsetChannel)(c),t=a[e];if((0,s.isFieldDef)(t)&&(0,u.isContinuous)(t.type)&&(0,s.isFieldDef)(f)&&!t.timeUnit){l.warn(l.message.offsetNestedInsideContinuousPositionScaleDropped(e));continue}}if("angle"!==c||"arc"!==t||e.theta||(l.warn(l.message.REPLACE_ANGLE_WITH_THETA),c=o.THETA),v(e,c,t)){if(c===o.SIZE&&"line"===t){const t=(0,s.getFieldDef)(e[c]);if(t?.aggregate){l.warn(l.message.LINE_WITH_VARYING_SIZE);continue}}if(c===o.COLOR&&(n?"fill"in e:"stroke"in e))l.warn(l.message.droppingColor("encoding",{fill:"fill"in e,stroke:"stroke"in e}));else if(c===o.DETAIL||c===o.ORDER&&!(0,r.isArray)(f)&&!(0,s.isValueDef)(f)||c===o.TOOLTIP&&(0,r.isArray)(f)){if(f){if(c===o.ORDER){const t=e[c];if((0,s.isOrderOnlyDef)(t)){a[c]=t;continue}}a[c]=(0,r.array)(f).reduce(((e,t)=>((0,s.isFieldDef)(t)?e.push((0,s.initFieldDef)(t,c)):l.warn(l.message.emptyFieldDef(t,c)),e)),[])}}else{if(c===o.TOOLTIP&&null===f)a[c]=null;else if(!((0,s.isFieldDef)(f)||(0,s.isDatumDef)(f)||(0,s.isValueDef)(f)||(0,s.isConditionalDef)(f)||(0,d.isSignalRef)(f))){l.warn(l.message.emptyFieldDef(f,c));continue}a[c]=(0,s.initChannelDef)(f,c,i)}}else l.warn(l.message.incompatibleChannel(c,t))}return a}function w(e,t){const n={};for(const r of(0,c.keys)(e)){const i=(0,s.initChannelDef)(e[r],r,t,{compositeMark:!0});n[r]=i}return n}function x(e){const t=[];for(const n of(0,c.keys)(e))if(p(e,n)){const i=e[n],a=(0,r.array)(i);for(const e of a)(0,s.isFieldDef)(e)?t.push(e):(0,s.hasConditionalFieldDef)(e)&&t.push(e.condition)}return t}function E(e,t,n){if(e)for(const i of(0,c.keys)(e)){const a=e[i];if((0,r.isArray)(a))for(const e of a)t.call(n,e,i);else t.call(n,a,i)}}function S(e,t,n,i){return e?(0,c.keys)(e).reduce(((n,a)=>{const o=e[a];return(0,r.isArray)(o)?o.reduce(((e,n)=>t.call(i,e,n,a)),n):t.call(i,n,o,a)}),n):n}function _(e,t){return(0,c.keys)(t).reduce(((n,i)=>{switch(i){case o.X:case o.Y:case o.HREF:case o.DESCRIPTION:case o.URL:case o.X2:case o.Y2:case o.XOFFSET:case o.YOFFSET:case o.THETA:case o.THETA2:case o.RADIUS:case o.RADIUS2:case o.LATITUDE:case o.LONGITUDE:case o.LATITUDE2:case o.LONGITUDE2:case o.TEXT:case o.SHAPE:case o.ANGLE:case o.TOOLTIP:return n;case o.ORDER:if("line"===e||"trail"===e)return n;case o.DETAIL:case o.KEY:{const e=t[i];if((0,r.isArray)(e)||(0,s.isFieldDef)(e))for(const t of(0,r.array)(e))t.aggregate||n.push((0,s.vgField)(t,{}));return n}case o.SIZE:if("trail"===e)return n;case o.COLOR:case o.FILL:case o.STROKE:case o.OPACITY:case o.FILLOPACITY:case o.STROKEOPACITY:case o.STROKEDASH:case o.STROKEWIDTH:{const e=(0,s.getFieldDef)(t[i]);return e&&!e.aggregate&&n.push((0,s.vgField)(e,{})),n}}}),[])}},3802:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isExprRef:()=>a,replaceExprRef:()=>o});var r=n(15058),i=n(79989);function a(e){return(0,i.hasProperty)(e,"expr")}function o(e,{level:t}={level:0}){const n=(0,i.keys)(e||{}),a={};for(const i of n)a[i]=0===t?(0,r.signalRefOrValue)(e[i]):o(e[i],{level:t-1});return a}},19609:(e,t,n)=>{"use strict";n.r(t),n.d(t,{VL_ONLY_LEGEND_CONFIG:()=>r});const r=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"]},41028:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HEADER_CONFIGS:()=>l,HEADER_LABEL_PROPERTIES:()=>s,HEADER_LABEL_PROPERTIES_MAP:()=>a,HEADER_TITLE_PROPERTIES:()=>o,HEADER_TITLE_PROPERTIES_MAP:()=>i});var r=n(79989);const i={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},a={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},o=(0,r.keys)(i),s=(0,r.keys)(a),l=(0,r.keys)({header:1,headerRow:1,headerColumn:1,headerFacet:1})},78405:(e,t,n)=>{"use strict";n.r(t),n.d(t,{accessPathDepth:()=>o.accessPathDepth,accessPathWithDatum:()=>o.accessPathWithDatum,compile:()=>i.compile,contains:()=>o.contains,deepEqual:()=>o.deepEqual,deleteNestedProperty:()=>o.deleteNestedProperty,duplicate:()=>o.duplicate,entries:()=>o.entries,every:()=>o.every,fieldIntersection:()=>o.fieldIntersection,flatAccessWithDatum:()=>o.flatAccessWithDatum,getFirstDefined:()=>o.getFirstDefined,hasIntersection:()=>o.hasIntersection,hasProperty:()=>o.hasProperty,hash:()=>o.hash,internalField:()=>o.internalField,isBoolean:()=>o.isBoolean,isEmpty:()=>o.isEmpty,isEqual:()=>o.isEqual,isInternalField:()=>o.isInternalField,isNullOrFalse:()=>o.isNullOrFalse,isNumeric:()=>o.isNumeric,keys:()=>o.keys,logicalExpr:()=>o.logicalExpr,mergeDeep:()=>o.mergeDeep,never:()=>o.never,normalize:()=>a.normalize,normalizeAngle:()=>o.normalizeAngle,omit:()=>o.omit,pick:()=>o.pick,prefixGenerator:()=>o.prefixGenerator,removePathFromField:()=>o.removePathFromField,replaceAll:()=>o.replaceAll,replacePathInField:()=>o.replacePathInField,resetIdCounter:()=>o.resetIdCounter,setEqual:()=>o.setEqual,some:()=>o.some,stringify:()=>o.stringify,titleCase:()=>o.titleCase,unique:()=>o.unique,uniqueId:()=>o.uniqueId,vals:()=>o.vals,varName:()=>o.varName,version:()=>s});var r=n(67383),i=n(48166),a=n(59621),o=n(79989);const s=r.version},68278:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isScaleInvalidDataIncludeAsValue:()=>i});var r=n(26372);function i(e){return(0,r.isObject)(e)&&"value"in e}},54116:(e,t,n)=>{"use strict";n.r(t),n.d(t,{COMMON_LEGEND_PROPERTY_INDEX:()=>o,LEGEND_PROPERTIES:()=>s,LEGEND_SCALE_CHANNELS:()=>i,defaultLegendConfig:()=>a});var r=n(79989);const i=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],a={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},o={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},s=(0,r.keys)(o)},20916:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LocalLogger:()=>u,debug:()=>m,error:()=>p,info:()=>g,message:()=>a,reset:()=>f,set:()=>d,warn:()=>h,wrap:()=>c});var r,i=n(26372),a=n(87039),o=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const s=(0,i.logger)(i.Warn);let l=s;class u{constructor(){this.warns=[],this.infos=[],this.debugs=[],r.set(this,i.Warn)}level(e){return e?(function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?i.call(e,n):i?i.value=n:t.set(e,n)}(this,r,e,"f"),this):o(this,r,"f")}warn(...e){return o(this,r,"f")>=i.Warn&&this.warns.push(...e),this}info(...e){return o(this,r,"f")>=i.Info&&this.infos.push(...e),this}debug(...e){return o(this,r,"f")>=i.Debug&&this.debugs.push(...e),this}error(...e){if(o(this,r,"f")>=i.Error)throw Error(...e);return this}}function c(e){return()=>{l=new u,e(l),f()}}function d(e){return l=e,l}function f(){return l=s,l}function p(...e){l.error(...e)}function h(...e){l.warn(...e)}function g(...e){l.info(...e)}function m(...e){l.debug(...e)}r=new WeakMap},87039:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ADD_SAME_CHILD_TWICE:()=>k,CANNOT_UNION_CUSTOM_DOMAIN_WITH_FIELD_DOMAIN:()=>ee,CONCAT_CANNOT_SHARE_AXIS:()=>A,FACETED_INDEPENDENT_DIFFERENT_SOURCES:()=>ye,FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES:()=>ve,FACETED_INDEPENDENT_SAME_SOURCE:()=>be,FIT_NON_SINGLE:()=>o,INTERVAL_INITIALIZED_WITH_POS:()=>E,INVALID_CHANNEL_FOR_AXIS:()=>we,LEGEND_BINDINGS_MUST_HAVE_PROJECTION:()=>v,LINE_WITH_VARYING_SIZE:()=>j,MORE_THAN_ONE_SORT:()=>me,NEEDS_SAME_SELECTION:()=>x,NO_FIELDS_NEEDS_AS:()=>D,REPLACE_ANGLE_WITH_THETA:()=>F,SCALE_BINDINGS_CONTINUOUS:()=>m,SEQUENTIAL_SCALE_DEPRECATED:()=>y,cannotApplySizeToNonOrientedMark:()=>oe,cannotLookupVariableParameter:()=>b,cannotProjectAggregate:()=>f,cannotProjectOnChannelWithoutField:()=>d,cannotStackRangedMark:()=>xe,cannotUseRelativeBandSizeWithNonBandScale:()=>ne,cannotUseScalePropertyWithNonColor:()=>te,channelRequiredForBinned:()=>De,channelShouldBeDiscrete:()=>W,channelShouldBeDiscreteOrDiscretizing:()=>Y,channelShouldNotBeUsedForBinned:()=>Oe,columnsNotSupportByRowCol:()=>_,containerSizeNonSingle:()=>s,containerSizeNotCompatibleWithAutosize:()=>l,customFormatTypeNotAllowed:()=>O,differentParse:()=>T,discreteChannelCannotEncode:()=>K,domainRequiredForThresholdScale:()=>Ne,domainSortDropped:()=>ge,droppedDay:()=>Ae,droppingColor:()=>U,droppingFit:()=>u,emptyFieldDef:()=>q,errorBand1DNotSupport:()=>Re,errorBarCenterAndExtentAreNotNeeded:()=>Ce,errorBarCenterIsUsedWithWrongExtent:()=>Te,errorBarContinuousAxisHasCustomizedAggregate:()=>ke,facetChannelDropped:()=>X,incompatibleChannel:()=>H,independentScaleMeansIndependentGuide:()=>he,invalidAggregate:()=>L,invalidEncodingChannel:()=>V,invalidFieldType:()=>I,invalidFieldTypeForCountAggregate:()=>$,invalidSpec:()=>a,invalidTimeUnit:()=>_e,invalidTransformIgnored:()=>R,lineWithRange:()=>Q,mergeConflictingDomainProperty:()=>pe,mergeConflictingProperty:()=>fe,missingFieldType:()=>B,nearestNotSupportForContinuous:()=>p,noSameUnitLookup:()=>w,noSuchRepeatedValue:()=>S,offsetEncodingScaleIgnored:()=>G,offsetNestedInsideContinuousPositionScaleDropped:()=>P,orientOverridden:()=>Z,primitiveChannelDef:()=>M,projectionOverridden:()=>N,rangeMarkAlignmentCannotBeExpression:()=>J,relativeBandSizeNotSupported:()=>z,scalePropertyNotWorkWithScaleType:()=>ue,scaleTypeNotWorkWithChannel:()=>se,scaleTypeNotWorkWithFieldDef:()=>le,scaleTypeNotWorkWithMark:()=>ce,selectionNotFound:()=>g,selectionNotSupported:()=>h,stackNonLinearScale:()=>Ee,stackNonSummativeAggregate:()=>Se,stepDropped:()=>de,unaggregateDomainHasNoEffectForRawField:()=>re,unaggregateDomainWithNonSharedDomainOp:()=>ie,unaggregatedDomainWithLogScale:()=>ae,unknownField:()=>c,unrecognizedParse:()=>C});var r=n(95290),i=n(79989);function a(e){return`Invalid specification ${(0,i.stringify)(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const o='Autosize "fit" only works for single views and layered views.';function s(e){return("width"==e?"Width":"Height")+' "container" only works for single views and layered views.'}function l(e){return`${"width"==e?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==e?"x":"y"}".`}function u(e){return e?`Dropping "fit-${e}" because spec has discrete ${(0,r.getSizeChannel)(e)}.`:'Dropping "fit" because spec has discrete size.'}function c(e){return`Unknown field for ${e}. Cannot calculate view size.`}function d(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function f(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function p(e){return`The "nearest" transform is not supported for ${e} marks.`}function h(e){return`Selection not supported for ${e} yet.`}function g(e){return`Cannot find a selection named "${e}".`}const m="Scale bindings are currently only supported for scales with unbinned, continuous domains.",y="Sequntial scales are deprecated. The available quantitative scale type values are linear, log, pow, sqrt, symlog, time and utc",v="Legend bindings are only supported for selections over an individual field or encoding channel.";function b(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}function w(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}const x="The same selection must be used to override scale domains in a layered view.",E='Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.';function S(e){return`Unknown repeated value "${e}".`}function _(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}const A="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function C(e){return`Unrecognized parse "${e}".`}function T(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}const k="Attempt to add the same child twice.";function R(e){return`Ignoring an invalid transform: ${(0,i.stringify)(e)}.`}const D='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function O(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function N(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${(0,i.stringify)(t)} is overridden by a child projection ${(0,i.stringify)(n)}.`}const F="Arc marks uses theta channel rather than angle, replacing angle with theta.";function P(e){return`${e}Offset dropped because ${e} is continuous`}function M(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${(0,i.stringify)(n)}}.`}function I(e){return`Invalid field type "${e}".`}function $(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}function L(e){return`Invalid aggregation operator "${e}".`}function B(e,t){return`Missing type for channel "${e}", using "${t}" instead.`}function U(e,t){const{fill:n,stroke:r}=t;return`Dropping color ${e} as the plot also has ${n&&r?"fill and stroke":n?"fill":"stroke"}.`}function z(e){return`Position range does not support relative band size for ${e}.`}function q(e,t){return`Dropping ${(0,i.stringify)(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}const j="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function H(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function G(e){return`${e} encoding has no scale, so specified scale is ignored.`}function V(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}function W(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function Y(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function X(e){return`Facet encoding dropped as ${e.join(" and ")} ${e.length>1?"are":"is"} also specified.`}function K(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${"ordinal"===t?"order":"magnitude"}.`}function J(e){return`The ${e} for range marks cannot be an expression`}function Q(e,t){return`Line mark is for continuous lines and thus cannot be used with ${e&&t?"x2 and y2":e?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function Z(e,t){return`Specified orient "${e}" overridden with "${t}".`}const ee="Custom domain scale cannot be unioned with default field-based domain.";function te(e){return`Cannot use the scale property "${e}" with non-color channel.`}function ne(e){return`Cannot use the relative band size with ${e} scale.`}function re(e){return`Using unaggregated domain with raw field has no effect (${(0,i.stringify)(e)}).`}function ie(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function ae(e){return`Unaggregated domain is currently unsupported for log scale (${(0,i.stringify)(e)}).`}function oe(e){return`Cannot apply size to non-oriented mark "${e}".`}function se(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}function le(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}function ue(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function ce(e,t){return`Scale type "${t}" does not work with mark "${e}".`}function de(e){return`The step for "${e}" is dropped because the ${"width"===e?"x":"y"} is continuous.`}function fe(e,t,n,r){return`Conflicting ${t.toString()} property "${e.toString()}" (${(0,i.stringify)(n)} and ${(0,i.stringify)(r)}). Using ${(0,i.stringify)(n)}.`}function pe(e,t,n,r){return`Conflicting ${t.toString()} property "${e.toString()}" (${(0,i.stringify)(n)} and ${(0,i.stringify)(r)}). Using the union of the two domains.`}function he(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}function ge(e){return`Dropping sort property ${(0,i.stringify)(e)} as unioned domains only support boolean or op "count", "min", and "max".`}const me="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",ye="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",ve="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",be="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.",we="Invalid channel for axis.";function xe(e){return`Cannot stack "${e}" if there is already "${e}2".`}function Ee(e){return`Stack is applied to a non-linear scale (${e}).`}function Se(e){return`Stacking is applied even though the aggregate function is non-summative ("${e}").`}function _e(e,t){return`Invalid ${e}: ${(0,i.stringify)(t)}.`}function Ae(e){return`Dropping day from datetime ${(0,i.stringify)(e)} as day cannot be combined with other units.`}function Ce(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}function Te(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}function ke(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}function Re(e){return`1D error band does not support ${e}.`}function De(e){return`Channel ${e} is required for "binned" bin.`}function Oe(e){return`Channel ${e} should not be used with "binned" bin.`}function Ne(e){return`Domain for ${e} is required for threshold scale.`}},90386:(e,t,n)=>{"use strict";n.r(t),n.d(t,{forEachLeaf:()=>s,isLogicalAnd:()=>a,isLogicalNot:()=>o,isLogicalOr:()=>i,normalizeLogicalComposition:()=>l});var r=n(79989);function i(e){return(0,r.hasProperty)(e,"or")}function a(e){return(0,r.hasProperty)(e,"and")}function o(e){return(0,r.hasProperty)(e,"not")}function s(e,t){if(o(e))s(e.not,t);else if(a(e))for(const n of e.and)s(n,t);else if(i(e))for(const n of e.or)s(n,t);else t(e)}function l(e,t){return o(e)?{not:l(e.not,t)}:a(e)?{and:e.and.map((e=>l(e,t)))}:i(e)?{or:e.or.map((e=>l(e,t)))}:t(e)}},75028:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ARC:()=>o,AREA:()=>s,BAR:()=>l,BAR_CORNER_RADIUS_INDEX:()=>I,CIRCLE:()=>y,FILL_CONFIG:()=>k,FILL_STROKE_CONFIG:()=>R,GEOSHAPE:()=>b,IMAGE:()=>u,LINE:()=>c,MARK_CONFIGS:()=>P,Mark:()=>a,PATH_MARKS:()=>x,POINT:()=>d,PRIMITIVE_MARKS:()=>_,RECT:()=>f,RULE:()=>p,SQUARE:()=>v,STROKE_CONFIG:()=>T,TEXT:()=>h,TICK:()=>g,TRAIL:()=>m,VL_ONLY_MARK_CONFIG_PROPERTIES:()=>D,VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX:()=>N,defaultBarConfig:()=>L,defaultMarkConfig:()=>F,defaultRectConfig:()=>$,defaultTickConfig:()=>B,getMarkType:()=>U,isMark:()=>w,isMarkDef:()=>A,isPathMark:()=>E,isPrimitiveMark:()=>C,isRectBasedMark:()=>S,isRelativeBandSize:()=>M});var r=n(26372),i=n(79989);const a={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},o=a.arc,s=a.area,l=a.bar,u=a.image,c=a.line,d=a.point,f=a.rect,p=a.rule,h=a.text,g=a.tick,m=a.trail,y=a.circle,v=a.square,b=a.geoshape;function w(e){return(0,r.hasOwnProperty)(a,e)}const x=["line","area","trail"];function E(e){return["line","area","trail"].includes(e)}function S(e){return["rect","bar","image","arc","tick"].includes(e)}const _=new Set((0,i.keys)(a));function A(e){return(0,i.hasProperty)(e,"type")}function C(e){const t=A(e)?e.type:e;return _.has(t)}const T=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],k=["fill","fillOpacity"],R=[...T,...k],D=(0,i.keys)({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),O=["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],N={area:["line","point"],bar:O,rect:O,line:["point"],tick:["bandSize","thickness",...O]},F={color:"#4c78a8",invalid:"break-paths-show-path-domains",timeUnitBandSize:1},P=(0,i.keys)({mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1});function M(e){return(0,i.hasProperty)(e,"band")}const I={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},$={binSpacing:0,continuousBandSize:5,minBandSize:.25,timeUnitBandPosition:.5},L={...$,binSpacing:1},B={...$,thickness:1};function U(e){return A(e)?e.type:e}},52362:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CoreNormalizer:()=>w});var r=n(26372),i=n(95290),a=n(79543),o=n(67982),s=n(52365),l=n(55833),u=n(98348),c=n(20916),d=n(51894),f=n(56811),p=n(31070),h=n(68859),g=n(79989),m=n(5711),y=n(8232),v=n(95741),b=n(56349);class w extends f.SpecMapper{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[o.boxPlotNormalizer,l.errorBarNormalizer,s.errorBandNormalizer,new y.PathOverlayNormalizer,new b.RuleForRangedLineNormalizer]}map(e,t){if((0,h.isUnitSpec)(e)){const n=(0,u.channelHasField)(e.encoding,i.ROW),r=(0,u.channelHasField)(e.encoding,i.COLUMN),a=(0,u.channelHasField)(e.encoding,i.FACET);if(n||r||a)return this.mapFacetedUnit(e,t)}return super.map(e,t)}mapUnit(e,t){const{parentEncoding:n,parentProjection:r}=t,i=(0,v.replaceRepeaterInEncoding)(e.encoding,t.repeater),a={...e,...e.name?{name:[t.repeaterPrefix,e.name].filter((e=>e)).join("_")}:{},...i?{encoding:i}:{}};if(n||r)return this.mapUnitWithParentEncodingOrProjection(a,t);const o=this.mapLayerOrUnit.bind(this);for(const e of this.nonFacetUnitNormalizers)if(e.hasMatchingType(a,t.config))return e.run(a,t,o);return a}mapRepeat(e,t){return(0,p.isLayerRepeatSpec)(e)?this.mapLayerRepeat(e,t):this.mapNonLayerRepeat(e,t)}mapLayerRepeat(e,t){const{repeat:n,spec:r,...i}=e,{row:a,column:o,layer:s}=n,{repeater:l={},repeaterPrefix:u=""}=t;return a||o?this.mapRepeat({...e,repeat:{...a?{row:a}:{},...o?{column:o}:{}},spec:{repeat:{layer:s},spec:r}},t):{...i,layer:s.map((e=>{const n={...l,layer:e},i=`${(r.name?`${r.name}_`:"")+u}child__layer_${(0,g.varName)(e)}`,a=this.mapLayerOrUnit(r,{...t,repeater:n,repeaterPrefix:i});return a.name=i,a}))}}mapNonLayerRepeat(e,t){const{repeat:n,spec:i,data:a,...o}=e;!(0,r.isArray)(n)&&e.columns&&(e=(0,g.omit)(e,["columns"]),c.warn(c.message.columnsNotSupportByRowCol("repeat")));const s=[],{repeater:l={},repeaterPrefix:u=""}=t,d=!(0,r.isArray)(n)&&n.row||[l?l.row:null],f=!(0,r.isArray)(n)&&n.column||[l?l.column:null],p=(0,r.isArray)(n)&&n||[l?l.repeat:null];for(const e of p)for(const a of d)for(const o of f){const c={repeat:e,row:a,column:o,layer:l.layer},d=(i.name?`${i.name}_`:"")+u+"child__"+((0,r.isArray)(n)?`${(0,g.varName)(e)}`:(n.row?`row_${(0,g.varName)(a)}`:"")+(n.column?`column_${(0,g.varName)(o)}`:"")),f=this.map(i,{...t,repeater:c,repeaterPrefix:d});f.name=d,s.push((0,g.omit)(f,["data"]))}const h=(0,r.isArray)(n)?e.columns:n.column?n.column.length:1;return{data:i.data??a,align:"all",...o,columns:h,concat:s}}mapFacet(e,t){const{facet:n}=e;return(0,d.isFacetMapping)(n)&&e.columns&&(e=(0,g.omit)(e,["columns"]),c.warn(c.message.columnsNotSupportByRowCol("facet"))),super.mapFacet(e,t)}mapUnitWithParentEncodingOrProjection(e,t){const{encoding:n,projection:r}=e,{parentEncoding:i,parentProjection:a,config:o}=t,s=E({parentProjection:a,projection:r}),l=x({parentEncoding:i,encoding:(0,v.replaceRepeaterInEncoding)(n,t.repeater)});return this.mapUnit({...e,...s?{projection:s}:{},...l?{encoding:l}:{}},{config:o})}mapFacetedUnit(e,t){const{row:n,column:r,facet:i,...a}=e.encoding,{mark:o,width:s,projection:l,height:u,view:c,params:d,encoding:f,...p}=e,{facetMapping:h,layout:g}=this.getFacetMappingAndLayout({row:n,column:r,facet:i},t),m=(0,v.replaceRepeaterInEncoding)(a,t.repeater);return this.mapFacet({...p,...g,facet:h,spec:{...s?{width:s}:{},...u?{height:u}:{},...c?{view:c}:{},...l?{projection:l}:{},mark:o,encoding:m,...d?{params:d}:{}}},t)}getFacetMappingAndLayout(e,t){const{row:n,column:r,facet:a}=e;if(n||r){a&&c.warn(c.message.facetChannelDropped([...n?[i.ROW]:[],...r?[i.COLUMN]:[]]));const t={},o={};for(const n of[i.ROW,i.COLUMN]){const r=e[n];if(r){const{align:e,center:i,spacing:a,columns:s,...l}=r;t[n]=l;for(const e of["align","center","spacing"])void 0!==r[e]&&(o[e]??(o[e]={}),o[e][n]=r[e])}}return{facetMapping:t,layout:o}}{const{align:e,center:n,spacing:r,columns:i,...o}=a;return{facetMapping:(0,v.replaceRepeaterInFacet)(o,t.repeater),layout:{...e?{align:e}:{},...n?{center:n}:{},...r?{spacing:r}:{},...i?{columns:i}:{}}}}}mapLayer(e,{parentEncoding:t,parentProjection:n,...r}){const{encoding:i,projection:a,...o}=e,s={...r,parentEncoding:x({parentEncoding:t,encoding:i,layer:!0}),parentProjection:E({parentProjection:n,projection:a})};return super.mapLayer({...o,...e.name?{name:[s.repeaterPrefix,e.name].filter((e=>e)).join("_")}:{}},s)}}function x({parentEncoding:e,encoding:t={},layer:n}){let i={};if(e){const o=new Set([...(0,g.keys)(e),...(0,g.keys)(t)]);for(const s of o){const o=t[s],l=e[s];if((0,a.isFieldOrDatumDef)(o)){const e={...l,...o};i[s]=e}else(0,a.hasConditionalFieldOrDatumDef)(o)?i[s]={...o,condition:{...l,...o.condition}}:o||null===o?i[s]=o:(n||(0,a.isValueDef)(l)||(0,m.isSignalRef)(l)||(0,a.isFieldOrDatumDef)(l)||(0,r.isArray)(l))&&(i[s]=l)}}else i=t;return!i||(0,g.isEmpty)(i)?void 0:i}function E(e){const{parentProjection:t,projection:n}=e;return t&&n&&c.warn(c.message.projectionOverridden({parentProjection:t,projection:n})),n??t}},59621:(e,t,n)=>{"use strict";n.r(t),n.d(t,{normalize:()=>d,normalizeAutoSize:()=>m});var r=n(26372),i=n(24007),a=n(20916),o=n(24777),s=n(79989),l=n(52362),u=n(9405),c=n(9794);function d(e,t){void 0===t&&(t=(0,i.initConfig)(e.config));const n=function(e,t={}){const n={config:t};return h.map(f.map(p.map(e,n),n),n)}(e,t),{width:r,height:a}=e,o=m(n,{width:r,height:a,autosize:e.autosize},t);return{...n,...o?{autosize:o}:{}}}const f=new l.CoreNormalizer,p=new u.SelectionCompatibilityNormalizer,h=new c.TopLevelSelectionsNormalizer;function g(e){return(0,r.isString)(e)?{type:e}:e??{}}function m(e,t,n){let{width:r,height:i}=t;const l=(0,o.isUnitSpec)(e)||(0,o.isLayerSpec)(e),u={};l?"container"==r&&"container"==i?(u.type="fit",u.contains="padding"):"container"==r?(u.type="fit-x",u.contains="padding"):"container"==i&&(u.type="fit-y",u.contains="padding"):("container"==r&&(a.warn(a.message.containerSizeNonSingle("width")),r=void 0),"container"==i&&(a.warn(a.message.containerSizeNonSingle("height")),i=void 0));const c={type:"pad",...u,...n?g(n.autosize):{},...g(e.autosize)};if("fit"!==c.type||l||(a.warn(a.message.FIT_NON_SINGLE),c.type="pad"),"container"==r&&"fit"!=c.type&&"fit-x"!=c.type&&a.warn(a.message.containerSizeNotCompatibleWithAutosize("width")),"container"==i&&"fit"!=c.type&&"fit-y"!=c.type&&a.warn(a.message.containerSizeNotCompatibleWithAutosize("height")),!(0,s.deepEqual)(c,{type:"pad"}))return c}},8232:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PathOverlayNormalizer:()=>h});var r=n(26372),i=n(98348),a=n(75028),o=n(68859),s=n(68889),l=n(79989),u=n(55823);function c(e){const{point:t,line:n,...r}=e;return(0,l.keys)(r).length>1?r:r.type}function d(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:(0,l.omit)(e[t],["point","line"])});return e}function f(e,t={},n){return"transparent"===e.point?{opacity:0}:e.point?(0,r.isObject)(e.point)?e.point:{}:void 0!==e.point?null:t.point||n.shape?(0,r.isObject)(t.point)?t.point:{}:void 0}function p(e,t={}){return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}class h{constructor(){this.name="path-overlay"}hasMatchingType(e,t){if((0,o.isUnitSpec)(e)){const{mark:n,encoding:r}=e,i=(0,a.isMarkDef)(n)?n:{type:n};switch(i.type){case"line":case"rule":case"trail":return!!f(i,t[i.type],r);case"area":return!!f(i,t[i.type],r)||!!p(i,t[i.type])}}return!1}run(e,t,n){const{config:r}=t,{params:o,projection:h,mark:g,name:m,encoding:y,...v}=e,b=(0,i.normalizeEncoding)(y,r),w=(0,a.isMarkDef)(g)?g:{type:g},x=f(w,r[w.type],b),E="area"===w.type&&p(w,r[w.type]),S=[{name:m,...o?{params:o}:{},mark:c({..."area"===w.type&&void 0===w.opacity&&void 0===w.fillOpacity?{opacity:.7}:{},...w}),encoding:(0,l.omit)(b,["shape"])}],_=(0,s.stack)((0,u.initMarkdef)(w,b,r),b);let A=b;if(_){const{fieldChannel:e,offset:t}=_;A={...b,[e]:{...b[e],...t?{stack:t}:{}}}}return A=(0,l.omit)(A,["y2","x2"]),E&&S.push({...h?{projection:h}:{},mark:{type:"line",...(0,l.pick)(w,["clip","interpolate","tension","tooltip"]),...E},encoding:A}),x&&S.push({...h?{projection:h}:{},mark:{type:"point",opacity:1,filled:!0,...(0,l.pick)(w,["clip","tooltip"]),...x},encoding:A}),n({...v,layer:S},{...t,config:d(r)})}}},95741:(e,t,n)=>{"use strict";n.r(t),n.d(t,{replaceRepeaterInEncoding:()=>c,replaceRepeaterInFacet:()=>u});var r=n(26372),i=n(79543),a=n(20916),o=n(46681),s=n(51894),l=n(79989);function u(e,t){return t?(0,s.isFacetMapping)(e)?g(e,t):f(e,t):e}function c(e,t){return t?g(e,t):e}function d(e,t,n){const r=t[e];return(0,i.isRepeatRef)(r)?r.repeat in n?{...t,[e]:n[r.repeat]}:void a.warn(a.message.noSuchRepeatedValue(r.repeat)):t}function f(e,t){if(void 0!==(e=d("field",e,t))){if(null===e)return null;if((0,i.isSortableFieldDef)(e)&&(0,o.isSortField)(e.sort)){const n=d("field",e.sort,t);e={...e,...n?{sort:n}:{}}}return e}}function p(e,t){if((0,i.isFieldDef)(e))return f(e,t);{const n=d("datum",e,t);return n===e||n.type||(n.type="nominal"),n}}function h(e,t){if(!(0,i.isFieldOrDatumDef)(e)){if((0,i.hasConditionalFieldOrDatumDef)(e)){const n=p(e.condition,t);if(n)return{...e,condition:n};{const{condition:t,...n}=e;return n}}return e}{const n=p(e,t);if(n)return n;if((0,i.isConditionalDef)(e))return{condition:e.condition}}}function g(e,t){const n={};for(const i in e)if((0,l.hasProperty)(e,i)){const a=e[i];if((0,r.isArray)(a))n[i]=a.map((e=>h(e,t))).filter((e=>e));else{const e=h(a,t);void 0!==e&&(n[i]=e)}}return n}},56349:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RuleForRangedLineNormalizer:()=>c});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(20916),l=n(75028),u=n(68859);class c{constructor(){this.name="RuleForRangedLine"}hasMatchingType(e){if((0,u.isUnitSpec)(e)){const{encoding:t,mark:n}=e;if("line"===n||(0,l.isMarkDef)(n)&&"line"===n.type)for(const e of a.SECONDARY_RANGE_CHANNEL){const n=t[(0,a.getMainRangeChannel)(e)];if(t[e]&&((0,o.isFieldDef)(n)&&!(0,i.isBinned)(n.bin)||(0,o.isDatumDef)(n)))return!0}}return!1}run(e,t,n){const{encoding:i,mark:a}=e;return s.warn(s.message.lineWithRange(!!i.x2,!!i.y2)),n({...e,mark:(0,r.isObject)(a)?{...a,type:"rule"}:"rule"},t)}}},9405:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SelectionCompatibilityNormalizer:()=>c});var r=n(26372),i=n(19664),a=n(79543),o=n(90386),s=n(56811),l=n(65393),u=n(79989);class c extends s.SpecMapper{map(e,t){return t.emptySelections??(t.emptySelections={}),t.selectionPredicates??(t.selectionPredicates={}),e=d(e,t),super.map(e,t)}mapLayerOrUnit(e,t){if((e=d(e,t)).encoding){const n={};for(const[r,i]of(0,u.entries)(e.encoding))n[r]=f(i,t);e={...e,encoding:n}}return super.mapLayerOrUnit(e,t)}mapUnit(e,t){const{selection:n,...r}=e;return n?{...r,params:(0,u.entries)(n).map((([e,n])=>{const{init:r,bind:i,empty:a,...o}=n;"single"===o.type?(o.type="point",o.toggle=!1):"multi"===o.type&&(o.type="point"),t.emptySelections[e]="none"!==a;for(const n of(0,u.vals)(t.selectionPredicates[e]??{}))n.empty="none"!==a;return{name:e,value:r,select:o,bind:i}}))}:e}}function d(e,t){const{transform:n,...r}=e;return n?{...r,transform:n.map((e=>{if((0,l.isFilter)(e))return{filter:h(e,t)};if((0,l.isBin)(e)&&(0,i.isBinParams)(e.bin))return{...e,bin:p(e.bin)};if((0,l.isLookup)(e)){const{selection:t,...n}=e.from;return t?{...e,from:{param:t,...n}}:e}return e}))}:e}function f(e,t){const n=(0,u.duplicate)(e);if((0,a.isFieldDef)(n)&&(0,i.isBinParams)(n.bin)&&(n.bin=p(n.bin)),(0,a.isScaleFieldDef)(n)&&n.scale?.domain?.selection){const{selection:e,...t}=n.scale.domain;n.scale.domain={...t,...e?{param:e}:{}}}if((0,a.isConditionalDef)(n))if((0,r.isArray)(n.condition))n.condition=n.condition.map((e=>{const{selection:n,param:r,test:i,...a}=e;return r?e:{...a,test:h(e,t)}}));else{const{selection:e,param:r,test:i,...a}=f(n.condition,t);n.condition=r?n.condition:{...a,test:h(n.condition,t)}}return n}function p(e){const t=e.extent;if(t?.selection){const{selection:n,...r}=t;return{...e,extent:{...r,param:n}}}return e}function h(e,t){const n=e=>(0,o.normalizeLogicalComposition)(e,(e=>{var n;const r={param:e,empty:t.emptySelections[e]??!0};return(n=t.selectionPredicates)[e]??(n[e]=[]),t.selectionPredicates[e].push(r),r}));return e.selection?n(e.selection):(0,o.normalizeLogicalComposition)(e.test||e.filter,(e=>e.selection?n(e.selection):e))}},9794:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TopLevelSelectionsNormalizer:()=>s});var r=n(26372),i=n(84847),a=n(24777),o=n(56811);class s extends o.SpecMapper{map(e,t){const n=t.selections??[];if(e.params&&!(0,a.isUnitSpec)(e)){const t=[];for(const r of e.params)(0,i.isSelectionParameter)(r)?n.push(r):t.push(r);e.params=t}return t.selections=n,super.map(e,t)}mapUnit(e,t){const n=t.selections;if(!n||!n.length)return e;const i=(t.path??[]).concat(e.name),a=[];for(const t of n)if(t.views&&t.views.length)for(const n of t.views)((0,r.isString)(n)&&(n===e.name||i.includes(n))||(0,r.isArray)(n)&&n.map((e=>i.indexOf(e))).every(((e,t,n)=>-1!==e&&(0===t||e>n[t-1]))))&&a.push(t);else a.push(t);return a.length&&(e.params=a),e}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=s.prototype[e];s.prototype[e]=function(e,n){return t.call(this,e,l(e,n))}}function l(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}},54778:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleParameterSignals:()=>i});var r=n(84847);function i(e){const t=[];for(const n of e||[]){if((0,r.isSelectionParameter)(n))continue;const{expr:e,bind:i,...a}=n;if(i&&e){const n={...a,bind:i,init:e};t.push(n)}else{const n={...a,...e?{update:e}:{},...i?{bind:i}:{}};t.push(n)}}return t}},4976:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fieldFilterExpression:()=>w,fieldValidPredicate:()=>x,isFieldEqualPredicate:()=>c,isFieldGTEPredicate:()=>h,isFieldGTPredicate:()=>p,isFieldLTEPredicate:()=>f,isFieldLTPredicate:()=>d,isFieldOneOfPredicate:()=>m,isFieldPredicate:()=>v,isFieldRangePredicate:()=>g,isFieldValidPredicate:()=>y,isSelectionPredicate:()=>u,normalizePredicate:()=>E});var r=n(26372),i=n(79543),a=n(3802),o=n(96598),s=n(79989),l=n(5711);function u(e){return(0,s.hasProperty)(e,"param")}function c(e){return!!e?.field&&void 0!==e.equal}function d(e){return!!e?.field&&void 0!==e.lt}function f(e){return!!e?.field&&void 0!==e.lte}function p(e){return!!e?.field&&void 0!==e.gt}function h(e){return!!e?.field&&void 0!==e.gte}function g(e){if(e?.field){if((0,r.isArray)(e.range)&&2===e.range.length)return!0;if((0,l.isSignalRef)(e.range))return!0}return!1}function m(e){return!!e?.field&&((0,r.isArray)(e.oneOf)||(0,r.isArray)(e.in))}function y(e){return!!e?.field&&void 0!==e.valid}function v(e){return m(e)||c(e)||g(e)||d(e)||p(e)||f(e)||h(e)}function b(e,t){return(0,i.valueExpr)(e,{timeUnit:t,wrapTime:!0})}function w(e,t=!0){const{field:n}=e,r=(0,o.normalizeTimeUnit)(e.timeUnit),{unit:u,binned:v}=r||{},w=(0,i.vgField)(e,{expr:"datum"}),E=u?`time(${v?w:(0,o.fieldExpr)(u,n)})`:w;if(c(e))return`${E}===${b(e.equal,u)}`;if(d(e))return`${E}<${b(e.lt,u)}`;if(p(e))return`${E}>${b(e.gt,u)}`;if(f(e))return`${E}<=${b(e.lte,u)}`;if(h(e))return`${E}>=${b(e.gte,u)}`;if(m(e))return`indexof([${(S=e.oneOf,_=u,S.map((e=>b(e,_)))).join(",")}], ${E}) !== -1`;if(y(e))return x(E,e.valid);if(g(e)){const{range:n}=(0,a.replaceExprRef)(e),r=(0,l.isSignalRef)(n)?{signal:`${n.signal}[0]`}:n[0],i=(0,l.isSignalRef)(n)?{signal:`${n.signal}[1]`}:n[1];if(null!==r&&null!==i&&t)return"inrange("+E+", ["+b(r,u)+", "+b(i,u)+"])";const o=[];return null!==r&&o.push(`${E} >= ${b(r,u)}`),null!==i&&o.push(`${E} <= ${b(i,u)}`),o.length>0?o.join(" && "):"true"}var S,_;throw new Error(`Invalid field predicate: ${(0,s.stringify)(e)}`)}function x(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function E(e){return v(e)&&e.timeUnit?{...e,timeUnit:(0,o.normalizeTimeUnit)(e.timeUnit)}:e}},15176:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PROJECTION_PROPERTIES:()=>r});const r=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"]},31179:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONTINUOUS_DOMAIN_SCALES:()=>v,CONTINUOUS_TO_CONTINUOUS_SCALES:()=>g,CONTINUOUS_TO_DISCRETE_SCALES:()=>y,DISCRETE_DOMAIN_SCALES:()=>b,NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTIES:()=>B,QUANTITATIVE_SCALES:()=>h,SCALE_CATEGORY_INDEX:()=>u,SCALE_PROPERTIES:()=>O,SCALE_TYPES:()=>c,ScaleType:()=>l,TIME_SCALE_TYPES:()=>w,channelScalePropertyIncompatability:()=>z,channelSupportScaleType:()=>j,defaultScaleConfig:()=>A,hasContinuousDomain:()=>E,hasDiscreteDomain:()=>x,isContinuousToContinuous:()=>S,isContinuousToDiscrete:()=>_,isDomainUnionWith:()=>k,isExtendedScheme:()=>C,isFieldRange:()=>R,isParameterDomain:()=>T,isQuantitative:()=>m,scaleCompatible:()=>d,scaleTypePrecedence:()=>p,scaleTypeSupportDataType:()=>q,scaleTypeSupportProperty:()=>U});var r=n(26372),i=n(95290),a=n(20916),o=n(99273),s=n(79989);const l={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",SYMLOG:"symlog",IDENTITY:"identity",SEQUENTIAL:"sequential",TIME:"time",UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold",BIN_ORDINAL:"bin-ordinal",ORDINAL:"ordinal",POINT:"point",BAND:"band"},u={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"},c=(0,s.keys)(u);function d(e,t){const n=u[e],r=u[t];return n===r||"ordinal-position"===n&&"time"===r||"ordinal-position"===r&&"time"===n}const f={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function p(e){return f[e]}const h=new Set(["linear","log","pow","sqrt","symlog"]),g=new Set([...h,"time","utc"]);function m(e){return h.has(e)}const y=new Set(["quantile","quantize","threshold"]),v=new Set([...g,...y,"sequential","identity"]),b=new Set(["ordinal","bin-ordinal","point","band"]),w=new Set(["time","utc"]);function x(e){return b.has(e)}function E(e){return v.has(e)}function S(e){return g.has(e)}function _(e){return y.has(e)}const A={pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,tickBandPaddingInner:.25,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:4,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0};function C(e){return!(0,r.isString)(e)&&(0,s.hasProperty)(e,"name")}function T(e){return(0,s.hasProperty)(e,"param")}function k(e){return(0,s.hasProperty)(e,"unionWith")}function R(e){return(0,r.isObject)(e)&&"field"in e}const D={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,domainRaw:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},O=(0,s.keys)(D),{type:N,domain:F,range:P,rangeMax:M,rangeMin:I,scheme:$,...L}=D,B=(0,s.keys)(L);function U(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return S(e)||"band"===e||"point"===e;case"padding":case"rangeMin":case"rangeMax":return S(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return"band"===e;case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return S(e);case"nice":return S(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return E(e)&&!(0,s.contains)(["log","time","utc","threshold","quantile"],e)}}function z(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return(0,i.isColorChannel)(e)?void 0:a.message.cannotUseScalePropertyWithNonColor(t);case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"domainRaw":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}function q(e,t){return(0,s.contains)([o.ORDINAL,o.NOMINAL],t)?void 0===e||x(e):t===o.TEMPORAL?(0,s.contains)([l.TIME,l.UTC,void 0],e):t!==o.QUANTITATIVE||m(e)||_(e)||void 0===e}function j(e,t,n=!1){if(!i.isScaleChannel(e))return!1;switch(e){case i.X:case i.Y:case i.XOFFSET:case i.YOFFSET:case i.THETA:case i.RADIUS:return!!S(t)||"band"===t||"point"===t&&!n;case i.SIZE:case i.STROKEWIDTH:case i.OPACITY:case i.FILLOPACITY:case i.STROKEOPACITY:case i.ANGLE:return S(t)||_(t)||(0,s.contains)(["band","point","ordinal"],t);case i.COLOR:case i.FILL:case i.STROKE:return"band"!==t;case i.STROKEDASH:case i.SHAPE:return"ordinal"===t||_(t)}}},84847:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SELECTION_ID:()=>i,defaultConfig:()=>a,isLegendBinding:()=>o,isLegendStreamBinding:()=>s,isSelectionParameter:()=>l});var r=n(26372);const i="_vgsid_",a={point:{on:"click",fields:[i],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[pointerdown, window:pointerup] > window:pointermove!",encodings:["x","y"],translate:"[pointerdown, window:pointerup] > window:pointermove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function o(e){return"legend"===e||!!e?.legend}function s(e){return o(e)&&(0,r.isObject)(e)}function l(e){return!!e?.select}},46681:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_SORT_OP:()=>a,isSortArray:()=>c,isSortByChannel:()=>s,isSortByEncoding:()=>l,isSortField:()=>u});var r=n(26372),i=n(79989);const a="min",o={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function s(e){return(0,r.hasOwnProperty)(o,e)}function l(e){return(0,i.hasProperty)(e,"encoding")}function u(e){return e&&("count"===e.op||(0,i.hasProperty)(e,"field"))}function c(e){return e&&(0,r.isArray)(e)}},89820:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_SPACING:()=>c,extractCompositionLayout:()=>f,getStepFor:()=>s,isFrameMixins:()=>u,isStep:()=>l});var r=n(26372),i=n(79989),a=n(53429),o=n(51894);function s({step:e,offsetIsDiscrete:t}){return t?e.for??"offset":"position"}function l(e){return(0,i.hasProperty)(e,"step")}function u(e){return(0,i.hasProperty)(e,"view")||(0,i.hasProperty)(e,"width")||(0,i.hasProperty)(e,"height")}const c=20,d=(0,i.keys)({align:1,bounds:1,center:1,columns:1,spacing:1});function f(e,t,n){const i=n[t],s={},{spacing:l,columns:u}=i;void 0!==l&&(s.spacing=l),void 0!==u&&((0,o.isFacetSpec)(e)&&!(0,o.isFacetMapping)(e.facet)||(0,a.isConcatSpec)(e))&&(s.columns=u),(0,a.isVConcatSpec)(e)&&(s.columns=1);for(const t of d)if(void 0!==e[t])if("spacing"===t){const n=e[t];s[t]=(0,r.isNumber)(n)?n:{row:n.row??l,column:n.column??l}}else s[t]=e[t];return s}},53429:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isAnyConcatSpec:()=>i,isConcatSpec:()=>a,isHConcatSpec:()=>s,isVConcatSpec:()=>o});var r=n(79989);function i(e){return o(e)||s(e)||a(e)}function a(e){return(0,r.hasProperty)(e,"concat")}function o(e){return(0,r.hasProperty)(e,"vconcat")}function s(e){return(0,r.hasProperty)(e,"hconcat")}},51894:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isFacetFieldDef:()=>a,isFacetMapping:()=>i,isFacetSpec:()=>o});var r=n(79989);function i(e){return(0,r.hasProperty)(e,"row")||(0,r.hasProperty)(e,"column")}function a(e){return(0,r.hasProperty)(e,"header")}function o(e){return(0,r.hasProperty)(e,"facet")}},24777:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isAnyConcatSpec:()=>r.isAnyConcatSpec,isFacetSpec:()=>i.isFacetSpec,isHConcatSpec:()=>r.isHConcatSpec,isLayerSpec:()=>a.isLayerSpec,isRepeatSpec:()=>o.isRepeatSpec,isUnitSpec:()=>s.isUnitSpec,isVConcatSpec:()=>r.isVConcatSpec});var r=n(53429),i=n(51894),a=n(42524),o=n(31070),s=n(68859)},42524:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isLayerSpec:()=>i});var r=n(79989);function i(e){return(0,r.hasProperty)(e,"layer")}},56811:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SpecMapper:()=>u});var r=n(20916),i=n(53429),a=n(51894),o=n(42524),s=n(31070),l=n(68859);class u{map(e,t){return(0,a.isFacetSpec)(e)?this.mapFacet(e,t):(0,s.isRepeatSpec)(e)?this.mapRepeat(e,t):(0,i.isHConcatSpec)(e)?this.mapHConcat(e,t):(0,i.isVConcatSpec)(e)?this.mapVConcat(e,t):(0,i.isConcatSpec)(e)?this.mapConcat(e,t):this.mapLayerOrUnit(e,t)}mapLayerOrUnit(e,t){if((0,o.isLayerSpec)(e))return this.mapLayer(e,t);if((0,l.isUnitSpec)(e))return this.mapUnit(e,t);throw new Error(r.message.invalidSpec(e))}mapLayer(e,t){return{...e,layer:e.layer.map((e=>this.mapLayerOrUnit(e,t)))}}mapHConcat(e,t){return{...e,hconcat:e.hconcat.map((e=>this.map(e,t)))}}mapVConcat(e,t){return{...e,vconcat:e.vconcat.map((e=>this.map(e,t)))}}mapConcat(e,t){const{concat:n,...r}=e;return{...r,concat:n.map((e=>this.map(e,t)))}}mapFacet(e,t){return{...e,spec:this.map(e.spec,t)}}mapRepeat(e,t){return{...e,spec:this.map(e.spec,t)}}}},31070:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isLayerRepeatSpec:()=>o,isRepeatSpec:()=>a});var r=n(26372),i=n(79989);function a(e){return(0,i.hasProperty)(e,"repeat")}function o(e){return!(0,r.isArray)(e.repeat)&&(0,i.hasProperty)(e.repeat,"layer")}},48110:(e,t,n)=>{"use strict";n.r(t),n.d(t,{extractTopLevelProperties:()=>l,getFitType:()=>o,isFitType:()=>a});var r=n(95290),i=n(15058);function a(e){return["fit","fit-x","fit-y"].includes(e)}function o(e){return e?`fit-${(0,r.getPositionScaleChannel)(e)}`:"fit"}const s=["background","padding"];function l(e,t){const n={};for(const t of s)e&&void 0!==e[t]&&(n[t]=(0,i.signalRefOrValue)(e[t]));return t&&(n.params=e.params),n}},68859:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isUnitSpec:()=>i});var r=n(79989);function i(e){return(0,r.hasProperty)(e,"mark")}},68889:(e,t,n)=>{"use strict";n.r(t),n.d(t,{STACKABLE_MARKS:()=>p,STACK_BY_DEFAULT_MARKS:()=>h,isStackOffset:()=>f,stack:()=>y});var r=n(26372),i=n(54814),a=n(95290),o=n(79543),s=n(98348),l=n(20916),u=n(75028),c=n(31179);const d={zero:1,center:1,normalize:1};function f(e){return(0,r.hasOwnProperty)(d,e)}const p=new Set([u.ARC,u.BAR,u.AREA,u.RULE,u.POINT,u.CIRCLE,u.SQUARE,u.LINE,u.TEXT,u.TICK]),h=new Set([u.BAR,u.AREA,u.ARC]);function g(e){return(0,o.isFieldDef)(e)&&"quantitative"===(0,o.channelDefType)(e)&&!e.bin}function m(e,t,{orient:n,type:r}){const i="x"===t?"y":"radius",a="x"===t&&["bar","area"].includes(r),s=e[t],l=e[i];if((0,o.isFieldDef)(s)&&(0,o.isFieldDef)(l))if(g(s)&&g(l)){if(s.stack)return t;if(l.stack)return i;const e=(0,o.isFieldDef)(s)&&!!s.aggregate;if(e!==((0,o.isFieldDef)(l)&&!!l.aggregate))return e?t:i;if(a){if("vertical"===n)return i;if("horizontal"===n)return t}}else{if(g(s))return t;if(g(l))return i}else{if(g(s)){if(a&&"vertical"===n)return;return t}if(g(l)){if(a&&"horizontal"===n)return;return i}}}function y(e,t){const n=(0,u.isMarkDef)(e)?e:{type:e},d=n.type;if(!p.has(d))return null;const g=m(t,"x",n)||m(t,"theta",n);if(!g)return null;const y=t[g],v=(0,o.isFieldDef)(y)?(0,o.vgField)(y,{}):void 0,b=function(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}(g),w=[],x=new Set;if(t[b]){const e=t[b],n=(0,o.isFieldDef)(e)?(0,o.vgField)(e,{}):void 0;n&&n!==v&&(w.push(b),x.add(n))}const E="x"===b?"xOffset":"yOffset",S=t[E],_=(0,o.isFieldDef)(S)?(0,o.vgField)(S,{}):void 0;_&&_!==v&&(w.push(E),x.add(_));const A=a.NONPOSITION_CHANNELS.reduce(((e,n)=>{if("tooltip"!==n&&(0,s.channelHasField)(t,n)){const i=t[n];for(const t of(0,r.array)(i)){const r=(0,o.getFieldDef)(t);if(r.aggregate)continue;const i=(0,o.vgField)(r,{});i&&x.has(i)||e.push({channel:n,fieldDef:r})}}return e}),[]);let C;return void 0!==y.stack?C=(0,r.isBoolean)(y.stack)?y.stack?"zero":null:y.stack:h.has(d)&&(C="zero"),C&&f(C)?(0,s.isAggregate)(t)&&0===A.length?null:(y?.scale?.type&&y?.scale?.type!==c.ScaleType.LINEAR&&y?.stack&&l.warn(l.message.stackNonLinearScale(y.scale.type)),(0,o.isFieldOrDatumDef)(t[(0,a.getSecondaryRangeChannel)(g)])?(void 0!==y.stack&&l.warn(l.message.cannotStackRangedMark(g)),null):((0,o.isFieldDef)(y)&&y.aggregate&&!i.SUM_OPS.has(y.aggregate)&&l.warn(l.message.stackNonSummativeAggregate(y.aggregate)),{groupbyChannels:w,groupbyFields:x,fieldChannel:g,impute:null!==y.impute&&(0,u.isPathMark)(d),stackBy:A,offset:C})):null}},96598:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BINNED_TIMEUNIT_INDEX:()=>f,LOCAL_MULTI_TIMEUNIT_INDEX:()=>d,LOCAL_SINGLE_TIMEUNIT_INDEX:()=>s,TIMEUNIT_PARTS:()=>l,UTC_MULTI_TIMEUNIT_INDEX:()=>g,UTC_SINGLE_TIMEUNIT_INDEX:()=>c,VEGALITE_TIMEFORMAT:()=>v,containsTimeUnit:()=>x,durationExpr:()=>T,fieldExpr:()=>E,formatExpression:()=>_,getDateTimePartAndStep:()=>D,getLocalTimeUnitFromUTCTimeUnit:()=>y,getSmallestTimeUnitPart:()=>w,getTimeUnitParts:()=>b,isBinnedTimeUnit:()=>p,isBinnedTimeUnitString:()=>h,isDatePart:()=>R,isLocalSingleTimeUnit:()=>u,isUTCTimeUnit:()=>m,normalizeTimeUnit:()=>A,timeUnitSpecifierExpression:()=>S,timeUnitToString:()=>C});var r=n(26372),i=n(20032),a=n(79989),o=n(77390);const s={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},l=(0,a.keys)(s);function u(e){return(0,o.hasOwnProperty)(s,e)}const c={utcyear:1,utcquarter:1,utcmonth:1,utcweek:1,utcday:1,utcdayofyear:1,utcdate:1,utchours:1,utcminutes:1,utcseconds:1,utcmilliseconds:1},d={yearquarter:1,yearquartermonth:1,yearmonth:1,yearmonthdate:1,yearmonthdatehours:1,yearmonthdatehoursminutes:1,yearmonthdatehoursminutesseconds:1,yearweek:1,yearweekday:1,yearweekdayhours:1,yearweekdayhoursminutes:1,yearweekdayhoursminutesseconds:1,yeardayofyear:1,quartermonth:1,monthdate:1,monthdatehours:1,monthdatehoursminutes:1,monthdatehoursminutesseconds:1,weekday:1,weekdayhours:1,weekdayhoursminutes:1,weekdayhoursminutesseconds:1,dayhours:1,dayhoursminutes:1,dayhoursminutesseconds:1,hoursminutes:1,hoursminutesseconds:1,minutesseconds:1,secondsmilliseconds:1},f={binnedyear:1,binnedyearquarter:1,binnedyearquartermonth:1,binnedyearmonth:1,binnedyearmonthdate:1,binnedyearmonthdatehours:1,binnedyearmonthdatehoursminutes:1,binnedyearmonthdatehoursminutesseconds:1,binnedyearweek:1,binnedyearweekday:1,binnedyearweekdayhours:1,binnedyearweekdayhoursminutes:1,binnedyearweekdayhoursminutesseconds:1,binnedyeardayofyear:1,binnedutcyear:1,binnedutcyearquarter:1,binnedutcyearquartermonth:1,binnedutcyearmonth:1,binnedutcyearmonthdate:1,binnedutcyearmonthdatehours:1,binnedutcyearmonthdatehoursminutes:1,binnedutcyearmonthdatehoursminutesseconds:1,binnedutcyearweek:1,binnedutcyearweekday:1,binnedutcyearweekdayhours:1,binnedutcyearweekdayhoursminutes:1,binnedutcyearweekdayhoursminutesseconds:1,binnedutcyeardayofyear:1};function p(e){return(0,r.isObject)(e)?e.binned:h(e)}function h(e){return e&&e.startsWith("binned")}const g={utcyearquarter:1,utcyearquartermonth:1,utcyearmonth:1,utcyearmonthdate:1,utcyearmonthdatehours:1,utcyearmonthdatehoursminutes:1,utcyearmonthdatehoursminutesseconds:1,utcyearweek:1,utcyearweekday:1,utcyearweekdayhours:1,utcyearweekdayhoursminutes:1,utcyearweekdayhoursminutesseconds:1,utcyeardayofyear:1,utcquartermonth:1,utcmonthdate:1,utcmonthdatehours:1,utcmonthdatehoursminutes:1,utcmonthdatehoursminutesseconds:1,utcweekday:1,utcweekdayhours:1,utcweekdayhoursminutes:1,utcweekdayhoursminutesseconds:1,utcdayhours:1,utcdayhoursminutes:1,utcdayhoursminutesseconds:1,utchoursminutes:1,utchoursminutesseconds:1,utcminutesseconds:1,utcsecondsmilliseconds:1};function m(e){return e.startsWith("utc")}function y(e){return e.substring(3)}const v={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function b(e){return l.filter((t=>x(e,t)))}function w(e){const t=b(e);return t[t.length-1]}function x(e,t){const n=e.indexOf(t);return!(n<0||n>0&&"seconds"===t&&"i"===e.charAt(n-1)||e.length>n+3&&"day"===t&&"o"===e.charAt(n+3)||n>0&&"year"===t&&"f"===e.charAt(n-1))}function E(e,t,{end:n}={end:!1}){const r=(0,a.accessPathWithDatum)(t),o=m(e)?"utc":"";let s;const u={};for(const t of l)x(e,t)&&(u[t]="quarter"===(c=t)?`(${o}quarter(${r})-1)`:`${o}${c}(${r})`,s=t);var c;return n&&(u[s]+="+1"),(0,i.dateTimeExprToExpr)(u)}function S(e){if(!e)return;const t=b(e);return`timeUnitSpecifier(${(0,a.stringify)(t)}, ${(0,a.stringify)(v)})`}function _(e,t,n){if(!e)return;const r=S(e);return`${n||m(e)?"utc":"time"}Format(${t}, ${r})`}function A(e){if(!e)return;let t;return(0,r.isString)(e)?t=h(e)?{unit:e.substring(6),binned:!0}:{unit:e}:(0,r.isObject)(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),m(t.unit)&&(t.utc=!0,t.unit=y(t.unit)),t}function C(e){const{utc:t,...n}=A(e);return n.unit?(t?"utc":"")+(0,a.keys)(n).map((e=>(0,a.varName)(`${"unit"===e?"":`_${e}_`}${n[e]}`))).join(""):(t?"utc":"")+"timeunit"+(0,a.keys)(n).map((e=>(0,a.varName)(`_${e}_${n[e]}`))).join("")}function T(e,t=e=>e){const n=A(e),r=w(n.unit);if(r&&"day"!==r){const e={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:a,part:o}=D(r,n.step),s={...e,[o]:+e[o]+a};return`${t((0,i.dateTimeToExpr)(s))} - ${t((0,i.dateTimeToExpr)(e))}`}}const k={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function R(e){return(0,o.hasOwnProperty)(k,e)}function D(e,t=1){if(R(e))return{part:e,step:t};switch(e){case"day":case"dayofyear":return{part:"date",step:t};case"quarter":return{part:"month",step:3*t};case"week":return{part:"date",step:7*t}}}},76447:(e,t,n)=>{"use strict";n.r(t),n.d(t,{extractTitleConfig:()=>a,isText:()=>o});var r=n(26372),i=n(79989);function a(e){const{anchor:t,frame:n,offset:r,orient:a,angle:o,limit:s,color:l,subtitleColor:u,subtitleFont:c,subtitleFontSize:d,subtitleFontStyle:f,subtitleFontWeight:p,subtitleLineHeight:h,subtitlePadding:g,...m}=e,y={...t?{anchor:t}:{},...n?{frame:n}:{},...r?{offset:r}:{},...a?{orient:a}:{},...void 0!==o?{angle:o}:{},...void 0!==s?{limit:s}:{}},v={...u?{subtitleColor:u}:{},...c?{subtitleFont:c}:{},...d?{subtitleFontSize:d}:{},...f?{subtitleFontStyle:f}:{},...p?{subtitleFontWeight:p}:{},...h?{subtitleLineHeight:h}:{},...g?{subtitlePadding:g}:{}};return{titleMarkConfig:{...m,...l?{fill:l}:{}},subtitleMarkConfig:(0,i.pick)(e,["align","baseline","dx","dy","limit"]),nonMarkTitleProperties:y,subtitle:v}}function o(e){return(0,r.isString)(e)||(0,r.isArray)(e)&&(0,r.isString)(e[0])}},65393:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isAggregate:()=>_,isBin:()=>x,isCalculate:()=>w,isDensity:()=>f,isExtent:()=>T,isFilter:()=>o,isFlatten:()=>b,isFold:()=>C,isImpute:()=>E,isImputeSequence:()=>s,isJoinAggregate:()=>v,isLoess:()=>g,isLookup:()=>l,isLookupData:()=>u,isLookupSelection:()=>c,isPivot:()=>d,isQuantile:()=>p,isRegression:()=>h,isSample:()=>m,isStack:()=>A,isTimeUnit:()=>S,isWindow:()=>y,normalizeTransform:()=>k});var r=n(90386),i=n(4976),a=n(79989);function o(e){return(0,a.hasProperty)(e,"filter")}function s(e){return(0,a.hasProperty)(e,"stop")}function l(e){return(0,a.hasProperty)(e,"lookup")}function u(e){return(0,a.hasProperty)(e,"data")}function c(e){return(0,a.hasProperty)(e,"param")}function d(e){return(0,a.hasProperty)(e,"pivot")}function f(e){return(0,a.hasProperty)(e,"density")}function p(e){return(0,a.hasProperty)(e,"quantile")}function h(e){return(0,a.hasProperty)(e,"regression")}function g(e){return(0,a.hasProperty)(e,"loess")}function m(e){return(0,a.hasProperty)(e,"sample")}function y(e){return(0,a.hasProperty)(e,"window")}function v(e){return(0,a.hasProperty)(e,"joinaggregate")}function b(e){return(0,a.hasProperty)(e,"flatten")}function w(e){return(0,a.hasProperty)(e,"calculate")}function x(e){return(0,a.hasProperty)(e,"bin")}function E(e){return(0,a.hasProperty)(e,"impute")}function S(e){return(0,a.hasProperty)(e,"timeUnit")}function _(e){return(0,a.hasProperty)(e,"aggregate")}function A(e){return(0,a.hasProperty)(e,"stack")}function C(e){return(0,a.hasProperty)(e,"fold")}function T(e){return(0,a.hasProperty)(e,"extent")&&!(0,a.hasProperty)(e,"density")&&!(0,a.hasProperty)(e,"regression")}function k(e){return e.map((e=>o(e)?{filter:(0,r.normalizeLogicalComposition)(e.filter,i.normalizePredicate)}:e))}},99273:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GEOJSON:()=>p,NOMINAL:()=>f,ORDINAL:()=>c,QUANTITATIVE:()=>u,TEMPORAL:()=>d,TYPES:()=>h,Type:()=>a,getFullName:()=>g,isContinuous:()=>s,isDiscrete:()=>l,isType:()=>o});var r=n(26372),i=n(79989);const a={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function o(e){return(0,r.hasOwnProperty)(a,e)}function s(e){return"quantitative"===e||"temporal"===e}function l(e){return"ordinal"===e||"nominal"===e}const u=a.quantitative,c=a.ordinal,d=a.temporal,f=a.nominal,p=a.geojson,h=(0,i.keys)(a);function g(e){if(e)switch(e=e.toLowerCase()){case"q":case u:return"quantitative";case"t":case d:return"temporal";case"o":case c:return"ordinal";case"n":case f:return"nominal";case p:return"geojson"}}},79989:(e,t,n)=>{"use strict";n.r(t),n.d(t,{accessPathDepth:()=>$,accessPathWithDatum:()=>O,contains:()=>d,deepEqual:()=>W,deleteNestedProperty:()=>R,duplicate:()=>a,entries:()=>A,every:()=>p,fieldIntersection:()=>x,flatAccessWithDatum:()=>N,getFirstDefined:()=>L,hasIntersection:()=>b,hasProperty:()=>X,hash:()=>u,internalField:()=>q,isBoolean:()=>C,isEmpty:()=>E,isEqual:()=>y,isInternalField:()=>j,isNullOrFalse:()=>c,isNumeric:()=>G,keys:()=>S,logicalExpr:()=>k,mergeDeep:()=>h,never:()=>o,normalizeAngle:()=>H,omit:()=>l,pick:()=>s,prefixGenerator:()=>w,removePathFromField:()=>I,replaceAll:()=>M,replacePathInField:()=>P,resetIdCounter:()=>z,setEqual:()=>v,some:()=>f,stringify:()=>Y,titleCase:()=>D,unique:()=>m,uniqueId:()=>U,vals:()=>_,varName:()=>T});var r=n(26372),i=n(90386);const a=structuredClone;function o(e){throw new Error(e)}function s(e,t){const n={};for(const i of t)(0,r.hasOwnProperty)(e,i)&&(n[i]=e[i]);return n}function l(e,t){const n={...e};for(const e of t)delete n[e];return n}function u(e){if((0,r.isNumber)(e))return e;const t=(0,r.isString)(e)?e:Y(e);if(t.length<250)return t;let n=0;for(let e=0;e0===t?e:`[${e}]`)),i=e.map(((t,n)=>e.slice(0,n+1).join("")));for(const e of i)t.add(e)}return t}function x(e,t){return void 0===e||void 0===t||b(w(e),w(t))}function E(e){return 0===S(e).length}Set.prototype.toJSON=function(){return`Set(${[...this].map((e=>Y(e))).join(",")})`};const S=Object.keys,_=Object.values,A=Object.entries;function C(e){return!0===e||!1===e}function T(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function k(e,t){return(0,i.isLogicalNot)(e)?`!(${k(e.not,t)})`:(0,i.isLogicalAnd)(e)?`(${e.and.map((e=>k(e,t))).join(") && (")})`:(0,i.isLogicalOr)(e)?`(${e.or.map((e=>k(e,t))).join(") || (")})`:t(e)}function R(e,t){if(0===t.length)return!0;const n=t.shift();return n in e&&R(e[n],t)&&delete e[n],E(e)}function D(e){return e.charAt(0).toUpperCase()+e.substr(1)}function O(e,t="datum"){const n=(0,r.splitAccessPath)(e),i=[];for(let e=1;e<=n.length;e++){const a=`[${n.slice(0,e).map(r.stringValue).join("][")}]`;i.push(`${t}${a}`)}return i.join(" && ")}function N(e,t="datum"){return`${t}[${(0,r.stringValue)((0,r.splitAccessPath)(e).join("."))}]`}function F(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function P(e){return`${(0,r.splitAccessPath)(e).map(F).join("\\.")}`}function M(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function I(e){return`${(0,r.splitAccessPath)(e).join(".")}`}function $(e){return e?(0,r.splitAccessPath)(e).length:0}function L(...e){return e.find((e=>void 0!==e))}let B=42;function U(e){const t=++B;return e?String(e)+t:t}function z(){B=42}function q(e){return j(e)?e:`__${e}`}function j(e){return e.startsWith("__")}function H(e){if(void 0!==e)return(e%360+360)%360}function G(e){return!!(0,r.isNumber)(e)||!isNaN(e)&&!isNaN(parseFloat(e))}const V=Object.getPrototypeOf(structuredClone({}));function W(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor.name!==t.constructor.name)return!1;let n,r;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!W(e[r],t[r]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;for(const n of e.entries())if(!W(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf!==V.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString!==V.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(!W(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Y(e){const t=[];return function e(n){if(n&&n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0===n)return;if("number"==typeof n)return isFinite(n)?""+n:"null";if("object"!=typeof n)return JSON.stringify(n);let r,i;if(Array.isArray(n)){for(i="[",r=0;r{"use strict";n.r(t),n.d(t,{VG_CORNERRADIUS_CHANNELS:()=>f,VG_MARK_CONFIGS:()=>c,VG_MARK_INDEX:()=>d,isDataRefDomain:()=>u,isDataRefUnionedDomain:()=>s,isFieldRefUnionDomain:()=>l,isSignalRef:()=>a,isVgRangeStep:()=>o});var r=n(26372),i=n(79989);function a(e){return(0,i.hasProperty)(e,"signal")}function o(e){return(0,i.hasProperty)(e,"step")}function s(e){return!(0,r.isArray)(e)&&(0,i.hasProperty)(e,"fields")&&!(0,i.hasProperty)(e,"data")}function l(e){return!(0,r.isArray)(e)&&(0,i.hasProperty)(e,"fields")&&(0,i.hasProperty)(e,"data")}function u(e){return!(0,r.isArray)(e)&&(0,i.hasProperty)(e,"field")&&(0,i.hasProperty)(e,"data")}const c=(0,i.keys)({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1}),d={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},f=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"]},83418:(e,t,n)=>{"use strict";n.r(t),n.d(t,{format:()=>k,formats:()=>R,inferType:()=>x,inferTypes:()=>E,loader:()=>N,read:()=>O,responseType:()=>D,typeParsers:()=>v});var r=n(26372),i=n(84112),a=n(12196),o=n(40300);const s=/^(data:|([A-Za-z]+:)?\/\/)/,l=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,u=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g;async function c(e,t){const n=await this.sanitize(e,t),r=n.href;return n.localFile?this.file(r):this.http(r,t)}async function d(e,t){t=(0,r.extend)({},this.options,t);const n=this.fileAccess,i={href:null};let a,o,c;const d=l.test(e.replace(u,""));null!=e&&"string"==typeof e&&d||(0,r.error)("Sanitize failure, invalid URI: "+(0,r.stringValue)(e));const f=s.test(e);return(c=t.baseURL)&&!f&&(e.startsWith("/")||c.endsWith("/")||(e="/"+e),e=c+e),o=(a=e.startsWith("file://"))||"file"===t.mode||"http"!==t.mode&&!f&&n,a?e=e.slice(7):e.startsWith("//")&&("file"===t.defaultProtocol?(e=e.slice(2),o=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(i,"localFile",{value:!!o}),i.href=e,t.target&&(i.target=t.target+""),t.rel&&(i.rel=t.rel+""),"image"===t.context&&t.crossOrigin&&(i.crossOrigin=t.crossOrigin+""),i}function f(e){return e?t=>new Promise(((n,r)=>{e.readFile(t,((e,t)=>{e?r(e):n(t)}))})):p}async function p(){(0,r.error)("No file system access.")}function h(e){return e?async function(t,n){const i=(0,r.extend)({},this.options.http,n),a=n&&n.response,o=await e(t,i);return o.ok?(0,r.isFunction)(o[a])?o[a]():o.text():(0,r.error)(o.status+""+o.statusText)}:g}async function g(){(0,r.error)("No HTTP fetch method available.")}const m=e=>null!=e&&e==e,y=e=>!(Number.isNaN(+e)||e instanceof Date),v={boolean:r.toBoolean,integer:r.toNumber,number:r.toNumber,date:r.toDate,string:r.toString,unknown:r.identity},b=[e=>"true"===e||"false"===e||!0===e||!1===e,e=>y(e)&&Number.isInteger(+e),y,e=>!Number.isNaN(Date.parse(e))],w=["boolean","integer","number","date"];function x(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=b.length,i=b.map(((e,t)=>t+1));for(let a,o,s=0,l=0;s0===e?t:e),0)-1]}function E(e,t){return t.reduce(((t,n)=>(t[n]=x(e,n),t)),{})}function S(e){const t=function(t,n){const i={delimiter:e};return _(t,n?(0,r.extend)(n,i):i)};return t.responseType="text",t}function _(e,t){return t.header&&(e=t.header.map(r.stringValue).join(t.delimiter)+"\n"+e),(0,i.dsvFormat)(t.delimiter).parse(e+"")}function A(e,t){const n=t&&t.property?(0,r.field)(t.property):r.identity;return!(0,r.isObject)(e)||(i=e,"function"==typeof Buffer&&(0,r.isFunction)(Buffer.isBuffer)&&Buffer.isBuffer(i))?n(JSON.parse(e)):function(e,t){return!(0,r.isArray)(e)&&(0,r.isIterable)(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}(n(e),t);var i}_.responseType="text",A.responseType="json";const C={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function T(e,t){let n,i,o,s;return e=A(e,t),t&&t.feature?(n=a.feature,o=t.feature):t&&t.mesh?(n=a.mesh,o=t.mesh,s=C[t.filter]):(0,r.error)("Missing TopoJSON feature or mesh parameter."),i=(i=e.objects[o])?n(e,i,s):(0,r.error)("Invalid TopoJSON object: "+o),i&&i.features||[i]}T.responseType="json";const k={dsv:_,csv:S(","),tsv:S("\t"),json:A,topojson:T};function R(e,t){return arguments.length>1?(k[e]=t,this):(0,r.hasOwnProperty)(k,e)?k[e]:null}function D(e){const t=R(e);return t&&t.responseType||"text"}function O(e,t,n,i){const a=R((t=t||{}).type||"json");return a||(0,r.error)("Unknown data format type: "+t.type),e=a(e,t),t.parse&&function(e,t,n,r){if(!e.length)return;const i=(0,o.timeFormatDefaultLocale)();n=n||i.timeParse,r=r||i.utcParse;let a,s,l,u,c,d,f=e.columns||Object.keys(e[0]);"auto"===t&&(t=E(e,f)),f=Object.keys(t);const p=f.map((e=>{const i=t[e];let a,o;if(i&&(i.startsWith("date:")||i.startsWith("utc:")))return a=i.split(/:(.+)?/,2),o=a[1],("'"===o[0]&&"'"===o[o.length-1]||'"'===o[0]&&'"'===o[o.length-1])&&(o=o.slice(1,-1)),("utc"===a[0]?r:n)(o);if(!v[i])throw Error("Illegal format pattern: "+e+":"+i);return v[i]}));for(l=0,c=e.length,d=f.length;l({options:t||{},sanitize:d,load:c,fileAccess:!1,file:f(null),http:h(e)})}("undefined"!=typeof fetch&&fetch)},36808:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AxisDomainRole:()=>x,AxisGridRole:()=>E,AxisLabelRole:()=>S,AxisRole:()=>w,AxisTickRole:()=>_,AxisTitleRole:()=>A,DataScope:()=>Tn,FrameRole:()=>v,LegendEntryRole:()=>k,LegendLabelRole:()=>D,LegendRole:()=>C,LegendSymbolRole:()=>O,LegendTitleRole:()=>N,MarkRole:()=>y,Scope:()=>fr,ScopeRole:()=>b,config:()=>yr,parse:()=>vr,signal:()=>X,signalUpdates:()=>ve,stream:()=>de});var r=n(26372),i=n(31926),a=n(45948),o=n(14588),s=n(24988);function l(e){return(0,r.isObject)(e)?e:{type:e||"pad"}}const u=e=>+e||0,c=e=>({top:e,bottom:e,left:e,right:e});function d(e){return(0,r.isObject)(e)?e.signal?e:{top:u(e.top),bottom:u(e.bottom),left:u(e.left),right:u(e.right)}:c(u(e))}const f=e=>(0,r.isObject)(e)&&!(0,r.isArray)(e)?(0,r.extend)({},e):{value:e};function p(e,t,n,i){return null!=n?((0,r.isObject)(n)&&!(0,r.isArray)(n)||(0,r.isArray)(n)&&n.length&&(0,r.isObject)(n[0])?e.update[t]=n:e[i||"enter"][t]={value:n},1):0}function h(e,t,n){for(const n in t)p(e,n,t[n]);for(const t in n)p(e,t,n[t],"update")}function g(e,t,n){for(const i in t)n&&(0,r.hasOwnProperty)(n,i)||(e[i]=(0,r.extend)(e[i]||{},t[i]));return e}function m(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const y="mark",v="frame",b="scope",w="axis",x="axis-domain",E="axis-grid",S="axis-label",_="axis-tick",A="axis-title",C="legend",T="legend-band",k="legend-entry",R="legend-gradient",D="legend-label",O="legend-symbol",N="legend-title",F="title",P="title-text",M="title-subtitle";function I(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}const $=e=>(0,r.isString)(e)?(0,r.stringValue)(e):e.signal?`(${e.signal})`:z(e);function L(e){if(null!=e.gradient)return function(e){const t=[e.start,e.stop,e.count].map((e=>null==e?null:(0,r.stringValue)(e)));for(;t.length&&null==(0,r.peek)(t);)t.pop();return t.unshift($(e.gradient)),`gradient(${t.join(",")})`}(e);let t=e.signal?`(${e.signal})`:e.color?function(e){return e.c?B("hcl",e.h,e.c,e.l):e.h||e.s?B("hsl",e.h,e.s,e.l):e.l||e.a?B("lab",e.l,e.a,e.b):e.r||e.g||e.b?B("rgb",e.r,e.g,e.b):null}(e.color):null!=e.field?z(e.field):void 0!==e.value?(0,r.stringValue)(e.value):void 0;return null!=e.scale&&(t=function(e,t){const n=$(e.scale);return null!=e.range?t=`lerp(_range(${n}), ${+e.range})`:(void 0!==t&&(t=`_scale(${n}, ${t})`),e.band&&(t=(t?t+"+":"")+`_bandwidth(${n})`+(1==+e.band?"":"*"+U(e.band)),e.extra&&(t=`(datum.extra ? _scale(${n}, datum.extra.value) : ${t})`)),null==t&&(t="0")),t}(e,t)),void 0===t&&(t=null),null!=e.exponent&&(t=`pow(${t},${U(e.exponent)})`),null!=e.mult&&(t+=`*${U(e.mult)}`),null!=e.offset&&(t+=`+${U(e.offset)}`),e.round&&(t=`round(${t})`),t}const B=(e,t,n,r)=>`(${e}(${[t,n,r].map(L).join(",")})+'')`;function U(e){return(0,r.isObject)(e)?"("+L(e)+")":e}function z(e){return q((0,r.isObject)(e)?e:{datum:e})}function q(e){let t,n,i;if(e.signal)t="datum",i=e.signal;else if(e.group||e.parent){for(n=Math.max(1,e.level||1),t="item";n-- >0;)t+=".mark.group";e.parent?(i=e.parent,t+=".datum"):i=e.group}else e.datum?(t="datum",i=e.datum):(0,r.error)("Invalid field reference: "+(0,r.stringValue)(e));return e.signal||(i=(0,r.isString)(i)?(0,r.splitAccessPath)(i).map(r.stringValue).join("]["):q(i)),t+"["+i+"]"}function j(e,t,n,i,a,o){const s={};(o=o||{}).encoders={$encode:s},e=function(e,t,n,i,a){const o={},s={};let l,u,c,d;for(u in u="lineBreak","text"!==t||null==a[u]||m(u,e)||I(o,u,a[u]),("legend"==n||String(n).startsWith("axis"))&&(n=null),d=n===v?a.group:n===y?(0,r.extend)({},a.mark,a[t]):null,d)c=m(u,e)||("fill"===u||"stroke"===u)&&(m("fill",e)||m("stroke",e)),c||I(o,u,d[u]);for(u in(0,r.array)(i).forEach((t=>{const n=a.style&&a.style[t];for(const t in n)m(t,e)||I(o,t,n[t])})),e=(0,r.extend)({},e),o)d=o[u],d.signal?(l=l||{})[u]=d:s[u]=d;return e.enter=(0,r.extend)(s,e.enter),l&&(e.update=(0,r.extend)(l,e.update)),e}(e,t,n,i,a.config);for(const n in e)s[n]=H(e[n],t,o,a);return o}function H(e,t,n,i){const a={},o={};for(const t in e)null!=e[t]&&(a[t]=G((s=e[t],(0,r.isArray)(s)?function(e){let t="";return e.forEach((e=>{const n=L(e);t+=e.test?`(${e.test})?${n}:`:n})),":"===(0,r.peek)(t)&&(t+="null"),t}(s):L(s)),i,n,o));var s;return{$expr:{marktype:t,channels:a},$fields:Object.keys(o),$output:Object.keys(e)}}function G(e,t,n,a){const o=(0,i.parseExpression)(e,t);return o.$fields.forEach((e=>a[e]=1)),(0,r.extend)(n,o.$params),o.$expr}const V="outer",W=["value","update","init","react","bind"];function Y(e,t){(0,r.error)(e+' for "outer" push: '+(0,r.stringValue)(t))}function X(e,t){const n=e.name;if(e.push===V)t.signals[n]||Y("No prior signal definition",n),W.forEach((t=>{void 0!==e[t]&&Y("Invalid property ",t)}));else{const r=t.addSignal(n,e.value);!1===e.react&&(r.react=!1),e.bind&&t.addBinding(n,e.bind)}}function K(e,t,n,r){this.id=-1,this.type=e,this.value=t,this.params=n,r&&(this.parent=r)}function J(e,t,n,r){return new K(e,t,n,r)}function Q(e,t){return J("operator",e,t)}function Z(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function ee(e,t){return t?{$field:e,$name:t}:{$field:e}}const te=ee("key");function ne(e,t){return{$compare:e,$order:t}}function re(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const ie="scope",ae="view";function oe(e){return e&&e.signal}function se(e){if(oe(e))return!0;if((0,r.isObject)(e))for(const t in e)if(se(e[t]))return!0;return!1}function le(e,t){return null!=e?e:t}function ue(e){return e&&e.signal||e}const ce="timer";function de(e,t){return(e.merge?fe:e.stream?pe:e.type?he:(0,r.error)("Invalid stream specification: "+(0,r.stringValue)(e)))(e,t)}function fe(e,t){const n=ge({merge:e.merge.map((e=>de(e,t)))},e,t);return t.addStream(n).id}function pe(e,t){const n=ge({stream:de(e.stream,t)},e,t);return t.addStream(n).id}function he(e,t){let n;var r;e.type===ce?(n=t.event(ce,e.throttle),e={between:e.between,filter:e.filter}):n=t.event((r=e.source)===ie?ae:r||ae,e.type);const i=ge({stream:n},e,t);return 1===Object.keys(i).length?n:t.addStream(i).id}function ge(e,t,n){let a=t.between;return a&&(2!==a.length&&(0,r.error)('Stream "between" parameter must have 2 entries: '+(0,r.stringValue)(t)),e.between=[de(a[0],n),de(a[1],n)]),a=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&a.push(function(e,t,n){const r="event.item";return r+(e&&"*"!==e?"&&"+r+".mark.marktype==='"+e+"'":"")+(n?"&&"+r+".mark.role==='"+n+"'":"")+(t?"&&"+r+".mark.name==='"+t+"'":"")}(t.marktype,t.markname,t.markrole)),t.source===ie&&a.push("inScope(event.item)"),a.length&&(e.filter=(0,i.parseExpression)("("+a.join(")&&(")+")",n).$expr),null!=(a=t.throttle)&&(e.throttle=+a),null!=(a=t.debounce)&&(e.debounce=+a),t.consume&&(e.consume=!0),e}const me={code:"_.$value",ast:{type:"Identifier",value:"value"}};function ye(e){return{signal:"["+e.map((e=>e.scale?'scale("'+e.scale+'")':e.signal))+"]"}}function ve(e,t){const n=t.getSignal(e.name);let o=e.update;e.init&&(o?(0,r.error)("Signals can not include both init and update expressions."):(o=e.init,n.initonly=!0)),o&&(o=(0,i.parseExpression)(o,t),n.update=o.$expr,n.params=o.$params),e.on&&e.on.forEach((e=>function(e,t,n){const o=e.encode,s={target:n};let l=e.events,u=e.update,c=[];l||(0,r.error)("Signal update missing events specification."),(0,r.isString)(l)&&(l=(0,a.parseSelector)(l,t.isSubscope()?ie:ae)),l=(0,r.array)(l).filter((e=>e.signal||e.scale?(c.push(e),0):1)),c.length>1&&(c=[ye(c)]),l.length&&c.push(l.length>1?{merge:l}:l[0]),null!=o&&(u&&(0,r.error)("Signal encode and update are mutually exclusive."),u="encode(item(),"+(0,r.stringValue)(o)+")"),s.update=(0,r.isString)(u)?(0,i.parseExpression)(u,t):null!=u.expr?(0,i.parseExpression)(u.expr,t):null!=u.value?u.value:null!=u.signal?{$expr:me,$params:{$value:t.signalRef(u.signal)}}:(0,r.error)("Invalid signal update specification."),e.force&&(s.options={force:!0}),c.forEach((e=>t.addUpdate((0,r.extend)(function(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):de(e,t)}}(e,t),s))))}(e,t,n.id)))}const be=e=>(t,n,r)=>J(e,n,t||void 0,r),we=be("aggregate"),xe=be("axisticks"),Ee=be("bound"),Se=be("collect"),_e=be("compare"),Ae=be("datajoin"),Ce=be("encode"),Te=be("expression"),ke=be("facet"),Re=be("field"),De=be("key"),Oe=be("legendentries"),Ne=be("load"),Fe=be("mark"),Pe=be("multiextent"),Me=be("multivalues"),Ie=be("overlap"),$e=be("params"),Le=be("prefacet"),Be=be("projection"),Ue=be("proxy"),ze=be("relay"),qe=be("render"),je=be("scale"),He=be("sieve"),Ge=be("sortitems"),Ve=be("viewlayout"),We=be("values");let Ye=0;const Xe={min:"min",max:"max",count:"sum"};function Ke(e,t){const n=t.getScale(e.name).params;let i;for(i in n.domain=et(e.domain,e,t),null!=e.range&&(n.range=lt(e,t,n)),null!=e.interpolate&&function(e,t){t.interpolate=Je(e.type||e),null!=e.gamma&&(t.interpolateGamma=Je(e.gamma))}(e.interpolate,n),null!=e.nice&&(n.nice=function(e,t){return e.signal?t.signalRef(e.signal):(0,r.isObject)(e)?{interval:Je(e.interval),step:Je(e.step)}:Je(e)}(e.nice,t)),null!=e.bins&&(n.bins=function(e,t){return e.signal||(0,r.isArray)(e)?Qe(e,t):t.objectProperty(e)}(e.bins,t)),e)(0,r.hasOwnProperty)(n,i)||"name"===i||(n[i]=Je(e[i],t))}function Je(e,t){return(0,r.isObject)(e)?e.signal?t.signalRef(e.signal):(0,r.error)("Unsupported object: "+(0,r.stringValue)(e)):e}function Qe(e,t){return e.signal?t.signalRef(e.signal):e.map((e=>Je(e,t)))}function Ze(e){(0,r.error)("Can not find data set: "+(0,r.stringValue)(e))}function et(e,t,n){if(e)return e.signal?n.signalRef(e.signal):((0,r.isArray)(e)?tt:e.fields?rt:nt)(e,t,n);null==t.domainMin&&null==t.domainMax||(0,r.error)("No scale domain defined for domainMin/domainMax to override.")}function tt(e,t,n){return e.map((e=>Je(e,n)))}function nt(e,t,n){const r=n.getData(e.data);return r||Ze(e.data),(0,o.isDiscrete)(t.type)?r.valuesRef(n,e.field,at(e.sort,!1)):(0,o.isQuantile)(t.type)?r.domainRef(n,e.field):r.extentRef(n,e.field)}function rt(e,t,n){const i=e.data,a=e.fields.reduce(((e,t)=>(t=(0,r.isString)(t)?{data:i,field:t}:(0,r.isArray)(t)||t.signal?function(e,t){const n="_:vega:_"+Ye++,i=Se({});if((0,r.isArray)(e))i.value={$ingest:e};else if(e.signal){const a="setdata("+(0,r.stringValue)(n)+","+e.signal+")";i.params.input=t.signalRef(a)}return t.addDataPipeline(n,[i,He({})]),{data:n,field:"data"}}(t,n):t,e.push(t),e)),[]);return((0,o.isDiscrete)(t.type)?it:(0,o.isQuantile)(t.type)?ot:st)(e,n,a)}function it(e,t,n){const r=at(e.sort,!0);let i,a;const o=n.map((e=>{const n=t.getData(e.data);return n||Ze(e.data),n.countsRef(t,e.field,r)})),s={groupby:te,pulse:o};r&&(i=r.op||"count",a=r.field?re(i,r.field):"count",s.ops=[Xe[i]],s.fields=[t.fieldRef(a)],s.as=[a]),i=t.add(we(s));const l=t.add(Se({pulse:Z(i)}));return a=t.add(We({field:te,sort:t.sortRef(r),pulse:Z(l)})),Z(a)}function at(e,t){return e&&(e.field||e.op?e.field||"count"===e.op?t&&e.field&&e.op&&!Xe[e.op]&&(0,r.error)("Multiple domain scales can not be sorted using "+e.op):(0,r.error)("No field provided for sort aggregate op: "+e.op):(0,r.isObject)(e)?e.field="key":e={field:"key"}),e}function ot(e,t,n){const r=n.map((e=>{const n=t.getData(e.data);return n||Ze(e.data),n.domainRef(t,e.field)}));return Z(t.add(Me({values:r})))}function st(e,t,n){const r=n.map((e=>{const n=t.getData(e.data);return n||Ze(e.data),n.extentRef(t,e.field)}));return Z(t.add(Pe({extents:r})))}function lt(e,t,n){const i=t.config.range;let a=e.range;if(a.signal)return t.signalRef(a.signal);if((0,r.isString)(a)){if(i&&(0,r.hasOwnProperty)(i,a))return lt(e=(0,r.extend)({},e,{range:i[a]}),t,n);"width"===a?a=[0,{signal:"width"}]:"height"===a?a=(0,o.isDiscrete)(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:(0,r.error)("Unrecognized scale range value: "+(0,r.stringValue)(a))}else{if(a.scheme)return n.scheme=(0,r.isArray)(a.scheme)?Qe(a.scheme,t):Je(a.scheme,t),a.extent&&(n.schemeExtent=Qe(a.extent,t)),void(a.count&&(n.schemeCount=Je(a.count,t)));if(a.step)return void(n.rangeStep=Je(a.step,t));if((0,o.isDiscrete)(e.type)&&!(0,r.isArray)(a))return et(a,e,t);(0,r.isArray)(a)||(0,r.error)("Unsupported range type: "+(0,r.stringValue)(a))}return a.map((e=>((0,r.isArray)(e)?Qe:Je)(e,t)))}function ut(e,t,n){return(0,r.isArray)(e)?e.map((e=>ut(e,t,n))):(0,r.isObject)(e)?e.signal?n.signalRef(e.signal):"fit"===t?e:(0,r.error)("Unsupported parameter object: "+(0,r.stringValue)(e)):e}const ct="top",dt="left",ft="right",pt="bottom",ht="center",gt="vertical",mt="start",yt="end",vt="index",bt="label",wt="offset",xt="perc",Et="perc2",St="value",_t="guide-label",At="guide-title",Ct="group-title",Tt="group-subtitle",kt="symbol",Rt="gradient",Dt="discrete",Ot="size",Nt=[Ot,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],Ft={name:1,style:1,interactive:1},Pt={value:0},Mt={value:1},It="group",$t="rect",Lt="rule",Bt="symbol",Ut="text";function zt(e){return e.type=It,e.interactive=e.interactive||!1,e}function qt(e,t){const n=(n,r)=>le(e[n],le(t[n],r));return n.isVertical=n=>gt===le(e.direction,t.direction||(n?t.symbolDirection:t.gradientDirection)),n.gradientLength=()=>le(e.gradientLength,t.gradientLength||t.gradientWidth),n.gradientThickness=()=>le(e.gradientThickness,t.gradientThickness||t.gradientHeight),n.entryColumns=()=>le(e.columns,le(t.columns,+n.isVertical(!0))),n}function jt(e,t){const n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function Ht(e,t,n){return`item.anchor === '${mt}' ? ${e} : item.anchor === '${yt}' ? ${t} : ${n}`}const Gt=Ht((0,r.stringValue)(dt),(0,r.stringValue)(ft),(0,r.stringValue)(ht));function Vt(e,t){return t?e?(0,r.isObject)(e)?Object.assign({},e,{offset:Vt(e.offset,t)}):{value:e,offset:t}:t:e}function Wt(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=g(e.encode,t,Ft)):e.interactive=!1,e}function Yt(e,t,n,i){const a=qt(e,n),o=a.isVertical(),s=a.gradientThickness(),l=a.gradientLength();let u,c,d,p,g;o?(c=[0,1],d=[0,0],p=s,g=l):(c=[0,0],d=[1,0],p=l,g=s);const m={enter:u={opacity:Pt,x:Pt,y:Pt,width:f(p),height:f(g)},update:(0,r.extend)({},u,{opacity:Mt,fill:{gradient:t,start:c,stop:d}}),exit:{opacity:Pt}};return h(m,{stroke:a("gradientStrokeColor"),strokeWidth:a("gradientStrokeWidth")},{opacity:a("gradientOpacity")}),Wt({type:$t,role:R,encode:m},i)}function Xt(e,t,n,i,a){const o=qt(e,n),s=o.isVertical(),l=o.gradientThickness(),u=o.gradientLength();let c,d,p,g,m="";s?(c="y",p="y2",d="x",g="width",m="1-"):(c="x",p="x2",d="y",g="height");const y={opacity:Pt,fill:{scale:t,field:St}};y[c]={signal:m+"datum."+xt,mult:u},y[d]=Pt,y[p]={signal:m+"datum."+Et,mult:u},y[g]=f(l);const v={enter:y,update:(0,r.extend)({},y,{opacity:Mt}),exit:{opacity:Pt}};return h(v,{stroke:o("gradientStrokeColor"),strokeWidth:o("gradientStrokeWidth")},{opacity:o("gradientOpacity")}),Wt({type:$t,role:T,key:St,from:a,encode:v},i)}const Kt=`datum.${xt}<=0?"${dt}":datum.${xt}>=1?"${ft}":"${ht}"`,Jt=`datum.${xt}<=0?"${pt}":datum.${xt}>=1?"${ct}":"middle"`;function Qt(e,t,n,r){const i=qt(e,t),a=i.isVertical(),o=f(i.gradientThickness()),s=i.gradientLength();let l,u,c,d,p=i("labelOverlap"),g="";const m={enter:l={opacity:Pt},update:u={opacity:Mt,text:{field:bt}},exit:{opacity:Pt}};return h(m,{fill:i("labelColor"),fillOpacity:i("labelOpacity"),font:i("labelFont"),fontSize:i("labelFontSize"),fontStyle:i("labelFontStyle"),fontWeight:i("labelFontWeight"),limit:le(e.labelLimit,t.gradientLabelLimit)}),a?(l.align={value:"left"},l.baseline=u.baseline={signal:Jt},c="y",d="x",g="1-"):(l.align=u.align={signal:Kt},l.baseline={value:"top"},c="x",d="y"),l[c]=u[c]={signal:g+"datum."+xt,mult:s},l[d]=u[d]=o,o.offset=le(e.labelOffset,t.gradientLabelOffset)||0,p=p?{separation:i("labelSeparation"),method:p,order:"datum."+vt}:void 0,Wt({type:Ut,role:D,style:_t,key:St,from:r,encode:m,overlap:p},n)}function Zt(e,t,n,r,i){const a=qt(e,t),o=n.entries,s=!(!o||!o.interactive),l=o?o.name:void 0,u=a("clipHeight"),c=a("symbolOffset"),d={data:"value"},p=`(${i}) ? datum.${wt} : datum.${Ot}`,m=u?f(u):{field:Ot},y=`datum.${vt}`,v=`max(1, ${i})`;let w,x,E,S,_;m.mult=.5,w={enter:x={opacity:Pt,x:{signal:p,mult:.5,offset:c},y:m},update:E={opacity:Mt,x:x.x,y:x.y},exit:{opacity:Pt}};let A=null,C=null;e.fill||(A=t.symbolBaseFillColor,C=t.symbolBaseStrokeColor),h(w,{fill:a("symbolFillColor",A),shape:a("symbolType"),size:a("symbolSize"),stroke:a("symbolStrokeColor",C),strokeDash:a("symbolDash"),strokeDashOffset:a("symbolDashOffset"),strokeWidth:a("symbolStrokeWidth")},{opacity:a("symbolOpacity")}),Nt.forEach((t=>{e[t]&&(E[t]=x[t]={scale:e[t],field:St})}));const T=Wt({type:Bt,role:O,key:St,from:d,clip:!!u||void 0,encode:w},n.symbols),k=f(c);k.offset=a("labelOffset"),w={enter:x={opacity:Pt,x:{signal:p,offset:k},y:m},update:E={opacity:Mt,text:{field:bt},x:x.x,y:x.y},exit:{opacity:Pt}},h(w,{align:a("labelAlign"),baseline:a("labelBaseline"),fill:a("labelColor"),fillOpacity:a("labelOpacity"),font:a("labelFont"),fontSize:a("labelFontSize"),fontStyle:a("labelFontStyle"),fontWeight:a("labelFontWeight"),limit:a("labelLimit")});const R=Wt({type:Ut,role:D,style:_t,key:St,from:d,encode:w},n.labels);return w={enter:{noBound:{value:!u},width:Pt,height:u?f(u):Pt,opacity:Pt},exit:{opacity:Pt},update:E={opacity:Mt,row:{signal:null},column:{signal:null}}},a.isVertical(!0)?(S=`ceil(item.mark.items.length / ${v})`,E.row.signal=`${y}%${S}`,E.column.signal=`floor(${y} / ${S})`,_={field:["row",y]}):(E.row.signal=`floor(${y} / ${v})`,E.column.signal=`${y} % ${v}`,_={field:y}),E.column.signal=`(${i})?${E.column.signal}:${y}`,zt({role:b,from:r={facet:{data:r,name:"value",groupby:vt}},encode:g(w,o,Ft),marks:[T,R],name:l,interactive:s,sort:_})}const en='item.orient === "left"',tn='item.orient === "right"',nn=`(${en} || ${tn})`,rn=`datum.vgrad && ${nn}`,an=Ht('"top"','"bottom"','"middle"'),on=`datum.vgrad && ${tn} ? (${Ht('"right"','"left"','"center"')}) : (${nn} && !(datum.vgrad && ${en})) ? "left" : ${Gt}`,sn=`item._anchor || (${nn} ? "middle" : "start")`,ln=`${rn} ? (${en} ? -90 : 90) : 0`,un=`${nn} ? (datum.vgrad ? (${tn} ? "bottom" : "top") : ${an}) : "top"`;function cn(e,t){let n;return(0,r.isObject)(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+dn(e.path)+")":e.sphere&&(n="geoShape("+dn(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e}function dn(e){return(0,r.isObject)(e)&&e.signal?e.signal:(0,r.stringValue)(e)}function fn(e){const t=e.role||"";return t.startsWith("axis")||t.startsWith("legend")||t.startsWith("title")?t:e.type===It?b:t||y}function pn(e){return{marktype:e.type,name:e.name||void 0,role:e.role||fn(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function hn(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e}function gn(e,t){const n=(0,s.definition)(e.type);n||(0,r.error)("Unrecognized transform type: "+(0,r.stringValue)(e.type));const i=J(n.type.toLowerCase(),null,mn(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(i)),i.metadata=n.metadata||{},i}function mn(e,t,n){const r={},i=e.params.length;for(let a=0;abn(e,t,n)))):bn(e,i,n)}(e,t,n):"projection"===i?n.projectionRef(t[e.name]):e.array&&!oe(a)?a.map((t=>vn(e,t,n))):vn(e,a,n):void(e.required&&(0,r.error)("Missing required "+(0,r.stringValue)(t.type)+" parameter: "+(0,r.stringValue)(e.name)))}function vn(e,t,n){const a=e.type;if(oe(t))return Sn(a)?(0,r.error)("Expression references can not be signals."):_n(a)?n.fieldRef(t):An(a)?n.compareRef(t):n.signalRef(t.signal);{const r=e.expr||_n(a);return r&&wn(t)?n.exprRef(t.expr,t.as):r&&xn(t)?ee(t.field,t.as):Sn(a)?(0,i.parseExpression)(t,n):En(a)?Z(n.getData(t).values):_n(a)?ee(t):An(a)?n.compareRef(t):t}}function bn(e,t,n){const i=e.params.length;let a;for(let n=0;ne&&e.expr,xn=e=>e&&e.field,En=e=>"data"===e,Sn=e=>"expr"===e,_n=e=>"field"===e,An=e=>"compare"===e;function Cn(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:Z(t.getData(e.data).output)}function Tn(e,t,n,r,i){this.scope=e,this.input=t,this.output=n,this.values=r,this.aggregate=i,this.index={}}function kn(e){return(0,r.isString)(e)?e:null}function Rn(e,t,n){const r=re(n.op,n.field);let i;if(t.ops){for(let e=0,n=t.as.length;enull==e?"null":e)).join(",")+"),0)",d=(0,i.parseExpression)(c,t);u.update=d.$expr,u.params=d.$params}function Nn(e,t){const n=fn(e),i=e.type===It,a=e.from&&e.from.facet,o=e.overlap;let s,l,u,c,d,f,p,h=e.layout||n===b||n===v;const g=n===y||h||a,m=function(e,t,n){let i,a,o,s,l;return e?(i=e.facet)&&(t||(0,r.error)("Only group marks can be faceted."),null!=i.field?s=l=Cn(i,n):(e.data?l=Z(n.getData(e.data).aggregate):(o=gn((0,r.extend)({type:"aggregate",groupby:(0,r.array)(i.groupby)},i.aggregate),n),o.params.key=n.keyRef(i.groupby),o.params.pulse=Cn(i,n),s=l=Z(n.add(o))),a=n.keyRef(i.groupby,!0))):s=Z(n.add(Se(null,[{}]))),s||(s=Cn(e,n)),{key:a,pulse:s,parent:l}}(e.from,i,t);l=t.add(Ae({key:m.key||(e.key?ee(e.key):void 0),pulse:m.pulse,clean:!i}));const w=Z(l);l=u=t.add(Se({pulse:w})),l=t.add(Fe({markdef:pn(e),interactive:hn(e.interactive,t),clip:cn(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:Z(l)}));const x=Z(l);l=c=t.add(Ce(j(e.encode,e.type,n,e.style,t,{mod:!1,pulse:x}))),l.params.parent=t.encode(),e.transform&&e.transform.forEach((e=>{const n=gn(e,t),i=n.metadata;(i.generates||i.changes)&&(0,r.error)("Mark transforms should not generate new data."),i.nomod||(c.params.mod=!0),n.params.pulse=Z(l),t.add(l=n)})),e.sort&&(l=t.add(Ge({sort:t.compareRef(e.sort),pulse:Z(l)})));const E=Z(l);(a||h)&&(h=t.add(Ve({layout:t.objectProperty(e.layout),legends:t.legends,mark:x,pulse:E})),f=Z(h));const S=t.add(Ee({mark:x,pulse:f||E}));p=Z(S),i&&(g&&(s=t.operators,s.pop(),h&&s.pop()),t.pushState(E,f||p,w),a?function(e,t,n){const i=e.from.facet,a=i.name,o=Cn(i,t);let s;i.name||(0,r.error)("Facet must have a name: "+(0,r.stringValue)(i)),i.data||(0,r.error)("Facet must reference a data set: "+(0,r.stringValue)(i)),i.field?s=t.add(Le({field:t.fieldRef(i.field),pulse:o})):i.groupby?s=t.add(ke({key:t.keyRef(i.groupby),group:Z(t.proxy(n.parent)),pulse:o})):(0,r.error)("Facet must specify groupby or field: "+(0,r.stringValue)(i));const l=t.fork(),u=l.add(Se()),c=l.add(He({pulse:Z(u)}));l.addData(a,new Tn(l,u,u,c)),l.addSignal("parent",null),s.params.subflow={$subflow:l.parse(e).toRuntime()}}(e,t,m):g?function(e,t,n){const r=t.add(Le({pulse:n.pulse})),i=t.fork();i.add(He()),i.addSignal("parent",null),r.params.subflow={$subflow:i.parse(e).toRuntime()}}(e,t,m):t.parse(e),t.popState(),g&&(h&&s.push(h),s.push(S))),o&&(p=function(e,t,n){const r=e.method,i=e.bound,a=e.separation,o={separation:oe(a)?n.signalRef(a.signal):a,method:oe(r)?n.signalRef(r.signal):r,pulse:t};if(e.order&&(o.sort=n.compareRef({field:e.order})),i){const e=i.tolerance;o.boundTolerance=oe(e)?n.signalRef(e.signal):+e,o.boundScale=n.scaleRef(i.scale),o.boundOrient=i.orient}return Z(n.add(Ie(o)))}(o,p,t));const _=t.add(qe({pulse:p})),A=t.add(He({pulse:Z(_)},void 0,t.parent()));null!=e.name&&(d=e.name,t.addData(d,new Tn(t,u,_,A)),e.on&&e.on.forEach((e=>{(e.insert||e.remove||e.toggle)&&(0,r.error)("Marks only support modify triggers."),On(e,t,d)})))}function Fn(e,t,n){const r={enter:{},update:{}};return h(r,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),r}function Pn(e,t,n){return t[e]?`scale("${t[e]}",datum)`:jt(e,n[0].encode)}Tn.fromEntries=function(e,t){const n=t.length,r=t[n-1],i=t[n-2];let a=t[0],o=null,s=1;for(a&&"load"===a.type&&(a=t[1]),e.add(t[0]);se===pt||e===ct,Un=(e,t,n)=>oe(e)?Wn(e.signal,t,n):e===dt||e===ct?t:n,zn=(e,t,n)=>oe(e)?Gn(e.signal,t,n):Bn(e)?t:n,qn=(e,t,n)=>oe(e)?Vn(e.signal,t,n):Bn(e)?n:t,jn=(e,t,n)=>oe(e)?Yn(e.signal,t,n):e===ct?{value:t}:{value:n},Hn=(e,t,n)=>oe(e)?Xn(e.signal,t,n):e===ft?{value:t}:{value:n},Gn=(e,t,n)=>Kn(`${e} === '${ct}' || ${e} === '${pt}'`,t,n),Vn=(e,t,n)=>Kn(`${e} !== '${ct}' && ${e} !== '${pt}'`,t,n),Wn=(e,t,n)=>Qn(`${e} === '${dt}' || ${e} === '${ct}'`,t,n),Yn=(e,t,n)=>Qn(`${e} === '${ct}'`,t,n),Xn=(e,t,n)=>Qn(`${e} === '${ft}'`,t,n),Kn=(e,t,n)=>(t=null!=t?f(t):t,n=null!=n?f(n):n,Jn(t)&&Jn(n)?{signal:`${e} ? (${t=t?t.signal||(0,r.stringValue)(t.value):null}) : (${n=n?n.signal||(0,r.stringValue)(n.value):null})`}:[(0,r.extend)({test:e},t)].concat(n||[])),Jn=e=>null==e||1===Object.keys(e).length,Qn=(e,t,n)=>({signal:`${e} ? (${er(t)}) : (${er(n)})`}),Zn=(e,t,n,r,i)=>({signal:(null!=r?`${e} === '${dt}' ? (${er(r)}) : `:"")+(null!=n?`${e} === '${pt}' ? (${er(n)}) : `:"")+(null!=i?`${e} === '${ft}' ? (${er(i)}) : `:"")+(null!=t?`${e} === '${ct}' ? (${er(t)}) : `:"")+"(null)"}),er=e=>oe(e)?e.signal:null==e?null:(0,r.stringValue)(e),tr=(e,t)=>0===t?0:oe(e)?{signal:`(${e.signal}) * ${t}`}:{value:e*t},nr=(e,t)=>{const n=e.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+t.signal}:e};function rr(e,t,n,i){let a;if(t&&(0,r.hasOwnProperty)(t,e))return t[e];if((0,r.hasOwnProperty)(n,e))return n[e];if(e.startsWith("title")){switch(e){case"titleColor":a="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":a=e[5].toLowerCase()+e.slice(6)}return i[At][a]}if(e.startsWith("label")){switch(e){case"labelColor":a="fill";break;case"labelFont":case"labelFontSize":a=e[5].toLowerCase()+e.slice(6)}return i[_t][a]}return null}function ir(e){const t={};for(const n of e)if(n)for(const e in n)t[e]=1;return Object.keys(t)}function ar(e,t){return{scale:e.scale,range:t}}function or(e,t,n,r,i){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+r+","+i+")"}}function sr(e,t){const n=function(e,t){var n,i,a,o=t.config,s=o.style,l=o.axis,u="band"===t.scaleType(e.scale)&&o.axisBand,c=e.orient;if(oe(c)){const e=ir([o.axisX,o.axisY]),t=ir([o.axisTop,o.axisBottom,o.axisLeft,o.axisRight]);for(a of(n={},e))n[a]=zn(c,rr(a,o.axisX,l,s),rr(a,o.axisY,l,s));for(a of(i={},t))i[a]=Zn(c.signal,rr(a,o.axisTop,l,s),rr(a,o.axisBottom,l,s),rr(a,o.axisLeft,l,s),rr(a,o.axisRight,l,s))}else n=c===ct||c===pt?o.axisX:o.axisY,i=o["axis"+c[0].toUpperCase()+c.slice(1)];return n||i||u?(0,r.extend)({},l,n,i,u):l}(e,t),i=e.encode||{},a=i.axis||{},o=a.name||void 0,s=a.interactive,l=a.style,u=qt(e,n),c=function(e){const t=e("tickBand");let n,i,a=e("tickOffset");return t?t.signal?(n={signal:`(${t.signal}) === 'extent' ? 1 : 0.5`},i={signal:`(${t.signal}) === 'extent'`},(0,r.isObject)(a)||(a={signal:`(${t.signal}) === 'extent' ? 0 : ${a}`})):"extent"===t?(n=1,i=!0,a=0):(n=.5,i=!1):(n=e("bandPosition"),i=e("tickExtra")),{extra:i,band:n,offset:a}}(u),d={scale:e.scale,ticks:!!u("ticks"),labels:!!u("labels"),grid:!!u("grid"),domain:!!u("domain"),title:null!=e.title},p=Z(t.add(Se({},[d]))),y=Z(t.add(xe({scale:t.scaleRef(e.scale),extra:t.property(c.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),v=[];let b;return d.grid&&v.push(function(e,t,n,i,a){const o=qt(e,t),s=e.orient,l=e.gridScale,u=Un(s,1,-1),c=function(e,t){if(1===t);else if((0,r.isObject)(e)){let n=e=(0,r.extend)({},e);for(;null!=n.mult;){if(!(0,r.isObject)(n.mult))return n.mult=oe(t)?{signal:`(${n.mult}) * (${t.signal})`}:n.mult*t,e;n=n.mult=(0,r.extend)({},n.mult)}n.mult=t}else e=oe(t)?{signal:`(${t.signal}) * (${e||0})`}:t*(e||0);return e}(e.offset,u);let d,f,p;const g={enter:d={opacity:Pt},update:p={opacity:Mt},exit:f={opacity:Pt}};h(g,{stroke:o("gridColor"),strokeCap:o("gridCap"),strokeDash:o("gridDash"),strokeDashOffset:o("gridDashOffset"),strokeOpacity:o("gridOpacity"),strokeWidth:o("gridWidth")});const m={scale:e.scale,field:St,band:a.band,extra:a.extra,offset:a.offset,round:o("tickRound")},y=zn(s,{signal:"height"},{signal:"width"}),v=l?{scale:l,range:0,mult:u,offset:c}:{value:0,offset:c},b=l?{scale:l,range:1,mult:u,offset:c}:(0,r.extend)(y,{mult:u,offset:c});return d.x=p.x=zn(s,m,v),d.y=p.y=qn(s,m,v),d.x2=p.x2=qn(s,b),d.y2=p.y2=zn(s,b),f.x=zn(s,m),f.y=qn(s,m),Wt({type:Lt,role:E,key:St,from:i,encode:g},n)}(e,n,i.grid,y,c)),d.ticks&&(b=u("tickSize"),v.push(function(e,t,n,r,i,a){const o=qt(e,t),s=e.orient,l=Un(s,-1,1);let u,c,d;const p={enter:u={opacity:Pt},update:d={opacity:Mt},exit:c={opacity:Pt}};h(p,{stroke:o("tickColor"),strokeCap:o("tickCap"),strokeDash:o("tickDash"),strokeDashOffset:o("tickDashOffset"),strokeOpacity:o("tickOpacity"),strokeWidth:o("tickWidth")});const g=f(i);g.mult=l;const m={scale:e.scale,field:St,band:a.band,extra:a.extra,offset:a.offset,round:o("tickRound")};return d.y=u.y=zn(s,Pt,m),d.y2=u.y2=zn(s,g),c.x=zn(s,m),d.x=u.x=qn(s,Pt,m),d.x2=u.x2=qn(s,g),c.y=qn(s,m),Wt({type:Lt,role:_,key:St,from:r,encode:p},n)}(e,n,i.ticks,y,b,c))),d.labels&&(b=d.ticks?b:0,v.push(function(e,t,n,r,i,a){const o=qt(e,t),s=e.orient,l=e.scale,u=Un(s,-1,1),c=ue(o("labelFlush")),d=ue(o("labelFlushOffset")),p=o("labelAlign"),g=o("labelBaseline");let m,y=0===c||!!c;const v=f(i);v.mult=u,v.offset=f(o("labelPadding")||0),v.offset.mult=u;const b={scale:l,field:St,band:.5,offset:Vt(a.offset,o("labelOffset"))},w=zn(s,y?or(l,c,'"left"','"right"','"center"'):{value:"center"},Hn(s,"left","right")),x=zn(s,jn(s,"bottom","top"),y?or(l,c,'"top"','"bottom"','"middle"'):{value:"middle"}),E=or(l,c,`-(${d})`,d,0);y=y&&d;const _={opacity:Pt,x:zn(s,b,v),y:qn(s,b,v)},A={enter:_,update:m={opacity:Mt,text:{field:bt},x:_.x,y:_.y,align:w,baseline:x},exit:{opacity:Pt,x:_.x,y:_.y}};h(A,{dx:!p&&y?zn(s,E):null,dy:!g&&y?qn(s,E):null}),h(A,{angle:o("labelAngle"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontWeight:o("labelFontWeight"),fontStyle:o("labelFontStyle"),limit:o("labelLimit"),lineHeight:o("labelLineHeight")},{align:p,baseline:g});const C=o("labelBound");let T=o("labelOverlap");return T=T||C?{separation:o("labelSeparation"),method:T,order:"datum.index",bound:C?{scale:l,orient:s,tolerance:C}:null}:void 0,m.align!==w&&(m.align=nr(m.align,w)),m.baseline!==x&&(m.baseline=nr(m.baseline,x)),Wt({type:Ut,role:S,style:_t,key:St,from:r,encode:A,overlap:T},n)}(e,n,i.labels,y,b,c))),d.domain&&v.push(function(e,t,n,r){const i=qt(e,t),a=e.orient;let o,s;const l={enter:o={opacity:Pt},update:s={opacity:Mt},exit:{opacity:Pt}};h(l,{stroke:i("domainColor"),strokeCap:i("domainCap"),strokeDash:i("domainDash"),strokeDashOffset:i("domainDashOffset"),strokeWidth:i("domainWidth"),strokeOpacity:i("domainOpacity")});const u=ar(e,0),c=ar(e,1);return o.x=s.x=zn(a,u,Pt),o.x2=s.x2=zn(a,c),o.y=s.y=qn(a,u,Pt),o.y2=s.y2=qn(a,c),Wt({type:Lt,role:x,from:r,encode:l},n)}(e,n,i.domain,p)),d.title&&v.push(function(e,t,n,i){const a=qt(e,t),o=e.orient,s=Un(o,-1,1);let l,u;const c={enter:l={opacity:Pt,anchor:f(a("titleAnchor",null)),align:{signal:Gt}},update:u=(0,r.extend)({},l,{opacity:Mt,text:f(e.title)}),exit:{opacity:Pt}},d={signal:`lerp(range("${e.scale}"), ${Ht(0,1,.5)})`};return u.x=zn(o,d),u.y=qn(o,d),l.angle=zn(o,Pt,tr(s,90)),l.baseline=zn(o,jn(o,pt,ct),{value:pt}),u.angle=l.angle,u.baseline=l.baseline,h(c,{fill:a("titleColor"),fillOpacity:a("titleOpacity"),font:a("titleFont"),fontSize:a("titleFontSize"),fontStyle:a("titleFontStyle"),fontWeight:a("titleFontWeight"),limit:a("titleLimit"),lineHeight:a("titleLineHeight")},{align:a("titleAlign"),angle:a("titleAngle"),baseline:a("titleBaseline")}),function(e,t,n,r){const i=(e,t)=>null!=e?(n.update[t]=nr(f(e),n.update[t]),!1):!m(t,r),a=i(e("titleX"),"x"),o=i(e("titleY"),"y");n.enter.auto=o===a?f(o):zn(t,f(o),f(a))}(a,o,c,n),c.update.align=nr(c.update.align,l.align),c.update.angle=nr(c.update.angle,l.angle),c.update.baseline=nr(c.update.baseline,l.baseline),Wt({type:Ut,role:A,style:At,from:i,encode:c},n)}(e,n,i.title,p)),Nn(zt({role:w,from:p,encode:g(lr(u,e),a,Ft),marks:v,aria:u("aria"),description:u("description"),zindex:u("zindex"),name:o,interactive:s,style:l}),t)}function lr(e,t){const n={enter:{},update:{}};return h(n,{orient:e("orient"),offset:e("offset")||0,position:le(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:`abs(span(range("${t.scale}")))`},translate:e("translate"),format:t.format,formatType:t.formatType}),n}function ur(e,t,n){const a=(0,r.array)(e.signals),s=(0,r.array)(e.scales);return n||a.forEach((e=>X(e,t))),(0,r.array)(e.projections).forEach((e=>function(e,t){const n=t.config.projection||{},r={};for(const n in e)"name"!==n&&(r[n]=ut(e[n],n,t));for(const e in n)null==r[e]&&(r[e]=ut(n[e],e,t));t.addProjection(e.name,r)}(e,t))),s.forEach((e=>function(e,t){const n=e.type||"linear";(0,o.isValidScaleType)(n)||(0,r.error)("Unrecognized scale type: "+(0,r.stringValue)(n)),t.addScale(e.name,{type:n,domain:void 0})}(e,t))),(0,r.array)(e.data).forEach((e=>function(e,t){const n=[];e.transform&&e.transform.forEach((e=>{n.push(gn(e,t))})),e.on&&e.on.forEach((n=>{On(n,t,e.name)})),t.addDataPipeline(e.name,function(e,t,n){const i=[];let a,o,s,l,u,c=null,d=!1,f=!1;for(e.values?oe(e.values)||se(e.format)?(i.push(Ln(t,e)),i.push(c=$n())):i.push(c=$n({$ingest:e.values,$format:e.format})):e.url?se(e.url)||se(e.format)?(i.push(Ln(t,e)),i.push(c=$n())):i.push(c=$n({$request:e.url,$format:e.format})):e.source&&(c=a=(0,r.array)(e.source).map((e=>Z(t.getData(e).output))),i.push(null)),o=0,s=n.length;oKe(e,t))),(n||a).forEach((e=>ve(e,t))),(0,r.array)(e.axes).forEach((e=>sr(e,t))),(0,r.array)(e.marks).forEach((e=>Nn(e,t))),(0,r.array)(e.legends).forEach((e=>function(e,t){const n=t.config.legend,a=e.encode||{},s=qt(e,n),l=a.legend||{},u=l.name||void 0,c=l.interactive,d=l.style,f={};let p,m,y,v=0;Nt.forEach((t=>e[t]?(f[t]=e[t],v=v||e[t]):0)),v||(0,r.error)("Missing valid scale for legend.");const b=function(e,t){let n=e.type||kt;return e.type||1!==function(e){return Nt.reduce(((t,n)=>t+(e[n]?1:0)),0)}(e)||!e.fill&&!e.stroke||(n=(0,o.isContinuous)(t)?Rt:(0,o.isDiscretizing)(t)?Dt:kt),n!==Rt?n:(0,o.isDiscretizing)(t)?Dt:Rt}(e,t.scaleType(v)),w={title:null!=e.title,scales:f,type:b,vgrad:"symbol"!==b&&s.isVertical()},x=Z(t.add(Se(null,[w]))),E=Z(t.add(Oe(m={type:b,scale:t.scaleRef(v),count:t.objectProperty(s("tickCount")),limit:t.property(s("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return b===Rt?(y=[Yt(e,v,n,a.gradient),Qt(e,n,a.labels,E)],m.count=m.count||t.signalRef(`max(2,2*floor((${ue(s.gradientLength())})/100))`)):b===Dt?y=[Xt(e,v,n,a.gradient,E),Qt(e,n,a.labels,E)]:(p=function(e,t){const n=qt(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(e,n),y=[Zt(e,n,a,E,ue(p.columns))],m.size=function(e,t,n){const r=ue(Pn("size",e,n)),a=ue(Pn("strokeWidth",e,n)),o=ue(function(e,t,n){return jt("fontSize",e)||function(e,t,n){const r=t.config.style[n];return r&&r.fontSize}(0,t,n)}(n[1].encode,t,_t));return(0,i.parseExpression)(`max(ceil(sqrt(${r})+${a}),${o})`,t)}(e,t,y[0].marks)),y=[zt({role:k,from:x,encode:{enter:{x:{value:0},y:{value:0}}},marks:y,layout:p,interactive:c})],w.title&&y.push(function(e,t,n,r){const i=qt(e,t),a={enter:{opacity:Pt},update:{opacity:Mt,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:Pt}};return h(a,{orient:i("titleOrient"),_anchor:i("titleAnchor"),anchor:{signal:sn},angle:{signal:ln},align:{signal:on},baseline:{signal:un},text:e.title,fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),baseline:i("titleBaseline")}),Wt({type:Ut,role:N,style:At,from:r,encode:a},n)}(e,n,a.title,x)),Nn(zt({role:C,from:x,encode:g(Fn(s,e,n),l,Ft),marks:y,aria:s("aria"),description:s("description"),zindex:s("zindex"),name:u,interactive:c,style:d}),t)}(e,t))),e.title&&function(e,t){const n=qt(e=(0,r.isString)(e)?{text:e}:e,t.config.title),i=e.encode||{},a=i.group||{},o=a.name||void 0,s=a.interactive,l=a.style,u=[],c=Z(t.add(Se(null,[{}])));u.push(function(e,t,n,r){const i={value:0},a={enter:{opacity:i},update:{opacity:{value:1}},exit:{opacity:i}};return h(a,{text:e.text,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),Wt({type:Ut,role:P,style:Ct,from:r,encode:a},n)}(e,n,function(e){const t=e.encode;return t&&t.title||(0,r.extend)({name:e.name,interactive:e.interactive,style:e.style},t)}(e),c)),e.subtitle&&u.push(function(e,t,n,r){const i={value:0},a={enter:{opacity:i},update:{opacity:{value:1}},exit:{opacity:i}};return h(a,{text:e.subtitle,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),Wt({type:Ut,role:M,style:Tt,from:r,encode:a},n)}(e,n,i.subtitle,c)),Nn(zt({role:F,from:c,encode:In(n,a),marks:u,aria:n("aria"),description:n("description"),zindex:n("zindex"),name:o,interactive:s,style:l}),t)}(e.title,t),t.parseLambdas(),t}const cr=e=>g({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e);function dr(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function fr(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function pr(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}function hr(e){return((0,r.isArray)(e)?gr:mr)(e)}function gr(e){const t=e.length;let n="[";for(let i=0;i0?",":"")+((0,r.isObject)(t)?t.signal||hr(t):(0,r.stringValue)(t))}return n+"]"}function mr(e){let t,n,i="{",a=0;for(t in e)n=e[t],i+=(++a>1?",":"")+(0,r.stringValue)(t)+":"+((0,r.isObject)(n)?n.signal||hr(n):(0,r.stringValue)(n));return i+"}"}function yr(){const e="sans-serif",t="#4c78a8",n="#000",r="#888",i="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:t},area:{fill:t},image:null,line:{stroke:t,strokeWidth:2},path:{stroke:t},rect:{fill:t},rule:{stroke:n},shape:{stroke:t},symbol:{fill:t,size:64},text:{fill:n,font:e,fontSize:11},trail:{fill:t,size:2},style:{"guide-label":{fill:n,font:e,fontSize:10},"guide-title":{fill:n,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:n,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:n,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:i},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:r,grid:!1,gridWidth:1,gridColor:i,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:r,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:i,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:r,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}function vr(e,t,n){return(0,r.isObject)(e)||(0,r.error)("Input Vega specification must be an object."),function(e,t){const n=t.config,i=Z(t.root=t.add(Q())),a=function(e,t){const n=n=>le(e[n],t[n]),i=[dr("background",n("background")),dr("autosize",l(n("autosize"))),dr("padding",d(n("padding"))),dr("width",n("width")||0),dr("height",n("height")||0)],a=i.reduce(((e,t)=>(e[t.name]=t,e)),{}),o={};return(0,r.array)(e.signals).forEach((e=>{(0,r.hasOwnProperty)(a,e.name)?e=(0,r.extend)(a[e.name],e):i.push(e),o[e.name]=e})),(0,r.array)(t.signals).forEach((e=>{(0,r.hasOwnProperty)(o,e.name)||(0,r.hasOwnProperty)(a,e.name)||i.push(e)})),i}(e,n);a.forEach((e=>X(e,t))),t.description=e.description||n.description,t.eventConfig=n.events,t.legends=t.objectProperty(n.legend&&n.legend.layout),t.locale=n.locale;const o=t.add(Se()),s=t.add(Ce(j(cr(e.encode),It,v,e.style,t,{pulse:Z(o)}))),u=t.add(Ve({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:i,pulse:Z(s)}));t.operators.pop(),t.pushState(Z(s),Z(u),null),ur(e,t,a),t.operators.push(u);let c=t.add(Ee({mark:i,pulse:Z(u)}));return c=t.add(qe({pulse:Z(c)})),c=t.add(He({pulse:Z(c)})),t.addData("root",new Tn(t,o,o,c)),t}(e,new fr(t=(0,r.mergeConfig)(yr(),t,e.config),n)).toRuntime()}fr.prototype=pr.prototype={parse(e){return ur(e,this)},fork(){return new pr(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach((t=>{t.$ref=e.id})),e.refs=null),e},proxy(e){const t=e instanceof K?Z(e):e;return this.add(Ue({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(e,t,n){let r,i;e&&(r=e.data||(e.data={}),i=r[t]||(r[t]=[]),i.push(n))}for(e in this.data){t=this.data[e],n(t.input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values");for(const r in t.index)n(t.index[r],e,"index:"+r)}return this},pushState(e,t,n){this._encode.push(Z(this.add(He({pulse:e})))),this._parent.push(t),this._lookup.push(n?Z(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return(0,r.peek)(this._parent)},encode(){return(0,r.peek)(this._encode)},lookup(){return(0,r.peek)(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if((0,r.isString)(e))return ee(e,t);e.signal||(0,r.error)("Unsupported field reference: "+(0,r.stringValue)(e));const n=e.signal;let i=this.field[n];if(!i){const e={name:this.signalRef(n)};t&&(e.as=t),this.field[n]=i=Z(this.add(Re(e)))}return i},compareRef(e){let t=!1;const n=e=>oe(e)?(t=!0,this.signalRef(e.signal)):function(e){return e&&e.expr}(e)?(t=!0,this.exprRef(e.expr)):e,i=(0,r.array)(e.field).map(n),a=(0,r.array)(e.order).map(n);return t?Z(this.add(_e({fields:i,orders:a}))):ne(i,a)},keyRef(e,t){let n=!1;const i=this.signals;return e=(0,r.array)(e).map((e=>oe(e)?(n=!0,Z(i[e.signal])):e)),n?Z(this.add(De({fields:e,flat:t}))):function(e,t){const n={$key:e};return t&&(n.$flat=!0),n}(e,t)},sortRef(e){if(!e)return e;const t=re(e.op,e.field),n=e.order||"ascending";return n.signal?Z(this.add(_e({fields:t,orders:this.signalRef(n.signal)}))):ne(t,n)},event(e,t){const n=e+":"+t;if(!this.events[n]){const r=this.id();this.streams.push({id:r,source:e,type:t}),this.events[n]=r}return this.events[n]},hasOwnSignal(e){return(0,r.hasOwnProperty)(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&(0,r.error)("Duplicate signal name: "+(0,r.stringValue)(e));const n=t instanceof K?t:this.add(Q(t));return this.signals[e]=n},getSignal(e){return this.signals[e]||(0,r.error)("Unrecognized signal name: "+(0,r.stringValue)(e)),this.signals[e]},signalRef(e){return this.signals[e]?Z(this.signals[e]):((0,r.hasOwnProperty)(this.lambdas,e)||(this.lambdas[e]=this.add(Q(null))),Z(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,n=e.length;t{"use strict";n.r(t),n.d(t,{getProjectionPath:()=>u,projection:()=>l,projectionProperties:()=>s});var r=n(51300),i=n(96108),a=n(14588);const o=(0,r.geoPath)(),s=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function l(e,t){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(c[e]=function(e,t){return function n(){const i=t();return i.type=e,i.path=(0,r.geoPath)().projection(i),i.copy=i.copy||function(){const e=n();return s.forEach((t=>{i[t]&&e[t](i[t]())})),e.path.pointRadius(i.path.pointRadius()),e},(0,a.registerScale)(i)}}(e,t),this):c[e]||null}function u(e){return e&&e.path||o}const c={albers:r.geoAlbers,albersusa:r.geoAlbersUsa,azimuthalequalarea:r.geoAzimuthalEqualArea,azimuthalequidistant:r.geoAzimuthalEquidistant,conicconformal:r.geoConicConformal,conicequalarea:r.geoConicEqualArea,conicequidistant:r.geoConicEquidistant,equalEarth:r.geoEqualEarth,equirectangular:r.geoEquirectangular,gnomonic:r.geoGnomonic,identity:r.geoIdentity,mercator:r.geoMercator,mollweide:i.geoMollweide,naturalEarth1:r.geoNaturalEarth1,orthographic:r.geoOrthographic,stereographic:r.geoStereographic,transversemercator:r.geoTransverseMercator};for(const e in c)l(e,c[e])},62804:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loess:()=>s,regression:()=>u});var r=n(48872),i=n(24988),a=n(26372);function o(e,t){var n,r,i,a,o,s,l=[],u=function(e){return e(a)};if(null==t)l.push(e);else for(n={},r=0,i=e.length;r{(0,r.regressionLoess)(t,e.x,e.y,e.bandwidth||.3).forEach((e=>{const n={};for(let e=0;e"poly"===e?t:"quad"===e?2:1)(c,d),p=e.as||[(0,a.accessorName)(e.x),(0,a.accessorName)(e.y)],h=l[c],g=[];let m=e.extent;(0,a.hasOwnProperty)(l,c)||(0,a.error)("Invalid regression method: "+c),null!=m&&"log"===c&&m[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),m=null),s.forEach((n=>{if(n.length<=f)return void t.dataflow.warn("Skipping regression with more parameters than data points.");const o=h(n,e.x,e.y,d);if(e.params)return void g.push((0,i.ingest)({keys:n.dims,coef:o.coef,rSquared:o.rSquared}));const s=m||(0,a.extent)(n,e.x),l=e=>{const t={};for(let e=0;el([e,o.predict(e)]))):(0,r.sampleCurve)(o.predict,s,25,200).forEach(l)})),this.value&&(n.rem=this.value),this.value=n.add=n.source=g}return n}})},96056:(e,t,n)=>{"use strict";n.r(t),n.d(t,{context:()=>p});var r=n(26372),i=n(24988);const a=(0,r.toSet)(["rule"]),o=(0,r.toSet)(["group","image","rect"]);function s(e){return(e+"").toLowerCase()}function l(e,t,n){n.endsWith(";")||(n="return("+n+");");const r=Function(...t.concat(n));return e&&e.functions?r.bind(e.functions):r}var u={operator:(e,t)=>l(e,["_"],t.code),parameter:(e,t)=>l(e,["datum","_"],t.code),event:(e,t)=>l(e,["event"],t.code),handler:(e,t)=>l(e,["_","event"],`var datum=event.item&&event.item.datum;return ${t.code};`),encode:(e,t)=>{const{marktype:n,channels:i}=t;let s="var o=item,datum=o.datum,m=0,$;";for(const e in i){const t="o["+(0,r.stringValue)(e)+"]";s+=`$=${i[e].code};if(${t}!==$)${t}=$,m=1;`}return s+=function(e,t){let n="";return a[t]||(e.x2&&(e.x?(o[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(o[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}(i,n),s+="return m;",l(e,["item","_"],s)},codegen:{get(e){const t=`[${e.map(r.stringValue).join("][")}]`,n=Function("_",`return _${t};`);return n.path=t,n},comparator(e,t){let n;const r=Function("a","b","var u, v; return "+e.map(((e,r)=>{const i=t[r];let a,o;return e.path?(a=`a${e.path}`,o=`b${e.path}`):((n=n||{})["f"+r]=e,a=`this.f${r}(a)`,o=`this.f${r}(b)`),function(e,t,n,r){return`((u = ${e}) < (v = ${t}) || u == null) && v != null ? ${n}\n : (u > v || v == null) && u != null ? ${r}\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${n}\n : v !== v && u === u ? ${r} : `}(a,o,-i,i)})).join("")+"0;");return n?r.bind(n):r}}};function c(e,t,n){if(!e||!(0,r.isObject)(e))return e;for(let i,a=0,o=d.length;ae&&e.$tupleid?i.tupleid:e));return t.fn[n]||(t.fn[n]=(0,r.compare)(a,e.$order,t.expr.codegen))}},{key:"$context",parse:function(e,t){return t}},{key:"$subflow",parse:function(e,t){const n=e.$subflow;return function(e,r,i){const a=t.fork().parse(n),o=a.get(n.operators[0].id),s=a.signals.parent;return s&&s.set(i),o.detachSubflow=()=>t.detach(a),o}}},{key:"$tupleid",parse:function(){return i.tupleid}}];const f={skip:!0};function p(e,t,n,r){return new h(e,t,n,r)}function h(e,t,n,r){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=r||u,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function g(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}h.prototype=g.prototype={fork(){const e=new g(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter((t=>t!==e));const t=Object.keys(e.nodes);for(const n of t)e.nodes[n]._targets=null;for(const n of t)e.nodes[n].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const n=this,r=n.dataflow,i=e.value;if(n.set(e.id,t),"collect"===s(e.type)&&i&&(i.$ingest?r.ingest(t,i.$ingest,i.$format):i.$request?r.preload(t,i.$request,i.$format):r.pulse(t,r.changeset().insert(i))),e.root&&(n.root=t),e.parent){let i=n.get(e.parent.$ref);i?(r.connect(i,[t]),t.targets().add(i)):(n.unresolved=n.unresolved||[]).push((()=>{i=n.get(e.parent.$ref),r.connect(i,[t]),t.targets().add(i)}))}if(e.signal&&(n.signals[e.signal]=t),e.scale&&(n.scales[e.scale]=t),e.data)for(const r in e.data){const i=n.data[r]||(n.data[r]={});e.data[r].forEach((e=>i[e]=t))}},resolve(){return(this.unresolved||[]).forEach((e=>e())),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[s(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,n,r,i){this.dataflow.on(t,n,r,i,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:function(e){const t=this,n=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),n.forEach((e=>t.parseOperator(e))),n.forEach((e=>t.parseOperatorParameters(e))),(e.streams||[]).forEach((e=>t.parseStream(e))),(e.updates||[]).forEach((e=>t.parseUpdate(e))),t.resolve()},parseOperator:function(e){const t=this;"operator"!==s(e.type)&&e.type?t.transform(e,e.type):t.operator(e,e.update?t.operatorExpression(e.update):null)},parseOperatorParameters:function(e){const t=this;if(e.params){const n=t.get(e.id);n||(0,r.error)("Invalid operator id: "+e.id),t.dataflow.connect(n,n.parameters(t.parseParameters(e.params),e.react,e.initonly))}},parseParameters:function(e,t){t=t||{};const n=this;for(const i in e){const a=e[i];t[i]=(0,r.isArray)(a)?a.map((e=>c(e,n,t))):c(a,n,t)}return t},parseStream:function(e){var t,n=this,i=null!=e.filter?n.eventExpression(e.filter):void 0,a=null!=e.stream?n.get(e.stream):void 0;e.source?a=n.events(e.source,e.type,i):e.merge&&(a=(t=e.merge.map((e=>n.get(e))))[0].merge.apply(t[0],t.slice(1))),e.between&&(t=e.between.map((e=>n.get(e))),a=a.between(t[0],t[1])),e.filter&&(a=a.filter(i)),null!=e.throttle&&(a=a.throttle(+e.throttle)),null!=e.debounce&&(a=a.debounce(+e.debounce)),null==a&&(0,r.error)("Invalid stream definition: "+JSON.stringify(e)),e.consume&&a.consume(!0),n.stream(e,a)},parseUpdate:function(e){var t,n=this,i=(0,r.isObject)(i=e.source)?i.$ref:i,a=n.get(i),o=e.update,s=void 0;a||(0,r.error)("Source not defined: "+e.source),t=e.target&&e.target.$expr?n.eventExpression(e.target.$expr):n.get(e.target),o&&o.$expr&&(o.$params&&(s=n.parseParameters(o.$params)),o=n.handlerExpression(o.$expr)),n.update(e,a,t,o,s)},getState:function(e){var t=this,n={};if(e.signals){var r=n.signals={};Object.keys(t.signals).forEach((n=>{const i=t.signals[n];e.signals(n,i)&&(r[n]=i.value)}))}if(e.data){var i=n.data={};Object.keys(t.data).forEach((n=>{const r=t.data[n];e.data(n,r)&&(i[n]=r.input.value)}))}return t.subcontext&&!1!==e.recurse&&(n.subcontext=t.subcontext.map((t=>t.getState(e)))),n},setState:function(e){var t=this,n=t.dataflow,i=e.data,a=e.signals;Object.keys(a||{}).forEach((e=>{n.update(t.signals[e],a[e],f)})),Object.keys(i||{}).forEach((e=>{n.pulse(t.data[e].input,n.changeset().remove(r.truthy).insert(i[e]))})),(e.subcontext||[]).forEach(((e,n)=>{const r=t.subcontext[n];r&&r.setState(e)}))}}},14588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Band:()=>A,BinOrdinal:()=>C,DiscreteLegend:()=>ue,Diverging:()=>b,GradientLegend:()=>ce,Identity:()=>c,Linear:()=>d,Log:()=>f,Ordinal:()=>S,Point:()=>_,Pow:()=>p,Quantile:()=>w,Quantize:()=>x,Sequential:()=>v,Sqrt:()=>h,SymbolLegend:()=>le,Symlog:()=>g,Threshold:()=>E,Time:()=>m,UTC:()=>y,bandSpace:()=>u,domainCaption:()=>De,interpolate:()=>ne,interpolateColors:()=>Q,interpolateRange:()=>J,isContinuous:()=>j,isDiscrete:()=>H,isDiscretizing:()=>G,isInterpolating:()=>Y,isLogarithmic:()=>V,isQuantile:()=>X,isRegisteredScale:()=>B,isTemporal:()=>W,isValidScaleType:()=>z,labelFormat:()=>Se,labelFraction:()=>Re,labelValues:()=>xe,quantizeInterpolator:()=>Z,registerScale:()=>L,scale:()=>U,scaleCopy:()=>ee,scaleFraction:()=>te,scaleImplicit:()=>a.scaleImplicit,scheme:()=>se,tickCount:()=>he,tickFormat:()=>ye,tickValues:()=>me,validTicks:()=>ge});var r=n(26372),i=n(61388),a=n(71303),o=n(82226),s=n(71864),l=n(71652);function u(e,t,n){const r=e-t+2*n;return e?r>0?r:1:0}const c="identity",d="linear",f="log",p="pow",h="sqrt",g="symlog",m="time",y="utc",v="sequential",b="diverging",w="quantile",x="quantize",E="threshold",S="ordinal",_="point",A="band",C="bin-ordinal",T="continuous",k="discrete",R="discretizing",D="interpolating",O="temporal";function N(){const e=(0,a.scaleOrdinal)().unknown(void 0),t=e.domain,n=e.range;let r,o,s=[0,1],l=!1,c=0,d=0,f=.5;function p(){const e=t().length,a=s[1]g+r*e));return n(a?m.reverse():m)}return delete e.unknown,e.domain=function(e){return arguments.length?(t(e),p()):t()},e.range=function(e){return arguments.length?(s=[+e[0],+e[1]],p()):s.slice()},e.rangeRound=function(e){return s=[+e[0],+e[1]],l=!0,p()},e.bandwidth=function(){return o},e.step=function(){return r},e.round=function(e){return arguments.length?(l=!!e,p()):l},e.padding=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),c=d,p()):c},e.paddingInner=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),p()):c},e.paddingOuter=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),p()):d},e.align=function(e){return arguments.length?(f=Math.max(0,Math.min(1,e)),p()):f},e.invertRange=function(e){if(null==e[0]||null==e[1])return;const r=s[1]s[1-r])?void 0:(u=Math.max(0,(0,i.bisectRight)(a,f)-1),c=f===p?u:(0,i.bisectRight)(a,p)-1,f-a[u]>o+1e-10&&++u,r&&(d=u,u=l-c,c=l-d),u>c?void 0:t().slice(u,c+1))},e.invert=function(t){const n=e.invertRange([t,t]);return n?n[0]:n},e.copy=function(){return N().domain(t()).range(s).round(l).paddingInner(c).paddingOuter(d).align(f)},p()}function F(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return F(t())},e}var P=Array.prototype.map;const M=Array.prototype.slice,I=new Map,$=Symbol("vega_scale");function L(e){return e[$]=!0,e}function B(e){return e&&!0===e[$]}function U(e,t,n){return arguments.length>1?(I.set(e,function(e,t,n){const i=function(){const n=t();return n.invertRange||(n.invertRange=n.invert?function(e){return function(t){let n,r=t[0],i=t[1];return i=s&&n[a]<=l&&(u<0&&(u=a),r=a);if(!(u<0))return s=e.invertExtent(n[u]),l=e.invertExtent(n[r]),[void 0===s[0]?s[1]:s[0],void 0===l[1]?l[0]:l[1]]}}(n):void 0),n.type=e,L(n)};return i.metadata=(0,r.toSet)((0,r.array)(n)),i}(e,t,n)),this):z(e)?I.get(e):void 0}function z(e){return I.has(e)}function q(e,t){const n=I.get(e);return n&&n.metadata[t]}function j(e){return q(e,T)}function H(e){return q(e,k)}function G(e){return q(e,R)}function V(e){return q(e,f)}function W(e){return q(e,O)}function Y(e){return q(e,D)}function X(e){return q(e,w)}U(c,a.scaleIdentity),U(d,a.scaleLinear,T),U(f,a.scaleLog,[T,f]),U(p,a.scalePow,T),U(h,a.scaleSqrt,T),U(g,a.scaleSymlog,T),U(m,a.scaleTime,[T,O]),U(y,a.scaleUtc,[T,O]),U(v,a.scaleSequential,[T,D]),U(`${v}-${d}`,a.scaleSequential,[T,D]),U(`${v}-${f}`,a.scaleSequentialLog,[T,D,f]),U(`${v}-${p}`,a.scaleSequentialPow,[T,D]),U(`${v}-${h}`,a.scaleSequentialSqrt,[T,D]),U(`${v}-${g}`,a.scaleSequentialSymlog,[T,D]),U(`${b}-${d}`,a.scaleDiverging,[T,D]),U(`${b}-${f}`,a.scaleDivergingLog,[T,D,f]),U(`${b}-${p}`,a.scaleDivergingPow,[T,D]),U(`${b}-${h}`,a.scaleDivergingSqrt,[T,D]),U(`${b}-${g}`,a.scaleDivergingSymlog,[T,D]),U(w,a.scaleQuantile,[R,w]),U(x,a.scaleQuantize,R),U(E,a.scaleThreshold,R),U(C,(function e(){let t=[],n=[];function o(e){return null==e||e!=e?void 0:n[((0,i.bisect)(t,e)-1)%n.length]}return o.domain=function(e){return arguments.length?(t=function(e){return P.call(e,r.toNumber)}(e),o):t.slice()},o.range=function(e){return arguments.length?(n=M.call(e),o):n.slice()},o.tickFormat=function(e,n){return(0,a.tickFormat)(t[0],(0,r.peek)(t),null==e?10:e,n)},o.copy=function(){return e().domain(o.domain()).range(o.range())},o}),[k,R]),U(S,a.scaleOrdinal,k),U(A,N,k),U(_,(function(){return F(N().paddingInner(1))}),k);const K=["clamp","base","constant","exponent"];function J(e,t){const n=t[0],i=(0,r.peek)(t)-n;return function(t){return e(n+t*i)}}function Q(e,t,n){return o.piecewise(ne(t||"rgb",n),e)}function Z(e,t){const n=new Array(t),r=t+1;for(let i=0;ie[t]?s[t](e[t]()):0)),s):(0,r.constant)(.5)}function ne(e,t){const n=o[function(e){return"interpolate"+e.toLowerCase().split("-").map((e=>e[0].toUpperCase()+e.slice(1))).join("")}(e)];return null!=t&&n&&n.gamma?n.gamma(t):n}const re={accent:s.schemeAccent,category10:s.schemeCategory10,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:s.schemeDark2,observable10:s.schemeObservable10,paired:s.schemePaired,pastel1:s.schemePastel1,pastel2:s.schemePastel2,set1:s.schemeSet1,set2:s.schemeSet2,set3:s.schemeSet3,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function ie(e){if((0,r.isArray)(e))return e;const t=e.length/6|0,n=new Array(t);for(let r=0;r1?(oe[e]=t,this):oe[e]}ae(re,ie),ae({blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},(e=>Q(ie(e))));const le="symbol",ue="discrete",ce="gradient",de=e=>(0,r.isArray)(e)?e.map((e=>String(e))):String(e),fe=(e,t)=>e[1]-t[1],pe=(e,t)=>t[1]-e[1];function he(e,t,n){let i;return(0,r.isNumber)(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),null!=n&&(t=Math.min(t,Math.floor((0,r.span)(e.domain())/n||1)+1))),(0,r.isObject)(t)&&(i=t.step,t=t.interval),(0,r.isString)(t)&&(t=e.type===m?(0,l.timeInterval)(t):e.type==y?(0,l.utcInterval)(t):(0,r.error)("Only time and utc scales accept interval strings."),i&&(t=t.every(i))),t}function ge(e,t,n){let i=e.range(),a=i[0],o=(0,r.peek)(i),s=fe;if(a>o&&(i=o,o=a,a=i,s=pe),a=Math.floor(a),o=Math.ceil(o),t=t.map((t=>[t,e(t)])).filter((e=>a<=e[1]&&e[1]<=o)).sort(s).map((e=>e[0])),n>0&&t.length>1){const e=[t[0],(0,r.peek)(t)];for(;t.length>n&&t.length>=3;)t=t.filter(((e,t)=>!(t%2)));t.length<3&&(t=e)}return t}function me(e,t){return e.bins?ge(e,e.bins,t):e.ticks?e.ticks(t):e.domain()}function ye(e,t,n,r,i,a){const o=t.type;let s=de;if(o===m||i===m)s=e.timeFormat(r);else if(o===y||i===y)s=e.utcFormat(r);else if(V(o)){const i=e.formatFloat(r);if(a||t.bins)s=i;else{const e=ve(t,n,!1);s=t=>e(t)?i(t):""}}else if(t.tickFormat){const i=t.domain();s=e.formatSpan(i[0],i[i.length-1],n,r)}else r&&(s=e.format(r));return s}function ve(e,t,n){const r=me(e,t),i=e.base(),a=Math.log(i),o=Math.max(1,i*t/r.length),s=e=>{let t=e/Math.pow(i,Math.round(Math.log(e)/a));return t*ibe[e.type]||e.bins;function Se(e,t,n,r,i,a,o){const s=we[t.type]&&a!==m&&a!==y?function(e,t,n){const r=t[we[t.type]](),i=r.length;let a,o=i>1?r[1]-r[0]:r[0];for(a=1;a(t,n,r)=>{const i=Ae(r[n+1],Ae(r.max,1/0)),a=ke(t,e),o=ke(i,e);return a&&o?a+" – "+o:o?"< "+o:"≥ "+a},Ae=(e,t)=>null!=e?e:t,Ce=e=>(t,n)=>n?e(t):null,Te=e=>t=>e(t),ke=(e,t)=>Number.isFinite(e)?t(e):null;function Re(e){const t=e.domain(),n=t.length-1;let i=+t[0],a=+(0,r.peek)(t),o=a-i;if(e.type===E){const e=n?o/n:.1;i-=e,a+=e,o=a-i}return e=>(e-i)/o}function De(e,t,n){n=n||{};const i=Math.max(3,n.maxlen||7),a=function(e,t,n,i){const a=i||t.type;return(0,r.isString)(n)&&W(a)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),n||a!==m?n||a!==y?Se(e,t,5,null,n,i,!0):e.utcFormat("%A, %d %B %Y, %X UTC"):e.timeFormat("%A, %d %B %Y, %X")}(e,t,n.format,n.formatType);if(G(t.type)){const e=xe(t).slice(1).map(a),n=e.length;return`${n} boundar${1===n?"y":"ies"}: ${e.join(", ")}`}if(H(t.type)){const e=t.domain(),n=e.length;return`${n} value${1===n?"":"s"}: ${n>i?e.slice(0,i-2).map(a).join(", ")+", ending with "+e.slice(-1).map(a):e.map(a).join(", ")}`}{const e=t.domain();return`values from ${a(e[0])} to ${a((0,r.peek)(e))}`}}},84636:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Bounds:()=>ce,CanvasHandler:()=>Yn,CanvasRenderer:()=>er,Gradient:()=>h,GroupItem:()=>fe,Handler:()=>An,HybridHandler:()=>Gr,HybridRenderer:()=>Hr,Item:()=>de,Marks:()=>un,RenderType:()=>Xr,Renderer:()=>Tn,ResourceLoader:()=>pe,SVGHandler:()=>nr,SVGRenderer:()=>kr,SVGStringRenderer:()=>zr,Scenegraph:()=>yn,boundClip:()=>ri,boundContext:()=>Pe,boundItem:()=>cn,boundMark:()=>fn,boundStroke:()=>me,domChild:()=>xn,domClear:()=>En,domCreate:()=>bn,domFind:()=>wn,font:()=>en,fontFamily:()=>Zt,fontSize:()=>Yt,intersect:()=>Qr,intersectBoxLine:()=>Ge,intersectPath:()=>ze,intersectPoint:()=>qe,intersectRule:()=>He,lineHeight:()=>Xt,markup:()=>wr,multiLineOffset:()=>Jt,path:()=>a.path,pathCurves:()=>m,pathEqual:()=>oi,pathParse:()=>E,pathRectangle:()=>V,pathRender:()=>F,pathSymbols:()=>$,pathTrail:()=>W,point:()=>_n,renderModule:()=>Jr,resetSVGClipId:()=>le,resetSVGDefIds:()=>si,sceneEqual:()=>ai,sceneFromJSON:()=>gn,scenePickVisit:()=>rt,sceneToJSON:()=>hn,sceneVisit:()=>nt,sceneZOrder:()=>tt,serializeXML:()=>xr,setHybridRendererOptions:()=>jr,textMetrics:()=>qt});var r=n(26372),i=n(76588),a=n(20066),o=n(14958),s=n(83418),l=n(14588);let u=0;const c="p_";function d(e){return e&&e.gradient}function f(e,t,n){const r=e.gradient;let i=e.id,a="radial"===r?c:"";return i||(i=e.id="gradient_"+u++,"radial"===r?(e.x1=p(e.x1,.5),e.y1=p(e.y1,.5),e.r1=p(e.r1,0),e.x2=p(e.x2,.5),e.y2=p(e.y2,.5),e.r2=p(e.r2,.5),a=c):(e.x1=p(e.x1,0),e.y1=p(e.y1,0),e.x2=p(e.x2,1),e.y2=p(e.y2,0))),t[i]=e,"url("+(n||"")+"#"+a+i+")"}function p(e,t){return null!=e?e:t}function h(e,t){var n,r=[];return n={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:r,stop:function(e,t){return r.push({offset:e,color:t}),n}}}const g={basis:{curve:i.curveBasis},"basis-closed":{curve:i.curveBasisClosed},"basis-open":{curve:i.curveBasisOpen},bundle:{curve:i.curveBundle,tension:"beta",value:.85},cardinal:{curve:i.curveCardinal,tension:"tension",value:0},"cardinal-open":{curve:i.curveCardinalOpen,tension:"tension",value:0},"cardinal-closed":{curve:i.curveCardinalClosed,tension:"tension",value:0},"catmull-rom":{curve:i.curveCatmullRom,tension:"alpha",value:.5},"catmull-rom-closed":{curve:i.curveCatmullRomClosed,tension:"alpha",value:.5},"catmull-rom-open":{curve:i.curveCatmullRomOpen,tension:"alpha",value:.5},linear:{curve:i.curveLinear},"linear-closed":{curve:i.curveLinearClosed},monotone:{horizontal:i.curveMonotoneY,vertical:i.curveMonotoneX},natural:{curve:i.curveNatural},step:{curve:i.curveStep},"step-after":{curve:i.curveStepAfter},"step-before":{curve:i.curveStepBefore}};function m(e,t,n){var i=(0,r.hasOwnProperty)(g,e)&&g[e],a=null;return i&&(a=i.curve||i[t||"vertical"],i.tension&&null!=n&&(a=a[i.tension](n))),a}const y={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},v=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,b=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,w=/^((\s+,?\s*)|(,\s*))/,x=/^[01]/;function E(e){const t=[];return(e.match(v)||[]).forEach((e=>{let n=e[0];const r=n.toLowerCase(),i=y[r],a=function(e,t,n){const r=[];for(let i=0;t&&i1&&(g=Math.sqrt(g),n*=g,r*=g);const m=f/n,y=d/n,v=-d/r,b=f/r,w=m*s+y*l,x=v*s+b*l,E=m*e+y*t,C=v*e+b*t;let k=1/((E-w)*(E-w)+(C-x)*(C-x))-.25;k<0&&(k=0);let D=Math.sqrt(k);a==i&&(D=-D);const O=.5*(w+E)-D*(C-x),N=.5*(x+C)+D*(E-w),F=Math.atan2(x-N,w-O);let P=Math.atan2(C-N,E-O)-F;P<0&&1===a?P+=A:P>0&&0===a&&(P-=A);const M=Math.ceil(Math.abs(P/(_+.001))),I=[];for(let e=0;e+e}function G(e,t,n){return Math.max(t,Math.min(e,n))}function V(){var e=U,t=z,n=q,r=j,i=H(0),o=i,s=i,l=i,u=null;function c(c,d,f){var p,h=null!=d?d:+e.call(this,c),g=null!=f?f:+t.call(this,c),m=+n.call(this,c),y=+r.call(this,c),v=Math.min(m,y)/2,b=G(+i.call(this,c),0,v),w=G(+o.call(this,c),0,v),x=G(+s.call(this,c),0,v),E=G(+l.call(this,c),0,v);if(u||(u=p=(0,a.path)()),b<=0&&w<=0&&x<=0&&E<=0)u.rect(h,g,m,y);else{var S=h+m,_=g+y;u.moveTo(h+b,g),u.lineTo(S-w,g),u.bezierCurveTo(S-B*w,g,S,g+B*w,S,g+w),u.lineTo(S,_-E),u.bezierCurveTo(S,_-B*E,S-B*E,_,S-E,_),u.lineTo(h+x,_),u.bezierCurveTo(h+B*x,_,h,_-B*x,h,_-x),u.lineTo(h,g+b),u.bezierCurveTo(h,g+B*b,h+B*b,g,h+b,g),u.closePath()}if(p)return u=null,p+""||null}return c.x=function(t){return arguments.length?(e=H(t),c):e},c.y=function(e){return arguments.length?(t=H(e),c):t},c.width=function(e){return arguments.length?(n=H(e),c):n},c.height=function(e){return arguments.length?(r=H(e),c):r},c.cornerRadius=function(e,t,n,r){return arguments.length?(i=H(e),o=null!=t?H(t):i,l=null!=n?H(n):i,s=null!=r?H(r):o,c):i},c.context=function(e){return arguments.length?(u=null==e?null:e,c):u},c}function W(){var e,t,n,r,i,o,s,l,u=null;function c(e,t,n){const r=n/2;if(i){var a=s-t,c=e-o;if(a||c){var d=Math.hypot(a,c),f=(a/=d)*l,p=(c/=d)*l,h=Math.atan2(c,a);u.moveTo(o-f,s-p),u.lineTo(e-a*r,t-c*r),u.arc(e,t,r,h-Math.PI,h),u.lineTo(o+f,s+p),u.arc(o,s,l,h,h+Math.PI)}else u.arc(e,t,r,0,A);u.closePath()}else i=1;o=e,s=t,l=r}function d(o){var s,l,d,f=o.length,p=!1;for(null==u&&(u=d=(0,a.path)()),s=0;s<=f;++s)!(se.x||0,K=e=>e.y||0,J=e=>!(!1===e.defined),Q=(0,i.arc)().startAngle((e=>e.startAngle||0)).endAngle((e=>e.endAngle||0)).padAngle((e=>e.padAngle||0)).innerRadius((e=>e.innerRadius||0)).outerRadius((e=>e.outerRadius||0)).cornerRadius((e=>e.cornerRadius||0)),Z=(0,i.area)().x(X).y1(K).y0((e=>(e.y||0)+(e.height||0))).defined(J),ee=(0,i.area)().y(K).x1(X).x0((e=>(e.x||0)+(e.width||0))).defined(J),te=(0,i.line)().x(X).y(K).defined(J),ne=V().x(X).y(K).width((e=>e.width||0)).height((e=>e.height||0)).cornerRadius((e=>Y(e.cornerRadiusTopLeft,e.cornerRadius)||0),(e=>Y(e.cornerRadiusTopRight,e.cornerRadius)||0),(e=>Y(e.cornerRadiusBottomRight,e.cornerRadius)||0),(e=>Y(e.cornerRadiusBottomLeft,e.cornerRadius)||0)),re=(0,i.symbol)().type((e=>$(e.shape||"circle"))).size((e=>Y(e.size,64))),ie=W().x(X).y(K).defined(J).size((e=>e.size||1));function ae(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function oe(e,t,n,r){return ne.context(e)(t,n,r)}var se=1;function le(){se=1}function ue(e,t,n){var i=t.clip,a=e._defs,o=t.clip_id||(t.clip_id="clip"+se++),s=a.clipping[o]||(a.clipping[o]={id:o});return(0,r.isFunction)(i)?s.path=i(null):ae(n)?s.path=oe(null,n,0,0):(s.width=n.width||0,s.height=n.height||0),"url(#"+o+")"}function ce(e){this.clear(),e&&this.union(e)}function de(e){this.mark=e,this.bounds=this.bounds||new ce}function fe(e){de.call(this,e),this.items=this.items||[]}ce.prototype={clone(){return new ce(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,n,r){return nthis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,n){const r=this.rotatedPoints(e,t,n);return this.clear().add(r[0],r[1]).add(r[2],r[3]).add(r[4],r[5]).add(r[6],r[7])},rotatedPoints(e,t,n){var{x1:r,y1:i,x2:a,y2:o}=this,s=Math.cos(e),l=Math.sin(e),u=t-t*s+n*l,c=n-t*l-n*s;return[s*r-l*i+u,l*r+s*i+c,s*r-l*o+u,l*r+s*o+c,s*a-l*i+u,l*a+s*i+c,s*a-l*o+u,l*a+s*o+c]},union(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2e.x2||this.y2e.y2)},contains(e,t){return!(ethis.x2||tthis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},(0,r.inherits)(fe,de);class pe{constructor(e){this._pending=0,this._loader=e||(0,s.loader)()}pending(){return this._pending}sanitizeURL(e){const t=this;return he(t),t._loader.sanitize(e,{context:"href"}).then((e=>(ge(t),e))).catch((()=>(ge(t),null)))}loadImage(e){const t=this,n=(0,o.image)();return he(t),t._loader.sanitize(e,{context:"image"}).then((e=>{const i=e.href;if(!i||!n)throw{url:i};const a=new n,o=(0,r.hasOwnProperty)(e,"crossOrigin")?e.crossOrigin:"anonymous";return null!=o&&(a.crossOrigin=o),a.onload=()=>ge(t),a.onerror=()=>ge(t),a.src=i,a})).catch((e=>(ge(t),{complete:!1,width:0,height:0,src:e&&e.url||""})))}ready(){const e=this;return new Promise((t=>{!function n(r){e.pending()?setTimeout((()=>{n(!0)}),10):t(r)}(!1)}))}}function he(e){e._pending+=1}function ge(e){e._pending-=1}function me(e,t,n){if(t.stroke&&0!==t.opacity&&0!==t.strokeOpacity){const r=null!=t.strokeWidth?+t.strokeWidth:1;e.expand(r+(n?function(e,t){return e.strokeJoin&&"miter"!==e.strokeJoin?0:t}(t,r):0))}return e}const ye=A-1e-8;let ve,be,we,xe,Ee,Se,_e,Ae;const Ce=(e,t)=>ve.add(e,t),Te=(e,t)=>Ce(be=e,we=t),ke=e=>Ce(e,ve.y1),Re=e=>Ce(ve.x1,e),De=(e,t)=>Ee*e+_e*t,Oe=(e,t)=>Se*e+Ae*t,Ne=(e,t)=>Ce(De(e,t),Oe(e,t)),Fe=(e,t)=>Te(De(e,t),Oe(e,t));function Pe(e,t){return ve=e,t?(xe=t*S,Ee=Ae=Math.cos(xe),Se=Math.sin(xe),_e=-Se):(Ee=Ae=1,xe=Se=_e=0),Me}const Me={beginPath(){},closePath(){},moveTo:Fe,lineTo:Fe,rect(e,t,n,r){xe?(Ne(e+n,t),Ne(e+n,t+r),Ne(e,t+r),Fe(e,t)):(Ce(e+n,t+r),Te(e,t))},quadraticCurveTo(e,t,n,r){const i=De(e,t),a=Oe(e,t),o=De(n,r),s=Oe(n,r);Ie(be,i,o,ke),Ie(we,a,s,Re),Te(o,s)},bezierCurveTo(e,t,n,r,i,a){const o=De(e,t),s=Oe(e,t),l=De(n,r),u=Oe(n,r),c=De(i,a),d=Oe(i,a);$e(be,o,l,c,ke),$e(we,s,u,d,Re),Te(c,d)},arc(e,t,n,r,i,a){if(r+=xe,i+=xe,be=n*Math.cos(i)+e,we=n*Math.sin(i)+t,Math.abs(i-r)>ye)Ce(e-n,t-n),Ce(e+n,t+n);else{const o=r=>Ce(n*Math.cos(r)+e,n*Math.sin(r)+t);let s,l;if(o(r),o(i),i!==r)if((r%=A)<0&&(r+=A),(i%=A)<0&&(i+=A),ii;++l,s-=_)o(s);else for(s=r-r%_+_,l=0;l<4&&s1e-14?(l=o*o+s*a,l>=0&&(l=Math.sqrt(l),u=(-o+l)/a,c=(-o-l)/a)):u=.5*s/o,0m)return!1;p>g&&(g=p)}else if(d>0){if(p0&&(e.globalAlpha=n,e.fillStyle=Ke(e,t,t.fill),!0)}var Qe=[];function Ze(e,t,n){var r=null!=(r=t.strokeWidth)?r:1;return!(r<=0)&&(n*=null==t.strokeOpacity?1:t.strokeOpacity)>0&&(e.globalAlpha=n,e.strokeStyle=Ke(e,t,t.stroke),e.lineWidth=r,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||Qe),e.lineDashOffset=t.strokeDashOffset||0),!0)}function et(e,t){return e.zindex-t.zindex||e.index-t.index}function tt(e){if(!e.zdirty)return e.zitems;var t,n,r,i=e.items,a=[];for(n=0,r=i.length;n=0;)if(n=t(i[r]))return n;if(i===a)for(r=(i=e.items).length;--r>=0;)if(!i[r].zindex&&(n=t(i[r])))return n;return null}function it(e){return function(t,n,r){nt(n,(n=>{r&&!r.intersects(n.bounds)||ot(e,t,n,n)}))}}function at(e){return function(t,n,r){!n.items.length||r&&!r.intersects(n.bounds)||ot(e,t,n.items[0],n.items)}}function ot(e,t,n,r){var i=null==n.opacity?1:n.opacity;0!==i&&(e(t,r)||(Ve(t,n),n.fill&&Je(t,n,i)&&t.fill(),n.stroke&&Ze(t,n,i)&&t.stroke()))}function st(e){return e=e||r.truthy,function(t,n,r,i,a,o){return r*=t.pixelRatio,i*=t.pixelRatio,rt(n,(n=>{const s=n.bounds;if((!s||s.contains(a,o))&&s)return e(t,n,r,i,a,o)?n:void 0}))}}function lt(e,t){return function(n,r,i,a){var o,s,l=Array.isArray(r)?r[0]:r,u=null==t?l.fill:t,c=l.stroke&&n.isPointInStroke;return c&&(o=l.strokeWidth,s=l.strokeCap,n.lineWidth=null!=o?o:1,n.lineCap=null!=s?s:"butt"),!e(n,r)&&(u&&n.isPointInPath(i,a)||c&&n.isPointInStroke(i,a))}}function ut(e){return st(lt(e))}function ct(e,t){return"translate("+e+","+t+")"}function dt(e){return"rotate("+e+")"}function ft(e){return ct(e.x||0,e.y||0)}function pt(e,t,n){function r(e,n){var r=n.x||0,i=n.y||0,a=n.angle||0;e.translate(r,i),a&&e.rotate(a*=S),e.beginPath(),t(e,n),a&&e.rotate(-a),e.translate(-r,-i)}return{type:e,tag:"path",nested:!1,attr:function(e,n){e("transform",function(e){return ct(e.x||0,e.y||0)+(e.angle?" "+dt(e.angle):"")}(n)),e("d",t(null,n))},bound:function(e,n){return t(Pe(e,n.angle),n),me(e,n).translate(n.x||0,n.y||0)},draw:it(r),pick:ut(r),isect:n||ze(r)}}var ht=pt("arc",(function(e,t){return Q.context(e)(t)}));function gt(e,t,n){function r(e,n){e.beginPath(),t(e,n)}const i=lt(r);return{type:e,tag:"path",nested:!0,attr:function(e,n){var r=n.mark.items;r.length&&e("d",t(null,r))},bound:function(e,n){var r=n.items;return 0===r.length?e:(t(Pe(e),r),me(e,r[0]))},draw:at(r),pick:function(e,t,n,r,a,o){var s=t.items,l=t.bounds;return!s||!s.length||l&&!l.contains(a,o)?null:(n*=e.pixelRatio,r*=e.pixelRatio,i(e,s,n,r)?s[0]:null)},isect:qe,tip:n}}var mt=gt("area",(function(e,t){const n=t[0],r=n.interpolate||"linear";return("horizontal"===n.orient?ee:Z).curve(m(r,n.orient,n.tension)).context(e)(t)}),(function(e,t){for(var n,r,i="horizontal"===e[0].orient?t[1]:t[0],a="horizontal"===e[0].orient?"y":"x",o=e.length,s=1/0;--o>=0;)!1!==e[o].defined&&(r=Math.abs(e[o][a]-i)).5&&t<1.5?.5-Math.abs(t-1):0}function bt(e,t){const n=vt(t);e("d",oe(null,t,n,n))}function wt(e,t,n,r){const i=vt(t);e.beginPath(),oe(e,t,(n||0)+i,(r||0)+i)}const xt=lt(wt),Et=lt(wt,!1),St=lt(wt,!0);var _t={type:"group",tag:"g",nested:!1,attr:function(e,t){e("transform",ft(t))},bound:function(e,t){if(!t.clip&&t.items){const n=t.items,r=n.length;for(let t=0;t{const i=t.x||0,a=t.y||0,o=t.strokeForeground,s=null==t.opacity?1:t.opacity;(t.stroke||t.fill)&&s&&(wt(e,t,i,a),Ve(e,t),t.fill&&Je(e,t,s)&&e.fill(),t.stroke&&!o&&Ze(e,t,s)&&e.stroke()),e.save(),e.translate(i,a),t.clip&&yt(e,t),n&&n.translate(-i,-a),nt(t,(t=>{("group"===t.marktype||null==r||r.includes(t.marktype))&&this.draw(e,t,n,r)})),n&&n.translate(i,a),e.restore(),o&&t.stroke&&s&&(wt(e,t,i,a),Ve(e,t),Ze(e,t,s)&&e.stroke())}))},pick:function(e,t,n,r,i,a){if(t.bounds&&!t.bounds.contains(i,a)||!t.items)return null;const o=n*e.pixelRatio,s=r*e.pixelRatio;return rt(t,(l=>{let u,c,d;const f=l.bounds;if(f&&!f.contains(i,a))return;c=l.x||0,d=l.y||0;const p=c+(l.width||0),h=d+(l.height||0),g=l.clip;if(g&&(ip||ah))return;if(e.save(),e.translate(c,d),c=i-c,d=a-d,g&&ae(l)&&!St(e,l,o,s))return e.restore(),null;const m=l.strokeForeground,y=!1!==t.interactive;return y&&m&&l.stroke&&Et(e,l,o,s)?(e.restore(),l):(u=rt(l,(e=>function(e,t,n){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,n)}(e,c,d)?this.pick(e,n,r,c,d):null)),!u&&y&&(l.fill||!m&&l.stroke)&&xt(e,l,o,s)&&(u=l),e.restore(),u||null)}))},isect:je,content:function(e,t,n){e("clip-path",t.clip?ue(n,t,t):null)},background:function(e,t){e("class","background"),e("aria-hidden",!0),bt(e,t)},foreground:function(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?bt(e,t):e("d","")}},At={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function Ct(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then((t=>{e.image=t,e.image.url=e.url}))),n}function Tt(e,t){return null!=e.width?e.width:t&&t.width?!1!==e.aspect&&e.height?e.height*t.width/t.height:t.width:0}function kt(e,t){return null!=e.height?e.height:t&&t.height?!1!==e.aspect&&e.width?e.width*t.height/t.width:t.height:0}function Rt(e,t){return"center"===e?t/2:"right"===e?t:0}function Dt(e,t){return"middle"===e?t/2:"bottom"===e?t:0}var Ot={type:"image",tag:"image",nested:!1,attr:function(e,t,n){const r=Ct(t,n),i=Tt(t,r),a=kt(t,r),o=(t.x||0)-Rt(t.align,i),s=(t.y||0)-Dt(t.baseline,a);e("href",!r.src&&r.toDataURL?r.toDataURL():r.src||"",At["xmlns:xlink"],"xlink:href"),e("transform",ct(o,s)),e("width",i),e("height",a),e("preserveAspectRatio",!1===t.aspect?"none":"xMidYMid")},bound:function(e,t){const n=t.image,r=Tt(t,n),i=kt(t,n),a=(t.x||0)-Rt(t.align,r),o=(t.y||0)-Dt(t.baseline,i);return e.set(a,o,a+r,o+i)},draw:function(e,t,n){nt(t,(t=>{if(n&&!n.intersects(t.bounds))return;const r=Ct(t,this);let i=Tt(t,r),a=kt(t,r);if(0===i||0===a)return;let o,s,l,u,c=(t.x||0)-Rt(t.align,i),d=(t.y||0)-Dt(t.baseline,a);!1!==t.aspect&&(s=r.width/r.height,l=t.width/t.height,s==s&&l==l&&s!==l&&(l=0;)if(!1!==e[a].defined&&(n=e[a].x-t[0])*n+(r=e[a].y-t[1])*r{if(!n||n.intersects(t.bounds)){var r=null==t.opacity?1:t.opacity;r&&$t(e,t,r)&&(Ve(e,t),e.stroke())}}))},pick:st((function(e,t,n,r){return!!e.isPointInStroke&&$t(e,t,1)&&e.isPointInStroke(n,r)})),isect:He},Bt=pt("shape",(function(e,t){return(t.mark.shape||t.shape).context(e)(t)})),Ut=pt("symbol",(function(e,t){return re.context(e)(t)}),qe);const zt=(0,r.lruCache)();var qt={height:Yt,measureWidth:Vt,estimateWidth:Ht,width:Ht,canvas:jt};function jt(e){qt.width=e&&Be?Vt:Ht}function Ht(e,t){return Gt(Qt(e,t),Yt(e))}function Gt(e,t){return~~(.8*e.length*t)}function Vt(e,t){return Yt(e)<=0||!(t=Qt(e,t))?0:Wt(t,en(e))}function Wt(e,t){const n=`(${t}) ${e}`;let r=zt.get(n);return void 0===r&&(Be.font=t,r=Be.measureText(e).width,zt.set(n,r)),r}function Yt(e){return null!=e.fontSize?+e.fontSize||0:11}function Xt(e){return null!=e.lineHeight?e.lineHeight:Yt(e)+2}function Kt(e){return t=e.lineBreak&&e.text&&!(0,r.isArray)(e.text)?e.text.split(e.lineBreak):e.text,(0,r.isArray)(t)?t.length>1?t:t[0]:t;var t}function Jt(e){const t=Kt(e);return((0,r.isArray)(t)?t.length-1:0)*Xt(e)}function Qt(e,t){const n=null==t?"":(t+"").trim();return e.limit>0&&n.length?function(e,t){var n=+e.limit,r=function(e){if(qt.width===Vt){const t=en(e);return e=>Wt(e,t)}if(qt.width===Ht){const t=Yt(e);return e=>Gt(e,t)}return t=>qt.width(e,t)}(e);if(r(t)>>1,r(t.slice(i))>n?s=i+1:l=i;return a+t.slice(s)}for(;s>>1),r(t.slice(0,i))Math.max(e,qt.width(t,n))),0)):i=qt.width(t,f),"center"===o?c-=i/2:"right"===o&&(c-=i),e.set(c+=l,d+=u,c+i,d+a),t.angle&&!n)e.rotate(t.angle*S,l,u);else if(2===n)return e.rotatedPoints(t.angle*S,l,u);return e}var sn={type:"text",tag:"text",nested:!1,attr:function(e,t){var n,r=t.dx||0,i=(t.dy||0)+tn(t),a=an(t),o=a.x1,s=a.y1,l=t.angle||0;e("text-anchor",nn[t.align]||"start"),l?(n=ct(o,s)+" "+dt(l),(r||i)&&(n+=" "+ct(r,i))):n=ct(o+r,s+i),e("transform",n)},bound:on,draw:function(e,t,n){nt(t,(t=>{var i,a,o,s,l,u,c,d=null==t.opacity?1:t.opacity;if(!(n&&!n.intersects(t.bounds)||0===d||t.fontSize<=0||null==t.text||0===t.text.length)){if(e.font=en(t),e.textAlign=t.align||"left",a=(i=an(t)).x1,o=i.y1,t.angle&&(e.save(),e.translate(a,o),e.rotate(t.angle*S),a=o=0),a+=t.dx||0,o+=(t.dy||0)+tn(t),u=Kt(t),Ve(e,t),(0,r.isArray)(u))for(l=Xt(t),s=0;s=0;)if(!1!==e[i].defined&&(n=e[i].x-t[0])*n+(r=e[i].y-t[1])*r<(n=e[i].size||1)*n)return e[i];return null})),un={arc:ht,area:mt,group:_t,image:Ot,line:Nt,path:Pt,rect:It,rule:Lt,shape:Bt,symbol:Ut,text:sn,trail:ln};function cn(e,t,n){var r=un[e.mark.marktype],i=t||r.bound;return r.nested&&(e=e.mark),i(e.bounds||(e.bounds=new ce),e,n)}var dn={mark:null};function fn(e,t,n){var r,i,a,o,s=un[e.marktype],l=s.bound,u=e.items,c=u&&u.length;if(s.nested)return c?a=u[0]:(dn.mark=e,a=dn),o=cn(a,l,n),t&&t.union(o)||o;if(t=t||e.bounds&&e.bounds.clear()||new ce,c)for(r=0,i=u.length;rt;)e.removeChild(n[--r]);return e}function Sn(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function _n(e,t){const n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]}class An{constructor(e,t){this._active=null,this._handlers={},this._loader=e||(0,s.loader)(),this._tooltip=t||Cn}initialize(e,t,n){return this._el=e,this._obj=n||null,this.origin(t)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}origin(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()}scene(e){return arguments.length?(this._scene=e,this):this._scene}on(){}off(){}_handlerIndex(e,t,n){for(let r=e?e.length:0;--r>=0;)if(e[r].type===t&&(!n||e[r].handler===n))return r;return-1}handlers(e){const t=this._handlers,n=[];if(e)n.push(...t[this.eventName(e)]);else for(const e in t)n.push(...t[e]);return n}eventName(e){const t=e.indexOf(".");return t<0?e:e.slice(0,t)}handleHref(e,t,n){this._loader.sanitize(n,{context:"href"}).then((t=>{const n=new MouseEvent(e.type,e),r=bn(null,"a");for(const e in t)r.setAttribute(e,t[e]);r.dispatchEvent(n)})).catch((()=>{}))}handleTooltip(e,t,n){if(t&&null!=t.tooltip){t=function(e,t,n,r){var i,a,o=e&&e.mark;if(o&&(i=un[o.marktype]).tip){for((a=_n(t,n))[0]-=r[0],a[1]-=r[1];e=e.mark.group;)a[0]-=e.x||0,a[1]-=e.y||0;e=i.tip(o.items,a)}return e}(t,e,this.canvas(),this._origin);const r=n&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,r)}}getItemBoundingClientRect(e){const t=this.canvas();if(!t)return;const n=t.getBoundingClientRect(),r=this._origin,i=e.bounds,a=i.width(),o=i.height();let s=i.x1+r[0]+n.left,l=i.y1+r[1]+n.top;for(;e.mark&&(e=e.mark.group);)s+=e.x||0,l+=e.y||0;return{x:s,y:l,width:a,height:o,left:s,top:l,right:s+a,bottom:l+o}}}function Cn(e,t,n,r){e.element().setAttribute("title",r||"")}class Tn{constructor(e){this._el=null,this._bgcolor=null,this._loader=new pe(e)}initialize(e,t,n,r,i){return this._el=e,this.resize(t,n,r,i)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}background(e){return 0===arguments.length?this._bgcolor:(this._bgcolor=e,this)}resize(e,t,n,r){return this._width=e,this._height=t,this._origin=n||[0,0],this._scale=r||1,this}dirty(){}render(e,t){const n=this;return n._call=function(){n._render(e,t)},n._call(),n._call=null,n}_render(){}renderAsync(e,t){const n=this.render(e,t);return this._ready?this._ready.then((()=>n)):Promise.resolve(n)}_load(e,t){var n=this,r=n._loader[e](t);if(!n._ready){const e=n._call;n._ready=n._loader.ready().then((t=>{t&&e(),n._ready=null}))}return r}sanitizeURL(e){return this._load("sanitizeURL",e)}loadImage(e){return this._load("loadImage",e)}}const kn="dragenter",Rn="dragleave",Dn="dragover",On="pointerdown",Nn="pointermove",Fn="pointerout",Pn="pointerover",Mn="mousedown",In="mousemove",$n="mouseout",Ln="mouseover",Bn="click",Un="mousewheel",zn="touchstart",qn="touchmove",jn="touchend",Hn=["keydown","keypress","keyup",kn,Rn,Dn,On,"pointerup",Nn,Fn,Pn,Mn,"mouseup",In,$n,Ln,Bn,"dblclick","wheel",Un,zn,qn,jn],Gn=Nn,Vn=$n,Wn=Bn;class Yn extends An{constructor(e,t){super(e,t),this._down=null,this._touch=null,this._first=!0,this._events={},this.events=Hn,this.pointermove=Qn([Nn,In],[Pn,Ln],[Fn,$n]),this.dragover=Qn([Dn],[kn],[Rn]),this.pointerout=Zn([Fn,$n]),this.dragleave=Zn([Rn])}initialize(e,t,n){return this._canvas=e&&wn(e,"canvas"),[Bn,Mn,On,Nn,Fn,Rn].forEach((e=>Kn(this,e))),super.initialize(e,t,n)}canvas(){return this._canvas}context(){return this._canvas.getContext("2d")}DOMMouseScroll(e){this.fire(Un,e)}pointerdown(e){this._down=this._active,this.fire(On,e)}mousedown(e){this._down=this._active,this.fire(Mn,e)}click(e){this._down===this._active&&(this.fire(Bn,e),this._down=null)}touchstart(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(zn,e,!0)}touchmove(e){this.fire(qn,e,!0)}touchend(e){this.fire(jn,e,!0),this._touch=null}fire(e,t,n){const r=n?this._touch:this._active,i=this._handlers[e];if(t.vegaType=e,e===Wn&&r&&r.href?this.handleHref(t,r,r.href):e!==Gn&&e!==Vn||this.handleTooltip(t,r,e!==Vn),i)for(let e=0,n=i.length;e=0&&r.splice(i,1),this}pickEvent(e){const t=_n(e,this._canvas),n=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-n[0],t[1]-n[1])}pick(e,t,n,r,i){const a=this.context();return un[e.marktype].pick.call(this,a,e,t,n,r,i)}}const Xn=e=>e===zn||e===qn||e===jn?[zn,qn,jn]:[e];function Kn(e,t){Xn(t).forEach((t=>function(e,t){const n=e.canvas();n&&!e._events[t]&&(e._events[t]=1,n.addEventListener(t,e[t]?n=>e[t](n):n=>e.fire(t,n)))}(e,t)))}function Jn(e,t,n){t.forEach((t=>e.fire(t,n)))}function Qn(e,t,n){return function(r){const i=this._active,a=this.pickEvent(r);a===i||(i&&i.exit||Jn(this,n,r),this._active=a,Jn(this,t,r)),Jn(this,e,r)}}function Zn(e){return function(t){Jn(this,e,t),this._active=null}}class er extends Tn{constructor(e){super(e),this._options={},this._redraw=!1,this._dirty=new ce,this._tempb=new ce}initialize(e,t,n,r,i,a){return this._options=a||{},this._canvas=this._options.externalContext?null:(0,o.canvas)(1,1,this._options.type),e&&this._canvas&&(En(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),super.initialize(e,t,n,r,i)}resize(e,t,n,i){if(super.resize(e,t,n,i),this._canvas)!function(e,t,n,r,i,a){const o="undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&null!=e.parentNode,s=e.getContext("2d"),l=o?"undefined"!=typeof window&&window.devicePixelRatio||1:i;e.width=t*l,e.height=n*l;for(const e in a)s[e]=a[e];o&&1!==l&&(e.style.width=t+"px",e.style.height=n+"px"),s.pixelRatio=l,s.setTransform(l,0,0,l,l*r[0],l*r[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const e=this._options.externalContext;e||(0,r.error)("CanvasRenderer is missing a valid canvas or context"),e.scale(this._scale,this._scale),e.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this}canvas(){return this._canvas}context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)}dirty(e){const t=this._tempb.clear().union(e.bounds);let n=e.mark.group;for(;n;)t.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(t)}_render(e,t){const n=this.context(),r=this._origin,i=this._width,a=this._height,o=this._dirty,s=tr(r,i,a);n.save();const l=this._redraw||o.empty()?(this._redraw=!1,s.expand(1)):function(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-n[0]%1,-n[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(n,s.intersect(o),r);return this.clear(-r[0],-r[1],i,a),this.draw(n,e,l,t),n.restore(),o.clear(),this}draw(e,t,n,i){if("group"!==t.marktype&&null!=i&&!i.includes(t.marktype))return;const a=un[t.marktype];t.clip&&function(e,t){var n=t.clip;e.save(),(0,r.isFunction)(n)?(e.beginPath(),n(e),e.clip()):yt(e,t.group)}(e,t),a.draw.call(this,e,t,n,i),t.clip&&e.restore()}clear(e,t,n,r){const i=this._options,a=this.context();"pdf"===i.type||i.externalContext||a.clearRect(e,t,n,r),null!=this._bgcolor&&(a.fillStyle=this._bgcolor,a.fillRect(e,t,n,r))}}const tr=(e,t,n)=>(new ce).set(0,0,t,n).translate(-e[0],-e[1]);class nr extends An{constructor(e,t){super(e,t);const n=this;n._hrefHandler=rr(n,((e,t)=>{t&&t.href&&n.handleHref(e,t,t.href)})),n._tooltipHandler=rr(n,((e,t)=>{n.handleTooltip(e,t,e.type!==Vn)}))}initialize(e,t,n){let r=this._svg;return r&&(r.removeEventListener(Wn,this._hrefHandler),r.removeEventListener(Gn,this._tooltipHandler),r.removeEventListener(Vn,this._tooltipHandler)),this._svg=r=e&&wn(e,"svg"),r&&(r.addEventListener(Wn,this._hrefHandler),r.addEventListener(Gn,this._tooltipHandler),r.addEventListener(Vn,this._tooltipHandler)),super.initialize(e,t,n)}canvas(){return this._svg}on(e,t){const n=this.eventName(e),r=this._handlers;if(this._handlerIndex(r[n],e,t)<0){const i={type:e,handler:t,listener:rr(this,t)};(r[n]||(r[n]=[])).push(i),this._svg&&this._svg.addEventListener(n,i.listener)}return this}off(e,t){const n=this.eventName(e),r=this._handlers[n],i=this._handlerIndex(r,e,t);return i>=0&&(this._svg&&this._svg.removeEventListener(n,r[i].listener),r.splice(i,1)),this}}const rr=(e,t)=>n=>{let r=n.target.__data__;r=Array.isArray(r)?r[0]:r,n.vegaType=n.type,t.call(e._obj,n,r)},ir="aria-hidden",ar="aria-label",or="role",sr="aria-roledescription",lr="graphics-object",ur="graphics-symbol",cr=(e,t,n)=>({[or]:e,[sr]:t,[ar]:n||void 0}),dr=(0,r.toSet)(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),fr={axis:{desc:"axis",caption:function(e){const t=e.datum,n=e.orient,r=t.title?yr(e):null,i=e.context,a=i.scales[t.scale].value,o=i.dataflow.locale(),s=a.type;return("left"===n||"right"===n?"Y":"X")+"-axis"+(r?` titled '${r}'`:"")+` for a ${(0,l.isDiscrete)(s)?"discrete":s} scale`+` with ${(0,l.domainCaption)(o,a,e)}`}},legend:{desc:"legend",caption:function(e){const t=e.datum,n=t.title?yr(e):null,i=`${t.type||""} legend`.trim(),a=t.scales,o=Object.keys(a),s=e.context,u=s.scales[a[o[0]]].value,c=s.dataflow.locale();return((d=i).length?d[0].toUpperCase()+d.slice(1):d)+(n?` titled '${n}'`:"")+` for ${function(e){return(e=e.map((e=>e+("fill"===e||"stroke"===e?" color":"")))).length<2?e[0]:e.slice(0,-1).join(", ")+" and "+(0,r.peek)(e)}(o)}`+` with ${(0,l.domainCaption)(c,u,e)}`;var d}},"title-text":{desc:"title",caption:e=>`Title text '${mr(e)}'`},"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${mr(e)}'`}},pr={ariaRole:or,ariaRoleDescription:sr,description:ar};function hr(e,t){const n=!1===t.aria;if(e(ir,n||void 0),n||null==t.description)for(const t in pr)e(pr[t],void 0);else{const n=t.mark.marktype;e(ar,t.description),e(or,t.ariaRole||("group"===n?lr:ur)),e(sr,t.ariaRoleDescription||`${n} mark`)}}function gr(e){return!1===e.aria?{[ir]:!0}:dr[e.role]?null:fr[e.role]?function(e,t){try{const n=e.items[0],r=t.caption||(()=>"");return cr(t.role||ur,t.desc,n.description||r(n))}catch(e){return null}}(e,fr[e.role]):function(e){const t=e.marktype,n="group"===t||"text"===t||e.items.some((e=>null!=e.description&&!1!==e.aria));return cr(n?lr:ur,`${t} mark container`,e.description)}(e)}function mr(e){return(0,r.array)(e.text).join(" ")}function yr(e){try{return(0,r.array)((0,r.peek)(e.items).items[0].text).join(" ")}catch(e){return null}}const vr=e=>(e+"").replace(/&/g,"&").replace(//g,">"),br=e=>vr(e).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ");function wr(){let e="",t="",n="";const r=[],i=()=>t=n="",a=(e,n)=>(null!=n&&(t+=` ${e}="${br(n)}"`),o),o={open(s){(a=>{t&&(e+=`${t}>${n}`,i()),r.push(a)})(s),t="<"+s;for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c${n}`:"/>"):``,i(),o},attr:a,text:e=>(n+=vr(e),o),toString:()=>e};return o}const xr=e=>Er(wr(),e)+"";function Er(e,t){if(e.open(t.tagName),t.hasAttributes()){const n=t.attributes,r=n.length;for(let t=0;t{e.dirty=t}))),r.zdirty||(n.exit?(a.nested&&r.items.length?(l=r.items[0],l._svg&&this._update(a,l._svg,l)):n._svg&&(l=n._svg.parentNode,l&&l.removeChild(n._svg)),n._svg=null):(n=a.nested?r.items[0]:n,n._update!==t&&(n._svg&&n._svg.ownerSVGElement?this._update(a,n._svg,n):(this._dirtyAll=!1,Rr(n,t)),n._update=t)));return!this._dirtyAll}mark(e,t,n,r){if(!this.isDirty(t))return t._svg;const i=this._svg,a=t.marktype,o=un[a],s=!1===t.interactive?"none":null,l="g"===o.tag,u=Nr(t,e,n,"g",i);if("group"!==a&&null!=r&&!r.includes(a))return En(u,0),t._svg;u.setAttribute("class",Sn(t));const c=gr(t);for(const e in c)Br(u,e,c[e]);l||Br(u,"pointer-events",s),Br(u,"clip-path",t.clip?ue(this,t,t.group):null);let d=null,f=0;const p=e=>{const t=this.isDirty(e),n=Nr(e,u,d,o.tag,i);t&&(this._update(o,n,e),l&&function(e,t,n,r){t=t.lastChild.previousSibling;let i,a=0;nt(n,(n=>{i=e.mark(t,n,i,r),++a})),En(t,1+a)}(this,n,e,r)),d=n,++f};return o.nested?t.items.length&&p(t.items[0]):nt(t,p),En(u,f),u}_update(e,t,n){Fr=t,Pr=t.__values__,hr(Ir,n),e.attr(Ir,n,this);const r=Mr[e.type];r&&r.call(this,e,t,n),Fr&&this.style(Fr,n)}style(e,t){if(null!=t){for(const n in Sr){let r="font"===n?Zt(t):t[n];if(r===Pr[n])continue;const i=Sr[n];null==r?e.removeAttribute(i):(d(r)&&(r=f(r,this._defs.gradient,Ur())),e.setAttribute(i,r+"")),Pr[n]=r}for(const n in _r)$r(e,_r[n],t[n])}}defs(){const e=this._svg,t=this._defs;let n=t.el,r=0;for(const i in t.gradient)n||(t.el=n=xn(e,1,"defs",Tr)),r=Dr(n,t.gradient[i],r);for(const i in t.clipping)n||(t.el=n=xn(e,1,"defs",Tr)),r=Or(n,t.clipping[i],r);n&&(0===r?(e.removeChild(n),t.el=null):En(n,r))}_clearDefs(){const e=this._defs;e.gradient={},e.clipping={}}}function Rr(e,t){for(;e&&e.dirty!==t;e=e.mark.group){if(e.dirty=t,!e.mark||e.mark.dirty===t)return;e.mark.dirty=t}}function Dr(e,t,n){let r,i,a;if("radial"===t.gradient){let r=xn(e,n++,"pattern",Tr);Lr(r,{id:c+t.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),r=xn(r,0,"rect",Tr),Lr(r,{width:1,height:1,fill:`url(${Ur()}#${t.id})`}),Lr(e=xn(e,n++,"radialGradient",Tr),{id:t.id,fx:t.x1,fy:t.y1,fr:t.r1,cx:t.x2,cy:t.y2,r:t.r2})}else Lr(e=xn(e,n++,"linearGradient",Tr),{id:t.id,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2});for(r=0,i=t.stops.length;r1&&e.previousSibling!=t}(o,n))&&t.insertBefore(o,n?n.nextSibling:t.firstChild),o}let Fr=null,Pr=null;const Mr={group(e,t,n){const r=Fr=t.childNodes[2];Pr=r.__values__,e.foreground(Ir,n,this),Pr=t.__values__,Fr=t.childNodes[1],e.content(Ir,n,this);const i=Fr=t.childNodes[0];e.background(Ir,n,this);const a=!1===n.mark.interactive?"none":null;if(a!==Pr.events&&(Br(r,"pointer-events",a),Br(i,"pointer-events",a),Pr.events=a),n.strokeForeground&&n.stroke){const e=n.fill;Br(r,"display",null),this.style(i,n),Br(i,"stroke",null),e&&(n.fill=null),Pr=r.__values__,this.style(r,n),e&&(n.fill=e),Fr=null}else Br(r,"display","none")},image(e,t,n){!1===n.smooth?($r(t,"image-rendering","optimizeSpeed"),$r(t,"image-rendering","pixelated")):$r(t,"image-rendering",null)},text(e,t,n){const i=Kt(n);let a,o,s,l;(0,r.isArray)(i)?(o=i.map((e=>Qt(n,e))),a=o.join("\n"),a!==Pr.text&&(En(t,0),s=t.ownerDocument,l=Xt(n),o.forEach(((e,r)=>{const i=bn(s,"tspan",Tr);i.__data__=n,i.textContent=e,r&&(i.setAttribute("x",0),i.setAttribute("dy",l)),t.appendChild(i)})),Pr.text=a)):(o=Qt(n,i),o!==Pr.text&&(t.textContent=o,Pr.text=o)),Br(t,"font-family",Zt(n)),Br(t,"font-size",Yt(n)+"px"),Br(t,"font-style",n.fontStyle),Br(t,"font-variant",n.fontVariant),Br(t,"font-weight",n.fontWeight)}};function Ir(e,t,n){t!==Pr[e]&&(n?function(e,t,n,r){null!=n?e.setAttributeNS(r,t,n):e.removeAttributeNS(r,t)}(Fr,e,t,n):Br(Fr,e,t),Pr[e]=t)}function $r(e,t,n){n!==Pr[t]&&(null==n?e.style.removeProperty(t):e.style.setProperty(t,n+""),Pr[t]=n)}function Lr(e,t){for(const n in t)Br(e,n,t[n])}function Br(e,t,n){null!=n?e.setAttribute(t,n):e.removeAttribute(t)}function Ur(){let e;return"undefined"==typeof window?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}class zr extends Tn{constructor(e){super(e),this._text=null,this._defs={gradient:{},clipping:{}}}svg(){return this._text}_render(e){const t=wr();t.open("svg",(0,r.extend)({},At,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const n=this._bgcolor;return n&&"transparent"!==n&&"none"!==n&&t.open("rect",{width:this._width,height:this._height,fill:n}).close(),t.open("g",Ar,{transform:"translate("+this._origin+")"}),this.mark(t,e),t.close(),this.defs(t),this._text=t.close()+"",this}mark(e,t){const n=un[t.marktype],i=n.tag,a=[hr,n.attr];e.open("g",{class:Sn(t),"clip-path":t.clip?ue(this,t,t.group):null},gr(t),{"pointer-events":"g"!==i&&!1===t.interactive?"none":null});const o=o=>{const s=this.href(o);if(s&&e.open("a",s),e.open(i,this.attr(t,o,a,"g"!==i?i:null)),"text"===i){const t=Kt(o);if((0,r.isArray)(t)){const n={x:0,dy:Xt(o)};for(let r=0;rthis.mark(e,t))),e.close(),r&&a?(i&&(o.fill=null),o.stroke=a,e.open("path",this.attr(t,o,n.foreground,"bgrect")).close(),i&&(o.fill=i)):e.open("path",this.attr(t,o,n.foreground,"bgfore")).close()}e.close(),s&&e.close()};return n.nested?t.items&&t.items.length&&o(t.items[0]):nt(t,o),e.close()}href(e){const t=e.href;let n;if(t){if(n=this._hrefs&&this._hrefs[t])return n;this.sanitizeURL(t).then((e=>{e["xlink:href"]=e.href,e.href=null,(this._hrefs||(this._hrefs={}))[t]=e}))}return null}attr(e,t,n,r){const i={},a=(e,t,n,r)=>{i[r||e]=t};return Array.isArray(n)?n.forEach((e=>e(a,t,this))):n(a,t,this),r&&function(e,t,n,r,i){let a;if(null==t)return e;if("bgrect"===r&&!1===n.interactive&&(e["pointer-events"]="none"),"bgfore"===r&&(!1===n.interactive&&(e["pointer-events"]="none"),e.display="none",null!==t.fill))return e;"image"===r&&!1===t.smooth&&(a=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]),"text"===r&&(e["font-family"]=Zt(t),e["font-size"]=Yt(t)+"px",e["font-style"]=t.fontStyle,e["font-variant"]=t.fontVariant,e["font-weight"]=t.fontWeight);for(const n in Sr){let r=t[n];const a=Sr[n];("transparent"!==r||"fill"!==a&&"stroke"!==a)&&null!=r&&(d(r)&&(r=f(r,i.gradient,"")),e[a]=r)}for(const e in _r){const n=t[e];null!=n&&(a=a||[],a.push(`${_r[e]}: ${n};`))}a&&(e.style=a.join(" "))}(i,t,e,r,this._defs),i}defs(e){const t=this._defs.gradient,n=this._defs.clipping;if(0!==Object.keys(t).length+Object.keys(n).length){e.open("defs");for(const n in t){const r=t[n],i=r.stops;"radial"===r.gradient?(e.open("pattern",{id:c+n,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),e.open("rect",{width:"1",height:"1",fill:"url(#"+n+")"}).close(),e.close(),e.open("radialGradient",{id:n,fx:r.x1,fy:r.y1,fr:r.r1,cx:r.x2,cy:r.y2,r:r.r2})):e.open("linearGradient",{id:n,x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2});for(let t=0;t!qr.svgMarkTypes.includes(e)));this._svgRenderer.render(e,qr.svgMarkTypes),this._canvasRenderer.render(e,n)}resize(e,t,n,r){return super.resize(e,t,n,r),this._svgRenderer.resize(e,t,n,r),this._canvasRenderer.resize(e,t,n,r),this}background(e){return qr.svgOnTop?this._canvasRenderer.background(e):this._svgRenderer.background(e),this}}class Gr extends Yn{constructor(e,t){super(e,t)}initialize(e,t,n){const r=xn(xn(e,0,"div"),qr.svgOnTop?0:1,"div");return super.initialize(r,t,n)}}const Vr="canvas",Wr="hybrid",Yr="none",Xr={Canvas:Vr,PNG:"png",SVG:"svg",Hybrid:Wr,None:Yr},Kr={};function Jr(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(Kr[e]=t,this):Kr[e]}function Qr(e,t,n){const i=[],a=(new ce).union(t),o=e.marktype;return o?Zr(e,a,n,i):"group"===o?ei(e,a,n,i):(0,r.error)("Intersect scene must be mark node or group item.")}function Zr(e,t,n,r){if(function(e,t,n){return e.bounds&&t.intersects(e.bounds)&&("group"===e.marktype||!1!==e.interactive&&(!n||n(e)))}(e,t,n)){const i=e.items,a=e.marktype,o=i.length;let s=0;if("group"===a)for(;s=0;r--)if(i[r]!=a[r])return!1;for(r=i.length-1;r>=0;r--)if(!ai(e[n=i[r]],t[n],n))return!1;return typeof e==typeof t}(e,t):e==t)}function oi(e,t){return ai(E(e),E(t))}function si(){le(),u=0}},73706:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=function(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}}},76187:(e,t,n)=>{"use strict";n.r(t),n.d(t,{selectionIdTest:()=>T,selectionResolve:()=>R,selectionTest:()=>S,selectionTuples:()=>k,selectionVisitor:()=>F});var r=n(61388),i=n(26372),a=n(21720);const o=Symbol("vega_selection_getter");function s(e){return e.getter&&e.getter[o]||(e.getter=(0,i.field)(e.field),e.getter[o]=!0),e.getter}const l="intersect",u="union",c="vlMulti",d="vlPoint",f="or",p="and",h="_vgsid_",g=(0,i.field)(h),m="E",y="R",v="R-E",b="R-LE",w="R-RE",x="index:unit";function E(e,t){for(var n,r,a=t.fields,o=t.values,l=a.length,u=0;u(0,i.extend)(t.fields?{values:t.fields.map((t=>s(t)(e.datum)))}:{[h]:g(e.datum)},t)))}function R(e,t,n,r){for(var a,o,s,l,m,y,v,b,w,x,E,S,_=this.context.data[e],A=_?_.values.value:[],C={},T={},k={},R=A.length,O=0;O(e[o[n].field]=t,e)),{}))}else m=h,y=g(a),(b=(v=C[m]||(C[m]={}))[l]||(v[l]=[])).push(y),n&&(b=T[l]||(T[l]=[])).push({[h]:y});return t=t||u,C[h]?C[h]=D[`${h}_${t}`](...Object.values(C[h])):Object.keys(C).forEach((e=>{C[e]=Object.keys(C[e]).map((t=>C[e][t])).reduce(((n,r)=>void 0===n?r:D[`${k[e]}_${t}`](n,r)))})),A=Object.keys(T),n&&A.length&&(C[r?d:c]=t===u?{[f]:A.reduce(((e,t)=>(e.push(...T[t]),e)),[])}:{[p]:A.map((e=>({[f]:T[e]})))}),C}var D={[`${h}_union`]:r.union,[`${h}_intersect`]:r.intersection,E_union:function(e,t){if(!e.length)return t;for(var n=0,r=t.length;nt.indexOf(e)>=0)):t},R_union:function(e,t){var n=(0,i.toNumber)(t[0]),r=(0,i.toNumber)(t[1]);return n>r&&(n=t[1],r=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]r&&(n=t[1],r=t[0]),e.length?rr&&(e[1]=r),e):[n,r]}};const O=":",N="@";function F(e,t,n,r){t[0].type!==a.Literal&&(0,i.error)("First argument to selection functions must be a string literal.");const o=t[0].value,s=t.length>=2&&(0,i.peek)(t).value,u="unit",c=N+u,d=O+o;s!==l||(0,i.hasOwnProperty)(r,c)||(r[c]=n.getData(o).indataRef(n,u)),(0,i.hasOwnProperty)(r,d)||(r[d]=n.getData(o).tuplesRef())}},48872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bandwidthNRD:()=>s,bin:()=>l,bootstrapCI:()=>d,cumulativeLogNormal:()=>C,cumulativeNormal:()=>w,cumulativeUniform:()=>N,densityLogNormal:()=>A,densityNormal:()=>b,densityUniform:()=>O,dotbin:()=>f,quantileLogNormal:()=>T,quantileNormal:()=>x,quantileUniform:()=>F,quantiles:()=>a,quartiles:()=>o,random:()=>u,randomInteger:()=>h,randomKDE:()=>S,randomLCG:()=>p,randomLogNormal:()=>k,randomMixture:()=>R,randomNormal:()=>E,randomUniform:()=>P,regressionConstant:()=>M,regressionExp:()=>q,regressionLinear:()=>U,regressionLoess:()=>X,regressionLog:()=>z,regressionPoly:()=>G,regressionPow:()=>j,regressionQuad:()=>H,sampleCurve:()=>Z,sampleLogNormal:()=>_,sampleNormal:()=>v,sampleUniform:()=>D,setRandom:()=>c});var r=n(61388);function*i(e,t){if(null==t)for(let t of e)null!=t&&""!==t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)r=t(r,++n,e),null!=r&&""!==r&&(r=+r)>=r&&(yield r)}}function a(e,t,n){const a=Float64Array.from(i(e,n));return a.sort(r.ascending),t.map((e=>(0,r.quantileSorted)(a,e)))}function o(e,t){return a(e,[.25,.5,.75],t)}function s(e,t){const n=e.length,i=(0,r.deviation)(e,t),a=o(e,t),s=(a[2]-a[0])/1.34;return 1.06*(Math.min(i,s)||i||Math.abs(a[0])||1)*Math.pow(n,-.2)}function l(e){const t=e.maxbins||20,n=e.base||10,r=Math.log(n),i=e.divide||[5,2];let a,o,s,l,u,c,d=e.extent[0],f=e.extent[1];const p=e.span||f-d||Math.abs(d)||1;if(e.step)a=e.step;else if(e.steps){for(l=p/t,u=0,c=e.steps.length;ut;)a*=n;for(u=0,c=i.length;u=s&&p/l<=t&&(a=l)}l=Math.log(a);const h=l>=0?0:1+~~(-l/r),g=Math.pow(n,-h-1);return(e.nice||void 0===e.nice)&&(l=Math.floor(d/a+g)*a,d=de);const i=e.length,a=new Float64Array(i);let o,s=0,l=1,u=r(e[0]),c=u,d=u+t;for(;l=d){for(c=(u+c)/2;s>1);io;)e[i--]=e[a]}a=o,o=r}return e}(a,t+t/4):a}function p(e){return function(){return(e=(1103515245*e+12345)%2147483647)/2147483647}}function h(e,t){let n,r,i;null==t&&(t=e,e=0);const a={min(e){return arguments.length?(n=e||0,i=r-n,a):n},max(e){return arguments.length?(r=e||0,i=r-n,a):r},sample:()=>n+Math.floor(i*u()),pdf:e=>e===Math.floor(e)&&e>=n&&e=r?1:(t-n+1)/i},icdf:e=>e>=0&&e<=1?n-1+Math.floor(e*i):NaN};return a.min(e).max(t)}const g=Math.sqrt(2*Math.PI),m=Math.SQRT2;let y=NaN;function v(e,t){e=e||0,t=null==t?1:t;let n,r,i=0,a=0;if(y==y)i=y,y=NaN;else{do{i=2*u()-1,a=2*u()-1,n=i*i+a*a}while(0===n||n>1);r=Math.sqrt(-2*Math.log(n)/n),i*=r,y=a*r}return e+i*t}function b(e,t,n){const r=(e-(t||0))/(n=null==n?1:n);return Math.exp(-.5*r*r)/(n*g)}function w(e,t,n){const r=(e-(t=t||0))/(n=null==n?1:n),i=Math.abs(r);let a;if(i>37)a=0;else{const e=Math.exp(-i*i/2);let t;i<7.07106781186547?(t=.0352624965998911*i+.700383064443688,t=t*i+6.37396220353165,t=t*i+33.912866078383,t=t*i+112.079291497871,t=t*i+221.213596169931,t=t*i+220.206867912376,a=e*t,t=.0883883476483184*i+1.75566716318264,t=t*i+16.064177579207,t=t*i+86.7807322029461,t=t*i+296.564248779674,t=t*i+637.333633378831,t=t*i+793.826512519948,t=t*i+440.413735824752,a/=t):(t=i+.65,t=i+4/t,t=i+3/t,t=i+2/t,t=i+1/t,a=e/t/2.506628274631)}return r>0?1-a:a}function x(e,t,n){return e<0||e>1?NaN:(t||0)+(null==n?1:n)*m*function(e){let t,n=-Math.log((1-e)*(1+e));return n<6.25?(n-=3.125,t=-364441206401782e-35,t=t*n-16850591381820166e-35,t=128584807152564e-32+t*n,t=11157877678025181e-33+t*n,t=t*n-1333171662854621e-31,t=20972767875968562e-33+t*n,t=6637638134358324e-30+t*n,t=t*n-4054566272975207e-29,t=t*n-8151934197605472e-29,t=26335093153082323e-28+t*n,t=t*n-12975133253453532e-27,t=t*n-5415412054294628e-26,t=1.0512122733215323e-9+t*n,t=t*n-4.112633980346984e-9,t=t*n-2.9070369957882005e-8,t=4.2347877827932404e-7+t*n,t=t*n-13654692000834679e-22,t=t*n-13882523362786469e-21,t=.00018673420803405714+t*n,t=t*n-.000740702534166267,t=t*n-.006033670871430149,t=.24015818242558962+t*n,t=1.6536545626831027+t*n):n<16?(n=Math.sqrt(n)-3.25,t=2.2137376921775787e-9,t=9.075656193888539e-8+t*n,t=t*n-2.7517406297064545e-7,t=1.8239629214389228e-8+t*n,t=15027403968909828e-22+t*n,t=t*n-4013867526981546e-21,t=29234449089955446e-22+t*n,t=12475304481671779e-21+t*n,t=t*n-47318229009055734e-21,t=6828485145957318e-20+t*n,t=24031110387097894e-21+t*n,t=t*n-.0003550375203628475,t=.0009532893797373805+t*n,t=t*n-.0016882755560235047,t=.002491442096107851+t*n,t=t*n-.003751208507569241,t=.005370914553590064+t*n,t=1.0052589676941592+t*n,t=3.0838856104922208+t*n):Number.isFinite(n)?(n=Math.sqrt(n)-5,t=-27109920616438573e-27,t=t*n-2.555641816996525e-10,t=1.5076572693500548e-9+t*n,t=t*n-3.789465440126737e-9,t=7.61570120807834e-9+t*n,t=t*n-1.496002662714924e-8,t=2.914795345090108e-8+t*n,t=t*n-6.771199775845234e-8,t=2.2900482228026655e-7+t*n,t=t*n-9.9298272942317e-7,t=4526062597223154e-21+t*n,t=t*n-1968177810553167e-20,t=7599527703001776e-20+t*n,t=t*n-.00021503011930044477,t=t*n-.00013871931833623122,t=1.0103004648645344+t*n,t=4.849906401408584+t*n):t=1/0,t*e}(2*e-1)}function E(e,t){let n,r;const i={mean(e){return arguments.length?(n=e||0,i):n},stdev(e){return arguments.length?(r=null==e?1:e,i):r},sample:()=>v(n,r),pdf:e=>b(e,n,r),cdf:e=>w(e,n,r),icdf:e=>x(e,n,r)};return i.mean(e).stdev(t)}function S(e,t){const n=E();let r=0;const i={data(n){return arguments.length?(e=n,r=n?n.length:0,i.bandwidth(t)):e},bandwidth(n){return arguments.length?(!(t=n)&&e&&(t=s(e)),i):t},sample:()=>e[~~(u()*r)]+t*n.sample(),pdf(i){let a=0,o=0;for(;o_(n,r),pdf:e=>A(e,n,r),cdf:e=>C(e,n,r),icdf:e=>T(e,n,r)};return i.mean(e).stdev(t)}function R(e,t){let n,r=0;const i={weights(e){return arguments.length?(n=function(e){const t=[];let n,i=0;for(n=0;n=t&&e<=n?1/(n-t):0}function N(e,t,n){return null==n&&(n=null==t?1:t,t=0),en?1:(e-t)/(n-t)}function F(e,t,n){return null==n&&(n=null==t?1:t,t=0),e>=0&&e<=1?t+e*(n-t):NaN}function P(e,t){let n,r;const i={min(e){return arguments.length?(n=e||0,i):n},max(e){return arguments.length?(r=null==e?1:e,i):r},sample:()=>D(n,r),pdf:e=>O(e,n,r),cdf:e=>N(e,n,r),icdf:e=>F(e,n,r)};return null==t&&(t=null==e?1:e,e=0),i.min(e).max(t)}function M(e,t,n){let r=0,i=0;for(const a of e){const e=n(a);null==t(a)||null==e||isNaN(e)||(r+=(e-r)/++i)}return{coef:[r],predict:()=>r,rSquared:0}}function I(e,t,n,r){const i=r-e*e,a=Math.abs(i)<1e-24?0:(n-e*t)/i;return[t-a*e,a]}function $(e,t,n,r){e=e.filter((e=>{let r=t(e),i=n(e);return null!=r&&(r=+r)>=r&&null!=i&&(i=+i)>=i})),r&&e.sort(((e,n)=>t(e)-t(n)));const i=e.length,a=new Float64Array(i),o=new Float64Array(i);let s,l,u,c=0,d=0,f=0;for(u of e)a[c]=s=+t(u),o[c]=l=+n(u),++c,d+=(s-d)/c,f+=(l-f)/c;for(c=0;c=i&&null!=a&&(a=+a)>=a&&r(i,a,++o)}function B(e,t,n,r,i){let a=0,o=0;return L(e,t,n,((e,t)=>{const n=t-i(e),s=t-r;a+=n*n,o+=s*s})),1-a/o}function U(e,t,n){let r=0,i=0,a=0,o=0,s=0;L(e,t,n,((e,t)=>{++s,r+=(e-r)/s,i+=(t-i)/s,a+=(e*t-a)/s,o+=(e*e-o)/s}));const l=I(r,i,a,o),u=e=>l[0]+l[1]*e;return{coef:l,predict:u,rSquared:B(e,t,n,i,u)}}function z(e,t,n){let r=0,i=0,a=0,o=0,s=0;L(e,t,n,((e,t)=>{++s,e=Math.log(e),r+=(e-r)/s,i+=(t-i)/s,a+=(e*t-a)/s,o+=(e*e-o)/s}));const l=I(r,i,a,o),u=e=>l[0]+l[1]*Math.log(e);return{coef:l,predict:u,rSquared:B(e,t,n,i,u)}}function q(e,t,n){const[r,i,a,o]=$(e,t,n);let s,l,u,c=0,d=0,f=0,p=0,h=0;L(e,t,n,((e,t)=>{s=r[h++],l=Math.log(t),u=s*t,c+=(t*l-c)/h,d+=(u-d)/h,f+=(u*l-f)/h,p+=(s*u-p)/h}));const[g,m]=I(d/o,c/o,f/o,p/o),y=e=>Math.exp(g+m*(e-a));return{coef:[Math.exp(g-m*a),m],predict:y,rSquared:B(e,t,n,o,y)}}function j(e,t,n){let r=0,i=0,a=0,o=0,s=0,l=0;L(e,t,n,((e,t)=>{const n=Math.log(e),u=Math.log(t);++l,r+=(n-r)/l,i+=(u-i)/l,a+=(n*u-a)/l,o+=(n*n-o)/l,s+=(t-s)/l}));const u=I(r,i,a,o),c=e=>u[0]*Math.pow(e,u[1]);return u[0]=Math.exp(u[0]),{coef:u,predict:c,rSquared:B(e,t,n,s,c)}}function H(e,t,n){const[r,i,a,o]=$(e,t,n),s=r.length;let l,u,c,d,f=0,p=0,h=0,g=0,m=0;for(l=0;lb*(e-=a)*e+w*e+x+o;return{coef:[x-w*a+b*a*a+o,w-2*b*a,b],predict:E,rSquared:B(e,t,n,o,E)}}function G(e,t,n,r){if(0===r)return M(e,t,n);if(1===r)return U(e,t,n);if(2===r)return H(e,t,n);const[i,a,o,s]=$(e,t,n),l=i.length,u=[],c=[],d=r+1;let f,p,h,g,m;for(f=0;fMath.abs(e[r][o])&&(o=i);for(a=r;a=r;a--)e[a][i]-=e[a][r]*e[r][i]/e[r][r]}for(i=t-1;i>=0;--i){for(s=0,a=i+1;a{e-=o;let t=s+y[0]+y[1]*e+y[2]*e*e;for(f=3;f=0;--a)for(s=t[a],l=1,i[a]+=s,o=1;o<=a;++o)l*=(a+1-o)/o,i[a-o]+=s*Math.pow(n,o)*l;return i[0]+=r,i}const W=2,Y=1e-12;function X(e,t,n,i){const[a,o,s,l]=$(e,t,n,!0),u=a.length,c=Math.max(2,~~(i*u)),d=new Float64Array(u),f=new Float64Array(u),p=new Float64Array(u).fill(1);for(let e=-1;++e<=W;){const t=[0,c-1];for(let e=0;ea[i]-n?r:i;let l=0,u=0,c=0,h=0,g=0;const m=1/Math.abs(a[s]-n||1);for(let e=r;e<=i;++e){const t=a[e],r=o[e],i=K(Math.abs(n-t)*m)*p[e],s=t*i;l+=i,u+=s,c+=r*i,h+=r*s,g+=t*s}const[y,v]=I(u/l,c/l,h/l,g/l);d[e]=y+v*n,f[e]=Math.abs(o[e]-d[e]),J(a,e+1,t)}if(e===W)break;const n=(0,r.median)(f);if(Math.abs(n)=1?Y:(t=1-e*e)*t}return function(e,t,n,r){const i=e.length,a=[];let o,s=0,l=0,u=[];for(;s=e.length))for(;t>i&&e[a]-r<=r-e[i];)n[0]=++i,n[1]=a,++a}const Q=.5*Math.PI/180;function Z(e,t,n,r){n=n||25,r=Math.max(n,r||200);const i=t=>[t,e(t)],a=t[0],o=t[1],s=o-a,l=s/r,u=[i(a)],c=[];if(n===r){for(let e=1;e0;)c.push(i(a+e/n*s));let d=u[0],f=c[c.length-1];const p=1/s,h=function(e,t){let n=e,r=e;const i=t.length;for(let e=0;er&&(r=i)}return 1/(r-n)}(d[1],c);for(;f;){const e=i((d[0]+f[0])/2);e[0]-d[0]>=l&&ee(d,e,f,p,h)>Q?c.push(e):(d=f,u.push(f),c.pop()),f=c[c.length-1]}return u}function ee(e,t,n,r,i){const a=Math.atan2(i*(n[1]-e[1]),r*(n[0]-e[0])),o=Math.atan2(i*(t[1]-e[1]),r*(t[0]-e[0]));return Math.abs(a-o)}},80632:(e,t,n)=>{"use strict";n.r(t),n.d(t,{carbong10:()=>te,carbong100:()=>re,carbong90:()=>ne,carbonwhite:()=>ee,dark:()=>a,excel:()=>s,fivethirtyeight:()=>f,ggplot2:()=>h,googlecharts:()=>M,latimes:()=>w,powerbi:()=>Y,quartz:()=>S,urbaninstitute:()=>O,version:()=>ie,vox:()=>A});const r="#fff",i="#888",a={background:"#333",view:{stroke:i},title:{color:r,subtitleColor:r},style:{"guide-label":{fill:r},"guide-title":{fill:r}},axis:{domainColor:r,gridColor:i,tickColor:r}},o="#4572a7",s={background:"#fff",arc:{fill:o},area:{fill:o},line:{stroke:o,strokeWidth:2},path:{stroke:o},rect:{fill:o},shape:{stroke:o},symbol:{fill:o,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},l="#30a2da",u="#cbcbcb",c="#f0f0f0",d="#333",f={arc:{fill:l},area:{fill:l},axis:{domainColor:u,grid:!0,gridColor:u,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:u,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:c,group:{fill:c},legend:{labelColor:d,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:d,titleFontSize:14,titlePadding:10},line:{stroke:l,strokeWidth:2},path:{stroke:l,strokeWidth:.5},rect:{fill:l},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:l},bar:{binSpacing:2,fill:l,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},p="#000",h={group:{fill:"#e5e5e5"},arc:{fill:p},area:{fill:p},line:{stroke:p},path:{stroke:p},rect:{fill:p},shape:{stroke:p},symbol:{fill:p,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},g="Benton Gothic, sans-serif",m="#82c6df",y="Benton Gothic Bold, sans-serif",v="normal",b={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},w={background:"#ffffff",title:{anchor:"start",color:"#000000",font:y,fontSize:22,fontWeight:"normal"},arc:{fill:m},area:{fill:m},line:{stroke:m,strokeWidth:2},path:{stroke:m},rect:{fill:m},shape:{stroke:m},symbol:{fill:m,size:30},axis:{labelFont:g,labelFontSize:11.5,labelFontWeight:"normal",titleFont:y,titleFontSize:13,titleFontWeight:v},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:g,labelFontSize:11.5,symbolType:"square",titleFont:y,titleFontSize:13,titleFontWeight:v},range:{category:b["category-6"],diverging:b["fireandice-6"],heatmap:b["fire-7"],ordinal:b["fire-7"],ramp:b["fire-7"]}},x="#ab5787",E="#979797",S={background:"#f9f9f9",arc:{fill:x},area:{fill:x},line:{stroke:x},path:{stroke:x},rect:{fill:x},shape:{stroke:x},symbol:{fill:x,size:30},axis:{domainColor:E,domainWidth:.5,gridWidth:.2,labelColor:E,tickColor:E,tickWidth:.2,titleColor:E},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},_="#3e5c69",A={background:"#fff",arc:{fill:_},area:{fill:_},line:{stroke:_},path:{stroke:_},rect:{fill:_},shape:{stroke:_},symbol:{fill:_},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},C="#1696d2",T="#000000",k="Lato",R="Lato",D={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},O={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:k},axisX:{domain:!0,domainColor:T,domainWidth:1,grid:!1,labelFontSize:12,labelFont:R,labelAngle:0,tickColor:T,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:k},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:R,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:k,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:R,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:k,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:D["six-groups-cat-1"],diverging:D["diverging-colors"],heatmap:D["diverging-colors"],ordinal:D["six-groups-seq"],ramp:D["shades-blue"]},area:{fill:C},rect:{fill:C},line:{color:C,stroke:C,strokeWidth:5},trail:{color:C,stroke:C,strokeWidth:0,size:1},path:{stroke:C,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:C,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:C,stroke:null}},arc:{fill:C},shape:{stroke:C},symbol:{fill:C,size:30}},N="#3366CC",F="#ccc",P="Arial, sans-serif",M={arc:{fill:N},area:{fill:N},path:{stroke:N},rect:{fill:N},shape:{stroke:N},symbol:{stroke:N},circle:{fill:N},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:P,fontSize:12},"guide-title":{font:P,fontSize:12},"group-title":{font:P,fontSize:12}},title:{font:P,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:F,tickColor:F,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},I=e=>e*(1/3+1),$=I(9),L=I(10),B=I(12),U="Segoe UI",z="wf_standard-font, helvetica, arial, sans-serif",q="#252423",j="#605E5C",H="transparent",G="#118DFF",V="#DEEFFF",W=[V,G],Y={view:{stroke:H},background:H,font:U,header:{titleFont:z,titleFontSize:B,titleColor:q,labelFont:U,labelFontSize:L,labelColor:j},axis:{ticks:!1,grid:!1,domain:!1,labelColor:j,labelFontSize:$,titleFont:z,titleColor:q,titleFontSize:B,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:"#C8C6C4",gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:G},line:{stroke:G,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:U,fontSize:$,fill:j},arc:{fill:G},area:{fill:G,line:!0,opacity:.6},path:{stroke:G},rect:{fill:G},point:{fill:G,filled:!0,size:75},shape:{stroke:G},symbol:{fill:G,strokeWidth:1.5,size:50},legend:{titleFont:U,titleFontWeight:"bold",titleColor:j,labelFont:U,labelFontSize:L,labelColor:j,symbolType:"circle",symbolSize:75},range:{category:[G,"#12239E","#E66C37","#6B007B","#E044A7","#744EC2","#D9B300","#D64550"],diverging:W,heatmap:W,ordinal:[V,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",G]}},X='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',K={textPrimary:{g90:"#f4f4f4",g100:"#f4f4f4",white:"#161616",g10:"#161616"},textSecondary:{g90:"#c6c6c6",g100:"#c6c6c6",white:"#525252",g10:"#525252"},layerAccent01:{white:"#e0e0e0",g10:"#e0e0e0",g90:"#525252",g100:"#393939"},gridBg:{white:"#ffffff",g10:"#ffffff",g90:"#161616",g100:"#161616"}},J=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],Q=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function Z({theme:e,background:t}){const n=["white","g10"].includes(e)?"light":"dark",r=K.gridBg[e],i=K.textPrimary[e],a=K.textSecondary[e],o="dark"===n?J:Q,s="dark"===n?"#d4bbff":"#6929c4";return{background:t,arc:{fill:s},area:{fill:s},path:{stroke:s},rect:{fill:s},shape:{stroke:s},symbol:{stroke:s},circle:{fill:s},view:{fill:r,stroke:r},group:{fill:r},title:{color:i,anchor:"start",dy:-15,fontSize:16,font:X,fontWeight:600},axis:{labelColor:a,labelFontSize:12,labelFont:'IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif',labelFontWeight:400,titleColor:i,titleFontWeight:600,titleFontSize:12,grid:!0,gridColor:K.layerAccent01[e],labelAngle:0},axisX:{titlePadding:10},axisY:{titlePadding:2.5},style:{"guide-label":{font:X,fill:a,fontWeight:400},"guide-title":{font:X,fill:a,fontWeight:400}},range:{category:o,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const ee=Z({theme:"white",background:"#ffffff"}),te=Z({theme:"g10",background:"#f4f4f4"}),ne=Z({theme:"g90",background:"#262626"}),re=Z({theme:"g100",background:"#161616"}),ie="2.15.0"},71652:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DATE:()=>c,DAY:()=>d,DAYOFYEAR:()=>f,HOURS:()=>p,MILLISECONDS:()=>m,MINUTES:()=>h,MONTH:()=>l,QUARTER:()=>s,SECONDS:()=>g,TIME_UNITS:()=>y,WEEK:()=>u,YEAR:()=>o,dayofyear:()=>_,timeBin:()=>ue,timeFloor:()=>U,timeInterval:()=>V,timeOffset:()=>X,timeSequence:()=>Q,timeUnitSpecifier:()=>x,timeUnits:()=>b,utcFloor:()=>j,utcInterval:()=>W,utcOffset:()=>K,utcSequence:()=>Z,utcdayofyear:()=>D,utcweek:()=>O,week:()=>A});var r=n(26372),i=n(42472),a=n(61388);const o="year",s="quarter",l="month",u="week",c="date",d="day",f="dayofyear",p="hours",h="minutes",g="seconds",m="milliseconds",y=[o,s,l,u,c,d,f,p,h,g,m],v=y.reduce(((e,t,n)=>(e[t]=1+n,e)),{});function b(e){const t=(0,r.array)(e).slice(),n={};return t.length||(0,r.error)("Missing time unit."),t.forEach((e=>{(0,r.hasOwnProperty)(v,e)?n[e]=1:(0,r.error)(`Invalid time unit: ${e}.`)})),(n[u]||n[d]?1:0)+(n[s]||n[l]||n[c]?1:0)+(n[f]?1:0)>1&&(0,r.error)(`Incompatible time units: ${e}`),t.sort(((e,t)=>v[e]-v[t])),t}const w={[o]:"%Y ",[s]:"Q%q ",[l]:"%b ",[c]:"%d ",[u]:"W%U ",[d]:"%a ",[f]:"%j ",[p]:"%H:00",[h]:"00:%M",[g]:":%S",[m]:".%L",[`${o}-${l}`]:"%Y-%m ",[`${o}-${l}-${c}`]:"%Y-%m-%d ",[`${p}-${h}`]:"%H:%M"};function x(e,t){const n=(0,r.extend)({},w,t),i=b(e),a=i.length;let o,s,l="",u=0;for(u=0;uu;--o)if(s=i.slice(u,o).join("-"),null!=n[s]){l+=n[s],u=o;break}return l.trim()}const E=new Date;function S(e){return E.setFullYear(e),E.setMonth(0),E.setDate(1),E.setHours(0,0,0,0),E}function _(e){return C(new Date(e))}function A(e){return T(new Date(e))}function C(e){return i.timeDay.count(S(e.getFullYear())-1,e)}function T(e){return i.timeWeek.count(S(e.getFullYear())-1,e)}function k(e){return S(e).getDay()}function R(e,t,n,r,i,a,o){if(0<=e&&e<100){const s=new Date(-1,t,n,r,i,a,o);return s.setFullYear(e),s}return new Date(e,t,n,r,i,a,o)}function D(e){return N(new Date(e))}function O(e){return F(new Date(e))}function N(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return i.utcDay.count(t-1,e)}function F(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return i.utcWeek.count(t-1,e)}function P(e){return E.setTime(Date.UTC(e,0,1)),E.getUTCDay()}function M(e,t,n,r,i,a,o){if(0<=e&&e<100){const e=new Date(Date.UTC(-1,t,n,r,i,a,o));return e.setUTCFullYear(n.y),e}return new Date(Date.UTC(e,t,n,r,i,a,o))}function I(e,t,n,i,a){const y=t||1,v=(0,r.peek)(e),b=(e,t,r)=>function(e,t,n,r){const i=n<=1?e:r?(t,i)=>r+n*Math.floor((e(t,i)-r)/n):(t,r)=>n*Math.floor(e(t,r)/n);return t?(e,n)=>t(i(e,n),n):i}(n[r=r||e],i[r],e===v&&y,t),w=new Date,x=(0,r.toSet)(e),E=x[o]?b(o):(0,r.constant)(2012),S=x[l]?b(l):x[s]?b(s):r.zero,_=x[u]&&x[d]?b(d,1,u+d):x[u]?b(u,1):x[d]?b(d,1):x[c]?b(c,1):x[f]?b(f,1):r.one,A=x[p]?b(p):r.zero,C=x[h]?b(h):r.zero,T=x[g]?b(g):r.zero,k=x[m]?b(m):r.zero;return function(e){w.setTime(+e);const t=E(w);return a(t,S(w),_(w,t),A(w),C(w),T(w),k(w))}}function $(e,t,n){return t+7*e-(n+6)%7}const L={[o]:e=>e.getFullYear(),[s]:e=>Math.floor(e.getMonth()/3),[l]:e=>e.getMonth(),[c]:e=>e.getDate(),[p]:e=>e.getHours(),[h]:e=>e.getMinutes(),[g]:e=>e.getSeconds(),[m]:e=>e.getMilliseconds(),[f]:e=>C(e),[u]:e=>T(e),[u+d]:(e,t)=>$(T(e),e.getDay(),k(t)),[d]:(e,t)=>$(1,e.getDay(),k(t))},B={[s]:e=>3*e,[u]:(e,t)=>$(e,0,k(t))};function U(e,t){return I(e,t||1,L,B,R)}const z={[o]:e=>e.getUTCFullYear(),[s]:e=>Math.floor(e.getUTCMonth()/3),[l]:e=>e.getUTCMonth(),[c]:e=>e.getUTCDate(),[p]:e=>e.getUTCHours(),[h]:e=>e.getUTCMinutes(),[g]:e=>e.getUTCSeconds(),[m]:e=>e.getUTCMilliseconds(),[f]:e=>N(e),[u]:e=>F(e),[d]:(e,t)=>$(1,e.getUTCDay(),P(t)),[u+d]:(e,t)=>$(F(e),e.getUTCDay(),P(t))},q={[s]:e=>3*e,[u]:(e,t)=>$(e,0,P(t))};function j(e,t){return I(e,t||1,z,q,M)}const H={[o]:i.timeYear,[s]:i.timeMonth.every(3),[l]:i.timeMonth,[u]:i.timeWeek,[c]:i.timeDay,[d]:i.timeDay,[f]:i.timeDay,[p]:i.timeHour,[h]:i.timeMinute,[g]:i.timeSecond,[m]:i.timeMillisecond},G={[o]:i.utcYear,[s]:i.utcMonth.every(3),[l]:i.utcMonth,[u]:i.utcWeek,[c]:i.utcDay,[d]:i.utcDay,[f]:i.utcDay,[p]:i.utcHour,[h]:i.utcMinute,[g]:i.utcSecond,[m]:i.utcMillisecond};function V(e){return H[e]}function W(e){return G[e]}function Y(e,t,n){return e?e.offset(t,n):void 0}function X(e,t,n){return Y(V(e),t,n)}function K(e,t,n){return Y(W(e),t,n)}function J(e,t,n,r){return e?e.range(t,n,r):void 0}function Q(e,t,n,r){return J(V(e),t,n,r)}function Z(e,t,n,r){return J(W(e),t,n,r)}const ee=31536e6,te=[o,l,c,p,h,g,m],ne=te.slice(0,-1),re=ne.slice(0,-1),ie=re.slice(0,-1),ae=ie.slice(0,-1),oe=[o,l],se=[o],le=[[ne,1,1e3],[ne,5,5e3],[ne,15,15e3],[ne,30,3e4],[re,1,6e4],[re,5,3e5],[re,15,9e5],[re,30,18e5],[ie,1,36e5],[ie,3,108e5],[ie,6,216e5],[ie,12,432e5],[ae,1,864e5],[[o,u],1,6048e5],[oe,1,2592e6],[oe,3,7776e6],[se,1,ee]];function ue(e){const t=e.extent,n=e.maxbins||40,i=Math.abs((0,r.span)(t))/n;let o,s,l=(0,a.bisector)((e=>e[2])).right(le,i);return l===le.length?(o=se,s=(0,a.tickStep)(t[0]/ee,t[1]/ee,n)):l?(l=le[i/le[l-1][2]{"use strict";n.r(t),n.d(t,{DEFAULT_OPTIONS:()=>u,Handler:()=>v,calculatePositionRelativeToCursor:()=>f,calculatePositionRelativeToMark:()=>p,createDefaultStyle:()=>d,default:()=>w,escapeHTML:()=>c,formatValue:()=>i,getMarkBounds:()=>h,getPositions:()=>g,mouseIsOnTooltip:()=>y,replacer:()=>a,stringify:()=>o,tooltipIsInViewport:()=>m,version:()=>b});var r=n(26372);function i(e,t,n,i){if((0,r.isArray)(e))return`[${e.map((e=>t((0,r.isString)(e)?e:o(e,n)))).join(", ")}]`;if((0,r.isObject)(e)){let a="";const{title:s,image:l,...u}=e;s&&(a+=`

${t(s)}

`),l&&(a+=``);const c=Object.keys(u);if(c.length>0){a+="";for(const e of c){let i=u[e];void 0!==i&&((0,r.isObject)(i)&&(i=o(i,n)),a+=``)}a+="
${t(e)}${t(i)}
"}return a||"{}"}return t(e)}function a(e){const t=[];return function(n,r){if("object"!=typeof r||null===r)return r;const i=t.indexOf(this)+1;return t.length=i,t.length>e?"[Object]":t.indexOf(r)>=0?"[Circular]":(t.push(r),r)}}function o(e,t){return JSON.stringify(e,a(t))}var s="#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black;\n}\n#vg-tooltip-element.visible {\n visibility: visible;\n}\n#vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px;\n}\n#vg-tooltip-element table {\n border-spacing: 0;\n}\n#vg-tooltip-element table tr {\n border: none;\n}\n#vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px;\n}\n#vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px;\n}\n#vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left;\n}\n#vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf;\n}\n";const l="vg-tooltip-element",u={offsetX:10,offsetY:10,id:l,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:c,maxDepth:2,formatTooltip:i,baseURL:"",anchor:"cursor",position:["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]};function c(e){return String(e).replace(/&/g,"&").replace(/=0&&e.y>=0&&e.x+t.width<=window.innerWidth&&e.y+t.height<=window.innerHeight}function y(e,t,n){return e.clientX>=t.x&&e.clientX<=t.x+n.width&&e.clientY>=t.y&&e.clientY<=t.y+n.height}class v{constructor(e){this.options={...u,...e};const t=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const e=document.createElement("style");e.setAttribute("id",this.options.styleId),e.innerHTML=d(t);const n=document.head;n.childNodes.length>0?n.insertBefore(e,n.childNodes[0]):n.appendChild(e)}}tooltipHandler(e,t,n,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),null==r||""===r)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:i,y:a}="mark"===this.options.anchor?p(e,t,n,this.el.getBoundingClientRect(),this.options):f(t,this.el.getBoundingClientRect(),this.options);this.el.style.top=`${a}px`,this.el.style.left=`${i}px`}}const b="0.35.1";function w(e,t){const n=new v(t);return e.tooltip(n.call).run(),n}},28740:(e,t,n)=>{"use strict";n.r(t),n.d(t,{aggregate:()=>S,bin:()=>_,collect:()=>C,compare:()=>T,countpattern:()=>R,cross:()=>D,density:()=>P,dotbin:()=>B,expression:()=>U,extent:()=>q,facet:()=>H,field:()=>G,filter:()=>W,flatten:()=>Y,fold:()=>X,formula:()=>K,generate:()=>J,impute:()=>ee,joinaggregate:()=>te,kde:()=>ne,key:()=>re,load:()=>ae,lookup:()=>se,multiextent:()=>le,multivalues:()=>ce,params:()=>fe,pivot:()=>pe,prefacet:()=>he,project:()=>ge,proxy:()=>me,quantile:()=>ye,relay:()=>ve,sample:()=>be,sequence:()=>we,sieve:()=>xe,subflow:()=>j,timeunit:()=>Ee,tupleindex:()=>_e,values:()=>Ae,window:()=>De});var r=n(26372),i=n(24988),a=n(48872),o=n(61388),s=n(71652);function l(e){return e&&e.length?1===e.length?e[0]:(t=e,e=>{const n=t.length;let r=1,i=String(t[0](e));for(;r{},d={init:c,add:c,rem:c,idx:0},f={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.valid?e.sum:void 0,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||void 0===e.max)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,n)=>{t{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,n)=>{t>e.max&&(e.argmax=n)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(e,t)=>{e.exp=0,e.exp_r=t},value:e=>e.valid?e.exp*(1-e.exp_r)/(1-e.exp_r**e.valid):void 0,add:(e,t)=>e.exp=e.exp_r*e.exp+t,rem:(e,t)=>e.exp=(e.exp-t/e.exp_r**(e.valid-1))/e.exp_r},exponentialb:{value:e=>e.valid?e.exp*(1-e.exp_r):void 0,req:["exponential"],idx:1}},p=Object.keys(f).filter((e=>"__count__"!==e));function h(e,t,n){return f[e](n,t)}function g(e,t){return e.idx-t.idx}function m(){this.valid=0,this.missing=0,this._ops.forEach((e=>null==e.aggregate_param?e.init(this):e.init(this,e.aggregate_param)))}function y(e,t){null!=e&&""!==e?e==e&&(++this.valid,this._ops.forEach((n=>n.add(this,e,t)))):++this.missing}function v(e,t){null!=e&&""!==e?e==e&&(--this.valid,this._ops.forEach((n=>n.rem(this,e,t)))):--this.missing}function b(e){return this._out.forEach((t=>e[t.out]=t.value(this))),e}function w(e,t){const n=t||r.identity,i=function(e){const t={};e.forEach((e=>t[e.name]=e));const n=e=>{e.req&&e.req.forEach((e=>{t[e]||n(t[e]=f[e]())}))};return e.forEach(n),Object.values(t).sort(g)}(e),a=e.slice().sort(g);function o(e){this._ops=i,this._out=a,this.cell=e,this.init()}return o.prototype.init=m,o.prototype.add=y,o.prototype.rem=v,o.prototype.set=b,o.prototype.get=n,o.fields=e.map((e=>e.out)),o}function x(e){this._key=e?(0,r.field)(e):i.tupleid,this.reset()}[...p,"__count__"].forEach((e=>{f[e]=function(e,t){return(n,i)=>(0,r.extend)({name:e,aggregate_param:i,out:n||e},d,t)}(e,f[e])}));const E=x.prototype;function S(e){i.Transform.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}function _(e){i.Transform.call(this,null,e)}function A(e,t,n){const i=e;let a=t||[],o=n||[],s={},l=0;return{add:e=>o.push(e),remove:e=>s[i(e)]=++l,size:()=>a.length,data:(e,t)=>(l&&(a=a.filter((e=>!s[i(e)])),s={},l=0),t&&e&&a.sort(e),o.length&&(a=e?(0,r.merge)(e,a,o.sort(e)):a.concat(o),o=[]),a)}}function C(e){i.Transform.call(this,[],e)}function T(e){i.Operator.call(this,null,k,e)}function k(e){return this.value&&!e.modified()?this.value:(0,r.compare)(e.fields,e.orders)}function R(e){i.Transform.call(this,null,e)}function D(e){i.Transform.call(this,null,e)}E.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},E.add=function(e){this._add.push(e)},E.rem=function(e){this._rem.push(e)},E.values=function(){if(this._get=null,0===this._rem.length)return this._add;const e=this._add,t=this._rem,n=this._key,r=e.length,i=t.length,a=Array(r-i),o={};let s,l,u;for(s=0;s=0;)i=e(t[a])+"",(0,r.hasOwnProperty)(n,i)||(n[i]=1,++o);return o},E.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),n=(0,r.extentIndex)(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext},E.argmin=function(e){return this.extent(e)[0]||{}},E.argmax=function(e){return this.extent(e)[1]||{}},E.min=function(e){const t=this.extent(e)[0];return null!=t?e(t):void 0},E.max=function(e){const t=this.extent(e)[1];return null!=t?e(t):void 0},E.quartile=function(e){return this._get===e&&this._q||(this._q=(0,a.quartiles)(this.values(),e),this._get=e),this._q},E.q1=function(e){return this.quartile(e)[0]},E.q2=function(e){return this.quartile(e)[1]},E.q3=function(e){return this.quartile(e)[2]},E.ci=function(e){return this._get===e&&this._ci||(this._ci=(0,a.bootstrapCI)(this.values(),1e3,.05,e),this._get=e),this._ci},E.ci0=function(e){return this.ci(e)[0]},E.ci1=function(e){return this.ci(e)[1]},S.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:p},{name:"aggregate_params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]},(0,r.inherits)(S,i.Transform,{transform(e,t){const n=this,r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.modified();return n.stamp=r.stamp,n.value&&(i||t.modified(n._inputs,!0))?(n._prev=n.value,n.value=i?n.init(e):Object.create(null),t.visit(t.SOURCE,(e=>n.add(e)))):(n.value=n.value||n.init(e),t.visit(t.REM,(e=>n.rem(e))),t.visit(t.ADD,(e=>n.add(e)))),r.modifies(n._outputs),n._drop=!1!==e.drop,e.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),t.clean()&&n._drop&&r.clean(!0).runAfter((()=>this.clean())),n.changes(r)},cross(){const e=this,t=e.value,n=e._dnames,r=n.map((()=>({}))),i=n.length;function a(e){let t,a,o,s;for(t in e)for(o=e[t].tuple,a=0;a{const t=(0,r.accessorName)(e);return a(e),n.push(t),t})),this.cellkey=e.key?e.key:l(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const o=e.fields||[null],s=e.ops||["count"],c=e.aggregate_params||[null],d=e.as||[],f=o.length,p={};let g,m,y,v,b,x,E;for(f!==s.length&&(0,r.error)("Unmatched number of fields and aggregate ops."),E=0;Ew(e,e.field))),Object.create(null)},cellkey:l(),cell(e,t){let n=this.value[e];return n?0===n.num&&this._drop&&n.stamp{const t=i(e);e[l]=t,e[u]=null==t?null:a+o*(1+(t-a)/o)}:e=>e[l]=i(e)),t.modifies(n?s:l)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,n=(0,a.bin)(e),i=n.step;let o,s,l=n.start,u=l+Math.ceil((n.stop-l)/i)*i;null!=(o=e.anchor)&&(s=o-(l+i*Math.floor((o-l)/i)),l+=s,u+=s);const c=function(e){let n=(0,r.toNumber)(t(e));return null==n?null:nu?1/0:(n=Math.max(l,Math.min(n,u-i)),l+i*Math.floor(1e-14+(n-l)/i))};return c.start=l,c.stop=n.stop,c.step=i,this.value=(0,r.accessor)(c,(0,r.accessorFields)(t),e.name||"bin_"+(0,r.accessorName)(t))}}),C.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},(0,r.inherits)(C,i.Transform,{transform(e,t){const n=t.fork(t.ALL),r=A(i.tupleid,this.value,n.materialize(n.ADD).add),a=e.sort,o=t.changed()||a&&(e.modified("sort")||t.modified(a.fields));return n.visit(n.REM,r.remove),this.modified(o),this.value=n.source=r.data((0,i.stableCompare)(a),o),t.source&&t.source.root&&(this.value.root=t.source.root),n}}),(0,r.inherits)(T,i.Operator),R.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]},(0,r.inherits)(R,i.Transform,{transform(e,t){const n=t=>n=>{for(var r,i=function(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase()}return e.match(n)}(s(n),e.case,a)||[],l=0,u=i.length;li[e]=1+(i[e]||0))),c=n((e=>i[e]-=1));return r?t.visit(t.SOURCE,u):(t.visit(t.ADD,u),t.visit(t.REM,c)),this._finish(t,l)},_parameterCheck(e,t){let n=!1;return!e.modified("stopwords")&&this._stop||(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),n=!0),!e.modified("pattern")&&this._match||(this._match=new RegExp(e.pattern||"[\\w']+","g"),n=!0),(e.modified("field")||t.modified(e.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(e,t){const n=this._counts,r=this._tuples||(this._tuples={}),a=t[0],o=t[1],s=e.fork(e.NO_SOURCE|e.NO_FIELDS);let l,u,c;for(l in n)u=r[l],c=n[l]||0,!u&&c?(r[l]=u=(0,i.ingest)({}),u[a]=l,u[o]=c,s.add.push(u)):0===c?(u&&s.rem.push(u),n[l]=null,r[l]=null):u[o]!==c&&(u[o]=c,s.mod.push(u));return s.modifies(t)}}),D.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},(0,r.inherits)(D,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE),a=e.as||["a","b"],o=a[0],s=a[1],l=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let u=this.value;return l?(u&&(n.rem=u),u=t.materialize(t.SOURCE).source,n.add=this.value=function(e,t,n,r){for(var a,o,s=[],l={},u=e.length,c=0;cF(e,t)))):typeof i[n]===N&&i[n](e[n]);return i}function P(e){i.Transform.call(this,null,e)}const M=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],I={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:M},{name:"weights",type:"number",array:!0}]};function $(e,t){return e?e.map(((e,n)=>t[n]||(0,r.accessorName)(e))):null}function L(e,t,n){const r=[],i=e=>e(l);let a,o,s,l,u,c;if(null==t)r.push(e.map(n));else for(a={},o=0,s=e.length;ot(n,e)),(0,r.accessorFields)(t),(0,r.accessorName)(t))}function q(e){i.Transform.call(this,[void 0,void 0],e)}function j(e,t){i.Operator.call(this,e),this.parent=t,this.count=0}function H(e){i.Transform.call(this,{},e),this._keys=(0,r.fastmap)();const t=this._targets=[];t.active=0,t.forEach=e=>{for(let n=0,r=t.active;n(0,r.field)(e))):(0,r.field)(e.name,e.as)}function W(e){i.Transform.call(this,(0,r.fastmap)(),e)}function Y(e){i.Transform.call(this,[],e)}function X(e){i.Transform.call(this,[],e)}function K(e){i.Transform.call(this,null,e)}function J(e){i.Transform.call(this,[],e)}P.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:M.concat(I)},{name:"as",type:"string",array:!0,default:["value","density"]}]},(0,r.inherits)(P,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const o=F(e.distribution,function(e){return()=>e.materialize(e.SOURCE).source}(t)),s=e.steps||e.minsteps||25,l=e.steps||e.maxsteps||200;let u=e.method||"pdf";"pdf"!==u&&"cdf"!==u&&(0,r.error)("Invalid density method: "+u),e.extent||o.data||(0,r.error)("Missing density extent parameter."),u=o[u];const c=e.as||["value","density"],d=e.extent||(0,r.extent)(o.data()),f=(0,a.sampleCurve)(u,d,s,l).map((e=>{const t={};return t[c[0]]=e[0],t[c[1]]=e[1],(0,i.ingest)(t)}));this.value&&(n.rem=this.value),this.value=n.add=n.source=f}return n}}),B.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:"bin"}]},(0,r.inherits)(B,i.Transform,{transform(e,t){if(this.value&&!e.modified()&&!t.changed())return t;const n=t.materialize(t.SOURCE).source,o=L(t.source,e.groupby,r.identity),s=e.smooth||!1,l=e.field,u=e.step||((e,t)=>(0,r.span)((0,r.extent)(e,t))/30)(n,l),c=(0,i.stableCompare)(((e,t)=>l(e)-l(t))),d=e.as||"bin",f=o.length;let p,h=1/0,g=-1/0,m=0;for(;mg&&(g=t),e[++p][d]=t}return this.value={start:h,stop:g,step:u},t.reflow(!0).modifies(d)}}),(0,r.inherits)(U,i.Operator),q.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},(0,r.inherits)(q,i.Transform,{transform(e,t){const n=this.value,i=e.field,a=t.changed()||t.modified(i.fields)||e.modified("field");let o=n[0],s=n[1];if((a||null==o)&&(o=1/0,s=-1/0),t.visit(a?t.SOURCE:t.ADD,(e=>{const t=(0,r.toNumber)(i(e));null!=t&&(ts&&(s=t))})),!Number.isFinite(o)||!Number.isFinite(s)){let e=(0,r.accessorName)(i);e&&(e=` for field "${e}"`),t.dataflow.warn(`Infinite extent${e}: [${o}, ${s}]`),o=s=void 0}this.value=[o,s]}}),(0,r.inherits)(j,i.Operator,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}}),(0,r.inherits)(H,i.Transform,{activate(e){this._targets[this._targets.active++]=e},subflow(e,t,n,i){const a=this.value;let o,s,l=(0,r.hasOwnProperty)(a,e)&&a[e];return l?l.value.stampe&&e.count>0));this.initTargets(e)}},initTargets(e){const t=this._targets,n=t.length,r=e?e.length:0;let i=0;for(;ithis.subflow(e,a,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,(e=>{const t=(0,i.tupleid)(e),n=o.get(t);void 0!==n&&(o.delete(t),l(n).rem(e))})),t.visit(t.ADD,(e=>{const t=r(e);o.set((0,i.tupleid)(e),t),l(t).add(e)})),s||t.modified(r.fields)?t.visit(t.MOD,(e=>{const t=(0,i.tupleid)(e),n=o.get(t),a=r(e);n===a?l(a).mod(e):(o.set(t,a),l(n).rem(e),l(a).add(e))})):t.changed(t.MOD)&&t.visit(t.MOD,(e=>{l(o.get((0,i.tupleid)(e))).mod(e)})),s&&t.visit(t.REFLOW,(e=>{const t=(0,i.tupleid)(e),n=o.get(t),a=r(e);n!==a&&(o.set(t,a),l(n).rem(e),l(a).add(e))})),t.clean()?n.runAfter((()=>{this.clean(),o.clean()})):o.empty>n.cleanThreshold&&n.runAfter(o.clean),t}}),(0,r.inherits)(G,i.Operator),W.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},(0,r.inherits)(W,i.Transform,{transform(e,t){const n=t.dataflow,r=this.value,a=t.fork(),o=a.add,s=a.rem,l=a.mod,u=e.expr;let c=!0;function d(t){const n=(0,i.tupleid)(t),a=u(t,e),d=r.get(n);a&&d?(r.delete(n),o.push(t)):a||d?c&&a&&!d&&l.push(t):(r.set(n,1),s.push(t))}return t.visit(t.REM,(e=>{const t=(0,i.tupleid)(e);r.has(t)?r.delete(t):s.push(e)})),t.visit(t.ADD,(t=>{u(t,e)?o.push(t):r.set((0,i.tupleid)(t),1)})),t.visit(t.MOD,d),e.modified()&&(c=!1,t.visit(t.REFLOW,d)),r.empty>n.cleanThreshold&&n.runAfter(r.clean),a}}),Y.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},(0,r.inherits)(Y,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.fields,a=$(r,e.as||[]),o=e.index||null,s=a.length;return n.rem=this.value,t.visit(t.SOURCE,(e=>{const t=r.map((t=>t(e))),l=t.reduce(((e,t)=>Math.max(e,t.length)),0);let u,c,d,f=0;for(;f{for(let t,r=0;rt[r]=n(t,e)))}}),(0,r.inherits)(J,i.Transform,{transform(e,t){const n=t.fork(t.ALL),r=e.generator;let a,o,s,l=this.value,u=e.size-l.length;if(u>0){for(a=[];--u>=0;)a.push(s=(0,i.ingest)(r(e))),l.push(s);n.add=n.add.length?n.materialize(n.ADD).add.concat(a):a}else o=l.slice(0,-u),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(o):o,l=l.slice(-u);return n.source=this.value=l,n}});const Q={value:"value",median:o.median,mean:o.mean,min:o.min,max:o.max},Z=[];function ee(e){i.Transform.call(this,[],e)}function te(e){S.call(this,e)}function ne(e){i.Transform.call(this,null,e)}function re(e){i.Operator.call(this,null,ie,e)}function ie(e){return this.value&&!e.modified()?this.value:(0,r.key)(e.fields,e.flat)}function ae(e){i.Transform.call(this,[],e),this._pending=null}function oe(e,t,n){n.forEach(i.ingest);const r=t.fork(t.NO_FIELDS&t.NO_SOURCE);return r.rem=e.value,e.value=r.source=r.add=n,e._pending=null,r.rem.length&&r.clean(!0),r}function se(e){i.Transform.call(this,{},e)}function le(e){i.Operator.call(this,null,ue,e)}function ue(e){if(this.value&&!e.modified())return this.value;const t=e.extents,n=t.length;let r,i,a=1/0,o=-1/0;for(r=0;ro&&(o=i[1]);return[a,o]}function ce(e){i.Operator.call(this,null,de,e)}function de(e){return this.value&&!e.modified()?this.value:e.values.reduce(((e,t)=>e.concat(t)),[])}function fe(e){i.Transform.call(this,null,e)}function pe(e){S.call(this,e)}function he(e){H.call(this,e)}function ge(e){i.Transform.call(this,null,e)}function me(e){i.Transform.call(this,null,e)}function ye(e){i.Transform.call(this,null,e)}function ve(e){i.Transform.call(this,null,e)}function be(e){i.Transform.call(this,[],e),this.count=0}function we(e){i.Transform.call(this,null,e)}function xe(e){i.Transform.call(this,null,e),this.modified(!0)}function Ee(e){i.Transform.call(this,null,e)}ee.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},(0,r.inherits)(ee,i.Transform,{transform(e,t){var n,a,o,s,l,u,c,d,f,p,h=t.fork(t.ALL),g=function(e){var t,n=e.method||Q.value;if(null!=Q[n])return n===Q.value?(t=void 0!==e.value?e.value:0,()=>t):Q[n];(0,r.error)("Unrecognized imputation method: "+n)}(e),m=function(e){const t=e.field;return e=>e?t(e):NaN}(e),y=(0,r.accessorName)(e.field),v=(0,r.accessorName)(e.key),b=(e.groupby||[]).map(r.accessorName),w=function(e,t,n,r){var i,a,o,s,l,u,c,d,f=e=>e(d),p=[],h=r?r.slice():[],g={},m={};for(h.forEach(((e,t)=>g[e]=t+1)),s=0,c=e.length;sn.add(e)))):(a=n.value=n.value||this.init(e),t.visit(t.REM,(e=>n.rem(e))),t.visit(t.ADD,(e=>n.add(e)))),n.changes(),t.visit(t.SOURCE,(e=>{(0,r.extend)(e,a[n.cellkey(e)].tuple)})),t.reflow(i).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let n,r;for(n=0,r=this._alen;n{const n=(0,a.randomKDE)(t,u)[c],o=e.counts?t.length:1,s=p||(0,r.extent)(t);(0,a.sampleCurve)(n,s,h,g).forEach((e=>{const n={};for(let e=0;e(this._pending=(0,r.array)(e.data),e=>e.touch(this))));return{async:t}}return n.request(e.url,e.format).then((e=>oe(this,t,(0,r.array)(e.data))))}}),se.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},(0,r.inherits)(se,i.Transform,{transform(e,t){const n=e.fields,i=e.index,a=e.values,o=null==e.default?null:e.default,s=e.modified(),l=n.length;let u,c,d,f=s?t.SOURCE:t.ADD,p=t,h=e.as;return a?(c=a.length,l>1&&!h&&(0,r.error)('Multi-field lookup requires explicit "as" parameter.'),h&&h.length!==l*c&&(0,r.error)('The "as" parameter has too few output field names.'),h=h||a.map(r.accessorName),u=function(e){for(var t,r,s=0,u=0;st.modified(e.fields))),f|=d?t.MOD:0),t.visit(f,u),p.modifies(h)}}),(0,r.inherits)(le,i.Operator),(0,r.inherits)(ce,i.Operator),(0,r.inherits)(fe,i.Transform,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}}),pe.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:p,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},(0,r.inherits)(pe,S,{_transform:S.prototype.transform,transform(e,t){return this._transform(function(e,t){const n=e.field,i=e.value,a=("count"===e.op?"__count__":e.op)||"sum",o=(0,r.accessorFields)(n).concat((0,r.accessorFields)(i)),s=function(e,t,n){const i={},a=[];return n.visit(n.SOURCE,(t=>{const n=e(t);i[n]||(i[n]=1,a.push(n))})),a.sort(r.ascending),t?a.slice(0,t):a}(n,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:s.map((()=>a)),fields:s.map((e=>function(e,t,n,i){return(0,r.accessor)((r=>t(r)===e?n(r):NaN),i,e+"")}(e,n,i,o))),as:s.map((e=>e+"")),modified:e.modified.bind(e)}}(e,t),t)}}),(0,r.inherits)(he,H,{transform(e,t){const n=e.subflow,a=e.field,o=e=>this.subflow((0,i.tupleid)(e),n,t,e);return(e.modified("field")||a&&t.modified((0,r.accessorFields)(a)))&&(0,r.error)("PreFacet does not support field modification."),this.initTargets(),a?(t.visit(t.MOD,(e=>{const t=o(e);a(e).forEach((e=>t.mod(e)))})),t.visit(t.ADD,(e=>{const t=o(e);a(e).forEach((e=>t.add((0,i.ingest)(e))))})),t.visit(t.REM,(e=>{const t=o(e);a(e).forEach((e=>t.rem(e)))}))):(t.visit(t.MOD,(e=>o(e).mod(e))),t.visit(t.ADD,(e=>o(e).add(e))),t.visit(t.REM,(e=>o(e).rem(e)))),t.clean()&&t.runAfter((()=>this.clean())),t}}),ge.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},(0,r.inherits)(ge,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.fields,a=$(e.fields,e.as||[]),o=r?(e,t)=>function(e,t,n,r){for(let i=0,a=n.length;i{const t=(0,i.tupleid)(e);n.rem.push(s[t]),s[t]=null})),t.visit(t.ADD,(e=>{const t=o(e,(0,i.ingest)({}));s[(0,i.tupleid)(e)]=t,n.add.push(t)})),t.visit(t.MOD,(e=>{n.mod.push(o(e,s[(0,i.tupleid)(e)]))})),n}}),(0,r.inherits)(me,i.Transform,{transform(e,t){return this.value=e.value,e.modified("value")?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}}),ye.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]},(0,r.inherits)(ye,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS),s=e.as||["prob","value"];if(this.value&&!e.modified()&&!t.changed())return n.source=this.value,n;const l=L(t.materialize(t.SOURCE).source,e.groupby,e.field),u=(e.groupby||[]).map(r.accessorName),c=[],d=e.step||.01,f=e.probs||(0,o.range)(d/2,1-1e-14,d),p=f.length;return l.forEach((e=>{const t=(0,a.quantiles)(e,f);for(let n=0;n{const t=(0,i.tupleid)(e);n.rem.push(r[t]),r[t]=null})),t.visit(t.ADD,(e=>{const t=(0,i.derive)(e);r[(0,i.tupleid)(e)]=t,n.add.push(t)})),t.visit(t.MOD,(e=>{const t=r[(0,i.tupleid)(e)];for(const r in e)t[r]=e[r],n.modifies(r);n.mod.push(t)}))),n}}),be.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},(0,r.inherits)(be,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.modified("size"),o=e.size,s=this.value.reduce(((e,t)=>(e[(0,i.tupleid)(t)]=1,e)),{});let l=this.value,u=this.count,c=0;function d(e){let t,r;l.length=c&&(t=l[r],s[(0,i.tupleid)(t)]&&n.rem.push(t),l[r]=e)),++u}if(t.rem.length&&(t.visit(t.REM,(e=>{const t=(0,i.tupleid)(e);s[t]&&(s[t]=-1,n.rem.push(e)),--u})),l=l.filter((e=>-1!==s[(0,i.tupleid)(e)]))),(t.rem.length||r)&&l.length{s[(0,i.tupleid)(e)]||d(e)})),c=-1),r&&l.length>o){const e=l.length-o;for(let t=0;t{s[(0,i.tupleid)(e)]&&n.mod.push(e)})),t.add.length&&t.visit(t.ADD,d),(t.add.length||c<0)&&(n.add=l.filter((e=>!s[(0,i.tupleid)(e)]))),this.count=u,this.value=n.source=l,n}}),we.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},(0,r.inherits)(we,i.Transform,{transform(e,t){if(this.value&&!e.modified())return;const n=t.materialize().fork(t.MOD),r=e.as||"data";return n.rem=this.value?t.rem.concat(this.value):t.rem,this.value=(0,o.range)(e.start,e.stop,e.step||1).map((e=>{const t={};return t[r]=e,(0,i.ingest)(t)})),n.add=t.add.concat(this.value),n}}),(0,r.inherits)(xe,i.Transform,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});const Se=["unit0","unit1"];function _e(e){i.Transform.call(this,(0,r.fastmap)(),e)}function Ae(e){i.Transform.call(this,null,e)}Ee.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:s.TIME_UNITS,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:Se}]},(0,r.inherits)(Ee,i.Transform,{transform(e,t){const n=e.field,i=!1!==e.interval,a="utc"===e.timezone,o=this._floor(e,t),l=(a?s.utcInterval:s.timeInterval)(o.unit).offset,u=e.as||Se,c=u[0],d=u[1],f=o.step;let p=o.start||1/0,h=o.stop||-1/0,g=t.ADD;return(e.modified()||t.changed(t.REM)||t.modified((0,r.accessorFields)(n)))&&(g=(t=t.reflow(!0)).SOURCE,p=1/0,h=-1/0),t.visit(g,(e=>{const t=n(e);let r,a;null==t?(e[c]=null,i&&(e[d]=null)):(e[c]=r=a=o(t),i&&(e[d]=a=l(r,f)),rh&&(h=a))})),o.start=p,o.stop=h,t.modifies(i?u:c)},_floor(e,t){const n="utc"===e.timezone,{units:i,step:a}=e.units?{units:e.units,step:e.step||1}:(0,s.timeBin)({extent:e.extent||(0,r.extent)(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),o=(0,s.timeUnits)(i),l=this.value||{},u=(n?s.utcFloor:s.timeFloor)(o,a);return u.unit=(0,r.peek)(o),u.units=o,u.step=a,u.start=l.start,u.stop=l.stop,this.value=u}}),(0,r.inherits)(_e,i.Transform,{transform(e,t){const n=t.dataflow,r=e.field,i=this.value,a=e=>i.set(r(e),e);let o=!0;return e.modified("field")||t.modified(r.fields)?(i.clear(),t.visit(t.SOURCE,a)):t.changed()?(t.visit(t.REM,(e=>i.delete(r(e)))),t.visit(t.ADD,a)):o=!1,this.modified(o),i.empty>n.cleanThreshold&&n.runAfter(i.clean),t.fork()}}),(0,r.inherits)(Ae,i.Transform,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort((0,i.stableCompare)(e.sort)):t.source).map(e.field))}});const Ce={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?e=n+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?++e:e}}},percent_rank:function(){const e=Ce.rank(),t=e.next;return{init:e.init,next:e=>(t(e)-1)/(e.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const n=t.data,r=t.compare;let i=t.index;if(e0||(0,r.error)("ntile num must be greater than zero.");const n=Ce.cume_dist(),i=n.next;return{init:n.init,next:e=>Math.ceil(t*i(e))}},lag:function(e,t){return t=+t||1,{next:n=>{const r=n.index-t;return r>=0?e(n.data[r]):null}}},lead:function(e,t){return t=+t||1,{next:n=>{const r=n.index+t,i=n.data;return re(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return(t=+t)>0||(0,r.error)("nth_value nth must be greater than zero."),{next:n=>{const r=n.i0+(t-1);return rt=null,next:n=>{const r=e(n.data[n.index]);return null!=r?t=r:t}}},next_value:function(e){let t,n;return{init:()=>(t=null,n=-1),next:r=>{const i=r.data;return r.index<=n?t:(n=function(e,t,n){for(let r=t.length;nc[e]=1))}m(e.sort),t.forEach(((e,t)=>{const c=n[t],y=i[t],v=a[t]||null,b=(0,r.accessorName)(c),w=u(e,b,o[t]);if(m(c),s.push(w),(0,r.hasOwnProperty)(Ce,e))l.push(function(e,t,n,i){const a=Ce[e](t,n);return{init:a.init||r.zero,update:function(e,t){t[i]=a.next(e)}}}(e,c,y,w));else{if(null==c&&"count"!==e&&(0,r.error)("Null aggregate field specified."),"count"===e)return void f.push(w);g=!1;let t=d[b];t||(t=d[b]=[],t.field=c,p.push(t)),t.push(h(e,v,w))}})),(f.length||p.length)&&(this.cell=function(e,t,n){e=e.map((e=>w(e,e.field)));const r={num:0,agg:null,store:!1,count:t};if(!n)for(var i=e.length,a=r.agg=Array(i),o=0;o0&&!i(a[n],a[n-1])&&(e.i0=t.left(a,a[n])),re.init())),this.cell&&this.cell.init()},Re.update=function(e,t){const n=this.cell,r=this.windows,i=e.data,a=r&&r.length;let o;if(n){for(o=e.p0;othis.group(a(e));let s=this.state;s&&!n||(s=this.state=new ke(e)),n||t.modified(s.inputs)?(this.value={},t.visit(t.SOURCE,(e=>o(e).add(e)))):(t.visit(t.REM,(e=>o(e).remove(e))),t.visit(t.ADD,(e=>o(e).add(e))));for(let t=0,n=this._mlen;t{"use strict";function r(e,t,n){return e.fields=t||[],e.fname=n,e}function i(e){return null==e?null:e.fname}function a(e){return null==e?null:e.fields}function o(e){return 1===e.length?s(e[0]):l(e)}n.r(t),n.d(t,{Debug:()=>S,Error:()=>w,Info:()=>E,None:()=>b,Warn:()=>x,accessor:()=>r,accessorFields:()=>a,accessorName:()=>i,array:()=>K,ascending:()=>te,clampRange:()=>J,compare:()=>ee,constant:()=>ae,debounce:()=>oe,error:()=>u,extend:()=>se,extent:()=>le,extentIndex:()=>ue,falsy:()=>y,fastmap:()=>pe,field:()=>d,flush:()=>he,hasOwnProperty:()=>de,id:()=>f,identity:()=>p,inherits:()=>ge,inrange:()=>me,isArray:()=>A,isBoolean:()=>ye,isDate:()=>ve,isFunction:()=>Q,isIterable:()=>be,isNumber:()=>we,isObject:()=>C,isRegExp:()=>xe,isString:()=>Ee,key:()=>Se,lerp:()=>_e,logger:()=>_,lruCache:()=>Ce,merge:()=>Te,mergeConfig:()=>k,one:()=>g,pad:()=>Re,panLinear:()=>B,panLog:()=>U,panPow:()=>z,panSymlog:()=>q,peek:()=>O,quarter:()=>Y,repeat:()=>ke,span:()=>De,splitAccessPath:()=>c,stringValue:()=>Oe,toBoolean:()=>Ne,toDate:()=>Pe,toNumber:()=>N,toSet:()=>Ie,toString:()=>Me,truncate:()=>$e,truthy:()=>m,utcquarter:()=>X,visitArray:()=>Le,writeConfig:()=>R,zero:()=>h,zoomLinear:()=>H,zoomLog:()=>G,zoomPow:()=>V,zoomSymlog:()=>W});const s=e=>function(t){return t[e]},l=e=>{const t=e.length;return function(n){for(let r=0;rr&&c(),s=r=i+1):"]"===a&&(s||u("Access path missing open bracket: "+e),s>0&&c(),s=0,r=i+1):i>r?c():r=i+1}return s&&u("Access path missing closing bracket: "+e),o&&u("Access path missing closing quote: "+e),i>r&&(i++,c()),t}function d(e,t,n){const i=c(e);return e=1===i.length?i[0]:e,r((n&&n.get||o)(i),[e],t||e)}const f=d("id"),p=r((e=>e),[],"identity"),h=r((()=>0),[],"zero"),g=r((()=>1),[],"one"),m=r((()=>!0),[],"true"),y=r((()=>!1),[],"false");function v(e,t,n){const r=[t].concat([].slice.call(n));console[e].apply(console,r)}const b=0,w=1,x=2,E=3,S=4;function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v,r=e||b;return{level(e){return arguments.length?(r=+e,this):r},error(){return r>=w&&n(t||"error","ERROR",arguments),this},warn(){return r>=x&&n(t||"warn","WARN",arguments),this},info(){return r>=E&&n(t||"log","INFO",arguments),this},debug(){return r>=S&&n(t||"log","DEBUG",arguments),this}}}var A=Array.isArray;function C(e){return e===Object(e)}const T=e=>"__proto__"!==e;function k(){for(var e=arguments.length,t=new Array(e),n=0;n{for(const n in t)if("signals"===n)e.signals=D(e.signals,t.signals);else{const r="legend"===n?{layout:1}:"style"===n||null;R(e,n,t[n],r)}return e}),{})}function R(e,t,n,r){if(!T(t))return;let i,a;if(C(n)&&!A(n))for(i in a=C(e[t])?e[t]:e[t]={},n)r&&(!0===r||r[i])?R(a,i,n[i]):T(i)&&(a[i]=n[i]);else e[t]=n}function D(e,t){if(null==e)return t;const n={},r=[];function i(e){n[e.name]||(n[e.name]=1,r.push(e))}return t.forEach(i),e.forEach(i),r}function O(e){return e[e.length-1]}function N(e){return null==e||""===e?null:+e}const F=e=>t=>e*Math.exp(t),P=e=>t=>Math.log(e*t),M=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),I=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,$=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function L(e,t,n,r){const i=n(e[0]),a=n(O(e)),o=(a-i)*t;return[r(i-o),r(a-o)]}function B(e,t){return L(e,t,N,p)}function U(e,t){var n=Math.sign(e[0]);return L(e,t,P(n),F(n))}function z(e,t,n){return L(e,t,$(n),$(1/n))}function q(e,t,n){return L(e,t,M(n),I(n))}function j(e,t,n,r,i){const a=r(e[0]),o=r(O(e)),s=null!=t?r(t):(a+o)/2;return[i(s+(a-s)*n),i(s+(o-s)*n)]}function H(e,t,n){return j(e,t,n,N,p)}function G(e,t,n){const r=Math.sign(e[0]);return j(e,t,n,P(r),F(r))}function V(e,t,n,r){return j(e,t,n,$(r),$(1/r))}function W(e,t,n,r){return j(e,t,n,M(r),I(r))}function Y(e){return 1+~~(new Date(e).getMonth()/3)}function X(e){return 1+~~(new Date(e).getUTCMonth()/3)}function K(e){return null!=e?A(e)?e:[e]:[]}function J(e,t,n){let r,i=e[0],a=e[1];return a=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-r),i+r]}function Q(e){return"function"==typeof e}const Z="descending";function ee(e,t,n){n=n||{},t=K(t)||[];const i=[],o=[],s={},l=n.comparator||ne;return K(e).forEach(((e,r)=>{null!=e&&(i.push(t[r]===Z?-1:1),o.push(e=Q(e)?e:d(e,null,n)),(a(e)||[]).forEach((e=>s[e]=1)))})),0===o.length?null:r(l(o,i),Object.keys(s))}const te=(e,t)=>(et||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t==t?-1:t!=t&&e==e?1:0),ne=(e,t)=>1===e.length?re(e[0],t[0]):ie(e,t,e.length),re=(e,t)=>function(n,r){return te(e(n),e(r))*t},ie=(e,t,n)=>(t.push(0),function(r,i){let a,o=0,s=-1;for(;0===o&&++se}function oe(e,t){let n;return r=>{n&&clearTimeout(n),n=setTimeout((()=>(t(r),n=null)),e)}}function se(e){for(let t,n,r=1,i=arguments.length;ra&&(a=r))}else{for(r=t(e[o]);oa&&(a=r))}return[i,a]}function ue(e,t){const n=e.length;let r,i,a,o,s,l=-1;if(null==t){for(;++l=i){r=a=i;break}if(l===n)return[-1,-1];for(o=s=l;++li&&(r=i,o=l),a=i){r=a=i;break}if(l===n)return[-1,-1];for(o=s=l;++li&&(r=i,o=l),ar(e)?n[e]:void 0,set(e,t){return r(e)||(++i.size,n[e]===fe&&--i.empty),n[e]=t,this},delete(e){return r(e)&&(--i.size,++i.empty,n[e]=fe),this},clear(){i.size=i.empty=0,i.object=n={}},test(e){return arguments.length?(t=e,i):t},clean(){const e={};let r=0;for(const i in n){const a=n[i];a===fe||t&&t(a)||(e[i]=a,++r)}i.size=r,i.empty=0,i.object=n=e}};return e&&Object.keys(e).forEach((t=>{i.set(t,e[t])})),i}function he(e,t,n,r,i,a){if(!n&&0!==n)return a;const o=+n;let s,l=e[0],u=O(e);uo&&(i=a,a=o,o=i),r=void 0===r||r,((n=void 0===n||n)?a<=e:ae.replace(/\\(.)/g,"$1"))):K(e));const i=e&&e.length,a=n&&n.get||o,s=e=>a(t?[e]:c(e));let l;if(i)if(1===i){const t=s(e[0]);l=function(e){return""+t(e)}}else{const t=e.map(s);l=function(e){let n=""+t[0](e),r=0;for(;++r{t={},n={},r=0},a=(i,a)=>(++r>e&&(n=t,t={},r=1),t[i]=a);return i(),{clear:i,has:e=>de(t,e)||de(n,e),get:e=>de(t,e)?t[e]:de(n,e)?a(e,n[e]):void 0,set:(e,n)=>de(t,e)?t[e]=n:a(e,n)}}function Te(e,t,n,r){const i=t.length,a=n.length;if(!a)return t;if(!i)return n;const o=r||new t.constructor(i+a);let s=0,l=0,u=0;for(;s0?n[l++]:t[s++];for(;s=0;)n+=e;return n}function Re(e,t,n,r){const i=n||" ",a=e+"",o=t-a.length;return o<=0?a:"left"===r?ke(i,o)+a:"center"===r?ke(i,~~(o/2))+a+ke(i,Math.ceil(o/2)):a+ke(i,o)}function De(e){return e&&O(e)-e[0]||0}function Oe(e){return A(e)?"["+e.map(Oe)+"]":C(e)||Ee(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function Ne(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e||!e)}const Fe=e=>we(e)||ve(e)?e:Date.parse(e);function Pe(e,t){return t=t||Fe,null==e||""===e?null:t(e)}function Me(e){return null==e||""===e?null:e+""}function Ie(e){const t={},n=e.length;for(let r=0;r{"use strict";n.r(t),n.d(t,{bound:()=>O,identifier:()=>P,mark:()=>M,overlap:()=>I,render:()=>j,viewlayout:()=>ce});var r=n(24988),i=n(84636),a=n(26372);const o="top",s="left",l="right",u="bottom",c="start",d="middle",f="end",p="group",h="axis",g="title",m="legend",y="row-header",v="row-footer",b="row-title",w="column-header",x="column-footer",E="column-title",S="fit-x",_="fit-y",A="none",C="all",T="each",k="flush",R="column",D="row";function O(e){r.Transform.call(this,null,e)}function N(e,t,n){return t(e.bounds.clear(),e,n)}(0,a.inherits)(O,r.Transform,{transform(e,t){const n=t.dataflow,r=e.mark,a=r.marktype,o=i.Marks[a],s=o.bound;let l,u=r.bounds;if(o.nested)r.items.length&&n.dirty(r.items[0]),u=N(r,s),r.items.forEach((e=>{e.bounds.clear().union(u)}));else if(a===p||e.modified())switch(t.visit(t.MOD,(e=>n.dirty(e))),u.clear(),r.items.forEach((e=>u.union(N(e,s)))),r.role){case h:case m:case g:t.reflow()}else l=t.changed(t.REM),t.visit(t.ADD,(e=>{u.union(N(e,s))})),t.visit(t.MOD,(e=>{l=l||u.alignsWith(e.bounds),n.dirty(e),u.union(N(e,s))})),l&&(u.clear(),r.items.forEach((e=>u.union(e.bounds))));return(0,i.boundClip)(r),t.modifies("bounds")}});const F=":vega_identifier:";function P(e){r.Transform.call(this,0,e)}function M(e){r.Transform.call(this,null,e)}function I(e){r.Transform.call(this,null,e)}P.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},(0,a.inherits)(P,r.Transform,{transform(e,t){const n=(i=t.dataflow)._signals[F]||(i._signals[F]=i.add(0)),r=e.as;var i;let a=n.value;return t.visit(t.ADD,(e=>e[r]=e[r]||++a)),n.set(this.value=a),t}}),(0,a.inherits)(M,r.Transform,{transform(e,t){let n=this.value;n||(n=t.dataflow.scenegraph().mark(e.markdef,function(e){const t=e.groups,n=e.parent;return t&&1===t.size?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}(e),e.index),n.group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);const r=n.marktype===p?i.GroupItem:i.Item;return t.visit(t.ADD,(e=>r.call(e,n))),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t}});const $={parity:e=>e.filter(((e,t)=>t%2?e.opacity=0:1)),greedy:(e,t)=>{let n;return e.filter(((e,r)=>r&&L(n.bounds,e.bounds,t)?e.opacity=0:(n=e,1)))}},L=(e,t,n)=>n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),B=(e,t)=>{for(var n,r=1,i=e.length,a=e[0].bounds;r{const t=e.bounds;return t.width()>1&&t.height()>1},z=e=>(e.forEach((e=>e.opacity=1)),e),q=(e,t)=>e.reflow(t.modified()).modifies("opacity");function j(e){r.Transform.call(this,null,e)}(0,a.inherits)(I,r.Transform,{transform(e,t){const n=$[e.method]||$.parity,r=e.separation||0;let s,l,c=t.materialize(t.SOURCE).source;if(!c||!c.length)return;if(!e.method)return e.modified("method")&&(z(c),t=q(t,e)),t;if(c=c.filter(U),!c.length)return;if(e.sort&&(c=c.slice().sort(e.sort)),s=z(c),t=q(t,e),s.length>=3&&B(s,r)){do{s=n(s,r)}while(s.length>=3&&B(s,r));s.length<3&&!(0,a.peek)(c).opacity&&(s.length>1&&((0,a.peek)(s).opacity=0),(0,a.peek)(c).opacity=1)}var d,f,p,h,g;e.boundScale&&e.boundTolerance>=0&&(d=e.boundScale,f=e.boundOrient,p=+e.boundTolerance,h=d.range(),g=new i.Bounds,f===o||f===u?g.set(h[0],-1/0,h[1],1/0):g.set(-1/0,h[0],1/0,h[1]),g.expand(p||1),l=e=>g.encloses(e.bounds),c.forEach((e=>{l(e)||(e.opacity=0)})));const m=s[0].mark.bounds.clear();return c.forEach((e=>{e.opacity&&m.union(e.bounds)})),t}}),(0,a.inherits)(j,r.Transform,{transform(e,t){const n=t.dataflow;if(t.visit(t.ALL,(e=>n.dirty(e))),t.fields&&t.fields.zindex){const e=t.source&&t.source[0];e&&(e.mark.zdirty=!0)}}});const H=new i.Bounds;function G(e,t,n){return e[t]===n?0:(e[t]=n,1)}function V(e){var t=e.items[0].orient;return t===s||t===l}function W(e,t,n,r){var a,c,d=t.items[0],f=d.datum,p=null!=d.translate?d.translate:.5,h=d.orient,g=function(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}(f),m=d.range,y=d.offset,v=d.position,b=d.minExtent,w=d.maxExtent,x=f.title&&d.items[g[2]].items[0],E=d.titlePadding,S=d.bounds,_=x&&(0,i.multiLineOffset)(x),A=0,C=0;switch(H.clear().union(S),S.clear(),(a=g[0])>-1&&S.union(d.items[a].bounds),(a=g[1])>-1&&S.union(d.items[a].bounds),h){case o:A=v||0,C=-y,c=Math.max(b,Math.min(w,-S.y1)),S.add(0,-c).add(m,0),x&&Y(e,x,c,E,_,0,-1,S);break;case s:A=-y,C=v||0,c=Math.max(b,Math.min(w,-S.x1)),S.add(-c,0).add(0,m),x&&Y(e,x,c,E,_,1,-1,S);break;case l:A=n+y,C=v||0,c=Math.max(b,Math.min(w,S.x2)),S.add(0,0).add(c,m),x&&Y(e,x,c,E,_,1,1,S);break;case u:A=v||0,C=r+y,c=Math.max(b,Math.min(w,S.y2)),S.add(0,0).add(m,c),x&&Y(e,x,c,E,0,0,1,S);break;default:A=d.x,C=d.y}return(0,i.boundStroke)(S.translate(A,C),d),G(d,"x",A+p)|G(d,"y",C+p)&&(d.bounds=H,e.dirty(d),d.bounds=S,e.dirty(d)),d.mark.bounds.clear().union(S)}function Y(e,t,n,r,i,a,o,s){const l=t.bounds;if(t.auto){const s=o*(n+i+r);let u=0,c=0;e.dirty(t),a?u=(t.x||0)-(t.x=s):c=(t.y||0)-(t.y=s),t.mark.bounds.clear().union(l.translate(-u,-c)),e.dirty(t)}s.union(l)}const X=(e,t)=>Math.floor(Math.min(e,t)),K=(e,t)=>Math.ceil(Math.max(e,t));function J(e){return(new i.Bounds).set(0,0,e.width||0,e.height||0)}function Q(e){const t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function Z(e,t,n){const r=(0,a.isObject)(e)?e[t]:e;return null!=r?r:void 0!==n?n:0}function ee(e){return e<0?Math.ceil(-e):0}function te(e,t,n){var r,i,a,o,s,l,u,c,p,h,g,m=!n.nodirty,y=n.bounds===k?J:Q,v=H.set(0,0,0,0),b=Z(n.align,R),w=Z(n.align,D),x=Z(n.padding,R),E=Z(n.padding,D),S=n.columns||t.length,_=S<=0?1:Math.ceil(t.length/S),A=t.length,O=Array(A),N=Array(S),F=0,P=Array(A),M=Array(_),I=0,$=Array(A),L=Array(A),B=Array(A);for(i=0;i1)for(i=0;i0&&($[i]+=p/2);if(w&&Z(n.center,D)&&1!==S)for(i=0;i0&&(L[i]+=h/2);for(i=0;ii&&(e.warn("Grid headers exceed limit: "+i),t=t.slice(0,i)),_+=a,g=0,y=t.length;g=0&&null==(w=n[m]);m-=f);s?(x=null==p?w.x:Math.round(w.bounds.x1+p*w.bounds.width()),E=_):(x=_,E=null==p?w.y:Math.round(w.bounds.y1+p*w.bounds.height())),v.union(b.bounds.translate(x-(b.x||0),E-(b.y||0))),b.x=x,b.y=E,e.dirty(b),A=o(A,v[u])}return A}function ae(e,t,n,r,i,a){if(t){e.dirty(t);var o=n,s=n;r?o=Math.round(i.x1+a*i.width()):s=Math.round(i.y1+a*i.height()),t.bounds.translate(o-(t.x||0),s-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=o,t.y=s,e.dirty(t)}}function oe(e,t,n,r,i,a,p){const h=function(e,t){const n=e[t]||{};return(t,r)=>null!=n[t]?n[t]:null!=e[t]?e[t]:r}(n,t),g=function(e,t){let n=-1/0;return e.forEach((e=>{null!=e.offset&&(n=Math.max(n,e.offset))})),n>-1/0?n:t}(e,h("offset",0)),m=h("anchor",c),y=m===f?1:m===d?.5:0,v={align:T,bounds:h("bounds",k),columns:"vertical"===h("direction")?1:e.length,padding:h("margin",8),center:h("center"),nodirty:!0};switch(t){case s:v.anchor={x:Math.floor(r.x1)-g,column:f,y:y*(p||r.height()+2*r.y1),row:m};break;case l:v.anchor={x:Math.ceil(r.x2)+g,y:y*(p||r.height()+2*r.y1),row:m};break;case o:v.anchor={y:Math.floor(i.y1)-g,row:f,x:y*(a||i.width()+2*i.x1),column:m};break;case u:v.anchor={y:Math.ceil(i.y2)+g,x:y*(a||i.width()+2*i.x1),column:m};break;case"top-left":v.anchor={x:g,y:g};break;case"top-right":v.anchor={x:a-g,y:g,column:f};break;case"bottom-left":v.anchor={x:g,y:p-g,row:f};break;case"bottom-right":v.anchor={x:a-g,y:p-g,column:f,row:f}}return v}function se(e,t){var n,r,a=t.items[0],o=a.datum,c=a.orient,d=a.bounds,p=a.x,h=a.y;return a._bounds?a._bounds.clear().union(d):a._bounds=d.clone(),d.clear(),function(e,t,n){var r=t.padding,i=r-n.x,a=r-n.y;if(t.datum.title){var o=t.items[1].items[0],c=o.anchor,d=t.titlePadding||0,p=r-o.x,h=r-o.y;switch(o.orient){case s:i+=Math.ceil(o.bounds.width())+d;break;case l:case u:break;default:a+=o.bounds.height()+d}switch((i||a)&&ue(e,n,i,a),o.orient){case s:h+=le(t,n,o,c,1,1);break;case l:p+=le(t,n,o,f,0,0)+d,h+=le(t,n,o,c,1,1);break;case u:p+=le(t,n,o,c,0,0),h+=le(t,n,o,f,-1,0,1)+d;break;default:p+=le(t,n,o,c,0,0)}(p||h)&&ue(e,o,p,h),(p=Math.round(o.bounds.x1-r))<0&&(ue(e,n,-p,0),ue(e,o,-p,0))}else(i||a)&&ue(e,n,i,a)}(e,a,a.items[0].items[0]),d=function(e,t){return e.items.forEach((e=>t.union(e.bounds))),t.x1=e.padding,t.y1=e.padding,t}(a,d),n=2*a.padding,r=2*a.padding,d.empty()||(n=Math.ceil(d.width()+n),r=Math.ceil(d.height()+r)),"symbol"===o.type&&function(e){const t=e.reduce(((e,t)=>(e[t.column]=Math.max(t.bounds.x2-t.x,e[t.column]||0),e)),{});e.forEach((e=>{e.width=t[e.column],e.height=e.bounds.y2-e.y}))}(a.items[0].items[0].items[0].items),c!==A&&(a.x=p=0,a.y=h=0),a.width=n,a.height=r,(0,i.boundStroke)(d.set(p,h,p+n,h+r),a),a.mark.bounds.clear().union(d),a}function le(e,t,n,r,a,o,s){const l="symbol"!==e.datum.type,u=n.datum.vgrad,d=(!l||!o&&u||s?t:t.items[0]).bounds[a?"y2":"x2"]-e.padding,p=u&&o?d:0,h=u&&o?0:d,g=a<=0?0:(0,i.multiLineOffset)(n);return Math.round(r===c?p:r===f?h-g:.5*(d-g))}function ue(e,t,n,r){t.x+=n,t.y+=r,t.bounds.translate(n,r),t.mark.bounds.translate(n,r),e.dirty(t)}function ce(e){r.Transform.call(this,null,e)}(0,a.inherits)(ce,r.Transform,{transform(e,t){const n=t.dataflow;return e.mark.items.forEach((t=>{e.layout&&function(e,t,n){var r,i,a,o,s,l,u,c=function(e){var t,n,r=e.items,i=r.length,a=0;const o={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;a{(d=e.orient||l)!==A&&(t[d]||(t[d]=[])).push(e)}));for(const r in t){const i=t[r];te(e,i,oe(i,r,n.legends,N,F,R,D))}P.forEach((t=>{const r=t.bounds;if(r.equals(t._bounds)||(t.bounds=t._bounds,e.dirty(t),t.bounds=r,e.dirty(t)),!n.autosize||"fit"!==n.autosize.type&&n.autosize.type!==S&&n.autosize.type!==_)O.union(r);else switch(t.orient){case s:case l:O.add(r.x1,0).add(r.x2,0);break;case o:case u:O.add(0,r.y1).add(0,r.y2)}}))}O.union(N).union(F),r&&O.union(function(e,t,n,r,i){var a,d=t.items[0],h=d.frame,g=d.orient,m=d.anchor,y=d.offset,v=d.padding,b=d.items[0].items[0],w=d.items[1]&&d.items[1].items[0],x=g===s||g===l?r:n,E=0,S=0,_=0,A=0,C=0;if(h!==p?g===s?(E=i.y2,x=i.y1):g===l?(E=i.y1,x=i.y2):(E=i.x1,x=i.x2):g===s&&(E=r,x=0),a=m===c?E:m===f?x:(E+x)/2,w&&w.text){switch(g){case o:case u:C=b.bounds.height()+v;break;case s:A=b.bounds.width()+v;break;case l:A=-b.bounds.width()-v}H.clear().union(w.bounds),H.translate(A-(w.x||0),C-(w.y||0)),G(w,"x",A)|G(w,"y",C)&&(e.dirty(w),w.bounds.clear().union(H),w.mark.bounds.clear().union(H),e.dirty(w)),H.clear().union(w.bounds)}else H.clear();switch(H.union(b.bounds),g){case o:S=a,_=i.y1-H.height()-y;break;case s:S=i.x1-H.width()-y,_=a;break;case l:S=i.x2+H.width()+y,_=a;break;case u:S=a,_=i.y2+y;break;default:S=d.x,_=d.y}return G(d,"x",S)|G(d,"y",_)&&(H.translate(S,_),e.dirty(d),d.bounds.clear().union(H),t.bounds.clear().union(H),e.dirty(d)),d.bounds}(e,r,R,D,O)),t.clip&&O.set(0,0,t.width||0,t.height||0),function(e,t,n,r){const i=r.autosize||{},a=i.type;if(e._autosize<1||!a)return;let o=e._width,s=e._height,l=Math.max(0,t.width||0),u=Math.max(0,Math.ceil(-n.x1)),c=Math.max(0,t.height||0),d=Math.max(0,Math.ceil(-n.y1));const f=Math.max(0,Math.ceil(n.x2-l)),p=Math.max(0,Math.ceil(n.y2-c));if("padding"===i.contains){const t=e.padding();o-=t.left+t.right,s-=t.top+t.bottom}a===A?(u=0,d=0,l=o,c=s):"fit"===a?(l=Math.max(0,o-u-f),c=Math.max(0,s-d-p)):a===S?(l=Math.max(0,o-u-f),s=c+d+p):a===_?(o=l+u+f,c=Math.max(0,s-d-p)):"pad"===a&&(o=l+u+f,s=c+d+p),e._resizeView(o,s,l,c,[u,d],i.resize)}(e,t,O,n)}(n,t,e)})),(r=e.mark.group)&&"legend-entry"!==r.mark.role?t.reflow():t;var r}})},84752:(e,t,n)=>{"use strict";n.r(t),n.d(t,{View:()=>Q});var r=n(26372),i=n(24988),a=n(84636),o=n(61388),s=n(31926),l=n(96056),u=n(52456),c=n(40300);function d(e,t){e&&(null==t?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}const f="default";function p(e,t){const n=e.globalCursor()?"undefined"!=typeof document&&document.body:e.container();if(n)return null==t?n.style.removeProperty("cursor"):n.style.cursor=t}function h(e,t){var n=e._runtime.data;return(0,r.hasOwnProperty)(n,t)||(0,r.error)("Unrecognized data set: "+t),n[t]}function g(e,t){(0,i.isChangeSet)(t)||(0,r.error)("Second argument to changes must be a changeset.");const n=h(this,e);return n.modified=!0,this.pulse(n.input,t)}function m(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function y(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function v(e){var t=e.padding(),n=e._origin;return[t.left+n[0],t.top+n[1]]}const b="view",w={trap:!1};function x(e,t,n,i){e._eventListeners.push({type:n,sources:(0,r.array)(t),handler:i})}function E(e,t,n){const i=e._eventConfig&&e._eventConfig[t];return!(!1===i||(0,r.isObject)(i)&&!i[n])||(e.warn(`Blocked ${t} ${n} event listener.`),!1)}function S(e){return e.item}function _(e){return e.item.mark.source}function A(e){return function(t,n){return n.vega.view().changeset().encode(n.item,e)}}function C(e,t,n){const r=document.createElement(e);for(const e in t)r.setAttribute(e,t[e]);return null!=n&&(r.textContent=n),r}function T(e,t,n,r){const i=n.event||"input",a=()=>e.update(t.value);r.signal(n.signal,t.value),t.addEventListener(i,a),x(r,t,i,a),e.set=e=>{t.value=e,t.dispatchEvent(function(e){return"undefined"!=typeof Event?new Event(e):{type:e}}(i))}}function k(e,t,n,r){const i=r.signal(n.signal),a=C("div",{class:"vega-bind"}),o="radio"===n.input?a:a.appendChild(C("label"));o.appendChild(C("span",{class:"vega-bind-name"},n.name||n.signal)),t.appendChild(a);let s=R;switch(n.input){case"checkbox":s=D;break;case"select":s=O;break;case"radio":s=N;break;case"range":s=F}s(e,o,n,i)}function R(e,t,n,r){const i=C("input");for(const e in n)"signal"!==e&&"element"!==e&&i.setAttribute("input"===e?"type":e,n[e]);i.setAttribute("name",n.signal),i.value=r,t.appendChild(i),i.addEventListener("input",(()=>e.update(i.value))),e.elements=[i],e.set=e=>i.value=e}function D(e,t,n,r){const i={type:"checkbox",name:n.signal};r&&(i.checked=!0);const a=C("input",i);t.appendChild(a),a.addEventListener("change",(()=>e.update(a.checked))),e.elements=[a],e.set=e=>a.checked=!!e||null}function O(e,t,n,r){const i=C("select",{name:n.signal}),a=n.labels||[];n.options.forEach(((e,t)=>{const n={value:e};P(e,r)&&(n.selected=!0),i.appendChild(C("option",n,(a[t]||e)+""))})),t.appendChild(i),i.addEventListener("change",(()=>{e.update(n.options[i.selectedIndex])})),e.elements=[i],e.set=e=>{for(let t=0,r=n.options.length;t{const s={type:"radio",name:n.signal,value:t};P(t,r)&&(s.checked=!0);const l=C("input",s);l.addEventListener("change",(()=>e.update(t)));const u=C("label",{},(a[o]||t)+"");return u.prepend(l),i.appendChild(u),l})),e.set=t=>{const n=e.elements,r=n.length;for(let e=0;e{u.textContent=l.value,e.update(+l.value)};l.addEventListener("input",c),l.addEventListener("change",c),e.elements=[l],e.set=e=>{l.value=e,u.textContent=e}}function P(e,t){return e===t||e+""==t+""}function M(e,t,n,r,i,a){return(t=t||new r(e.loader())).initialize(n,m(e),y(e),v(e),i,a).background(e.background())}function I(e,t){return t?function(){try{t.apply(this,arguments)}catch(t){e.error(t)}}:null}function $(e,t,n){if("string"==typeof t){if("undefined"==typeof document)return e.error("DOM document instance not found."),null;if(!(t=document.querySelector(t)))return e.error("Signal bind element not found: "+t),null}if(t&&n)try{t.textContent=""}catch(n){t=null,e.error(n)}return t}const L=e=>+e||0;function B(e){return(0,r.isObject)(e)?{top:L(e.top),bottom:L(e.bottom),left:L(e.left),right:L(e.right)}:(e=>({top:e,bottom:e,left:e,right:e}))(L(e))}async function U(e,t,n,i){const o=(0,a.renderModule)(t),s=o&&o.headless;return s||(0,r.error)("Unrecognized renderer type: "+t),await e.runAsync(),M(e,null,null,s,n,i).renderAsync(e._scenegraph.root)}var z="width",q="height",j="padding",H={skip:!0};function G(e,t){var n=e.autosize(),r=e.padding();return t-(n&&n.contains===j?r.left+r.right:0)}function V(e,t){var n=e.autosize(),r=e.padding();return t-(n&&n.contains===j?r.top+r.bottom:0)}function W(e,t){return t.modified&&(0,r.isArray)(t.input.value)&&!e.startsWith("_:vega:_")}function Y(e,t){return!("parent"===e||t instanceof i.transforms.proxy)}function X(e,t,n,i){const a=e.element();a&&a.setAttribute("title",function(e){return null==e?"":(0,r.isArray)(e)?K(e):(0,r.isObject)(e)&&!(0,r.isDate)(e)?(t=e,Object.keys(t).map((e=>{const n=t[e];return e+": "+((0,r.isArray)(n)?K(n):J(n))})).join("\n")):e+"";var t}(i))}function K(e){return"["+e.map(J).join(", ")+"]"}function J(e){return(0,r.isArray)(e)?"[…]":(0,r.isObject)(e)&&!(0,r.isDate)(e)?"{…}":e}function Q(e,t){const n=this;if(t=t||{},i.Dataflow.call(n),t.loader&&n.loader(t.loader),t.logger&&n.logger(t.logger),null!=t.logLevel&&n.logLevel(t.logLevel),t.locale||e.locale){const i=(0,r.extend)({},e.locale,t.locale);n.locale((0,c.locale)(i.number,i.time))}n._el=null,n._elBind=null,n._renderType=t.renderer||a.RenderType.Canvas,n._scenegraph=new a.Scenegraph;const o=n._scenegraph.root;n._renderer=null,n._tooltip=t.tooltip||X,n._redraw=!0,n._handler=(new a.CanvasHandler).scene(o),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=function(e){const t=(0,r.extend)({defaults:{}},e),n=(e,t)=>{t.forEach((t=>{(0,r.isArray)(e[t])&&(e[t]=(0,r.toSet)(e[t]))}))};return n(t.defaults,["prevent","allow"]),n(t,["view","window","selector"]),t}(e.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const u=function(e,t,n){return(0,l.context)(e,i.transforms,s.functionContext,n).parse(t)}(n,e,t.expr);n._runtime=u,n._signals=u.signals,n._bind=(e.bindings||[]).map((e=>({state:null,param:(0,r.extend)({},e)}))),u.root&&u.root.set(o),o.source=u.data.root.input,n.pulse(u.data.root.input,n.changeset().insert(o.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=G(n,n._width),n._viewHeight=V(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,function(e){var t=e._signals,n=t[z],r=t[q],i=t[j];function a(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,(t=>{e._width=t.size,e._viewWidth=G(e,t.size),a()}),{size:n}),e._resizeHeight=e.add(null,(t=>{e._height=t.size,e._viewHeight=V(e,t.size),a()}),{size:r});const o=e.add(null,a,{pad:i});e._resizeWidth.rank=n.rank+1,e._resizeHeight.rank=r.rank+1,o.rank=i.rank+1}(n),function(e){e.add(null,(t=>(e._background=t.bg,e._resize=1,t.bg)),{bg:e._signals.background})}(n),function(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:f,item:null}));e.on(e.events("view","pointermove"),t,((e,n)=>{const i=t.value,a=i?(0,r.isString)(i)?i:i.user:f,o=n.item&&n.item.cursor||null;return i&&a===i.user&&o==i.item?i:{user:a,item:o}})),e.add(null,(function(t){let n=t.cursor,i=this.value;return(0,r.isString)(n)||(i=n.item,n=n.user),p(e,n&&n!==f?n:i||n),i}),{cursor:t})}(n),n.description(e.description),t.hover&&n.hover(),t.container&&n.initialize(t.container,t.bind),t.watchPixelRatio&&n._watchPixelRatio()}function Z(e,t){return(0,r.hasOwnProperty)(e._signals,t)?e._signals[t]:(0,r.error)("Unrecognized signal name: "+(0,r.stringValue)(t))}function ee(e,t){const n=(e._targets||[]).filter((e=>e._update&&e._update.handler===t));return n.length?n[0]:null}function te(e,t,n,r){let i=ee(n,r);return i||(i=I(e,(()=>r(t,n.value))),i.handler=r,e.on(n,null,i)),e}function ne(e,t,n){const r=ee(t,n);return r&&t._targets.remove(r),e}(0,r.inherits)(Q,i.Dataflow,{async evaluate(e,t,n){if(await i.Dataflow.prototype.evaluate.call(this,e,t),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,a=v(r=this),o=m(r),s=y(r),r._renderer.background(r.background()),r._renderer.resize(o,s,a),r._handler.origin(a),r._resizeListeners.forEach((e=>{try{e(o,s)}catch(e){r.error(e)}}))),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(e){this.error(e)}var r,a,o,s;return n&&(0,i.asyncCallback)(this,n),this},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=null!=e?e+"":null;return t!==this._desc&&d(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,n){const r=Z(this,e);return 1===arguments.length?r.value:this.update(r,t,n)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",B(e)):B(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?((0,a.renderModule)(e)||(0,r.error)("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(i.Dataflow.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(Z(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function(e,t,n,r,i,a){this.runAfter((o=>{let s=0;o._autosize=0,o.width()!==n&&(s=1,o.signal(z,n,H),o._resizeWidth.skip(!0)),o.height()!==r&&(s=1,o.signal(q,r,H),o._resizeHeight.skip(!0)),o._viewWidth!==e&&(o._resize=1,o._viewWidth=e),o._viewHeight!==t&&(o._resize=1,o._viewHeight=t),o._origin[0]===i[0]&&o._origin[1]===i[1]||(o._resize=1,o._origin=i),s&&o.run("enter"),a&&o.runAfter((e=>e.resize()))}),!1,1)},addEventListener(e,t,n){let r=t;return n&&!1===n.trap||(r=I(this,t),r.raw=t),this._handler.on(e,r),this},removeEventListener(e,t){for(var n,r,i=this._handler.handlers(e),a=i.length;--a>=0;)if(r=i[a].type,n=i[a].handler,e===r&&(t===n||t===n.raw)){this._handler.off(r,n);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.includes(e)||t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},addSignalListener(e,t){return te(this,e,Z(this,e),t)},removeSignalListener(e,t){return ne(this,Z(this,e),t)},addDataListener(e,t){return te(this,e,h(this,e).values,t)},removeDataListener(e,t){return ne(this,h(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=p(this,null);this._globalCursor=!!e,t&&p(this,t)}return this}return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:function(e,t){this._timers.push((0,u.interval)((function(t){e({timestamp:Date.now(),elapsed:t})}),t))},events:function(e,t,n){var o,s=this,l=new i.EventStream(n),u=function(n,i){s.runAsync(null,(()=>{e===b&&function(e,t){var n=e._eventConfig.defaults,r=n.prevent,i=n.allow;return!1!==r&&!0!==i&&(!0===r||!1===i||(r?r[t]:i?!i[t]:e.preventDefault()))}(s,t)&&n.preventDefault(),l.receive(function(e,t,n){var i,o,s,l=e._renderer,u=l&&l.canvas();return u&&(s=v(e),o=t.changedTouches?t.changedTouches[0]:t,(i=(0,a.point)(o,u))[0]-=s[0],i[1]-=s[1]),t.dataflow=e,t.item=n,t.vega=function(e,t,n){const i=t?"group"===t.mark.marktype?t:t.mark.group:null;function a(e){var n,r=i;if(e)for(n=t;n;n=n.mark.group)if(n.mark.name===e){r=n;break}return r&&r.mark&&r.mark.interactive?r:{}}function o(e){if(!e)return n;(0,r.isString)(e)&&(e=a(e));const t=n.slice();for(;e;)t[0]-=e.x||0,t[1]-=e.y||0,e=e.mark&&e.mark.group;return t}return{view:(0,r.constant)(e),item:(0,r.constant)(t||{}),group:a,xy:o,x:e=>o(e)[0],y:e=>o(e)[1]}}(e,n,i),t}(s,n,i))}))};if("timer"===e)E(s,"timer",t)&&s.timer(u,t);else if(e===b)E(s,"view",t)&&s.addEventListener(t,u,w);else if("window"===e?E(s,"window",t)&&"undefined"!=typeof window&&(o=[window]):"undefined"!=typeof document&&E(s,"selector",t)&&(o=Array.from(document.querySelectorAll(e))),o){for(var c=0,d=o.length;c=0;)o[e].stop();for(e=l.length;--e>=0;)for(t=(n=l[e]).sources.length;--t>=0;)n.sources[t].removeEventListener(n.type,n.handler);for(a&&a.call(this,this._handler,null,null,null),e=s.length;--e>=0;)i=s[e].type,r=s[e].handler,this._handler.off(i,r);return this},hover:function(e,t){return t=[t||"update",(e=[e||"hover"])[0]],this.on(this.events("view","pointerover",S),_,A(e)),this.on(this.events("view","pointerout",S),_,A(t)),this},data:function(e,t){return arguments.length<2?h(this,e).values.value:g.call(this,e,(0,i.changeset)().remove(r.truthy).insert(t))},change:g,insert:function(e,t){return g.call(this,e,(0,i.changeset)().insert(t))},remove:function(e,t){return g.call(this,e,(0,i.changeset)().remove(t))},scale:function(e){var t=this._runtime.scales;return(0,r.hasOwnProperty)(t,e)||(0,r.error)("Unrecognized scale or projection: "+e),t[e].value},initialize:function(e,t){const n=this,i=n._renderType,o=n._eventConfig.bind,s=(0,a.renderModule)(i);e=n._el=e?$(n,e,!0):null,function(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),d(t,e.description()))}(n),s||n.error("Unrecognized renderer type: "+i);const l=s.handler||a.CanvasHandler,u=e?s.renderer:s.headless;return n._renderer=u?M(n,n._renderer,e,u):null,n._handler=function(e,t,n,r){const i=new r(e.loader(),I(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,v(e),e);return t&&t.handlers().forEach((e=>{i.on(e.type,e.handler)})),i}(n,n._handler,e,l),n._redraw=!0,e&&"none"!==o&&(t=t?n._elBind=$(n,t,!0):e.appendChild(C("form",{class:"vega-bindings"})),n._bind.forEach((e=>{e.param.element&&"container"!==o&&(e.element=$(n,e.param.element,!!e.param.input))})),n._bind.forEach((e=>{!function(e,t,n){if(!t)return;const i=n.param;let a=n.state;a||(a=n.state={elements:null,active:!1,set:null,update:t=>{t!=e.signal(i.signal)&&e.runAsync(null,(()=>{a.source=!0,e.signal(i.signal,t)}))}},i.debounce&&(a.update=(0,r.debounce)(i.debounce,a.update))),(null==i.input&&i.element?T:k)(a,t,i,e),a.active||(e.on(e._signals[i.signal],null,(()=>{a.source?a.source=!1:a.set(e.signal(i.signal))})),a.active=!0)}(n,e.element||t,e)}))),n},toImageURL:async function(e,t){e!==a.RenderType.Canvas&&e!==a.RenderType.SVG&&e!==a.RenderType.PNG&&(0,r.error)("Unrecognized image type: "+e);const n=await U(this,e,t);return e===a.RenderType.SVG?function(e){const t=new Blob([e],{type:"image/svg+xml"});return window.URL.createObjectURL(t)}(n.svg()):n.canvas().toDataURL("image/png")},toCanvas:async function(e,t){return(await U(this,a.RenderType.Canvas,e,t)).canvas()},toSVG:async function(e){return(await U(this,a.RenderType.SVG,e)).svg()},getState:function(e){return this._runtime.getState(e||{data:W,signals:Y,recurse:!0})},setState:function(e){return this.runAsync(null,(t=>{t._trigger=!1,t._runtime.setState(e)}),(e=>{e._trigger=!0})),this},_watchPixelRatio:function(){if("canvas"===this.renderer()&&this._renderer._canvas){let e=null;const t=()=>{null!=e&&e();const n=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);n.addEventListener("change",t),e=()=>{n.removeEventListener("change",t)},this._renderer._canvas.getContext("2d").pixelRatio=window.devicePixelRatio||1,this._redraw=!0,this._resize=1,this.resize().runAsync()};t()}}})},3548:(e,t,n)=>{"use strict";n.r(t),n.d(t,{voronoi:()=>o});var r=n(24988),i=n(26372),a=n(12008);function o(e){r.Transform.call(this,null,e)}o.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};const s=[-1e5,-1e5,1e5,1e5];function l(e){const t=e[0][0],n=e[0][1];let r=e.length-1;for(;e[r][0]===t&&e[r][1]===n;--r);return"M"+e.slice(0,r+1).join("L")+"Z"}(0,i.inherits)(o,r.Transform,{transform(e,t){const n=e.as||"path",r=t.source;if(!r||!r.length)return t;let i=e.size;i=i?[0,0,i[0],i[1]]:(i=e.extent)?[i[0][0],i[0][1],i[1][0],i[1][1]]:s;const o=this.value=a.Delaunay.from(r,e.x,e.y).voronoi(i);for(let e=0,t=r.length;e{"use strict";n.r(t),n.d(t,{wordcloud:()=>b});var r=n(14958),i=n(24988),a=n(26372),o=n(14588),s=n(48872),l=Math.PI/180,u=64,c=2048;function d(e,t,n,r){if(!t.sprite){var i=e.context,a=e.ratio;i.clearRect(0,0,(u<<5)/a,c/a);var o,s,d,f,p,h=0,g=0,m=0,y=n.length;for(--r;++r>5<<5,d=~~Math.max(Math.abs(x+E),Math.abs(x-E))}else o=o+31>>5<<5;if(d>m&&(m=d),h+o>=u<<5&&(h=0,g+=m,m=0),g+d>=c)break;i.translate((h+(o>>1))/a,(g+(d>>1))/a),t.rotate&&i.rotate(t.rotate*l),i.fillText(t.text,0,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,0,0)),i.restore(),t.width=o,t.height=d,t.xoff=h,t.yoff=g,t.x1=o>>1,t.y1=d>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,h+=o}for(var _=i.getImageData(0,0,(u<<5)/a,c/a).data,A=[];--r>=0;)if((t=n[r]).hasText){for(s=(o=t.width)>>5,d=t.y1-t.y0,f=0;f>5),R=_[(g+p)*(u<<5)+(h+f)<<2]?1<<31-f%32:0;A[k]|=R,C|=R}C?T=p:(t.y0++,d--,p--,g++)}t.y1=t.y0+T,t.sprite=A.slice(0,(t.y1-t.y0)*s)}}}function f(e,t,n){n>>=5;for(var r,i=e.sprite,a=e.width>>5,o=e.x-(a<<4),s=127&o,l=32-s,u=e.y1-e.y0,c=(e.y+e.y0)*n+(o>>5),d=0;d>>s:0))&t[c+f])return!0;c+=n}return!1}function p(e,t){var n=e[0],r=e[1];t.x+t.x0r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function h(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function g(e){return"function"==typeof e?e:function(){return e}}var m={archimedean:h,rectangular:function(e){var t=4*e[0]/e[1],n=0,r=0;return function(e){var i=e<0?-1:1;switch(Math.sqrt(1+4*i*e)-i&3){case 0:n+=t;break;case 1:r+=4;break;case 2:n-=t;break;default:r-=4}return[n,r]}}};const y=["x","y","font","fontSize","fontStyle","fontWeight","angle"],v=["text","font","rotate","fontSize","fontStyle","fontWeight"];function b(e){i.Transform.call(this,function(){var e,t,n,i,a,o,s,l=[256,256],y=h,v=[],b=Math.random,w={};function x(e,t,n){for(var r,i,a,o,s,u=t.x,c=t.y,d=Math.hypot(l[0],l[1]),p=y(l),h=b()<.5?1:-1,g=-h;(r=p(g+=h))&&(i=~~r[0],a=~~r[1],!(Math.min(Math.abs(i),Math.abs(a))>=d));)if(t.x=u+i,t.y=c+a,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>l[0]||t.y+t.y1>l[1]||n&&f(t,e,l[0])||n&&(s=n,!((o=t).x+o.x1>s[0].x&&o.x+o.x0s[0].y&&o.y+o.y0>5,x=l[0]>>5,E=t.x-(w<<4),S=127&E,_=32-S,A=t.y1-t.y0,C=(t.y+t.y0)*x+(E>>5),T=0;T>>S:0);C+=x}return t.sprite=null,!0}return!1}return w.layout=function(){for(var f=function(e){e.width=e.height=1;var t=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2);e.width=(u<<5)/t,e.height=c/t;var n=e.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:t}}((0,r.canvas)()),h=function(e){for(var t=[],n=-1;++n>5)*l[1]),g=null,m=v.length,y=-1,w=[],E=v.map((r=>({text:e(r),font:t(r),style:i(r),weight:a(r),rotate:o(r),size:~~(n(r)+1e-14),padding:s(r),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:r}))).sort(((e,t)=>t.size-e.size));++y>1,S.y=l[1]*(b()+.5)>>1,d(f,S,E,y),S.hasText&&x(h,S,g)&&(w.push(S),g?p(g,S):g=[{x:S.x+S.x0,y:S.y+S.y0},{x:S.x+S.x1,y:S.y+S.y1}],S.x-=l[0]>>1,S.y-=l[1]>>1)}return w},w.words=function(e){return arguments.length?(v=e,w):v},w.size=function(e){return arguments.length?(l=[+e[0],+e[1]],w):l},w.font=function(e){return arguments.length?(t=g(e),w):t},w.fontStyle=function(e){return arguments.length?(i=g(e),w):i},w.fontWeight=function(e){return arguments.length?(a=g(e),w):a},w.rotate=function(e){return arguments.length?(o=g(e),w):o},w.text=function(t){return arguments.length?(e=g(t),w):e},w.spiral=function(e){return arguments.length?(y=m[e]||e,w):y},w.fontSize=function(e){return arguments.length?(n=g(e),w):n},w.padding=function(e){return arguments.length?(s=g(e),w):s},w.random=function(e){return arguments.length?(b=e,w):b},w}(),e)}b.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:y}]},(0,a.inherits)(b,i.Transform,{transform(e,t){!e.size||e.size[0]&&e.size[1]||(0,a.error)("Wordcloud size dimensions must be non-zero.");const n=e.modified();if(!(n||t.changed(t.ADD_REM)||v.some((function(n){const r=e[n];return(0,a.isFunction)(r)&&t.modified(r.fields)}))))return;const r=t.materialize(t.SOURCE).source,i=this.value,l=e.as||y;let u,c=e.fontSize||14;if((0,a.isFunction)(c)?u=e.fontSizeRange:c=(0,a.constant)(c),u){const e=c,t=(0,o.scale)("sqrt")().domain((0,a.extent)(r,e)).range(u);c=n=>t(e(n))}r.forEach((e=>{e[l[0]]=NaN,e[l[1]]=NaN,e[l[3]]=0}));const d=i.words(r).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(c).random(s.random).layout(),f=i.size(),p=f[0]>>1,h=f[1]>>1,g=d.length;for(let e,t,n=0;n{"use strict";n.r(t),n.d(t,{Bounds:()=>b.Bounds,CanvasHandler:()=>b.CanvasHandler,CanvasRenderer:()=>b.CanvasRenderer,DATE:()=>y.DATE,DAY:()=>y.DAY,DAYOFYEAR:()=>y.DAYOFYEAR,Dataflow:()=>i.Dataflow,Debug:()=>r.Debug,Error:()=>r.Error,EventStream:()=>i.EventStream,Gradient:()=>b.Gradient,GroupItem:()=>b.GroupItem,HOURS:()=>y.HOURS,Handler:()=>b.Handler,HybridHandler:()=>b.HybridHandler,HybridRenderer:()=>b.HybridRenderer,Info:()=>r.Info,Item:()=>b.Item,MILLISECONDS:()=>y.MILLISECONDS,MINUTES:()=>y.MINUTES,MONTH:()=>y.MONTH,Marks:()=>b.Marks,MultiPulse:()=>i.MultiPulse,None:()=>r.None,Operator:()=>i.Operator,Parameters:()=>i.Parameters,Pulse:()=>i.Pulse,QUARTER:()=>y.QUARTER,RenderType:()=>b.RenderType,Renderer:()=>b.Renderer,ResourceLoader:()=>b.ResourceLoader,SECONDS:()=>y.SECONDS,SVGHandler:()=>b.SVGHandler,SVGRenderer:()=>b.SVGRenderer,SVGStringRenderer:()=>b.SVGStringRenderer,Scenegraph:()=>b.Scenegraph,TIME_UNITS:()=>y.TIME_UNITS,Transform:()=>i.Transform,View:()=>E.View,WEEK:()=>y.WEEK,Warn:()=>r.Warn,YEAR:()=>y.YEAR,accessor:()=>r.accessor,accessorFields:()=>r.accessorFields,accessorName:()=>r.accessorName,array:()=>r.array,ascending:()=>r.ascending,bandwidthNRD:()=>m.bandwidthNRD,bin:()=>m.bin,bootstrapCI:()=>m.bootstrapCI,boundClip:()=>b.boundClip,boundContext:()=>b.boundContext,boundItem:()=>b.boundItem,boundMark:()=>b.boundMark,boundStroke:()=>b.boundStroke,changeset:()=>i.changeset,clampRange:()=>r.clampRange,codegenExpression:()=>T.codegenExpression,compare:()=>r.compare,constant:()=>r.constant,cumulativeLogNormal:()=>m.cumulativeLogNormal,cumulativeNormal:()=>m.cumulativeNormal,cumulativeUniform:()=>m.cumulativeUniform,dayofyear:()=>y.dayofyear,debounce:()=>r.debounce,defaultLocale:()=>S.defaultLocale,definition:()=>i.definition,densityLogNormal:()=>m.densityLogNormal,densityNormal:()=>m.densityNormal,densityUniform:()=>m.densityUniform,domChild:()=>b.domChild,domClear:()=>b.domClear,domCreate:()=>b.domCreate,domFind:()=>b.domFind,dotbin:()=>m.dotbin,error:()=>r.error,expressionFunction:()=>_.expressionFunction,extend:()=>r.extend,extent:()=>r.extent,extentIndex:()=>r.extentIndex,falsy:()=>r.falsy,fastmap:()=>r.fastmap,field:()=>r.field,flush:()=>r.flush,font:()=>b.font,fontFamily:()=>b.fontFamily,fontSize:()=>b.fontSize,format:()=>v.format,formatLocale:()=>S.numberFormatDefaultLocale,formats:()=>v.formats,hasOwnProperty:()=>r.hasOwnProperty,id:()=>r.id,identity:()=>r.identity,inferType:()=>v.inferType,inferTypes:()=>v.inferTypes,ingest:()=>i.ingest,inherits:()=>r.inherits,inrange:()=>r.inrange,interpolate:()=>w.interpolate,interpolateColors:()=>w.interpolateColors,interpolateRange:()=>w.interpolateRange,intersect:()=>b.intersect,intersectBoxLine:()=>b.intersectBoxLine,intersectPath:()=>b.intersectPath,intersectPoint:()=>b.intersectPoint,intersectRule:()=>b.intersectRule,isArray:()=>r.isArray,isBoolean:()=>r.isBoolean,isDate:()=>r.isDate,isFunction:()=>r.isFunction,isIterable:()=>r.isIterable,isNumber:()=>r.isNumber,isObject:()=>r.isObject,isRegExp:()=>r.isRegExp,isString:()=>r.isString,isTuple:()=>i.isTuple,key:()=>r.key,lerp:()=>r.lerp,lineHeight:()=>b.lineHeight,loader:()=>v.loader,locale:()=>S.locale,logger:()=>r.logger,lruCache:()=>r.lruCache,markup:()=>b.markup,merge:()=>r.merge,mergeConfig:()=>r.mergeConfig,multiLineOffset:()=>b.multiLineOffset,one:()=>r.one,pad:()=>r.pad,panLinear:()=>r.panLinear,panLog:()=>r.panLog,panPow:()=>r.panPow,panSymlog:()=>r.panSymlog,parse:()=>A.parse,parseExpression:()=>T.parseExpression,parseSelector:()=>k.parseSelector,path:()=>b.path,pathCurves:()=>b.pathCurves,pathEqual:()=>b.pathEqual,pathParse:()=>b.pathParse,pathRectangle:()=>b.pathRectangle,pathRender:()=>b.pathRender,pathSymbols:()=>b.pathSymbols,pathTrail:()=>b.pathTrail,peek:()=>r.peek,point:()=>b.point,projection:()=>x.projection,quantileLogNormal:()=>m.quantileLogNormal,quantileNormal:()=>m.quantileNormal,quantileUniform:()=>m.quantileUniform,quantiles:()=>m.quantiles,quantizeInterpolator:()=>w.quantizeInterpolator,quarter:()=>r.quarter,quartiles:()=>m.quartiles,random:()=>m.random,randomInteger:()=>m.randomInteger,randomKDE:()=>m.randomKDE,randomLCG:()=>m.randomLCG,randomLogNormal:()=>m.randomLogNormal,randomMixture:()=>m.randomMixture,randomNormal:()=>m.randomNormal,randomUniform:()=>m.randomUniform,read:()=>v.read,regressionConstant:()=>m.regressionConstant,regressionExp:()=>m.regressionExp,regressionLinear:()=>m.regressionLinear,regressionLoess:()=>m.regressionLoess,regressionLog:()=>m.regressionLog,regressionPoly:()=>m.regressionPoly,regressionPow:()=>m.regressionPow,regressionQuad:()=>m.regressionQuad,renderModule:()=>b.renderModule,repeat:()=>r.repeat,resetDefaultLocale:()=>S.resetDefaultLocale,resetSVGClipId:()=>b.resetSVGClipId,resetSVGDefIds:()=>b.resetSVGDefIds,responseType:()=>v.responseType,runtimeContext:()=>C.context,sampleCurve:()=>m.sampleCurve,sampleLogNormal:()=>m.sampleLogNormal,sampleNormal:()=>m.sampleNormal,sampleUniform:()=>m.sampleUniform,scale:()=>w.scale,sceneEqual:()=>b.sceneEqual,sceneFromJSON:()=>b.sceneFromJSON,scenePickVisit:()=>b.scenePickVisit,sceneToJSON:()=>b.sceneToJSON,sceneVisit:()=>b.sceneVisit,sceneZOrder:()=>b.sceneZOrder,scheme:()=>w.scheme,serializeXML:()=>b.serializeXML,setHybridRendererOptions:()=>b.setHybridRendererOptions,setRandom:()=>m.setRandom,span:()=>r.span,splitAccessPath:()=>r.splitAccessPath,stringValue:()=>r.stringValue,textMetrics:()=>b.textMetrics,timeBin:()=>y.timeBin,timeFloor:()=>y.timeFloor,timeFormatLocale:()=>S.timeFormatDefaultLocale,timeInterval:()=>y.timeInterval,timeOffset:()=>y.timeOffset,timeSequence:()=>y.timeSequence,timeUnitSpecifier:()=>y.timeUnitSpecifier,timeUnits:()=>y.timeUnits,toBoolean:()=>r.toBoolean,toDate:()=>r.toDate,toNumber:()=>r.toNumber,toSet:()=>r.toSet,toString:()=>r.toString,transform:()=>i.transform,transforms:()=>i.transforms,truncate:()=>r.truncate,truthy:()=>r.truthy,tupleid:()=>i.tupleid,typeParsers:()=>v.typeParsers,utcFloor:()=>y.utcFloor,utcInterval:()=>y.utcInterval,utcOffset:()=>y.utcOffset,utcSequence:()=>y.utcSequence,utcdayofyear:()=>y.utcdayofyear,utcquarter:()=>r.utcquarter,utcweek:()=>y.utcweek,version:()=>R,visitArray:()=>r.visitArray,week:()=>y.week,writeConfig:()=>r.writeConfig,zero:()=>r.zero,zoomLinear:()=>r.zoomLinear,zoomLog:()=>r.zoomLog,zoomPow:()=>r.zoomPow,zoomSymlog:()=>r.zoomSymlog});var r=n(26372),i=n(24988),a=n(28740),o=n(64322),s=n(73784),l=n(35886),u=n(65294),c=n(91434),d=n(43308),f=n(62804),p=n(3548),h=n(36634),g=n(37788),m=n(48872),y=n(71652),v=n(83418),b=n(84636),w=n(14588),x=n(63316),E=n(84752),S=n(40300),_=n(31926),A=n(36808),C=n(96056),T=n(21720),k=n(45948),R="5.30.0";(0,r.extend)(i.transforms,a,o,s,l,u,d,c,f,p,h,g)},18047:(e,t,n)=>{"use strict";async function r(e,t,n){try{const r=await fetch(`http://${e}:${t}/api/tags`);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const i=(await r.json()).models.map((e=>e.name));return 0===i.length&&n(),i}catch(e){return console.error("Error fetching model names:",e),n(),[]}}async function i(e,t,n,r){const i=`http://${n}:${r}/api/chat`,a={"Content-Type":"application/json"},o=JSON.stringify({model:t,messages:[{role:"system",content:"You are an expert code assistant who only responds in Python code."},{role:"user",content:e}],stream:!1,temperature:.3,frequency_penalty:0,presence_penalty:0,user:"scalene-user"});console.log(o);let s=!1,l="",u=0;for(;!s;){if(u>=3)return{};try{const e=await fetch(i,{method:"POST",headers:a,body:o});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=(await e.text()).split("\n");for(const e of t){const t=JSON.parse(e);if(t.message&&t.message.content&&(l+=t.message.content),t.done){s=!0;break}}}catch(e){console.log(`Error: ${e}`),u++}}console.log(l);try{return l}catch{return"# Query failed. See JavaScript console (in Chrome: View > Developer > JavaScript Console) for more info.\n"}}n.r(t),n.d(t,{fetchModelNames:()=>r,sendPromptToOllama:()=>i})},54699:(e,t,n)=>{"use strict";async function r(e){const t=await async function(e){return await fetch("https://api.openai.com/v1/completions",{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}})}(e),n=await t.json();return!n.error||!(n.error.code in{invalid_api_key:!0,invalid_request_error:!0,model_not_found:!0,insufficient_quota:!0})}function i(e){(async()=>{try{window.localStorage.setItem("scalene-api-key",e)}catch{}if(0===e.length)return void(document.getElementById("valid-api-key").innerHTML="");const t=await r(e);document.getElementById("valid-api-key").innerHTML=t?"✓":"✕"})()}async function a(e,t){const n=document.getElementById("language-model-openai").value,r=JSON.stringify({model:n,messages:[{role:"system",content:"You are a Python programming assistant who ONLY responds with blocks of commented, optimized code. You never respond with text. Just code, starting with ``` and ending with ```."},{role:"user",content:e}],user:"scalene-user"});console.log(r);const i=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:r}),a=await i.json();if(a.error&&a.error.code in{invalid_request_error:!0,model_not_found:!0,insufficient_quota:!0})return"model_not_found"===a.error.code&&"gpt-4"===n?alert("You either need to add funds to your OpenAI account to use this feature, or you need to switch to GPT-3.5 if you are using free credits."):alert("You need to add funds to your OpenAI account to use this feature."),"";try{console.log(`Debugging info: Retrieved ${JSON.stringify(a.choices[0],null,4)}`)}catch{console.log(`Debugging info: Failed to retrieve data.choices from the server. data = ${JSON.stringify(a)}`)}try{return a.choices[0].message.content.replace(/^\s*[\r\n]/gm,"")}catch{return"# Query failed. See JavaScript console (in Chrome: View > Developer > JavaScript Console) for more info.\n"}}n.r(t),n.d(t,{checkApiKey:()=>i,isValidApiKey:()=>r,sendPromptToOpenAI:()=>a})},77439:(e,t,n)=>{"use strict";n.r(t),n.d(t,{optimizeCode:()=>c,proposeOptimization:()=>d});var r=n(54699),i=n(18047),a=n(90217),o=n(26026),s=n(12672),l=n(43270);function u(e){if(!e)return e;const t=e.split("\n");let n=0;for(;n0&&!t.includes(" ")?e.slice(r.length):e}else i=e;const a=i.indexOf("```");return-1!==a&&(i=i.slice(0,a)),i}async function c(e,t,n,s){const l=document.getElementById("use-gpu-checkbox").checked;let c=["sklearn"];l?c.push("cupy"):c.push("numpy");const d=document.getElementById("accelerator-name").innerHTML||"GPU",f=function(e,t,n,r=[],i=!1,a="GPU"){const o=[...new Set(["NumPy","Scikit-learn","Pandas","TensorFlow","PyTorch",...r])];let s=["Optimize the following Python code to make it more efficient WITHOUT CHANGING ITS RESULTS.\n\n",e.trim(),"\n# Start of code\n",t.trim(),"\n# End of code\n\n","Rewrite the above Python code from 'Start of code' to 'End of code', aiming for clear and simple optimizations. ","Your output should consist only of valid Python code, with brief explanatory comments prefaced with #. ","Include a detailed explanatory comment before the code, starting with '# Proposed optimization:'. ",`Leverage high-performance native libraries, especially those utilizing ${a}, for significant performance improvements. `,"Consider using the following other libraries, if appropriate:\n",o.map((e=>" import "+e)).join("\n")+"\n","Eliminate as many for loops, while loops, and list or dict comprehensions as possible, replacing them with vectorized equivalents. ","Quantify the expected speedup in terms of orders of magnitude if possible. ","Fix any errors in the optimized code. "];i&&s.push(`Use ${a}-accelerated libraries whenever it would substantially increase performance. `),s.push("Consider the following insights gathered from the Scalene profiler for optimization:\n");const l=n.n_cpu_percent_python+n.n_cpu_percent_c+n.n_sys_percent;return s.push(`- CPU time: percent spent in the Python interpreter: ${(100*n.n_cpu_percent_python/l).toFixed(2)}%\n`),s.push(`- CPU time: percent spent executing native code: ${(100*n.n_cpu_percent_c/l).toFixed(2)}%\n`),s.push(`- CPU time: percent of system time: ${(100*n.n_sys_percent/l).toFixed(2)}%\n`),s.push(`- Core utilization: ${(100*n.n_core_utilization/l).toFixed(2)}%\n`),s.push(`- Peak memory usage: ${n.n_peak_mb.toFixed(0)}MB (${(100*n.n_python_fraction).toFixed(2)}% Python memory)\n`),n.n_copy_mb_s>1&&s.push(`- Megabytes copied per second by memcpy/strcpy: ${n.n_copy_mb_s.toFixed(2)}\n`),i&&s.push(`- GPU percent utilization: ${(100*n.n_gpu_percent).toFixed(2)}%\n`),s.push("Optimized code:"),s.join("")}(s,t,n,c,l,d),p=l?` or ${d}-optimizations `:" ";let h="",g=document.getElementById("service-select").value;if("openai"===g?h=document.getElementById("api-key").value:"azure-openai"===g&&(h=document.getElementById("azure-api-key").value),("openai"===g||"azure-openai"===g)&&!h)return alert("To activate proposed optimizations, enter an OpenAI API key in AI optimization options."),document.getElementById("ai-optimization-options").open=!0,"";let m=" ";t.split("\n").length<=2&&(m=" line of ");let y="import sklearn";y+=l?"\nimport cupy":"\nimport numpy as np";const v=`Optimize the following${m}Python code:\n\n${s}\n\n# Start of code\n\n${t}\n\n# End of code\n\nRewrite the above Python code only from "Start of code" to "End of code", to make it more efficient WITHOUT CHANGING ITS RESULTS. Assume the code has already executed all these imports; do NOT include them in the optimized code:\n\n${e}\n\nUse native libraries if that would make it faster than pure Python. Consider using the following other libraries, if appropriate:\n\n${y}\n\nYour output should only consist of valid Python code. Output the resulting Python with brief explanations only included as comments prefaced with #. Include a detailed explanatory comment before the code, starting with the text "# Proposed optimization:". Make the code as clear and simple as possible, while also making it as fast and memory-efficient as possible. Use vectorized operations${p}whenever it would substantially increase performance, and quantify the speedup in terms of orders of magnitude. Eliminate as many for loops, while loops, and list or dict comprehensions as possible, replacing them with vectorized equivalents. If the performance is not likely to increase, leave the code unchanged. Fix any errors in the optimized code. Optimized${m}code:`,b=`Optimize the following${m} Python code:\n\n${s}\n\n# Start of code\n\n${t}\n\n\n# End of code\n\nRewrite the above Python code only from "Start of code" to "End of code", to make it more memory-efficient WITHOUT CHANGING ITS RESULTS. Assume the code has already executed all these imports; do NOT include them in the optimized code:\n\n${e}\n\nUse native libraries if that would make it more space efficient than pure Python. Consider using the following other libraries, if appropriate:\n\n${y}\n\nYour output should only consist of valid Python code. Output the resulting Python with brief explanations only included as comments prefaced with #. Include a detailed explanatory comment before the code, starting with the text "# Proposed optimization:". Make the code as clear and simple as possible, while also making it as fast and memory-efficient as possible. Use native libraries whenever possible to reduce memory consumption; invoke del on variables and array elements as soon as it is safe to do so. If the memory consumption is not likely to be reduced, leave the code unchanged. Fix any errors in the optimized code. Optimized${m}code:`;let w;switch(w=document.getElementById("optimize-performance").checked?v:b,w=f,document.getElementById("service-select").value){case"openai":return console.log(w),u(await(0,r.sendPromptToOpenAI)(w,h));case"local":{console.log("Running "+document.getElementById("service-select").value),console.log(w);const e=await(0,i.sendPromptToOllama)(w,document.getElementById("language-model-local").value,document.getElementById("local-ip").value,document.getElementById("local-port").value);return e.includes("```")?function(e){const t=/```python\s*([\s\S]*?)```|```([\s\S]*?)```/g;let n,r="";for(;null!==(n=t.exec(e));){const e=n[1]?n[1]:n[2];r&&e&&(r+="\n\n"),r+=e}return r}(e):e}case"amazon":return console.log("Running "+document.getElementById("service-select").value),console.log(w),u(await(0,a.sendPromptToAmazon)(w));case"azure-openai":{console.log("Running "+document.getElementById("service-select").value),console.log(w);let e=document.getElementById("azure-api-url").value,t=document.getElementById("azure-api-model").value;return u(await(0,o.sendPromptToAzureOpenAI)(w,h,e,t))}}}function d(e,t,n,i){e=unescape(e);const a=i.regions,o=globalThis.profile,u=o.files[e].lines,d=o.files[e].imports.join("\n"),f=u[n.lineno-1].start_region_line,p=u[n.lineno-1].end_region_line;let h;const g=u[n.lineno-1].line;let m;a?(m=u.slice(f-1,p).map((e=>e.line)).join(""),h=u.slice(Math.max(0,f-10),Math.min(f-1,u.length)).map((e=>e.line)).join("")):(m=g,h=u.slice(Math.max(0,n.lineno-10),Math.min(n.lineno-1,u.length)).map((e=>e.line)).join(""));let y=(0,s.countSpaces)(g)+3,v=l.WhiteLightning+l.WhiteExplosion+" ".repeat(y-1);const b=document.getElementById(`code-${t}-${n.lineno}`);(async()=>{const e=document.getElementById("service-select").value;if("openai"===e&&!await(0,r.isValidApiKey)(document.getElementById("api-key").value))return alert("You must enter a valid OpenAI API key to activate proposed optimizations."),void(document.getElementById("ai-optimization-options").open=!0);if("local"==e&&"none"===document.getElementById("local-models-list").style.display)return alert("You must be connected to a running Ollama server to activate proposed optimizations."),void(document.getElementById("ai-optimization-options").open=!0);b.innerHTML=`${v}working...`;let i=await c(d,m,n,h);if(!i)return void(b.innerHTML="");i=i.replace(/\r?\n/g,"\n");const a=i.split("\n").map((e=>v+Prism.highlight(e,Prism.languages.python,"python"))).join("
");b.innerHTML=`
${a}`;const o=document.getElementById(`opt-${t}-${n.lineno}`);o.addEventListener("click",(async e=>{await async function(e,t){e.preventDefault(),e.stopPropagation(),await navigator.clipboard.writeText(t)}(e,i),o.style="cursor: auto",await new Promise((e=>setTimeout(e,125))),o.style="cursor: copy"}))})()}},21806:(e,t,n)=>{"use strict";function r(e){const t=localStorage.getItem(e.id);if(null!==t)switch(e.type){case"checkbox":case"radio":e.checked="true"===t;break;default:e.value=t}}function i(e){e.addEventListener("change",(()=>{switch(e.type){case"checkbox":case"radio":localStorage.setItem(e.id,e.checked);break;default:localStorage.setItem(e.id,e.value)}}))}function a(){const e=document.querySelectorAll(".persistent");e.forEach((e=>{r(e)})),e.forEach((e=>{i(e)}))}n.r(t),n.d(t,{observeDOM:()=>o,processPersistentElements:()=>a});const o=()=>{new MutationObserver((e=>{e.forEach((e=>{e.addedNodes&&e.addedNodes.forEach((e=>{1===e.nodeType&&e.matches(".persistent")&&(r(e),e.addEventListener("change",(()=>i(e))))}))}))})).observe(document.body,{childList:!0,subtree:!0})}},61684:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Prism:()=>r}),e=n.hmd(e);var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);S+=E.value.length,E=E.next){var _=E.value;if(t.length>e.length)return;if(!(_ instanceof a)){var A,C=1;if(v){if(!(A=o(x,S,e,y))||A.index>=e.length)break;var T=A.index,k=A.index+A[0].length,R=S;for(R+=E.value.length;T>=R;)R+=(E=E.next).value.length;if(S=R-=E.value.length,E.value instanceof a)continue;for(var D=E;D!==t.tail&&(Rd.reach&&(d.reach=P);var M=E.prev;if(N&&(M=u(t,M,N),S+=N.length),c(t,M,C),E=u(t,M,new a(f,m?i.tokenize(O,m):O,b,O)),F&&u(t,E,F),C>1){var I={cause:f+","+h,reach:P};s(e,t,n,E.prev,S,I),d&&I.reach>d.reach&&(d.reach=I.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function c(e,t,n){for(var r=t.next,i=0;i"+a.content+""},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()}),!1),i):i;var d=i.util.currentScript();function f(){i.manual||i.highlightAll()}if(d&&(i.filename=d.src,d.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),void 0!==n.g&&(n.g.Prism=r),r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,r.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},r.languages.python["string-interpolation"].inside.interpolation.inside.rest=r.languages.python,r.languages.py=r.languages.python,function(){if(void 0!==r){var t=Object.assign||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e};n.prototype={setDefaults:function(e){this.defaults=t(this.defaults,e)},normalize:function(e,n){for(var r in n=t(this.defaults,n)){var i=r.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));"normalize"!==r&&"setDefaults"!==i&&n[r]&&this[i]&&(e=this[i].call(this,e,n[r]))}return e},leftTrim:function(e){return e.replace(/^\s+/,"")},rightTrim:function(e){return e.replace(/\s+$/,"")},tabsToSpaces:function(e,t){return t=0|t||4,e.replace(/\t/g,new Array(++t).join(" "))},spacesToTabs:function(e,t){return t=0|t||4,e.replace(RegExp(" {"+t+"}","g"),"\t")},removeTrailing:function(e){return e.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(e){return e.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(e){var t=e.match(/^[^\S\n\r]*(?=\S)/gm);return t&&t[0].length?(t.sort((function(e,t){return e.length-t.length})),t[0].length?e.replace(RegExp("^"+t[0],"gm"),""):e):e},indent:function(e,t){return e.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++t).join("\t")+"$&")},breakLines:function(e,t){t=!0===t?80:0|t||80;for(var n=e.split("\n"),r=0;rt&&(a[s]="\n"+a[s],o=l)}n[r]=a.join("")}return n.join("\n")}},e.exports&&(e.exports=n),r.plugins.NormalizeWhitespace=new n({"remove-trailing":!0,"remove-indent":!1,"left-trim":!1,"right-trim":!0}),r.hooks.add("before-sanity-check",(function(e){var t=r.plugins.NormalizeWhitespace;if((!e.settings||!1!==e.settings["whitespace-normalization"])&&r.util.isActive(e.element,"whitespace-normalization",!0))if(e.element&&e.element.parentNode||!e.code){var n=e.element.parentNode;if(e.code&&n&&"pre"===n.nodeName.toLowerCase()){for(var i=n.childNodes,a="",o="",s=!1,l=0;l{"use strict";n.r(t),n.d(t,{default:()=>d});const r=e=>{let t;return window.CustomEvent&&"function"==typeof window.CustomEvent?t=new CustomEvent(e):(t=document.createEvent("CustomEvent"),t.initCustomEvent(e,!1,!1,void 0)),t},i=(e,t)=>e.getAttribute(t.sortAttribute||"data-sort")||e.textContent||e.innerText||"",a=(e,t)=>(e=e.trim().toLowerCase())===(t=t.trim().toLowerCase())?0:eArray.from(e).find((e=>e.getAttribute("data-sort-column-key")===t)),s=(e,t)=>(n,r)=>{const i=e(n.td,r.td);return 0===i?t?r.index-n.index:n.index-r.index:i},l=[];class u{constructor(e,t={}){if(!(e instanceof HTMLTableElement))throw new Error("Element must be a table");this.init(e,t)}static extend(e,t,n){if("function"!=typeof t||"function"!=typeof n)throw new Error("Pattern and sort must be a function");l.push({name:e,pattern:t,sort:n})}init(e,t){let n;if(this.table=e,this.thead=!1,this.options=t,e.tHead&&e.tHead.rows.length>0?(n=Array.from(e.tHead.rows).find((e=>"thead"===e.getAttribute("data-sort-method")))||e.tHead.rows[e.tHead.rows.length-1],this.thead=!0):n=e.rows[0],!n)return;const r=e=>{this.current&&this.current!==e.currentTarget&&this.current.removeAttribute("aria-sort"),this.current=e.currentTarget,this.sortTable(e.currentTarget)};for(const e of n.cells)e.setAttribute("role","columnheader"),"none"!==e.getAttribute("data-sort-method")&&(e.tabIndex=0,e.addEventListener("click",r,!1),null!==e.getAttribute("data-sort-default")&&(this.current=e,this.sortTable(e)))}sortTable(e,t=!1){const n=e.getAttribute("data-sort-column-key"),u=e.cellIndex;let c=a,d=[],f=this.thead?0:1;const p=e.getAttribute("data-sort-method");let h=e.getAttribute("aria-sort");if(this.table.dispatchEvent(r("beforeSort")),t||(h="ascending"===h?"descending":"descending"===h?"ascending":this.options.descending?"descending":"ascending",e.setAttribute("aria-sort",h)),!(this.table.rows.length<2)){for(;d.length<3&&f0&&d.push(t),f++}for(const e of l){if(p&&e.name===p){c=e.sort;break}if(d.every(e.pattern)){c=e.sort;break}}this.col=u;for(const e of this.table.tBodies){const t=[],r={};let a=0,l=0;for(const s of e.rows){if("none"===s.getAttribute("data-sort-method"))r[a]=s;else{const e=n?o(s.cells,n):s.cells[this.col];t.push({tr:s,td:e?i(e,this.options):"",index:a})}a++}"descending"===h?t.sort(s(c,!0)):t.sort(s(c,!1)).reverse();for(let n=0;ne.replace(/[^\-?0-9.]/g,"");u.extend("number",(e=>e.match(/^[-+]?[£\x24Û¢´€]?\d+\s*([,\.]\d{0,2})/)||e.match(/^[-+]?\d+\s*([,\.]\d{0,2})?[£\x24Û¢´€]/)||e.match(/^[-+]?(\d)*-?([,\.]){0,1}-?(\d)+([E,e][\-+][\d]+)?%?$/)),((e,t)=>((e,t)=>(parseFloat(t)||0)-(parseFloat(e)||0))(c(e),c(t))));const d=u},12672:(e,t,n)=>{"use strict";function r(e){return e.replace(/\\u([\dA-F]{4})/gi,(function(e,t){return String.fromCharCode(parseInt(t,16))}))}function i(e){const t=e.match(/^\s+/);return t?t[0].length:0}function a(e){let t=Math.floor(e/1024);return Math.floor(t/1024)>0?`${(e/1048576).toFixed(0)}T`:t>0?`${(e/1024).toFixed(0)}G`:`${e.toFixed(0)}M`}function o(e){let t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3),i=e%36e5/6e4,a=e%6e4/1e3;return t>0?`${t.toFixed(0)}h:${i.toFixed(0)}m:${a.toFixed(3)}s`:n>=1?`${n.toFixed(0)}m:${a.toFixed(3)}s`:r>=1?`${a.toFixed(3)}s`:`${e.toFixed(0)}ms`}n.r(t),n.d(t,{countSpaces:()=>i,memory_consumed_str:()=>a,time_consumed_str:()=>o,unescapeUnicode:()=>r})},48487:e=>{"use strict";var t=/("(?:[^\\"]|\\.)*")|[:,]/g;e.exports=function(e,n){var r,i,a;return n=n||{},r=JSON.stringify([1],void 0,void 0===n.indent?2:n.indent).slice(2,-3),i=""===r?1/0:void 0===n.maxLength?80:n.maxLength,a=n.replacer,function e(n,o,s){var l,u,c,d,f,p,h,g,m,y,v,b;if(n&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0===(v=JSON.stringify(n,a)))return v;if(h=i-o.length-s,v.length<=h&&(m=v.replace(t,(function(e,t){return t||e+" "}))).length<=h)return m;if(null!=a&&(n=JSON.parse(v),a=void 0),"object"==typeof n&&null!==n){if(g=o+r,c=[],u=0,Array.isArray(n))for(y="[",l="]",h=n.length;u0)return[y,r+c.join(",\n"+g),l].join("\n"+o)}return v}(e,"",0)}},88189:(e,t,n)=>{"use strict";n.r(t),n.d(t,{map:()=>a,slice:()=>i});var r=Array.prototype,i=r.slice,a=r.map},12902:(e,t,n)=>{"use strict";function r(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}n.r(t),n.d(t,{default:()=>r})},54901:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(88189),i=n(52016),a=n(6930),o=n(91454),s=n(25084),l=n(62447),u=n(6946),c=n(57765);function d(){var e=s.default,t=o.default,n=c.default;function d(r){Array.isArray(r)||(r=Array.from(r));var a,s,c,d=r.length,f=new Array(d);for(a=0;a=g)if(e>=g&&t===o.default){const e=(0,u.tickIncrement)(h,g,n);isFinite(e)&&(e>0?g=(Math.floor(g/e)+1)*e:e<0&&(g=(Math.ceil(g*-e)+1)/-e))}else m.pop()}for(var y=m.length,v=0,b=y;m[v]<=h;)++v;for(;m[b-1]>g;)--b;(v||b0?m[a-1]:h,w.x1=a0)for(a=0;a{"use strict";n.r(t),n.d(t,{bisectCenter:()=>u,bisectLeft:()=>l,bisectRight:()=>s,default:()=>c});var r=n(12902),i=n(86037),a=n(83131);const o=(0,i.default)(r.default),s=o.right,l=o.left,u=(0,i.default)(a.default).center,c=s},86037:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(12902),i=n(41180);function a(e){let t,n,a;function s(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<0?i=t+1:a=t}while(i(0,r.default)(e(t),n),a=(t,n)=>e(t)-n):(t=e===r.default||e===i.default?e:o,n=e,a=e),{left:s,center:function(e,t,n=0,r=e.length){const i=s(e,t,n,r-1);return i>n&&a(e[i-1],t)>-a(e[i],t)?i-1:i},right:function(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<=0?i=t+1:a=t}while(i{"use strict";function r(e,t){if(!((t=+t)>=0))throw new RangeError("invalid r");let n=e.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!t)return e;const r=u(t),i=e.slice();return r(e,i,0,n,1),r(i,e,0,n,1),r(e,i,0,n,1),e}n.r(t),n.d(t,{blur:()=>r,blur2:()=>i,blurImage:()=>a});const i=o(u),a=o((function(e){const t=u(e);return(e,n,r,i,a)=>{t(e,n,0+(r<<=2),0+(i<<=2),a<<=2),t(e,n,r+1,i+1,a),t(e,n,r+2,i+2,a),t(e,n,r+3,i+3,a)}}));function o(e){return function(t,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:a,height:o}=t;if(!((a=Math.floor(a))>=0))throw new RangeError("invalid width");if(!((o=Math.floor(void 0!==o?o:i.length/a))>=0))throw new RangeError("invalid height");if(!a||!o||!n&&!r)return t;const u=n&&e(n),c=r&&e(r),d=i.slice();return u&&c?(s(u,d,i,a,o),s(u,i,d,a,o),s(u,d,i,a,o),l(c,i,d,a,o),l(c,d,i,a,o),l(c,i,d,a,o)):u?(s(u,i,d,a,o),s(u,d,i,a,o),s(u,i,d,a,o)):c&&(l(c,i,d,a,o),l(c,d,i,a,o),l(c,i,d,a,o)),t}}function s(e,t,n,r,i){for(let a=0,o=r*i;a{if(!((a-=o)>=i))return;let s=e*r[i];const l=o*e;for(let e=i,t=i+l;e{if(!((o-=s)>=a))return;let l=t*i[a];const u=s*t,c=u+s;for(let e=a,t=a+u;e{"use strict";function r(e){return()=>e}n.r(t),n.d(t,{default:()=>r})},98375:(e,t,n)=>{"use strict";function r(e,t){let n=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&++n;else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i=+i)>=i&&++n}return n}n.r(t),n.d(t,{default:()=>r})},44124:(e,t,n)=>{"use strict";function r(e){return 0|e.length}function i(e){return!(e>0)}function a(e){return"object"!=typeof e||"length"in e?e:Array.from(e)}function o(...e){const t="function"==typeof e[e.length-1]&&function(e){return t=>e(...t)}(e.pop()),n=(e=e.map(a)).map(r),o=e.length-1,s=new Array(o+1).fill(0),l=[];if(o<0||n.some(i))return l;for(;;){l.push(s.map(((t,n)=>e[n][t])));let r=o;for(;++s[r]===n[r];){if(0===r)return t?l.map(t):l;s[r--]=0}}}n.r(t),n.d(t,{default:()=>o})},79700:(e,t,n)=>{"use strict";function r(e,t){var n=0,r=0;return Float64Array.from(e,void 0===t?e=>n+=+e||0:i=>n+=+t(i,r++,e)||0)}n.r(t),n.d(t,{default:()=>r})},41180:(e,t,n)=>{"use strict";function r(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}n.r(t),n.d(t,{default:()=>r})},19975:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(6613);function i(e,t){const n=(0,r.default)(e,t);return n?Math.sqrt(n):n}},56209:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(24119);function i(e,...t){e=new r.InternSet(e);for(const n of t)for(const t of n)e.delete(t);return e}},90030:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(24119);function i(e,t){const n=t[Symbol.iterator](),i=new r.InternSet;for(const t of e){if(i.has(t))return!1;let e,r;for(;({value:e,done:r}=n.next())&&!r;){if(Object.is(t,e))return!1;i.add(e)}}return!0}},27991:(e,t,n)=>{"use strict";function r(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");let n=-1;for(const r of e)if(!t(r,++n,e))return!1;return!0}n.r(t),n.d(t,{default:()=>r})},91454:(e,t,n)=>{"use strict";function r(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=a&&(n=r=a):(n>a&&(n=a),rr})},20832:(e,t,n)=>{"use strict";function r(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of e)t(i,++r,e)&&n.push(i);return n}n.r(t),n.d(t,{default:()=>r})},11047:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Adder:()=>r,fcumsum:()=>a,fsum:()=>i});class r{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r0){for(a=e[--i];i>0&&(t=a,n=e[--i],a=t+n,r=n-(a-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=a+n,n==t-a&&(a=t))}return a}}function i(e,t){const n=new r;if(void 0===t)for(let t of e)(t=+t)&&n.add(t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&n.add(i)}return+n}function a(e,t){const n=new r;let i=-1;return Float64Array.from(e,void 0===t?e=>n.add(+e||0):r=>n.add(+t(r,++i,e)||0))}},36205:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(12902);function i(e,t=r.default){let n,i=!1;if(1===t.length){let a;for(const o of e){const e=t(o);(i?(0,r.default)(e,a)>0:0===(0,r.default)(e,e))&&(n=o,a=e,i=!0)}}else for(const r of e)(i?t(r,n)>0:0===t(r,r))&&(n=r,i=!0);return n}},47817:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(12902),i=n(4504);function a(e,t=r.default){if(1===t.length)return(0,i.default)(e,t);let n,a=-1,o=-1;for(const r of e)++o,(a<0?0===t(r,r):t(r,n)>0)&&(n=r,a=o);return a}},76223:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,flatGroup:()=>l,flatRollup:()=>u,groups:()=>o,index:()=>f,indexes:()=>p,rollup:()=>c,rollups:()=>d});var r=n(24119),i=n(25084);function a(e,...t){return g(e,i.default,i.default,t)}function o(e,...t){return g(e,Array.from,i.default,t)}function s(e,t){for(let n=1,r=t.length;ne.pop().map((([t,n])=>[...e,t,n]))));return e}function l(e,...t){return s(o(e,...t),t)}function u(e,t,...n){return s(d(e,t,...n),n)}function c(e,t,...n){return g(e,i.default,t,n)}function d(e,t,...n){return g(e,Array.from,t,n)}function f(e,...t){return g(e,i.default,h,t)}function p(e,...t){return g(e,Array.from,h,t)}function h(e){if(1!==e.length)throw new Error("duplicate key");return e[0]}function g(e,t,n,i){return function e(a,o){if(o>=i.length)return n(a);const s=new r.InternMap,l=i[o++];let u=-1;for(const e of a){const t=l(e,++u,a),n=s.get(t);n?n.push(e):s.set(t,[e])}for(const[t,n]of s)s.set(t,e(n,o));return t(s)}(e,0)}},63251:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(12902),i=n(76223),a=n(68886);function o(e,t,n){return(2!==t.length?(0,a.default)((0,i.rollup)(e,t,n),(([e,t],[n,i])=>(0,r.default)(t,i)||(0,r.default)(e,n))):(0,a.default)((0,i.default)(e,n),(([e,n],[i,a])=>t(n,a)||(0,r.default)(e,i)))).map((([e])=>e))}},25084:(e,t,n)=>{"use strict";function r(e){return e}n.r(t),n.d(t,{default:()=>r})},61388:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Adder:()=>p.Adder,InternMap:()=>ae.InternMap,InternSet:()=>ae.InternSet,ascending:()=>i.default,bin:()=>m.default,bisect:()=>r.default,bisectCenter:()=>r.bisectCenter,bisectLeft:()=>r.bisectLeft,bisectRight:()=>r.bisectRight,bisector:()=>a.default,blur:()=>o.blur,blur2:()=>o.blur2,blurImage:()=>o.blurImage,count:()=>s.default,cross:()=>l.default,cumsum:()=>u.default,descending:()=>c.default,deviation:()=>d.default,difference:()=>Z.default,disjoint:()=>ee.default,every:()=>V.default,extent:()=>f.default,fcumsum:()=>p.fcumsum,filter:()=>Y.default,flatGroup:()=>h.flatGroup,flatRollup:()=>h.flatRollup,fsum:()=>p.fsum,greatest:()=>$.default,greatestIndex:()=>L.default,group:()=>h.default,groupSort:()=>g.default,groups:()=>h.groups,histogram:()=>m.default,index:()=>h.index,indexes:()=>h.indexes,intersection:()=>te.default,least:()=>M.default,leastIndex:()=>I.default,map:()=>X.default,max:()=>w.default,maxIndex:()=>x.default,mean:()=>E.default,median:()=>S.default,medianIndex:()=>S.medianIndex,merge:()=>_.default,min:()=>A.default,minIndex:()=>C.default,mode:()=>T.default,nice:()=>k.default,pairs:()=>R.default,permute:()=>D.default,quantile:()=>O.default,quantileIndex:()=>O.quantileIndex,quantileSorted:()=>O.quantileSorted,quickselect:()=>N.default,range:()=>F.default,rank:()=>P.default,reduce:()=>K.default,reverse:()=>J.default,rollup:()=>h.rollup,rollups:()=>h.rollups,scan:()=>B.default,shuffle:()=>U.default,shuffler:()=>U.shuffler,some:()=>W.default,sort:()=>Q.default,subset:()=>ne.default,sum:()=>z.default,superset:()=>re.default,thresholdFreedmanDiaconis:()=>y.default,thresholdScott:()=>v.default,thresholdSturges:()=>b.default,tickIncrement:()=>q.tickIncrement,tickStep:()=>q.tickStep,ticks:()=>q.default,transpose:()=>j.default,union:()=>ie.default,variance:()=>H.default,zip:()=>G.default});var r=n(52016),i=n(12902),a=n(86037),o=n(85843),s=n(98375),l=n(44124),u=n(79700),c=n(41180),d=n(19975),f=n(91454),p=n(11047),h=n(76223),g=n(63251),m=n(54901),y=n(95102),v=n(60191),b=n(57765),w=n(30846),x=n(4504),E=n(14375),S=n(96672),_=n(62128),A=n(49216),C=n(98026),T=n(94625),k=n(62447),R=n(14685),D=n(78314),O=n(84855),N=n(15671),F=n(6561),P=n(71440),M=n(65229),I=n(4681),$=n(36205),L=n(47817),B=n(16067),U=n(3493),z=n(91907),q=n(6946),j=n(60827),H=n(6613),G=n(51943),V=n(27991),W=n(65302),Y=n(20832),X=n(37718),K=n(39856),J=n(93618),Q=n(68886),Z=n(56209),ee=n(90030),te=n(30179),ne=n(92756),re=n(49871),ie=n(82311),ae=n(24119)},30179:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(24119);function i(e,...t){e=new r.InternSet(e),t=t.map(a);e:for(const n of e)for(const r of t)if(!r.has(n)){e.delete(n);continue e}return e}function a(e){return e instanceof r.InternSet?e:new r.InternSet(e)}},65229:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(12902);function i(e,t=r.default){let n,i=!1;if(1===t.length){let a;for(const o of e){const e=t(o);(i?(0,r.default)(e,a)<0:0===(0,r.default)(e,e))&&(n=o,a=e,i=!0)}}else for(const r of e)(i?t(r,n)<0:0===t(r,r))&&(n=r,i=!0);return n}},4681:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(12902),i=n(98026);function a(e,t=r.default){if(1===t.length)return(0,i.default)(e,t);let n,a=-1,o=-1;for(const r of e)++o,(a<0?0===t(r,r):t(r,n)<0)&&(n=r,a=o);return a}},37718:(e,t,n)=>{"use strict";function r(e,t){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!=typeof t)throw new TypeError("mapper is not a function");return Array.from(e,((n,r)=>t(n,r,e)))}n.r(t),n.d(t,{default:()=>r})},30846:(e,t,n)=>{"use strict";function r(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}n.r(t),n.d(t,{default:()=>r})},4504:(e,t,n)=>{"use strict";function r(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n=t)&&(n=t,r=i);else for(let a of e)null!=(a=t(a,++i,e))&&(n=a)&&(n=a,r=i);return r}n.r(t),n.d(t,{default:()=>r})},14375:(e,t,n)=>{"use strict";function r(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let a of e)null!=(a=t(a,++i,e))&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}n.r(t),n.d(t,{default:()=>r})},96672:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i,medianIndex:()=>a});var r=n(84855);function i(e,t){return(0,r.default)(e,.5,t)}function a(e,t){return(0,r.quantileIndex)(e,.5,t)}},62128:(e,t,n)=>{"use strict";function r(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}n.r(t),n.d(t,{default:()=>r})},49216:(e,t,n)=>{"use strict";function r(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}n.r(t),n.d(t,{default:()=>r})},98026:(e,t,n)=>{"use strict";function r(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n>t||void 0===n&&t>=t)&&(n=t,r=i);else for(let a of e)null!=(a=t(a,++i,e))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}n.r(t),n.d(t,{default:()=>r})},94625:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(24119);function i(e,t){const n=new r.InternMap;if(void 0===t)for(let t of e)null!=t&&t>=t&&n.set(t,(n.get(t)||0)+1);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&i>=i&&n.set(i,(n.get(i)||0)+1)}let i,a=0;for(const[e,t]of n)t>a&&(a=t,i=e);return i}},62447:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(6946);function i(e,t,n){let i;for(;;){const a=(0,r.tickIncrement)(e,t,n);if(a===i||0===a||!isFinite(a))return[e,t];a>0?(e=Math.floor(e/a)*a,t=Math.ceil(t/a)*a):a<0&&(e=Math.ceil(e*a)/a,t=Math.floor(t*a)/a),i=a}}},83131:(e,t,n)=>{"use strict";function r(e){return null===e?NaN:+e}function*i(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}n.r(t),n.d(t,{default:()=>r,numbers:()=>i})},14685:(e,t,n)=>{"use strict";function r(e,t=i){const n=[];let r,a=!1;for(const i of e)a&&n.push(t(r,i)),r=i,a=!0;return n}function i(e,t){return[e,t]}n.r(t),n.d(t,{default:()=>r,pair:()=>i})},78314:(e,t,n)=>{"use strict";function r(e,t){return Array.from(t,(t=>e[t]))}n.r(t),n.d(t,{default:()=>r})},84855:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d,quantileIndex:()=>p,quantileSorted:()=>f});var r=n(30846),i=n(4504),a=n(49216),o=n(98026),s=n(15671),l=n(83131),u=n(68886),c=n(36205);function d(e,t,n){if((i=(e=Float64Array.from((0,l.numbers)(e,n))).length)&&!isNaN(t=+t)){if(t<=0||i<2)return(0,a.default)(e);if(t>=1)return(0,r.default)(e);var i,o=(i-1)*t,u=Math.floor(o),c=(0,r.default)((0,s.default)(e,u).subarray(0,u+1));return c+((0,a.default)(e.subarray(u+1))-c)*(o-u)}}function f(e,t,n=l.default){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function p(e,t,n=l.default){if(!isNaN(t=+t)){if(r=Float64Array.from(e,((t,r)=>(0,l.default)(n(e[r],r,e)))),t<=0)return(0,o.default)(r);if(t>=1)return(0,i.default)(r);var r,a=Uint32Array.from(e,((e,t)=>t)),d=r.length-1,f=Math.floor(d*t);return(0,s.default)(a,f,0,d,((e,t)=>(0,u.ascendingDefined)(r[e],r[t]))),(f=(0,c.default)(a.subarray(0,f+1),(e=>r[e])))>=0?f:-1}}},15671:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(68886);function i(e,t,n=0,o=1/0,s){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),o=Math.floor(Math.min(e.length-1,o)),!(n<=t&&t<=o))return e;for(s=void 0===s?r.ascendingDefined:(0,r.compareDefined)(s);o>n;){if(o-n>600){const r=o-n+1,a=t-n+1,l=Math.log(r),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(r-u)/r)*(a-r/2<0?-1:1);i(e,t,Math.max(n,Math.floor(t-a*u/r+c)),Math.min(o,Math.floor(t+(r-a)*u/r+c)),s)}const r=e[t];let l=n,u=o;for(a(e,n,t),s(e[o],r)>0&&a(e,n,o);l0;)--u}0===s(e[n],r)?a(e,n,u):(++u,a(e,u,o)),u<=t&&(n=u+1),t<=u&&(o=u-1)}return e}function a(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}},6561:(e,t,n)=>{"use strict";function r(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++rr})},71440:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(12902),i=n(68886);function a(e,t=r.default){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");let n=Array.from(e);const a=new Float64Array(n.length);2!==t.length&&(n=n.map(t),t=r.default);const o=(e,r)=>t(n[e],n[r]);let s,l;return e=Uint32Array.from(n,((e,t)=>t)),e.sort(t===r.default?(e,t)=>(0,i.ascendingDefined)(n[e],n[t]):(0,i.compareDefined)(o)),e.forEach(((e,t)=>{const n=o(e,void 0===s?e:s);n>=0?((void 0===s||n>0)&&(s=e,l=t),a[e]=l):a[e]=NaN})),a}},39856:(e,t,n)=>{"use strict";function r(e,t,n){if("function"!=typeof t)throw new TypeError("reducer is not a function");const r=e[Symbol.iterator]();let i,a,o=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++o}for(;({done:i,value:a}=r.next()),!i;)n=t(n,a,++o,e);return n}n.r(t),n.d(t,{default:()=>r})},93618:(e,t,n)=>{"use strict";function r(e){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(e).reverse()}n.r(t),n.d(t,{default:()=>r})},16067:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(4681);function i(e,t){const n=(0,r.default)(e,t);return n<0?void 0:n}},3493:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r,shuffler:()=>i});const r=i(Math.random);function i(e){return function(t,n=0,r=t.length){let i=r-(n=+n);for(;i;){const r=e()*i--|0,a=t[i+n];t[i+n]=t[r+n],t[r+n]=a}return t}}},65302:(e,t,n)=>{"use strict";function r(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");let n=-1;for(const r of e)if(t(r,++n,e))return!0;return!1}n.r(t),n.d(t,{default:()=>r})},68886:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ascendingDefined:()=>s,compareDefined:()=>o,default:()=>a});var r=n(12902),i=n(78314);function a(e,...t){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=t;if(n&&2!==n.length||t.length>1){const r=Uint32Array.from(e,((e,t)=>t));return t.length>1?(t=t.map((t=>e.map(t))),r.sort(((e,n)=>{for(const r of t){const t=s(r[e],r[n]);if(t)return t}}))):(n=e.map(n),r.sort(((e,t)=>s(n[e],n[t])))),(0,i.default)(e,r)}return e.sort(o(n))}function o(e=r.default){if(e===r.default)return s;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}function s(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(et?1:0)}},92756:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(49871);function i(e,t){return(0,r.default)(t,e)}},91907:(e,t,n)=>{"use strict";function r(e,t){let n=0;if(void 0===t)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}n.r(t),n.d(t,{default:()=>r})},49871:(e,t,n)=>{"use strict";function r(e,t){const n=e[Symbol.iterator](),r=new Set;for(const e of t){const t=i(e);if(r.has(t))continue;let a,o;for(;({value:a,done:o}=n.next());){if(o)return!1;const e=i(a);if(r.add(e),Object.is(t,e))break}}return!0}function i(e){return null!==e&&"object"==typeof e?e.valueOf():e}n.r(t),n.d(t,{default:()=>r})},95102:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(98375),i=n(84855);function a(e,t,n){const a=(0,r.default)(e),o=(0,i.default)(e,.75)-(0,i.default)(e,.25);return a&&o?Math.ceil((n-t)/(2*o*Math.pow(a,-1/3))):1}},60191:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(98375),i=n(19975);function a(e,t,n){const a=(0,r.default)(e),o=(0,i.default)(e);return a&&o?Math.ceil((n-t)*Math.cbrt(a)/(3.49*o)):1}},57765:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(98375);function i(e){return Math.max(1,Math.ceil(Math.log((0,r.default)(e))/Math.LN2)+1)}},6946:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,tickIncrement:()=>l,tickStep:()=>u});const r=Math.sqrt(50),i=Math.sqrt(10),a=Math.sqrt(2);function o(e,t,n){const s=(t-e)/Math.max(0,n),l=Math.floor(Math.log10(s)),u=s/Math.pow(10,l),c=u>=r?10:u>=i?5:u>=a?2:1;let d,f,p;return l<0?(p=Math.pow(10,-l)/c,d=Math.round(e*p),f=Math.round(t*p),d/pt&&--f,p=-p):(p=Math.pow(10,l)*c,d=Math.round(e/p),f=Math.round(t/p),d*pt&&--f),f0))return[];if((e=+e)==(t=+t))return[e];const r=t=i))return[];const l=a-i+1,u=new Array(l);if(r)if(s<0)for(let e=0;e{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(49216);function i(e){if(!(o=e.length))return[];for(var t=-1,n=(0,r.default)(e,a),i=new Array(n);++t{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(24119);function i(...e){const t=new r.InternSet;for(const n of e)for(const e of n)t.add(e);return t}},6613:(e,t,n)=>{"use strict";function r(e,t){let n,r=0,i=0,a=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(n=t-i,i+=n/++r,a+=n*(t-i));else{let o=-1;for(let s of e)null!=(s=t(s,++o,e))&&(s=+s)>=s&&(n=s-i,i+=n/++r,a+=n*(s-i))}if(r>1)return a/(r-1)}n.r(t),n.d(t,{default:()=>r})},51943:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(60827);function i(){return(0,r.default)(arguments)}},46957:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Color:()=>i,Rgb:()=>A,brighter:()=>o,darker:()=>a,default:()=>w,hsl:()=>F,hslConvert:()=>N,rgb:()=>_,rgbConvert:()=>S});var r=n(40871);function i(){}var a=.7,o=1/a,s="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c=/^#([0-9a-f]{3,8})$/,d=new RegExp(`^rgb\\(${s},${s},${s}\\)$`),f=new RegExp(`^rgb\\(${u},${u},${u}\\)$`),p=new RegExp(`^rgba\\(${s},${s},${s},${l}\\)$`),h=new RegExp(`^rgba\\(${u},${u},${u},${l}\\)$`),g=new RegExp(`^hsl\\(${l},${u},${u}\\)$`),m=new RegExp(`^hsla\\(${l},${u},${u},${l}\\)$`),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function w(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=c.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?x(t):3===n?new A(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?E(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?E(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=d.exec(e))?new A(t[1],t[2],t[3],1):(t=f.exec(e))?new A(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=p.exec(e))?E(t[1],t[2],t[3],t[4]):(t=h.exec(e))?E(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=g.exec(e))?O(t[1],t[2]/100,t[3]/100,1):(t=m.exec(e))?O(t[1],t[2]/100,t[3]/100,t[4]):y.hasOwnProperty(e)?x(y[e]):"transparent"===e?new A(NaN,NaN,NaN,0):null}function x(e){return new A(e>>16&255,e>>8&255,255&e,1)}function E(e,t,n,r){return r<=0&&(e=t=n=NaN),new A(e,t,n,r)}function S(e){return e instanceof i||(e=w(e)),e?new A((e=e.rgb()).r,e.g,e.b,e.opacity):new A}function _(e,t,n,r){return 1===arguments.length?S(e):new A(e,t,n,null==r?1:r)}function A(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function C(){return`#${D(this.r)}${D(this.g)}${D(this.b)}`}function T(){const e=k(this.opacity);return`${1===e?"rgb(":"rgba("}${R(this.r)}, ${R(this.g)}, ${R(this.b)}${1===e?")":`, ${e})`}`}function k(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function R(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function D(e){return((e=R(e))<16?"0":"")+e.toString(16)}function O(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new P(e,t,n,r)}function N(e){if(e instanceof P)return new P(e.h,e.s,e.l,e.opacity);if(e instanceof i||(e=w(e)),!e)return new P;if(e instanceof P)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-a,u=(o+a)/2;return l?(s=t===o?(n-r)/l+6*(n0&&u<1?0:s,new P(s,l,u,e.opacity)}function F(e,t,n,r){return 1===arguments.length?N(e):new P(e,t,n,null==r?1:r)}function P(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function M(e){return(e=(e||0)%360)<0?e+360:e}function I(e){return Math.max(0,Math.min(1,e||0))}function $(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}(0,r.default)(i,w,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:v,formatHex:v,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return N(this).formatHsl()},formatRgb:b,toString:b}),(0,r.default)(A,_,(0,r.extend)(i,{brighter(e){return e=null==e?o:Math.pow(o,e),new A(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?a:Math.pow(a,e),new A(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new A(R(this.r),R(this.g),R(this.b),k(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:C,formatHex:C,formatHex8:function(){return`#${D(this.r)}${D(this.g)}${D(this.b)}${D(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:T,toString:T})),(0,r.default)(P,F,(0,r.extend)(i,{brighter(e){return e=null==e?o:Math.pow(o,e),new P(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?a:Math.pow(a,e),new P(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new A($(e>=240?e-240:e+120,i,r),$(e,i,r),$(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new P(M(this.h),I(this.s),I(this.l),k(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=k(this.opacity);return`${1===e?"hsl(":"hsla("}${M(this.h)}, ${100*I(this.s)}%, ${100*I(this.l)}%${1===e?")":`, ${e})`}`}}))},75653:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Cubehelix:()=>g,default:()=>h});var r=n(40871),i=n(46957),a=n(49710),o=-.14861,s=1.78277,l=-.29227,u=-.90649,c=1.97294,d=c*u,f=c*s,p=s*l-u*o;function h(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof g)return new g(e.h,e.s,e.l,e.opacity);e instanceof i.Rgb||(e=(0,i.rgbConvert)(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(p*r+d*t-f*n)/(p+d-f),s=r-o,h=(c*(n-o)-l*s)/u,m=Math.sqrt(h*h+s*s)/(c*o*(1-o)),y=m?Math.atan2(h,s)*a.degrees-120:NaN;return new g(y<0?y+360:y,m,o,e.opacity)}(e):new g(e,t,n,null==r?1:r)}function g(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}(0,r.default)(g,h,(0,r.extend)(i.Color,{brighter(e){return e=null==e?i.brighter:Math.pow(i.brighter,e),new g(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?i.darker:Math.pow(i.darker,e),new g(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*a.radians,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),d=Math.sin(e);return new i.Rgb(255*(t+n*(o*r+s*d)),255*(t+n*(l*r+u*d)),255*(t+n*(c*r)),this.opacity)}}))},40871:(e,t,n)=>{"use strict";function r(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function i(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}n.r(t),n.d(t,{default:()=>r,extend:()=>i})},72090:(e,t,n)=>{"use strict";n.r(t),n.d(t,{color:()=>r.default,cubehelix:()=>a.default,gray:()=>i.gray,hcl:()=>i.hcl,hsl:()=>r.hsl,lab:()=>i.default,lch:()=>i.lch,rgb:()=>r.rgb});var r=n(46957),i=n(19853),a=n(75653)},19853:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Hcl:()=>_,Lab:()=>m,default:()=>g,gray:()=>h,hcl:()=>S,lch:()=>E});var r=n(40871),i=n(46957),a=n(49710);const o=.96422,s=1,l=.82521,u=4/29,c=6/29,d=3*c*c,f=c*c*c;function p(e){if(e instanceof m)return new m(e.l,e.a,e.b,e.opacity);if(e instanceof _)return A(e);e instanceof i.Rgb||(e=(0,i.rgbConvert)(e));var t,n,r=w(e.r),a=w(e.g),u=w(e.b),c=y((.2225045*r+.7168786*a+.0606169*u)/s);return r===a&&a===u?t=n=c:(t=y((.4360747*r+.3850649*a+.1430804*u)/o),n=y((.0139322*r+.0971045*a+.7141733*u)/l)),new m(116*c-16,500*(t-c),200*(c-n),e.opacity)}function h(e,t){return new m(e,0,0,null==t?1:t)}function g(e,t,n,r){return 1===arguments.length?p(e):new m(e,t,n,null==r?1:r)}function m(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function y(e){return e>f?Math.pow(e,1/3):e/d+u}function v(e){return e>c?e*e*e:d*(e-u)}function b(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function w(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function x(e){if(e instanceof _)return new _(e.h,e.c,e.l,e.opacity);if(e instanceof m||(e=p(e)),0===e.a&&0===e.b)return new _(NaN,0{"use strict";n.r(t),n.d(t,{degrees:()=>i,radians:()=>r});const r=Math.PI/180,i=180/Math.PI},34971:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(40123),i=n(37729),a=n(56186),o=n(67778);const s=2*Math.PI,l=Math.pow;function u(e){return e[0]}function c(e){return e[1]}function d(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class f{static from(e,t=u,n=c,r){return new f("length"in e?function(e,t,n,r){const i=e.length,a=new Float64Array(2*i);for(let o=0;o2&&function(e){const{triangles:t,coords:n}=e;for(let e=0;e1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},((e,t)=>t)).sort(((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]));const e=this.collinear[0],n=this.collinear[this.collinear.length-1],i=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],a=1e-8*Math.hypot(i[3]-i[1],i[2]-i[0]);for(let e=0,n=t.length/2;e0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],o[i[0]]=1,2===i.length&&(o[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new o.default(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:r,halfedges:i,triangles:a,collinear:o}=this;if(o){const t=o.indexOf(e);return t>0&&(yield o[t-1]),void(t=0&&i!==n&&i!==r;)n=i;return i}_step(e,t,n){const{inedges:r,hull:i,_hullIndex:a,halfedges:o,triangles:s,points:u}=this;if(-1===r[e]||!u.length)return(e+1)%(u.length>>1);let c=e,d=l(t-u[2*e],2)+l(n-u[2*e+1],2);const f=r[e];let p=f;do{let r=s[p];const f=l(t-u[2*r],2)+l(n-u[2*r+1],2);if(f{"use strict";n.r(t),n.d(t,{Delaunay:()=>r.default,Voronoi:()=>i.default});var r=n(34971),i=n(67778)},37729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});const r=1e-6;class i{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){const i=(e=+e)+(n=+n),a=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${i},${a}`:(Math.abs(this._x1-i)>r||Math.abs(this._y1-a)>r)&&(this._+="L"+i+","+a),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=i},${this._y1=a}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}},56186:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});class r{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}},67778:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(37729),i=n(56186);class a{constructor(e,[t,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(t=+t)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=r,this.xmin=t,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this;let i,a;const o=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,s,l=0,u=0,c=n.length;l1;)a-=2;for(let e=2;e0){if(t>=this.ymax)return null;(i=(this.ymax-t)/r)0){if(e>=this.xmax)return null;(i=(this.xmax-e)/n)this.xmax?2:0)|(tthis.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let t=0;t{"use strict";n.r(t),n.d(t,{default:()=>l});var r={value:()=>{}};function i(){for(var e,t=0,n=arguments.length,r={};t=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),l=-1,u=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++l0)for(var n,r,i=new Array(n),a=0;a{"use strict";n.r(t),n.d(t,{dispatch:()=>r.default});var r=n(41089)},62569:(e,t,n)=>{"use strict";function r(e){for(var t in e){var n,r,a=e[t].trim();if(a)if("true"===a)a=!0;else if("false"===a)a=!1;else if("NaN"===a)a=NaN;else if(isNaN(n=+a)){if(!(r=a.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;i&&r[4]&&!r[7]&&(a=a.replace(/-/g,"/").replace(/T/," ")),a=new Date(a)}else a=n;else a=null;e[t]=a}return e}n.r(t),n.d(t,{default:()=>r});const i=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours()},93004:(e,t,n)=>{"use strict";n.r(t),n.d(t,{csvFormat:()=>o,csvFormatBody:()=>s,csvFormatRow:()=>u,csvFormatRows:()=>l,csvFormatValue:()=>c,csvParse:()=>i,csvParseRows:()=>a});var r=(0,n(6973).default)(","),i=r.parse,a=r.parseRows,o=r.format,s=r.formatBody,l=r.formatRows,u=r.formatRow,c=r.formatValue},6973:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r={},i={},a=34,o=10,s=13;function l(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function u(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var r in e)r in t||n.push(t[r]=r)})),n}function c(e,t){var n=e+"",r=n.length;return r=c?p=!0:(l=e.charCodeAt(d++))===o?h=!0:l===s&&(h=!0,e.charCodeAt(d)===o&&++d),e.slice(u+1,t-1).replace(/""/g,'"')}for(;d9999?"+"+c(r,6):c(r,4))+"-"+c(n.getUTCMonth()+1,2)+"-"+c(n.getUTCDate(),2)+(s?"T"+c(i,2)+":"+c(a,2)+":"+c(o,2)+"."+c(s,3)+"Z":o?"T"+c(i,2)+":"+c(a,2)+":"+c(o,2)+"Z":a||i?"T"+c(i,2)+":"+c(a,2)+"Z":"")):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e;var n,r,i,a,o,s}return{parse:function(e,t){var n,r,i=d(e,(function(e,i){if(n)return n(e,i-1);r=e,n=t?function(e,t){var n=l(e);return function(r,i){return t(n(r),i,e)}}(e,t):l(e)}));return i.columns=r||[],i},parseRows:d,format:function(t,n){return null==n&&(n=u(t)),[n.map(h).join(e)].concat(f(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=u(e)),f(e,t).join("\n")},formatRows:function(e){return e.map(p).join("\n")},formatRow:p,formatValue:h}}},84112:(e,t,n)=>{"use strict";n.r(t),n.d(t,{autoType:()=>o.default,csvFormat:()=>i.csvFormat,csvFormatBody:()=>i.csvFormatBody,csvFormatRow:()=>i.csvFormatRow,csvFormatRows:()=>i.csvFormatRows,csvFormatValue:()=>i.csvFormatValue,csvParse:()=>i.csvParse,csvParseRows:()=>i.csvParseRows,dsvFormat:()=>r.default,tsvFormat:()=>a.tsvFormat,tsvFormatBody:()=>a.tsvFormatBody,tsvFormatRow:()=>a.tsvFormatRow,tsvFormatRows:()=>a.tsvFormatRows,tsvFormatValue:()=>a.tsvFormatValue,tsvParse:()=>a.tsvParse,tsvParseRows:()=>a.tsvParseRows});var r=n(6973),i=n(93004),a=n(93357),o=n(62569)},93357:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tsvFormat:()=>o,tsvFormatBody:()=>s,tsvFormatRow:()=>u,tsvFormatRows:()=>l,tsvFormatValue:()=>c,tsvParse:()=>i,tsvParseRows:()=>a});var r=(0,n(6973).default)("\t"),i=r.parse,a=r.parseRows,o=r.format,s=r.formatBody,l=r.formatRows,u=r.formatRow,c=r.formatValue},23093:(e,t,n)=>{"use strict";function r(e,t){var n,r=1;function i(){var i,a,o=n.length,s=0,l=0;for(i=0;ir})},3608:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(67686),i=n(10024),a=n(58480);function o(e){return e.x+e.vx}function s(e){return e.y+e.vy}function l(e){var t,n,l,u=1,c=1;function d(){for(var e,i,d,p,h,g,m,y=t.length,v=0;vp+c||rh+c||id.index){var f=p-o.x-o.vx,y=h-o.y-o.vy,v=f*f+y*y;ve.r&&(e.r=e[t].r)}function p(){if(t){var r,i,a=t.length;for(n=new Array(a),r=0;r{"use strict";function r(e){return function(){return e}}n.r(t),n.d(t,{default:()=>r})},14310:(e,t,n)=>{"use strict";n.r(t),n.d(t,{forceCenter:()=>r.default,forceCollide:()=>i.default,forceLink:()=>a.default,forceManyBody:()=>o.default,forceRadial:()=>s.default,forceSimulation:()=>l.default,forceX:()=>u.default,forceY:()=>c.default});var r=n(23093),i=n(3608),a=n(7960),o=n(74635),s=n(7979),l=n(71955),u=n(29390),c=n(62349)},58480:(e,t,n)=>{"use strict";function r(e){return 1e-6*(e()-.5)}n.r(t),n.d(t,{default:()=>r})},24856:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const r=1664525,i=1013904223,a=4294967296;function o(){let e=1;return()=>(e=(r*e+i)%a)/a}},7960:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(10024),i=n(58480);function a(e){return e.index}function o(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function s(e){var t,n,s,l,u,c,d=a,f=function(e){return 1/Math.min(l[e.source.index],l[e.target.index])},p=(0,r.default)(30),h=1;function g(r){for(var a=0,o=e.length;a[d(e,t,s),e])));for(r=0,l=new Array(a);r{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(67686),i=n(10024),a=n(58480),o=n(71955);function s(){var e,t,n,s,l,u=(0,i.default)(-30),c=1,d=1/0,f=.81;function p(n){var i,a=e.length,l=(0,r.quadtree)(e,o.x,o.y).visitAfter(g);for(s=n,i=0;i=d)){(e.data!==t||e.next)&&(0===u&&(g+=(u=(0,a.default)(n))*u),0===p&&(g+=(p=(0,a.default)(n))*p),g{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(10024);function i(e,t,n){var i,a,o,s=(0,r.default)(.1);function l(e){for(var r=0,s=i.length;r{"use strict";n.r(t),n.d(t,{default:()=>c,x:()=>o,y:()=>s});var r=n(59167),i=n(52456),a=n(24856);function o(e){return e.x}function s(e){return e.y}var l=10,u=Math.PI*(3-Math.sqrt(5));function c(e){var t,n=1,o=.001,s=1-Math.pow(o,1/300),c=0,d=.6,f=new Map,p=(0,i.timer)(m),h=(0,r.dispatch)("tick","end"),g=(0,a.default)();function m(){y(),h.call("tick",t),n1?(null==n?f.delete(e):f.set(e,b(n)),t):f.get(e)},find:function(t,n,r){var i,a,o,s,l,u=0,c=e.length;for(null==r?r=1/0:r*=r,u=0;u1?(h.on(e,n),t):h.on(e)}}}},29390:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(10024);function i(e){var t,n,i,a=(0,r.default)(.1);function o(e){for(var r,a=0,o=t.length;a{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(10024);function i(e){var t,n,i,a=(0,r.default)(.1);function o(e){for(var r,a=0,o=t.length;a{"use strict";n.r(t),n.d(t,{default:()=>s,format:()=>i,formatPrefix:()=>a});var r,i,a,o=n(16410);function s(e){return r=(0,o.default)(e),i=r.format,a=r.formatPrefix,r}s({thousands:",",grouping:[3],currency:["$",""]})},47235:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(95204);function i(e){return(e=(0,r.formatDecimalParts)(Math.abs(e)))?e[1]:NaN}},95204:(e,t,n)=>{"use strict";function r(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function i(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}n.r(t),n.d(t,{default:()=>r,formatDecimalParts:()=>i})},37168:(e,t,n)=>{"use strict";function r(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}n.r(t),n.d(t,{default:()=>r})},91728:(e,t,n)=>{"use strict";function r(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}n.r(t),n.d(t,{default:()=>r})},83520:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,prefixExponent:()=>r});var r,i=n(95204);function a(e,t){var n=(0,i.formatDecimalParts)(e,t);if(!n)return e+"";var a=n[0],o=n[1],s=o-(r=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+(0,i.formatDecimalParts)(e,Math.max(0,t+s-1))[0]}},63554:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(95204);function i(e,t){var n=(0,r.formatDecimalParts)(e,t);if(!n)return e+"";var i=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}},1631:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FormatSpecifier:()=>a,default:()=>i});var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(e){if(!(t=r.exec(e)))throw new Error("invalid format: "+e);var t;return new a({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function a(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}i.prototype=a.prototype,a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}},46715:(e,t,n)=>{"use strict";function r(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}n.r(t),n.d(t,{default:()=>r})},1866:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(95204),i=n(83520),a=n(63554);const o={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:r.default,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>(0,a.default)(100*e,t),r:a.default,s:i.default,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}},69986:(e,t,n)=>{"use strict";function r(e){return e}n.r(t),n.d(t,{default:()=>r})},4710:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FormatSpecifier:()=>a.FormatSpecifier,format:()=>r.format,formatDefaultLocale:()=>r.default,formatLocale:()=>i.default,formatPrefix:()=>r.formatPrefix,formatSpecifier:()=>a.default,precisionFixed:()=>o.default,precisionPrefix:()=>s.default,precisionRound:()=>l.default});var r=n(48701),i=n(16410),a=n(1631),o=n(1734),s=n(67590),l=n(99460)},16410:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(47235),i=n(37168),a=n(91728),o=n(1631),s=n(46715),l=n(1866),u=n(83520),c=n(69986),d=Array.prototype.map,f=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function p(e){var t=void 0===e.grouping||void 0===e.thousands?c.default:(0,i.default)(d.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",p=void 0===e.currency?"":e.currency[1]+"",h=void 0===e.decimal?".":e.decimal+"",g=void 0===e.numerals?c.default:(0,a.default)(d.call(e.numerals,String)),m=void 0===e.percent?"%":e.percent+"",y=void 0===e.minus?"−":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function b(e){var r=(e=(0,o.default)(e)).fill,i=e.align,a=e.sign,c=e.symbol,d=e.zero,b=e.width,w=e.comma,x=e.precision,E=e.trim,S=e.type;"n"===S?(w=!0,S="g"):l.default[S]||(void 0===x&&(x=12),E=!0,S="g"),(d||"0"===r&&"="===i)&&(d=!0,r="0",i="=");var _="$"===c?n:"#"===c&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",A="$"===c?p:/[%p]/.test(S)?m:"",C=l.default[S],T=/[defgprs%]/.test(S);function k(e){var n,o,l,c=_,p=A;if("c"===S)p=C(e)+p,e="";else{var m=(e=+e)<0||1/e<0;if(e=isNaN(e)?v:C(Math.abs(e),x),E&&(e=(0,s.default)(e)),m&&0==+e&&"+"!==a&&(m=!1),c=(m?"("===a?a:y:"-"===a||"("===a?"":a)+c,p=("s"===S?f[8+u.prefixExponent/3]:"")+p+(m&&"("===a?")":""),T)for(n=-1,o=e.length;++n(l=e.charCodeAt(n))||l>57){p=(46===l?h+e.slice(n+1):e.slice(n))+p,e=e.slice(0,n);break}}w&&!d&&(e=t(e,1/0));var k=c.length+e.length+p.length,R=k>1)+c+e+p+R.slice(k);break;default:e=R+c+e+p}return g(e)}return x=void 0===x?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),k.toString=function(){return e+""},k}return{format:b,formatPrefix:function(e,t){var n=b(((e=(0,o.default)(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor((0,r.default)(t)/3))),a=Math.pow(10,-i),s=f[8+i/3];return function(e){return n(a*e)+s}}}}},1734:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(47235);function i(e){return Math.max(0,-(0,r.default)(Math.abs(e)))}},67590:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(47235);function i(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor((0,r.default)(t)/3)))-(0,r.default)(Math.abs(e)))}},99460:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(47235);function i(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,(0,r.default)(t)-(0,r.default)(e))+1}},66841:(e,t,n)=>{"use strict";n.r(t),n.d(t,{airyRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e){var t=(0,i.tan)(e/2),n=2*(0,i.log)((0,i.cos)(e/2))/(t*t);function r(e,t){var r=(0,i.cos)(e),a=(0,i.cos)(t),o=(0,i.sin)(t),s=a*r,l=-((1-s?(0,i.log)((1+s)/2)/(1-s):-.5)+n/(1+s));return[l*a*(0,i.sin)(e),l*o]}return r.invert=function(t,r){var a,o=(0,i.sqrt)(t*t+r*r),s=-e/2,l=50;if(!o)return[0,0];do{var u=s/2,c=(0,i.cos)(u),d=(0,i.sin)(u),f=d/c,p=-(0,i.log)((0,i.abs)(c));s-=a=(2/f*p-n*f-o)/(-p/(d*d)+1-n/(2*c*c))*(c<0?.7:1)}while((0,i.abs)(a)>i.epsilon&&--l>0);var h=(0,i.sin)(s);return[(0,i.atan2)(t*h,o*(0,i.cos)(s)),(0,i.asin)(r*h/o)]},r}function o(){var e=i.halfPi,t=(0,r.geoProjectionMutator)(a),n=t(e);return n.radius=function(n){return arguments.length?t(e=n*i.radians):e*i.degrees},n.scale(179.976).clipAngle(147)}},11949:(e,t,n)=>{"use strict";n.r(t),n.d(t,{aitoffRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.cos)(t),r=(0,i.sinci)((0,i.acos)(n*(0,i.cos)(e/=2)));return[2*n*(0,i.sin)(e)*r,(0,i.sin)(t)*r]}function o(){return(0,r.geoProjection)(a).scale(152.63)}a.invert=function(e,t){if(!(e*e+4*t*t>i.pi*i.pi+i.epsilon)){var n=e,r=t,a=25;do{var o,s=(0,i.sin)(n),l=(0,i.sin)(n/2),u=(0,i.cos)(n/2),c=(0,i.sin)(r),d=(0,i.cos)(r),f=(0,i.sin)(2*r),p=c*c,h=d*d,g=l*l,m=1-h*u*u,y=m?(0,i.acos)(d*u)*(0,i.sqrt)(o=1/m):o=0,v=2*y*d*l-e,b=y*c-t,w=o*(h*g+y*d*u*p),x=o*(.5*s*f-2*y*c*l),E=.25*o*(f*l-y*c*h*s),S=o*(p*u+y*g*d),_=x*E-S*w;if(!_)break;var A=(b*x-v*S)/_,C=(v*E-b*w)/_;n-=A,r-=C}while(((0,i.abs)(A)>i.epsilon||(0,i.abs)(C)>i.epsilon)&&--a>0);return[n,r]}}},5095:(e,t,n)=>{"use strict";n.r(t),n.d(t,{armadilloRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e){var t=(0,i.sin)(e),n=(0,i.cos)(e),r=e>=0?1:-1,a=(0,i.tan)(r*e),o=(1+t-n)/2;function s(e,s){var l=(0,i.cos)(s),u=(0,i.cos)(e/=2);return[(1+l)*(0,i.sin)(e),(r*s>-(0,i.atan2)(u,a)-.001?0:10*-r)+o+(0,i.sin)(s)*n-(1+l)*t*u]}return s.invert=function(e,s){var l=0,u=0,c=50;do{var d=(0,i.cos)(l),f=(0,i.sin)(l),p=(0,i.cos)(u),h=(0,i.sin)(u),g=1+p,m=g*f-e,y=o+h*n-g*t*d-s,v=g*d/2,b=-f*h,w=t*g*f/2,x=n*p+t*d*h,E=b*w-x*v,S=(y*b-m*x)/E/2,_=(m*w-y*v)/E;(0,i.abs)(_)>2&&(_/=2),l-=S,u-=_}while(((0,i.abs)(S)>i.epsilon||(0,i.abs)(_)>i.epsilon)&&--c>0);return r*u>-(0,i.atan2)((0,i.cos)(l),a)-.001?[2*l,u]:null},s}function o(){var e=20*i.radians,t=e>=0?1:-1,n=(0,i.tan)(t*e),o=(0,r.geoProjectionMutator)(a),s=o(e),l=s.stream;return s.parallel=function(r){return arguments.length?(n=(0,i.tan)((t=(e=r*i.radians)>=0?1:-1)*e),o(e)):e*i.degrees},s.stream=function(r){var a=s.rotate(),o=l(r),u=(s.rotate([0,0]),l(r)),c=s.precision();return s.rotate(a),o.sphere=function(){u.polygonStart(),u.lineStart();for(var r=-180*t;t*r<180;r+=90*t)u.point(r,90*t);if(e)for(;t*(r-=3*t*c)>=-180;)u.point(r,t*-(0,i.atan2)((0,i.cos)(r*i.radians/2),n)*i.degrees);u.lineEnd(),u.polygonEnd()},o},s.scale(218.695).center([0,28.0974])}},70063:(e,t,n)=>{"use strict";n.r(t),n.d(t,{augustRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.tan)(t/2),r=(0,i.sqrt)(1-n*n),a=1+r*(0,i.cos)(e/=2),o=(0,i.sin)(e)*r/a,s=n/a,l=o*o,u=s*s;return[4/3*o*(3+l-3*u),4/3*s*(3+3*l-u)]}function o(){return(0,r.geoProjection)(a).scale(66.1603)}a.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&(0,i.abs)(t)>1)return null;var n=1+e*e+t*t,r=(0,i.sqrt)((n-(0,i.sqrt)(n*n-4*t*t))/2),a=(0,i.asin)(r)/3,o=r?(0,i.arcosh)((0,i.abs)(t/r))/3:(0,i.arsinh)((0,i.abs)(e))/3,s=(0,i.cos)(a),l=(0,i.cosh)(o),u=l*l-s*s;return[2*(0,i.sign)(e)*(0,i.atan2)((0,i.sinh)(o)*s,.25-u),2*(0,i.sign)(t)*(0,i.atan2)(l*(0,i.sin)(a),.25+u)]}},74925:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bakerRaw:()=>s,default:()=>l});var r=n(51300),i=n(28184),a=(0,i.sqrt)(8),o=(0,i.log)(1+i.sqrt2);function s(e,t){var n=(0,i.abs)(t);return ni.epsilon2&&--l>0);return[e/((0,i.cos)(s)*(a-1/(0,i.sin)(s))),(0,i.sign)(t)*s]}},55607:(e,t,n)=>{"use strict";n.r(t),n.d(t,{berghausRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e){var t=2*i.pi/e;function n(e,n){var a=(0,r.geoAzimuthalEquidistantRaw)(e,n);if((0,i.abs)(e)>i.halfPi){var o=(0,i.atan2)(a[1],a[0]),s=(0,i.sqrt)(a[0]*a[0]+a[1]*a[1]),l=t*(0,i.round)((o-i.halfPi)/t)+i.halfPi,u=(0,i.atan2)((0,i.sin)(o-=l),2-(0,i.cos)(o));o=l+(0,i.asin)(i.pi/s*(0,i.sin)(u))-u,a[0]=s*(0,i.cos)(o),a[1]=s*(0,i.sin)(o)}return a}return n.invert=function(e,n){var a=(0,i.sqrt)(e*e+n*n);if(a>i.halfPi){var o=(0,i.atan2)(n,e),s=t*(0,i.round)((o-i.halfPi)/t)+i.halfPi,l=o>s?-1:1,u=a*(0,i.cos)(s-o),c=1/(0,i.tan)(l*(0,i.acos)((u-i.pi)/(0,i.sqrt)(i.pi*(i.pi-2*u)+a*a)));o=s+2*(0,i.atan)((c+l*(0,i.sqrt)(c*c-3))/3),e=a*(0,i.cos)(o),n=a*(0,i.sin)(o)}return r.geoAzimuthalEquidistantRaw.invert(e,n)},n}function o(){var e=5,t=(0,r.geoProjectionMutator)(a),n=t(e),o=n.stream,s=.01,l=-(0,i.cos)(s*i.radians),u=(0,i.sin)(s*i.radians);return n.lobes=function(n){return arguments.length?t(e=+n):e},n.stream=function(t){var r=n.rotate(),a=o(t),c=(n.rotate([0,0]),o(t));return n.rotate(r),a.sphere=function(){c.polygonStart(),c.lineStart();for(var t=0,n=360/e,r=2*i.pi/e,a=90-180/e,o=i.halfPi;t{"use strict";n.r(t),n.d(t,{bertin1953Raw:()=>s,default:()=>l});var r=n(51300),i=n(72304),a=n(28184),o=n(11209);function s(){var e=(0,i.hammerRaw)(1.68,2);function t(t,n){if(t+n<-1.4){var r=(t-n+1.6)*(t+n+1.4)/8;t+=r,n-=.8*r*(0,a.sin)(n+a.pi/2)}var i=e(t,n),o=(1-(0,a.cos)(t*n))/12;return i[1]<0&&(i[0]*=1+o),i[1]>0&&(i[1]*=1+o/1.5*i[0]*i[0]),i}return t.invert=(0,o.solve2d)(t),t}function l(){return(0,r.geoProjection)(s()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}},83314:(e,t,n)=>{"use strict";n.r(t),n.d(t,{boggsRaw:()=>l,default:()=>u});var r=n(51300),i=n(88860),a=n(28184),o=2.00276,s=1.11072;function l(e,t){var n=(0,i.mollweideBromleyTheta)(a.pi,t);return[o*e/(1/(0,a.cos)(t)+s/(0,a.cos)(n)),(t+a.sqrt2*(0,a.sin)(n))/o]}function u(){return(0,r.geoProjection)(l).scale(160.857)}l.invert=function(e,t){var n,r,i=o*t,l=t<0?-a.quarterPi:a.quarterPi,u=25;do{r=i-a.sqrt2*(0,a.sin)(l),l-=n=((0,a.sin)(2*l)+2*l-a.pi*(0,a.sin)(r))/(2*(0,a.cos)(2*l)+2+a.pi*(0,a.cos)(r)*a.sqrt2*(0,a.cos)(l))}while((0,a.abs)(n)>a.epsilon&&--u>0);return r=i-a.sqrt2*(0,a.sin)(l),[e*(1/(0,a.cos)(r)+s/(0,a.cos)(l))/o,r]}},17402:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bonneRaw:()=>o,default:()=>s});var r=n(66462),i=n(28184),a=n(85801);function o(e){if(!e)return a.sinusoidalRaw;var t=1/(0,i.tan)(e);function n(n,r){var a=t+e-r,o=a?n*(0,i.cos)(r)/a:a;return[a*(0,i.sin)(o),t-a*(0,i.cos)(o)]}return n.invert=function(n,r){var a=(0,i.sqrt)(n*n+(r=t-r)*r),o=t+e-a;return[a/(0,i.cos)(o)*(0,i.atan2)(n,r),o]},n}function s(){return(0,r.default)(o).scale(123.082).center([0,26.1441]).parallel(45)}},14423:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bottomleyRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e){function t(t,n){var r=i.halfPi-n,a=r?t*e*(0,i.sin)(r)/r:r;return[r*(0,i.sin)(a)/e,i.halfPi-r*(0,i.cos)(a)]}return t.invert=function(t,n){var r=t*e,a=i.halfPi-n,o=(0,i.sqrt)(r*r+a*a),s=(0,i.atan2)(r,a);return[(o?o/(0,i.sin)(o):1)*s/e,i.halfPi-o]},t}function o(){var e=.5,t=(0,r.geoProjectionMutator)(a),n=t(e);return n.fraction=function(n){return arguments.length?t(e=+n):e},n.scale(158.837)}},54418:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bromleyRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184),a=(0,n(88860).mollweideBromleyRaw)(1,4/i.pi,i.pi);function o(){return(0,r.geoProjection)(a).scale(152.63)}},64975:(e,t,n)=>{"use strict";n.r(t),n.d(t,{chamberlinAfrica:()=>d,chamberlinRaw:()=>u,default:()=>f});var r=n(51300),i=n(28184),a=n(11209);function o(e,t,n,r,a,o){var s,l=(0,i.cos)(o);if((0,i.abs)(e)>1||(0,i.abs)(o)>1)s=(0,i.acos)(n*a+t*r*l);else{var u=(0,i.sin)(e/2),c=(0,i.sin)(o/2);s=2*(0,i.asin)((0,i.sqrt)(u*u+t*r*c*c))}return(0,i.abs)(s)>i.epsilon?[s,(0,i.atan2)(r*(0,i.sin)(o),t*a-n*r*l)]:[0,0]}function s(e,t,n){return(0,i.acos)((e*e+t*t-n*n)/(2*e*t))}function l(e){return e-2*i.pi*(0,i.floor)((e+i.pi)/(2*i.pi))}function u(e,t,n){for(var r,a=[[e[0],e[1],(0,i.sin)(e[1]),(0,i.cos)(e[1])],[t[0],t[1],(0,i.sin)(t[1]),(0,i.cos)(t[1])],[n[0],n[1],(0,i.sin)(n[1]),(0,i.cos)(n[1])]],u=a[2],c=0;c<3;++c,u=r)r=a[c],u.v=o(r[1]-u[1],u[3],u[2],r[3],r[2],r[0]-u[0]),u.point=[0,0];var d=s(a[0].v[0],a[2].v[0],a[1].v[0]),f=s(a[0].v[0],a[1].v[0],a[2].v[0]),p=i.pi-d;a[2].point[1]=0,a[0].point[0]=-(a[1].point[0]=a[0].v[0]/2);var h=[a[2].point[0]=a[0].point[0]+a[2].v[0]*(0,i.cos)(d),2*(a[0].point[1]=a[1].point[1]=a[2].v[0]*(0,i.sin)(d))];return function(e,t){var n,r=(0,i.sin)(t),u=(0,i.cos)(t),c=new Array(3);for(n=0;n<3;++n){var d=a[n];if(c[n]=o(t-d[1],d[3],d[2],u,r,e-d[0]),!c[n][0])return d.point;c[n][1]=l(c[n][1]-d.v[1])}var g=h.slice();for(n=0;n<3;++n){var m=2==n?0:n+1,y=s(a[n].v[0],c[n][0],c[m][0]);c[n][1]<0&&(y=-y),n?1==n?(y=f-y,g[0]-=c[n][0]*(0,i.cos)(y),g[1]-=c[n][0]*(0,i.sin)(y)):(y=p-y,g[0]+=c[n][0]*(0,i.cos)(y),g[1]+=c[n][0]*(0,i.sin)(y)):(g[0]+=c[n][0]*(0,i.cos)(y),g[1]-=c[n][0]*(0,i.sin)(y))}return g[0]/=3,g[1]/=3,g}}function c(e){return e[0]*=i.radians,e[1]*=i.radians,e}function d(){return f([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function f(e,t,n){var i=(0,r.geoCentroid)({type:"MultiPoint",coordinates:[e,t,n]}),o=[-i[0],-i[1]],s=(0,r.geoRotation)(o),l=u(c(s(e)),c(s(t)),c(s(n)));l.invert=(0,a.solve2d)(l);var d=(0,r.geoProjection)(l).rotate(o),f=d.center;return delete d.rotate,d.center=function(e){return arguments.length?f(s(e)):s.invert(f())},d.clipAngle(90)}},8077:(e,t,n)=>{"use strict";n.r(t),n.d(t,{collignonRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.sqrt)(1-(0,i.sin)(t));return[2/i.sqrtPi*e*n,i.sqrtPi*(1-n)]}function o(){return(0,r.geoProjection)(a).scale(95.6464).center([0,30])}a.invert=function(e,t){var n=(n=t/i.sqrtPi-1)*n;return[n>0?e*(0,i.sqrt)(i.pi/n)/2:0,(0,i.asin)(1-n)]}},34924:(e,t,n)=>{"use strict";n.r(t),n.d(t,{craigRaw:()=>a,default:()=>o});var r=n(28184),i=n(66462);function a(e){var t=(0,r.tan)(e);function n(e,n){return[e,(e?e/(0,r.sin)(e):1)*((0,r.sin)(n)*(0,r.cos)(e)-t*(0,r.cos)(n))]}return n.invert=t?function(e,n){e&&(n*=(0,r.sin)(e)/e);var i=(0,r.cos)(e);return[e,2*(0,r.atan2)((0,r.sqrt)(i*i+t*t-n*n)-i,t-n)]}:function(e,t){return[e,(0,r.asin)(e?t*(0,r.tan)(e)/e:t)]},n}function o(){return(0,i.default)(a).scale(249.828).clipAngle(90)}},27884:(e,t,n)=>{"use strict";n.r(t),n.d(t,{crasterRaw:()=>o,default:()=>s});var r=n(51300),i=n(28184),a=(0,i.sqrt)(3);function o(e,t){return[a*e*(2*(0,i.cos)(2*t/3)-1)/i.sqrtPi,a*i.sqrtPi*(0,i.sin)(t/3)]}function s(){return(0,r.geoProjection)(o).scale(156.19)}o.invert=function(e,t){var n=3*(0,i.asin)(t/(a*i.sqrtPi));return[i.sqrtPi*e/(a*(2*(0,i.cos)(2*n/3)-1)),n]}},2311:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cylindricalEqualAreaRaw:()=>a,default:()=>o});var r=n(28184),i=n(66462);function a(e){var t=(0,r.cos)(e);function n(e,n){return[e*t,(0,r.sin)(n)/t]}return n.invert=function(e,n){return[e/t,(0,r.asin)(n*t)]},n}function o(){return(0,i.default)(a).parallel(38.58).scale(195.044)}},4286:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cylindricalStereographicRaw:()=>a,default:()=>o});var r=n(28184),i=n(66462);function a(e){var t=(0,r.cos)(e);function n(e,n){return[e*t,(1+t)*(0,r.tan)(n/2)]}return n.invert=function(e,n){return[e/t,2*(0,r.atan)(n/(1+t))]},n}function o(){return(0,i.default)(a).scale(124.75)}},76745:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert1Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.sqrt)(8/(3*i.pi));return[n*e*(1-(0,i.abs)(t)/i.pi),n*t]}function o(){return(0,r.geoProjection)(a).scale(165.664)}a.invert=function(e,t){var n=(0,i.sqrt)(8/(3*i.pi)),r=t/n;return[e/(n*(1-(0,i.abs)(r)/i.pi)),r]}},43792:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert2Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.sqrt)(4-3*(0,i.sin)((0,i.abs)(t)));return[2/(0,i.sqrt)(6*i.pi)*e*n,(0,i.sign)(t)*(0,i.sqrt)(2*i.pi/3)*(2-n)]}function o(){return(0,r.geoProjection)(a).scale(165.664)}a.invert=function(e,t){var n=2-(0,i.abs)(t)/(0,i.sqrt)(2*i.pi/3);return[e*(0,i.sqrt)(6*i.pi)/(2*n),(0,i.sign)(t)*(0,i.asin)((4-n*n)/3)]}},67943:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert3Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.sqrt)(i.pi*(4+i.pi));return[2/n*e*(1+(0,i.sqrt)(1-4*t*t/(i.pi*i.pi))),4/n*t]}function o(){return(0,r.geoProjection)(a).scale(180.739)}a.invert=function(e,t){var n=(0,i.sqrt)(i.pi*(4+i.pi))/2;return[e*n/(1+(0,i.sqrt)(1-t*t*(4+i.pi)/(4*i.pi))),t*n/2]}},48262:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert4Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(2+i.halfPi)*(0,i.sin)(t);t/=2;for(var r=0,a=1/0;r<10&&(0,i.abs)(a)>i.epsilon;r++){var o=(0,i.cos)(t);t-=a=(t+(0,i.sin)(t)*(o+2)-n)/(2*o*(1+o))}return[2/(0,i.sqrt)(i.pi*(4+i.pi))*e*(1+(0,i.cos)(t)),2*(0,i.sqrt)(i.pi/(4+i.pi))*(0,i.sin)(t)]}function o(){return(0,r.geoProjection)(a).scale(180.739)}a.invert=function(e,t){var n=t*(0,i.sqrt)((4+i.pi)/i.pi)/2,r=(0,i.asin)(n),a=(0,i.cos)(r);return[e/(2/(0,i.sqrt)(i.pi*(4+i.pi))*(1+a)),(0,i.asin)((r+n*(a+2))/(2+i.halfPi))]}},16005:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert5Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[e*(1+(0,i.cos)(t))/(0,i.sqrt)(2+i.pi),2*t/(0,i.sqrt)(2+i.pi)]}function o(){return(0,r.geoProjection)(a).scale(173.044)}a.invert=function(e,t){var n=(0,i.sqrt)(2+i.pi),r=t*n/2;return[n*e/(1+(0,i.cos)(r)),r]}},86268:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert6Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){for(var n=(1+i.halfPi)*(0,i.sin)(t),r=0,a=1/0;r<10&&(0,i.abs)(a)>i.epsilon;r++)t-=a=(t+(0,i.sin)(t)-n)/(1+(0,i.cos)(t));return n=(0,i.sqrt)(2+i.pi),[e*(1+(0,i.cos)(t))/n,2*t/n]}function o(){return(0,r.geoProjection)(a).scale(173.044)}a.invert=function(e,t){var n=1+i.halfPi,r=(0,i.sqrt)(n/2);return[2*e*r/(1+(0,i.cos)(t*=r)),(0,i.asin)((t+(0,i.sin)(t))/n)]}},65275:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,eisenlohrRaw:()=>s});var r=n(51300),i=n(70063),a=n(28184),o=3+2*a.sqrt2;function s(e,t){var n=(0,a.sin)(e/=2),r=(0,a.cos)(e),i=(0,a.sqrt)((0,a.cos)(t)),s=(0,a.cos)(t/=2),l=(0,a.sin)(t)/(s+a.sqrt2*r*i),u=(0,a.sqrt)(2/(1+l*l)),c=(0,a.sqrt)((a.sqrt2*s+(r+n)*i)/(a.sqrt2*s+(r-n)*i));return[o*(u*(c-1/c)-2*(0,a.log)(c)),o*(u*l*(c+1/c)-2*(0,a.atan)(l))]}function l(){return(0,r.geoProjection)(s).scale(62.5271)}s.invert=function(e,t){if(!(n=i.augustRaw.invert(e/1.2,1.065*t)))return null;var n,r=n[0],s=n[1],l=20;e/=o,t/=o;do{var u=r/2,c=s/2,d=(0,a.sin)(u),f=(0,a.cos)(u),p=(0,a.sin)(c),h=(0,a.cos)(c),g=(0,a.cos)(s),m=(0,a.sqrt)(g),y=p/(h+a.sqrt2*f*m),v=y*y,b=(0,a.sqrt)(2/(1+v)),w=(a.sqrt2*h+(f+d)*m)/(a.sqrt2*h+(f-d)*m),x=(0,a.sqrt)(w),E=x-1/x,S=x+1/x,_=b*E-2*(0,a.log)(x)-e,A=b*y*S-2*(0,a.atan)(y)-t,C=p&&a.sqrt1_2*m*d*v/p,T=(a.sqrt2*f*h+m)/(2*(h+a.sqrt2*f*m)*(h+a.sqrt2*f*m)*m),k=-.5*y*b*b*b,R=k*C,D=k*T,O=(O=2*h+a.sqrt2*m*(f-d))*O*x,N=(a.sqrt2*f*h*m+g)/O,F=-a.sqrt2*d*p/(m*O),P=E*R-2*N/x+b*(N+N/w),M=E*D-2*F/x+b*(F+F/w),I=y*S*R-2*C/(1+v)+b*S*C+b*y*(N-N/w),$=y*S*D-2*T/(1+v)+b*S*T+b*y*(F-F/w),L=M*I-$*P;if(!L)break;var B=(A*M-_*$)/L,U=(_*I-A*P)/L;r-=B,s=(0,a.max)(-a.halfPi,(0,a.min)(a.halfPi,s-U))}while(((0,a.abs)(B)>a.epsilon||(0,a.abs)(U)>a.epsilon)&&--l>0);return(0,a.abs)((0,a.abs)(s)-a.halfPi){"use strict";n.r(t),n.d(t,{ellipticF:()=>s,ellipticFi:()=>o,ellipticJ:()=>a,ellipticJi:()=>i});var r=n(28184);function i(e,t,n){var r,i,o;return e?(r=a(e,n),t?(o=(i=a(t,1-n))[1]*i[1]+n*r[0]*r[0]*i[0]*i[0],[[r[0]*i[2]/o,r[1]*r[2]*i[0]*i[1]/o],[r[1]*i[1]/o,-r[0]*r[2]*i[0]*i[2]/o],[r[2]*i[1]*i[2]/o,-n*r[0]*r[1]*i[0]/o]]):[[r[0],0],[r[1],0],[r[2],0]]):[[0,(i=a(t,1-n))[0]/i[1]],[1/i[1],0],[i[2]/i[1],0]]}function a(e,t){var n,i,a,o,s;if(t=1-r.epsilon)return n=(1-t)/4,a=1/(i=(0,r.cosh)(e)),[(o=(0,r.tanh)(e))+n*((s=i*(0,r.sinh)(e))-e)/(i*i),a-n*o*a*(s-e),a+n*o*a*(s+e),2*(0,r.atan)((0,r.exp)(e))-r.halfPi+n*(s-e)/i];var l=[1,0,0,0,0,0,0,0,0],u=[(0,r.sqrt)(t),0,0,0,0,0,0,0,0],c=0;for(i=(0,r.sqrt)(1-t),s=1;(0,r.abs)(u[c]/l[c])>r.epsilon&&c<8;)n=l[c++],u[c]=(n-i)/2,l[c]=(n+i)/2,i=(0,r.sqrt)(n*i),s*=2;a=s*l[c]*e;do{o=u[c]*(0,r.sin)(i=a)/l[c],a=((0,r.asin)(o)+a)/2}while(--c);return[(0,r.sin)(a),o=(0,r.cos)(a),o/(0,r.cos)(a-i),a]}function o(e,t,n){var i=(0,r.abs)(e),a=(0,r.abs)(t),o=(0,r.sinh)(a);if(i){var l=1/(0,r.sin)(i),u=1/((0,r.tan)(i)*(0,r.tan)(i)),c=-(u+n*(o*o*l*l)-1+n),d=(n-1)*u,f=(-c+(0,r.sqrt)(c*c-4*d))/2;return[s((0,r.atan)(1/(0,r.sqrt)(f)),n)*(0,r.sign)(e),s((0,r.atan)((0,r.sqrt)((f/u-1)/n)),1-n)*(0,r.sign)(t)]}return[0,s((0,r.atan)(o),1-n)*(0,r.sign)(t)]}function s(e,t){if(!t)return e;if(1===t)return(0,r.log)((0,r.tan)(e/2+r.quarterPi));for(var n=1,i=(0,r.sqrt)(1-t),a=(0,r.sqrt)(t),o=0;(0,r.abs)(a)>r.epsilon;o++){if(e%r.pi){var s=(0,r.atan)(i*(0,r.tan)(e)/n);s<0&&(s+=r.pi),e+=s+~~(e/r.pi)*r.pi}else e+=e;a=(n+i)/2,i=(0,r.sqrt)(n*i),a=((n=a)-i)/2}return e/((0,r.pow)(2,o)*n)}},71969:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,faheyRaw:()=>o});var r=n(51300),i=n(28184),a=(0,i.cos)(35*i.radians);function o(e,t){var n=(0,i.tan)(t/2);return[e*a*(0,i.sqrt)(1-n*n),(1+a)*n]}function s(){return(0,r.geoProjection)(o).scale(137.152)}o.invert=function(e,t){var n=t/(1+a);return[e&&e/(a*(0,i.sqrt)(1-n*n)),2*(0,i.atan)(n)]}},65451:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,foucautRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=t/2,r=(0,i.cos)(n);return[2*e/i.sqrtPi*(0,i.cos)(t)*r*r,i.sqrtPi*(0,i.tan)(n)]}function o(){return(0,r.geoProjection)(a).scale(135.264)}a.invert=function(e,t){var n=(0,i.atan)(t/i.sqrtPi),r=(0,i.cos)(n),a=2*n;return[e*i.sqrtPi/2/((0,i.cos)(a)*r*r),a]}},24104:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,foucautSinusoidalRaw:()=>o});var r=n(51300),i=n(28184),a=n(11209);function o(e){var t=1-e,n=s(i.pi,0)[0]-s(-i.pi,0)[0],r=s(0,i.halfPi)[1]-s(0,-i.halfPi)[1],o=(0,i.sqrt)(2*r/n);function s(n,r){var a=(0,i.cos)(r),o=(0,i.sin)(r);return[a/(t+e*a)*n,t*r+e*o]}function l(e,t){var n=s(e,t);return[n[0]*o,n[1]/o]}function u(e){return l(0,e)[1]}return l.invert=function(n,r){var s=(0,a.solve)(u,r);return[n/o*(e+t/(0,i.cos)(s)),s]},l}function s(){var e=.5,t=(0,r.geoProjectionMutator)(o),n=t(e);return n.alpha=function(n){return arguments.length?t(e=+n):e},n.scale(168.725)}},91615:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(51300),i=n(28184);function a(e){return[e[0]/2,(0,i.asin)((0,i.tan)(e[1]/2*i.radians))*i.degrees]}function o(e){return[2*e[0],2*(0,i.atan)((0,i.sin)(e[1]*i.radians))*i.degrees]}function s(e){null==e&&(e=r.geoOrthographic);var t=e(),n=(0,r.geoEquirectangular)().scale(i.degrees).precision(0).clipAngle(null).translate([0,0]);function s(e){return t(a(e))}function l(e){s[e]=function(){return arguments.length?(t[e].apply(t,arguments),s):t[e]()}}return t.invert&&(s.invert=function(e){return o(t.invert(e))}),s.stream=function(e){var r=t.stream(e),a=n.stream({point:function(e,t){r.point(e/2,(0,i.asin)((0,i.tan)(-t/2*i.radians))*i.degrees)},lineStart:function(){r.lineStart()},lineEnd:function(){r.lineEnd()},polygonStart:function(){r.polygonStart()},polygonEnd:function(){r.polygonEnd()}});return a.sphere=r.sphere,a},s.rotate=function(e){return arguments.length?(n.rotate(e),s):n.rotate()},s.center=function(e){return arguments.length?(t.center(a(e)),s):o(t.center())},l("angle"),l("clipAngle"),l("clipExtent"),l("fitExtent"),l("fitHeight"),l("fitSize"),l("fitWidth"),l("scale"),l("translate"),l("precision"),s.scale(249.5)}},73087:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,gingeryRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=2*i.pi/t,a=e*e;function l(t,l){var u=(0,r.geoAzimuthalEquidistantRaw)(t,l),c=u[0],d=u[1],f=c*c+d*d;if(f>a){var p=(0,i.sqrt)(f),h=(0,i.atan2)(d,c),g=n*(0,i.round)(h/n),m=h-g,y=e*(0,i.cos)(m),v=(e*(0,i.sin)(m)-m*(0,i.sin)(y))/(i.halfPi-y),b=o(m,v),w=(i.pi-e)/s(b,y,i.pi);c=p;var x,E=50;do{c-=x=(e+s(b,y,c)*w-p)/(b(c)*w)}while((0,i.abs)(x)>i.epsilon&&--E>0);d=m*(0,i.sin)(c),ca){var c=(0,i.sqrt)(u),d=(0,i.atan2)(l,t),f=n*(0,i.round)(d/n),p=d-f;t=c*(0,i.cos)(p),l=c*(0,i.sin)(p);for(var h=t-i.halfPi,g=(0,i.sin)(t),m=l/g,y=t{"use strict";n.r(t),n.d(t,{default:()=>a,ginzburg4Raw:()=>i});var r=n(51300),i=(0,n(4432).default)(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function a(){return(0,r.geoProjection)(i).scale(149.995)}},84621:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,ginzburg5Raw:()=>i});var r=n(51300),i=(0,n(4432).default)(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function a(){return(0,r.geoProjection)(i).scale(153.93)}},2564:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,ginzburg6Raw:()=>o});var r=n(51300),i=n(4432),a=n(28184),o=(0,i.default)(5/6*a.pi,-.62636,-.0344,0,1.3493,-.05524,0,.045);function s(){return(0,r.geoProjection)(o).scale(130.945)}},87418:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,ginzburg8Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=e*e,r=t*t;return[e*(1-.162388*r)*(.87-952426e-9*n*n),t*(1+r/12)]}function o(){return(0,r.geoProjection)(a).scale(131.747)}a.invert=function(e,t){var n,r=e,a=t,o=50;do{var s=a*a;a-=n=(a*(1+s/12)-t)/(1+s/4)}while((0,i.abs)(n)>i.epsilon&&--o>0);o=50,e/=1-.162388*s;do{var l=(l=r*r)*l;r-=n=(r*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while((0,i.abs)(n)>i.epsilon&&--o>0);return[r,a]}},18281:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,ginzburg9Raw:()=>i});var r=n(51300),i=(0,n(4432).default)(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function a(){return(0,r.geoProjection)(i).scale(131.087)}},4432:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(28184);function i(e,t,n,i,a,o,s,l){function u(u,c){if(!c)return[e*u/r.pi,0];var d=c*c,f=e+d*(t+d*(n+d*i)),p=c*(a-1+d*(o-l+d*s)),h=(f*f+p*p)/(2*p),g=u*(0,r.asin)(f/h)/r.pi;return[h*(0,r.sin)(g),c*(1+d*l)+h*(1-(0,r.cos)(g))]}return arguments.length<8&&(l=0),u.invert=function(u,c){var d,f,p=r.pi*u/e,h=c,g=50;do{var m=h*h,y=e+m*(t+m*(n+m*i)),v=h*(a-1+m*(o-l+m*s)),b=y*y+v*v,w=2*v,x=b/w,E=x*x,S=(0,r.asin)(y/x)/r.pi,_=p*S,A=y*y,C=(2*t+m*(4*n+6*m*i))*h,T=a+m*(3*o+5*m*s),k=(2*(y*C+v*(T-1))*w-b*(2*(T-1)))/(w*w),R=(0,r.cos)(_),D=(0,r.sin)(_),O=x*R,N=x*D,F=p/r.pi*(1/(0,r.sqrt)(1-A/E))*(C*x-y*k)/E,P=N-u,M=h*(1+m*l)+x-O-c,I=k*D+O*F,$=O*S,L=1+k-(k*R-N*F),B=N*S,U=I*B-L*$;if(!U)break;p-=d=(M*I-P*L)/U,h-=f=(P*B-M*$)/U}while(((0,r.abs)(d)>r.epsilon||(0,r.abs)(f)>r.epsilon)&&--g>0);return[p,h]},u}},43915:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,gringortenRaw:()=>o});var r=n(51300),i=n(28184),a=n(73853);function o(e,t){var n=(0,i.sign)(e),r=(0,i.sign)(t),a=(0,i.cos)(t),o=(0,i.cos)(e)*a,s=(0,i.sin)(e)*a,l=(0,i.sin)(r*t);e=(0,i.abs)((0,i.atan2)(s,l)),t=(0,i.asin)(o),(0,i.abs)(e-i.halfPi)>i.epsilon&&(e%=i.halfPi);var u=function(e,t){if(t===i.halfPi)return[0,0];var n,r,a=(0,i.sin)(t),o=a*a,s=o*o,l=1+s,u=1+3*s,c=1-s,d=(0,i.asin)(1/(0,i.sqrt)(l)),f=c+o*l*d,p=(1-a)/f,h=(0,i.sqrt)(p),g=p*l,m=(0,i.sqrt)(g),y=h*c;if(0===e)return[0,-(y+o*m)];var v,b=(0,i.cos)(t),w=1/b,x=2*a*b,E=(-f*b-(1-a)*((-3*o+d*u)*x))/(f*f),S=-w*x,_=-w*(o*l*E+p*u*x),A=-2*w*(c*(.5*E/h)-2*o*h*x),C=4*e/i.pi;if(e>.222*i.pi||t.175*i.pi){if(n=(y+o*(0,i.sqrt)(g*(1+s)-y*y))/(1+s),e>i.pi/4)return[n,n];var T=n,k=.5*n;n=.5*(k+T),r=50;do{var R=n*(A+S*(0,i.sqrt)(g-n*n))+_*(0,i.asin)(n/m)-C;if(!R)break;R<0?k=n:T=n,n=.5*(k+T)}while((0,i.abs)(T-k)>i.epsilon&&--r>0)}else{n=i.epsilon,r=25;do{var D=n*n,O=(0,i.sqrt)(g-D),N=A+S*O,F=n*N+_*(0,i.asin)(n/m)-C;n-=v=O?F/(N+(_-S*D)/O):0}while((0,i.abs)(v)>i.epsilon&&--r>0)}return[n,-y-o*(0,i.sqrt)(g-n*n)]}(e>i.pi/4?i.halfPi-e:e,t);return e>i.pi/4&&(l=u[0],u[0]=-u[1],u[1]=-l),u[0]*=n,u[1]*=-r,u}function s(){return(0,r.geoProjection)((0,a.default)(o)).scale(239.75)}o.invert=function(e,t){(0,i.abs)(e)>1&&(e=2*(0,i.sign)(e)-e),(0,i.abs)(t)>1&&(t=2*(0,i.sign)(t)-t);var n=(0,i.sign)(e),r=(0,i.sign)(t),a=-n*e,o=-r*t,s=o/a<1,l=function(e,t){for(var n=0,r=1,a=.5,o=50;;){var s=a*a,l=(0,i.sqrt)(a),u=(0,i.asin)(1/(0,i.sqrt)(1+s)),c=1-s+a*(1+s)*u,d=(1-l)/c,f=(0,i.sqrt)(d),p=d*(1+s),h=f*(1-s),g=p-e*e,m=(0,i.sqrt)(g),y=t+h+a*m;if((0,i.abs)(r-n)0?n=a:r=a,a=.5*(n+r)}if(!o)return null;var v=(0,i.asin)(l),b=(0,i.cos)(v),w=1/b,x=2*l*b,E=(-c*b-(-3*a+u*(1+3*s))*x*(1-l))/(c*c),S=-2*w*((1-s)*(.5*E/f)-2*a*f*x),_=-w*x,A=-w*(a*(1+s)*E+d*(1+3*s)*x);return[i.pi/4*(e*(S+_*m)+A*(0,i.asin)(e/(0,i.sqrt)(p))),v]}(s?o:a,s?a:o),u=l[0],c=l[1],d=(0,i.cos)(c);return s&&(u=-i.halfPi-u),[n*((0,i.atan2)((0,i.sin)(u)*d,-(0,i.sin)(c))+i.pi),r*(0,i.asin)((0,i.cos)(u)*d)]}},64035:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,guyouRaw:()=>s});var r=n(51300),i=n(46764),a=n(28184),o=n(73853);function s(e,t){var n=(a.sqrt2-1)/(a.sqrt2+1),r=(0,a.sqrt)(1-n*n),o=(0,i.ellipticF)(a.halfPi,r*r),s=(0,a.log)((0,a.tan)(a.pi/4+(0,a.abs)(t)/2)),l=(0,a.exp)(-1*s)/(0,a.sqrt)(n),u=function(e,t){var n=e*e,r=t+1,i=1-n-t*t;return[.5*((e>=0?a.halfPi:-a.halfPi)-(0,a.atan2)(i,2*e)),-.25*(0,a.log)(i*i+4*n)+.5*(0,a.log)(r*r+n)]}(l*(0,a.cos)(-1*e),l*(0,a.sin)(-1*e)),c=(0,i.ellipticFi)(u[0],u[1],r*r);return[-c[1],(t>=0?1:-1)*(.5*o-c[0])]}function l(){return(0,r.geoProjection)((0,o.default)(s)).scale(151.496)}s.invert=function(e,t){var n,r,o,s=(a.sqrt2-1)/(a.sqrt2+1),l=(0,a.sqrt)(1-s*s),u=(0,i.ellipticF)(a.halfPi,l*l),c=(0,i.ellipticJi)(.5*u-t,-e,l*l),d=(n=c[0],o=(r=c[1])[0]*r[0]+r[1]*r[1],[(n[0]*r[0]+n[1]*r[1])/o,(n[1]*r[0]-n[0]*r[1])/o]);return[(0,a.atan2)(d[1],d[0])/-1,2*(0,a.atan)((0,a.exp)(-.5*(0,a.log)(s*d[0]*d[0]+s*d[1]*d[1])))-a.halfPi]}},72304:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,hammerRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if(arguments.length<2&&(t=e),1===t)return r.geoAzimuthalEqualAreaRaw;if(t===1/0)return o;function n(n,i){var a=(0,r.geoAzimuthalEqualAreaRaw)(n/t,i);return a[0]*=e,a}return n.invert=function(n,i){var a=r.geoAzimuthalEqualAreaRaw.invert(n/e,i);return a[0]*=t,a},n}function o(e,t){return[e*(0,i.cos)(t)/(0,i.cos)(t/=2),2*(0,i.sin)(t)]}function s(){var e=2,t=(0,r.geoProjectionMutator)(a),n=t(e);return n.coefficient=function(n){return arguments.length?t(e=+n):e},n.scale(169.529)}o.invert=function(e,t){var n=2*(0,i.asin)(t/2);return[e*(0,i.cos)(n/2)/(0,i.cos)(n),n]}},62629:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,hammerRetroazimuthalRaw:()=>a});var r=n(51300),i=n(28184);function a(e){var t=(0,i.sin)(e),n=(0,i.cos)(e),r=o(e);function a(e,a){var o=r(e,a);e=o[0],a=o[1];var s=(0,i.sin)(a),l=(0,i.cos)(a),u=(0,i.cos)(e),c=(0,i.acos)(t*s+n*l*u),d=(0,i.sin)(c),f=(0,i.abs)(d)>i.epsilon?c/d:1;return[f*n*(0,i.sin)(e),((0,i.abs)(e)>i.halfPi?f:-f)*(t*l-n*s*u)]}return r.invert=o(-e),a.invert=function(e,n){var a=(0,i.sqrt)(e*e+n*n),o=-(0,i.sin)(a),s=(0,i.cos)(a),l=a*s,u=-n*o,c=a*t,d=(0,i.sqrt)(l*l+u*u-c*c),f=(0,i.atan2)(l*c+u*d,u*c-l*d),p=(a>i.halfPi?-1:1)*(0,i.atan2)(e*o,a*(0,i.cos)(f)*s+n*(0,i.sin)(f)*o);return r.invert(p,f)},a}function o(e){var t=(0,i.sin)(e),n=(0,i.cos)(e);return function(e,r){var a=(0,i.cos)(r),o=(0,i.cos)(e)*a,s=(0,i.sin)(e)*a,l=(0,i.sin)(r);return[(0,i.atan2)(s,o*n-l*t),(0,i.asin)(l*n+o*t)]}}function s(){var e=0,t=(0,r.geoProjectionMutator)(a),n=t(e),o=n.rotate,s=n.stream,l=(0,r.geoCircle)();return n.parallel=function(r){if(!arguments.length)return e*i.degrees;var a=n.rotate();return t(e=r*i.radians).rotate(a)},n.rotate=function(t){return arguments.length?(o.call(n,[t[0],t[1]-e*i.degrees]),l.center([-t[0],-t[1]]),n):((t=o.call(n))[1]+=e*i.degrees,t)},n.stream=function(e){return(e=s(e)).sphere=function(){e.polygonStart();var t,n=l.radius(89.99)().coordinates[0],r=n.length-1,i=-1;for(e.lineStart();++i=0;)e.point((t=n[i])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},n.scale(79.4187).parallel(45).clipAngle(179.999)}},20299:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h,healpixRaw:()=>c});var r=n(61388),i=n(51300),a=n(8077),o=n(2311),s=n(28184),l=(0,s.asin)(1-1/3)*s.degrees,u=(0,o.cylindricalEqualAreaRaw)(0);function c(e){var t=l*s.radians,n=(0,a.collignonRaw)(s.pi,t)[0]-(0,a.collignonRaw)(-s.pi,t)[0],r=u(0,t)[1],i=(0,a.collignonRaw)(0,t)[1],o=s.sqrtPi-i,c=s.tau/e,d=4/s.tau,f=r+o*o*4/s.tau;function p(l,p){var h,g=(0,s.abs)(p);if(g>t){var m=(0,s.min)(e-1,(0,s.max)(0,(0,s.floor)((l+s.pi)/c)));l+=s.pi*(e-1)/e-m*c,(h=(0,a.collignonRaw)(l,g))[0]=h[0]*s.tau/n-s.tau*(e-1)/(2*e)+m*s.tau/e,h[1]=r+4*(h[1]-i)*o/s.tau,p<0&&(h[1]=-h[1])}else h=u(l,p);return h[0]*=d,h[1]/=f,h}return p.invert=function(t,l){t/=d,l*=f;var p=(0,s.abs)(l);if(p>r){var h=(0,s.min)(e-1,(0,s.max)(0,(0,s.floor)((t+s.pi)/c)));t=(t+s.pi*(e-1)/e-h*c)*n/s.tau;var g=a.collignonRaw.invert(t,.25*(p-r)*s.tau/o+i);return g[0]-=s.pi*(e-1)/e-h*c,l<0&&(g[1]=-g[1]),g}return u.invert(t,l)},p}function d(e,t){return[e,1&t?90-s.epsilon:l]}function f(e,t){return[e,1&t?-90+s.epsilon:-l]}function p(e){return[e[0]*(1-s.epsilon),e[1]]}function h(){var e=4,t=(0,i.geoProjectionMutator)(c),n=t(e),a=n.stream;return n.lobes=function(n){return arguments.length?t(e=+n):e},n.stream=function(t){var o=n.rotate(),s=a(t),l=(n.rotate([0,0]),a(t));return n.rotate(o),s.sphere=function(){var t,n;(0,i.geoStream)((t=180/e,n=[].concat((0,r.range)(-180,180+t/2,t).map(d),(0,r.range)(180,-180-t/2,-t).map(f)),{type:"Polygon",coordinates:[180===t?n.map(p):n]}),l)},s},n.scale(239.75)}},59513:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,hillRaw:()=>a});var r=n(51300),i=n(28184);function a(e){var t,n=1+e,r=(0,i.sin)(1/n),a=(0,i.asin)(r),o=2*(0,i.sqrt)(i.pi/(t=i.pi+4*a*n)),s=.5*o*(n+(0,i.sqrt)(e*(2+e))),l=e*e,u=n*n;function c(r,c){var d,f,p=1-(0,i.sin)(c);if(p&&p<2){var h,g=i.halfPi-c,m=25;do{var y=(0,i.sin)(g),v=(0,i.cos)(g),b=a+(0,i.atan2)(y,n-v),w=1+u-2*n*v;g-=h=(g-l*a-n*y+w*b-.5*p*t)/(2*n*y*b)}while((0,i.abs)(h)>i.epsilon2&&--m>0);d=o*(0,i.sqrt)(w),f=r*b/i.pi}else d=o*(e+p),f=r*a/i.pi;return[d*(0,i.sin)(f),s-d*(0,i.cos)(f)]}return c.invert=function(e,r){var c=e*e+(r-=s)*r,d=(1+u-c/(o*o))/(2*n),f=(0,i.acos)(d),p=(0,i.sin)(f),h=a+(0,i.atan2)(p,n-d);return[(0,i.asin)(e/(0,i.sqrt)(c))*i.pi/h,(0,i.asin)(1-2*(f-l*a-n*p+(1+u-2*n*d)*h)/t)]},c}function o(){var e=1,t=(0,r.geoProjectionMutator)(a),n=t(e);return n.ratio=function(n){return arguments.length?t(e=+n):e},n.scale(167.774).center([0,18.67])}},97927:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,homolosineRaw:()=>l});var r=n(51300),i=n(28184),a=n(88860),o=n(85801),s=n(87963);function l(e,t){return(0,i.abs)(t)>s.sinuMollweidePhi?((e=(0,a.mollweideRaw)(e,t))[1]-=t>0?s.sinuMollweideY:-s.sinuMollweideY,e):(0,o.sinusoidalRaw)(e,t)}function u(){return(0,r.geoProjection)(l).scale(152.63)}l.invert=function(e,t){return(0,i.abs)(t)>s.sinuMollweidePhi?a.mollweideRaw.invert(e,t+(t>0?s.sinuMollweideY:-s.sinuMollweideY)):o.sinusoidalRaw.invert(e,t)}},63660:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,hufnagelRaw:()=>o});var r=n(51300),i=n(28184),a=n(11209);function o(e,t,n,r){var o=(0,i.sqrt)(4*i.pi/(2*n+(1+e-t/2)*(0,i.sin)(2*n)+(e+t)/2*(0,i.sin)(4*n)+t/2*(0,i.sin)(6*n))),s=(0,i.sqrt)(r*(0,i.sin)(n)*(0,i.sqrt)((1+e*(0,i.cos)(2*n)+t*(0,i.cos)(4*n))/(1+e+t))),l=n*c(1);function u(n){return(0,i.sqrt)(1+e*(0,i.cos)(2*n)+t*(0,i.cos)(4*n))}function c(r){var a=r*n;return(2*a+(1+e-t/2)*(0,i.sin)(2*a)+(e+t)/2*(0,i.sin)(4*a)+t/2*(0,i.sin)(6*a))/n}function d(e){return u(e)*(0,i.sin)(e)}var f=function(e,t){var r=n*(0,a.solve)(c,l*(0,i.sin)(t)/n,t/i.pi);isNaN(r)&&(r=n*(0,i.sign)(t));var d=o*u(r);return[d*s*e/i.pi*(0,i.cos)(r),d/s*(0,i.sin)(r)]};return f.invert=function(e,t){var r=(0,a.solve)(d,t*s/o);return[e*i.pi/((0,i.cos)(r)*o*s*u(r)),(0,i.asin)(n*c(r/n)/l)]},0===n&&(o=(0,i.sqrt)(r/i.pi),(f=function(e,t){return[e*o,(0,i.sin)(t)/o]}).invert=function(e,t){return[e/o,(0,i.asin)(t*o)]}),f}function s(){var e=1,t=0,n=45*i.radians,a=2,s=(0,r.geoProjectionMutator)(o),l=s(e,t,n,a);return l.a=function(r){return arguments.length?s(e=+r,t,n,a):e},l.b=function(r){return arguments.length?s(e,t=+r,n,a):t},l.psiMax=function(r){return arguments.length?s(e,t,n=+r*i.radians,a):n*i.degrees},l.ratio=function(r){return arguments.length?s(e,t,n,a=+r):a},l.scale(180.739)}},36081:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,hyperellipticalRaw:()=>o});var r=n(51300),i=n(28184),a=n(38331);function o(e,t,n){function r(n){return e+(1-e)*(0,i.pow)(1-(0,i.pow)(n,t),1/t)}function o(e){return(0,a.integrate)(r,0,e,1e-4)}for(var s=1/o(1),l=1e3,u=(1+1e-8)*s,c=[],d=0;d<=l;d++)c.push(o(d/l)*u);function f(e){var t=0,n=l,r=500;do{c[r]>e?n=r:t=r,r=t+n>>1}while(r>t);var i=c[r+1]-c[r];return i&&(i=(e-c[r+1])/i),(r+1+i)/l}var p=2*f(1)/i.pi*s/n,h=function(e,t){var n=f((0,i.abs)((0,i.sin)(t))),a=r(n)*e;return n/=p,[a,t>=0?n:-n]};return h.invert=function(e,t){var n;return t*=p,(0,i.abs)(t)<1&&(n=(0,i.sign)(t)*(0,i.asin)(o((0,i.abs)(t))*s)),[e/r((0,i.abs)(t)),n]},h}function s(){var e=0,t=2.5,n=1.183136,i=(0,r.geoProjectionMutator)(o),a=i(e,t,n);return a.alpha=function(r){return arguments.length?i(e=+r,t,n):e},a.k=function(r){return arguments.length?i(e,t=+r,n):t},a.gamma=function(r){return arguments.length?i(e,t,n=+r):n},a.scale(152.63)}},96108:(e,t,n)=>{"use strict";n.r(t),n.d(t,{geoAiry:()=>r.default,geoAiryRaw:()=>r.airyRaw,geoAitoff:()=>i.default,geoAitoffRaw:()=>i.aitoffRaw,geoArmadillo:()=>a.default,geoArmadilloRaw:()=>a.armadilloRaw,geoAugust:()=>o.default,geoAugustRaw:()=>o.augustRaw,geoBaker:()=>s.default,geoBakerRaw:()=>s.bakerRaw,geoBerghaus:()=>l.default,geoBerghausRaw:()=>l.berghausRaw,geoBertin1953:()=>u.default,geoBertin1953Raw:()=>u.bertin1953Raw,geoBoggs:()=>c.default,geoBoggsRaw:()=>c.boggsRaw,geoBonne:()=>d.default,geoBonneRaw:()=>d.bonneRaw,geoBottomley:()=>f.default,geoBottomleyRaw:()=>f.bottomleyRaw,geoBromley:()=>p.default,geoBromleyRaw:()=>p.bromleyRaw,geoChamberlin:()=>h.default,geoChamberlinAfrica:()=>h.chamberlinAfrica,geoChamberlinRaw:()=>h.chamberlinRaw,geoCollignon:()=>g.default,geoCollignonRaw:()=>g.collignonRaw,geoCraig:()=>m.default,geoCraigRaw:()=>m.craigRaw,geoCraster:()=>y.default,geoCrasterRaw:()=>y.crasterRaw,geoCylindricalEqualArea:()=>v.default,geoCylindricalEqualAreaRaw:()=>v.cylindricalEqualAreaRaw,geoCylindricalStereographic:()=>b.default,geoCylindricalStereographicRaw:()=>b.cylindricalStereographicRaw,geoEckert1:()=>w.default,geoEckert1Raw:()=>w.eckert1Raw,geoEckert2:()=>x.default,geoEckert2Raw:()=>x.eckert2Raw,geoEckert3:()=>E.default,geoEckert3Raw:()=>E.eckert3Raw,geoEckert4:()=>S.default,geoEckert4Raw:()=>S.eckert4Raw,geoEckert5:()=>_.default,geoEckert5Raw:()=>_.eckert5Raw,geoEckert6:()=>A.default,geoEckert6Raw:()=>A.eckert6Raw,geoEisenlohr:()=>C.default,geoEisenlohrRaw:()=>C.eisenlohrRaw,geoFahey:()=>T.default,geoFaheyRaw:()=>T.faheyRaw,geoFoucaut:()=>k.default,geoFoucautRaw:()=>k.foucautRaw,geoFoucautSinusoidal:()=>R.default,geoFoucautSinusoidalRaw:()=>R.foucautSinusoidalRaw,geoGilbert:()=>D.default,geoGingery:()=>O.default,geoGingeryRaw:()=>O.gingeryRaw,geoGinzburg4:()=>N.default,geoGinzburg4Raw:()=>N.ginzburg4Raw,geoGinzburg5:()=>F.default,geoGinzburg5Raw:()=>F.ginzburg5Raw,geoGinzburg6:()=>P.default,geoGinzburg6Raw:()=>P.ginzburg6Raw,geoGinzburg8:()=>M.default,geoGinzburg8Raw:()=>M.ginzburg8Raw,geoGinzburg9:()=>I.default,geoGinzburg9Raw:()=>I.ginzburg9Raw,geoGringorten:()=>$.default,geoGringortenQuincuncial:()=>Ee.default,geoGringortenRaw:()=>$.gringortenRaw,geoGuyou:()=>L.default,geoGuyouRaw:()=>L.guyouRaw,geoHammer:()=>B.default,geoHammerRaw:()=>B.hammerRaw,geoHammerRetroazimuthal:()=>U.default,geoHammerRetroazimuthalRaw:()=>U.hammerRetroazimuthalRaw,geoHealpix:()=>z.default,geoHealpixRaw:()=>z.healpixRaw,geoHill:()=>q.default,geoHillRaw:()=>q.hillRaw,geoHomolosine:()=>j.default,geoHomolosineRaw:()=>j.homolosineRaw,geoHufnagel:()=>H.default,geoHufnagelRaw:()=>H.hufnagelRaw,geoHyperelliptical:()=>G.default,geoHyperellipticalRaw:()=>G.hyperellipticalRaw,geoInterrupt:()=>V.default,geoInterruptedBoggs:()=>W.default,geoInterruptedHomolosine:()=>Y.default,geoInterruptedMollweide:()=>X.default,geoInterruptedMollweideHemispheres:()=>K.default,geoInterruptedQuarticAuthalic:()=>pe.default,geoInterruptedSinuMollweide:()=>J.default,geoInterruptedSinusoidal:()=>Q.default,geoKavrayskiy7:()=>Z.default,geoKavrayskiy7Raw:()=>Z.kavrayskiy7Raw,geoLagrange:()=>ee.default,geoLagrangeRaw:()=>ee.lagrangeRaw,geoLarrivee:()=>te.default,geoLarriveeRaw:()=>te.larriveeRaw,geoLaskowski:()=>ne.default,geoLaskowskiRaw:()=>ne.laskowskiRaw,geoLittrow:()=>re.default,geoLittrowRaw:()=>re.littrowRaw,geoLoximuthal:()=>ie.default,geoLoximuthalRaw:()=>ie.loximuthalRaw,geoMiller:()=>ae.default,geoMillerRaw:()=>ae.millerRaw,geoModifiedStereographic:()=>oe.default,geoModifiedStereographicAlaska:()=>oe.modifiedStereographicAlaska,geoModifiedStereographicGs48:()=>oe.modifiedStereographicGs48,geoModifiedStereographicGs50:()=>oe.modifiedStereographicGs50,geoModifiedStereographicLee:()=>oe.modifiedStereographicLee,geoModifiedStereographicMiller:()=>oe.modifiedStereographicMiller,geoModifiedStereographicRaw:()=>oe.modifiedStereographicRaw,geoMollweide:()=>se.default,geoMollweideRaw:()=>se.mollweideRaw,geoMtFlatPolarParabolic:()=>le.default,geoMtFlatPolarParabolicRaw:()=>le.mtFlatPolarParabolicRaw,geoMtFlatPolarQuartic:()=>ue.default,geoMtFlatPolarQuarticRaw:()=>ue.mtFlatPolarQuarticRaw,geoMtFlatPolarSinusoidal:()=>ce.default,geoMtFlatPolarSinusoidalRaw:()=>ce.mtFlatPolarSinusoidalRaw,geoNaturalEarth2:()=>de.default,geoNaturalEarth2Raw:()=>de.naturalEarth2Raw,geoNellHammer:()=>fe.default,geoNellHammerRaw:()=>fe.nellHammerRaw,geoNicolosi:()=>he.default,geoNicolosiRaw:()=>he.nicolosiRaw,geoPatterson:()=>ge.default,geoPattersonRaw:()=>ge.pattersonRaw,geoPeirceQuincuncial:()=>Se.default,geoPolyconic:()=>me.default,geoPolyconicRaw:()=>me.polyconicRaw,geoPolyhedral:()=>ye.default,geoPolyhedralButterfly:()=>ve.default,geoPolyhedralCollignon:()=>be.default,geoPolyhedralWaterman:()=>we.default,geoProject:()=>xe.default,geoQuantize:()=>_e.default,geoQuincuncial:()=>Ae.default,geoRectangularPolyconic:()=>Ce.default,geoRectangularPolyconicRaw:()=>Ce.rectangularPolyconicRaw,geoRobinson:()=>Te.default,geoRobinsonRaw:()=>Te.robinsonRaw,geoSatellite:()=>ke.default,geoSatelliteRaw:()=>ke.satelliteRaw,geoSinuMollweide:()=>Re.default,geoSinuMollweideRaw:()=>Re.sinuMollweideRaw,geoSinusoidal:()=>De.default,geoSinusoidalRaw:()=>De.sinusoidalRaw,geoStitch:()=>Oe.default,geoTimes:()=>Ne.default,geoTimesRaw:()=>Ne.timesRaw,geoTwoPointAzimuthal:()=>Fe.default,geoTwoPointAzimuthalRaw:()=>Fe.twoPointAzimuthalRaw,geoTwoPointAzimuthalUsa:()=>Fe.twoPointAzimuthalUsa,geoTwoPointEquidistant:()=>Pe.default,geoTwoPointEquidistantRaw:()=>Pe.twoPointEquidistantRaw,geoTwoPointEquidistantUsa:()=>Pe.twoPointEquidistantUsa,geoVanDerGrinten:()=>Me.default,geoVanDerGrinten2:()=>Ie.default,geoVanDerGrinten2Raw:()=>Ie.vanDerGrinten2Raw,geoVanDerGrinten3:()=>$e.default,geoVanDerGrinten3Raw:()=>$e.vanDerGrinten3Raw,geoVanDerGrinten4:()=>Le.default,geoVanDerGrinten4Raw:()=>Le.vanDerGrinten4Raw,geoVanDerGrintenRaw:()=>Me.vanDerGrintenRaw,geoWagner:()=>Be.default,geoWagner4:()=>Ue.default,geoWagner4Raw:()=>Ue.wagner4Raw,geoWagner6:()=>ze.default,geoWagner6Raw:()=>ze.wagner6Raw,geoWagner7:()=>Be.wagner7,geoWagnerRaw:()=>Be.wagnerRaw,geoWiechel:()=>qe.default,geoWiechelRaw:()=>qe.wiechelRaw,geoWinkel3:()=>je.default,geoWinkel3Raw:()=>je.winkel3Raw});var r=n(66841),i=n(11949),a=n(5095),o=n(70063),s=n(74925),l=n(55607),u=n(26030),c=n(83314),d=n(17402),f=n(14423),p=n(54418),h=n(64975),g=n(8077),m=n(34924),y=n(27884),v=n(2311),b=n(4286),w=n(76745),x=n(43792),E=n(67943),S=n(48262),_=n(16005),A=n(86268),C=n(65275),T=n(71969),k=n(65451),R=n(24104),D=n(91615),O=n(73087),N=n(58606),F=n(84621),P=n(2564),M=n(87418),I=n(18281),$=n(43915),L=n(64035),B=n(72304),U=n(62629),z=n(20299),q=n(59513),j=n(97927),H=n(63660),G=n(36081),V=n(37285),W=n(53211),Y=n(6624),X=n(81085),K=n(21624),J=n(54270),Q=n(41046),Z=n(46003),ee=n(69259),te=n(93416),ne=n(81284),re=n(56713),ie=n(47267),ae=n(45755),oe=n(85669),se=n(88860),le=n(1519),ue=n(41183),ce=n(97109),de=n(41963),fe=n(3353),pe=n(65897),he=n(67080),ge=n(36164),me=n(10498),ye=n(56943),ve=n(96796),be=n(68202),we=n(33878),xe=n(15134),Ee=n(4670),Se=n(53303),_e=n(49925),Ae=n(52511),Ce=n(52724),Te=n(33286),ke=n(55769),Re=n(87963),De=n(85801),Oe=n(23399),Ne=n(71810),Fe=n(37977),Pe=n(85645),Me=n(26681),Ie=n(9187),$e=n(11196),Le=n(2185),Be=n(71112),Ue=n(21782),ze=n(49164),qe=n(87105),je=n(19383)},38331:(e,t,n)=>{"use strict";function r(e,t,n,i,a,o,s,l,u,c,d){if(d.nanEncountered)return NaN;var f,p,h,g,m,y,v,b,w,x;if(p=e(t+.25*(f=n-t)),h=e(n-.25*f),isNaN(p))d.nanEncountered=!0;else{if(!isNaN(h))return x=((y=(g=f*(i+4*p+a)/12)+(m=f*(a+4*h+o)/12))-s)/15,c>u?(d.maxDepthCount++,y+x):Math.abs(x)i})},53211:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(83314),i=n(37285),a=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function o(){return(0,i.default)(r.boggsRaw,a).scale(160.857)}},6624:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(97927),i=n(37285),a=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function o(){return(0,i.default)(r.homolosineRaw,a).scale(152.63)}},37285:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(61388),i=n(51300),a=n(28184);function o(e,t){return(0,a.abs)(e[0]-t[0])a[o][2][0];++o);var l=e(n-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}n?c.invert=n(c):e.invert&&(c.invert=function(n,r){for(var i=u[+(r<0)],a=t[+(r<0)],s=0,l=i.length;s=0;--c)n=(t=e[1][c])[0][0],i=t[0][1],o=t[1][1],l=t[2][0],u=t[2][1],d.push(s([[l-a.epsilon,u-a.epsilon],[l-a.epsilon,o+a.epsilon],[n+a.epsilon,o+a.epsilon],[n+a.epsilon,i-a.epsilon]],30));return{type:"Polygon",coordinates:[(0,r.merge)(d)]}}(n),t=n.map((function(e){return e.map((function(e){return[[e[0][0]*a.radians,e[0][1]*a.radians],[e[1][0]*a.radians,e[1][1]*a.radians],[e[2][0]*a.radians,e[2][1]*a.radians]]}))})),u=t.map((function(t){return t.map((function(t){var n,r=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(n=a,a=o,o=n),[[r,a],[i,o]]}))})),d):t.map((function(e){return e.map((function(e){return[[e[0][0]*a.degrees,e[0][1]*a.degrees],[e[1][0]*a.degrees,e[1][1]*a.degrees],[e[2][0]*a.degrees,e[2][1]*a.degrees]]}))}))},null!=t&&d.lobes(t),d}},81085:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(88860),i=n(37285),a=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function o(){return(0,i.default)(r.mollweideRaw,a).scale(169.529)}},21624:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(88860),i=n(37285),a=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function o(){return(0,i.default)(r.mollweideRaw,a).scale(169.529).rotate([20,0])}},65897:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(72304),i=n(37285),a=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function o(){return(0,i.default)((0,r.hammerRaw)(1/0),a).rotate([20,0]).scale(152.63)}},54270:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(87963),i=n(37285),a=n(11209),o=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function s(){return(0,i.default)(r.sinuMollweideRaw,o,a.solve2d).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}},41046:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(85801),i=n(37285),a=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function o(){return(0,i.default)(r.sinusoidalRaw,a).scale(152.63).rotate([-20,0])}},46003:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,kavrayskiy7Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[3/i.tau*e*(0,i.sqrt)(i.pi*i.pi/3-t*t),t]}function o(){return(0,r.geoProjection)(a).scale(158.837)}a.invert=function(e,t){return[i.tau/3*e/(0,i.sqrt)(i.pi*i.pi/3-t*t),t]}},69259:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,lagrangeRaw:()=>a});var r=n(51300),i=n(28184);function a(e){function t(t,n){if((0,i.abs)((0,i.abs)(n)-i.halfPi)2)return null;var a=(t/=2)*t,o=(n/=2)*n,s=2*n/(1+a+o);return s=(0,i.pow)((1+s)/(1-s),1/e),[(0,i.atan2)(2*t,1-a-o)/e,(0,i.asin)((s-1)/(s+1))]},t}function o(){var e=.5,t=(0,r.geoProjectionMutator)(a),n=t(e);return n.spacing=function(n){return arguments.length?t(e=+n):e},n.scale(124.75)}},93416:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,larriveeRaw:()=>o});var r=n(51300),i=n(28184),a=i.pi/i.sqrt2;function o(e,t){return[e*(1+(0,i.sqrt)((0,i.cos)(t)))/2,t/((0,i.cos)(t/2)*(0,i.cos)(e/6))]}function s(){return(0,r.geoProjection)(o).scale(97.2672)}o.invert=function(e,t){var n=(0,i.abs)(e),r=(0,i.abs)(t),o=i.epsilon,s=i.halfPi;r{"use strict";n.r(t),n.d(t,{default:()=>o,laskowskiRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=e*e,r=t*t;return[e*(.975534+r*(-.0143059*n-.119161+-.0547009*r)),t*(1.00384+n*(.0802894+-.02855*r+199025e-9*n)+r*(.0998909+-.0491032*r))]}function o(){return(0,r.geoProjection)(a).scale(139.98)}a.invert=function(e,t){var n=(0,i.sign)(e)*i.pi,r=t/2,a=50;do{var o=n*n,s=r*r,l=n*r,u=n*(.975534+s*(-.0143059*o-.119161+-.0547009*s))-e,c=r*(1.00384+o*(.0802894+-.02855*s+199025e-9*o)+s*(.0998909+-.0491032*s))-t,d=.975534-s*(.119161+3*o*.0143059+.0547009*s),f=-l*(.238322+.2188036*s+.0286118*o),p=l*(.1605788+7961e-7*o+-.0571*s),h=1.00384+o*(.0802894+199025e-9*o)+s*(3*(.0998909-.02855*o)-.245516*s),g=f*p-h*d,m=(c*f-u*h)/g,y=(u*p-c*d)/g;n-=m,r-=y}while(((0,i.abs)(m)>i.epsilon||(0,i.abs)(y)>i.epsilon)&&--a>0);return a&&[n,r]}},56713:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,littrowRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[(0,i.sin)(e)/(0,i.cos)(t),(0,i.tan)(t)*(0,i.cos)(e)]}function o(){return(0,r.geoProjection)(a).scale(144.049).clipAngle(89.999)}a.invert=function(e,t){var n=e*e,r=t*t+1,a=n+r,o=e?i.sqrt1_2*(0,i.sqrt)((a-(0,i.sqrt)(a*a-4*n))/n):1/(0,i.sqrt)(r);return[(0,i.asin)(e*o),(0,i.sign)(t)*(0,i.acos)(o)]}},47267:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,loximuthalRaw:()=>a});var r=n(66462),i=n(28184);function a(e){var t=(0,i.cos)(e),n=(0,i.tan)(i.quarterPi+e/2);function r(r,a){var o=a-e,s=(0,i.abs)(o){"use strict";n.r(t),n.d(t,{abs:()=>r,acos:()=>O,arcosh:()=>$,arsinh:()=>I,asin:()=>D,atan:()=>i,atan2:()=>a,ceil:()=>o,cos:()=>s,cosh:()=>M,degrees:()=>T,epsilon:()=>v,epsilon2:()=>b,exp:()=>l,floor:()=>u,halfPi:()=>x,log:()=>c,max:()=>d,min:()=>f,pi:()=>w,pow:()=>p,quarterPi:()=>E,radians:()=>k,round:()=>h,sign:()=>g,sin:()=>m,sinci:()=>R,sinh:()=>P,sqrt:()=>N,sqrt1_2:()=>S,sqrt2:()=>_,sqrtPi:()=>A,tan:()=>y,tanh:()=>F,tau:()=>C});var r=Math.abs,i=Math.atan,a=Math.atan2,o=Math.ceil,s=Math.cos,l=Math.exp,u=Math.floor,c=Math.log,d=Math.max,f=Math.min,p=Math.pow,h=Math.round,g=Math.sign||function(e){return e>0?1:e<0?-1:0},m=Math.sin,y=Math.tan,v=1e-6,b=1e-12,w=Math.PI,x=w/2,E=w/4,S=Math.SQRT1_2,_=N(2),A=N(w),C=2*w,T=180/w,k=w/180;function R(e){return e?e/Math.sin(e):1}function D(e){return e>1?x:e<-1?-x:Math.asin(e)}function O(e){return e>1?0:e<-1?w:Math.acos(e)}function N(e){return e>0?Math.sqrt(e):0}function F(e){return((e=l(2*e))-1)/(e+1)}function P(e){return(l(e)-l(-e))/2}function M(e){return(l(e)+l(-e))/2}function I(e){return c(e+N(e*e+1))}function $(e){return c(e+N(e*e-1))}},45755:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,millerRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[e,1.25*(0,i.log)((0,i.tan)(i.quarterPi+.4*t))]}function o(){return(0,r.geoProjection)(a).scale(108.318)}a.invert=function(e,t){return[e,2.5*(0,i.atan)((0,i.exp)(.8*t))-.625*i.pi]}},85669:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m,modifiedStereographicAlaska:()=>d,modifiedStereographicGs48:()=>f,modifiedStereographicGs50:()=>p,modifiedStereographicLee:()=>g,modifiedStereographicMiller:()=>h,modifiedStereographicRaw:()=>a});var r=n(51300),i=n(28184);function a(e){var t=e.length-1;function n(n,r){for(var a,o=(0,i.cos)(r),s=2/(1+o*(0,i.cos)(n)),l=s*o*(0,i.sin)(n),u=s*(0,i.sin)(r),c=t,d=e[c],f=d[0],p=d[1];--c>=0;)f=(d=e[c])[0]+l*(a=f)-u*p,p=d[1]+l*p+u*a;return[f=l*(a=f)-u*p,p=l*p+u*a]}return n.invert=function(n,r){var a=20,o=n,s=r;do{for(var l,u=t,c=e[u],d=c[0],f=c[1],p=0,h=0;--u>=0;)p=d+o*(l=p)-s*h,h=f+o*h+s*l,d=(c=e[u])[0]+o*(l=d)-s*f,f=c[1]+o*f+s*l;var g,m,y=(p=d+o*(l=p)-s*h)*p+(h=f+o*h+s*l)*h;o-=g=((d=o*(l=d)-s*f-n)*p+(f=o*f+s*l-r)*h)/y,s-=m=(f*p-d*h)/y}while((0,i.abs)(g)+(0,i.abs)(m)>i.epsilon*i.epsilon&&--a>0);if(a){var v=(0,i.sqrt)(o*o+s*s),b=2*(0,i.atan)(.5*v),w=(0,i.sin)(b);return[(0,i.atan2)(o*w,v*(0,i.cos)(b)),v?(0,i.asin)(s*w/v):0]}},n}var o=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],s=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],l=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],u=[[.9245,0],[0,0],[.01943,0]],c=[[.721316,0],[0,0],[-.00881625,-.00617325]];function d(){return m(o,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function f(){return m(s,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function p(){return m(l,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function h(){return m(u,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function g(){return m(c,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function m(e,t){var n=(0,r.geoProjection)(a(e)).rotate(t).clipAngle(90),i=(0,r.geoRotation)(t),o=n.center;return delete n.rotate,n.center=function(e){return arguments.length?o(i(e)):i.invert(o())},n}},88860:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,mollweideBromleyRaw:()=>o,mollweideBromleyTheta:()=>a,mollweideRaw:()=>s});var r=n(51300),i=n(28184);function a(e,t){var n,r=e*(0,i.sin)(t),a=30;do{t-=n=(t+(0,i.sin)(t)-r)/(1+(0,i.cos)(t))}while((0,i.abs)(n)>i.epsilon&&--a>0);return t/2}function o(e,t,n){function r(r,o){return[e*r*(0,i.cos)(o=a(n,o)),t*(0,i.sin)(o)]}return r.invert=function(r,a){return a=(0,i.asin)(a/t),[r/(e*(0,i.cos)(a)),(0,i.asin)((2*a+(0,i.sin)(2*a))/n)]},r}var s=o(i.sqrt2/i.halfPi,i.sqrt2,i.pi);function l(){return(0,r.geoProjection)(s).scale(169.529)}},1519:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,mtFlatPolarParabolicRaw:()=>s});var r=n(51300),i=n(28184),a=(0,i.sqrt)(6),o=(0,i.sqrt)(7);function s(e,t){var n=(0,i.asin)(7*(0,i.sin)(t)/(3*a));return[a*e*(2*(0,i.cos)(2*n/3)-1)/o,9*(0,i.sin)(n/3)/o]}function l(){return(0,r.geoProjection)(s).scale(164.859)}s.invert=function(e,t){var n=3*(0,i.asin)(t*o/9);return[e*o/(a*(2*(0,i.cos)(2*n/3)-1)),(0,i.asin)(3*(0,i.sin)(n)*a/7)]}},41183:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,mtFlatPolarQuarticRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){for(var n,r=(1+i.sqrt1_2)*(0,i.sin)(t),a=t,o=0;o<25&&(a-=n=((0,i.sin)(a/2)+(0,i.sin)(a)-r)/(.5*(0,i.cos)(a/2)+(0,i.cos)(a)),!((0,i.abs)(n){"use strict";n.r(t),n.d(t,{default:()=>o,mtFlatPolarSinusoidalRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){for(var n,r=(0,i.sqrt)(6/(4+i.pi)),a=(1+i.pi/4)*(0,i.sin)(t),o=t/2,s=0;s<25&&(o-=n=(o/2+(0,i.sin)(o)-a)/(.5+(0,i.cos)(o)),!((0,i.abs)(n){"use strict";n.r(t),n.d(t,{default:()=>o,naturalEarth2Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=t*t,r=n*n,i=n*r;return[e*(.84719-.13063*n+i*i*(.05494*n-.04515-.02326*r+.00331*i)),t*(1.01183+r*r*(.01926*n-.02625-.00396*r))]}function o(){return(0,r.geoProjection)(a).scale(175.295)}a.invert=function(e,t){var n,r,a,o,s=t,l=25;do{s-=n=(s*(1.01183+(a=(r=s*s)*r)*a*(.01926*r-.02625-.00396*a))-t)/(1.01183+a*a*(.21186*r-.23625+-.05148*a))}while((0,i.abs)(n)>i.epsilon2&&--l>0);return[e/(.84719-.13063*(r=s*s)+(o=r*(a=r*r))*o*(.05494*r-.04515-.02326*a+.00331*o)),s]}},3353:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,nellHammerRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[e*(1+(0,i.cos)(t))/2,2*(t-(0,i.tan)(t/2))]}function o(){return(0,r.geoProjection)(a).scale(152.63)}a.invert=function(e,t){for(var n=t/2,r=0,a=1/0;r<10&&(0,i.abs)(a)>i.epsilon;++r){var o=(0,i.cos)(t/2);t-=a=(t-(0,i.tan)(t/2)-n)/(1-.5/(o*o))}return[2*e/(1+(0,i.cos)(t)),t]}},11209:(e,t,n)=>{"use strict";n.r(t),n.d(t,{solve:()=>i,solve2d:()=>a});var r=n(28184);function i(e,t,n){var i,a,o,s=100;n=void 0===n?0:+n,t=+t;do{(a=e(n))===(o=e(n+r.epsilon))&&(o=a+r.epsilon),n-=i=-1*r.epsilon*(a-t)/(a-o)}while(s-- >0&&(0,r.abs)(i)>r.epsilon);return s<0?NaN:n}function a(e,t,n){return void 0===t&&(t=40),void 0===n&&(n=r.epsilon2),function(i,a,o,s){var l,u,c;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var d=0;dl)o-=u/=2,s-=c/=2;else{l=g;var m=(o>0?-1:1)*n,y=(s>0?-1:1)*n,v=e(o+m,s),b=e(o,s+y),w=(v[0]-f[0])/m,x=(v[1]-f[1])/m,E=(b[0]-f[0])/y,S=(b[1]-f[1])/y,_=S*w-x*E,A=((0,r.abs)(_)<.5?.5:1)/_;if(o+=u=(h*E-p*S)*A,s+=c=(p*x-h*w)*A,(0,r.abs)(u){"use strict";n.r(t),n.d(t,{default:()=>s,nicolosiRaw:()=>o});var r=n(51300),i=n(28184),a=n(11209);function o(e,t){var n=(0,i.sin)(t),r=(0,i.cos)(t),a=(0,i.sign)(e);if(0===e||(0,i.abs)(t)===i.halfPi)return[0,t];if(0===t)return[e,0];if((0,i.abs)(e)===i.halfPi)return[e*r,i.halfPi*n];var o=i.pi/(2*e)-2*e/i.pi,s=2*t/i.pi,l=(1-s*s)/(n-s),u=o*o,c=l*l,d=1+u/c,f=1+c/u,p=(o*n/l-o/2)/d,h=(c*n/u+l/2)/f,g=p*p+r*r/d,m=h*h-(c*n*n/u+l*n-1)/f;return[i.halfPi*(p+(0,i.sqrt)(g)*a),i.halfPi*(h+(0,i.sqrt)(m<0?0:m)*(0,i.sign)(-t*o)*a)]}function s(){return(0,r.geoProjection)(o).scale(127.267)}o.invert=function(e,t){var n=(e/=i.halfPi)*e,r=n+(t/=i.halfPi)*t,o=i.pi*i.pi;return[e?(r-1+(0,i.sqrt)((1-r)*(1-r)+4*n))/(2*e)*i.halfPi:0,(0,a.solve)((function(e){return r*(i.pi*(0,i.sin)(e)-2*e)*i.pi+4*e*e*(t-(0,i.sin)(e))+2*i.pi*e-o*t}),0)]}},13210:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=()=>{}},66462:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(51300),i=n(28184);function a(e){var t=0,n=(0,r.geoProjectionMutator)(e),a=n(t);return a.parallel=function(e){return arguments.length?n(t=e*i.radians):t*i.degrees},a}},36164:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g,pattersonRaw:()=>h});var r=n(51300),i=n(28184),a=1.0148,o=.23185,s=-.14499,l=.02406,u=a,c=5*o,d=7*s,f=9*l,p=1.790857183;function h(e,t){var n=t*t;return[e,t*(a+n*n*(o+n*(s+l*n)))]}function g(){return(0,r.geoProjection)(h).scale(139.319)}h.invert=function(e,t){t>p?t=p:t<-1.790857183&&(t=-1.790857183);var n,r=t;do{var h=r*r;r-=n=(r*(a+h*h*(o+h*(s+l*h)))-t)/(u+h*h*(c+h*(d+f*h)))}while((0,i.abs)(n)>i.epsilon);return[e,r]}},10498:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,polyconicRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if((0,i.abs)(t)i.epsilon&&--o>0);return s=(0,i.tan)(a),[((0,i.abs)(t)<(0,i.abs)(a+1/s)?(0,i.asin)(e*s):(0,i.sign)(t)*(0,i.sign)(e)*((0,i.acos)((0,i.abs)(e*s))+i.halfPi))/(0,i.sin)(a),a]}},96796:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(51300),i=n(28184),a=n(56943),o=n(51238);function s(e){e=e||function(e){var t=(0,r.geoCentroid)({type:"MultiPoint",coordinates:e});return(0,r.geoGnomonic)().scale(1).translate([0,0]).rotate([-t[0],-t[1]])};var t=o.default.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,n){var r=t[e];r&&(r.children||(r.children=[])).push(t[n])})),(0,a.default)(t[0],(function(e,n){return t[e<-i.pi/2?n<0?6:4:e<0?n<0?2:0:e{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(51300),i=n(8077),a=n(28184),o=n(56943),s=n(51238),l=2/(0,a.sqrt)(3);function u(e,t){var n=(0,i.collignonRaw)(e,t);return[n[0]*l,n[1]]}function c(e){e=e||function(e){var t=(0,r.geoCentroid)({type:"MultiPoint",coordinates:e});return(0,r.geoProjection)(u).translate([0,0]).scale(1).rotate(t[1]>0?[-t[0],0]:[180-t[0],180])};var t=s.default.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,n){var r=t[e];r&&(r.children||(r.children=[])).push(t[n])})),(0,o.default)(t[0],(function(e,n){return t[e<-a.pi/2?n<0?6:4:e<0?n<0?2:0:e{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(51300),i=n(28184),a=n(93054);function o(e,t){function n(e,n){var r,a=t(e,n),o=a.project([e*i.degrees,n*i.degrees]);return(r=a.transform)?[r[0]*o[0]+r[1]*o[1]+r[2],-(r[3]*o[0]+r[4]*o[1]+r[5])]:(o[1]=-o[1],o)}function o(e,n){var r=e.project.invert,s=e.transform,l=n;if(s&&(l=[(s=(0,a.inverse)(s))[0]*l[0]+s[1]*l[1]+s[2],s[3]*l[0]+s[4]*l[1]+s[5]]),r&&e===function(e){return t(e[0]*i.radians,e[1]*i.radians)}(u=r(l)))return u;for(var u,c=e.children,d=0,f=c&&c.length;d=0;)if(r=t[s],n[0]===r[0]&&n[1]===r[1]){if(a)return[a,n];a=n}}}(t.face,n.face),i=(0,a.default)(r.map(n.project),r.map(t.project));t.transform=n.transform?(0,a.multiply)(n.transform,i):i;for(var o=n.edges,s=0,u=o.length;s{"use strict";n.r(t),n.d(t,{default:()=>i,inverse:()=>a,multiply:()=>o});var r=n(28184);function i(e,t){var n=s(e[1],e[0]),i=s(t[1],t[0]),a=function(e,t){return(0,r.atan2)(e[0]*t[1]-e[1]*t[0],e[0]*t[0]+e[1]*t[1])}(n,i),u=l(n)/l(i);return o([1,0,e[0][0],0,1,e[0][1]],o([u,0,0,0,u,0],o([(0,r.cos)(a),(0,r.sin)(a),0,-(0,r.sin)(a),(0,r.cos)(a),0],[1,0,-t[0][0],0,1,-t[0][1]])))}function a(e){var t=1/(e[0]*e[4]-e[1]*e[3]);return[t*e[4],-t*e[1],t*(e[1]*e[5]-e[2]*e[4]),-t*e[3],t*e[0],t*(e[2]*e[3]-e[0]*e[5])]}function o(e,t){return[e[0]*t[0]+e[1]*t[3],e[0]*t[1]+e[1]*t[4],e[0]*t[2]+e[1]*t[5]+e[2],e[3]*t[0]+e[4]*t[3],e[3]*t[1]+e[4]*t[4],e[3]*t[2]+e[4]*t[5]+e[5]]}function s(e,t){return[e[0]-t[0],e[1]-t[1]]}function l(e){return(0,r.sqrt)(e[0]*e[0]+e[1]*e[1])}},51238:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]];const i=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map((function(e){return e.map((function(e){return r[e]}))}))},33878:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(51300),i=n(28184),a=n(56943),o=n(51238);function s(e){e=e||function(e){var t=6===e.length?(0,r.geoCentroid)({type:"MultiPoint",coordinates:e}):e[0];return(0,r.geoGnomonic)().scale(1).translate([0,0]).rotate([-t[0],-t[1]])};var t=o.default.map((function(e){for(var t,n=e.map(c),r=n.length,i=n[r-1],a=[],o=0;o{"use strict";function r(e){if((t=e.length)<4)return!1;for(var t,n=0,r=e[t-1][1]*e[0][0]-e[t-1][0]*e[0][1];++nr})},74681:(e,t,n)=>{"use strict";function r(e,t){for(var n=t[0],r=t[1],i=!1,a=0,o=e.length,s=o-1;ar^p>r&&n<(f-u)*(r-c)/(p-c)+u&&(i=!i)}return i}n.r(t),n.d(t,{default:()=>r})},15134:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(51300),i=n(13210),a=n(41776),o=n(74681);function s(e,t){var n,r=t.stream;if(!r)throw new Error("invalid projection");switch(e&&e.type){case"Feature":n=u;break;case"FeatureCollection":n=l;break;default:n=c}return n(e,r)}function l(e,t){return{type:"FeatureCollection",features:e.features.map((function(e){return u(e,t)}))}}function u(e,t){return{type:"Feature",id:e.id,properties:e.properties,geometry:c(e.geometry,t)}}function c(e,t){if(!e)return null;if("GeometryCollection"===e.type)return function(e,t){return{type:"GeometryCollection",geometries:e.geometries.map((function(e){return c(e,t)}))}}(e,t);var n;switch(e.type){case"Point":case"MultiPoint":n=p;break;case"LineString":case"MultiLineString":n=h;break;case"Polygon":case"MultiPolygon":case"Sphere":n=g;break;default:return null}return(0,r.geoStream)(e,t(n)),n.result()}var d=[],f=[],p={point:function(e,t){d.push([e,t])},result:function(){var e=d.length?d.length<2?{type:"Point",coordinates:d[0]}:{type:"MultiPoint",coordinates:d}:null;return d=[],e}},h={lineStart:i.default,point:function(e,t){d.push([e,t])},lineEnd:function(){d.length&&(f.push(d),d=[])},result:function(){var e=f.length?f.length<2?{type:"LineString",coordinates:f[0]}:{type:"MultiLineString",coordinates:f}:null;return f=[],e}},g={polygonStart:i.default,lineStart:i.default,point:function(e,t){d.push([e,t])},lineEnd:function(){var e=d.length;if(e){do{d.push(d[0].slice())}while(++e<4);f.push(d),d=[]}},polygonEnd:i.default,result:function(){if(!f.length)return null;var e=[],t=[];return f.forEach((function(n){(0,a.default)(n)?e.push([n]):t.push(n)})),t.forEach((function(t){var n=t[0];e.some((function(e){if((0,o.default)(e[0],n))return e.push(t),!0}))||e.push([t])})),f=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}}},49925:(e,t,n)=>{"use strict";function r(e,t){if(!(0<=(t=+t)&&t<=20))throw new Error("invalid digits");function n(e){var n=e.length,r=2,i=new Array(n);for(i[0]=+e[0].toFixed(t),i[1]=+e[1].toFixed(t);r2||a[0]!=t[0]||a[1]!=t[1])&&(r.push(a),t=a)}return 1===r.length&&e.length>1&&r.push(n(e[e.length-1])),r}function a(e){return e.map(i)}function o(e){if(null==e)return e;var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(o)};break;case"Point":t={type:"Point",coordinates:n(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:r(e.coordinates)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:a(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(a)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function s(e){var t={type:"Feature",properties:e.properties,geometry:o(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return s(e);case"FeatureCollection":var l={type:"FeatureCollection",features:e.features.map(s)};return null!=e.bbox&&(l.bbox=e.bbox),l;default:return o(e)}return e}n.r(t),n.d(t,{default:()=>r})},4670:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(43915),i=n(52511);function a(){return(0,i.default)(r.gringortenRaw).scale(176.423)}},52511:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(51300),i=n(28184);function a(e){var t=e(i.halfPi,0)[0]-e(-i.halfPi,0)[0];function n(n,r){var a=(0,i.abs)(n)0?n-i.pi:n+i.pi,r),s=(o[0]-o[1])*i.sqrt1_2,l=(o[0]+o[1])*i.sqrt1_2;if(a)return[s,l];var u=t*i.sqrt1_2,c=s>0^l>0?-1:1;return[c*s-(0,i.sign)(l)*u,c*l-(0,i.sign)(s)*u]}return e.invert&&(n.invert=function(n,r){var a=(n+r)*i.sqrt1_2,o=(r-n)*i.sqrt1_2,s=(0,i.abs)(a)<.5*t&&(0,i.abs)(o)<.5*t;if(!s){var l=t*i.sqrt1_2,u=a>0^o>0?-1:1,c=-u*n+(o>0?1:-1)*l,d=-u*r+(a>0?1:-1)*l;a=(-c-d)*i.sqrt1_2,o=(c-d)*i.sqrt1_2}var f=e.invert(a,o);return s||(f[0]+=a>0?i.pi:-i.pi),f}),(0,r.geoProjection)(n).rotate([-90,-90,45]).clipAngle(179.999)}},53303:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(64035),i=n(52511);function a(){return(0,i.default)(r.guyouRaw).scale(111.48)}},52724:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,rectangularPolyconicRaw:()=>a});var r=n(28184),i=n(66462);function a(e){var t=(0,r.sin)(e);function n(n,i){var a=t?(0,r.tan)(n*t/2)/t:n/2;if(!i)return[2*a,-e];var o=2*(0,r.atan)(a*(0,r.sin)(i)),s=1/(0,r.tan)(i);return[(0,r.sin)(o)*s,i+(1-(0,r.cos)(o))*s-e]}return n.invert=function(n,i){if((0,r.abs)(i+=e)r.epsilon&&--l>0);var f=n*(u=(0,r.tan)(s)),p=(0,r.tan)((0,r.abs)(i)<(0,r.abs)(s+1/u)?.5*(0,r.asin)(f):.5*(0,r.acos)(f)+r.pi/4)/(0,r.sin)(s);return[t?2*(0,r.atan)(t*p)/t:2*p,s]},n}function o(){return(0,i.default)(a).scale(131.215)}},33286:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,robinsonRaw:()=>o});var r=n(51300),i=n(28184),a=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function o(e,t){var n,r=(0,i.min)(18,36*(0,i.abs)(t)/i.pi),o=(0,i.floor)(r),s=r-o,l=(n=a[o])[0],u=n[1],c=(n=a[++o])[0],d=n[1],f=(n=a[(0,i.min)(19,++o)])[0],p=n[1];return[e*(c+s*(f-l)/2+s*s*(f-2*c+l)/2),(0,i.sign)(t)*(d+s*(p-u)/2+s*s*(p-2*d+u)/2)]}function s(){return(0,r.geoProjection)(o).scale(152.63)}a.forEach((function(e){e[1]*=1.593415793900743})),o.invert=function(e,t){var n=90*t,r=(0,i.min)(18,(0,i.abs)(n/5)),o=(0,i.max)(0,(0,i.floor)(r));do{var s=a[o][1],l=a[o+1][1],u=a[(0,i.min)(19,o+2)][1],c=u-s,d=u-2*l+s,f=2*((0,i.abs)(t)-l)/c,p=d/c,h=f*(1-p*f*(1-2*p*f));if(h>=0||1===o){n=(t>=0?5:-5)*(h+r);var g,m=50;do{h=(r=(0,i.min)(18,(0,i.abs)(n)/5))-(o=(0,i.floor)(r)),s=a[o][1],l=a[o+1][1],u=a[(0,i.min)(19,o+2)][1],n-=(g=(0,i.sign)(t)*(l+h*(u-s)/2+h*h*(u-2*l+s)/2)-t)*i.degrees}while((0,i.abs)(g)>i.epsilon2&&--m>0);break}}while(--o>=0);var y=a[o][0],v=a[o+1][0],b=a[(0,i.min)(19,o+2)][0];return[e/(v+h*(b-y)/2+h*h*(b-2*v+y)/2),n*i.radians]}},55769:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,satelliteRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=function(e){function t(t,n){var r=(0,i.cos)(n),a=(e-1)/(e-r*(0,i.cos)(t));return[a*r*(0,i.sin)(t),a*(0,i.sin)(n)]}return t.invert=function(t,n){var r=t*t+n*n,a=(0,i.sqrt)(r),o=(e-(0,i.sqrt)(1-r*(e+1)/(e-1)))/((e-1)/a+a/(e-1));return[(0,i.atan2)(t*o,a*(0,i.sqrt)(1-o*o)),a?(0,i.asin)(n*o/a):0]},t}(e);if(!t)return n;var r=(0,i.cos)(t),a=(0,i.sin)(t);function o(t,i){var o=n(t,i),s=o[1],l=s*a/(e-1)+r;return[o[0]*r/l,s/l]}return o.invert=function(t,i){var o=(e-1)/(e-1-i*a);return n.invert(o*t,o*i*r)},o}function o(){var e=2,t=0,n=(0,r.geoProjectionMutator)(a),o=n(e,t);return o.distance=function(r){return arguments.length?n(e=+r,t):e},o.tilt=function(r){return arguments.length?n(e,t=r*i.radians):t*i.degrees},o.scale(432.147).clipAngle((0,i.acos)(1/e)*i.degrees-1e-6)}},87963:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,sinuMollweidePhi:()=>o,sinuMollweideRaw:()=>l,sinuMollweideY:()=>s});var r=n(51300),i=n(88860),a=n(85801),o=.7109889596207567,s=.0528035274542;function l(e,t){return t>-o?((e=(0,i.mollweideRaw)(e,t))[1]+=s,e):(0,a.sinusoidalRaw)(e,t)}function u(){return(0,r.geoProjection)(l).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}l.invert=function(e,t){return t>-o?i.mollweideRaw.invert(e,t-s):a.sinusoidalRaw.invert(e,t)}},85801:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,sinusoidalRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[e*(0,i.cos)(t),t]}function o(){return(0,r.geoProjection)(a).scale(152.63)}a.invert=function(e,t){return[e/(0,i.cos)(t),t]}},73853:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(28184);function i(e){var t=e(r.halfPi,0)[0]-e(-r.halfPi,0)[0];function n(n,i){var a=n>0?-.5:.5,o=e(n+a*r.pi,i);return o[0]-=a*t,o}return e.invert&&(n.invert=function(n,i){var a=n>0?-.5:.5,o=e.invert(n+a*t,i),s=o[0]-a*r.pi;return s<-r.pi?s+=2*r.pi:s>r.pi&&(s-=2*r.pi),o[0]=s,o}),n}},23399:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>x});var r=1e-4,i=1e4,a=-180,o=a+r,s=180,l=s-r,u=-90,c=u+r,d=90,f=d-r;function p(e){return e.length>0}function h(e){return e===u||e===d?[0,e]:[a,(t=e,Math.floor(t*i)/i)];var t}function g(e){var t=e[0],n=e[1],r=!1;return t<=o?(t=a,r=!0):t>=l&&(t=s,r=!0),n<=c?(n=u,r=!0):n>=f&&(n=d,r=!0),r?[t,n]:e}function m(e){return e.map(g)}function y(e,t,n){for(var r=0,i=e.length;r=l||m<=c||m>=f){a[s]=g(d);for(var y=s+1;yo&&bc&&w=u)break;n.push({index:-1,polygon:t,ring:a=a.slice(y-1)}),a[0]=h(a[0][1]),s=-1,u=a.length}}}}function v(e){var t,n,r,i,a,o,s=e.length,l={},u={};for(t=0;t{"use strict";n.r(t),n.d(t,{default:()=>o,timesRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.tan)(t/2),r=(0,i.sin)(i.quarterPi*n);return[e*(.74482-.34588*r*r),1.70711*n]}function o(){return(0,r.geoProjection)(a).scale(146.153)}a.invert=function(e,t){var n=t/1.70711,r=(0,i.sin)(i.quarterPi*n);return[e/(.74482-.34588*r*r),2*(0,i.atan)(n)]}},19858:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(51300),i=n(28184);function a(e,t,n){var a=(0,r.geoInterpolate)(t,n),o=a(.5),s=(0,r.geoRotation)([-o[0],-o[1]])(t),l=a.distance/2,u=-(0,i.asin)((0,i.sin)(s[1]*i.radians)/(0,i.sin)(l)),c=[-o[0],-o[1],-(s[0]>0?i.pi-u:u)*i.degrees],d=(0,r.geoProjection)(e(l)).rotate(c),f=(0,r.geoRotation)(c),p=d.center;return delete d.rotate,d.center=function(e){return arguments.length?p(f(e)):f.invert(p())},d.clipAngle(90)}},37977:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,twoPointAzimuthalRaw:()=>o,twoPointAzimuthalUsa:()=>s});var r=n(51300),i=n(28184),a=n(19858);function o(e){var t=(0,i.cos)(e);function n(e,n){var i=(0,r.geoGnomonicRaw)(e,n);return i[0]*=t,i}return n.invert=function(e,n){return r.geoGnomonicRaw.invert(e/t,n)},n}function s(){return l([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function l(e,t){return(0,a.default)(o,e,t)}},85645:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,twoPointEquidistantRaw:()=>o,twoPointEquidistantUsa:()=>s});var r=n(51300),i=n(28184),a=n(19858);function o(e){if(!(e*=2))return r.geoAzimuthalEquidistantRaw;var t=-e/2,n=-t,a=e*e,o=(0,i.tan)(n),s=.5/(0,i.sin)(n);function l(r,o){var s=(0,i.acos)((0,i.cos)(o)*(0,i.cos)(r-t)),l=(0,i.acos)((0,i.cos)(o)*(0,i.cos)(r-n));return[((s*=s)-(l*=l))/(2*e),(o<0?-1:1)*(0,i.sqrt)(4*a*l-(a-s+l)*(a-s+l))/(2*e)]}return l.invert=function(e,r){var a,l,u=r*r,c=(0,i.cos)((0,i.sqrt)(u+(a=e+t)*a)),d=(0,i.cos)((0,i.sqrt)(u+(a=e+n)*a));return[(0,i.atan2)(l=c-d,a=(c+d)*o),(r<0?-1:1)*(0,i.acos)((0,i.sqrt)(a*a+l*l)*s)]},l}function s(){return l([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function l(e,t){return(0,a.default)(o,e,t)}},26681:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,vanDerGrintenRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if((0,i.abs)(t){"use strict";n.r(t),n.d(t,{default:()=>o,vanDerGrinten2Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if((0,i.abs)(t){"use strict";n.r(t),n.d(t,{default:()=>o,vanDerGrinten3Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if((0,i.abs)(t){"use strict";n.r(t),n.d(t,{default:()=>o,vanDerGrinten4Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if(!t)return[e,0];var n=(0,i.abs)(t);if(!e||n===i.halfPi)return[0,t];var r=n/i.halfPi,a=r*r,o=(8*r-a*(a+2)-5)/(2*a*(r-1)),s=o*o,l=r*o,u=a+s+2*l,c=r+3*o,d=e/i.halfPi,f=d+1/d,p=(0,i.sign)((0,i.abs)(e)-i.halfPi)*(0,i.sqrt)(f*f-4),h=p*p,g=u*(a+s*h-1)+(1-a)*(a*(c*c+4*s)+12*l*s+4*s*s),m=(p*(u+s-1)+2*(0,i.sqrt)(g))/(4*u+h);return[(0,i.sign)(e)*i.halfPi*m,(0,i.sign)(t)*i.halfPi*(0,i.sqrt)(1+p*(0,i.abs)(m)-m*m)]}function o(){return(0,r.geoProjection)(a).scale(127.16)}a.invert=function(e,t){var n;if(!e||!t)return[e,t];var r=(0,i.sign)(t);t=(0,i.abs)(t)/i.pi;var a=(0,i.sign)(e)*e/i.halfPi,o=(a*a-1+4*t*t)/(0,i.abs)(a),s=o*o,l=t*(2-(t>.5?(0,i.min)(t,(0,i.abs)(e)):0)),u=e*e+t*t,c=50;do{var d=l*l,f=(8*l-d*(d+2)-5)/(2*d*(l-1)),p=(3*l-d*l-10)/(2*d*l),h=f*f,g=l*f,m=l+f,y=m*m,v=l+3*f,b=y*(d+h*s-1)+(1-d)*(d*(v*v+4*h)+h*(12*g+4*h)),w=-2*m*(4*g*h+(1-4*d+3*d*d)*(1+p)+h*(14*d-6-s+(8*d-8-2*s)*p)+g*(12*d-8+(10*d-10-s)*p)),x=(0,i.sqrt)(b);l-=n=(o*(y+h-1)+2*x-a*(4*y+s))/(o*(2*f*p+2*m*(1+p))+w/x-8*m*(o*(-1+h+y)+2*x)*(1+p)/(s+4*y))}while(n*u*u>i.epsilon&&--c>0);return[(0,i.sign)(e)*((0,i.sqrt)(o*o+4)+o)*i.pi/4,r*i.halfPi*l]}},71112:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,wagner7:()=>s,wagnerRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t,n,r){var a=i.pi/3;e=(0,i.max)(e,i.epsilon),t=(0,i.max)(t,i.epsilon),e=(0,i.min)(e,i.halfPi),t=(0,i.min)(t,i.pi-i.epsilon),n=(0,i.max)(n,0);var o=(n=(0,i.min)(n,100-i.epsilon))/100+1,s=(r=(0,i.max)(r,i.epsilon))/100,l=(0,i.acos)(o*(0,i.cos)(a))/a,u=(0,i.sin)(e)/(0,i.sin)(l*i.halfPi),c=t/i.pi,d=(0,i.sqrt)(s*(0,i.sin)(e/2)/(0,i.sin)(t/2));return function(e,t,n,r,a){function o(o,s){var l=n*(0,i.sin)(r*s),u=(0,i.sqrt)(1-l*l),c=(0,i.sqrt)(2/(1+u*(0,i.cos)(o*=a)));return[e*u*c*(0,i.sin)(o),t*l*c]}return o.invert=function(o,s){var l=o/e,u=s/t,c=(0,i.sqrt)(l*l+u*u),d=2*(0,i.asin)(c/2);return[(0,i.atan2)(o*(0,i.tan)(d),e*c)/a,c&&(0,i.asin)(s*(0,i.sin)(d)/(t*n*c))/r]},o}(d/(0,i.sqrt)(c*u*l),1/(d*(0,i.sqrt)(c*u*l)),u,l,c)}function o(){var e=65*i.radians,t=60*i.radians,n=20,o=200,s=(0,r.geoProjectionMutator)(a),l=s(e,t,n,o);return l.poleline=function(r){return arguments.length?s(e=+r*i.radians,t,n,o):e*i.degrees},l.parallels=function(r){return arguments.length?s(e,t=+r*i.radians,n,o):t*i.degrees},l.inflation=function(r){return arguments.length?s(e,t,n=+r,o):n},l.ratio=function(r){return arguments.length?s(e,t,n,o=+r):o},l.scale(163.775)}function s(){return o().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}},21782:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,wagner4Raw:()=>l});var r=n(51300),i=n(28184),a=n(88860),o=4*i.pi+3*(0,i.sqrt)(3),s=2*(0,i.sqrt)(2*i.pi*(0,i.sqrt)(3)/o),l=(0,a.mollweideBromleyRaw)(s*(0,i.sqrt)(3)/i.pi,s,o/6);function u(){return(0,r.geoProjection)(l).scale(176.84)}},49164:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,wagner6Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[e*(0,i.sqrt)(1-3*t*t/(i.pi*i.pi)),t]}function o(){return(0,r.geoProjection)(a).scale(152.63)}a.invert=function(e,t){return[e/(0,i.sqrt)(1-3*t*t/(i.pi*i.pi)),t]}},87105:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,wiechelRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.cos)(t),r=(0,i.cos)(e)*n,a=1-r,o=(0,i.cos)(e=(0,i.atan2)((0,i.sin)(e)*n,-(0,i.sin)(t))),s=(0,i.sin)(e);return[s*(n=(0,i.sqrt)(1-r*r))-o*a,-o*n-s*a]}function o(){return(0,r.geoProjection)(a).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}a.invert=function(e,t){var n=(e*e+t*t)/-2,r=(0,i.sqrt)(-n*(2+n)),a=t*n+e*r,o=e*n-t*r,s=(0,i.sqrt)(o*o+a*a);return[(0,i.atan2)(r*a,s*(1+n)),s?-(0,i.asin)(r*o/s):0]}},19383:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,winkel3Raw:()=>o});var r=n(51300),i=n(11949),a=n(28184);function o(e,t){var n=(0,i.aitoffRaw)(e,t);return[(n[0]+e/a.halfPi)/2,(n[1]+t)/2]}function s(){return(0,r.geoProjection)(o).scale(158.837)}o.invert=function(e,t){var n=e,r=t,i=25;do{var o,s=(0,a.cos)(r),l=(0,a.sin)(r),u=(0,a.sin)(2*r),c=l*l,d=s*s,f=(0,a.sin)(n),p=(0,a.cos)(n/2),h=(0,a.sin)(n/2),g=h*h,m=1-d*p*p,y=m?(0,a.acos)(s*p)*(0,a.sqrt)(o=1/m):o=0,v=.5*(2*y*s*h+n/a.halfPi)-e,b=.5*(y*l+r)-t,w=.5*o*(d*g+y*s*p*c)+.5/a.halfPi,x=o*(f*u/4-y*l*h),E=.125*o*(u*h-y*l*d*f),S=.5*o*(c*p+y*g*s)+.5,_=x*E-S*w,A=(b*x-v*S)/_,C=(v*E-b*w)/_;n-=A,r-=C}while(((0,a.abs)(A)>a.epsilon||(0,a.abs)(C)>a.epsilon)&&--i>0);return[n,r]}},3247:(e,t,n)=>{"use strict";n.r(t),n.d(t,{areaRingSum:()=>f,areaStream:()=>h,default:()=>b});var r,i,a,o,s,l=n(61388),u=n(32080),c=n(81250),d=n(79418),f=new l.Adder,p=new l.Adder,h={point:c.default,lineStart:c.default,lineEnd:c.default,polygonStart:function(){f=new l.Adder,h.lineStart=g,h.lineEnd=m},polygonEnd:function(){var e=+f;p.add(e<0?u.tau+e:e),this.lineStart=this.lineEnd=this.point=c.default},sphere:function(){p.add(u.tau)}};function g(){h.point=y}function m(){v(r,i)}function y(e,t){h.point=v,r=e,i=t,e*=u.radians,t*=u.radians,a=e,o=(0,u.cos)(t=t/2+u.quarterPi),s=(0,u.sin)(t)}function v(e,t){e*=u.radians,t=(t*=u.radians)/2+u.quarterPi;var n=e-a,r=n>=0?1:-1,i=r*n,l=(0,u.cos)(t),c=(0,u.sin)(t),d=s*c,p=o*l+d*(0,u.cos)(i),h=d*r*(0,u.sin)(i);f.add((0,u.atan2)(h,p)),a=e,o=l,s=c}function b(e){return p=new l.Adder,(0,d.default)(e,h),2*p}},30299:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>D});var r,i,a,o,s,l,u,c,d,f,p,h=n(61388),g=n(3247),m=n(68946),y=n(32080),v=n(79418),b={point:w,lineStart:E,lineEnd:S,polygonStart:function(){b.point=_,b.lineStart=A,b.lineEnd=C,d=new h.Adder,g.areaStream.polygonStart()},polygonEnd:function(){g.areaStream.polygonEnd(),b.point=w,b.lineStart=E,b.lineEnd=S,g.areaRingSum<0?(r=-(a=180),i=-(o=90)):d>y.epsilon?o=90:d<-y.epsilon&&(i=-90),p[0]=r,p[1]=a},sphere:function(){r=-(a=180),i=-(o=90)}};function w(e,t){f.push(p=[r=e,a=e]),to&&(o=t)}function x(e,t){var n=(0,m.cartesian)([e*y.radians,t*y.radians]);if(c){var l=(0,m.cartesianCross)(c,n),u=[l[1],-l[0],0],d=(0,m.cartesianCross)(u,l);(0,m.cartesianNormalizeInPlace)(d),d=(0,m.spherical)(d);var h,g=e-s,v=g>0?1:-1,b=d[0]*y.degrees*v,w=(0,y.abs)(g)>180;w^(v*so&&(o=h):w^(v*s<(b=(b+360)%360-180)&&bo&&(o=t)),w?eT(r,a)&&(a=e):T(e,a)>T(r,a)&&(r=e):a>=r?(ea&&(a=e)):e>s?T(r,e)>T(r,a)&&(a=e):T(e,a)>T(r,a)&&(r=e)}else f.push(p=[r=e,a=e]);to&&(o=t),c=n,s=e}function E(){b.point=x}function S(){p[0]=r,p[1]=a,b.point=w,c=null}function _(e,t){if(c){var n=e-s;d.add((0,y.abs)(n)>180?n+(n>0?360:-360):n)}else l=e,u=t;g.areaStream.point(e,t),x(e,t)}function A(){g.areaStream.lineStart()}function C(){_(l,u),g.areaStream.lineEnd(),(0,y.abs)(d)>y.epsilon&&(r=-(a=180)),p[0]=r,p[1]=a,c=null}function T(e,t){return(t-=e)<0?t+360:t}function k(e,t){return e[0]-t[0]}function R(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tT(s[0],s[1])&&(s[1]=l[1]),T(l[0],s[1])>T(s[0],s[1])&&(s[0]=l[0])):u.push(s=l);for(c=-1/0,t=0,s=u[n=u.length-1];t<=n;s=l,++t)l=u[t],(d=T(s[1],l[0]))>c&&(c=d,r=l[0],a=s[1])}return f=p=null,r===1/0||i===1/0?[[NaN,NaN],[NaN,NaN]]:[[r,i],[a,o]]}},68946:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cartesian:()=>a,cartesianAddInPlace:()=>l,cartesianCross:()=>s,cartesianDot:()=>o,cartesianNormalizeInPlace:()=>c,cartesianScale:()=>u,spherical:()=>i});var r=n(32080);function i(e){return[(0,r.atan2)(e[1],e[0]),(0,r.asin)(e[2])]}function a(e){var t=e[0],n=e[1],i=(0,r.cos)(n);return[i*(0,r.cos)(t),i*(0,r.sin)(t),(0,r.sin)(n)]}function o(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function s(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function l(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function u(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function c(e){var t=(0,r.sqrt)(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}},2874:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>P});var r,i,a,o,s,l,u,c,d,f,p,h,g,m,y,v,b=n(61388),w=n(32080),x=n(81250),E=n(79418),S={sphere:x.default,point:_,lineStart:C,lineEnd:R,polygonStart:function(){S.lineStart=D,S.lineEnd=O},polygonEnd:function(){S.lineStart=C,S.lineEnd=R}};function _(e,t){e*=w.radians,t*=w.radians;var n=(0,w.cos)(t);A(n*(0,w.cos)(e),n*(0,w.sin)(e),(0,w.sin)(t))}function A(e,t,n){++r,a+=(e-a)/r,o+=(t-o)/r,s+=(n-s)/r}function C(){S.point=T}function T(e,t){e*=w.radians,t*=w.radians;var n=(0,w.cos)(t);m=n*(0,w.cos)(e),y=n*(0,w.sin)(e),v=(0,w.sin)(t),S.point=k,A(m,y,v)}function k(e,t){e*=w.radians,t*=w.radians;var n=(0,w.cos)(t),r=n*(0,w.cos)(e),a=n*(0,w.sin)(e),o=(0,w.sin)(t),s=(0,w.atan2)((0,w.sqrt)((s=y*o-v*a)*s+(s=v*r-m*o)*s+(s=m*a-y*r)*s),m*r+y*a+v*o);i+=s,l+=s*(m+(m=r)),u+=s*(y+(y=a)),c+=s*(v+(v=o)),A(m,y,v)}function R(){S.point=_}function D(){S.point=N}function O(){F(h,g),S.point=_}function N(e,t){h=e,g=t,e*=w.radians,t*=w.radians,S.point=F;var n=(0,w.cos)(t);m=n*(0,w.cos)(e),y=n*(0,w.sin)(e),v=(0,w.sin)(t),A(m,y,v)}function F(e,t){e*=w.radians,t*=w.radians;var n=(0,w.cos)(t),r=n*(0,w.cos)(e),a=n*(0,w.sin)(e),o=(0,w.sin)(t),s=y*o-v*a,h=v*r-m*o,g=m*a-y*r,b=(0,w.hypot)(s,h,g),x=(0,w.asin)(b),E=b&&-x/b;d.add(E*s),f.add(E*h),p.add(E*g),i+=x,l+=x*(m+(m=r)),u+=x*(y+(y=a)),c+=x*(v+(v=o)),A(m,y,v)}function P(e){r=i=a=o=s=l=u=c=0,d=new b.Adder,f=new b.Adder,p=new b.Adder,(0,E.default)(e,S);var t=+d,n=+f,h=+p,g=(0,w.hypot)(t,n,h);return g{"use strict";n.r(t),n.d(t,{circleStream:()=>s,default:()=>u});var r=n(68946),i=n(84154),a=n(32080),o=n(75872);function s(e,t,n,i,o,s){if(n){var u=(0,a.cos)(t),c=(0,a.sin)(t),d=i*n;null==o?(o=t+i*a.tau,s=t-d/2):(o=l(u,o),s=l(u,s),(i>0?os)&&(o+=i*a.tau));for(var f,p=o;i>0?p>s:p{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(30283),i=n(32080);const a=(0,r.default)((function(){return!0}),(function(e){var t,n=NaN,r=NaN,a=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,s){var l=o>0?i.pi:-i.pi,u=(0,i.abs)(o-n);(0,i.abs)(u-i.pi)0?i.halfPi:-i.halfPi),e.point(a,r),e.lineEnd(),e.lineStart(),e.point(l,r),e.point(o,r),t=0):a!==l&&u>=i.pi&&((0,i.abs)(n-a)i.epsilon?(0,i.atan)(((0,i.sin)(t)*(o=(0,i.cos)(r))*(0,i.sin)(n)-(0,i.sin)(r)*(a=(0,i.cos)(t))*(0,i.sin)(e))/(a*o*s)):(t+r)/2}(n,r,o,s),e.point(a,r),e.lineEnd(),e.lineStart(),e.point(l,r),t=0),e.point(n=o,r=s),a=l},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var a;if(null==e)a=n*i.halfPi,r.point(-i.pi,a),r.point(0,a),r.point(i.pi,a),r.point(i.pi,0),r.point(i.pi,-a),r.point(0,-a),r.point(-i.pi,-a),r.point(-i.pi,0),r.point(-i.pi,a);else if((0,i.abs)(e[0]-t[0])>i.epsilon){var o=e[0]{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(81250);function i(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:r.default,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}},8579:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(68946),i=n(23494),a=n(32080),o=n(4164),s=n(30283);function l(e){var t=(0,a.cos)(e),n=2*a.radians,l=t>0,u=(0,a.abs)(t)>a.epsilon;function c(e,n){return(0,a.cos)(e)*(0,a.cos)(n)>t}function d(e,n,i){var o=(0,r.cartesian)(e),s=(0,r.cartesian)(n),l=[1,0,0],u=(0,r.cartesianCross)(o,s),c=(0,r.cartesianDot)(u,u),d=u[0],f=c-d*d;if(!f)return!i&&e;var p=t*c/f,h=-t*d/f,g=(0,r.cartesianCross)(l,u),m=(0,r.cartesianScale)(l,p),y=(0,r.cartesianScale)(u,h);(0,r.cartesianAddInPlace)(m,y);var v=g,b=(0,r.cartesianDot)(m,v),w=(0,r.cartesianDot)(v,v),x=b*b-w*((0,r.cartesianDot)(m,m)-1);if(!(x<0)){var E=(0,a.sqrt)(x),S=(0,r.cartesianScale)(v,(-b-E)/w);if((0,r.cartesianAddInPlace)(S,m),S=(0,r.spherical)(S),!i)return S;var _,A=e[0],C=n[0],T=e[1],k=n[1];C0^S[1]<((0,a.abs)(S[0]-A)a.pi^(A<=S[0]&&S[0]<=C)){var O=(0,r.cartesianScale)(v,(-b+E)/w);return(0,r.cartesianAddInPlace)(O,m),[S,(0,r.spherical)(O)]}}}function f(t,n){var r=l?e:a.pi-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}return(0,s.default)(c,(function(e){var t,n,r,i,s;return{lineStart:function(){i=r=!1,s=1},point:function(p,h){var g,m=[p,h],y=c(p,h),v=l?y?0:f(p,h):y?f(p+(p<0?a.pi:-a.pi),h):0;if(!t&&(i=r=y)&&e.lineStart(),y!==r&&(!(g=d(t,m))||(0,o.default)(t,g)||(0,o.default)(m,g))&&(m[2]=1),y!==r)s=0,y?(e.lineStart(),g=d(m,t),e.point(g[0],g[1])):(g=d(t,m),e.point(g[0],g[1],2),e.lineEnd()),t=g;else if(u&&t&&l^y){var b;v&n||!(b=d(m,t,!0))||(s=0,l?(e.lineStart(),e.point(b[0][0],b[0][1]),e.point(b[1][0],b[1][1]),e.lineEnd()):(e.point(b[1][0],b[1][1]),e.lineEnd(),e.lineStart(),e.point(b[0][0],b[0][1],3)))}!y||t&&(0,o.default)(t,m)||e.point(m[0],m[1]),t=m,r=y,n=v},lineEnd:function(){r&&e.lineEnd(),t=null},clean:function(){return s|(i&&r)<<1}}}),(function(t,r,a,o){(0,i.circleStream)(o,e,n,a,t,r)}),l?[0,-e]:[-a.pi,e-a.pi])}},96415:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(93846);function i(){var e,t,n,i=0,a=0,o=960,s=500;return n={stream:function(n){return e&&t===n?e:e=(0,r.default)(i,a,o,s)(t=n)},extent:function(r){return arguments.length?(i=+r[0][0],a=+r[0][1],o=+r[1][0],s=+r[1][1],e=t=null,n):[[i,a],[o,s]]}}}},30283:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(89189),i=n(67630),a=n(32080),o=n(2855),s=n(61388);function l(e,t,n,a){return function(l){var d,f,p,h=t(l),g=(0,r.default)(),m=t(g),y=!1,v={point:b,lineStart:x,lineEnd:E,polygonStart:function(){v.point=S,v.lineStart=_,v.lineEnd=A,f=[],d=[]},polygonEnd:function(){v.point=b,v.lineStart=x,v.lineEnd=E,f=(0,s.merge)(f);var e=(0,o.default)(d,a);f.length?(y||(l.polygonStart(),y=!0),(0,i.default)(f,c,e,n,l)):e&&(y||(l.polygonStart(),y=!0),l.lineStart(),n(null,null,1,l),l.lineEnd()),y&&(l.polygonEnd(),y=!1),f=d=null},sphere:function(){l.polygonStart(),l.lineStart(),n(null,null,1,l),l.lineEnd(),l.polygonEnd()}};function b(t,n){e(t,n)&&l.point(t,n)}function w(e,t){h.point(e,t)}function x(){v.point=w,h.lineStart()}function E(){v.point=b,h.lineEnd()}function S(e,t){p.push([e,t]),m.point(e,t)}function _(){m.lineStart(),p=[]}function A(){S(p[0][0],p[0][1]),m.lineEnd();var e,t,n,r,i=m.clean(),a=g.result(),o=a.length;if(p.pop(),d.push(p),p=null,o)if(1&i){if((t=(n=a[0]).length-1)>0){for(y||(l.polygonStart(),y=!0),l.lineStart(),e=0;e1&&2&i&&a.push(a.pop().concat(a.shift())),f.push(a.filter(u))}return v}}function u(e){return e.length>1}function c(e,t){return((e=e.x)[0]<0?e[1]-a.halfPi-a.epsilon:a.halfPi-e[1])-((t=t.x)[0]<0?t[1]-a.halfPi-a.epsilon:a.halfPi-t[1])}},48733:(e,t,n)=>{"use strict";function r(e,t,n,r,i,a){var o,s=e[0],l=e[1],u=0,c=1,d=t[0]-s,f=t[1]-l;if(o=n-s,d||!(o>0)){if(o/=d,d<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=i-s,d||!(o<0)){if(o/=d,d<0){if(o>c)return;o>u&&(u=o)}else if(d>0){if(o0)){if(o/=f,f<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>u&&(u=o)}else if(f>0){if(o0&&(e[0]=s+u*d,e[1]=l+u*f),c<1&&(t[0]=s+c*d,t[1]=l+c*f),!0}}}}}n.r(t),n.d(t,{default:()=>r})},93846:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(32080),i=n(89189),a=n(48733),o=n(67630),s=n(61388),l=1e9,u=-l;function c(e,t,n,c){function d(r,i){return e<=r&&r<=n&&t<=i&&i<=c}function f(r,i,a,o){var s=0,l=0;if(null==r||(s=p(r,a))!==(l=p(i,a))||g(r,i)<0^a>0)do{o.point(0===s||3===s?e:n,s>1?c:t)}while((s=(s+a+4)%4)!==l);else o.point(i[0],i[1])}function p(i,a){return(0,r.abs)(i[0]-e)0?0:3:(0,r.abs)(i[0]-n)0?2:1:(0,r.abs)(i[1]-t)0?1:0:a>0?3:2}function h(e,t){return g(e.x,t.x)}function g(e,t){var n=p(e,1),r=p(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(r){var p,g,m,y,v,b,w,x,E,S,_,A=r,C=(0,i.default)(),T={point:k,lineStart:function(){T.point=R,g&&g.push(m=[]),S=!0,E=!1,w=x=NaN},lineEnd:function(){p&&(R(y,v),b&&E&&C.rejoin(),p.push(C.result())),T.point=k,E&&A.lineEnd()},polygonStart:function(){A=C,p=[],g=[],_=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,r=g.length;nc&&(d-i)*(c-a)>(f-a)*(e-i)&&++t:f<=c&&(d-i)*(c-a)<(f-a)*(e-i)&&--t;return t}(),n=_&&t,i=(p=(0,s.merge)(p)).length;(n||i)&&(r.polygonStart(),n&&(r.lineStart(),f(null,null,1,r),r.lineEnd()),i&&(0,o.default)(p,h,t,f,r),r.polygonEnd()),A=r,p=g=m=null}};function k(e,t){d(e,t)&&A.point(e,t)}function R(r,i){var o=d(r,i);if(g&&m.push([r,i]),S)y=r,v=i,b=o,S=!1,o&&(A.lineStart(),A.point(r,i));else if(o&&E)A.point(r,i);else{var s=[w=Math.max(u,Math.min(l,w)),x=Math.max(u,Math.min(l,x))],f=[r=Math.max(u,Math.min(l,r)),i=Math.max(u,Math.min(l,i))];(0,a.default)(s,f,e,t,n,c)?(E||(A.lineStart(),A.point(s[0],s[1])),A.point(f[0],f[1]),o||A.lineEnd(),_=!1):o&&(A.lineStart(),A.point(r,i),_=!1)}w=r,x=i,E=o}return T}}},67630:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4164),i=n(32080);function a(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function o(e,t,n,o,l){var u,c,d=[],f=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,o=e[0],s=e[t];if((0,r.default)(o,s)){if(!o[2]&&!s[2]){for(l.lineStart(),u=0;u=0;--u)l.point((h=p[u])[0],h[1]);else o(m.x,m.p.x,-1,l);m=m.p}p=(m=m.o).z,y=!y}while(!m.v);l.lineEnd()}}}function s(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r{"use strict";function r(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}n.r(t),n.d(t,{default:()=>r})},84154:(e,t,n)=>{"use strict";function r(e){return function(){return e}}n.r(t),n.d(t,{default:()=>r})},25707:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(2855),i=n(19689),a=n(32080),o={Feature:function(e,t){return l(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r0&&(o=(0,i.default)(e[s],e[s-1]))>0&&n<=o&&r<=o&&(n+r-o)*(1-Math.pow((n-r)/o,2)){"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(65098),i=[null,null],a={type:"LineString",coordinates:i};function o(e,t){return i[0]=e,i[1]=t,(0,r.default)(a)}},11992:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,graticule10:()=>l});var r=n(61388),i=n(32080);function a(e,t,n){var a=(0,r.range)(e,t-i.epsilon,n).concat(t);return function(e){return a.map((function(t){return[e,t]}))}}function o(e,t,n){var a=(0,r.range)(e,t-i.epsilon,n).concat(t);return function(e){return a.map((function(t){return[t,e]}))}}function s(){var e,t,n,s,l,u,c,d,f,p,h,g,m=10,y=m,v=90,b=360,w=2.5;function x(){return{type:"MultiLineString",coordinates:E()}}function E(){return(0,r.range)((0,i.ceil)(s/v)*v,n,v).map(h).concat((0,r.range)((0,i.ceil)(d/b)*b,c,b).map(g)).concat((0,r.range)((0,i.ceil)(t/m)*m,e,m).filter((function(e){return(0,i.abs)(e%v)>i.epsilon})).map(f)).concat((0,r.range)((0,i.ceil)(u/y)*y,l,y).filter((function(e){return(0,i.abs)(e%b)>i.epsilon})).map(p))}return x.lines=function(){return E().map((function(e){return{type:"LineString",coordinates:e}}))},x.outline=function(){return{type:"Polygon",coordinates:[h(s).concat(g(c).slice(1),h(n).reverse().slice(1),g(d).reverse().slice(1))]}},x.extent=function(e){return arguments.length?x.extentMajor(e).extentMinor(e):x.extentMinor()},x.extentMajor=function(e){return arguments.length?(s=+e[0][0],n=+e[1][0],d=+e[0][1],c=+e[1][1],s>n&&(e=s,s=n,n=e),d>c&&(e=d,d=c,c=e),x.precision(w)):[[s,d],[n,c]]},x.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],u=+n[0][1],l=+n[1][1],t>e&&(n=t,t=e,e=n),u>l&&(n=u,u=l,l=n),x.precision(w)):[[t,u],[e,l]]},x.step=function(e){return arguments.length?x.stepMajor(e).stepMinor(e):x.stepMinor()},x.stepMajor=function(e){return arguments.length?(v=+e[0],b=+e[1],x):[v,b]},x.stepMinor=function(e){return arguments.length?(m=+e[0],y=+e[1],x):[m,y]},x.precision=function(r){return arguments.length?(w=+r,f=a(u,l,90),p=o(t,e,w),h=a(d,c,90),g=o(s,n,w),x):w},x.extentMajor([[-180,-90+i.epsilon],[180,90-i.epsilon]]).extentMinor([[-180,-80-i.epsilon],[180,80+i.epsilon]])}function l(){return s()()}},32212:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=e=>e},51300:(e,t,n)=>{"use strict";n.r(t),n.d(t,{geoAlbers:()=>y.default,geoAlbersUsa:()=>v.default,geoArea:()=>r.default,geoAzimuthalEqualArea:()=>b.default,geoAzimuthalEqualAreaRaw:()=>b.azimuthalEqualAreaRaw,geoAzimuthalEquidistant:()=>w.default,geoAzimuthalEquidistantRaw:()=>w.azimuthalEquidistantRaw,geoBounds:()=>i.default,geoCentroid:()=>a.default,geoCircle:()=>o.default,geoClipAntimeridian:()=>s.default,geoClipCircle:()=>l.default,geoClipExtent:()=>u.default,geoClipRectangle:()=>c.default,geoConicConformal:()=>x.default,geoConicConformalRaw:()=>x.conicConformalRaw,geoConicEqualArea:()=>E.default,geoConicEqualAreaRaw:()=>E.conicEqualAreaRaw,geoConicEquidistant:()=>S.default,geoConicEquidistantRaw:()=>S.conicEquidistantRaw,geoContains:()=>d.default,geoDistance:()=>f.default,geoEqualEarth:()=>_.default,geoEqualEarthRaw:()=>_.equalEarthRaw,geoEquirectangular:()=>A.default,geoEquirectangularRaw:()=>A.equirectangularRaw,geoGnomonic:()=>C.default,geoGnomonicRaw:()=>C.gnomonicRaw,geoGraticule:()=>p.default,geoGraticule10:()=>p.graticule10,geoIdentity:()=>T.default,geoInterpolate:()=>h.default,geoLength:()=>g.default,geoMercator:()=>R.default,geoMercatorRaw:()=>R.mercatorRaw,geoNaturalEarth1:()=>D.default,geoNaturalEarth1Raw:()=>D.naturalEarth1Raw,geoOrthographic:()=>O.default,geoOrthographicRaw:()=>O.orthographicRaw,geoPath:()=>m.default,geoProjection:()=>k.default,geoProjectionMutator:()=>k.projectionMutator,geoRotation:()=>P.default,geoStereographic:()=>N.default,geoStereographicRaw:()=>N.stereographicRaw,geoStream:()=>M.default,geoTransform:()=>I.default,geoTransverseMercator:()=>F.default,geoTransverseMercatorRaw:()=>F.transverseMercatorRaw});var r=n(3247),i=n(30299),a=n(2874),o=n(23494),s=n(26164),l=n(8579),u=n(96415),c=n(93846),d=n(25707),f=n(19689),p=n(11992),h=n(55379),g=n(65098),m=n(74558),y=n(42109),v=n(25738),b=n(90940),w=n(27380),x=n(56689),E=n(10903),S=n(62039),_=n(28878),A=n(77144),C=n(89110),T=n(66748),k=n(80588),R=n(58227),D=n(73102),O=n(17100),N=n(52228),F=n(64620),P=n(75872),M=n(79418),I=n(16308)},55379:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(32080);function i(e,t){var n=e[0]*r.radians,i=e[1]*r.radians,a=t[0]*r.radians,o=t[1]*r.radians,s=(0,r.cos)(i),l=(0,r.sin)(i),u=(0,r.cos)(o),c=(0,r.sin)(o),d=s*(0,r.cos)(n),f=s*(0,r.sin)(n),p=u*(0,r.cos)(a),h=u*(0,r.sin)(a),g=2*(0,r.asin)((0,r.sqrt)((0,r.haversin)(o-i)+s*u*(0,r.haversin)(a-n))),m=(0,r.sin)(g),y=g?function(e){var t=(0,r.sin)(e*=g)/m,n=(0,r.sin)(g-e)/m,i=n*d+t*p,a=n*f+t*h,o=n*l+t*c;return[(0,r.atan2)(a,i)*r.degrees,(0,r.atan2)(o,(0,r.sqrt)(i*i+a*a))*r.degrees]}:function(){return[n*r.degrees,i*r.degrees]};return y.distance=g,y}},65098:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r,i,a,o,s=n(61388),l=n(32080),u=n(81250),c=n(79418),d={sphere:u.default,point:u.default,lineStart:function(){d.point=p,d.lineEnd=f},lineEnd:u.default,polygonStart:u.default,polygonEnd:u.default};function f(){d.point=d.lineEnd=u.default}function p(e,t){e*=l.radians,t*=l.radians,i=e,a=(0,l.sin)(t),o=(0,l.cos)(t),d.point=h}function h(e,t){e*=l.radians,t*=l.radians;var n=(0,l.sin)(t),s=(0,l.cos)(t),u=(0,l.abs)(e-i),c=(0,l.cos)(u),d=s*(0,l.sin)(u),f=o*n-a*s*c,p=a*n+o*s*c;r.add((0,l.atan2)((0,l.sqrt)(d*d+f*f),p)),i=e,a=n,o=s}function g(e){return r=new s.Adder,(0,c.default)(e,d),+r}},32080:(e,t,n)=>{"use strict";n.r(t),n.d(t,{abs:()=>d,acos:()=>A,asin:()=>C,atan:()=>f,atan2:()=>p,ceil:()=>g,cos:()=>h,degrees:()=>u,epsilon:()=>r,epsilon2:()=>i,exp:()=>m,floor:()=>y,halfPi:()=>o,haversin:()=>T,hypot:()=>v,log:()=>b,pi:()=>a,pow:()=>w,quarterPi:()=>s,radians:()=>c,sign:()=>E,sin:()=>x,sqrt:()=>S,tan:()=>_,tau:()=>l});var r=1e-6,i=1e-12,a=Math.PI,o=a/2,s=a/4,l=2*a,u=180/a,c=a/180,d=Math.abs,f=Math.atan,p=Math.atan2,h=Math.cos,g=Math.ceil,m=Math.exp,y=Math.floor,v=Math.hypot,b=Math.log,w=Math.pow,x=Math.sin,E=Math.sign||function(e){return e>0?1:e<0?-1:0},S=Math.sqrt,_=Math.tan;function A(e){return e>1?0:e<-1?a:Math.acos(e)}function C(e){return e>1?o:e<-1?-o:Math.asin(e)}function T(e){return(e=x(e/2))*e}},81250:(e,t,n)=>{"use strict";function r(){}n.r(t),n.d(t,{default:()=>r})},69605:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>y});var r,i,a,o,s=n(61388),l=n(32080),u=n(81250),c=new s.Adder,d=new s.Adder,f={point:u.default,lineStart:u.default,lineEnd:u.default,polygonStart:function(){f.lineStart=p,f.lineEnd=m},polygonEnd:function(){f.lineStart=f.lineEnd=f.point=u.default,c.add((0,l.abs)(d)),d=new s.Adder},result:function(){var e=c/2;return c=new s.Adder,e}};function p(){f.point=h}function h(e,t){f.point=g,r=a=e,i=o=t}function g(e,t){d.add(o*e-a*t),a=e,o=t}function m(){g(r,i)}const y=f},71093:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(81250),i=1/0,a=i,o=-i,s=o;const l={point:function(e,t){eo&&(o=e),ts&&(s=t)},lineStart:r.default,lineEnd:r.default,polygonStart:r.default,polygonEnd:r.default,result:function(){var e=[[i,a],[o,s]];return o=s=-(a=i=1/0),e}}},23076:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>T});var r,i,a,o,s=n(32080),l=0,u=0,c=0,d=0,f=0,p=0,h=0,g=0,m=0,y={point:v,lineStart:b,lineEnd:E,polygonStart:function(){y.lineStart=S,y.lineEnd=_},polygonEnd:function(){y.point=v,y.lineStart=b,y.lineEnd=E},result:function(){var e=m?[h/m,g/m]:p?[d/p,f/p]:c?[l/c,u/c]:[NaN,NaN];return l=u=c=d=f=p=h=g=m=0,e}};function v(e,t){l+=e,u+=t,++c}function b(){y.point=w}function w(e,t){y.point=x,v(a=e,o=t)}function x(e,t){var n=e-a,r=t-o,i=(0,s.sqrt)(n*n+r*r);d+=i*(a+e)/2,f+=i*(o+t)/2,p+=i,v(a=e,o=t)}function E(){y.point=v}function S(){y.point=A}function _(){C(r,i)}function A(e,t){y.point=C,v(r=a=e,i=o=t)}function C(e,t){var n=e-a,r=t-o,i=(0,s.sqrt)(n*n+r*r);d+=i*(a+e)/2,f+=i*(o+t)/2,p+=i,h+=(i=o*e-a*t)*(a+e),g+=i*(o+t),m+=3*i,v(a=e,o=t)}const T=y},55577:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(32080),i=n(81250);function a(e){this._context=e}a.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,r.tau)}},result:i.default}},74558:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(32212),i=n(79418),a=n(69605),o=n(71093),s=n(23076),l=n(55577),u=n(80350),c=n(56221);function d(e,t){let n,d,f=3,p=4.5;function h(e){return e&&("function"==typeof p&&d.pointRadius(+p.apply(this,arguments)),(0,i.default)(e,n(d))),d.result()}return h.area=function(e){return(0,i.default)(e,n(a.default)),a.default.result()},h.measure=function(e){return(0,i.default)(e,n(u.default)),u.default.result()},h.bounds=function(e){return(0,i.default)(e,n(o.default)),o.default.result()},h.centroid=function(e){return(0,i.default)(e,n(s.default)),s.default.result()},h.projection=function(t){return arguments.length?(n=null==t?(e=null,r.default):(e=t).stream,h):e},h.context=function(e){return arguments.length?(d=null==e?(t=null,new c.default(f)):new l.default(t=e),"function"!=typeof p&&d.pointRadius(p),h):t},h.pointRadius=function(e){return arguments.length?(p="function"==typeof e?e:(d.pointRadius(+e),+e),h):p},h.digits=function(e){if(!arguments.length)return f;if(null==e)f=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);f=t}return null===t&&(d=new c.default(f)),h},h.projection(e).digits(f).context(t)}},80350:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r,i,a,o,s,l=n(61388),u=n(32080),c=n(81250),d=new l.Adder,f={point:c.default,lineStart:function(){f.point=p},lineEnd:function(){r&&h(i,a),f.point=c.default},polygonStart:function(){r=!0},polygonEnd:function(){r=null},result:function(){var e=+d;return d=new l.Adder,e}};function p(e,t){f.point=h,i=o=e,a=s=t}function h(e,t){o-=e,s-=t,d.add((0,u.sqrt)(o*o+s*s)),o=e,s=t}const g=f},56221:(e,t,n)=>{"use strict";let r,i,a,o;n.r(t),n.d(t,{default:()=>s});class s{constructor(e){this._append=null==e?l:function(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return l;if(t!==r){const e=10**t;r=t,i=function(t){let n=1;this._+=t[0];for(const r=t.length;n{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(32080);function i(e,t){return(0,r.abs)(e[0]-t[0]){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(61388),i=n(68946),a=n(32080);function o(e){return(0,a.abs)(e[0])<=a.pi?e[0]:(0,a.sign)(e[0])*(((0,a.abs)(e[0])+a.pi)%a.tau-a.pi)}function s(e,t){var n=o(t),s=t[1],l=(0,a.sin)(s),u=[(0,a.sin)(n),-(0,a.cos)(n),0],c=0,d=0,f=new r.Adder;1===l?s=a.halfPi+a.epsilon:-1===l&&(s=-a.halfPi-a.epsilon);for(var p=0,h=e.length;p=0?1:-1,D=R*k,O=D>a.pi,N=w*C;if(f.add((0,a.atan2)(N*R*(0,a.sin)(D),x*T+N*(0,a.cos)(D))),c+=O?k+R*a.tau:k,O^v>=n^_>=n){var F=(0,i.cartesianCross)((0,i.cartesian)(y),(0,i.cartesian)(S));(0,i.cartesianNormalizeInPlace)(F);var P=(0,i.cartesianCross)(u,F);(0,i.cartesianNormalizeInPlace)(P);var M=(O^k>=0?-1:1)*(0,a.asin)(P[2]);(s>M||s===M&&(F[0]||F[1]))&&(d+=O^k>=0?1:-1)}}return(c<-a.epsilon||c{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(10903);function i(){return(0,r.default)().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}},25738:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(32080),i=n(42109),a=n(10903),o=n(51007);function s(){var e,t,n,s,l,u,c=(0,i.default)(),d=(0,a.default)().rotate([154,0]).center([-2,58.5]).parallels([55,65]),f=(0,a.default)().rotate([157,0]).center([-3,19.9]).parallels([8,18]),p={point:function(e,t){u=[e,t]}};function h(e){var t=e[0],r=e[1];return u=null,n.point(t,r),u||(s.point(t,r),u)||(l.point(t,r),u)}function g(){return e=t=null,h}return h.invert=function(e){var t=c.scale(),n=c.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?d:i>=.166&&i<.234&&r>=-.214&&r<-.115?f:c).invert(e)},h.stream=function(n){return e&&t===n?e:(r=[c.stream(t=n),d.stream(n),f.stream(n)],i=r.length,e={point:function(e,t){for(var n=-1;++n{"use strict";n.r(t),n.d(t,{azimuthalInvert:()=>a,azimuthalRaw:()=>i});var r=n(32080);function i(e){return function(t,n){var i=(0,r.cos)(t),a=(0,r.cos)(n),o=e(i*a);return o===1/0?[2,0]:[o*a*(0,r.sin)(t),o*(0,r.sin)(n)]}}function a(e){return function(t,n){var i=(0,r.sqrt)(t*t+n*n),a=e(i),o=(0,r.sin)(a),s=(0,r.cos)(a);return[(0,r.atan2)(t*o,i*s),(0,r.asin)(i&&n*o/i)]}}},90940:(e,t,n)=>{"use strict";n.r(t),n.d(t,{azimuthalEqualAreaRaw:()=>o,default:()=>s});var r=n(32080),i=n(18585),a=n(80588),o=(0,i.azimuthalRaw)((function(e){return(0,r.sqrt)(2/(1+e))}));function s(){return(0,a.default)(o).scale(124.75).clipAngle(179.999)}o.invert=(0,i.azimuthalInvert)((function(e){return 2*(0,r.asin)(e/2)}))},27380:(e,t,n)=>{"use strict";n.r(t),n.d(t,{azimuthalEquidistantRaw:()=>o,default:()=>s});var r=n(32080),i=n(18585),a=n(80588),o=(0,i.azimuthalRaw)((function(e){return(e=(0,r.acos)(e))&&e/(0,r.sin)(e)}));function s(){return(0,a.default)(o).scale(79.4188).clipAngle(179.999)}o.invert=(0,i.azimuthalInvert)((function(e){return e}))},70952:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conicProjection:()=>a});var r=n(32080),i=n(80588);function a(e){var t=0,n=r.pi/3,a=(0,i.projectionMutator)(e),o=a(t,n);return o.parallels=function(e){return arguments.length?a(t=e[0]*r.radians,n=e[1]*r.radians):[t*r.degrees,n*r.degrees]},o}},56689:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conicConformalRaw:()=>s,default:()=>l});var r=n(32080),i=n(70952),a=n(58227);function o(e){return(0,r.tan)((r.halfPi+e)/2)}function s(e,t){var n=(0,r.cos)(e),i=e===t?(0,r.sin)(e):(0,r.log)(n/(0,r.cos)(t))/(0,r.log)(o(t)/o(e)),s=n*(0,r.pow)(o(e),i)/i;if(!i)return a.mercatorRaw;function l(e,t){s>0?t<-r.halfPi+r.epsilon&&(t=-r.halfPi+r.epsilon):t>r.halfPi-r.epsilon&&(t=r.halfPi-r.epsilon);var n=s/(0,r.pow)(o(t),i);return[n*(0,r.sin)(i*e),s-n*(0,r.cos)(i*e)]}return l.invert=function(e,t){var n=s-t,a=(0,r.sign)(i)*(0,r.sqrt)(e*e+n*n),o=(0,r.atan2)(e,(0,r.abs)(n))*(0,r.sign)(n);return n*i<0&&(o-=r.pi*(0,r.sign)(e)*(0,r.sign)(n)),[o/i,2*(0,r.atan)((0,r.pow)(s/a,1/i))-r.halfPi]},l}function l(){return(0,i.conicProjection)(s).scale(109.5).parallels([30,30])}},10903:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conicEqualAreaRaw:()=>o,default:()=>s});var r=n(32080),i=n(70952),a=n(13383);function o(e,t){var n=(0,r.sin)(e),i=(n+(0,r.sin)(t))/2;if((0,r.abs)(i){"use strict";n.r(t),n.d(t,{conicEquidistantRaw:()=>o,default:()=>s});var r=n(32080),i=n(70952),a=n(77144);function o(e,t){var n=(0,r.cos)(e),i=e===t?(0,r.sin)(e):(n-(0,r.cos)(t))/(t-e),o=n/i+e;if((0,r.abs)(i){"use strict";n.r(t),n.d(t,{cylindricalEqualAreaRaw:()=>i});var r=n(32080);function i(e){var t=(0,r.cos)(e);function n(e,n){return[e*t,(0,r.sin)(n)/t]}return n.invert=function(e,n){return[e/t,(0,r.asin)(n*t)]},n}},28878:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d,equalEarthRaw:()=>c});var r=n(80588),i=n(32080),a=1.340264,o=-.081106,s=893e-6,l=.003796,u=(0,i.sqrt)(3)/2;function c(e,t){var n=(0,i.asin)(u*(0,i.sin)(t)),r=n*n,c=r*r*r;return[e*(0,i.cos)(n)/(u*(a+3*o*r+c*(7*s+9*l*r))),n*(a+o*r+c*(s+l*r))]}function d(){return(0,r.default)(c).scale(177.158)}c.invert=function(e,t){for(var n,r=t,c=r*r,d=c*c*c,f=0;f<12&&(d=(c=(r-=n=(r*(a+o*c+d*(s+l*c))-t)/(a+3*o*c+d*(7*s+9*l*c)))*r)*c*c,!((0,i.abs)(n){"use strict";n.r(t),n.d(t,{default:()=>a,equirectangularRaw:()=>i});var r=n(80588);function i(e,t){return[e,t]}function a(){return(0,r.default)(i).scale(152.63)}i.invert=i},51007:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fitExtent:()=>o,fitHeight:()=>u,fitSize:()=>s,fitWidth:()=>l});var r=n(79418),i=n(71093);function a(e,t,n){var a=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=a&&e.clipExtent(null),(0,r.default)(n,e.stream(i.default)),t(i.default.result()),null!=a&&e.clipExtent(a),e}function o(e,t,n){return a(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])}),n)}function s(e,t,n){return o(e,[[0,0],t],n)}function l(e,t,n){return a(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])}),n)}function u(e,t,n){return a(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])}),n)}},89110:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,gnomonicRaw:()=>o});var r=n(32080),i=n(18585),a=n(80588);function o(e,t){var n=(0,r.cos)(t),i=(0,r.cos)(e)*n;return[n*(0,r.sin)(e)/i,(0,r.sin)(t)/i]}function s(){return(0,a.default)(o).scale(144.049).clipAngle(60)}o.invert=(0,i.azimuthalInvert)(r.atan)},66748:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(93846),i=n(32212),a=n(16308),o=n(51007),s=n(32080);function l(){var e,t,n,l,u,c,d,f=1,p=0,h=0,g=1,m=1,y=0,v=null,b=1,w=1,x=(0,a.transformer)({point:function(e,t){var n=_([e,t]);this.stream.point(n[0],n[1])}}),E=i.default;function S(){return b=f*g,w=f*m,c=d=null,_}function _(n){var r=n[0]*b,i=n[1]*w;if(y){var a=i*e-r*t;r=r*e+i*t,i=a}return[r+p,i+h]}return _.invert=function(n){var r=n[0]-p,i=n[1]-h;if(y){var a=i*e+r*t;r=r*e-i*t,i=a}return[r/b,i/w]},_.stream=function(e){return c&&d===e?c:c=x(E(d=e))},_.postclip=function(e){return arguments.length?(E=e,v=n=l=u=null,S()):E},_.clipExtent=function(e){return arguments.length?(E=null==e?(v=n=l=u=null,i.default):(0,r.default)(v=+e[0][0],n=+e[0][1],l=+e[1][0],u=+e[1][1]),S()):null==v?null:[[v,n],[l,u]]},_.scale=function(e){return arguments.length?(f=+e,S()):f},_.translate=function(e){return arguments.length?(p=+e[0],h=+e[1],S()):[p,h]},_.angle=function(n){return arguments.length?(y=n%360*s.radians,t=(0,s.sin)(y),e=(0,s.cos)(y),S()):y*s.degrees},_.reflectX=function(e){return arguments.length?(g=e?-1:1,S()):g<0},_.reflectY=function(e){return arguments.length?(m=e?-1:1,S()):m<0},_.fitExtent=function(e,t){return(0,o.fitExtent)(_,e,t)},_.fitSize=function(e,t){return(0,o.fitSize)(_,e,t)},_.fitWidth=function(e,t){return(0,o.fitWidth)(_,e,t)},_.fitHeight=function(e,t){return(0,o.fitHeight)(_,e,t)},_}},80588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g,projectionMutator:()=>m});var r=n(26164),i=n(8579),a=n(93846),o=n(51692),s=n(32212),l=n(32080),u=n(75872),c=n(16308),d=n(51007),f=n(11073),p=(0,c.transformer)({point:function(e,t){this.stream.point(e*l.radians,t*l.radians)}});function h(e,t,n,r,i,a){if(!a)return function(e,t,n,r,i){function a(a,o){return[t+e*(a*=r),n-e*(o*=i)]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}(e,t,n,r,i);var o=(0,l.cos)(a),s=(0,l.sin)(a),u=o*e,c=s*e,d=o/e,f=s/e,p=(s*n-o*t)/e,h=(s*t+o*n)/e;function g(e,a){return[u*(e*=r)-c*(a*=i)+t,n-c*e-u*a]}return g.invert=function(e,t){return[r*(d*e-f*t+p),i*(h-f*e-d*t)]},g}function g(e){return m((function(){return e}))()}function m(e){var t,n,g,m,y,v,b,w,x,E,S=150,_=480,A=250,C=0,T=0,k=0,R=0,D=0,O=0,N=1,F=1,P=null,M=r.default,I=null,$=s.default,L=.5;function B(e){return w(e[0]*l.radians,e[1]*l.radians)}function U(e){return(e=w.invert(e[0],e[1]))&&[e[0]*l.degrees,e[1]*l.degrees]}function z(){var e=h(S,0,0,N,F,O).apply(null,t(C,T)),r=h(S,_-e[0],A-e[1],N,F,O);return n=(0,u.rotateRadians)(k,R,D),b=(0,o.default)(t,r),w=(0,o.default)(n,b),v=(0,f.default)(b,L),q()}function q(){return x=E=null,B}return B.stream=function(e){return x&&E===e?x:x=p(function(e){return(0,c.transformer)({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(n)(M(v($(E=e)))))},B.preclip=function(e){return arguments.length?(M=e,P=void 0,q()):M},B.postclip=function(e){return arguments.length?($=e,I=g=m=y=null,q()):$},B.clipAngle=function(e){return arguments.length?(M=+e?(0,i.default)(P=e*l.radians):(P=null,r.default),q()):P*l.degrees},B.clipExtent=function(e){return arguments.length?($=null==e?(I=g=m=y=null,s.default):(0,a.default)(I=+e[0][0],g=+e[0][1],m=+e[1][0],y=+e[1][1]),q()):null==I?null:[[I,g],[m,y]]},B.scale=function(e){return arguments.length?(S=+e,z()):S},B.translate=function(e){return arguments.length?(_=+e[0],A=+e[1],z()):[_,A]},B.center=function(e){return arguments.length?(C=e[0]%360*l.radians,T=e[1]%360*l.radians,z()):[C*l.degrees,T*l.degrees]},B.rotate=function(e){return arguments.length?(k=e[0]%360*l.radians,R=e[1]%360*l.radians,D=e.length>2?e[2]%360*l.radians:0,z()):[k*l.degrees,R*l.degrees,D*l.degrees]},B.angle=function(e){return arguments.length?(O=e%360*l.radians,z()):O*l.degrees},B.reflectX=function(e){return arguments.length?(N=e?-1:1,z()):N<0},B.reflectY=function(e){return arguments.length?(F=e?-1:1,z()):F<0},B.precision=function(e){return arguments.length?(v=(0,f.default)(b,L=e*e),q()):(0,l.sqrt)(L)},B.fitExtent=function(e,t){return(0,d.fitExtent)(B,e,t)},B.fitSize=function(e,t){return(0,d.fitSize)(B,e,t)},B.fitWidth=function(e,t){return(0,d.fitWidth)(B,e,t)},B.fitHeight=function(e,t){return(0,d.fitHeight)(B,e,t)},function(){return t=e.apply(this,arguments),B.invert=t.invert&&U,z()}}},58227:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,mercatorProjection:()=>l,mercatorRaw:()=>o});var r=n(32080),i=n(75872),a=n(80588);function o(e,t){return[e,(0,r.log)((0,r.tan)((r.halfPi+t)/2))]}function s(){return l(o).scale(961/r.tau)}function l(e){var t,n,s,l=(0,a.default)(e),u=l.center,c=l.scale,d=l.translate,f=l.clipExtent,p=null;function h(){var a=r.pi*c(),u=l((0,i.default)(l.rotate()).invert([0,0]));return f(null==p?[[u[0]-a,u[1]-a],[u[0]+a,u[1]+a]]:e===o?[[Math.max(u[0]-a,p),t],[Math.min(u[0]+a,n),s]]:[[p,Math.max(u[1]-a,t)],[n,Math.min(u[1]+a,s)]])}return l.scale=function(e){return arguments.length?(c(e),h()):c()},l.translate=function(e){return arguments.length?(d(e),h()):d()},l.center=function(e){return arguments.length?(u(e),h()):u()},l.clipExtent=function(e){return arguments.length?(null==e?p=t=n=s=null:(p=+e[0][0],t=+e[0][1],n=+e[1][0],s=+e[1][1]),h()):null==p?null:[[p,t],[n,s]]},h()}o.invert=function(e,t){return[e,2*(0,r.atan)((0,r.exp)(t))-r.halfPi]}},73102:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,naturalEarth1Raw:()=>a});var r=n(80588),i=n(32080);function a(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function o(){return(0,r.default)(a).scale(175.295)}a.invert=function(e,t){var n,r=t,a=25;do{var o=r*r,s=o*o;r-=n=(r*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-t)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while((0,i.abs)(n)>i.epsilon&&--a>0);return[e/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]}},17100:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,orthographicRaw:()=>o});var r=n(32080),i=n(18585),a=n(80588);function o(e,t){return[(0,r.cos)(t)*(0,r.sin)(e),(0,r.sin)(t)]}function s(){return(0,a.default)(o).scale(249.5).clipAngle(90+r.epsilon)}o.invert=(0,i.azimuthalInvert)(r.asin)},11073:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(68946),i=n(32080),a=n(16308),o=16,s=(0,i.cos)(30*i.radians);function l(e,t){return+t?function(e,t){function n(r,a,o,l,u,c,d,f,p,h,g,m,y,v){var b=d-r,w=f-a,x=b*b+w*w;if(x>4*t&&y--){var E=l+h,S=u+g,_=c+m,A=(0,i.sqrt)(E*E+S*S+_*_),C=(0,i.asin)(_/=A),T=(0,i.abs)((0,i.abs)(_)-1)t||(0,i.abs)((b*O+w*N)/x-.5)>.3||l*h+u*g+c*m{"use strict";n.r(t),n.d(t,{default:()=>s,stereographicRaw:()=>o});var r=n(32080),i=n(18585),a=n(80588);function o(e,t){var n=(0,r.cos)(t),i=1+(0,r.cos)(e)*n;return[n*(0,r.sin)(e)/i,(0,r.sin)(t)/i]}function s(){return(0,a.default)(o).scale(250).clipAngle(142)}o.invert=(0,i.azimuthalInvert)((function(e){return 2*(0,r.atan)(e)}))},64620:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,transverseMercatorRaw:()=>a});var r=n(32080),i=n(58227);function a(e,t){return[(0,r.log)((0,r.tan)((r.halfPi+t)/2)),-e]}function o(){var e=(0,i.mercatorProjection)(a),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}a.invert=function(e,t){return[-t,2*(0,r.atan)((0,r.exp)(e))-r.halfPi]}},75872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c,rotateRadians:()=>o});var r=n(51692),i=n(32080);function a(e,t){return(0,i.abs)(e)>i.pi&&(e-=Math.round(e/i.tau)*i.tau),[e,t]}function o(e,t,n){return(e%=i.tau)?t||n?(0,r.default)(l(e),u(t,n)):l(e):t||n?u(t,n):a}function s(e){return function(t,n){return t+=e,(0,i.abs)(t)>i.pi&&(t-=Math.round(t/i.tau)*i.tau),[t,n]}}function l(e){var t=s(e);return t.invert=s(-e),t}function u(e,t){var n=(0,i.cos)(e),r=(0,i.sin)(e),a=(0,i.cos)(t),o=(0,i.sin)(t);function s(e,t){var s=(0,i.cos)(t),l=(0,i.cos)(e)*s,u=(0,i.sin)(e)*s,c=(0,i.sin)(t),d=c*n+l*r;return[(0,i.atan2)(u*a-d*o,l*n-c*r),(0,i.asin)(d*a+u*o)]}return s.invert=function(e,t){var s=(0,i.cos)(t),l=(0,i.cos)(e)*s,u=(0,i.sin)(e)*s,c=(0,i.sin)(t),d=c*a-u*o;return[(0,i.atan2)(u*a+c*o,l*n+d*r),(0,i.asin)(d*n-l*r)]},s}function c(e){function t(t){return(t=e(t[0]*i.radians,t[1]*i.radians))[0]*=i.degrees,t[1]*=i.degrees,t}return e=o(e[0]*i.radians,e[1]*i.radians,e.length>2?e[2]*i.radians:0),t.invert=function(t){return(t=e.invert(t[0]*i.radians,t[1]*i.radians))[0]*=i.degrees,t[1]*=i.degrees,t},t}a.invert=a},79418:(e,t,n)=>{"use strict";function r(e,t){e&&a.hasOwnProperty(e.type)&&a[e.type](e,t)}n.r(t),n.d(t,{default:()=>l});var i={Feature:function(e,t){r(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,a=n.length;++i{"use strict";function r(e){return{stream:i(e)}}function i(e){return function(t){var n=new a;for(var r in e)n[r]=e[r];return n.stream=t,n}}function a(){}n.r(t),n.d(t,{default:()=>r,transformer:()=>i}),a.prototype={constructor:a,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}}},54902:(e,t,n)=>{"use strict";function r(e){return null==e?null:i(e)}function i(e){if("function"!=typeof e)throw new Error;return e}n.r(t),n.d(t,{optional:()=>r,required:()=>i})},70507:(e,t,n)=>{"use strict";function r(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function i(e,t){let n,r,i=e.length;for(;i;)r=t()*i--|0,n=e[i],e[i]=e[r],e[r]=n;return e}n.r(t),n.d(t,{default:()=>r,shuffle:()=>i})},94292:(e,t,n)=>{"use strict";function r(e,t){return e.parent===t.parent?1:2}function i(e,t){return e+t.x}function a(e,t){return Math.max(e,t.y)}function o(){var e=r,t=1,n=1,o=!1;function s(r){var s,l=0;r.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(i,0)/e.length}(n),t.y=function(e){return 1+e.reduce(a,0)}(n)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)}));var u=function(e){for(var t;t=e.children;)e=t[0];return e}(r),c=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(r),d=u.x-e(u,c)/2,f=c.x+e(c,u)/2;return r.eachAfter(o?function(e){e.x=(e.x-r.x)*t,e.y=(r.y-e.y)*n}:function(e){e.x=(e.x-d)/(f-d)*t,e.y=(1-(r.y?e.y/r.y:1))*n})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(o=!1,t=+e[0],n=+e[1],s):o?null:[t,n]},s.nodeSize=function(e){return arguments.length?(o=!0,t=+e[0],n=+e[1],s):o?[t,n]:null},s}n.r(t),n.d(t,{default:()=>o})},69112:(e,t,n)=>{"use strict";function r(){return 0}function i(e){return function(){return e}}n.r(t),n.d(t,{constantZero:()=>r,default:()=>i})},54044:(e,t,n)=>{"use strict";function r(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}n.r(t),n.d(t,{default:()=>r})},17489:(e,t,n)=>{"use strict";function r(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function i(){return this.eachAfter(r)}n.r(t),n.d(t,{default:()=>i})},63242:(e,t,n)=>{"use strict";function r(){return Array.from(this)}n.r(t),n.d(t,{default:()=>r})},34705:(e,t,n)=>{"use strict";function r(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}n.r(t),n.d(t,{default:()=>r})},57235:(e,t,n)=>{"use strict";function r(e,t){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;rr})},49514:(e,t,n)=>{"use strict";function r(e,t){for(var n,r,i=this,a=[i],o=-1;i=a.pop();)if(e.call(t,i,++o,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this}n.r(t),n.d(t,{default:()=>r})},40827:(e,t,n)=>{"use strict";function r(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}n.r(t),n.d(t,{default:()=>r})},79070:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Node:()=>x,computeHeight:()=>w,default:()=>m});var r=n(17489),i=n(34705),a=n(49514),o=n(57235),s=n(40827),l=n(8429),u=n(48604),c=n(89495),d=n(54044),f=n(63242),p=n(4632),h=n(7023),g=n(51774);function m(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=v)):void 0===t&&(t=y);for(var n,r,i,a,o,s=new x(e),l=[s];n=l.pop();)if((i=t(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)l.push(r=i[a]=new x(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(w)}function y(e){return e.children}function v(e){return Array.isArray(e)?e[1]:null}function b(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function w(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function x(e){this.data=e,this.depth=this.height=0,this.parent=null}x.prototype=m.prototype={constructor:x,count:r.default,each:i.default,eachAfter:o.default,eachBefore:a.default,find:s.default,sum:l.default,sort:u.default,path:c.default,ancestors:d.default,descendants:f.default,leaves:p.default,links:h.default,copy:function(){return m(this).eachBefore(b)},[Symbol.iterator]:g.default}},51774:(e,t,n)=>{"use strict";function*r(){var e,t,n,r,i=this,a=[i];do{for(e=a.reverse(),a=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;nr})},4632:(e,t,n)=>{"use strict";function r(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e}n.r(t),n.d(t,{default:()=>r})},7023:(e,t,n)=>{"use strict";function r(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t}n.r(t),n.d(t,{default:()=>r})},89495:(e,t,n)=>{"use strict";function r(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}n.r(t),n.d(t,{default:()=>r})},48604:(e,t,n)=>{"use strict";function r(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))}n.r(t),n.d(t,{default:()=>r})},8429:(e,t,n)=>{"use strict";function r(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))}n.r(t),n.d(t,{default:()=>r})},37750:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Node:()=>i.Node,cluster:()=>r.default,hierarchy:()=>i.default,pack:()=>a.default,packEnclose:()=>s.default,packSiblings:()=>o.default,partition:()=>l.default,stratify:()=>u.default,tree:()=>c.default,treemap:()=>d.default,treemapBinary:()=>f.default,treemapDice:()=>p.default,treemapResquarify:()=>y.default,treemapSlice:()=>h.default,treemapSliceDice:()=>g.default,treemapSquarify:()=>m.default});var r=n(94292),i=n(79070),a=n(16486),o=n(24747),s=n(6155),l=n(61464),u=n(15904),c=n(84768),d=n(67415),f=n(13706),p=n(82684),h=n(48009),g=n(64006),m=n(38273),y=n(76340)},68584:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const r=1664525,i=1013904223,a=4294967296;function o(){let e=1;return()=>(e=(r*e+i)%a)/a}},6155:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,packEncloseRandom:()=>o});var r=n(70507),i=n(68584);function a(e){return o(e,(0,i.default)())}function o(e,t){for(var n,i,a=0,o=(e=(0,r.shuffle)(Array.from(e),t)).length,l=[];a0&&n*n>r*r+i*i}function c(e,t){for(var n=0;n1e-6?(T+Math.sqrt(T*T-4*C*k))/(2*C):k/T);return{x:r+E+S*R,y:i+_+A*R,r:R}}},16486:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(54902),i=n(69112),a=n(68584),o=n(24747);function s(e){return Math.sqrt(e.value)}function l(){var e=null,t=1,n=1,o=i.constantZero;function l(r){const l=(0,a.default)();return r.x=t/2,r.y=n/2,e?r.eachBefore(u(e)).eachAfter(c(o,.5,l)).eachBefore(d(1)):r.eachBefore(u(s)).eachAfter(c(i.constantZero,1,l)).eachAfter(c(o,r.r/Math.min(t,n),l)).eachBefore(d(Math.min(t,n)/(2*r.r))),r}return l.radius=function(t){return arguments.length?(e=(0,r.optional)(t),l):e},l.size=function(e){return arguments.length?(t=+e[0],n=+e[1],l):[t,n]},l.padding=function(e){return arguments.length?(o="function"==typeof e?e:(0,i.default)(+e),l):o},l}function u(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function c(e,t,n){return function(r){if(i=r.children){var i,a,s,l=i.length,u=e(r)*t||0;if(u)for(a=0;a{"use strict";n.r(t),n.d(t,{default:()=>d,packSiblingsRandom:()=>c});var r=n(70507),i=n(68584),a=n(6155);function o(e,t,n){var r,i,a,o,s=e.x-t.x,l=e.y-t.y,u=s*s+l*l;u?(i=t.r+n.r,i*=i,o=e.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=e.x-r*s-a*l,n.y=e.y-r*l+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=t.x+r*s-a*l,n.y=t.y+r*l+a*s)):(n.x=t.x+n.r,n.y=t.y)}function s(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function l(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function u(e){this._=e,this.next=null,this.previous=null}function c(e,t){if(!(d=(e=(0,r.default)(e)).length))return 0;var n,i,c,d,f,p,h,g,m,y,v;if((n=e[0]).x=0,n.y=0,!(d>1))return n.r;if(i=e[1],n.x=-i.r,i.x=n.r,i.y=0,!(d>2))return n.r+i.r;o(i,n,c=e[2]),n=new u(n),i=new u(i),c=new u(c),n.next=c.previous=i,i.next=n.previous=c,c.next=i.previous=n;e:for(h=3;h{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(61003),i=n(82684);function a(){var e=1,t=1,n=0,a=!1;function o(o){var s=o.height+1;return o.x0=o.y0=n,o.x1=e,o.y1=t/s,o.eachBefore(function(e,t){return function(r){r.children&&(0,i.default)(r,r.x0,e*(r.depth+1)/t,r.x1,e*(r.depth+2)/t);var a=r.x0,o=r.y0,s=r.x1-n,l=r.y1-n;s{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(54902),i=n(79070),a={depth:-1},o={},s={};function l(e){return e.id}function u(e){return e.parentId}function c(){var e,t=l,n=u;function c(r){var l,u,c,p,h,g,m,y,v=Array.from(r),b=t,w=n,x=new Map;if(null!=e){const t=v.map(((t,n)=>function(e){let t=(e=`${e}`).length;return f(e,t-1)&&!f(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(d),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(d(e)),v.push(s));b=(e,n)=>t[n],w=(e,t)=>n[t]}for(c=0,l=v.length;c=0&&(g=v[e]).data===s;--e)g.data=null}if(p.parent=a,p.eachBefore((function(e){e.depth=e.parent.depth+1,--l})).eachBefore(i.computeHeight),p.parent=null,l>0)throw new Error("cycle");return p}return c.id=function(e){return arguments.length?(t=(0,r.optional)(e),c):t},c.parentId=function(e){return arguments.length?(n=(0,r.optional)(e),c):n},c.path=function(t){return arguments.length?(e=(0,r.optional)(t),c):e},c}function d(e){let t=e.length;if(t<2)return"";for(;--t>1&&!f(e,t););return e.slice(0,t)}function f(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}},84768:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(79070);function i(e,t){return e.parent===t.parent?1:2}function a(e){var t=e.children;return t?t[0]:e.t}function o(e){var t=e.children;return t?t[t.length-1]:e.t}function s(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function l(e,t,n){return e.a.parent===t.parent?e.a:n}function u(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function c(){var e=i,t=1,n=1,r=null;function c(i){var a=function(e){for(var t,n,r,i,a,o=new u(e,0),s=[o];t=s.pop();)if(r=t._.children)for(t.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=t.children[i]=new u(r[i],i)),n.parent=t;return(o.parent=new u(null,0)).children=[o],o}(i);if(a.eachAfter(d),a.parent.m=-a.z,a.eachBefore(f),r)i.eachBefore(p);else{var o=i,s=i,l=i;i.eachBefore((function(e){e.xs.x&&(s=e),e.depth>l.depth&&(l=e)}));var c=o===s?1:e(o,s)/2,h=c-o.x,g=t/(s.x+c+h),m=n/(l.depth||1);i.eachBefore((function(e){e.x=(e.x+h)*g,e.y=e.depth*m}))}return i}function d(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var u=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-u):t.z=u}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,u=t,c=t,d=n,f=u.parent.children[0],p=u.m,h=c.m,g=d.m,m=f.m;d=o(d),u=a(u),d&&u;)f=a(f),(c=o(c)).a=t,(i=d.z+g-u.z-p+e(d._,u._))>0&&(s(l(d,t,r),t,i),p+=i,h+=i),g+=d.m,p+=u.m,m+=f.m,h+=c.m;d&&!o(c)&&(c.t=d,c.m+=g-h),u&&!a(f)&&(f.t=u,f.m+=p-m,r=t)}return r}(t,i,t.parent.A||r[0])}function f(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function p(e){e.x*=t,e.y=e.depth*n}return c.separation=function(t){return arguments.length?(e=t,c):e},c.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],c):r?null:[t,n]},c.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],c):r?[t,n]:null},c}u.prototype=Object.create(r.Node.prototype)},13706:(e,t,n)=>{"use strict";function r(e,t,n,r,i){var a,o,s=e.children,l=s.length,u=new Array(l+1);for(u[0]=o=a=0;a=n-1){var c=s[t];return c.x0=i,c.y0=a,c.x1=o,void(c.y1=l)}for(var d=u[t],f=r/2+d,p=t+1,h=n-1;p>>1;u[g]l-a){var v=r?(i*y+o*m)/r:o;e(t,p,m,i,a,v,l),e(p,n,y,v,a,o,l)}else{var b=r?(a*y+l*m)/r:l;e(t,p,m,i,a,o,b),e(p,n,y,i,b,o,l)}}(0,l,e.value,t,n,r,i)}n.r(t),n.d(t,{default:()=>r})},82684:(e,t,n)=>{"use strict";function r(e,t,n,r,i){for(var a,o=e.children,s=-1,l=o.length,u=e.value&&(r-t)/e.value;++sr})},67415:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(61003),i=n(38273),a=n(54902),o=n(69112);function s(){var e=i.default,t=!1,n=1,s=1,l=[0],u=o.constantZero,c=o.constantZero,d=o.constantZero,f=o.constantZero,p=o.constantZero;function h(e){return e.x0=e.y0=0,e.x1=n,e.y1=s,e.eachBefore(g),l=[0],t&&e.eachBefore(r.default),e}function g(t){var n=l[t.depth],r=t.x0+n,i=t.y0+n,a=t.x1-n,o=t.y1-n;a{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(82684),i=n(48009),a=n(38273);const o=function e(t){function n(e,n,o,s,l){if((u=e._squarify)&&u.ratio===t)for(var u,c,d,f,p,h=-1,g=u.length,m=e.value;++h1?t:1)},n}(a.phi)},61003:(e,t,n)=>{"use strict";function r(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}n.r(t),n.d(t,{default:()=>r})},48009:(e,t,n)=>{"use strict";function r(e,t,n,r,i){for(var a,o=e.children,s=-1,l=o.length,u=e.value&&(i-n)/e.value;++sr})},64006:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(82684),i=n(48009);function a(e,t,n,a,o){(1&e.depth?i.default:r.default)(e,t,n,a,o)}},38273:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,phi:()=>a,squarifyRatio:()=>o});var r=n(82684),i=n(48009),a=(1+Math.sqrt(5))/2;function o(e,t,n,a,o,s){for(var l,u,c,d,f,p,h,g,m,y,v,b=[],w=t.children,x=0,E=0,S=w.length,_=t.value;xh&&(h=u),v=f*f*y,(g=Math.max(h/v,v/p))>m){f-=u;break}m=g}b.push(l={value:f,dice:c1?t:1)},n}(a)},68079:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,genericArray:()=>o});var r=n(58503),i=n(10128);function a(e,t){return((0,i.isNumberArray)(t)?i.default:o)(e,t)}function o(e,t){var n,i=t?t.length:0,a=e?Math.min(i,e.length):0,o=new Array(a),s=new Array(i);for(n=0;n{"use strict";function r(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function i(e){var t=e.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[i],o=e[i+1],s=i>0?e[i-1]:2*a-o,l=ir,default:()=>i})},19804:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(86160);function i(e){var t=e.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*t),a=e[(i+t-1)%t],o=e[i%t],s=e[(i+1)%t],l=e[(i+2)%t];return(0,r.basis)((n-i/t)*t,a,o,s,l)}}},84709:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,gamma:()=>o,hue:()=>a});var r=n(3116);function i(e,t){return function(n){return e+n*t}}function a(e,t){var n=t-e;return n?i(e,n>180||n<-180?n-360*Math.round(n/360):n):(0,r.default)(isNaN(e)?t:e)}function o(e){return 1==(e=+e)?s:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):(0,r.default)(isNaN(t)?n:t)}}function s(e,t){var n=t-e;return n?i(e,n):(0,r.default)(isNaN(e)?t:e)}},3116:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=e=>()=>e},69837:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cubehelixLong:()=>s,default:()=>o});var r=n(72090),i=n(84709);function a(e){return function t(n){function a(t,a){var o=e((t=(0,r.cubehelix)(t)).h,(a=(0,r.cubehelix)(a)).h),s=(0,i.default)(t.s,a.s),l=(0,i.default)(t.l,a.l),u=(0,i.default)(t.opacity,a.opacity);return function(e){return t.h=o(e),t.s=s(e),t.l=l(Math.pow(e,n)),t.opacity=u(e),t+""}}return n=+n,a.gamma=t,a}(1)}const o=a(i.hue);var s=a(i.default)},58172:(e,t,n)=>{"use strict";function r(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}n.r(t),n.d(t,{default:()=>r})},28403:(e,t,n)=>{"use strict";function r(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}n.r(t),n.d(t,{default:()=>r})},21785:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,hclLong:()=>s});var r=n(72090),i=n(84709);function a(e){return function(t,n){var a=e((t=(0,r.hcl)(t)).h,(n=(0,r.hcl)(n)).h),o=(0,i.default)(t.c,n.c),s=(0,i.default)(t.l,n.l),l=(0,i.default)(t.opacity,n.opacity);return function(e){return t.h=a(e),t.c=o(e),t.l=s(e),t.opacity=l(e),t+""}}}const o=a(i.hue);var s=a(i.default)},17705:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,hslLong:()=>s});var r=n(72090),i=n(84709);function a(e){return function(t,n){var a=e((t=(0,r.hsl)(t)).h,(n=(0,r.hsl)(n)).h),o=(0,i.default)(t.s,n.s),s=(0,i.default)(t.l,n.l),l=(0,i.default)(t.opacity,n.opacity);return function(e){return t.h=a(e),t.s=o(e),t.l=s(e),t.opacity=l(e),t+""}}}const o=a(i.hue);var s=a(i.default)},16232:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(84709);function i(e,t){var n=(0,r.hue)(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}}},82226:(e,t,n)=>{"use strict";n.r(t),n.d(t,{interpolate:()=>r.default,interpolateArray:()=>i.default,interpolateBasis:()=>a.default,interpolateBasisClosed:()=>o.default,interpolateCubehelix:()=>x.default,interpolateCubehelixLong:()=>x.cubehelixLong,interpolateDate:()=>s.default,interpolateDiscrete:()=>l.default,interpolateHcl:()=>w.default,interpolateHclLong:()=>w.hclLong,interpolateHsl:()=>v.default,interpolateHslLong:()=>v.hslLong,interpolateHue:()=>u.default,interpolateLab:()=>b.default,interpolateNumber:()=>c.default,interpolateNumberArray:()=>d.default,interpolateObject:()=>f.default,interpolateRgb:()=>y.default,interpolateRgbBasis:()=>y.rgbBasis,interpolateRgbBasisClosed:()=>y.rgbBasisClosed,interpolateRound:()=>p.default,interpolateString:()=>h.default,interpolateTransformCss:()=>g.interpolateTransformCss,interpolateTransformSvg:()=>g.interpolateTransformSvg,interpolateZoom:()=>m.default,piecewise:()=>E.default,quantize:()=>S.default});var r=n(58503),i=n(68079),a=n(86160),o=n(19804),s=n(58172),l=n(28403),u=n(16232),c=n(8981),d=n(10128),f=n(34287),p=n(49770),h=n(67737),g=n(91957),m=n(95835),y=n(21197),v=n(17705),b=n(74917),w=n(21785),x=n(69837),E=n(23104),S=n(70819)},74917:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(72090),i=n(84709);function a(e,t){var n=(0,i.default)((e=(0,r.lab)(e)).l,(t=(0,r.lab)(t)).l),a=(0,i.default)(e.a,t.a),o=(0,i.default)(e.b,t.b),s=(0,i.default)(e.opacity,t.opacity);return function(t){return e.l=n(t),e.a=a(t),e.b=o(t),e.opacity=s(t),e+""}}},8981:(e,t,n)=>{"use strict";function r(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}n.r(t),n.d(t,{default:()=>r})},10128:(e,t,n)=>{"use strict";function r(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(n=0;nr,isNumberArray:()=>i})},34287:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(58503);function i(e,t){var n,i={},a={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=(0,r.default)(e[n],t[n]):a[n]=t[n];return function(e){for(n in i)a[n]=i[n](e);return a}}},23104:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(58503);function i(e,t){void 0===t&&(t=e,e=r.default);for(var n=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);n{"use strict";function r(e,t){for(var n=new Array(t),r=0;rr})},21197:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,rgbBasis:()=>u,rgbBasisClosed:()=>c});var r=n(72090),i=n(86160),a=n(19804),o=n(84709);const s=function e(t){var n=(0,o.gamma)(t);function i(e,t){var i=n((e=(0,r.rgb)(e)).r,(t=(0,r.rgb)(t)).r),a=n(e.g,t.g),s=n(e.b,t.b),l=(0,o.default)(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=a(t),e.b=s(t),e.opacity=l(t),e+""}}return i.gamma=e,i}(1);function l(e){return function(t){var n,i,a=t.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n{"use strict";function r(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}n.r(t),n.d(t,{default:()=>r})},67737:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(8981),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,a=new RegExp(i.source,"g");function o(e,t){var n,o,s,l=i.lastIndex=a.lastIndex=0,u=-1,c=[],d=[];for(e+="",t+="";(n=i.exec(e))&&(o=a.exec(t));)(s=o.index)>l&&(s=t.slice(l,s),c[u]?c[u]+=s:c[++u]=s),(n=n[0])===(o=o[0])?c[u]?c[u]+=o:c[++u]=o:(c[++u]=null,d.push({i:u,x:(0,r.default)(n,o)})),l=a.lastIndex;return l{"use strict";n.r(t),n.d(t,{default:()=>a,identity:()=>i});var r=180/Math.PI,i={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function a(e,t,n,i,a,o){var s,l,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(l=Math.sqrt(n*n+i*i))&&(n/=l,i/=l,u/=l),e*i{"use strict";n.r(t),n.d(t,{interpolateTransformCss:()=>o,interpolateTransformSvg:()=>s});var r=n(8981),i=n(41226);function a(e,t,n,i){function a(e){return e.length?e.pop()+" ":""}return function(o,s){var l=[],u=[];return o=e(o),s=e(s),function(e,i,a,o,s,l){if(e!==a||i!==o){var u=s.push("translate(",null,t,null,n);l.push({i:u-4,x:(0,r.default)(e,a)},{i:u-2,x:(0,r.default)(i,o)})}else(a||o)&&s.push("translate("+a+t+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,l,u),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(a(n)+"rotate(",null,i)-2,x:(0,r.default)(e,t)})):t&&n.push(a(n)+"rotate("+t+i)}(o.rotate,s.rotate,l,u),function(e,t,n,o){e!==t?o.push({i:n.push(a(n)+"skewX(",null,i)-2,x:(0,r.default)(e,t)}):t&&n.push(a(n)+"skewX("+t+i)}(o.skewX,s.skewX,l,u),function(e,t,n,i,o,s){if(e!==n||t!==i){var l=o.push(a(o)+"scale(",null,",",null,")");s.push({i:l-4,x:(0,r.default)(e,n)},{i:l-2,x:(0,r.default)(t,i)})}else 1===n&&1===i||o.push(a(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,l,u),o=s=null,function(e){for(var t,n=-1,r=u.length;++n{"use strict";n.r(t),n.d(t,{parseCss:()=>a,parseSvg:()=>o});var r,i=n(31852);function a(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?i.identity:(0,i.default)(t.a,t.b,t.c,t.d,t.e,t.f)}function o(e){return null==e?i.identity:(r||(r=document.createElementNS("http://www.w3.org/2000/svg","g")),r.setAttribute("transform",e),(e=r.transform.baseVal.consolidate())?(e=e.matrix,(0,i.default)(e.a,e.b,e.c,e.d,e.e,e.f)):i.identity)}},58503:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(72090),i=n(21197),a=n(68079),o=n(58172),s=n(8981),l=n(34287),u=n(67737),c=n(3116),d=n(10128);function f(e,t){var n,f=typeof t;return null==t||"boolean"===f?(0,c.default)(t):("number"===f?s.default:"string"===f?(n=(0,r.color)(t))?(t=n,i.default):u.default:t instanceof r.color?i.default:t instanceof Date?o.default:(0,d.isNumberArray)(t)?d.default:Array.isArray(t)?a.genericArray:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?l.default:s.default)(e,t)}},95835:(e,t,n)=>{"use strict";function r(e){return((e=Math.exp(e))+1/e)/2}n.r(t),n.d(t,{default:()=>i});const i=function e(t,n,i){function a(e,a){var o,s,l=e[0],u=e[1],c=e[2],d=a[0],f=a[1],p=a[2],h=d-l,g=f-u,m=h*h+g*g;if(m<1e-12)s=Math.log(p/c)/t,o=function(e){return[l+e*h,u+e*g,c*Math.exp(t*e*s)]};else{var y=Math.sqrt(m),v=(p*p-c*c+i*m)/(2*c*n*y),b=(p*p-c*c-i*m)/(2*p*n*y),w=Math.log(Math.sqrt(v*v+1)-v),x=Math.log(Math.sqrt(b*b+1)-b);s=(x-w)/t,o=function(e){var i,a=e*s,o=r(w),d=c/(n*y)*(o*(i=t*a+w,((i=Math.exp(2*i))-1)/(i+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w));return[l+d*h,u+d*g,c*o/r(t*a+w)]}}return o.duration=1e3*s*t/Math.SQRT2,o}return a.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},a}(Math.SQRT2,2,4)},20066:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Path:()=>r.Path,path:()=>r.path,pathRound:()=>r.pathRound});var r=n(14083)},14083:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Path:()=>l,path:()=>u,pathRound:()=>c});const r=Math.PI,i=2*r,a=1e-6,o=i-a;function s(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return s;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;ta)if(Math.abs(f*u-c*d)>a&&o){let h=n-s,g=i-l,m=u*u+c*c,y=h*h+g*g,v=Math.sqrt(m),b=Math.sqrt(p),w=o*Math.tan((r-Math.acos((m+p-y)/(2*v*b)))/2),x=w/b,E=w/v;Math.abs(x-1)>a&&this._append`L${e+x*d},${t+x*f}`,this._append`A${o},${o},0,0,${+(f*h>d*g)},${this._x1=e+E*u},${this._y1=t+E*c}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,s,l,u){if(e=+e,t=+t,u=!!u,(n=+n)<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(s),d=n*Math.sin(s),f=e+c,p=t+d,h=1^u,g=u?s-l:l-s;null===this._x1?this._append`M${f},${p}`:(Math.abs(this._x1-f)>a||Math.abs(this._y1-p)>a)&&this._append`L${f},${p}`,n&&(g<0&&(g=g%i+i),g>o?this._append`A${n},${n},0,1,${h},${e-c},${t-d}A${n},${n},0,1,${h},${this._x1=f},${this._y1=p}`:g>a&&this._append`A${n},${n},0,${+(g>=r)},${h},${this._x1=e+n*Math.cos(l)},${this._y1=t+n*Math.sin(l)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function u(){return new l}function c(e=3){return new l(+e)}u.prototype=l.prototype},16277:(e,t,n)=>{"use strict";function r(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return i(this.cover(t,n),t,n,e)}function i(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a,o,s,l,u,c,d,f,p=e._root,h={data:r},g=e._x0,m=e._y0,y=e._x1,v=e._y1;if(!p)return e._root=h,e;for(;p.length;)if((u=t>=(a=(g+y)/2))?g=a:y=a,(c=n>=(o=(m+v)/2))?m=o:v=o,i=p,!(p=p[d=c<<1|u]))return i[d]=h,e;if(s=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===s&&n===l)return h.next=p,i?i[d]=h:e._root=h,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(u=t>=(a=(g+y)/2))?g=a:y=a,(c=n>=(o=(m+v)/2))?m=o:v=o}while((d=c<<1|u)==(f=(l>=o)<<1|s>=a));return i[f]=p,i[d]=h,e}function a(e){var t,n,r,a,o=e.length,s=new Array(o),l=new Array(o),u=1/0,c=1/0,d=-1/0,f=-1/0;for(n=0;nd&&(d=r),af&&(f=a));if(u>d||c>f)return this;for(this.cover(u,c).cover(d,f),n=0;na,default:()=>r})},82017:(e,t,n)=>{"use strict";function r(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o,s,l=i-n||1,u=this._root;n>e||e>=i||r>t||t>=a;)switch(s=(tr})},63892:(e,t,n)=>{"use strict";function r(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}n.r(t),n.d(t,{default:()=>r})},32980:(e,t,n)=>{"use strict";function r(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}n.r(t),n.d(t,{default:()=>r})},21539:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(50975);function i(e,t,n){var i,a,o,s,l,u,c,d=this._x0,f=this._y0,p=this._x1,h=this._y1,g=[],m=this._root;for(m&&g.push(new r.default(m,d,f,p,h)),null==n?n=1/0:(d=e-n,f=t-n,p=e+n,h=t+n,n*=n);u=g.pop();)if(!(!(m=u.node)||(a=u.x0)>p||(o=u.y0)>h||(s=u.x1)=v)<<1|e>=y)&&(u=g[g.length-1],g[g.length-1]=g[g.length-1-c],g[g.length-1-c]=u)}else{var b=e-+this._x.call(null,m.data),w=t-+this._y.call(null,m.data),x=b*b+w*w;if(x{"use strict";n.r(t),n.d(t,{quadtree:()=>r.default});var r=n(62479)},50975:(e,t,n)=>{"use strict";function r(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}n.r(t),n.d(t,{default:()=>r})},62479:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(16277),i=n(82017),a=n(63892),o=n(32980),s=n(21539),l=n(59616),u=n(89232),c=n(53977),d=n(2621),f=n(93759),p=n(11086),h=n(55437);function g(e,t,n){var r=new m(null==t?p.defaultX:t,null==n?h.defaultY:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function m(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function y(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var v=g.prototype=m.prototype;v.copy=function(){var e,t,n=new m(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=y(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=y(t));return n},v.add=r.default,v.addAll=r.addAll,v.cover=i.default,v.data=a.default,v.extent=o.default,v.find=s.default,v.remove=l.default,v.removeAll=l.removeAll,v.root=u.default,v.size=c.default,v.visit=d.default,v.visitAfter=f.default,v.x=p.default,v.y=h.default},59616:(e,t,n)=>{"use strict";function r(e){if(isNaN(a=+this._x.call(null,e))||isNaN(o=+this._y.call(null,e)))return this;var t,n,r,i,a,o,s,l,u,c,d,f,p=this._root,h=this._x0,g=this._y0,m=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((u=a>=(s=(h+m)/2))?h=s:m=s,(c=o>=(l=(g+y)/2))?g=l:y=l,t=p,!(p=p[d=c<<1|u]))return this;if(!p.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(n=t,f=d)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):t?(i?t[d]=i:delete t[d],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[f]=p:this._root=p),this):(this._root=i,this)}function i(e){for(var t=0,n=e.length;tr,removeAll:()=>i})},89232:(e,t,n)=>{"use strict";function r(){return this._root}n.r(t),n.d(t,{default:()=>r})},53977:(e,t,n)=>{"use strict";function r(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}n.r(t),n.d(t,{default:()=>r})},2621:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(50975);function i(e){var t,n,i,a,o,s,l=[],u=this._root;for(u&&l.push(new r.default(u,this._x0,this._y0,this._x1,this._y1));t=l.pop();)if(!e(u=t.node,i=t.x0,a=t.y0,o=t.x1,s=t.y1)&&u.length){var c=(i+o)/2,d=(a+s)/2;(n=u[3])&&l.push(new r.default(n,c,d,o,s)),(n=u[2])&&l.push(new r.default(n,i,d,c,s)),(n=u[1])&&l.push(new r.default(n,c,a,o,d)),(n=u[0])&&l.push(new r.default(n,i,a,c,d))}return this}},93759:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(50975);function i(e){var t,n=[],i=[];for(this._root&&n.push(new r.default(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var a=t.node;if(a.length){var o,s=t.x0,l=t.y0,u=t.x1,c=t.y1,d=(s+u)/2,f=(l+c)/2;(o=a[0])&&n.push(new r.default(o,s,l,d,f)),(o=a[1])&&n.push(new r.default(o,d,l,u,f)),(o=a[2])&&n.push(new r.default(o,s,f,d,c)),(o=a[3])&&n.push(new r.default(o,d,f,u,c))}i.push(t)}for(;t=i.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}},11086:(e,t,n)=>{"use strict";function r(e){return e[0]}function i(e){return arguments.length?(this._x=e,this):this._x}n.r(t),n.d(t,{default:()=>i,defaultX:()=>r})},55437:(e,t,n)=>{"use strict";function r(e){return e[1]}function i(e){return arguments.length?(this._y=e,this):this._y}n.r(t),n.d(t,{default:()=>i,defaultY:()=>r})},69573:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666")},54025:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666")},96018:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")},35167:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2")},76786:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc")},52612:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999")},51021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3")},25006:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f")},38512:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")},96406:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")},61995:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0")},40938:(e,t,n)=>{"use strict";function r(e){for(var t=e.length/6|0,n=new Array(t),r=0;rr})},79505:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(r.default);const o=(0,i.default)(a)},59429:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(r.default);const o=(0,i.default)(a)},22389:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(r.default);const o=(0,i.default)(a)},57680:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(r.default);const o=(0,i.default)(a)},69501:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(r.default);const o=(0,i.default)(a)},91060:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(r.default);const o=(0,i.default)(a)},64704:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(r.default);const o=(0,i.default)(a)},46268:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(r.default);const o=(0,i.default)(a)},25874:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(r.default);const o=(0,i.default)(a)},71864:(e,t,n)=>{"use strict";n.r(t),n.d(t,{interpolateBlues:()=>M.default,interpolateBrBG:()=>h.default,interpolateBuGn:()=>S.default,interpolateBuPu:()=>_.default,interpolateCividis:()=>z.default,interpolateCool:()=>j.cool,interpolateCubehelixDefault:()=>q.default,interpolateGnBu:()=>A.default,interpolateGreens:()=>I.default,interpolateGreys:()=>$.default,interpolateInferno:()=>V.inferno,interpolateMagma:()=>V.magma,interpolateOrRd:()=>C.default,interpolateOranges:()=>U.default,interpolatePRGn:()=>g.default,interpolatePiYG:()=>m.default,interpolatePlasma:()=>V.plasma,interpolatePuBu:()=>k.default,interpolatePuBuGn:()=>T.default,interpolatePuOr:()=>y.default,interpolatePuRd:()=>R.default,interpolatePurples:()=>L.default,interpolateRainbow:()=>j.default,interpolateRdBu:()=>v.default,interpolateRdGy:()=>b.default,interpolateRdPu:()=>D.default,interpolateRdYlBu:()=>w.default,interpolateRdYlGn:()=>x.default,interpolateReds:()=>B.default,interpolateSinebow:()=>H.default,interpolateSpectral:()=>E.default,interpolateTurbo:()=>G.default,interpolateViridis:()=>V.default,interpolateWarm:()=>j.warm,interpolateYlGn:()=>N.default,interpolateYlGnBu:()=>O.default,interpolateYlOrBr:()=>F.default,interpolateYlOrRd:()=>P.default,schemeAccent:()=>i.default,schemeBlues:()=>M.scheme,schemeBrBG:()=>h.scheme,schemeBuGn:()=>S.scheme,schemeBuPu:()=>_.scheme,schemeCategory10:()=>r.default,schemeDark2:()=>a.default,schemeGnBu:()=>A.scheme,schemeGreens:()=>I.scheme,schemeGreys:()=>$.scheme,schemeObservable10:()=>o.default,schemeOrRd:()=>C.scheme,schemeOranges:()=>U.scheme,schemePRGn:()=>g.scheme,schemePaired:()=>s.default,schemePastel1:()=>l.default,schemePastel2:()=>u.default,schemePiYG:()=>m.scheme,schemePuBu:()=>k.scheme,schemePuBuGn:()=>T.scheme,schemePuOr:()=>y.scheme,schemePuRd:()=>R.scheme,schemePurples:()=>L.scheme,schemeRdBu:()=>v.scheme,schemeRdGy:()=>b.scheme,schemeRdPu:()=>D.scheme,schemeRdYlBu:()=>w.scheme,schemeRdYlGn:()=>x.scheme,schemeReds:()=>B.scheme,schemeSet1:()=>c.default,schemeSet2:()=>d.default,schemeSet3:()=>f.default,schemeSpectral:()=>E.scheme,schemeTableau10:()=>p.default,schemeYlGn:()=>N.scheme,schemeYlGnBu:()=>O.scheme,schemeYlOrBr:()=>F.scheme,schemeYlOrRd:()=>P.scheme});var r=n(96406),i=n(69573),a=n(54025),o=n(61995),s=n(96018),l=n(35167),u=n(76786),c=n(52612),d=n(51021),f=n(25006),p=n(38512),h=n(79505),g=n(59429),m=n(22389),y=n(57680),v=n(69501),b=n(91060),w=n(64704),x=n(46268),E=n(25874),S=n(51632),_=n(2402),A=n(50456),C=n(97971),T=n(91223),k=n(65430),R=n(21077),D=n(5961),O=n(26041),N=n(28732),F=n(17616),P=n(94630),M=n(96476),I=n(44425),$=n(16417),L=n(59902),B=n(95813),U=n(67666),z=n(95169),q=n(16253),j=n(5988),H=n(60541),G=n(67138),V=n(98710)},27810:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(82226);const i=e=>(0,r.interpolateRgbBasis)(e[e.length-1])},51632:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(r.default);const o=(0,i.default)(a)},2402:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(r.default);const o=(0,i.default)(a)},50456:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(r.default);const o=(0,i.default)(a)},97971:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(r.default);const o=(0,i.default)(a)},65430:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(r.default);const o=(0,i.default)(a)},91223:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(r.default);const o=(0,i.default)(a)},21077:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(r.default);const o=(0,i.default)(a)},5961:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(r.default);const o=(0,i.default)(a)},28732:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(r.default);const o=(0,i.default)(a)},26041:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(r.default);const o=(0,i.default)(a)},17616:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(r.default);const o=(0,i.default)(a)},94630:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(r.default);const o=(0,i.default)(a)},95169:(e,t,n)=>{"use strict";function r(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"}n.r(t),n.d(t,{default:()=>r})},16253:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(72090);const i=(0,n(82226).interpolateCubehelixLong)((0,r.cubehelix)(300,.5,0),(0,r.cubehelix)(-240,.5,1))},5988:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cool:()=>o,default:()=>l,warm:()=>a});var r=n(72090),i=n(82226),a=(0,i.interpolateCubehelixLong)((0,r.cubehelix)(-100,.75,.35),(0,r.cubehelix)(80,1.5,.8)),o=(0,i.interpolateCubehelixLong)((0,r.cubehelix)(260,.75,.35),(0,r.cubehelix)(80,1.5,.8)),s=(0,r.cubehelix)();function l(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return s.h=360*e-100,s.s=1.5-1.5*t,s.l=.8-.9*t,s+""}},60541:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=(0,n(72090).rgb)(),i=Math.PI/3,a=2*Math.PI/3;function o(e){var t;return e=(.5-e)*Math.PI,r.r=255*(t=Math.sin(e))*t,r.g=255*(t=Math.sin(e+i))*t,r.b=255*(t=Math.sin(e+a))*t,r+""}},67138:(e,t,n)=>{"use strict";function r(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"}n.r(t),n.d(t,{default:()=>r})},98710:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,inferno:()=>s,magma:()=>o,plasma:()=>l});var r=n(40938);function i(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const a=i((0,r.default)("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var o=i((0,r.default)("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),s=i((0,r.default)("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),l=i((0,r.default)("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))},96476:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(r.default);const o=(0,i.default)(a)},44425:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(r.default);const o=(0,i.default)(a)},16417:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(r.default);const o=(0,i.default)(a)},67666:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(r.default);const o=(0,i.default)(a)},59902:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(r.default);const o=(0,i.default)(a)},95813:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(r.default);const o=(0,i.default)(a)},91392:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,point:()=>l});var r=n(61388),i=n(99065),a=n(10106);function o(){var e,t,n=(0,a.default)().unknown(void 0),s=n.domain,l=n.range,u=0,c=1,d=!1,f=0,p=0,h=.5;function g(){var n=s().length,i=c{"use strict";function r(e){return function(){return e}}n.r(t),n.d(t,{default:()=>r})},21052:(e,t,n)=>{"use strict";n.r(t),n.d(t,{copy:()=>f,default:()=>h,identity:()=>l,transformer:()=>p});var r=n(61388),i=n(82226),a=n(19279),o=n(70414),s=[0,1];function l(e){return e}function u(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(0,a.default)(isNaN(t)?NaN:.5)}function c(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return it&&(n=e,e=t,t=n),g=function(n){return Math.max(e,Math.min(t,n))}),r=i>2?d:c,a=u=null,y}function y(t){return null==t||isNaN(t=+t)?n:(a||(a=r(f.map(e),p,h)))(e(g(t)))}return y.invert=function(n){return g(t((u||(u=r(p,f.map(e),i.interpolateNumber)))(n)))},y.domain=function(e){return arguments.length?(f=Array.from(e,o.default),m()):f.slice()},y.range=function(e){return arguments.length?(p=Array.from(e),m()):p.slice()},y.rangeRound=function(e){return p=Array.from(e),h=i.interpolateRound,m()},y.clamp=function(e){return arguments.length?(g=!!e||l,m()):g!==l},y.interpolate=function(e){return arguments.length?(h=e,m()):h},y.unknown=function(e){return arguments.length?(n=e,y):n},function(n,r){return e=n,t=r,m()}}function h(){return p()(l,l)}},61436:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f,divergingLog:()=>p,divergingPow:()=>g,divergingSqrt:()=>m,divergingSymlog:()=>h});var r=n(82226),i=n(21052),a=n(99065),o=n(76502),s=n(21721),l=n(18980),u=n(7304),c=n(43837);function d(){var e,t,n,a,o,s,l,u=0,c=.5,d=1,f=1,p=i.identity,h=!1;function g(e){return isNaN(e=+e)?l:(e=.5+((e=+s(e))-t)*(f*e{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(76502),i=n(70414);function a(e){var t;function n(e){return null==e||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,i.default),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return a(e).unknown(t)},e=arguments.length?Array.from(e,i.default):[0,1],(0,r.linearish)(n)}},71303:(e,t,n)=>{"use strict";n.r(t),n.d(t,{scaleBand:()=>r.default,scaleDiverging:()=>v.default,scaleDivergingLog:()=>v.divergingLog,scaleDivergingPow:()=>v.divergingPow,scaleDivergingSqrt:()=>v.divergingSqrt,scaleDivergingSymlog:()=>v.divergingSymlog,scaleIdentity:()=>i.default,scaleImplicit:()=>l.implicit,scaleLinear:()=>a.default,scaleLog:()=>o.default,scaleOrdinal:()=>l.default,scalePoint:()=>r.point,scalePow:()=>u.default,scaleQuantile:()=>d.default,scaleQuantize:()=>f.default,scaleRadial:()=>c.default,scaleSequential:()=>m.default,scaleSequentialLog:()=>m.sequentialLog,scaleSequentialPow:()=>m.sequentialPow,scaleSequentialQuantile:()=>y.default,scaleSequentialSqrt:()=>m.sequentialSqrt,scaleSequentialSymlog:()=>m.sequentialSymlog,scaleSqrt:()=>u.sqrt,scaleSymlog:()=>s.default,scaleThreshold:()=>p.default,scaleTime:()=>h.default,scaleUtc:()=>g.default,tickFormat:()=>b.default});var r=n(91392),i=n(69609),a=n(76502),o=n(21721),s=n(7304),l=n(10106),u=n(43837),c=n(5900),d=n(61990),f=n(94660),p=n(51004),h=n(97910),g=n(1232),m=n(18980),y=n(62445),v=n(61436),b=n(58993)},99065:(e,t,n)=>{"use strict";function r(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function i(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}n.r(t),n.d(t,{initInterpolator:()=>i,initRange:()=>r})},76502:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,linearish:()=>s});var r=n(61388),i=n(21052),a=n(99065),o=n(58993);function s(e){var t=e.domain;return e.ticks=function(e){var n=t();return(0,r.ticks)(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return(0,o.default)(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var i,a,o=t(),s=0,l=o.length-1,u=o[s],c=o[l],d=10;for(c0;){if((a=(0,r.tickIncrement)(u,c,n))===i)return o[s]=u,o[l]=c,t(o);if(a>0)u=Math.floor(u/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;u=Math.ceil(u*a)/a,c=Math.floor(c*a)/a}i=a}return e},e}function l(){var e=(0,i.default)();return e.copy=function(){return(0,i.copy)(e,l())},a.initRange.apply(e,arguments),s(e)}},21721:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g,loggish:()=>h});var r=n(61388),i=n(4710),a=n(8206),o=n(21052),s=n(99065);function l(e){return Math.log(e)}function u(e){return Math.exp(e)}function c(e){return-Math.log(-e)}function d(e){return-Math.exp(-e)}function f(e){return isFinite(e)?+("1e"+e):e<0?0:e}function p(e){return(t,n)=>-e(-t,n)}function h(e){const t=e(l,u),n=t.domain;let o,s,h=10;function g(){return o=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(h),s=function(e){return 10===e?f:e===Math.E?Math.exp:t=>Math.pow(e,t)}(h),n()[0]<0?(o=p(o),s=p(s),e(c,d)):e(l,u),t}return t.base=function(e){return arguments.length?(h=+e,g()):h},t.domain=function(e){return arguments.length?(n(e),g()):n()},t.ticks=e=>{const t=n();let i=t[0],a=t[t.length-1];const l=a0){for(;d<=f;++d)for(u=1;ua)break;g.push(c)}}else for(;d<=f;++d)for(u=h-1;u>=1;--u)if(c=d>0?u/s(-d):u*s(d),!(ca)break;g.push(c)}2*g.length{if(null==e&&(e=10),null==n&&(n=10===h?"s":","),"function"!=typeof n&&(h%1||null!=(n=(0,i.formatSpecifier)(n)).precision||(n.trim=!0),n=(0,i.format)(n)),e===1/0)return n;const r=Math.max(1,h*e/t.ticks().length);return e=>{let t=e/s(Math.round(o(e)));return t*hn((0,a.default)(n(),{floor:e=>s(Math.floor(o(e))),ceil:e=>s(Math.ceil(o(e)))})),t}function g(){const e=h((0,o.transformer)()).domain([1,10]);return e.copy=()=>(0,o.copy)(e,g()).base(e.base()),s.initRange.apply(e,arguments),e}},8206:(e,t,n)=>{"use strict";function r(e,t){var n,r=0,i=(e=e.slice()).length-1,a=e[r],o=e[i];return or})},70414:(e,t,n)=>{"use strict";function r(e){return+e}n.r(t),n.d(t,{default:()=>r})},10106:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,implicit:()=>a});var r=n(61388),i=n(99065);const a=Symbol("implicit");function o(){var e=new r.InternMap,t=[],n=[],s=a;function l(r){let i=e.get(r);if(void 0===i){if(s!==a)return s;e.set(r,i=t.push(r)-1)}return n[i%n.length]}return l.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new r.InternMap;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return l},l.range=function(e){return arguments.length?(n=Array.from(e),l):n.slice()},l.unknown=function(e){return arguments.length?(s=e,l):s},l.copy=function(){return o(t,n).unknown(s)},i.initRange.apply(l,arguments),l}},43837:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c,powish:()=>u,sqrt:()=>d});var r=n(76502),i=n(21052),a=n(99065);function o(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function s(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function l(e){return e<0?-e*e:e*e}function u(e){var t=e(i.identity,i.identity),n=1;return t.exponent=function(t){return arguments.length?1==(n=+t)?e(i.identity,i.identity):.5===n?e(s,l):e(o(n),o(1/n)):n},(0,r.linearish)(t)}function c(){var e=u((0,i.transformer)());return e.copy=function(){return(0,i.copy)(e,c()).exponent(e.exponent())},a.initRange.apply(e,arguments),e}function d(){return c.apply(null,arguments).exponent(.5)}},61990:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(61388),i=n(99065);function a(){var e,t=[],n=[],o=[];function s(){var e=0,i=Math.max(1,n.length);for(o=new Array(i-1);++e0?o[r-1]:t[0],r{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(61388),i=n(76502),a=n(99065);function o(){var e,t=0,n=1,s=1,l=[.5],u=[0,1];function c(t){return null!=t&&t<=t?u[(0,r.bisect)(l,t,0,s)]:e}function d(){var e=-1;for(l=new Array(s);++e=s?[l[s-1],n]:[l[r-1],l[r]]},c.unknown=function(t){return arguments.length?(e=t,c):c},c.thresholds=function(){return l.slice()},c.copy=function(){return o().domain([t,n]).range(u).unknown(e)},a.initRange.apply((0,i.linearish)(c),arguments)}},5900:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(21052),i=n(99065),a=n(76502),o=n(70414);function s(e){return Math.sign(e)*e*e}function l(){var e,t=(0,r.default)(),n=[0,1],u=!1;function c(n){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(t(n));return isNaN(r)?e:u?Math.round(r):r}return c.invert=function(e){return t.invert(s(e))},c.domain=function(e){return arguments.length?(t.domain(e),c):t.domain()},c.range=function(e){return arguments.length?(t.range((n=Array.from(e,o.default)).map(s)),c):n.slice()},c.rangeRound=function(e){return c.range(e).round(!0)},c.round=function(e){return arguments.length?(u=!!e,c):u},c.clamp=function(e){return arguments.length?(t.clamp(e),c):t.clamp()},c.unknown=function(t){return arguments.length?(e=t,c):e},c.copy=function(){return l(t.domain(),n).round(u).clamp(t.clamp()).unknown(e)},i.initRange.apply(c,arguments),(0,a.linearish)(c)}},18980:(e,t,n)=>{"use strict";n.r(t),n.d(t,{copy:()=>d,default:()=>f,sequentialLog:()=>p,sequentialPow:()=>g,sequentialSqrt:()=>m,sequentialSymlog:()=>h});var r=n(82226),i=n(21052),a=n(99065),o=n(76502),s=n(21721),l=n(7304),u=n(43837);function c(){var e,t,n,a,o,s=0,l=1,u=i.identity,c=!1;function d(t){return null==t||isNaN(t=+t)?o:u(0===n?.5:(t=(a(t)-e)*n,c?Math.max(0,Math.min(1,t)):t))}function f(e){return function(t){var n,r;return arguments.length?([n,r]=t,u=e(n,r),d):[u(0),u(1)]}}return d.domain=function(r){return arguments.length?([s,l]=r,e=a(s=+s),t=a(l=+l),n=e===t?0:1/(t-e),d):[s,l]},d.clamp=function(e){return arguments.length?(c=!!e,d):c},d.interpolator=function(e){return arguments.length?(u=e,d):u},d.range=f(r.interpolate),d.rangeRound=f(r.interpolateRound),d.unknown=function(e){return arguments.length?(o=e,d):o},function(r){return a=r,e=r(s),t=r(l),n=e===t?0:1/(t-e),d}}function d(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function f(){var e=(0,o.linearish)(c()(i.identity));return e.copy=function(){return d(e,f())},a.initInterpolator.apply(e,arguments)}function p(){var e=(0,s.loggish)(c()).domain([1,10]);return e.copy=function(){return d(e,p()).base(e.base())},a.initInterpolator.apply(e,arguments)}function h(){var e=(0,l.symlogish)(c());return e.copy=function(){return d(e,h()).constant(e.constant())},a.initInterpolator.apply(e,arguments)}function g(){var e=(0,u.powish)(c());return e.copy=function(){return d(e,g()).exponent(e.exponent())},a.initInterpolator.apply(e,arguments)}function m(){return g.apply(null,arguments).exponent(.5)}},62445:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(61388),i=n(21052),a=n(99065);function o(){var e=[],t=i.identity;function n(n){if(null!=n&&!isNaN(n=+n))return t(((0,r.bisect)(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(r.ascending),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map(((n,r)=>t(r/(e.length-1))))},n.quantiles=function(t){return Array.from({length:t+1},((n,i)=>(0,r.quantile)(e,i/t)))},n.copy=function(){return o(t).domain(e)},a.initInterpolator.apply(n,arguments)}},7304:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,symlogish:()=>l});var r=n(76502),i=n(21052),a=n(99065);function o(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function s(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function l(e){var t=1,n=e(o(t),s(t));return n.constant=function(n){return arguments.length?e(o(t=+n),s(t)):t},(0,r.linearish)(n)}function u(){var e=l((0,i.transformer)());return e.copy=function(){return(0,i.copy)(e,u()).constant(e.constant())},a.initRange.apply(e,arguments)}},51004:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(61388),i=n(99065);function a(){var e,t=[.5],n=[0,1],o=1;function s(i){return null!=i&&i<=i?n[(0,r.bisect)(t,i,0,o)]:e}return s.domain=function(e){return arguments.length?(t=Array.from(e),o=Math.min(t.length,n.length-1),s):t.slice()},s.range=function(e){return arguments.length?(n=Array.from(e),o=Math.min(t.length,n.length-1),s):n.slice()},s.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},s.unknown=function(t){return arguments.length?(e=t,s):e},s.copy=function(){return a().domain(t).range(n).unknown(e)},i.initRange.apply(s,arguments)}},58993:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(61388),i=n(4710);function a(e,t,n,a){var o,s=(0,r.tickStep)(e,t,n);switch((a=(0,i.formatSpecifier)(null==a?",f":a)).type){case"s":var l=Math.max(Math.abs(e),Math.abs(t));return null!=a.precision||isNaN(o=(0,i.precisionPrefix)(s,l))||(a.precision=o),(0,i.formatPrefix)(a,l);case"":case"e":case"g":case"p":case"r":null!=a.precision||isNaN(o=(0,i.precisionRound)(s,Math.max(Math.abs(e),Math.abs(t))))||(a.precision=o-("e"===a.type));break;case"f":case"%":null!=a.precision||isNaN(o=(0,i.precisionFixed)(s))||(a.precision=o-2*("%"===a.type))}return(0,i.format)(a)}},97910:(e,t,n)=>{"use strict";n.r(t),n.d(t,{calendar:()=>c,default:()=>d});var r=n(42472),i=n(98090),a=n(21052),o=n(99065),s=n(8206);function l(e){return new Date(e)}function u(e){return e instanceof Date?+e:+new Date(+e)}function c(e,t,n,r,i,o,d,f,p,h){var g=(0,a.default)(),m=g.invert,y=g.domain,v=h(".%L"),b=h(":%S"),w=h("%I:%M"),x=h("%I %p"),E=h("%a %d"),S=h("%b %d"),_=h("%B"),A=h("%Y");function C(e){return(p(e){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(42472),i=n(98090),a=n(97910),o=n(99065);function s(){return o.initRange.apply((0,a.calendar)(r.utcTicks,r.utcTickInterval,r.utcYear,r.utcMonth,r.utcWeek,r.utcDay,r.utcHour,r.utcMinute,r.utcSecond,i.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}},42716:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(48946),i=n(34552),a=n(54125);function o(e){return e.innerRadius}function s(e){return e.outerRadius}function l(e){return e.startAngle}function u(e){return e.endAngle}function c(e){return e&&e.padAngle}function d(e,t,n,r,a,o,s){var l=e-n,u=t-r,c=(s?o:-o)/(0,i.sqrt)(l*l+u*u),d=c*u,f=-c*l,p=e+d,h=t+f,g=n+d,m=r+f,y=(p+g)/2,v=(h+m)/2,b=g-p,w=m-h,x=b*b+w*w,E=a-o,S=p*m-g*h,_=(w<0?-1:1)*(0,i.sqrt)((0,i.max)(0,E*E*x-S*S)),A=(S*w-b*_)/x,C=(-S*b-w*_)/x,T=(S*w+b*_)/x,k=(-S*b+w*_)/x,R=A-y,D=C-v,O=T-y,N=k-v;return R*R+D*D>O*O+N*N&&(A=T,C=k),{cx:A,cy:C,x01:-d,y01:-f,x11:A*(a/E-1),y11:C*(a/E-1)}}function f(){var e=o,t=s,n=(0,r.default)(0),f=null,p=l,h=u,g=c,m=null,y=(0,a.withPath)(v);function v(){var r,a,o=+e.apply(this,arguments),s=+t.apply(this,arguments),l=p.apply(this,arguments)-i.halfPi,u=h.apply(this,arguments)-i.halfPi,c=(0,i.abs)(u-l),v=u>l;if(m||(m=r=y()),si.epsilon)if(c>i.tau-i.epsilon)m.moveTo(s*(0,i.cos)(l),s*(0,i.sin)(l)),m.arc(0,0,s,l,u,!v),o>i.epsilon&&(m.moveTo(o*(0,i.cos)(u),o*(0,i.sin)(u)),m.arc(0,0,o,u,l,v));else{var b,w,x=l,E=u,S=l,_=u,A=c,C=c,T=g.apply(this,arguments)/2,k=T>i.epsilon&&(f?+f.apply(this,arguments):(0,i.sqrt)(o*o+s*s)),R=(0,i.min)((0,i.abs)(s-o)/2,+n.apply(this,arguments)),D=R,O=R;if(k>i.epsilon){var N=(0,i.asin)(k/o*(0,i.sin)(T)),F=(0,i.asin)(k/s*(0,i.sin)(T));(A-=2*N)>i.epsilon?(S+=N*=v?1:-1,_-=N):(A=0,S=_=(l+u)/2),(C-=2*F)>i.epsilon?(x+=F*=v?1:-1,E-=F):(C=0,x=E=(l+u)/2)}var P=s*(0,i.cos)(x),M=s*(0,i.sin)(x),I=o*(0,i.cos)(_),$=o*(0,i.sin)(_);if(R>i.epsilon){var L,B=s*(0,i.cos)(E),U=s*(0,i.sin)(E),z=o*(0,i.cos)(S),q=o*(0,i.sin)(S);if(ci.epsilon?O>i.epsilon?(b=d(z,q,P,M,s,O,v),w=d(B,U,I,$,s,O,v),m.moveTo(b.cx+b.x01,b.cy+b.y01),Oi.epsilon&&A>i.epsilon?D>i.epsilon?(b=d(I,$,B,U,o,-D,v),w=d(P,M,z,q,o,-D,v),m.lineTo(b.cx+b.x01,b.cy+b.y01),D{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(45917),i=n(48946),a=n(26343),o=n(18640),s=n(54125),l=n(29206);function u(e,t,n){var u=null,c=(0,i.default)(!0),d=null,f=a.default,p=null,h=(0,s.withPath)(g);function g(i){var a,o,s,l,g,m=(i=(0,r.default)(i)).length,y=!1,v=new Array(m),b=new Array(m);for(null==d&&(p=f(g=h())),a=0;a<=m;++a){if(!(a=o;--s)p.point(v[s],b[s]);p.lineEnd(),p.areaEnd()}y&&(v[a]=+e(l,a,i),b[a]=+t(l,a,i),p.point(u?+u(l,a,i):v[a],n?+n(l,a,i):b[a]))}if(g)return p=null,g+""||null}function m(){return(0,o.default)().defined(c).curve(f).context(d)}return e="function"==typeof e?e:void 0===e?l.x:(0,i.default)(+e),t="function"==typeof t?t:void 0===t?(0,i.default)(0):(0,i.default)(+t),n="function"==typeof n?n:void 0===n?l.y:(0,i.default)(+n),g.x=function(t){return arguments.length?(e="function"==typeof t?t:(0,i.default)(+t),u=null,g):e},g.x0=function(t){return arguments.length?(e="function"==typeof t?t:(0,i.default)(+t),g):e},g.x1=function(e){return arguments.length?(u=null==e?null:"function"==typeof e?e:(0,i.default)(+e),g):u},g.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,i.default)(+e),n=null,g):t},g.y0=function(e){return arguments.length?(t="function"==typeof e?e:(0,i.default)(+e),g):t},g.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:(0,i.default)(+e),g):n},g.lineX0=g.lineY0=function(){return m().x(e).y(t)},g.lineY1=function(){return m().x(e).y(n)},g.lineX1=function(){return m().x(u).y(t)},g.defined=function(e){return arguments.length?(c="function"==typeof e?e:(0,i.default)(!!e),g):c},g.curve=function(e){return arguments.length?(f=e,null!=d&&(p=f(d)),g):f},g.context=function(e){return arguments.length?(null==e?d=p=null:p=f(d=e),g):d},g}},30544:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(55529),i=n(64439),a=n(44319);function o(){var e=(0,i.default)().curve(r.curveRadialLinear),t=e.curve,n=e.lineX0,o=e.lineX1,s=e.lineY0,l=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return(0,a.lineRadial)(n())},delete e.lineX0,e.lineEndAngle=function(){return(0,a.lineRadial)(o())},delete e.lineX1,e.lineInnerRadius=function(){return(0,a.lineRadial)(s())},delete e.lineY0,e.lineOuterRadius=function(){return(0,a.lineRadial)(l())},delete e.lineY1,e.curve=function(e){return arguments.length?t((0,r.default)(e)):t()._curve},e}},45917:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i,slice:()=>r});var r=Array.prototype.slice;function i(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}},48946:(e,t,n)=>{"use strict";function r(e){return function(){return e}}n.r(t),n.d(t,{default:()=>r})},58134:(e,t,n)=>{"use strict";function r(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function i(e){this._context=e}function a(e){return new i(e)}n.r(t),n.d(t,{Basis:()=>i,default:()=>a,point:()=>r}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:r(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}},76806:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(76090),i=n(58134);function a(e){this._context=e}function o(e){return new a(e)}a.prototype={areaStart:r.default,areaEnd:r.default,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:(0,i.point)(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}},37002:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(58134);function i(e){this._context=e}function a(e){return new i(e)}i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:(0,r.point)(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}},76422:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bumpRadial:()=>l,bumpX:()=>o,bumpY:()=>s});var r=n(31321);class i{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}class a{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,t){if(e=+e,t=+t,0===this._point)this._point=1;else{const n=(0,r.default)(this._x0,this._y0),i=(0,r.default)(this._x0,this._y0=(this._y0+t)/2),a=(0,r.default)(e,this._y0),o=(0,r.default)(e,t);this._context.moveTo(...n),this._context.bezierCurveTo(...i,...a,...o)}this._x0=e,this._y0=t}}function o(e){return new i(e,!0)}function s(e){return new i(e,!1)}function l(e){return new a(e)}},36606:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(58134);function i(e,t){this._basis=new r.Basis(e),this._beta=t}i.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],a=t[0],o=e[n]-i,s=t[n]-a,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*o),this._beta*t[l]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const a=function e(t){function n(e){return 1===t?new r.Basis(e):new i(e,t)}return n.beta=function(t){return e(+t)},n}(.85)},42314:(e,t,n)=>{"use strict";function r(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function i(e,t){this._context=e,this._k=(1-t)/6}n.r(t),n.d(t,{Cardinal:()=>i,default:()=>a,point:()=>r}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:r(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:r(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const a=function e(t){function n(e){return new i(e,t)}return n.tension=function(t){return e(+t)},n}(0)},16074:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CardinalClosed:()=>a,default:()=>o});var r=n(76090),i=n(42314);function a(e,t){this._context=e,this._k=(1-t)/6}a.prototype={areaStart:r.default,areaEnd:r.default,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:(0,i.point)(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const o=function e(t){function n(e){return new a(e,t)}return n.tension=function(t){return e(+t)},n}(0)},89894:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CardinalOpen:()=>i,default:()=>a});var r=n(42314);function i(e,t){this._context=e,this._k=(1-t)/6}i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:(0,r.point)(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const a=function e(t){function n(e){return new i(e,t)}return n.tension=function(t){return e(+t)},n}(0)},49750:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,point:()=>a});var r=n(34552),i=n(42314);function a(e,t,n){var i=e._x1,a=e._y1,o=e._x2,s=e._y2;if(e._l01_a>r.epsilon){var l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,a=(a*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>r.epsilon){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/d,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/d}e._context.bezierCurveTo(i,a,o,s,e._x2,e._y2)}function o(e,t){this._context=e,this._alpha=t}o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:a(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const s=function e(t){function n(e){return t?new o(e,t):new i.Cardinal(e,0)}return n.alpha=function(t){return e(+t)},n}(.5)},83014:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(16074),i=n(76090),a=n(49750);function o(e,t){this._context=e,this._alpha=t}o.prototype={areaStart:i.default,areaEnd:i.default,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:(0,a.point)(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const s=function e(t){function n(e){return t?new o(e,t):new r.CardinalClosed(e,0)}return n.alpha=function(t){return e(+t)},n}(.5)},91786:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(89894),i=n(49750);function a(e,t){this._context=e,this._alpha=t}a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:(0,i.point)(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const o=function e(t){function n(e){return t?new a(e,t):new r.CardinalOpen(e,0)}return n.alpha=function(t){return e(+t)},n}(.5)},26343:(e,t,n)=>{"use strict";function r(e){this._context=e}function i(e){return new r(e)}n.r(t),n.d(t,{default:()=>i}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}}},43895:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(76090);function i(e){this._context=e}function a(e){return new i(e)}i.prototype={areaStart:r.default,areaEnd:r.default,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}},31253:(e,t,n)=>{"use strict";function r(e){return e<0?-1:1}function i(e,t,n){var i=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(i||a<0&&-0),s=(n-e._y1)/(a||i<0&&-0),l=(o*a+s*i)/(i+a);return(r(o)+r(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(l))||0}function a(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function o(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function s(e){this._context=e}function l(e){this._context=new u(e)}function u(e){this._context=e}function c(e){return new s(e)}function d(e){return new l(e)}n.r(t),n.d(t,{monotoneX:()=>c,monotoneY:()=>d}),s.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:o(this,this._t0,a(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,o(this,a(this,n=i(this,e,t)),n);break;default:o(this,this._t0,n=i(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(l.prototype=Object.create(s.prototype)).point=function(e,t){s.prototype.point.call(this,t,e)},u.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}}},74537:(e,t,n)=>{"use strict";function r(e){this._context=e}function i(e){var t,n,r=e.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;ta}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=i(e),a=i(t),o=0,s=1;s{"use strict";n.r(t),n.d(t,{curveRadialLinear:()=>r,default:()=>a});var r=a(n(26343).default);function i(e){this._curve=e}function a(e){function t(t){return new i(e(t))}return t._curve=e,t}i.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}}},45836:(e,t,n)=>{"use strict";function r(e,t){this._context=e,this._t=t}function i(e){return new r(e,.5)}function a(e){return new r(e,0)}function o(e){return new r(e,1)}n.r(t),n.d(t,{default:()=>i,stepAfter:()=>o,stepBefore:()=>a}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}}},28796:(e,t,n)=>{"use strict";function r(e,t){return te?1:t>=e?0:NaN}n.r(t),n.d(t,{default:()=>r})},75452:(e,t,n)=>{"use strict";function r(e){return e}n.r(t),n.d(t,{default:()=>r})},76588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{arc:()=>r.default,area:()=>i.default,areaRadial:()=>s.default,curveBasis:()=>T.default,curveBasisClosed:()=>A.default,curveBasisOpen:()=>C.default,curveBumpX:()=>k.bumpX,curveBumpY:()=>k.bumpY,curveBundle:()=>R.default,curveCardinal:()=>N.default,curveCardinalClosed:()=>D.default,curveCardinalOpen:()=>O.default,curveCatmullRom:()=>M.default,curveCatmullRomClosed:()=>F.default,curveCatmullRomOpen:()=>P.default,curveLinear:()=>$.default,curveLinearClosed:()=>I.default,curveMonotoneX:()=>L.monotoneX,curveMonotoneY:()=>L.monotoneY,curveNatural:()=>B.default,curveStep:()=>U.default,curveStepAfter:()=>U.stepAfter,curveStepBefore:()=>U.stepBefore,line:()=>a.default,lineRadial:()=>l.default,link:()=>c.link,linkHorizontal:()=>c.linkHorizontal,linkRadial:()=>c.linkRadial,linkVertical:()=>c.linkVertical,pie:()=>o.default,pointRadial:()=>u.default,radialArea:()=>s.default,radialLine:()=>l.default,stack:()=>z.default,stackOffsetDiverging:()=>j.default,stackOffsetExpand:()=>q.default,stackOffsetNone:()=>H.default,stackOffsetSilhouette:()=>G.default,stackOffsetWiggle:()=>V.default,stackOrderAppearance:()=>W.default,stackOrderAscending:()=>Y.default,stackOrderDescending:()=>X.default,stackOrderInsideOut:()=>K.default,stackOrderNone:()=>J.default,stackOrderReverse:()=>Q.default,symbol:()=>d.default,symbolAsterisk:()=>f.default,symbolCircle:()=>p.default,symbolCross:()=>h.default,symbolDiamond:()=>g.default,symbolDiamond2:()=>m.default,symbolPlus:()=>y.default,symbolSquare:()=>v.default,symbolSquare2:()=>b.default,symbolStar:()=>w.default,symbolTimes:()=>_.default,symbolTriangle:()=>x.default,symbolTriangle2:()=>E.default,symbolWye:()=>S.default,symbolX:()=>_.default,symbols:()=>d.symbolsFill,symbolsFill:()=>d.symbolsFill,symbolsStroke:()=>d.symbolsStroke});var r=n(42716),i=n(64439),a=n(18640),o=n(12130),s=n(30544),l=n(44319),u=n(31321),c=n(68622),d=n(90902),f=n(74165),p=n(9185),h=n(48233),g=n(18361),m=n(56995),y=n(43317),v=n(1838),b=n(5542),w=n(56657),x=n(47233),E=n(68027),S=n(57002),_=n(82067),A=n(76806),C=n(37002),T=n(58134),k=n(76422),R=n(36606),D=n(16074),O=n(89894),N=n(42314),F=n(83014),P=n(91786),M=n(49750),I=n(43895),$=n(26343),L=n(31253),B=n(74537),U=n(45836),z=n(8872),q=n(96488),j=n(58801),H=n(93414),G=n(61530),V=n(93629),W=n(63737),Y=n(47305),X=n(37953),K=n(10395),J=n(34873),Q=n(55589)},18640:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(45917),i=n(48946),a=n(26343),o=n(54125),s=n(29206);function l(e,t){var n=(0,i.default)(!0),l=null,u=a.default,c=null,d=(0,o.withPath)(f);function f(i){var a,o,s,f=(i=(0,r.default)(i)).length,p=!1;for(null==l&&(c=u(s=d())),a=0;a<=f;++a)!(a{"use strict";n.r(t),n.d(t,{default:()=>o,lineRadial:()=>a});var r=n(55529),i=n(18640);function a(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t((0,r.default)(e)):t()._curve},e}function o(){return a((0,i.default)().curve(r.curveRadialLinear))}},68622:(e,t,n)=>{"use strict";n.r(t),n.d(t,{link:()=>c,linkHorizontal:()=>d,linkRadial:()=>p,linkVertical:()=>f});var r=n(45917),i=n(48946),a=n(76422),o=n(54125),s=n(29206);function l(e){return e.source}function u(e){return e.target}function c(e){let t=l,n=u,a=s.x,c=s.y,d=null,f=null,p=(0,o.withPath)(h);function h(){let i;const o=r.slice.call(arguments),s=t.apply(this,o),l=n.apply(this,o);if(null==d&&(f=e(i=p())),f.lineStart(),o[0]=s,f.point(+a.apply(this,o),+c.apply(this,o)),o[0]=l,f.point(+a.apply(this,o),+c.apply(this,o)),f.lineEnd(),i)return f=null,i+""||null}return h.source=function(e){return arguments.length?(t=e,h):t},h.target=function(e){return arguments.length?(n=e,h):n},h.x=function(e){return arguments.length?(a="function"==typeof e?e:(0,i.default)(+e),h):a},h.y=function(e){return arguments.length?(c="function"==typeof e?e:(0,i.default)(+e),h):c},h.context=function(t){return arguments.length?(null==t?d=f=null:f=e(d=t),h):d},h}function d(){return c(a.bumpX)}function f(){return c(a.bumpY)}function p(){const e=c(a.bumpRadial);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}},34552:(e,t,n)=>{"use strict";n.r(t),n.d(t,{abs:()=>r,acos:()=>h,asin:()=>g,atan2:()=>i,cos:()=>a,epsilon:()=>c,halfPi:()=>f,max:()=>o,min:()=>s,pi:()=>d,sin:()=>l,sqrt:()=>u,tau:()=>p});const r=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,d=Math.PI,f=d/2,p=2*d;function h(e){return e>1?0:e<-1?d:Math.acos(e)}function g(e){return e>=1?f:e<=-1?-f:Math.asin(e)}},76090:(e,t,n)=>{"use strict";function r(){}n.r(t),n.d(t,{default:()=>r})},58801:(e,t,n)=>{"use strict";function r(e,t){if((s=e.length)>0)for(var n,r,i,a,o,s,l=0,u=e[t[0]].length;l0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}n.r(t),n.d(t,{default:()=>r})},96488:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(93414);function i(e,t){if((i=e.length)>0){for(var n,i,a,o=0,s=e[0].length;o{"use strict";function r(e,t){if((i=e.length)>1)for(var n,r,i,a=1,o=e[t[0]],s=o.length;ar})},61530:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(93414);function i(e,t){if((n=e.length)>0){for(var n,i=0,a=e[t[0]],o=a.length;i{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(93414);function i(e,t){if((a=e.length)>0&&(i=(n=e[t[0]]).length)>0){for(var n,i,a,o=0,s=1;s{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34873);function i(e){var t=e.map(a);return(0,r.default)(e).sort((function(e,n){return t[e]-t[n]}))}function a(e){for(var t,n=-1,r=0,i=e.length,a=-1/0;++na&&(a=t,r=n);return r}},47305:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i,sum:()=>a});var r=n(34873);function i(e){var t=e.map(a);return(0,r.default)(e).sort((function(e,n){return t[e]-t[n]}))}function a(e){for(var t,n=0,r=-1,i=e.length;++r{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(47305);function i(e){return(0,r.default)(e).reverse()}},10395:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(63737),i=n(47305);function a(e){var t,n,a=e.length,o=e.map(i.sum),s=(0,r.default)(e),l=0,u=0,c=[],d=[];for(t=0;t{"use strict";function r(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}n.r(t),n.d(t,{default:()=>r})},55589:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34873);function i(e){return(0,r.default)(e).reverse()}},54125:(e,t,n)=>{"use strict";n.r(t),n.d(t,{withPath:()=>i});var r=n(20066);function i(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new r.Path(t)}},12130:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(45917),i=n(48946),a=n(28796),o=n(75452),s=n(34552);function l(){var e=o.default,t=a.default,n=null,l=(0,i.default)(0),u=(0,i.default)(s.tau),c=(0,i.default)(0);function d(i){var a,o,d,f,p,h=(i=(0,r.default)(i)).length,g=0,m=new Array(h),y=new Array(h),v=+l.apply(this,arguments),b=Math.min(s.tau,Math.max(-s.tau,u.apply(this,arguments)-v)),w=Math.min(Math.abs(b)/h,c.apply(this,arguments)),x=w*(b<0?-1:1);for(a=0;a0&&(g+=p);for(null!=t?m.sort((function(e,n){return t(y[e],y[n])})):null!=n&&m.sort((function(e,t){return n(i[e],i[t])})),a=0,d=g?(b-h*x)/g:0;a0?p*d:0)+x,y[o]={data:i[o],index:a,value:p,startAngle:v,endAngle:f,padAngle:w};return y}return d.value=function(t){return arguments.length?(e="function"==typeof t?t:(0,i.default)(+t),d):e},d.sortValues=function(e){return arguments.length?(t=e,n=null,d):t},d.sort=function(e){return arguments.length?(n=e,t=null,d):n},d.startAngle=function(e){return arguments.length?(l="function"==typeof e?e:(0,i.default)(+e),d):l},d.endAngle=function(e){return arguments.length?(u="function"==typeof e?e:(0,i.default)(+e),d):u},d.padAngle=function(e){return arguments.length?(c="function"==typeof e?e:(0,i.default)(+e),d):c},d}},29206:(e,t,n)=>{"use strict";function r(e){return e[0]}function i(e){return e[1]}n.r(t),n.d(t,{x:()=>r,y:()=>i})},31321:(e,t,n)=>{"use strict";function r(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}n.r(t),n.d(t,{default:()=>r})},8872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(45917),i=n(48946),a=n(93414),o=n(34873);function s(e,t){return e[t]}function l(e){const t=[];return t.key=e,t}function u(){var e=(0,i.default)([]),t=o.default,n=a.default,u=s;function c(i){var a,o,s=Array.from(e.apply(this,arguments),l),c=s.length,d=-1;for(const e of i)for(a=0,++d;a{"use strict";n.r(t),n.d(t,{default:()=>w,symbolsFill:()=>v,symbolsStroke:()=>b});var r=n(48946),i=n(54125),a=n(74165),o=n(9185),s=n(48233),l=n(18361),u=n(56995),c=n(43317),d=n(1838),f=n(5542),p=n(56657),h=n(47233),g=n(68027),m=n(57002),y=n(82067);const v=[o.default,s.default,l.default,d.default,p.default,h.default,m.default],b=[o.default,c.default,y.default,g.default,a.default,f.default,u.default];function w(e,t){let n=null,a=(0,i.withPath)(s);function s(){let r;if(n||(n=r=a()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),r)return n=null,r+""||null}return e="function"==typeof e?e:(0,r.default)(e||o.default),t="function"==typeof t?t:(0,r.default)(void 0===t?64:+t),s.type=function(t){return arguments.length?(e="function"==typeof t?t:(0,r.default)(t),s):e},s.size=function(e){return arguments.length?(t="function"==typeof e?e:(0,r.default)(+e),s):t},s.context=function(e){return arguments.length?(n=null==e?null:e,s):n},s}},74165:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(34552);const i=(0,r.sqrt)(3),a={draw(e,t){const n=.59436*(0,r.sqrt)(t+(0,r.min)(t/28,.75)),a=n/2,o=a*i;e.moveTo(0,n),e.lineTo(0,-n),e.moveTo(-o,-a),e.lineTo(o,a),e.moveTo(-o,a),e.lineTo(o,-a)}}},9185:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=(0,r.sqrt)(t/r.pi);e.moveTo(n,0),e.arc(0,0,n,0,r.tau)}}},48233:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=(0,r.sqrt)(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}}},18361:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(34552);const i=(0,r.sqrt)(1/3),a=2*i,o={draw(e,t){const n=(0,r.sqrt)(t/a),o=n*i;e.moveTo(0,-n),e.lineTo(o,0),e.lineTo(0,n),e.lineTo(-o,0),e.closePath()}}},56995:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=.62625*(0,r.sqrt)(t);e.moveTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.lineTo(-n,0),e.closePath()}}},43317:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=.87559*(0,r.sqrt)(t-(0,r.min)(t/7,2));e.moveTo(-n,0),e.lineTo(n,0),e.moveTo(0,n),e.lineTo(0,-n)}}},1838:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=(0,r.sqrt)(t),i=-n/2;e.rect(i,i,n,n)}}},5542:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=.4431*(0,r.sqrt)(t);e.moveTo(n,n),e.lineTo(n,-n),e.lineTo(-n,-n),e.lineTo(-n,n),e.closePath()}}},56657:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(34552);const i=(0,r.sin)(r.pi/10)/(0,r.sin)(7*r.pi/10),a=(0,r.sin)(r.tau/10)*i,o=-(0,r.cos)(r.tau/10)*i,s={draw(e,t){const n=(0,r.sqrt)(.8908130915292852*t),i=a*n,s=o*n;e.moveTo(0,-n),e.lineTo(i,s);for(let t=1;t<5;++t){const a=r.tau*t/5,o=(0,r.cos)(a),l=(0,r.sin)(a);e.lineTo(l*n,-o*n),e.lineTo(o*i-l*s,l*i+o*s)}e.closePath()}}},82067:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=.6189*(0,r.sqrt)(t-(0,r.min)(t/6,1.7));e.moveTo(-n,-n),e.lineTo(n,n),e.moveTo(-n,n),e.lineTo(n,-n)}}},47233:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(34552);const i=(0,r.sqrt)(3),a={draw(e,t){const n=-(0,r.sqrt)(t/(3*i));e.moveTo(0,2*n),e.lineTo(-i*n,-n),e.lineTo(i*n,-n),e.closePath()}}},68027:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(34552);const i=(0,r.sqrt)(3),a={draw(e,t){const n=.6824*(0,r.sqrt)(t),a=n/2,o=n*i/2;e.moveTo(0,-n),e.lineTo(o,a),e.lineTo(-o,a),e.closePath()}}},57002:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(34552);const i=-.5,a=(0,r.sqrt)(3)/2,o=1/(0,r.sqrt)(12),s=3*(o/2+1),l={draw(e,t){const n=(0,r.sqrt)(t/s),l=n/2,u=n*o,c=l,d=n*o+n,f=-c,p=d;e.moveTo(l,u),e.lineTo(c,d),e.lineTo(f,p),e.lineTo(i*l-a*u,a*l+i*u),e.lineTo(i*c-a*d,a*c+i*d),e.lineTo(i*f-a*p,a*f+i*p),e.lineTo(i*l+a*u,i*u-a*l),e.lineTo(i*c+a*d,i*d-a*c),e.lineTo(i*f+a*p,i*p-a*f),e.closePath()}}},53705:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,timeFormat:()=>i,timeParse:()=>a,utcFormat:()=>o,utcParse:()=>s});var r,i,a,o,s,l=n(64398);function u(e){return r=(0,l.default)(e),i=r.format,a=r.parse,o=r.utcFormat,s=r.utcParse,r}u({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})},98090:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isoFormat:()=>a.default,isoParse:()=>o.default,timeFormat:()=>r.timeFormat,timeFormatDefaultLocale:()=>r.default,timeFormatLocale:()=>i.default,timeParse:()=>r.timeParse,utcFormat:()=>r.utcFormat,utcParse:()=>r.utcParse});var r=n(53705),i=n(64398),a=n(20584),o=n(71612)},20584:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,isoSpecifier:()=>i});var r=n(53705),i="%Y-%m-%dT%H:%M:%S.%LZ";const a=Date.prototype.toISOString?function(e){return e.toISOString()}:(0,r.utcFormat)(i)},71612:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(20584),i=n(53705);const a=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:(0,i.utcParse)(r.isoSpecifier)},64398:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(42472);function i(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function a(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function o(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function s(e){var t=e.dateTime,n=e.date,s=e.time,u=e.periods,c=e.days,d=e.shortDays,f=e.months,p=e.shortMonths,W=h(u),pe=g(u),Ae=h(c),Ce=g(c),Te=h(d),ke=g(d),Re=h(f),De=g(f),Oe=h(p),Ne=g(p),Fe={a:function(e){return d[e.getDay()]},A:function(e){return c[e.getDay()]},b:function(e){return p[e.getMonth()]},B:function(e){return f[e.getMonth()]},c:null,d:I,e:I,f:z,g:Q,G:ee,H:$,I:L,j:B,L:U,m:q,M:j,p:function(e){return u[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Se,s:_e,S:H,u:G,U:V,V:Y,w:X,W:K,x:null,X:null,y:J,Y:Z,Z:te,"%":Ee},Pe={a:function(e){return d[e.getUTCDay()]},A:function(e){return c[e.getUTCDay()]},b:function(e){return p[e.getUTCMonth()]},B:function(e){return f[e.getUTCMonth()]},c:null,d:ne,e:ne,f:se,g:ve,G:we,H:re,I:ie,j:ae,L:oe,m:le,M:ue,p:function(e){return u[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Se,s:_e,S:ce,u:de,U:fe,V:he,w:ge,W:me,x:null,X:null,y:ye,Y:be,Z:xe,"%":Ee},Me={a:function(e,t,n){var r=Te.exec(t.slice(n));return r?(e.w=ke.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=Ae.exec(t.slice(n));return r?(e.w=Ce.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=Oe.exec(t.slice(n));return r?(e.m=Ne.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=Re.exec(t.slice(n));return r?(e.m=De.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return Le(e,t,n,r)},d:C,e:C,f:N,g:E,G:x,H:k,I:k,j:T,L:O,m:A,M:R,p:function(e,t,n){var r=W.exec(t.slice(n));return r?(e.p=pe.get(r[0].toLowerCase()),n+r[0].length):-1},q:_,Q:P,s:M,S:D,u:y,U:v,V:b,w:m,W:w,x:function(e,t,r){return Le(e,n,t,r)},X:function(e,t,n){return Le(e,s,t,n)},y:E,Y:x,Z:S,"%":F};function Ie(e,t){return function(n){var r,i,a,o=[],s=-1,u=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in u||(u.w=1),"Z"in u?(l=(s=a(o(u.y,0,1))).getUTCDay(),s=l>4||0===l?r.utcMonday.ceil(s):(0,r.utcMonday)(s),s=r.utcDay.offset(s,7*(u.V-1)),u.y=s.getUTCFullYear(),u.m=s.getUTCMonth(),u.d=s.getUTCDate()+(u.w+6)%7):(l=(s=i(o(u.y,0,1))).getDay(),s=l>4||0===l?r.timeMonday.ceil(s):(0,r.timeMonday)(s),s=r.timeDay.offset(s,7*(u.V-1)),u.y=s.getFullYear(),u.m=s.getMonth(),u.d=s.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),l="Z"in u?a(o(u.y,0,1)).getUTCDay():i(o(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(l+5)%7:u.w+7*u.U-(l+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,a(u)):i(u)}}function Le(e,t,n,r){for(var i,a,o=0,s=t.length,u=n.length;o=u)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=Me[i in l?t.charAt(o++):i])||(r=a(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return Fe.x=Ie(n,Fe),Fe.X=Ie(s,Fe),Fe.c=Ie(t,Fe),Pe.x=Ie(n,Pe),Pe.X=Ie(s,Pe),Pe.c=Ie(t,Pe),{format:function(e){var t=Ie(e+="",Fe);return t.toString=function(){return e},t},parse:function(e){var t=$e(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Ie(e+="",Pe);return t.toString=function(){return e},t},utcParse:function(e){var t=$e(e+="",!0);return t.toString=function(){return e},t}}}var l={"-":"",_:" ",0:"0"},u=/^\s*\d+/,c=/^%/,d=/[\\^$*+?|[\]().{}]/g;function f(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[e.toLowerCase(),t])))}function m(e,t,n){var r=u.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function y(e,t,n){var r=u.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function v(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function b(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function w(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function x(e,t,n){var r=u.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function E(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function S(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function _(e,t,n){var r=u.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function A(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function C(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function T(e,t,n){var r=u.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function k(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function R(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function D(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function O(e,t,n){var r=u.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function N(e,t,n){var r=u.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function F(e,t,n){var r=c.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function P(e,t,n){var r=u.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function M(e,t,n){var r=u.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function I(e,t){return f(e.getDate(),t,2)}function $(e,t){return f(e.getHours(),t,2)}function L(e,t){return f(e.getHours()%12||12,t,2)}function B(e,t){return f(1+r.timeDay.count((0,r.timeYear)(e),e),t,3)}function U(e,t){return f(e.getMilliseconds(),t,3)}function z(e,t){return U(e,t)+"000"}function q(e,t){return f(e.getMonth()+1,t,2)}function j(e,t){return f(e.getMinutes(),t,2)}function H(e,t){return f(e.getSeconds(),t,2)}function G(e){var t=e.getDay();return 0===t?7:t}function V(e,t){return f(r.timeSunday.count((0,r.timeYear)(e)-1,e),t,2)}function W(e){var t=e.getDay();return t>=4||0===t?(0,r.timeThursday)(e):r.timeThursday.ceil(e)}function Y(e,t){return e=W(e),f(r.timeThursday.count((0,r.timeYear)(e),e)+(4===(0,r.timeYear)(e).getDay()),t,2)}function X(e){return e.getDay()}function K(e,t){return f(r.timeMonday.count((0,r.timeYear)(e)-1,e),t,2)}function J(e,t){return f(e.getFullYear()%100,t,2)}function Q(e,t){return f((e=W(e)).getFullYear()%100,t,2)}function Z(e,t){return f(e.getFullYear()%1e4,t,4)}function ee(e,t){var n=e.getDay();return f((e=n>=4||0===n?(0,r.timeThursday)(e):r.timeThursday.ceil(e)).getFullYear()%1e4,t,4)}function te(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+f(t/60|0,"0",2)+f(t%60,"0",2)}function ne(e,t){return f(e.getUTCDate(),t,2)}function re(e,t){return f(e.getUTCHours(),t,2)}function ie(e,t){return f(e.getUTCHours()%12||12,t,2)}function ae(e,t){return f(1+r.utcDay.count((0,r.utcYear)(e),e),t,3)}function oe(e,t){return f(e.getUTCMilliseconds(),t,3)}function se(e,t){return oe(e,t)+"000"}function le(e,t){return f(e.getUTCMonth()+1,t,2)}function ue(e,t){return f(e.getUTCMinutes(),t,2)}function ce(e,t){return f(e.getUTCSeconds(),t,2)}function de(e){var t=e.getUTCDay();return 0===t?7:t}function fe(e,t){return f(r.utcSunday.count((0,r.utcYear)(e)-1,e),t,2)}function pe(e){var t=e.getUTCDay();return t>=4||0===t?(0,r.utcThursday)(e):r.utcThursday.ceil(e)}function he(e,t){return e=pe(e),f(r.utcThursday.count((0,r.utcYear)(e),e)+(4===(0,r.utcYear)(e).getUTCDay()),t,2)}function ge(e){return e.getUTCDay()}function me(e,t){return f(r.utcMonday.count((0,r.utcYear)(e)-1,e),t,2)}function ye(e,t){return f(e.getUTCFullYear()%100,t,2)}function ve(e,t){return f((e=pe(e)).getUTCFullYear()%100,t,2)}function be(e,t){return f(e.getUTCFullYear()%1e4,t,4)}function we(e,t){var n=e.getUTCDay();return f((e=n>=4||0===n?(0,r.utcThursday)(e):r.utcThursday.ceil(e)).getUTCFullYear()%1e4,t,4)}function xe(){return"+0000"}function Ee(){return"%"}function Se(e){return+e}function _e(e){return Math.floor(+e/1e3)}},55334:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeDay:()=>a,timeDays:()=>o,unixDay:()=>u,unixDays:()=>c,utcDay:()=>s,utcDays:()=>l});var r=n(37591),i=n(81134);const a=(0,r.timeInterval)((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.durationMinute)/i.durationDay),(e=>e.getDate()-1)),o=a.range,s=(0,r.timeInterval)((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/i.durationDay),(e=>e.getUTCDate()-1)),l=s.range,u=(0,r.timeInterval)((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/i.durationDay),(e=>Math.floor(e/i.durationDay))),c=u.range},81134:(e,t,n)=>{"use strict";n.r(t),n.d(t,{durationDay:()=>o,durationHour:()=>a,durationMinute:()=>i,durationMonth:()=>l,durationSecond:()=>r,durationWeek:()=>s,durationYear:()=>u});const r=1e3,i=60*r,a=60*i,o=24*a,s=7*o,l=30*o,u=365*o},54612:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeHour:()=>a,timeHours:()=>o,utcHour:()=>s,utcHours:()=>l});var r=n(37591),i=n(81134);const a=(0,r.timeInterval)((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*i.durationSecond-e.getMinutes()*i.durationMinute)}),((e,t)=>{e.setTime(+e+t*i.durationHour)}),((e,t)=>(t-e)/i.durationHour),(e=>e.getHours())),o=a.range,s=(0,r.timeInterval)((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*i.durationHour)}),((e,t)=>(t-e)/i.durationHour),(e=>e.getUTCHours())),l=s.range},42472:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeDay:()=>l.timeDay,timeDays:()=>l.timeDays,timeFriday:()=>u.timeFriday,timeFridays:()=>u.timeFridays,timeHour:()=>s.timeHour,timeHours:()=>s.timeHours,timeInterval:()=>r.timeInterval,timeMillisecond:()=>i.millisecond,timeMilliseconds:()=>i.milliseconds,timeMinute:()=>o.timeMinute,timeMinutes:()=>o.timeMinutes,timeMonday:()=>u.timeMonday,timeMondays:()=>u.timeMondays,timeMonth:()=>c.timeMonth,timeMonths:()=>c.timeMonths,timeSaturday:()=>u.timeSaturday,timeSaturdays:()=>u.timeSaturdays,timeSecond:()=>a.second,timeSeconds:()=>a.seconds,timeSunday:()=>u.timeSunday,timeSundays:()=>u.timeSundays,timeThursday:()=>u.timeThursday,timeThursdays:()=>u.timeThursdays,timeTickInterval:()=>f.timeTickInterval,timeTicks:()=>f.timeTicks,timeTuesday:()=>u.timeTuesday,timeTuesdays:()=>u.timeTuesdays,timeWednesday:()=>u.timeWednesday,timeWednesdays:()=>u.timeWednesdays,timeWeek:()=>u.timeSunday,timeWeeks:()=>u.timeSundays,timeYear:()=>d.timeYear,timeYears:()=>d.timeYears,unixDay:()=>l.unixDay,unixDays:()=>l.unixDays,utcDay:()=>l.utcDay,utcDays:()=>l.utcDays,utcFriday:()=>u.utcFriday,utcFridays:()=>u.utcFridays,utcHour:()=>s.utcHour,utcHours:()=>s.utcHours,utcMillisecond:()=>i.millisecond,utcMilliseconds:()=>i.milliseconds,utcMinute:()=>o.utcMinute,utcMinutes:()=>o.utcMinutes,utcMonday:()=>u.utcMonday,utcMondays:()=>u.utcMondays,utcMonth:()=>c.utcMonth,utcMonths:()=>c.utcMonths,utcSaturday:()=>u.utcSaturday,utcSaturdays:()=>u.utcSaturdays,utcSecond:()=>a.second,utcSeconds:()=>a.seconds,utcSunday:()=>u.utcSunday,utcSundays:()=>u.utcSundays,utcThursday:()=>u.utcThursday,utcThursdays:()=>u.utcThursdays,utcTickInterval:()=>f.utcTickInterval,utcTicks:()=>f.utcTicks,utcTuesday:()=>u.utcTuesday,utcTuesdays:()=>u.utcTuesdays,utcWednesday:()=>u.utcWednesday,utcWednesdays:()=>u.utcWednesdays,utcWeek:()=>u.utcSunday,utcWeeks:()=>u.utcSundays,utcYear:()=>d.utcYear,utcYears:()=>d.utcYears});var r=n(37591),i=n(32613),a=n(55030),o=n(13298),s=n(54612),l=n(55334),u=n(78926),c=n(75878),d=n(24355),f=n(526)},37591:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeInterval:()=>a});const r=new Date,i=new Date;function a(e,t,n,o){function s(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return s.floor=t=>(e(t=new Date(+t)),t),s.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),s.round=e=>{const t=s(e),n=s.ceil(e);return e-t(t(e=new Date(+e),null==n?1:Math.floor(n)),e),s.range=(n,r,i)=>{const a=[];if(n=s.ceil(n),i=null==i?1:Math.floor(i),!(n0))return a;let o;do{a.push(o=new Date(+n)),t(n,i),e(n)}while(oa((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(s.count=(t,a)=>(r.setTime(+t),i.setTime(+a),e(r),e(i),Math.floor(n(r,i))),s.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(o?t=>o(t)%e==0:t=>s.count(0,t)%e==0):s:null)),s}},32613:(e,t,n)=>{"use strict";n.r(t),n.d(t,{millisecond:()=>i,milliseconds:()=>a});var r=n(37591);const i=(0,r.timeInterval)((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?(0,r.timeInterval)((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):i:null);const a=i.range},13298:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeMinute:()=>a,timeMinutes:()=>o,utcMinute:()=>s,utcMinutes:()=>l});var r=n(37591),i=n(81134);const a=(0,r.timeInterval)((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*i.durationSecond)}),((e,t)=>{e.setTime(+e+t*i.durationMinute)}),((e,t)=>(t-e)/i.durationMinute),(e=>e.getMinutes())),o=a.range,s=(0,r.timeInterval)((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*i.durationMinute)}),((e,t)=>(t-e)/i.durationMinute),(e=>e.getUTCMinutes())),l=s.range},75878:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeMonth:()=>i,timeMonths:()=>a,utcMonth:()=>o,utcMonths:()=>s});var r=n(37591);const i=(0,r.timeInterval)((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth())),a=i.range,o=(0,r.timeInterval)((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth())),s=o.range},55030:(e,t,n)=>{"use strict";n.r(t),n.d(t,{second:()=>a,seconds:()=>o});var r=n(37591),i=n(81134);const a=(0,r.timeInterval)((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*i.durationSecond)}),((e,t)=>(t-e)/i.durationSecond),(e=>e.getUTCSeconds())),o=a.range},526:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeTickInterval:()=>y,timeTicks:()=>m,utcTickInterval:()=>g,utcTicks:()=>h});var r=n(61388),i=n(81134),a=n(32613),o=n(55030),s=n(13298),l=n(54612),u=n(55334),c=n(78926),d=n(75878),f=n(24355);function p(e,t,n,s,l,u){const c=[[o.second,1,i.durationSecond],[o.second,5,5*i.durationSecond],[o.second,15,15*i.durationSecond],[o.second,30,30*i.durationSecond],[u,1,i.durationMinute],[u,5,5*i.durationMinute],[u,15,15*i.durationMinute],[u,30,30*i.durationMinute],[l,1,i.durationHour],[l,3,3*i.durationHour],[l,6,6*i.durationHour],[l,12,12*i.durationHour],[s,1,i.durationDay],[s,2,2*i.durationDay],[n,1,i.durationWeek],[t,1,i.durationMonth],[t,3,3*i.durationMonth],[e,1,i.durationYear]];function d(t,n,o){const s=Math.abs(n-t)/o,l=(0,r.bisector)((([,,e])=>e)).right(c,s);if(l===c.length)return e.every((0,r.tickStep)(t/i.durationYear,n/i.durationYear,o));if(0===l)return a.millisecond.every(Math.max((0,r.tickStep)(t,n,o),1));const[u,d]=c[s/c[l-1][2]{"use strict";n.r(t),n.d(t,{timeFriday:()=>d,timeFridays:()=>v,timeMonday:()=>s,timeMondays:()=>h,timeSaturday:()=>f,timeSaturdays:()=>b,timeSunday:()=>o,timeSundays:()=>p,timeThursday:()=>c,timeThursdays:()=>y,timeTuesday:()=>l,timeTuesdays:()=>g,timeWednesday:()=>u,timeWednesdays:()=>m,utcFriday:()=>C,utcFridays:()=>F,utcMonday:()=>E,utcMondays:()=>R,utcSaturday:()=>T,utcSaturdays:()=>P,utcSunday:()=>x,utcSundays:()=>k,utcThursday:()=>A,utcThursdays:()=>N,utcTuesday:()=>S,utcTuesdays:()=>D,utcWednesday:()=>_,utcWednesdays:()=>O});var r=n(37591),i=n(81134);function a(e){return(0,r.timeInterval)((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.durationMinute)/i.durationWeek))}const o=a(0),s=a(1),l=a(2),u=a(3),c=a(4),d=a(5),f=a(6),p=o.range,h=s.range,g=l.range,m=u.range,y=c.range,v=d.range,b=f.range;function w(e){return(0,r.timeInterval)((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/i.durationWeek))}const x=w(0),E=w(1),S=w(2),_=w(3),A=w(4),C=w(5),T=w(6),k=x.range,R=E.range,D=S.range,O=_.range,N=A.range,F=C.range,P=T.range},24355:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeYear:()=>i,timeYears:()=>a,utcYear:()=>o,utcYears:()=>s});var r=n(37591);const i=(0,r.timeInterval)((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));i.every=e=>isFinite(e=Math.floor(e))&&e>0?(0,r.timeInterval)((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null;const a=i.range,o=(0,r.timeInterval)((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));o.every=e=>isFinite(e=Math.floor(e))&&e>0?(0,r.timeInterval)((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null;const s=o.range},52456:(e,t,n)=>{"use strict";n.r(t),n.d(t,{interval:()=>a.default,now:()=>r.now,timeout:()=>i.default,timer:()=>r.timer,timerFlush:()=>r.timerFlush});var r=n(70029),i=n(61463),a=n(65399)},65399:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(70029);function i(e,t,n){var i=new r.Timer,a=t;return null==t?(i.restart(e,t,n),i):(i._restart=i.restart,i.restart=function(e,t,n){t=+t,n=null==n?(0,r.now)():+n,i._restart((function r(o){o+=a,i._restart(r,a+=t,n),e(o)}),t,n)},i.restart(e,t,n),i)}},61463:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(70029);function i(e,t,n){var i=new r.Timer;return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}},70029:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Timer:()=>g,now:()=>p,timer:()=>m,timerFlush:()=>y});var r,i,a=0,o=0,s=0,l=0,u=0,c=0,d="object"==typeof performance&&performance.now?performance:Date,f="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function p(){return u||(f(h),u=d.now()+c)}function h(){u=0}function g(){this._call=this._time=this._next=null}function m(e,t,n){var r=new g;return r.restart(e,t,n),r}function y(){p(),++a;for(var e,t=r;t;)(e=u-t._time)>=0&&t._call.call(void 0,e),t=t._next;--a}function v(){u=(l=d.now())+c,a=o=0;try{y()}finally{a=0,function(){for(var e,t,n=r,a=1/0;n;)n._call?(a>n._time&&(a=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:r=t);i=e,w(a)}(),u=0}}function b(){var e=d.now(),t=e-l;t>1e3&&(c-=t,l=e)}function w(e){a||(o&&(o=clearTimeout(o)),e-u>24?(e<1/0&&(o=setTimeout(v,e-d.now()-c)),s&&(s=clearInterval(s))):(s||(l=d.now(),s=setInterval(b,1e3)),a=1,f(v)))}g.prototype=m.prototype={constructor:g,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?p():+n)+(null==t?0:+t),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=e,this._time=n,w()},stop:function(){this._call&&(this._call=null,this._time=1/0,w())}}},40123:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(13674);const i=Math.pow(2,-52),a=new Uint32Array(512);class o{static from(e,t=f,n=p){const r=e.length,i=new Float64Array(2*r);for(let a=0;a>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:a,_hullHash:o}=this,l=e.length>>1;let d=1/0,f=1/0,p=-1/0,h=-1/0;for(let t=0;tp&&(p=n),r>h&&(h=r),this._ids[t]=t}const g=(d+p)/2,m=(f+h)/2;let y,v,b;for(let t=0,n=1/0;t0&&(v=t,n=r)}let E=e[2*v],S=e[2*v+1],_=1/0;for(let t=0;tr&&(t[n++]=i,r=a)}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if((0,r.orient2d)(w,x,E,S,A,C)<0){const e=v,t=E,n=S;v=b,E=A,S=C,b=e,A=t,C=n}const T=function(e,t,n,r,i,a){const o=n-e,s=r-t,l=i-e,u=a-t,c=o*o+s*s,d=l*l+u*u,f=.5/(o*u-s*l);return{x:e+(u*c-s*d)*f,y:t+(o*d-l*c)*f}}(w,x,E,S,A,C);this._cx=T.x,this._cy=T.y;for(let t=0;t0&&Math.abs(d-s)<=i&&Math.abs(f-l)<=i)continue;if(s=d,l=f,c===y||c===v||c===b)continue;let p=0;for(let e=0,t=this._hashKey(d,f);e=0;)if(g=h,g===p){g=-1;break}if(-1===g)continue;let m=this._addTriangle(g,c,n[g],-1,-1,a[g]);a[c]=this._legalize(m+2),a[g]=m,k++;let w=n[g];for(;h=n[w],(0,r.orient2d)(d,f,e[2*w],e[2*w+1],e[2*h],e[2*h+1])<0;)m=this._addTriangle(w,c,h,a[c],-1,a[w]),a[c]=this._legalize(m+2),n[w]=w,k--,w=h;if(g===p)for(;h=t[g],(0,r.orient2d)(d,f,e[2*h],e[2*h+1],e[2*g],e[2*g+1])<0;)m=this._addTriangle(h,c,g,-1,a[g],a[h]),this._legalize(m+2),a[h]=m,n[g]=g,k--,g=h;this._hullStart=t[c]=g,n[g]=t[w]=c,n[c]=w,o[this._hashKey(d,f)]=c,o[this._hashKey(e[2*g],e[2*g+1])]=g}this.hull=new Uint32Array(k);for(let e=0,t=this._hullStart;e0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const s=n[e],u=e-e%3;if(o=u+(e+2)%3,-1===s){if(0===i)break;e=a[--i];continue}const c=s-s%3,d=u+(e+1)%3,f=c+(s+2)%3,p=t[o],h=t[e],g=t[d],m=t[f];if(l(r[2*p],r[2*p+1],r[2*h],r[2*h+1],r[2*g],r[2*g+1],r[2*m],r[2*m+1])){t[e]=m,t[s]=p;const r=n[f];if(-1===r){let t=this._hullStart;do{if(this._hullTri[t]===f){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(s,n[o]),this._link(o,f);const l=c+(s+1)%3;i=n&&t[e[o]]>a;)e[o+1]=e[o--];e[o+1]=r}else{let i=n+1,a=r;d(e,n+r>>1,i),t[e[n]]>t[e[r]]&&d(e,n,r),t[e[i]]>t[e[r]]&&d(e,i,r),t[e[n]]>t[e[i]]&&d(e,n,i);const o=e[i],s=t[o];for(;;){do{i++}while(t[e[i]]s);if(a=a-n?(c(e,t,i,r),c(e,t,n,a-1)):(c(e,t,n,a-1),c(e,t,i,r))}}function d(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function f(e){return e[0]}function p(e){return e[1]}},24119:(e,t,n)=>{"use strict";n.r(t),n.d(t,{InternMap:()=>r,InternSet:()=>i});class r extends Map{constructor(e,t=l){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(a(this,e))}has(e){return super.has(a(this,e))}set(e,t){return super.set(o(this,e),t)}delete(e){return super.delete(s(this,e))}}class i extends Set{constructor(e,t=l){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const t of e)this.add(t)}has(e){return super.has(a(this,e))}add(e){return super.add(o(this,e))}delete(e){return super.delete(s(this,e))}}function a({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function o({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function s({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function l(e){return null!==e&&"object"==typeof e?e.valueOf():e}},71807:(e,t,n)=>{"use strict";n.r(t),n.d(t,{incircle:()=>L,incirclefast:()=>B});var r=n(62056);const i=(10+96*r.epsilon)*r.epsilon,a=(4+48*r.epsilon)*r.epsilon,o=(44+576*r.epsilon)*r.epsilon*r.epsilon,s=(0,r.vec)(4),l=(0,r.vec)(4),u=(0,r.vec)(4),c=(0,r.vec)(4),d=(0,r.vec)(4),f=(0,r.vec)(4),p=(0,r.vec)(4),h=(0,r.vec)(4),g=(0,r.vec)(8),m=(0,r.vec)(8),y=(0,r.vec)(8),v=(0,r.vec)(8),b=(0,r.vec)(8),w=(0,r.vec)(8),x=(0,r.vec)(8),E=(0,r.vec)(8),S=(0,r.vec)(8),_=(0,r.vec)(4),A=(0,r.vec)(4),C=(0,r.vec)(4),T=(0,r.vec)(8),k=(0,r.vec)(16),R=(0,r.vec)(16),D=(0,r.vec)(16),O=(0,r.vec)(32),N=(0,r.vec)(32),F=(0,r.vec)(48),P=(0,r.vec)(64);let M=(0,r.vec)(1152),I=(0,r.vec)(1152);function $(e,t,n){e=(0,r.sum)(e,M,t,n,I);const i=M;return M=I,I=i,e}function L(e,t,n,I,L,B,U,z){const q=e-U,j=n-U,H=L-U,G=t-z,V=I-z,W=B-z,Y=j*W,X=H*V,K=q*q+G*G,J=H*G,Q=q*W,Z=j*j+V*V,ee=q*V,te=j*G,ne=H*H+W*W,re=K*(Y-X)+Z*(J-Q)+ne*(ee-te),ie=(Math.abs(Y)+Math.abs(X))*K+(Math.abs(J)+Math.abs(Q))*Z+(Math.abs(ee)+Math.abs(te))*ne,ae=i*ie;return re>ae||-re>ae?re:function(e,t,n,i,I,L,B,U,z){let q,j,H,G,V,W,Y,X,K,J,Q,Z,ee,te,ne,re,ie,ae,oe,se,le,ue,ce,de,fe,pe,he,ge,me,ye,ve,be,we,xe,Ee;const Se=e-B,_e=n-B,Ae=I-B,Ce=t-U,Te=i-U,ke=L-U;ve=_e*ke,ce=r.splitter*_e,de=ce-(ce-_e),fe=_e-de,ce=r.splitter*ke,pe=ce-(ce-ke),he=ke-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=Ae*Te,ce=r.splitter*Ae,de=ce-(ce-Ae),fe=Ae-de,ce=r.splitter*Te,pe=ce-(ce-Te),he=Te-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be-xe,ue=be-ge,s[0]=be-(ge+ue)+(ue-xe),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-we,ue=ye-ge,s[1]=ye-(ge+ue)+(ue-we),Ee=me+ge,ue=Ee-me,s[2]=me-(Ee-ue)+(ge-ue),s[3]=Ee,ve=Ae*Ce,ce=r.splitter*Ae,de=ce-(ce-Ae),fe=Ae-de,ce=r.splitter*Ce,pe=ce-(ce-Ce),he=Ce-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=Se*ke,ce=r.splitter*Se,de=ce-(ce-Se),fe=Se-de,ce=r.splitter*ke,pe=ce-(ce-ke),he=ke-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be-xe,ue=be-ge,l[0]=be-(ge+ue)+(ue-xe),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-we,ue=ye-ge,l[1]=ye-(ge+ue)+(ue-we),Ee=me+ge,ue=Ee-me,l[2]=me-(Ee-ue)+(ge-ue),l[3]=Ee,ve=Se*Te,ce=r.splitter*Se,de=ce-(ce-Se),fe=Se-de,ce=r.splitter*Te,pe=ce-(ce-Te),he=Te-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=_e*Ce,ce=r.splitter*_e,de=ce-(ce-_e),fe=_e-de,ce=r.splitter*Ce,pe=ce-(ce-Ce),he=Ce-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be-xe,ue=be-ge,u[0]=be-(ge+ue)+(ue-xe),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-we,ue=ye-ge,u[1]=ye-(ge+ue)+(ue-we),Ee=me+ge,ue=Ee-me,u[2]=me-(Ee-ue)+(ge-ue),u[3]=Ee,q=(0,r.sum)((0,r.sum)((0,r.sum)((0,r.scale)((0,r.scale)(4,s,Se,T),T,Se,k),k,(0,r.scale)((0,r.scale)(4,s,Ce,T),T,Ce,R),R,O),O,(0,r.sum)((0,r.scale)((0,r.scale)(4,l,_e,T),T,_e,k),k,(0,r.scale)((0,r.scale)(4,l,Te,T),T,Te,R),R,N),N,P),P,(0,r.sum)((0,r.scale)((0,r.scale)(4,u,Ae,T),T,Ae,k),k,(0,r.scale)((0,r.scale)(4,u,ke,T),T,ke,R),R,O),O,M);let Re=(0,r.estimate)(q,M),De=a*z;if(Re>=De||-Re>=De)return Re;if(ue=e-Se,j=e-(Se+ue)+(ue-B),ue=t-Ce,V=t-(Ce+ue)+(ue-U),ue=n-_e,H=n-(_e+ue)+(ue-B),ue=i-Te,W=i-(Te+ue)+(ue-U),ue=I-Ae,G=I-(Ae+ue)+(ue-B),ue=L-ke,Y=L-(ke+ue)+(ue-U),0===j&&0===H&&0===G&&0===V&&0===W&&0===Y)return Re;if(De=o*z+r.resulterrbound*Math.abs(Re),Re+=(Se*Se+Ce*Ce)*(_e*Y+ke*H-(Te*G+Ae*W))+2*(Se*j+Ce*V)*(_e*ke-Te*Ae)+((_e*_e+Te*Te)*(Ae*V+Ce*G-(ke*j+Se*Y))+2*(_e*H+Te*W)*(Ae*Ce-ke*Se))+((Ae*Ae+ke*ke)*(Se*W+Te*j-(Ce*H+_e*V))+2*(Ae*G+ke*Y)*(Se*Te-Ce*_e)),Re>=De||-Re>=De)return Re;if(0===H&&0===W&&0===G&&0===Y||(ve=Se*Se,ce=r.splitter*Se,de=ce-(ce-Se),fe=Se-de,be=fe*fe-(ve-de*de-(de+de)*fe),we=Ce*Ce,ce=r.splitter*Ce,de=ce-(ce-Ce),fe=Ce-de,xe=fe*fe-(we-de*de-(de+de)*fe),ge=be+xe,ue=ge-be,c[0]=be-(ge-ue)+(xe-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+we,ue=ge-ye,c[1]=ye-(ge-ue)+(we-ue),Ee=me+ge,ue=Ee-me,c[2]=me-(Ee-ue)+(ge-ue),c[3]=Ee),0===G&&0===Y&&0===j&&0===V||(ve=_e*_e,ce=r.splitter*_e,de=ce-(ce-_e),fe=_e-de,be=fe*fe-(ve-de*de-(de+de)*fe),we=Te*Te,ce=r.splitter*Te,de=ce-(ce-Te),fe=Te-de,xe=fe*fe-(we-de*de-(de+de)*fe),ge=be+xe,ue=ge-be,d[0]=be-(ge-ue)+(xe-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+we,ue=ge-ye,d[1]=ye-(ge-ue)+(we-ue),Ee=me+ge,ue=Ee-me,d[2]=me-(Ee-ue)+(ge-ue),d[3]=Ee),0===j&&0===V&&0===H&&0===W||(ve=Ae*Ae,ce=r.splitter*Ae,de=ce-(ce-Ae),fe=Ae-de,be=fe*fe-(ve-de*de-(de+de)*fe),we=ke*ke,ce=r.splitter*ke,de=ce-(ce-ke),fe=ke-de,xe=fe*fe-(we-de*de-(de+de)*fe),ge=be+xe,ue=ge-be,f[0]=be-(ge-ue)+(xe-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+we,ue=ge-ye,f[1]=ye-(ge-ue)+(we-ue),Ee=me+ge,ue=Ee-me,f[2]=me-(Ee-ue)+(ge-ue),f[3]=Ee),0!==j&&(X=(0,r.scale)(4,s,j,g),q=$(q,(0,r.sum_three)((0,r.scale)(X,g,2*Se,k),k,(0,r.scale)((0,r.scale)(4,f,j,T),T,Te,R),R,(0,r.scale)((0,r.scale)(4,d,j,T),T,-ke,D),D,O,F),F)),0!==V&&(K=(0,r.scale)(4,s,V,m),q=$(q,(0,r.sum_three)((0,r.scale)(K,m,2*Ce,k),k,(0,r.scale)((0,r.scale)(4,d,V,T),T,Ae,R),R,(0,r.scale)((0,r.scale)(4,f,V,T),T,-_e,D),D,O,F),F)),0!==H&&(J=(0,r.scale)(4,l,H,y),q=$(q,(0,r.sum_three)((0,r.scale)(J,y,2*_e,k),k,(0,r.scale)((0,r.scale)(4,c,H,T),T,ke,R),R,(0,r.scale)((0,r.scale)(4,f,H,T),T,-Ce,D),D,O,F),F)),0!==W&&(Q=(0,r.scale)(4,l,W,v),q=$(q,(0,r.sum_three)((0,r.scale)(Q,v,2*Te,k),k,(0,r.scale)((0,r.scale)(4,f,W,T),T,Se,R),R,(0,r.scale)((0,r.scale)(4,c,W,T),T,-Ae,D),D,O,F),F)),0!==G&&(Z=(0,r.scale)(4,u,G,b),q=$(q,(0,r.sum_three)((0,r.scale)(Z,b,2*Ae,k),k,(0,r.scale)((0,r.scale)(4,d,G,T),T,Ce,R),R,(0,r.scale)((0,r.scale)(4,c,G,T),T,-Te,D),D,O,F),F)),0!==Y&&(ee=(0,r.scale)(4,u,Y,w),q=$(q,(0,r.sum_three)((0,r.scale)(ee,w,2*ke,k),k,(0,r.scale)((0,r.scale)(4,c,Y,T),T,_e,R),R,(0,r.scale)((0,r.scale)(4,d,Y,T),T,-Se,D),D,O,F),F)),0!==j||0!==V){if(0!==H||0!==W||0!==G||0!==Y?(ve=H*ke,ce=r.splitter*H,de=ce-(ce-H),fe=H-de,ce=r.splitter*ke,pe=ce-(ce-ke),he=ke-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=_e*Y,ce=r.splitter*_e,de=ce-(ce-_e),fe=_e-de,ce=r.splitter*Y,pe=ce-(ce-Y),he=Y-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be+xe,ue=ge-be,p[0]=be-(ge-ue)+(xe-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+we,ue=ge-ye,p[1]=ye-(ge-ue)+(we-ue),Ee=me+ge,ue=Ee-me,p[2]=me-(Ee-ue)+(ge-ue),p[3]=Ee,ve=G*-Te,ce=r.splitter*G,de=ce-(ce-G),fe=G-de,ce=r.splitter*-Te,pe=ce-(ce- -Te),he=-Te-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=Ae*-W,ce=r.splitter*Ae,de=ce-(ce-Ae),fe=Ae-de,ce=r.splitter*-W,pe=ce-(ce- -W),he=-W-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be+xe,ue=ge-be,h[0]=be-(ge-ue)+(xe-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+we,ue=ge-ye,h[1]=ye-(ge-ue)+(we-ue),Ee=me+ge,ue=Ee-me,h[2]=me-(Ee-ue)+(ge-ue),h[3]=Ee,ne=(0,r.sum)(4,p,4,h,E),ve=H*Y,ce=r.splitter*H,de=ce-(ce-H),fe=H-de,ce=r.splitter*Y,pe=ce-(ce-Y),he=Y-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=G*W,ce=r.splitter*G,de=ce-(ce-G),fe=G-de,ce=r.splitter*W,pe=ce-(ce-W),he=W-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be-xe,ue=be-ge,A[0]=be-(ge+ue)+(ue-xe),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-we,ue=ye-ge,A[1]=ye-(ge+ue)+(ue-we),Ee=me+ge,ue=Ee-me,A[2]=me-(Ee-ue)+(ge-ue),A[3]=Ee,ae=4):(E[0]=0,ne=1,A[0]=0,ae=1),0!==j){const e=(0,r.scale)(ne,E,j,D);q=$(q,(0,r.sum)((0,r.scale)(X,g,j,k),k,(0,r.scale)(e,D,2*Se,O),O,F),F);const t=(0,r.scale)(ae,A,j,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*Se,k),k,(0,r.scale)(t,T,j,R),R,(0,r.scale)(e,D,j,O),O,N,P),P),0!==W&&(q=$(q,(0,r.scale)((0,r.scale)(4,f,j,T),T,W,k),k)),0!==Y&&(q=$(q,(0,r.scale)((0,r.scale)(4,d,-j,T),T,Y,k),k))}if(0!==V){const e=(0,r.scale)(ne,E,V,D);q=$(q,(0,r.sum)((0,r.scale)(K,m,V,k),k,(0,r.scale)(e,D,2*Ce,O),O,F),F);const t=(0,r.scale)(ae,A,V,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*Ce,k),k,(0,r.scale)(t,T,V,R),R,(0,r.scale)(e,D,V,O),O,N,P),P)}}if(0!==H||0!==W){if(0!==G||0!==Y||0!==j||0!==V?(ve=G*Ce,ce=r.splitter*G,de=ce-(ce-G),fe=G-de,ce=r.splitter*Ce,pe=ce-(ce-Ce),he=Ce-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=Ae*V,ce=r.splitter*Ae,de=ce-(ce-Ae),fe=Ae-de,ce=r.splitter*V,pe=ce-(ce-V),he=V-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be+xe,ue=ge-be,p[0]=be-(ge-ue)+(xe-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+we,ue=ge-ye,p[1]=ye-(ge-ue)+(we-ue),Ee=me+ge,ue=Ee-me,p[2]=me-(Ee-ue)+(ge-ue),p[3]=Ee,se=-ke,le=-Y,ve=j*se,ce=r.splitter*j,de=ce-(ce-j),fe=j-de,ce=r.splitter*se,pe=ce-(ce-se),he=se-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=Se*le,ce=r.splitter*Se,de=ce-(ce-Se),fe=Se-de,ce=r.splitter*le,pe=ce-(ce-le),he=le-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be+xe,ue=ge-be,h[0]=be-(ge-ue)+(xe-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+we,ue=ge-ye,h[1]=ye-(ge-ue)+(we-ue),Ee=me+ge,ue=Ee-me,h[2]=me-(Ee-ue)+(ge-ue),h[3]=Ee,re=(0,r.sum)(4,p,4,h,S),ve=G*V,ce=r.splitter*G,de=ce-(ce-G),fe=G-de,ce=r.splitter*V,pe=ce-(ce-V),he=V-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=j*Y,ce=r.splitter*j,de=ce-(ce-j),fe=j-de,ce=r.splitter*Y,pe=ce-(ce-Y),he=Y-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be-xe,ue=be-ge,C[0]=be-(ge+ue)+(ue-xe),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-we,ue=ye-ge,C[1]=ye-(ge+ue)+(ue-we),Ee=me+ge,ue=Ee-me,C[2]=me-(Ee-ue)+(ge-ue),C[3]=Ee,oe=4):(S[0]=0,re=1,C[0]=0,oe=1),0!==H){const e=(0,r.scale)(re,S,H,D);q=$(q,(0,r.sum)((0,r.scale)(J,y,H,k),k,(0,r.scale)(e,D,2*_e,O),O,F),F);const t=(0,r.scale)(oe,C,H,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*_e,k),k,(0,r.scale)(t,T,H,R),R,(0,r.scale)(e,D,H,O),O,N,P),P),0!==Y&&(q=$(q,(0,r.scale)((0,r.scale)(4,c,H,T),T,Y,k),k)),0!==V&&(q=$(q,(0,r.scale)((0,r.scale)(4,f,-H,T),T,V,k),k))}if(0!==W){const e=(0,r.scale)(re,S,W,D);q=$(q,(0,r.sum)((0,r.scale)(Q,v,W,k),k,(0,r.scale)(e,D,2*Te,O),O,F),F);const t=(0,r.scale)(oe,C,W,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*Te,k),k,(0,r.scale)(t,T,W,R),R,(0,r.scale)(e,D,W,O),O,N,P),P)}}if(0!==G||0!==Y){if(0!==j||0!==V||0!==H||0!==W?(ve=j*Te,ce=r.splitter*j,de=ce-(ce-j),fe=j-de,ce=r.splitter*Te,pe=ce-(ce-Te),he=Te-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=Se*W,ce=r.splitter*Se,de=ce-(ce-Se),fe=Se-de,ce=r.splitter*W,pe=ce-(ce-W),he=W-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be+xe,ue=ge-be,p[0]=be-(ge-ue)+(xe-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+we,ue=ge-ye,p[1]=ye-(ge-ue)+(we-ue),Ee=me+ge,ue=Ee-me,p[2]=me-(Ee-ue)+(ge-ue),p[3]=Ee,se=-Ce,le=-V,ve=H*se,ce=r.splitter*H,de=ce-(ce-H),fe=H-de,ce=r.splitter*se,pe=ce-(ce-se),he=se-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=_e*le,ce=r.splitter*_e,de=ce-(ce-_e),fe=_e-de,ce=r.splitter*le,pe=ce-(ce-le),he=le-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be+xe,ue=ge-be,h[0]=be-(ge-ue)+(xe-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+we,ue=ge-ye,h[1]=ye-(ge-ue)+(we-ue),Ee=me+ge,ue=Ee-me,h[2]=me-(Ee-ue)+(ge-ue),h[3]=Ee,te=(0,r.sum)(4,p,4,h,x),ve=j*W,ce=r.splitter*j,de=ce-(ce-j),fe=j-de,ce=r.splitter*W,pe=ce-(ce-W),he=W-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),we=H*V,ce=r.splitter*H,de=ce-(ce-H),fe=H-de,ce=r.splitter*V,pe=ce-(ce-V),he=V-pe,xe=fe*he-(we-de*pe-fe*pe-de*he),ge=be-xe,ue=be-ge,_[0]=be-(ge+ue)+(ue-xe),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-we,ue=ye-ge,_[1]=ye-(ge+ue)+(ue-we),Ee=me+ge,ue=Ee-me,_[2]=me-(Ee-ue)+(ge-ue),_[3]=Ee,ie=4):(x[0]=0,te=1,_[0]=0,ie=1),0!==G){const e=(0,r.scale)(te,x,G,D);q=$(q,(0,r.sum)((0,r.scale)(Z,b,G,k),k,(0,r.scale)(e,D,2*Ae,O),O,F),F);const t=(0,r.scale)(ie,_,G,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*Ae,k),k,(0,r.scale)(t,T,G,R),R,(0,r.scale)(e,D,G,O),O,N,P),P),0!==V&&(q=$(q,(0,r.scale)((0,r.scale)(4,d,G,T),T,V,k),k)),0!==W&&(q=$(q,(0,r.scale)((0,r.scale)(4,c,-G,T),T,W,k),k))}if(0!==Y){const e=(0,r.scale)(te,x,Y,D);q=$(q,(0,r.sum)((0,r.scale)(ee,w,Y,k),k,(0,r.scale)(e,D,2*ke,O),O,F),F);const t=(0,r.scale)(ie,_,Y,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*ke,k),k,(0,r.scale)(t,T,Y,R),R,(0,r.scale)(e,D,Y,O),O,N,P),P)}}return M[q-1]}(e,t,n,I,L,B,U,z,ie)}function B(e,t,n,r,i,a,o,s){const l=e-o,u=t-s,c=n-o,d=r-s,f=i-o,p=a-s;return(l*l+u*u)*(c*p-f*d)+(c*c+d*d)*(f*u-l*p)+(f*f+p*p)*(l*d-c*u)}},43914:(e,t,n)=>{"use strict";n.r(t),n.d(t,{insphere:()=>re,inspherefast:()=>ie});var r=n(62056);const i=(16+224*r.epsilon)*r.epsilon,a=(5+72*r.epsilon)*r.epsilon,o=(71+1408*r.epsilon)*r.epsilon*r.epsilon,s=(0,r.vec)(4),l=(0,r.vec)(4),u=(0,r.vec)(4),c=(0,r.vec)(4),d=(0,r.vec)(4),f=(0,r.vec)(4),p=(0,r.vec)(4),h=(0,r.vec)(4),g=(0,r.vec)(4),m=(0,r.vec)(4),y=(0,r.vec)(24),v=(0,r.vec)(24),b=(0,r.vec)(24),w=(0,r.vec)(24),x=(0,r.vec)(24),E=(0,r.vec)(24),S=(0,r.vec)(24),_=(0,r.vec)(24),A=(0,r.vec)(24),C=(0,r.vec)(24),T=(0,r.vec)(1152),k=(0,r.vec)(1152),R=(0,r.vec)(1152),D=(0,r.vec)(1152),O=(0,r.vec)(1152),N=(0,r.vec)(2304),F=(0,r.vec)(2304),P=(0,r.vec)(3456),M=(0,r.vec)(5760),I=(0,r.vec)(8),$=(0,r.vec)(8),L=(0,r.vec)(8),B=(0,r.vec)(16),U=(0,r.vec)(24),z=(0,r.vec)(48),q=(0,r.vec)(48),j=(0,r.vec)(96),H=(0,r.vec)(192),G=(0,r.vec)(384),V=(0,r.vec)(384),W=(0,r.vec)(384),Y=(0,r.vec)(768);function X(e,t,n,i,a,o,s){return(0,r.sum_three)((0,r.scale)(4,e,i,I),I,(0,r.scale)(4,t,a,$),$,(0,r.scale)(4,n,o,L),L,B,s)}function K(e,t,n,i,a,o,s,l,u,c,d,f){const p=(0,r.sum)((0,r.sum)(e,t,n,i,z),z,(0,r.negate)((0,r.sum)(a,o,s,l,q),q),q,j);return(0,r.sum_three)((0,r.scale)((0,r.scale)(p,j,u,H),H,u,G),G,(0,r.scale)((0,r.scale)(p,j,c,H),H,c,V),V,(0,r.scale)((0,r.scale)(p,j,d,H),H,d,W),W,Y,f)}const J=(0,r.vec)(96),Q=(0,r.vec)(96),Z=(0,r.vec)(96),ee=(0,r.vec)(1152);function te(e,t,n,i,a,o,s,l,u,c){const d=X(e,t,n,i,a,o,U);return(0,r.sum_three)((0,r.scale)((0,r.scale)(d,U,s,z),z,s,J),J,(0,r.scale)((0,r.scale)(d,U,l,z),z,l,Q),Q,(0,r.scale)((0,r.scale)(d,U,u,z),z,u,Z),Z,H,c)}function ne(e,t,n,i,I,$,L,B,U,z,q,j,H,G,V,W){let Y,J,Q,Z,ne,re,ie,ae,oe,se,le,ue,ce,de,fe,pe,he,ge,me,ye,ve,be,we,xe,Ee,Se,_e,Ae,Ce,Te,ke;const Re=e-H,De=i-H,Oe=L-H,Ne=z-H,Fe=t-G,Pe=I-G,Me=B-G,Ie=q-G,$e=n-V,Le=$-V,Be=U-V,Ue=j-V;Ae=Re*Pe,ye=r.splitter*Re,ve=ye-(ye-Re),be=Re-ve,ye=r.splitter*Pe,we=ye-(ye-Pe),xe=Pe-we,Ce=be*xe-(Ae-ve*we-be*we-ve*xe),Te=De*Fe,ye=r.splitter*De,ve=ye-(ye-De),be=De-ve,ye=r.splitter*Fe,we=ye-(ye-Fe),xe=Fe-we,ke=be*xe-(Te-ve*we-be*we-ve*xe),Ee=Ce-ke,me=Ce-Ee,s[0]=Ce-(Ee+me)+(me-ke),Se=Ae+Ee,me=Se-Ae,_e=Ae-(Se-me)+(Ee-me),Ee=_e-Te,me=_e-Ee,s[1]=_e-(Ee+me)+(me-Te),Y=Se+Ee,me=Y-Se,s[2]=Se-(Y-me)+(Ee-me),s[3]=Y,Ae=De*Me,ye=r.splitter*De,ve=ye-(ye-De),be=De-ve,ye=r.splitter*Me,we=ye-(ye-Me),xe=Me-we,Ce=be*xe-(Ae-ve*we-be*we-ve*xe),Te=Oe*Pe,ye=r.splitter*Oe,ve=ye-(ye-Oe),be=Oe-ve,ye=r.splitter*Pe,we=ye-(ye-Pe),xe=Pe-we,ke=be*xe-(Te-ve*we-be*we-ve*xe),Ee=Ce-ke,me=Ce-Ee,l[0]=Ce-(Ee+me)+(me-ke),Se=Ae+Ee,me=Se-Ae,_e=Ae-(Se-me)+(Ee-me),Ee=_e-Te,me=_e-Ee,l[1]=_e-(Ee+me)+(me-Te),J=Se+Ee,me=J-Se,l[2]=Se-(J-me)+(Ee-me),l[3]=J,Ae=Oe*Ie,ye=r.splitter*Oe,ve=ye-(ye-Oe),be=Oe-ve,ye=r.splitter*Ie,we=ye-(ye-Ie),xe=Ie-we,Ce=be*xe-(Ae-ve*we-be*we-ve*xe),Te=Ne*Me,ye=r.splitter*Ne,ve=ye-(ye-Ne),be=Ne-ve,ye=r.splitter*Me,we=ye-(ye-Me),xe=Me-we,ke=be*xe-(Te-ve*we-be*we-ve*xe),Ee=Ce-ke,me=Ce-Ee,u[0]=Ce-(Ee+me)+(me-ke),Se=Ae+Ee,me=Se-Ae,_e=Ae-(Se-me)+(Ee-me),Ee=_e-Te,me=_e-Ee,u[1]=_e-(Ee+me)+(me-Te),Q=Se+Ee,me=Q-Se,u[2]=Se-(Q-me)+(Ee-me),u[3]=Q,Ae=Ne*Fe,ye=r.splitter*Ne,ve=ye-(ye-Ne),be=Ne-ve,ye=r.splitter*Fe,we=ye-(ye-Fe),xe=Fe-we,Ce=be*xe-(Ae-ve*we-be*we-ve*xe),Te=Re*Ie,ye=r.splitter*Re,ve=ye-(ye-Re),be=Re-ve,ye=r.splitter*Ie,we=ye-(ye-Ie),xe=Ie-we,ke=be*xe-(Te-ve*we-be*we-ve*xe),Ee=Ce-ke,me=Ce-Ee,g[0]=Ce-(Ee+me)+(me-ke),Se=Ae+Ee,me=Se-Ae,_e=Ae-(Se-me)+(Ee-me),Ee=_e-Te,me=_e-Ee,g[1]=_e-(Ee+me)+(me-Te),Z=Se+Ee,me=Z-Se,g[2]=Se-(Z-me)+(Ee-me),g[3]=Z,Ae=Re*Me,ye=r.splitter*Re,ve=ye-(ye-Re),be=Re-ve,ye=r.splitter*Me,we=ye-(ye-Me),xe=Me-we,Ce=be*xe-(Ae-ve*we-be*we-ve*xe),Te=Oe*Fe,ye=r.splitter*Oe,ve=ye-(ye-Oe),be=Oe-ve,ye=r.splitter*Fe,we=ye-(ye-Fe),xe=Fe-we,ke=be*xe-(Te-ve*we-be*we-ve*xe),Ee=Ce-ke,me=Ce-Ee,f[0]=Ce-(Ee+me)+(me-ke),Se=Ae+Ee,me=Se-Ae,_e=Ae-(Se-me)+(Ee-me),Ee=_e-Te,me=_e-Ee,f[1]=_e-(Ee+me)+(me-Te),ne=Se+Ee,me=ne-Se,f[2]=Se-(ne-me)+(Ee-me),f[3]=ne,Ae=De*Ie,ye=r.splitter*De,ve=ye-(ye-De),be=De-ve,ye=r.splitter*Ie,we=ye-(ye-Ie),xe=Ie-we,Ce=be*xe-(Ae-ve*we-be*we-ve*xe),Te=Ne*Pe,ye=r.splitter*Ne,ve=ye-(ye-Ne),be=Ne-ve,ye=r.splitter*Pe,we=ye-(ye-Pe),xe=Pe-we,ke=be*xe-(Te-ve*we-be*we-ve*xe),Ee=Ce-ke,me=Ce-Ee,p[0]=Ce-(Ee+me)+(me-ke),Se=Ae+Ee,me=Se-Ae,_e=Ae-(Se-me)+(Ee-me),Ee=_e-Te,me=_e-Ee,p[1]=_e-(Ee+me)+(me-Te),re=Se+Ee,me=re-Se,p[2]=Se-(re-me)+(Ee-me),p[3]=re;const ze=(0,r.sum)((0,r.sum)((0,r.negate)(te(l,u,p,Ue,Le,-Be,Re,Fe,$e,T),T),T,te(u,g,f,$e,Be,Ue,De,Pe,Le,k),k,N),N,(0,r.sum)((0,r.negate)(te(g,s,p,Le,Ue,$e,Oe,Me,Be,R),R),R,te(s,l,f,Be,$e,-Le,Ne,Ie,Ue,D),D,F),F,ee);let qe=(0,r.estimate)(ze,ee),je=a*W;if(qe>=je||-qe>=je)return qe;if(me=e-Re,ie=e-(Re+me)+(me-H),me=t-Fe,le=t-(Fe+me)+(me-G),me=n-$e,fe=n-($e+me)+(me-V),me=i-De,ae=i-(De+me)+(me-H),me=I-Pe,ue=I-(Pe+me)+(me-G),me=$-Le,pe=$-(Le+me)+(me-V),me=L-Oe,oe=L-(Oe+me)+(me-H),me=B-Me,ce=B-(Me+me)+(me-G),me=U-Be,he=U-(Be+me)+(me-V),me=z-Ne,se=z-(Ne+me)+(me-H),me=q-Ie,de=q-(Ie+me)+(me-G),me=j-Ue,ge=j-(Ue+me)+(me-V),0===ie&&0===le&&0===fe&&0===ae&&0===ue&&0===pe&&0===oe&&0===ce&&0===he&&0===se&&0===de&&0===ge)return qe;je=o*W+r.resulterrbound*Math.abs(qe);const He=Re*ue+Pe*ie-(Fe*ae+De*le),Ge=De*ce+Me*ae-(Pe*oe+Oe*ue),Ve=Oe*de+Ie*oe-(Me*se+Ne*ce),We=Ne*le+Fe*se-(Ie*ie+Re*de),Ye=Re*ce+Me*ie-(Fe*oe+Oe*le),Xe=De*de+Ie*ae-(Pe*se+Ne*ue);return qe+=(De*De+Pe*Pe+Le*Le)*(Be*We+Ue*Ye+$e*Ve+(he*Z+ge*ne+fe*Q))+(Ne*Ne+Ie*Ie+Ue*Ue)*($e*Ge-Le*Ye+Be*He+(fe*J-pe*ne+he*Y))-((Re*Re+Fe*Fe+$e*$e)*(Le*Ve-Be*Xe+Ue*Ge+(pe*Q-he*re+ge*J))+(Oe*Oe+Me*Me+Be*Be)*(Ue*He+$e*Xe+Le*We+(ge*Y+fe*re+pe*Z)))+2*((De*ae+Pe*ue+Le*pe)*(Be*Z+Ue*ne+$e*Q)+(Ne*se+Ie*de+Ue*ge)*($e*J-Le*ne+Be*Y)-((Re*ie+Fe*le+$e*fe)*(Le*Q-Be*re+Ue*J)+(Oe*oe+Me*ce+Be*he)*(Ue*Y+$e*re+Le*Z))),qe>=je||-qe>=je?qe:function(e,t,n,i,a,o,I,$,L,B,U,z,q,j,H){let G,V,W,Y,J,Q,Z,ee,te,ne,re,ie,ae,oe;ne=e*a,V=r.splitter*e,W=V-(V-e),Y=e-W,V=r.splitter*a,J=V-(V-a),Q=a-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=i*t,V=r.splitter*i,W=V-(V-i),Y=i-W,V=r.splitter*t,J=V-(V-t),Q=t-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,s[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,s[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,s[2]=ee-(oe-G)+(Z-G),s[3]=oe,ne=i*$,V=r.splitter*i,W=V-(V-i),Y=i-W,V=r.splitter*$,J=V-(V-$),Q=$-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=I*a,V=r.splitter*I,W=V-(V-I),Y=I-W,V=r.splitter*a,J=V-(V-a),Q=a-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,l[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,l[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,l[2]=ee-(oe-G)+(Z-G),l[3]=oe,ne=I*U,V=r.splitter*I,W=V-(V-I),Y=I-W,V=r.splitter*U,J=V-(V-U),Q=U-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=B*$,V=r.splitter*B,W=V-(V-B),Y=B-W,V=r.splitter*$,J=V-(V-$),Q=$-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,u[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,u[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,u[2]=ee-(oe-G)+(Z-G),u[3]=oe,ne=B*j,V=r.splitter*B,W=V-(V-B),Y=B-W,V=r.splitter*j,J=V-(V-j),Q=j-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=q*U,V=r.splitter*q,W=V-(V-q),Y=q-W,V=r.splitter*U,J=V-(V-U),Q=U-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,c[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,c[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,c[2]=ee-(oe-G)+(Z-G),c[3]=oe,ne=q*t,V=r.splitter*q,W=V-(V-q),Y=q-W,V=r.splitter*t,J=V-(V-t),Q=t-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=e*j,V=r.splitter*e,W=V-(V-e),Y=e-W,V=r.splitter*j,J=V-(V-j),Q=j-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,d[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,d[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,d[2]=ee-(oe-G)+(Z-G),d[3]=oe,ne=e*$,V=r.splitter*e,W=V-(V-e),Y=e-W,V=r.splitter*$,J=V-(V-$),Q=$-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=I*t,V=r.splitter*I,W=V-(V-I),Y=I-W,V=r.splitter*t,J=V-(V-t),Q=t-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,f[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,f[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,f[2]=ee-(oe-G)+(Z-G),f[3]=oe,ne=i*U,V=r.splitter*i,W=V-(V-i),Y=i-W,V=r.splitter*U,J=V-(V-U),Q=U-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=B*a,V=r.splitter*B,W=V-(V-B),Y=B-W,V=r.splitter*a,J=V-(V-a),Q=a-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,p[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,p[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,p[2]=ee-(oe-G)+(Z-G),p[3]=oe,ne=I*j,V=r.splitter*I,W=V-(V-I),Y=I-W,V=r.splitter*j,J=V-(V-j),Q=j-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=q*$,V=r.splitter*q,W=V-(V-q),Y=q-W,V=r.splitter*$,J=V-(V-$),Q=$-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,h[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,h[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,h[2]=ee-(oe-G)+(Z-G),h[3]=oe,ne=B*t,V=r.splitter*B,W=V-(V-B),Y=B-W,V=r.splitter*t,J=V-(V-t),Q=t-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=e*U,V=r.splitter*e,W=V-(V-e),Y=e-W,V=r.splitter*U,J=V-(V-U),Q=U-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,g[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,g[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,g[2]=ee-(oe-G)+(Z-G),g[3]=oe,ne=q*a,V=r.splitter*q,W=V-(V-q),Y=q-W,V=r.splitter*a,J=V-(V-a),Q=a-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=i*j,V=r.splitter*i,W=V-(V-i),Y=i-W,V=r.splitter*j,J=V-(V-j),Q=j-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,m[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,m[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,m[2]=ee-(oe-G)+(Z-G),m[3]=oe;const se=X(s,l,f,L,n,-o,y),le=X(l,u,p,z,o,-L,v),ue=X(u,c,h,H,L,-z,b),ce=X(c,d,g,n,z,-H,w),de=X(d,s,m,o,H,-n,x),fe=X(s,p,g,z,n,o,E),pe=X(l,h,m,H,o,L,S),he=X(u,g,f,n,L,z,_),ge=X(c,m,p,o,z,H,A),me=X(d,f,h,L,H,n,C),ye=(0,r.sum_three)(K(ue,b,pe,S,ge,A,le,v,e,t,n,T),T,K(ce,w,he,_,me,C,ue,b,i,a,o,k),k,(0,r.sum_three)(K(de,x,ge,A,fe,E,ce,w,I,$,L,R),R,K(se,y,me,C,pe,S,de,x,B,U,z,D),D,K(le,v,fe,E,he,_,se,y,q,j,H,O),O,F,P),P,N,M);return M[ye-1]}(e,t,n,i,I,$,L,B,U,z,q,j,H,G,V)}function re(e,t,n,r,a,o,s,l,u,c,d,f,p,h,g){const m=e-p,y=r-p,v=s-p,b=c-p,w=t-h,x=a-h,E=l-h,S=d-h,_=n-g,A=o-g,C=u-g,T=f-g,k=m*x,R=y*w,D=k-R,O=y*E,N=v*x,F=O-N,P=v*S,M=b*E,I=P-M,$=b*w,L=m*S,B=$-L,U=m*E,z=v*w,q=U-z,j=y*S,H=b*x,G=j-H,V=m*m+w*w+_*_,W=y*y+x*x+A*A,Y=v*v+E*E+C*C,X=b*b+S*S+T*T,K=Y*(T*D+_*G+A*B)-X*(_*F-A*q+C*D)+(V*(A*I-C*G+T*F)-W*(C*B+T*q+_*I)),J=Math.abs(_),Q=Math.abs(A),Z=Math.abs(C),ee=Math.abs(T),te=Math.abs(k)+Math.abs(R),re=Math.abs(O)+Math.abs(N),ie=Math.abs(P)+Math.abs(M),ae=Math.abs($)+Math.abs(L),oe=Math.abs(U)+Math.abs(z),se=Math.abs(j)+Math.abs(H),le=(ie*Q+se*Z+re*ee)*V+(ae*Z+oe*ee+ie*J)*W+(te*ee+se*J+ae*Q)*Y+(re*J+oe*Q+te*Z)*X,ue=i*le;return K>ue||-K>ue?K:-ne(e,t,n,r,a,o,s,l,u,c,d,f,p,h,g,le)}function ie(e,t,n,r,i,a,o,s,l,u,c,d,f,p,h){const g=e-f,m=r-f,y=o-f,v=u-f,b=t-p,w=i-p,x=s-p,E=c-p,S=n-h,_=a-h,A=l-h,C=d-h,T=g*w-m*b,k=m*x-y*w,R=y*E-v*x,D=v*b-g*E,O=g*x-y*b,N=m*E-v*w;return(y*y+x*x+A*A)*(C*T+S*N+_*D)-(v*v+E*E+C*C)*(S*k-_*O+A*T)+((g*g+b*b+S*S)*(_*R-A*N+C*k)-(m*m+w*w+_*_)*(A*D+C*O+S*R))}},11083:(e,t,n)=>{"use strict";n.r(t),n.d(t,{orient2d:()=>f,orient2dfast:()=>p});var r=n(62056);const i=(3+16*r.epsilon)*r.epsilon,a=(2+12*r.epsilon)*r.epsilon,o=(9+64*r.epsilon)*r.epsilon*r.epsilon,s=(0,r.vec)(4),l=(0,r.vec)(8),u=(0,r.vec)(12),c=(0,r.vec)(16),d=(0,r.vec)(4);function f(e,t,n,f,p,h){const g=(t-h)*(n-p),m=(e-p)*(f-h),y=g-m,v=Math.abs(g+m);return Math.abs(y)>=i*v?y:-function(e,t,n,i,f,p,h){let g,m,y,v,b,w,x,E,S,_,A,C,T,k,R,D,O,N;const F=e-f,P=n-f,M=t-p,I=i-p;k=F*I,w=r.splitter*F,x=w-(w-F),E=F-x,w=r.splitter*I,S=w-(w-I),_=I-S,R=E*_-(k-x*S-E*S-x*_),D=M*P,w=r.splitter*M,x=w-(w-M),E=M-x,w=r.splitter*P,S=w-(w-P),_=P-S,O=E*_-(D-x*S-E*S-x*_),A=R-O,b=R-A,s[0]=R-(A+b)+(b-O),C=k+A,b=C-k,T=k-(C-b)+(A-b),A=T-D,b=T-A,s[1]=T-(A+b)+(b-D),N=C+A,b=N-C,s[2]=C-(N-b)+(A-b),s[3]=N;let $=(0,r.estimate)(4,s),L=a*h;if($>=L||-$>=L)return $;if(b=e-F,g=e-(F+b)+(b-f),b=n-P,y=n-(P+b)+(b-f),b=t-M,m=t-(M+b)+(b-p),b=i-I,v=i-(I+b)+(b-p),0===g&&0===m&&0===y&&0===v)return $;if(L=o*h+r.resulterrbound*Math.abs($),$+=F*v+I*g-(M*y+P*m),$>=L||-$>=L)return $;k=g*I,w=r.splitter*g,x=w-(w-g),E=g-x,w=r.splitter*I,S=w-(w-I),_=I-S,R=E*_-(k-x*S-E*S-x*_),D=m*P,w=r.splitter*m,x=w-(w-m),E=m-x,w=r.splitter*P,S=w-(w-P),_=P-S,O=E*_-(D-x*S-E*S-x*_),A=R-O,b=R-A,d[0]=R-(A+b)+(b-O),C=k+A,b=C-k,T=k-(C-b)+(A-b),A=T-D,b=T-A,d[1]=T-(A+b)+(b-D),N=C+A,b=N-C,d[2]=C-(N-b)+(A-b),d[3]=N;const B=(0,r.sum)(4,s,4,d,l);k=F*v,w=r.splitter*F,x=w-(w-F),E=F-x,w=r.splitter*v,S=w-(w-v),_=v-S,R=E*_-(k-x*S-E*S-x*_),D=M*y,w=r.splitter*M,x=w-(w-M),E=M-x,w=r.splitter*y,S=w-(w-y),_=y-S,O=E*_-(D-x*S-E*S-x*_),A=R-O,b=R-A,d[0]=R-(A+b)+(b-O),C=k+A,b=C-k,T=k-(C-b)+(A-b),A=T-D,b=T-A,d[1]=T-(A+b)+(b-D),N=C+A,b=N-C,d[2]=C-(N-b)+(A-b),d[3]=N;const U=(0,r.sum)(B,l,4,d,u);k=g*v,w=r.splitter*g,x=w-(w-g),E=g-x,w=r.splitter*v,S=w-(w-v),_=v-S,R=E*_-(k-x*S-E*S-x*_),D=m*y,w=r.splitter*m,x=w-(w-m),E=m-x,w=r.splitter*y,S=w-(w-y),_=y-S,O=E*_-(D-x*S-E*S-x*_),A=R-O,b=R-A,d[0]=R-(A+b)+(b-O),C=k+A,b=C-k,T=k-(C-b)+(A-b),A=T-D,b=T-A,d[1]=T-(A+b)+(b-D),N=C+A,b=N-C,d[2]=C-(N-b)+(A-b),d[3]=N;const z=(0,r.sum)(U,u,4,d,c);return c[z-1]}(e,t,n,f,p,h,v)}function p(e,t,n,r,i,a){return(t-a)*(n-i)-(e-i)*(r-a)}},98302:(e,t,n)=>{"use strict";n.r(t),n.d(t,{orient3d:()=>R,orient3dfast:()=>D});var r=n(62056);const i=(7+56*r.epsilon)*r.epsilon,a=(3+28*r.epsilon)*r.epsilon,o=(26+288*r.epsilon)*r.epsilon*r.epsilon,s=(0,r.vec)(4),l=(0,r.vec)(4),u=(0,r.vec)(4),c=(0,r.vec)(4),d=(0,r.vec)(4),f=(0,r.vec)(4),p=(0,r.vec)(4),h=(0,r.vec)(4),g=(0,r.vec)(4),m=(0,r.vec)(8),y=(0,r.vec)(8),v=(0,r.vec)(8),b=(0,r.vec)(4),w=(0,r.vec)(8),x=(0,r.vec)(8),E=(0,r.vec)(8),S=(0,r.vec)(12);let _=(0,r.vec)(192),A=(0,r.vec)(192);function C(e,t,n){e=(0,r.sum)(e,_,t,n,A);const i=_;return _=A,A=i,e}function T(e,t,n,i,a,o,s,l){let u,c,d,f,p,h,g,m,y,v,b,w,x,E,S;return 0===e?0===t?(s[0]=0,l[0]=0,1):(S=-t,v=S*n,c=r.splitter*S,d=c-(c-S),f=S-d,c=r.splitter*n,p=c-(c-n),h=n-p,s[0]=f*h-(v-d*p-f*p-d*h),s[1]=v,v=t*a,c=r.splitter*t,d=c-(c-t),f=t-d,c=r.splitter*a,p=c-(c-a),h=a-p,l[0]=f*h-(v-d*p-f*p-d*h),l[1]=v,2):0===t?(v=e*i,c=r.splitter*e,d=c-(c-e),f=e-d,c=r.splitter*i,p=c-(c-i),h=i-p,s[0]=f*h-(v-d*p-f*p-d*h),s[1]=v,S=-e,v=S*o,c=r.splitter*S,d=c-(c-S),f=S-d,c=r.splitter*o,p=c-(c-o),h=o-p,l[0]=f*h-(v-d*p-f*p-d*h),l[1]=v,2):(v=e*i,c=r.splitter*e,d=c-(c-e),f=e-d,c=r.splitter*i,p=c-(c-i),h=i-p,b=f*h-(v-d*p-f*p-d*h),w=t*n,c=r.splitter*t,d=c-(c-t),f=t-d,c=r.splitter*n,p=c-(c-n),h=n-p,x=f*h-(w-d*p-f*p-d*h),g=b-x,u=b-g,s[0]=b-(g+u)+(u-x),m=v+g,u=m-v,y=v-(m-u)+(g-u),g=y-w,u=y-g,s[1]=y-(g+u)+(u-w),E=m+g,u=E-m,s[2]=m-(E-u)+(g-u),s[3]=E,v=t*a,c=r.splitter*t,d=c-(c-t),f=t-d,c=r.splitter*a,p=c-(c-a),h=a-p,b=f*h-(v-d*p-f*p-d*h),w=e*o,c=r.splitter*e,d=c-(c-e),f=e-d,c=r.splitter*o,p=c-(c-o),h=o-p,x=f*h-(w-d*p-f*p-d*h),g=b-x,u=b-g,l[0]=b-(g+u)+(u-x),m=v+g,u=m-v,y=v-(m-u)+(g-u),g=y-w,u=y-g,l[1]=y-(g+u)+(u-w),E=m+g,u=E-m,l[2]=m-(E-u)+(g-u),l[3]=E,4)}function k(e,t,n,i,a){let o,s,l,u,c,d,f,p,h,g,m,y,v;return m=t*n,s=r.splitter*t,l=s-(s-t),u=t-l,s=r.splitter*n,c=s-(s-n),d=n-c,y=u*d-(m-l*c-u*c-l*d),s=r.splitter*i,c=s-(s-i),d=i-c,f=y*i,s=r.splitter*y,l=s-(s-y),u=y-l,b[0]=u*d-(f-l*c-u*c-l*d),p=m*i,s=r.splitter*m,l=s-(s-m),u=m-l,g=u*d-(p-l*c-u*c-l*d),h=f+g,o=h-f,b[1]=f-(h-o)+(g-o),v=p+h,b[2]=h-(v-p),b[3]=v,e=C(e,4,b),0!==a&&(s=r.splitter*a,c=s-(s-a),d=a-c,f=y*a,s=r.splitter*y,l=s-(s-y),u=y-l,b[0]=u*d-(f-l*c-u*c-l*d),p=m*a,s=r.splitter*m,l=s-(s-m),u=m-l,g=u*d-(p-l*c-u*c-l*d),h=f+g,o=h-f,b[1]=f-(h-o)+(g-o),v=p+h,b[2]=h-(v-p),b[3]=v,e=C(e,4,b)),e}function R(e,t,n,b,A,R,D,O,N,F,P,M){const I=e-F,$=b-F,L=D-F,B=t-P,U=A-P,z=O-P,q=n-M,j=R-M,H=N-M,G=$*z,V=L*U,W=L*B,Y=I*z,X=I*U,K=$*B,J=q*(G-V)+j*(W-Y)+H*(X-K),Q=(Math.abs(G)+Math.abs(V))*Math.abs(q)+(Math.abs(W)+Math.abs(Y))*Math.abs(j)+(Math.abs(X)+Math.abs(K))*Math.abs(H),Z=i*Q;return J>Z||-J>Z?J:function(e,t,n,i,b,A,R,D,O,N,F,P,M){let I,$,L,B,U,z,q,j,H,G,V,W,Y,X,K,J,Q,Z,ee,te,ne,re,ie,ae;const oe=e-N,se=i-N,le=R-N,ue=t-F,ce=b-F,de=D-F,fe=n-P,pe=A-P,he=O-P;te=se*de,W=r.splitter*se,Y=W-(W-se),X=se-Y,W=r.splitter*de,K=W-(W-de),J=de-K,ne=X*J-(te-Y*K-X*K-Y*J),re=le*ce,W=r.splitter*le,Y=W-(W-le),X=le-Y,W=r.splitter*ce,K=W-(W-ce),J=ce-K,ie=X*J-(re-Y*K-X*K-Y*J),Q=ne-ie,V=ne-Q,s[0]=ne-(Q+V)+(V-ie),Z=te+Q,V=Z-te,ee=te-(Z-V)+(Q-V),Q=ee-re,V=ee-Q,s[1]=ee-(Q+V)+(V-re),ae=Z+Q,V=ae-Z,s[2]=Z-(ae-V)+(Q-V),s[3]=ae,te=le*ue,W=r.splitter*le,Y=W-(W-le),X=le-Y,W=r.splitter*ue,K=W-(W-ue),J=ue-K,ne=X*J-(te-Y*K-X*K-Y*J),re=oe*de,W=r.splitter*oe,Y=W-(W-oe),X=oe-Y,W=r.splitter*de,K=W-(W-de),J=de-K,ie=X*J-(re-Y*K-X*K-Y*J),Q=ne-ie,V=ne-Q,l[0]=ne-(Q+V)+(V-ie),Z=te+Q,V=Z-te,ee=te-(Z-V)+(Q-V),Q=ee-re,V=ee-Q,l[1]=ee-(Q+V)+(V-re),ae=Z+Q,V=ae-Z,l[2]=Z-(ae-V)+(Q-V),l[3]=ae,te=oe*ce,W=r.splitter*oe,Y=W-(W-oe),X=oe-Y,W=r.splitter*ce,K=W-(W-ce),J=ce-K,ne=X*J-(te-Y*K-X*K-Y*J),re=se*ue,W=r.splitter*se,Y=W-(W-se),X=se-Y,W=r.splitter*ue,K=W-(W-ue),J=ue-K,ie=X*J-(re-Y*K-X*K-Y*J),Q=ne-ie,V=ne-Q,u[0]=ne-(Q+V)+(V-ie),Z=te+Q,V=Z-te,ee=te-(Z-V)+(Q-V),Q=ee-re,V=ee-Q,u[1]=ee-(Q+V)+(V-re),ae=Z+Q,V=ae-Z,u[2]=Z-(ae-V)+(Q-V),u[3]=ae,I=(0,r.sum)((0,r.sum)((0,r.scale)(4,s,fe,w),w,(0,r.scale)(4,l,pe,x),x,E),E,(0,r.scale)(4,u,he,w),w,_);let ge=(0,r.estimate)(I,_),me=a*M;if(ge>=me||-ge>=me)return ge;if(V=e-oe,$=e-(oe+V)+(V-N),V=i-se,L=i-(se+V)+(V-N),V=R-le,B=R-(le+V)+(V-N),V=t-ue,U=t-(ue+V)+(V-F),V=b-ce,z=b-(ce+V)+(V-F),V=D-de,q=D-(de+V)+(V-F),V=n-fe,j=n-(fe+V)+(V-P),V=A-pe,H=A-(pe+V)+(V-P),V=O-he,G=O-(he+V)+(V-P),0===$&&0===L&&0===B&&0===U&&0===z&&0===q&&0===j&&0===H&&0===G)return ge;if(me=o*M+r.resulterrbound*Math.abs(ge),ge+=fe*(se*q+de*L-(ce*B+le*z))+j*(se*de-ce*le)+pe*(le*U+ue*B-(de*$+oe*q))+H*(le*ue-de*oe)+he*(oe*z+ce*$-(ue*L+se*U))+G*(oe*ce-ue*se),ge>=me||-ge>=me)return ge;const ye=T($,U,se,ce,le,de,c,d),ve=T(L,z,le,de,oe,ue,f,p),be=T(B,q,oe,ue,se,ce,h,g),we=(0,r.sum)(ve,f,be,g,m);I=C(I,(0,r.scale)(we,m,fe,E),E);const xe=(0,r.sum)(be,h,ye,d,y);I=C(I,(0,r.scale)(xe,y,pe,E),E);const Ee=(0,r.sum)(ye,c,ve,p,v);return I=C(I,(0,r.scale)(Ee,v,he,E),E),0!==j&&(I=C(I,(0,r.scale)(4,s,j,S),S),I=C(I,(0,r.scale)(we,m,j,E),E)),0!==H&&(I=C(I,(0,r.scale)(4,l,H,S),S),I=C(I,(0,r.scale)(xe,y,H,E),E)),0!==G&&(I=C(I,(0,r.scale)(4,u,G,S),S),I=C(I,(0,r.scale)(Ee,v,G,E),E)),0!==$&&(0!==z&&(I=k(I,$,z,he,G)),0!==q&&(I=k(I,-$,q,pe,H))),0!==L&&(0!==q&&(I=k(I,L,q,fe,j)),0!==U&&(I=k(I,-L,U,he,G))),0!==B&&(0!==U&&(I=k(I,B,U,pe,H)),0!==z&&(I=k(I,-B,z,fe,j))),_[I-1]}(e,t,n,b,A,R,D,O,N,F,P,M,Q)}function D(e,t,n,r,i,a,o,s,l,u,c,d){const f=t-c,p=i-c,h=s-c,g=n-d,m=a-d,y=l-d;return(e-u)*(p*y-m*h)+(r-u)*(h*g-y*f)+(o-u)*(f*m-g*p)}},62056:(e,t,n)=>{"use strict";n.r(t),n.d(t,{epsilon:()=>r,estimate:()=>c,negate:()=>u,resulterrbound:()=>a,scale:()=>l,splitter:()=>i,sum:()=>o,sum_three:()=>s,vec:()=>d});const r=11102230246251565e-32,i=134217729,a=(3+8*r)*r;function o(e,t,n,r,i){let a,o,s,l,u=t[0],c=r[0],d=0,f=0;c>u==c>-u?(a=u,u=t[++d]):(a=c,c=r[++f]);let p=0;if(du==c>-u?(o=u+a,s=a-(o-u),u=t[++d]):(o=c+a,s=a-(o-c),c=r[++f]),a=o,0!==s&&(i[p++]=s);du==c>-u?(o=a+u,l=o-a,s=a-(o-l)+(u-l),u=t[++d]):(o=a+c,l=o-a,s=a-(o-l)+(c-l),c=r[++f]),a=o,0!==s&&(i[p++]=s);for(;d{"use strict";n.r(t),n.d(t,{incircle:()=>a.incircle,incirclefast:()=>a.incirclefast,insphere:()=>o.insphere,inspherefast:()=>o.inspherefast,orient2d:()=>r.orient2d,orient2dfast:()=>r.orient2dfast,orient3d:()=>i.orient3d,orient3dfast:()=>i.orient3dfast});var r=n(11083),i=n(98302),a=n(71807),o=n(43914)},31635:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>M,__assign:()=>a,__asyncDelegator:()=>A,__asyncGenerator:()=>_,__asyncValues:()=>C,__await:()=>S,__awaiter:()=>h,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>P,__classPrivateFieldSet:()=>F,__createBinding:()=>m,__decorate:()=>s,__disposeResources:()=>$,__esDecorate:()=>u,__exportStar:()=>y,__extends:()=>i,__generator:()=>g,__importDefault:()=>O,__importStar:()=>D,__makeTemplateObject:()=>T,__metadata:()=>p,__param:()=>l,__propKey:()=>d,__read:()=>b,__rest:()=>o,__rewriteRelativeImportExtension:()=>L,__runInitializers:()=>c,__setFunctionName:()=>f,__spread:()=>w,__spreadArray:()=>E,__spreadArrays:()=>x,__values:()=>v,default:()=>B});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function l(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,i,a){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var g in r)h[g]="access"===g?{}:r[g];for(var g in r.access)h.access[g]=r.access[g];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(e||null))};var m=(0,n[p])("accessor"===l?{get:d.get,set:d.set}:d[u],h);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=o(m.get))&&(d.get=s),(s=o(m.set))&&(d.set=s),(s=o(m.init))&&i.unshift(s)}else(s=o(m))&&("field"===l?i.unshift(s):d[u]=s)}c&&Object.defineProperty(c,r.name,d),f=!0}function c(e,t,n){for(var r=arguments.length>2,i=0;i0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function w(){for(var e=[],t=0;t1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=i[e](t)).value instanceof S?Promise.resolve(n.value.v).then(l,u):c(a[0][2],n)}catch(e){c(a[0][3],e)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function A(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:S(e[r](t)),done:!1}:i?i(t):t}:i}}function C(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=v(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},R=function(e){return R=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},R(e)};function D(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=R(e),r=0;r{"use strict";e.exports=JSON.parse('{"name":"@aws-sdk/client-bedrock-runtime","description":"AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native","version":"3.687.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-bedrock-runtime","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo bedrock-runtime"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.687.0","@aws-sdk/client-sts":"3.687.0","@aws-sdk/core":"3.686.0","@aws-sdk/credential-provider-node":"3.687.0","@aws-sdk/middleware-host-header":"3.686.0","@aws-sdk/middleware-logger":"3.686.0","@aws-sdk/middleware-recursion-detection":"3.686.0","@aws-sdk/middleware-user-agent":"3.687.0","@aws-sdk/region-config-resolver":"3.686.0","@aws-sdk/types":"3.686.0","@aws-sdk/util-endpoints":"3.686.0","@aws-sdk/util-user-agent-browser":"3.686.0","@aws-sdk/util-user-agent-node":"3.687.0","@smithy/config-resolver":"^3.0.10","@smithy/core":"^2.5.1","@smithy/eventstream-serde-browser":"^3.0.11","@smithy/eventstream-serde-config-resolver":"^3.0.8","@smithy/eventstream-serde-node":"^3.0.10","@smithy/fetch-http-handler":"^4.0.0","@smithy/hash-node":"^3.0.8","@smithy/invalid-dependency":"^3.0.8","@smithy/middleware-content-length":"^3.0.10","@smithy/middleware-endpoint":"^3.2.1","@smithy/middleware-retry":"^3.0.25","@smithy/middleware-serde":"^3.0.8","@smithy/middleware-stack":"^3.0.8","@smithy/node-config-provider":"^3.1.9","@smithy/node-http-handler":"^3.2.5","@smithy/protocol-http":"^4.1.5","@smithy/smithy-client":"^3.4.2","@smithy/types":"^3.6.0","@smithy/url-parser":"^3.0.8","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.25","@smithy/util-defaults-mode-node":"^3.0.25","@smithy/util-endpoints":"^2.1.4","@smithy/util-middleware":"^3.0.8","@smithy/util-retry":"^3.0.8","@smithy/util-stream":"^3.2.1","@smithy/util-utf8":"^3.0.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=16.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock-runtime","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-bedrock-runtime"}}')},4787:e=>{"use strict";e.exports=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}')},67383:e=>{"use strict";e.exports=JSON.parse('{"name":"vega-lite","author":"Dominik Moritz, Kanit \\"Ham\\" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer","version":"5.21.0","collaborators":["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Arvind Satyanarayan (https://arvindsatya.com)","Jeffrey Heer (https://jheer.org)"],"homepage":"https://vega.github.io/vega-lite/","description":"Vega-Lite is a concise high-level language for interactive visualization.","keywords":["vega","chart","visualization"],"main":"build/vega-lite.js","unpkg":"build/vega-lite.min.js","jsdelivr":"build/vega-lite.min.js","module":"build/src/index","types":"build/src/index.d.ts","bin":{"vl2pdf":"./bin/vl2pdf","vl2png":"./bin/vl2png","vl2svg":"./bin/vl2svg","vl2vg":"./bin/vl2vg"},"files":["bin","build","src","vega-lite*","tsconfig.json"],"scripts":{"changelog":"conventional-changelog -p angular -r 2","prebuild":"yarn clean:build","build":"yarn build:only","build:only":"tsc -p tsconfig.build.json && rollup -c","prebuild:examples":"yarn build:only","build:examples":"yarn data && TZ=America/Los_Angeles scripts/build-examples.sh","prebuild:examples-full":"yarn build:only","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"yarn build:jekyll && scripts/generate-toc","build:site":"rollup -c site/rollup.config.mjs","build:jekyll":"pushd site && bundle exec jekyll build -q && popd","build:versions":"scripts/update-version.sh","clean":"yarn clean:build && del-cli \'site/data/*\' \'examples/compiled/*.png\' && find site/examples ! -name \'index.md\' ! -name \'data\' -type f -delete","clean:build":"del-cli \'build/*\' !build/vega-lite-schema.json","data":"rsync -r node_modules/vega-datasets/data/* site/data","build-editor-preview":"scripts/build-editor-preview.sh","schema":"mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/","renameschema":"scripts/rename-schema.sh","presite":"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh","site":"yarn site:only","site:only":"pushd site && bundle exec jekyll serve -I -l && popd","prettierbase":"prettier \'**/*.{md,css,yml}\'","format":"eslint . --fix && yarn prettierbase --write","lint":"eslint . && yarn prettierbase --check","test":"yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime","test:cover":"yarn jest --collectCoverage test/","test:inspect":"node --inspect-brk ./node_modules/.bin/jest --runInBand test","test:runtime":"TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json","test:runtime:generate":"yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime","watch":"tsc -p tsconfig.build.json -w","watch:site":"yarn build:site -w","watch:test":"yarn jest --watch test/","watch:test:runtime":"TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json","release":"release-it"},"repository":{"type":"git","url":"https://github.com/vega/vega-lite.git"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/vega/vega-lite/issues"},"devDependencies":{"@babel/core":"^7.24.9","@babel/preset-env":"^7.25.0","@babel/preset-typescript":"^7.24.7","@release-it/conventional-changelog":"^8.0.1","@rollup/plugin-alias":"^5.1.0","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^26.0.1","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-terser":"^0.4.4","@types/d3":"^7.4.3","@types/jest":"^29.5.12","@types/pako":"^2.0.3","@typescript-eslint/eslint-plugin":"^7.17.0","@typescript-eslint/parser":"^7.17.0","ajv":"^8.17.1","ajv-formats":"^3.0.1","cheerio":"^1.0.0-rc.12","conventional-changelog-cli":"^5.0.0","d3":"^7.9.0","del-cli":"^5.1.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-jest":"^27.9.0","eslint-plugin-prettier":"^5.2.1","fast-json-stable-stringify":"~2.1.0","highlight.js":"^11.10.0","jest":"^29.7.0","jest-dev-server":"^10.0.0","mkdirp":"^3.0.1","pako":"^2.1.0","prettier":"^3.3.3","puppeteer":"^15.0.0","release-it":"17.6.0","rollup":"^4.19.1","rollup-plugin-bundle-size":"^1.0.3","serve":"^14.2.3","terser":"^5.31.3","ts-jest":"^29.2.3","ts-json-schema-generator":"^2.3.0","typescript":"~5.5.4","vega-cli":"^5.28.0","vega-datasets":"^2.8.1","vega-embed":"^6.26.0","vega-tooltip":"^0.34.0","yaml-front-matter":"^4.1.1"},"dependencies":{"json-stringify-pretty-compact":"~3.0.0","tslib":"~2.6.3","vega-event-selector":"~3.0.1","vega-expression":"~5.1.1","vega-util":"~1.17.2","yargs":"~17.7.2"},"peerDependencies":{"vega":"^5.24.0"},"engines":{"node":">=18"},"packageManager":"yarn@1.22.19"}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{collapseAll:()=>A,expandAll:()=>C,load:()=>D,loadDemo:()=>P,loadFetch:()=>O,loadFile:()=>N,proposeOptimizationLine:()=>m,proposeOptimizationRegion:()=>g,toggleDisplay:()=>R,toggleReduced:()=>E,toggleServiceFields:()=>M,vsNavigate:()=>f});var e=n(48287),t=n(47990),i=n(61684),a=n(16213),o=n(77439),s=n(12672),l=n(43270),u=n(54699),c=n(18047),d=n(21806);function f(e,t){try{acquireVsCodeApi().postMessage({command:"jumpToLine",filePath:e,lineNumber:t})}catch{}}window.Buffer=e.Buffer,window.checkApiKey=u.checkApiKey;const p=50;let h={};function g(e,t,n){(0,o.proposeOptimization)(e,t,JSON.parse(decodeURIComponent(n)),{regions:!0})}function m(e,t,n){(0,o.proposeOptimization)(e,t,JSON.parse(decodeURIComponent(n)),{regions:!1})}const y="blue",v="green",b="goldenrod";let w=[];function x(e,t,n,r,i){let a;a=i.functions?"function profile":"line profile",w=[{title:["time",""],color:y,width:0,info:"Execution time (Python + native + system)"}],r&&(w=w.concat([{title:["memory","peak"],color:v,width:0,info:"Peak amount of memory allocated by line / function"},{title:["memory","average"],color:v,width:0,info:"Average amount of memory allocated by line / function"},{title:["memory","timeline"],color:v,width:0,info:"Memory footprint over time"},{title:["memory","activity"],color:v,width:0,info:"% of bytes allocated by line / function over total bytes allocated in file"},{title:["copy",""],color:b,width:0,info:"Rate of copying memory"}])),t&&(w.push({title:[n,"util."],color:b,width:0,info:`% utilization of ${n} by line / function (may be inaccurate if ${n} is not dedicated)`}),w.push({title:[n,"memory"],color:b,width:0,info:`Peak ${n} memory allocated by line / function (may be inaccurate if ${n} is not dedicated)`})),w.push({title:["",""],color:"black",width:100});let o,s="";s+='',s+='';for(const t of w)s+=``,t.info?s+=`${t.title[0]}`:s+=`${t.title[0]}`,s+="  ";o=i.functions?"functionProfile":"lineProfile",s+=`${a}  (click to reset order)`,s+="",s+='';for(const e of w)s+=`${e.title[1]}`;return s+=`${e}`,s+="",s}function E(){const e=document.getElementsByClassName("empty-profile");for(const t of e){const e=t.style;""==e.display?e.display="none":e.display=""}}function S(e,t,n,r,a,o,u,c,d,f){let g=e.n_cpu_percent_python+e.n_cpu_percent_c+e.n_sys_percent,m=0,y=0,v=0;for(let n=e.start_region_line;n=.01),v|=e.n_gpu_percent>=1}f&&(g<1&&e.start_region_line===e.end_region_line&&(f=!1),e.start_region_line!=e.end_region_line&&m<1&&(f=!1));const w=e.n_avg_mb+e.n_peak_mb+e.memory_samples.length+(e.n_usage_fraction>=.01),x=e.n_gpu_percent>=1,E=e.start_region_line,S=e.end_region_line;let _,A;E===S||[[E-1,S]]in h?(_=l.WhiteExplosion,A=!1):(_=l.Explosion,E&&S&&(h[[E-1,S]]=!0,A=!0)),A&=S-E<=p;let C="";if(C+=g>1||w||x||A&&E!=S&&(m>=1||y||v)?"":"",C+=``,C+=``,g?a.push((0,l.makeBar)(e.n_cpu_percent_python,e.n_cpu_percent_c,e.n_sys_percent,{height:20,width:100})):a.push(null),r.memory){if(C+=``,C+=``,e.n_peak_mb?o.push((0,l.makeMemoryBar)(e.n_peak_mb.toFixed(0),"peak memory",parseFloat(e.n_python_fraction),r.max_footprint_mb.toFixed(2),"darkgreen",{height:20,width:100})):o.push(null),C+=``,C+=``,C+="",e.n_avg_mb?o.push((0,l.makeMemoryBar)(e.n_avg_mb.toFixed(0),"average memory",parseFloat(e.n_python_fraction),r.max_footprint_mb.toFixed(2),"darkgreen",{height:20,width:100})):o.push(null),C+="",C+=``,C+="",e.memory_samples.length>0){let n=0;"leaks"in r.files[t]&&e.lineno in r.files[t].leaks&&(n=r.files[t].leaks[e.lineno].velocity_mb_s),u.push((0,l.makeSparkline)(e.memory_samples,1e9*r.elapsed_time_sec,r.max_footprint_mb,n,{height:20,width:75}))}else u.push(null);C+='',e.n_usage_fraction>=.01?(C+=``,c.push((0,l.makeMemoryPie)(100*e.n_usage_fraction*(1-parseFloat(e.n_python_fraction)),100*e.n_usage_fraction*parseFloat(e.n_python_fraction),{width:30}))):c.push(null),C+="",e.n_copy_mb_s<1?C+='':C+=`${e.n_copy_mb_s.toFixed(0)}   `}if(r.gpu)if(e.n_gpu_percent<1?C+='':(C+=``,C+=``,C+="",d.push((0,l.makeGPUPie)(e.n_gpu_percent,r.gpu_device,{height:20,width:30}))),e.n_gpu_peak_memory_mb<1||e.n_gpu_percent<1)C+='';else{let t=e.n_gpu_peak_memory_mb,n="MB";t>=1024&&(t/=1024,n="GB"),C+=`${t.toFixed(0)}${n}  `}const T=g||w||x||S!=E?"":"empty-profile";C+=`${e.lineno} `;const k=f&&A?`${_} `:`${l.WhiteExplosion} `;e.line=(0,s.unescapeUnicode)(e.line);const R=i.Prism.highlight(e.line,i.Prism.languages.python,"python");C+=``;let D=structuredClone(e);if(f&&A){let e=0;for(let n=E;nD.n_peak_mb&&(D.n_peak_mb=i.n_peak_mb,D.n_python_fraction=i.n_python_fraction),D.n_core_utilization+=(i.n_cpu_percent_python+i.n_cpu_percent_c)*i.n_core_utilization}D.n_copy_mb_s=e/r.elapsed_time_sec,C+=`${k}`}else C+=k;const O=f?`${l.Lightning}`:`${l.WhiteLightning}`;return C+=f?`${O}`:O,C+=`
${R}
`,C+="",C}let _=[];function A(){for(const e of _)T(e)}function C(){for(const e of _)k(e)}function T(e){document.getElementById(`profile-${e}`).style.display="none",document.getElementById(`button-${e}`).innerHTML=l.RightTriangle}function k(e){document.getElementById(`profile-${e}`).style.display="block",document.getElementById(`button-${e}`).innerHTML=l.DownTriangle}function R(e){const t=document.getElementById(`profile-${e}`);"block"==t.style.display?(t.style.display="none",document.getElementById(`button-${e}`).innerHTML=l.RightTriangle):(t.style.display="block",document.getElementById(`button-${e}`).innerHTML=l.DownTriangle)}function D(e){(async()=>{await async function(e){h={};let n="";n=window.localStorage.getItem("scalene-api-key"),n&&(document.getElementById("api-key").value=n,(0,u.checkApiKey)(n));let r=window.localStorage.getItem("scalene-service-select");r&&(document.getElementById("service-select").value=r,M());const i=document.getElementById("use-gpu-checkbox")||"";i.checked!=e.gpu&&i.click(),e.gpu&&(document.getElementById("accelerator-name").innerHTML=e.gpu_device),globalThis.profile=e;let o=[],c=[],d=[],f=[],p=[],g=0,m="";m+='',m+='',m+='',m+="",m+='',m+='',e.memory&&(m+='',m+='',m+='"),m+="",m+="",m+='',m+="",e.memory&&(m+='',m+="",m+='',o.push((0,l.makeSparkline)(e.samples,1e9*e.elapsed_time_sec,e.max_footprint_mb,0,{height:20,width:200}))),m+="";let y=0,v=0,b=0,w=0,E=0,A={},C={},T={},k={},R={};for(const t in e.files){A[t]=0,C[t]=0,T[t]=0,k[t]=0,R[t]=0;for(const n in e.files[t].lines){const r=e.files[t].lines[n];A[t]+=r.n_cpu_percent_python,C[t]+=r.n_cpu_percent_c,T[t]+=r.n_sys_percent,r.n_peak_mb>R[t]&&(R[t]=r.n_peak_mb,k[t]+=r.n_peak_mb*r.n_python_fraction),E+=r.n_malloc_mb}y+=A[t],v+=C[t],b+=T[t],w+=k[t]}if(d.push((0,l.makeBar)(y,v,b,{height:20,width:200})),e.memory&&p.push((0,l.makeMemoryBar)(e.max_footprint_mb.toFixed(2),"memory",w/E,e.max_footprint_mb.toFixed(2),"darkgreen",{height:20,width:150})),m+='",m+="
Time: Python | native | system
Memory: Python | native
',m+=`Memory timeline: (max: ${(0,s.memory_consumed_str)(e.max_footprint_mb)}, growth: ${e.growth_rate.toFixed(1)}%)`,m+="
',m+='hover over bars to see breakdowns; click on column headers to sort.',m+="
",m+="
",m+="
","{}"===JSON.stringify(e))return m+='\n
\n
\n\t
\n\t \n\t \n\t
\n
\n
\n ',void(document.getElementById("profile").innerHTML=m);m+='
 show all | hide all',m+=' | only display profiled lines 
',m+='
';let D=Object.entries(e.files);D.sort(((e,t)=>t[1].percent_cpu_time-e[1].percent_cpu_time));let O=0;_=[];let N=new Set;for(const t of D){if(O++,t[1].percent_cpu_time<1&&R[t[0]]<.01*E){N.add(t);continue}const n=`file-${O}`;_.push(n),m+='

';let r="display:block;",i=l.DownTriangle;1!==O&&(r="display:none;",i=l.RightTriangle),m+=` `,d.push((0,l.makeBar)(A[t[0]],C[t[0]],T[t[0]],{height:20,width:100})),e.memory&&(m+=``,p.push((0,l.makeMemoryBar)(R[t[0]],"peak memory",k[t[0]]/R[t[0]],e.max_footprint_mb.toFixed(2),"darkgreen",{height:20,width:100}))),m+=`% of time = ${t[1].percent_cpu_time.toFixed(1).padWithNonBreakingSpaces(5)}% (${(0,s.time_consumed_str)(t[1].percent_cpu_time/100*e.elapsed_time_sec*1e3).padWithNonBreakingSpaces(8)} / ${(0,s.time_consumed_str)(1e3*e.elapsed_time_sec).padWithNonBreakingSpaces(8)})
`,m+=``,m+=`${i}`,m+="",m+=` ${t[0]}`,m+="

",m+=`
`,m+=``,g++,m+=x(t[0],e.gpu,e.gpu_device,e.memory,{functions:!1}),m+="";let a=-1;for(const n in t[1].lines){const r=t[1].lines[n];a=r.lineno,m+=S(r,t[0],O,e,d,p,o,c,f,!0)}if(m+="",m+="
",e.files[t[0]].functions.length){m+=``,m+=x(t[0],e.gpu,e.gpu_device,e.memory,{functions:!0}),m+="",g++;for(const n in e.files[t[0]].functions)m+=S(e.files[t[0]].functions[n],t[0],O,e,d,p,o,c,f,!1);m+="
"}m+="
",O")}D=D.filter((e=>!N.has(e))),m+="
",document.getElementById("profile").innerHTML=m;for(const e of D){const t=document.getElementsByClassName(`F${escape(e[0])}-nonline`);for(let n=0;n{const t=document.getElementsByClassName(`F${escape(e[0])}-blankline`);for(let e=0;e{const t=document.getElementsByClassName(`F${escape(e[0])}-blankline`);for(let e=0;e{e&&(async()=>{await(0,t.default)(`#${n}${r}`,e,{actions:!1})})()}))}o.forEach(((e,n)=>{e&&(async()=>{await(0,t.default)(`#memory_sparkline${n}`,e,{actions:!1,renderer:"svg"})})()})),F(d,"cpu_bar"),F(f,"gpu_pie"),F(c,"memory_activity"),F(p,"memory_bar"),function(){const e=document.getElementsByClassName("empty-profile");for(const t of e)t.style.display="none"}(),e.program?document.title="Scalene - "+e.program:document.title="Scalene"}(e)})()}function O(){(async()=>{let e=await fetch("profile.json");D(await e.json())})()}function N(){const e=document.getElementById("fileinput").files[0],t=new FileReader;t.onload=F,t.readAsText(e)}function F(e){let t=e.target.result;D(JSON.parse(t))}function P(){D(example_profile)}function M(){let e=document.getElementById("service-select").value;window.localStorage.setItem("scalene-service-select",e),document.getElementById("openai-fields").style.display="openai"===e?"block":"none",document.getElementById("amazon-fields").style.display="amazon"===e?"block":"none",document.getElementById("local-fields").style.display="local"===e?"block":"none",document.getElementById("azure-openai-fields").style.display="azure-openai"===e?"block":"none"}function I(){document.getElementById("install-models-message").style.display="block",document.getElementById("local-models-list").style.display="none"}String.prototype.padWithNonBreakingSpaces=function(e){let t="",n=6*this.length;for(e*=6;n{const t=function(e){const t=document.createElement("select");return t.style.fontSize="0.8rem",t.id="language-model-local",t.classList.add("persistent"),t.name="language-model-local-label",e.forEach((e=>{const n=document.createElement("option");n.value=e,n.textContent=e,n.id=e,t.appendChild(n)})),t}(e),n=document.getElementById("language-local-models");n?(n.innerHTML="",n.appendChild(t)):console.error('Div with ID "language-local-models" not found.')}))}(),document.addEventListener("DOMContentLoaded",(()=>{(0,d.processPersistentElements)()})),(0,d.observeDOM)(),window.addEventListener("load",(()=>{D(profile)})),setInterval((function(){let e=new XMLHttpRequest;e.open("GET","/heartbeat",!0),e.send()}),1e4)})();var i=window;for(var a in r)i[a]=r[a];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})(); \ No newline at end of file +(()=>{var e={90217:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sendPromptToAmazon:()=>i});var r=n(6995);async function i(e){const t=document.getElementById("aws-access-key").value||localStorage.getItem("aws-access-key"),n=document.getElementById("aws-secret-key").value||localStorage.getItem("aws-secret-key"),i=document.getElementById("aws-region").value||localStorage.getItem("aws-region")||"us-east-1",a={accessKeyId:t,secretAccessKey:n},o=new r.BedrockRuntimeClient({region:i,credentials:a}),s={modelId:"us.anthropic.claude-3-5-sonnet-20241022-v2:0",body:JSON.stringify({anthropic_version:"bedrock-2023-05-31",max_tokens:65536,messages:[{role:"user",content:[{type:"text",text:e}]}]})};try{const e=new r.InvokeModelCommand(s),t=await o.send(e),n=new Blob([t.body]),i=await n.text(),a=JSON.parse(i);return a.content[0].text.trim()}catch(e){return console.error(e),`# Error: ${e.message}`}}},26026:(e,t,n)=>{"use strict";async function r(e,t,n,r){const i=`${n}/openai/deployments/${r}/chat/completions?api-version=${document.getElementById("azure-api-model-version").value}`,a=JSON.stringify({messages:[{role:"system",content:"You are a Python programming assistant who ONLY responds with blocks of commented, optimized code. You never respond with text. Just code, starting with ``` and ending with ```."},{role:"user",content:e}],user:"scalene-user"});console.log(a);const o=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","api-key":t},body:a}),s=await o.json();if(s.error&&s.error.code in{invalid_request_error:!0,model_not_found:!0,insufficient_quota:!0})return"";try{console.log(`Debugging info: Retrieved ${JSON.stringify(s.choices[0],null,4)}`)}catch{console.log(`Debugging info: Failed to retrieve data.choices from the server. data = ${JSON.stringify(s)}`)}try{return s.choices[0].message.content.replace(/^\s*[\r\n]/gm,"")}catch{return"# Query failed. See JavaScript console (in Chrome: View > Developer > JavaScript Console) for more info.\n"}}n.r(t),n.d(t,{sendPromptToAzureOpenAI:()=>r})},43270:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DownTriangle:()=>u,Explosion:()=>a,Lightning:()=>i,RightTriangle:()=>l,WhiteExplosion:()=>s,WhiteLightning:()=>o,makeBar:()=>d,makeGPUBar:()=>p,makeGPUPie:()=>f,makeMemoryBar:()=>g,makeMemoryPie:()=>h,makeSparkline:()=>m});var r=n(12672);const i="⚡",a="💥",o=`${i}`,s=`${a}`,l="►",u="▼";function c(e,t){let n=t/100*globalThis.profile.elapsed_time_sec;return`(${e}) `+t.toFixed(1)+"% ["+(0,r.time_consumed_str)(1e3*n)+"]"}function d(e,t,n,r){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{view:{stroke:"transparent"}},autosize:{contains:"padding"},width:r.width,height:r.height,padding:0,data:{values:[{x:0,y:e.toFixed(1),c:c("Python",e),d:e>=20?e.toFixed(0)+"%":e>=10?e.toFixed(0):"",q:e/2},{x:0,y:t.toFixed(1),c:c("native",t),d:t>=20?t.toFixed(0)+"%":t>=10?t.toFixed(0):"",q:e+t/2},{x:0,y:n.toFixed(1),c:c("system",n),d:n>=20?n.toFixed(0)+"%":n>=10?n.toFixed(0):"",q:e+t+n/2}]},layer:[{mark:{type:"bar"},encoding:{x:{aggregate:"sum",field:"y",axis:!1,stack:"zero",scale:{domain:[0,100]}},color:{field:"c",type:"nominal",legend:!1,scale:{range:["darkblue","#6495ED","blue"]}},tooltip:[{field:"c",type:"nominal",title:"time"}]}},{mark:{type:"text",align:"center",baseline:"middle",dx:0},encoding:{x:{aggregate:"sum",field:"q",axis:!1},text:{field:"d"},color:{value:"white"},tooltip:[{field:"c",type:"nominal",title:"time"}]}}]}}function f(e,t,n){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{view:{stroke:"transparent"}},autosize:{contains:"padding"},width:n.width,height:n.height,padding:0,data:{values:[{category:1,value:e.toFixed(1),c:"in use: "+e.toFixed(1)+"%"}]},mark:"arc",encoding:{theta:{field:"value",type:"quantitative",scale:{domain:[0,100]}},color:{field:"c",type:"nominal",legend:!1,scale:{range:["goldenrod","#f4e6c2"]}},tooltip:[{field:"c",type:"nominal",title:t}]}}}function p(e,t,n){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{view:{stroke:"transparent"}},autosize:{contains:"padding"},width:n.width,height:n.height,padding:0,data:{values:[{x:0,y:e.toFixed(0),q:(e/2).toFixed(0),d:e>=20?e.toFixed(0)+"%":"",dd:"in use: "+e.toFixed(0)+"%"}]},layer:[{mark:{type:"bar"},encoding:{x:{aggregate:"sum",field:"y",axis:!1,scale:{domain:[0,100]}},color:{field:"dd",type:"nominal",legend:!1,scale:{range:["goldenrod","#f4e6c2"]}},tooltip:[{field:"dd",type:"nominal",title:t+":"}]}},{mark:{type:"text",align:"center",baseline:"middle",dx:0},encoding:{x:{aggregate:"sum",field:"q",axis:!1},text:{field:"d"},color:{value:"white"},tooltip:[{field:"dd",type:"nominal",title:t+":"}]}}]}}function h(e,t,n){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",width:n.width,height:20,padding:0,data:{values:[{category:1,value:e.toFixed(1),c:"native: "+e.toFixed(1)+"%"},{category:2,value:t.toFixed(1),c:"Python: "+t.toFixed(1)+"%"}]},mark:"arc",encoding:{theta:{field:"value",type:"quantitative",scale:{domain:[0,100]}},color:{field:"c",type:"nominal",legend:!1,scale:{range:["darkgreen","#50C878"]}},tooltip:[{field:"c",type:"nominal",title:"memory"}]}}}function g(e,t,n,i,a,o){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{view:{stroke:"transparent"}},autosize:{contains:"padding"},width:o.width,height:o.height,padding:0,data:{values:[{x:0,y:n*e,c:"(Python) "+(0,r.memory_consumed_str)(n*e),d:n*e>.2*i?(0,r.memory_consumed_str)(n*e):"",q:n*e/2},{x:0,y:(1-n)*e,c:"(native) "+(0,r.memory_consumed_str)((1-n)*e),d:(1-n)*e>.2*i?(0,r.memory_consumed_str)((1-n)*e):"",q:n*e+(1-n)*e/2}]},layer:[{mark:{type:"bar"},encoding:{x:{aggregate:"sum",field:"y",axis:!1,scale:{domain:[0,i]}},color:{field:"c",type:"nominal",legend:!1,scale:{range:[a,"#50C878","green"]}}}},{mark:{type:"text",align:"center",baseline:"middle",dx:0},encoding:{x:{aggregate:"sum",field:"q",axis:!1},text:{field:"d"},color:{value:"white"}}}]}}function m(e,t,n,i=0,a){const o=e.map((e=>{let t="";return 0!=i&&(t=`; possible leak (${(0,r.memory_consumed_str)(i)}/s)`),{x:e[0],y:e[1],y_text:(0,r.memory_consumed_str)(e[1])+" (@ "+(0,r.time_consumed_str)(e[0]/1e6)+")"+t}}));let s="";return 0!=i&&(s="possible leak",a.height-=10),{$schema:"https://vega.github.io/schema/vega-lite/v5.json",data:{values:o},width:a.width,height:a.height,padding:0,title:{text:s,baseline:"line-bottom",color:"red",offset:0,lineHeight:10,orient:"bottom",fontStyle:"italic"},encoding:{x:{field:"x",type:"quantitative",title:"",axis:{tickCount:10,tickSize:0,labelExpr:""},scale:{domain:[0,t]}}},layer:[{encoding:{y:{field:"y",type:"quantitative",axis:null,scale:{domain:[0,n]}},color:{field:"c",type:"nominal",legend:null,scale:{range:["darkgreen"]}}},layer:[{mark:"line"},{transform:[{filter:{param:"hover",empty:!1}}],mark:"point"}]},{mark:"rule",encoding:{opacity:{condition:{value:.3,param:"hover",empty:!1},value:0},tooltip:[{field:"y_text",type:"nominal",title:"memory"}]},params:[{name:"hover",select:{type:"point",fields:["y"],nearest:!0,on:"mousemove"}}]}]}}},9779:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AwsCrc32:()=>o});var r=n(31635),i=n(45193),a=n(60442),o=function(){function e(){this.crc32=new a.Crc32}return e.prototype.update=function(e){(0,i.isEmptyData)(e)||this.crc32.update((0,i.convertToBuffer)(e))},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,(0,i.numToUint8)(this.crc32.digest())]}))}))},e.prototype.reset=function(){this.crc32=new a.Crc32},e}()},60442:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AwsCrc32:()=>a.AwsCrc32,Crc32:()=>s,crc32:()=>o});var r=n(31635),i=n(45193),a=n(9779);function o(e){return(new s).update(e).digest()}var s=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var i=(0,r.__values)(e),a=i.next();!a.done;a=i.next()){var o=a.value;this.checksum=this.checksum>>>8^l[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),l=(0,i.uint32ArrayFrom)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117])},81713:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EMPTY_DATA_SHA_256:()=>a,SHA_256_HASH:()=>r,SHA_256_HMAC_ALGO:()=>i});var r={name:"SHA-256"},i={name:"HMAC",hash:r},a=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},97963:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sha256:()=>l});var r=n(36171),i=n(20928),a=n(81566),o=n(77226),s=n(45193),l=function(){function e(e){(0,a.supportsWebCrypto)((0,o.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update((0,s.convertToBuffer)(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}()},25147:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sha256:()=>r.Sha256,WebCryptoSha256:()=>i.Sha256});var r=n(97963),i=n(36171)},36171:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sha256:()=>o});var r=n(45193),i=n(81713),a=n(77226),o=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,a.locateWindow)().crypto.subtle.sign(i.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(i.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,a.locateWindow)().crypto.subtle.digest(i.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,n){(0,a.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e.secret),i.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}()},91025:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RawSha256:()=>i});var r=n(16661),i=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var i=this.bufferLength;i>>24&255,a[4*i+1]=this.state[i]>>>16&255,a[4*i+2]=this.state[i]>>>8&255,a[4*i+3]=this.state[i]>>>0&255;return a},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=0;d>>17|f<<15)^(f>>>19|f<<13)^f>>>10,h=((f=this.temp[d-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(h+this.temp[d-16]|0)}var g=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&l^~s&u)|0)+(c+(r.KEY[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&a^i&a)|0;c=u,u=l,l=s,s=o+g|0,o=a,a=i,i=n,n=g+m|0}t[0]+=n,t[1]+=i,t[2]+=a,t[3]+=o,t[4]+=s,t[5]+=l,t[6]+=u,t[7]+=c},e}()},16661:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BLOCK_SIZE:()=>r,DIGEST_LENGTH:()=>i,INIT:()=>o,KEY:()=>a,MAX_HASHABLE_LENGTH:()=>s});var r=64,i=32,a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),o=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],s=Math.pow(2,53)-1},20928:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sha256:()=>r.Sha256});var r=n(92342)},92342:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sha256:()=>s});var r=n(31635),i=n(16661),a=n(91025),o=n(45193),s=function(){function e(e){this.secret=e,this.hash=new a.RawSha256,this.reset()}return e.prototype.update=function(e){if(!(0,o.isEmptyData)(e)&&!this.error)try{this.hash.update((0,o.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new a.RawSha256,this.secret){this.outer=new a.RawSha256;var e=function(e){var t=(0,o.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var n=new a.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(i.BLOCK_SIZE);return r.set(t),r}(this.secret),t=new Uint8Array(i.BLOCK_SIZE);t.set(e);for(var n=0;n{"use strict";n.r(t),n.d(t,{supportsSecureRandom:()=>r.supportsSecureRandom,supportsSubtleCrypto:()=>r.supportsSubtleCrypto,supportsWebCrypto:()=>r.supportsWebCrypto,supportsZeroByteGCM:()=>r.supportsZeroByteGCM});var r=n(74573)},74573:(e,t,n)=>{"use strict";n.r(t),n.d(t,{supportsSecureRandom:()=>o,supportsSubtleCrypto:()=>s,supportsWebCrypto:()=>a,supportsZeroByteGCM:()=>l});var r=n(31635),i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function a(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&s(e.crypto.subtle)}function o(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function s(e){return e&&i.every((function(t){return"function"==typeof e[t]}))}function l(e){return(0,r.__awaiter)(this,void 0,void 0,(function(){var t;return(0,r.__generator)(this,(function(n){switch(n.label){case 0:if(!s(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},24773:(e,t,n)=>{"use strict";n.r(t),n.d(t,{convertToBuffer:()=>a});var r=n(15424),i="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:r.fromUtf8;function a(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},45193:(e,t,n)=>{"use strict";n.r(t),n.d(t,{convertToBuffer:()=>r.convertToBuffer,isEmptyData:()=>i.isEmptyData,numToUint8:()=>a.numToUint8,uint32ArrayFrom:()=>o.uint32ArrayFrom});var r=n(24773),i=n(72384),a=n(49470),o=n(34635)},72384:(e,t,n)=>{"use strict";function r(e){return"string"==typeof e?0===e.length:0===e.byteLength}n.r(t),n.d(t,{isEmptyData:()=>r})},49470:(e,t,n)=>{"use strict";function r(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}n.r(t),n.d(t,{numToUint8:()=>r})},34635:(e,t,n)=>{"use strict";function r(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;nr})},46499:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromUtf8:()=>r});const r=e=>(new TextEncoder).encode(e)},15424:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromUtf8:()=>r.fromUtf8,toUint8Array:()=>i.toUint8Array,toUtf8:()=>a.toUtf8});var r=n(46499),i=n(32498),a=n(2358)},32498:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toUint8Array:()=>i});var r=n(46499);const i=e=>"string"==typeof e?(0,r.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)},2358:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toUtf8:()=>r});const r=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)}},2169:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BedrockRuntime:()=>h});var r=n(31796),i=n(52046),a=n(87216),o=n(32804),s=n(43340),l=n(98291),u=n(24266),c=n(31755),d=n(67224),f=n(72343);const p={ApplyGuardrailCommand:a.ApplyGuardrailCommand,ConverseCommand:o.ConverseCommand,ConverseStreamCommand:s.ConverseStreamCommand,GetAsyncInvokeCommand:l.GetAsyncInvokeCommand,InvokeModelCommand:u.InvokeModelCommand,InvokeModelWithResponseStreamCommand:c.InvokeModelWithResponseStreamCommand,ListAsyncInvokesCommand:d.ListAsyncInvokesCommand,StartAsyncInvokeCommand:f.StartAsyncInvokeCommand};class h extends i.BedrockRuntimeClient{}(0,r.createAggregatedClient)(p,h)},52046:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BedrockRuntimeClient:()=>v,__Client:()=>p.Client});var r=n(81095),i=n(50165),a=n(48377),o=n(44130),s=n(61329),l=n(40033),u=n(78504),c=n(70649),d=n(72540),f=n(41069),p=n(31796),h=n(19772),g=n(60756),m=n(47411),y=n(52793);class v extends p.Client{config;constructor(...[e]){const t=(0,m.getRuntimeConfig)(e||{}),n=(0,g.resolveClientEndpointParameters)(t),p=(0,o.resolveUserAgentConfig)(n),v=(0,f.resolveRetryConfig)(p),b=(0,s.resolveRegionConfig)(v),x=(0,r.resolveHostHeaderConfig)(b),E=(0,d.resolveEndpointConfig)(x),S=(0,u.resolveEventStreamSerdeConfig)(E),w=(0,h.resolveHttpAuthSchemeConfig)(S),_=(0,y.resolveRuntimeExtensions)(w,e?.extensions||[]);super(_),this.config=_,this.middlewareStack.use((0,o.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,f.getRetryPlugin)(this.config)),this.middlewareStack.use((0,c.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,r.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,i.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,a.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,l.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:h.defaultBedrockRuntimeHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new l.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,l.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}}},21167:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpAuthExtensionConfiguration:()=>r,resolveHttpAuthRuntimeConfig:()=>i});const r=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}},i=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})},19772:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultBedrockRuntimeHttpAuthSchemeParametersProvider:()=>a,defaultBedrockRuntimeHttpAuthSchemeProvider:()=>o,resolveHttpAuthSchemeConfig:()=>s});var r=n(44445),i=n(40805);const a=async(e,t,n)=>({operation:(0,i.getSmithyContext)(t).operation,region:await(0,i.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const o=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},s=e=>({...(0,r.resolveAwsSdkSigV4Config)(e)})},87216:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,ApplyGuardrailCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","ApplyGuardrail",{}).n("BedrockRuntimeClient","ApplyGuardrailCommand").f(s.ApplyGuardrailRequestFilterSensitiveLog,void 0).ser(l.se_ApplyGuardrailCommand).de(l.de_ApplyGuardrailCommand).build()){}},32804:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,ConverseCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","Converse",{}).n("BedrockRuntimeClient","ConverseCommand").f(s.ConverseRequestFilterSensitiveLog,s.ConverseResponseFilterSensitiveLog).ser(l.se_ConverseCommand).de(l.de_ConverseCommand).build()){}},43340:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,ConverseStreamCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","ConverseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","ConverseStreamCommand").f(s.ConverseStreamRequestFilterSensitiveLog,s.ConverseStreamResponseFilterSensitiveLog).ser(l.se_ConverseStreamCommand).de(l.de_ConverseStreamCommand).build()){}},98291:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,GetAsyncInvokeCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","GetAsyncInvoke",{}).n("BedrockRuntimeClient","GetAsyncInvokeCommand").f(void 0,s.GetAsyncInvokeResponseFilterSensitiveLog).ser(l.se_GetAsyncInvokeCommand).de(l.de_GetAsyncInvokeCommand).build()){}},24266:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,InvokeModelCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(s.InvokeModelRequestFilterSensitiveLog,s.InvokeModelResponseFilterSensitiveLog).ser(l.se_InvokeModelCommand).de(l.de_InvokeModelCommand).build()){}},31755:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,InvokeModelWithResponseStreamCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(s.InvokeModelWithResponseStreamRequestFilterSensitiveLog,s.InvokeModelWithResponseStreamResponseFilterSensitiveLog).ser(l.se_InvokeModelWithResponseStreamCommand).de(l.de_InvokeModelWithResponseStreamCommand).build()){}},67224:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,ListAsyncInvokesCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","ListAsyncInvokes",{}).n("BedrockRuntimeClient","ListAsyncInvokesCommand").f(void 0,s.ListAsyncInvokesResponseFilterSensitiveLog).ser(l.se_ListAsyncInvokesCommand).de(l.de_ListAsyncInvokesCommand).build()){}},72343:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.Command,StartAsyncInvokeCommand:()=>u});var r=n(72540),i=n(32754),a=n(31796),o=n(60756),s=n(285),l=n(43712);class u extends(a.Command.classBuilder().ep(o.commonParams).m((function(e,t,n,a){return[(0,i.getSerdePlugin)(n,this.serialize,this.deserialize),(0,r.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","StartAsyncInvoke",{}).n("BedrockRuntimeClient","StartAsyncInvokeCommand").f(s.StartAsyncInvokeRequestFilterSensitiveLog,void 0).ser(l.se_StartAsyncInvokeCommand).de(l.de_StartAsyncInvokeCommand).build()){}},51322:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>r.$Command,ApplyGuardrailCommand:()=>r.ApplyGuardrailCommand,ConverseCommand:()=>i.ConverseCommand,ConverseStreamCommand:()=>a.ConverseStreamCommand,GetAsyncInvokeCommand:()=>o.GetAsyncInvokeCommand,InvokeModelCommand:()=>s.InvokeModelCommand,InvokeModelWithResponseStreamCommand:()=>l.InvokeModelWithResponseStreamCommand,ListAsyncInvokesCommand:()=>u.ListAsyncInvokesCommand,StartAsyncInvokeCommand:()=>c.StartAsyncInvokeCommand});var r=n(87216),i=n(32804),a=n(43340),o=n(98291),s=n(24266),l=n(31755),u=n(67224),c=n(72343)},60756:(e,t,n)=>{"use strict";n.r(t),n.d(t,{commonParams:()=>i,resolveClientEndpointParameters:()=>r});const r=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}),i={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}},87010:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultEndpointResolver:()=>s});var r=n(95417),i=n(7069),a=n(66603);const o=new i.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),s=(e,t={})=>o.get(e,(()=>(0,i.resolveEndpoint)(a.ruleSet,{endpointParams:e,logger:t.logger})));i.customEndpointFunctions.aws=r.awsEndpointFunctions},66603:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ruleSet:()=>A});const r="required",i="fn",a="argv",o="ref",s=!0,l="isSet",u="booleanEquals",c="error",d="endpoint",f="tree",p="PartitionResult",h={[r]:!1,type:"String"},g={[r]:!0,default:!1,type:"Boolean"},m={[o]:"Endpoint"},y={[i]:u,[a]:[{[o]:"UseFIPS"},!0]},v={[i]:u,[a]:[{[o]:"UseDualStack"},!0]},b={},x={[i]:"getAttr",[a]:[{[o]:p},"supportsFIPS"]},E={[i]:u,[a]:[!0,{[i]:"getAttr",[a]:[{[o]:p},"supportsDualStack"]}]},S=[y],w=[v],_=[{[o]:"Region"}],A={version:"1.0",parameters:{Region:h,UseDualStack:g,UseFIPS:g,Endpoint:h},rules:[{conditions:[{[i]:l,[a]:[m]}],rules:[{conditions:S,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{rules:[{conditions:w,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:m,properties:b,headers:b},type:d}],type:f}],type:f},{rules:[{conditions:[{[i]:l,[a]:_}],rules:[{conditions:[{[i]:"aws.partition",[a]:_,assign:p}],rules:[{conditions:[y,v],rules:[{conditions:[{[i]:u,[a]:[s,x]},E],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b,headers:b},type:d}],type:f}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}],type:f},{conditions:S,rules:[{conditions:[{[i]:u,[a]:[x,s]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:b,headers:b},type:d}],type:f}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:c}],type:f},{conditions:w,rules:[{conditions:[E],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b,headers:b},type:d}],type:f}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:c}],type:f},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:b,headers:b},type:d}],type:f}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:c}],type:f}]}},6995:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>a.$Command,AccessDeniedException:()=>s.AccessDeniedException,ApplyGuardrailCommand:()=>a.ApplyGuardrailCommand,ApplyGuardrailRequestFilterSensitiveLog:()=>s.ApplyGuardrailRequestFilterSensitiveLog,AsyncInvokeOutputDataConfig:()=>s.AsyncInvokeOutputDataConfig,AsyncInvokeStatus:()=>s.AsyncInvokeStatus,AsyncInvokeSummaryFilterSensitiveLog:()=>s.AsyncInvokeSummaryFilterSensitiveLog,BedrockRuntime:()=>i.BedrockRuntime,BedrockRuntimeClient:()=>r.BedrockRuntimeClient,BedrockRuntimeServiceException:()=>l.BedrockRuntimeServiceException,ConflictException:()=>s.ConflictException,ContentBlock:()=>s.ContentBlock,ContentBlockDelta:()=>s.ContentBlockDelta,ContentBlockFilterSensitiveLog:()=>s.ContentBlockFilterSensitiveLog,ContentBlockStart:()=>s.ContentBlockStart,ConversationRole:()=>s.ConversationRole,ConverseCommand:()=>a.ConverseCommand,ConverseOutput:()=>s.ConverseOutput,ConverseOutputFilterSensitiveLog:()=>s.ConverseOutputFilterSensitiveLog,ConverseRequestFilterSensitiveLog:()=>s.ConverseRequestFilterSensitiveLog,ConverseResponseFilterSensitiveLog:()=>s.ConverseResponseFilterSensitiveLog,ConverseStreamCommand:()=>a.ConverseStreamCommand,ConverseStreamOutput:()=>s.ConverseStreamOutput,ConverseStreamOutputFilterSensitiveLog:()=>s.ConverseStreamOutputFilterSensitiveLog,ConverseStreamRequestFilterSensitiveLog:()=>s.ConverseStreamRequestFilterSensitiveLog,ConverseStreamResponseFilterSensitiveLog:()=>s.ConverseStreamResponseFilterSensitiveLog,DocumentFormat:()=>s.DocumentFormat,DocumentSource:()=>s.DocumentSource,GetAsyncInvokeCommand:()=>a.GetAsyncInvokeCommand,GetAsyncInvokeResponseFilterSensitiveLog:()=>s.GetAsyncInvokeResponseFilterSensitiveLog,GuardrailAction:()=>s.GuardrailAction,GuardrailContentBlock:()=>s.GuardrailContentBlock,GuardrailContentBlockFilterSensitiveLog:()=>s.GuardrailContentBlockFilterSensitiveLog,GuardrailContentFilterConfidence:()=>s.GuardrailContentFilterConfidence,GuardrailContentFilterStrength:()=>s.GuardrailContentFilterStrength,GuardrailContentFilterType:()=>s.GuardrailContentFilterType,GuardrailContentPolicyAction:()=>s.GuardrailContentPolicyAction,GuardrailContentQualifier:()=>s.GuardrailContentQualifier,GuardrailContentSource:()=>s.GuardrailContentSource,GuardrailContextualGroundingFilterType:()=>s.GuardrailContextualGroundingFilterType,GuardrailContextualGroundingPolicyAction:()=>s.GuardrailContextualGroundingPolicyAction,GuardrailConverseContentBlock:()=>s.GuardrailConverseContentBlock,GuardrailConverseContentBlockFilterSensitiveLog:()=>s.GuardrailConverseContentBlockFilterSensitiveLog,GuardrailConverseContentQualifier:()=>s.GuardrailConverseContentQualifier,GuardrailConverseImageBlockFilterSensitiveLog:()=>s.GuardrailConverseImageBlockFilterSensitiveLog,GuardrailConverseImageFormat:()=>s.GuardrailConverseImageFormat,GuardrailConverseImageSource:()=>s.GuardrailConverseImageSource,GuardrailConverseImageSourceFilterSensitiveLog:()=>s.GuardrailConverseImageSourceFilterSensitiveLog,GuardrailImageBlockFilterSensitiveLog:()=>s.GuardrailImageBlockFilterSensitiveLog,GuardrailImageFormat:()=>s.GuardrailImageFormat,GuardrailImageSource:()=>s.GuardrailImageSource,GuardrailImageSourceFilterSensitiveLog:()=>s.GuardrailImageSourceFilterSensitiveLog,GuardrailManagedWordType:()=>s.GuardrailManagedWordType,GuardrailPiiEntityType:()=>s.GuardrailPiiEntityType,GuardrailSensitiveInformationPolicyAction:()=>s.GuardrailSensitiveInformationPolicyAction,GuardrailStreamProcessingMode:()=>s.GuardrailStreamProcessingMode,GuardrailTopicPolicyAction:()=>s.GuardrailTopicPolicyAction,GuardrailTopicType:()=>s.GuardrailTopicType,GuardrailTrace:()=>s.GuardrailTrace,GuardrailWordPolicyAction:()=>s.GuardrailWordPolicyAction,ImageFormat:()=>s.ImageFormat,ImageSource:()=>s.ImageSource,InternalServerException:()=>s.InternalServerException,InvokeModelCommand:()=>a.InvokeModelCommand,InvokeModelRequestFilterSensitiveLog:()=>s.InvokeModelRequestFilterSensitiveLog,InvokeModelResponseFilterSensitiveLog:()=>s.InvokeModelResponseFilterSensitiveLog,InvokeModelWithResponseStreamCommand:()=>a.InvokeModelWithResponseStreamCommand,InvokeModelWithResponseStreamRequestFilterSensitiveLog:()=>s.InvokeModelWithResponseStreamRequestFilterSensitiveLog,InvokeModelWithResponseStreamResponseFilterSensitiveLog:()=>s.InvokeModelWithResponseStreamResponseFilterSensitiveLog,ListAsyncInvokesCommand:()=>a.ListAsyncInvokesCommand,ListAsyncInvokesResponseFilterSensitiveLog:()=>s.ListAsyncInvokesResponseFilterSensitiveLog,MessageFilterSensitiveLog:()=>s.MessageFilterSensitiveLog,ModelErrorException:()=>s.ModelErrorException,ModelNotReadyException:()=>s.ModelNotReadyException,ModelStreamErrorException:()=>s.ModelStreamErrorException,ModelTimeoutException:()=>s.ModelTimeoutException,PayloadPartFilterSensitiveLog:()=>s.PayloadPartFilterSensitiveLog,PerformanceConfigLatency:()=>s.PerformanceConfigLatency,PromptVariableValues:()=>s.PromptVariableValues,ResourceNotFoundException:()=>s.ResourceNotFoundException,ResponseStream:()=>s.ResponseStream,ResponseStreamFilterSensitiveLog:()=>s.ResponseStreamFilterSensitiveLog,ServiceQuotaExceededException:()=>s.ServiceQuotaExceededException,ServiceUnavailableException:()=>s.ServiceUnavailableException,SortAsyncInvocationBy:()=>s.SortAsyncInvocationBy,SortOrder:()=>s.SortOrder,StartAsyncInvokeCommand:()=>a.StartAsyncInvokeCommand,StartAsyncInvokeRequestFilterSensitiveLog:()=>s.StartAsyncInvokeRequestFilterSensitiveLog,StopReason:()=>s.StopReason,SystemContentBlock:()=>s.SystemContentBlock,SystemContentBlockFilterSensitiveLog:()=>s.SystemContentBlockFilterSensitiveLog,ThrottlingException:()=>s.ThrottlingException,Tool:()=>s.Tool,ToolChoice:()=>s.ToolChoice,ToolInputSchema:()=>s.ToolInputSchema,ToolResultContentBlock:()=>s.ToolResultContentBlock,ToolResultStatus:()=>s.ToolResultStatus,Trace:()=>s.Trace,ValidationException:()=>s.ValidationException,VideoFormat:()=>s.VideoFormat,VideoSource:()=>s.VideoSource,__Client:()=>r.__Client,paginateListAsyncInvokes:()=>o.paginateListAsyncInvokes});var r=n(52046),i=n(2169),a=n(51322),o=n(69976),s=n(66926),l=n(37474)},37474:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BedrockRuntimeServiceException:()=>i,__ServiceException:()=>r.ServiceException});var r=n(31796);class i extends r.ServiceException{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}}},66926:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AccessDeniedException:()=>r.AccessDeniedException,ApplyGuardrailRequestFilterSensitiveLog:()=>r.ApplyGuardrailRequestFilterSensitiveLog,AsyncInvokeOutputDataConfig:()=>r.AsyncInvokeOutputDataConfig,AsyncInvokeStatus:()=>r.AsyncInvokeStatus,AsyncInvokeSummaryFilterSensitiveLog:()=>r.AsyncInvokeSummaryFilterSensitiveLog,ConflictException:()=>r.ConflictException,ContentBlock:()=>r.ContentBlock,ContentBlockDelta:()=>r.ContentBlockDelta,ContentBlockFilterSensitiveLog:()=>r.ContentBlockFilterSensitiveLog,ContentBlockStart:()=>r.ContentBlockStart,ConversationRole:()=>r.ConversationRole,ConverseOutput:()=>r.ConverseOutput,ConverseOutputFilterSensitiveLog:()=>r.ConverseOutputFilterSensitiveLog,ConverseRequestFilterSensitiveLog:()=>r.ConverseRequestFilterSensitiveLog,ConverseResponseFilterSensitiveLog:()=>r.ConverseResponseFilterSensitiveLog,ConverseStreamOutput:()=>r.ConverseStreamOutput,ConverseStreamOutputFilterSensitiveLog:()=>r.ConverseStreamOutputFilterSensitiveLog,ConverseStreamRequestFilterSensitiveLog:()=>r.ConverseStreamRequestFilterSensitiveLog,ConverseStreamResponseFilterSensitiveLog:()=>r.ConverseStreamResponseFilterSensitiveLog,DocumentFormat:()=>r.DocumentFormat,DocumentSource:()=>r.DocumentSource,GetAsyncInvokeResponseFilterSensitiveLog:()=>r.GetAsyncInvokeResponseFilterSensitiveLog,GuardrailAction:()=>r.GuardrailAction,GuardrailContentBlock:()=>r.GuardrailContentBlock,GuardrailContentBlockFilterSensitiveLog:()=>r.GuardrailContentBlockFilterSensitiveLog,GuardrailContentFilterConfidence:()=>r.GuardrailContentFilterConfidence,GuardrailContentFilterStrength:()=>r.GuardrailContentFilterStrength,GuardrailContentFilterType:()=>r.GuardrailContentFilterType,GuardrailContentPolicyAction:()=>r.GuardrailContentPolicyAction,GuardrailContentQualifier:()=>r.GuardrailContentQualifier,GuardrailContentSource:()=>r.GuardrailContentSource,GuardrailContextualGroundingFilterType:()=>r.GuardrailContextualGroundingFilterType,GuardrailContextualGroundingPolicyAction:()=>r.GuardrailContextualGroundingPolicyAction,GuardrailConverseContentBlock:()=>r.GuardrailConverseContentBlock,GuardrailConverseContentBlockFilterSensitiveLog:()=>r.GuardrailConverseContentBlockFilterSensitiveLog,GuardrailConverseContentQualifier:()=>r.GuardrailConverseContentQualifier,GuardrailConverseImageBlockFilterSensitiveLog:()=>r.GuardrailConverseImageBlockFilterSensitiveLog,GuardrailConverseImageFormat:()=>r.GuardrailConverseImageFormat,GuardrailConverseImageSource:()=>r.GuardrailConverseImageSource,GuardrailConverseImageSourceFilterSensitiveLog:()=>r.GuardrailConverseImageSourceFilterSensitiveLog,GuardrailImageBlockFilterSensitiveLog:()=>r.GuardrailImageBlockFilterSensitiveLog,GuardrailImageFormat:()=>r.GuardrailImageFormat,GuardrailImageSource:()=>r.GuardrailImageSource,GuardrailImageSourceFilterSensitiveLog:()=>r.GuardrailImageSourceFilterSensitiveLog,GuardrailManagedWordType:()=>r.GuardrailManagedWordType,GuardrailPiiEntityType:()=>r.GuardrailPiiEntityType,GuardrailSensitiveInformationPolicyAction:()=>r.GuardrailSensitiveInformationPolicyAction,GuardrailStreamProcessingMode:()=>r.GuardrailStreamProcessingMode,GuardrailTopicPolicyAction:()=>r.GuardrailTopicPolicyAction,GuardrailTopicType:()=>r.GuardrailTopicType,GuardrailTrace:()=>r.GuardrailTrace,GuardrailWordPolicyAction:()=>r.GuardrailWordPolicyAction,ImageFormat:()=>r.ImageFormat,ImageSource:()=>r.ImageSource,InternalServerException:()=>r.InternalServerException,InvokeModelRequestFilterSensitiveLog:()=>r.InvokeModelRequestFilterSensitiveLog,InvokeModelResponseFilterSensitiveLog:()=>r.InvokeModelResponseFilterSensitiveLog,InvokeModelWithResponseStreamRequestFilterSensitiveLog:()=>r.InvokeModelWithResponseStreamRequestFilterSensitiveLog,InvokeModelWithResponseStreamResponseFilterSensitiveLog:()=>r.InvokeModelWithResponseStreamResponseFilterSensitiveLog,ListAsyncInvokesResponseFilterSensitiveLog:()=>r.ListAsyncInvokesResponseFilterSensitiveLog,MessageFilterSensitiveLog:()=>r.MessageFilterSensitiveLog,ModelErrorException:()=>r.ModelErrorException,ModelNotReadyException:()=>r.ModelNotReadyException,ModelStreamErrorException:()=>r.ModelStreamErrorException,ModelTimeoutException:()=>r.ModelTimeoutException,PayloadPartFilterSensitiveLog:()=>r.PayloadPartFilterSensitiveLog,PerformanceConfigLatency:()=>r.PerformanceConfigLatency,PromptVariableValues:()=>r.PromptVariableValues,ResourceNotFoundException:()=>r.ResourceNotFoundException,ResponseStream:()=>r.ResponseStream,ResponseStreamFilterSensitiveLog:()=>r.ResponseStreamFilterSensitiveLog,ServiceQuotaExceededException:()=>r.ServiceQuotaExceededException,ServiceUnavailableException:()=>r.ServiceUnavailableException,SortAsyncInvocationBy:()=>r.SortAsyncInvocationBy,SortOrder:()=>r.SortOrder,StartAsyncInvokeRequestFilterSensitiveLog:()=>r.StartAsyncInvokeRequestFilterSensitiveLog,StopReason:()=>r.StopReason,SystemContentBlock:()=>r.SystemContentBlock,SystemContentBlockFilterSensitiveLog:()=>r.SystemContentBlockFilterSensitiveLog,ThrottlingException:()=>r.ThrottlingException,Tool:()=>r.Tool,ToolChoice:()=>r.ToolChoice,ToolInputSchema:()=>r.ToolInputSchema,ToolResultContentBlock:()=>r.ToolResultContentBlock,ToolResultStatus:()=>r.ToolResultStatus,Trace:()=>r.Trace,ValidationException:()=>r.ValidationException,VideoFormat:()=>r.VideoFormat,VideoSource:()=>r.VideoSource});var r=n(285)},285:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AccessDeniedException:()=>o,ApplyGuardrailRequestFilterSensitiveLog:()=>Ee,AsyncInvokeOutputDataConfig:()=>r,AsyncInvokeStatus:()=>s,AsyncInvokeSummaryFilterSensitiveLog:()=>ge,ConflictException:()=>p,ContentBlock:()=>Y,ContentBlockDelta:()=>le,ContentBlockFilterSensitiveLog:()=>Ae,ContentBlockStart:()=>ue,ConversationRole:()=>X,ConverseOutput:()=>ne,ConverseOutputFilterSensitiveLog:()=>Re,ConverseRequestFilterSensitiveLog:()=>ke,ConverseResponseFilterSensitiveLog:()=>De,ConverseStreamOutput:()=>ce,ConverseStreamOutputFilterSensitiveLog:()=>Oe,ConverseStreamRequestFilterSensitiveLog:()=>Ne,ConverseStreamResponseFilterSensitiveLog:()=>Fe,DocumentFormat:()=>I,DocumentSource:()=>$,GetAsyncInvokeResponseFilterSensitiveLog:()=>he,GuardrailAction:()=>S,GuardrailContentBlock:()=>x,GuardrailContentBlockFilterSensitiveLog:()=>xe,GuardrailContentFilterConfidence:()=>_,GuardrailContentFilterStrength:()=>A,GuardrailContentFilterType:()=>C,GuardrailContentPolicyAction:()=>w,GuardrailContentQualifier:()=>b,GuardrailContentSource:()=>E,GuardrailContextualGroundingFilterType:()=>k,GuardrailContextualGroundingPolicyAction:()=>T,GuardrailConverseContentBlock:()=>z,GuardrailConverseContentBlockFilterSensitiveLog:()=>_e,GuardrailConverseContentQualifier:()=>U,GuardrailConverseImageBlockFilterSensitiveLog:()=>we,GuardrailConverseImageFormat:()=>L,GuardrailConverseImageSource:()=>B,GuardrailConverseImageSourceFilterSensitiveLog:()=>Se,GuardrailImageBlockFilterSensitiveLog:()=>be,GuardrailImageFormat:()=>y,GuardrailImageSource:()=>v,GuardrailImageSourceFilterSensitiveLog:()=>ve,GuardrailManagedWordType:()=>P,GuardrailPiiEntityType:()=>D,GuardrailSensitiveInformationPolicyAction:()=>R,GuardrailStreamProcessingMode:()=>se,GuardrailTopicPolicyAction:()=>N,GuardrailTopicType:()=>O,GuardrailTrace:()=>M,GuardrailWordPolicyAction:()=>F,ImageFormat:()=>q,ImageSource:()=>j,InternalServerException:()=>l,InvokeModelRequestFilterSensitiveLog:()=>Pe,InvokeModelResponseFilterSensitiveLog:()=>Me,InvokeModelWithResponseStreamRequestFilterSensitiveLog:()=>Ie,InvokeModelWithResponseStreamResponseFilterSensitiveLog:()=>Be,ListAsyncInvokesResponseFilterSensitiveLog:()=>me,MessageFilterSensitiveLog:()=>Ce,ModelErrorException:()=>ie,ModelNotReadyException:()=>ae,ModelStreamErrorException:()=>de,ModelTimeoutException:()=>oe,PayloadPartFilterSensitiveLog:()=>$e,PerformanceConfigLatency:()=>K,PromptVariableValues:()=>J,ResourceNotFoundException:()=>h,ResponseStream:()=>pe,ResponseStreamFilterSensitiveLog:()=>Le,ServiceQuotaExceededException:()=>g,ServiceUnavailableException:()=>m,SortAsyncInvocationBy:()=>d,SortOrder:()=>f,StartAsyncInvokeRequestFilterSensitiveLog:()=>ye,StopReason:()=>re,SystemContentBlock:()=>Q,SystemContentBlockFilterSensitiveLog:()=>Te,ThrottlingException:()=>u,Tool:()=>te,ToolChoice:()=>Z,ToolInputSchema:()=>ee,ToolResultContentBlock:()=>V,ToolResultStatus:()=>W,Trace:()=>fe,ValidationException:()=>c,VideoFormat:()=>H,VideoSource:()=>G});var r,i=n(31796),a=n(37474);class o extends a.BedrockRuntimeServiceException{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,o.prototype)}}!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(r||(r={}));const s={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"};class l extends a.BedrockRuntimeServiceException{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,l.prototype)}}class u extends a.BedrockRuntimeServiceException{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,u.prototype)}}class c extends a.BedrockRuntimeServiceException{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,c.prototype)}}const d={SUBMISSION_TIME:"SubmissionTime"},f={ASCENDING:"Ascending",DESCENDING:"Descending"};class p extends a.BedrockRuntimeServiceException{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,p.prototype)}}class h extends a.BedrockRuntimeServiceException{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,h.prototype)}}class g extends a.BedrockRuntimeServiceException{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,g.prototype)}}class m extends a.BedrockRuntimeServiceException{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,m.prototype)}}const y={JPEG:"jpeg",PNG:"png"};var v;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(v||(v={}));const b={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"};var x;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(x||(x={}));const E={INPUT:"INPUT",OUTPUT:"OUTPUT"},S={GUARDRAIL_INTERVENED:"GUARDRAIL_INTERVENED",NONE:"NONE"},w={BLOCKED:"BLOCKED"},_={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},A={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},C={HATE:"HATE",INSULTS:"INSULTS",MISCONDUCT:"MISCONDUCT",PROMPT_ATTACK:"PROMPT_ATTACK",SEXUAL:"SEXUAL",VIOLENCE:"VIOLENCE"},T={BLOCKED:"BLOCKED",NONE:"NONE"},k={GROUNDING:"GROUNDING",RELEVANCE:"RELEVANCE"},R={ANONYMIZED:"ANONYMIZED",BLOCKED:"BLOCKED"},D={ADDRESS:"ADDRESS",AGE:"AGE",AWS_ACCESS_KEY:"AWS_ACCESS_KEY",AWS_SECRET_KEY:"AWS_SECRET_KEY",CA_HEALTH_NUMBER:"CA_HEALTH_NUMBER",CA_SOCIAL_INSURANCE_NUMBER:"CA_SOCIAL_INSURANCE_NUMBER",CREDIT_DEBIT_CARD_CVV:"CREDIT_DEBIT_CARD_CVV",CREDIT_DEBIT_CARD_EXPIRY:"CREDIT_DEBIT_CARD_EXPIRY",CREDIT_DEBIT_CARD_NUMBER:"CREDIT_DEBIT_CARD_NUMBER",DRIVER_ID:"DRIVER_ID",EMAIL:"EMAIL",INTERNATIONAL_BANK_ACCOUNT_NUMBER:"INTERNATIONAL_BANK_ACCOUNT_NUMBER",IP_ADDRESS:"IP_ADDRESS",LICENSE_PLATE:"LICENSE_PLATE",MAC_ADDRESS:"MAC_ADDRESS",NAME:"NAME",PASSWORD:"PASSWORD",PHONE:"PHONE",PIN:"PIN",SWIFT_CODE:"SWIFT_CODE",UK_NATIONAL_HEALTH_SERVICE_NUMBER:"UK_NATIONAL_HEALTH_SERVICE_NUMBER",UK_NATIONAL_INSURANCE_NUMBER:"UK_NATIONAL_INSURANCE_NUMBER",UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER:"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",URL:"URL",USERNAME:"USERNAME",US_BANK_ACCOUNT_NUMBER:"US_BANK_ACCOUNT_NUMBER",US_BANK_ROUTING_NUMBER:"US_BANK_ROUTING_NUMBER",US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER:"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",US_PASSPORT_NUMBER:"US_PASSPORT_NUMBER",US_SOCIAL_SECURITY_NUMBER:"US_SOCIAL_SECURITY_NUMBER",VEHICLE_IDENTIFICATION_NUMBER:"VEHICLE_IDENTIFICATION_NUMBER"},N={BLOCKED:"BLOCKED"},O={DENY:"DENY"},F={BLOCKED:"BLOCKED"},P={PROFANITY:"PROFANITY"},M={DISABLED:"disabled",ENABLED:"enabled"},I={CSV:"csv",DOC:"doc",DOCX:"docx",HTML:"html",MD:"md",PDF:"pdf",TXT:"txt",XLS:"xls",XLSX:"xlsx"};var $;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}($||($={}));const L={JPEG:"jpeg",PNG:"png"};var B;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(B||(B={}));const U={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"};var z;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(z||(z={}));const q={GIF:"gif",JPEG:"jpeg",PNG:"png",WEBP:"webp"};var j;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(j||(j={}));const H={FLV:"flv",MKV:"mkv",MOV:"mov",MP4:"mp4",MPEG:"mpeg",MPG:"mpg",THREE_GP:"three_gp",WEBM:"webm",WMV:"wmv"};var G,V;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(G||(G={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(V||(V={}));const W={ERROR:"error",SUCCESS:"success"};var Y;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(Y||(Y={}));const X={ASSISTANT:"assistant",USER:"user"},K={OPTIMIZED:"optimized",STANDARD:"standard"};var J,Q,Z,ee,te,ne;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(J||(J={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(Q||(Q={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(Z||(Z={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(ee||(ee={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):t._(e.$unknown[0],e.$unknown[1])}(te||(te={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(ne||(ne={}));const re={CONTENT_FILTERED:"content_filtered",END_TURN:"end_turn",GUARDRAIL_INTERVENED:"guardrail_intervened",MAX_TOKENS:"max_tokens",STOP_SEQUENCE:"stop_sequence",TOOL_USE:"tool_use"};class ie extends a.BedrockRuntimeServiceException{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,ie.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class ae extends a.BedrockRuntimeServiceException{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,ae.prototype)}}class oe extends a.BedrockRuntimeServiceException{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,oe.prototype)}}const se={ASYNC:"async",SYNC:"sync"};var le,ue,ce;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(le||(le={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(ue||(ue={}));class de extends a.BedrockRuntimeServiceException{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,de.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ce||(ce={}));const fe={DISABLED:"DISABLED",ENABLED:"ENABLED"};var pe;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(pe||(pe={}));const he=e=>({...e,...e.failureMessage&&{failureMessage:i.SENSITIVE_STRING},...e.outputDataConfig&&{outputDataConfig:e.outputDataConfig}}),ge=e=>({...e,...e.failureMessage&&{failureMessage:i.SENSITIVE_STRING},...e.outputDataConfig&&{outputDataConfig:e.outputDataConfig}}),me=e=>({...e,...e.asyncInvokeSummaries&&{asyncInvokeSummaries:e.asyncInvokeSummaries.map((e=>ge(e)))}}),ye=e=>({...e,...e.modelInput&&{modelInput:i.SENSITIVE_STRING},...e.outputDataConfig&&{outputDataConfig:e.outputDataConfig}}),ve=e=>void 0!==e.bytes?{bytes:e.bytes}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,be=e=>({...e,...e.source&&{source:i.SENSITIVE_STRING}}),xe=e=>void 0!==e.text?{text:e.text}:void 0!==e.image?{image:i.SENSITIVE_STRING}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,Ee=e=>({...e,...e.content&&{content:e.content.map((e=>xe(e)))}}),Se=e=>void 0!==e.bytes?{bytes:e.bytes}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,we=e=>({...e,...e.source&&{source:i.SENSITIVE_STRING}}),_e=e=>void 0!==e.text?{text:e.text}:void 0!==e.image?{image:i.SENSITIVE_STRING}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,Ae=e=>void 0!==e.text?{text:e.text}:void 0!==e.image?{image:e.image}:void 0!==e.document?{document:e.document}:void 0!==e.video?{video:e.video}:void 0!==e.toolUse?{toolUse:e.toolUse}:void 0!==e.toolResult?{toolResult:e.toolResult}:void 0!==e.guardContent?{guardContent:_e(e.guardContent)}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,Ce=e=>({...e,...e.content&&{content:e.content.map((e=>Ae(e)))}}),Te=e=>void 0!==e.text?{text:e.text}:void 0!==e.guardContent?{guardContent:_e(e.guardContent)}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,ke=e=>({...e,...e.messages&&{messages:e.messages.map((e=>Ce(e)))},...e.system&&{system:e.system.map((e=>Te(e)))},...e.toolConfig&&{toolConfig:e.toolConfig},...e.promptVariables&&{promptVariables:i.SENSITIVE_STRING},...e.requestMetadata&&{requestMetadata:i.SENSITIVE_STRING}}),Re=e=>void 0!==e.message?{message:Ce(e.message)}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,De=e=>({...e,...e.output&&{output:Re(e.output)}}),Ne=e=>({...e,...e.messages&&{messages:e.messages.map((e=>Ce(e)))},...e.system&&{system:e.system.map((e=>Te(e)))},...e.toolConfig&&{toolConfig:e.toolConfig},...e.promptVariables&&{promptVariables:i.SENSITIVE_STRING},...e.requestMetadata&&{requestMetadata:i.SENSITIVE_STRING}}),Oe=e=>void 0!==e.messageStart?{messageStart:e.messageStart}:void 0!==e.contentBlockStart?{contentBlockStart:e.contentBlockStart}:void 0!==e.contentBlockDelta?{contentBlockDelta:e.contentBlockDelta}:void 0!==e.contentBlockStop?{contentBlockStop:e.contentBlockStop}:void 0!==e.messageStop?{messageStop:e.messageStop}:void 0!==e.metadata?{metadata:e.metadata}:void 0!==e.internalServerException?{internalServerException:e.internalServerException}:void 0!==e.modelStreamErrorException?{modelStreamErrorException:e.modelStreamErrorException}:void 0!==e.validationException?{validationException:e.validationException}:void 0!==e.throttlingException?{throttlingException:e.throttlingException}:void 0!==e.serviceUnavailableException?{serviceUnavailableException:e.serviceUnavailableException}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,Fe=e=>({...e,...e.stream&&{stream:"STREAMING_CONTENT"}}),Pe=e=>({...e,...e.body&&{body:i.SENSITIVE_STRING}}),Me=e=>({...e,...e.body&&{body:i.SENSITIVE_STRING}}),Ie=e=>({...e,...e.body&&{body:i.SENSITIVE_STRING}}),$e=e=>({...e,...e.bytes&&{bytes:i.SENSITIVE_STRING}}),Le=e=>void 0!==e.chunk?{chunk:i.SENSITIVE_STRING}:void 0!==e.internalServerException?{internalServerException:e.internalServerException}:void 0!==e.modelStreamErrorException?{modelStreamErrorException:e.modelStreamErrorException}:void 0!==e.validationException?{validationException:e.validationException}:void 0!==e.throttlingException?{throttlingException:e.throttlingException}:void 0!==e.modelTimeoutException?{modelTimeoutException:e.modelTimeoutException}:void 0!==e.serviceUnavailableException?{serviceUnavailableException:e.serviceUnavailableException}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,Be=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}})},63730:(e,t,n)=>{"use strict";n.r(t)},94624:(e,t,n)=>{"use strict";n.r(t),n.d(t,{paginateListAsyncInvokes:()=>o});var r=n(40033),i=n(52046),a=n(67224);const o=(0,r.createPaginator)(i.BedrockRuntimeClient,a.ListAsyncInvokesCommand,"nextToken","nextToken","maxResults")},69976:(e,t,n)=>{"use strict";n.r(t),n.d(t,{paginateListAsyncInvokes:()=>r.paginateListAsyncInvokes});n(63730);var r=n(94624)},43712:(e,t,n)=>{"use strict";n.r(t),n.d(t,{de_ApplyGuardrailCommand:()=>y,de_ConverseCommand:()=>v,de_ConverseStreamCommand:()=>b,de_GetAsyncInvokeCommand:()=>x,de_InvokeModelCommand:()=>E,de_InvokeModelWithResponseStreamCommand:()=>S,de_ListAsyncInvokesCommand:()=>w,de_StartAsyncInvokeCommand:()=>_,se_ApplyGuardrailCommand:()=>u,se_ConverseCommand:()=>c,se_ConverseStreamCommand:()=>d,se_GetAsyncInvokeCommand:()=>f,se_InvokeModelCommand:()=>p,se_InvokeModelWithResponseStreamCommand:()=>h,se_ListAsyncInvokesCommand:()=>g,se_StartAsyncInvokeCommand:()=>m});var r=n(44445),i=n(40033),a=n(31796),o=n(12634),s=n(37474),l=n(285);const u=async(e,t)=>{const n=(0,i.requestBuilder)(e,t);let r;return n.bp("/guardrail/{guardrailIdentifier}/version/{guardrailVersion}/apply"),n.p("guardrailIdentifier",(()=>e.guardrailIdentifier),"{guardrailIdentifier}",!1),n.p("guardrailVersion",(()=>e.guardrailVersion),"{guardrailVersion}",!1),r=JSON.stringify((0,a.take)(e,{content:e=>re(e,t),source:[]})),n.m("POST").h({"content-type":"application/json"}).b(r),n.build()},c=async(e,t)=>{const n=(0,i.requestBuilder)(e,t);let r;return n.bp("/model/{modelId}/converse"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),r=JSON.stringify((0,a.take)(e,{additionalModelRequestFields:e=>we(e,t),additionalModelResponseFieldPaths:e=>(0,a._json)(e),guardrailConfig:e=>(0,a._json)(e),inferenceConfig:e=>de(e,t),messages:e=>fe(e,t),performanceConfig:e=>(0,a._json)(e),promptVariables:e=>(0,a._json)(e),requestMetadata:e=>(0,a._json)(e),system:e=>he(e,t),toolConfig:e=>ge(e,t)})),n.m("POST").h({"content-type":"application/json"}).b(r),n.build()},d=async(e,t)=>{const n=(0,i.requestBuilder)(e,t);let r;return n.bp("/model/{modelId}/converse-stream"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),r=JSON.stringify((0,a.take)(e,{additionalModelRequestFields:e=>we(e,t),additionalModelResponseFieldPaths:e=>(0,a._json)(e),guardrailConfig:e=>(0,a._json)(e),inferenceConfig:e=>de(e,t),messages:e=>fe(e,t),performanceConfig:e=>(0,a._json)(e),promptVariables:e=>(0,a._json)(e),requestMetadata:e=>(0,a._json)(e),system:e=>he(e,t),toolConfig:e=>ge(e,t)})),n.m("POST").h({"content-type":"application/json"}).b(r),n.build()},f=async(e,t)=>{const n=(0,i.requestBuilder)(e,t);return n.bp("/async-invoke/{invocationArn}"),n.p("invocationArn",(()=>e.invocationArn),"{invocationArn}",!1),n.m("GET").h({}).b(undefined),n.build()},p=async(e,t)=>{const n=(0,i.requestBuilder)(e,t),r=(0,a.map)({},a.isSerializableHeaderValue,{[tt]:e[et]||"application/octet-stream",[Ze]:e[Ze],[vt]:e[ft],[gt]:e[nt],[mt]:e[rt],[yt]:e[ot]});let o;return n.bp("/model/{modelId}/invoke"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),void 0!==e.body&&(o=e.body),n.m("POST").h(r).b(o),n.build()},h=async(e,t)=>{const n=(0,i.requestBuilder)(e,t),r=(0,a.map)({},a.isSerializableHeaderValue,{[tt]:e[et]||"application/octet-stream",[pt]:e[Ze],[vt]:e[ft],[gt]:e[nt],[mt]:e[rt],[yt]:e[ot]});let o;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),void 0!==e.body&&(o=e.body),n.m("POST").h(r).b(o),n.build()},g=async(e,t)=>{const n=(0,i.requestBuilder)(e,t);n.bp("/async-invoke");const r=(0,a.map)({[ct]:[()=>void 0!==e.submitTimeAfter,()=>(0,a.serializeDateTime)(e[ct]).toString()],[dt]:[()=>void 0!==e.submitTimeBefore,()=>(0,a.serializeDateTime)(e[dt]).toString()],[lt]:[,e[lt]],[it]:[()=>void 0!==e.maxResults,()=>e[it].toString()],[at]:[,e[at]],[st]:[,e[st]],[ut]:[,e[ut]]});return n.m("GET").h({}).q(r).b(undefined),n.build()},m=async(e,t)=>{const n=(0,i.requestBuilder)(e,t);let r;return n.bp("/async-invoke"),r=JSON.stringify((0,a.take)(e,{clientRequestToken:[!0,e=>e??(0,o.v4)()],modelId:[],modelInput:e=>pe(e,t),outputDataConfig:e=>(0,a._json)(e),tags:e=>(0,a._json)(e)})),n.m("POST").h({"content-type":"application/json"}).b(r),n.build()},y=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return A(e,t);const n=(0,a.map)({$metadata:Qe(e)}),i=(0,a.expectNonNull)((0,a.expectObject)(await(0,r.parseJsonBody)(e.body,t)),"body"),o=(0,a.take)(i,{action:a.expectString,assessments:e=>Pe(e,t),guardrailCoverage:a._json,outputs:a._json,usage:a._json});return Object.assign(n,o),n},v=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return A(e,t);const n=(0,a.map)({$metadata:Qe(e)}),i=(0,a.expectNonNull)((0,a.expectObject)(await(0,r.parseJsonBody)(e.body,t)),"body"),o=(0,a.take)(i,{additionalModelResponseFields:e=>Je(e,t),metrics:a._json,output:e=>Te((0,r.awsExpectUnion)(e),t),performanceConfig:a._json,stopReason:a.expectString,trace:e=>De(e,t),usage:a._json});return Object.assign(n,o),n},b=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return A(e,t);const n=(0,a.map)({$metadata:Qe(e)}),r=e.body;return n.stream=B(r,t),n},x=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return A(e,t);const n=(0,a.map)({$metadata:Qe(e)}),i=(0,a.expectNonNull)((0,a.expectObject)(await(0,r.parseJsonBody)(e.body,t)),"body"),o=(0,a.take)(i,{clientRequestToken:a.expectString,endTime:e=>(0,a.expectNonNull)((0,a.parseRfc3339DateTimeWithOffset)(e)),failureMessage:a.expectString,invocationArn:a.expectString,lastModifiedTime:e=>(0,a.expectNonNull)((0,a.parseRfc3339DateTimeWithOffset)(e)),modelArn:a.expectString,outputDataConfig:e=>(0,a._json)((0,r.awsExpectUnion)(e)),status:a.expectString,submitTime:e=>(0,a.expectNonNull)((0,a.parseRfc3339DateTimeWithOffset)(e))});return Object.assign(n,o),n},E=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return A(e,t);const n=(0,a.map)({$metadata:Qe(e),[et]:[,e.headers[tt]],[ot]:[,e.headers[yt]]}),r=await(0,a.collectBody)(e.body,t);return n.body=r,n},S=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return A(e,t);const n=(0,a.map)({$metadata:Qe(e),[et]:[,e.headers[ht]],[ot]:[,e.headers[yt]]}),r=e.body;return n.body=U(r,t),n},w=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return A(e,t);const n=(0,a.map)({$metadata:Qe(e)}),i=(0,a.expectNonNull)((0,a.expectObject)(await(0,r.parseJsonBody)(e.body,t)),"body"),o=(0,a.take)(i,{asyncInvokeSummaries:e=>_e(e,t),nextToken:a.expectString});return Object.assign(n,o),n},_=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return A(e,t);const n=(0,a.map)({$metadata:Qe(e)}),i=(0,a.expectNonNull)((0,a.expectObject)(await(0,r.parseJsonBody)(e.body,t)),"body"),o=(0,a.take)(i,{invocationArn:a.expectString});return Object.assign(n,o),n},A=async(e,t)=>{const n={...e,body:await(0,r.parseJsonErrorBody)(e.body,t)},i=(0,r.loadRestJsonErrorCode)(e,n.body);switch(i){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await T(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await R(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await P(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await M(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await $(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await L(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await D(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await N(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await F(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await I(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await O(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await k(n,t);default:const r=n.body;return C({output:e,parsedBody:r,errorCode:i})}},C=(0,a.withBaseException)(s.BedrockRuntimeServiceException),T=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new l.AccessDeniedException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},k=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new l.ConflictException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},R=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new l.InternalServerException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},D=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString,originalStatusCode:a.expectInt32,resourceName:a.expectString});Object.assign(n,i);const o=new l.ModelErrorException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},N=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new l.ModelNotReadyException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},O=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString,originalMessage:a.expectString,originalStatusCode:a.expectInt32});Object.assign(n,i);const o=new l.ModelStreamErrorException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},F=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new l.ModelTimeoutException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},P=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new l.ResourceNotFoundException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},M=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new l.ServiceQuotaExceededException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},I=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new l.ServiceUnavailableException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},$=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new l.ThrottlingException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},L=async(e,t)=>{const n=(0,a.map)({}),r=e.body,i=(0,a.take)(r,{message:a.expectString});Object.assign(n,i);const o=new l.ValidationException({$metadata:Qe(e),...n});return(0,a.decorateServiceException)(o,e.body)},B=(e,t)=>t.eventStreamMarshaller.deserialize(e,(async n=>null!=n.messageStart?{messageStart:await V(n.messageStart,t)}:null!=n.contentBlockStart?{contentBlockStart:await q(n.contentBlockStart,t)}:null!=n.contentBlockDelta?{contentBlockDelta:await z(n.contentBlockDelta,t)}:null!=n.contentBlockStop?{contentBlockStop:await j(n.contentBlockStop,t)}:null!=n.messageStop?{messageStop:await W(n.messageStop,t)}:null!=n.metadata?{metadata:await H(n.metadata,t)}:null!=n.internalServerException?{internalServerException:await G(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await Y(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Z(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Q(n.throttlingException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await J(n.serviceUnavailableException,t)}:{$unknown:e})),U=(e,t)=>t.eventStreamMarshaller.deserialize(e,(async n=>null!=n.chunk?{chunk:await K(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await G(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await Y(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Z(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Q(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await X(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await J(n.serviceUnavailableException,t)}:{$unknown:e})),z=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,(0,a._json)(i)),n},q=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,(0,a._json)(i)),n},j=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,(0,a._json)(i)),n},H=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,ke(i,t)),n},G=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return R(n,t)},V=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,(0,a._json)(i)),n},W=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,He(i,t)),n},Y=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return O(n,t)},X=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return F(n,t)},K=async(e,t)=>{const n={},i=await(0,r.parseJsonBody)(e.body,t);return Object.assign(n,Ge(i,t)),n},J=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return I(n,t)},Q=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return $(n,t)},Z=async(e,t)=>{const n={...e,body:await(0,r.parseJsonBody)(e.body,t)};return L(n,t)},ee=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>l.ContentBlock.visit(e,{document:e=>({document:te(e,t)}),guardContent:e=>({guardContent:ie(e,t)}),image:e=>({image:ue(e,t)}),text:e=>({text:e}),toolResult:e=>({toolResult:me(e,t)}),toolUse:e=>({toolUse:xe(e,t)}),video:e=>({video:Ee(e,t)}),_:(e,t)=>({name:t})}))(e,t))),te=(e,t)=>(0,a.take)(e,{format:[],name:[],source:e=>ne(e,t)}),ne=(e,t)=>l.DocumentSource.visit(e,{bytes:e=>({bytes:t.base64Encoder(e)}),_:(e,t)=>({name:t})}),re=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>l.GuardrailContentBlock.visit(e,{image:e=>({image:se(e,t)}),text:e=>({text:(0,a._json)(e)}),_:(e,t)=>({name:t})}))(e,t))),ie=(e,t)=>l.GuardrailConverseContentBlock.visit(e,{image:e=>({image:ae(e,t)}),text:e=>({text:(0,a._json)(e)}),_:(e,t)=>({name:t})}),ae=(e,t)=>(0,a.take)(e,{format:[],source:e=>oe(e,t)}),oe=(e,t)=>l.GuardrailConverseImageSource.visit(e,{bytes:e=>({bytes:t.base64Encoder(e)}),_:(e,t)=>({name:t})}),se=(e,t)=>(0,a.take)(e,{format:[],source:e=>le(e,t)}),le=(e,t)=>l.GuardrailImageSource.visit(e,{bytes:e=>({bytes:t.base64Encoder(e)}),_:(e,t)=>({name:t})}),ue=(e,t)=>(0,a.take)(e,{format:[],source:e=>ce(e,t)}),ce=(e,t)=>l.ImageSource.visit(e,{bytes:e=>({bytes:t.base64Encoder(e)}),_:(e,t)=>({name:t})}),de=(e,t)=>(0,a.take)(e,{maxTokens:[],stopSequences:a._json,temperature:a.serializeFloat,topP:a.serializeFloat}),fe=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>(0,a.take)(e,{content:e=>ee(e,t),role:[]}))(e,t))),pe=(e,t)=>e,he=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>l.SystemContentBlock.visit(e,{guardContent:e=>({guardContent:ie(e,t)}),text:e=>({text:e}),_:(e,t)=>({name:t})}))(e,t))),ge=(e,t)=>(0,a.take)(e,{toolChoice:a._json,tools:e=>ve(e,t)}),me=(e,t)=>(0,a.take)(e,{content:e=>ye(e,t),status:[],toolUseId:[]}),ye=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>l.ToolResultContentBlock.visit(e,{document:e=>({document:te(e,t)}),image:e=>({image:ue(e,t)}),json:e=>({json:we(e,t)}),text:e=>({text:e}),video:e=>({video:Ee(e,t)}),_:(e,t)=>({name:t})}))(e,t))),ve=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>l.Tool.visit(e,{toolSpec:e=>({toolSpec:be(e,t)}),_:(e,t)=>({name:t})}))(e,t))),be=(e,t)=>(0,a.take)(e,{description:[],inputSchema:e=>((e,t)=>l.ToolInputSchema.visit(e,{json:e=>({json:we(e,t)}),_:(e,t)=>({name:t})}))(e,t),name:[]}),xe=(e,t)=>(0,a.take)(e,{input:e=>we(e,t),name:[],toolUseId:[]}),Ee=(e,t)=>(0,a.take)(e,{format:[],source:e=>Se(e,t)}),Se=(e,t)=>l.VideoSource.visit(e,{bytes:e=>({bytes:t.base64Encoder(e)}),s3Location:e=>({s3Location:(0,a._json)(e)}),_:(e,t)=>({name:t})}),we=(e,t)=>e,_e=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>Ae(e,t))),Ae=(e,t)=>(0,a.take)(e,{clientRequestToken:a.expectString,endTime:e=>(0,a.expectNonNull)((0,a.parseRfc3339DateTimeWithOffset)(e)),failureMessage:a.expectString,invocationArn:a.expectString,lastModifiedTime:e=>(0,a.expectNonNull)((0,a.parseRfc3339DateTimeWithOffset)(e)),modelArn:a.expectString,outputDataConfig:e=>(0,a._json)((0,r.awsExpectUnion)(e)),status:a.expectString,submitTime:e=>(0,a.expectNonNull)((0,a.parseRfc3339DateTimeWithOffset)(e))}),Ce=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>null!=e.document?{document:Ne(e.document,t)}:null!=e.guardContent?{guardContent:$e((0,r.awsExpectUnion)(e.guardContent),t)}:null!=e.image?{image:ze(e.image,t)}:void 0!==(0,a.expectString)(e.text)?{text:(0,a.expectString)(e.text)}:null!=e.toolResult?{toolResult:Ve(e.toolResult,t)}:null!=e.toolUse?{toolUse:Ye(e.toolUse,t)}:null!=e.video?{video:Xe(e.video,t)}:{$unknown:Object.entries(e)[0]})((0,r.awsExpectUnion)(e),t)));return n},Te=(e,t)=>null!=e.message?{message:je(e.message,t)}:{$unknown:Object.entries(e)[0]},ke=(e,t)=>(0,a.take)(e,{metrics:a._json,performanceConfig:a._json,trace:e=>Re(e,t),usage:a._json}),Re=(e,t)=>(0,a.take)(e,{guardrail:e=>Ue(e,t),promptRouter:a._json}),De=(e,t)=>(0,a.take)(e,{guardrail:e=>Ue(e,t),promptRouter:a._json}),Ne=(e,t)=>(0,a.take)(e,{format:a.expectString,name:a.expectString,source:e=>Oe((0,r.awsExpectUnion)(e),t)}),Oe=(e,t)=>null!=e.bytes?{bytes:t.base64Decoder(e.bytes)}:{$unknown:Object.entries(e)[0]},Fe=(e,t)=>(0,a.take)(e,{contentPolicy:a._json,contextualGroundingPolicy:e=>Ie(e,t),invocationMetrics:a._json,sensitiveInformationPolicy:a._json,topicPolicy:a._json,wordPolicy:a._json}),Pe=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>Fe(e,t))),Me=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>(0,a.take)(e,{action:a.expectString,score:a.limitedParseDouble,threshold:a.limitedParseDouble,type:a.expectString}))(e))),Ie=(e,t)=>(0,a.take)(e,{filters:e=>Me(e)}),$e=(e,t)=>null!=e.image?{image:Le(e.image,t)}:null!=e.text?{text:(0,a._json)(e.text)}:{$unknown:Object.entries(e)[0]},Le=(e,t)=>(0,a.take)(e,{format:a.expectString,source:e=>Be((0,r.awsExpectUnion)(e),t)}),Be=(e,t)=>null!=e.bytes?{bytes:t.base64Decoder(e.bytes)}:{$unknown:Object.entries(e)[0]},Ue=(e,t)=>(0,a.take)(e,{inputAssessment:e=>((e,t)=>Object.entries(e).reduce(((e,[n,r])=>(null===r||(e[n]=Fe(r,t)),e)),{}))(e,t),modelOutput:a._json,outputAssessments:e=>((e,t)=>Object.entries(e).reduce(((e,[n,r])=>(null===r||(e[n]=Pe(r,t)),e)),{}))(e,t)}),ze=(e,t)=>(0,a.take)(e,{format:a.expectString,source:e=>qe((0,r.awsExpectUnion)(e),t)}),qe=(e,t)=>null!=e.bytes?{bytes:t.base64Decoder(e.bytes)}:{$unknown:Object.entries(e)[0]},je=(e,t)=>(0,a.take)(e,{content:e=>Ce(e,t),role:a.expectString}),He=(e,t)=>(0,a.take)(e,{additionalModelResponseFields:e=>Je(e,t),stopReason:a.expectString}),Ge=(e,t)=>(0,a.take)(e,{bytes:t.base64Decoder}),Ve=(e,t)=>(0,a.take)(e,{content:e=>We(e,t),status:a.expectString,toolUseId:a.expectString}),We=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>null!=e.document?{document:Ne(e.document,t)}:null!=e.image?{image:ze(e.image,t)}:null!=e.json?{json:Je(e.json,t)}:void 0!==(0,a.expectString)(e.text)?{text:(0,a.expectString)(e.text)}:null!=e.video?{video:Xe(e.video,t)}:{$unknown:Object.entries(e)[0]})((0,r.awsExpectUnion)(e),t)));return n},Ye=(e,t)=>(0,a.take)(e,{input:e=>Je(e,t),name:a.expectString,toolUseId:a.expectString}),Xe=(e,t)=>(0,a.take)(e,{format:a.expectString,source:e=>Ke((0,r.awsExpectUnion)(e),t)}),Ke=(e,t)=>null!=e.bytes?{bytes:t.base64Decoder(e.bytes)}:null!=e.s3Location?{s3Location:(0,a._json)(e.s3Location)}:{$unknown:Object.entries(e)[0]},Je=(e,t)=>e,Qe=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Ze="accept",et="contentType",tt="content-type",nt="guardrailIdentifier",rt="guardrailVersion",it="maxResults",at="nextToken",ot="performanceConfigLatency",st="sortBy",lt="statusEquals",ut="sortOrder",ct="submitTimeAfter",dt="submitTimeBefore",ft="trace",pt="x-amzn-bedrock-accept",ht="x-amzn-bedrock-content-type",gt="x-amzn-bedrock-guardrailidentifier",mt="x-amzn-bedrock-guardrailversion",yt="x-amzn-bedrock-performanceconfig-latency",vt="x-amzn-bedrock-trace"},47411:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRuntimeConfig:()=>g});var r=n(99960),i=n(25147),a=n(81772),o=n(61329),s=n(9519),l=n(61664),u=n(70913),c=n(25441),d=n(56265),f=n(66042),p=n(31796),h=n(89124);const g=e=>{const t=(0,h.resolveDefaultsModeConfig)(e),n=()=>t().then(p.loadConfigsForDefaultMode),g=(0,f.getRuntimeConfig)(e);return{...g,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??c.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,a.createDefaultUserAgentProvider)({serviceId:g.serviceId,clientVersion:r.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??s.eventStreamSerdeProvider,maxAttempts:e?.maxAttempts??d.DEFAULT_MAX_ATTEMPTS,region:e?.region??(0,u.invalidProvider)("Region is missing"),requestHandler:l.FetchHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||d.DEFAULT_RETRY_MODE),sha256:e?.sha256??i.Sha256,streamCollector:e?.streamCollector??l.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(o.DEFAULT_USE_DUALSTACK_ENDPOINT)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(o.DEFAULT_USE_FIPS_ENDPOINT))}}},66042:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRuntimeConfig:()=>c});var r=n(44445),i=n(31796),a=n(18065),o=n(33470),s=n(14246),l=n(19772),u=n(87010);const c=e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??o.fromBase64,base64Encoder:e?.base64Encoder??o.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??u.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??l.defaultBedrockRuntimeHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new r.AwsSdkSigV4Signer}],logger:e?.logger??new i.NoOpLogger,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??a.parseUrl,utf8Decoder:e?.utf8Decoder??s.fromUtf8,utf8Encoder:e?.utf8Encoder??s.toUtf8})},52793:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveRuntimeExtensions:()=>s});var r=n(95020),i=n(14065),a=n(31796),o=n(21167);const s=(e,t)=>{const n={...(0,r.getAwsRegionExtensionConfiguration)(e),...(0,a.getDefaultExtensionConfiguration)(e),...(0,i.getHttpHandlerExtensionConfiguration)(e),...(0,o.getHttpAuthExtensionConfiguration)(e)};return t.forEach((e=>e.configure(n))),{...e,...(0,r.resolveAwsRegionExtensionConfiguration)(n),...(0,a.resolveDefaultRuntimeConfig)(n),...(0,i.resolveHttpHandlerRuntimeConfig)(n),...(0,o.resolveHttpAuthRuntimeConfig)(n)}}},44445:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AWSSDKSigV4Signer:()=>i.AWSSDKSigV4Signer,AwsSdkSigV4ASigner:()=>i.AwsSdkSigV4ASigner,AwsSdkSigV4Signer:()=>i.AwsSdkSigV4Signer,NODE_SIGV4A_CONFIG_OPTIONS:()=>i.NODE_SIGV4A_CONFIG_OPTIONS,_toBool:()=>a._toBool,_toNum:()=>a._toNum,_toStr:()=>a._toStr,awsExpectUnion:()=>a.awsExpectUnion,emitWarningIfUnsupportedVersion:()=>r.emitWarningIfUnsupportedVersion,loadRestJsonErrorCode:()=>a.loadRestJsonErrorCode,loadRestXmlErrorCode:()=>a.loadRestXmlErrorCode,parseJsonBody:()=>a.parseJsonBody,parseJsonErrorBody:()=>a.parseJsonErrorBody,parseXmlBody:()=>a.parseXmlBody,parseXmlErrorBody:()=>a.parseXmlErrorBody,resolveAWSSDKSigV4Config:()=>i.resolveAWSSDKSigV4Config,resolveAwsSdkSigV4AConfig:()=>i.resolveAwsSdkSigV4AConfig,resolveAwsSdkSigV4Config:()=>i.resolveAwsSdkSigV4Config,setCredentialFeature:()=>r.setCredentialFeature,setFeature:()=>r.setFeature,state:()=>r.state,validateSigningProperties:()=>i.validateSigningProperties});var r=n(10573),i=n(60304),a=n(62755)},85122:(e,t,n)=>{"use strict";n.r(t),n.d(t,{emitWarningIfUnsupportedVersion:()=>a,state:()=>i});var r=n(65606);const i={warningEmitted:!1},a=e=>{e&&!i.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<18&&(i.warningEmitted=!0,r.emitWarning("NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js 16.x on January 6, 2025.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/74kJMmI"))}},10573:(e,t,n)=>{"use strict";n.r(t),n.d(t,{emitWarningIfUnsupportedVersion:()=>r.emitWarningIfUnsupportedVersion,setCredentialFeature:()=>i.setCredentialFeature,setFeature:()=>a.setFeature,state:()=>r.state});var r=n(85122),i=n(40244),a=n(63415)},40244:(e,t,n)=>{"use strict";function r(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}n.r(t),n.d(t,{setCredentialFeature:()=>r})},63415:(e,t,n)=>{"use strict";function r(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}n.r(t),n.d(t,{setFeature:()=>r})},21006:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AwsSdkSigV4ASigner:()=>o});var r=n(14065),i=n(78626),a=n(77113);class o extends a.AwsSdkSigV4Signer{async sign(e,t,n){if(!r.HttpRequest.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:o,signer:s,signingRegion:l,signingRegionSet:u,signingName:c}=await(0,a.validateSigningProperties)(n),d=(await(o.sigv4aSigningRegionSet?.())??u??[l]).join(",");return await s.sign(e,{signingDate:(0,i.getSkewCorrectedDate)(o.systemClockOffset),signingRegion:d,signingService:c})}}},77113:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AWSSDKSigV4Signer:()=>l,AwsSdkSigV4Signer:()=>s,validateSigningProperties:()=>o});var r=n(14065),i=n(78626);const a=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},o=async e=>{const t=a("context",e.context),n=a("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=a("signer",n.signer),o=await i(r),s=e?.signingRegion,l=e?.signingRegionSet,u=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:l,signingName:u}};class s{async sign(e,t,n){if(!r.HttpRequest.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const a=await o(n),{config:s,signer:l}=a;let{signingRegion:u,signingName:c}=a;const d=n.context;if(d?.authSchemes?.length){const[e,t]=d.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(u=t?.signingRegion??u,c=t?.signingName??c)}return await l.sign(e,{signingDate:(0,i.getSkewCorrectedDate)(s.systemClockOffset),signingRegion:u,signingService:c})}errorHandler(e){return t=>{const n=t.ServerTime??(0,i.getDateHeader)(t.$response);if(n){const r=a("config",e.config),o=r.systemClockOffset;r.systemClockOffset=(0,i.getUpdatedSystemClockOffset)(n,r.systemClockOffset);r.systemClockOffset!==o&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=(0,i.getDateHeader)(e);if(n){const e=a("config",t.config);e.systemClockOffset=(0,i.getUpdatedSystemClockOffset)(n,e.systemClockOffset)}}}const l=s},909:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AWSSDKSigV4Signer:()=>r.AWSSDKSigV4Signer,AwsSdkSigV4ASigner:()=>i.AwsSdkSigV4ASigner,AwsSdkSigV4Signer:()=>r.AwsSdkSigV4Signer,NODE_SIGV4A_CONFIG_OPTIONS:()=>a.NODE_SIGV4A_CONFIG_OPTIONS,resolveAWSSDKSigV4Config:()=>o.resolveAWSSDKSigV4Config,resolveAwsSdkSigV4AConfig:()=>a.resolveAwsSdkSigV4AConfig,resolveAwsSdkSigV4Config:()=>o.resolveAwsSdkSigV4Config,validateSigningProperties:()=>r.validateSigningProperties});var r=n(77113),i=n(21006),a=n(1942),o=n(25669)},1942:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_SIGV4A_CONFIG_OPTIONS:()=>o,resolveAwsSdkSigV4AConfig:()=>a});var r=n(40033),i=n(10223);const a=e=>(e.sigv4aSigningRegionSet=(0,r.normalizeProvider)(e.sigv4aSigningRegionSet),e),o={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET)return e.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((e=>e.trim()));throw new i.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(e){if(e.sigv4a_signing_region_set)return(e.sigv4a_signing_region_set??"").split(",").map((e=>e.trim()));throw new i.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0}},25669:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveAWSSDKSigV4Config:()=>s,resolveAwsSdkSigV4Config:()=>o});var r=n(10573),i=n(40033),a=n(82505);const o=e=>{let t,n=!1;e.credentials&&(n=!0,t=(0,i.memoizeIdentityProvider)(e.credentials,i.isIdentityExpired,i.doesIdentityRequireRefresh)),t||(t=e.credentialDefaultProvider?(0,i.normalizeProvider)(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const o=async()=>t({callerClientConfig:e}),{signingEscapePath:s=!0,systemClockOffset:l=e.systemClockOffset||0,sha256:u}=e;let c;return c=e.signer?(0,i.normalizeProvider)(e.signer):e.regionInfoProvider?()=>(0,i.normalizeProvider)(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([t,n])=>{const{signingRegion:r,signingService:i}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||i||e.serviceId;const l={...e,credentials:o,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:s};return new(e.signerConstructor||a.SignatureV4)(l)})):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await(0,i.normalizeProvider)(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const l={...e,credentials:o,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:s};return new(e.signerConstructor||a.SignatureV4)(l)},{...e,systemClockOffset:l,signingEscapePath:s,credentials:n?async()=>o().then((e=>(0,r.setCredentialFeature)(e,"CREDENTIALS_CODE","e"))):o,signer:c}},s=o},60304:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AWSSDKSigV4Signer:()=>r.AWSSDKSigV4Signer,AwsSdkSigV4ASigner:()=>r.AwsSdkSigV4ASigner,AwsSdkSigV4Signer:()=>r.AwsSdkSigV4Signer,NODE_SIGV4A_CONFIG_OPTIONS:()=>r.NODE_SIGV4A_CONFIG_OPTIONS,resolveAWSSDKSigV4Config:()=>r.resolveAWSSDKSigV4Config,resolveAwsSdkSigV4AConfig:()=>r.resolveAwsSdkSigV4AConfig,resolveAwsSdkSigV4Config:()=>r.resolveAwsSdkSigV4Config,validateSigningProperties:()=>r.validateSigningProperties});var r=n(909)},54171:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDateHeader:()=>i});var r=n(14065);const i=e=>r.HttpResponse.isInstance(e)?e.headers?.date??e.headers?.Date:void 0},60369:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSkewCorrectedDate:()=>r});const r=e=>new Date(Date.now()+e)},42153:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getUpdatedSystemClockOffset:()=>i});var r=n(98895);const i=(e,t)=>{const n=Date.parse(e);return(0,r.isClockSkewed)(n,t)?n-Date.now():t}},78626:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDateHeader:()=>r.getDateHeader,getSkewCorrectedDate:()=>i.getSkewCorrectedDate,getUpdatedSystemClockOffset:()=>a.getUpdatedSystemClockOffset});var r=n(54171),i=n(60369),a=n(42153)},98895:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isClockSkewed:()=>i});var r=n(60369);const i=(e,t)=>Math.abs((0,r.getSkewCorrectedDate)(t).getTime()-e)>=3e5},22341:(e,t,n)=>{"use strict";n.r(t),n.d(t,{_toBool:()=>i,_toNum:()=>a,_toStr:()=>r});const r=e=>{if(null==e)return e;if("number"==typeof e||"bigint"==typeof e){const t=new Error(`Received number ${e} where a string was expected.`);return t.name="Warning",console.warn(t),String(e)}if("boolean"==typeof e){const t=new Error(`Received boolean ${e} where a string was expected.`);return t.name="Warning",console.warn(t),String(e)}return e},i=e=>{if(null==e)return e;if("string"==typeof e){const t=e.toLowerCase();if(""!==e&&"false"!==t&&"true"!==t){const t=new Error(`Received string "${e}" where a boolean was expected.`);t.name="Warning",console.warn(t)}return""!==e&&"false"!==t}return e},a=e=>{if(null==e)return e;if("string"==typeof e){const t=Number(e);if(t.toString()!==e){const t=new Error(`Received string "${e}" where a number was expected.`);return t.name="Warning",console.warn(t),e}return t}return e}},68218:(e,t,n)=>{"use strict";n.r(t),n.d(t,{collectBodyString:()=>i});var r=n(31796);const i=(e,t)=>(0,r.collectBody)(e,t).then((e=>t.utf8Encoder(e)))},62755:(e,t,n)=>{"use strict";n.r(t),n.d(t,{_toBool:()=>r._toBool,_toNum:()=>r._toNum,_toStr:()=>r._toStr,awsExpectUnion:()=>i.awsExpectUnion,loadRestJsonErrorCode:()=>a.loadRestJsonErrorCode,loadRestXmlErrorCode:()=>o.loadRestXmlErrorCode,parseJsonBody:()=>a.parseJsonBody,parseJsonErrorBody:()=>a.parseJsonErrorBody,parseXmlBody:()=>o.parseXmlBody,parseXmlErrorBody:()=>o.parseXmlErrorBody});var r=n(22341),i=n(54475),a=n(21919),o=n(15469)},54475:(e,t,n)=>{"use strict";n.r(t),n.d(t,{awsExpectUnion:()=>i});var r=n(31796);const i=e=>{if(null!=e)return"object"==typeof e&&"__type"in e&&delete e.__type,(0,r.expectUnion)(e)}},21919:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loadRestJsonErrorCode:()=>o,parseJsonBody:()=>i,parseJsonErrorBody:()=>a});var r=n(68218);const i=(e,t)=>(0,r.collectBodyString)(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),a=async(e,t)=>{const n=await i(e,t);return n.message=n.message??n.Message,n},o=(e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=(i=e.headers,a="x-amzn-errortype",Object.keys(i).find((e=>e.toLowerCase()===a.toLowerCase())));var i,a;return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0}},15469:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loadRestXmlErrorCode:()=>l,parseXmlBody:()=>o,parseXmlErrorBody:()=>s});var r=n(31796),i=n(86454),a=n(68218);const o=(e,t)=>(0,a.collectBodyString)(e,t).then((e=>{if(e.length){const t=new i.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});let n;t.addEntity("#xD","\r"),t.addEntity("#10","\n");try{n=t.parse(e,!0)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const a="#text",o=Object.keys(n)[0],s=n[o];return s[a]&&(s[o]=s[a],delete s[a]),(0,r.getValueFromTextNode)(s)}return{}})),s=async(e,t)=>{const n=await o(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},l=(e,t)=>void 0!==t?.Error?.Code?t.Error.Code:void 0!==t?.Code?t.Code:404==e.statusCode?"NotFound":void 0},81095:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHostHeaderPlugin:()=>s,hostHeaderMiddleware:()=>a,hostHeaderMiddlewareOptions:()=>o,resolveHostHeaderConfig:()=>i});var r=n(14065);function i(e){return e}const a=e=>t=>async n=>{if(!r.HttpRequest.isInstance(n.request))return t(n);const{request:i}=n,{handlerProtocol:a=""}=e.requestHandler.metadata||{};if(a.indexOf("h2")>=0&&!i.headers[":authority"])delete i.headers.host,i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"");else if(!i.headers.host){let e=i.hostname;null!=i.port&&(e+=`:${i.port}`),i.headers.host=e}return t(n)},o={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},s=e=>({applyToStack:t=>{t.add(a(e),o)}})},50165:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getLoggerPlugin:()=>r.getLoggerPlugin,loggerMiddleware:()=>r.loggerMiddleware,loggerMiddlewareOptions:()=>r.loggerMiddlewareOptions});var r=n(77813)},77813:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getLoggerPlugin:()=>a,loggerMiddleware:()=>r,loggerMiddlewareOptions:()=>i});const r=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:a,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:u}=s,c=l??t.inputFilterSensitiveLog,d=u??t.outputFilterSensitiveLog,{$metadata:f,...p}=r.output;return o?.info?.({clientName:i,commandName:a,input:c(n.input),output:d(p),metadata:f}),r}catch(e){const{clientName:r,commandName:i,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:s}=o,l=s??t.inputFilterSensitiveLog;throw a?.error?.({clientName:r,commandName:i,input:l(n.input),error:e,metadata:e.$metadata}),e}},i={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},a=e=>({applyToStack:e=>{e.add(r(),i)}})},48377:(e,t,n)=>{"use strict";n.r(t),n.d(t,{addRecursionDetectionMiddlewareOptions:()=>s,getRecursionDetectionPlugin:()=>l,recursionDetectionMiddleware:()=>o});var r=n(14065),i=n(65606);const a="X-Amzn-Trace-Id",o=e=>t=>async n=>{const{request:o}=n;if(!r.HttpRequest.isInstance(o)||"node"!==e.runtime||o.headers.hasOwnProperty(a))return t(n);const s=i.env.AWS_LAMBDA_FUNCTION_NAME,l=i.env._X_AMZN_TRACE_ID,u=e=>"string"==typeof e&&e.length>0;return u(s)&&u(l)&&(o.headers[a]=l),t({...n,request:o})},s={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},l=e=>({applyToStack:t=>{t.add(o(e),s)}})},63684:(e,t,n)=>{"use strict";n.r(t),n.d(t,{checkFeatures:()=>a});var r=n(44445);const i=/\d{12}\.ddb/;async function a(e,t,n){const a=n.request;if("rpc-v2-cbor"===a?.headers?.["smithy-protocol"]&&(0,r.setFeature)(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?(0,r.setFeature)(e,"RETRY_MODE_ADAPTIVE","F"):(0,r.setFeature)(e,"RETRY_MODE_STANDARD","E"):(0,r.setFeature)(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(i)&&(0,r.setFeature)(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":(0,r.setFeature)(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":(0,r.setFeature)(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":(0,r.setFeature)(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const o=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(o?.$source){const t=o;t.accountId&&(0,r.setFeature)(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))(0,r.setFeature)(e,n,i)}}},97287:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_UA_APP_ID:()=>i,resolveUserAgentConfig:()=>a});var r=n(40033);const i=void 0;function a(e){const t=(0,r.normalizeProvider)(e.userAgentAppId??i);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}}}},36883:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SPACE:()=>a,UA_ESCAPE_CHAR:()=>u,UA_NAME_ESCAPE_REGEX:()=>s,UA_NAME_SEPARATOR:()=>o,UA_VALUE_ESCAPE_REGEX:()=>l,USER_AGENT:()=>r,X_AMZ_USER_AGENT:()=>i});const r="user-agent",i="x-amz-user-agent",a=" ",o="/",s=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,l=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,u="-"},59240:(e,t,n)=>{"use strict";n.r(t),n.d(t,{encodeFeatures:()=>i});const r=1024;function i(e){let t="";for(const n in e){const i=e[n];if(!(t.length+i.length+1<=r))break;t.length?t+=","+i:t+=i}return t}},44130:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_UA_APP_ID:()=>r.DEFAULT_UA_APP_ID,getUserAgentMiddlewareOptions:()=>i.getUserAgentMiddlewareOptions,getUserAgentPlugin:()=>i.getUserAgentPlugin,resolveUserAgentConfig:()=>r.resolveUserAgentConfig,userAgentMiddleware:()=>i.userAgentMiddleware});var r=n(97287),i=n(41576)},41576:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getUserAgentMiddlewareOptions:()=>c,getUserAgentPlugin:()=>d,userAgentMiddleware:()=>l});var r=n(95417),i=n(14065),a=n(63684),o=n(36883),s=n(59240);const l=e=>(t,n)=>async l=>{const{request:c}=l;if(!i.HttpRequest.isInstance(c))return t(l);const{headers:d}=c,f=n?.userAgent?.map(u)||[],p=(await e.defaultUserAgentProvider()).map(u);await(0,a.checkFeatures)(n,e,l);const h=n;p.push(`m/${(0,s.encodeFeatures)(Object.assign({},n.__smithy_context?.features,h.__aws_sdk_context?.features))}`);const g=e?.customUserAgent?.map(u)||[],m=await e.userAgentAppId();m&&p.push(u([`app/${m}`]));const y=(0,r.getUserAgentPrefix)(),v=(y?[y]:[]).concat([...p,...f,...g]).join(o.SPACE),b=[...p.filter((e=>e.startsWith("aws-sdk-"))),...g].join(o.SPACE);return"browser"!==e.runtime?(b&&(d[o.X_AMZ_USER_AGENT]=d[o.X_AMZ_USER_AGENT]?`${d[o.USER_AGENT]} ${b}`:b),d[o.USER_AGENT]=v):d[o.X_AMZ_USER_AGENT]=v,t({...l,request:c})},u=e=>{const t=e[0].split(o.UA_NAME_SEPARATOR).map((e=>e.replace(o.UA_NAME_ESCAPE_REGEX,o.UA_ESCAPE_CHAR))).join(o.UA_NAME_SEPARATOR),n=e[1]?.replace(o.UA_VALUE_ESCAPE_REGEX,o.UA_ESCAPE_CHAR),r=t.indexOf(o.UA_NAME_SEPARATOR),i=t.substring(0,r);let a=t.substring(r+1);return"api"===i&&(a=a.toLowerCase()),[i,a,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},c={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},d=e=>({applyToStack:t=>{t.add(l(e),c)}})},24163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAwsRegionExtensionConfiguration:()=>r,resolveAwsRegionExtensionConfiguration:()=>i});const r=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},i=e=>({region:e.region()})},95020:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>i.NODE_REGION_CONFIG_FILE_OPTIONS,NODE_REGION_CONFIG_OPTIONS:()=>i.NODE_REGION_CONFIG_OPTIONS,REGION_ENV_NAME:()=>i.REGION_ENV_NAME,REGION_INI_NAME:()=>i.REGION_INI_NAME,getAwsRegionExtensionConfiguration:()=>r.getAwsRegionExtensionConfiguration,resolveAwsRegionExtensionConfiguration:()=>r.resolveAwsRegionExtensionConfiguration,resolveRegionConfig:()=>i.resolveRegionConfig});var r=n(24163),i=n(20207)},8677:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>o,NODE_REGION_CONFIG_OPTIONS:()=>a,REGION_ENV_NAME:()=>r,REGION_INI_NAME:()=>i});const r="AWS_REGION",i="region",a={environmentVariableSelector:e=>e[r],configFileSelector:e=>e[i],default:()=>{throw new Error("Region is missing")}},o={preferredFile:"credentials"}},91663:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRealRegion:()=>i});var r=n(21615);const i=e=>(0,r.isFipsRegion)(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e},20207:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>r.NODE_REGION_CONFIG_FILE_OPTIONS,NODE_REGION_CONFIG_OPTIONS:()=>r.NODE_REGION_CONFIG_OPTIONS,REGION_ENV_NAME:()=>r.REGION_ENV_NAME,REGION_INI_NAME:()=>r.REGION_INI_NAME,resolveRegionConfig:()=>i.resolveRegionConfig});var r=n(8677),i=n(66277)},21615:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isFipsRegion:()=>r});const r=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},66277:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveRegionConfig:()=>a});var r=n(91663),i=n(21615);const a=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return(0,r.getRealRegion)(t);const e=await t();return(0,r.getRealRegion)(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!(0,i.isFipsRegion)(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}}},63560:(e,t,n)=>{"use strict";n.r(t),n.d(t,{awsEndpointFunctions:()=>s});var r=n(7069),i=n(28110),a=n(26169),o=n(73205);const s={isVirtualHostableS3Bucket:i.isVirtualHostableS3Bucket,parseArn:a.parseArn,partition:o.partition};r.customEndpointFunctions.aws=s},95417:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointError:()=>s.EndpointError,awsEndpointFunctions:()=>r.awsEndpointFunctions,getUserAgentPrefix:()=>i.getUserAgentPrefix,isIpAddress:()=>a.isIpAddress,partition:()=>i.partition,resolveEndpoint:()=>o.resolveEndpoint,setPartitionInfo:()=>i.setPartitionInfo,useDefaultPartitionInfo:()=>i.useDefaultPartitionInfo});var r=n(63560),i=n(73205),a=n(42150),o=n(59996),s=n(66367)},28110:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isVirtualHostableS3Bucket:()=>a});var r=n(7069),i=n(42150);const a=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!a(t))return!1;return!0}return!!(0,r.isValidHostLabel)(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!(0,i.isIpAddress)(e)))}},26169:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseArn:()=>r});const r=e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,a,o,...s]=t;if("arn"!==n||""===r||""===i||""===s.join(":"))return null;return{partition:r,service:i,region:a,accountId:o,resourceId:s.map((e=>e.split("/"))).flat()}}},73205:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getUserAgentPrefix:()=>u,partition:()=>o,setPartitionInfo:()=>s,useDefaultPartitionInfo:()=>l});var r=n(4787);let i=r,a="";const o=e=>{const{partitions:t}=i;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},s=(e,t="")=>{i=e,a=t},l=()=>{s(r,"")},u=()=>a},42150:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isIpAddress:()=>r.isIpAddress});var r=n(7069)},59996:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEndpoint:()=>r.resolveEndpoint});var r=n(7069)},43090:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointError:()=>r.EndpointError});var r=n(7069)},85767:(e,t,n)=>{"use strict";n.r(t)},73904:(e,t,n)=>{"use strict";n.r(t)},7234:(e,t,n)=>{"use strict";n.r(t)},16882:(e,t,n)=>{"use strict";n.r(t)},66367:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointError:()=>r.EndpointError});var r=n(43090);n(85767),n(73904),n(7234),n(16882),n(8890)},8890:(e,t,n)=>{"use strict";n.r(t)},77226:(e,t,n)=>{"use strict";n.r(t),n.d(t,{locateWindow:()=>i});const r={};function i(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},81772:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createDefaultUserAgentProvider:()=>a,defaultUserAgent:()=>o});var r=n(46880),i=n.n(r);const a=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?i().parse(window.navigator.userAgent):void 0,a=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&a.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&a.push([`app/${o}`]),a},o=a},22184:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>a,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>o,ENV_USE_DUALSTACK_ENDPOINT:()=>i,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>s});var r=n(20235);const i="AWS_USE_DUALSTACK_ENDPOINT",a="use_dualstack_endpoint",o=!1,s={environmentVariableSelector:e=>(0,r.booleanSelector)(e,i,r.SelectorType.ENV),configFileSelector:e=>(0,r.booleanSelector)(e,a,r.SelectorType.CONFIG),default:!1}},24570:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONFIG_USE_FIPS_ENDPOINT:()=>a,DEFAULT_USE_FIPS_ENDPOINT:()=>o,ENV_USE_FIPS_ENDPOINT:()=>i,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>s});var r=n(20235);const i="AWS_USE_FIPS_ENDPOINT",a="use_fips_endpoint",o=!1,s={environmentVariableSelector:e=>(0,r.booleanSelector)(e,i,r.SelectorType.ENV),configFileSelector:e=>(0,r.booleanSelector)(e,a,r.SelectorType.CONFIG),default:!1}},77918:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>r.CONFIG_USE_DUALSTACK_ENDPOINT,CONFIG_USE_FIPS_ENDPOINT:()=>i.CONFIG_USE_FIPS_ENDPOINT,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>r.DEFAULT_USE_DUALSTACK_ENDPOINT,DEFAULT_USE_FIPS_ENDPOINT:()=>i.DEFAULT_USE_FIPS_ENDPOINT,ENV_USE_DUALSTACK_ENDPOINT:()=>r.ENV_USE_DUALSTACK_ENDPOINT,ENV_USE_FIPS_ENDPOINT:()=>i.ENV_USE_FIPS_ENDPOINT,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>r.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>i.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,resolveCustomEndpointsConfig:()=>a.resolveCustomEndpointsConfig,resolveEndpointsConfig:()=>o.resolveEndpointsConfig});var r=n(22184),i=n(24570),a=n(93741),o=n(27392)},93741:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveCustomEndpointsConfig:()=>i});var r=n(40805);const i=e=>{const{endpoint:t,urlParser:n}=e;return{...e,tls:e.tls??!0,endpoint:(0,r.normalizeProvider)("string"==typeof t?n(t):t),isCustomEndpoint:!0,useDualstackEndpoint:(0,r.normalizeProvider)(e.useDualstackEndpoint??!1)}}},27392:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEndpointsConfig:()=>a});var r=n(40805),i=n(12621);const a=e=>{const t=(0,r.normalizeProvider)(e.useDualstackEndpoint??!1),{endpoint:n,useFipsEndpoint:a,urlParser:o}=e;return{...e,tls:e.tls??!0,endpoint:n?(0,r.normalizeProvider)("string"==typeof n?o(n):n):()=>(0,i.getEndpointFromRegion)({...e,useDualstackEndpoint:t,useFipsEndpoint:a}),isCustomEndpoint:!!n,useDualstackEndpoint:t}}},12621:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointFromRegion:()=>r});const r=async e=>{const{tls:t=!0}=e,n=await e.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw new Error("Invalid region in client config");const r=await e.useDualstackEndpoint(),i=await e.useFipsEndpoint(),{hostname:a}=await e.regionInfoProvider(n,{useDualstackEndpoint:r,useFipsEndpoint:i})??{};if(!a)throw new Error("Cannot resolve hostname from client config");return e.urlParser(`${t?"https:":"http:"}//${a}`)}},61329:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>r.CONFIG_USE_DUALSTACK_ENDPOINT,CONFIG_USE_FIPS_ENDPOINT:()=>r.CONFIG_USE_FIPS_ENDPOINT,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>r.DEFAULT_USE_DUALSTACK_ENDPOINT,DEFAULT_USE_FIPS_ENDPOINT:()=>r.DEFAULT_USE_FIPS_ENDPOINT,ENV_USE_DUALSTACK_ENDPOINT:()=>r.ENV_USE_DUALSTACK_ENDPOINT,ENV_USE_FIPS_ENDPOINT:()=>r.ENV_USE_FIPS_ENDPOINT,NODE_REGION_CONFIG_FILE_OPTIONS:()=>i.NODE_REGION_CONFIG_FILE_OPTIONS,NODE_REGION_CONFIG_OPTIONS:()=>i.NODE_REGION_CONFIG_OPTIONS,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>r.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>r.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,REGION_ENV_NAME:()=>i.REGION_ENV_NAME,REGION_INI_NAME:()=>i.REGION_INI_NAME,getRegionInfo:()=>a.getRegionInfo,resolveCustomEndpointsConfig:()=>r.resolveCustomEndpointsConfig,resolveEndpointsConfig:()=>r.resolveEndpointsConfig,resolveRegionConfig:()=>i.resolveRegionConfig});var r=n(77918),i=n(74800),a=n(69402)},54836:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>o,NODE_REGION_CONFIG_OPTIONS:()=>a,REGION_ENV_NAME:()=>r,REGION_INI_NAME:()=>i});const r="AWS_REGION",i="region",a={environmentVariableSelector:e=>e[r],configFileSelector:e=>e[i],default:()=>{throw new Error("Region is missing")}},o={preferredFile:"credentials"}},11168:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRealRegion:()=>i});var r=n(43154);const i=e=>(0,r.isFipsRegion)(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e},74800:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>r.NODE_REGION_CONFIG_FILE_OPTIONS,NODE_REGION_CONFIG_OPTIONS:()=>r.NODE_REGION_CONFIG_OPTIONS,REGION_ENV_NAME:()=>r.REGION_ENV_NAME,REGION_INI_NAME:()=>r.REGION_INI_NAME,resolveRegionConfig:()=>i.resolveRegionConfig});var r=n(54836),i=n(66658)},43154:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isFipsRegion:()=>r});const r=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},66658:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveRegionConfig:()=>a});var r=n(11168),i=n(43154);const a=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return(0,r.getRealRegion)(t);const e=await t();return(0,r.getRealRegion)(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!(0,i.isFipsRegion)(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}}},49028:(e,t,n)=>{"use strict";n.r(t)},2024:(e,t,n)=>{"use strict";n.r(t)},77053:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHostnameFromVariants:()=>r});const r=(e=[],{useFipsEndpoint:t,useDualstackEndpoint:n})=>e.find((({tags:e})=>t===e.includes("fips")&&n===e.includes("dualstack")))?.hostname},68374:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRegionInfo:()=>s});var r=n(77053),i=n(35675),a=n(49962),o=n(79391);const s=(e,{useFipsEndpoint:t=!1,useDualstackEndpoint:n=!1,signingService:s,regionHash:l,partitionHash:u})=>{const c=(0,a.getResolvedPartition)(e,{partitionHash:u}),d=e in l?e:u[c]?.endpoint??e,f={useFipsEndpoint:t,useDualstackEndpoint:n},p=(0,r.getHostnameFromVariants)(l[d]?.variants,f),h=(0,r.getHostnameFromVariants)(u[c]?.variants,f),g=(0,i.getResolvedHostname)(d,{regionHostname:p,partitionHostname:h});if(void 0===g)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:d,useFipsEndpoint:t,useDualstackEndpoint:n}}`);const m=(0,o.getResolvedSigningRegion)(g,{signingRegion:l[d]?.signingRegion,regionRegex:u[c].regionRegex,useFipsEndpoint:t});return{partition:c,signingService:s,hostname:g,...m&&{signingRegion:m},...l[d]?.signingService&&{signingService:l[d].signingService}}}},35675:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getResolvedHostname:()=>r});const r=(e,{regionHostname:t,partitionHostname:n})=>t||(n?n.replace("{region}",e):void 0)},49962:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getResolvedPartition:()=>r});const r=(e,{partitionHash:t})=>Object.keys(t||{}).find((n=>t[n].regions.includes(e)))??"aws"},79391:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getResolvedSigningRegion:()=>r});const r=(e,{signingRegion:t,regionRegex:n,useFipsEndpoint:r})=>{if(t)return t;if(r){const t=n.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),r=e.match(t);if(r)return r[0].slice(1,-1)}}},69402:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRegionInfo:()=>r.getRegionInfo});n(49028),n(2024);var r=n(68374)},6752:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSmithyContext:()=>i});var r=n(23911);const i=e=>e[r.SMITHY_CONTEXT_KEY]||(e[r.SMITHY_CONTEXT_KEY]={})},40033:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultIdentityProviderConfig:()=>c.DefaultIdentityProviderConfig,EXPIRATION_MS:()=>c.EXPIRATION_MS,HttpApiKeyAuthSigner:()=>c.HttpApiKeyAuthSigner,HttpBearerAuthSigner:()=>c.HttpBearerAuthSigner,NoAuthSigner:()=>c.NoAuthSigner,createIsIdentityExpiredFunction:()=>c.createIsIdentityExpiredFunction,createPaginator:()=>s.createPaginator,doesIdentityRequireRefresh:()=>c.doesIdentityRequireRefresh,getHttpAuthSchemeEndpointRuleSetPlugin:()=>i.getHttpAuthSchemeEndpointRuleSetPlugin,getHttpAuthSchemePlugin:()=>i.getHttpAuthSchemePlugin,getHttpSigningPlugin:()=>a.getHttpSigningPlugin,getSmithyContext:()=>r.getSmithyContext,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>i.httpAuthSchemeEndpointRuleSetMiddlewareOptions,httpAuthSchemeMiddleware:()=>i.httpAuthSchemeMiddleware,httpAuthSchemeMiddlewareOptions:()=>i.httpAuthSchemeMiddlewareOptions,httpSigningMiddleware:()=>a.httpSigningMiddleware,httpSigningMiddlewareOptions:()=>a.httpSigningMiddlewareOptions,isIdentityExpired:()=>c.isIdentityExpired,memoizeIdentityProvider:()=>c.memoizeIdentityProvider,normalizeProvider:()=>o.normalizeProvider,requestBuilder:()=>l.requestBuilder,setFeature:()=>u.setFeature});var r=n(6752),i=n(61922),a=n(55667),o=n(54367),s=n(52809),l=n(34727),u=n(52067),c=n(93927)},14761:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpAuthSchemeEndpointRuleSetPlugin:()=>a,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>i});var r=n(70909);const i={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},a=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:a=>{a.addRelativeTo((0,r.httpAuthSchemeMiddleware)(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),i)}})},50476:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpAuthSchemePlugin:()=>o,httpAuthSchemeMiddlewareOptions:()=>a});var r=n(32754),i=n(70909);const a={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:r.serializerMiddlewareOption.name},o=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo((0,i.httpAuthSchemeMiddleware)(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),a)}})},70909:(e,t,n)=>{"use strict";n.r(t),n.d(t,{httpAuthSchemeMiddleware:()=>i});n(23911);var r=n(40805);const i=(e,t)=>(n,i)=>async a=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,i,a.input)),s=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),l=(0,r.getSmithyContext)(i),u=[];for(const n of o){const r=s.get(n.schemeId);if(!r){u.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const a=r.identityProvider(await t.identityProviderConfigProvider(e));if(!a){u.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:o={},signingProperties:c={}}=n.propertiesExtractor?.(e,i)||{};n.identityProperties=Object.assign(n.identityProperties||{},o),n.signingProperties=Object.assign(n.signingProperties||{},c),l.selectedHttpAuthScheme={httpAuthOption:n,identity:await a(n.identityProperties),signer:r.signer};break}if(!l.selectedHttpAuthScheme)throw new Error(u.join("\n"));return n(a)}},61922:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpAuthSchemeEndpointRuleSetPlugin:()=>i.getHttpAuthSchemeEndpointRuleSetPlugin,getHttpAuthSchemePlugin:()=>a.getHttpAuthSchemePlugin,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>i.httpAuthSchemeEndpointRuleSetMiddlewareOptions,httpAuthSchemeMiddleware:()=>r.httpAuthSchemeMiddleware,httpAuthSchemeMiddlewareOptions:()=>a.httpAuthSchemeMiddlewareOptions});var r=n(70909),i=n(14761),a=n(50476)},17656:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpSigningPlugin:()=>a,httpSigningMiddlewareOptions:()=>i});var r=n(56596);const i={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},a=e=>({applyToStack:t=>{t.addRelativeTo((0,r.httpSigningMiddleware)(e),i)}})},56596:(e,t,n)=>{"use strict";n.r(t),n.d(t,{httpSigningMiddleware:()=>s});var r=n(14065),i=(n(23911),n(40805));const a=e=>e=>{throw e},o=(e,t)=>{},s=e=>(e,t)=>async n=>{if(!r.HttpRequest.isInstance(n.request))return e(n);const s=(0,i.getSmithyContext)(t).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:u,signer:c}=s,d=await e({...n,request:await c.sign(n.request,u,l)}).catch((c.errorHandler||a)(l));return(c.successHandler||o)(d.response,l),d}},55667:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpSigningPlugin:()=>i.getHttpSigningPlugin,httpSigningMiddleware:()=>r.httpSigningMiddleware,httpSigningMiddlewareOptions:()=>i.httpSigningMiddlewareOptions});var r=n(56596),i=n(17656)},54367:(e,t,n)=>{"use strict";n.r(t),n.d(t,{normalizeProvider:()=>r});const r=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t}},52809:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createPaginator:()=>i});const r=async(e,t,n,r=e=>e,...i)=>{let a=new e(n);return a=r(a)??a,await t.send(a,...i)};function i(e,t,n,i,o){return async function*(s,l,...u){const c=l;let d,f=s.startingToken??c[n],p=!0;for(;p;){if(c[n]=f,o&&(c[o]=c[o]??s.pageSize),!(s.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);d=await r(t,s.client,l,s.withCommand,...u),yield d;const h=f;f=a(d,i),p=!(!f||s.stopOnSameToken&&f===h)}}}const a=(e,t)=>{let n=e;const r=t.split(".");for(const e of r){if(!n||"object"!=typeof n)return;n=n[e]}return n}},34727:(e,t,n)=>{"use strict";n.r(t),n.d(t,{requestBuilder:()=>r.requestBuilder});var r=n(4351)},52067:(e,t,n)=>{"use strict";function r(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}n.r(t),n.d(t,{setFeature:()=>r})},72847:(e,t,n)=>{"use strict";n.r(t),n.d(t,{collectBody:()=>i});var r=n(42357);const i=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return r.Uint8ArrayBlobAdapter.mutate(e);if(!e)return r.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const n=t.streamCollector(e);return r.Uint8ArrayBlobAdapter.mutate(await n)}},27916:(e,t,n)=>{"use strict";function r(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}n.r(t),n.d(t,{extendedEncodeURIComponent:()=>r})},4351:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RequestBuilder:()=>a.RequestBuilder,collectBody:()=>r.collectBody,extendedEncodeURIComponent:()=>i.extendedEncodeURIComponent,requestBuilder:()=>a.requestBuilder,resolvedPath:()=>o.resolvedPath});var r=n(72847),i=n(27916),a=n(21591),o=n(63351)},21591:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RequestBuilder:()=>o,requestBuilder:()=>a});var r=n(14065),i=n(63351);function a(e,t){return new o(e,t)}class o{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:i}=await this.context.endpoint();this.path=i;for(const e of this.resolvePathStack)e(this.path);return new r.HttpRequest({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,n,r){return this.resolvePathStack.push((a=>{this.path=(0,i.resolvedPath)(a,this.input,e,t,n,r)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}},63351:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolvedPath:()=>i});var r=n(27916);const i=(e,t,n,i,a,o)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=i();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(a,o?t.split("/").map((e=>(0,r.extendedEncodeURIComponent)(e))).join("/"):(0,r.extendedEncodeURIComponent)(t))}return e}},30612:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultIdentityProviderConfig:()=>r});class r{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}},59732:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpApiKeyAuthSigner:()=>a});var r=n(14065),i=n(23911);class a{async sign(e,t,n){if(!n)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!n.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!n.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!t.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const a=r.HttpRequest.clone(e);if(n.in===i.HttpApiKeyAuthLocation.QUERY)a.query[n.name]=t.apiKey;else{if(n.in!==i.HttpApiKeyAuthLocation.HEADER)throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+n.in+"`");a.headers[n.name]=n.scheme?`${n.scheme} ${t.apiKey}`:t.apiKey}return a}}},20442:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpBearerAuthSigner:()=>i});var r=n(14065);class i{async sign(e,t,n){const i=r.HttpRequest.clone(e);if(!t.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return i.headers.Authorization=`Bearer ${t.token}`,i}}},54849:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpApiKeyAuthSigner:()=>r.HttpApiKeyAuthSigner,HttpBearerAuthSigner:()=>i.HttpBearerAuthSigner,NoAuthSigner:()=>a.NoAuthSigner});var r=n(59732),i=n(20442),a=n(45536)},45536:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NoAuthSigner:()=>r});class r{async sign(e,t,n){return e}}},93927:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultIdentityProviderConfig:()=>r.DefaultIdentityProviderConfig,EXPIRATION_MS:()=>a.EXPIRATION_MS,HttpApiKeyAuthSigner:()=>i.HttpApiKeyAuthSigner,HttpBearerAuthSigner:()=>i.HttpBearerAuthSigner,NoAuthSigner:()=>i.NoAuthSigner,createIsIdentityExpiredFunction:()=>a.createIsIdentityExpiredFunction,doesIdentityRequireRefresh:()=>a.doesIdentityRequireRefresh,isIdentityExpired:()=>a.isIdentityExpired,memoizeIdentityProvider:()=>a.memoizeIdentityProvider});var r=n(30612),i=n(54849),a=n(91431)},91431:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EXPIRATION_MS:()=>i,createIsIdentityExpiredFunction:()=>r,doesIdentityRequireRefresh:()=>o,isIdentityExpired:()=>a,memoizeIdentityProvider:()=>s});const r=e=>t=>o(t)&&t.expiration.getTime()-Date.now()void 0!==e.expiration,s=(e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,a,o,s=!1;const l=async e=>{a||(a=r(e));try{i=await a,o=!0,s=!1}finally{a=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await l(e)),i):async e=>(o&&!e?.forceRefresh||(i=await l(e)),s?i:n(i)?t(i)?(await l(e),i):i:(s=!0,i))}},47083:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventStreamCodec:()=>o});var r=n(60442),i=n(82281),a=n(60414);class o{constructor(e,t){this.headerMarshaller=new i.HeaderMarshaller(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),i=n.byteLength+t.byteLength+16,a=new Uint8Array(i),o=new DataView(a.buffer,a.byteOffset,a.byteLength),s=new r.Crc32;return o.setUint32(0,i,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,s.update(a.subarray(0,8)).digest(),!1),a.set(n,12),a.set(t,n.byteLength+12),o.setUint32(i-4,s.update(a.subarray(8,i-4)).digest(),!1),a}decode(e){const{headers:t,body:n}=(0,a.splitMessage)(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}},82281:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HeaderMarshaller:()=>o});var r,i=n(68004),a=n(24494);class o{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(o.buffer);return s.set(e.value,3),s;case"string":const l=this.fromUtf8(e.value),u=new DataView(new ArrayBuffer(3+l.byteLength));u.setUint8(0,7),u.setUint16(1,l.byteLength,!1);const c=new Uint8Array(u.buffer);return c.set(l,3),c;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(a.Int64.fromNumber(e.value.valueOf()).bytes,1),d;case"uuid":if(!m.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const f=new Uint8Array(17);return f[0]=9,f.set((0,i.fromHex)(e.value.replace(/\-/g,"")),1),f}}parse(e){const t={};let n=0;for(;n{"use strict";n.r(t),n.d(t,{Int64:()=>i});var r=n(68004);class i{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&a(t),new i(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&a(e),parseInt((0,r.toHex)(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function a(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}},19678:(e,t,n)=>{"use strict";n.r(t)},1796:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MessageDecoderStream:()=>r});class r{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}},89660:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MessageEncoderStream:()=>r});class r{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}},67178:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SmithyMessageDecoderStream:()=>r});class r{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}},82334:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SmithyMessageEncoderStream:()=>r});class r{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}},67709:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventStreamCodec:()=>r.EventStreamCodec,HeaderMarshaller:()=>i.HeaderMarshaller,Int64:()=>a.Int64,MessageDecoderStream:()=>o.MessageDecoderStream,MessageEncoderStream:()=>s.MessageEncoderStream,SmithyMessageDecoderStream:()=>l.SmithyMessageDecoderStream,SmithyMessageEncoderStream:()=>u.SmithyMessageEncoderStream});var r=n(47083),i=n(82281),a=n(24494),o=(n(19678),n(1796)),s=n(89660),l=n(67178),u=n(82334)},60414:(e,t,n)=>{"use strict";n.r(t),n.d(t,{splitMessage:()=>l});var r=n(60442);const i=4,a=2*i,o=4,s=a+2*o;function l({byteLength:e,byteOffset:t,buffer:n}){if(e{"use strict";n.r(t),n.d(t,{EventStreamMarshaller:()=>a});var r=n(59694),i=n(21258);class a{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new r.EventStreamMarshaller({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=o(e)?(0,i.readableStreamtoIterable)(e):e;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(0,i.iterableToReadableStream)(n):n}}const o=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream},9519:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventStreamMarshaller:()=>r.EventStreamMarshaller,eventStreamSerdeProvider:()=>i.eventStreamSerdeProvider,iterableToReadableStream:()=>a.iterableToReadableStream,readableStreamtoIterable:()=>a.readableStreamtoIterable});var r=n(55710),i=n(37034),a=n(21258)},37034:(e,t,n)=>{"use strict";n.r(t),n.d(t,{eventStreamSerdeProvider:()=>i});var r=n(55710);const i=e=>new r.EventStreamMarshaller(e)},21258:(e,t,n)=>{"use strict";n.r(t),n.d(t,{iterableToReadableStream:()=>i,readableStreamtoIterable:()=>r});const r=e=>({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)return;yield n}}finally{t.releaseLock()}}}),i=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})}},13001:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEventStreamSerdeConfig:()=>r});const r=e=>({...e,eventStreamMarshaller:e.eventStreamSerdeProvider(e)})},78504:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEventStreamSerdeConfig:()=>r.resolveEventStreamSerdeConfig});var r=n(13001)},86359:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventStreamMarshaller:()=>o});var r=n(67709),i=n(92964),a=n(96326);class o{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new r.EventStreamCodec(e,t),this.utfEncoder=e}deserialize(e,t){const n=(0,i.getChunkedStream)(e);return new r.SmithyMessageDecoderStream({messageStream:new r.MessageDecoderStream({inputStream:n,decoder:this.eventStreamCodec}),deserializer:(0,a.getMessageUnmarshaller)(t,this.utfEncoder)})}serialize(e,t){return new r.MessageEncoderStream({messageStream:new r.SmithyMessageEncoderStream({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}},92964:(e,t,n)=>{"use strict";function r(e){let t=0,n=0,r=null,i=null;const a=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e);new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:s}=await o.next();if(s){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const l=e.length;let u=0;for(;ur})},96326:(e,t,n)=>{"use strict";function r(e,t){const n=i(t.deserializer,t.toUtf8);return{[Symbol.asyncIterator]:async function*(){for await(const r of e){const e=t.eventStreamCodec.decode(r),i=await n(e);void 0!==i&&(yield i)}}}}function i(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},a=await e(i);if(a.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw a[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}n.r(t),n.d(t,{getMessageUnmarshaller:()=>i,getUnmarshalledStream:()=>r})},59694:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventStreamMarshaller:()=>r.EventStreamMarshaller,eventStreamSerdeProvider:()=>i.eventStreamSerdeProvider});var r=n(86359),i=n(78590)},78590:(e,t,n)=>{"use strict";n.r(t),n.d(t,{eventStreamSerdeProvider:()=>i});var r=n(86359);const i=e=>new r.EventStreamMarshaller(e)},42266:(e,t,n)=>{"use strict";function r(e,t){return new Request(e,t)}n.r(t),n.d(t,{createRequest:()=>r})},47896:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FetchHttpHandler:()=>l,keepAliveSupport:()=>s});var r=n(14065),i=n(65901),a=n(42266),o=n(61455);const s={supported:void 0};class l{static create(e){return"function"==typeof e?.handle?e:new l(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===s.supported&&(s.supported=Boolean("undefined"!=typeof Request&&"keepalive"in(0,a.createRequest)("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,l=!0===this.config.keepAlive,u=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let c=e.path;const d=(0,i.buildQueryString)(e.query||{});d&&(c+=`?${d}`),e.fragment&&(c+=`#${e.fragment}`);let f="";if(null!=e.username||null!=e.password){f=`${e.username??""}:${e.password??""}@`}const{port:p,method:h}=e,g=`${e.protocol}//${f}${e.hostname}${p?`:${p}`:""}${c}`,m="GET"===h||"HEAD"===h?void 0:e.body,y={body:m,headers:new Headers(e.headers),method:h,credentials:u};this.config?.cache&&(y.cache=this.config.cache),m&&(y.duplex="half"),"undefined"!=typeof AbortController&&(y.signal=t),s.supported&&(y.keepalive=l),"function"==typeof this.config.requestInit&&Object.assign(y,this.config.requestInit(e));let v=()=>{};const b=(0,a.createRequest)(g,y),x=[fetch(b).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new r.HttpResponse({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new r.HttpResponse({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),(0,o.requestTimeout)(n)];return t&&x.push(new Promise(((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),v=()=>e.removeEventListener("abort",r)}else t.onabort=r}))),Promise.race(x).finally(v)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}},61664:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FetchHttpHandler:()=>r.FetchHttpHandler,keepAliveSupport:()=>r.keepAliveSupport,streamCollector:()=>i.streamCollector});var r=n(47896),i=n(8612)},61455:(e,t,n)=>{"use strict";function r(e=0){return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}n.r(t),n.d(t,{requestTimeout:()=>r})},8612:(e,t,n)=>{"use strict";n.r(t),n.d(t,{streamCollector:()=>i});var r=n(33470);const i=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise(((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),a=i>-1?i+1:e.length;t(e.substring(a))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)}))}(e),n=(0,r.fromBase64)(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:a}=await n.read();a&&(t.push(a),i+=a.length),r=e}const a=new Uint8Array(i);let o=0;for(const e of t)a.set(e,o),o+=e.length;return a}(e)},70913:(e,t,n)=>{"use strict";n.r(t),n.d(t,{invalidFunction:()=>r.invalidFunction,invalidProvider:()=>i.invalidProvider});var r=n(90566),i=n(32423)},90566:(e,t,n)=>{"use strict";n.r(t),n.d(t,{invalidFunction:()=>r});const r=e=>()=>{throw new Error(e)}},32423:(e,t,n)=>{"use strict";n.r(t),n.d(t,{invalidProvider:()=>r});const r=e=>()=>Promise.reject(e)},43695:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isArrayBuffer:()=>r});const r=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e)},70649:(e,t,n)=>{"use strict";n.r(t),n.d(t,{contentLengthMiddleware:()=>a,contentLengthMiddlewareOptions:()=>o,getContentLengthPlugin:()=>s});var r=n(14065);const i="content-length";function a(e){return t=>async n=>{const a=n.request;if(r.HttpRequest.isInstance(a)){const{body:t,headers:n}=a;if(t&&-1===Object.keys(n).map((e=>e.toLowerCase())).indexOf(i))try{const n=e(t);a.headers={...a.headers,[i]:String(n)}}catch(e){}}return t({...n,request:a})}}const o={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},s=e=>({applyToStack:t=>{t.add(a(e.bodyLengthChecker),o)}})},26393:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createConfigValueProvider:()=>r});const r=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r}},110:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointFromConfig:()=>r});const r=async e=>{}},45935:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointFromInstructions:()=>s,resolveParams:()=>l});var r=n(35421),i=n(26393),a=n(110),o=n(18462);const s=async(e,t,n,r)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await(0,a.getEndpointFromConfig)(n.serviceId),e&&(n.endpoint=()=>Promise.resolve((0,o.toEndpointV1)(e)))}const i=await l(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},l=async(e,t,n)=>{const a={},o=t?.getEndpointParameterInstructions?.()||{};for(const[t,r]of Object.entries(o))switch(r.type){case"staticContextParams":a[t]=r.value;break;case"contextParams":a[t]=e[r.name];break;case"clientContextParams":case"builtInParams":a[t]=await(0,i.createConfigValueProvider)(r.name,t,n)();break;case"operationContextParams":a[t]=r.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(r))}return 0===Object.keys(o).length&&Object.assign(a,n),"s3"===String(n.serviceId).toLowerCase()&&await(0,r.resolveParamsForS3)(a),a}},18399:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointFromInstructions:()=>r.getEndpointFromInstructions,resolveParams:()=>r.resolveParams,toEndpointV1:()=>i.toEndpointV1});var r=n(45935),i=n(18462)},18462:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toEndpointV1:()=>i});var r=n(18065);const i=e=>"object"==typeof e?"url"in e?(0,r.parseUrl)(e.url):e:(0,r.parseUrl)(e)},2439:(e,t,n)=>{"use strict";n.r(t),n.d(t,{endpointMiddleware:()=>o});var r=n(40033),i=n(40805),a=n(45935);const o=({config:e,instructions:t})=>(n,o)=>async s=>{e.endpoint&&(0,r.setFeature)(o,"ENDPOINT_OVERRIDE","N");const l=await(0,a.getEndpointFromInstructions)(s.input,{getEndpointParameterInstructions:()=>t},{...e},o);o.endpointV2=l,o.authSchemes=l.properties?.authSchemes;const u=o.authSchemes?.[0];if(u){o.signing_region=u.signingRegion,o.signing_service=u.signingName;const e=(0,i.getSmithyContext)(o),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:u.signingRegion,signingRegion:u.signingRegion,signing_service:u.signingName,signingName:u.signingName,signingRegionSet:u.signingRegionSet},u.properties))}return n({...s})}},58626:(e,t,n)=>{"use strict";n.r(t),n.d(t,{endpointMiddlewareOptions:()=>a,getEndpointPlugin:()=>o});var r=n(32754),i=n(2439);const a={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:r.serializerMiddlewareOption.name},o=(e,t)=>({applyToStack:n=>{n.addRelativeTo((0,i.endpointMiddleware)({config:e,instructions:t}),a)}})},72540:(e,t,n)=>{"use strict";n.r(t),n.d(t,{endpointMiddleware:()=>i.endpointMiddleware,endpointMiddlewareOptions:()=>a.endpointMiddlewareOptions,getEndpointFromInstructions:()=>r.getEndpointFromInstructions,getEndpointPlugin:()=>a.getEndpointPlugin,resolveEndpointConfig:()=>o.resolveEndpointConfig,resolveParams:()=>r.resolveParams,toEndpointV1:()=>r.toEndpointV1});var r=n(18399),i=n(2439),a=n(58626),o=n(42795);n(51385)},42795:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEndpointConfig:()=>o});var r=n(40805),i=n(110),a=n(18462);const o=e=>{const t=e.tls??!0,{endpoint:n}=e,o=null!=n?async()=>(0,a.toEndpointV1)(await(0,r.normalizeProvider)(n)()):void 0,s=!!n,l={...e,endpoint:o,tls:t,isCustomEndpoint:s,useDualstackEndpoint:(0,r.normalizeProvider)(e.useDualstackEndpoint??!1),useFipsEndpoint:(0,r.normalizeProvider)(e.useFipsEndpoint??!1)};let u;return l.serviceConfiguredEndpoint=async()=>(e.serviceId&&!u&&(u=(0,i.getEndpointFromConfig)(e.serviceId)),u),l}},35421:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DOT_PATTERN:()=>r.DOT_PATTERN,S3_HOSTNAME_PATTERN:()=>r.S3_HOSTNAME_PATTERN,isArnBucketName:()=>r.isArnBucketName,isDnsCompatibleBucketName:()=>r.isDnsCompatibleBucketName,resolveParamsForS3:()=>r.resolveParamsForS3});var r=n(49467)},49467:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DOT_PATTERN:()=>s,S3_HOSTNAME_PATTERN:()=>l,isArnBucketName:()=>c,isDnsCompatibleBucketName:()=>u,resolveParamsForS3:()=>r});const r=async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),c(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!u(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},i=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,a=/(\d+\.){3}\d+/,o=/\.\./,s=/\./,l=/^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./,u=e=>i.test(e)&&!a.test(e)&&!o.test(e),c=e=>{const[t,n,r,,,i]=e.split(":"),a="arn"===t&&e.split(":").length>=6,o=Boolean(a&&n&&r&&i);if(a&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o}},51385:(e,t,n)=>{"use strict";n.r(t)},52952:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AdaptiveRetryStrategy:()=>a});var r=n(56265),i=n(21973);class a extends i.StandardRetryStrategy{constructor(e,t){const{rateLimiter:n,...i}=t??{};super(e,i),this.rateLimiter=n??new r.DefaultRateLimiter,this.mode=r.RETRY_MODES.ADAPTIVE}async retry(e,t){return super.retry(e,t,{beforeRequest:async()=>this.rateLimiter.getSendToken(),afterRequest:e=>{this.rateLimiter.updateClientSendingRate(e)}})}}},21973:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StandardRetryStrategy:()=>d});var r=n(14065),i=n(42653),a=n(56265),o=n(12634),s=n(97701),l=n(31038),u=n(99933),c=n(15901);class d{constructor(e,t){this.maxAttemptsProvider=e,this.mode=a.RETRY_MODES.STANDARD,this.retryDecider=t?.retryDecider??u.defaultRetryDecider,this.delayDecider=t?.delayDecider??l.defaultDelayDecider,this.retryQuota=t?.retryQuota??(0,s.getDefaultRetryQuota)(a.INITIAL_RETRY_TOKENS)}shouldRetry(e,t,n){return tsetTimeout(e,r)));continue}throw t.$metadata||(t.$metadata={}),t.$metadata.attempts=l,t.$metadata.totalRetryDelay=u,t}}}const f=e=>{if(!r.HttpResponse.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],i=Number(n);if(!Number.isNaN(i))return 1e3*i;return new Date(n).getTime()-Date.now()}},25998:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONFIG_MAX_ATTEMPTS:()=>o,CONFIG_RETRY_MODE:()=>c,ENV_MAX_ATTEMPTS:()=>a,ENV_RETRY_MODE:()=>u,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>s,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>d,resolveRetryConfig:()=>l});var r=n(40805),i=n(56265);const a="AWS_MAX_ATTEMPTS",o="max_attempts",s={environmentVariableSelector:e=>{const t=e[a];if(!t)return;const n=parseInt(t);if(Number.isNaN(n))throw new Error(`Environment variable ${a} mast be a number, got "${t}"`);return n},configFileSelector:e=>{const t=e[o];if(!t)return;const n=parseInt(t);if(Number.isNaN(n))throw new Error(`Shared config file entry ${o} mast be a number, got "${t}"`);return n},default:i.DEFAULT_MAX_ATTEMPTS},l=e=>{const{retryStrategy:t}=e,n=(0,r.normalizeProvider)(e.maxAttempts??i.DEFAULT_MAX_ATTEMPTS);return{...e,maxAttempts:n,retryStrategy:async()=>{if(t)return t;return await(0,r.normalizeProvider)(e.retryMode)()===i.RETRY_MODES.ADAPTIVE?new i.AdaptiveRetryStrategy(n):new i.StandardRetryStrategy(n)}}},u="AWS_RETRY_MODE",c="retry_mode",d={environmentVariableSelector:e=>e[u],configFileSelector:e=>e[c],default:i.DEFAULT_RETRY_MODE}},97701:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDefaultRetryQuota:()=>i});var r=n(56265);const i=(e,t)=>{const n=e,i=t?.noRetryIncrement??r.NO_RETRY_INCREMENT,a=t?.retryCost??r.RETRY_COST,o=t?.timeoutRetryCost??r.TIMEOUT_RETRY_COST;let s=e;const l=e=>"TimeoutError"===e.name?o:a,u=e=>l(e)<=s;return Object.freeze({hasRetryTokens:u,retrieveRetryTokens:e=>{if(!u(e))throw new Error("No retry token available");const t=l(e);return s-=t,t},releaseRetryTokens:e=>{s+=e??i,s=Math.min(s,n)}})}},31038:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultDelayDecider:()=>i});var r=n(56265);const i=(e,t)=>Math.floor(Math.min(r.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e))},41069:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AdaptiveRetryStrategy:()=>r.AdaptiveRetryStrategy,CONFIG_MAX_ATTEMPTS:()=>a.CONFIG_MAX_ATTEMPTS,CONFIG_RETRY_MODE:()=>a.CONFIG_RETRY_MODE,ENV_MAX_ATTEMPTS:()=>a.ENV_MAX_ATTEMPTS,ENV_RETRY_MODE:()=>a.ENV_RETRY_MODE,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>a.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>a.NODE_RETRY_MODE_CONFIG_OPTIONS,StandardRetryStrategy:()=>i.StandardRetryStrategy,defaultDelayDecider:()=>o.defaultDelayDecider,defaultRetryDecider:()=>l.defaultRetryDecider,getOmitRetryHeadersPlugin:()=>s.getOmitRetryHeadersPlugin,getRetryAfterHint:()=>u.getRetryAfterHint,getRetryPlugin:()=>u.getRetryPlugin,omitRetryHeadersMiddleware:()=>s.omitRetryHeadersMiddleware,omitRetryHeadersMiddlewareOptions:()=>s.omitRetryHeadersMiddlewareOptions,resolveRetryConfig:()=>a.resolveRetryConfig,retryMiddleware:()=>u.retryMiddleware,retryMiddlewareOptions:()=>u.retryMiddlewareOptions});var r=n(52952),i=n(21973),a=n(25998),o=n(31038),s=n(56908),l=n(99933),u=n(34923)},81738:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isStreamingPayload:()=>r});const r=e=>e?.body instanceof ReadableStream},56908:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getOmitRetryHeadersPlugin:()=>s,omitRetryHeadersMiddleware:()=>a,omitRetryHeadersMiddlewareOptions:()=>o});var r=n(14065),i=n(56265);const a=()=>e=>async t=>{const{request:n}=t;return r.HttpRequest.isInstance(n)&&(delete n.headers[i.INVOCATION_ID_HEADER],delete n.headers[i.REQUEST_HEADER]),e(t)},o={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},s=e=>({applyToStack:e=>{e.addRelativeTo(a(),o)}})},99933:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultRetryDecider:()=>i});var r=n(42653);const i=e=>!!e&&((0,r.isRetryableByTrait)(e)||(0,r.isClockSkewError)(e)||(0,r.isThrottlingError)(e)||(0,r.isTransientError)(e))},34923:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRetryAfterHint:()=>m,getRetryPlugin:()=>g,retryMiddleware:()=>c,retryMiddlewareOptions:()=>h});var r=n(14065),i=n(42653),a=n(31796),o=n(56265),s=n(12634),l=n(81738),u=n(15901);const c=e=>(t,n)=>async i=>{let c=await e.retryStrategy();const p=await e.maxAttempts();if(!d(c))return c?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",c.mode]]),c.retry(t,i);{let e=await c.acquireInitialRetryToken(n.partition_id),d=new Error,h=0,g=0;const{request:m}=i,y=r.HttpRequest.isInstance(m);for(y&&(m.headers[o.INVOCATION_ID_HEADER]=(0,s.v4)());;)try{y&&(m.headers[o.REQUEST_HEADER]=`attempt=${h+1}; max=${p}`);const{response:n,output:r}=await t(i);return c.recordSuccess(e),r.$metadata.attempts=h+1,r.$metadata.totalRetryDelay=g,{response:n,output:r}}catch(t){const r=f(t);if(d=(0,u.asSdkError)(t),y&&(0,l.isStreamingPayload)(m))throw(n.logger instanceof a.NoOpLogger?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),d;try{e=await c.refreshRetryTokenForRetry(e,r)}catch(e){throw d.$metadata||(d.$metadata={}),d.$metadata.attempts=h+1,d.$metadata.totalRetryDelay=g,d}h=e.getRetryCount();const i=e.getRetryDelay();g+=i,await new Promise((e=>setTimeout(e,i)))}}},d=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,f=e=>{const t={error:e,errorType:p(e)},n=m(e.$response);return n&&(t.retryAfterHint=n),t},p=e=>(0,i.isThrottlingError)(e)?"THROTTLING":(0,i.isTransientError)(e)?"TRANSIENT":(0,i.isServerError)(e)?"SERVER_ERROR":"CLIENT_ERROR",h={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},g=e=>({applyToStack:t=>{t.add(c(e),h)}}),m=e=>{if(!r.HttpResponse.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],i=Number(n);if(!Number.isNaN(i))return new Date(1e3*i);return new Date(n)}},15901:(e,t,n)=>{"use strict";n.r(t),n.d(t,{asSdkError:()=>r});const r=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`)},47755:(e,t,n)=>{"use strict";n.r(t),n.d(t,{deserializerMiddleware:()=>r});const r=(e,t)=>n=>async r=>{const{response:i}=await n(r);try{return{response:i,output:await t(i,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:i}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}}},32754:(e,t,n)=>{"use strict";n.r(t),n.d(t,{deserializerMiddleware:()=>r.deserializerMiddleware,deserializerMiddlewareOption:()=>i.deserializerMiddlewareOption,getSerdePlugin:()=>i.getSerdePlugin,serializerMiddleware:()=>a.serializerMiddleware,serializerMiddlewareOption:()=>i.serializerMiddlewareOption});var r=n(47755),i=n(54340),a=n(64860)},54340:(e,t,n)=>{"use strict";n.r(t),n.d(t,{deserializerMiddlewareOption:()=>a,getSerdePlugin:()=>s,serializerMiddlewareOption:()=>o});var r=n(47755),i=n(64860);const a={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},o={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function s(e,t,n){return{applyToStack:s=>{s.add((0,r.deserializerMiddleware)(e,n),a),s.add((0,i.serializerMiddleware)(e,t),o)}}}},64860:(e,t,n)=>{"use strict";n.r(t),n.d(t,{serializerMiddleware:()=>r});const r=(e,t)=>(n,r)=>async i=>{const a=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!a)throw new Error("No valid endpoint provider available.");const o=await t(i.input,{...e,endpoint:a});return n({...i,request:o})}},61671:(e,t,n)=>{"use strict";n.r(t),n.d(t,{constructStack:()=>a});const r=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},i=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,a=()=>{let e=[],t=[],n=!1;const l=new Set,u=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(f.identifyOnResolve()),n),c=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t},d=(n=!1)=>{const a=[],l=[],u={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of r(t.name,t.aliases))u[e]=t;a.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of r(t.name,t.aliases))u[e]=t;l.push(t)})),l.forEach((e=>{if(e.toMiddleware){const t=u[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${i(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));var d;return(d=a,d.sort(((e,t)=>o[t.step]-o[e.step]||s[t.priority||"normal"]-s[e.priority||"normal"]))).map(c).reduce(((e,t)=>(e.push(...t),e)),[])},f={add:(t,n={})=>{const{name:a,override:o,aliases:s}=n,u={step:"initialize",priority:"normal",middleware:t,...n},c=r(a,s);if(c.length>0){if(c.some((e=>l.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${i(a,s)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const r=e[n];if(r.step!==u.step||u.priority!==r.priority)throw new Error(`"${i(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${i(a,s)}" middleware with ${u.priority} priority in ${u.step} step.`);e.splice(n,1)}}for(const e of c)l.add(e)}e.push(u)},addRelativeTo:(e,n)=>{const{name:a,override:o,aliases:s}=n,u={middleware:e,...n},c=r(a,s);if(c.length>0){if(c.some((e=>l.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${i(a,s)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==u.toMiddleware||r.relation!==u.relation)throw new Error(`"${i(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${i(a,s)}" middleware ${u.relation} "${u.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)l.add(e)}t.push(u)},clone:()=>u(a()),use:e=>{e.applyToStack(f)},remove:n=>"string"==typeof n?(n=>{let i=!1;const a=e=>{const t=r(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)l.delete(e);return!1}return!0};return e=e.filter(a),t=t.filter(a),i})(n):(n=>{let i=!1;const a=e=>{if(e.middleware===n){i=!0;for(const t of r(e.name,e.aliases))l.delete(t);return!1}return!0};return e=e.filter(a),t=t.filter(a),i})(n),removeByTag:n=>{let i=!1;const a=e=>{const{tags:t,name:a,aliases:o}=e;if(t&&t.includes(n)){const e=r(a,o);for(const t of e)l.delete(t);return i=!0,!1}return!0};return e=e.filter(a),t=t.filter(a),i},concat:e=>{const t=u(a());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:u,identify:()=>d(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return i(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of d().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(f.identify()),e}};return f},o={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},s={high:3,normal:2,low:1}},14795:(e,t,n)=>{"use strict";n.r(t),n.d(t,{constructStack:()=>r.constructStack});var r=n(61671)},83052:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CredentialsProviderError:()=>i});var r=n(96014);class i extends r.ProviderError{constructor(e,t=!0){super(e,t),this.name="CredentialsProviderError",Object.setPrototypeOf(this,i.prototype)}}},96014:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ProviderError:()=>r});class r extends Error{constructor(e,t=!0){let n,i=!0;"boolean"==typeof t?(n=void 0,i=t):null!=t&&"object"==typeof t&&(n=t.logger,i=t.tryNextLink??!0),super(e),this.name="ProviderError",this.tryNextLink=i,Object.setPrototypeOf(this,r.prototype),n?.debug?.(`@smithy/property-provider ${i?"->":"(!)"} ${e}`)}static from(e,t=!0){return Object.assign(new this(e.message,t),e)}}},97513:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TokenProviderError:()=>i});var r=n(96014);class i extends r.ProviderError{constructor(e,t=!0){super(e,t),this.name="TokenProviderError",Object.setPrototypeOf(this,i.prototype)}}},78062:(e,t,n)=>{"use strict";n.r(t),n.d(t,{chain:()=>i});var r=n(96014);const i=(...e)=>async()=>{if(0===e.length)throw new r.ProviderError("No providers in chain");let t;for(const n of e)try{return await n()}catch(e){if(t=e,e?.tryNextLink)continue;throw e}throw t}},72269:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromStatic:()=>r});const r=e=>()=>Promise.resolve(e)},10223:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CredentialsProviderError:()=>r.CredentialsProviderError,ProviderError:()=>i.ProviderError,TokenProviderError:()=>a.TokenProviderError,chain:()=>o.chain,fromStatic:()=>s.fromStatic,memoize:()=>l.memoize});var r=n(83052),i=n(96014),a=n(97513),o=n(78062),s=n(72269),l=n(63783)},63783:(e,t,n)=>{"use strict";n.r(t),n.d(t,{memoize:()=>r});const r=(e,t,n)=>{let r,i,a,o=!1;const s=async()=>{i||(i=e());try{r=await i,a=!0,o=!1}finally{i=void 0}return r};return void 0===t?async e=>(a&&!e?.forceRefresh||(r=await s()),r):async e=>(a&&!e?.forceRefresh||(r=await s()),o?r:n&&!n(r)?(o=!0,r):t(r)?(await s(),r):r)}},28281:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Field:()=>i});var r=n(23911);class i{constructor({name:e,kind:t=r.FieldPosition.HEADER,values:n=[]}){this.name=e,this.kind=t,this.values=n}add(e){this.values.push(e)}set(e){this.values=e}remove(e){this.values=this.values.filter((t=>t!==e))}toString(){return this.values.map((e=>e.includes(",")||e.includes(" ")?`"${e}"`:e)).join(", ")}get(){return this.values}}},99260:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Fields:()=>r});class r{constructor({fields:e=[],encoding:t="utf-8"}){this.entries={},e.forEach(this.setField.bind(this)),this.encoding=t}setField(e){this.entries[e.name.toLowerCase()]=e}getField(e){return this.entries[e.toLowerCase()]}removeField(e){delete this.entries[e.toLowerCase()]}getByType(e){return Object.values(this.entries).filter((t=>t.kind===e))}}},22927:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpHandlerExtensionConfiguration:()=>r,resolveHttpHandlerRuntimeConfig:()=>i});const r=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},i=e=>({httpHandler:e.httpHandler()})},9640:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHttpHandlerExtensionConfiguration:()=>r.getHttpHandlerExtensionConfiguration,resolveHttpHandlerRuntimeConfig:()=>r.resolveHttpHandlerRuntimeConfig});var r=n(22927)},83229:(e,t,n)=>{"use strict";n.r(t)},67324:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpRequest:()=>r});class r{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new r({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce(((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return r.clone(this)}}},4094:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpResponse:()=>r});class r{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}},14065:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Field:()=>i.Field,Fields:()=>a.Fields,HttpRequest:()=>o.HttpRequest,HttpResponse:()=>s.HttpResponse,getHttpHandlerExtensionConfiguration:()=>r.getHttpHandlerExtensionConfiguration,isValidHostname:()=>l.isValidHostname,resolveHttpHandlerRuntimeConfig:()=>r.resolveHttpHandlerRuntimeConfig});var r=n(9640),i=n(28281),a=n(99260),o=(n(83229),n(67324)),s=n(4094),l=n(38610);n(76576)},38610:(e,t,n)=>{"use strict";function r(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}n.r(t),n.d(t,{isValidHostname:()=>r})},76576:(e,t,n)=>{"use strict";n.r(t)},65901:(e,t,n)=>{"use strict";n.r(t),n.d(t,{buildQueryString:()=>i});var r=n(78611);function i(e){const t=[];for(let n of Object.keys(e).sort()){const i=e[n];if(n=(0,r.escapeUri)(n),Array.isArray(i))for(let e=0,a=i.length;e{"use strict";function r(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}n.r(t),n.d(t,{parseQueryString:()=>r})},98388:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CLOCK_SKEW_ERROR_CODES:()=>r,NODEJS_TIMEOUT_ERROR_CODES:()=>s,THROTTLING_ERROR_CODES:()=>i,TRANSIENT_ERROR_CODES:()=>a,TRANSIENT_ERROR_STATUS_CODES:()=>o});const r=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],i=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],a=["TimeoutError","RequestTimeout","RequestTimeoutException"],o=[500,502,503,504],s=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]},42653:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isClockSkewCorrectedError:()=>o,isClockSkewError:()=>a,isRetryableByTrait:()=>i,isServerError:()=>u,isThrottlingError:()=>s,isTransientError:()=>l});var r=n(98388);const i=e=>void 0!==e.$retryable,a=e=>r.CLOCK_SKEW_ERROR_CODES.includes(e.name),o=e=>e.$metadata?.clockSkewCorrected,s=e=>429===e.$metadata?.httpStatusCode||r.THROTTLING_ERROR_CODES.includes(e.name)||1==e.$retryable?.throttling,l=(e,t=0)=>o(e)||r.TRANSIENT_ERROR_CODES.includes(e.name)||r.NODEJS_TIMEOUT_ERROR_CODES.includes(e?.code||"")||r.TRANSIENT_ERROR_STATUS_CODES.includes(e.$metadata?.httpStatusCode||0)||void 0!==e.cause&&t<=10&&l(e.cause,t+1),u=e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!l(e)}return!1}},52364:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HeaderFormatter:()=>o,Int64:()=>l});var r,i=n(68004),a=n(14246);class o{format(e){const t=[];for(const n of Object.keys(e)){const r=(0,a.fromUtf8)(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);const u=new Uint8Array(o.buffer);return u.set(e.value,3),u;case"string":const c=(0,a.fromUtf8)(e.value),d=new DataView(new ArrayBuffer(3+c.byteLength));d.setUint8(0,7),d.setUint16(1,c.byteLength,!1);const f=new Uint8Array(d.buffer);return f.set(c,3),f;case"timestamp":const p=new Uint8Array(9);return p[0]=8,p.set(l.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!s.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const h=new Uint8Array(17);return h[0]=9,h.set((0,i.fromHex)(e.value.replace(/\-/g,"")),1),h}}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(r||(r={}));const s=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class l{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&u(t),new l(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&u(e),parseInt((0,i.toHex)(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function u(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}},97045:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SignatureV4:()=>y});var r=n(68004),i=n(40805),a=n(78611),o=n(14246),s=n(67120),l=n(3321),u=n(3245),c=n(48859),d=n(58755),f=n(52364),p=n(79092),h=n(38737),g=n(1969),m=n(73533);class y{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:a,uriEscapePath:o=!0}){this.headerFormatter=new f.HeaderFormatter,this.service=r,this.sha256=a,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,i.normalizeProvider)(n),this.credentialProvider=(0,i.normalizeProvider)(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:a,signableHeaders:o,hoistableHeaders:c,signingRegion:f,signingService:p}=t,m=await this.credentialProvider();this.validateResolvedCredentials(m);const y=f??await this.regionProvider(),{longDate:x,shortDate:E}=v(n);if(r>s.MAX_PRESIGNED_TTL)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const S=(0,l.createScope)(E,y,p??this.service),w=(0,h.moveHeadersToQuery)((0,g.prepareRequest)(e),{unhoistableHeaders:a,hoistableHeaders:c});m.sessionToken&&(w.query[s.TOKEN_QUERY_PARAM]=m.sessionToken),w.query[s.ALGORITHM_QUERY_PARAM]=s.ALGORITHM_IDENTIFIER,w.query[s.CREDENTIAL_QUERY_PARAM]=`${m.accessKeyId}/${S}`,w.query[s.AMZ_DATE_QUERY_PARAM]=x,w.query[s.EXPIRES_QUERY_PARAM]=r.toString(10);const _=(0,u.getCanonicalHeaders)(w,i,o);return w.query[s.SIGNED_HEADERS_QUERY_PARAM]=b(_),w.query[s.SIGNATURE_QUERY_PARAM]=await this.getSignature(x,S,this.getSigningKey(m,y,E,p),this.createCanonicalRequest(w,_,await(0,d.getPayloadHash)(e,this.sha256))),w}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:i,signingRegion:a,signingService:o}){const u=a??await this.regionProvider(),{shortDate:c,longDate:f}=v(n),p=(0,l.createScope)(c,u,o??this.service),h=await(0,d.getPayloadHash)({headers:{},body:t},this.sha256),g=new this.sha256;g.update(e);const m=(0,r.toHex)(await g.digest()),y=[s.EVENT_ALGORITHM_IDENTIFIER,f,p,i,m,h].join("\n");return this.signString(y,{signingDate:n,signingRegion:u,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:i}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const s=n??await this.regionProvider(),{shortDate:l}=v(t),u=new this.sha256(await this.getSigningKey(a,s,l,i));return u.update((0,o.toUint8Array)(e)),(0,r.toHex)(await u.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:a}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const c=i??await this.regionProvider(),f=(0,g.prepareRequest)(e),{longDate:h,shortDate:m}=v(t),y=(0,l.createScope)(m,c,a??this.service);f.headers[s.AMZ_DATE_HEADER]=h,o.sessionToken&&(f.headers[s.TOKEN_HEADER]=o.sessionToken);const x=await(0,d.getPayloadHash)(f,this.sha256);!(0,p.hasHeader)(s.SHA256_HEADER,f.headers)&&this.applyChecksum&&(f.headers[s.SHA256_HEADER]=x);const E=(0,u.getCanonicalHeaders)(f,r,n),S=await this.getSignature(h,y,this.getSigningKey(o,c,m,a),this.createCanonicalRequest(f,E,x));return f.headers[s.AUTH_HEADER]=`${s.ALGORITHM_IDENTIFIER} Credential=${o.accessKeyId}/${y}, SignedHeaders=${b(E)}, Signature=${S}`,f}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(0,c.getCanonicalQuery)(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n){const i=new this.sha256;i.update((0,o.toUint8Array)(n));const a=await i.digest();return`${s.ALGORITHM_IDENTIFIER}\n${e}\n${t}\n${(0,r.toHex)(a)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return(0,a.escapeUri)(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,i){const a=await this.createStringToSign(e,t,i),s=new this.sha256(await n);return s.update((0,o.toUint8Array)(a)),(0,r.toHex)(await s.digest())}getSigningKey(e,t,n,r){return(0,l.getSigningKey)(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const v=e=>{const t=(0,m.iso8601)(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},b=e=>Object.keys(e).sort().join(";")},67120:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ALGORITHM_IDENTIFIER:()=>w,ALGORITHM_IDENTIFIER_V4A:()=>_,ALGORITHM_QUERY_PARAM:()=>r,ALWAYS_UNSIGNABLE_HEADERS:()=>b,AMZ_DATE_HEADER:()=>f,AMZ_DATE_QUERY_PARAM:()=>a,AUTH_HEADER:()=>d,CREDENTIAL_QUERY_PARAM:()=>i,DATE_HEADER:()=>p,EVENT_ALGORITHM_IDENTIFIER:()=>A,EXPIRES_QUERY_PARAM:()=>s,GENERATED_HEADERS:()=>h,HOST_HEADER:()=>v,KEY_TYPE_IDENTIFIER:()=>k,MAX_CACHE_SIZE:()=>T,MAX_PRESIGNED_TTL:()=>R,PROXY_HEADER_PATTERN:()=>x,REGION_SET_PARAM:()=>c,SEC_HEADER_PATTERN:()=>E,SHA256_HEADER:()=>m,SIGNATURE_HEADER:()=>g,SIGNATURE_QUERY_PARAM:()=>l,SIGNED_HEADERS_QUERY_PARAM:()=>o,TOKEN_HEADER:()=>y,TOKEN_QUERY_PARAM:()=>u,UNSIGNABLE_PATTERNS:()=>S,UNSIGNED_PAYLOAD:()=>C});const r="X-Amz-Algorithm",i="X-Amz-Credential",a="X-Amz-Date",o="X-Amz-SignedHeaders",s="X-Amz-Expires",l="X-Amz-Signature",u="X-Amz-Security-Token",c="X-Amz-Region-Set",d="authorization",f=a.toLowerCase(),p="date",h=[d,f,p],g=l.toLowerCase(),m="x-amz-content-sha256",y=u.toLowerCase(),v="host",b={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},x=/^proxy-/,E=/^sec-/,S=[/^proxy-/i,/^sec-/i],w="AWS4-HMAC-SHA256",_="AWS4-ECDSA-P256-SHA256",A="AWS4-HMAC-SHA256-PAYLOAD",C="UNSIGNED-PAYLOAD",T=50,k="aws4_request",R=604800},3321:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clearCredentialCache:()=>c,createScope:()=>l,getSigningKey:()=>u});var r=n(68004),i=n(14246),a=n(67120);const o={},s=[],l=(e,t,n)=>`${e}/${t}/${n}/${a.KEY_TYPE_IDENTIFIER}`,u=async(e,t,n,i,l)=>{const u=await d(e,t.secretAccessKey,t.accessKeyId),c=`${n}:${i}:${l}:${(0,r.toHex)(u)}:${t.sessionToken}`;if(c in o)return o[c];for(s.push(c);s.length>a.MAX_CACHE_SIZE;)delete o[s.shift()];let f=`AWS4${t.secretAccessKey}`;for(const t of[n,i,l,a.KEY_TYPE_IDENTIFIER])f=await d(e,f,t);return o[c]=f},c=()=>{s.length=0,Object.keys(o).forEach((e=>{delete o[e]}))},d=(e,t,n)=>{const r=new e(t);return r.update((0,i.toUint8Array)(n)),r.digest()}},3245:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getCanonicalHeaders:()=>i});var r=n(67120);const i=({headers:e},t,n)=>{const i={};for(const a of Object.keys(e).sort()){if(null==e[a])continue;const o=a.toLowerCase();(o in r.ALWAYS_UNSIGNABLE_HEADERS||t?.has(o)||r.PROXY_HEADER_PATTERN.test(o)||r.SEC_HEADER_PATTERN.test(o))&&(!n||n&&!n.has(o))||(i[o]=e[a].trim().replace(/\s+/g," "))}return i}},48859:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getCanonicalQuery:()=>a});var r=n(78611),i=n(67120);const a=({query:e={}})=>{const t=[],n={};for(const a of Object.keys(e)){if(a.toLowerCase()===i.SIGNATURE_HEADER)continue;const o=(0,r.escapeUri)(a);t.push(o);const s=e[a];"string"==typeof s?n[o]=`${o}=${(0,r.escapeUri)(s)}`:Array.isArray(s)&&(n[o]=s.slice(0).reduce(((e,t)=>e.concat([`${o}=${(0,r.escapeUri)(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")}},58755:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getPayloadHash:()=>s});var r=n(43695),i=n(68004),a=n(14246),o=n(67120);const s=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===o.SHA256_HEADER)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(0,r.isArrayBuffer)(t)){const e=new n;return e.update((0,a.toUint8Array)(t)),(0,i.toHex)(await e.digest())}return o.UNSIGNED_PAYLOAD}},79092:(e,t,n)=>{"use strict";n.r(t),n.d(t,{deleteHeader:()=>a,getHeaderValue:()=>i,hasHeader:()=>r});const r=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},i=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return t[n]},a=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))e===n.toLowerCase()&&delete t[n]}},82505:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SignatureV4:()=>r.SignatureV4,clearCredentialCache:()=>u.clearCredentialCache,createScope:()=>u.createScope,getCanonicalHeaders:()=>i.getCanonicalHeaders,getCanonicalQuery:()=>a.getCanonicalQuery,getPayloadHash:()=>o.getPayloadHash,getSigningKey:()=>u.getSigningKey,moveHeadersToQuery:()=>s.moveHeadersToQuery,prepareRequest:()=>l.prepareRequest});var r=n(97045),i=n(3245),a=n(48859),o=n(58755),s=n(38737),l=n(1969),u=n(3321)},38737:(e,t,n)=>{"use strict";n.r(t),n.d(t,{moveHeadersToQuery:()=>i});var r=n(14065);const i=(e,t={})=>{const{headers:n,query:i={}}=r.HttpRequest.clone(e);for(const e of Object.keys(n)){const r=e.toLowerCase();("x-amz-"===r.slice(0,6)&&!t.unhoistableHeaders?.has(r)||t.hoistableHeaders?.has(r))&&(i[e]=n[e],delete n[e])}return{...e,headers:n,query:i}}},1969:(e,t,n)=>{"use strict";n.r(t),n.d(t,{prepareRequest:()=>a});var r=n(14065),i=n(67120);const a=e=>{e=r.HttpRequest.clone(e);for(const t of Object.keys(e.headers))i.GENERATED_HEADERS.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e}},73533:(e,t,n)=>{"use strict";n.r(t),n.d(t,{iso8601:()=>r,toDate:()=>i});const r=e=>i(e).toISOString().replace(/\.\d{3}Z$/,"Z"),i=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e},4098:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NoOpLogger:()=>r});class r{trace(){}debug(){}info(){}warn(){}error(){}}},67821:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Client:()=>i});var r=n(14795);class i{constructor(e){this.config=e,this.middlewareStack=(0,r.constructStack)()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let a;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?a=t.get(e.constructor):(a=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,a))}else delete this.handlers,a=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return a(e).then((e=>e.output));a(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}},12916:(e,t,n)=>{"use strict";n.r(t),n.d(t,{collectBody:()=>r.collectBody});var r=n(4351)},32249:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Command:()=>a});var r=n(14795),i=n(23911);class a{constructor(){this.middlewareStack=(0,r.constructStack)()}static classBuilder(){return new o}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:a,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,smithyContext:u,additionalContext:c,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const f=e.concat(this.middlewareStack),{logger:p}=t,h={logger:p,clientName:a,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,[i.SMITHY_CONTEXT_KEY]:{commandInstance:this,...u},...c},{requestHandler:g}=t;return f.resolve((e=>g.handle(e.request,n||{})),h)}}class o{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends a{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}},22809:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SENSITIVE_STRING:()=>r});const r="***SensitiveInformation***"},63496:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createAggregatedClient:()=>r});const r=(e,t)=>{for(const n of Object.keys(e)){const r=e[n],i=async function(e,t,n){const i=new r(e);if("function"==typeof t)this.send(i,t);else{if("function"!=typeof n)return this.send(i,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(i,t||{},n)}},a=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[a]=i}}},28550:(e,t,n)=>{"use strict";n.r(t),n.d(t,{dateToUtcString:()=>o,parseEpochTimestamp:()=>g,parseRfc3339DateTime:()=>l,parseRfc3339DateTimeWithOffset:()=>c,parseRfc7231DateTime:()=>h});var r=n(93479);const i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function o(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),o=e.getUTCDate(),s=e.getUTCHours(),l=e.getUTCMinutes(),u=e.getUTCSeconds(),c=o<10?`0${o}`:`${o}`,d=s<10?`0${s}`:`${s}`,f=l<10?`0${l}`:`${l}`,p=u<10?`0${u}`:`${u}`;return`${i[r]}, ${c} ${a[n]} ${t} ${d}:${f}:${p} GMT`}const s=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),l=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=s.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,i,a,o,l,u,c,d]=t,f=(0,r.strictParseShort)(C(i)),p=w(a,"month",1,12),h=w(o,"day",1,31);return m(f,p,h,{hours:l,minutes:u,seconds:c,fractionalMilliseconds:d})},u=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),c=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=u.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,i,a,o,s,l,c,d,f]=t,p=(0,r.strictParseShort)(C(i)),h=w(a,"month",1,12),g=w(o,"day",1,31),y=m(p,h,g,{hours:s,minutes:l,seconds:c,fractionalMilliseconds:d});return"Z"!=f.toUpperCase()&&y.setTime(y.getTime()-A(f)),y},d=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),f=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),p=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),h=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=d.exec(e);if(t){const[e,n,i,a,o,s,l,u]=t;return m((0,r.strictParseShort)(C(a)),b(i),w(n,"day",1,31),{hours:o,minutes:s,seconds:l,fractionalMilliseconds:u})}if(t=f.exec(e),t){const[e,n,r,i,a,o,s,l]=t;return v(m(y(i),b(r),w(n,"day",1,31),{hours:a,minutes:o,seconds:s,fractionalMilliseconds:l}))}if(t=p.exec(e),t){const[e,n,i,a,o,s,l,u]=t;return m((0,r.strictParseShort)(C(u)),b(n),w(i.trimLeft(),"day",1,31),{hours:a,minutes:o,seconds:s,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},g=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=(0,r.strictParseDouble)(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))},m=(e,t,n,r)=>{const i=t-1;return E(e,i,n),new Date(Date.UTC(e,i,n,w(r.hours,"hour",0,23),w(r.minutes,"minute",0,59),w(r.seconds,"seconds",0,60),_(r.fractionalMilliseconds)))},y=e=>{const t=(new Date).getUTCFullYear(),n=100*Math.floor(t/100)+(0,r.strictParseShort)(C(e));return ne.getTime()-(new Date).getTime()>15768e8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,b=e=>{const t=a.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},x=[31,28,31,30,31,30,31,31,30,31,30,31],E=(e,t,n)=>{let r=x[t];if(1===t&&S(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${a[t]} in ${e}: ${n}`)},S=e=>e%4==0&&(e%100!=0||e%400==0),w=(e,t,n,i)=>{const a=(0,r.strictParseByte)(C(e));if(ai)throw new TypeError(`${t} must be between ${n} and ${i}, inclusive`);return a},_=e=>null==e?0:1e3*(0,r.strictParseFloat32)("0."+e),A=e=>{const t=e[0];let n=1;if("+"==t)n=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);n=-1}return n*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},C=e=>{let t=0;for(;t{"use strict";n.r(t),n.d(t,{throwDefaultError:()=>i,withBaseException:()=>a});var r=n(94384);const i=({output:e,parsedBody:t,exceptionCtor:n,errorCode:i})=>{const a=o(e),s=a.httpStatusCode?a.httpStatusCode+"":void 0,l=new n({name:t?.code||t?.Code||i||s||"UnknownError",$fault:"client",$metadata:a});throw(0,r.decorateServiceException)(l,t)},a=e=>({output:t,parsedBody:n,errorCode:r})=>{i({output:t,parsedBody:n,exceptionCtor:e,errorCode:r})},o=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]})},60666:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loadConfigsForDefaultMode:()=>r});const r=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}}},52339:(e,t,n)=>{"use strict";n.r(t),n.d(t,{emitWarningIfUnsupportedVersion:()=>i});let r=!1;const i=e=>{e&&!r&&parseInt(e.substring(1,e.indexOf(".")))<16&&(r=!0)}},94384:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ServiceException:()=>r,decorateServiceException:()=>i});class r extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===r?r.isInstance(e):!!r.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const i=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e}},8131:(e,t,n)=>{"use strict";n.r(t),n.d(t,{extendedEncodeURIComponent:()=>r.extendedEncodeURIComponent});var r=n(4351)},90728:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlgorithmId:()=>r.AlgorithmId,getChecksumConfiguration:()=>i,resolveChecksumRuntimeConfig:()=>a});var r=n(23911);const i=e=>{const t=[];for(const n in r.AlgorithmId){const i=r.AlgorithmId[n];void 0!==e[i]&&t.push({algorithmId:()=>i,checksumConstructor:()=>e[i]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},a=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t}},14591:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDefaultClientConfiguration:()=>o,getDefaultExtensionConfiguration:()=>a,resolveDefaultRuntimeConfig:()=>s});var r=n(90728),i=n(64005);const a=e=>({...(0,r.getChecksumConfiguration)(e),...(0,i.getRetryConfiguration)(e)}),o=a,s=e=>({...(0,r.resolveChecksumRuntimeConfig)(e),...(0,i.resolveRetryRuntimeConfig)(e)})},57403:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDefaultClientConfiguration:()=>r.getDefaultClientConfiguration,getDefaultExtensionConfiguration:()=>r.getDefaultExtensionConfiguration,resolveDefaultRuntimeConfig:()=>r.resolveDefaultRuntimeConfig});var r=n(14591)},64005:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getRetryConfiguration:()=>r,resolveRetryRuntimeConfig:()=>i});const r=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},i=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t}},53707:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getArrayIfSingleItem:()=>r});const r=e=>Array.isArray(e)?e:[e]},39430:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getValueFromTextNode:()=>r});const r=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&void 0!==e[n][t]?e[n]=e[n][t]:"object"==typeof e[n]&&null!==e[n]&&(e[n]=r(e[n]));return e}},31796:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Client:()=>r.Client,Command:()=>a.Command,LazyJsonString:()=>v.LazyJsonString,NoOpLogger:()=>b.NoOpLogger,SENSITIVE_STRING:()=>o.SENSITIVE_STRING,ServiceException:()=>f.ServiceException,_json:()=>A._json,collectBody:()=>i.collectBody,convertMap:()=>x.convertMap,createAggregatedClient:()=>s.createAggregatedClient,dateToUtcString:()=>l.dateToUtcString,decorateServiceException:()=>f.decorateServiceException,emitWarningIfUnsupportedVersion:()=>d.emitWarningIfUnsupportedVersion,expectBoolean:()=>E.expectBoolean,expectByte:()=>E.expectByte,expectFloat32:()=>E.expectFloat32,expectInt:()=>E.expectInt,expectInt32:()=>E.expectInt32,expectLong:()=>E.expectLong,expectNonNull:()=>E.expectNonNull,expectNumber:()=>E.expectNumber,expectObject:()=>E.expectObject,expectShort:()=>E.expectShort,expectString:()=>E.expectString,expectUnion:()=>E.expectUnion,extendedEncodeURIComponent:()=>p.extendedEncodeURIComponent,getArrayIfSingleItem:()=>g.getArrayIfSingleItem,getDefaultClientConfiguration:()=>h.getDefaultClientConfiguration,getDefaultExtensionConfiguration:()=>h.getDefaultExtensionConfiguration,getValueFromTextNode:()=>m.getValueFromTextNode,handleFloat:()=>E.handleFloat,isSerializableHeaderValue:()=>y.isSerializableHeaderValue,limitedParseDouble:()=>E.limitedParseDouble,limitedParseFloat:()=>E.limitedParseFloat,limitedParseFloat32:()=>E.limitedParseFloat32,loadConfigsForDefaultMode:()=>c.loadConfigsForDefaultMode,logger:()=>E.logger,map:()=>x.map,parseBoolean:()=>E.parseBoolean,parseEpochTimestamp:()=>l.parseEpochTimestamp,parseRfc3339DateTime:()=>l.parseRfc3339DateTime,parseRfc3339DateTimeWithOffset:()=>l.parseRfc3339DateTimeWithOffset,parseRfc7231DateTime:()=>l.parseRfc7231DateTime,quoteHeader:()=>S.quoteHeader,resolveDefaultRuntimeConfig:()=>h.resolveDefaultRuntimeConfig,resolvedPath:()=>w.resolvedPath,serializeDateTime:()=>_.serializeDateTime,serializeFloat:()=>_.serializeFloat,splitEvery:()=>C.splitEvery,splitHeader:()=>T.splitHeader,strictParseByte:()=>E.strictParseByte,strictParseDouble:()=>E.strictParseDouble,strictParseFloat:()=>E.strictParseFloat,strictParseFloat32:()=>E.strictParseFloat32,strictParseInt:()=>E.strictParseInt,strictParseInt32:()=>E.strictParseInt32,strictParseLong:()=>E.strictParseLong,strictParseShort:()=>E.strictParseShort,take:()=>x.take,throwDefaultError:()=>u.throwDefaultError,withBaseException:()=>u.withBaseException});var r=n(67821),i=n(12916),a=n(32249),o=n(22809),s=n(63496),l=n(28550),u=n(22967),c=n(60666),d=n(52339),f=n(94384),p=n(8131),h=n(57403),g=n(53707),m=n(39430),y=n(10212),v=n(24259),b=n(4098),x=n(18845),E=n(93479),S=n(92192),w=n(29542),_=n(64650),A=n(87268),C=n(13094),T=n(28444)},10212:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isSerializableHeaderValue:()=>r});const r=e=>null!=e},24259:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LazyJsonString:()=>r});const r=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};r.from=e=>e&&"object"==typeof e&&(e instanceof r||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?r(String(e)):r(JSON.stringify(e)),r.fromObject=r.from},18845:(e,t,n)=>{"use strict";function r(e,t,n){let r,i,a;if(void 0===t&&void 0===n)r={},a=e;else{if(r=e,"function"==typeof t)return i=t,a=n,o(r,i,a);a=t}for(const e of Object.keys(a))Array.isArray(a[e])?s(r,null,a,e):r[e]=a[e];return r}n.r(t),n.d(t,{convertMap:()=>i,map:()=>r,take:()=>a});const i=e=>{const t={};for(const[n,r]of Object.entries(e||{}))t[n]=[,r];return t},a=(e,t)=>{const n={};for(const r in t)s(n,e,t,r);return n},o=(e,t,n)=>r(e,Object.entries(n).reduce(((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e)),{})),s=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[a=l,o=u,s=r]=i;return void(("function"==typeof a&&a(t[s])||"function"!=typeof a&&a)&&(e[r]=o(t[s])))}let[i,a]=n[r];if("function"==typeof a){let t;const n=void 0===i&&null!=(t=a()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=a())}else{const t=void 0===i&&null!=a,n="function"==typeof i&&!!i(a)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=a)}},l=e=>null!=e,u=e=>e},93479:(e,t,n)=>{"use strict";n.r(t),n.d(t,{expectBoolean:()=>i,expectByte:()=>f,expectFloat32:()=>s,expectInt:()=>u,expectInt32:()=>c,expectLong:()=>l,expectNonNull:()=>g,expectNumber:()=>a,expectObject:()=>m,expectShort:()=>d,expectString:()=>y,expectUnion:()=>v,handleFloat:()=>A,limitedParseDouble:()=>_,limitedParseFloat:()=>C,limitedParseFloat32:()=>T,logger:()=>M,parseBoolean:()=>r,strictParseByte:()=>F,strictParseDouble:()=>b,strictParseFloat:()=>x,strictParseFloat32:()=>E,strictParseInt:()=>D,strictParseInt32:()=>N,strictParseLong:()=>R,strictParseShort:()=>O});const r=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},i=e=>{if(null!=e){if("number"==typeof e){if(0!==e&&1!==e||M.warn(P(`Expected boolean, got ${typeof e}: ${e}`)),0===e)return!1;if(1===e)return!0}if("string"==typeof e){const t=e.toLowerCase();if("false"!==t&&"true"!==t||M.warn(P(`Expected boolean, got ${typeof e}: ${e}`)),"false"===t)return!1;if("true"===t)return!0}if("boolean"==typeof e)return e;throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)}},a=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&M.warn(P(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},o=Math.ceil(2**127*(2-2**-23)),s=e=>{const t=a(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>o)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},l=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},u=l,c=e=>p(e,32),d=e=>p(e,16),f=e=>p(e,8),p=(e,t)=>{const n=l(e);if(void 0!==n&&h(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},h=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},g=(e,t)=>{if(null==e){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},m=e=>{if(null==e)return;if("object"==typeof e&&!Array.isArray(e))return e;const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},y=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return M.warn(P(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},v=e=>{if(null==e)return;const t=m(e),n=Object.entries(t).filter((([,e])=>null!=e)).map((([e])=>e));if(0===n.length)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(n.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${n} were not null.`);return t},b=e=>a("string"==typeof e?w(e):e),x=b,E=e=>s("string"==typeof e?w(e):e),S=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,w=e=>{const t=e.match(S);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},_=e=>"string"==typeof e?k(e):a(e),A=_,C=_,T=e=>"string"==typeof e?k(e):s(e),k=e=>{switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${e}`)}},R=e=>l("string"==typeof e?w(e):e),D=R,N=e=>c("string"==typeof e?w(e):e),O=e=>d("string"==typeof e?w(e):e),F=e=>f("string"==typeof e?w(e):e),P=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),M={warn:console.warn}},92192:(e,t,n)=>{"use strict";function r(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}n.r(t),n.d(t,{quoteHeader:()=>r})},29542:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolvedPath:()=>r.resolvedPath});var r=n(4351)},64650:(e,t,n)=>{"use strict";n.r(t),n.d(t,{serializeDateTime:()=>i,serializeFloat:()=>r});const r=e=>{if(e!=e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}},i=e=>e.toISOString().replace(".000Z","Z")},87268:(e,t,n)=>{"use strict";n.r(t),n.d(t,{_json:()=>r});const r=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(r);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=r(e[n]));return t}return e}},13094:(e,t,n)=>{"use strict";function r(e,t,n){if(n<=0||!Number.isInteger(n))throw new Error("Invalid number of delimiters ("+n+") for splitEvery.");const r=e.split(t);if(1===n)return r;const i=[];let a="";for(let e=0;er})},28444:(e,t,n)=>{"use strict";n.r(t),n.d(t,{splitHeader:()=>r});const r=e=>{const t=e.length,n=[];let r,i=!1,a=0;for(let o=0;o{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))}))}},40361:(e,t,n)=>{"use strict";n.r(t)},45157:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{HttpApiKeyAuthLocation:()=>r}),function(e){e.HEADER="header",e.QUERY="query"}(r||(r={}))},61137:(e,t,n)=>{"use strict";n.r(t)},97704:(e,t,n)=>{"use strict";n.r(t)},6934:(e,t,n)=>{"use strict";n.r(t)},89497:(e,t,n)=>{"use strict";n.r(t)},10450:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{HttpAuthLocation:()=>r}),function(e){e.HEADER="header",e.QUERY="query"}(r||(r={}))},79638:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpApiKeyAuthLocation:()=>i.HttpApiKeyAuthLocation,HttpAuthLocation:()=>r.HttpAuthLocation});var r=n(10450),i=n(45157);n(61137),n(97704),n(6934),n(89497)},1386:(e,t,n)=>{"use strict";n.r(t)},67932:(e,t,n)=>{"use strict";n.r(t)},26304:(e,t,n)=>{"use strict";n.r(t)},27382:(e,t,n)=>{"use strict";n.r(t)},39560:(e,t,n)=>{"use strict";n.r(t)},8468:(e,t,n)=>{"use strict";n.r(t);n(39560),n(76183),n(33276)},76183:(e,t,n)=>{"use strict";n.r(t)},33276:(e,t,n)=>{"use strict";n.r(t)},42017:(e,t,n)=>{"use strict";n.r(t)},43585:(e,t,n)=>{"use strict";n.r(t)},9134:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{EndpointURLScheme:()=>r}),function(e){e.HTTP="http",e.HTTPS="https"}(r||(r={}))},82320:(e,t,n)=>{"use strict";n.r(t)},43561:(e,t,n)=>{"use strict";n.r(t)},70827:(e,t,n)=>{"use strict";n.r(t)},27013:(e,t,n)=>{"use strict";n.r(t)},40462:(e,t,n)=>{"use strict";n.r(t);n(82320),n(43561),n(70827),n(73881),n(27013)},73881:(e,t,n)=>{"use strict";n.r(t)},75675:(e,t,n)=>{"use strict";n.r(t)},76839:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{AlgorithmId:()=>r,getChecksumConfiguration:()=>i,resolveChecksumRuntimeConfig:()=>a}),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(r||(r={}));const i=e=>{const t=[];return void 0!==e.sha256&&t.push({algorithmId:()=>r.SHA256,checksumConstructor:()=>e.sha256}),null!=e.md5&&t.push({algorithmId:()=>r.MD5,checksumConstructor:()=>e.md5}),{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},a=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t}},29208:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDefaultClientConfiguration:()=>i,resolveDefaultRuntimeConfig:()=>a});var r=n(76839);const i=e=>({...(0,r.getChecksumConfiguration)(e)}),a=e=>({...(0,r.resolveChecksumRuntimeConfig)(e)})},22358:(e,t,n)=>{"use strict";n.r(t)},72938:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlgorithmId:()=>i.AlgorithmId,getDefaultClientConfiguration:()=>r.getDefaultClientConfiguration,resolveDefaultRuntimeConfig:()=>r.resolveDefaultRuntimeConfig});var r=n(29208),i=(n(22358),n(76839))},29138:(e,t,n)=>{"use strict";n.r(t)},12739:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{FieldPosition:()=>r}),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(r||(r={}))},4096:(e,t,n)=>{"use strict";n.r(t)},26845:(e,t,n)=>{"use strict";n.r(t)},31828:(e,t,n)=>{"use strict";n.r(t)},7750:(e,t,n)=>{"use strict";n.r(t)},84482:(e,t,n)=>{"use strict";n.r(t);n(26845),n(31828),n(7750),n(37237)},37237:(e,t,n)=>{"use strict";n.r(t)},23911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlgorithmId:()=>a.AlgorithmId,EndpointURLScheme:()=>i.EndpointURLScheme,FieldPosition:()=>o.FieldPosition,HttpApiKeyAuthLocation:()=>r.HttpApiKeyAuthLocation,HttpAuthLocation:()=>r.HttpAuthLocation,IniSectionType:()=>l.IniSectionType,RequestHandlerProtocol:()=>u.RequestHandlerProtocol,SMITHY_CONTEXT_KEY:()=>s.SMITHY_CONTEXT_KEY,getDefaultClientConfiguration:()=>a.getDefaultClientConfiguration,resolveDefaultRuntimeConfig:()=>a.resolveDefaultRuntimeConfig});n(40361);var r=n(79638),i=(n(1386),n(67932),n(26304),n(27382),n(8468),n(42017),n(43585),n(9134)),a=(n(40462),n(75675),n(72938)),o=(n(29138),n(12739)),s=(n(4096),n(84482),n(28607),n(7267)),l=(n(7867),n(25578)),u=(n(47168),n(24105),n(31722),n(8489),n(88321),n(34755),n(7773),n(3265),n(29424),n(92236));n(46001),n(73072),n(1987),n(88561),n(78119),n(19057)},28607:(e,t,n)=>{"use strict";n.r(t)},7267:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SMITHY_CONTEXT_KEY:()=>r});const r="__smithy_context"},7867:(e,t,n)=>{"use strict";n.r(t)},25578:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{IniSectionType:()=>r}),function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(r||(r={}))},47168:(e,t,n)=>{"use strict";n.r(t)},24105:(e,t,n)=>{"use strict";n.r(t)},31722:(e,t,n)=>{"use strict";n.r(t)},8489:(e,t,n)=>{"use strict";n.r(t)},88321:(e,t,n)=>{"use strict";n.r(t)},34755:(e,t,n)=>{"use strict";n.r(t)},7773:(e,t,n)=>{"use strict";n.r(t)},3265:(e,t,n)=>{"use strict";n.r(t)},29424:(e,t,n)=>{"use strict";n.r(t)},92236:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{RequestHandlerProtocol:()=>r}),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(r||(r={}))},46001:(e,t,n)=>{"use strict";n.r(t)},73072:(e,t,n)=>{"use strict";n.r(t)},1987:(e,t,n)=>{"use strict";n.r(t)},88561:(e,t,n)=>{"use strict";n.r(t)},78119:(e,t,n)=>{"use strict";n.r(t)},19057:(e,t,n)=>{"use strict";n.r(t)},18065:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseUrl:()=>i});var r=n(14757);const i=e=>{if("string"==typeof e)return i(new URL(e));const{hostname:t,pathname:n,port:a,protocol:o,search:s}=e;let l;return s&&(l=(0,r.parseQueryString)(s)),{hostname:t,port:a?parseInt(a):void 0,protocol:o,path:n,query:l}}},23193:(e,t,n)=>{"use strict";n.r(t),n.d(t,{alphabetByEncoding:()=>r,alphabetByValue:()=>i,bitsPerByte:()=>o,bitsPerLetter:()=>a,maxLetterValue:()=>s});const r={},i=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);r[n]=e,i[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),a=e+26;r[n]=a,i[a]=n}for(let e=0;e<10;e++){r[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;r[t]=n,i[n]=t}r["+"]=62,i[62]="+",r["/"]=63,i[63]="/";const a=6,o=8,s=63},88893:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromBase64:()=>i});var r=n(23193);const i=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),i=new DataView(n);for(let t=0;t>=r.bitsPerLetter;const o=t/4*3;n>>=a%r.bitsPerByte;const s=Math.floor(a/r.bitsPerByte);for(let e=0;e>t)}}return new Uint8Array(n)}},33470:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromBase64:()=>r.fromBase64,toBase64:()=>i.toBase64});var r=n(88893),i=n(19328)},19328:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toBase64:()=>a});var r=n(14246),i=n(23193);function a(e){let t;t="string"==typeof e?(0,r.fromUtf8)(e):e;const n="object"==typeof t&&"number"==typeof t.length,a="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!a)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let o="";for(let e=0;e>t]}o+="==".slice(0,4-a)}return o}},42117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{calculateBodyLength:()=>i});const r="function"==typeof TextEncoder?new TextEncoder:null,i=e=>{if("string"==typeof e){if(r)return r.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)}},25441:(e,t,n)=>{"use strict";n.r(t),n.d(t,{calculateBodyLength:()=>r.calculateBodyLength});var r=n(42117)},65938:(e,t,n)=>{"use strict";n.r(t),n.d(t,{booleanSelector:()=>r});const r=(e,t,n)=>{if(t in e){if("true"===e[t])return!0;if("false"===e[t])return!1;throw new Error(`Cannot load ${n} "${t}". Expected "true" or "false", got ${e[t]}.`)}}},20235:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SelectorType:()=>a.SelectorType,booleanSelector:()=>r.booleanSelector,numberSelector:()=>i.numberSelector});var r=n(65938),i=n(19663),a=n(63466)},19663:(e,t,n)=>{"use strict";n.r(t),n.d(t,{numberSelector:()=>r});const r=(e,t,n)=>{if(!(t in e))return;const r=parseInt(e[t],10);if(Number.isNaN(r))throw new TypeError(`Cannot load ${n} '${t}'. Expected number, got '${e[t]}'.`);return r}},63466:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{SelectorType:()=>r}),function(e){e.ENV="env",e.CONFIG="shared config entry"}(r||(r={}))},63401:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULTS_MODE_OPTIONS:()=>r});const r=["in-region","cross-region","mobile","standard","legacy"]},89124:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveDefaultsModeConfig:()=>r.resolveDefaultsModeConfig});var r=n(48695)},48695:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveDefaultsModeConfig:()=>s});var r=n(10223),i=n(46880),a=n.n(i),o=n(63401);const s=({defaultsMode:e}={})=>(0,r.memoize)((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(l()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${o.DEFAULTS_MODE_OPTIONS.join(", ")}, got ${t}`)}})),l=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?a().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t}},97461:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointCache:()=>r});class r{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}},27567:(e,t,n)=>{"use strict";n.r(t),n.d(t,{debugId:()=>r});const r="endpoints"},19105:(e,t,n)=>{"use strict";n.r(t),n.d(t,{debugId:()=>r.debugId,toDebugString:()=>i.toDebugString});var r=n(27567),i=n(84244)},84244:(e,t,n)=>{"use strict";function r(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${r(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(r).join(", ")})`:JSON.stringify(e,null,2)}n.r(t),n.d(t,{toDebugString:()=>r})},7069:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointCache:()=>r.EndpointCache,EndpointError:()=>l.EndpointError,customEndpointFunctions:()=>o.customEndpointFunctions,isIpAddress:()=>i.isIpAddress,isValidHostLabel:()=>a.isValidHostLabel,resolveEndpoint:()=>s.resolveEndpoint});var r=n(97461),i=n(81466),a=n(18883),o=n(70468),s=n(36704),l=n(97531)},46664:(e,t,n)=>{"use strict";n.r(t),n.d(t,{booleanEquals:()=>r});const r=(e,t)=>e===t},62786:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAttr:()=>a});var r=n(97531),i=n(6305);const a=(e,t)=>(0,i.getAttrPathList)(t).reduce(((n,i)=>{if("object"!=typeof n)throw new r.EndpointError(`Index '${i}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(i)]:n[i]}),e)},6305:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAttrPathList:()=>i});var r=n(97531);const i=e=>{const t=e.split("."),n=[];for(const i of t){const t=i.indexOf("[");if(-1!==t){if(i.indexOf("]")!==i.length-1)throw new r.EndpointError(`Path: '${e}' does not end with ']'`);const a=i.slice(t+1,-1);if(Number.isNaN(parseInt(a)))throw new r.EndpointError(`Invalid array index: '${a}' in path: '${e}'`);0!==t&&n.push(i.slice(0,t)),n.push(a)}else n.push(i)}return n}},13317:(e,t,n)=>{"use strict";n.r(t),n.d(t,{booleanEquals:()=>r.booleanEquals,getAttr:()=>i.getAttr,isSet:()=>a.isSet,isValidHostLabel:()=>o.isValidHostLabel,not:()=>s.not,parseURL:()=>l.parseURL,stringEquals:()=>u.stringEquals,substring:()=>c.substring,uriEncode:()=>d.uriEncode});var r=n(46664),i=n(62786),a=n(2829),o=n(18883),s=n(19568),l=n(96989),u=n(30773),c=n(74454),d=n(13141)},81466:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isIpAddress:()=>i});const r=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),i=e=>r.test(e)||e.startsWith("[")&&e.endsWith("]")},2829:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isSet:()=>r});const r=e=>null!=e},18883:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isValidHostLabel:()=>i});const r=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),i=(e,t=!1)=>{if(!t)return r.test(e);const n=e.split(".");for(const e of n)if(!i(e))return!1;return!0}},19568:(e,t,n)=>{"use strict";n.r(t),n.d(t,{not:()=>r});const r=e=>!e},96989:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseURL:()=>o});var r=n(23911),i=n(81466);const a={[r.EndpointURLScheme.HTTP]:80,[r.EndpointURLScheme.HTTPS]:443},o=e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:a={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(a).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:o,hostname:s,pathname:l,protocol:u,search:c}=t;if(c)return null;const d=u.slice(0,-1);if(!Object.values(r.EndpointURLScheme).includes(d))return null;const f=(0,i.isIpAddress)(s);return{scheme:d,authority:`${o}${n.includes(`${o}:${a[d]}`)||"string"==typeof e&&e.includes(`${o}:${a[d]}`)?`:${a[d]}`:""}`,path:l,normalizedPath:l.endsWith("/")?l:`${l}/`,isIp:f}}},30773:(e,t,n)=>{"use strict";n.r(t),n.d(t,{stringEquals:()=>r});const r=(e,t)=>e===t},74454:(e,t,n)=>{"use strict";n.r(t),n.d(t,{substring:()=>r});const r=(e,t,n,r)=>t>=n||e.length{"use strict";n.r(t),n.d(t,{uriEncode:()=>r});const r=e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},36704:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resolveEndpoint:()=>o});var r=n(19105),i=n(97531),a=n(52479);const o=(e,t)=>{const{endpointParams:n,logger:o}=t,{parameters:s,rules:l}=e;t.logger?.debug?.(`${r.debugId} Initial EndpointParams: ${(0,r.toDebugString)(n)}`);const u=Object.entries(s).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(u.length>0)for(const[e,t]of u)n[e]=n[e]??t;const c=Object.entries(s).filter((([,e])=>e.required)).map((([e])=>e));for(const e of c)if(null==n[e])throw new i.EndpointError(`Missing required parameter: '${e}'`);const d=(0,a.evaluateRules)(l,{endpointParams:n,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${r.debugId} Resolved endpoint: ${(0,r.toDebugString)(d)}`),d}},70246:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointError:()=>r});class r extends Error{constructor(e){super(e),this.name="EndpointError"}}},85845:(e,t,n)=>{"use strict";n.r(t)},18195:(e,t,n)=>{"use strict";n.r(t)},85060:(e,t,n)=>{"use strict";n.r(t)},32534:(e,t,n)=>{"use strict";n.r(t)},27174:(e,t,n)=>{"use strict";n.r(t)},97531:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EndpointError:()=>r.EndpointError});var r=n(70246);n(85845),n(18195),n(85060),n(32534),n(27174),n(63526)},63526:(e,t,n)=>{"use strict";n.r(t)},88307:(e,t,n)=>{"use strict";n.r(t),n.d(t,{callFunction:()=>o});var r=n(70468),i=n(49905),a=n(22226);const o=({fn:e,argv:t},n)=>{const o=t.map((e=>["boolean","number"].includes(typeof e)?e:(0,a.evaluateExpression)(e,"arg",n))),s=e.split(".");return s[0]in r.customEndpointFunctions&&null!=s[1]?r.customEndpointFunctions[s[0]][s[1]](...o):i.endpointFunctions[e](...o)}},70468:(e,t,n)=>{"use strict";n.r(t),n.d(t,{customEndpointFunctions:()=>r});const r={}},49905:(e,t,n)=>{"use strict";n.r(t),n.d(t,{endpointFunctions:()=>i});var r=n(13317);const i={booleanEquals:r.booleanEquals,getAttr:r.getAttr,isSet:r.isSet,isValidHostLabel:r.isValidHostLabel,not:r.not,parseURL:r.parseURL,stringEquals:r.stringEquals,substring:r.substring,uriEncode:r.uriEncode}},62183:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateCondition:()=>o});var r=n(19105),i=n(97531),a=n(88307);const o=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new i.EndpointError(`'${e}' is already defined in Reference Record.`);const o=(0,a.callFunction)(t,n);return n.logger?.debug?.(`${r.debugId} evaluateCondition: ${(0,r.toDebugString)(t)} = ${(0,r.toDebugString)(o)}`),{result:""===o||!!o,...null!=e&&{toAssign:{name:e,value:o}}}}},20082:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateConditions:()=>a});var r=n(19105),i=n(62183);const a=(e=[],t)=>{const n={};for(const a of e){const{result:e,toAssign:o}=(0,i.evaluateCondition)(a,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};o&&(n[o.name]=o.value,t.logger?.debug?.(`${r.debugId} assign: ${o.name} := ${(0,r.toDebugString)(o.value)}`))}return{result:!0,referenceRecord:n}}},16075:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateEndpointRule:()=>l});var r=n(19105),i=n(20082),a=n(11398),o=n(67911),s=n(99981);const l=(e,t)=>{const{conditions:n,endpoint:l}=e,{result:u,referenceRecord:c}=(0,i.evaluateConditions)(n,t);if(!u)return;const d={...t,referenceRecord:{...t.referenceRecord,...c}},{url:f,properties:p,headers:h}=l;return t.logger?.debug?.(`${r.debugId} Resolving endpoint from template: ${(0,r.toDebugString)(l)}`),{...null!=h&&{headers:(0,a.getEndpointHeaders)(h,d)},...null!=p&&{properties:(0,o.getEndpointProperties)(p,d)},url:(0,s.getEndpointUrl)(f,d)}}},88562:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateErrorRule:()=>o});var r=n(97531),i=n(20082),a=n(22226);const o=(e,t)=>{const{conditions:n,error:o}=e,{result:s,referenceRecord:l}=(0,i.evaluateConditions)(n,t);if(s)throw new r.EndpointError((0,a.evaluateExpression)(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...l}}))}},22226:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateExpression:()=>s});var r=n(97531),i=n(88307),a=n(27206),o=n(29445);const s=(e,t,n)=>{if("string"==typeof e)return(0,a.evaluateTemplate)(e,n);if(e.fn)return(0,i.callFunction)(e,n);if(e.ref)return(0,o.getReferenceValue)(e,n);throw new r.EndpointError(`'${t}': ${String(e)} is not a string, function or reference.`)}},78985:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateRules:()=>s});var r=n(97531),i=n(16075),a=n(88562),o=n(67414);const s=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=(0,i.evaluateEndpointRule)(n,t);if(e)return e}else if("error"===n.type)(0,a.evaluateErrorRule)(n,t);else{if("tree"!==n.type)throw new r.EndpointError(`Unknown endpoint rule: ${n}`);{const e=(0,o.evaluateTreeRule)(n,t);if(e)return e}}throw new r.EndpointError("Rules evaluation failed")}},27206:(e,t,n)=>{"use strict";n.r(t),n.d(t,{evaluateTemplate:()=>i});var r=n(13317);const i=(e,t)=>{const n=[],i={...t.endpointParams,...t.referenceRecord};let a=0;for(;a{"use strict";n.r(t),n.d(t,{evaluateTreeRule:()=>a});var r=n(20082),i=n(78985);const a=(e,t)=>{const{conditions:n,rules:a}=e,{result:o,referenceRecord:s}=(0,r.evaluateConditions)(n,t);if(o)return(0,i.evaluateRules)(a,{...t,referenceRecord:{...t.referenceRecord,...s}})}},11398:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointHeaders:()=>a});var r=n(97531),i=n(22226);const a=(e,t)=>Object.entries(e).reduce(((e,[n,a])=>({...e,[n]:a.map((e=>{const a=(0,i.evaluateExpression)(e,"Header value entry",t);if("string"!=typeof a)throw new r.EndpointError(`Header '${n}' value '${a}' is not a string`);return a}))})),{})},67911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointProperties:()=>i});var r=n(63355);const i=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:(0,r.getEndpointProperty)(i,t)})),{})},63355:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointProperty:()=>o});var r=n(97531),i=n(27206),a=n(67911);const o=(e,t)=>{if(Array.isArray(e))return e.map((e=>o(e,t)));switch(typeof e){case"string":return(0,i.evaluateTemplate)(e,t);case"object":if(null===e)throw new r.EndpointError(`Unexpected endpoint property: ${e}`);return(0,a.getEndpointProperties)(e,t);case"boolean":return e;default:throw new r.EndpointError("Unexpected endpoint property type: "+typeof e)}}},99981:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEndpointUrl:()=>a});var r=n(97531),i=n(22226);const a=(e,t)=>{const n=(0,i.evaluateExpression)(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new r.EndpointError("Endpoint URL must be a string, got "+typeof n)}},29445:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getReferenceValue:()=>r});const r=({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e])},52479:(e,t,n)=>{"use strict";n.r(t),n.d(t,{customEndpointFunctions:()=>r.customEndpointFunctions,evaluateRules:()=>i.evaluateRules});var r=n(70468),i=n(78985)},68004:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromHex:()=>a,toHex:()=>o});const r={},i={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),r[e]=t,i[t]=e}function a(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n{"use strict";n.r(t),n.d(t,{getSmithyContext:()=>i});var r=n(23911);const i=e=>e[r.SMITHY_CONTEXT_KEY]||(e[r.SMITHY_CONTEXT_KEY]={})},40805:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSmithyContext:()=>r.getSmithyContext,normalizeProvider:()=>i.normalizeProvider});var r=n(26116),i=n(28947)},28947:(e,t,n)=>{"use strict";n.r(t),n.d(t,{normalizeProvider:()=>r});const r=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t}},18892:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AdaptiveRetryStrategy:()=>o});var r=n(17355),i=n(2816),a=n(16281);class o{constructor(e,t){this.maxAttemptsProvider=e,this.mode=r.RETRY_MODES.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new i.DefaultRateLimiter,this.standardRetryStrategy=new a.StandardRetryStrategy(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}},39366:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ConfiguredRetryStrategy:()=>a});var r=n(77072),i=n(16281);class a extends i.StandardRetryStrategy{constructor(e,t=r.DEFAULT_RETRY_DELAY_BASE){super("function"==typeof e?e:async()=>e),this.computeNextBackoffDelay="number"==typeof t?()=>t:t}async refreshRetryTokenForRetry(e,t){const n=await super.refreshRetryTokenForRetry(e,t);return n.getRetryDelay=()=>this.computeNextBackoffDelay(n.getRetryCount()),n}}},2816:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultRateLimiter:()=>i});var r=n(42653);class i{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>i.setTimeoutFn(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),(0,r.isThrottlingError)(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}i.setTimeoutFn=setTimeout},16281:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StandardRetryStrategy:()=>s});var r=n(17355),i=n(77072),a=n(73467),o=n(651);class s{constructor(e){this.maxAttempts=e,this.mode=r.RETRY_MODES.STANDARD,this.capacity=i.INITIAL_RETRY_TOKENS,this.retryBackoffStrategy=(0,a.getDefaultRetryBackoffStrategy)(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return(0,o.createDefaultRetryToken)({retryDelay:i.DEFAULT_RETRY_DELAY_BASE,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?i.THROTTLING_RETRY_DELAY_BASE:i.DEFAULT_RETRY_DELAY_BASE);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),a=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,(0,o.createDefaultRetryToken)({retryDelay:a,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(i.INITIAL_RETRY_TOKENS,this.capacity+(e.getRetryCost()??i.NO_RETRY_INCREMENT))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${r.DEFAULT_MAX_ATTEMPTS}`),r.DEFAULT_MAX_ATTEMPTS}}shouldRetry(e,t,n){return e.getRetryCount()+1=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?i.TIMEOUT_RETRY_COST:i.RETRY_COST}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}},17355:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{DEFAULT_MAX_ATTEMPTS:()=>i,DEFAULT_RETRY_MODE:()=>a,RETRY_MODES:()=>r}),function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(r||(r={}));const i=3,a=r.STANDARD},77072:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_RETRY_DELAY_BASE:()=>r,INITIAL_RETRY_TOKENS:()=>o,INVOCATION_ID_HEADER:()=>c,MAXIMUM_RETRY_DELAY:()=>i,NO_RETRY_INCREMENT:()=>u,REQUEST_HEADER:()=>d,RETRY_COST:()=>s,THROTTLING_RETRY_DELAY_BASE:()=>a,TIMEOUT_RETRY_COST:()=>l});const r=100,i=2e4,a=500,o=500,s=5,l=10,u=1,c="amz-sdk-invocation-id",d="amz-sdk-request"},73467:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDefaultRetryBackoffStrategy:()=>i});var r=n(77072);const i=()=>{let e=r.DEFAULT_RETRY_DELAY_BASE;return{computeNextBackoffDelay:t=>Math.floor(Math.min(r.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}}},651:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createDefaultRetryToken:()=>i});var r=n(77072);const i=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(r.MAXIMUM_RETRY_DELAY,e),getRetryCost:()=>n})},56265:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AdaptiveRetryStrategy:()=>r.AdaptiveRetryStrategy,ConfiguredRetryStrategy:()=>i.ConfiguredRetryStrategy,DEFAULT_MAX_ATTEMPTS:()=>s.DEFAULT_MAX_ATTEMPTS,DEFAULT_RETRY_DELAY_BASE:()=>l.DEFAULT_RETRY_DELAY_BASE,DEFAULT_RETRY_MODE:()=>s.DEFAULT_RETRY_MODE,DefaultRateLimiter:()=>a.DefaultRateLimiter,INITIAL_RETRY_TOKENS:()=>l.INITIAL_RETRY_TOKENS,INVOCATION_ID_HEADER:()=>l.INVOCATION_ID_HEADER,MAXIMUM_RETRY_DELAY:()=>l.MAXIMUM_RETRY_DELAY,NO_RETRY_INCREMENT:()=>l.NO_RETRY_INCREMENT,REQUEST_HEADER:()=>l.REQUEST_HEADER,RETRY_COST:()=>l.RETRY_COST,RETRY_MODES:()=>s.RETRY_MODES,StandardRetryStrategy:()=>o.StandardRetryStrategy,THROTTLING_RETRY_DELAY_BASE:()=>l.THROTTLING_RETRY_DELAY_BASE,TIMEOUT_RETRY_COST:()=>l.TIMEOUT_RETRY_COST});var r=n(18892),i=n(39366),a=n(2816),o=n(16281),s=n(17355),l=n(77072);n(87128)},87128:(e,t,n)=>{"use strict";n.r(t)},36444:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Uint8ArrayBlobAdapter:()=>i});var r=n(84068);class i extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return(0,r.transformFromString)(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,i.prototype),e}transformToString(e="utf-8"){return(0,r.transformToString)(this,e)}}},84068:(e,t,n)=>{"use strict";n.r(t),n.d(t,{transformFromString:()=>s,transformToString:()=>o});var r=n(33470),i=n(14246),a=n(36444);function o(e,t="utf-8"){return"base64"===t?(0,r.toBase64)(e):(0,i.toUtf8)(e)}function s(e,t){return"base64"===t?a.Uint8ArrayBlobAdapter.mutate((0,r.fromBase64)(e)):a.Uint8ArrayBlobAdapter.mutate((0,i.fromUtf8)(e))}},44312:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ChecksumStream:()=>i});const r="function"==typeof ReadableStream?ReadableStream:function(){};class i extends r{}},48188:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createChecksumStream:()=>o});var r=n(33470),i=n(55163),a=n(44312);const o=({expectedChecksum:e,checksum:t,source:n,checksumSourceLocation:o,base64Encoder:s})=>{if(!(0,i.isReadableStream)(n))throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`);const l=s??r.toBase64;if("function"!=typeof TransformStream)throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const u=new TransformStream({start(){},async transform(e,n){t.update(e),n.enqueue(e)},async flush(n){const r=await t.digest(),i=l(r);if(e!==i){const t=new Error(`Checksum mismatch: expected "${e}" but received "${i}" in response header "${o}".`);n.error(t)}else n.terminate()}});n.pipeThrough(u);const c=u.readable;return Object.setPrototypeOf(c,a.ChecksumStream.prototype),c}},41125:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAwsChunkedEncodingStream:()=>r});const r=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:i,checksumLocationName:a,streamHasher:o}=t,s=void 0!==n&&void 0!==r&&void 0!==i&&void 0!==a&&void 0!==o,l=s?o(i,e):void 0,u=e.getReader();return new ReadableStream({async pull(e){const{value:t,done:i}=await u.read();if(i){if(e.enqueue("0\r\n"),s){const t=n(await l);e.enqueue(`${a}:${t}\r\n`),e.enqueue("\r\n")}e.close()}else e.enqueue(`${(r(t)||0).toString(16)}\r\n${t}\r\n`)}})}},7769:(e,t,n)=>{"use strict";async function r(e,t){let n=0;const r=[],i=e.getReader();let a=!1;for(;!a;){const{done:e,value:o}=await i.read();if(o&&(r.push(o),n+=o?.byteLength??0),n>=t)break;a=e}i.releaseLock();const o=new Uint8Array(Math.min(t,n));let s=0;for(const e of r){if(e.byteLength>o.byteLength-s){o.set(e.subarray(0,o.byteLength-s),s);break}o.set(e,s),s+=e.length}return o}n.r(t),n.d(t,{headStream:()=>r})},42357:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ChecksumStream:()=>c.ChecksumStream,Uint8ArrayBlobAdapter:()=>r.Uint8ArrayBlobAdapter,createChecksumStream:()=>u.createChecksumStream,getAwsChunkedEncodingStream:()=>i.getAwsChunkedEncodingStream,headStream:()=>s.headStream,isBlob:()=>l.isBlob,isReadableStream:()=>l.isReadableStream,sdkStreamMixin:()=>a.sdkStreamMixin,splitStream:()=>o.splitStream});var r=n(36444),i=n(41125),a=n(23880),o=n(67231),s=n(7769),l=n(55163),u=n(48188),c=n(44312)},23880:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sdkStreamMixin:()=>u});var r=n(61664),i=n(33470),a=n(68004),o=n(14246),s=n(55163);const l="The stream has already been transformed.",u=e=>{if(!c(e)&&!(0,s.isReadableStream)(e)){throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const n=async()=>{if(t)throw new Error(l);return t=!0,await(0,r.streamCollector)(e)};return Object.assign(e,{transformToByteArray:n,transformToString:async e=>{const t=await n();if("base64"===e)return(0,i.toBase64)(t);if("hex"===e)return(0,a.toHex)(t);if(void 0===e||"utf8"===e||"utf-8"===e)return(0,o.toUtf8)(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(l);if(t=!0,c(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if((0,s.isReadableStream)(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},c=e=>"function"==typeof Blob&&e instanceof Blob},67231:(e,t,n)=>{"use strict";async function r(e){"function"==typeof e.stream&&(e=e.stream());return e.tee()}n.r(t),n.d(t,{splitStream:()=>r})},55163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isBlob:()=>i,isReadableStream:()=>r});const r=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),i=e=>"function"==typeof Blob&&(e?.constructor?.name===Blob.name||e instanceof Blob)},34915:(e,t,n)=>{"use strict";n.r(t),n.d(t,{escapeUriPath:()=>i});var r=n(72531);const i=e=>e.split("/").map(r.escapeUri).join("/")},72531:(e,t,n)=>{"use strict";n.r(t),n.d(t,{escapeUri:()=>r});const r=e=>encodeURIComponent(e).replace(/[!'()*]/g,i),i=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`},78611:(e,t,n)=>{"use strict";n.r(t),n.d(t,{escapeUri:()=>r.escapeUri,escapeUriPath:()=>i.escapeUriPath});var r=n(72531),i=n(34915)},42637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromUtf8:()=>r});const r=e=>(new TextEncoder).encode(e)},14246:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromUtf8:()=>r.fromUtf8,toUint8Array:()=>i.toUint8Array,toUtf8:()=>a.toUtf8});var r=n(42637),i=n(74424),a=n(65792)},74424:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toUint8Array:()=>i});var r=n(42637);const i=e=>"string"==typeof e?(0,r.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)},65792:(e,t,n)=>{"use strict";n.r(t),n.d(t,{toUtf8:()=>r});const r=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)}},67526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=s(e),o=a[0],l=a[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,l)),c=0,d=l>0?o-4:o;for(n=0;n>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[c++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,u=r-i;su?u:s+o));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,a,o=[],s=t;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},46880:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,l=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=o-Math.min(i,a)),o-=1;o>=s;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===s)return 0;o-=1}else if(l[0][o]1?i-1:0),o=1;o0){var o=Object.keys(n),l=s.default.find(o,(function(e){return t.isOS(e)}));if(l){var u=this.satisfies(n[l]);if(void 0!==u)return u}var c=s.default.find(o,(function(e){return t.isPlatform(e)}));if(c){var d=this.satisfies(n[c]);if(void 0!==d)return d}}if(a>0){var f=Object.keys(i),p=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:a.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:a.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:a.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},48287:(e,t,n)=>{"use strict";const r=n(67526),i=n(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let r=s(n);const i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|h(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||K(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return c(e),s(e<0?0:0|h(e))}function f(e){const t=e.length<0?0:0|h(e.length),n=s(t);for(let r=0;r=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let r=-1;for(a=n;as&&(n=s-l),a=n;a>=0;a--){let n=!0;for(let r=0;ri&&(r=i):r=i;const a=t.length;let o;for(r>a/2&&(r=a/2),o=0;o>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(a=l));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=o}return function(e){const t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(X(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0);const s=Math.min(a,o),u=this.slice(r,i),c=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let a=!1;for(;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":case"latin1":case"binary":return S(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function k(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;ir)&&(n=r);let i="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,n,r,i,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function P(e,t,n,r,i){q(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function M(e,t,n,r,i){q(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function I(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function $(e,t,n,r,a){return t=+t,n>>>=0,a||I(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,a){return t=+t,n>>>=0,a||I(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||O(e,t,this.length);let r=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,n||O(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q((function(e){j(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||O(e,t,this.length);let r=this[e],i=1,a=0;for(;++a=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q((function(e){j(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){F(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=1,a=0;for(this[t]=255&e;++a>>=0,n>>>=0,!r){F(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Q((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Q((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);F(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=255&e;++i>>=0,!r){const r=Math.pow(2,8*n-1);F(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Q((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Q((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return $(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return $(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function q(e,t,n,r,i,a){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(a+1)}${r}`:`>= -(2${r} ** ${8*(a+1)-1}${r}) and < 2 ** ${8*(a+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){j(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,a)}function j(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw j(e,n),new B.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=z(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const a=[];for(let o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function W(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},86454:(e,t,n)=>{"use strict";const r=n(43918),i=n(32923),a=n(8904);e.exports={XMLParser:i,XMLValidator:r,XMLBuilder:a}},35334:(e,t)=>{"use strict";const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+n+"]["+(n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",i=new RegExp("^"+r+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let a=0;a{"use strict";const r=n(35334),i={allowBooleanAttributes:!1,unpairedTags:[]};function a(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function o(e,t){const n=t;for(;t5&&"xml"===r)return h("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},i,t);const n=[];let l=!1,u=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)v+=e[i];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),i--),d=v,!r.isName(d)){let t;return t=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",h("InvalidTag",t,m(e,i))}const b=c(e,i);if(!1===b)return h("InvalidAttr","Attributes for '"+v+"' have open quote.",m(e,i));let x=b.value;if(i=b.index,"/"===x[x.length-1]){const n=i-x.length;x=x.substring(0,x.length-1);const r=f(x,t);if(!0!==r)return h(r.err.code,r.err.msg,m(e,n+r.err.line));l=!0}else if(y){if(!b.tagClosed)return h("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",m(e,i));if(x.trim().length>0)return h("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",m(e,g));if(0===n.length)return h("InvalidTag","Closing tag '"+v+"' has not been opened.",m(e,g));{const t=n.pop();if(v!==t.tagName){let n=m(e,t.tagStartPos);return h("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+v+"'.",m(e,g))}0==n.length&&(u=!0)}}else{const r=f(x,t);if(!0!==r)return h(r.err.code,r.err.msg,m(e,i-x.length+r.err.line));if(!0===u)return h("InvalidXml","Multiple possible root nodes found.",m(e,i));-1!==t.unpairedTags.indexOf(v)||n.push({tagName:v,tagStartPos:g}),l=!0}for(i++;i0)||h("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};const l='"',u="'";function c(e,t){let n="",r="",i=!1;for(;t"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function f(e,t){const n=r.getAllMatches(e,d),i={};for(let e=0;e{"use strict";const r=n(12788),i={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function a(e){this.options=Object.assign({},i,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=o,this.options.format?(this.indentate=s,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function o(e,t,n){const r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjectNode(r.val,t,r.attrStr,n)}function s(e){return this.options.indentBy.repeat(e)}function l(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}a.prototype.build=function(e){return this.options.preserveOrder?r(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},a.prototype.j2x=function(e,t){let n="",r="";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i))if(void 0===e[i])this.isAttribute(i)&&(r+="");else if(null===e[i])this.isAttribute(i)?r+="":"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)r+=this.buildTextValNode(e[i],i,"",t);else if("object"!=typeof e[i]){const a=this.isAttribute(i);if(a)n+=this.buildAttrPairStr(a,""+e[i]);else if(i===this.options.textNodeName){let t=this.options.tagValueProcessor(i,""+e[i]);r+=this.replaceEntitiesValue(t)}else r+=this.buildTextValNode(e[i],i,"",t)}else if(Array.isArray(e[i])){const n=e[i].length;let a="",o="";for(let s=0;s"+e+i}},a.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"0&&this.options.processEntities)for(let t=0;t{function t(e,o,s,l){let u="",c=!1;for(let d=0;d`,c=!1;continue}if(p===o.commentPropName){u+=l+`\x3c!--${f[p][0][o.textNodeName]}--\x3e`,c=!0;continue}if("?"===p[0]){const e=r(f[":@"],o),t="?xml"===p?"":l;let n=f[p][0][o.textNodeName];n=0!==n.length?" "+n:"",u+=t+`<${p}${n}${e}?>`,c=!0;continue}let g=l;""!==g&&(g+=o.indentBy);const m=l+`<${p}${r(f[":@"],o)}`,y=t(f[p],o,h,g);-1!==o.unpairedTags.indexOf(p)?o.suppressUnpairedNode?u+=m+">":u+=m+"/>":y&&0!==y.length||!o.suppressEmptyNode?y&&y.endsWith(">")?u+=m+`>${y}${l}`:(u+=m+">",y&&""!==l&&(y.includes("/>")||y.includes("`):u+=m+"/>",c=!0}return u}function n(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(r="\n"),t(e,n,"",r)}},9400:(e,t,n)=>{const r=n(35334);function i(e,t){let n="";for(;t"===e[t]){if(f?"-"===e[t-1]&&"-"===e[t-2]&&(f=!1,r--):r--,0===r)break}else"["===e[t]?d=!0:p+=e[t];else{if(d&&o(e,t))t+=7,[entityName,val,t]=i(e,t+1),-1===val.indexOf("&")&&(n[c(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(d&&s(e,t))t+=8;else if(d&&l(e,t))t+=8;else if(d&&u(e,t))t+=9;else{if(!a)throw new Error("Invalid DOCTYPE");f=!0}r++,p=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}}},50460:(e,t)=>{const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};t.buildOptions=function(e){return Object.assign({},n,e)},t.defaultOptions=n},17680:(e,t,n)=>{"use strict";const r=n(35334),i=n(23832),a=n(9400),o=n(17983);function s(e){const t=Object.keys(e);for(let n=0;n0)){o||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,a);if(null==r)return e;if(typeof r!=typeof e||r!==e)return r;if(this.options.trimValues)return x(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?x(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const c=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=r.getAllMatches(e,c),i=n.length,a={};for(let e=0;e",s,"Closing Tag is not closed.");let i=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,o));const a=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=o.lastIndexOf("."),o=o.substring(0,l),n=this.tagsNodeStack.pop(),r="",s=t}else if("?"===e[s+1]){let t=v(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new i(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o,t.tagName)),this.addChild(n,e,o)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=y(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=t}else if("!D"===e.substr(s+1,2)){const t=a(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=y(e,"]]>",s,"CDATA is not closed.")-2,i=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,o);let a=this.parseTextData(i,n.tagname,o,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,a),s=t+2}else{let a=v(e,s,this.options.removeNSPrefix),l=a.tagName;const u=a.rawTagName;let c=a.tagExp,d=a.attrExpPresent,f=a.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,o,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),l!==t.tagname&&(o+=o?"."+l:l),this.isItStopNode(this.options.stopNodes,o,l)){let t="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),c=l):c=c.substr(0,c.length-1),s=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))s=a.closeIndex;else{const n=this.readStopNodeData(e,u,f+1);if(!n)throw new Error(`Unexpected end of ${u}`);s=n.i,t=n.tagContent}const r=new i(l);l!==c&&d&&(r[":@"]=this.buildAttributesMap(c,o,l)),t&&(t=this.parseTextData(t,l,o,!0,d,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,o)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),c=l):c=c.substr(0,c.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const e=new i(l);l!==c&&d&&(e[":@"]=this.buildAttributesMap(c,o,l)),this.addChild(n,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new i(l);this.tagsNodeStack.push(n),l!==c&&d&&(e[":@"]=this.buildAttributesMap(c,o,l)),this.addChild(n,e,o),n=e}r="",s=f}}else r+=e[s]}return t.child};function p(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r?(t.tagname=r,e.addChild(t)):e.addChild(t))}const h=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function g(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function m(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function y(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function v(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let a=t;a",n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:a};n=a}else if("?"===e[n+1]){n=y(e,"?>",n+1,"StopNode is not closed.")}else if("!--"===e.substr(n+1,3)){n=y(e,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===e.substr(n+1,2)){n=y(e,"]]>",n,"StopNode is not closed.")-2}else{const r=v(e,n,">");if(r){(r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex}}}function x(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&o(e,n)}return r.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xa2"},pound:{regex:/&(pound|#163);/g,val:"\xa3"},yen:{regex:/&(yen|#165);/g,val:"\xa5"},euro:{regex:/&(euro|#8364);/g,val:"\u20ac"},copyright:{regex:/&(copy|#169);/g,val:"\xa9"},reg:{regex:/&(reg|#174);/g,val:"\xae"},inr:{regex:/&(inr|#8377);/g,val:"\u20b9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=s,this.parseXml=f,this.parseTextData=l,this.resolveNameSpace=u,this.buildAttributesMap=d,this.isItStopNode=m,this.replaceEntitiesValue=h,this.readStopNodeData=b,this.saveTextToParentTag=g,this.addChild=p}}},32923:(e,t,n)=>{const{buildOptions:r}=n(50460),i=n(17680),{prettify:a}=n(75629),o=n(43918);e.exports=class{constructor(e){this.externalEntities={},this.options=r(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=o.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:a(r,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},75629:(e,t)=>{"use strict";function n(e,t,o){let s;const l={};for(let u=0;u0&&(l[t.textNodeName]=s):void 0!==s&&(l[t.textNodeName]=s),l}function r(e){const t=Object.keys(e);for(let e=0;e{"use strict";e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},251:(e,t)=>{t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+d],d+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),a-=u}return(p?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&s,p+=h,s/=256,i-=8);for(o=o<0;e[n+p]=255&o,p+=h,o/=256,u-=8);e[n+p-h]|=128*g}},65606:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var s,l=[],u=!1,c=-1;function d(){u&&s&&(u=!1,s.length?l=s.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=o(d);u=!0;for(var t=l.length;t;){for(s=l,l=[];++c1)for(var n=1;n{const t=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,i={}){if(i=Object.assign({},r,i),!e||"string"!=typeof e)return e;let a=e.trim();if(void 0!==i.skipLike&&i.skipLike.test(a))return e;if(i.hex&&t.test(a))return Number.parseInt(a,16);{const t=n.exec(a);if(t){const n=t[1],r=t[2];let o=function(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(t[3]);const s=t[4]||t[6];if(!i.leadingZeros&&r.length>0&&n&&"."!==a[2])return e;if(!i.leadingZeros&&r.length>0&&!n&&"."!==a[1])return e;{const t=Number(a),l=""+t;return-1!==l.search(/[eE]/)||s?i.eNotation?t:e:-1!==a.indexOf(".")?"0"===l&&""===o||l===o||n&&l==="-"+o?t:e:r?o===l||n+o===l?t:e:a===l||a===n+l?t:e}}return e}}},84729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(51636);function i(e){var t,n=(0,r.default)(e.transform),i=1/0,a=i,o=-i,s=-i;function l(e){(e=n(e))[0]o&&(o=e[0]),e[1]s&&(s=e[1])}function u(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(u);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,r=-1,l=e.length;++ro&&(o=t[0]),t[1]s&&(s=t[1])})),e.objects)u(e.objects[t]);return[i,a,o,s]}},78200:(e,t,n)=>{"use strict";function r(e,t){for(var n=0,r=e.length;n>>1;e[i]r})},80658:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,object:()=>s});var r=n(35258),i=n(51636);function a(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return o(e,t)}))}:o(e,t)}function o(e,t){var n=t.id,r=t.bbox,i=null==t.properties?{}:t.properties,a=s(e,t);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function s(e,t){var n=(0,i.default)(e.transform),a=e.arcs;function o(e,t){t.length&&t.pop();for(var i=a[e<0?~e:e],o=0,s=i.length;o{"use strict";function r(e){return e}n.r(t),n.d(t,{default:()=>r})},12196:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bbox:()=>r.default,feature:()=>i.default,merge:()=>o.default,mergeArcs:()=>o.mergeArcs,mesh:()=>a.default,meshArcs:()=>a.meshArcs,neighbors:()=>s.default,quantize:()=>l.default,transform:()=>u.default,untransform:()=>c.default});var r=n(84729),i=n(80658),a=n(35623),o=n(92264),s=n(76747),l=n(10157),u=n(51636),c=n(56953)},92264:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,mergeArcs:()=>o});var r=n(80658),i=n(59391);function a(e){return(0,r.object)(e,o.apply(this,arguments))}function o(e,t){var n={},a=[],o=[];function s(e){e.forEach((function(t){t.forEach((function(t){(n[t=t<0?~t:t]||(n[t]=[])).push(e)}))})),a.push(e)}function l(t){return function(e){for(var t,n=-1,r=e.length,i=e[r-1],a=0;++n1)for(var o,s,u=1,c=l(a[0]);uc&&(s=a[0],a[0]=a[u],a[u]=s,c=o);return a})).filter((function(e){return e.length>0}))}}},35623:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,meshArcs:()=>o});var r=n(80658),i=n(59391);function a(e){return(0,r.object)(e,o.apply(this,arguments))}function o(e,t,n){var r,a,o;if(arguments.length>1)r=function(e,t,n){var r,i=[],a=[];function o(e){var t=e<0?~e:e;(a[t]||(a[t]=[])).push({i:e,g:r})}function s(e){e.forEach(o)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}function c(e){switch(r=e,e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":u(e.arcs)}}return c(t),a.forEach(null==n?function(e){i.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}(0,t,n);else for(a=0,r=new Array(o=e.arcs.length);a{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(78200);function i(e){var t={},n=e.map((function(){return[]}));function i(e,n){e.forEach((function(e){e<0&&(e=~e);var r=t[e];r?r.push(n):t[e]=[n]}))}function a(e,t){e.forEach((function(e){i(e,t)}))}var o={LineString:i,MultiLineString:a,Polygon:a,MultiPolygon:function(e,t){e.forEach((function(e){a(e,t)}))}};for(var s in e.forEach((function e(t,n){"GeometryCollection"===t.type?t.geometries.forEach((function(t){e(t,n)})):t.type in o&&o[t.type](t.arcs,n)})),t)for(var l=t[s],u=l.length,c=0;c{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(84729),i=n(56953);function a(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)u=e.bbox;else{if(!((n=Math.floor(t))>=2))throw new Error("n must be \u22652");var n,a=(u=e.bbox||(0,r.default)(e))[0],o=u[1],s=u[2],l=u[3];t={scale:[s-a?(s-a)/(n-1):1,l-o?(l-o)/(n-1):1],translate:[a,o]}}var u,c,d=(0,i.default)(t),f=e.objects,p={};function h(e){return d(e)}function g(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(g)};break;case"Point":t={type:"Point",coordinates:h(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(h)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(c in f)p[c]=g(f[c]);return{type:"Topology",bbox:u,transform:t,objects:p,arcs:e.arcs.map((function(e){var t,n=0,r=1,i=e.length,a=new Array(i);for(a[0]=d(e[0],0);++n{"use strict";function r(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}n.r(t),n.d(t,{default:()=>r})},59391:(e,t,n)=>{"use strict";function r(e,t){var n={},r={},i={},a=[],o=-1;function s(e,t){for(var r in e){var i=e[r];delete t[i.start],delete i.start,delete i.end,i.forEach((function(e){n[e<0?~e:e]=1})),a.push(i)}}return t.forEach((function(n,r){var i,a=e.arcs[n<0?~n:n];a.length<3&&!a[1][0]&&!a[1][1]&&(i=t[++o],t[o]=n,t[r]=i)})),t.forEach((function(t){var n,a,o=function(t){var n,r=e.arcs[t<0?~t:t],i=r[0];e.transform?(n=[0,0],r.forEach((function(e){n[0]+=e[0],n[1]+=e[1]}))):n=r[r.length-1];return t<0?[n,i]:[i,n]}(t),s=o[0],l=o[1];if(n=i[s])if(delete i[n.end],n.push(t),n.end=l,a=r[l]){delete r[a.start];var u=a===n?n:n.concat(a);r[u.start=n.start]=i[u.end=a.end]=u}else r[n.start]=i[n.end]=n;else if(n=r[l])if(delete r[n.start],n.unshift(t),n.start=s,a=i[s]){delete i[a.end];var c=a===n?n:a.concat(n);r[c.start=a.start]=i[c.end=n.end]=c}else r[n.start]=i[n.end]=n;else r[(n=[t]).start=s]=i[n.end=l]=n})),s(i,r),s(r,i),t.forEach((function(e){n[e<0?~e:e]||a.push([e])})),a}n.r(t),n.d(t,{default:()=>r})},51636:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(94644);function i(e){if(null==e)return r.default;var t,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],s=e.translate[1];return function(e,r){r||(t=n=0);var l=2,u=e.length,c=new Array(u);for(c[0]=(t+=e[0])*i+o,c[1]=(n+=e[1])*a+s;l{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(94644);function i(e){if(null==e)return r.default;var t,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],s=e.translate[1];return function(e,r){r||(t=n=0);var l=2,u=e.length,c=new Array(u),d=Math.round((e[0]-o)/i),f=Math.round((e[1]-s)/a);for(c[0]=d-t,t=d,c[1]=f-n,n=f;l{"use strict";n.r(t),n.d(t,{NIL:()=>s.default,parse:()=>d.default,stringify:()=>c.default,v1:()=>r.default,v3:()=>i.default,v4:()=>a.default,v5:()=>o.default,validate:()=>u.default,version:()=>l.default});var r=n(47661),i=n(4523),a=n(18562),o=n(86449),s=n(62805),l=n(69870),u=n(66382),c=n(38823),d=n(78537)},90278:(e,t,n)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function i(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t,n,r,a,o){return i((s=i(i(t,e),i(r,o)))<<(l=a)|s>>>32-l,n);var s,l}function o(e,t,n,r,i,o,s){return a(t&n|~t&r,e,t,i,o,s)}function s(e,t,n,r,i,o,s){return a(t&r|n&~r,e,t,i,o,s)}function l(e,t,n,r,i,o,s){return a(t^n^r,e,t,i,o,s)}function u(e,t,n,r,i,o,s){return a(n^(t|~r),e,t,i,o,s)}n.r(t),n.d(t,{default:()=>c});const c=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n>5]>>>i%32&255,a=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<{"use strict";n.r(t),n.d(t,{default:()=>r});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}},62805:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r="00000000-0000-0000-0000-000000000000"},78537:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(66382);const i=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}},13469:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},43407:(e,t,n)=>{"use strict";let r;n.r(t),n.d(t,{default:()=>a});const i=new Uint8Array(16);function a(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}},59761:(e,t,n)=>{"use strict";function r(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function i(e,t){return e<>>32-t}n.r(t),n.d(t,{default:()=>a});const a=function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n>>0;d=c,c=u,u=i(l,30)>>>0,l=o,o=s}n[0]=n[0]+o>>>0,n[1]=n[1]+l>>>0,n[2]=n[2]+u>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+d>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}},38823:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,unsafeStringify:()=>a});var r=n(66382);const i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function a(e,t=0){return i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]}const o=function(e,t=0){const n=a(e,t);if(!(0,r.default)(n))throw TypeError("Stringified UUID is invalid");return n}},47661:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(43407),i=n(38823);let a,o,s=0,l=0;const u=function(e,t,n){let u=t&&n||0;const c=t||new Array(16);let d=(e=e||{}).node||a,f=void 0!==e.clockseq?e.clockseq:o;if(null==d||null==f){const t=e.random||(e.rng||r.default)();null==d&&(d=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==f&&(f=o=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),h=void 0!==e.nsecs?e.nsecs:l+1;const g=p-s+(h-l)/1e4;if(g<0&&void 0===e.clockseq&&(f=f+1&16383),(g<0||p>s)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,l=h,o=f,p+=122192928e5;const m=(1e4*(268435455&p)+h)%4294967296;c[u++]=m>>>24&255,c[u++]=m>>>16&255,c[u++]=m>>>8&255,c[u++]=255&m;const y=p/4294967296*1e4&268435455;c[u++]=y>>>8&255,c[u++]=255&y,c[u++]=y>>>24&15|16,c[u++]=y>>>16&255,c[u++]=f>>>8|128,c[u++]=255&f;for(let e=0;e<6;++e)c[u+e]=d[e];return t||(0,i.unsafeStringify)(c)}},4523:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(90312),i=n(90278);const a=(0,r.default)("v3",48,i.default)},90312:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DNS:()=>a,URL:()=>o,default:()=>s});var r=n(38823),i=n(78537);const a="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function s(e,t,n){function s(e,a,o,s){var l;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(91943),i=n(43407),a=n(38823);const o=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const o=(e=e||{}).random||(e.rng||i.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return(0,a.unsafeStringify)(o)}},86449:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(90312),i=n(59761);const a=(0,r.default)("v5",80,i.default)},66382:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(13469);const i=function(e){return"string"==typeof e&&r.default.test(e)}},69870:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(66382);const i=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},14958:(e,t,n)=>{"use strict";function r(e,t){if("undefined"!=typeof document&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}n.r(t),n.d(t,{canvas:()=>r,domCanvas:()=>r,image:()=>i});const i=()=>"undefined"!=typeof Image?Image:null},37788:(e,t,n)=>{"use strict";n.r(t),n.d(t,{crossfilter:()=>f,resolvefilter:()=>p});var r=n(61388),i=n(24988),a=n(26372);const o=e=>new Uint8Array(e),s=e=>new Uint16Array(e),l=e=>new Uint32Array(e);function u(e,t,n){const r=(t<257?o:t<65537?s:l)(e);return n&&r.set(n),r}function c(e,t,n){const r=1<{const r=e[t],i=e[n];return ri?1:0})),(0,r.permute)(e,t)}(h,c),s)d=t,f=e,t=Array(s+u),e=l(s+u),function(e,t,n,r,i,a,o,s,l){let u,c=0,d=0;for(u=0;c0)for(p=0;pe,size:()=>n}}function f(e){i.Transform.call(this,function(){let e=8,t=[],n=l(0),r=u(0,e),i=u(0,e);return{data:()=>t,seen:()=>n=function(e,t,n){return e.length>=t?e:((n=n||new e.constructor(t)).set(e),n)}(n,t.length),add(e){for(let n,r=0,i=t.length,a=e.length;rt.length,curr:()=>r,prev:()=>i,reset:e=>i[e]=r[e],all:()=>e<257?255:e<65537?65535:4294967295,set(e,t){r[e]|=t},clear(e,t){r[e]&=~t},resize(t,n){(t>r.length||n>e)&&(e=Math.max(n,e),r=u(t,e,r),i=u(t,e))}}}(),e),this._indices=null,this._dims=null}function p(e){i.Transform.call(this,null,e)}f.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]},(0,a.inherits)(f,i.Transform,{transform(e,t){return this._dims?e.modified("fields")||e.fields.some((e=>t.modified(e.fields)))?this.reinit(e,t):this.eval(e,t):this.init(e,t)},init(e,t){const n=e.fields,r=e.query,i=this._indices={},a=this._dims=[],o=r.length;let s,l,u=0;for(;u{const e=i.remove(t,n);for(const t in r)r[t].reindex(e)}))},update(e,t,n){const r=this._dims,i=e.query,a=t.stamp,o=r.length;let s,l,u=0;for(n.filters=0,l=0;lp)for(m=p,y=Math.min(d,h);mh)for(m=Math.max(d,h),y=f;mc)for(p=c,h=Math.min(l,d);pd)for(p=Math.max(l,d),h=u;ps[e]&n?null:o[e];return a.filter(a.MOD,u),i&i-1?(a.filter(a.ADD,(e=>{const t=s[e]&n;return!t&&t^l[e]&n?o[e]:null})),a.filter(a.REM,(e=>{const t=s[e]&n;return t&&!(0^l[e]&n)?o[e]:null}))):(a.filter(a.ADD,u),a.filter(a.REM,(e=>(s[e]&n)===i?o[e]:null))),a.filter(a.SOURCE,(e=>u(e._index)))}})},24988:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Dataflow:()=>q,EventStream:()=>T,MultiPulse:()=>$,Operator:()=>_,Parameters:()=>E,Pulse:()=>F,Transform:()=>H,UniqueList:()=>o,asyncCallback:()=>s,changeset:()=>b,definition:()=>V,derive:()=>h,ingest:()=>p,isChangeSet:()=>v,isTuple:()=>c,rederive:()=>g,replace:()=>m,stableCompare:()=>y,transform:()=>W,transforms:()=>G,tupleid:()=>d});var r=n(26372),i=n(83418),a=n(40300);function o(e){const t=e||r.identity,n=[],i={};return n.add=e=>{const r=t(e);return i[r]||(i[r]=1,n.push(e)),n},n.remove=e=>{const r=t(e);if(i[r]){i[r]=0;const t=n.indexOf(e);t>=0&&n.splice(t,1)}return n},n}async function s(e,t){try{await t(e)}catch(t){e.error(t)}}const l=Symbol("vega_id");let u=1;function c(e){return!(!e||!d(e))}function d(e){return e[l]}function f(e,t){return e[l]=t,e}function p(e){const t=e===Object(e)?e:{data:e};return d(t)?t:f(t,u++)}function h(e){return g(e,p({}))}function g(e,t){for(const n in e)t[n]=e[n];return t}function m(e,t){return f(t,d(e))}function y(e,t){return e?t?(n,r)=>e(n,r)||d(t(n))-d(t(r)):(t,n)=>e(t,n)||d(t)-d(n):null}function v(e){return e&&e.constructor===b}function b(){const e=[],t=[],n=[],i=[],a=[];let o=null,s=!1;return{constructor:b,insert(t){const n=(0,r.array)(t),i=n.length;for(let t=0;t{m(e)&&(u[d(e)]=-1)}));for(f=0,h=e.length;f0&&(b(y,m,g.value),r.modifies(m));for(f=0,h=a.length;f{m(e)&&u[d(e)]>0&&b(e,g.field,g.value)})),r.modifies(g.field);if(s)r.mod=t.length||i.length?l.filter((e=>u[d(e)]>0)):l.slice();else for(v in c)r.mod.push(c[v]);return(o||null==o&&(t.length||i.length))&&r.clean(!0),r}}}const x="_:mod:_";function E(){Object.defineProperty(this,x,{writable:!0,value:{}})}E.prototype={set(e,t,n,i){const a=this,o=a[e],s=a[x];return null!=t&&t>=0?(o[t]!==n||i)&&(o[t]=n,s[t+":"+e]=-1,s[e]=-1):(o!==n||i)&&(a[e]=n,s[e]=(0,r.isArray)(n)?1+n.length:-1),a},modified(e,t){const n=this[x];if(!arguments.length){for(const e in n)if(n[e])return!0;return!1}if((0,r.isArray)(e)){for(let t=0;t=0?t+1{r instanceof _?(r!==this&&(t&&r.targets().add(this),o.push(r)),a.push({op:r,name:e,index:n})):i.set(e,n,r)};for(s in e)if(l=e[s],"pulse"===s)(0,r.array)(l).forEach((e=>{e instanceof _?e!==this&&(e.targets().add(this),o.push(e)):(0,r.error)("Pulse parameters must be operator instances.")})),this.source=l;else if((0,r.isArray)(l))for(i.set(s,-1,Array(u=l.length)),c=0;c{const n=Date.now();return n-t>e?(t=n,1):0}))},debounce(e){const t=k();return this.targets().add(k(null,null,(0,r.debounce)(e,(e=>{const n=e.dataflow;t.receive(e),n&&n.run&&n.run()})))),t},between(e,t){let n=!1;return e.targets().add(k(null,null,(()=>n=!0))),t.targets().add(k(null,null,(()=>n=!1))),this.filter((()=>n))},detach(){this._filter=r.truthy,this._targets=null}};const R={skip:!0};function D(e,t,n,i,a,o){const s=(0,r.extend)({},o,R);let l,u;(0,r.isFunction)(n)||(n=(0,r.constant)(n)),void 0===i?l=t=>e.touch(n(t)):(0,r.isFunction)(i)?(u=new _(null,i,a,!1),l=t=>{u.evaluate(t);const r=n(t),i=u.value;v(i)?e.pulse(r,i,o):e.update(r,i,s)}):l=t=>e.update(n(t),i,s),t.apply(l)}function N(e,t,n,i,a,o){if(void 0===i)t.targets().add(n);else{const s=o||{},l=new _(null,function(e,t){return t=(0,r.isFunction)(t)?t:(0,r.constant)(t),e?function(n,r){const i=t(n,r);return e.skip()||(e.skip(i!==this.value).value=i),i}:t}(n,i),a,!1);l.modified(s.force),l.rank=t.rank,t.targets().add(l),n&&(l.skip(!0),l.value=n.value,l.targets().add(n),e.connect(n,[l]))}}const O={};function F(e,t,n){this.dataflow=e,this.stamp=null==t?-1:t,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function P(e,t){const n=[];return(0,r.visitArray)(e,t,(e=>n.push(e))),n}function M(e,t){const n={};return e.visit(t,(e=>{n[d(e)]=1})),e=>n[d(e)]?null:e}function I(e,t){return e?(n,r)=>e(n,r)&&t(n,r):t}function $(e,t,n,r){const i=this;let a=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=r||null,this.pulses=n;for(const e of n)if(e.stamp===t){if(e.fields){const t=i.fields||(i.fields={});for(const n in e.fields)t[n]=1}e.changed(i.ADD)&&(a|=i.ADD),e.changed(i.REM)&&(a|=i.REM),e.changed(i.MOD)&&(a|=i.MOD)}this.changes=a}function L(e){return e.error("Dataflow already running. Use runAsync() to chain invocations."),e}F.prototype={StopPropagation:O,ADD:1,REM:2,MOD:4,ADD_REM:3,ADD_MOD:5,ALL:7,REFLOW:8,SOURCE:16,NO_SOURCE:32,NO_FIELDS:64,fork(e){return new F(this.dataflow).init(this,e)},clone(){const e=this.fork(7);return e.add=e.add.slice(),e.rem=e.rem.slice(),e.mod=e.mod.slice(),e.source&&(e.source=e.source.slice()),e.materialize(23)},addAll(){let e=this;return!e.source||e.add===e.rem||!e.rem.length&&e.source.length===e.add.length||(e=new F(this.dataflow).init(this),e.add=e.source,e.rem=[]),e},init(e,t){const n=this;return n.stamp=e.stamp,n.encode=e.encode,!e.fields||64&t||(n.fields=e.fields),1&t?(n.addF=e.addF,n.add=e.add):(n.addF=null,n.add=[]),2&t?(n.remF=e.remF,n.rem=e.rem):(n.remF=null,n.rem=[]),4&t?(n.modF=e.modF,n.mod=e.mod):(n.modF=null,n.mod=[]),32&t?(n.srcF=null,n.source=null):(n.srcF=e.srcF,n.source=e.source,e.cleans&&(n.cleans=e.cleans)),n},runAfter(e){this.dataflow.runAfter(e)},changed(e){const t=e||7;return 1&t&&this.add.length||2&t&&this.rem.length||4&t&&this.mod.length},reflow(e){if(e)return this.fork(7).reflow();const t=this.add.length,n=this.source&&this.source.length;return n&&n!==t&&(this.mod=this.source,t&&this.filter(4,M(this,1))),this},clean(e){return arguments.length?(this.cleans=!!e,this):this.cleans},modifies(e){const t=this.fields||(this.fields={});return(0,r.isArray)(e)?e.forEach((e=>t[e]=!0)):t[e]=!0,this},modified(e,t){const n=this.fields;return!(!t&&!this.mod.length||!n)&&(arguments.length?(0,r.isArray)(e)?e.some((e=>n[e])):n[e]:!!n)},filter(e,t){const n=this;return 1&e&&(n.addF=I(n.addF,t)),2&e&&(n.remF=I(n.remF,t)),4&e&&(n.modF=I(n.modF,t)),16&e&&(n.srcF=I(n.srcF,t)),n},materialize(e){const t=this;return 1&(e=e||7)&&t.addF&&(t.add=P(t.add,t.addF),t.addF=null),2&e&&t.remF&&(t.rem=P(t.rem,t.remF),t.remF=null),4&e&&t.modF&&(t.mod=P(t.mod,t.modF),t.modF=null),16&e&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const n=this,i=t;if(16&e)return(0,r.visitArray)(n.source,n.srcF,i),n;1&e&&(0,r.visitArray)(n.add,n.addF,i),2&e&&(0,r.visitArray)(n.rem,n.remF,i),4&e&&(0,r.visitArray)(n.mod,n.modF,i);const a=n.source;if(8&e&&a){const e=n.add.length+n.mod.length;e===a.length||(e?(0,r.visitArray)(a,M(n,5),i):(0,r.visitArray)(a,n.srcF,i))}return n}},(0,r.inherits)($,F,{fork(e){const t=new F(this.dataflow).init(this,e&this.NO_FIELDS);return void 0!==e&&(e&t.ADD&&this.visit(t.ADD,(e=>t.add.push(e))),e&t.REM&&this.visit(t.REM,(e=>t.rem.push(e))),e&t.MOD&&this.visit(t.MOD,(e=>t.mod.push(e)))),t},changed(e){return this.changes&e},modified(e){const t=this,n=t.fields;return n&&t.changes&t.MOD?(0,r.isArray)(e)?e.some((e=>n[e])):n[e]:0},filter(){(0,r.error)("MultiPulse does not support filtering.")},materialize(){(0,r.error)("MultiPulse does not support materialization.")},visit(e,t){const n=this,r=n.pulses,i=r.length;let a=0;if(e&n.SOURCE)for(;at=[],size:()=>t.length,peek:()=>t[0],push:n=>(t.push(n),z(t,0,t.length-1,e)),pop:()=>{const n=t.pop();let r;return t.length?(r=t[0],t[0]=n,function(e,t,n){const r=t,i=e.length,a=e[t];let o,s=1+(t<<1);for(;s=0&&(s=o),e[t]=e[s],s=1+((t=s)<<1);e[t]=a,z(e,r,t,n)}(t,0,e)):r=n,r}}}function z(e,t,n,r){let i,a;const o=e[n];for(;n>t&&(a=n-1>>1,i=e[a],r(o,i)<0);)e[n]=i,n=a;return e[n]=o}function q(){this.logger((0,r.logger)()),this.logLevel(r.Error),this._clock=0,this._rank=0,this._locale=(0,a.defaultLocale)();try{this._loader=(0,i.loader)()}catch(e){}this._touched=o(r.id),this._input={},this._pulse=null,this._heap=U(((e,t)=>e.qrank-t.qrank)),this._postrun=[]}function j(e){return function(){return this._log[e].apply(this,arguments)}}function H(e,t){_.call(this,e,null,t)}q.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:j("error"),warn:j("warn"),info:j("info"),debug:j("debug"),logLevel:j("level"),cleanThreshold:1e4,add:function(e,t,n,i){let a,o=1;return e instanceof _?a=e:e&&e.prototype instanceof _?a=new e:(0,r.isFunction)(e)?a=new _(null,e):(o=0,a=new _(e,t)),this.rank(a),o&&(i=n,n=t),n&&this.connect(a,a.parameters(n,i)),this.touch(a),a},connect:function(e,t){const n=e.rank,r=t.length;for(let i=0;i=0;)t.push(n=i[a]),n===e&&(0,r.error)("Cycle detected in dataflow graph.")},pulse:function(e,t,n){this.touch(e,n||B);const r=new F(this,this._clock+(this._pulse?0:1)),i=e.pulse&&e.pulse.source||[];return r.target=e,this._input[e.id]=t.pulse(r,i),this},touch:function(e,t){const n=t||B;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this},update:function(e,t,n){const r=n||B;return(e.set(t)||r.force)&&this.touch(e,r),this},changeset:b,ingest:function(e,t,n){return t=this.parse(t,n),this.pulse(e,this.changeset().insert(t))},parse:function(e,t){const n=this.locale();return(0,i.read)(e,t,n.timeParse,n.utcParse)},preload:async function(e,t,n){const i=this,a=i._pending||function(e){let t;const n=new Promise((e=>t=e));return n.requests=0,n.done=()=>{0==--n.requests&&(e._pending=null,t(e))},e._pending=n}(i);a.requests+=1;const o=await i.request(t,n);return i.pulse(e,i.changeset().remove(r.truthy).insert(o.data||[])),a.done(),o},request:async function(e,t){const n=this;let r,a=0;try{r=await n.loader().load(e,{context:"dataflow",response:(0,i.responseType)(t&&t.type)});try{r=n.parse(r,t)}catch(t){a=-2,n.warn("Data ingestion failed",e,t)}}catch(t){a=-1,n.warn("Loading failed",e,t)}return{data:r,status:a}},events:function(e,t,n,i){const a=this,o=k(n,i),s=function(e){e.dataflow=a;try{o.receive(e)}catch(e){a.error(e)}finally{a.run()}};let l;l="string"==typeof e&&"undefined"!=typeof document?document.querySelectorAll(e):(0,r.array)(e);const u=l.length;for(let e=0;ei._enqueue(e,!0))),i._touched=o(r.id);let u,c,d,f=0;try{for(;i._heap.size()>0;)u=i._heap.pop(),u.rank===u.qrank?(c=u.run(i._getPulse(u,e)),c.then?c=await c:c.async&&(a.push(c.async),c=O),c!==O&&u._targets&&u._targets.forEach((e=>i._enqueue(e))),++f):i._enqueue(u,!0)}catch(e){i._heap.clear(),d=e}if(i._input={},i._pulse=null,i.debug(`Pulse ${l}: ${f} operators`),d&&(i._postrun=[],i.error(d)),i._postrun.length){const e=i._postrun.sort(((e,t)=>t.priority-e.priority));i._postrun=[];for(let t=0;ti.runAsync(null,(()=>{e.forEach((e=>{try{e(i)}catch(e){i.error(e)}}))})))),i},run:function(e,t,n){return this._pulse?L(this):(this.evaluate(e,t,n),this)},runAsync:async function(e,t,n){for(;this._running;)await this._running;const r=()=>this._running=null;return(this._running=this.evaluate(e,t,n)).then(r,r),this._running},runAfter:function(e,t,n){if(this._pulse||t)this._postrun.push({priority:n||0,callback:e});else try{e(this)}catch(e){this.error(e)}},_enqueue:function(e,t){const n=e.stampe.pulse)),t):this._input[e.id]||function(e,t){if(t&&t.stamp===e.stamp)return t;e=e.fork(),t&&t!==O&&(e.source=t.source);return e}(this._pulse,n&&n.pulse)}},(0,r.inherits)(H,_,{run(e){if(e.stampthis.pulse=e)):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},transform(){}});const G={};function V(e){const t=W(e);return t&&t.Definition||null}function W(e){return e=e&&e.toLowerCase(),(0,r.hasOwnProperty)(G,e)?G[e]:null}},47990:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_ACTIONS:()=>Ue,default:()=>Je,guessMode:()=>Ye,vega:()=>$e,vegaLite:()=>Le,version:()=>Ie});var r,i=n(73709),a=n(77390),o=n(48196),s=n(78405),l=n(73706),u=n(80632),c=n(41570),d=n(65606),f=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=Object.prototype.hasOwnProperty;function h(e,t){return p.call(e,t)}function g(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n=48&&t<=57))return!1;n++}return!0}function v(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function b(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function x(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,n=e.length;t0&&"constructor"==s[u-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===d&&(void 0===l[f]?d=s.slice(0,u).join("/"):u==c-1&&(d=t.path),void 0!==d&&p(t,0,e,d)),u++,Array.isArray(l)){if("-"===f)f=l.length;else{if(n&&!y(f))throw new w("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);y(f)&&(f=~~f)}if(u>=c){if(n&&"add"===t.op&&f>l.length)throw new w("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);if(!1===(o=C[t.op].call(t,l,f,e)).test)throw new w("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}}else if(u>=c){if(!1===(o=A[t.op].call(t,l,f,e)).test)throw new w("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}if(l=l[f],n&&u0)throw new w('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new w("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new w("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&x(e.value))throw new w("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new w("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new w("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var o=N([{op:"_get",path:e.from,value:void 0}],n);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new w("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function N(e,t,n){try{if(!Array.isArray(e))throw new w("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)R(m(t),m(e),n||!0);else{n=n||D;for(var r=0;r0&&(e.patches=[],e.callback&&e.callback(r)),r}function L(e,t,n,r,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var a=g(t),o=g(e),s=!1,l=o.length-1;l>=0;l--){var u=e[d=o[l]];if(!h(t,d)||void 0===t[d]&&void 0!==u&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+v(d),value:m(u)}),n.push({op:"remove",path:r+"/"+v(d)}),s=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}));else{var c=t[d];"object"==typeof u&&null!=u&&"object"==typeof c&&null!=c&&Array.isArray(u)===Array.isArray(c)?L(u,c,n,r+"/"+v(d),i):u!==c&&(i&&n.push({op:"test",path:r+"/"+v(d),value:m(u)}),n.push({op:"replace",path:r+"/"+v(d),value:m(c)}))}}if(s||a.length!=o.length)for(l=0;ln?"object"!=typeof n?e:n:t}Object.assign({},F,j,{JsonPatchError:S,deepClone:m,escapePathComponent:v,unescapePathComponent:b});var V,W,Y,X,K,J,Q,Z,ee,te,ne,re,ie,ae,oe,se,le,ue,ce,de,fe,pe,he,ge,me,ye,ve,be,xe,Ee,Se,we={exports:{}};function _e(){if(W)return V;W=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return V={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function Ae(){if(X)return Y;X=1;const e="object"==typeof d&&d.env&&d.env.NODE_DEBUG&&/\bsemver\b/i.test(d.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return Y=e}function Ce(){return K||(K=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=_e(),a=Ae(),o=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],u=t.t={};let c=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[d,r]],p=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=c++;a(e,i,t),u[e]=i,l[i]=t,o[i]=new RegExp(t,n?"g":void 0),s[i]=new RegExp(r,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),p("FULL",`^${l[u.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),p("LOOSE",`^${l[u.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),p("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[u.COERCE],!0),p("COERCERTLFULL",l[u.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(we,we.exports)),we.exports}function Te(){if(ee)return Z;ee=1;const e=Ae(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=_e(),{safeRe:r,t:i}=Ce(),a=G(),{compareIdentifiers:o}=function(){if(Q)return J;Q=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:tt(n,e)}}();class s{constructor(o,l){if(l=a(l),o instanceof s){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if("string"!=typeof o)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const u=o.trim().match(l.loose?r[i.LOOSE]:r[i.FULL]);if(!u)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===o(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Z=s}function ke(){if(ne)return te;ne=1;const e=Te();return te=(t,n,r)=>new e(t,r).compare(new e(n,r))}function Re(){if(me)return ge;me=1;const e=function(){if(ie)return re;ie=1;const e=ke();return re=(t,n,r)=>0===e(t,n,r)}(),t=function(){if(oe)return ae;oe=1;const e=ke();return ae=(t,n,r)=>0!==e(t,n,r)}(),n=function(){if(le)return se;le=1;const e=ke();return se=(t,n,r)=>e(t,n,r)>0}(),r=function(){if(ce)return ue;ce=1;const e=ke();return ue=(t,n,r)=>e(t,n,r)>=0}(),i=function(){if(fe)return de;fe=1;const e=ke();return de=(t,n,r)=>e(t,n,r)<0}(),a=function(){if(he)return pe;he=1;const e=ke();return pe=(t,n,r)=>e(t,n,r)<=0}();return ge=(o,s,l,u)=>{switch(s){case"===":return"object"==typeof o&&(o=o.version),"object"==typeof l&&(l=l.version),o===l;case"!==":return"object"==typeof o&&(o=o.version),"object"==typeof l&&(l=l.version),o!==l;case"":case"=":case"==":return e(o,l,u);case"!=":return t(o,l,u);case">":return n(o,l,u);case">=":return r(o,l,u);case"<":return i(o,l,u);case"<=":return a(o,l,u);default:throw new TypeError(`Invalid operator: ${s}`)}}}function De(){if(xe)return be;xe=1;const e=/\s+/g;class t{constructor(n,a){if(a=r(a),n instanceof t)return n.loose===!!a.loose&&n.includePrerelease===!!a.includePrerelease?n:new t(n.raw,a);if(n instanceof i)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&p))+":"+e,r=n.get(t);if(r)return r;const o=this.options.loose,g=o?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(g,T(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],u),a("comparator trim",e),e=e.replace(s[l.TILDETRIM],c),a("tilde trim",e),e=e.replace(s[l.CARETTRIM],d),a("caret trim",e);let m=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>C(e,this.options)));o&&(m=m.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(s[l.COMPARATORLOOSE]))))),a("range list",m);const v=new Map,b=m.map((e=>new i(e,this.options)));for(const e of b){if(h(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const x=[...v.values()];return n.set(t,x),x}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>m(t,n)&&e.set.some((e=>m(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(e){return!1}for(let t=0;t=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}})),r=G(),i=function(){if(ve)return ye;ve=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),o("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],a=t.match(n);if(!a)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==a[1]?a[1]:"","="===this.operator&&(this.operator=""),a[2]?this.semver=new s(a[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(o("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return a(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):!((r=n(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(a(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(a(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}ye=t;const n=G(),{safeRe:r,t:i}=Ce(),a=Re(),o=Ae(),s=Te(),l=De();return ye}(),a=Ae(),o=Te(),{safeRe:s,t:l,comparatorTrimReplace:u,tildeTrimReplace:c,caretTrimReplace:d}=Ce(),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:p}=_e(),h=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},y=(e,t)=>(a("comp",e,t),e=E(e,t),a("caret",e),e=b(e,t),a("tildes",e),e=w(e,t),a("xrange",e),e=A(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,i,o)=>{let s;return a("tilde",e,t,n,r,i,o),v(n)?s="":v(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",s),s}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{a("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,s)=>{let l;return a("caret",e,t,n,i,o,s),v(n)?l="":v(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(o)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${o}-${s} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),a("caret return",l),l}))},w=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>_(e,t))).join(" ")),_=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,i,o,s,l)=>{a("xRange",e,n,r,i,o,s,l);const u=v(i),c=u||v(o),d=c||v(s),f=d;return"="===r&&f&&(r=""),l=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(c&&(o=0),s=0,">"===r?(r=">=",c?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",c?i=+i+1:o=+o+1),"<"===r&&(l="-0"),n=`${r+i}.${o}.${s}${l}`):c?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${o}.0${l} <${i}.${+o+1}.0-0`),a("xRange return",n),n}))},A=(e,t)=>(a("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),C=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),T=e=>(t,n,r,i,a,o,s,l,u,c,d,f)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(a)?`>=${r}.${i}.0${e?"-0":""}`:o?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(u)?"":v(c)?`<${+u+1}.0.0-0`:v(d)?`<${u}.${+c+1}.0-0`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`}`.trim(),k=(e,t,n)=>{for(let n=0;n0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return be}var Ne=function(){if(Se)return Ee;Se=1;const e=De();return Ee=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Ee}(),Oe=H(Ne);var Fe='.vega-embed {\n position: relative;\n display: inline-block;\n box-sizing: border-box;\n}\n.vega-embed.has-actions {\n padding-right: 38px;\n}\n.vega-embed details:not([open]) > :not(summary) {\n display: none !important;\n}\n.vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n cursor: pointer;\n line-height: 0px;\n}\n.vega-embed summary::-webkit-details-marker {\n display: none;\n}\n.vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset;\n}\n.vega-embed summary svg {\n width: 14px;\n height: 14px;\n}\n.vega-embed details[open] summary {\n opacity: 0.7;\n}\n.vega-embed:hover summary, .vega-embed:focus-within summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease;\n}\n.vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left;\n}\n.vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none;\n}\n.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {\n background-color: #f7f7f9;\n color: black;\n}\n.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute;\n}\n.vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid rgba(0, 0, 0, 0);\n border-bottom-color: #d9d9d9;\n}\n.vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid rgba(0, 0, 0, 0);\n border-bottom-color: #fff;\n}\n.vega-embed .chart-wrapper.fit-x {\n width: 100%;\n}\n.vega-embed .chart-wrapper.fit-y {\n height: 100%;\n}\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: auto;\n padding-right: 14px;\n}\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n';function Pe(e,...t){for(const n of t)Me(e,n);return e}function Me(e,t){for(const n of Object.keys(t))(0,a.writeConfig)(e,n,t[n],!0)}const Ie="6.29.0",$e=a;let Le=s;const Be="undefined"!=typeof window?window:void 0;void 0===Le&&Be?.vl?.compile&&(Le=Be.vl);const Ue={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},ze={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},qe={vega:"Vega","vega-lite":"Vega-Lite"},je={vega:$e.version,"vega-lite":Le?Le.version:"not available"},He={vega:e=>e,"vega-lite":(e,t)=>Le.compile(e,{config:t}).spec},Ge='\n\n \n \n \n',Ve="chart-wrapper";function We(e,t,n,r){const i=`${t}
`,a=`
${n}`,o=window.open("");o.document.write(i+e+a),o.document.title=`${qe[r]} JSON Source`}function Ye(e,t){if(e.$schema){const n=(0,l.default)(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${qe[n.library]}, but mode argument sets ${qe[t]??t}.`);const r=n.library;return Oe(je[r],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${qe[r]} ${n.version}, but the current version of ${qe[r]} is v${je[r]}.`),r}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t??"vega"}function Xe(e){return!(!e||!("load"in e))}function Ke(e){return Xe(e)?e:$e.loader(e)}async function Je(e,t,n={}){let r,s;(0,a.isString)(t)?(s=Ke(n.loader),r=JSON.parse(await s.load(t))):r=t;const d=function(e){const t=e.usermeta?.embedOptions??{};return(0,a.isString)(t.defaultStyle)&&(t.defaultStyle=!1),t}(r),f=d.loader;s&&!f||(s=Ke(n.loader??f));const p=await Qe(d,s),h=await Qe(n,s),g={...Pe(h,p),config:(0,a.mergeConfig)(h.config??{},p.config??{})};return await async function(e,t,n={},r){const s=n.theme?(0,a.mergeConfig)(u[n.theme],n.config??{}):n.config,d=(0,a.isBoolean)(n.actions)?n.actions:Pe({},Ue,n.actions??{}),f={...ze,...n.i18n},p=n.renderer??"canvas",h=n.logLevel??$e.Warn,g=n.downloadFileName??"visualization",m="string"==typeof e?document.querySelector(e):e;if(!m)throw new Error(`${e} does not exist`);if(!1!==n.defaultStyle){const e="vega-embed-style",{root:t,rootContainer:r}=function(e){const t=e.getRootNode?e.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}(m);if(!t.getElementById(e)){const t=document.createElement("style");t.id=e,t.innerHTML=void 0===n.defaultStyle||!0===n.defaultStyle?Fe.toString():n.defaultStyle,r.appendChild(t)}}const y=Ye(t,n.mode);let v=He[y](t,s);if("vega-lite"===y&&v.$schema){const e=(0,l.default)(v.$schema);Oe(je.vega,`^${e.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${e.version}, but current version is v${je.vega}.`)}m.classList.add("vega-embed"),d&&m.classList.add("has-actions");m.innerHTML="";let b=m;if(d){const e=document.createElement("div");e.classList.add(Ve),m.appendChild(e),b=e}const x=n.patch;x&&(v=x instanceof Function?x(v):R(v,x,!0,!1).newDocument);n.formatLocale&&$e.formatLocale(n.formatLocale);n.timeFormatLocale&&$e.timeFormatLocale(n.timeFormatLocale);if(n.expressionFunctions)for(const e in n.expressionFunctions){const t=n.expressionFunctions[e];"fn"in t?$e.expressionFunction(e,t.fn,t.visitor):t instanceof Function&&$e.expressionFunction(e,t)}const{ast:E}=n,S=$e.parse(v,"vega-lite"===y?{}:s,{ast:E}),w=new(n.viewClass||$e.View)(S,{loader:r,logLevel:h,renderer:p,...E?{expr:$e.expressionInterpreter??n.expr??o.expressionInterpreter}:{}});if(w.addSignalListener("autosize",((e,t)=>{const{type:n}=t;"fit-x"==n?(b.classList.add("fit-x"),b.classList.remove("fit-y")):"fit-y"==n?(b.classList.remove("fit-x"),b.classList.add("fit-y")):"fit"==n?b.classList.add("fit-x","fit-y"):b.classList.remove("fit-x","fit-y")})),!1!==n.tooltip){const{loader:e,tooltip:t}=n,r=e&&!Xe(e)?e?.baseURL:void 0,i="function"==typeof t?t:new c.Handler({baseURL:r,...!0===t?{}:t}).call;w.tooltip(i)}let _,{hover:A}=n;void 0===A&&(A="vega"===y);if(A){const{hoverSet:e,updateSet:t}="boolean"==typeof A?{}:A;w.hover(e,t)}n&&(null!=n.width&&w.width(n.width),null!=n.height&&w.height(n.height),null!=n.padding&&w.padding(n.padding));if(await w.initialize(b,n.bind).runAsync(),!1!==d){let e=m;if(!1!==n.defaultStyle||n.forceActionsMenu){const t=document.createElement("details");t.title=f.CLICK_TO_VIEW_ACTIONS,m.append(t),e=t;const n=document.createElement("summary");n.innerHTML=Ge,t.append(n),_=e=>{t.contains(e.target)||t.removeAttribute("open")},document.addEventListener("click",_)}const r=document.createElement("div");if(e.append(r),r.classList.add("vega-actions"),!0===d||!1!==d.export)for(const e of["svg","png"])if(!0===d||!0===d.export||d.export[e]){const t=f[`${e.toUpperCase()}_ACTION`],i=document.createElement("a"),o=(0,a.isObject)(n.scaleFactor)?n.scaleFactor[e]:n.scaleFactor;i.text=t,i.href="#",i.target="_blank",i.download=`${g}.${e}`,i.addEventListener("mousedown",(async function(t){t.preventDefault();const n=await w.toImageURL(e,o);this.href=n})),r.append(i)}if(!0===d||!1!==d.source){const e=document.createElement("a");e.text=f.SOURCE_ACTION,e.href="#",e.addEventListener("click",(function(e){We((0,i.default)(t),n.sourceHeader??"",n.sourceFooter??"",y),e.preventDefault()})),r.append(e)}if("vega-lite"===y&&(!0===d||!1!==d.compiled)){const e=document.createElement("a");e.text=f.COMPILED_ACTION,e.href="#",e.addEventListener("click",(function(e){We((0,i.default)(v),n.sourceHeader??"",n.sourceFooter??"","vega"),e.preventDefault()})),r.append(e)}if(!0===d||!1!==d.editor){const e=n.editorUrl??"https://vega.github.io/editor/",a=document.createElement("a");a.text=f.EDITOR_ACTION,a.href="#",a.addEventListener("click",(function(n){!function(e,t,n){const r=e.open(t),{origin:i}=new URL(t);let a=40;e.addEventListener("message",(function t(n){n.source===r&&(a=0,e.removeEventListener("message",t,!1))}),!1),setTimeout((function e(){a<=0||(r.postMessage(n,i),setTimeout(e,250),a-=1)}),250)}(window,e,{config:s,mode:x?"vega":y,renderer:p,spec:(0,i.default)(x?v:t)}),n.preventDefault()})),r.append(a)}}function C(){_&&document.removeEventListener("click",_),w.finalize()}return{view:w,spec:t,vgSpec:v,finalize:C,embedOptions:n}}(e,r,g,s)}async function Qe(e,t){const n=(0,a.isString)(e.config)?JSON.parse(await t.load(e.config)):e.config??{},r=(0,a.isString)(e.patch)?JSON.parse(await t.load(e.patch)):e.patch;return{...e,...r?{patch:r}:{},...n?{config:n}:{}}}},73784:(e,t,n)=>{"use strict";n.r(t),n.d(t,{axisticks:()=>l,datajoin:()=>u,encode:()=>d,legendentries:()=>f,linkpath:()=>y,pie:()=>S,scale:()=>A,sortitems:()=>R,stack:()=>P});var r=n(24988),i=n(14588),a=n(26372),o=n(61388),s=n(82226);function l(e){r.Transform.call(this,null,e)}function u(e){r.Transform.call(this,null,e)}function c(){return(0,r.ingest)({})}function d(e){r.Transform.call(this,null,e)}function f(e){r.Transform.call(this,[],e)}(0,a.inherits)(l,r.Transform,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),a=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=this.value,s=e.scale,l=null==e.count?e.values?e.values.length:10:e.count,u=(0,i.tickCount)(s,l,e.minstep),c=e.format||(0,i.tickFormat)(n,s,u,e.formatSpecifier,e.formatType,!!e.values),d=e.values?(0,i.validTicks)(s,e.values,u):(0,i.tickValues)(s,u);return o&&(a.rem=o),o=d.map(((e,t)=>(0,r.ingest)({index:t/(d.length-1||1),value:e,label:c(e)}))),e.extra&&o.length&&o.push((0,r.ingest)({index:-1,extra:{value:o[0].value},label:""})),a.source=o,a.add=o,this.value=o,a}}),(0,a.inherits)(u,r.Transform,{transform(e,t){var n=t.dataflow,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=e.item||c,s=e.key||r.tupleid,l=this.value;return(0,a.isArray)(i.encode)&&(i.encode=null),l&&(e.modified("key")||t.modified(s))&&(0,a.error)("DataJoin does not support modified key function or fields."),l||(t=t.addAll(),this.value=l=function(e){const t=(0,a.fastmap)().test((e=>e.exit));return t.lookup=n=>t.get(e(n)),t}(s)),t.visit(t.ADD,(e=>{const t=s(e);let n=l.get(t);n?n.exit?(l.empty--,i.add.push(n)):i.mod.push(n):(n=o(e),l.set(t,n),i.add.push(n)),n.datum=e,n.exit=!1})),t.visit(t.MOD,(e=>{const t=s(e),n=l.get(t);n&&(n.datum=e,i.mod.push(n))})),t.visit(t.REM,(e=>{const t=s(e),n=l.get(t);e!==n.datum||n.exit||(i.rem.push(n),n.exit=!0,++l.empty)})),t.changed(t.ADD_MOD)&&i.modifies("datum"),(t.clean()||e.clean&&l.empty>n.cleanThreshold)&&n.runAfter(l.clean),i}}),(0,a.inherits)(d,r.Transform,{transform(e,t){var n=t.fork(t.ADD_REM),r=e.mod||!1,i=e.encoders,o=t.encode;if((0,a.isArray)(o)){if(!n.changed()&&!o.every((e=>i[e])))return t.StopPropagation;o=o[0],n.encode=null}var s="enter"===o,l=i.update||a.falsy,u=i.enter||a.falsy,c=i.exit||a.falsy,d=(o&&!s?i[o]:l)||a.falsy;if(t.changed(t.ADD)&&(t.visit(t.ADD,(t=>{u(t,e),l(t,e)})),n.modifies(u.output),n.modifies(l.output),d!==a.falsy&&d!==l&&(t.visit(t.ADD,(t=>{d(t,e)})),n.modifies(d.output))),t.changed(t.REM)&&c!==a.falsy&&(t.visit(t.REM,(t=>{c(t,e)})),n.modifies(c.output)),s||d!==a.falsy){const i=t.MOD|(e.modified()?t.REFLOW:0);s?(t.visit(i,(t=>{const i=u(t,e)||r;(d(t,e)||i)&&n.mod.push(t)})),n.mod.length&&n.modifies(u.output)):t.visit(i,(t=>{(d(t,e)||r)&&n.mod.push(t)})),n.mod.length&&n.modifies(d.output)}return n.changed()?n:t.StopPropagation}}),(0,a.inherits)(f,r.Transform,{transform(e,t){if(null!=this.value&&!e.modified())return t.StopPropagation;var n,o,s,l,u,c=t.dataflow.locale(),d=t.fork(t.NO_SOURCE|t.NO_FIELDS),f=this.value,p=e.type||i.SymbolLegend,h=e.scale,g=+e.limit,m=(0,i.tickCount)(h,null==e.count?5:e.count,e.minstep),y=!!e.values||p===i.SymbolLegend,v=e.format||(0,i.labelFormat)(c,h,m,p,e.formatSpecifier,e.formatType,y),b=e.values||(0,i.labelValues)(h,m);return f&&(d.rem=f),p===i.SymbolLegend?(g&&b.length>g?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),f=b.slice(0,g-1),u=!0):f=b,(0,a.isFunction)(s=e.size)?(e.values||0!==h(f[0])||(f=f.slice(1)),l=f.reduce(((t,n)=>Math.max(t,s(n,e))),0)):s=(0,a.constant)(l=s||8),f=f.map(((t,n)=>(0,r.ingest)({index:n,label:v(t,n,f),value:t,offset:l,size:s(t,e)}))),u&&(u=b[f.length],f.push((0,r.ingest)({index:f.length,label:`\u2026${b.length-f.length} entries`,value:u,offset:l,size:s(u,e)})))):p===i.GradientLegend?(n=h.domain(),o=(0,i.scaleFraction)(h,n[0],(0,a.peek)(n)),b.length<3&&!e.values&&n[0]!==(0,a.peek)(n)&&(b=[n[0],(0,a.peek)(n)]),f=b.map(((e,t)=>(0,r.ingest)({index:t,label:v(e,t,b),value:e,perc:o(e)})))):(s=b.length-1,o=(0,i.labelFraction)(h),f=b.map(((e,t)=>(0,r.ingest)({index:t,label:v(e,t,b),value:e,perc:t?o(e):0,perc2:t===s?1:o(b[t+1])})))),d.source=f,d.add=f,this.value=f,d}});const p=e=>e.source.x,h=e=>e.source.y,g=e=>e.target.x,m=e=>e.target.y;function y(e){r.Transform.call(this,{},e)}y.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},(0,a.inherits)(y,r.Transform,{transform(e,t){var n=e.sourceX||p,r=e.sourceY||h,i=e.targetX||g,o=e.targetY||m,s=e.as||"path",l=e.orient||"vertical",u=e.shape||"line",c=E.get(u+"-"+l)||E.get(u);return c||(0,a.error)("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,(e=>{e[s]=c(n(e),r(e),i(e),o(e))})),t.reflow(e.modified()).modifies(s)}});const v=(e,t,n,r)=>"M"+e+","+t+"L"+n+","+r,b=(e,t,n,r)=>{var i=n-e,a=r-t,o=Math.hypot(i,a)/2;return"M"+e+","+t+"A"+o+","+o+" "+180*Math.atan2(a,i)/Math.PI+" 0 1 "+n+","+r},x=(e,t,n,r)=>{const i=n-e,a=r-t,o=.2*(i+a),s=.2*(a-i);return"M"+e+","+t+"C"+(e+o)+","+(t+s)+" "+(n+s)+","+(r-o)+" "+n+","+r},E=(0,a.fastmap)({line:v,"line-radial":(e,t,n,r)=>v(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),arc:b,"arc-radial":(e,t,n,r)=>b(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),curve:x,"curve-radial":(e,t,n,r)=>x(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),"orthogonal-horizontal":(e,t,n,r)=>"M"+e+","+t+"V"+r+"H"+n,"orthogonal-vertical":(e,t,n,r)=>"M"+e+","+t+"H"+n+"V"+r,"orthogonal-radial":(e,t,n,r)=>{const i=Math.cos(e),a=Math.sin(e),o=Math.cos(n),s=Math.sin(n);return"M"+t*i+","+t*a+"A"+t+","+t+" 0 0,"+((Math.abs(n-e)>Math.PI?n<=e:n>e)?1:0)+" "+t*o+","+t*s+"L"+r*o+","+r*s},"diagonal-horizontal":(e,t,n,r)=>{const i=(e+n)/2;return"M"+e+","+t+"C"+i+","+t+" "+i+","+r+" "+n+","+r},"diagonal-vertical":(e,t,n,r)=>{const i=(t+r)/2;return"M"+e+","+t+"C"+e+","+i+" "+n+","+i+" "+n+","+r},"diagonal-radial":(e,t,n,r)=>{const i=Math.cos(e),a=Math.sin(e),o=Math.cos(n),s=Math.sin(n),l=(t+r)/2;return"M"+t*i+","+t*a+"C"+l*i+","+l*a+" "+l*o+","+l*s+" "+r*o+","+r*s}});function S(e){r.Transform.call(this,null,e)}S.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},(0,a.inherits)(S,r.Transform,{transform(e,t){var n,r,i,s=e.as||["startAngle","endAngle"],l=s[0],u=s[1],c=e.field||a.one,d=e.startAngle||0,f=null!=e.endAngle?e.endAngle:2*Math.PI,p=t.source,h=p.map(c),g=h.length,m=d,y=(f-d)/(0,o.sum)(h),v=(0,o.range)(g);for(e.sort&&v.sort(((e,t)=>h[e]-h[t])),n=0;ne+(t<0?-1:t>0?1:0)),0))!==t.length&&n.warn("Log scale domain includes zero: "+(0,a.stringValue)(t)));return t}function T(e,t,n){return(0,a.isFunction)(e)&&(t||n)?(0,i.interpolateRange)(e,k(t||[0,1],n)):e}function k(e,t){return t?e.slice().reverse():e}function R(e){r.Transform.call(this,null,e)}(0,a.inherits)(A,r.Transform,{transform(e,t){var n=t.dataflow,r=this.value,l=function(e){var t,n=e.type,r="";if(n===i.Sequential)return i.Sequential+"-"+i.Linear;(function(e){const t=e.type;return(0,i.isContinuous)(t)&&t!==i.Time&&t!==i.UTC&&(e.scheme||e.range&&e.range.length&&e.range.every(a.isString))})(e)&&(r=2===(t=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(null!=e.domainMid):0)?i.Sequential+"-":3===t?i.Diverging+"-":"");return(r+n||i.Linear).toLowerCase()}(e);for(l in r&&l===r.type||(this.value=r=(0,i.scale)(l)()),e)if(!_[l]){if("padding"===l&&w(r.type))continue;(0,a.isFunction)(r[l])?r[l](e[l]):n.warn("Unsupported scale property: "+l)}return function(e,t,n){var r=e.type,o=t.round||!1,l=t.range;if(null!=t.rangeStep)l=function(e,t,n){e!==i.Band&&e!==i.Point&&(0,a.error)("Only band and point scales support rangeStep.");var r=(null!=t.paddingOuter?t.paddingOuter:t.padding)||0,o=e===i.Point?1:(null!=t.paddingInner?t.paddingInner:t.padding)||0;return[0,t.rangeStep*(0,i.bandSpace)(n,o,r)]}(r,t,n);else if(t.scheme&&(l=function(e,t,n){var r,o,s=t.schemeExtent;(0,a.isArray)(t.scheme)?o=(0,i.interpolateColors)(t.scheme,t.interpolate,t.interpolateGamma):(r=t.scheme.toLowerCase(),(o=(0,i.scheme)(r))||(0,a.error)(`Unrecognized scheme name: ${t.scheme}`));return n=e===i.Threshold?n+1:e===i.BinOrdinal?n-1:e===i.Quantile||e===i.Quantize?+t.schemeCount||5:n,(0,i.isInterpolating)(e)?T(o,s,t.reverse):(0,a.isFunction)(o)?(0,i.quantizeInterpolator)(T(o,s),n):e===i.Ordinal?o:o.slice(0,n)}(r,t,n),(0,a.isFunction)(l))){if(e.interpolator)return e.interpolator(l);(0,a.error)(`Scale type ${r} does not support interpolating color schemes.`)}if(l&&(0,i.isInterpolating)(r))return e.interpolator((0,i.interpolateColors)(k(l,t.reverse),t.interpolate,t.interpolateGamma));l&&t.interpolate&&e.interpolate?e.interpolate((0,i.interpolate)(t.interpolate,t.interpolateGamma)):(0,a.isFunction)(e.round)?e.round(o):(0,a.isFunction)(e.rangeRound)&&e.interpolate(o?s.interpolateRound:s.interpolate);l&&e.range(k(l,t.reverse))}(r,e,function(e,t,n){let r=t.bins;if(r&&!(0,a.isArray)(r)){const t=e.domain(),n=t[0],i=(0,a.peek)(t),s=r.step;let l=null==r.start?n:r.start,u=null==r.stop?i:r.stop;s||(0,a.error)("Scale bins parameter missing step property."),li&&(u=s*Math.floor(i/s)),r=(0,o.range)(l,u+s/2,s)}r?e.bins=r:e.bins&&delete e.bins;e.type===i.BinOrdinal&&(r?t.domain||t.domainRaw||(e.domain(r),n=r.length):e.bins=e.domain());return n}(r,e,function(e,t,n){const r=function(e,t,n){return t?(e.domain(C(e.type,t,n)),t.length):-1}(e,t.domainRaw,n);if(r>-1)return r;var o,s,l=t.domain,u=e.type,c=t.zero||void 0===t.zero&&function(e){const t=e.type;return!e.bins&&(t===i.Linear||t===i.Pow||t===i.Sqrt)}(e);if(!l)return 0;if((c||null!=t.domainMin||null!=t.domainMax||null!=t.domainMid)&&(o=(l=l.slice()).length-1||1,c&&(l[0]>0&&(l[0]=0),l[o]<0&&(l[o]=0)),null!=t.domainMin&&(l[0]=t.domainMin),null!=t.domainMax&&(l[o]=t.domainMax),null!=t.domainMid)){const e=(s=t.domainMid)>l[o]?o+1:se(l);if(null==t)p.push(e.slice());else for(i={},a=0,o=e.length;af&&(f=d),n&&c.sort(n)}return p.max=f,p}(t.source,e.groupby,d,f),i=0,o=n.length,s=n.max;i{"use strict";n.r(t),n.d(t,{parseSelector:()=>m});const r="view",i="[",a="]",o="{",s="}",l=":",u=",",c="@",d=">",f=/[[\]{}]/,p={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let h,g;function m(e,t,n){return h=t||r,g=n||p,v(e.trim()).map(b)}function y(e,t,n,r,i){const a=e.length;let o,s=0;for(;t=0?--s:r&&r.indexOf(o)>=0&&++s}return t}function v(e){const t=[],n=e.length;let r=0,l=0;for(;l' after between selector: "+e;n=n.map(b);const o=b(e.slice(1).trim());if(o.between)return{between:n,stream:o};o.between=n;return o}(e):function(e){const t={source:h},n=[];let r,d,p=[0,0],m=0,v=0,b=e.length,x=0;if(e[b-1]===s){if(x=e.lastIndexOf(o),!(x>=0))throw"Unmatched right brace: "+e;try{p=function(e){const t=e.split(u);if(!e.length||t.length>2)throw e;return t.map((t=>{const n=+t;if(n!=n)throw e;return n}))}(e.substring(x+1,b-1))}catch(t){throw"Invalid throttle specification: "+e}b=(e=e.slice(0,x).trim()).length,x=0}if(!b)throw e;e[0]===c&&(m=++x);r=y(e,x,l),r1?(t.type=n[1],m?t.markname=n[0].slice(1):(E=n[0],g[E]?t.marktype=n[0]:t.source=n[0])):t.type=n[0];var E;"!"===t.type.slice(-1)&&(t.consume=!0,t.type=t.type.slice(0,-1));null!=d&&(t.filter=d);p[0]&&(t.throttle=p[0]);p[1]&&(t.debounce=p[1]);return t}(e)}},21720:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ASTNode:()=>m,ArrayExpression:()=>l,BinaryExpression:()=>u,CallExpression:()=>c,ConditionalExpression:()=>d,Identifier:()=>s,Literal:()=>a,LogicalExpression:()=>f,MemberExpression:()=>p,ObjectExpression:()=>h,Property:()=>o,RawCode:()=>i,UnaryExpression:()=>g,codegenExpression:()=>Xe,constants:()=>We,functions:()=>Ye,parseExpression:()=>Ve});var r=n(26372);const i="RawCode",a="Literal",o="Property",s="Identifier",l="ArrayExpression",u="BinaryExpression",c="CallExpression",d="ConditionalExpression",f="LogicalExpression",p="MemberExpression",h="ObjectExpression",g="UnaryExpression";function m(e){this.type=e}var y,v,b,x,E;m.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=function(e){switch(e.type){case l:return e.elements;case u:case f:return[e.left,e.right];case c:return[e.callee].concat(e.arguments);case d:return[e.test,e.consequent,e.alternate];case p:return[e.object,e.property];case h:return e.properties;case o:return[e.key,e.value];case g:return[e.argument];default:return[]}}(this),n=0,r=t.length;n",y[_]="Identifier",y[A]="Keyword",y[C]="Null",y[T]="Numeric",y[k]="Punctuator",y[R]="String",y[9]="RegularExpression";var D="ArrayExpression",N="BinaryExpression",O="CallExpression",F="ConditionalExpression",P="Identifier",M="Literal",I="LogicalExpression",$="MemberExpression",L="ObjectExpression",B="Property",U="UnaryExpression",z="Unexpected token %0",q="Unexpected number",j="Unexpected string",H="Unexpected identifier",G="Unexpected reserved word",V="Unexpected end of input",W="Invalid regular expression",Y="Invalid regular expression: missing /",X="Octal literals are not allowed in strict mode.",K="Duplicate data property in object literal not allowed in strict mode",J="ILLEGAL",Q="Disabled.",Z=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),ee=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function te(e,t){if(!e)throw new Error("ASSERT: "+t)}function ne(e){return e>=48&&e<=57}function re(e){return"0123456789abcdefABCDEF".includes(e)}function ie(e){return"01234567".includes(e)}function ae(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e)}function oe(e){return 10===e||13===e||8232===e||8233===e}function se(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Z.test(String.fromCharCode(e))}function le(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&ee.test(String.fromCharCode(e))}const ue={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function ce(){for(;b1114111||"}"!==e)&&Te({},z,J),t<=65535?String.fromCharCode(t):(n=55296+(t-65536>>10),r=56320+(t-65536&1023),String.fromCharCode(n,r))}function pe(){var e,t;for(e=v.charCodeAt(b++),t=String.fromCharCode(e),92===e&&(117!==v.charCodeAt(b)&&Te({},z,J),++b,(e=de("u"))&&"\\"!==e&&se(e.charCodeAt(0))||Te({},z,J),t=e);b>>="===(r=v.substr(b,4))?{type:k,value:r,start:i,end:b+=4}:">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?{type:k,value:n,start:i,end:b+=3}:o===(t=n.substr(0,2))[1]&&"+-<>&|".includes(o)||"=>"===t?{type:k,value:t,start:i,end:b+=2}:("//"===t&&Te({},z,J),"<>=!+-*%&|^/".includes(o)?(++b,{type:k,value:o,start:i,end:b}):void Te({},z,J))}function me(){var e,t,n;if(te(ne((n=v[b]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),t=b,e="","."!==n){if(e=v[b++],n=v[b],"0"===e){if("x"===n||"X"===n)return++b,function(e){let t="";for(;b=0&&Te({},W,n),{value:n,literal:t}}(),r=function(e,t){let n=e;t.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,((e,t)=>{if(parseInt(t,16)<=1114111)return"x";Te({},W)})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch(e){Te({},W)}try{return new RegExp(e,t)}catch(e){return null}}(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:b}}function ve(){if(ce(),b>=x)return{type:w,start:b,end:b};const e=v.charCodeAt(b);return se(e)?he():40===e||41===e||59===e?ge():39===e||34===e?function(){var e,t,n,r,i="",a=!1;for(te("'"===(e=v[b])||'"'===e,"String literal must starts with a quote"),t=b,++b;b(te(t":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function He(){var e,t;return e=function(){var e,t,n,r,i,a,o,s,l,u;if(e=E,l=qe(),0===(i=je(r=E)))return l;for(r.prec=i,be(),t=[e,E],a=[l,r,o=qe()];(i=je(E))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,l=a.pop(),t.pop(),n=Ee(s,l,o),a.push(n);(r=be()).prec=i,a.push(r),t.push(E),n=qe(),a.push(n)}for(n=a[u=a.length-1],t.pop();u>1;)t.pop(),n=Ee(a[u-1].value,a[u-2],n),u-=2;return n}(),De("?")&&(be(),t=He(),Re(":"),e=function(e,t,n){const r=new m(F);return r.test=e,r.consequent=t,r.alternate=n,r}(e,t,He())),e}function Ge(){const e=He();if(De(","))throw new Error(Q);return e}function Ve(e){b=0,x=(v=e).length,E=null,xe();const t=Ge();if(E.type!==w)throw new Error("Unexpect token after expression.");return t}var We={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function Ye(e){function t(t,n,r){return i=>function(t,n,r,i){let a=e(n[0]);return r&&(a=r+"("+a+")",0===r.lastIndexOf("new ",0)&&(a="("+a+")")),a+"."+t+(i<0?"":0===i?"()":"("+n.slice(1).map(e).join(",")+")")}(t,i,n,r)}const n="new Date",i="String",a="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(t){t.length<3&&(0,r.error)("Missing arguments to clamp function."),t.length>3&&(0,r.error)("Too many arguments to clamp function.");const n=t.map(e);return"Math.max("+n[1]+", Math.min("+n[2]+","+n[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:n,date:t("getDate",n,0),day:t("getDay",n,0),year:t("getFullYear",n,0),month:t("getMonth",n,0),hours:t("getHours",n,0),minutes:t("getMinutes",n,0),seconds:t("getSeconds",n,0),milliseconds:t("getMilliseconds",n,0),time:t("getTime",n,0),timezoneoffset:t("getTimezoneOffset",n,0),utcdate:t("getUTCDate",n,0),utcday:t("getUTCDay",n,0),utcyear:t("getUTCFullYear",n,0),utcmonth:t("getUTCMonth",n,0),utchours:t("getUTCHours",n,0),utcminutes:t("getUTCMinutes",n,0),utcseconds:t("getUTCSeconds",n,0),utcmilliseconds:t("getUTCMilliseconds",n,0),length:t("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:t("toUpperCase",i,0),lower:t("toLowerCase",i,0),substring:t("substring",i),split:t("split",i),trim:t("trim",i,0),regexp:a,test:t("test",a),if:function(t){t.length<3&&(0,r.error)("Missing arguments to if function."),t.length>3&&(0,r.error)("Too many arguments to if function.");const n=t.map(e);return"("+n[0]+"?"+n[1]+":"+n[2]+")"}}}function Xe(e){const t=(e=e||{}).allowed?(0,r.toSet)(e.allowed):{},n=e.forbidden?(0,r.toSet)(e.forbidden):{},i=e.constants||We,a=(e.functions||Ye)(f),o=e.globalvar,s=e.fieldvar,l=(0,r.isFunction)(o)?o:e=>`${o}["${e}"]`;let u={},c={},d=0;function f(e){if((0,r.isString)(e))return e;const t=p[e.type];return null==t&&(0,r.error)("Unsupported type: "+e.type),t(e)}const p={Literal:e=>e.raw,Identifier:e=>{const a=e.name;return d>0?a:(0,r.hasOwnProperty)(n,a)?(0,r.error)("Illegal identifier: "+a):(0,r.hasOwnProperty)(i,a)?i[a]:(0,r.hasOwnProperty)(t,a)?a:(u[a]=1,l(a))},MemberExpression:e=>{const t=!e.computed,n=f(e.object);t&&(d+=1);const r=f(e.property);return n===s&&(c[function(e){const t=e&&e.length-1;return t&&('"'===e[0]&&'"'===e[t]||"'"===e[0]&&"'"===e[t])?e.slice(1,-1):e}(r)]=1),t&&(d-=1),n+(t?"."+r:"["+r+"]")},CallExpression:e=>{"Identifier"!==e.callee.type&&(0,r.error)("Illegal callee type: "+e.callee.type);const t=e.callee.name,n=e.arguments,i=(0,r.hasOwnProperty)(a,t)&&a[t];return i||(0,r.error)("Unrecognized function: "+t),(0,r.isFunction)(i)?i(n):i+"("+n.map(f).join(",")+")"},ArrayExpression:e=>"["+e.elements.map(f).join(",")+"]",BinaryExpression:e=>"("+f(e.left)+" "+e.operator+" "+f(e.right)+")",UnaryExpression:e=>"("+e.operator+f(e.argument)+")",ConditionalExpression:e=>"("+f(e.test)+"?"+f(e.consequent)+":"+f(e.alternate)+")",LogicalExpression:e=>"("+f(e.left)+e.operator+f(e.right)+")",ObjectExpression:e=>"{"+e.properties.map(f).join(",")+"}",Property:e=>{d+=1;const t=f(e.key);return d-=1,t+":"+f(e.value)}};function h(e){const t={code:f(e),globals:Object.keys(u),fields:Object.keys(c)};return u={},c={},t}return h.functions=a,h.constants=i,h}},65294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{force:()=>d});var r=n(24988),i=n(26372),a=n(14310);const o={center:a.forceCenter,collide:a.forceCollide,nbody:a.forceManyBody,link:a.forceLink,x:a.forceX,y:a.forceY},s="forces",l=["alpha","alphaMin","alphaTarget","velocityDecay","forces"],u=["static","iterations"],c=["x","y","vx","vy"];function d(e){r.Transform.call(this,null,e)}function f(e,t,n,r){var a,o,u,c,d=(0,i.array)(t.forces);for(a=0,o=l.length;at(e,n):t)}d.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30,expr:!0},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:c}]},(0,i.inherits)(d,r.Transform,{transform(e,t){var n,r,i=this.value,o=t.changed(t.ADD_REM),s=e.modified(l),c=e.iterations||300;if(i?(o&&(t.modifies("index"),i.nodes(t.source)),(s||t.changed(t.MOD))&&f(i,e,0,t)):(this.value=i=function(e,t){const n=(0,a.forceSimulation)(e),r=n.stop,i=n.restart;let o=!1;return n.stopped=()=>o,n.restart=()=>(o=!1,i()),n.stop=()=>(o=!0,r()),f(n,t,!0).on("end",(()=>o=!0))}(t.source,e),i.on("tick",(n=t.dataflow,r=this,()=>n.touch(r).run())),e.static||(o=!0,i.tick()),t.modifies("index")),s||o||e.modified(u)||t.changed()&&e.restart)if(i.alpha(Math.max(i.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(i.alphaMin(),1/c)),e.static)for(i.stop();--c>=0;)i.tick();else if(i.stopped()&&i.restart(),!o)return t.StopPropagation;return this.finish(e,t)},finish(e,t){const n=t.dataflow;for(let e,t=this._argops,l=0,u=t.length;l{"use strict";n.r(t),n.d(t,{defaultLocale:()=>S,locale:()=>E,numberFormatDefaultLocale:()=>h,numberFormatLocale:()=>p,resetDefaultLocale:()=>w,resetNumberFormatDefaultLocale:()=>f,resetTimeFormatDefaultLocale:()=>y,timeFormatDefaultLocale:()=>b,timeFormatLocale:()=>v});var r=n(61388),i=n(4710),a=n(71652),o=n(26372),s=n(98090);function l(e){const t={};return n=>t[n]||(t[n]=e(n))}function u(e){const t=l(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(e){const n=(0,i.formatSpecifier)(e||",");if(null==n.precision){switch(n.precision=12,n.type){case"%":n.precision-=2;break;case"e":n.precision-=1}return r=t(n),a=t(".1f")(1)[1],e=>{const t=r(e),n=t.indexOf(a);if(n<0)return t;let i=function(e,t){let n,r=e.lastIndexOf("e");if(r>0)return r;for(r=e.length;--r>t;)if(n=e.charCodeAt(r),n>=48&&n<=57)return r+1}(t,n);const o=in;)if("0"!==t[i]){++i;break}return t.slice(0,i)+o}}return t(n);var r,a},formatSpan(e,a,o,s){s=(0,i.formatSpecifier)(null==s?",f":s);const l=(0,r.tickStep)(e,a,o),u=Math.max(Math.abs(e),Math.abs(a));let c;if(null==s.precision)switch(s.type){case"s":return isNaN(c=(0,i.precisionPrefix)(l,u))||(s.precision=c),n(s,u);case"":case"e":case"g":case"p":case"r":isNaN(c=(0,i.precisionRound)(l,u))||(s.precision=c-("e"===s.type));break;case"f":case"%":isNaN(c=(0,i.precisionFixed)(l))||(s.precision=c-2*("%"===s.type))}return t(s)}}}let c,d;function f(){return c=u({format:i.format,formatPrefix:i.formatPrefix})}function p(e){return u((0,i.formatLocale)(e))}function h(e){return arguments.length?c=p(e):c}function g(e,t,n){n=n||{},(0,o.isObject)(n)||(0,o.error)(`Invalid time multi-format specifier: ${n}`);const r=t(a.SECONDS),i=t(a.MINUTES),s=t(a.HOURS),l=t(a.DATE),u=t(a.WEEK),c=t(a.MONTH),d=t(a.QUARTER),f=t(a.YEAR),p=e(n[a.MILLISECONDS]||".%L"),h=e(n[a.SECONDS]||":%S"),g=e(n[a.MINUTES]||"%I:%M"),m=e(n[a.HOURS]||"%I %p"),y=e(n[a.DATE]||n[a.DAY]||"%a %d"),v=e(n[a.WEEK]||"%b %d"),b=e(n[a.MONTH]||"%B"),x=e(n[a.QUARTER]||"%B"),E=e(n[a.YEAR]||"%Y");return e=>(r(e)(0,o.isString)(e)?t(e):g(t,a.timeInterval,e),utcFormat:e=>(0,o.isString)(e)?n(e):g(n,a.utcInterval,e),timeParse:l(e.parse),utcParse:l(e.utcParse)}}function y(){return d=m({format:s.timeFormat,parse:s.timeParse,utcFormat:s.utcFormat,utcParse:s.utcParse})}function v(e){return m((0,s.timeFormatLocale)(e))}function b(e){return arguments.length?d=v(e):d}f(),y();const x=(e,t)=>(0,o.extend)({},e,t);function E(e,t){const n=e?p(e):h(),r=t?v(t):b();return x(n,r)}function S(e,t){const n=arguments.length;return n&&2!==n&&(0,o.error)("defaultLocale expects either zero or two arguments."),n?x(h(e),b(t)):x(h(),b())}function w(){return f(),y(),S()}},31926:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DataPrefix:()=>D,IndexPrefix:()=>N,ScalePrefix:()=>O,SignalPrefix:()=>F,bandspace:()=>me,bandwidth:()=>ye,codeGenerator:()=>Ue,codegenParams:()=>Be,containerSize:()=>Fe,contrast:()=>Q,copy:()=>ve,data:()=>h,dataVisitor:()=>P,dayAbbrevFormat:()=>R,dayFormat:()=>k,debug:()=>X,domain:()=>be,encode:()=>y,expressionFunction:()=>ze,format:()=>b,functionContext:()=>Me,geoArea:()=>z,geoBounds:()=>q,geoCentroid:()=>j,geoScale:()=>H,geoShape:()=>_e,inScope:()=>G,indata:()=>g,indataVisitor:()=>M,indexof:()=>de,info:()=>Y,invert:()=>xe,join:()=>ce,lastindexof:()=>fe,luminance:()=>J,merge:()=>Z,modify:()=>re,monthAbbrevFormat:()=>T,monthFormat:()=>C,parseExpression:()=>qe,pathShape:()=>Ae,pinchAngle:()=>ae,pinchDistance:()=>ie,pluck:()=>se,range:()=>Ee,replace:()=>he,reverse:()=>ge,scale:()=>Se,scaleGradient:()=>we,scaleVisitor:()=>I,screen:()=>Ne,setdata:()=>m,slice:()=>pe,timeFormat:()=>x,timeParse:()=>S,treeAncestors:()=>Re,treePath:()=>ke,utcFormat:()=>E,utcParse:()=>w,warn:()=>W,windowSize:()=>Oe});var r=n(26372),i=n(21720),a=n(14588),o=n(51300),s=n(72090),l=n(24988),u=n(84636),c=n(76187),d=n(48872),f=n(71652),p=n(61388);function h(e){const t=this.context.data[e];return t?t.values.value:[]}function g(e,t,n){const r=this.context.data[e]["index:"+t],i=r?r.value.get(n):void 0;return i?i.count:i}function m(e,t){const n=this.context.dataflow,i=this.context.data[e].input;return n.pulse(i,n.changeset().remove(r.truthy).insert(t)),1}function y(e,t,n){if(e){const n=this.context.dataflow,r=e.mark.source;n.pulse(r,n.changeset().encode(e,t))}return void 0!==n?n:e}const v=e=>function(t,n){const r=this.context.dataflow.locale();return null===t?"null":r[e](n)(t)},b=v("format"),x=v("timeFormat"),E=v("utcFormat"),S=v("timeParse"),w=v("utcParse"),_=new Date(2e3,0,1);function A(e,t,n){return Number.isInteger(e)&&Number.isInteger(t)?(_.setYear(2e3),_.setMonth(e),_.setDate(t),x.call(this,_,n)):""}function C(e){return A.call(this,e,1,"%B")}function T(e){return A.call(this,e,1,"%b")}function k(e){return A.call(this,0,2+e,"%A")}function R(e){return A.call(this,0,2+e,"%a")}const D=":",N="@",O="%",F="$";function P(e,t,n,a){t[0].type!==i.Literal&&(0,r.error)("First argument to data functions must be a string literal.");const o=t[0].value,s=D+o;if(!(0,r.hasOwnProperty)(s,a))try{a[s]=n.getData(o).tuplesRef()}catch(e){}}function M(e,t,n,a){t[0].type!==i.Literal&&(0,r.error)("First argument to indata must be a string literal."),t[1].type!==i.Literal&&(0,r.error)("Second argument to indata must be a string literal.");const o=t[0].value,s=t[1].value,l=N+s;(0,r.hasOwnProperty)(l,a)||(a[l]=n.getData(o).indataRef(n,s))}function I(e,t,n,r){if(t[0].type===i.Literal)$(n,r,t[0].value);else for(e in n.scales)$(n,r,e)}function $(e,t,n){const i=O+n;if(!(0,r.hasOwnProperty)(t,i))try{t[i]=e.scaleRef(n)}catch(e){}}function L(e,t){if((0,r.isFunction)(e))return e;if((0,r.isString)(e)){const n=t.scales[e];return n&&(0,a.isRegisteredScale)(n.value)?n.value:void 0}}function B(e,t,n){t.__bandwidth=e=>e&&e.bandwidth?e.bandwidth():0,n._bandwidth=I,n._range=I,n._scale=I;const a=t=>"_["+(t.type===i.Literal?(0,r.stringValue)(O+t.value):(0,r.stringValue)(O)+"+"+e(t))+"]";return{_bandwidth:e=>`this.__bandwidth(${a(e[0])})`,_range:e=>`${a(e[0])}.range()`,_scale:t=>`${a(t[0])}(${e(t[1])})`}}function U(e,t){return function(n,r,i){if(n){const t=L(n,(i||this).context);return t&&t.path[e](r)}return t(r)}}const z=U("area",o.geoArea),q=U("bounds",o.geoBounds),j=U("centroid",o.geoCentroid);function H(e,t){const n=L(e,(t||this).context);return n&&n.scale()}function G(e){const t=this.context.group;let n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n}function V(e,t,n){try{e[t].apply(e,["EXPRESSION"].concat([].slice.call(n)))}catch(t){e.warn(t)}return n[n.length-1]}function W(){return V(this.context.dataflow,"warn",arguments)}function Y(){return V(this.context.dataflow,"info",arguments)}function X(){return V(this.context.dataflow,"debug",arguments)}function K(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function J(e){const t=(0,s.rgb)(e);return.2126*K(t.r)+.7152*K(t.g)+.0722*K(t.b)}function Q(e,t){const n=J(e),r=J(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Z(){const e=[].slice.call(arguments);return e.unshift({}),(0,r.extend)(...e)}function ee(e,t){return e===t||e!=e&&t!=t||((0,r.isArray)(e)?!(!(0,r.isArray)(t)||e.length!==t.length)&&function(e,t){for(let n=0,r=e.length;nte(e,t)}function re(e,t,n,i,a,o){const s=this.context.dataflow,u=this.context.data[e],c=u.input,d=s.stamp();let f,p,h=u.changes;if(!1===s._trigger||!(c.value.length||t||i))return 0;if((!h||h.stamp{u.modified=!0,s.pulse(c,h).run()}),!0,1)),n&&(f=!0===n?r.truthy:(0,r.isArray)(n)||(0,l.isTuple)(n)?n:ne(n),h.remove(f)),t&&h.insert(t),i&&(f=ne(i),c.value.some(f)?h.remove(f):h.insert(i)),a)for(p in o)h.modify(a,p,o[p]);return 1}function ie(e){const t=e.touches,n=t[0].clientX-t[1].clientX,r=t[0].clientY-t[1].clientY;return Math.hypot(n,r)}function ae(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)}const oe={};function se(e,t){const n=oe[t]||(oe[t]=(0,r.field)(t));return(0,r.isArray)(e)?e.map(n):n(e)}function le(e){return(0,r.isArray)(e)||ArrayBuffer.isView(e)?e:null}function ue(e){return le(e)||((0,r.isString)(e)?e:null)}function ce(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;rs.stop(f(t),e(t)))),s}function _e(e,t,n){const r=L(e,(n||this).context);return function(e){return r?r.path.context(e)(t):""}}function Ae(e){let t=null;return function(n){return n?(0,u.pathRender)(n,t=t||(0,u.pathParse)(e)):e}}const Ce=e=>e.data;function Te(e,t){const n=h.call(t,e);return n.root&&n.root.lookup||{}}function ke(e,t,n){const r=Te(e,this),i=r[t],a=r[n];return i&&a?i.path(a).map(Ce):void 0}function Re(e,t){const n=Te(e,this)[t];return n?n.ancestors().map(Ce):void 0}const De=()=>"undefined"!=typeof window&&window||null;function Ne(){const e=De();return e?e.screen:{}}function Oe(){const e=De();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]}function Fe(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]}function Pe(e,t,n){if(!e)return[];const[i,a]=e,o=(new u.Bounds).set(i[0],i[1],a[0],a[1]),s=n||this.context.dataflow.scenegraph().root;return(0,u.intersect)(s,o,function(e){let t=null;if(e){const n=(0,r.array)(e.marktype),i=(0,r.array)(e.markname);t=e=>(!n.length||n.some((t=>e.marktype===t)))&&(!i.length||i.some((t=>e.name===t)))}return t}(t))}const Me={random:()=>(0,d.random)(),cumulativeNormal:d.cumulativeNormal,cumulativeLogNormal:d.cumulativeLogNormal,cumulativeUniform:d.cumulativeUniform,densityNormal:d.densityNormal,densityLogNormal:d.densityLogNormal,densityUniform:d.densityUniform,quantileNormal:d.quantileNormal,quantileLogNormal:d.quantileLogNormal,quantileUniform:d.quantileUniform,sampleNormal:d.sampleNormal,sampleLogNormal:d.sampleLogNormal,sampleUniform:d.sampleUniform,isArray:r.isArray,isBoolean:r.isBoolean,isDate:r.isDate,isDefined:e=>void 0!==e,isNumber:r.isNumber,isObject:r.isObject,isRegExp:r.isRegExp,isString:r.isString,isTuple:l.isTuple,isValid:e=>null!=e&&e==e,toBoolean:r.toBoolean,toDate:e=>(0,r.toDate)(e),toNumber:r.toNumber,toString:r.toString,indexof:de,join:ce,lastindexof:fe,replace:he,reverse:ge,slice:pe,flush:r.flush,lerp:r.lerp,merge:Z,pad:r.pad,peek:r.peek,pluck:se,span:r.span,inrange:r.inrange,truncate:r.truncate,rgb:s.rgb,lab:s.lab,hcl:s.hcl,hsl:s.hsl,luminance:J,contrast:Q,sequence:p.range,format:b,utcFormat:E,utcParse:w,utcOffset:f.utcOffset,utcSequence:f.utcSequence,timeFormat:x,timeParse:S,timeOffset:f.timeOffset,timeSequence:f.timeSequence,timeUnitSpecifier:f.timeUnitSpecifier,monthFormat:C,monthAbbrevFormat:T,dayFormat:k,dayAbbrevFormat:R,quarter:r.quarter,utcquarter:r.utcquarter,week:f.week,utcweek:f.utcweek,dayofyear:f.dayofyear,utcdayofyear:f.utcdayofyear,warn:W,info:Y,debug:X,extent:e=>(0,r.extent)(e),inScope:G,intersect:Pe,clampRange:r.clampRange,pinchDistance:ie,pinchAngle:ae,screen:Ne,containerSize:Fe,windowSize:Oe,bandspace:me,setdata:m,pathShape:Ae,panLinear:r.panLinear,panLog:r.panLog,panPow:r.panPow,panSymlog:r.panSymlog,zoomLinear:r.zoomLinear,zoomLog:r.zoomLog,zoomPow:r.zoomPow,zoomSymlog:r.zoomSymlog,encode:y,modify:re,lassoAppend:function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5;const a=(e=(0,r.array)(e))[e.length-1];return void 0===a||Math.hypot(a[0]-t,a[1]-n)>i?[...e,[t,n]]:e},lassoPath:function(e){return(0,r.array)(e).reduce(((t,n,r)=>{let[i,a]=n;return t+(0==r?`M ${i},${a} `:r===e.length-1?" Z":`L ${i},${a} `)}),"")},intersectLasso:function(e,t,n){const{x:r,y:i,mark:a}=n,o=(new u.Bounds).set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[e,n]of t)eo.x2&&(o.x2=e),no.y2&&(o.y2=n);return o.translate(r,i),Pe([[o.x1,o.y1],[o.x2,o.y2]],e,a).filter((e=>function(e,t,n){let r=0;for(let i=0,a=n.length-1;it!=s>t&&e<(o-l)*(t-u)/(s-u)+l&&r++}return 1&r}(e.x,e.y,t)))}},Ie=["view","item","group","xy","x","y"],$e="this.",Le={},Be={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>`_[${(0,r.stringValue)(F+e)}]`,functions:function(e){const t=(0,i.functions)(e);Ie.forEach((e=>t[e]="event.vega."+e));for(const e in Me)t[e]=$e+e;return(0,r.extend)(t,B(e,Me,Le)),t},constants:i.constants,visitors:Le},Ue=(0,i.codegenExpression)(Be);function ze(e,t,n){return 1===arguments.length?Me[e]:(Me[e]=t,n&&(Le[e]=n),Ue&&(Ue.functions[e]=$e+e),this)}function qe(e,t){const n={};let a;try{e=(0,r.isString)(e)?e:(0,r.stringValue)(e)+"",a=(0,i.parseExpression)(e)}catch(t){(0,r.error)("Expression parse error: "+e)}a.visit((e=>{if(e.type!==i.CallExpression)return;const r=e.callee.name,a=Be.visitors[r];a&&a(r,e.arguments,t,n)}));const o=Ue(a);return o.globals.forEach((e=>{const i=F+e;!(0,r.hasOwnProperty)(n,i)&&t.getSignal(e)&&(n[i]=t.signalRef(e))})),{$expr:(0,r.extend)({code:o.code},t.options.ast?{ast:a}:null),$fields:o.fields,$params:n}}ze("bandwidth",ye,I),ze("copy",ve,I),ze("domain",be,I),ze("range",Ee,I),ze("invert",xe,I),ze("scale",Se,I),ze("gradient",we,I),ze("geoArea",z,I),ze("geoBounds",q,I),ze("geoCentroid",j,I),ze("geoShape",_e,I),ze("geoScale",H,I),ze("indata",g,M),ze("data",h,P),ze("treePath",ke,P),ze("treeAncestors",Re,P),ze("vlSelectionTest",c.selectionTest,c.selectionVisitor),ze("vlSelectionIdTest",c.selectionIdTest,c.selectionVisitor),ze("vlSelectionResolve",c.selectionResolve,c.selectionVisitor),ze("vlSelectionTuples",c.selectionTuples)},35886:(e,t,n)=>{"use strict";n.r(t),n.d(t,{contour:()=>k,geojson:()=>N,geopath:()=>O,geopoint:()=>F,geoshape:()=>P,graticule:()=>M,heatmap:()=>I,isocontour:()=>v,kde2d:()=>A,projection:()=>L});var r=n(24988),i=n(26372),a=n(61388),o=n(48872),s=n(63316),l=n(51300),u=n(72090),c=n(14958);function d(){}const f=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function p(){var e=1,t=1,n=s;function r(e,t){return t.map((t=>a(e,t)))}function a(r,i){var a=[],s=[];return function(n,r,i){var a,s,l,u,c,d,p=[],h=[];a=s=-1,u=n[0]>=r,f[u<<1].forEach(g);for(;++a=r,f[l|u<<1].forEach(g);f[u|0].forEach(g);for(;++s=r,c=n[s*e]>=r,f[u<<1|c<<2].forEach(g);++a=r,d=c,c=n[s*e+a+1]>=r,f[l|u<<1|c<<2|d<<3].forEach(g);f[u|c<<3].forEach(g)}a=-1,c=n[s*e]>=r,f[c<<2].forEach(g);for(;++a=r,f[c<<2|d<<3].forEach(g);function g(e){var t,n,r=[e[0][0]+a,e[0][1]+s],l=[e[1][0]+a,e[1][1]+s],u=o(r),c=o(l);(t=h[u])?(n=p[c])?(delete h[t.end],delete p[n.start],t===n?(t.ring.push(l),i(t.ring)):p[t.start]=h[n.end]={start:t.start,end:n.end,ring:t.ring.concat(n.ring)}):(delete h[t.end],t.ring.push(l),h[t.end=c]=t):(t=p[c])?(n=h[u])?(delete p[t.start],delete h[n.end],t===n?(t.ring.push(l),i(t.ring)):p[n.start]=h[t.end]={start:n.start,end:t.end,ring:n.ring.concat(t.ring)}):(delete p[t.start],t.ring.unshift(r),p[t.start=u]=t):p[u]=h[c]={start:u,end:c,ring:[r,l]}}f[c<<3].forEach(g)}(r,i,(e=>{n(e,r,i),function(e){var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];for(;++t0?a.push([e]):s.push(e)})),s.forEach((e=>{for(var t,n=0,r=a.length;n{var a,o=n[0],s=n[1],l=0|o,u=0|s,c=r[u*e+l];o>0&&o0&&s=0&&o>=0||(0,i.error)("invalid size"),e=a,t=o,r},r.smooth=function(e){return arguments.length?(n=e?s:d,r):n===s},r}function h(e,t){for(var n,r=-1,i=t.length;++rr!=p>r&&n<(f-u)*(r-c)/(p-c)+u&&(i=-i)}return i}function m(e,t,n){var r,i,a,o;return function(e,t,n){return(t[0]-e[0])*(n[1]-e[1])==(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&(i=e[r=+(e[0]===t[0])],a=n[r],o=t[r],i<=a&&a<=o||o<=a&&a<=i)}function y(e,t,n){return function(r){var o=(0,i.extent)(r),s=n?Math.min(o[0],0):o[0],l=o[1],u=l-s,c=t?(0,a.tickStep)(s,l,e):u/(e+1);return(0,a.range)(s+c,l,c)}}function v(e){r.Transform.call(this,null,e)}function b(e,t,n,r,i){const a=e.x1||0,o=e.y1||0,s=t*n<0;function l(e){e.forEach(u)}function u(e){s&&e.reverse(),e.forEach(c)}function c(e){e[0]=(e[0]-a)*t+r,e[1]=(e[1]-o)*n+i}return function(e){return e.coordinates.forEach(l),e}}function x(e,t,n){const r=e>=0?e:(0,o.bandwidthNRD)(t,n);return Math.round((Math.sqrt(4*r*r+1)-1)/2)}function E(e){return(0,i.isFunction)(e)?e:(0,i.constant)(+e)}function S(){var e=e=>e[0],t=e=>e[1],n=i.one,r=[-1,-1],o=960,s=500,l=2;function u(i,u){const c=x(r[0],i,e)>>l,d=x(r[1],i,t)>>l,f=c?c+2:0,p=d?d+2:0,h=2*f+(o>>l),g=2*p+(s>>l),m=new Float32Array(h*g),y=new Float32Array(h*g);let v=m;i.forEach((r=>{const i=f+(+e(r)>>l),a=p+(+t(r)>>l);i>=0&&i=0&&a0&&d>0?(w(h,g,m,y,c),_(h,g,y,m,d),w(h,g,m,y,c),_(h,g,y,m,d),w(h,g,m,y,c),_(h,g,y,m,d)):c>0?(w(h,g,m,y,c),w(h,g,y,m,c),w(h,g,m,y,c),v=y):d>0&&(_(h,g,m,y,d),_(h,g,y,m,d),_(h,g,m,y,d),v=y);const b=u?Math.pow(2,-2*l):1/(0,a.sum)(v);for(let e=0,t=h*g;e>l),y2:p+(s>>l)}}return u.x=function(t){return arguments.length?(e=E(t),u):e},u.y=function(e){return arguments.length?(t=E(e),u):t},u.weight=function(e){return arguments.length?(n=E(e),u):n},u.size=function(e){if(!arguments.length)return[o,s];var t=+e[0],n=+e[1];return t>=0&&n>=0||(0,i.error)("invalid size"),o=t,s=n,u},u.cellSize=function(e){return arguments.length?((e=+e)>=1||(0,i.error)("invalid cell size"),l=Math.floor(Math.log(e)/Math.LN2),u):1<=i&&(t>=a&&(s-=n[t-a+o*e]),r[t-i+o*e]=s/Math.min(t+1,e-1+a-t,a))}function _(e,t,n,r,i){const a=1+(i<<1);for(let o=0;o=i&&(s>=a&&(l-=n[o+(s-a)*e]),r[o+(s-i)*e]=l/Math.min(s+1,t-1+a-s,a))}function A(e){r.Transform.call(this,null,e)}v.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},(0,i.inherits)(v,r.Transform,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=t.materialize(t.SOURCE).source,s=e.field||i.identity,l=p().smooth(!1!==e.smooth),u=e.thresholds||function(e,t,n){const r=y(n.levels||10,n.nice,!1!==n.zero);return"shared"!==n.resolve?r:r(e.map((e=>(0,a.max)(t(e).values))))}(o,s,e),c=null===e.as?null:e.as||"contour",d=[];return o.forEach((t=>{const n=s(t),a=l.size([n.width,n.height])(n.values,(0,i.isArray)(u)?u:u(n.values));!function(e,t,n,r){let a=r.scale||t.scale,o=r.translate||t.translate;(0,i.isFunction)(a)&&(a=a(n,r));(0,i.isFunction)(o)&&(o=o(n,r));if((1===a||null==a)&&!o)return;const s=((0,i.isNumber)(a)?a:a[0])||1,l=((0,i.isNumber)(a)?a:a[1])||1,u=o&&o[0]||0,c=o&&o[1]||0;e.forEach(b(t,s,l,u,c))}(a,n,t,e),a.forEach((e=>{d.push((0,r.rederive)(t,(0,r.ingest)(null!=c?{[c]:e}:e)))}))})),this.value&&(n.rem=this.value),this.value=n.source=n.add=d,n}}),A.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const C=["x","y","weight","size","cellSize","bandwidth"];function T(e,t){return C.forEach((n=>null!=t[n]?e[n](t[n]):0)),e}function k(e){r.Transform.call(this,null,e)}(0,i.inherits)(A,r.Transform,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n,a=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=function(e,t){var n,r,i,a,o,s,l=[],u=e=>e(a);if(null==t)l.push(e);else for(n={},r=0,i=e.length;r(0,r.ingest)(function(e,t){for(let n=0;nr.push(u(e)))),s&&l&&(t.visit(c,(e=>{var t=s(e),n=l(e);null!=t&&null!=n&&(t=+t)===t&&(n=+n)===n&&a.push([t,n])})),r=r.concat({type:R,geometry:{type:"MultiPoint",coordinates:a}})),this.value={type:D,features:r}}}),O.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},(0,i.inherits)(O,r.Transform,{transform(e,t){var n=t.fork(t.ALL),r=this.value,a=e.field||i.identity,o=e.as||"path",l=n.SOURCE;!r||e.modified()?(this.value=r=(0,s.getProjectionPath)(e.projection),n.materialize().reflow()):l=a===i.identity||t.modified(a.fields)?n.ADD_MOD:n.ADD;const u=function(e,t){const n=e.pointRadius();e.context(null),null!=t&&e.pointRadius(t);return n}(r,e.pointRadius);return n.visit(l,(e=>e[o]=r(a(e)))),r.pointRadius(u),n.modifies(o)}}),F.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},(0,i.inherits)(F,r.Transform,{transform(e,t){var n,r=e.projection,i=e.fields[0],a=e.fields[1],o=e.as||["x","y"],s=o[0],l=o[1];function u(e){const t=r([i(e),a(e)]);t?(e[s]=t[0],e[l]=t[1]):(e[s]=void 0,e[l]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,u):(n=t.modified(i.fields)||t.modified(a.fields),t.visit(n?t.ADD_MOD:t.ADD,u)),t.modifies(o)}}),P.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},(0,i.inherits)(P,r.Transform,{transform(e,t){var n=t.fork(t.ALL),r=this.value,a=e.as||"shape",o=n.ADD;return r&&!e.modified()||(this.value=r=function(e,t,n){const r=null==n?n=>e(t(n)):r=>{var i=e.pointRadius(),a=e.pointRadius(n)(t(r));return e.pointRadius(i),a};return r.context=t=>(e.context(t),r),r}((0,s.getProjectionPath)(e.projection),e.field||(0,i.field)("datum"),e.pointRadius),n.materialize().reflow(),o=n.SOURCE),n.visit(o,(e=>e[a]=r)),n.modifies(a)}}),M.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},(0,i.inherits)(M,r.Transform,{transform(e,t){var n,a=this.value,o=this.generator;if(!a.length||e.modified())for(const t in e)(0,i.isFunction)(o[t])&&o[t](e[t]);return n=o(),a.length?t.mod.push((0,r.replace)(a[0],n)):t.add.push((0,r.ingest)(n)),a[0]=n,t}}),I.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},(0,i.inherits)(I,r.Transform,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,r="shared"===e.resolve,o=e.field||i.identity,s=function(e,t){let n;(0,i.isFunction)(e)?(n=n=>e(n,t),n.dep=$(e)):e?n=(0,i.constant)(e):(n=e=>e.$value/e.$max||0,n.dep=!0);return n}(e.opacity,e),l=function(e,t){let n;(0,i.isFunction)(e)?(n=n=>(0,u.rgb)(e(n,t)),n.dep=$(e)):n=(0,i.constant)((0,u.rgb)(e||"#888"));return n}(e.color,e),d=e.as||"image",f={$x:0,$y:0,$value:0,$max:r?(0,a.max)(n.map((e=>(0,a.max)(o(e).values)))):0};return n.forEach((e=>{const t=o(e),n=(0,i.extend)({},e,f);r||(n.$max=(0,a.max)(t.values||[])),e[d]=function(e,t,n,r){const a=e.width,o=e.height,s=e.x1||0,l=e.y1||0,u=e.x2||a,d=e.y2||o,f=e.values,p=f?e=>f[e]:i.zero,h=(0,c.canvas)(u-s,d-l),g=h.getContext("2d"),m=g.getImageData(0,0,u-s,d-l),y=m.data;for(let e=l,i=0;e{null!=e[t]&&B(n,t,e[t])}))):s.projectionProperties.forEach((t=>{e.modified(t)&&B(n,t,e[t])})),null!=e.pointRadius&&n.path.pointRadius(e.pointRadius),e.fit&&function(e,t){const n=function(e){return e=(0,i.array)(e),1===e.length?e[0]:{type:D,features:e.reduce(((e,t)=>e.concat(function(e){return e.type===D?e.features:(0,i.array)(e).filter((e=>null!=e)).map((e=>e.type===R?e:{type:R,geometry:e}))}(t))),[])}}(t.fit);t.extent?e.fitExtent(t.extent,n):t.size&&e.fitSize(t.size,n)}(n,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}})},91434:(e,t,n)=>{"use strict";n.r(t),n.d(t,{nest:()=>s,pack:()=>p,partition:()=>g,stratify:()=>m,tree:()=>b,treelinks:()=>x,treemap:()=>w});var r=n(24988),i=n(26372),a=n(37750);function o(e,t,n){const r={};return e.each((e=>{const i=e.data;n(i)&&(r[t(i)]=e)})),e.lookup=r,e}function s(e){r.Transform.call(this,null,e)}s.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const l=e=>e.values;function u(){const e=[],t={entries:e=>r(n(e,0),0),key:n=>(e.push(n),t)};function n(t,r){if(r>=e.length)return t;const i=t.length,a=e[r++],o={},s={};let l,u,c,d=-1;for(;++de.length)return t;const i=[];for(const e in t)i.push({key:e,values:r(t[e],n)});return i}return t}function c(e){r.Transform.call(this,null,e)}(0,i.inherits)(s,r.Transform,{transform(e,t){t.source||(0,i.error)("Nest transform requires an upstream data source.");var n=e.generate,s=e.modified(),c=t.clone(),d=this.value;return(!d||s||t.changed())&&(d&&d.each((e=>{e.children&&(0,r.isTuple)(e.data)&&c.rem.push(e.data)})),this.value=d=(0,a.hierarchy)({values:(0,i.array)(e.keys).reduce(((e,t)=>(e.key(t),e)),u()).entries(c.source)},l),n&&d.each((e=>{e.children&&(e=(0,r.ingest)(e.data),c.add.push(e),c.source.push(e))})),o(d,r.tupleid,r.tupleid)),c.source.root=d,c}});const d=(e,t)=>e.parent===t.parent?1:2;(0,i.inherits)(c,r.Transform,{transform(e,t){t.source&&t.source.root||(0,i.error)(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(e.method),a=this.fields,o=t.source.root,s=e.as||a;e.field?o.sum(e.field):o.count(),e.sort&&o.sort((0,r.stableCompare)(e.sort,(e=>e.data))),function(e,t,n){for(let r,i=0,a=t.length;ifunction(e,t,n){const r=e.data,i=t.length-1;for(let a=0;as[(0,r.tupleid)(e)]=1)),a.each((e=>{const t=e.data,n=e.parent&&e.parent.data;n&&s[(0,r.tupleid)(t)]&&s[(0,r.tupleid)(n)]&&o.add.push((0,r.ingest)({source:n,target:t}))})),this.value=o.add):t.changed(t.MOD)&&(t.visit(t.MOD,(e=>s[(0,r.tupleid)(e)]=1)),n.forEach((e=>{(s[(0,r.tupleid)(e.source)]||s[(0,r.tupleid)(e.target)])&&o.mod.push(e)}))),o}});const E={binary:a.treemapBinary,dice:a.treemapDice,slice:a.treemapSlice,slicedice:a.treemapSliceDice,squarify:a.treemapSquarify,resquarify:a.treemapResquarify},S=["x0","y0","x1","y1","depth","children"];function w(e){c.call(this,e)}w.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:S.length,default:S}]},(0,i.inherits)(w,c,{layout(){const e=(0,a.treemap)();return e.ratio=t=>{const n=e.tile();n.ratio&&e.tile(n.ratio(t))},e.method=t=>{(0,i.hasOwnProperty)(E,t)?e.tile(E[t]):(0,i.error)("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:S})},48196:(e,t,n)=>{"use strict";n.r(t),n.d(t,{expressionInterpreter:()=>p});var r={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},i={"*":(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)=>ee<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},a={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const o=Array.prototype.slice,s=(e,t,n)=>{const r=n?n(t[0]):t[0];return r[e].apply(r,o.call(t,1))};var l={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:(e,t,n,r,i,a,o)=>new Date(e,t||0,null!=n?n:1,r||0,i||0,a||0,o||0),date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return s("join",arguments)},indexof:function(){return s("indexOf",arguments)},lastindexof:function(){return s("lastIndexOf",arguments)},slice:function(){return s("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return s("substring",arguments,String)},split:function(){return s("split",arguments,String)},replace:function(){return s("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const u=["view","item","group","xy","x","y"],c=new Set([Function,eval,setTimeout,setInterval]);"function"==typeof setImmediate&&c.add(setImmediate);const d={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:"datum"===n?e.datum:"event"===n?e.event:"item"===n?e.item:r[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,r=e(t.object);n&&(e.memberDepth+=1);const i=e(t.property);if(n&&(e.memberDepth-=1),!c.has(r[i]))return r[i];console.error(`Prevented interpretation of member "${i}" which could lead to insecure code execution`)},CallExpression:(e,t)=>{const n=t.arguments;let r=t.callee.name;return r.startsWith("_")&&(r=r.slice(1)),"if"===r?e(n[0])?e(n[1]):e(n[2]):(e.fn[r]||l[r]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>i[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>a[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>"&&"===t.operator?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce(((t,n)=>{e.memberDepth+=1;const r=e(n.key);return e.memberDepth-=1,c.has(e(n.value))?console.error(`Prevented interpretation of property "${r}" which could lead to insecure code execution`):t[r]=e(n.value),t}),{})};function f(e,t,n,r,i,a){const o=e=>d[e.type](o,e);return o.memberDepth=0,o.fn=Object.create(t),o.params=n,o.datum=r,o.event=i,o.item=a,u.forEach((e=>o.fn[e]=function(){return i.vega[e](...arguments)})),o(e)}var p={operator(e,t){const n=t.ast,r=e.functions;return e=>f(n,r,e)},parameter(e,t){const n=t.ast,r=e.functions;return(e,t)=>f(n,r,t,e)},event(e,t){const n=t.ast,r=e.functions;return e=>f(n,r,void 0,void 0,e)},handler(e,t){const n=t.ast,r=e.functions;return(e,t)=>{const i=t.item&&t.item.datum;return f(n,r,e,i,t)}},encode(e,t){const{marktype:n,channels:r}=t,i=e.functions,a="group"===n||"image"===n||"rect"===n;return(e,t)=>{const o=e.datum;let s,l=0;for(const n in r)s=f(r[n].ast,i,t,o,void 0,e),e[n]!==s&&(e[n]=s,l=1);return"rule"!==n&&function(e,t,n){let r;t.x2&&(t.x?(n&&e.x>e.x2&&(r=e.x,e.x=e.x2,e.x2=r),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(r=e.y,e.y=e.y2,e.y2=r),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.height||0)/2)}(e,r,a),l}}}},43308:(e,t,n)=>{"use strict";n.r(t),n.d(t,{label:()=>T});var r=n(84636),i=n(14958),a=n(24988),o=n(26372);const s=4278190080;function l(e,t,n){return new Uint32Array(e.getImageData(0,0,t,n).data.buffer)}function u(e,t,n){if(!t.length)return;const i=t[0].mark.marktype;"group"===i?t.forEach((t=>{t.items.forEach((t=>u(e,t.items,n)))})):r.Marks[i].draw(e,{items:n?t.map(c):t})}function c(e){const t=(0,a.rederive)(e,{});return t.stroke&&0!==t.strokeOpacity||t.fill&&0!==t.fillOpacity?{...t,strokeOpacity:1,stroke:"#000",fillOpacity:0}:t}const d=31,f=new Uint32Array(33),p=new Uint32Array(33);p[0]=0,f[0]=~p[0];for(let e=1;e<=32;++e)p[e]=p[e-1]<<1|1,f[e]=~p[e];function h(e,t,n){const r=Math.max(1,Math.sqrt(e*t/1e6)),i=~~((e+2*n+r)/r),a=~~((t+2*n+r)/r),o=e=>~~((e+n)/r);return o.invert=e=>e*r-n,o.bitmap=()=>function(e,t){const n=new Uint32Array(~~((e*t+32)/32));function r(e,t){n[e]|=t}function i(e,t){n[e]&=t}return{array:n,get:(t,r)=>{const i=r*e+t;return n[i>>>5]&1<<(i&d)},set:(t,n)=>{const i=n*e+t;r(i>>>5,1<<(i&d))},clear:(t,n)=>{const r=n*e+t;i(r>>>5,~(1<<(r&d)))},getRange:(t,r,i,a)=>{let o,s,l,u,c=a;for(;c>=r;--c)if(o=c*e+t,s=c*e+i,l=o>>>5,u=s>>>5,l===u){if(n[l]&f[o&d]&p[1+(s&d)])return!0}else{if(n[l]&f[o&d])return!0;if(n[u]&p[1+(s&d)])return!0;for(let e=l+1;e{let o,s,l,u,c;for(;n<=a;++n)if(o=n*e+t,s=n*e+i,l=o>>>5,u=s>>>5,l===u)r(l,f[o&d]&p[1+(s&d)]);else for(r(l,f[o&d]),r(u,p[1+(s&d)]),c=l+1;c{let o,s,l,u,c;for(;n<=a;++n)if(o=n*e+t,s=n*e+r,l=o>>>5,u=s>>>5,l===u)i(l,p[o&d]|f[1+(s&d)]);else for(i(l,p[o&d]),i(u,f[1+(s&d)]),c=l+1;cn<0||r<0||a>=t||i>=e}}(i,a),o.ratio=r,o.padding=n,o.width=e,o.height=t,o}function g(e,t,n,r,i,a){let o=n/2;return e-o<0||e+o>i||t-(o=r/2)<0||t+o>a}function m(e,t,n,r,i,a,o,s){const l=i*a/(2*r),u=e(t-l),c=e(t+l),d=e(n-(a/=2)),f=e(n+a);return o.outOfBounds(u,d,c,f)||o.getRange(u,d,c,f)||s&&s.getRange(u,d,c,f)}const y=[-1,-1,1,1],v=[-1,1,-1,1];const b=["right","center","left"],x=["bottom","middle","top"];function E(e,t,n,r,i,a,o,s,l,u,c,d){return!(i.outOfBounds(e,n,t,r)||(d&&a||i).getRange(e,n,t,r))}const S={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},w={naive:function(e,t,n,i){const a=e.width,o=e.height;return function(e){const t=e.datum.datum.items[i].items,n=t.length,s=e.datum.fontSize,l=r.textMetrics.width(e.datum,e.datum.text);let u,c,d,f,p,h,g,m=0;for(let r=0;r=m&&(m=g,e.x=p,e.y=h);return p=l/2,h=s/2,u=e.x-p,c=e.x+p,d=e.y-h,f=e.y+h,e.align="center",u<0&&c<=a?e.align="left":0<=u&&a=1;)f=(p+h)/2,m(e,c,d,u,i,f,s,l)?h=f:p=f;if(p>r)return[c,d,p,!0]}}return function(t){const l=t.datum.datum.items[i].items,c=l.length,d=t.datum.fontSize,f=r.textMetrics.width(t.datum,t.datum.text);let p,h,y,v,b,x,E,S,w,_,A,C,T,k,R,D,N,O=n?d:0,F=!1,P=!1,M=0;for(let r=0;rh&&(N=p,p=h,h=N),y>v&&(N=y,y=v,v=N),w=e(p),A=e(h),_=~~((w+A)/2),C=e(y),k=e(v),T=~~((C+k)/2),E=_;E>=w;--E)for(S=T;S>=C;--S)D=u(E,S,O,f,d),D&&([t.x,t.y,O,F]=D);for(E=_;E<=A;++E)for(S=T;S<=k;++S)D=u(E,S,O,f,d),D&&([t.x,t.y,O,F]=D);F||n||(R=Math.abs(h-p+v-y),b=(p+h)/2,x=(y+v)/2,R>=M&&!g(b,x,f,d,a,o)&&!m(e,b,x,d,f,d,s,null)&&(M=R,t.x=b,t.y=x,P=!0))}return!(!F&&!P)&&(b=f/2,x=d/2,s.setRange(e(t.x-b),e(t.y-x),e(t.x+b),e(t.y+x)),t.align="center",t.baseline="middle",!0)}},floodfill:function(e,t,n,i){const a=e.width,o=e.height,s=t[0],l=t[1],u=e.bitmap();return function(t){const c=t.datum.datum.items[i].items,d=c.length,f=t.datum.fontSize,p=r.textMetrics.width(t.datum,t.datum.text),h=[];let b,x,E,S,w,_,A,C,T,k,R,D,N=n?f:0,O=!1,F=!1,P=0;for(let r=0;r=1;)R=(T+k)/2,m(e,w,_,f,p,R,s,l)?k=R:T=R;T>N&&(t.x=w,t.y=_,N=T,O=!0)}}O||n||(D=Math.abs(x-b+S-E),w=(b+x)/2,_=(E+S)/2,D>=P&&!g(w,_,p,f,a,o)&&!m(e,w,_,f,p,f,s,null)&&(P=D,t.x=w,t.y=_,F=!0))}return!(!O&&!F)&&(w=p/2,_=f/2,s.setRange(e(t.x-w),e(t.y-_),e(t.x+w),e(t.y+_)),t.align="center",t.baseline="middle",!0)}}};function _(e,t,n,a,o,c,d,f,p,g,m){if(!e.length)return e;const y=Math.max(a.length,o.length),v=function(e,t){const n=new Float64Array(t),r=e.length;for(let t=0;t[e.x,e.x,e.x,e.y,e.y,e.y];return e?"line"===e||"area"===e?e=>i(e.datum):"line"===t?e=>{const t=e.datum.items[r].items;return i(t.length?t["start"===n?0:t.length-1]:{x:NaN,y:NaN})}:e=>{const t=e.datum.bounds;return[t.x1,(t.x1+t.x2)/2,t.x2,t.y1,(t.y1+t.y2)/2,t.y2]}:i}(A,C,f,p),R=null===g||g===1/0,D=T&&"naive"===m;var N;let O=-1,F=-1;const P=e.map((e=>{const t=R?r.textMetrics.width(e,e.text):void 0;return O=Math.max(O,t),F=Math.max(F,e.fontSize),{datum:e,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:k(e),textWidth:t}}));g=null===g||g===1/0?Math.max(O,F)+Math.max(...a):g;const M=h(t[0],t[1],g);let I;if(!D){n&&P.sort(((e,t)=>n(e.datum,t.datum)));let t=!1;for(let e=0;e<_.length&&!t;++e)t=5===_[e]||v[e]<0;const r=(A&&d||T)&&e.map((e=>e.datum));I=c.length||r?function(e,t,n,r,a){const o=e.width,c=e.height,d=r||a,f=(0,i.canvas)(o,c).getContext("2d"),p=(0,i.canvas)(o,c).getContext("2d"),h=d&&(0,i.canvas)(o,c).getContext("2d");n.forEach((e=>u(f,e,!1))),u(p,t,!1),d&&u(h,t,!0);const g=l(f,o,c),m=l(p,o,c),y=d&&l(h,o,c),v=e.bitmap(),b=d&&e.bitmap();let x,E,S,w,_,A,C,T;for(E=0;En.set(e(t.boundary[0]),e(t.boundary[3])))),[n,void 0]}(M,d&&P)}const $=T?w[m](M,I,d,p):function(e,t,n,i){const a=e.width,o=e.height,s=t[0],l=t[1],u=i.length;return function(t){const c=t.boundary,d=t.datum.fontSize;if(c[2]<0||c[5]<0||c[0]>a||c[3]>o)return!1;let f,p,h,g,m,y,v,S,w,_,A,C,T,k,R,D=t.textWidth??0;for(let a=0;a>>2&3)-1,h=0===f&&0===p||i[a]<0,g=f&&p?Math.SQRT1_2:1,m=i[a]<0?-1:1,y=c[1+f]+i[a]*f*g,A=c[4+p]+m*d*p/2+i[a]*p*g,S=A-d/2,w=A+d/2,C=e(y),k=e(S),R=e(w),!D){if(!E(C,C,k,R,s,l,0,0,0,0,0,h))continue;D=r.textMetrics.width(t.datum,t.datum.text)}if(_=y+m*D*f/2,y=_-D/2,v=_+D/2,C=e(y),T=e(v),E(C,T,k,R,s,l,0,0,0,0,0,h))return t.x=f?f*m<0?v:y:_,t.y=p?p*m<0?w:S:A,t.align=b[f*m+1],t.baseline=x[p*m+1],s.setRange(C,k,T,R),!0}return!1}}(M,I,_,v);return P.forEach((e=>e.opacity=+$(e))),P}const A=["x","y","opacity","align","baseline"],C=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function T(e){a.Transform.call(this,null,e)}T.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:C},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:A.length,default:A}]},(0,o.inherits)(T,a.Transform,{transform(e,t){const n=e.modified();if(!(n||t.changed(t.ADD_REM)||function(n){const r=e[n];return(0,o.isFunction)(r)&&t.modified(r.fields)}("sort")))return;e.size&&2===e.size.length||(0,o.error)("Size parameter should be specified as a [width, height] array.");const r=e.as||A;return _(t.materialize(t.SOURCE).source||[],e.size,e.sort,(0,o.array)(null==e.offset?1:e.offset),(0,o.array)(e.anchor||C),e.avoidMarks||[],!1!==e.avoidBaseMark,e.lineAnchor||"end",e.markIndex||0,void 0===e.padding?0:e.padding,e.method||"naive").forEach((e=>{const t=e.datum;t[r[0]]=e.x,t[r[1]]=e.y,t[r[2]]=e.opacity,t[r[3]]=e.align,t[r[4]]=e.baseline})),t.reflow(n).modifies(r)}})},54814:(e,t,n)=>{"use strict";n.r(t),n.d(t,{COUNTING_OPS:()=>c,MULTIDOMAIN_SORT_OP_INDEX:()=>o,SHARED_DOMAIN_OPS:()=>h,SUM_OPS:()=>p,isAggregateOp:()=>u,isArgmaxDef:()=>l,isArgminDef:()=>s,isCountingAggregateOp:()=>d,isMinMaxOp:()=>f});var r=n(26372),i=n(79989);const a={argmax:1,argmin:1,average:1,count:1,distinct:1,exponential:1,exponentialb:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},o={count:1,min:1,max:1};function s(e){return(0,i.hasProperty)(e,"argmin")}function l(e){return(0,i.hasProperty)(e,"argmax")}function u(e){return(0,r.isString)(e)&&(0,r.hasOwnProperty)(a,e)}const c=new Set(["count","valid","missing","distinct"]);function d(e){return(0,r.isString)(e)&&c.has(e)}function f(e){return(0,r.isString)(e)&&(0,i.contains)(["min","max"],e)}const p=new Set(["count","sum","distinct","valid","missing"]),h=new Set(["mean","average","median","q1","q3","min","max"])},65032:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AXIS_CONFIGS:()=>p,AXIS_PARTS:()=>s,AXIS_PROPERTIES:()=>f,AXIS_PROPERTY_TYPE:()=>l,COMMON_AXIS_PROPERTIES_INDEX:()=>u,CONDITIONAL_AXIS_PROP_INDEX:()=>a,isAxisProperty:()=>d,isConditionalAxisValue:()=>o});var r=n(79989),i=n(26372);const a={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function o(e){return e?.condition}const s=["domain","grid","labels","ticks","title"],l={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},u={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},c={...u,style:1,labelExpr:1,encoding:1};function d(e){return(0,i.hasOwnProperty)(c,e)}const f=(0,r.keys)(c),p=(0,r.keys)({axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1})},19664:(e,t,n)=>{"use strict";n.r(t),n.d(t,{autoMaxBins:()=>f,binToString:()=>s,isBinParams:()=>c,isBinned:()=>u,isBinning:()=>l,isParameterExtent:()=>d});var r=n(26372),i=n(95290),a=n(79543),o=n(79989);function s(e){return(0,r.isBoolean)(e)&&(e=(0,a.normalizeBin)(e,void 0)),"bin"+(0,o.keys)(e).map((t=>d(e[t])?(0,o.varName)(`_${t}_${(0,o.entries)(e[t])}`):(0,o.varName)(`_${t}_${e[t]}`))).join("")}function l(e){return!0===e||c(e)&&!e.binned}function u(e){return"binned"===e||c(e)&&!0===e.binned}function c(e){return(0,r.isObject)(e)}function d(e){return(0,o.hasProperty)(e,"param")}function f(e){switch(e){case i.ROW:case i.COLUMN:case i.SIZE:case i.COLOR:case i.FILL:case i.STROKE:case i.STROKEWIDTH:case i.OPACITY:case i.FILLOPACITY:case i.STROKEOPACITY:case i.SHAPE:return 6;case i.STROKEDASH:return 4;default:return 10}}},95290:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ANGLE:()=>k,CHANNELS:()=>Z,COLOR:()=>w,COLUMN:()=>o,DESCRIPTION:()=>z,DETAIL:()=>I,FACET:()=>s,FACET_CHANNELS:()=>J,FILL:()=>_,FILLOPACITY:()=>D,GEOPOSITION_CHANNELS:()=>W,HREF:()=>B,KEY:()=>$,LATITUDE:()=>v,LATITUDE2:()=>x,LONGITUDE:()=>b,LONGITUDE2:()=>E,NONPOSITION_CHANNELS:()=>$e,NONPOSITION_SCALE_CHANNELS:()=>at,OFFSET_SCALE_CHANNELS:()=>Ge,OPACITY:()=>R,ORDER:()=>M,POLAR_POSITION_SCALE_CHANNELS:()=>qe,POLAR_POSITION_SCALE_CHANNEL_INDEX:()=>ze,POSITION_SCALE_CHANNELS:()=>Be,RADIUS:()=>h,RADIUS2:()=>g,ROW:()=>a,SCALE_CHANNELS:()=>ut,SECONDARY_RANGE_CHANNEL:()=>fe,SHAPE:()=>C,SINGLE_DEF_CHANNELS:()=>le,SINGLE_DEF_UNIT_CHANNELS:()=>ue,SIZE:()=>T,STROKE:()=>A,STROKEDASH:()=>F,STROKEOPACITY:()=>N,STROKEWIDTH:()=>O,TEXT:()=>P,THETA:()=>m,THETA2:()=>y,TIME:()=>S,TIME_SCALE_CHANNELS:()=>Ye,TOOLTIP:()=>L,UNIT_CHANNELS:()=>Ee,URL:()=>U,X:()=>l,X2:()=>c,XOFFSET:()=>f,Y:()=>u,Y2:()=>d,YOFFSET:()=>p,getMainChannelFromOffsetChannel:()=>xe,getMainRangeChannel:()=>he,getOffsetChannel:()=>ve,getOffsetScaleChannel:()=>be,getPositionChannelFromLatLong:()=>G,getPositionScaleChannel:()=>je,getSecondaryRangeChannel:()=>me,getSizeChannel:()=>ye,getVgPositionChannel:()=>ge,isChannel:()=>de,isColorChannel:()=>X,isGeoPositionChannel:()=>V,isNonPositionScaleChannel:()=>ot,isPolarPositionChannel:()=>j,isScaleChannel:()=>ct,isSecondaryRangeChannel:()=>pe,isSingleDefUnitChannel:()=>ce,isTime:()=>Xe,isXorY:()=>Ue,isXorYOffset:()=>Ve,rangeType:()=>gt,supportLegend:()=>st,supportMark:()=>dt});var r=n(26372),i=n(79989);const a="row",o="column",s="facet",l="x",u="y",c="x2",d="y2",f="xOffset",p="yOffset",h="radius",g="radius2",m="theta",y="theta2",v="latitude",b="longitude",x="latitude2",E="longitude2",S="time",w="color",_="fill",A="stroke",C="shape",T="size",k="angle",R="opacity",D="fillOpacity",N="strokeOpacity",O="strokeWidth",F="strokeDash",P="text",M="order",I="detail",$="key",L="tooltip",B="href",U="url",z="description",q={theta:1,theta2:1,radius:1,radius2:1};function j(e){return(0,r.hasOwnProperty)(q,e)}const H={longitude:1,longitude2:1,latitude:1,latitude2:1};function G(e){switch(e){case v:return"y";case x:return"y2";case b:return"x";case E:return"x2"}}function V(e){return(0,r.hasOwnProperty)(H,e)}const W=(0,i.keys)(H),Y={x:1,y:1,x2:1,y2:1,...q,...H,xOffset:1,yOffset:1,color:1,fill:1,stroke:1,time:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1};function X(e){return e===w||e===_||e===A}const K={row:1,column:1,facet:1},J=(0,i.keys)(K),Q={...Y,...K},Z=(0,i.keys)(Q),{order:ee,detail:te,tooltip:ne,...re}=Q,{row:ie,column:ae,facet:oe,...se}=re,le=(0,i.keys)(re),ue=(0,i.keys)(se);function ce(e){return(0,r.hasOwnProperty)(se,e)}function de(e){return(0,r.hasOwnProperty)(Q,e)}const fe=[c,d,x,E,y,g];function pe(e){return he(e)!==e}function he(e){switch(e){case c:return l;case d:return u;case x:return v;case E:return b;case y:return m;case g:return h}return e}function ge(e){if(j(e))switch(e){case m:return"startAngle";case y:return"endAngle";case h:return"outerRadius";case g:return"innerRadius"}return e}function me(e){switch(e){case l:return c;case u:return d;case v:return x;case b:return E;case m:return y;case h:return g}}function ye(e){switch(e){case l:case c:return"width";case u:case d:return"height"}}function ve(e){switch(e){case l:return"xOffset";case u:return"yOffset";case c:return"x2Offset";case d:return"y2Offset";case m:return"thetaOffset";case h:return"radiusOffset";case y:return"theta2Offset";case g:return"radius2Offset"}}function be(e){switch(e){case l:return"xOffset";case u:return"yOffset"}}function xe(e){switch(e){case"xOffset":return"x";case"yOffset":return"y"}}const Ee=(0,i.keys)(Y),{x:Se,y:we,x2:_e,y2:Ae,xOffset:Ce,yOffset:Te,latitude:ke,longitude:Re,latitude2:De,longitude2:Ne,theta:Oe,theta2:Fe,radius:Pe,radius2:Me,...Ie}=Y,$e=(0,i.keys)(Ie),Le={x:1,y:1},Be=(0,i.keys)(Le);function Ue(e){return(0,r.hasOwnProperty)(Le,e)}const ze={theta:1,radius:1},qe=(0,i.keys)(ze);function je(e){return"width"===e?l:u}const He={xOffset:1,yOffset:1},Ge=(0,i.keys)(He);function Ve(e){return(0,r.hasOwnProperty)(He,e)}const We={time:1},Ye=(0,i.keys)(We);function Xe(e){return e in We}const{text:Ke,tooltip:Je,href:Qe,url:Ze,description:et,detail:tt,key:nt,order:rt,...it}=Ie,at=(0,i.keys)(it);function ot(e){return(0,r.hasOwnProperty)(Ie,e)}function st(e){switch(e){case w:case _:case A:case T:case C:case R:case O:case F:return!0;case D:case N:case k:case S:return!1}}const lt={...Le,...ze,...He,...it},ut=(0,i.keys)(lt);function ct(e){return(0,r.hasOwnProperty)(lt,e)}function dt(e,t){return function(e){switch(e){case w:case _:case A:case z:case I:case $:case L:case B:case M:case R:case D:case N:case O:case s:case a:case o:return ft;case l:case u:case f:case p:case v:case b:case S:return ht;case c:case d:case x:case E:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case T:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case F:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case C:return{point:"always",geoshape:"always"};case P:return{text:"always"};case k:return{point:"always",square:"always",text:"always"};case U:return{image:"always"};case m:case h:return{text:"always",arc:"always"};case y:case g:return{arc:"always"}}}(e)[t]}const ft={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},{geoshape:pt,...ht}=ft;function gt(e){switch(e){case l:case u:case m:case h:case f:case p:case T:case k:case O:case R:case D:case N:case S:case c:case d:case y:case g:return;case s:case a:case o:case C:case F:case P:case L:case B:case U:case z:return"discrete";case w:case _:case A:return"flexible";case v:case b:case x:case E:case I:case $:case M:return}}},79543:(e,t,n)=>{"use strict";n.r(t),n.d(t,{binRequiresRange:()=>be,channelCompatibility:()=>he,channelDefType:()=>F,defaultTitle:()=>ie,defaultTitleFormatter:()=>Q,defaultType:()=>oe,functionalTitleFormatter:()=>J,getBandPosition:()=>_,getBandSize:()=>A,getFieldDef:()=>se,getFieldOrDatumDef:()=>le,getFormatMixins:()=>ae,getGuide:()=>re,hasBandEnd:()=>C,hasConditionalFieldDef:()=>R,hasConditionalFieldOrDatumDef:()=>D,hasConditionalValueDef:()=>N,initChannelDef:()=>ue,initFieldDef:()=>de,initFieldOrDatumDef:()=>ce,isConditionalDef:()=>k,isConditionalParameter:()=>x,isContinuousFieldOrDatumDef:()=>M,isCount:()=>X,isDatumDef:()=>P,isDiscrete:()=>W,isDiscretizing:()=>Y,isFieldDef:()=>O,isFieldOrDatumDef:()=>L,isFieldOrDatumDefForTimeFormat:()=>ge,isMarkPropFieldOrDatumDef:()=>j,isNumericDataDef:()=>$,isOrderOnlyDef:()=>T,isPositionFieldOrDatumDef:()=>q,isRepeatRef:()=>E,isScaleFieldDef:()=>z,isSortableFieldDef:()=>w,isStringFieldOrDatumDef:()=>H,isTemporalFieldDef:()=>me,isTypedFieldDef:()=>B,isUnbinnedQuantitativeFieldOrDatumDef:()=>I,isValueDef:()=>U,normalizeBin:()=>fe,resetTitleFormatter:()=>te,setTitleFormatter:()=>ee,title:()=>ne,toFieldDefBase:()=>S,toStringFieldDef:()=>G,valueArray:()=>ve,valueExpr:()=>ye,verbalTitleFormatter:()=>K,vgField:()=>V});var r=n(26372),i=n(54814),a=n(19664),o=n(95290),s=n(15058),l=n(6032),u=n(20032),c=n(3802),d=n(20916),f=n(75028),p=n(31179),h=n(46681),g=n(51894),m=n(96598),y=n(99273),v=n(79989),b=n(5711);function x(e){return(0,v.hasProperty)(e,"param")}function E(e){return!(0,r.isString)(e)&&(0,v.hasProperty)(e,"repeat")}function S(e){const{field:t,timeUnit:n,bin:r,aggregate:i}=e;return{...n?{timeUnit:n}:{},...r?{bin:r}:{},...i?{aggregate:i}:{},field:t}}function w(e){return(0,v.hasProperty)(e,"sort")}function _({fieldDef:e,fieldDef2:t,markDef:n,config:r}){if(L(e)&&void 0!==e.bandPosition)return e.bandPosition;if(O(e)){const{timeUnit:i,bin:o}=e;if(i&&!t)return(0,s.getMarkConfig)("timeUnitBandPosition",n,r);if((0,a.isBinning)(o))return.5}}function A({channel:e,fieldDef:t,fieldDef2:n,markDef:r,config:i,scaleType:l,useVlSizeChannel:u}){const c=(0,o.getSizeChannel)(e),d=(0,s.getMarkPropOrConfig)(u?"size":c,r,i,{vgChannel:c});if(void 0!==d)return d;if(O(t)){const{timeUnit:e,bin:o}=t;if(e&&!n)return{band:(0,s.getMarkConfig)("timeUnitBandSize",r,i)};if((0,a.isBinning)(o)&&!(0,p.hasDiscreteDomain)(l))return{band:1}}return(0,f.isRectBasedMark)(r.type)?l?(0,p.hasDiscreteDomain)(l)?i[r.type]?.discreteBandSize||{band:1}:i[r.type]?.continuousBandSize:i[r.type]?.discreteBandSize:void 0}function C(e,t,n,r){return!!((0,a.isBinning)(e.bin)||e.timeUnit&&B(e)&&"temporal"===e.type)&&void 0!==_({fieldDef:e,fieldDef2:t,markDef:n,config:r})}function T(e){return(0,v.hasProperty)(e,"sort")&&!(0,v.hasProperty)(e,"field")}function k(e){return(0,v.hasProperty)(e,"condition")}function R(e){const t=e?.condition;return!!t&&!(0,r.isArray)(t)&&O(t)}function D(e){const t=e?.condition;return!!t&&!(0,r.isArray)(t)&&L(t)}function N(e){const t=e?.condition;return!!t&&((0,r.isArray)(t)||U(t))}function O(e){return(0,v.hasProperty)(e,"field")||"count"===e?.aggregate}function F(e){return e?.type}function P(e){return(0,v.hasProperty)(e,"datum")}function M(e){return B(e)&&!W(e)||$(e)}function I(e){return B(e)&&"quantitative"===e.type&&!e.bin||$(e)}function $(e){return P(e)&&(0,r.isNumber)(e.datum)}function L(e){return O(e)||P(e)}function B(e){return e&&((0,v.hasProperty)(e,"field")||"count"===e.aggregate)&&(0,v.hasProperty)(e,"type")}function U(e){return(0,v.hasProperty)(e,"value")}function z(e){return(0,v.hasProperty)(e,"scale")||(0,v.hasProperty)(e,"sort")}function q(e){return(0,v.hasProperty)(e,"axis")||(0,v.hasProperty)(e,"stack")||(0,v.hasProperty)(e,"impute")}function j(e){return(0,v.hasProperty)(e,"legend")}function H(e){return(0,v.hasProperty)(e,"format")||(0,v.hasProperty)(e,"formatType")}function G(e){return(0,v.omit)(e,["legend","axis","header","scale"])}function V(e,t={}){let n=e.field;const r=t.prefix;let o=t.suffix,s="";if(X(e))n=(0,v.internalField)("count");else{let r;if(!t.nofn)if(function(e){return(0,v.hasProperty)(e,"op")}(e))r=e.op;else{const{bin:l,aggregate:u,timeUnit:c}=e;(0,a.isBinning)(l)?(r=(0,a.binToString)(l),o=(t.binSuffix??"")+(t.suffix??"")):u?(0,i.isArgmaxDef)(u)?(s=`["${n}"]`,n=`argmax_${u.argmax}`):(0,i.isArgminDef)(u)?(s=`["${n}"]`,n=`argmin_${u.argmin}`):r=String(u):c&&!(0,m.isBinnedTimeUnit)(c)&&(r=(0,m.timeUnitToString)(c),o=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}r&&(n=n?`${r}_${n}`:r)}return o&&(n=`${n}_${o}`),r&&(n=`${r}_${n}`),t.forAs?(0,v.removePathFromField)(n):t.expr?(0,v.flatAccessWithDatum)(n,t.expr)+s:(0,v.replacePathInField)(n)+s}function W(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return O(e)&&!!e.bin;case"temporal":return!1}throw new Error(d.message.invalidFieldType(e.type))}function Y(e){return z(e)&&(0,p.isContinuousToDiscrete)(e.scale?.type)}function X(e){return"count"===e.aggregate}function K(e,t){const{field:n,bin:r,timeUnit:o,aggregate:s}=e;if("count"===s)return t.countTitle;if((0,a.isBinning)(r))return`${n} (binned)`;if(o&&!(0,m.isBinnedTimeUnit)(o)){const e=(0,m.normalizeTimeUnit)(o)?.unit;if(e)return`${n} (${(0,m.getTimeUnitParts)(e).join("-")})`}else if(s)return(0,i.isArgmaxDef)(s)?`${n} for max ${s.argmax}`:(0,i.isArgminDef)(s)?`${n} for min ${s.argmin}`:`${(0,v.titleCase)(s)} of ${n}`;return n}function J(e){const{aggregate:t,bin:n,timeUnit:r,field:o}=e;if((0,i.isArgmaxDef)(t))return`${o} for argmax(${t.argmax})`;if((0,i.isArgminDef)(t))return`${o} for argmin(${t.argmin})`;const s=r&&!(0,m.isBinnedTimeUnit)(r)?(0,m.normalizeTimeUnit)(r):void 0,l=t||s?.unit||s?.maxbins&&"timeunit"||(0,a.isBinning)(n)&&"bin";return l?`${l.toUpperCase()}(${o})`:o}const Q=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return J(e);default:return K(e,t)}};let Z=Q;function ee(e){Z=e}function te(){ee(Q)}function ne(e,t,{allowDisabling:n,includeDefault:r=!0}){const i=re(e)?.title;if(!O(e))return i??e.title;const a=e,o=r?ie(a,t):void 0;return n?(0,v.getFirstDefined)(i,a.title,o):i??a.title??o}function re(e){return q(e)&&e.axis?e.axis:j(e)&&e.legend?e.legend:(0,g.isFacetFieldDef)(e)&&e.header?e.header:void 0}function ie(e,t){return Z(e,t)}function ae(e){if(H(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}{const t=re(e)??{},{format:n,formatType:r}=t;return{format:n,formatType:r}}}function oe(e,t){switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(w(e)&&(0,r.isArray)(e.sort))return"ordinal";const{aggregate:n,bin:a,timeUnit:o}=e;if(o)return"temporal";if(a||n&&!(0,i.isArgmaxDef)(n)&&!(0,i.isArgminDef)(n))return"quantitative";if(z(e)&&e.scale?.type)switch(p.SCALE_CATEGORY_INDEX[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function se(e){return O(e)?e:R(e)?e.condition:void 0}function le(e){return L(e)?e:D(e)?e.condition:void 0}function ue(e,t,n,i={}){if((0,r.isString)(e)||(0,r.isNumber)(e)||(0,r.isBoolean)(e)){const n=(0,r.isString)(e)?"string":(0,r.isNumber)(e)?"number":"boolean";return d.warn(d.message.primitiveChannelDef(t,n,e)),{value:e}}return L(e)?ce(e,t,n,i):D(e)?{...e,condition:ce(e.condition,t,n,i)}:e}function ce(e,t,n,i){if(H(e)){const{format:r,formatType:a,...o}=e;if((0,l.isCustomFormatType)(a)&&!n.customFormatTypes)return d.warn(d.message.customFormatTypeNotAllowed(t)),ce(o,t,n,i)}else{const r=q(e)?"axis":j(e)?"legend":(0,g.isFacetFieldDef)(e)?"header":null;if(r&&e[r]){const{format:a,formatType:o,...s}=e[r];if((0,l.isCustomFormatType)(o)&&!n.customFormatTypes)return d.warn(d.message.customFormatTypeNotAllowed(t)),ce({...e,[r]:s},t,n,i)}}return O(e)?de(e,t,i):function(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=(0,r.isNumber)(n)?"quantitative":(0,r.isString)(n)?"nominal":(0,u.isDateTime)(n)?"temporal":void 0,{...e,type:t}}(e)}function de(e,t,{compositeMark:n=!1}={}){const{aggregate:s,timeUnit:l,bin:u,field:c}=e,f={...e};if(n||!s||(0,i.isAggregateOp)(s)||(0,i.isArgmaxDef)(s)||(0,i.isArgminDef)(s)||(d.warn(d.message.invalidAggregate(s)),delete f.aggregate),l&&(f.timeUnit=(0,m.normalizeTimeUnit)(l)),c&&(f.field=`${c}`),(0,a.isBinning)(u)&&(f.bin=fe(u,t)),(0,a.isBinned)(u)&&!(0,o.isXorY)(t)&&d.warn(d.message.channelShouldNotBeUsedForBinned(t)),B(f)){const{type:e}=f,t=(0,y.getFullName)(e);e!==t&&(f.type=t),"quantitative"!==e&&(0,i.isCountingAggregateOp)(s)&&(d.warn(d.message.invalidFieldTypeForCountAggregate(e,s)),f.type="quantitative")}else if(!(0,o.isSecondaryRangeChannel)(t)){const e=oe(f,t);f.type=e}if(B(f)){const{compatible:e,warning:n}=he(f,t)||{};!1===e&&d.warn(n)}if(w(f)&&(0,r.isString)(f.sort)){const{sort:e}=f;if((0,h.isSortByChannel)(e))return{...f,sort:{encoding:e}};const t=e.substring(1);if("-"===e.charAt(0)&&(0,h.isSortByChannel)(t))return{...f,sort:{encoding:t,order:"descending"}}}if((0,g.isFacetFieldDef)(f)){const{header:e}=f;if(e){const{orient:t,...n}=e;if(t)return{...f,header:{...n,labelOrient:e.labelOrient||t,titleOrient:e.titleOrient||t}}}}return f}function fe(e,t){return(0,r.isBoolean)(e)?{maxbins:(0,a.autoMaxBins)(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:{...e,maxbins:(0,a.autoMaxBins)(t)}}const pe={compatible:!0};function he(e,t){const n=e.type;if("geojson"===n&&"shape"!==t)return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case o.ROW:case o.COLUMN:case o.FACET:return W(e)?pe:{compatible:!1,warning:d.message.channelShouldBeDiscrete(t)};case o.X:case o.Y:case o.XOFFSET:case o.YOFFSET:case o.COLOR:case o.FILL:case o.STROKE:case o.TEXT:case o.DETAIL:case o.KEY:case o.TOOLTIP:case o.HREF:case o.URL:case o.ANGLE:case o.THETA:case o.RADIUS:case o.DESCRIPTION:return pe;case o.LONGITUDE:case o.LONGITUDE2:case o.LATITUDE:case o.LATITUDE2:return n!==y.QUANTITATIVE?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:pe;case o.OPACITY:case o.FILLOPACITY:case o.STROKEOPACITY:case o.STROKEWIDTH:case o.SIZE:case o.THETA2:case o.RADIUS2:case o.X2:case o.Y2:case o.TIME:return"nominal"!==n||e.sort?pe:{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`};case o.SHAPE:case o.STROKEDASH:return W(e)||Y(e)?pe:{compatible:!1,warning:d.message.channelShouldBeDiscreteOrDiscretizing(t)};case o.ORDER:return"nominal"!==e.type||"sort"in e?pe:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}function ge(e){const{formatType:t}=ae(e);return"time"===t||!t&&me(e)}function me(e){return e&&("temporal"===e.type||O(e)&&!!e.timeUnit)}function ye(e,{timeUnit:t,type:n,wrapTime:i,undefinedIfExprNotRequired:a}){const o=t&&(0,m.normalizeTimeUnit)(t)?.unit;let s,l=o||"temporal"===n;return(0,c.isExprRef)(e)?s=e.expr:(0,b.isSignalRef)(e)?s=e.signal:(0,u.isDateTime)(e)?(l=!0,s=(0,u.dateTimeToExpr)(e)):((0,r.isString)(e)||(0,r.isNumber)(e))&&l&&(s=`datetime(${(0,v.stringify)(e)})`,(0,m.isLocalSingleTimeUnit)(o)&&((0,r.isNumber)(e)&&e<1e4||(0,r.isString)(e)&&isNaN(Date.parse(e)))&&(s=(0,u.dateTimeToExpr)({[o]:e}))),s?i&&l?`time(${s})`:s:a?void 0:(0,v.stringify)(e)}function ve(e,t){const{type:n}=e;return t.map((t=>{const r=ye(t,{timeUnit:O(e)&&!(0,m.isBinnedTimeUnit)(e.timeUnit)?e.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return void 0!==r?{signal:r}:t}))}function be(e,t){return(0,a.isBinning)(e.bin)?(0,o.isScaleChannel)(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}},5593:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleAxes:()=>g,assembleAxis:()=>p,assembleAxisSignals:()=>h});var r=n(26372),i=n(65032),a=n(95290),o=n(79543),s=n(76447),l=n(79989),u=n(5711),c=n(15058),d=n(95370);function f(e,t,n,r){var i,a;e.encode??(e.encode={}),(i=e.encode)[t]??(i[t]={}),(a=e.encode[t]).update??(a.update={}),e.encode[t].update[n]=r}function p(e,t,n,a={header:!1}){const{disable:p,orient:h,scale:g,labelExpr:m,title:y,zindex:v,...b}=e.combine();if(!p){for(const e in b){const n=e,a=i.AXIS_PROPERTY_TYPE[n],o=b[n];if(a&&a!==t&&"both"!==a)delete b[n];else if((0,i.isConditionalAxisValue)(o)){const{condition:e,...t}=o,a=(0,r.array)(e),s=i.CONDITIONAL_AXIS_PROP_INDEX[n];if(s){const{vgProp:e,part:r}=s;f(b,r,e,[...a.map((e=>{const{test:t,...n}=e;return{test:(0,d.expression)(null,t),...n}})),t]),delete b[n]}else if(null===s){const e={signal:a.map((e=>{const{test:t,...n}=e;return`${(0,d.expression)(null,t)} ? ${(0,c.exprFromValueRefOrSignalRef)(n)} : `})).join("")+(0,c.exprFromValueRefOrSignalRef)(t)};b[n]=e}}else if((0,u.isSignalRef)(o)){const e=i.CONDITIONAL_AXIS_PROP_INDEX[n];if(e){const{vgProp:t,part:r}=e;f(b,r,t,o),delete b[n]}}(0,l.contains)(["labelAlign","labelBaseline"],n)&&null===b[n]&&delete b[n]}if("grid"===t){if(!b.grid)return;if(b.encode){const{grid:e}=b.encode;b.encode={...e?{grid:e}:{}},(0,l.isEmpty)(b.encode)&&delete b.encode}return{scale:g,orient:h,...b,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:(0,l.getFirstDefined)(v,0)}}{if(!a.header&&e.mainExtracted)return;if(void 0!==m){let e=m;b.encode?.labels?.update&&(0,u.isSignalRef)(b.encode.labels.update.text)&&(e=(0,l.replaceAll)(m,"datum.label",b.encode.labels.update.text.signal)),f(b,"labels","text",{signal:e})}if(null===b.labelAlign&&delete b.labelAlign,b.encode){for(const t of i.AXIS_PARTS)e.hasAxisPart(t)||delete b.encode[t];(0,l.isEmpty)(b.encode)&&delete b.encode}const t=function(e,t){if(e)return(0,r.isArray)(e)&&!(0,s.isText)(e)?e.map((e=>(0,o.defaultTitle)(e,t))).join(", "):e}(y,n);return{scale:g,orient:h,grid:!1,...t?{title:t}:{},...b,...!1===n.aria?{aria:!1}:{},zindex:(0,l.getFirstDefined)(v,0)}}}}function h(e){const{axes:t}=e.component,n=[];for(const r of a.POSITION_SCALE_CHANNELS)if(t[r])for(const i of t[r])if(!i.get("disable")&&!i.get("gridScale")){const t="x"===r?"height":"width",i=e.getSizeSignalRef(t).signal;t!==i&&n.push({name:t,update:i})}return n}function g(e,t){const{x:n=[],y:r=[]}=e;return[...n.map((e=>p(e,"grid",t))),...r.map((e=>p(e,"grid",t))),...n.map((e=>p(e,"main",t))),...r.map((e=>p(e,"main",t)))].filter((e=>e))}},33434:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AXIS_COMPONENT_PROPERTIES:()=>l,AxisComponent:()=>u});var r=n(65032),i=n(79989),a=n(5711),o=n(96159);const s={disable:1,gridScale:1,scale:1,...r.COMMON_AXIS_PROPERTIES_INDEX,labelExpr:1,encode:1},l=(0,i.keys)(s);class u extends o.Split{constructor(e={},t={},n=!1){super(),this.explicit=e,this.implicit=t,this.mainExtracted=n}clone(){return new u((0,i.duplicate)(this.explicit),(0,i.duplicate)(this.implicit),this.mainExtracted)}hasAxisPart(e){return"axis"===e||("grid"===e||"title"===e?!!this.get(e):!(!1===(t=this.get(e))||null===t));var t}hasOrientSignalRef(){return(0,a.isSignalRef)(this.explicit.orient)}}},22115:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAxisConfig:()=>d,getAxisConfigStyle:()=>c,getAxisConfigs:()=>u});var r=n(26372),i=n(31179),a=n(79989),o=n(5711),s=n(15058);function l(e,t,n,r){return Object.assign.apply(null,[{},...e.map((e=>{if("axisOrient"===e){const e="x"===n?"bottom":"left",i=t["x"===n?"axisBottom":"axisLeft"]||{},o=t["x"===n?"axisTop":"axisRight"]||{},l=new Set([...(0,a.keys)(i),...(0,a.keys)(o)]),u={};for(const t of l.values())u[t]={signal:`${r.signal} === "${e}" ? ${(0,s.signalOrStringValue)(i[t])} : ${(0,s.signalOrStringValue)(o[t])}`};return u}return t[e]}))])}function u(e,t,n,r){const s="band"===t?["axisDiscrete","axisBand"]:"point"===t?["axisDiscrete","axisPoint"]:(0,i.isQuantitative)(t)?["axisQuantitative"]:"time"===t||"utc"===t?["axisTemporal"]:[],u="x"===e?"axisX":"axisY",d=(0,o.isSignalRef)(n)?"axisOrient":`axis${(0,a.titleCase)(n)}`,f=[...s,...s.map((e=>u+e.substr(4)))],p=["axis",d,u];return{vlOnlyAxisConfig:l(f,r,e,n),vgAxisConfig:l(p,r,e,n),axisConfigStyle:c([...p,...f],r)}}function c(e,t){const n=[{}];for(const i of e){let e=t[i]?.style;if(e){e=(0,r.array)(e);for(const r of e)n.push(t.style[r])}}return Object.assign.apply(null,n)}function d(e,t,n,r={}){const i=(0,s.getStyleConfig)(e,n,t);if(void 0!==i)return{configFrom:"style",configValue:i};for(const t of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==r[t]?.[e])return{configFrom:t,configValue:r[t][e]};return{}}},57807:(e,t,n)=>{"use strict";n.r(t),n.d(t,{labels:()=>o});var r=n(95290),i=n(79543),a=n(6032);function o(e,t,n){const{encoding:o,config:s}=e,l=(0,i.getFieldOrDatumDef)(o[t])??(0,i.getFieldOrDatumDef)(o[(0,r.getSecondaryRangeChannel)(t)]),u=e.axis(t)||{},{format:c,formatType:d}=u;if((0,a.isCustomFormatType)(d))return{text:(0,a.formatCustomType)({fieldOrDatumDef:l,field:"datum.value",format:c,formatType:d,config:s}),...n};if(void 0===c&&void 0===d&&s.customFormatTypes){if("quantitative"===(0,i.channelDefType)(l)){if((0,i.isPositionFieldOrDatumDef)(l)&&"normalize"===l.stack&&s.normalizedNumberFormatType)return{text:(0,a.formatCustomType)({fieldOrDatumDef:l,field:"datum.value",format:s.normalizedNumberFormat,formatType:s.normalizedNumberFormatType,config:s}),...n};if(s.numberFormatType)return{text:(0,a.formatCustomType)({fieldOrDatumDef:l,field:"datum.value",format:s.numberFormat,formatType:s.numberFormatType,config:s}),...n}}if("temporal"===(0,i.channelDefType)(l)&&s.timeFormatType&&(0,i.isFieldDef)(l)&&!l.timeUnit)return{text:(0,a.formatCustomType)({fieldOrDatumDef:l,field:"datum.value",format:s.timeFormat,formatType:s.timeFormatType,config:s}),...n}}return n}},32134:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseLayerAxes:()=>b,parseUnitAxes:()=>y});var r=n(65032),i=n(95290),a=n(79543),o=n(79989),s=n(5711),l=n(15058),u=n(16039),c=n(91387),d=n(96159),f=n(33434),p=n(22115),h=n(57807),g=n(43852),m=n(6032);function y(e){return i.POSITION_SCALE_CHANNELS.reduce(((t,n)=>(e.component.scales[n]&&(t[n]=[_(n,e)]),t)),{})}const v={bottom:"top",top:"bottom",left:"right",right:"left"};function b(e){const{axes:t,resolve:n}=e.component,r={top:0,bottom:0,right:0,left:0};for(const r of e.children){r.parseAxesAndHeaders();for(const i of(0,o.keys)(r.component.axes))n.axis[i]=(0,c.parseGuideResolve)(e.component.resolve,i),"shared"===n.axis[i]&&(t[i]=x(t[i],r.component.axes[i]),t[i]||(n.axis[i]="independent",delete t[i]))}for(const a of i.POSITION_SCALE_CHANNELS){for(const i of e.children)if(i.component.axes[a]){if("independent"===n.axis[a]){t[a]=(t[a]??[]).concat(i.component.axes[a]);for(const e of i.component.axes[a]){const{value:t,explicit:n}=e.getWithExplicit("orient");if(!(0,s.isSignalRef)(t)){if(r[t]>0&&!n){const n=v[t];r[t]>r[n]&&e.set("orient",n,!1)}r[t]++}}}delete i.component.axes[a]}if("independent"===n.axis[a]&&t[a]&&t[a].length>1)for(const[e,n]of(t[a]||[]).entries())e>0&&n.get("grid")&&!n.explicit.grid&&(n.implicit.grid=!1)}}function x(e,t){if(!e)return t.map((e=>e.clone()));{if(e.length!==t.length)return;const n=e.length;for(let r=0;r{switch(n){case"title":return(0,l.mergeTitleComponent)(e,t);case"gridScale":return{explicit:e.explicit,value:(0,o.getFirstDefined)(e.value,t.value)}}return(0,d.defaultTieBreaker)(e,t,n,"axis")}));e.setWithExplicit(n,r)}return e}function S(e,t,n,r,i){if("disable"===t)return void 0!==n;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===((0,s.isSignalRef)(n.labelAngle)?n.labelAngle:(0,o.normalizeAngle)(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===(0,g.getFieldDefTitle)(r,i))return!0}return e===n[t]}const w=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function _(e,t){let n=t.axis(e);const i=new f.AxisComponent,l=(0,a.getFieldOrDatumDef)(t.encoding[e]),{mark:c,config:d}=t,y=n?.orient||d["x"===e?"axisX":"axisY"]?.orient||d.axis?.orient||(0,g.defaultOrient)(e),v=t.getScaleComponent(e).get("type"),b=(0,p.getAxisConfigs)(e,v,y,t.config),x=void 0!==n?!n:(0,p.getAxisConfig)("disable",d.style,n?.style,b).configValue;if(i.set("disable",x,void 0!==n),x)return i;n=n||{};const E=(0,g.getLabelAngle)(l,n,e,d.style,b),_=(0,m.guideFormatType)(n.formatType,l,v),A=(0,m.guideFormat)(l,l.type,n.format,n.formatType,d,!0),C={fieldOrDatumDef:l,axis:n,channel:e,model:t,scaleType:v,orient:y,labelAngle:E,format:A,formatType:_,mark:c,config:d};for(const a of f.AXIS_COMPONENT_PROPERTIES){const o=a in g.axisRules?g.axisRules[a](C):(0,r.isAxisProperty)(a)?n[a]:void 0,l=void 0!==o,u=S(o,a,n,t,e);if(l&&u)i.set(a,o,u);else{const{configValue:e,configFrom:t}=(0,r.isAxisProperty)(a)&&"values"!==a?(0,p.getAxisConfig)(a,d.style,n.style,b):{},c=void 0!==e;l&&!c?i.set(a,o,u):("vgAxisConfig"!==t||w.has(a)&&c||(0,r.isConditionalAxisValue)(e)||(0,s.isSignalRef)(e))&&i.set(a,e,!1)}}const T=n.encoding??{},k=r.AXIS_PARTS.reduce(((n,r)=>{if(!i.hasAxisPart(r))return n;const a=(0,u.guideEncodeEntry)(T[r]??{},t),s="labels"===r?h.labels(t,e,a):a;return void 0===s||(0,o.isEmpty)(s)||(n[r]={update:s}),n}),{});return(0,o.isEmpty)(k)||i.set("encode",k,!!n.encoding||void 0!==n.labelAngle),i}},43852:(e,t,n)=>{"use strict";n.r(t),n.d(t,{axisRules:()=>h,defaultGrid:()=>g,defaultLabelAlign:()=>x,defaultLabelBaseline:()=>b,defaultLabelFlush:()=>E,defaultLabelOverlap:()=>S,defaultOrient:()=>w,defaultTickCount:()=>_,defaultTickMinStep:()=>A,defaultZindex:()=>k,getFieldDefTitle:()=>C,getLabelAngle:()=>y,gridScale:()=>m,normalizeAngleExpr:()=>v,values:()=>T});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(31179),l=n(96598),u=n(99273),c=n(79989),d=n(5711),f=n(15058),p=n(22115);const h={scale:({model:e,channel:t})=>e.scaleName(t),format:({format:e})=>e,formatType:({formatType:e})=>e,grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>t.grid??g(n,e),gridScale:({model:e,channel:t})=>m(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:r})=>e.labelAlign||x(t,n,r),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:r})=>e.labelBaseline||b(t,n,r),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>e.labelFlush??E(t.type,n),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>e.labelOverlap??S(t.type,n,(0,o.isFieldDef)(t)&&!!t.timeUnit,(0,o.isFieldDef)(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:r,scaleType:i})=>{const a="x"===e?"width":"y"===e?"height":void 0,o=a?t.getSizeSignalRef(a):void 0;return n.tickCount??_({fieldOrDatumDef:r,scaleType:i,size:o,values:n.values})},tickMinStep:A,title:({axis:e,model:t,channel:n})=>{if(void 0!==e.title)return e.title;const r=C(t,n);if(void 0!==r)return r;const i=t.typedFieldDef(n),a="x"===n?"x2":"y2",s=t.fieldDef(a);return(0,f.mergeTitleFieldDefs)(i?[(0,o.toFieldDefBase)(i)]:[],(0,o.isFieldDef)(s)?[(0,o.toFieldDefBase)(s)]:[])},values:({axis:e,fieldOrDatumDef:t})=>T(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>e.zindex??k(n,t)};function g(e,t){return!(0,s.hasDiscreteDomain)(e)&&(0,o.isFieldDef)(t)&&!(0,i.isBinning)(t?.bin)&&!(0,i.isBinned)(t?.bin)}function m(e,t){const n="x"===t?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}function y(e,t,n,r,i){const s=t?.labelAngle;if(void 0!==s)return(0,d.isSignalRef)(s)?s:(0,c.normalizeAngle)(s);{const{configValue:s}=(0,p.getAxisConfig)("labelAngle",r,t?.style,i);return void 0!==s?(0,c.normalizeAngle)(s):n!==a.X||!(0,c.contains)([u.NOMINAL,u.ORDINAL],e.type)||(0,o.isFieldDef)(e)&&e.timeUnit?void 0:270}}function v(e){return`(((${e.signal} % 360) + 360) % 360)`}function b(e,t,n,r){if(void 0!==e){if("x"===n){if((0,d.isSignalRef)(e)){const n=v(e);return{signal:`(45 < ${n} && ${n} < 135) || (225 < ${n} && ${n} < 315) ? "middle" :(${n} <= 45 || 315 <= ${n}) === ${(0,d.isSignalRef)(t)?`(${t.signal} === "top")`:"top"===t} ? "bottom" : "top"`}}if(45{"use strict";n.r(t),n.d(t,{buildModel:()=>u});var r=n(20916),i=n(24777),a=n(73799),o=n(33828),s=n(51878),l=n(92649);function u(e,t,n,u,c){if((0,i.isFacetSpec)(e))return new o.FacetModel(e,t,n,c);if((0,i.isLayerSpec)(e))return new s.LayerModel(e,t,n,u,c);if((0,i.isUnitSpec)(e))return new l.UnitModel(e,t,n,u,c);if((0,i.isAnyConcatSpec)(e))return new a.ConcatModel(e,t,n,c);throw new Error(r.message.invalidSpec(e))}},15058:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BIN_RANGE_DELIMITER:()=>u,applyMarkConfig:()=>y,conditionalSignalRefOrValue:()=>f,exprFromSignalRefOrValue:()=>h,exprFromValueRefOrSignalRef:()=>g,getMarkConfig:()=>x,getMarkPropOrConfig:()=>b,getMarkStyleConfig:()=>E,getStyleConfig:()=>S,getStyles:()=>v,mergeTitle:()=>A,mergeTitleComponent:()=>C,mergeTitleFieldDefs:()=>_,signalOrStringValue:()=>m,signalOrValueRef:()=>p,signalOrValueRefWithCondition:()=>c,signalRefOrValue:()=>d,sortParams:()=>w});var r=n(26372),i=n(79543),a=n(3802),o=n(76447),s=n(79989),l=n(5711);const u=" \u2013 ";function c(e){const t=(0,r.isArray)(e.condition)?e.condition.map(f):f(e.condition);return{...d(e),condition:t}}function d(e){if((0,a.isExprRef)(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function f(e){if((0,a.isExprRef)(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function p(e){if((0,a.isExprRef)(e)){const{expr:t,...n}=e;return{signal:t,...n}}return(0,l.isSignalRef)(e)?e:void 0!==e?{value:e}:void 0}function h(e){return(0,l.isSignalRef)(e)?e.signal:(0,r.stringValue)(e)}function g(e){return(0,l.isSignalRef)(e)?e.signal:(0,r.stringValue)(e.value)}function m(e){return(0,l.isSignalRef)(e)?e.signal:null==e?null:(0,r.stringValue)(e)}function y(e,t,n){for(const r of n){const n=x(r,t.markDef,t.config);void 0!==n&&(e[r]=p(n))}return e}function v(e){return[].concat(e.type,e.style??[])}function b(e,t,n,r={}){const{vgChannel:i,ignoreVgConfig:a}=r;return i&&(0,s.hasProperty)(t,i)?t[i]:void 0!==t[e]?t[e]:!a||i&&i!==e?x(e,t,n,r):void 0}function x(e,t,n,{vgChannel:r}={}){const i=E(e,t,n.style);return(0,s.getFirstDefined)(r?i:void 0,i,r?n[t.type][r]:void 0,n[t.type][e],r?n.mark[r]:n.mark[e])}function E(e,t,n){return S(e,v(t),n)}function S(e,t,n){let i;t=(0,r.array)(t);for(const r of t){const t=n[r];(0,s.hasProperty)(t,e)&&(i=t[e])}return i}function w(e,t){return(0,r.array)(e).reduce(((e,n)=>(e.field.push((0,i.vgField)(n,t)),e.order.push(n.sort??"ascending"),e)),{field:[],order:[]})}function _(e,t){const n=[...e];return t.forEach((e=>{for(const t of n)if((0,s.deepEqual)(t,e))return;n.push(e)})),n}function A(e,t){return(0,s.deepEqual)(e,t)||!t?e:e?[...(0,r.array)(e),...(0,r.array)(t)].join(", "):t}function C(e,t){const n=e.value,r=t.value;if(null==n||null===r)return{explicit:e.explicit,value:null};if(((0,o.isText)(n)||(0,l.isSignalRef)(n))&&((0,o.isText)(r)||(0,l.isSignalRef)(r)))return{explicit:e.explicit,value:A(n,r)};if((0,o.isText)(n)||(0,l.isSignalRef)(n))return{explicit:e.explicit,value:n};if((0,o.isText)(r)||(0,l.isSignalRef)(r))return{explicit:e.explicit,value:r};if(!((0,o.isText)(n)||(0,l.isSignalRef)(n)||(0,o.isText)(r)||(0,l.isSignalRef)(r)))return{explicit:e.explicit,value:_(n,r)};throw new Error("It should never reach here")}},48166:(e,t,n)=>{"use strict";n.r(t),n.d(t,{compile:()=>g});var r=n(26372),i=n(95290),a=n(79543),o=n(24007),s=n(20916),l=n(59621),u=n(54778),c=n(48110),d=n(79989),f=n(36598),p=n(81458),h=n(80449);function g(e,t={}){t.logger&&s.set(t.logger),t.fieldTitle&&a.setTitleFormatter(t.fieldTitle);try{const n=(0,o.initConfig)((0,r.mergeConfig)(t.config,e.config)),a=(0,l.normalize)(e,n),g=(0,f.buildModel)(a,null,"",void 0,n);g.parse(),(0,h.optimizeDataflow)(g.component.data,g);const m=function(e,t,n={},r){const i=e.config?(0,o.stripAndRedirectConfig)(e.config):void 0,a=(0,p.assembleRootData)(e.component.data,n),s=e.assembleSelectionData(a),l=e.assembleProjections(),c=e.assembleTitle(),d=e.assembleGroupStyle(),f=e.assembleGroupEncodeEntry(!0);let h=e.assembleLayoutSignals();h=h.filter((e=>"width"!==e.name&&"height"!==e.name||void 0===e.value||(t[e.name]=+e.value,!1)));const{params:g,...m}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...m,...c?{title:c}:{},...d?{style:d}:{},...f?{encode:{update:f}}:{},data:s,...l.length>0?{projections:l}:{},...e.assembleGroup([...h,...e.assembleSelectionTopLevelSignals([]),...(0,u.assembleParameterSignals)(g)]),...i?{config:i}:{},...r?{usermeta:r}:{}}}(g,function(e,t,n,a){const o=a.component.layoutSize.get("width"),l=a.component.layoutSize.get("height");void 0===t?(t={type:"pad"},a.hasAxisOrientSignalRef()&&(t.resize=!0)):(0,r.isString)(t)&&(t={type:t});if(o&&l&&(0,c.isFitType)(t.type))if("step"===o&&"step"===l)s.warn(s.message.droppingFit()),t.type="pad";else if("step"===o||"step"===l){const e="step"===o?"width":"height";s.warn(s.message.droppingFit((0,i.getPositionScaleChannel)(e)));const n="width"===e?"height":"width";t.type=(0,c.getFitType)(n)}return{...1===(0,d.keys)(t).length&&t.type?"pad"===t.type?{}:{autosize:t.type}:{autosize:t},...(0,c.extractTopLevelProperties)(n,!1),...(0,c.extractTopLevelProperties)(e,!0)}}(e,a.autosize,n,g),e.datasets,e.usermeta);return{spec:m,normalized:a}}finally{t.logger&&s.reset(),t.fieldTitle&&a.resetTitleFormatter()}}},73799:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ConcatModel:()=>p});var r=n(20916),i=n(24777),a=n(79989),o=n(36598),s=n(80219),l=n(6871),u=n(27588),c=n(7302),d=n(87039),f=n(93794);class p extends c.Model{constructor(e,t,n,i){super(e,"concat",t,n,i,e.resolve),"shared"!==e.resolve?.axis?.x&&"shared"!==e.resolve?.axis?.y||r.warn(r.message.CONCAT_CANNOT_SHARE_AXIS),this.children=this.getChildren(e).map(((e,t)=>(0,o.buildModel)(e,this,this.getName(`concat_${t}`),void 0,i)))}parseData(){this.component.data=(0,s.parseData)(this);for(const e of this.children)e.parseData()}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of(0,a.keys)(e.component.selection))this.component.selection[t]=e.component.selection[t]}Object.values(this.component.selection).some((e=>(0,f.isTimerSelection)(e)))&&r.error(d.MULTI_VIEW_ANIMATION_UNSUPPORTED)}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){for(const e of this.children)e.parseAxesAndHeaders()}getChildren(e){return(0,i.isVConcatSpec)(e)?e.vconcat:(0,i.isHConcatSpec)(e)?e.hconcat:e.concat}parseLayoutSize(){(0,u.parseConcatLayoutSize)(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.forEach((e=>e.assembleSignals())),[]}assembleLayoutSignals(){const e=(0,l.assembleLayoutSignals)(this);for(const t of this.children)e.push(...t.assembleLayoutSignals());return e}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleMarks(){return this.children.map((e=>{const t=e.assembleTitle(),n=e.assembleGroupStyle(),r=e.assembleGroupEncodeEntry(!1);return{type:"group",name:e.getName("group"),...t?{title:t}:{},...n?{style:n}:{},...r?{encode:{update:r}}:{},...e.assembleGroup()}}))}assembleGroupStyle(){}assembleDefaultLayout(){const e=this.layout.columns;return{...null!=e?{columns:e}:{},bounds:"full",align:"each"}}}},69687:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AggregateNode:()=>p});var r=n(54814),i=n(95290),a=n(79543),o=n(20916),s=n(31179),l=n(79989),u=n(7302),c=n(74686),d=n(75028),f=n(62277);class p extends c.DataFlowNode{clone(){return new p(null,new Set(this.dimensions),(0,l.duplicate)(this.measures))}constructor(e,t,n){super(e),this.dimensions=t,this.measures=n}get groupBy(){return this.dimensions}static makeFromEncoding(e,t){let n=!1;t.forEachFieldDef((e=>{e.aggregate&&(n=!0)}));const o={},c=new Set;return n?(t.forEachFieldDef(((e,n)=>{const{aggregate:l,field:p}=e;if(l)if("count"===l)o["*"]??(o["*"]={}),o["*"].count=new Set([(0,a.vgField)(e,{forAs:!0})]);else{if((0,r.isArgminDef)(l)||(0,r.isArgmaxDef)(l)){const e=(0,r.isArgminDef)(l)?"argmin":"argmax",t=l[e];o[t]??(o[t]={}),o[t][e]=new Set([(0,a.vgField)({op:e,field:t},{forAs:!0})])}else o[p]??(o[p]={}),o[p][l]=new Set([(0,a.vgField)(e,{forAs:!0})]);(0,i.isScaleChannel)(n)&&"unaggregated"===t.scaleDomain(n)&&(o[p]??(o[p]={}),o[p].min=new Set([(0,a.vgField)({field:p,aggregate:"min"},{forAs:!0})]),o[p].max=new Set([(0,a.vgField)({field:p,aggregate:"max"},{forAs:!0})]))}else!function(e,t,n,r){const o=(0,u.isUnitModel)(r)?r.encoding[(0,i.getSecondaryRangeChannel)(t)]:void 0;if((0,a.isTypedFieldDef)(n)&&(0,u.isUnitModel)(r)&&(0,a.hasBandEnd)(n,o,r.markDef,r.config)){e.add((0,a.vgField)(n,{})),e.add((0,a.vgField)(n,{suffix:"end"}));const{mark:o,markDef:s,config:l}=r,u=(0,a.getBandPosition)({fieldDef:n,markDef:s,config:l});(0,d.isRectBasedMark)(o)&&.5!==u&&(0,i.isXorY)(t)&&(e.add((0,a.vgField)(n,{suffix:f.OFFSETTED_RECT_START_SUFFIX})),e.add((0,a.vgField)(n,{suffix:f.OFFSETTED_RECT_END_SUFFIX}))),n.bin&&(0,a.binRequiresRange)(n,t)&&e.add((0,a.vgField)(n,{binSuffix:"range"}))}else if((0,i.isGeoPositionChannel)(t)){const n=(0,i.getPositionChannelFromLatLong)(t);e.add(r.getName(n))}else e.add((0,a.vgField)(n));(0,a.isScaleFieldDef)(n)&&(0,s.isFieldRange)(n.scale?.range)&&e.add(n.scale.range.field)}(c,n,e,t)})),c.size+(0,l.keys)(o).length===0?null:new p(e,c,o)):null}static makeFromTransform(e,t){var n;const r=new Set,i={};for(const e of t.aggregate){const{op:t,field:r,as:o}=e;t&&("count"===t?(i["*"]??(i["*"]={}),i["*"].count=new Set([o||(0,a.vgField)(e,{forAs:!0})])):(i[r]??(i[r]={}),(n=i[r])[t]??(n[t]=new Set),i[r][t].add(o||(0,a.vgField)(e,{forAs:!0}))))}for(const e of t.groupby??[])r.add(e);return r.size+(0,l.keys)(i).length===0?null:new p(e,r,i)}merge(e){return(0,l.setEqual)(this.dimensions,e.dimensions)?(function(e,t){for(const n of(0,l.keys)(t)){const r=t[n];for(const t of(0,l.keys)(r))n in e?e[n][t]=new Set([...e[n][t]??[],...r[t]]):e[n]={[t]:r[t]}}}(this.measures,e.measures),!0):(o.debug("different dimensions, cannot merge"),!1)}addDimensions(e){e.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...(0,l.keys)(this.measures)])}producedFields(){const e=new Set;for(const t of(0,l.keys)(this.measures))for(const n of(0,l.keys)(this.measures[t])){const r=this.measures[t][n];0===r.size?e.add(`${n}_${t}`):r.forEach(e.add,e)}return e}hash(){return`Aggregate ${(0,l.hash)({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const e=[],t=[],n=[];for(const r of(0,l.keys)(this.measures))for(const i of(0,l.keys)(this.measures[r]))for(const a of this.measures[r][i])n.push(a),e.push(i),t.push("*"===r?null:(0,l.replacePathInField)(r));return{type:"aggregate",groupby:[...this.dimensions].map(l.replacePathInField),ops:e,fields:t,as:n}}}},81458:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleFacetData:()=>P,assembleRootData:()=>M});var r=n(89081),i=n(69687),a=n(89153),o=n(77524),s=n(74686),l=n(97872),u=n(96578),c=n(69151),d=n(68860),f=n(78825),p=n(75138),h=n(4821),g=n(30366),m=n(13995),y=n(58211),v=n(65340),b=n(3297),x=n(47628),E=n(56123),S=n(63186),w=n(55320),_=n(40763),A=n(6799),C=n(38380),T=n(56948),k=n(79351),R=n(455),D=n(89764),N=n(62277),O=n(51422);function F(e){let t=0;return function n(F,P){if(F instanceof R.SourceNode&&!F.isGenerator&&!(0,r.isUrlData)(F.data)){e.push(P);P={name:null,source:P.name,transform:[]}}if(F instanceof g.ParseNode&&(F.parent instanceof R.SourceNode&&!P.source?(P.format={...P.format,parse:F.assembleFormatParse()},P.transform.push(...F.assembleTransforms(!0))):P.transform.push(...F.assembleTransforms())),F instanceof c.FacetNode)return P.name||(P.name="data_"+t++),!P.source||P.transform.length>0?(e.push(P),F.data=P.name):F.data=P.source,void e.push(...F.assemble());if((F instanceof v.GraticuleNode||F instanceof k.SequenceNode||F instanceof f.FilterInvalidNode||F instanceof d.FilterNode||F instanceof o.CalculateNode||F instanceof y.GeoPointNode||F instanceof i.AggregateNode||F instanceof w.LookupNode||F instanceof O.WindowTransformNode||F instanceof E.JoinAggregateTransformNode||F instanceof h.FoldTransformNode||F instanceof p.FlattenTransformNode||F instanceof l.DensityTransformNode||F instanceof S.LoessTransformNode||F instanceof _.QuantileTransformNode||F instanceof A.RegressionTransformNode||F instanceof b.IdentifierNode||F instanceof T.SampleTransformNode||F instanceof C.PivotTransformNode||F instanceof u.ExtentTransformNode)&&P.transform.push(F.assemble()),(F instanceof a.BinNode||F instanceof N.TimeUnitNode||F instanceof x.ImputeNode||F instanceof D.StackNode||F instanceof m.GeoJSONNode)&&P.transform.push(...F.assemble()),F instanceof s.OutputNode)if(P.source&&0===P.transform.length)F.setSource(P.source);else if(F.parent instanceof s.OutputNode)F.setSource(P.name);else if(P.name||(P.name="data_"+t++),F.setSource(P.name),1===F.numChildren()){e.push(P);P={name:null,source:P.name,transform:[]}}switch(F.numChildren()){case 0:F instanceof s.OutputNode&&(!P.source||P.transform.length>0)&&e.push(P);break;case 1:n(F.children[0],P);break;default:{P.name||(P.name="data_"+t++);let r=P.name;!P.source||P.transform.length>0?e.push(P):r=P.source;for(const e of F.children){n(e,{name:null,source:r,transform:[]})}break}}}}function P(e){const t=[],n=F(t);for(const t of e.children)n(t,{source:e.name,name:null,transform:[]});return t}function M(e,t){const n=[],r=F(n);let i=0;for(const t of e.sources){t.hasName()||(t.dataName="source_"+i++);const e=t.assemble();r(t,e)}for(const e of n)0===e.transform.length&&delete e.transform;let a=0;for(const[e,t]of n.entries())0!==(t.transform??[]).length||t.source||n.splice(a++,0,n.splice(e,1)[0]);for(const t of n)for(const n of t.transform??[])"lookup"===n.type&&(n.from=e.outputNodes[n.from].getSource());for(const e of n)e.name in t&&(e.values=t[e.name]);return n}},89153:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BinNode:()=>g,getBinSignalName:()=>p});var r=n(26372),i=n(19664),a=n(79543),o=n(79989),s=n(6032),l=n(7302),u=n(83937),c=n(74686);function d(e,t,n,r){if((0,a.binRequiresRange)(t,n)){const i=(0,l.isUnitModel)(e)?e.axis(n)??e.legend(n)??{}:{},o=(0,a.vgField)(t,{expr:"datum"}),u=(0,a.vgField)(t,{expr:"datum",binSuffix:"end"});return{formulaAs:(0,a.vgField)(t,{binSuffix:"range",forAs:!0}),formula:(0,s.binFormatExpression)(o,u,i.format,i.formatType,r)}}return{}}function f(e,t){return`${(0,i.binToString)(e)}_${t}`}function p(e,t,n){const r=f((0,a.normalizeBin)(n,void 0)??{},t);return e.getName(`${r}_bins`)}function h(e,t,n){let o,s;o=function(e){return"as"in e}(e)?(0,r.isString)(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:[(0,a.vgField)(e,{forAs:!0}),(0,a.vgField)(e,{binSuffix:"end",forAs:!0})];const l={...(0,a.normalizeBin)(t,void 0)},c=f(l,e.field),{signal:d,extentSignal:p}=function(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}(n,c);if((0,i.isParameterExtent)(l.extent)){const e=l.extent;s=(0,u.parseSelectionExtent)(n,e.param,e),delete l.extent}return{key:c,binComponent:{bin:l,field:e.field,as:[o],...d?{signal:d}:{},...p?{extentSignal:p}:{},...s?{span:s}:{}}}}class g extends c.DataFlowNode{clone(){return new g(null,(0,o.duplicate)(this.bins))}constructor(e,t){super(e),this.bins=t}static makeFromEncoding(e,t){const n=t.reduceFieldDef(((e,n,r)=>{if((0,a.isTypedFieldDef)(n)&&(0,i.isBinning)(n.bin)){const{key:i,binComponent:a}=h(n,n.bin,t);e[i]={...a,...e[i],...d(t,n,r,t.config)}}return e}),{});return(0,o.isEmpty)(n)?null:new g(e,n)}static makeFromTransform(e,t,n){const{key:r,binComponent:i}=h(t,t.bin,n);return new g(e,{[r]:i})}merge(e,t){for(const n of(0,o.keys)(e.bins))n in this.bins?(t(e.bins[n].signal,this.bins[n].signal),this.bins[n].as=(0,o.unique)([...this.bins[n].as,...e.bins[n].as],o.hash)):this.bins[n]=e.bins[n];for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}producedFields(){return new Set((0,o.vals)(this.bins).map((e=>e.as)).flat(2))}dependentFields(){return new Set((0,o.vals)(this.bins).map((e=>e.field)))}hash(){return`Bin ${(0,o.hash)(this.bins)}`}assemble(){return(0,o.vals)(this.bins).flatMap((e=>{const t=[],[n,...r]=e.as,{extent:s,...l}=e.bin,u={type:"bin",field:(0,o.replacePathInField)(e.field),as:n,signal:e.signal,...(0,i.isParameterExtent)(s)?{extent:null}:{extent:s},...e.span?{span:{signal:`span(${e.span})`}}:{},...l};!s&&e.extentSignal&&(t.push({type:"extent",field:(0,o.replacePathInField)(e.field),signal:e.extentSignal}),u.extent={signal:e.extentSignal}),t.push(u);for(const e of r)for(let r=0;r<2;r++)t.push({type:"formula",expr:(0,a.vgField)({field:n[r]},{expr:"datum"}),as:e[r]});return e.formula&&t.push({type:"formula",expr:e.formula,as:e.formulaAs}),t}))}}},77524:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CalculateNode:()=>u,sortArrayIndexField:()=>c});var r=n(79543),i=n(4976),a=n(46681),o=n(79989),s=n(74686),l=n(62135);class u extends s.DataFlowNode{clone(){return new u(null,(0,o.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this._dependentFields=(0,l.getDependentFields)(this.transform.calculate)}static parseAllForSortIndex(e,t){return t.forEachFieldDef(((t,n)=>{if((0,r.isScaleFieldDef)(t)&&(0,a.isSortArray)(t.sort)){const{field:r,timeUnit:a}=t,o=t.sort,s=o.map(((e,t)=>`${(0,i.fieldFilterExpression)({field:r,timeUnit:a,equal:e})} ? ${t} : `)).join("")+o.length;e=new u(e,{calculate:s,as:c(t,n,{forAs:!0})})}})),e}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${(0,o.hash)(this.transform)}`}}function c(e,t,n){return(0,r.vgField)(e,{prefix:t,suffix:"sort_index",...n})}},74686:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DataFlowNode:()=>a,OutputNode:()=>o});var r=n(20916),i=n(79989);class a{constructor(e,t){this.debugName=t,this._children=[],this._parent=null,e&&(this.parent=e)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(e){this._parent=e,e&&e.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(e,t){this._children.includes(e)?r.warn(r.message.ADD_SAME_CHILD_TWICE):void 0!==t?this._children.splice(t,0,e):this._children.push(e)}removeChild(e){const t=this._children.indexOf(e);return this._children.splice(t,1),t}remove(){let e=this._parent.removeChild(this);for(const t of this._children)t._parent=this._parent,this._parent.addChild(t,e++)}insertAsParentOf(e){const t=e.parent;t.removeChild(this),this.parent=t,e.parent=this}swapWithParent(){const e=this._parent,t=e.parent;for(const t of this._children)t.parent=e;this._children=[],e.removeChild(this);const n=e.parent.removeChild(e);this._parent=t,t.addChild(this,n),e.parent=this}}class o extends a{clone(){const e=new this.constructor;return e.debugName=`clone_${this.debugName}`,e._source=this._source,e._name=`clone_${this._name}`,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}constructor(e,t,n,r){super(e,t),this.type=n,this.refCounts=r,this._source=this._name=t,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}dependentFields(){return new Set}producedFields(){return new Set}hash(){return void 0===this._hash&&(this._hash=`Output ${(0,i.uniqueId)()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(e){this._source=e}}},97872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DensityTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??"value",n[1]??"density"];const i=this.transform.resolve??"shared";this.transform.resolve=i}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${(0,r.hash)(this.transform)}`}assemble(){const{density:e,...t}=this.transform,n={type:"kde",field:e,...t};return n.resolve=this.transform.resolve,n}}},62135:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDependentFields:()=>o});var r=n(21720);function i(e){const t=[];return"Identifier"===e.type?[e.name]:"Literal"===e.type?[e.value]:("MemberExpression"===e.type&&(t.push(...i(e.object)),t.push(...i(e.property))),t)}function a(e){return"MemberExpression"===e.object.type?a(e.object):"datum"===e.object.name}function o(e){const t=(0,r.parseExpression)(e),n=new Set;return t.visit((e=>{"MemberExpression"===e.type&&a(e)&&n.add(i(e).slice(1).join("."))})),n}},96578:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ExtentTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${(0,r.hash)(this.transform)}`}assemble(){const{extent:e,param:t}=this.transform;return{type:"extent",field:e,signal:t}}}},69151:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FacetNode:()=>m});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(20916),l=n(31179),u=n(46681),c=n(79989),d=n(5711),f=n(10078),p=n(63760),h=n(77524),g=n(74686);class m extends g.DataFlowNode{constructor(e,t,n,s){super(e),this.model=t,this.name=n,this.data=s;for(const e of a.FACET_CHANNELS){const n=t.facet[e];if(n){const{bin:a,sort:s}=n;this[e]={name:t.getName(`${e}_domain`),fields:[(0,o.vgField)(n),...(0,i.isBinning)(a)?[(0,o.vgField)(n,{binSuffix:"end"})]:[]],...(0,u.isSortField)(s)?{sortField:s}:(0,r.isArray)(s)?{sortIndexField:(0,h.sortArrayIndexField)(n,e)}:{}}}}this.childModel=t.child}hash(){let e="Facet";for(const t of a.FACET_CHANNELS)this[t]&&(e+=` ${t.charAt(0)}:${(0,c.hash)(this[t])}`);return e}get fields(){const e=[];for(const t of a.FACET_CHANNELS)this[t]?.fields&&e.push(...this[t].fields);return e}dependentFields(){const e=new Set(this.fields);for(const t of a.FACET_CHANNELS)this[t]&&(this[t].sortField&&e.add(this[t].sortField.field),this[t].sortIndexField&&e.add(this[t].sortIndexField));return e}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const e={};for(const t of a.POSITION_SCALE_CHANNELS){const n=this.childModel.component.scales[t];if(n&&!n.merged){const r=n.get("type"),i=n.get("range");if((0,l.hasDiscreteDomain)(r)&&(0,d.isVgRangeStep)(i)){const n=(0,p.assembleDomain)(this.childModel,t),r=(0,p.getFieldFromDomain)(n);r?e[t]=r:s.warn(s.message.unknownField(t))}}}return e}assembleRowColumnHeaderData(e,t,n){const r={row:"y",column:"x",facet:void 0}[e],i=[],a=[],s=[];r&&n&&n[r]&&(t?(i.push(`distinct_${n[r]}`),a.push("max")):(i.push(n[r]),a.push("distinct")),s.push(`distinct_${n[r]}`));const{sortField:l,sortIndexField:c}=this[e];if(l){const{op:e=u.DEFAULT_SORT_OP,field:t}=l;i.push(t),a.push(e),s.push((0,o.vgField)(l,{forAs:!0}))}else c&&(i.push(c),a.push("max"),s.push(c));return{name:this[e].name,source:t??this.data,transform:[{type:"aggregate",groupby:this[e].fields,...i.length?{fields:i,ops:a,as:s}:{}}]}}assembleFacetHeaderData(e){const{columns:t}=this.model.layout,{layoutHeaders:n}=this.model.component,r=[],i={};for(const e of f.HEADER_CHANNELS){for(const t of f.HEADER_TYPES){const r=(n[e]&&n[e][t])??[];for(const t of r)if(t.axes?.length>0){i[e]=!0;break}}if(i[e]){const n=`length(data("${this.facet.name}"))`,i="row"===e?t?{signal:`ceil(${n} / ${t})`}:1:t?{signal:`min(${n}, ${t})`}:{signal:n};r.push({name:`${this.facet.name}_${e}`,transform:[{type:"sequence",start:0,stop:i}]})}}const{row:a,column:o}=i;return(a||o)&&r.unshift(this.assembleRowColumnHeaderData("facet",null,e)),r}assemble(){const e=[];let t=null;const n=this.getChildIndependentFieldsWithStep(),{column:r,row:i,facet:o}=this;if(r&&i&&(n.x||n.y)){t=`cross_${this.column.name}_${this.row.name}`;const r=[].concat(n.x??[],n.y??[]),i=r.map((()=>"distinct"));e.push({name:t,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:r,ops:i}]})}for(const r of[a.COLUMN,a.ROW])this[r]&&e.push(this.assembleRowColumnHeaderData(r,t,n));if(o){const t=this.assembleFacetHeaderData(n);t&&e.push(...t)}return e}}},68860:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FilterNode:()=>s});var r=n(79989),i=n(95370),a=n(74686),o=n(62135);class s extends a.DataFlowNode{clone(){return new s(null,this.model,(0,r.duplicate)(this.filter))}constructor(e,t,n){super(e),this.model=t,this.filter=n,this.expr=(0,i.expression)(this.model,this.filter,this),this._dependentFields=(0,o.getDependentFields)(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}},78825:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FilterInvalidNode:()=>u,isValidFiniteNumberExpr:()=>c});var r=n(95290),i=n(79543),a=n(79989),o=n(59845),s=n(74686),l=n(54814);class u extends s.DataFlowNode{clone(){return new u(null,{...this.filter})}constructor(e,t){super(e),this.filter=t}static make(e,t,n){const{config:i,markDef:s}=t,{marks:c,scales:d}=n;if("include-invalid-values"===c&&"include-invalid-values"===d)return null;const f=t.reduceFieldDef(((e,n,a)=>{const u=(0,r.isScaleChannel)(a)&&t.getScaleComponent(a);if(u){const t=u.get("type"),{aggregate:r}=n,c=(0,o.getScaleInvalidDataMode)({scaleChannel:a,markDef:s,config:i,scaleType:t,isCountAggregate:(0,l.isCountingAggregateOp)(r)});"show"!==c&&"always-valid"!==c&&(e[n.field]=n)}return e}),{});return(0,a.keys)(f).length?new u(e,f):null}dependentFields(){return new Set((0,a.keys)(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${(0,a.hash)(this.filter)}`}assemble(){const e=(0,a.keys)(this.filter).reduce(((e,t)=>{const n=this.filter[t],r=(0,i.vgField)(n,{expr:"datum"});return null!==n&&("temporal"===n.type?e.push(`(isDate(${r}) || (${c(r)}))`):"quantitative"===n.type&&e.push(c(r))),e}),[]);return e.length>0?{type:"filter",expr:e.join(" && ")}:null}}function c(e){return`isValid(${e}) && isFinite(+${e})`}},75138:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FlattenTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(this.parent,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const{flatten:n,as:i=[]}=this.transform;this.transform.as=n.map(((e,t)=>i[t]??e))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${(0,r.hash)(this.transform)}`}assemble(){const{flatten:e,as:t}=this.transform;return{type:"flatten",fields:e,as:t}}}},4821:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FoldTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??"key",n[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${(0,r.hash)(this.transform)}`}assemble(){const{fold:e,as:t}=this.transform;return{type:"fold",fields:e,as:t}}}},30366:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ParseNode:()=>w,getImplicitFromEncoding:()=>E,getImplicitFromFilterTransform:()=>x,getImplicitFromSelection:()=>S});var r=n(26372),i=n(54814),a=n(95290),o=n(79543),s=n(89081),l=n(20032),u=n(20916),c=n(90386),d=n(75028),f=n(4976),p=n(46681),h=n(79989),g=n(15058),m=n(7302),y=n(96159),v=n(74686);function b(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function x(e){const t={};return(0,c.forEachLeaf)(e.filter,(e=>{if((0,f.isFieldPredicate)(e)){let n=null;(0,f.isFieldEqualPredicate)(e)?n=(0,g.signalRefOrValue)(e.equal):(0,f.isFieldLTEPredicate)(e)?n=(0,g.signalRefOrValue)(e.lte):(0,f.isFieldLTPredicate)(e)?n=(0,g.signalRefOrValue)(e.lt):(0,f.isFieldGTPredicate)(e)?n=(0,g.signalRefOrValue)(e.gt):(0,f.isFieldGTEPredicate)(e)?n=(0,g.signalRefOrValue)(e.gte):(0,f.isFieldRangePredicate)(e)?n=e.range[0]:(0,f.isFieldOneOfPredicate)(e)&&(n=(e.oneOf??e.in)[0]),n&&((0,l.isDateTime)(n)?t[e.field]="date":(0,r.isNumber)(n)?t[e.field]="number":(0,r.isString)(n)&&(t[e.field]="string")),e.timeUnit&&(t[e.field]="date")}})),t}function E(e){const t={};function n(e){(0,o.isFieldOrDatumDefForTimeFormat)(e)?t[e.field]="date":"quantitative"===e.type&&(0,i.isMinMaxOp)(e.aggregate)?t[e.field]="number":(0,h.accessPathDepth)(e.field)>1?e.field in t||(t[e.field]="flatten"):(0,o.isScaleFieldDef)(e)&&(0,p.isSortField)(e.sort)&&(0,h.accessPathDepth)(e.sort.field)>1&&(e.sort.field in t||(t[e.sort.field]="flatten"))}if(((0,m.isUnitModel)(e)||(0,m.isFacetModel)(e))&&e.forEachFieldDef(((t,r)=>{if((0,o.isTypedFieldDef)(t))n(t);else{const i=(0,a.getMainRangeChannel)(r),o=e.fieldDef(i);n({...t,type:o.type})}})),(0,m.isUnitModel)(e)){const{mark:n,markDef:r,encoding:i}=e;if((0,d.isPathMark)(n)&&!e.encoding.order){const e=i["horizontal"===r.orient?"y":"x"];(0,o.isFieldDef)(e)&&"quantitative"===e.type&&!(e.field in t)&&(t[e.field]="number")}}return t}function S(e){const t={};if((0,m.isUnitModel)(e)&&e.component.selection)for(const n of(0,h.keys)(e.component.selection)){const r=e.component.selection[n];for(const e of r.project.items)!e.channel&&(0,h.accessPathDepth)(e.field)>1&&(t[e.field]="flatten")}return t}class w extends v.DataFlowNode{clone(){return new w(null,(0,h.duplicate)(this._parse))}constructor(e,t){super(e),this._parse=t}hash(){return`Parse ${(0,h.hash)(this._parse)}`}static makeExplicit(e,t,n){let r={};const i=t.data;return!(0,s.isGenerator)(i)&&i?.format?.parse&&(r=i.format.parse),this.makeWithAncestors(e,r,{},n)}static makeWithAncestors(e,t,n,r){for(const e of(0,h.keys)(n)){const t=r.getWithExplicit(e);void 0!==t.value&&(t.explicit||t.value===n[e]||"derived"===t.value||"flatten"===n[e]?delete n[e]:u.warn(u.message.differentParse(e,n[e],t.value)))}for(const e of(0,h.keys)(t)){const n=r.get(e);void 0!==n&&(n===t[e]?delete t[e]:u.warn(u.message.differentParse(e,t[e],n)))}const i=new y.Split(t,n);r.copyAll(i);const a={};for(const e of(0,h.keys)(i.combine())){const t=i.get(e);null!==t&&(a[e]=t)}return 0===(0,h.keys)(a).length||r.parseNothing?null:new w(e,a)}get parse(){return this._parse}merge(e){this._parse={...this._parse,...e.parse},e.remove()}assembleFormatParse(){const e={};for(const t of(0,h.keys)(this._parse)){const n=this._parse[t];1===(0,h.accessPathDepth)(t)&&(e[t]=n)}return e}producedFields(){return new Set((0,h.keys)(this._parse))}dependentFields(){return new Set((0,h.keys)(this._parse))}assembleTransforms(e=!1){return(0,h.keys)(this._parse).filter((t=>!e||(0,h.accessPathDepth)(t)>1)).map((e=>{const t=function(e,t){const n=(0,h.accessPathWithDatum)(e);if("number"===t)return`toNumber(${n})`;if("boolean"===t)return`toBoolean(${n})`;if("string"===t)return`toString(${n})`;if("date"===t)return`toDate(${n})`;if("flatten"===t)return n;if(t.startsWith("date:"))return`timeParse(${n},'${b(t.slice(5,t.length))}')`;if(t.startsWith("utc:"))return`utcParse(${n},'${b(t.slice(4,t.length))}')`;return u.warn(u.message.unrecognizedParse(t)),null}(e,this._parse[e]);if(!t)return null;return{type:"formula",expr:t,as:(0,h.removePathFromField)(e)}})).filter((e=>null!==e))}}},13995:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GeoJSONNode:()=>u});var r=n(26372),i=n(95290),a=n(79543),o=n(99273),s=n(79989),l=n(74686);class u extends l.DataFlowNode{clone(){return new u(null,(0,s.duplicate)(this.fields),this.geojson,this.signal)}static parseAll(e,t){if(t.component.projection&&!t.component.projection.isFit)return e;let n=0;for(const r of[[i.LONGITUDE,i.LATITUDE],[i.LONGITUDE2,i.LATITUDE2]]){const i=r.map((e=>{const n=(0,a.getFieldOrDatumDef)(t.encoding[e]);return(0,a.isFieldDef)(n)?n.field:(0,a.isDatumDef)(n)?{expr:`${n.datum}`}:(0,a.isValueDef)(n)?{expr:`${n.value}`}:void 0}));(i[0]||i[1])&&(e=new u(e,i,null,t.getName("geojson_"+n++)))}if(t.channelHasField(i.SHAPE)){const r=t.typedFieldDef(i.SHAPE);r.type===o.GEOJSON&&(e=new u(e,null,r.field,t.getName("geojson_"+n++)))}return e}constructor(e,t,n,r){super(e),this.fields=t,this.geojson=n,this.signal=r}dependentFields(){const e=(this.fields??[]).filter(r.isString);return new Set([...this.geojson?[this.geojson]:[],...e])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${(0,s.hash)(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}},58211:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GeoPointNode:()=>l});var r=n(26372),i=n(95290),a=n(79543),o=n(79989),s=n(74686);class l extends s.DataFlowNode{clone(){return new l(null,this.projection,(0,o.duplicate)(this.fields),(0,o.duplicate)(this.as))}constructor(e,t,n,r){super(e),this.projection=t,this.fields=n,this.as=r}static parseAll(e,t){if(!t.projectionName())return e;for(const n of[[i.LONGITUDE,i.LATITUDE],[i.LONGITUDE2,i.LATITUDE2]]){const r=n.map((e=>{const n=(0,a.getFieldOrDatumDef)(t.encoding[e]);return(0,a.isFieldDef)(n)?n.field:(0,a.isDatumDef)(n)?{expr:`${n.datum}`}:(0,a.isValueDef)(n)?{expr:`${n.value}`}:void 0})),o=n[0]===i.LONGITUDE2?"2":"";(r[0]||r[1])&&(e=new l(e,t.projectionName(),r,[t.getName(`x${o}`),t.getName(`y${o}`)]))}return e}dependentFields(){return new Set(this.fields.filter(r.isString))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${(0,o.hash)(this.fields)} ${(0,o.hash)(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}},65340:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GraticuleNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,this.params)}constructor(e,t){super(e),this.params=t}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${(0,r.hash)(this.params)}`}assemble(){return{type:"graticule",...!0===this.params?{}:this.params}}}},3297:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IdentifierNode:()=>a});var r=n(84847),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null)}constructor(e){super(e)}dependentFields(){return new Set}producedFields(){return new Set([r.SELECTION_ID])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:r.SELECTION_ID}}}},47628:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ImputeNode:()=>l});var r=n(79543),i=n(98348),a=n(65393),o=n(79989),s=n(74686);class l extends s.DataFlowNode{clone(){return new l(null,(0,o.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(e){const{start:t=0,stop:n,step:r}=e;return{signal:`sequence(${[t,n,...r?[r]:[]].join(",")})`}}static makeFromTransform(e,t){return new l(e,t)}static makeFromEncoding(e,t){const n=t.encoding,a=n.x,o=n.y;if((0,r.isFieldDef)(a)&&(0,r.isFieldDef)(o)){const r=a.impute?a:o.impute?o:void 0;if(void 0===r)return;const s=a.impute?o:o.impute?a:void 0,{method:u,value:c,frame:d,keyvals:f}=r.impute,p=(0,i.pathGroupingFields)(t.mark,n);return new l(e,{impute:r.field,key:s.field,...u?{method:u}:{},...void 0!==c?{value:c}:{},...d?{frame:d}:{},...void 0!==f?{keyvals:f}:{},...p.length?{groupby:p}:{}})}return null}hash(){return`Impute ${(0,o.hash)(this.transform)}`}assemble(){const{impute:e,key:t,keyvals:n,method:r,groupby:i,value:o,frame:s=[null,null]}=this.transform,l={type:"impute",field:e,key:t,...n?{keyvals:(0,a.isImputeSequence)(n)?this.processSequence(n):n}:{},method:"value",...i?{groupby:i}:{},value:r&&"value"!==r?null:o};if(r&&"value"!==r){return[l,{type:"window",as:[`imputed_${e}_value`],ops:[r],fields:[e],frame:s,ignorePeers:!1,...i?{groupby:i}:{}},{type:"formula",expr:`datum.${e} === null ? datum.imputed_${e}_value : datum.${e}`,as:e}]}return[l]}}},95848:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AncestorParse:()=>i});var r=n(96159);class i extends r.Split{constructor(e={},t={},n=!1){super(e,t),this.explicit=e,this.implicit=t,this.parseNothing=n}clone(){const e=super.clone();return e.parseNothing=this.parseNothing,e}}},56123:(e,t,n)=>{"use strict";n.r(t),n.d(t,{JoinAggregateTransformNode:()=>o});var r=n(79543),i=n(79989),a=n(74686);class o extends a.DataFlowNode{clone(){return new o(null,(0,i.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t}addDimensions(e){this.transform.groupby=(0,i.unique)(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return this.transform.groupby&&this.transform.groupby.forEach(e.add,e),this.transform.joinaggregate.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(e){return e.as??(0,r.vgField)(e)}hash(){return`JoinAggregateTransform ${(0,i.hash)(this.transform)}`}assemble(){const e=[],t=[],n=[];for(const r of this.transform.joinaggregate)t.push(r.op),n.push(this.getDefaultName(r)),e.push(void 0===r.field?null:r.field);const r=this.transform.groupby;return{type:"joinaggregate",as:n,ops:t,fields:e,...void 0!==r?{groupby:r}:{}}}}},94808:(e,t,n)=>{"use strict";n.r(t),n.d(t,{makeJoinAggregateFromFacet:()=>s});var r=n(79543),i=n(46681),a=n(33828),o=n(56123);function s(e,t){const{row:n,column:s}=t;if(n&&s){let t=null;for(const l of[n,s])if((0,i.isSortField)(l.sort)){const{field:n,op:s=i.DEFAULT_SORT_OP}=l.sort;e=t=new o.JoinAggregateTransformNode(e,{joinaggregate:[{op:s,field:n,as:(0,a.facetSortFieldName)(l,l.sort,{forAs:!0})}],groupby:[(0,r.vgField)(l)]})}return t}return null}},63186:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LoessTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??t.on,n[1]??t.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${(0,r.hash)(this.transform)}`}assemble(){const{loess:e,on:t,...n}=this.transform;return{type:"loess",x:t,y:e,...n}}}},55320:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LookupNode:()=>d});var r=n(26372),i=n(20916),a=n(65393),o=n(79989),s=n(74686),l=n(80219),u=n(455),c=n(89081);class d extends s.DataFlowNode{clone(){return new d(null,(0,o.duplicate)(this.transform),this.secondary)}constructor(e,t,n){super(e),this.transform=t,this.secondary=n}static make(e,t,n,r){const f=t.component.data.sources,{from:p}=n;let h=null;if((0,a.isLookupData)(p)){let e=(0,l.findSource)(p.data,f);e||(e=new u.SourceNode(p.data),f.push(e));const n=t.getName(`lookup_${r}`);h=new s.OutputNode(e,n,c.DataSourceType.Lookup,t.component.data.outputNodeRefCounts),t.component.data.outputNodes[n]=h}else if((0,a.isLookupSelection)(p)){const e=p.param;let r;n={as:e,...n};try{r=t.getSelectionComponent((0,o.varName)(e),e)}catch(t){throw new Error(i.message.cannotLookupVariableParameter(e))}if(h=r.materialized,!h)throw new Error(i.message.noSameUnitLookup(e))}return new d(e,n,h.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?(0,r.array)(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${(0,o.hash)({transform:this.transform,secondary:this.secondary})}`}assemble(){let e;if(this.transform.from.fields)e={values:this.transform.from.fields,...this.transform.as?{as:(0,r.array)(this.transform.as)}:{}};else{let t=this.transform.as;(0,r.isString)(t)||(i.warn(i.message.NO_FIELDS_NEEDS_AS),t="_lookup"),e={as:[t]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...e,...this.transform.default?{default:this.transform.default}:{}}}}},80449:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FACET_SCALE_PREFIX:()=>o,MAX_OPTIMIZATION_RUNS:()=>s,checkLinks:()=>l,optimizeDataflow:()=>d});var r=n(20916),i=n(72398),a=n(10646);const o="scale_",s=5;function l(e){for(const t of e){for(const e of t.children)if(e.parent!==t)return!1;if(!l(t.children))return!1}return!0}function u(e,t){let n=!1;for(const r of t)n=e.optimize(r)||n;return n}function c(e,t,n){let r=e.sources,a=!1;return a=u(new i.RemoveUnnecessaryOutputNodes,r)||a,a=u(new i.RemoveUnnecessaryIdentifierNodes(t),r)||a,r=r.filter((e=>e.numChildren()>0)),a=u(new i.RemoveUnusedSubtrees,r)||a,r=r.filter((e=>e.numChildren()>0)),n||(a=u(new i.MoveParseUp,r)||a,a=u(new i.MergeBins(t),r)||a,a=u(new i.RemoveDuplicateTimeUnits,r)||a,a=u(new i.MergeParse,r)||a,a=u(new i.MergeAggregates,r)||a,a=u(new i.MergeTimeUnits,r)||a,a=u(new i.MergeIdenticalNodes,r)||a,a=u(new i.MergeOutputs,r)||a),e.sources=r,a}function d(e,t){l(e.sources);let n=0,i=0;for(let r=0;r{"use strict";n.r(t),n.d(t,{BottomUpOptimizer:()=>d,Optimizer:()=>c,TopDownOptimizer:()=>f,isDataSourceNode:()=>u});var r,i=n(65340),a=n(79351),o=n(455),s=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},l=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};function u(e){return e instanceof o.SourceNode||e instanceof i.GraticuleNode||e instanceof a.SequenceNode}class c{constructor(){r.set(this,void 0),s(this,r,!1,"f")}setModified(){s(this,r,!0,"f")}get modifiedFlag(){return l(this,r,"f")}}r=new WeakMap;class d extends c{getNodeDepths(e,t,n){n.set(e,t);for(const r of e.children)this.getNodeDepths(r,t+1,n);return n}optimize(e){const t=[...this.getNodeDepths(e,0,new Map).entries()].sort(((e,t)=>t[1]-e[1]));for(const e of t)this.run(e[0]);return this.modifiedFlag}}class f extends c{optimize(e){this.run(e);for(const t of e.children)this.optimize(t);return this.modifiedFlag}}},72398:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MergeAggregates:()=>w,MergeBins:()=>_,MergeIdenticalNodes:()=>g,MergeOutputs:()=>A,MergeParse:()=>x,MergeTimeUnits:()=>S,MoveParseUp:()=>b,RemoveDuplicateTimeUnits:()=>y,RemoveUnnecessaryIdentifierNodes:()=>m,RemoveUnnecessaryOutputNodes:()=>v,RemoveUnusedSubtrees:()=>E});var r=n(79989),i=n(93794),a=n(69687),o=n(89153),s=n(74686),l=n(69151),u=n(68860),c=n(30366),d=n(3297),f=n(11259),p=n(455),h=n(62277);class g extends f.TopDownOptimizer{mergeNodes(e,t){const n=t.shift();for(const r of t)e.removeChild(r),r.parent=n,r.remove()}run(e){const t=e.children.map((e=>e.hash())),n={};for(let r=0;r1&&(this.setModified(),this.mergeNodes(e,n[t]))}}class m extends f.TopDownOptimizer{constructor(e){super(),this.requiresSelectionId=e&&(0,i.requiresSelectionId)(e)}run(e){e instanceof d.IdentifierNode&&(this.requiresSelectionId&&((0,f.isDataSourceNode)(e.parent)||e.parent instanceof a.AggregateNode||e.parent instanceof c.ParseNode)||(this.setModified(),e.remove()))}}class y extends f.Optimizer{optimize(e){return this.run(e,new Set),this.modifiedFlag}run(e,t){let n=new Set;e instanceof h.TimeUnitNode&&(n=e.producedFields(),(0,r.hasIntersection)(n,t)&&(this.setModified(),e.removeFormulas(t),0===e.producedFields.length&&e.remove()));for(const r of e.children)this.run(r,new Set([...t,...n]))}}class v extends f.TopDownOptimizer{constructor(){super()}run(e){e instanceof s.OutputNode&&!e.isRequired()&&(this.setModified(),e.remove())}}class b extends f.BottomUpOptimizer{run(e){if(!((0,f.isDataSourceNode)(e)||e.numChildren()>1))for(const t of e.children)if(t instanceof c.ParseNode)if(e instanceof c.ParseNode)this.setModified(),e.merge(t);else{if((0,r.fieldIntersection)(e.producedFields(),t.dependentFields()))continue;this.setModified(),t.swapWithParent()}}}class x extends f.BottomUpOptimizer{run(e){const t=[...e.children],n=e.children.filter((e=>e instanceof c.ParseNode));if(e.numChildren()>1&&n.length>=1){const i={},a=new Set;for(const e of n){const t=e.parse;for(const e of(0,r.keys)(t))e in i?i[e]!==t[e]&&a.add(e):i[e]=t[e]}for(const e of a)delete i[e];if(!(0,r.isEmpty)(i)){this.setModified();const n=new c.ParseNode(e,i);for(const a of t){if(a instanceof c.ParseNode)for(const e of(0,r.keys)(i))delete a.parse[e];e.removeChild(a),a.parent=n,a instanceof c.ParseNode&&0===(0,r.keys)(a.parse).length&&a.remove()}}}}}class E extends f.BottomUpOptimizer{run(e){e instanceof s.OutputNode||e.numChildren()>0||e instanceof l.FacetNode||e instanceof p.SourceNode||(this.setModified(),e.remove())}}class S extends f.BottomUpOptimizer{run(e){const t=e.children.filter((e=>e instanceof h.TimeUnitNode)),n=t.pop();for(const e of t)this.setModified(),n.merge(e)}}class w extends f.BottomUpOptimizer{run(e){const t=e.children.filter((e=>e instanceof a.AggregateNode)),n={};for(const e of t){const t=(0,r.hash)(e.groupBy);t in n||(n[t]=[]),n[t].push(e)}for(const t of(0,r.keys)(n)){const r=n[t];if(r.length>1){const t=r.pop();for(const n of r)t.merge(n)&&(e.removeChild(n),n.parent=t,n.remove(),this.setModified())}}}}class _ extends f.BottomUpOptimizer{constructor(e){super(),this.model=e}run(e){const t=!((0,f.isDataSourceNode)(e)||e instanceof u.FilterNode||e instanceof c.ParseNode||e instanceof d.IdentifierNode),n=[],i=[];for(const a of e.children)a instanceof o.BinNode&&(t&&!(0,r.fieldIntersection)(e.producedFields(),a.dependentFields())?n.push(a):i.push(a));if(n.length>0){const t=n.pop();for(const e of n)t.merge(e,this.model.renameSignal.bind(this.model));this.setModified(),e instanceof o.BinNode?e.merge(t,this.model.renameSignal.bind(this.model)):t.swapWithParent()}if(i.length>1){const e=i.pop();for(const t of i)e.merge(t,this.model.renameSignal.bind(this.model));this.setModified()}}}class A extends f.BottomUpOptimizer{run(e){const t=[...e.children];if(!(0,r.some)(t,(e=>e instanceof s.OutputNode))||e.numChildren()<=1)return;const n=[];let i;for(const r of t)if(r instanceof s.OutputNode){let t=r;for(;1===t.numChildren();){const[e]=t.children;if(!(e instanceof s.OutputNode))break;t=e}n.push(...t.children),i?(e.removeChild(r),r.parent=i.parent,i.parent.removeChild(i),i.parent=t,this.setModified()):i=t}else n.push(r);if(n.length){this.setModified();for(const e of n)e.parent.removeChild(e),e.parent=i}}}},80219:(e,t,n)=>{"use strict";n.r(t),n.d(t,{findSource:()=>H,parseData:()=>V,parseTransformArray:()=>G});var r=n(95848),i=n(89081),a=n(37761),o=n(20916),s=n(75028),l=n(65393),u=n(79989),c=n(15058),d=n(7302),f=n(93794),p=n(83937),h=n(69687),g=n(89153),m=n(77524),y=n(74686),v=n(97872),b=n(96578),x=n(69151),E=n(68860),S=n(78825),w=n(75138),_=n(4821),A=n(30366),C=n(13995),T=n(58211),k=n(65340),R=n(3297),D=n(47628),N=n(56123),O=n(94808),F=n(63186),P=n(55320),M=n(38380),I=n(40763),$=n(6799),L=n(56948),B=n(79351),U=n(455),z=n(89764),q=n(62277),j=n(51422);function H(e,t){for(const n of t){const t=n.data;if(e.name&&n.hasName()&&e.name!==n.dataName)continue;const r=e.format?.mesh,a=t.format?.feature;if(r&&a)continue;const o=e.format?.feature;if((o||a)&&o!==a)continue;const s=t.format?.mesh;if(!r&&!s||r===s)if((0,i.isInlineData)(e)&&(0,i.isInlineData)(t)){if((0,u.deepEqual)(e.values,t.values))return n}else if((0,i.isUrlData)(e)&&(0,i.isUrlData)(t)){if(e.url===t.url)return n}else if((0,i.isNamedData)(e)&&e.name===n.dataName)return n}return null}function G(e,t,n){let r=0;for(const i of t.transforms){let a,s;if((0,l.isCalculate)(i))s=e=new m.CalculateNode(e,i),a="derived";else if((0,l.isFilter)(i)){const r=(0,A.getImplicitFromFilterTransform)(i);s=e=A.ParseNode.makeWithAncestors(e,{},r,n)??e,e=new E.FilterNode(e,t,i.filter)}else if((0,l.isBin)(i))s=e=g.BinNode.makeFromTransform(e,i,t),a="number";else if((0,l.isTimeUnit)(i)){a="date";void 0===n.getWithExplicit(i.field).value&&(e=new A.ParseNode(e,{[i.field]:a}),n.set(i.field,a,!1)),s=e=q.TimeUnitNode.makeFromTransform(e,i)}else if((0,l.isAggregate)(i))s=e=h.AggregateNode.makeFromTransform(e,i),a="number",(0,f.requiresSelectionId)(t)&&(e=new R.IdentifierNode(e));else if((0,l.isLookup)(i))s=e=P.LookupNode.make(e,t,i,r++),a="derived";else if((0,l.isWindow)(i))s=e=new j.WindowTransformNode(e,i),a="number";else if((0,l.isJoinAggregate)(i))s=e=new N.JoinAggregateTransformNode(e,i),a="number";else if((0,l.isStack)(i))s=e=z.StackNode.makeFromTransform(e,i),a="derived";else if((0,l.isFold)(i))s=e=new _.FoldTransformNode(e,i),a="derived";else if((0,l.isExtent)(i))s=e=new b.ExtentTransformNode(e,i),a="derived";else if((0,l.isFlatten)(i))s=e=new w.FlattenTransformNode(e,i),a="derived";else if((0,l.isPivot)(i))s=e=new M.PivotTransformNode(e,i),a="derived";else if((0,l.isSample)(i))e=new L.SampleTransformNode(e,i);else if((0,l.isImpute)(i))s=e=D.ImputeNode.makeFromTransform(e,i),a="derived";else if((0,l.isDensity)(i))s=e=new v.DensityTransformNode(e,i),a="derived";else if((0,l.isQuantile)(i))s=e=new I.QuantileTransformNode(e,i),a="derived";else if((0,l.isRegression)(i))s=e=new $.RegressionTransformNode(e,i),a="derived";else{if(!(0,l.isLoess)(i)){o.warn(o.message.invalidTransformIgnored(i));continue}s=e=new F.LoessTransformNode(e,i),a="derived"}if(s&&void 0!==a)for(const e of s.producedFields()??[])n.set(e,a,!1)}return e}function V(e){let t=function(e,t){if(e.data||!e.parent){if(null===e.data){const e=new U.SourceNode({values:[]});return t.push(e),e}const n=H(e.data,t);if(n)return(0,i.isGenerator)(e.data)||(n.data.format=(0,u.mergeDeep)({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const n=new U.SourceNode(e.data);return t.push(n),n}}return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}(e,e.component.data.sources);const{outputNodes:n,outputNodeRefCounts:o}=e.component.data,l=e.data,y=!(l&&((0,i.isGenerator)(l)||(0,i.isUrlData)(l)||(0,i.isInlineData)(l)))&&e.parent?e.parent.component.data.ancestorParse.clone():new r.AncestorParse;(0,i.isGenerator)(l)?((0,i.isSequenceGenerator)(l)?t=new B.SequenceNode(t,l.sequence):(0,i.isGraticuleGenerator)(l)&&(t=new k.GraticuleNode(t,l.graticule)),y.parseNothing=!0):null===l?.format?.parse&&(y.parseNothing=!0),t=A.ParseNode.makeExplicit(t,e,y)??t,t=new R.IdentifierNode(t);const v=e.parent&&(0,d.isLayerModel)(e.parent);((0,d.isUnitModel)(e)||(0,d.isFacetModel)(e))&&v&&(t=g.BinNode.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=G(t,e,y));const b=(0,A.getImplicitFromSelection)(e),E=(0,A.getImplicitFromEncoding)(e);t=A.ParseNode.makeWithAncestors(t,{},{...b,...E},y)??t,(0,d.isUnitModel)(e)&&(t=C.GeoJSONNode.parseAll(t,e),t=T.GeoPointNode.parseAll(t,e)),((0,d.isUnitModel)(e)||(0,d.isFacetModel)(e))&&(v||(t=g.BinNode.makeFromEncoding(t,e)??t),t=q.TimeUnitNode.makeFromEncoding(t,e)??t,t=m.CalculateNode.parseAllForSortIndex(t,e));const w=t=W(i.DataSourceType.Raw,e,t);if((0,d.isUnitModel)(e)){const n=h.AggregateNode.makeFromEncoding(t,e);n&&(t=n,(0,f.requiresSelectionId)(e)&&(t=new R.IdentifierNode(t))),t=D.ImputeNode.makeFromEncoding(t,e)??t,t=z.StackNode.makeFromEncoding(t,e)??t}let _,N;if((0,d.isUnitModel)(e)){const{markDef:n,mark:r,config:o}=e,l=(0,c.getMarkPropOrConfig)("invalid",n,o),{marks:u,scales:d}=N=(0,a.getDataSourcesForHandlingInvalidValues)({invalid:l,isPath:(0,s.isPathMark)(r)});u!==d&&"include-invalid-values"===d&&(_=t=W(i.DataSourceType.PreFilterInvalid,e,t)),"exclude-invalid-values"===u&&(t=S.FilterInvalidNode.make(t,e,N)??t)}const F=t=W(i.DataSourceType.Main,e,t);let P;if((0,d.isUnitModel)(e)&&N){const{marks:n,scales:r}=N;"include-invalid-values"===n&&"exclude-invalid-values"===r&&(t=S.FilterInvalidNode.make(t,e,N)??t,P=t=W(i.DataSourceType.PostFilterInvalid,e,t))}(0,d.isUnitModel)(e)&&(0,p.materializeSelections)(e,F);let M=null;if((0,d.isFacetModel)(e)){const r=e.getName("facet");t=(0,O.makeJoinAggregateFromFacet)(t,e.facet)??t,M=new x.FacetNode(t,e,r,F.getSource()),n[r]=M}return{...e.component.data,outputNodes:n,outputNodeRefCounts:o,raw:w,main:F,facetRoot:M,ancestorParse:y,preFilterInvalid:_,postFilterInvalid:P}}function W(e,t,n){const{outputNodes:r,outputNodeRefCounts:i}=t.component.data,a=t.getDataName(e),o=new y.OutputNode(n,a,e,i);return r[a]=o,o}},38380:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PivotTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t}addDimensions(e){this.transform.groupby=(0,r.unique)((this.transform.groupby??[]).concat(e),(e=>e))}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${(0,r.hash)(this.transform)}`}assemble(){const{pivot:e,value:t,groupby:n,limit:r,op:i}=this.transform;return{type:"pivot",field:e,value:t,...void 0!==r?{limit:r}:{},...void 0!==i?{op:i}:{},...void 0!==n?{groupby:n}:{}}}}},40763:(e,t,n)=>{"use strict";n.r(t),n.d(t,{QuantileTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??"prob",n[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${(0,r.hash)(this.transform)}`}assemble(){const{quantile:e,...t}=this.transform;return{type:"quantile",field:e,...t}}}},6799:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RegressionTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=(0,r.duplicate)(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??t.on,n[1]??t.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${(0,r.hash)(this.transform)}`}assemble(){const{regression:e,on:t,...n}=this.transform;return{type:"regression",x:t,y:e,...n}}}},56948:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SampleTransformNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,(0,r.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${(0,r.hash)(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}},79351:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SequenceNode:()=>a});var r=n(79989),i=n(74686);class a extends i.DataFlowNode{clone(){return new a(null,this.params)}constructor(e,t){super(e),this.params=t}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${(0,r.hash)(this.params)}`}assemble(){return{type:"sequence",...this.params}}}},455:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SourceNode:()=>o});var r=n(89081),i=n(79989),a=n(74686);class o extends a.DataFlowNode{constructor(e){let t;if(super(null),e??(e={name:"source"}),(0,r.isGenerator)(e)||(t=e.format?{...(0,i.omit)(e.format,["parse"])}:{}),(0,r.isInlineData)(e))this._data={values:e.values};else if((0,r.isUrlData)(e)){if(this._data={url:e.url},!t.type){let n=/(?:\.([^.]+))?$/.exec(e.url)[1];(0,i.contains)(["json","csv","tsv","dsv","topojson"],n)||(n="json"),t.type=n}}else(0,r.isSphereGenerator)(e)?this._data={values:[{type:"Sphere"}]}:((0,r.isNamedData)(e)||(0,r.isGenerator)(e))&&(this._data={});this._generator=(0,r.isGenerator)(e),e.name&&(this._name=e.name),t&&!(0,i.isEmpty)(t)&&(this._data.format=t)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(e){this._name=e}set parent(e){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return{name:this._name,...this._data,transform:[]}}}},89764:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StackNode:()=>u});var r=n(26372),i=n(79543),a=n(79989),o=n(15058),s=n(74686),l=n(78825);class u extends s.DataFlowNode{clone(){return new u(null,(0,a.duplicate)(this._stack))}constructor(e,t){super(e),this._stack=t}static makeFromTransform(e,t){const{stack:n,groupby:i,as:o,offset:s="zero"}=t,l=[],c=[];if(void 0!==t.sort)for(const e of t.sort)l.push(e.field),c.push((0,a.getFirstDefined)(e.order,"ascending"));const d={field:l,order:c};let f;return f=function(e){return(0,r.isArray)(e)&&e.every((e=>(0,r.isString)(e)))&&e.length>1}(o)?o:(0,r.isString)(o)?[o,`${o}_end`]:[`${t.stack}_start`,`${t.stack}_end`],new u(e,{dimensionFieldDefs:[],stackField:n,groupby:i,offset:s,sort:d,facetby:[],as:f})}static makeFromEncoding(e,t){const n=t.stack,{encoding:a}=t;if(!n)return null;const{groupbyChannels:s,fieldChannel:l,offset:c,impute:d}=n,f=s.map((e=>{const t=a[e];return(0,i.getFieldDef)(t)})).filter((e=>!!e)),p=function(e){return e.stack.stackBy.reduce(((e,t)=>{const n=t.fieldDef,r=(0,i.vgField)(n);return r&&e.push(r),e}),[])}(t),h=t.encoding.order;let g;if((0,r.isArray)(h)||(0,i.isFieldDef)(h))g=(0,o.sortParams)(h);else{const e=(0,i.isOrderOnlyDef)(h)?h.sort:"y"===l?"descending":"ascending";g=p.reduce(((t,n)=>(t.field.includes(n)||(t.field.push(n),t.order.push(e)),t)),{field:[],order:[]})}return new u(e,{dimensionFieldDefs:f,stackField:t.vgField(l),facetby:[],stackby:p,sort:g,offset:c,impute:d,as:[t.vgField(l,{suffix:"start",forAs:!0}),t.vgField(l,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(e){this._stack.facetby.push(...e)}dependentFields(){const e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach(e.add,e),this._stack.facetby.forEach(e.add,e),this._stack.sort.field.forEach(e.add,e),e}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${(0,a.hash)(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:e,impute:t,groupby:n}=this._stack;return e.length>0?e.map((e=>e.bin?t?[(0,i.vgField)(e,{binSuffix:"mid"})]:[(0,i.vgField)(e,{}),(0,i.vgField)(e,{binSuffix:"end"})]:[(0,i.vgField)(e)])).flat():n??[]}assemble(){const e=[],{facetby:t,dimensionFieldDefs:n,stackField:r,stackby:a,sort:o,offset:s,impute:u,as:c}=this._stack;if(u)for(const o of n){const{bandPosition:n=.5,bin:s}=o;if(s){const t=(0,i.vgField)(o,{expr:"datum"}),r=(0,i.vgField)(o,{expr:"datum",binSuffix:"end"});e.push({type:"formula",expr:`${(0,l.isValidFiniteNumberExpr)(t)} ? ${n}*${t}+${1-n}*${r} : ${t}`,as:(0,i.vgField)(o,{binSuffix:"mid",forAs:!0})})}e.push({type:"impute",field:r,groupby:[...a,...t],key:(0,i.vgField)(o,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[...this.getGroupbyFields(),...t],field:r,sort:o,as:c,offset:s}),e}}},10646:(e,t,n)=>{"use strict";n.r(t),n.d(t,{moveFacetDown:()=>d});var r=n(89081),i=n(69687),a=n(74686),o=n(69151),s=n(56123),l=n(80449),u=n(89764),c=n(51422);function d(e){if(e instanceof o.FacetNode)if(1!==e.numChildren()||e.children[0]instanceof a.OutputNode){const n=e.model.component.data.main;f(n);const r=(t=e,function e(n){if(!(n instanceof o.FacetNode)){const r=n.clone();if(r instanceof a.OutputNode){const e=l.FACET_SCALE_PREFIX+r.getSource();r.setSource(e),t.model.component.data.outputNodes[e]=r}else(r instanceof i.AggregateNode||r instanceof u.StackNode||r instanceof c.WindowTransformNode||r instanceof s.JoinAggregateTransformNode)&&r.addDimensions(t.fields);for(const t of n.children.flatMap(e))t.parent=r;return[r]}return n.children.flatMap(e)}),d=e.children.map(r).flat();for(const e of d)e.parent=n}else{const t=e.children[0];(t instanceof i.AggregateNode||t instanceof u.StackNode||t instanceof c.WindowTransformNode||t instanceof s.JoinAggregateTransformNode)&&t.addDimensions(e.fields),t.swapWithParent(),d(e)}else e.children.map(d);var t}function f(e){if(e instanceof a.OutputNode&&e.type===r.DataSourceType.Main&&1===e.numChildren()){const t=e.children[0];t instanceof o.FacetNode||(t.swapWithParent(),f(e))}}},62277:(e,t,n)=>{"use strict";n.r(t),n.d(t,{OFFSETTED_RECT_END_SUFFIX:()=>h,OFFSETTED_RECT_START_SUFFIX:()=>p,TimeUnitNode:()=>f});var r=n(79543),i=n(96598),a=n(79989),o=n(7302),s=n(74686),l=n(75028),u=n(95290);function c(e){return void 0!==e.as}function d(e){return`${e}_end`}class f extends s.DataFlowNode{clone(){return new f(null,(0,a.duplicate)(this.timeUnits))}constructor(e,t){super(e),this.timeUnits=t}static makeFromEncoding(e,t){const n=t.reduceFieldDef(((e,n,s)=>{const{field:c,timeUnit:d}=n;if(d){let f;if((0,i.isBinnedTimeUnit)(d)){if((0,o.isUnitModel)(t)){const{mark:e,markDef:a,config:o}=t,s=(0,r.getBandPosition)({fieldDef:n,markDef:a,config:o});((0,l.isRectBasedMark)(e)||s)&&(f={timeUnit:(0,i.normalizeTimeUnit)(d),field:c})}}else f={as:(0,r.vgField)(n,{forAs:!0}),field:c,timeUnit:d};if((0,o.isUnitModel)(t)){const{mark:e,markDef:i,config:a}=t,o=(0,r.getBandPosition)({fieldDef:n,markDef:i,config:a});(0,l.isRectBasedMark)(e)&&(0,u.isXorY)(s)&&.5!==o&&(f.rectBandPosition=o)}f&&(e[(0,a.hash)(f)]=f)}return e}),{});return(0,a.isEmpty)(n)?null:new f(e,n)}static makeFromTransform(e,t){const{timeUnit:n,...r}={...t},o={...r,timeUnit:(0,i.normalizeTimeUnit)(n)};return new f(e,{[(0,a.hash)(o)]:o})}merge(e){this.timeUnits={...this.timeUnits};for(const t in e.timeUnits)this.timeUnits[t]||(this.timeUnits[t]=e.timeUnits[t]);for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}removeFormulas(e){const t={};for(const[n,r]of(0,a.entries)(this.timeUnits)){const i=c(r)?r.as:`${r.field}_end`;e.has(i)||(t[n]=r)}this.timeUnits=t}producedFields(){return new Set((0,a.vals)(this.timeUnits).map((e=>c(e)?e.as:d(e.field))))}dependentFields(){return new Set((0,a.vals)(this.timeUnits).map((e=>e.field)))}hash(){return`TimeUnit ${(0,a.hash)(this.timeUnits)}`}assemble(){const e=[];for(const t of(0,a.vals)(this.timeUnits)){const{rectBandPosition:n}=t,r=(0,i.normalizeTimeUnit)(t.timeUnit);if(c(t)){const{field:o,as:s}=t,{unit:l,utc:u,...c}=r,d=[s,`${s}_end`];e.push({field:(0,a.replacePathInField)(o),type:"timeunit",...l?{units:(0,i.getTimeUnitParts)(l)}:{},...u?{timezone:"utc"}:{},...c,as:d}),e.push(...m(d,n,r))}else if(t){const{field:i}=t,a=i.replaceAll("\\.","."),o=g({timeUnit:r,field:a}),s=d(a);e.push({type:"formula",expr:o,as:s}),e.push(...m([a,s],n,r))}}return e}}const p="offsetted_rect_start",h="offsetted_rect_end";function g({timeUnit:e,field:t,reverse:n}){const{unit:r,utc:o}=e,s=(0,i.getSmallestTimeUnitPart)(r),{part:l,step:u}=(0,i.getDateTimePartAndStep)(s,e.step);return`${o?"utcOffset":"timeOffset"}('${l}', ${(0,a.accessWithDatumToUnescapedPath)(t)}, ${n?-u:u})`}function m([e,t],n,r){if(void 0!==n&&.5!==n){const i=(0,a.accessWithDatumToUnescapedPath)(e),o=(0,a.accessWithDatumToUnescapedPath)(t);return[{type:"formula",expr:y([g({timeUnit:r,field:e,reverse:!0}),i],n+.5),as:`${e}_${p}`},{type:"formula",expr:y([i,o],n+.5),as:`${e}_${h}`}]}return[]}function y([e,t],n){return`${1-n} * ${e} + ${n} * ${t}`}},51422:(e,t,n)=>{"use strict";n.r(t),n.d(t,{WindowTransformNode:()=>s});var r=n(54814),i=n(79543),a=n(79989),o=n(74686);class s extends o.DataFlowNode{clone(){return new s(null,(0,a.duplicate)(this.transform))}constructor(e,t){super(e),this.transform=t}addDimensions(e){this.transform.groupby=(0,a.unique)(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return(this.transform.groupby??[]).forEach(e.add,e),(this.transform.sort??[]).forEach((t=>e.add(t.field))),this.transform.window.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(e){return e.as??(0,i.vgField)(e)}hash(){return`WindowTransform ${(0,a.hash)(this.transform)}`}assemble(){const e=[],t=[],n=[],i=[];for(const r of this.transform.window)t.push(r.op),n.push(this.getDefaultName(r)),i.push(void 0===r.param?null:r.param),e.push(void 0===r.field?null:r.field);const a=this.transform.frame,o=this.transform.groupby;if(a&&null===a[0]&&null===a[1]&&t.every((e=>(0,r.isAggregateOp)(e))))return{type:"joinaggregate",as:n,ops:t,fields:e,...void 0!==o?{groupby:o}:{}};const s=[],l=[];if(void 0!==this.transform.sort)for(const e of this.transform.sort)s.push(e.field),l.push(e.order??"ascending");const u={field:s,order:l},c=this.transform.ignorePeers;return{type:"window",params:i,as:n,ops:t,fields:e,sort:u,...void 0!==c?{ignorePeers:c}:{},...void 0!==o?{groupby:o}:{},...void 0!==a?{frame:a}:{}}}}},33828:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FacetModel:()=>R,facetSortFieldName:()=>k});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(3802),l=n(20916),u=n(31179),c=n(46681),d=n(51894),f=n(79989),p=n(5711),h=n(36598),g=n(81458),m=n(77524),y=n(80219),v=n(51885),b=n(18020),x=n(10078),E=n(99354),S=n(27588),w=n(7302),_=n(63760),A=n(52128),C=n(93794),T=n(87039);function k(e,t,n){return(0,o.vgField)(t,{suffix:`by_${(0,o.vgField)(e)}`,...n})}class R extends w.ModelWithField{constructor(e,t,n,r){super(e,"facet",t,n,r,e.resolve),this.child=(0,h.buildModel)(e.spec,this,this.getName("child"),void 0,r),this.children=[this.child],this.facet=this.initFacet(e.facet)}initFacet(e){if(!(0,d.isFacetMapping)(e))return{facet:this.initFacetFieldDef(e,"facet")};const t=(0,f.keys)(e),n={};for(const r of t){if(![a.ROW,a.COLUMN].includes(r)){l.warn(l.message.incompatibleChannel(r,"facet"));break}const t=e[r];if(void 0===t.field){l.warn(l.message.emptyFieldDef(t,r));break}n[r]=this.initFacetFieldDef(t,r)}return n}initFacetFieldDef(e,t){const n=(0,o.initFieldDef)(e,t);return n.header?n.header=(0,s.replaceExprRef)(n.header):null===n.header&&(n.header=null),n}channelHasField(e){return(0,f.hasProperty)(this.facet,e)}fieldDef(e){return this.facet[e]}parseData(){this.component.data=(0,y.parseData)(this),this.child.parseData()}parseLayoutSize(){(0,S.parseChildrenLayoutSize)(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection,Object.values(this.component.selection).some((e=>(0,C.isTimerSelection)(e)))&&l.error(T.MULTI_VIEW_ANIMATION_UNSUPPORTED)}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),(0,E.parseFacetHeaders)(this)}assembleSelectionTopLevelSignals(e){return this.child.assembleSelectionTopLevelSignals(e)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(e){return this.child.assembleSelectionData(e)}getHeaderLayoutMixins(){const e={};for(const t of a.FACET_CHANNELS)for(const n of x.HEADER_TYPES){const r=this.component.layoutHeaders[t],i=r[n],{facetFieldDef:a}=r;if(a){const n=(0,b.getHeaderProperty)("titleOrient",a.header,this.config,t);if(["right","bottom"].includes(n)){const r=(0,b.getHeaderChannel)(t,n);e.titleAnchor??(e.titleAnchor={}),e.titleAnchor[r]="end"}}if(i?.[0]){const i="row"===t?"height":"width",a="header"===n?"headerBand":"footerBand";"facet"===t||this.child.component.layoutSize.get(i)||(e[a]??(e[a]={}),e[a][t]=.5),r.title&&(e.offset??(e.offset={}),e.offset["row"===t?"rowTitle":"columnTitle"]=10)}}return e}assembleDefaultLayout(){const{column:e,row:t}=this.facet,n=e?this.columnDistinctSignal():t?1:void 0;let r="all";return(t||"independent"!==this.component.resolve.scale.x)&&(e||"independent"!==this.component.resolve.scale.y)||(r="none"),{...this.getHeaderLayoutMixins(),...n?{columns:n}:{},bounds:"full",align:r}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof R)){return{signal:`length(data('${this.getName("column_domain")}'))`}}}assembleGroupStyle(){}assembleGroup(e){return this.parent&&this.parent instanceof R?{...this.channelHasField("column")?{encode:{update:{columns:{field:(0,o.vgField)(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(e)}:super.assembleGroup(e)}getCardinalityAggregateForChild(){const e=[],t=[],n=[];if(this.child instanceof R){if(this.child.channelHasField("column")){const r=(0,o.vgField)(this.child.facet.column);e.push(r),t.push("distinct"),n.push(`distinct_${r}`)}}else for(const r of a.POSITION_SCALE_CHANNELS){const i=this.child.component.scales[r];if(i&&!i.merged){const a=i.get("type"),o=i.get("range");if((0,u.hasDiscreteDomain)(a)&&(0,p.isVgRangeStep)(o)){const i=(0,_.assembleDomain)(this.child,r),a=(0,_.getFieldFromDomain)(i);a?(e.push(a),t.push("distinct"),n.push(`distinct_${a}`)):l.warn(l.message.unknownField(r))}}}return{fields:e,ops:t,as:n}}assembleFacet(){const{name:e,data:t}=this.component.data.facetRoot,{row:n,column:s}=this.facet,{fields:l,ops:u,as:d}=this.getCardinalityAggregateForChild(),f=[];for(const e of a.FACET_CHANNELS){const t=this.facet[e];if(t){f.push((0,o.vgField)(t));const{bin:a,sort:p}=t;if((0,i.isBinning)(a)&&f.push((0,o.vgField)(t,{binSuffix:"end"})),(0,c.isSortField)(p)){const{field:e,op:r=c.DEFAULT_SORT_OP}=p,i=k(t,p);n&&s?(l.push(i),u.push("max"),d.push(i)):(l.push(e),u.push(r),d.push(i))}else if((0,r.isArray)(p)){const n=(0,m.sortArrayIndexField)(t,e);l.push(n),u.push("max"),d.push(n)}}}const p=!!n&&!!s;return{name:e,data:t,groupby:f,...p||l.length>0?{aggregate:{...p?{cross:p}:{},...l.length?{fields:l,ops:u,as:d}:{}}}:{}}}facetSortFields(e){const{facet:t}=this,n=t[e];return n?(0,c.isSortField)(n.sort)?[k(n,n.sort,{expr:"datum"})]:(0,r.isArray)(n.sort)?[(0,m.sortArrayIndexField)(n,e,{expr:"datum"})]:[(0,o.vgField)(n,{expr:"datum"})]:[]}facetSortOrder(e){const{facet:t}=this,n=t[e];if(n){const{sort:e}=n;return[((0,c.isSortField)(e)?e.order:!(0,r.isArray)(e)&&e)||"ascending"]}return[]}assembleLabelTitle(){const{facet:e,config:t}=this;if(e.facet)return(0,v.assembleLabelTitle)(e.facet,"facet",t);const n={row:["top","bottom"],column:["left","right"]};for(const r of x.HEADER_CHANNELS)if(e[r]){const i=(0,b.getHeaderProperty)("labelOrient",e[r]?.header,t,r);if(n[r].includes(i))return(0,v.assembleLabelTitle)(e[r],r,t)}}assembleMarks(){const{child:e}=this,t=this.component.data.facetRoot,n=(0,g.assembleFacetData)(t),r=e.assembleGroupEncodeEntry(!1),i=this.assembleLabelTitle()||e.assembleTitle(),o=e.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...i?{title:i}:{},...o?{style:o}:{},from:{facet:this.assembleFacet()},sort:{field:a.FACET_CHANNELS.map((e=>this.facetSortFields(e))).flat(),order:a.FACET_CHANNELS.map((e=>this.facetSortOrder(e))).flat()},...n.length>0?{data:n}:{},...r?{encode:{update:r}}:{},...e.assembleGroup((0,A.assembleFacetSignals)(this,[]))}]}getMapping(){return this.facet}}},6032:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BIN_RANGE_DELIMITER:()=>g,binFormatExpression:()=>A,formatCustomType:()=>v,formatSignalRef:()=>m,guideFormat:()=>b,guideFormatType:()=>x,isCustomFormatType:()=>p,numberFormat:()=>E,timeFormat:()=>S,timeFormatExpression:()=>C});var r=n(26372),i=n(19664),a=n(79543),o=n(4976),s=n(31179),l=n(96598),u=n(99273),c=n(79989),d=n(5711),f=n(42104);function p(e){return e&&"number"!==e&&"time"!==e}function h(e,t,n){return`${e}(${t}${n?`, ${(0,c.stringify)(n)}`:""})`}const g=" \u2013 ";function m({fieldOrDatumDef:e,format:t,formatType:n,expr:r,normalizeStack:o,config:u}){if(p(n))return v({fieldOrDatumDef:e,format:t,formatType:n,expr:r,config:u});const c=y(e,r,o),d=(0,a.channelDefType)(e);if(void 0===t&&void 0===n&&u.customFormatTypes){if("quantitative"===d){if(o&&u.normalizedNumberFormatType)return v({fieldOrDatumDef:e,format:u.normalizedNumberFormat,formatType:u.normalizedNumberFormatType,expr:r,config:u});if(u.numberFormatType)return v({fieldOrDatumDef:e,format:u.numberFormat,formatType:u.numberFormatType,expr:r,config:u})}if("temporal"===d&&u.timeFormatType&&(0,a.isFieldDef)(e)&&void 0===e.timeUnit)return v({fieldOrDatumDef:e,format:u.timeFormat,formatType:u.timeFormatType,expr:r,config:u})}if((0,a.isFieldOrDatumDefForTimeFormat)(e)){const n=C({field:c,timeUnit:(0,a.isFieldDef)(e)?(0,l.normalizeTimeUnit)(e.timeUnit)?.unit:void 0,format:t,formatType:u.timeFormatType,rawTimeFormat:u.timeFormat,isUTCScale:(0,a.isScaleFieldDef)(e)&&e.scale?.type===s.ScaleType.UTC});return n?{signal:n}:void 0}if(t=E({type:d,specifiedFormat:t,config:u,normalizeStack:o}),(0,a.isFieldDef)(e)&&(0,i.isBinning)(e.bin)){return{signal:A(c,(0,a.vgField)(e,{expr:r,binSuffix:"end"}),t,n,u)}}return t||"quantitative"===(0,a.channelDefType)(e)?{signal:`${w(c,t)}`}:{signal:`isValid(${c}) ? ${c} : ""+${c}`}}function y(e,t,n){return(0,a.isFieldDef)(e)?n?`${(0,a.vgField)(e,{expr:t,suffix:"end"})}-${(0,a.vgField)(e,{expr:t,suffix:"start"})}`:(0,a.vgField)(e,{expr:t}):(0,f.datumDefToExpr)(e)}function v({fieldOrDatumDef:e,format:t,formatType:n,expr:r,normalizeStack:o,config:s,field:l}){if(l??(l=y(e,r,o)),"datum.value"!==l&&(0,a.isFieldDef)(e)&&(0,i.isBinning)(e.bin)){return{signal:A(l,(0,a.vgField)(e,{expr:r,binSuffix:"end"}),t,n,s)}}return{signal:h(n,l,t)}}function b(e,t,n,i,o,s){if(!(0,r.isString)(i)||!p(i)){if(void 0===n&&void 0===i&&o.customFormatTypes&&"quantitative"===(0,a.channelDefType)(e)){if(o.normalizedNumberFormatType&&(0,a.isPositionFieldOrDatumDef)(e)&&"normalize"===e.stack)return;if(o.numberFormatType)return}if((0,a.isPositionFieldOrDatumDef)(e)&&"normalize"===e.stack&&o.normalizedNumberFormat)return E({type:"quantitative",config:o,normalizeStack:!0});if((0,a.isFieldOrDatumDefForTimeFormat)(e)){const t=(0,a.isFieldDef)(e)?(0,l.normalizeTimeUnit)(e.timeUnit)?.unit:void 0;if(void 0===t&&o.customFormatTypes&&o.timeFormatType)return;return S({specifiedFormat:n,timeUnit:t,config:o,omitTimeFormatConfig:s})}return E({type:t,specifiedFormat:n,config:o})}}function x(e,t,n){return e&&((0,d.isSignalRef)(e)||"number"===e||"time"===e)?e:(0,a.isFieldOrDatumDefForTimeFormat)(t)&&"time"!==n&&"utc"!==n?(0,a.isFieldDef)(t)&&(0,l.normalizeTimeUnit)(t?.timeUnit)?.utc?"utc":"time":void 0}function E({type:e,specifiedFormat:t,config:n,normalizeStack:i}){return(0,r.isString)(t)?t:e===u.QUANTITATIVE?i?n.normalizedNumberFormat:n.numberFormat:void 0}function S({specifiedFormat:e,timeUnit:t,config:n,omitTimeFormatConfig:r}){return e||(t?{signal:(0,l.timeUnitSpecifierExpression)(t)}:r?void 0:n.timeFormat)}function w(e,t){return`format(${e}, "${t||""}")`}function _(e,t,n,i){return p(n)?h(n,e,t):w(e,((0,r.isString)(t)?t:void 0)??i.numberFormat)}function A(e,t,n,r,i){if(void 0===n&&void 0===r&&i.customFormatTypes&&i.numberFormatType)return A(e,t,i.numberFormat,i.numberFormatType,i);const a=_(e,n,r,i),s=_(t,n,r,i);return`${(0,o.fieldValidPredicate)(e,!1)} ? "null" : ${a} + "${g}" + ${s}`}function C({field:e,timeUnit:t,format:n,formatType:i,rawTimeFormat:a,isUTCScale:o}){return!t||n?!t&&i?`${i}(${e}, '${n}')`:`${o?"utc":"time"}Format(${e}, '${n=(0,r.isString)(n)?n:a}')`:(0,l.formatExpression)(t,e,o)}},16039:(e,t,n)=>{"use strict";n.r(t),n.d(t,{guideEncodeEntry:()=>o});var r=n(79989),i=n(15058),a=n(49144);function o(e,t){return(0,r.keys)(e).reduce(((n,r)=>({...n,...(0,a.wrapCondition)({model:t,channelDef:e[r],vgChannel:r,mainRefFn:e=>(0,i.signalOrValueRef)(e.value),invalidValueRef:void 0})})),{})}},51885:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleHeaderGroup:()=>S,assembleHeaderGroups:()=>b,assembleHeaderProperties:()=>C,assembleLabelTitle:()=>E,assembleLayoutTitleBand:()=>A,assembleTitleGroup:()=>m,defaultHeaderGuideAlign:()=>y,defaultHeaderGuideBaseline:()=>v,getLayoutTitleBand:()=>_});var r=n(26372),i=n(95290),a=n(79543),o=n(41028),s=n(46681),l=n(51894),u=n(79989),c=n(43852),d=n(77524),f=n(6032),p=n(7302),h=n(18020),g=n(10078);function m(e,t){const n=e.component.layoutHeaders[t].title,r=e.config?e.config:void 0,i=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:a,titleAngle:s,titleOrient:l}=(0,h.getHeaderProperties)(["titleAnchor","titleAngle","titleOrient"],i.header,r,t),c=(0,h.getHeaderChannel)(t,l),d=(0,u.normalizeAngle)(s);return{name:`${t}-title`,type:"group",role:`${c}-title`,title:{text:n,..."row"===t?{orient:"left"}:{},style:"guide-title",...v(d,c),...y(c,d,a),...C(r,i,t,o.HEADER_TITLE_PROPERTIES,o.HEADER_TITLE_PROPERTIES_MAP)}}}function y(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const r=(0,c.defaultLabelAlign)(t,"row"===e?"left":"top","row"===e?"y":"x");return r?{align:r}:{}}function v(e,t){const n=(0,c.defaultLabelBaseline)(e,"row"===t?"left":"top","row"===t?"y":"x",!0);return n?{baseline:n}:{}}function b(e,t){const n=e.component.layoutHeaders[t],r=[];for(const i of g.HEADER_TYPES)if(n[i])for(const a of n[i]){const o=S(e,t,i,n,a);null!=o&&r.push(o)}return r}function x(e,t){const{sort:n}=e;return(0,s.isSortField)(n)?{field:(0,a.vgField)(n,{expr:"datum"}),order:n.order??"ascending"}:(0,r.isArray)(n)?{field:(0,d.sortArrayIndexField)(e,t,{expr:"datum"}),order:"ascending"}:{field:(0,a.vgField)(e,{expr:"datum"}),order:n??"ascending"}}function E(e,t,n){const{format:r,formatType:i,labelAngle:s,labelAnchor:l,labelOrient:c,labelExpr:d}=(0,h.getHeaderProperties)(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),p=(0,f.formatSignalRef)({fieldOrDatumDef:e,format:r,formatType:i,expr:"parent",config:n}).signal,g=(0,h.getHeaderChannel)(t,c);return{text:{signal:d?(0,u.replaceAll)((0,u.replaceAll)(d,"datum.label",p),"datum.value",(0,a.vgField)(e,{expr:"parent"})):p},..."row"===t?{orient:"left"}:{},style:"guide-label",frame:"group",...v(s,g),...y(g,s,l),...C(n,e,t,o.HEADER_LABEL_PROPERTIES,o.HEADER_LABEL_PROPERTIES_MAP)}}function S(e,t,n,r,i){if(i){let a=null;const{facetFieldDef:o}=r,s=e.config?e.config:void 0;if(o&&i.labels){const{labelOrient:e}=(0,h.getHeaderProperties)(["labelOrient"],o.header,s,t);("row"===t&&!(0,u.contains)(["top","bottom"],e)||"column"===t&&!(0,u.contains)(["left","right"],e))&&(a=E(o,t,s))}const c=(0,p.isFacetModel)(e)&&!(0,l.isFacetMapping)(e.facet),d=i.axes,f=d?.length>0;if(a||f){const s="row"===t?"height":"width";return{name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`,...r.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:x(o,t)}:{},...f&&c?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...a?{title:a}:{},...i.sizeSignal?{encode:{update:{[s]:i.sizeSignal}}}:{},...f?{axes:d}:{}}}}return null}const w={column:{start:0,end:1},row:{start:1,end:0}};function _(e,t){return w[t][e]}function A(e,t){const n={};for(const r of i.FACET_CHANNELS){const i=e[r];if(i?.facetFieldDef){const{titleAnchor:e,titleOrient:a}=(0,h.getHeaderProperties)(["titleAnchor","titleOrient"],i.facetFieldDef.header,t,r),o=(0,h.getHeaderChannel)(r,a),s=_(e,o);void 0!==s&&(n[o]=s)}}return(0,u.isEmpty)(n)?void 0:n}function C(e,t,n,r,i){const a={};for(const o of r){if(!i[o])continue;const r=(0,h.getHeaderProperty)(o,t?.header,e,n);void 0!==r&&(a[i[o]]=r)}return a}},18020:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHeaderChannel:()=>i,getHeaderProperties:()=>o,getHeaderProperty:()=>a});var r=n(79989);function i(e,t){return(0,r.contains)(["top","bottom"],t)?"column":(0,r.contains)(["left","right"],t)||"row"===e?"row":"column"}function a(e,t,n,i){const a="row"===i?n.headerRow:"column"===i?n.headerColumn:n.headerFacet;return(0,r.getFirstDefined)((t||{})[e],a[e],n.header[e])}function o(e,t,n,r){const i={};for(const o of e){const e=a(o,t||{},n,r);void 0!==e&&(i[o]=e)}return i}},10078:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HEADER_CHANNELS:()=>r,HEADER_TYPES:()=>i});const r=["row","column"],i=["header","footer"]},99354:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getHeaderType:()=>d,parseFacetHeaders:()=>f});var r=n(26372),i=n(95290),a=n(79543),o=n(79989),s=n(5711),l=n(5593),u=n(91387),c=n(18020);function d(e){return"top"===e||"left"===e||(0,s.isSignalRef)(e)?"header":"footer"}function f(e){for(const t of i.FACET_CHANNELS)p(e,t);g(e,"x"),g(e,"y")}function p(e,t){const{facet:n,config:i,child:s,component:l}=e;if(e.channelHasField(t)){const u=n[t],d=(0,c.getHeaderProperty)("title",null,i,t);let f=(0,a.title)(u,i,{allowDisabling:!0,includeDefault:void 0===d||!!d});s.component.layoutHeaders[t].title&&(f=(0,r.isArray)(f)?f.join(", "):f,f+=` / ${s.component.layoutHeaders[t].title}`,s.component.layoutHeaders[t].title=null);const p=(0,c.getHeaderProperty)("labelOrient",u.header,i,t),g=null!==u.header&&(0,o.getFirstDefined)(u.header?.labels,i.header.labels,!0),m=(0,o.contains)(["bottom","right"],p)?"footer":"header";l.layoutHeaders[t]={title:null!==u.header?f:null,facetFieldDef:u,[m]:"facet"===t?[]:[h(e,t,g)]}}}function h(e,t,n){const r="row"===t?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(r)?e.child.getSizeSignalRef(r):void 0,axes:[]}}function g(e,t){const{child:n}=e;if(n.component.axes[t]){const{layoutHeaders:r,resolve:i}=e.component;if(i.axis[t]=(0,u.parseGuideResolve)(i,t),"shared"===i.axis[t]){const i="x"===t?"column":"row",a=r[i];for(const r of n.component.axes[t]){const t=d(r.get("orient"));a[t]??(a[t]=[h(e,i,!1)]);const n=(0,l.assembleAxis)(r,"main",e.config,{header:!0});n&&a[t][0].axes.push(n),r.mainExtracted=!0}}}}},59845:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getScaleInvalidDataMode:()=>s,shouldBreakPath:()=>l});var r=n(75028),i=n(31179),a=n(15058),o=n(96430);function s({markDef:e,config:t,scaleChannel:n,scaleType:s,isCountAggregate:l}){if(!s||!(0,i.hasContinuousDomain)(s)||l)return"always-valid";const u=(0,o.normalizeInvalidDataMode)((0,a.getMarkPropOrConfig)("invalid",e,t),{isPath:(0,r.isPathMark)(e.type)}),c=t.scale?.invalid?.[n];return void 0!==c?"show":u}function l(e){return"break-paths-filter-domains"===e||"break-paths-show-domains"===e}},37761:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDataSourcesForHandlingInvalidValues:()=>a,getScaleDataSourceForHandlingInvalidValues:()=>o});var r=n(89081),i=n(96430);function a({invalid:e,isPath:t}){switch((0,i.normalizeInvalidDataMode)(e,{isPath:t})){case"filter":return{marks:"exclude-invalid-values",scales:"exclude-invalid-values"};case"break-paths-show-domains":return{marks:t?"include-invalid-values":"exclude-invalid-values",scales:"include-invalid-values"};case"break-paths-filter-domains":return{marks:t?"include-invalid-values":"exclude-invalid-values",scales:"exclude-invalid-values"};case"show":return{marks:"include-invalid-values",scales:"include-invalid-values"}}}function o(e){const{marks:t,scales:n}=a(e);return t===n?r.DataSourceType.Main:"include-invalid-values"===n?r.DataSourceType.PreFilterInvalid:r.DataSourceType.PostFilterInvalid}},96430:(e,t,n)=>{"use strict";function r(e,{isPath:t}){return void 0===e||"break-paths-show-path-domains"===e?t?"break-paths-show-domains":"filter":null===e?"show":e}n.r(t),n.d(t,{normalizeInvalidDataMode:()=>r})},51878:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LayerModel:()=>v});var r=n(26372),i=n(20916),a=n(24777),o=n(79989),s=n(5593),l=n(32134),u=n(80219),c=n(6871),d=n(27588),f=n(86985),p=n(7302),h=n(52128),g=n(92649),m=n(93794),y=n(87039);class v extends p.Model{constructor(e,t,n,r,o){super(e,"layer",t,n,o,e.resolve,e.view);const s={...r,...e.width?{width:e.width}:{},...e.height?{height:e.height}:{}};this.children=e.layer.map(((e,t)=>{if((0,a.isLayerSpec)(e))return new v(e,this,this.getName(`layer_${t}`),s,o);if((0,a.isUnitSpec)(e))return new g.UnitModel(e,this,this.getName(`layer_${t}`),s,o);throw new Error(i.message.invalidSpec(e))}))}parseData(){this.component.data=(0,u.parseData)(this);for(const e of this.children)e.parseData()}parseLayoutSize(){(0,d.parseLayerLayoutSize)(this)}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of(0,o.keys)(e.component.selection))this.component.selection[t]=e.component.selection[t]}Object.values(this.component.selection).some((e=>(0,m.isTimerSelection)(e)))&&i.error(y.MULTI_VIEW_ANIMATION_UNSUPPORTED)}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){(0,l.parseLayerAxes)(this)}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleSignals())),(0,s.assembleAxisSignals)(this))}assembleLayoutSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleLayoutSignals())),(0,c.assembleLayoutSignals)(this))}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleGroupStyle(){const e=new Set;for(const t of this.children)for(const n of(0,r.array)(t.assembleGroupStyle()))e.add(n);const t=Array.from(e);return t.length>1?t:1===t.length?t[0]:void 0}assembleTitle(){let e=super.assembleTitle();if(e)return e;for(const t of this.children)if(e=t.assembleTitle(),e)return e}assembleLayout(){return null}assembleMarks(){return(0,h.assembleLayerSelectionMarks)(this,this.children.flatMap((e=>e.assembleMarks())))}assembleLegends(){return this.children.reduce(((e,t)=>e.concat(t.assembleLegends())),(0,f.assembleLegends)(this))}}},6871:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleLayoutSignals:()=>u,sizeExpr:()=>f,sizeSignals:()=>c});var r=n(24007),i=n(31179),a=n(79989),o=n(5711),s=n(15058),l=n(7302);function u(e){return[...c(e,"width"),...c(e,"height"),...c(e,"childWidth"),...c(e,"childHeight")]}function c(e,t){const n="width"===t?"x":"y",a=e.component.layoutSize.get(t);if(!a||"merged"===a)return[];const s=e.getSizeSignalRef(t).signal;if("step"===a){const t=e.getScaleComponent(n);if(t){const r=t.get("type"),a=t.get("range");if((0,i.hasDiscreteDomain)(r)&&(0,o.isVgRangeStep)(a)){const r=e.scaleName(n);if((0,l.isFacetModel)(e.parent)){if("independent"===e.parent.component.resolve.scale[n])return[d(r,a)]}return[d(r,a),{name:s,update:f(r,t,`domain('${r}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==a){const t=s.endsWith("width"),n=t?"containerSize()[0]":"containerSize()[1]",i=`isFinite(${n}) ? ${n} : ${(0,r.getViewConfigContinuousSize)(e.config.view,t?"width":"height")}`;return[{name:s,init:i,on:[{update:i,events:"window:resize"}]}]}return[{name:s,value:a}]}function d(e,t){const n=`${e}_step`;return(0,o.isSignalRef)(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function f(e,t,n){const r=t.get("type"),i=t.get("padding"),o=(0,a.getFirstDefined)(t.get("paddingOuter"),i);let l=t.get("paddingInner");return l="band"===r?void 0!==l?l:i:1,`bandspace(${n}, ${(0,s.signalOrStringValue)(l)}, ${(0,s.signalOrStringValue)(o)}) * ${e}_step`}},19492:(e,t,n)=>{"use strict";function r(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}n.r(t),n.d(t,{getSizeTypeFromLayoutSizeType:()=>r})},81693:(e,t,n)=>{"use strict";n.r(t),n.d(t,{initLayoutSize:()=>s});var r=n(95290),i=n(79543),a=n(20916),o=n(89820);function s({encoding:e,size:t}){for(const n of r.POSITION_SCALE_CHANNELS){const s=(0,r.getSizeChannel)(n);(0,o.isStep)(t[s])&&(0,i.isContinuousFieldOrDatumDef)(e[n])&&(delete t[s],a.warn(a.message.stepDropped(s)))}return t}},27588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseChildrenLayoutSize:()=>p,parseConcatLayoutSize:()=>f,parseLayerLayoutSize:()=>d,parseUnitLayoutSize:()=>g});var r=n(95290),i=n(24007),a=n(31179),o=n(89820),s=n(5711),l=n(91387),u=n(96159),c=n(19492);function d(e){p(e),h(e,"width"),h(e,"height")}function f(e){p(e);const t=1===e.layout.columns?"width":"childWidth",n=void 0===e.layout.columns?"height":"childHeight";h(e,t),h(e,n)}function p(e){for(const t of e.children)t.parseLayoutSize()}function h(e,t){const n=(0,c.getSizeTypeFromLayoutSizeType)(t),i=(0,r.getPositionScaleChannel)(n),a=e.component.resolve,o=e.component.layoutSize;let s;for(const t of e.children){const r=t.component.layoutSize.getWithExplicit(n),o=a.scale[i]??(0,l.defaultScaleResolve)(i,e);if("independent"===o&&"step"===r.value){s=void 0;break}if(s){if("independent"===o&&s.value!==r.value){s=void 0;break}s=(0,u.mergeValuesWithExplicit)(s,r,n,"")}else s=r}if(s){for(const r of e.children)e.renameSignal(r.getName(n),e.getName(t)),r.component.layoutSize.set(n,"merged",!1);o.setWithExplicit(t,s)}else o.setWithExplicit(t,{explicit:!1,value:void 0})}function g(e){const{size:t,component:n}=e;for(const i of r.POSITION_SCALE_CHANNELS){const a=(0,r.getSizeChannel)(i);if(t[a]){const e=t[a];n.layoutSize.set(a,(0,o.isStep)(e)?"step":e,!0)}else{const t=m(e,a);n.layoutSize.set(a,t,!1)}}}function m(e,t){const n="width"===t?"x":"y",r=e.config,l=e.getScaleComponent(n);if(l){const e=l.get("type"),n=l.get("range");if((0,a.hasDiscreteDomain)(e)){const e=(0,i.getViewConfigDiscreteSize)(r.view,t);return(0,s.isVgRangeStep)(n)||(0,o.isStep)(e)?"step":e}return(0,i.getViewConfigContinuousSize)(r.view,t)}if(e.hasProjection||"arc"===e.mark)return(0,i.getViewConfigContinuousSize)(r.view,t);{const e=(0,i.getViewConfigDiscreteSize)(r.view,t);return(0,o.isStep)(e)?e.step:e}}},86985:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleLegend:()=>l,assembleLegends:()=>s});var r=n(54116),i=n(79989),a=n(5711),o=n(16182);function s(e){const t=e.component.legends,n={};for(const r of(0,i.keys)(t)){const a=e.getScaleComponent(r),s=(0,i.stringify)(a.get("domains"));if(n[s])for(const e of n[s]){(0,o.mergeLegendComponent)(e,t[r])||n[s].push(t[r])}else n[s]=[t[r].clone()]}return(0,i.vals)(n).flat().map((t=>l(t,e.config))).filter((e=>void 0!==e))}function l(e,t){const{disable:n,labelExpr:o,selections:s,...l}=e.combine();if(!n){if(!1===t.aria&&null==l.aria&&(l.aria=!1),l.encode?.symbols){const e=l.encode.symbols.update;!e.fill||"transparent"===e.fill.value||e.stroke||l.stroke||(e.stroke={value:"transparent"});for(const t of r.LEGEND_SCALE_CHANNELS)l[t]&&delete e[t]}if(l.title||delete l.title,void 0!==o){let e=o;l.encode?.labels?.update&&(0,a.isSignalRef)(l.encode.labels.update.text)&&(e=(0,i.replaceAll)(o,"datum.label",l.encode.labels.update.text.signal)),function(e,t,n,r){var i,a;e.encode??(e.encode={}),(i=e.encode)[t]??(i[t]={}),(a=e.encode[t]).update??(a.update={}),e.encode[t].update[n]=r}(l,"labels","text",{signal:e})}return l}}},46602:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LEGEND_COMPONENT_PROPERTIES:()=>s,LegendComponent:()=>l});var r=n(54116),i=n(79989),a=n(96159);const o={...r.COMMON_LEGEND_PROPERTY_INDEX,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},s=(0,i.keys)(o);class l extends a.Split{}},33375:(e,t,n)=>{"use strict";n.r(t),n.d(t,{entries:()=>m,getFirstConditionValue:()=>v,gradient:()=>h,labels:()=>g,legendEncodeRules:()=>f,symbols:()=>p});var r=n(26372),i=n(95290),a=n(79543),o=n(75028),s=n(79989),l=n(15058),u=n(6032),c=n(55792),d=n(93794);const f={symbols:p,gradient:h,labels:g,entries:m};function p(e,{fieldOrDatumDef:t,model:n,channel:u,legendCmpt:d,legendType:f}){if("symbol"!==f)return;const{markDef:p,encoding:h,config:g,mark:m}=n,b=p.filled&&"trail"!==m;let E={...(0,l.applyMarkConfig)({},n,o.FILL_STROKE_CONFIG),...c.color(n,{filled:b})};const S=d.get("symbolOpacity")??g.legend.symbolOpacity,w=d.get("symbolFillColor")??g.legend.symbolFillColor,_=d.get("symbolStrokeColor")??g.legend.symbolStrokeColor,A=void 0===S?y(h.opacity)??p.opacity:void 0;if(E.fill)if("fill"===u||b&&u===i.COLOR)delete E.fill;else if((0,s.hasProperty)(E.fill,"field"))w?delete E.fill:(E.fill=(0,l.signalOrValueRef)(g.legend.symbolBaseFillColor??"black"),E.fillOpacity=(0,l.signalOrValueRef)(A??1));else if((0,r.isArray)(E.fill)){const e=v(h.fill??h.color)??p.fill??(b&&p.color);e&&(E.fill=(0,l.signalOrValueRef)(e))}if(E.stroke)if("stroke"===u||!b&&u===i.COLOR)delete E.stroke;else if((0,s.hasProperty)(E.stroke,"field")||_)delete E.stroke;else if((0,r.isArray)(E.stroke)){const e=(0,s.getFirstDefined)(v(h.stroke||h.color),p.stroke,b?p.color:void 0);e&&(E.stroke={value:e})}if(u!==i.OPACITY){const e=(0,a.isFieldDef)(t)&&x(n,d,t);e?E.opacity=[{test:e,...(0,l.signalOrValueRef)(A??1)},(0,l.signalOrValueRef)(g.legend.unselectedOpacity)]:A&&(E.opacity=(0,l.signalOrValueRef)(A))}return E={...E,...e},(0,s.isEmpty)(E)?void 0:E}function h(e,{model:t,legendType:n,legendCmpt:r}){if("gradient"!==n)return;const{config:i,markDef:a,encoding:o}=t;let u={};const c=void 0===(r.get("gradientOpacity")??i.legend.gradientOpacity)?y(o.opacity)||a.opacity:void 0;return c&&(u.opacity=(0,l.signalOrValueRef)(c)),u={...u,...e},(0,s.isEmpty)(u)?void 0:u}function g(e,{fieldOrDatumDef:t,model:n,channel:r,legendCmpt:i}){const o=n.legend(r)||{},l=n.config,c=(0,a.isFieldDef)(t)?x(n,i,t):void 0,d=c?[{test:c,value:1},{value:l.legend.unselectedOpacity}]:void 0,{format:f,formatType:p}=o;let h;(0,u.isCustomFormatType)(p)?h=(0,u.formatCustomType)({fieldOrDatumDef:t,field:"datum.value",format:f,formatType:p,config:l}):void 0===f&&void 0===p&&l.customFormatTypes&&("quantitative"===t.type&&l.numberFormatType?h=(0,u.formatCustomType)({fieldOrDatumDef:t,field:"datum.value",format:l.numberFormat,formatType:l.numberFormatType,config:l}):"temporal"===t.type&&l.timeFormatType&&(0,a.isFieldDef)(t)&&void 0===t.timeUnit&&(h=(0,u.formatCustomType)({fieldOrDatumDef:t,field:"datum.value",format:l.timeFormat,formatType:l.timeFormatType,config:l})));const g={...d?{opacity:d}:{},...h?{text:h}:{},...e};return(0,s.isEmpty)(g)?void 0:g}function m(e,{legendCmpt:t}){const n=t.get("selections");return n?.length?{...e,fill:{value:"transparent"}}:e}function y(e){return b(e,((e,t)=>Math.max(e,t.value)))}function v(e){return b(e,((e,t)=>(0,s.getFirstDefined)(e,t.value)))}function b(e,t){return(0,a.hasConditionalValueDef)(e)?(0,r.array)(e.condition).reduce(t,e.value):(0,a.isValueDef)(e)?e.value:void 0}function x(e,t,n){const i=t.get("selections");if(!i?.length)return;const a=(0,r.stringValue)(n.field);return i.map((e=>`(!length(data(${(0,r.stringValue)((0,s.varName)(e)+d.STORE)})) || (${e}[${a}] && indexof(${e}[${a}], datum.value) >= 0))`)).join(" || ")}},16182:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mergeLegendComponent:()=>E,parseLegend:()=>v,parseLegendForChannel:()=>x});var r=n(95290),i=n(79543),a=n(54116),o=n(96598),s=n(99273),l=n(79989),u=n(15058),c=n(16039),d=n(7302),f=n(91387),p=n(46608),h=n(96159),g=n(46602),m=n(33375),y=n(55516);function v(e){const t=(0,d.isUnitModel)(e)?function(e){const{encoding:t}=e,n={};for(const o of[r.COLOR,...a.LEGEND_SCALE_CHANNELS]){const a=(0,i.getFieldOrDatumDef)(t[o]);a&&e.getScaleComponent(o)&&(o===r.SHAPE&&(0,i.isFieldDef)(a)&&a.type===s.GEOJSON||(n[o]=x(e,o)))}return n}(e):function(e){const{legends:t,resolve:n}=e.component;for(const r of e.children){v(r);for(const i of(0,l.keys)(r.component.legends))n.legend[i]=(0,f.parseGuideResolve)(e.component.resolve,i),"shared"===n.legend[i]&&(t[i]=E(t[i],r.component.legends[i]),t[i]||(n.legend[i]="independent",delete t[i]))}for(const r of(0,l.keys)(t))for(const t of e.children)t.component.legends[r]&&"shared"===n.legend[r]&&delete t.component.legends[r];return t}(e);return e.component.legends=t,t}function b(e,t,n,r){switch(t){case"disable":return void 0!==n;case"values":return!!n?.values;case"title":if("title"===t&&e===r?.title)return!0}return e===(n||{})[t]}function x(e,t){let n=e.legend(t);const{markDef:r,encoding:a,config:s}=e,u=s.legend,d=new g.LegendComponent({},function(e,t){const n=e.scaleName(t);if("trail"===e.mark){if("color"===t)return{stroke:n};if("size"===t)return{strokeWidth:n}}return"color"===t?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}(e,t));(0,p.parseInteractiveLegend)(e,t,d);const f=void 0!==n?!n:u.disable;if(d.set("disable",f,void 0!==n),f)return d;n=n||{};const h=e.getScaleComponent(t).get("type"),v=(0,i.getFieldOrDatumDef)(a[t]),x=(0,i.isFieldDef)(v)?(0,o.normalizeTimeUnit)(v.timeUnit)?.unit:void 0,E=n.orient||s.legend.orient||"right",S=(0,y.getLegendType)({legend:n,channel:t,timeUnit:x,scaleType:h}),w={legend:n,channel:t,model:e,markDef:r,encoding:a,fieldOrDatumDef:v,legendConfig:u,config:s,scaleType:h,orient:E,legendType:S,direction:(0,y.getDirection)({legend:n,legendType:S,orient:E,legendConfig:u})};for(const r of g.LEGEND_COMPONENT_PROPERTIES){if("gradient"===S&&r.startsWith("symbol")||"symbol"===S&&r.startsWith("gradient"))continue;const i=r in y.legendRules?y.legendRules[r](w):n[r];if(void 0!==i){const a=b(i,r,n,e.fieldDef(t));(a||void 0===s.legend[r])&&d.set(r,i,a)}}const _=n?.encoding??{},A=d.get("selections"),C={},T={fieldOrDatumDef:v,model:e,channel:t,legendCmpt:d,legendType:S};for(const t of["labels","legend","title","symbols","gradient","entries"]){const n=(0,c.guideEncodeEntry)(_[t]??{},e),r=t in m.legendEncodeRules?m.legendEncodeRules[t](n,T):n;void 0===r||(0,l.isEmpty)(r)||(C[t]={...A?.length&&(0,i.isFieldDef)(v)?{name:`${(0,l.varName)(v.field)}_legend_${t}`}:{},...A?.length?{interactive:!!A}:{},update:r})}return(0,l.isEmpty)(C)||d.set("encode",C,!!n?.encoding),d}function E(e,t){if(!e)return t.clone();const n=e.getWithExplicit("orient"),r=t.getWithExplicit("orient");if(n.explicit&&r.explicit&&n.value!==r.value)return;let i=!1;for(const n of g.LEGEND_COMPONENT_PROPERTIES){const r=(0,h.mergeValuesWithExplicit)(e.getWithExplicit(n),t.getWithExplicit(n),n,"legend",((e,t)=>{switch(n){case"symbolType":return S(e,t);case"title":return(0,u.mergeTitleComponent)(e,t);case"type":return i=!0,(0,h.makeImplicit)("symbol")}return(0,h.defaultTieBreaker)(e,t,n,"legend")}));e.setWithExplicit(n,r)}return i&&(e.implicit?.encode?.gradient&&(0,l.deleteNestedProperty)(e.implicit,["encode","gradient"]),e.explicit?.encode?.gradient&&(0,l.deleteNestedProperty)(e.explicit,["encode","gradient"])),e}function S(e,t){return"circle"===t.value?t:e}},55516:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clipHeight:()=>h,defaultDirection:()=>v,defaultGradientLength:()=>b,defaultLabelOverlap:()=>E,defaultSymbolType:()=>p,defaultType:()=>m,getDirection:()=>y,getLegendType:()=>g,legendRules:()=>d,values:()=>f});var r=n(26372),i=n(95290),a=n(79543),o=n(31179),s=n(79989),l=n(5711),u=n(6032),c=n(33375);const d={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:r,formatType:i}=t;return(0,u.guideFormat)(e,e.type,r,i,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:r}=e;return(0,u.guideFormatType)(r,t,n)},gradientLength:e=>{const{legend:t,legendConfig:n}=e;return t.gradientLength??n.gradientLength??b(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>e.labelOverlap??t.labelOverlap??E(n),symbolType:({legend:e,markDef:t,channel:n,encoding:r})=>e.symbolType??p(t.type,n,r.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>(0,a.title)(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if((0,i.isColorChannel)(n)&&(0,o.isContinuousToContinuous)(t)){if("gradient"===e)return}else if("symbol"===e)return;return e},values:({fieldOrDatumDef:e,legend:t})=>f(t,e)};function f(e,t){const n=e.values;return(0,r.isArray)(n)?(0,a.valueArray)(t,n):(0,l.isSignalRef)(n)?n:void 0}function p(e,t,n,r){if("shape"!==t){const e=(0,c.getFirstConditionValue)(n)??r;if(e)return e}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function h(e){if("gradient"===e)return 20}function g(e){const{legend:t}=e;return(0,s.getFirstDefined)(t.type,m(e))}function m({channel:e,timeUnit:t,scaleType:n}){if((0,i.isColorChannel)(e)){if((0,s.contains)(["quarter","month","day"],t))return"symbol";if((0,o.isContinuousToContinuous)(n))return"gradient"}return"symbol"}function y({legendConfig:e,legendType:t,orient:n,legend:r}){return r.direction??e[t?"gradientDirection":"symbolDirection"]??v(n,t)}function v(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}function b({legendConfig:e,model:t,direction:n,orient:r,scaleType:i}){const{gradientHorizontalMaxLength:a,gradientHorizontalMinLength:s,gradientVerticalMaxLength:l,gradientVerticalMinLength:u}=e;if((0,o.isContinuousToContinuous)(i))return"horizontal"===n?"top"===r||"bottom"===r?x(t,"width",s,a):s:x(t,"height",u,l)}function x(e,t,n,r){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${r})`}}function E(e){if((0,s.contains)(["quantile","threshold","log","symlog"],e))return"greedy"}},56017:(e,t,n)=>{"use strict";n.r(t),n.d(t,{arc:()=>i});var r=n(55792);const i={vgMark:"arc",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...r.pointPosition("x",e,{defaultPos:"mid"}),...r.pointPosition("y",e,{defaultPos:"mid"}),...r.rectPosition(e,"radius"),...r.rectPosition(e,"theta")})}},26052:(e,t,n)=>{"use strict";n.r(t),n.d(t,{area:()=>i});var r=n(55792);const i={vgMark:"area",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...r.pointOrRangePosition("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient}),...r.pointOrRangePosition("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient}),...r.defined(e)})}},47880:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bar:()=>i});var r=n(55792);const i={vgMark:"rect",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...r.rectPosition(e,"x"),...r.rectPosition(e,"y")})}},57543:(e,t,n)=>{"use strict";n.r(t),n.d(t,{aria:()=>c,description:()=>f});var r=n(26372),i=n(79989),a=n(15058),o=n(5711),s=n(49144),l=n(22449),u=n(14607);function c(e){const{markDef:t,config:n}=e,r=(0,a.getMarkPropOrConfig)("aria",t,n);return!1===r?{}:{...r?{aria:r}:{},...d(e),...f(e)}}function d(e){const{mark:t,markDef:n,config:i}=e;if(!1===i.aria)return{};const s=(0,a.getMarkPropOrConfig)("ariaRoleDescription",n,i);return null!=s?{ariaRoleDescription:{value:s}}:(0,r.hasOwnProperty)(o.VG_MARK_INDEX,t)?{}:{ariaRoleDescription:{value:t}}}function f(e){const{encoding:t,markDef:n,config:r,stack:o}=e,c=t.description;if(c)return(0,s.wrapCondition)({model:e,channelDef:c,vgChannel:"description",mainRefFn:t=>(0,l.textRef)(t,e.config),invalidValueRef:void 0});const d=(0,a.getMarkPropOrConfig)("description",n,r);if(null!=d)return{description:(0,a.signalOrValueRef)(d)};if(!1===r.aria)return{};const f=(0,u.tooltipData)(t,o,r);return(0,i.isEmpty)(f)?void 0:{description:{signal:(0,i.entries)(f).map((([e,t],n)=>`"${n>0?"; ":""}${e}: " + (${t})`)).join(" + ")}}}},96975:(e,t,n)=>{"use strict";n.r(t),n.d(t,{baseEncodeEntry:()=>m,color:()=>s.color,nonPosition:()=>l.nonPosition,pointOrRangePosition:()=>p.pointOrRangePosition,pointPosition:()=>f.pointPosition,rangePosition:()=>p.rangePosition,rectPosition:()=>h.rectPosition,text:()=>u.text,tooltip:()=>c.tooltip});var r=n(79989),i=n(5711),a=n(15058),o=n(57543),s=n(62663),l=n(34796),u=n(22449),c=n(14607),d=n(27536),f=n(47274),p=n(80261),h=n(24900);const g=new Set(["aria","width","height"]);function m(e,t){const{fill:n,stroke:r}="include"===t.color?(0,s.color)(e):{};return{...v(e.markDef,t),...y("fill",n),...y("stroke",r),...(0,l.nonPosition)("opacity",e),...(0,l.nonPosition)("fillOpacity",e),...(0,l.nonPosition)("strokeOpacity",e),...(0,l.nonPosition)("strokeWidth",e),...(0,l.nonPosition)("strokeDash",e),...(0,d.zindex)(e),...(0,c.tooltip)(e),...(0,u.text)(e,"href"),...(0,o.aria)(e)}}function y(e,t){return t?{[e]:t}:{}}function v(e,t){return i.VG_MARK_CONFIGS.reduce(((n,i)=>(!g.has(i)&&(0,r.hasProperty)(e,i)&&"ignore"!==t[i]&&(n[i]=(0,a.signalOrValueRef)(e[i])),n)),{})}},62663:(e,t,n)=>{"use strict";n.r(t),n.d(t,{color:()=>s});var r=n(20916),i=n(79989),a=n(15058),o=n(34796);function s(e,t={filled:void 0}){const{markDef:n,encoding:s,config:l}=e,{type:u}=n,c=t.filled??(0,a.getMarkPropOrConfig)("filled",n,l),d=(0,i.contains)(["bar","point","circle","square","geoshape"],u)?"transparent":void 0,f=(0,a.getMarkPropOrConfig)(!0===c?"color":void 0,n,l,{vgChannel:"fill"})??l.mark[!0===c&&"color"]??d,p=(0,a.getMarkPropOrConfig)(!1===c?"color":void 0,n,l,{vgChannel:"stroke"})??l.mark[!1===c&&"color"],h=c?"fill":"stroke",g={...f?{fill:(0,a.signalOrValueRef)(f)}:{},...p?{stroke:(0,a.signalOrValueRef)(p)}:{}};return n.color&&(c?n.fill:n.stroke)&&r.warn(r.message.droppingColor("property",{fill:"fill"in n,stroke:"stroke"in n})),{...g,...(0,o.nonPosition)("color",e,{vgChannel:h,defaultValue:c?f:p}),...(0,o.nonPosition)("fill",e,{defaultValue:s.fill?f:void 0}),...(0,o.nonPosition)("stroke",e,{defaultValue:s.stroke?p:void 0})}}},49144:(e,t,n)=>{"use strict";n.r(t),n.d(t,{wrapCondition:()=>s});var r=n(26372),i=n(79543),a=n(95370),o=n(83937);function s({model:e,channelDef:t,vgChannel:n,invalidValueRef:s,mainRefFn:l}){const u=(0,i.isConditionalDef)(t)&&t.condition;let c=[];if(u){c=(0,r.array)(u).map((t=>{const n=l(t);if((0,i.isConditionalParameter)(t)){const{param:r,empty:i}=t;return{test:(0,o.parseSelectionPredicate)(e,{param:r,empty:i}),...n}}return{test:(0,a.expression)(e,t.test),...n}}))}void 0!==s&&c.push(s);const d=l(t);return void 0!==d&&c.push(d),c.length>1||1===c.length&&Boolean(c[0].test)?{[n]:c}:1===c.length?{[n]:c[0]}:{}}},13853:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defined:()=>l,valueIfDefined:()=>u});var r=n(54814),i=n(95290),a=n(4976),o=n(15058),s=n(59845);function l(e){const{config:t,markDef:n}=e,o=new Set;if(e.forEachFieldDef(((a,l)=>{let u;if(!(0,i.isScaleChannel)(l)||!(u=e.getScaleType(l)))return;const c=(0,r.isCountingAggregateOp)(a.aggregate),d=(0,s.getScaleInvalidDataMode)({scaleChannel:l,markDef:n,config:t,scaleType:u,isCountAggregate:c});if((0,s.shouldBreakPath)(d)){const t=e.vgField(l,{expr:"datum",binSuffix:e.stack?.impute?"mid":void 0});t&&o.add(t)}})),o.size>0){return{defined:{signal:[...o].map((e=>(0,a.fieldValidPredicate)(e,!0))).join(" && ")}}}}function u(e,t){if(void 0!==t)return{[e]:(0,o.signalOrValueRef)(t)}}},55792:(e,t,n)=>{"use strict";n.r(t),n.d(t,{aria:()=>r.aria,baseEncodeEntry:()=>i.baseEncodeEntry,color:()=>a.color,defined:()=>o.defined,nonPosition:()=>s.nonPosition,pointOrRangePosition:()=>u.pointOrRangePosition,pointPosition:()=>l.pointPosition,rangePosition:()=>u.rangePosition,rectPosition:()=>c.rectPosition,text:()=>d.text,tooltip:()=>f.tooltip,tooltipRefForEncoding:()=>f.tooltipRefForEncoding,valueIfDefined:()=>o.valueIfDefined});var r=n(57543),i=n(96975),a=n(62663),o=n(13853),s=n(34796),l=n(47274),u=n(80261),c=n(24900),d=n(22449),f=n(14607)},91463:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getConditionalValueRefForIncludingInvalidValue:()=>c});var r=n(54814),i=n(79543),a=n(68278),o=n(4976),s=n(5711),l=n(59845),u=n(71390);function c({scaleChannel:e,channelDef:t,scale:n,scaleName:a,markDef:s,config:u}){const c=n?.get("type"),f=(0,i.getFieldDef)(t),p=(0,r.isCountingAggregateOp)(f?.aggregate),h=(0,l.getScaleInvalidDataMode)({scaleChannel:e,markDef:s,config:u,scaleType:c,isCountAggregate:p});if(f&&"show"===h){const t=u.scale.invalid?.[e]??"zero-or-min";return{test:(0,o.fieldValidPredicate)((0,i.vgField)(f,{expr:"datum"}),!1),...d(t,n,a)}}}function d(e,t,n){if((0,a.isScaleInvalidDataIncludeAsValue)(e)){const{value:t}=e;return(0,s.isSignalRef)(t)?{signal:t.signal}:{value:t}}return(0,u.scaledZeroOrMinOrMax)({scale:t,scaleName:n,mode:"zeroOrMin"})}},34796:(e,t,n)=>{"use strict";n.r(t),n.d(t,{nonPosition:()=>l});var r=n(79543),i=n(15058),a=n(49144),o=n(42104),s=n(91463);function l(e,t,n={}){const{markDef:l,encoding:u,config:c}=t,{vgChannel:d}=n;let{defaultRef:f,defaultValue:p}=n;const h=u[e];void 0===f&&(p??(p=(0,i.getMarkPropOrConfig)(e,l,c,{vgChannel:d,ignoreVgConfig:!(0,r.isConditionalDef)(h)})),void 0!==p&&(f=(0,i.signalOrValueRef)(p)));const g={markDef:l,config:c,scaleName:t.scaleName(e),scale:t.getScaleComponent(e)},m=(0,s.getConditionalValueRefForIncludingInvalidValue)({...g,scaleChannel:e,channelDef:h});return(0,a.wrapCondition)({model:t,channelDef:h,vgChannel:d??e,invalidValueRef:m,mainRefFn:t=>o.midPoint({...g,channel:e,channelDef:t,stack:null,defaultRef:f})})}},43301:(e,t,n)=>{"use strict";n.r(t),n.d(t,{positionOffset:()=>a});var r=n(15058),i=n(42104);function a({channel:e,markDef:t,encoding:n={},model:a,bandPosition:o}){const s=`${e}Offset`,l=t[s],u=n[s];if(("xOffset"===s||"yOffset"===s)&&u){return{offsetType:"encoding",offset:(0,i.midPoint)({channel:s,channelDef:u,markDef:t,config:a?.config,scaleName:a.scaleName(s),scale:a.getScaleComponent(s),stack:null,defaultRef:(0,r.signalOrValueRef)(l),bandPosition:o})}}const c=t[s];return c?{offsetType:"visual",offset:c}:{}}},9513:(e,t,n)=>{"use strict";n.r(t),n.d(t,{vgAlignedPositionChannel:()=>u});var r=n(95290),i=n(20916),a=n(5711),o=n(15058);const s={left:"x",center:"xc",right:"x2"},l={top:"y",middle:"yc",bottom:"y2"};function u(e,t,n,u="middle"){if("radius"===e||"theta"===e)return(0,r.getVgPositionChannel)(e);const c="x"===e?"align":"baseline",d=(0,o.getMarkPropOrConfig)(c,t,n);let f;return(0,a.isSignalRef)(d)?(i.warn(i.message.rangeMarkAlignmentCannotBeExpression(c)),f=void 0):f=d,"x"===e?s[f||("top"===u?"left":"center")]:l[f||u]}},47274:(e,t,n)=>{"use strict";n.r(t),n.d(t,{pointPosition:()=>u,pointPositionDefaultRef:()=>d,positionRef:()=>c});var r=n(95290),i=n(79543),a=n(15058),o=n(43301),s=n(42104),l=n(71390);function u(e,t,{defaultPos:n,vgChannel:i}){const{encoding:a,markDef:s,config:l,stack:u}=t,f=a[e],p=a[(0,r.getSecondaryRangeChannel)(e)],h=t.scaleName(e),g=t.getScaleComponent(e),{offset:m,offsetType:y}=(0,o.positionOffset)({channel:e,markDef:s,encoding:a,model:t,bandPosition:.5}),v=d({model:t,defaultPos:n,channel:e,scaleName:h,scale:g}),b=!f&&(0,r.isXorY)(e)&&(a.latitude||a.longitude)?{field:t.getName(e)}:c({channel:e,channelDef:f,channel2Def:p,markDef:s,config:l,scaleName:h,scale:g,stack:u,offset:m,defaultRef:v,bandPosition:"encoding"===y?0:void 0});return b?{[i||e]:b}:void 0}function c(e){const{channel:t,channelDef:n,scaleName:r,stack:a,offset:o,markDef:l}=e;if((0,i.isFieldOrDatumDef)(n)&&a&&t===a.fieldChannel){if((0,i.isFieldDef)(n)){let e=n.bandPosition;if(void 0!==e||"text"!==l.type||"radius"!==t&&"theta"!==t||(e=.5),void 0!==e)return s.interpolatedSignalRef({scaleName:r,fieldOrDatumDef:n,startSuffix:"start",bandPosition:e,offset:o})}return s.valueRefForFieldOrDatumDef(n,r,{suffix:"end"},{offset:o})}return s.midPointRefWithPositionInvalidTest(e)}function d({model:e,defaultPos:t,channel:n,scaleName:i,scale:o}){const{markDef:l,config:u}=e;return()=>{const c=(0,r.getMainRangeChannel)(n),d=(0,r.getVgPositionChannel)(n),p=(0,a.getMarkPropOrConfig)(n,l,u,{vgChannel:d});if(void 0!==p)return s.widthHeightValueOrSignalRef(n,p);switch(t){case"zeroOrMin":return f({scaleName:i,scale:o,mode:"zeroOrMin",mainChannel:c,config:u});case"zeroOrMax":return f({scaleName:i,scale:o,mode:{zeroOrMax:{widthSignal:e.width.signal,heightSignal:e.height.signal}},mainChannel:c,config:u});case"mid":return{...e[(0,r.getSizeChannel)(n)],mult:.5}}}}function f({mainChannel:e,config:t,...n}){const r=(0,l.scaledZeroOrMinOrMax)(n),{mode:i}=n;if(r)return r;switch(e){case"radius":{if("zeroOrMin"===i)return{value:0};const{widthSignal:e,heightSignal:t}=i.zeroOrMax;return{signal:`min(${e},${t})/2`}}case"theta":return"zeroOrMin"===i?{value:0}:{signal:"2*PI"};case"x":return"zeroOrMin"===i?{value:0}:{field:{group:"width"}};case"y":return"zeroOrMin"===i?{field:{group:"height"}}:{value:0}}}},80261:(e,t,n)=>{"use strict";n.r(t),n.d(t,{pointOrRangePosition:()=>f,position2Ref:()=>h,rangePosition:()=>p});var r=n(95290),i=n(79543),a=n(20916),o=n(75028),s=n(15058),l=n(43301),u=n(9513),c=n(47274),d=n(42104);function f(e,t,{defaultPos:n,defaultPos2:r,range:i}){return i?p(e,t,{defaultPos:n,defaultPos2:r}):(0,c.pointPosition)(e,t,{defaultPos:n})}function p(e,t,{defaultPos:n,defaultPos2:i}){const{markDef:a,config:o}=t,d=(0,r.getSecondaryRangeChannel)(e),f=(0,r.getSizeChannel)(e),p=function(e,t,n){const{encoding:i,mark:a,markDef:o,stack:u,config:d}=e,f=(0,r.getMainRangeChannel)(n),p=(0,r.getSizeChannel)(n),m=(0,r.getVgPositionChannel)(n),y=i[f],v=e.scaleName(f),b=e.getScaleComponent(f),{offset:x}=n in i||n in o?(0,l.positionOffset)({channel:n,markDef:o,encoding:i,model:e}):(0,l.positionOffset)({channel:f,markDef:o,encoding:i,model:e});if(!y&&("x2"===n||"y2"===n)&&(i.latitude||i.longitude)){const t=(0,r.getSizeChannel)(n),i=e.markDef[t];return null!=i?{[t]:{value:i}}:{[m]:{field:e.getName(n)}}}const E=h({channel:n,channelDef:y,channel2Def:i[n],markDef:o,config:d,scaleName:v,scale:b,stack:u,offset:x,defaultRef:void 0});if(void 0!==E)return{[m]:E};return g(n,o)||g(n,{[n]:(0,s.getMarkStyleConfig)(n,o,d.style),[p]:(0,s.getMarkStyleConfig)(p,o,d.style)})||g(n,d[a])||g(n,d.mark)||{[m]:(0,c.pointPositionDefaultRef)({model:e,defaultPos:t,channel:n,scaleName:v,scale:b})()}}(t,i,d),m=p[f]?(0,u.vgAlignedPositionChannel)(e,a,o):(0,r.getVgPositionChannel)(e);return{...(0,c.pointPosition)(e,t,{defaultPos:n,vgChannel:m}),...p}}function h({channel:e,channelDef:t,channel2Def:n,markDef:r,config:a,scaleName:o,scale:s,stack:l,offset:u,defaultRef:c}){return(0,i.isFieldOrDatumDef)(t)&&l&&e.charAt(0)===l.fieldChannel.charAt(0)?d.valueRefForFieldOrDatumDef(t,o,{suffix:"start"},{offset:u}):d.midPointRefWithPositionInvalidTest({channel:e,channelDef:n,scaleName:o,scale:s,stack:l,markDef:r,config:a,offset:u,defaultRef:c})}function g(e,t){const n=(0,r.getSizeChannel)(e),i=(0,r.getVgPositionChannel)(e);if(void 0!==t[i])return{[i]:d.widthHeightValueOrSignalRef(e,t[i])};if(void 0!==t[e])return{[i]:d.widthHeightValueOrSignalRef(e,t[e])};if(t[n]){const r=t[n];if(!(0,o.isRelativeBandSize)(r))return{[n]:d.widthHeightValueOrSignalRef(e,r)};a.warn(a.message.relativeBandSizeNotSupported(n))}}},24900:(e,t,n)=>{"use strict";n.r(t),n.d(t,{rectPosition:()=>E});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(24007),l=n(20916),u=n(75028),c=n(31179),d=n(5711),f=n(15058),p=n(34796),h=n(43301),g=n(9513),m=n(47274),y=n(80261),v=n(42104),b=n(79989),x=n(62277);function E(e,t){const{config:n,encoding:s,markDef:b}=e,x=b.type,E=(0,a.getSecondaryRangeChannel)(t),A=(0,a.getSizeChannel)(t),C=s[t],T=s[E],k=e.getScaleComponent(t),R=k?k.get("type"):void 0,D=b.orient,N=s[A]??s.size??(0,f.getMarkPropOrConfig)("size",b,n,{vgChannel:A}),O=(0,a.getOffsetChannel)(t),F="bar"===x&&("x"===t?"vertical"===D:"horizontal"===D)||"tick"===x&&("y"===t?"vertical"===D:"horizontal"===D);return!(0,o.isFieldDef)(C)||!((0,i.isBinning)(C.bin)||(0,i.isBinned)(C.bin)||C.timeUnit&&!T)||N&&!(0,u.isRelativeBandSize)(N)||s[O]||(0,c.hasDiscreteDomain)(R)?((0,o.isFieldOrDatumDef)(C)&&(0,c.hasDiscreteDomain)(R)||F)&&!T?function(e,t,n){const{markDef:i,encoding:s,config:c,stack:y}=n,b=i.orient,x=n.scaleName(t),E=n.getScaleComponent(t),w=(0,a.getSizeChannel)(t),_=(0,a.getSecondaryRangeChannel)(t),A=(0,a.getOffsetChannel)(t),C=n.scaleName(A),T=n.getScaleComponent((0,a.getOffsetScaleChannel)(t)),k="tick"===i.type||"horizontal"===b&&"y"===t||"vertical"===b&&"x"===t;let R;(s.size||i.size)&&(k?R=(0,p.nonPosition)("size",n,{vgChannel:w,defaultRef:(0,f.signalOrValueRef)(i.size)}):l.warn(l.message.cannotApplySizeToNonOrientedMark(i.type)));const D=!!R,N=(0,o.getBandSize)({channel:t,fieldDef:e,markDef:i,config:c,scaleType:(E||T)?.get("type"),useVlSizeChannel:k});R=R||{[w]:S(w,C||x,T||E,c,N,!!e,i.type)};const O="band"===(E||T)?.get("type")&&(0,u.isRelativeBandSize)(N)&&!D?"top":"middle",F=(0,g.vgAlignedPositionChannel)(t,i,c,O),P="xc"===F||"yc"===F,{offset:M,offsetType:I}=(0,h.positionOffset)({channel:t,markDef:i,encoding:s,model:n,bandPosition:P?.5:0}),$=v.midPointRefWithPositionInvalidTest({channel:t,channelDef:e,markDef:i,config:c,scaleName:x,scale:E,stack:y,offset:M,defaultRef:(0,m.pointPositionDefaultRef)({model:n,defaultPos:"mid",channel:t,scaleName:x,scale:E}),bandPosition:P?"encoding"===I?0:.5:(0,d.isSignalRef)(N)?{signal:`(1-${N})/2`}:(0,u.isRelativeBandSize)(N)?(1-N.band)/2:0});if(w)return{[F]:$,...R};{const e=(0,a.getVgPositionChannel)(_),t=R[w],n=M?{...t,offset:M}:t;return{[F]:$,[e]:(0,r.isArray)($)?[$[0],{...$[1],offset:n}]:{...$,offset:n}}}}(C,t,e):(0,y.rangePosition)(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"}):function({fieldDef:e,fieldDef2:t,channel:n,model:r}){const{config:s,markDef:c,encoding:p}=r,g=r.getScaleComponent(n),m=r.scaleName(n),y=g?g.get("type"):void 0,b=g.get("reverse"),x=(0,o.getBandSize)({channel:n,fieldDef:e,markDef:c,config:s,scaleType:y}),E=r.component.axes[n]?.[0],S=E?.get("translate")??.5,A=(0,a.isXorY)(n)?(0,f.getMarkPropOrConfig)("binSpacing",c,s)??0:0,C=(0,a.getSecondaryRangeChannel)(n),T=(0,a.getVgPositionChannel)(n),k=(0,a.getVgPositionChannel)(C),R=(0,f.getMarkConfig)("minBandSize",c,s),{offset:D}=(0,h.positionOffset)({channel:n,markDef:c,encoding:p,model:r,bandPosition:0}),{offset:N}=(0,h.positionOffset)({channel:C,markDef:c,encoding:p,model:r,bandPosition:0}),O=v.binSizeExpr({fieldDef:e,scaleName:m}),F=w(n,A,b,S,D,R,O),P=w(C,A,b,S,N??D,R,O),M=(0,d.isSignalRef)(x)?{signal:`(1-${x.signal})/2`}:(0,u.isRelativeBandSize)(x)?(1-x.band)/2:.5,I=(0,o.getBandPosition)({fieldDef:e,fieldDef2:t,markDef:c,config:s});if((0,i.isBinning)(e.bin)||e.timeUnit){const t=e.timeUnit&&.5!==I;return{[k]:_({fieldDef:e,scaleName:m,bandPosition:M,offset:P,useRectOffsetField:t}),[T]:_({fieldDef:e,scaleName:m,bandPosition:(0,d.isSignalRef)(M)?{signal:`1-${M.signal}`}:1-M,offset:F,useRectOffsetField:t})}}if((0,i.isBinned)(e.bin)){const n=v.valueRefForFieldOrDatumDef(e,m,{},{offset:P});if((0,o.isFieldDef)(t))return{[k]:n,[T]:v.valueRefForFieldOrDatumDef(t,m,{},{offset:F})};if((0,i.isBinParams)(e.bin)&&e.bin.step)return{[k]:n,[T]:{signal:`scale("${m}", ${(0,o.vgField)(e,{expr:"datum"})} + ${e.bin.step})`,offset:F}}}return void l.warn(l.message.channelRequiredForBinned(C))}({fieldDef:C,fieldDef2:T,channel:t,model:e})}function S(e,t,n,i,a,o,c){if((0,u.isRelativeBandSize)(a)){if(!n)return{mult:a.band,field:{group:e}};{const e=n.get("type");if("band"===e){let e=`bandwidth('${t}')`;1!==a.band&&(e=`${a.band} * ${e}`);const n=(0,f.getMarkConfig)("minBandSize",{type:c},i);return{signal:n?`max(${(0,f.signalOrStringValue)(n)}, ${e})`:e}}1!==a.band&&(l.warn(l.message.cannotUseRelativeBandSizeWithNonBandScale(e)),a=void 0)}}else{if((0,d.isSignalRef)(a))return a;if(a)return{value:a}}if(n){const e=n.get("range");if((0,d.isVgRangeStep)(e)&&(0,r.isNumber)(e.step))return{value:e.step-2}}if(!o){const{bandPaddingInner:t,barBandPaddingInner:n,rectBandPaddingInner:a,tickBandPaddingInner:o}=i.scale,s=(0,b.getFirstDefined)(t,"tick"===c?o:"bar"===c?n:a);if((0,d.isSignalRef)(s))return{signal:`(1 - (${s.signal})) * ${e}`};if((0,r.isNumber)(s))return{signal:`${1-s} * ${e}`}}return{value:(0,s.getViewConfigDiscreteStep)(i.view,e)-2}}function w(e,t,n,r,i,o,s){if((0,a.isPolarPositionChannel)(e))return 0;const l="x"===e||"y2"===e,u=l?-t/2:t/2;if((0,d.isSignalRef)(n)||(0,d.isSignalRef)(i)||(0,d.isSignalRef)(r)||o){const e=(0,f.signalOrStringValue)(n),t=(0,f.signalOrStringValue)(i),a=(0,f.signalOrStringValue)(r),c=(0,f.signalOrStringValue)(o),d=o?`(${s} < ${c} ? ${l?"":"-"}0.5 * (${c} - (${s})) : ${u})`:u;return{signal:(a?`${a} + `:"")+(e?`(${e} ? -1 : 1) * `:"")+(t?`(${t} + ${d})`:d)}}return i=i||0,r+(n?-i-u:+i+u)}function _({fieldDef:e,scaleName:t,bandPosition:n,offset:r,useRectOffsetField:i}){return v.interpolatedSignalRef({scaleName:t,fieldOrDatumDef:e,bandPosition:n,offset:r,...i?{startSuffix:x.OFFSETTED_RECT_START_SUFFIX,endSuffix:x.OFFSETTED_RECT_END_SUFFIX}:{}})}},71390:(e,t,n)=>{"use strict";function r({scaleName:e,scale:t,mode:n}){const r=`domain('${e}')`;if(!t||!e)return;const i=`${r}[0]`,a=`peek(${r})`,o=t.domainHasZero();if("definitely"===o)return{scale:e,value:0};if("maybe"===o){return{signal:`scale('${e}', inrange(0, ${r}) ? 0 : ${"zeroOrMin"===n?i:a})`}}return{signal:`scale('${e}', ${"zeroOrMin"===n?i:a})`}}n.r(t),n.d(t,{scaledZeroOrMinOrMax:()=>r})},22449:(e,t,n)=>{"use strict";n.r(t),n.d(t,{text:()=>s,textRef:()=>l});var r=n(79543),i=n(15058),a=n(6032),o=n(49144);function s(e,t="text"){const n=e.encoding[t];return(0,o.wrapCondition)({model:e,channelDef:n,vgChannel:t,mainRefFn:t=>l(t,e.config),invalidValueRef:void 0})}function l(e,t,n="datum"){if(e){if((0,r.isValueDef)(e))return(0,i.signalOrValueRef)(e.value);if((0,r.isFieldOrDatumDef)(e)){const{format:i,formatType:o}=(0,r.getFormatMixins)(e);return(0,a.formatSignalRef)({fieldOrDatumDef:e,format:i,formatType:o,expr:n,config:t})}}}},14607:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tooltip:()=>h,tooltipData:()=>g,tooltipRefForEncoding:()=>m});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(98348),l=n(79989),u=n(5711),c=n(15058),d=n(6032),f=n(49144),p=n(22449);function h(e,t={}){const{encoding:n,markDef:i,config:a,stack:o}=e,s=n.tooltip;if((0,r.isArray)(s))return{tooltip:m({tooltip:s},o,a,t)};{const l=t.reactiveGeom?"datum.datum":"datum",d=e=>{const s=(0,p.textRef)(e,a,l);if(s)return s;if(null===e)return;let d=(0,c.getMarkPropOrConfig)("tooltip",i,a);return!0===d&&(d={content:"encoding"}),(0,r.isString)(d)?{value:d}:(0,r.isObject)(d)?(0,u.isSignalRef)(d)?d:"encoding"===d.content?m(n,o,a,t):{signal:l}:void 0};return(0,f.wrapCondition)({model:e,channelDef:s,vgChannel:"tooltip",mainRefFn:d,invalidValueRef:void 0})}}function g(e,t,n,{reactiveGeom:l}={}){const u={...n,...n.tooltipFormat},c=new Set,f=l?"datum.datum":"datum",h=[];function g(n,s){const l=(0,a.getMainRangeChannel)(s),g=(0,o.isTypedFieldDef)(n)?n:{...n,type:e[l].type},m=g.title||(0,o.defaultTitle)(g,u),y=(0,r.array)(m).join(", ").replaceAll(/"/g,'\\"');let v;if((0,a.isXorY)(s)){const t="x"===s?"x2":"y2",n=(0,o.getFieldDef)(e[t]);if((0,i.isBinned)(g.bin)&&n){const e=(0,o.vgField)(g,{expr:f}),r=(0,o.vgField)(n,{expr:f}),{format:i,formatType:a}=(0,o.getFormatMixins)(g);v=(0,d.binFormatExpression)(e,r,i,a,u),c.add(t)}}if(((0,a.isXorY)(s)||s===a.THETA||s===a.RADIUS)&&t&&t.fieldChannel===s&&"normalize"===t.offset){const{format:e,formatType:t}=(0,o.getFormatMixins)(g);v=(0,d.formatSignalRef)({fieldOrDatumDef:g,format:e,formatType:t,expr:f,config:u,normalizeStack:!0}).signal}v??(v=(0,p.textRef)(g,u,f).signal),h.push({channel:s,key:y,value:v})}(0,s.forEach)(e,((e,t)=>{(0,o.isFieldDef)(e)?g(e,t):(0,o.hasConditionalFieldDef)(e)&&g(e.condition,t)}));const m={};for(const{channel:e,key:t,value:n}of h)c.has(e)||m[t]||(m[t]=n);return m}function m(e,t,n,{reactiveGeom:r}={}){const i=g(e,t,n,{reactiveGeom:r}),a=(0,l.entries)(i).map((([e,t])=>`"${e}": ${t}`));return a.length>0?{signal:`{${a.join(", ")}}`}:void 0}},42104:(e,t,n)=>{"use strict";n.r(t),n.d(t,{binSizeExpr:()=>x,datumDefToExpr:()=>y,interpolatedSignalRef:()=>b,midPoint:()=>E,midPointRefWithPositionInvalidTest:()=>m,valueRefForFieldOrDatumDef:()=>v,widthHeightValueOrSignalRef:()=>S});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(20032),l=n(3802),u=n(20916),c=n(31179),d=n(99273),f=n(79989),p=n(5711),h=n(15058),g=n(91463);function m(e){const{channel:t,channelDef:n,markDef:r,scale:i,scaleName:o,config:s}=e,l=(0,a.getMainRangeChannel)(t),u=E(e),c=(0,g.getConditionalValueRefForIncludingInvalidValue)({scaleChannel:l,channelDef:n,scale:i,scaleName:o,markDef:r,config:s});return void 0!==c?[c,u]:u}function y(e){const{datum:t}=e;return(0,s.isDateTime)(t)?(0,s.dateTimeToExpr)(t):`${(0,f.stringify)(t)}`}function v(e,t,n,r){const i={};if(t&&(i.scale=t),(0,o.isDatumDef)(e)){const{datum:t}=e;(0,s.isDateTime)(t)?i.signal=(0,s.dateTimeToExpr)(t):(0,p.isSignalRef)(t)?i.signal=t.signal:(0,l.isExprRef)(t)?i.signal=t.expr:i.value=t}else i.field=(0,o.vgField)(e,n);if(r){const{offset:e,band:t}=r;e&&(i.offset=e),t&&(i.band=t)}return i}function b({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:r,startSuffix:i,endSuffix:a="end",bandPosition:s=.5}){const l=!(0,p.isSignalRef)(s)&&0{"use strict";n.r(t),n.d(t,{zindex:()=>s});var r=n(79543),i=n(75028),a=n(15058),o=n(49144);function s(e){const{encoding:t,mark:n}=e,s=t.order;return!(0,i.isPathMark)(n)&&(0,r.isValueDef)(s)?(0,o.wrapCondition)({model:e,channelDef:s,vgChannel:"zindex",mainRefFn:e=>(0,a.signalOrValueRef)(e.value),invalidValueRef:void 0}):{}}},98363:(e,t,n)=>{"use strict";n.r(t),n.d(t,{geoshape:()=>o});var r=n(79543),i=n(99273),a=n(55792);const o={vgMark:"shape",encodeEntry:e=>({...a.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[{type:"geoshape",projection:e.projectionName(),...n&&(0,r.isFieldDef)(n)&&n.type===i.GEOJSON?{field:(0,r.vgField)(n,{expr:"datum"})}:{}}]}}},24812:(e,t,n)=>{"use strict";n.r(t),n.d(t,{image:()=>i});var r=n(55792);const i={vgMark:"image",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...r.rectPosition(e,"x"),...r.rectPosition(e,"y"),...r.text(e,"url")})}},55823:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultFilled:()=>p,initMarkdef:()=>f});var r=n(19664),i=n(79543),a=n(98348),o=n(3802),s=n(20916),l=n(75028),u=n(99273),c=n(79989),d=n(15058);function f(e,t,n){const f=(0,o.replaceExprRef)(e),p=(0,d.getMarkPropOrConfig)("orient",f,n);if(f.orient=function(e,t,n){switch(e){case l.POINT:case l.CIRCLE:case l.SQUARE:case l.TEXT:case l.RECT:case l.IMAGE:return}const{x:a,y:o,x2:s,y2:c}=t;switch(e){case l.BAR:if((0,i.isFieldDef)(a)&&((0,r.isBinned)(a.bin)||(0,i.isFieldDef)(o)&&o.aggregate&&!a.aggregate))return"vertical";if((0,i.isFieldDef)(o)&&((0,r.isBinned)(o.bin)||(0,i.isFieldDef)(a)&&a.aggregate&&!o.aggregate))return"horizontal";if(c||s){if(n)return n;if(!s)return((0,i.isFieldDef)(a)&&a.type===u.QUANTITATIVE&&!(0,r.isBinning)(a.bin)||(0,i.isNumericDataDef)(a))&&(0,i.isFieldDef)(o)&&(0,r.isBinned)(o.bin)?"horizontal":"vertical";if(!c)return((0,i.isFieldDef)(o)&&o.type===u.QUANTITATIVE&&!(0,r.isBinning)(o.bin)||(0,i.isNumericDataDef)(o))&&(0,i.isFieldDef)(a)&&(0,r.isBinned)(a.bin)?"vertical":"horizontal"}case l.RULE:if(s&&(!(0,i.isFieldDef)(a)||!(0,r.isBinned)(a.bin))&&c&&(!(0,i.isFieldDef)(o)||!(0,r.isBinned)(o.bin)))return;case l.AREA:if(c)return(0,i.isFieldDef)(o)&&(0,r.isBinned)(o.bin)?"horizontal":"vertical";if(s)return(0,i.isFieldDef)(a)&&(0,r.isBinned)(a.bin)?"vertical":"horizontal";if(e===l.RULE){if(a&&!o)return"vertical";if(o&&!a)return"horizontal"}case l.LINE:case l.TICK:{const t=(0,i.isUnbinnedQuantitativeFieldOrDatumDef)(a),r=(0,i.isUnbinnedQuantitativeFieldOrDatumDef)(o);if(n)return n;if(t&&!r)return"tick"!==e?"horizontal":"vertical";if(!t&&r)return"tick"!==e?"vertical":"horizontal";if(t&&r)return"vertical";{const e=(0,i.isTypedFieldDef)(a)&&a.type===u.TEMPORAL,t=(0,i.isTypedFieldDef)(o)&&o.type===u.TEMPORAL;if(e&&!t)return"vertical";if(!e&&t)return"horizontal"}return}}return"vertical"}(f.type,t,p),void 0!==p&&p!==f.orient&&s.warn(s.message.orientOverridden(f.orient,p)),"bar"===f.type&&f.orient){const e=(0,d.getMarkPropOrConfig)("cornerRadiusEnd",f,n);if(void 0!==e){const n="horizontal"===f.orient&&t.x2||"vertical"===f.orient&&t.y2?["cornerRadius"]:l.BAR_CORNER_RADIUS_INDEX[f.orient];for(const t of n)f[t]=e;void 0!==f.cornerRadiusEnd&&delete f.cornerRadiusEnd}}const h=(0,d.getMarkPropOrConfig)("opacity",f,n),g=(0,d.getMarkPropOrConfig)("fillOpacity",f,n);void 0===h&&void 0===g&&(f.opacity=function(e,t){if((0,c.contains)([l.POINT,l.TICK,l.CIRCLE,l.SQUARE],e)&&!(0,a.isAggregate)(t))return.7;return}(f.type,t));return void 0===(0,d.getMarkPropOrConfig)("cursor",f,n)&&(f.cursor=function(e,t,n){if(t.href||e.href||(0,d.getMarkPropOrConfig)("href",e,n))return"pointer";return e.cursor}(f,t,n)),f}function p(e,t,{graticule:n}){if(n)return!1;const r=(0,d.getMarkConfig)("filled",e,t),i=e.type;return(0,c.getFirstDefined)(r,i!==l.POINT&&i!==l.LINE&&i!==l.RULE)}},99519:(e,t,n)=>{"use strict";n.r(t),n.d(t,{line:()=>i,trail:()=>a});var r=n(55792);const i={vgMark:"line",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...r.pointPosition("x",e,{defaultPos:"mid"}),...r.pointPosition("y",e,{defaultPos:"mid"}),...r.nonPosition("size",e,{vgChannel:"strokeWidth"}),...r.defined(e)})},a={vgMark:"trail",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...r.pointPosition("x",e,{defaultPos:"mid"}),...r.pointPosition("y",e,{defaultPos:"mid"}),...r.nonPosition("size",e),...r.defined(e)})}},60288:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSort:()=>C,parseMarkGroups:()=>w});var r=n(26372),i=n(79543),a=n(89081),o=n(98348),s=n(75028),l=n(79989),u=n(5711),c=n(15058),d=n(56017),f=n(26052),p=n(47880),h=n(98363),g=n(24812),m=n(99519),y=n(91539),v=n(69895),b=n(95035),x=n(8674),E=n(48116);const S={arc:d.arc,area:f.area,bar:p.bar,circle:y.circle,geoshape:h.geoshape,image:g.image,line:m.line,point:y.point,rect:v.rect,rule:b.rule,square:y.square,text:x.text,tick:E.tick,trail:m.trail};function w(e){if((0,l.contains)([s.LINE,s.AREA,s.TRAIL],e.mark)){const t=(0,o.pathGroupingFields)(e.mark,e.encoding);if(t.length>0)return function(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:_+e.requestDataName(a.DataSourceType.Main),data:e.requestDataName(a.DataSourceType.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:T(e,{fromPrefix:_})}]}(e,t)}else if(e.mark===s.BAR){const t=u.VG_CORNERRADIUS_CHANNELS.some((t=>(0,c.getMarkPropOrConfig)(t,e.markDef,e.config)));if(e.stack&&!e.fieldDef("size")&&t)return function(e){const[t]=T(e,{fromPrefix:A}),n=e.scaleName(e.stack.fieldChannel),r=(t={})=>e.vgField(e.stack.fieldChannel,t),o=(e,t)=>`${e}(${[r({prefix:"min",suffix:"start",expr:t}),r({prefix:"max",suffix:"start",expr:t}),r({prefix:"min",suffix:"end",expr:t}),r({prefix:"max",suffix:"end",expr:t})].map((e=>`scale('${n}',${e})`)).join(",")})`;let s,d;"x"===e.stack.fieldChannel?(s={...(0,l.pick)(t.encode.update,["y","yc","y2","height",...u.VG_CORNERRADIUS_CHANNELS]),x:{signal:o("min","datum")},x2:{signal:o("max","datum")},clip:{value:!0}},d={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...(0,l.omit)(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(s={...(0,l.pick)(t.encode.update,["x","xc","x2","width"]),y:{signal:o("min","datum")},y2:{signal:o("max","datum")},clip:{value:!0}},d={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...(0,l.omit)(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const n of u.VG_CORNERRADIUS_CHANNELS){const r=(0,c.getMarkConfig)(n,e.markDef,e.config);t.encode.update[n]?(s[n]=t.encode.update[n],delete t.encode.update[n]):r&&(s[n]=(0,c.signalOrValueRef)(r)),r&&(t.encode.update[n]={value:0})}const f=[];if(e.stack.groupbyChannels?.length>0)for(const t of e.stack.groupbyChannels){const n=e.fieldDef(t),r=(0,i.vgField)(n);r&&f.push(r),(n?.bin||n?.timeUnit)&&f.push((0,i.vgField)(n,{binSuffix:"end"}))}s=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce(((n,r)=>{if(t.encode.update[r])return{...n,[r]:t.encode.update[r]};{const t=(0,c.getMarkConfig)(r,e.markDef,e.config);return void 0!==t?{...n,[r]:(0,c.signalOrValueRef)(t)}:n}}),s),s.stroke&&(s.strokeForeground={value:!0},s.strokeOffset={value:0});return[{type:"group",from:{facet:{data:e.requestDataName(a.DataSourceType.Main),name:A+e.requestDataName(a.DataSourceType.Main),groupby:f,aggregate:{fields:[r({suffix:"start"}),r({suffix:"start"}),r({suffix:"end"}),r({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:s},marks:[{type:"group",encode:{update:d},marks:[t]}]}]}(e)}return T(e)}const _="faceted_path_";const A="stack_group_";function C(e){const{encoding:t,stack:n,mark:a,markDef:o,config:u}=e,d=t.order;if(!(!(0,r.isArray)(d)&&(0,i.isValueDef)(d)&&(0,l.isNullOrFalse)(d.value)||!d&&(0,l.isNullOrFalse)((0,c.getMarkPropOrConfig)("order",o,u)))){if(((0,r.isArray)(d)||(0,i.isFieldDef)(d))&&!n)return(0,c.sortParams)(d,{expr:"datum"});if((0,s.isPathMark)(a)){const e="horizontal"===o.orient?"y":"x",n=t[e];if((0,i.isFieldDef)(n))return{field:e}}}}function T(e,t={fromPrefix:""}){const{mark:n,markDef:r,encoding:i,config:o}=e,s=(0,l.getFirstDefined)(r.clip,function(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return!(!t?.get("selectionExtent")&&!n?.get("selectionExtent"))||void 0}(e),function(e){const t=e.component.projection;return!(!t||t.isFit)||void 0}(e)),u=(0,c.getStyles)(r),d=i.key,f=C(e),p=function(e){if(!e.component.selection)return null;const t=(0,l.keys)(e.component.selection).length;let n=t,r=e.parent;for(;r&&0===n;)n=(0,l.keys)(r.component.selection).length,r=r.parent;return n?{interactive:t>0||"geoshape"===e.mark||!!e.encoding.tooltip||!!e.markDef.tooltip}:null}(e),h=(0,c.getMarkPropOrConfig)("aria",r,o),g=S[n].postEncodingTransform?S[n].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:S[n].vgMark,...s?{clip:s}:{},...u?{style:u}:{},...d?{key:d.field}:{},...f?{sort:f}:{},...p||{},...!1===h?{aria:h}:{},from:{data:t.fromPrefix+e.requestDataName(a.DataSourceType.Main)},encode:{update:S[n].encodeEntry(e)},...g?{transform:g}:{}}]}},91539:(e,t,n)=>{"use strict";n.r(t),n.d(t,{circle:()=>s,point:()=>o,shapeMixins:()=>a,square:()=>l});var r=n(55792);function i(e,t){const{config:n}=e;return{...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...r.pointPosition("x",e,{defaultPos:"mid"}),...r.pointPosition("y",e,{defaultPos:"mid"}),...r.nonPosition("size",e),...r.nonPosition("angle",e),...a(e,n,t)}}function a(e,t,n){return n?{shape:{value:n}}:r.nonPosition("shape",e)}const o={vgMark:"symbol",encodeEntry:e=>i(e)},s={vgMark:"symbol",encodeEntry:e=>i(e,"circle")},l={vgMark:"symbol",encodeEntry:e=>i(e,"square")}},69895:(e,t,n)=>{"use strict";n.r(t),n.d(t,{rect:()=>i});var r=n(55792);const i={vgMark:"rect",encodeEntry:e=>({...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...r.rectPosition(e,"x"),...r.rectPosition(e,"y")})}},95035:(e,t,n)=>{"use strict";n.r(t),n.d(t,{rule:()=>i});var r=n(55792);const i={vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?{...r.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...r.pointOrRangePosition("x",e,{defaultPos:"horizontal"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==n}),...r.pointOrRangePosition("y",e,{defaultPos:"vertical"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==n}),...r.nonPosition("size",e,{vgChannel:"strokeWidth"})}:{}}}},8674:(e,t,n)=>{"use strict";n.r(t),n.d(t,{text:()=>a});var r=n(15058),i=n(55792);const a={vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return{...i.baseEncodeEntry(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...i.pointPosition("x",e,{defaultPos:"mid"}),...i.pointPosition("y",e,{defaultPos:"mid"}),...i.text(e),...i.nonPosition("size",e,{vgChannel:"fontSize"}),...i.nonPosition("angle",e),...i.valueIfDefined("align",o(e.markDef,n,t)),...i.valueIfDefined("baseline",s(e.markDef,n,t)),...i.pointPosition("radius",e,{defaultPos:null}),...i.pointPosition("theta",e,{defaultPos:null})}}};function o(e,t,n){if(void 0===(0,r.getMarkPropOrConfig)("align",e,n))return"center"}function s(e,t,n){if(void 0===(0,r.getMarkPropOrConfig)("baseline",e,n))return"middle"}},48116:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tick:()=>a});var r=n(15058),i=n(55792);const a={vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,a=n.orient,o="horizontal"===a?"x":"y",s="horizontal"===a?"y":"x",l="horizontal"===a?"height":"width";return{...i.baseEncodeEntry(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...i.rectPosition(e,o),...i.pointPosition(s,e,{defaultPos:"mid",vgChannel:"y"===s?"yc":"xc"}),[l]:(0,r.signalOrValueRef)((0,r.getMarkPropOrConfig)("thickness",n,t))}}}},7302:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Model:()=>M,ModelWithField:()=>I,NameMap:()=>D,isConcatModel:()=>F,isFacetModel:()=>O,isLayerModel:()=>P,isUnitModel:()=>N});var r=n(95290),i=n(79543),a=n(89081),o=n(98348),s=n(3802),l=n(20916),u=n(31179),c=n(24777),d=n(89820),f=n(76447),p=n(65393),h=n(79989),g=n(5711),m=n(5593),y=n(15058),v=n(51885),b=n(10078),x=n(6871),E=n(19492),S=n(86985),w=n(16182),_=n(85013),A=n(98066),C=n(39276),T=n(63760),k=n(9021),R=n(96159);class D{constructor(){this.nameMap={}}rename(e,t){this.nameMap[e]=t}has(e){return void 0!==this.nameMap[e]}get(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e}}function N(e){return"unit"===e?.type}function O(e){return"facet"===e?.type}function F(e){return"concat"===e?.type}function P(e){return"layer"===e?.type}class M{constructor(e,t,n,r,i,a,o){this.type=t,this.parent=n,this.config=i,this.parent=n,this.config=i,this.view=(0,s.replaceExprRef)(o),this.name=e.name??r,this.title=(0,f.isText)(e.title)?{text:e.title}:e.title?(0,s.replaceExprRef)(e.title):void 0,this.scaleNameMap=n?n.scaleNameMap:new D,this.projectionNameMap=n?n.projectionNameMap:new D,this.signalNameMap=n?n.signalNameMap:new D,this.data=e.data,this.description=e.description,this.transforms=(0,p.normalizeTransform)(e.transform??[]),this.layout="layer"===t||"unit"===t?{}:(0,d.extractCompositionLayout)(e,t,i),this.component={data:{sources:n?n.component.data.sources:[],outputNodes:n?n.component.data.outputNodes:{},outputNodeRefCounts:n?n.component.data.outputNodeRefCounts:{},isFaceted:(0,c.isFacetSpec)(e)||n?.component.data.isFaceted&&void 0===e.data},layoutSize:new R.Split,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...a?(0,h.duplicate)(a):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){(0,k.parseScales)(this)}parseProjection(){(0,A.parseProjection)(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){(0,w.parseLegend)(this)}assembleEncodeFromView(e){const{style:t,...n}=e,r={};for(const e of(0,h.keys)(n)){const t=n[e];void 0!==t&&(r[e]=(0,y.signalOrValueRef)(t))}return r}assembleGroupEncodeEntry(e){let t={};return this.view&&(t=this.assembleEncodeFromView(this.view)),e||(this.description&&(t.description=(0,y.signalOrValueRef)(this.description)),"unit"!==this.type&&"layer"!==this.type)?(0,h.isEmpty)(t)?void 0:t:{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...t}}assembleLayout(){if(!this.layout)return;const{spacing:e,...t}=this.layout,{component:n,config:r}=this,i=(0,v.assembleLayoutTitleBand)(n.layoutHeaders,r);return{padding:e,...this.assembleDefaultLayout(),...t,...i?{titleBand:i}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:e}=this.component;let t=[];for(const n of r.FACET_CHANNELS)e[n].title&&t.push((0,v.assembleTitleGroup)(this,n));for(const e of b.HEADER_CHANNELS)t=t.concat((0,v.assembleHeaderGroups)(this,e));return t}assembleAxes(){return(0,m.assembleAxes)(this.component.axes,this.config)}assembleLegends(){return(0,S.assembleLegends)(this)}assembleProjections(){return(0,_.assembleProjections)(this)}assembleTitle(){const{encoding:e,...t}=this.title??{},n={...(0,f.extractTitleConfig)(this.config.title).nonMarkTitleProperties,...t,...e?{encode:{update:e}}:{}};if(n.text)return(0,h.contains)(["unit","layer"],this.type)?(0,h.contains)(["middle",void 0],n.anchor)&&(n.frame??(n.frame="group")):n.anchor??(n.anchor="start"),(0,h.isEmpty)(n)?void 0:n}assembleGroup(e=[]){const t={};(e=e.concat(this.assembleSignals())).length>0&&(t.signals=e);const n=this.assembleLayout();n&&(t.layout=n),t.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const r=!this.parent||O(this.parent)?(0,C.assembleScales)(this):[];r.length>0&&(t.scales=r);const i=this.assembleAxes();i.length>0&&(t.axes=i);const a=this.assembleLegends();return a.length>0&&(t.legends=a),t}getName(e){return(0,h.varName)((this.name?`${this.name}_`:"")+e)}getDataName(e){return this.getName(a.DataSourceType[e].toLowerCase())}requestDataName(e){const t=this.getDataName(e),n=this.component.data.outputNodeRefCounts;return n[t]=(n[t]||0)+1,t}getSizeSignalRef(e){if(O(this.parent)){const t=(0,E.getSizeTypeFromLayoutSizeType)(e),n=(0,r.getPositionScaleChannel)(t),a=this.component.scales[n];if(a&&!a.merged){const e=a.get("type"),t=a.get("range");if((0,u.hasDiscreteDomain)(e)&&(0,g.isVgRangeStep)(t)){const e=a.get("name"),t=(0,T.assembleDomain)(this,n),r=(0,T.getFieldFromDomain)(t);if(r){const t=(0,i.vgField)({aggregate:"distinct",field:r},{expr:"datum"});return{signal:(0,x.sizeExpr)(e,a,t)}}return l.warn(l.message.unknownField(n)),null}}}return{signal:this.signalNameMap.get(this.getName(e))}}lookupDataSource(e){const t=this.component.data.outputNodes[e];return t?t.getSource():e}getSignalName(e){return this.signalNameMap.get(e)}renameSignal(e,t){this.signalNameMap.rename(e,t)}renameScale(e,t){this.scaleNameMap.rename(e,t)}renameProjection(e,t){this.projectionNameMap.rename(e,t)}scaleName(e,t){return t?this.getName(e):(0,r.isChannel)(e)&&(0,r.isScaleChannel)(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e))?this.scaleNameMap.get(this.getName(e)):void 0}projectionName(e){return e?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}getScaleComponent(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const t=this.component.scales[e];return t&&!t.merged?t:this.parent?this.parent.getScaleComponent(e):void 0}getScaleType(e){const t=this.getScaleComponent(e);return t?t.get("type"):void 0}getSelectionComponent(e,t){let n=this.component.selection[e];if(!n&&this.parent&&(n=this.parent.getSelectionComponent(e,t)),!n)throw new Error(l.message.selectionNotFound(t));return n}hasAxisOrientSignalRef(){return this.component.axes.x?.some((e=>e.hasOrientSignalRef()))||this.component.axes.y?.some((e=>e.hasOrientSignalRef()))}}class I extends M{vgField(e,t={}){const n=this.fieldDef(e);if(n)return(0,i.vgField)(n,t)}reduceFieldDef(e,t){return(0,o.reduce)(this.getMapping(),((t,n,r)=>{const a=(0,i.getFieldDef)(n);return a?e(t,a,r):t}),t)}forEachFieldDef(e,t){(0,o.forEach)(this.getMapping(),((t,n)=>{const r=(0,i.getFieldDef)(t);r&&e(r,n)}),t)}}},95370:(e,t,n)=>{"use strict";n.r(t),n.d(t,{expression:()=>s});var r=n(26372),i=n(4976),a=n(79989),o=n(83937);function s(e,t,n){return(0,a.logicalExpr)(t,(t=>(0,r.isString)(t)?t:(0,i.isSelectionPredicate)(t)?(0,o.parseSelectionPredicate)(e,t,n):(0,i.fieldFilterExpression)(t)))}},85013:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleProjectionForModel:()=>l,assembleProjections:()=>o,assembleProjectionsForModelAndChildren:()=>s});var r=n(79989),i=n(5711),a=n(7302);function o(e){return(0,a.isLayerModel)(e)||(0,a.isConcatModel)(e)?s(e):l(e)}function s(e){return e.children.reduce(((e,t)=>e.concat(t.assembleProjections())),l(e))}function l(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:a}=n;if(t.data){const o={signal:`[${t.size.map((e=>e.signal)).join(", ")}]`},s=t.data.reduce(((t,n)=>{const a=(0,i.isSignalRef)(n)?n.signal:`data('${e.lookupDataSource(n)}')`;return(0,r.contains)(t,a)||t.push(a),t}),[]);if(s.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:a,size:o,fit:{signal:s.length>1?`[${s.join(", ")}]`:s[0]},...n}]}return[{name:a,translate:{signal:"[width / 2, height / 2]"},...n}]}},51494:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ProjectionComponent:()=>i});var r=n(96159);class i extends r.Split{constructor(e,t,n,r){super({...t},{name:e}),this.specifiedProjection=t,this.size=n,this.data=r,this.merged=!1}get isFit(){return!!this.data}}},98066:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseProjection:()=>p});var r=n(26372),i=n(95290),a=n(79543),o=n(89081),s=n(3802),l=n(15176),u=n(99273),c=n(79989),d=n(7302),f=n(51494);function p(e){e.component.projection=(0,d.isUnitModel)(e)?function(e){if(e.hasProjection){const t=(0,s.replaceExprRef)(e.specifiedProjection),n=!(t&&(null!=t.scale||null!=t.translate)),r=n?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,l=n?function(e){const t=[],{encoding:n}=e;for(const r of[[i.LONGITUDE,i.LATITUDE],[i.LONGITUDE2,i.LATITUDE2]])((0,a.getFieldOrDatumDef)(n[r[0]])||(0,a.getFieldOrDatumDef)(n[r[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});e.channelHasField(i.SHAPE)&&e.typedFieldDef(i.SHAPE).type===u.GEOJSON&&t.push({signal:e.getName(`geojson_${t.length}`)});0===t.length&&t.push(e.requestDataName(o.DataSourceType.Main));return t}(e):void 0,c=new f.ProjectionComponent(e.projectionName(!0),{...(0,s.replaceExprRef)(e.config.projection),...t},r,l);return c.get("type")||c.set("type","equalEarth",!1),c}return}(e):function(e){if(0===e.children.length)return;let t;for(const t of e.children)p(t);const n=(0,c.every)(e.children,(e=>{const n=e.component.projection;if(n){if(t){const e=function(e,t){const n=(0,c.every)(l.PROJECTION_PROPERTIES,(n=>!(0,r.hasOwnProperty)(e.explicit,n)&&!(0,r.hasOwnProperty)(t.explicit,n)||!!((0,r.hasOwnProperty)(e.explicit,n)&&(0,r.hasOwnProperty)(t.explicit,n)&&(0,c.deepEqual)(e.get(n),t.get(n)))));if((0,c.deepEqual)(e.size,t.size)){if(n)return e;if((0,c.deepEqual)(e.explicit,{}))return t;if((0,c.deepEqual)(t.explicit,{}))return e}return null}(t,n);return e&&(t=e),!!e}return t=n,!0}return!0}));if(t&&n){const n=e.projectionName(!0),r=new f.ProjectionComponent(n,t.specifiedProjection,t.size,(0,c.duplicate)(t.data));for(const t of e.children){const e=t.component.projection;e&&(e.isFit&&r.data.push(...t.component.projection.data),t.renameProjection(e.get("name"),n),e.merged=!0)}return r}return}(e)}},91387:(e,t,n)=>{"use strict";n.r(t),n.d(t,{defaultScaleResolve:()=>o,parseGuideResolve:()=>s});var r=n(95290),i=n(20916),a=n(7302);function o(e,t){if((0,a.isFacetModel)(t))return"theta"===e?"independent":"shared";if((0,a.isLayerModel)(t))return"shared";if((0,a.isConcatModel)(t))return(0,r.isXorY)(e)||"theta"===e||"radius"===e?"independent":"shared";throw new Error("invalid model type for resolve")}function s(e,t){const n=e.scale[t],a=(0,r.isXorY)(t)?"axis":"legend";return"independent"===n?("shared"===e[a][t]&&i.warn(i.message.independentScaleMeansIndependentGuide(t)),"independent"):e[a][t]||"shared"}},39276:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleScaleRange:()=>f,assembleScales:()=>c,assembleScalesForModel:()=>d});var r=n(26372),i=n(95290),a=n(79989),o=n(5711),s=n(7302),l=n(52128),u=n(63760);function c(e){return(0,s.isLayerModel)(e)||(0,s.isConcatModel)(e)?e.children.reduce(((e,t)=>e.concat(c(t))),d(e)):d(e)}function d(e){return(0,a.keys)(e.component.scales).reduce(((t,n)=>{const r=e.component.scales[n];if(r.merged)return t;const i=r.combine(),{name:a,type:o,selectionExtent:s,domains:c,range:d,reverse:p,...h}=i,g=f(i.range,a,n,e),m=(0,u.assembleDomain)(e,n),y=s?(0,l.assembleSelectionScaleDomain)(e,s,r,m):null;return t.push({name:a,type:o,...m?{domain:m}:{},...y?{domainRaw:y}:{},range:g,...void 0!==p?{reverse:p}:{},...h}),t}),[])}function f(e,t,n,a){if((0,i.isXorY)(n)){if((0,o.isVgRangeStep)(e))return{step:{signal:`${t}_step`}}}else if((0,r.isObject)(e)&&(0,o.isDataRefDomain)(e))return{...e,data:a.lookupDataSource(e.data)};return e}},39621:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ScaleComponent:()=>s});var r=n(26372),i=n(31179),a=n(79989),o=n(96159);class s extends o.Split{constructor(e,t){super({},{name:e}),this.merged=!1,this.setWithExplicit("type",t)}domainHasZero(){const e=this.get("type");if((0,a.contains)([i.ScaleType.LOG,i.ScaleType.TIME,i.ScaleType.UTC],e))return"definitely-not";const t=this.get("zero");if(!0===t||void 0===t&&(0,a.contains)([i.ScaleType.LINEAR,i.ScaleType.SQRT,i.ScaleType.POW],e))return"definitely";const n=this.get("domains");if(n.length>0){let e=!1,t=!1,i=!1;for(const a of n){if((0,r.isArray)(a)){const n=a[0],i=a[a.length-1];if((0,r.isNumber)(n)&&(0,r.isNumber)(i)){if(n<=0&&i>=0){e=!0;continue}t=!0;continue}}i=!0}if(e)return"definitely";if(t&&!i)return"definitely-not"}return"maybe"}}},63760:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleDomain:()=>I,canUseUnaggregatedDomain:()=>O,domainSort:()=>N,getFieldFromDomain:()=>M,mergeDomains:()=>P,parseDomainForChannel:()=>C,parseScaleDomain:()=>A});var r=n(26372),i=n(54814),a=n(19664),o=n(95290),s=n(79543),l=n(89081),u=n(20916),c=n(75028),d=n(31179),f=n(46681),p=n(96598),h=n(79989),g=n(5711),m=n(15058),y=n(89153),v=n(77524),b=n(80449),x=n(62277),E=n(37761),S=n(7302),w=n(77547),_=n(96159);function A(e){(0,S.isUnitModel)(e)?function(e){const t=e.component.scales;for(const n of h.keys(t)){const r=C(e,n);if(t[n].setWithExplicit("domains",r),D(e,n),e.component.data.isFaceted){let t=e;for(;!(0,S.isFacetModel)(t)&&t.parent;)t=t.parent;if("shared"===t.component.resolve.scale[n])for(const e of r.value)(0,g.isDataRefDomain)(e)&&(e.data=b.FACET_SCALE_PREFIX+e.data.replace(b.FACET_SCALE_PREFIX,""))}}}(e):function(e){for(const t of e.children)A(t);const t=e.component.scales;for(const n of h.keys(t)){let r,i=null;for(const t of e.children){const e=t.component.scales[n];if(e){r=void 0===r?e.getWithExplicit("domains"):(0,_.mergeValuesWithExplicit)(r,e.getWithExplicit("domains"),"domains","scale",F);const t=e.get("selectionExtent");i&&t&&i.param!==t.param&&u.warn(u.message.NEEDS_SAME_SELECTION),i=t}}t[n].setWithExplicit("domains",r),i&&t[n].set("selectionExtent",i,!0)}}(e)}function C(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:r}=e,i=function(e,t,n,r){if("unaggregated"===e){const{valid:e,reason:r}=O(t,n);if(!e)return void u.warn(r)}else if(void 0===e&&r.useUnaggregatedDomain){const{valid:e}=O(t,n);if(e)return"unaggregated"}return e}(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return i!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:i}),"x"===t&&(0,s.getFieldOrDatumDef)(r.x2)?(0,s.getFieldOrDatumDef)(r.x)?(0,_.mergeValuesWithExplicit)(k(n,i,e,"x"),k(n,i,e,"x2"),"domain","scale",F):k(n,i,e,"x2"):"y"===t&&(0,s.getFieldOrDatumDef)(r.y2)?(0,s.getFieldOrDatumDef)(r.y)?(0,_.mergeValuesWithExplicit)(k(n,i,e,"y"),k(n,i,e,"y2"),"domain","scale",F):k(n,i,e,"y2"):k(n,i,e,t)}function T(e,t,n){const r=(0,p.normalizeTimeUnit)(n)?.unit;return"temporal"===t||r?function(e,t,n){return e.map((e=>({signal:`{data: ${(0,s.valueExpr)(e,{timeUnit:n,type:t})}}`})))}(e,t,r):[e]}function k(e,t,n,i){const{encoding:u,markDef:f,mark:p,config:v,stack:b}=n,S=(0,s.getFieldOrDatumDef)(u[i]),{type:A}=S,C=S.timeUnit,R=(0,E.getScaleDataSourceForHandlingInvalidValues)({invalid:(0,m.getMarkConfig)("invalid",f,v),isPath:(0,c.isPathMark)(p)});if((0,d.isDomainUnionWith)(t)){const r=k(e,void 0,n,i),a=T(t.unionWith,A,C);return(0,_.makeExplicit)([...a,...r.value])}if((0,g.isSignalRef)(t))return(0,_.makeExplicit)([t]);if(t&&"unaggregated"!==t&&!(0,d.isParameterDomain)(t))return(0,_.makeExplicit)(T(t,A,C));if(b&&i===b.fieldChannel){if("normalize"===b.offset)return(0,_.makeImplicit)([[0,1]]);const e=n.requestDataName(R);return(0,_.makeImplicit)([{data:e,field:n.vgField(i,{suffix:"start"})},{data:e,field:n.vgField(i,{suffix:"end"})}])}const D=(0,o.isScaleChannel)(i)&&(0,s.isFieldDef)(S)?N(n,i,e):void 0;if((0,s.isDatumDef)(S)){const e=T([S.datum],A,C);return(0,_.makeImplicit)(e)}const O=S;if("unaggregated"===t){const{field:e}=S;return(0,_.makeImplicit)([{data:n.requestDataName(R),field:(0,s.vgField)({field:e,aggregate:"min"})},{data:n.requestDataName(R),field:(0,s.vgField)({field:e,aggregate:"max"})}])}if((0,a.isBinning)(O.bin)){if((0,d.hasDiscreteDomain)(e))return"bin-ordinal"===e?(0,_.makeImplicit)([]):(0,_.makeImplicit)([{data:h.isBoolean(D)?n.requestDataName(R):n.requestDataName(l.DataSourceType.Raw),field:n.vgField(i,(0,s.binRequiresRange)(O,i)?{binSuffix:"range"}:{}),sort:!0!==D&&(0,r.isObject)(D)?D:{field:n.vgField(i,{}),op:"min"}}]);{const{bin:e}=O;if((0,a.isBinning)(e)){const t=(0,y.getBinSignalName)(n,O.field,e);return(0,_.makeImplicit)([new w.SignalRefWrapper((()=>{const e=n.getSignalName(t);return`[${e}.start, ${e}.stop]`}))])}return(0,_.makeImplicit)([{data:n.requestDataName(R),field:n.vgField(i,{})}])}}if(O.timeUnit&&h.contains(["time","utc"],e)){const e=u[(0,o.getSecondaryRangeChannel)(i)];if((0,s.hasBandEnd)(O,e,f,v)){const t=n.requestDataName(R),r=(0,s.getBandPosition)({fieldDef:O,fieldDef2:e,markDef:f,config:v}),a=(0,c.isRectBasedMark)(p)&&.5!==r&&(0,o.isXorY)(i);return(0,_.makeImplicit)([{data:t,field:n.vgField(i,a?{suffix:x.OFFSETTED_RECT_START_SUFFIX}:{})},{data:t,field:n.vgField(i,{suffix:a?x.OFFSETTED_RECT_END_SUFFIX:"end"})}])}}return D?(0,_.makeImplicit)([{data:h.isBoolean(D)?n.requestDataName(R):n.requestDataName(l.DataSourceType.Raw),field:n.vgField(i),sort:D}]):(0,_.makeImplicit)([{data:n.requestDataName(R),field:n.vgField(i)}])}function R(e,t){const{op:n,field:r,order:i}=e;return{op:n??(t?"sum":f.DEFAULT_SORT_OP),...r?{field:h.replacePathInField(r)}:{},...i?{order:i}:{}}}function D(e,t){const n=e.component.scales[t],r=e.specifiedScales[t].domain,i=e.fieldDef(t)?.bin,o=(0,d.isParameterDomain)(r)?r:void 0,s=(0,a.isBinParams)(i)&&(0,a.isParameterExtent)(i.extent)?i.extent:void 0;(o||s)&&n.set("selectionExtent",o??s,!0)}function N(e,t,n){if(!(0,d.hasDiscreteDomain)(n))return;const r=e.fieldDef(t),a=r.sort;if((0,f.isSortArray)(a))return{op:"min",field:(0,v.sortArrayIndexField)(r,t),order:"ascending"};const{stack:o}=e,l=o?new Set([...o.groupbyFields,...o.stackBy.map((e=>e.fieldDef.field))]):void 0;if((0,f.isSortField)(a)){return R(a,o&&!l.has(a.field))}if((0,f.isSortByEncoding)(a)){const{encoding:t,order:n}=a,r=e.fieldDef(t),{aggregate:u,field:c}=r,d=o&&!l.has(c);if((0,i.isArgminDef)(u)||(0,i.isArgmaxDef)(u))return R({field:(0,s.vgField)(r),order:n},d);if((0,i.isAggregateOp)(u)||!u)return R({op:u,field:c,order:n},d)}else{if("descending"===a)return{op:"min",field:e.vgField(t),order:"descending"};if(h.contains(["ascending",void 0],a))return!0}}function O(e,t){const{aggregate:n,type:a}=e;return n?(0,r.isString)(n)&&!i.SHARED_DOMAIN_OPS.has(n)?{valid:!1,reason:u.message.unaggregateDomainWithNonSharedDomainOp(n)}:"quantitative"===a&&"log"===t?{valid:!1,reason:u.message.unaggregatedDomainWithLogScale(e)}:{valid:!0}:{valid:!1,reason:u.message.unaggregateDomainHasNoEffectForRawField(e)}}function F(e,t,n,r){return e.explicit&&t.explicit&&u.warn(u.message.mergeConflictingDomainProperty(n,r,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function P(e){const t=h.unique(e.map((e=>{if((0,g.isDataRefDomain)(e)){const{sort:t,...n}=e;return n}return e})),h.hash),n=h.unique(e.map((e=>{if((0,g.isDataRefDomain)(e)){const t=e.sort;return void 0===t||h.isBoolean(t)||("op"in t&&"count"===t.op&&delete t.field,"ascending"===t.order&&delete t.order),t}})).filter((e=>void 0!==e)),h.hash);if(0===t.length)return;if(1===t.length){const t=e[0];if((0,g.isDataRefDomain)(t)&&n.length>0){let e=n[0];if(n.length>1){u.warn(u.message.MORE_THAN_ONE_SORT);const t=n.filter((e=>(0,r.isObject)(e)&&"op"in e&&"min"!==e.op));e=!n.every((e=>(0,r.isObject)(e)&&"op"in e))||1!==t.length||t[0]}else if((0,r.isObject)(e)&&"field"in e){const n=e.field;t.field===n&&(e=!e.order||{order:e.order})}return{...t,sort:e}}return t}const a=h.unique(n.map((e=>h.isBoolean(e)||!("op"in e)||(0,r.isString)(e.op)&&(0,r.hasOwnProperty)(i.MULTIDOMAIN_SORT_OP_INDEX,e.op)?e:(u.warn(u.message.domainSortDropped(e)),!0))),h.hash);let o;1===a.length?o=a[0]:a.length>1&&(u.warn(u.message.MORE_THAN_ONE_SORT),o=!0);const s=h.unique(e.map((e=>(0,g.isDataRefDomain)(e)?e.data:null)),(e=>e));if(1===s.length&&null!==s[0]){return{data:s[0],fields:t.map((e=>e.field)),...o?{sort:o}:{}}}return{fields:t,...o?{sort:o}:{}}}function M(e){if((0,g.isDataRefDomain)(e)&&(0,r.isString)(e.field))return e.field;if((0,g.isDataRefUnionedDomain)(e)){let t;for(const n of e.fields)if((0,g.isDataRefDomain)(n)&&(0,r.isString)(n.field))if(t){if(t!==n.field)return u.warn(u.message.FACETED_INDEPENDENT_DIFFERENT_SOURCES),t}else t=n.field;return u.warn(u.message.FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES),t}if((0,g.isFieldRefUnionDomain)(e)){u.warn(u.message.FACETED_INDEPENDENT_SAME_SOURCE);const t=e.fields[0];return(0,r.isString)(t)?t:void 0}}function I(e,t){return P(e.component.scales[t].get("domains").map((t=>((0,g.isDataRefDomain)(t)&&(t.data=e.lookupDataSource(t.data)),t))))}},9021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{parseScaleCore:()=>v,parseScales:()=>y});var r=n(95290),i=n(79543),a=n(98348),o=n(75028),s=n(31179),l=n(99273),u=n(79989),c=n(7302),d=n(91387),f=n(96159),p=n(39621),h=n(63760),g=n(70585),m=n(78540);function y(e,{ignoreRange:t}={}){v(e),(0,h.parseScaleDomain)(e);for(const t of s.NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTIES)(0,g.parseScaleProperty)(e,t);t||(0,g.parseScaleRange)(e)}function v(e){(0,c.isUnitModel)(e)?e.component.scales=function(e){const{encoding:t,mark:n,markDef:s}=e,u={};for(const c of r.SCALE_CHANNELS){const d=(0,i.getFieldOrDatumDef)(t[c]);if(d&&n===o.GEOSHAPE&&c===r.SHAPE&&d.type===l.GEOJSON)continue;let f=d&&d.scale;if(d&&null!==f&&!1!==f){f??(f={});const n=(0,a.channelHasNestedOffsetScale)(t,c),r=(0,m.scaleType)(f,c,d,s,n);u[c]=new p.ScaleComponent(e.scaleName(`${c}`,!0),{value:r,explicit:f.type===r})}}return u}(e):e.component.scales=function(e){var t;const n=e.component.scales={},r={},i=e.component.resolve;for(const n of e.children){v(n);for(const a of(0,u.keys)(n.component.scales))if((t=i.scale)[a]??(t[a]=(0,d.defaultScaleResolve)(a,e)),"shared"===i.scale[a]){const e=r[a],t=n.component.scales[a].getWithExplicit("type");e?(0,s.scaleCompatible)(e.value,t.value)?r[a]=(0,f.mergeValuesWithExplicit)(e,t,"type","scale",b):(i.scale[a]="independent",delete r[a]):r[a]=t}}for(const t of(0,u.keys)(r)){const i=e.scaleName(t,!0),a=r[t];n[t]=new p.ScaleComponent(i,a);for(const n of e.children){const e=n.component.scales[t];e&&(n.renameScale(e.get("name"),i),e.merged=!0)}}return n}(e)}const b=(0,f.tieBreakByComparing)(((e,t)=>(0,s.scaleTypePrecedence)(e)-(0,s.scaleTypePrecedence)(t)))},70585:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bins:()=>S,interpolate:()=>w,nice:()=>_,padding:()=>A,paddingInner:()=>C,paddingOuter:()=>T,parseNonUnitScaleProperty:()=>E,parseScaleProperty:()=>v,parseScaleRange:()=>x,reverse:()=>k,scaleRules:()=>b,zero:()=>R});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(20032),l=n(98348),u=n(20916),c=n(31179),d=n(79989),f=n(5711),p=n(89153),h=n(7302),g=n(77547),m=n(96159),y=n(76387);function v(e,t){(0,h.isUnitModel)(e)?function(e,t){const n=e.component.scales,{config:r,encoding:i,markDef:f,specifiedScales:p}=e;for(const h of(0,d.keys)(n)){const g=p[h],m=n[h],y=e.getScaleComponent(h),v=(0,o.getFieldOrDatumDef)(i[h]),x=g[t],E=y.get("type"),S=y.get("padding"),w=y.get("paddingInner"),_=(0,c.scaleTypeSupportProperty)(E,t),A=(0,c.channelScalePropertyIncompatability)(h,t);if(void 0!==x&&(_?A&&u.warn(A):u.warn(u.message.scalePropertyNotWorkWithScaleType(E,t,h))),_&&void 0===A)if(void 0!==x){const e=v.timeUnit,n=v.type;switch(t){case"domainMax":case"domainMin":(0,s.isDateTime)(g[t])||"temporal"===n||e?m.set(t,{signal:(0,o.valueExpr)(g[t],{type:n,timeUnit:e})},!0):m.set(t,g[t],!0);break;default:m.copyKeyFromObject(t,g)}}else{const n=d.hasProperty(b,t)?b[t]({model:e,channel:h,fieldOrDatumDef:v,scaleType:E,scalePadding:S,scalePaddingInner:w,domain:g.domain,domainMin:g.domainMin,domainMax:g.domainMax,markDef:f,config:r,hasNestedOffsetScale:(0,l.channelHasNestedOffsetScale)(i,h),hasSecondaryRangeChannel:!!i[(0,a.getSecondaryRangeChannel)(h)]}):r.scale[t];void 0!==n&&m.set(t,n,!1)}}}(e,t):E(e,t)}const b={bins:({model:e,fieldOrDatumDef:t})=>(0,o.isFieldDef)(t)?S(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>w(e,t.type),nice:({scaleType:e,channel:t,domain:n,domainMin:r,domainMax:i,fieldOrDatumDef:a})=>_(e,t,n,r,i,a),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:r,config:i})=>A(e,t,i.scale,n,r,i.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,scaleType:r,config:i,hasNestedOffsetScale:a})=>C(e,t,n.type,r,i.scale,a),paddingOuter:({scalePadding:e,channel:t,scaleType:n,scalePaddingInner:r,config:i,hasNestedOffsetScale:a})=>T(e,t,n,r,i.scale,a),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:r})=>k(t,(0,o.isFieldDef)(e)?e.sort:void 0,n,r.scale),zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:r,scaleType:i,config:a,hasSecondaryRangeChannel:o})=>R(e,t,n,r,i,a.scale,o)};function x(e){(0,h.isUnitModel)(e)?(0,y.parseUnitScaleRange)(e):E(e,"range")}function E(e,t){const n=e.component.scales;for(const n of e.children)"range"===t?x(n):v(n,t);for(const r of(0,d.keys)(n)){let i;for(const n of e.children){const e=n.component.scales[r];if(e){const n=e.getWithExplicit(t);i=(0,m.mergeValuesWithExplicit)(i,n,t,"scale",(0,m.tieBreakByComparing)(((e,n)=>"range"===t&&e.step&&n.step?e.step-n.step:0)))}}n[r].setWithExplicit(t,i)}}function S(e,t){const n=t.bin;if((0,i.isBinning)(n)){const r=(0,p.getBinSignalName)(e,t.field,n);return new g.SignalRefWrapper((()=>e.getSignalName(r)))}if((0,i.isBinned)(n)&&(0,i.isBinParams)(n)&&void 0!==n.step)return{step:n.step}}function w(e,t){if((0,d.contains)([a.COLOR,a.FILL,a.STROKE],e)&&"nominal"!==t)return"hcl"}function _(e,t,n,i,s,l){if(!((0,o.getFieldDef)(l)?.bin||(0,r.isArray)(n)||null!=s||null!=i||d.contains([c.ScaleType.TIME,c.ScaleType.UTC],e)))return!!(0,a.isXorY)(t)||void 0}function A(e,t,n,r,i,s){if((0,a.isXorY)(e)){if((0,c.isContinuousToContinuous)(t)){if(void 0!==n.continuousPadding)return n.continuousPadding;const{type:t,orient:a}=i;if("bar"===t&&(!(0,o.isFieldDef)(r)||!r.bin&&!r.timeUnit)&&("vertical"===a&&"x"===e||"horizontal"===a&&"y"===e))return s.continuousBandSize}if(t===c.ScaleType.POINT)return n.pointPadding}}function C(e,t,n,r,i,o=!1){if(void 0===e){if((0,a.isXorY)(t)){const{bandPaddingInner:e,barBandPaddingInner:t,rectBandPaddingInner:r,tickBandPaddingInner:a,bandWithNestedOffsetPaddingInner:s}=i;return o?s:(0,d.getFirstDefined)(e,"bar"===n?t:"tick"===n?a:r)}return(0,a.isXorYOffset)(t)&&r===c.ScaleType.BAND?i.offsetBandPaddingInner:void 0}}function T(e,t,n,r,i,o=!1){if(void 0===e)if((0,a.isXorY)(t)){const{bandPaddingOuter:e,bandWithNestedOffsetPaddingOuter:t}=i;if(o)return t;if(n===c.ScaleType.BAND)return(0,d.getFirstDefined)(e,(0,f.isSignalRef)(r)?{signal:`${r.signal}/2`}:r/2)}else if((0,a.isXorYOffset)(t)){if(n===c.ScaleType.POINT)return.5;if(n===c.ScaleType.BAND)return i.offsetBandPaddingOuter}}function k(e,t,n,r){return"x"===n&&void 0!==r.xReverse?(0,c.hasContinuousDomain)(e)&&"descending"===t?(0,f.isSignalRef)(r.xReverse)?{signal:`!${r.xReverse.signal}`}:!r.xReverse:r.xReverse:!(!(0,c.hasContinuousDomain)(e)||"descending"!==t)||void 0}function R(e,t,n,i,s,l,u){if(!!n&&"unaggregated"!==n&&(0,c.hasContinuousDomain)(s)){if((0,r.isArray)(n)){const e=n[0],t=n[n.length-1];if((0,r.isNumber)(e)&&e<=0&&(0,r.isNumber)(t)&&t>=0)return!0}return!1}if("size"===e&&"quantitative"===t.type&&!(0,c.isContinuousToDiscrete)(s))return!0;if((!(0,o.isFieldDef)(t)||!t.bin)&&d.contains([...a.POSITION_SCALE_CHANNELS,...a.POLAR_POSITION_SCALE_CHANNELS],e)){const{orient:t,type:n}=i;return(!(0,d.contains)(["bar","area","line","trail"],n)||!("horizontal"===t&&"y"===e||"vertical"===t&&"x"===e))&&(!(!(0,d.contains)(["bar","area"],n)||u)||l?.zero)}return!1}},76387:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MAX_SIZE_RANGE_STEP_RATIO:()=>F,RANGE_PROPERTIES:()=>S,defaultContinuousToDiscreteCount:()=>N,interpolateRange:()=>O,parseRangeForChannel:()=>A,parseUnitScaleRange:()=>w});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(24007),l=n(89081),u=n(98348),c=n(20916),d=n(31179),f=n(89820),p=n(99273),h=n(79989),g=n(5711),m=n(15058),y=n(89153),v=n(77547),b=n(96159),x=n(96598),E=n(7302);const S=["range","scheme"];function w(e){const t=e.component.scales;for(const n of a.SCALE_CHANNELS){const r=t[n];if(!r)continue;const i=A(n,e);r.setWithExplicit("range",i)}}function _(e,t){const n=e.fieldDef(t);if(n?.bin){const{bin:o,field:s}=n,l=(0,a.getSizeChannel)(t),u=e.getName(l);if((0,r.isObject)(o)&&o.binned&&void 0!==o.step)return new v.SignalRefWrapper((()=>{const n=e.scaleName(t),r=`(domain("${n}")[1] - domain("${n}")[0]) / ${o.step}`;return`${e.getSignalName(u)} / (${r})`}));if((0,i.isBinning)(o)){const t=(0,y.getBinSignalName)(e,s,o);return new v.SignalRefWrapper((()=>{const n=e.getSignalName(t),r=`(${n}.stop - ${n}.start) / ${n}.step`;return`${e.getSignalName(u)} / (${r})`}))}}}function A(e,t){const n=t.specifiedScales[e],{size:i}=t,s=t.getScaleComponent(e).get("type");for(const i of S)if(void 0!==n[i]){const o=(0,d.scaleTypeSupportProperty)(s,i),u=(0,d.channelScalePropertyIncompatability)(e,i);if(o)if(u)c.warn(u);else switch(i){case"range":{const i=n.range;if((0,r.isArray)(i)){if((0,a.isXorY)(e))return(0,b.makeExplicit)(i.map((e=>{if("width"===e||"height"===e){const n=t.getName(e),r=t.getSignalName.bind(t);return v.SignalRefWrapper.fromName(r,n)}return e})))}else if((0,r.isObject)(i))return(0,b.makeExplicit)({data:t.requestDataName(l.DataSourceType.Main),field:i.field,sort:{op:"min",field:t.vgField(e)}});return(0,b.makeExplicit)(i)}case"scheme":return(0,b.makeExplicit)(C(n[i]))}else c.warn(c.message.scalePropertyNotWorkWithScaleType(s,i,e))}const u=e===a.X||"xOffset"===e?"width":"height",p=i[u];if((0,f.isStep)(p))if((0,a.isXorY)(e))if((0,d.hasDiscreteDomain)(s)){const n=k(p,t,e);if(n)return(0,b.makeExplicit)({step:n})}else c.warn(c.message.stepDropped(u));else if((0,a.isXorYOffset)(e)){const n=e===a.XOFFSET?"x":"y";if("band"===t.getScaleComponent(n).get("type")){const e=R(p,s);if(e)return(0,b.makeExplicit)(e)}}const{rangeMin:m,rangeMax:y}=n,w=function(e,t){const{size:n,config:i,mark:s,encoding:l}=t,{type:u}=(0,o.getFieldOrDatumDef)(l[e]),p=t.getScaleComponent(e),m=p.get("type"),{domain:y,domainMid:b}=t.specifiedScales[e];switch(e){case a.X:case a.Y:if(h.contains(["point","band"],m)){const r=D(e,n,i.view);if((0,f.isStep)(r)){return{step:k(r,t,e)}}}return T(e,t,m);case a.XOFFSET:case a.YOFFSET:return function(e,t,n){const r=e===a.XOFFSET?"x":"y",i=t.getScaleComponent(r);if(!i)return T(r,t,n,{center:!0});const s=i.get("type"),l=t.scaleName(r),{markDef:u,config:c}=t;if("band"===s){const e=D(r,t.size,t.config.view);if((0,f.isStep)(e)){const t=R(e,n);if(t)return t}return[0,{signal:`bandwidth('${l}')`}]}{const n=t.encoding[r];if((0,o.isFieldDef)(n)&&n.timeUnit){const e=(0,x.durationExpr)(n.timeUnit,(e=>`scale('${l}', ${e})`)),r=t.config.scale.bandWithNestedOffsetPaddingInner,i=(0,o.getBandPosition)({fieldDef:n,markDef:u,config:c})-.5,a=0!==i?` + ${i}`:"";if(r){return[{signal:`${(0,g.isSignalRef)(r)?`${r.signal}/2`+a:`${r/2+i}`} * (${e})`},{signal:`${(0,g.isSignalRef)(r)?`(1 - ${r.signal}/2)`+a:`${1-r/2+i}`} * (${e})`}]}return[0,{signal:e}]}return h.never(`Cannot use ${e} scale if ${r} scale is not discrete.`)}}(e,t,m);case a.SIZE:{const a=function(e,t){switch(e){case"bar":case"tick":return t.scale.minBandSize;case"line":case"trail":case"rule":return t.scale.minStrokeWidth;case"text":return t.scale.minFontSize;case"point":case"square":case"circle":return t.scale.minSize}throw new Error(c.message.incompatibleChannel("size",e))}(s,i),o=function(e,t,n,i){const a={x:_(n,"x"),y:_(n,"y")};switch(e){case"bar":case"tick":{if(void 0!==i.scale.maxBandSize)return i.scale.maxBandSize;const e=P(t,a,i.view);return(0,r.isNumber)(e)?e-1:new v.SignalRefWrapper((()=>`${e.signal} - 1`))}case"line":case"trail":case"rule":return i.scale.maxStrokeWidth;case"text":return i.scale.maxFontSize;case"point":case"square":case"circle":{if(i.scale.maxSize)return i.scale.maxSize;const e=P(t,a,i.view);return(0,r.isNumber)(e)?Math.pow(F*e,2):new v.SignalRefWrapper((()=>`pow(${F} * ${e.signal}, 2)`))}}throw new Error(c.message.incompatibleChannel("size",e))}(s,n,t,i);return(0,d.isContinuousToDiscrete)(m)?O(a,o,N(m,i,y,e)):[a,o]}case a.THETA:return[0,2*Math.PI];case a.ANGLE:return[0,360];case a.RADIUS:return[0,new v.SignalRefWrapper((()=>`min(${t.getSignalName((0,E.isFacetModel)(t.parent)?"child_width":"width")},${t.getSignalName((0,E.isFacetModel)(t.parent)?"child_height":"height")})/2`))];case a.TIME:return{step:1e3/i.scale.framesPerSecond};case a.STROKEWIDTH:return[i.scale.minStrokeWidth,i.scale.maxStrokeWidth];case a.STROKEDASH:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case a.SHAPE:return"symbol";case a.COLOR:case a.FILL:case a.STROKE:return"ordinal"===m?"nominal"===u?"category":"ordinal":void 0!==b?"diverging":"rect"===s||"geoshape"===s?"heatmap":"ramp";case a.OPACITY:case a.FILLOPACITY:case a.STROKEOPACITY:return[i.scale.minOpacity,i.scale.maxOpacity]}}(e,t);return(void 0!==m||void 0!==y)&&(0,d.scaleTypeSupportProperty)(s,"rangeMin")&&(0,r.isArray)(w)&&2===w.length?(0,b.makeExplicit)([m??w[0],y??w[1]]):(0,b.makeImplicit)(w)}function C(e){return(0,d.isExtendedScheme)(e)?{scheme:e.name,...h.omit(e,["name"])}:{scheme:e}}function T(e,t,n,{center:r}={}){const i=(0,a.getSizeChannel)(e),o=t.getName(i),s=t.getSignalName.bind(t);return e===a.Y&&(0,d.hasContinuousDomain)(n)?r?[v.SignalRefWrapper.fromName((e=>`${s(e)}/2`),o),v.SignalRefWrapper.fromName((e=>`-${s(e)}/2`),o)]:[v.SignalRefWrapper.fromName(s,o),0]:r?[v.SignalRefWrapper.fromName((e=>`-${s(e)}/2`),o),v.SignalRefWrapper.fromName((e=>`${s(e)}/2`),o)]:[0,v.SignalRefWrapper.fromName(s,o)]}function k(e,t,n){const{encoding:r}=t,i=t.getScaleComponent(n),s=(0,a.getOffsetScaleChannel)(n),l=r[s];if("offset"===(0,f.getStepFor)({step:e,offsetIsDiscrete:(0,o.isFieldOrDatumDef)(l)&&(0,p.isDiscrete)(l.type)})&&(0,u.channelHasFieldOrDatum)(r,s)){const n=t.getScaleComponent(s);let r=`domain('${t.scaleName(s)}').length`;if("band"===n.get("type")){r=`bandspace(${r}, ${n.get("paddingInner")??n.get("padding")??0}, ${n.get("paddingOuter")??n.get("padding")??0})`}const a=i.get("paddingInner")??i.get("padding");return{signal:`${e.step} * ${r} / (1-${(0,m.exprFromSignalRefOrValue)(a)})`}}return e.step}function R(e,t){if("offset"===(0,f.getStepFor)({step:e,offsetIsDiscrete:(0,d.hasDiscreteDomain)(t)}))return{step:e.step}}function D(e,t,n){const r=e===a.X?"width":"height",i=t[r];return i||(0,s.getViewConfigDiscreteSize)(n,r)}function N(e,t,n,i){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return void 0!==n&&(0,r.isArray)(n)?n.length+1:(c.warn(c.message.domainRequiredForThresholdScale(i)),3)}}function O(e,t,n){const r=()=>{const r=(0,m.signalOrStringValue)(t),i=(0,m.signalOrStringValue)(e),a=`(${r} - ${i}) / (${n} - 1)`;return`sequence(${i}, ${r} + ${a}, ${a})`};return(0,g.isSignalRef)(t)?new v.SignalRefWrapper(r):{signal:r()}}const F=.95;function P(e,t,n){const r=(0,f.isStep)(e.width)?e.width.step:(0,s.getViewConfigDiscreteStep)(n,"width"),i=(0,f.isStep)(e.height)?e.height.step:(0,s.getViewConfigDiscreteStep)(n,"height");return t.x||t.y?new v.SignalRefWrapper((()=>`min(${[t.x?t.x.signal:r,t.y?t.y.signal:i].join(", ")})`)):Math.min(r,i)}},78540:(e,t,n)=>{"use strict";n.r(t),n.d(t,{scaleType:()=>d});var r=n(19664),i=n(95290),a=n(79543),o=n(20916),s=n(75028),l=n(31179),u=n(96598),c=n(79989);function d(e,t,n,d,f=!1){const p=function(e,t,n,l){switch(t.type){case"nominal":case"ordinal":{if((0,i.isColorChannel)(e)||"discrete"===(0,i.rangeType)(e))return"shape"===e&&"ordinal"===t.type&&o.warn(o.message.discreteChannelCannotEncode(e,"ordinal")),"ordinal";if((0,i.isTime)(e))return"band";if((0,i.isXorY)(e)||(0,i.isXorYOffset)(e)){if(c.contains(["rect","bar","image","rule","tick"],n.type))return"band";if(l)return"band"}else if("arc"===n.type&&e in i.POLAR_POSITION_SCALE_CHANNEL_INDEX)return"band";const r=n[(0,i.getSizeChannel)(e)];return(0,s.isRelativeBandSize)(r)||(0,a.isPositionFieldOrDatumDef)(t)&&t.axis?.tickBand?"band":"point"}case"temporal":return(0,i.isColorChannel)(e)?"time":"discrete"===(0,i.rangeType)(e)?(o.warn(o.message.discreteChannelCannotEncode(e,"temporal")),"ordinal"):(0,a.isFieldDef)(t)&&t.timeUnit&&(0,u.normalizeTimeUnit)(t.timeUnit).utc?"utc":(0,i.isTime)(e)?"band":"time";case"quantitative":return(0,i.isColorChannel)(e)?(0,a.isFieldDef)(t)&&(0,r.isBinning)(t.bin)?"bin-ordinal":"linear":"discrete"===(0,i.rangeType)(e)?(o.warn(o.message.discreteChannelCannotEncode(e,"quantitative")),"ordinal"):(0,i.isTime)(e)?"band":"linear";case"geojson":return}throw new Error(o.message.invalidFieldType(t.type))}(t,n,d,f),{type:h}=e;return(0,i.isScaleChannel)(t)?void 0!==h?(0,l.channelSupportScaleType)(t,h)?(0,a.isFieldDef)(n)&&!(0,l.scaleTypeSupportDataType)(h,n.type)?(o.warn(o.message.scaleTypeNotWorkWithFieldDef(h,p)),p):h:(o.warn(o.message.scaleTypeNotWorkWithChannel(t,h,p)),p):p:null}},52128:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleFacetSignals:()=>y,assembleInit:()=>g,assembleLayerSelectionMarks:()=>E,assembleProjection:()=>h,assembleSelectionScaleDomain:()=>S,assembleTopLevelSignals:()=>v,assembleUnitSelectionData:()=>b,assembleUnitSelectionMarks:()=>x,assembleUnitSelectionSignals:()=>m});var r=n(45948),i=n(26372),a=n(93794),o=n(20032),s=n(31179),l=n(84847),u=n(79989),c=n(7302),d=n(83937),f=n(34960),p=n(89081);function h(e){const{signals:t,hasLegend:n,index:r,...i}=e;return i.field=(0,u.replacePathInField)(i.field),i}function g(e,t=!0,n=i.identity){if((0,i.isArray)(e)){const r=e.map((e=>g(e,t,n)));return t?`[${r.join(", ")}]`:r}return(0,o.isDateTime)(e)?n(t?(0,o.dateTimeToExpr)(e):(0,o.dateTimeToTimestamp)(e)):t?n((0,u.stringify)(e)):e}function m(e,t){for(const n of(0,u.vals)(e.component.selection??{})){const r=n.name;let o=`${r}${a.TUPLE}, ${"global"===n.resolve?"true":`{unit: ${(0,a.unitName)(e)}}`}`;for(const r of a.selectionCompilers)r.defined(n)&&(r.signals&&(t=r.signals(e,n,t)),r.modifyExpr&&(o=r.modifyExpr(e,n,o)));t.push({name:r+a.MODIFY,on:[{events:{signal:n.name+a.TUPLE},update:`modify(${(0,i.stringValue)(n.name+a.STORE)}, ${o})`}]})}return w(t)}function y(e,t){if(e.component.selection&&(0,u.keys)(e.component.selection).length){const n=(0,i.stringValue)(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:(0,r.parseSelector)("pointermove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return w(t)}function v(e,t){let n=!1;for(const r of(0,u.vals)(e.component.selection??{})){const o=r.name,s=(0,i.stringValue)(o+a.STORE);if(0===t.filter((e=>e.name===o)).length){const e="global"===r.resolve?"union":r.resolve,n="point"===r.type?", true, true)":")";t.push({name:r.name,update:`${a.VL_SELECTION_RESOLVE}(${s}, ${(0,i.stringValue)(e)}${n}`})}n=!0;for(const n of a.selectionCompilers)n.defined(r)&&n.topLevelSignals&&(t=n.topLevelSignals(e,r,t))}if(n){0===t.filter((e=>"unit"===e.name)).length&&t.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]})}return w(t)}function b(e,t){const n=[],r=[],i=(0,a.unitName)(e,{escape:!1});for(const o of(0,u.vals)(e.component.selection??{})){const s={name:o.name+a.STORE};if(o.project.hasSelectionId&&(s.transform=[{type:"collect",sort:{field:l.SELECTION_ID}}]),o.init){const e=o.project.items.map(h);s.values=o.project.hasSelectionId?o.init.map((e=>({unit:i,[l.SELECTION_ID]:g(e,!1)[0]}))):o.init.map((t=>({unit:i,fields:e,values:g(t,!1)})))}if([...n,...t].filter((e=>e.name===o.name+a.STORE)).length||n.push(s),(0,a.isTimerSelection)(o)&&t.length){const n=e.lookupDataSource(e.getDataName(p.DataSourceType.Main)),i=t.find((e=>e.name===n)),a=i.transform.find((e=>"filter"===e.type&&e.expr.includes("vlSelectionTest")));if(a){i.transform=i.transform.filter((e=>e!==a));const e={name:i.name+f.CURR,source:i.name,transform:[a]};r.push(e)}}}return n.concat(t,r)}function x(e,t){for(const n of(0,u.vals)(e.component.selection??{}))for(const r of a.selectionCompilers)r.defined(n)&&r.marks&&(t=r.marks(e,n,t));return t}function E(e,t){for(const n of e.children)(0,c.isUnitModel)(n)&&(t=x(n,t));return t}function S(e,t,n,r){const a=(0,d.parseSelectionExtent)(e,t.param,t);return{signal:(0,s.hasContinuousDomain)(n.get("type"))&&(0,i.isArray)(r)&&r[0]>r[1]?`isValid(${a}) && reverse(${a})`:a}}function w(e){return e.map((e=>(e.on&&!e.on.length&&delete e.on,e)))}},75163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(45948),i=n(26372),a=n(93794),o=n(79989),s=n(53177),l=n(72164);const u={defined:e=>void 0!==e.clear&&!1!==e.clear&&!(0,a.isTimerSelection)(e),parse:(e,t)=>{t.clear&&(t.clear=(0,i.isString)(t.clear)?(0,r.parseSelector)(t.clear,"view"):t.clear)},topLevelSignals:(e,t,n)=>{if(s.default.defined(t))for(const e of t.project.items){const r=n.findIndex((n=>n.name===(0,o.varName)(`${t.name}_${e.field}`)));-1!==r&&n[r].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function r(e,r){-1!==e&&n[e].on&&n[e].on.push({events:t.clear,update:r})}if("interval"===t.type)for(const e of t.project.items){const t=n.findIndex((t=>t.name===e.signals.visual));if(r(t,"[0, 0]"),-1===t){r(n.findIndex((t=>t.name===e.signals.data)),"null")}}else{let e=n.findIndex((e=>e.name===t.name+a.TUPLE));r(e,"null"),l.default.defined(t)&&(e=n.findIndex((e=>e.name===t.name+l.TOGGLE)),r(e,"false"))}return n}}},93794:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MODIFY:()=>E,SELECTION_DOMAIN:()=>S,STORE:()=>b,TUPLE:()=>x,VL_SELECTION_RESOLVE:()=>w,disableDirectManipulation:()=>T,isTimerSelection:()=>k,requiresSelectionId:()=>C,selectionCompilers:()=>_,unitName:()=>A});var r=n(77390),i=n(26372),a=n(95290),o=n(79989),s=n(7302),l=n(56133),u=n(34960),c=n(75163),d=n(53177),f=n(16108),p=n(95967),h=n(70439),g=n(46608),m=n(72164),y=n(65800),v=n(62539);const b="_store",x="_tuple",E="_modify",S="_selection_domain_",w="vlSelectionResolve",_=[u.default,l.default,p.default,m.default,d.default,h.default,g.default,c.default,y.default,v.default,f.default];function A(e,{escape:t}={escape:!0}){let n=t?(0,i.stringValue)(e.name):e.name;const r=function(e){let t=e.parent;for(;t&&!(0,s.isFacetModel)(t);)t=t.parent;return t}(e);if(r){const{facet:e}=r;for(const t of a.FACET_CHANNELS)e[t]&&(n+=` + '__facet_${t}_' + (facet[${(0,i.stringValue)(r.vgField(t))}])`)}return n}function C(e){return(0,o.vals)(e.component.selection??{}).reduce(((e,t)=>e||t.project.hasSelectionId),!1)}function T(e,t){!(0,r.isString)(t.select)&&t.select.on||delete e.events,!(0,r.isString)(t.select)&&t.select.clear||delete e.clear,!(0,r.isString)(t.select)&&t.select.toggle||delete e.toggle}function k(e){return e.events?.find((e=>"type"in e&&"timer"===e.type))}},53177:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(26372),i=n(93794),a=n(79989),o=n(52128),s=n(16108),l=n(95967),u=n(84847);const c={defined:e=>"point"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind&&!(0,u.isLegendBinding)(e.bind),parse:(e,t,n)=>(0,i.disableDirectManipulation)(t,n),topLevelSignals:(e,t,n)=>{const i=t.name,l=t.project,u=t.bind,c=t.init&&t.init[0],d=s.default.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return l.items.forEach(((e,s)=>{const l=(0,a.varName)(`${i}_${e.field}`);n.filter((e=>e.name===l)).length||n.unshift({name:l,...c?{init:(0,o.assembleInit)(c[s])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${d}[${(0,r.stringValue)(e.field)}] : null`}]:[],bind:u[e.field]??u[e.channel]??u})})),n},signals:(e,t,n)=>{const r=t.name,o=t.project,s=n.find((e=>e.name===r+i.TUPLE)),u=r+l.TUPLE_FIELDS,c=o.items.map((e=>(0,a.varName)(`${r}_${e.field}`))),d=c.map((e=>`${e} !== null`)).join(" && ");return c.length&&(s.update=`${d} ? {fields: ${u}, values: [${c.join(", ")}]} : null`),delete s.value,delete s.on,n}}},56133:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BRUSH:()=>g,GEO_INIT_TICK:()=>y,SCALE_TRIGGER:()=>m,default:()=>b});var r=n(77390),i=n(26372),a=n(93794),o=n(95290),s=n(20916),l=n(31179),u=n(84847),c=n(79989),d=n(7302),f=n(52128),p=n(95967),h=n(70439);const g="_brush",m="_scale_trigger",y="geo_interval_init_tick",v="_init",b={defined:e=>"interval"===e.type,parse:(e,t,n)=>{var a;if(e.hasProjection){const e={...(0,r.isObject)(n.select)?n.select:{}};e.fields=[u.SELECTION_ID],e.encodings||(e.encodings=n.value?(0,c.keys)(n.value):[o.LONGITUDE,o.LATITUDE]),n.select={type:"interval",...e}}if(t.translate&&!h.default.defined(t)){const e=`!event.item || event.item.mark.name !== ${(0,i.stringValue)(t.name+g)}`;for(const n of t.events){if(!n.between){(0,s.warn)(`${n} is not an ordered event stream for interval selections.`);continue}const t=(0,i.array)((a=n.between[0]).filter??(a.filter=[]));t.includes(e)||t.push(e)}}},signals:(e,t,n)=>{const r=t.name,s=r+a.TUPLE,u=(0,c.vals)(t.project.hasChannel).filter((e=>e.channel===o.X||e.channel===o.Y)),d=t.init?t.init[0]:null;if(n.push(...u.reduce(((n,r)=>n.concat(function(e,t,n,r){const a=!e.hasProjection,s=n.channel,u=n.signals.visual,c=(0,i.stringValue)(a?e.scaleName(s):e.projectionName()),d=e=>`scale(${c}, ${e})`,p=e.getSizeSignalRef(s===o.X?"width":"height").signal,g=`${s}(unit)`,y=t.events.reduce(((e,t)=>[...e,{events:t.between[0],update:`[${g}, ${g}]`},{events:t,update:`[${u}[0], clamp(${g}, 0, ${p})]`}]),[]);if(a){const i=n.signals.data,a=h.default.defined(t),o=e.getScaleComponent(s),p=o?o.get("type"):void 0,g=r?{init:(0,f.assembleInit)(r,!0,d)}:{value:[]};return y.push({events:{signal:t.name+m},update:(0,l.hasContinuousDomain)(p)?`[${d(`${i}[0]`)}, ${d(`${i}[1]`)}]`:"[0, 0]"}),a?[{name:i,on:[]}]:[{name:u,...g,on:y},{name:i,...r?{init:(0,f.assembleInit)(r)}:{},on:[{events:{signal:u},update:`${u}[0] === ${u}[1] ? null : invert(${c}, ${u})`}]}]}{const e=s===o.X?0:1,n=t.name+v;return[{name:u,...r?{init:`[${n}[0][${e}], ${n}[1][${e}]]`}:{value:[]},on:y}]}}(e,t,r,d&&d[r.index]))),[])),e.hasProjection){const o=(0,i.stringValue)(e.projectionName()),l=e.projectionName()+"_center",{x:c,y:f}=t.project.hasChannel,p=c&&c.signals.visual,h=f&&f.signals.visual,g=c?d&&d[c.index]:`${l}[0]`,m=f?d&&d[f.index]:`${l}[1]`,b=t=>e.getSizeSignalRef(t).signal,x=`[[${p?p+"[0]":"0"}, ${h?h+"[0]":"0"}],[${p?p+"[1]":b("width")}, ${h?h+"[1]":b("height")}]]`;if(d&&(n.unshift({name:r+v,init:`[scale(${o}, [${c?g[0]:g}, ${f?m[0]:m}]), scale(${o}, [${c?g[1]:g}, ${f?m[1]:m}])]`}),!c||!f)){n.find((e=>e.name===l))||n.unshift({name:l,update:`invert(${o}, [${b("width")}/2, ${b("height")}/2])`})}const E=`vlSelectionTuples(${`intersect(${x}, {markname: ${(0,i.stringValue)(e.getName("marks"))}}, unit.mark)`}, ${`{unit: ${(0,a.unitName)(e)}}`})`,S=u.map((e=>e.signals.visual));return n.concat({name:s,on:[{events:[...S.length?[{signal:S.join(" || ")}]:[],...d?[{signal:y}]:[]],update:E}]})}{if(!h.default.defined(t)){const t=r+m,a=u.map((t=>{const n=t.channel,{data:r,visual:a}=t.signals,o=(0,i.stringValue)(e.scaleName(n)),s=e.getScaleComponent(n).get("type"),u=(0,l.hasContinuousDomain)(s)?"+":"";return`(!isArray(${r}) || (${u}invert(${o}, ${a})[0] === ${u}${r}[0] && ${u}invert(${o}, ${a})[1] === ${u}${r}[1]))`}));a.length&&n.push({name:t,value:{},on:[{events:u.map((t=>({scale:e.scaleName(t.channel)}))),update:a.join(" && ")+` ? ${t} : {}`}]})}const o=u.map((e=>e.signals.data)),c=`unit: ${(0,a.unitName)(e)}, fields: ${r+p.TUPLE_FIELDS}, values`;return n.concat({name:s,...d?{init:`{${c}: ${(0,f.assembleInit)(d)}}`}:{},...o.length?{on:[{events:[{signal:o.join(" || ")}],update:`${o.join(" && ")} ? {${c}: [${o}]} : null`}]}:{}})}},topLevelSignals:(e,t,n)=>{if((0,d.isUnitModel)(e)&&e.hasProjection&&t.init){n.filter((e=>e.name===y)).length||n.unshift({name:y,value:null,on:[{events:"timer{1}",update:`${y} === null ? {} : ${y}`}]})}return n},marks:(e,t,n)=>{const r=t.name,{x:o,y:s}=t.project.hasChannel,l=o?.signals.visual,u=s?.signals.visual,d=`data(${(0,i.stringValue)(t.name+a.STORE)})`;if(h.default.defined(t)||!o&&!s)return n;const f={x:void 0!==o?{signal:`${l}[0]`}:{value:0},y:void 0!==s?{signal:`${u}[0]`}:{value:0},x2:void 0!==o?{signal:`${l}[1]`}:{field:{group:"width"}},y2:void 0!==s?{signal:`${u}[1]`}:{field:{group:"height"}}};if("global"===t.resolve)for(const t of(0,c.keys)(f))f[t]=[{test:`${d}.length && ${d}[0].unit === ${(0,a.unitName)(e)}`,...f[t]},{value:0}];const{fill:p,fillOpacity:m,cursor:y,...v}=t.mark,b=(0,c.keys)(v).reduce(((e,t)=>(e[t]=[{test:[void 0!==o&&`${l}[0] !== ${l}[1]`,void 0!==s&&`${u}[0] !== ${u}[1]`].filter((e=>e)).join(" && "),value:v[t]},{value:null}],e)),{}),x=y??(t.translate?"move":null);return[{name:`${r+g}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:p},fillOpacity:{value:m}},update:f}},...n,{name:r+g,type:"rect",clip:!0,encode:{enter:{...x?{cursor:{value:x}}:{},fill:{value:"transparent"}},update:{...f,...b}}}]}}},46608:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p,parseInteractiveLegend:()=>h});var r=n(77390),i=n(45948),a=n(26372),o=n(93794),s=n(20916),l=n(84847),u=n(79989),c=n(95967),d=n(72164);const f={defined:e=>{const t="global"===e.resolve&&e.bind&&(0,l.isLegendBinding)(e.bind),n=1===e.project.items.length&&e.project.items[0].field!==l.SELECTION_ID;return t&&!n&&s.warn(s.message.LEGEND_BINDINGS_MUST_HAVE_PROJECTION),t&&n},parse:(e,t,n)=>{const s=(0,u.duplicate)(n);if(s.select=(0,a.isString)(s.select)?{type:s.select,toggle:t.toggle}:{...s.select,toggle:t.toggle},(0,o.disableDirectManipulation)(t,s),(0,r.isObject)(n.select)&&(n.select.on||n.select.clear)){const e='event.item && indexof(event.item.mark.role, "legend") < 0';for(const n of t.events)n.filter=(0,a.array)(n.filter??[]),n.filter.includes(e)||n.filter.push(e)}const c=(0,l.isLegendStreamBinding)(t.bind)?t.bind.legend:"click",d=(0,a.isString)(c)?(0,i.parseSelector)(c,"view"):(0,a.array)(c);t.bind={legend:{merge:d}}},topLevelSignals:(e,t,n)=>{const r=t.name,i=(0,l.isLegendStreamBinding)(t.bind)&&t.bind.legend,a=e=>t=>{const n=(0,u.duplicate)(t);return n.markname=e,n};for(const e of t.project.items){if(!e.hasLegend)continue;const o=`${(0,u.varName)(e.field)}_legend`,s=`${r}_${o}`;if(0===n.filter((e=>e.name===s)).length){const e=i.merge.map(a(`${o}_symbols`)).concat(i.merge.map(a(`${o}_labels`))).concat(i.merge.map(a(`${o}_entries`)));n.unshift({name:s,...t.init?{}:{value:null},on:[{events:e,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:i.merge,update:`!event.item || !datum ? null : ${s}`,force:!0}]})}}return n},signals:(e,t,n)=>{const r=t.name,i=t.project,a=n.find((e=>e.name===r+o.TUPLE)),s=r+c.TUPLE_FIELDS,f=i.items.filter((e=>e.hasLegend)).map((e=>(0,u.varName)(`${r}_${(0,u.varName)(e.field)}_legend`))),p=`${f.map((e=>`${e} !== null`)).join(" && ")} ? {fields: ${s}, values: [${f.join(", ")}]} : null`;t.events&&f.length>0?a.on.push({events:f.map((e=>({signal:e}))),update:p}):f.length>0&&(a.update=p,delete a.value,delete a.on);const h=n.find((e=>e.name===r+d.TOGGLE)),g=(0,l.isLegendStreamBinding)(t.bind)&&t.bind.legend;return h&&(t.events?h.on.push({...h.on[0],events:g}):h.on[0].events=g),n}},p=f;function h(e,t,n){const r=e.fieldDef(t)?.field;for(const i of(0,u.vals)(e.component.selection??{})){const e=i.project.hasField[r]??i.project.hasChannel[t];if(e&&f.defined(i)){const t=n.get("selections")??[];t.push(i.name),n.set("selections",t,!1),e.hasLegend=!0}}}},16108:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(20916),i=n(75028),a=n(55792);const o="voronoi",s={defined:e=>"point"===e.type&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(o)},marks:(e,t,n)=>{const{x:s,y:l}=t.project.hasChannel,u=e.mark;if((0,i.isPathMark)(u))return r.warn(r.message.nearestNotSupportForContinuous(u)),n;const c={name:e.getName(o),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...(0,a.tooltip)(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:s||!l?"datum.datum.x || 0":"0"},y:{expr:l||!s?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let d=0,f=!1;return n.forEach(((t,n)=>{const r=t.name??"";r===e.component.mark[0].name?d=n:r.includes(o)&&(f=!0)})),f||n.splice(d+1,0,c),n}}},83937:(e,t,n)=>{"use strict";n.r(t),n.d(t,{materializeSelections:()=>g,parseSelectionExtent:()=>h,parseSelectionPredicate:()=>p,parseUnitSelection:()=>f});var r=n(45948),i=n(26372),a=n(93794),o=n(20916),s=n(79989),l=n(74686),u=n(68860),c=n(89081),d=n(87039);function f(e,t){const n={},l=e.config.selection;if(!t||!t.length)return n;let u=0;for(const o of t){const t=(0,s.varName)(o.name),c=o.select,d=(0,i.isString)(c)?c:c.type,f=(0,i.isObject)(c)?(0,s.duplicate)(c):{type:d},p=l[d];for(const e in p)"fields"!==e&&"encodings"!==e&&("mark"===e&&(f.mark={...p.mark,...f.mark}),void 0!==f[e]&&!0!==f[e]||(f[e]=(0,s.duplicate)(p[e]??f[e])));const h=n[t]={...f,name:t,type:d,init:o.value,bind:o.bind,events:(0,i.isString)(f.on)?(0,r.parseSelector)(f.on,"scope"):(0,i.array)((0,s.duplicate)(f.on))};if((0,a.isTimerSelection)(h)&&(u++,u>1)){delete n[t];continue}const g=(0,s.duplicate)(o);for(const t of a.selectionCompilers)t.defined(h)&&t.parse&&t.parse(e,h,g)}return u>1&&(0,o.warn)(d.MULTIPLE_TIMER_ANIMATION_SELECTION),n}function p(e,t,n,r="datum"){const o=(0,i.isString)(t)?t:t.param,l=(0,s.varName)(o),u=(0,i.stringValue)(l+a.STORE);let c;try{c=e.getSelectionComponent(l,o)}catch(e){return`!!${l}`}if(c.project.timeUnit){const t=n??e.component.data.raw,r=c.project.timeUnit.clone();t.parent?r.insertAsParentOf(t):t.parent=r}const d=`${c.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest("}${u}, ${r}${"global"===c.resolve?")":`, ${(0,i.stringValue)(c.resolve)})`}`,f=`length(data(${u}))`;return!1===t.empty?`${f} && ${d}`:`!${f} || ${d}`}function h(e,t,n){const r=(0,s.varName)(t),a=n.encoding;let l,u=n.field;try{l=e.getSelectionComponent(r,t)}catch(e){return r}if(a||u){if(a&&!u){const e=l.project.items.filter((e=>e.channel===a));!e.length||e.length>1?(u=l.project.items[0].field,(0,o.warn)((0,d.selectionAsScaleDomainWrongEncodings)(e,a,n,u))):u=e[0].field}}else u=l.project.items[0].field,l.project.items.length>1&&(0,o.warn)((0,d.selectionAsScaleDomainWithoutField)(u));return`${l.name}[${(0,i.stringValue)((0,s.replacePathInField)(u))}]`}function g(e,t){for(const[n,r]of(0,s.entries)(e.component.selection??{})){const i=e.getName(`lookup_${n}`);e.component.data.outputNodes[i]=r.materialized=new l.OutputNode(new u.FilterNode(t,e,{param:n}),i,c.DataSourceType.Lookup,e.component.data.outputNodeRefCounts)}}},34960:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ANIM_CLOCK:()=>f,ANIM_VALUE:()=>d,CURR:()=>c,EASED_ANIM_CLOCK:()=>p,IS_PLAYING:()=>y,LAST_TICK:()=>m,MAX_RANGE_EXTENT:()=>g,MIN_EXTENT:()=>h,THROTTLE:()=>v,default:()=>b});var r=n(26372),i=n(93794),a=n(84847),o=n(79989),s=n(56133),l=n(95967),u=n(95290);const c="_curr",d="anim_value",f="anim_clock",p="eased_anim_clock",h="min_extent",g="max_range_extent",m="last_tick_at",y="is_playing",v=1/60*1e3,b={defined:e=>"point"===e.type,topLevelSignals:(e,t,n)=>((0,i.isTimerSelection)(t)&&(n=n.concat([{name:f,init:"0",on:[{events:{type:"timer",throttle:v},update:`${y} ? (${f} + (now() - ${m}) > ${g} ? 0 : ${f} + (now() - ${m})) : ${f}`}]},{name:m,init:"now()",on:[{events:[{signal:f},{signal:y}],update:"now()"}]},{name:y,init:"true"}])),n),signals:(e,t,n)=>{const c=t.name,m=c+l.TUPLE_FIELDS,y=t.project,v="(item().isVoronoi ? datum.datum : datum)",b=(0,o.vals)(e.component.selection??{}).reduce(((e,t)=>"interval"===t.type?e.concat(t.name+s.BRUSH):e),[]).map((e=>`indexof(item().mark.name, '${e}') < 0`)).join(" && "),x="datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0"+(b?` && ${b}`:"");let E=`unit: ${(0,i.unitName)(e)}, `;if(t.project.hasSelectionId)E+=`${a.SELECTION_ID}: ${v}[${(0,r.stringValue)(a.SELECTION_ID)}]`;else if((0,i.isTimerSelection)(t))E+=`fields: ${m}, values: [${d} ? ${d} : ${h}]`;else{E+=`fields: ${m}, values: [${y.items.map((t=>{const n=e.fieldDef(t.channel);return n?.bin?`[${v}[${(0,r.stringValue)(e.vgField(t.channel,{}))}], ${v}[${(0,r.stringValue)(e.vgField(t.channel,{binSuffix:"end"}))}]]`:`${v}[${(0,r.stringValue)(t.field)}]`})).join(", ")}]`}if((0,i.isTimerSelection)(t))return n.concat((S=t.name,w=e.scaleName(u.TIME),[{name:p,update:f},{name:`${S}_domain`,init:`domain('${w}')`},{name:h,init:`extent(${S}_domain)[0]`},{name:g,init:`extent(range('${w}'))[1]`},{name:d,update:`invert('${w}', ${p})`}]),[{name:c+i.TUPLE,on:[{events:[{signal:p},{signal:d}],update:`{${E}}`,force:!0}]}]);{const e=t.events;return n.concat([{name:c+i.TUPLE,on:e?[{events:e,update:`${x} ? {${E}} : null`,force:!0}]:[]}])}var S,w}}},95967:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SelectionProjectionComponent:()=>p,TUPLE_FIELDS:()=>f,default:()=>h});var r=n(26372),i=n(95290),a=n(20916),o=n(31179),s=n(84847),l=n(79989),u=n(62277),c=n(52128),d=n(96598);const f="_tuple_fields";class p{constructor(...e){this.items=e,this.hasChannel={},this.hasField={},this.hasSelectionId=!1}}const h={defined:()=>!0,parse:(e,t,n)=>{const c=t.name,f=t.project??(t.project=new p),h={},g={},m=new Set,y=(e,t)=>{const n="visual"===t?e.channel:e.field;let r=(0,l.varName)(`${c}_${n}`);for(let e=1;m.has(r);e++)r=(0,l.varName)(`${c}_${n}_${e}`);return m.add(r),{[t]:r}},v=t.type,b=e.config.selection[v],x=void 0!==n.value?(0,r.array)(n.value):null;let{fields:E,encodings:S}=(0,r.isObject)(n.select)?n.select:{};if(!E&&!S&&x)for(const e of x)if((0,r.isObject)(e))for(const t of(0,l.keys)(e))(0,i.isSingleDefUnitChannel)(t)?(S||(S=[])).push(t):"interval"===v?(a.warn(a.message.INTERVAL_INITIALIZED_WITH_POS),S=b.encodings):(E??(E=[])).push(t);E||S||(S=b.encodings,"fields"in b&&(E=b.fields));for(const t of S??[]){const n=e.fieldDef(t);if(n){let r=n.field;if(n.aggregate){a.warn(a.message.cannotProjectAggregate(t,n.aggregate));continue}if(!r){a.warn(a.message.cannotProjectOnChannelWithoutField(t));continue}if(n.timeUnit&&!(0,d.isBinnedTimeUnit)(n.timeUnit)){r=e.vgField(t);const i={timeUnit:n.timeUnit,as:r,field:n.field};g[(0,l.hash)(i)]=i}if(!h[r]){const a={field:r,channel:t,type:"interval"===v&&(0,i.isScaleChannel)(t)&&(0,o.hasContinuousDomain)(e.getScaleComponent(t).get("type"))?"R":n.bin?"R-RE":"E",index:f.items.length};a.signals={...y(a,"data"),...y(a,"visual")},f.items.push(h[r]=a),f.hasField[r]=h[r],f.hasSelectionId=f.hasSelectionId||r===s.SELECTION_ID,(0,i.isGeoPositionChannel)(t)?(a.geoChannel=t,a.channel=(0,i.getPositionChannelFromLatLong)(t),f.hasChannel[a.channel]=h[r]):f.hasChannel[t]=h[r]}}else a.warn(a.message.cannotProjectOnChannelWithoutField(t))}for(const e of E??[]){if(f.hasField[e])continue;const t={type:"E",field:e,index:f.items.length};t.signals={...y(t,"data")},f.items.push(t),f.hasField[e]=t,f.hasSelectionId=f.hasSelectionId||e===s.SELECTION_ID}x&&(t.init=x.map((e=>f.items.map((t=>(0,r.isObject)(e)?void 0!==e[t.geoChannel||t.channel]?e[t.geoChannel||t.channel]:e[t.field]:e))))),(0,l.isEmpty)(g)||(f.timeUnit=new u.TimeUnitNode(null,g))},signals:(e,t,n)=>{const r=t.name+f;return n.filter((e=>e.name===r)).length>0||t.project.hasSelectionId?n:n.concat({name:r,value:t.project.items.map(c.assembleProjection)})}}},70439:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c,domain:()=>d});var r=n(26372),i=n(93794),a=n(95290),o=n(20916),s=n(31179),l=n(7302),u=n(79989);const c={defined:e=>"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind,parse:(e,t)=>{const n=t.scales=[];for(const r of t.project.items){const i=r.channel;if(!(0,a.isScaleChannel)(i))continue;const l=e.getScaleComponent(i),u=l?l.get("type"):void 0;"sequential"==u&&o.warn(o.message.SEQUENTIAL_SCALE_DEPRECATED),l&&(0,s.hasContinuousDomain)(u)?(l.set("selectionExtent",{param:t.name,field:r.field},!0),n.push(r)):o.warn(o.message.SCALE_BINDINGS_CONTINUOUS)}},topLevelSignals:(e,t,n)=>{const a=t.scales.filter((e=>0===n.filter((t=>t.name===e.signals.data)).length));if(!e.parent||f(e)||0===a.length)return n;const o=n.find((e=>e.name===t.name));let s=o.update;if(s.includes(i.VL_SELECTION_RESOLVE))o.update=`{${a.map((e=>`${(0,r.stringValue)((0,u.replacePathInField)(e.field))}: ${e.signals.data}`)).join(", ")}}`;else{for(const e of a){const t=`${(0,r.stringValue)((0,u.replacePathInField)(e.field))}: ${e.signals.data}`;s.includes(t)||(s=`${s.substring(0,s.length-1)}, ${t}}`)}o.update=s}return n.concat(a.map((e=>({name:e.signals.data}))))},signals:(e,t,n)=>{if(e.parent&&!f(e))for(const e of t.scales){const t=n.find((t=>t.name===e.signals.data));t.push="outer",delete t.value,delete t.update}return n}};function d(e,t){return`domain(${(0,r.stringValue)(e.scaleName(t))})`}function f(e){return e.parent&&(0,l.isLayerModel)(e.parent)&&(!e.parent.parent||f(e.parent.parent))}},72164:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TOGGLE:()=>i,default:()=>a});var r=n(93794);const i="_toggle",a={defined:e=>"point"===e.type&&!(0,r.isTimerSelection)(e)&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+i,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+r.TUPLE,a=t.name+i;return`${a} ? null : ${n}, `+("global"===t.resolve?`${a} ? null : true, `:`${a} ? null : {unit: ${(0,r.unitName)(e)}}, `)+`${a} ? ${n} : null`}}},65800:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(45948),i=n(95290),a=n(56133),o=n(70439);const s="_translate_anchor",l="_translate_delta",u={defined:e=>"interval"===e.type&&e.translate,signals:(e,t,n)=>{const u=t.name,d=o.default.defined(t),f=u+s,{x:p,y:h}=t.project.hasChannel;let g=(0,r.parseSelector)(t.translate,"scope");return d||(g=g.map((e=>(e.between[0].markname=u+a.BRUSH,e)))),n.push({name:f,value:{},on:[{events:g.map((e=>e.between[0])),update:"{x: x(unit), y: y(unit)"+(void 0!==p?`, extent_x: ${d?(0,o.domain)(e,i.X):`slice(${p.signals.visual})`}`:"")+(void 0!==h?`, extent_y: ${d?(0,o.domain)(e,i.Y):`slice(${h.signals.visual})`}`:"")+"}"}]},{name:u+l,value:{},on:[{events:g,update:`{x: ${f}.x - x(unit), y: ${f}.y - y(unit)}`}]}),void 0!==p&&c(e,t,p,"width",n),void 0!==h&&c(e,t,h,"height",n),n}};function c(e,t,n,r,a){const u=t.name,c=u+s,d=u+l,f=n.channel,p=o.default.defined(t),h=a.find((e=>e.name===n.signals[p?"data":"visual"])),g=e.getSizeSignalRef(r).signal,m=e.getScaleComponent(f),y=m&&m.get("type"),v=m&&m.get("reverse"),b=p?f===i.X?v?"":"-":v?"-":"":"",x=`${c}.extent_${f}`,E=`${p&&m?"log"===y?"panLog":"symlog"===y?"panSymlog":"pow"===y?"panPow":"panLinear":"panLinear"}(${x}, ${`${b}${d}.${f} / ${p?`${g}`:`span(${x})`}`}${p?"pow"===y?`, ${m.get("exponent")??1}`:"symlog"===y?`, ${m.get("constant")??1}`:"":""})`;h.on.push({events:{signal:d},update:p?E:`clampRange(${E}, 0, ${g})`})}},62539:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(45948),i=n(26372),a=n(95290),o=n(56133),s=n(70439);const l="_zoom_anchor",u="_zoom_delta",c={defined:e=>"interval"===e.type&&e.zoom,signals:(e,t,n)=>{const c=t.name,f=s.default.defined(t),p=c+u,{x:h,y:g}=t.project.hasChannel,m=(0,i.stringValue)(e.scaleName(a.X)),y=(0,i.stringValue)(e.scaleName(a.Y));let v=(0,r.parseSelector)(t.zoom,"scope");return f||(v=v.map((e=>(e.markname=c+o.BRUSH,e)))),n.push({name:c+l,on:[{events:v,update:f?"{"+[m?`x: invert(${m}, x(unit))`:"",y?`y: invert(${y}, y(unit))`:""].filter((e=>e)).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:p,on:[{events:v,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==h&&d(e,t,h,"width",n),void 0!==g&&d(e,t,g,"height",n),n}};function d(e,t,n,r,i){const a=t.name,o=n.channel,c=s.default.defined(t),d=i.find((e=>e.name===n.signals[c?"data":"visual"])),f=e.getSizeSignalRef(r).signal,p=e.getScaleComponent(o),h=p&&p.get("type"),g=c?(0,s.domain)(e,o):d.name,m=a+u,y=`${c&&p?"log"===h?"zoomLog":"symlog"===h?"zoomSymlog":"pow"===h?"zoomPow":"zoomLinear":"zoomLinear"}(${g}, ${`${a}${l}.${o}`}, ${m}${c?"pow"===h?`, ${p.get("exponent")??1}`:"symlog"===h?`, ${p.get("constant")??1}`:"":""})`;d.on.push({events:{signal:m},update:c?y:`clampRange(${y}, 0, ${f})`})}},77547:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SignalRefWrapper:()=>r});class r{constructor(e){Object.defineProperty(this,"signal",{enumerable:!0,get:e})}static fromName(e,t){return new r((()=>e(t)))}}},96159:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Split:()=>a,defaultTieBreaker:()=>u,makeExplicit:()=>o,makeImplicit:()=>s,mergeValuesWithExplicit:()=>c,tieBreakByComparing:()=>l});var r=n(20916),i=n(79989);class a{constructor(e={},t={}){this.explicit=e,this.implicit=t}clone(){return new a((0,i.duplicate)(this.explicit),(0,i.duplicate)(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(e){return(0,i.getFirstDefined)(this.explicit[e],this.implicit[e])}getWithExplicit(e){return void 0!==this.explicit[e]?{explicit:!0,value:this.explicit[e]}:void 0!==this.implicit[e]?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}setWithExplicit(e,{value:t,explicit:n}){void 0!==t&&this.set(e,t,n)}set(e,t,n){return delete this[n?"implicit":"explicit"][e],this[n?"explicit":"implicit"][e]=t,this}copyKeyFromSplit(e,{explicit:t,implicit:n}){void 0!==t[e]?this.set(e,t[e],!0):void 0!==n[e]&&this.set(e,n[e],!1)}copyKeyFromObject(e,t){void 0!==t[e]&&this.set(e,t[e],!0)}copyAll(e){for(const t of(0,i.keys)(e.combine())){const n=e.getWithExplicit(t);this.setWithExplicit(t,n)}}}function o(e){return{explicit:!0,value:e}}function s(e){return{explicit:!1,value:e}}function l(e){return(t,n,r,i)=>{const a=e(t.value,n.value);return a>0?t:a<0?n:u(t,n,r,i)}}function u(e,t,n,i){return e.explicit&&t.explicit&&r.warn(r.message.mergeConflictingProperty(n,i,e.value,t.value)),e}function c(e,t,n,r,a=u){return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:(0,i.deepEqual)(e.value,t.value)?e:a(e,t,n,r)}},92649:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnitModel:()=>k});var r=n(26372),i=n(65032),a=n(95290),o=n(79543),s=n(89081),l=n(98348),u=n(3802),c=n(75028),d=n(84847),f=n(89820),p=n(68889),h=n(79989),g=n(5593),m=n(32134),y=n(15058),v=n(80219),b=n(6871),x=n(81693),E=n(27588),S=n(55823),w=n(60288),_=n(7302),A=n(52128),C=n(83937),T=n(34960);class k extends _.ModelWithField{constructor(e,t,n,r={},i){super(e,"unit",t,n,i,void 0,(0,f.isFrameMixins)(e)?e.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[],this.correctDataNames=e=>(e.from?.data&&(e.from.data=this.lookupDataSource(e.from.data),"time"in this.encoding&&(e.from.data=e.from.data+T.CURR)),e.from?.facet?.data&&(e.from.facet.data=this.lookupDataSource(e.from.facet.data)),e);const a=(0,c.isMarkDef)(e.mark)?{...e.mark}:{type:e.mark},o=a.type;void 0===a.filled&&(a.filled=(0,S.defaultFilled)(a,i,{graticule:e.data&&(0,s.isGraticuleGenerator)(e.data)}));const u=this.encoding=(0,l.initEncoding)(e.encoding||{},o,a.filled,i);this.markDef=(0,S.initMarkdef)(a,u,i),this.size=(0,x.initLayoutSize)({encoding:u,size:(0,f.isFrameMixins)(e)?{...r,...e.width?{width:e.width}:{},...e.height?{height:e.height}:{}}:r}),this.stack=(0,p.stack)(this.markDef,u),this.specifiedScales=this.initScales(o,u),this.specifiedAxes=this.initAxes(u),this.specifiedLegends=this.initLegends(u),this.specifiedProjection=e.projection,this.selection=(e.params??[]).filter((e=>(0,d.isSelectionParameter)(e)))}get hasProjection(){const{encoding:e}=this,t=this.mark===c.GEOSHAPE,n=e&&a.GEOPOSITION_CHANNELS.some((t=>(0,o.isFieldOrDatumDef)(e[t])));return t||n}scaleDomain(e){const t=this.specifiedScales[e];return t?t.domain:void 0}axis(e){return this.specifiedAxes[e]}legend(e){return this.specifiedLegends[e]}initScales(e,t){return a.SCALE_CHANNELS.reduce(((e,n)=>{const r=(0,o.getFieldOrDatumDef)(t[n]);return r&&(e[n]=this.initScale(r.scale??{})),e}),{})}initScale(e){const{domain:t,range:n}=e,i=(0,u.replaceExprRef)(e);return(0,r.isArray)(t)&&(i.domain=t.map(y.signalRefOrValue)),(0,r.isArray)(n)&&(i.range=n.map(y.signalRefOrValue)),i}initAxes(e){return a.POSITION_SCALE_CHANNELS.reduce(((t,n)=>{const r=e[n];if((0,o.isFieldOrDatumDef)(r)||n===a.X&&(0,o.isFieldOrDatumDef)(e.x2)||n===a.Y&&(0,o.isFieldOrDatumDef)(e.y2)){const e=(0,o.isFieldOrDatumDef)(r)?r.axis:void 0;t[n]=e?this.initAxis({...e}):e}return t}),{})}initAxis(e){const t=(0,h.keys)(e),n={};for(const r of t){const t=e[r];n[r]=(0,i.isConditionalAxisValue)(t)?(0,y.signalOrValueRefWithCondition)(t):(0,y.signalRefOrValue)(t)}return n}initLegends(e){return a.NONPOSITION_SCALE_CHANNELS.reduce(((t,n)=>{const r=(0,o.getFieldOrDatumDef)(e[n]);if(r&&(0,a.supportLegend)(n)){const e=r.legend;t[n]=e?(0,u.replaceExprRef)(e):e}return t}),{})}parseData(){this.component.data=(0,v.parseData)(this)}parseLayoutSize(){(0,E.parseUnitLayoutSize)(this)}parseSelections(){this.component.selection=(0,C.parseUnitSelection)(this,this.selection)}parseMarkGroup(){this.component.mark=(0,w.parseMarkGroups)(this)}parseAxesAndHeaders(){this.component.axes=(0,m.parseUnitAxes)(this)}assembleSelectionTopLevelSignals(e){return(0,A.assembleTopLevelSignals)(this,e)}assembleSignals(){return[...(0,g.assembleAxisSignals)(this),...(0,A.assembleUnitSelectionSignals)(this,[])]}assembleSelectionData(e){return(0,A.assembleUnitSelectionData)(this,e)}assembleLayout(){return null}assembleLayoutSignals(){return(0,b.assembleLayoutSignals)(this)}assembleMarks(){let e=this.component.mark??[];return this.parent&&(0,_.isLayerModel)(this.parent)||(e=(0,A.assembleUnitSelectionMarks)(this,e)),e.map(this.correctDataNames)}assembleGroupStyle(){const{style:e}=this.view||{};return void 0!==e?e:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(e){return l.channelHasField(this.encoding,e)}fieldDef(e){const t=this.encoding[e];return(0,o.getFieldDef)(t)}typedFieldDef(e){const t=this.fieldDef(e);return(0,o.isTypedFieldDef)(t)?t:null}}},88655:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CompositeMarkNormalizer:()=>a});var r=n(75028),i=n(68859);class a{constructor(e,t){this.name=e,this.run=t}hasMatchingType(e){return!!(0,i.isUnitSpec)(e)&&(0,r.getMarkType)(e.mark)===this.name}}},67982:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BOXPLOT:()=>d,BOXPLOT_PARTS:()=>f,boxPlotNormalizer:()=>p,getBoxPlotType:()=>h,normalizeBoxPlot:()=>g});var r=n(26372),i=n(15058),a=n(98348),o=n(20916),s=n(75028),l=n(79989),u=n(88655),c=n(867);const d="boxplot",f=["box","median","outliers","rule","ticks"],p=new u.CompositeMarkNormalizer(d,g);function h(e){return(0,r.isNumber)(e)?"tukey":e}function g(e,{config:t}){e={...e,encoding:(0,a.normalizeEncoding)(e.encoding,t)};const{mark:n,encoding:u,params:f,projection:p,...g}=e,y=(0,s.isMarkDef)(n)?n:{type:n};f&&o.warn(o.message.selectionNotSupported("boxplot"));const v=y.extent??t.boxplot.extent,b=(0,i.getMarkPropOrConfig)("size",y,t),x=y.invalid,E=h(v),{bins:S,timeUnits:w,transform:_,continuousAxisChannelDef:A,continuousAxis:C,groupby:T,aggregate:k,encodingWithoutContinuousAxis:R,ticksOrient:D,boxOrient:N,customTooltipWithoutAggregatedField:O}=function(e,t,n){const r=(0,c.compositeMarkOrient)(e,d),{continuousAxisChannelDef:i,continuousAxis:o}=(0,c.compositeMarkContinuousAxis)(e,r,d),s=i.field,u=(0,l.removePathFromField)(s),f=h(t),p=[...m(s),{op:"median",field:s,as:`mid_box_${u}`},{op:"min",field:s,as:("min-max"===f?"lower_whisker_":"min_")+u},{op:"max",field:s,as:("min-max"===f?"upper_whisker_":"max_")+u}],g="min-max"===f||"tukey"===f?[]:[{calculate:`${(0,l.accessWithDatumToUnescapedPath)(`upper_box_${u}`)} - ${(0,l.accessWithDatumToUnescapedPath)(`lower_box_${u}`)}`,as:`iqr_${u}`},{calculate:`min(${(0,l.accessWithDatumToUnescapedPath)(`upper_box_${u}`)} + ${(0,l.accessWithDatumToUnescapedPath)(`iqr_${u}`)} * ${t}, ${(0,l.accessWithDatumToUnescapedPath)(`max_${u}`)})`,as:`upper_whisker_${u}`},{calculate:`max(${(0,l.accessWithDatumToUnescapedPath)(`lower_box_${u}`)} - ${(0,l.accessWithDatumToUnescapedPath)(`iqr_${u}`)} * ${t}, ${(0,l.accessWithDatumToUnescapedPath)(`min_${u}`)})`,as:`lower_whisker_${u}`}],{[o]:y,...v}=e.encoding,{customTooltipWithoutAggregatedField:b,filteredEncoding:x}=(0,c.filterTooltipWithAggregatedField)(v),{bins:E,timeUnits:S,aggregate:w,groupby:_,encoding:A}=(0,a.extractTransformsFromEncoding)(x,n),C="vertical"===r?"horizontal":"vertical",T=r,k=[...E,...S,{aggregate:[...w,...p],groupby:_},...g];return{bins:E,timeUnits:S,transform:k,groupby:_,aggregate:w,continuousAxisChannelDef:i,continuousAxis:o,encodingWithoutContinuousAxis:A,ticksOrient:C,boxOrient:T,customTooltipWithoutAggregatedField:b}}(e,v,t),F=(0,l.removePathFromField)(A.field),{color:P,size:M,...I}=R,$=e=>(0,c.makeCompositeAggregatePartFactory)(y,C,A,e,t.boxplot),L=$(I),B=$(R),U=((0,r.isObject)(t.boxplot.box)?t.boxplot.box.color:t.mark.color)||"#4c78a8",z=$({...I,...M?{size:M}:{},color:{condition:{test:`${(0,l.accessWithDatumToUnescapedPath)(`lower_box_${A.field}`)} >= ${(0,l.accessWithDatumToUnescapedPath)(`upper_box_${A.field}`)}`,...P||{value:U}}}}),q=(0,c.getCompositeMarkTooltip)([{fieldPrefix:"min-max"===E?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===E?"lower_whisker_":"min_",titlePrefix:"Min"}],A,R),j={type:"tick",color:"black",opacity:1,orient:D,invalid:x,aria:!1},H="min-max"===E?q:(0,c.getCompositeMarkTooltip)([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],A,R),G=[...L({partName:"rule",mark:{type:"rule",invalid:x,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:H}),...L({partName:"rule",mark:{type:"rule",invalid:x,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:H}),...L({partName:"ticks",mark:j,positionPrefix:"lower_whisker",extraEncoding:H}),...L({partName:"ticks",mark:j,positionPrefix:"upper_whisker",extraEncoding:H})],V=[..."tukey"!==E?G:[],...B({partName:"box",mark:{type:"bar",...b?{size:b}:{},orient:N,invalid:x,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:q}),...z({partName:"median",mark:{type:"tick",invalid:x,...(0,r.isObject)(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...b?{size:b}:{},orient:D,aria:!1},positionPrefix:"mid_box",extraEncoding:q})];if("min-max"===E)return{...g,transform:(g.transform??[]).concat(_),layer:V};const W=(0,l.accessWithDatumToUnescapedPath)(`lower_box_${A.field}`),Y=(0,l.accessWithDatumToUnescapedPath)(`upper_box_${A.field}`),X=`(${Y} - ${W})`,K=`${W} - ${v} * ${X}`,J=`${Y} + ${v} * ${X}`,Q=(0,l.accessWithDatumToUnescapedPath)(A.field),Z={joinaggregate:m(A.field),groupby:T},ee={transform:[{filter:`(${K} <= ${Q}) && (${Q} <= ${J})`},{aggregate:[{op:"min",field:A.field,as:`lower_whisker_${F}`},{op:"max",field:A.field,as:`upper_whisker_${F}`},{op:"min",field:`lower_box_${A.field}`,as:`lower_box_${F}`},{op:"max",field:`upper_box_${A.field}`,as:`upper_box_${F}`},...k],groupby:T}],layer:G},{tooltip:te,...ne}=I,{scale:re,axis:ie}=A,ae=(0,c.getTitle)(A),oe=(0,l.omit)(ie,["title"]),se=(0,c.partLayerMixins)(y,"outliers",t.boxplot,{transform:[{filter:`(${Q} < ${K}) || (${Q} > ${J})`}],mark:"point",encoding:{[C]:{field:A.field,type:A.type,...void 0!==ae?{title:ae}:{},...void 0!==re?{scale:re}:{},...(0,l.isEmpty)(oe)?{}:{axis:oe}},...ne,...P?{color:P}:{},...O?{tooltip:O}:{}}})[0];let le;const ue=[...S,...w,Z];return se?le={transform:ue,layer:[se,ee]}:(le=ee,le.transform.unshift(...ue)),{...g,layer:[le,{transform:_,layer:V}]}}function m(e){const t=(0,l.removePathFromField)(e);return[{op:"q1",field:e,as:`lower_box_${t}`},{op:"q3",field:e,as:`upper_box_${t}`}]}},867:(e,t,n)=>{"use strict";n.r(t),n.d(t,{compositeMarkContinuousAxis:()=>g,compositeMarkOrient:()=>y,filterTooltipWithAggregatedField:()=>c,getCompositeMarkTooltip:()=>d,getTitle:()=>f,makeCompositeAggregatePartFactory:()=>p,partLayerMixins:()=>h});var r=n(26372),i=n(79543),a=n(98348),o=n(20916),s=n(75028),l=n(79989),u=n(5711);function c(e){const{tooltip:t,...n}=e;if(!t)return{filteredEncoding:n};let i,a;if((0,r.isArray)(t)){for(const e of t)e.aggregate?(i||(i=[]),i.push(e)):(a||(a=[]),a.push(e));i&&(n.tooltip=i)}else t.aggregate?n.tooltip=t:a=t;return(0,r.isArray)(a)&&1===a.length&&(a=a[0]),{customTooltipWithoutAggregatedField:a,filteredEncoding:n}}function d(e,t,n,r=!0){if("tooltip"in n)return{tooltip:n.tooltip};const o=e.map((({fieldPrefix:e,titlePrefix:n})=>{const i=r?` of ${f(t)}`:"";return{field:e+t.field,type:t.type,title:(0,u.isSignalRef)(n)?{signal:`${n}"${escape(i)}"`}:n+i}})),s=(0,a.fieldDefs)(n).map(i.toStringFieldDef);return{tooltip:[...o,...(0,l.unique)(s,l.hash)]}}function f(e){const{title:t,field:n}=e;return(0,l.getFirstDefined)(t,n)}function p(e,t,n,i,a){const{scale:o,axis:s}=n;return({partName:l,mark:u,positionPrefix:c,endPositionPrefix:d,extraEncoding:p={}})=>{const g=f(n);return h(e,l,a,{mark:u,encoding:{[t]:{field:`${c}_${n.field}`,type:n.type,...void 0!==g?{title:g}:{},...void 0!==o?{scale:o}:{},...void 0!==s?{axis:s}:{}},...(0,r.isString)(d)?{[`${t}2`]:{field:`${d}_${n.field}`}}:{},...i,...p}})}}function h(e,t,n,i){const{clip:a,color:o,opacity:l}=e,u=e.type;return e[t]||void 0===e[t]&&n[t]?[{...i,mark:{...n[t],...a?{clip:a}:{},...o?{color:o}:{},...l?{opacity:l}:{},...(0,s.isMarkDef)(i.mark)?i.mark:{type:i.mark},style:`${u}-${String(t)}`,...(0,r.isBoolean)(e[t])?{}:e[t]}}]:[]}function g(e,t,n){const{encoding:r}=e,i="vertical"===t?"y":"x",a=r[i],o=r[`${i}2`],s=r[`${i}Error`],l=r[`${i}Error2`];return{continuousAxisChannelDef:m(a,n),continuousAxisChannelDef2:m(o,n),continuousAxisChannelDefError:m(s,n),continuousAxisChannelDefError2:m(l,n),continuousAxis:i}}function m(e,t){if(e?.aggregate){const{aggregate:n,...r}=e;return n!==t&&o.warn(o.message.errorBarContinuousAxisHasCustomizedAggregate(n,t)),r}return e}function y(e,t){const{mark:n,encoding:r}=e,{x:a,y:o}=r;if((0,s.isMarkDef)(n)&&n.orient)return n.orient;if((0,i.isContinuousFieldOrDatumDef)(a)){if((0,i.isContinuousFieldOrDatumDef)(o)){const e=(0,i.isFieldDef)(a)&&a.aggregate,n=(0,i.isFieldDef)(o)&&o.aggregate;if(e||n!==t){if(n||e!==t){if(e===t&&n===t)throw new Error("Both x and y cannot have aggregate");return(0,i.isFieldOrDatumDefForTimeFormat)(o)&&!(0,i.isFieldOrDatumDefForTimeFormat)(a)?"horizontal":"vertical"}return"horizontal"}return"vertical"}return"horizontal"}if((0,i.isContinuousFieldOrDatumDef)(o))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}},52365:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ERRORBAND:()=>l,ERRORBAND_PARTS:()=>u,errorBandNormalizer:()=>c,normalizeErrorBand:()=>d});var r=n(98348),i=n(20916),a=n(88655),o=n(867),s=n(55833);const l="errorband",u=["band","borders"],c=new a.CompositeMarkNormalizer(l,d);function d(e,{config:t}){e={...e,encoding:(0,r.normalizeEncoding)(e.encoding,t)};const{transform:n,continuousAxisChannelDef:a,continuousAxis:u,encodingWithoutContinuousAxis:c,markDef:d,outerSpec:f,tooltipEncoding:p}=(0,s.errorBarParams)(e,l,t),h=d,g=(0,o.makeCompositeAggregatePartFactory)(h,u,a,c,t.errorband),m=void 0!==e.encoding.x&&void 0!==e.encoding.y;let y={type:m?"area":"rect"},v={type:m?"line":"rule"};const b={...h.interpolate?{interpolate:h.interpolate}:{},...h.tension&&h.interpolate?{tension:h.tension}:{}};return m?(y={...y,...b,ariaRoleDescription:"errorband"},v={...v,...b,aria:!1}):h.interpolate?i.warn(i.message.errorBand1DNotSupport("interpolate")):h.tension&&i.warn(i.message.errorBand1DNotSupport("tension")),{...f,transform:n,layer:[...g({partName:"band",mark:y,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:p}),...g({partName:"borders",mark:v,positionPrefix:"lower",extraEncoding:p}),...g({partName:"borders",mark:v,positionPrefix:"upper",extraEncoding:p})]}}},55833:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ERRORBAR:()=>c,ERRORBAR_PARTS:()=>d,errorBarNormalizer:()=>f,errorBarParams:()=>g,normalizeErrorBar:()=>p});var r=n(79543),i=n(98348),a=n(20916),o=n(75028),s=n(79989),l=n(88655),u=n(867);const c="errorbar",d=["ticks","rule"],f=new l.CompositeMarkNormalizer(c,p);function p(e,{config:t}){e={...e,encoding:(0,i.normalizeEncoding)(e.encoding,t)};const{transform:n,continuousAxisChannelDef:r,continuousAxis:a,encodingWithoutContinuousAxis:o,ticksOrient:s,markDef:l,outerSpec:d,tooltipEncoding:f}=g(e,c,t);delete o.size;const p=(0,u.makeCompositeAggregatePartFactory)(l,a,r,o,t.errorbar),h=l.thickness,m=l.size,y={type:"tick",orient:s,aria:!1,...void 0!==h?{thickness:h}:{},...void 0!==m?{size:m}:{}},v=[...p({partName:"ticks",mark:y,positionPrefix:"lower",extraEncoding:f}),...p({partName:"ticks",mark:y,positionPrefix:"upper",extraEncoding:f}),...p({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...void 0!==h?{size:h}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:f})];return{...d,transform:n,...v.length>1?{layer:v}:{...v[0]}}}function h(e,t){const{encoding:n}=e;if(function(e){return((0,r.isFieldOrDatumDef)(e.x)||(0,r.isFieldOrDatumDef)(e.y))&&!(0,r.isFieldOrDatumDef)(e.x2)&&!(0,r.isFieldOrDatumDef)(e.y2)&&!(0,r.isFieldOrDatumDef)(e.xError)&&!(0,r.isFieldOrDatumDef)(e.xError2)&&!(0,r.isFieldOrDatumDef)(e.yError)&&!(0,r.isFieldOrDatumDef)(e.yError2)}(n))return{orient:(0,u.compositeMarkOrient)(e,t),inputType:"raw"};const i=function(e){return(0,r.isFieldOrDatumDef)(e.x2)||(0,r.isFieldOrDatumDef)(e.y2)}(n),a=function(e){return(0,r.isFieldOrDatumDef)(e.xError)||(0,r.isFieldOrDatumDef)(e.xError2)||(0,r.isFieldOrDatumDef)(e.yError)||(0,r.isFieldOrDatumDef)(e.yError2)}(n),o=n.x,s=n.y;if(i){if(a)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const e=n.x2,i=n.y2;if((0,r.isFieldOrDatumDef)(e)&&(0,r.isFieldOrDatumDef)(i))throw new Error(`${t} cannot have both x2 and y2`);if((0,r.isFieldOrDatumDef)(e)){if((0,r.isContinuousFieldOrDatumDef)(o))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}if((0,r.isFieldOrDatumDef)(i)){if((0,r.isContinuousFieldOrDatumDef)(s))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}{const e=n.xError,i=n.xError2,a=n.yError,l=n.yError2;if((0,r.isFieldOrDatumDef)(i)&&!(0,r.isFieldOrDatumDef)(e))throw new Error(`${t} cannot have xError2 without xError`);if((0,r.isFieldOrDatumDef)(l)&&!(0,r.isFieldOrDatumDef)(a))throw new Error(`${t} cannot have yError2 without yError`);if((0,r.isFieldOrDatumDef)(e)&&(0,r.isFieldOrDatumDef)(a))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if((0,r.isFieldOrDatumDef)(e)){if((0,r.isContinuousFieldOrDatumDef)(o))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if((0,r.isFieldOrDatumDef)(a)){if((0,r.isContinuousFieldOrDatumDef)(s))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function g(e,t,n){const{mark:l,encoding:c,params:d,projection:f,...p}=e,g=(0,o.isMarkDef)(l)?l:{type:l};d&&a.warn(a.message.selectionNotSupported(t));const{orient:y,inputType:v}=h(e,t),{continuousAxisChannelDef:b,continuousAxisChannelDef2:x,continuousAxisChannelDefError:E,continuousAxisChannelDefError2:S,continuousAxis:w}=(0,u.compositeMarkContinuousAxis)(e,y,t),{errorBarSpecificAggregate:_,postAggregateCalculates:A,tooltipSummary:C,tooltipTitleWithFieldName:T}=function(e,t,n,i,o,l,u,c){let d=[],f=[];const p=t.field;let h,g=!1;if("raw"===l){const t=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":c.errorbar.center,n=e.extent?e.extent:"mean"===t?"stderr":"iqr";if("median"===t!=("iqr"===n)&&a.warn(a.message.errorBarCenterIsUsedWithWrongExtent(t,n,u)),"stderr"===n||"stdev"===n)d=[{op:n,field:p,as:`extent_${p}`},{op:t,field:p,as:`center_${p}`}],f=[{calculate:`${(0,s.accessWithDatumToUnescapedPath)(`center_${p}`)} + ${(0,s.accessWithDatumToUnescapedPath)(`extent_${p}`)}`,as:`upper_${p}`},{calculate:`${(0,s.accessWithDatumToUnescapedPath)(`center_${p}`)} - ${(0,s.accessWithDatumToUnescapedPath)(`extent_${p}`)}`,as:`lower_${p}`}],h=[{fieldPrefix:"center_",titlePrefix:(0,s.titleCase)(t)},{fieldPrefix:"upper_",titlePrefix:m(t,n,"+")},{fieldPrefix:"lower_",titlePrefix:m(t,n,"-")}],g=!0;else{let e,t,i;"ci"===n?(e="mean",t="ci0",i="ci1"):(e="median",t="q1",i="q3"),d=[{op:t,field:p,as:`lower_${p}`},{op:i,field:p,as:`upper_${p}`},{op:e,field:p,as:`center_${p}`}],h=[{fieldPrefix:"upper_",titlePrefix:(0,r.title)({field:p,aggregate:i,type:"quantitative"},c,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:(0,r.title)({field:p,aggregate:t,type:"quantitative"},c,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:(0,r.title)({field:p,aggregate:e,type:"quantitative"},c,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&a.warn(a.message.errorBarCenterAndExtentAreNotNeeded(e.center,e.extent)),"aggregated-upper-lower"===l?(h=[],f=[{calculate:(0,s.accessWithDatumToUnescapedPath)(n.field),as:`upper_${p}`},{calculate:(0,s.accessWithDatumToUnescapedPath)(p),as:`lower_${p}`}]):"aggregated-error"===l&&(h=[{fieldPrefix:"",titlePrefix:p}],f=[{calculate:`${(0,s.accessWithDatumToUnescapedPath)(p)} + ${(0,s.accessWithDatumToUnescapedPath)(i.field)}`,as:`upper_${p}`}],o?f.push({calculate:`${(0,s.accessWithDatumToUnescapedPath)(p)} + ${(0,s.accessWithDatumToUnescapedPath)(o.field)}`,as:`lower_${p}`}):f.push({calculate:`${(0,s.accessWithDatumToUnescapedPath)(p)} - ${(0,s.accessWithDatumToUnescapedPath)(i.field)}`,as:`lower_${p}`}));for(const e of f)h.push({fieldPrefix:e.as.substring(0,6),titlePrefix:(0,s.replaceAll)((0,s.replaceAll)(e.calculate,"datum['",""),"']","")})}return{postAggregateCalculates:f,errorBarSpecificAggregate:d,tooltipSummary:h,tooltipTitleWithFieldName:g}}(g,b,x,E,S,v,t,n),{[w]:k,["x"===w?"x2":"y2"]:R,["x"===w?"xError":"yError"]:D,["x"===w?"xError2":"yError2"]:N,...O}=c,{bins:F,timeUnits:P,aggregate:M,groupby:I,encoding:$}=(0,i.extractTransformsFromEncoding)(O,n),L=[...M,..._],B="raw"!==v?[]:I,U=(0,u.getCompositeMarkTooltip)(C,b,$,T);return{transform:[...p.transform??[],...F,...P,...0===L.length?[]:[{aggregate:L,groupby:B}],...A],groupby:B,continuousAxisChannelDef:b,continuousAxis:w,encodingWithoutContinuousAxis:$,ticksOrient:"vertical"===y?"horizontal":"vertical",markDef:g,outerSpec:p,tooltipEncoding:U}}function m(e,t,n){return`${(0,s.titleCase)(e)} ${n} ${t}`}},19760:(e,t,n)=>{"use strict";n.r(t),n.d(t,{add:()=>u,getAllCompositeMarks:()=>d,remove:()=>c});var r=n(79989),i=n(88655),a=n(67982),o=n(52365),s=n(55833);const l={};function u(e,t,n){const r=new i.CompositeMarkNormalizer(e,t);l[e]={normalizer:r,parts:n}}function c(e){delete l[e]}function d(){return(0,r.keys)(l)}u(a.BOXPLOT,a.normalizeBoxPlot,a.BOXPLOT_PARTS),u(s.ERRORBAR,s.normalizeErrorBar,s.ERRORBAR_PARTS),u(o.ERRORBAND,o.normalizeErrorBand,o.ERRORBAND_PARTS)},24007:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_COLOR:()=>T,DEFAULT_FONT_SIZE:()=>C,DEFAULT_STEP:()=>E,colorSignalConfig:()=>k,defaultConfig:()=>_,defaultViewConfig:()=>S,fontConfig:()=>D,fontSizeSignalConfig:()=>R,getViewConfigContinuousSize:()=>v,getViewConfigDiscreteSize:()=>x,getViewConfigDiscreteStep:()=>b,initConfig:()=>F,isVgScheme:()=>w,stripAndRedirectConfig:()=>$});var r=n(26372),i=n(65032),a=n(15058),o=n(19760),s=n(3802),l=n(19609),u=n(41028),c=n(54116),d=n(75028),f=n(54778),p=n(31179),h=n(84847),g=n(89820),m=n(76447),y=n(79989);function v(e,t){return e[t]??e["width"===t?"continuousWidth":"continuousHeight"]}function b(e,t){const n=x(e,t);return(0,g.isStep)(n)?n.step:E}function x(e,t){const n=e[t]??e["width"===t?"discreteWidth":"discreteHeight"];return(0,y.getFirstDefined)(n,{step:e.step})}const E=20,S={continuousWidth:200,continuousHeight:200,step:E};function w(e){return(0,y.hasProperty)(e,"scheme")}const _={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:S,mark:d.defaultMarkConfig,arc:{},area:{},bar:d.defaultBarConfig,circle:{},geoshape:{},image:{},line:{},point:{},rect:d.defaultRectConfig,rule:{color:"black"},square:{},text:{color:"black"},tick:d.defaultTickConfig,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:p.defaultScaleConfig,projection:{},legend:c.defaultLegendConfig,header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:h.defaultConfig,style:{},title:{},facet:{spacing:g.DEFAULT_SPACING},concat:{spacing:g.DEFAULT_SPACING},normalizedNumberFormat:".0%"},A=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],C={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},T={blue:A[0],orange:A[1],red:A[2],teal:A[3],green:A[4],yellow:A[5],purple:A[6],pink:A[7],brown:A[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function k(e={}){return{signals:[{name:"color",value:(0,r.isObject)(e)?{...T,...e}:T}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function R(e){return{signals:[{name:"fontSize",value:(0,r.isObject)(e)?{...C,...e}:C}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function D(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}function N(e){const t=(0,y.keys)(e||{}),n={};for(const r of t){const t=e[r];n[r]=(0,i.isConditionalAxisValue)(t)?(0,a.signalOrValueRefWithCondition)(t):(0,a.signalRefOrValue)(t)}return n}const O=[...d.MARK_CONFIGS,...i.AXIS_CONFIGS,...u.HEADER_CONFIGS,"background","padding","legend","lineBreak","scale","style","title","view"];function F(e={}){const{color:t,font:n,fontSize:o,selection:l,...c}=e,f=(0,r.mergeConfig)({},(0,y.duplicate)(_),n?D(n):{},t?k(t):{},o?R(o):{},c||{});l&&(0,r.writeConfig)(f,"selection",l,!0);const p=(0,y.omit)(f,O);for(const e of["background","lineBreak","padding"])f[e]&&(p[e]=(0,a.signalRefOrValue)(f[e]));for(const e of d.MARK_CONFIGS)f[e]&&(p[e]=(0,s.replaceExprRef)(f[e]));for(const e of i.AXIS_CONFIGS)f[e]&&(p[e]=N(f[e]));for(const e of u.HEADER_CONFIGS)f[e]&&(p[e]=(0,s.replaceExprRef)(f[e]));if(f.legend&&(p.legend=(0,s.replaceExprRef)(f.legend)),f.scale){const{invalid:e,...t}=f.scale,n=(0,s.replaceExprRef)(e,{level:1});p.scale={...(0,s.replaceExprRef)(t),...(0,y.keys)(n).length>0?{invalid:n}:{}}}return f.style&&(p.style=function(e){const t=(0,y.keys)(e),n={};for(const r of t)n[r]=N(e[r]);return n}(f.style)),f.title&&(p.title=(0,s.replaceExprRef)(f.title)),f.view&&(p.view=(0,s.replaceExprRef)(f.view)),p}const P=new Set(["view",...d.PRIMITIVE_MARKS]),M=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],I={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],...d.VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX};function $(e){e=(0,y.duplicate)(e);for(const t of M)delete e[t];if(e.axis)for(const t in e.axis)(0,i.isConditionalAxisValue)(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of l.VL_ONLY_LEGEND_CONFIG)delete e.legend[t];if(e.mark){for(const t of d.VL_ONLY_MARK_CONFIG_PROPERTIES)delete e.mark[t];e.mark.tooltip&&(0,r.isObject)(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat((0,f.assembleParameterSignals)(e.params)),delete e.params);for(const t of P){for(const n of d.VL_ONLY_MARK_CONFIG_PROPERTIES)delete e[t][n];const n=I[t];if(n)for(const r of n)delete e[t][r];L(e,t)}for(const t of(0,o.getAllCompositeMarks)())delete e[t];!function(e){const{titleMarkConfig:t,subtitleMarkConfig:n,subtitle:r}=(0,m.extractTitleConfig)(e.title);(0,y.isEmpty)(t)||(e.style["group-title"]={...e.style["group-title"],...t});(0,y.isEmpty)(n)||(e.style["group-subtitle"]={...e.style["group-subtitle"],...n});(0,y.isEmpty)(r)?delete e.title:e.title=r}(e);for(const t in e)(0,r.isObject)(e[t])&&(0,y.isEmpty)(e[t])&&delete e[t];return(0,y.isEmpty)(e)?void 0:e}function L(e,t,n,r){"view"===t&&(n="cell");const i={...r?e[t][r]:e[t],...e.style[n??t]};(0,y.isEmpty)(i)||(e.style[n??t]=i),r||delete e[t]}},89081:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DataSourceType:()=>r,isGenerator:()=>l,isGraticuleGenerator:()=>d,isInlineData:()=>o,isNamedData:()=>s,isSequenceGenerator:()=>u,isSphereGenerator:()=>c,isUrlData:()=>a});var r,i=n(79989);function a(e){return(0,i.hasProperty)(e,"url")}function o(e){return(0,i.hasProperty)(e,"values")}function s(e){return(0,i.hasProperty)(e,"name")&&!a(e)&&!o(e)&&!l(e)}function l(e){return e&&(u(e)||c(e)||d(e))}function u(e){return(0,i.hasProperty)(e,"sequence")}function c(e){return(0,i.hasProperty)(e,"sphere")}function d(e){return(0,i.hasProperty)(e,"graticule")}!function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup",e[e.PreFilterInvalid=5]="PreFilterInvalid",e[e.PostFilterInvalid=6]="PostFilterInvalid"}(r||(r={}))},20032:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DAYS:()=>c,MONTHS:()=>l,SHORT_DAYS:()=>d,SHORT_MONTHS:()=>u,dateTimeExprToExpr:()=>h,dateTimeToExpr:()=>p,dateTimeToTimestamp:()=>g,isDateTime:()=>s});var r=n(26372),i=n(20916),a=n(96598),o=n(79989);function s(e){if(e&&(0,r.isObject)(e))for(const t of a.TIMEUNIT_PARTS)if((0,o.hasProperty)(e,t))return!0;return!1}const l=["january","february","march","april","may","june","july","august","september","october","november","december"],u=l.map((e=>e.substr(0,3))),c=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],d=c.map((e=>e.substr(0,3)));function f(e,t){const n=[];if(t&&void 0!==e.day&&(0,o.keys)(e).length>1&&(i.warn(i.message.droppedDay(e)),delete(e=(0,o.duplicate)(e)).day),void 0!==e.year?n.push(e.year):n.push(2012),void 0!==e.month){const a=t?function(e){if((0,o.isNumeric)(e)&&(e=+e),(0,r.isNumber)(e))return e-1;{const t=e.toLowerCase(),n=l.indexOf(t);if(-1!==n)return n;const r=t.substr(0,3),a=u.indexOf(r);if(-1!==a)return a;throw new Error(i.message.invalidTimeUnit("month",e))}}(e.month):e.month;n.push(a)}else if(void 0!==e.quarter){const a=t?function(e){if((0,o.isNumeric)(e)&&(e=+e),(0,r.isNumber)(e))return e>4&&i.warn(i.message.invalidTimeUnit("quarter",e)),e-1;throw new Error(i.message.invalidTimeUnit("quarter",e))}(e.quarter):e.quarter;n.push((0,r.isNumber)(a)?3*a:`${a}*3`)}else n.push(0);if(void 0!==e.date)n.push(e.date);else if(void 0!==e.day){const a=t?function(e){if((0,o.isNumeric)(e)&&(e=+e),(0,r.isNumber)(e))return e%7;{const t=e.toLowerCase(),n=c.indexOf(t);if(-1!==n)return n;const r=t.substr(0,3),a=d.indexOf(r);if(-1!==a)return a;throw new Error(i.message.invalidTimeUnit("day",e))}}(e.day):e.day;n.push((0,r.isNumber)(a)?a+1:`${a}+1`)}else n.push(1);for(const t of["hours","minutes","seconds","milliseconds"]){const r=e[t];n.push(void 0===r?0:r)}return n}function p(e){const t=f(e,!0).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}function h(e){const t=f(e,!1).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}function g(e){const t=f(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}},98348:(e,t,n)=>{"use strict";n.r(t),n.d(t,{channelHasField:()=>p,channelHasFieldOrDatum:()=>h,channelHasNestedOffsetScale:()=>g,extractTransformsFromEncoding:()=>y,fieldDefs:()=>E,forEach:()=>S,initEncoding:()=>b,isAggregate:()=>m,markChannelCompatible:()=>v,normalizeEncoding:()=>x,pathGroupingFields:()=>_,reduce:()=>w});var r=n(26372),i=n(54814),a=n(19664),o=n(95290),s=n(79543),l=n(20916),u=n(99273),c=n(79989),d=n(5711),f=n(96598);function p(e,t){const n=e&&e[t];return!!n&&((0,r.isArray)(n)?(0,c.some)(n,(e=>!!e.field)):(0,s.isFieldDef)(n)||(0,s.hasConditionalFieldDef)(n))}function h(e,t){const n=e&&e[t];return!!n&&((0,r.isArray)(n)?(0,c.some)(n,(e=>!!e.field)):(0,s.isFieldDef)(n)||(0,s.isDatumDef)(n)||(0,s.hasConditionalFieldOrDatumDef)(n))}function g(e,t){if((0,o.isXorY)(t)){const n=e[t];if(((0,s.isFieldDef)(n)||(0,s.isDatumDef)(n))&&((0,u.isDiscrete)(n.type)||(0,s.isFieldDef)(n)&&n.timeUnit)){return h(e,(0,o.getOffsetScaleChannel)(t))}}return!1}function m(e){return(0,c.some)(o.CHANNELS,(t=>{if(p(e,t)){const n=e[t];if((0,r.isArray)(n))return(0,c.some)(n,(e=>!!e.aggregate));{const e=(0,s.getFieldDef)(n);return e&&!!e.aggregate}}return!1}))}function y(e,t){const n=[],r=[],l=[],c=[],d={};return S(e,((p,h)=>{if((0,s.isFieldDef)(p)){const{field:g,aggregate:m,bin:y,timeUnit:v,...b}=p;if(m||v||y){const e=(0,s.getGuide)(p),x=e?.title;let E=(0,s.vgField)(p,{forAs:!0});const S={...x?[]:{title:(0,s.title)(p,t,{allowDisabling:!0})},...b,field:E};if(m){let e;if((0,i.isArgmaxDef)(m)?(e="argmax",E=(0,s.vgField)({op:"argmax",field:m.argmax},{forAs:!0}),S.field=`${E}.${g}`):(0,i.isArgminDef)(m)?(e="argmin",E=(0,s.vgField)({op:"argmin",field:m.argmin},{forAs:!0}),S.field=`${E}.${g}`):"boxplot"!==m&&"errorbar"!==m&&"errorband"!==m&&(e=m),e){const t={op:e,as:E};g&&(t.field=g),c.push(t)}}else if(n.push(E),(0,s.isTypedFieldDef)(p)&&(0,a.isBinning)(y)){if(r.push({bin:y,field:g,as:E}),n.push((0,s.vgField)(p,{binSuffix:"end"})),(0,s.binRequiresRange)(p,h)&&n.push((0,s.vgField)(p,{binSuffix:"range"})),(0,o.isXorY)(h)){const e={field:`${E}_end`};d[`${h}2`]=e}S.bin="binned",(0,o.isSecondaryRangeChannel)(h)||(S.type=u.QUANTITATIVE)}else if(v&&!(0,f.isBinnedTimeUnit)(v)){l.push({timeUnit:v,field:g,as:E});const e=(0,s.isTypedFieldDef)(p)&&p.type!==u.TEMPORAL&&"time";e&&(h===o.TEXT||h===o.TOOLTIP?S.formatType=e:(0,o.isNonPositionScaleChannel)(h)?S.legend={formatType:e,...S.legend}:(0,o.isXorY)(h)&&(S.axis={formatType:e,...S.axis}))}d[h]=S}else n.push(g),d[h]=e[h]}else d[h]=e[h]})),{bins:r,timeUnits:l,aggregate:c,groupby:n,encoding:d}}function v(e,t,n){const r=(0,o.supportMark)(t,n);if(!r)return!1;if("binned"===r){const n=e[t===o.X2?o.X:o.Y];return!!((0,s.isFieldDef)(n)&&(0,s.isFieldDef)(e[t])&&(0,a.isBinned)(n.bin))}return!0}function b(e,t,n,i){const a={};for(const t of(0,c.keys)(e))(0,o.isChannel)(t)||l.warn(l.message.invalidEncodingChannel(t));for(let c of o.UNIT_CHANNELS){if(!e[c])continue;const f=e[c];if((0,o.isXorYOffset)(c)){const e=(0,o.getMainChannelFromOffsetChannel)(c),t=a[e];if((0,s.isFieldDef)(t)&&(0,u.isContinuous)(t.type)&&(0,s.isFieldDef)(f)&&!t.timeUnit){l.warn(l.message.offsetNestedInsideContinuousPositionScaleDropped(e));continue}}if("angle"!==c||"arc"!==t||e.theta||(l.warn(l.message.REPLACE_ANGLE_WITH_THETA),c=o.THETA),v(e,c,t)){if(c===o.SIZE&&"line"===t){const t=(0,s.getFieldDef)(e[c]);if(t?.aggregate){l.warn(l.message.LINE_WITH_VARYING_SIZE);continue}}if(c===o.COLOR&&(n?"fill"in e:"stroke"in e))l.warn(l.message.droppingColor("encoding",{fill:"fill"in e,stroke:"stroke"in e}));else if(c===o.DETAIL||c===o.ORDER&&!(0,r.isArray)(f)&&!(0,s.isValueDef)(f)||c===o.TOOLTIP&&(0,r.isArray)(f)){if(f){if(c===o.ORDER){const t=e[c];if((0,s.isOrderOnlyDef)(t)){a[c]=t;continue}}a[c]=(0,r.array)(f).reduce(((e,t)=>((0,s.isFieldDef)(t)?e.push((0,s.initFieldDef)(t,c)):l.warn(l.message.emptyFieldDef(t,c)),e)),[])}}else{if(c===o.TOOLTIP&&null===f)a[c]=null;else if(!((0,s.isFieldDef)(f)||(0,s.isDatumDef)(f)||(0,s.isValueDef)(f)||(0,s.isConditionalDef)(f)||(0,d.isSignalRef)(f))){l.warn(l.message.emptyFieldDef(f,c));continue}a[c]=(0,s.initChannelDef)(f,c,i)}}else l.warn(l.message.incompatibleChannel(c,t))}return a}function x(e,t){const n={};for(const r of(0,c.keys)(e)){const i=(0,s.initChannelDef)(e[r],r,t,{compositeMark:!0});n[r]=i}return n}function E(e){const t=[];for(const n of(0,c.keys)(e))if(p(e,n)){const i=e[n],a=(0,r.array)(i);for(const e of a)(0,s.isFieldDef)(e)?t.push(e):(0,s.hasConditionalFieldDef)(e)&&t.push(e.condition)}return t}function S(e,t,n){if(e)for(const i of(0,c.keys)(e)){const a=e[i];if((0,r.isArray)(a))for(const e of a)t.call(n,e,i);else t.call(n,a,i)}}function w(e,t,n,i){return e?(0,c.keys)(e).reduce(((n,a)=>{const o=e[a];return(0,r.isArray)(o)?o.reduce(((e,n)=>t.call(i,e,n,a)),n):t.call(i,n,o,a)}),n):n}function _(e,t){return(0,c.keys)(t).reduce(((n,i)=>{switch(i){case o.X:case o.Y:case o.HREF:case o.DESCRIPTION:case o.URL:case o.X2:case o.Y2:case o.XOFFSET:case o.YOFFSET:case o.THETA:case o.THETA2:case o.RADIUS:case o.RADIUS2:case o.TIME:case o.LATITUDE:case o.LONGITUDE:case o.LATITUDE2:case o.LONGITUDE2:case o.TEXT:case o.SHAPE:case o.ANGLE:case o.TOOLTIP:return n;case o.ORDER:if("line"===e||"trail"===e)return n;case o.DETAIL:case o.KEY:{const e=t[i];if((0,r.isArray)(e)||(0,s.isFieldDef)(e))for(const t of(0,r.array)(e))t.aggregate||n.push((0,s.vgField)(t,{}));return n}case o.SIZE:if("trail"===e)return n;case o.COLOR:case o.FILL:case o.STROKE:case o.OPACITY:case o.FILLOPACITY:case o.STROKEOPACITY:case o.STROKEDASH:case o.STROKEWIDTH:{const e=(0,s.getFieldDef)(t[i]);return e&&!e.aggregate&&n.push((0,s.vgField)(e,{})),n}}}),[])}},3802:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isExprRef:()=>a,replaceExprRef:()=>o});var r=n(15058),i=n(79989);function a(e){return(0,i.hasProperty)(e,"expr")}function o(e,{level:t}={level:0}){const n=(0,i.keys)(e||{}),a={};for(const i of n)a[i]=0===t?(0,r.signalRefOrValue)(e[i]):o(e[i],{level:t-1});return a}},19609:(e,t,n)=>{"use strict";n.r(t),n.d(t,{VL_ONLY_LEGEND_CONFIG:()=>r});const r=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"]},41028:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HEADER_CONFIGS:()=>l,HEADER_LABEL_PROPERTIES:()=>s,HEADER_LABEL_PROPERTIES_MAP:()=>a,HEADER_TITLE_PROPERTIES:()=>o,HEADER_TITLE_PROPERTIES_MAP:()=>i});var r=n(79989);const i={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},a={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},o=(0,r.keys)(i),s=(0,r.keys)(a),l=(0,r.keys)({header:1,headerRow:1,headerColumn:1,headerFacet:1})},78405:(e,t,n)=>{"use strict";n.r(t),n.d(t,{accessPathDepth:()=>o.accessPathDepth,accessPathWithDatum:()=>o.accessPathWithDatum,accessWithDatumToUnescapedPath:()=>o.accessWithDatumToUnescapedPath,compile:()=>i.compile,contains:()=>o.contains,deepEqual:()=>o.deepEqual,deleteNestedProperty:()=>o.deleteNestedProperty,duplicate:()=>o.duplicate,entries:()=>o.entries,every:()=>o.every,fieldIntersection:()=>o.fieldIntersection,flatAccessWithDatum:()=>o.flatAccessWithDatum,getFirstDefined:()=>o.getFirstDefined,hasIntersection:()=>o.hasIntersection,hasProperty:()=>o.hasProperty,hash:()=>o.hash,internalField:()=>o.internalField,isBoolean:()=>o.isBoolean,isEmpty:()=>o.isEmpty,isEqual:()=>o.isEqual,isInternalField:()=>o.isInternalField,isNullOrFalse:()=>o.isNullOrFalse,isNumeric:()=>o.isNumeric,keys:()=>o.keys,logicalExpr:()=>o.logicalExpr,mergeDeep:()=>o.mergeDeep,never:()=>o.never,normalize:()=>a.normalize,normalizeAngle:()=>o.normalizeAngle,omit:()=>o.omit,pick:()=>o.pick,prefixGenerator:()=>o.prefixGenerator,removePathFromField:()=>o.removePathFromField,replaceAll:()=>o.replaceAll,replacePathInField:()=>o.replacePathInField,resetIdCounter:()=>o.resetIdCounter,setEqual:()=>o.setEqual,some:()=>o.some,stringify:()=>o.stringify,titleCase:()=>o.titleCase,unique:()=>o.unique,uniqueId:()=>o.uniqueId,vals:()=>o.vals,varName:()=>o.varName,version:()=>s});var r=n(67383),i=n(48166),a=n(59621),o=n(79989);const s=r.version},68278:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isScaleInvalidDataIncludeAsValue:()=>i});var r=n(26372);function i(e){return(0,r.isObject)(e)&&"value"in e}},54116:(e,t,n)=>{"use strict";n.r(t),n.d(t,{COMMON_LEGEND_PROPERTY_INDEX:()=>o,LEGEND_PROPERTIES:()=>s,LEGEND_SCALE_CHANNELS:()=>i,defaultLegendConfig:()=>a});var r=n(79989);const i=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],a={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},o={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},s=(0,r.keys)(o)},20916:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LocalLogger:()=>c,debug:()=>y,error:()=>h,info:()=>m,message:()=>a,reset:()=>p,set:()=>f,warn:()=>g,wrap:()=>d});var r,i=n(26372),a=n(87039),o=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const l=(0,i.logger)(i.Warn);let u=l;class c{constructor(){this.warns=[],this.infos=[],this.debugs=[],r.set(this,i.Warn)}level(e){return e?(o(this,r,e,"f"),this):s(this,r,"f")}warn(...e){return s(this,r,"f")>=i.Warn&&this.warns.push(...e),this}info(...e){return s(this,r,"f")>=i.Info&&this.infos.push(...e),this}debug(...e){return s(this,r,"f")>=i.Debug&&this.debugs.push(...e),this}error(...e){if(s(this,r,"f")>=i.Error)throw Error(...e);return this}}function d(e){return()=>{u=new c,e(u),p()}}function f(e){return u=e,u}function p(){return u=l,u}function h(...e){u.error(...e)}function g(...e){u.warn(...e)}function m(...e){u.info(...e)}function y(...e){u.debug(...e)}r=new WeakMap},87039:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ADD_SAME_CHILD_TWICE:()=>F,CANNOT_UNION_CUSTOM_DOMAIN_WITH_FIELD_DOMAIN:()=>ae,CONCAT_CANNOT_SHARE_AXIS:()=>D,FACETED_INDEPENDENT_DIFFERENT_SOURCES:()=>Se,FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES:()=>we,FACETED_INDEPENDENT_SAME_SOURCE:()=>_e,FIT_NON_SINGLE:()=>s,INTERVAL_INITIALIZED_WITH_POS:()=>w,INVALID_CHANNEL_FOR_AXIS:()=>Ae,LEGEND_BINDINGS_MUST_HAVE_PROJECTION:()=>b,LINE_WITH_VARYING_SIZE:()=>Y,MORE_THAN_ONE_SORT:()=>Ee,MULTIPLE_TIMER_ANIMATION_SELECTION:()=>C,MULTI_VIEW_ANIMATION_UNSUPPORTED:()=>T,NEEDS_SAME_SELECTION:()=>S,NO_FIELDS_NEEDS_AS:()=>M,REPLACE_ANGLE_WITH_THETA:()=>L,SCALE_BINDINGS_CONTINUOUS:()=>y,SEQUENTIAL_SCALE_DEPRECATED:()=>v,cannotApplySizeToNonOrientedMark:()=>de,cannotLookupVariableParameter:()=>x,cannotProjectAggregate:()=>p,cannotProjectOnChannelWithoutField:()=>f,cannotStackRangedMark:()=>Ce,cannotUseRelativeBandSizeWithNonBandScale:()=>se,cannotUseScalePropertyWithNonColor:()=>oe,channelRequiredForBinned:()=>Me,channelShouldBeDiscrete:()=>Q,channelShouldBeDiscreteOrDiscretizing:()=>Z,channelShouldNotBeUsedForBinned:()=>Ie,columnsNotSupportByRowCol:()=>A,containerSizeNonSingle:()=>l,containerSizeNotCompatibleWithAutosize:()=>u,customFormatTypeNotAllowed:()=>I,differentParse:()=>O,discreteChannelCannotEncode:()=>te,domainRequiredForThresholdScale:()=>$e,domainSortDropped:()=>xe,droppedDay:()=>De,droppingColor:()=>G,droppingFit:()=>c,emptyFieldDef:()=>W,errorBand1DNotSupport:()=>Pe,errorBarCenterAndExtentAreNotNeeded:()=>Ne,errorBarCenterIsUsedWithWrongExtent:()=>Oe,errorBarContinuousAxisHasCustomizedAggregate:()=>Fe,facetChannelDropped:()=>ee,incompatibleChannel:()=>X,independentScaleMeansIndependentGuide:()=>be,invalidAggregate:()=>j,invalidEncodingChannel:()=>J,invalidFieldType:()=>z,invalidFieldTypeForCountAggregate:()=>q,invalidSpec:()=>o,invalidTimeUnit:()=>Re,invalidTransformIgnored:()=>P,lineWithRange:()=>re,mergeConflictingDomainProperty:()=>ve,mergeConflictingProperty:()=>ye,missingFieldType:()=>H,nearestNotSupportForContinuous:()=>h,noSameUnitLookup:()=>E,noSuchRepeatedValue:()=>_,offsetEncodingScaleIgnored:()=>K,offsetNestedInsideContinuousPositionScaleDropped:()=>B,orientOverridden:()=>ie,primitiveChannelDef:()=>U,projectionOverridden:()=>$,rangeMarkAlignmentCannotBeExpression:()=>ne,relativeBandSizeNotSupported:()=>V,scalePropertyNotWorkWithScaleType:()=>he,scaleTypeNotWorkWithChannel:()=>fe,scaleTypeNotWorkWithFieldDef:()=>pe,scaleTypeNotWorkWithMark:()=>ge,selectionAsScaleDomainWithoutField:()=>k,selectionAsScaleDomainWrongEncodings:()=>R,selectionNotFound:()=>m,selectionNotSupported:()=>g,stackNonLinearScale:()=>Te,stackNonSummativeAggregate:()=>ke,stepDropped:()=>me,unaggregateDomainHasNoEffectForRawField:()=>le,unaggregateDomainWithNonSharedDomainOp:()=>ue,unaggregatedDomainWithLogScale:()=>ce,unknownField:()=>d,unrecognizedParse:()=>N});var r=n(77390),i=n(95290),a=n(79989);function o(e){return`Invalid specification ${(0,a.stringify)(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const s='Autosize "fit" only works for single views and layered views.';function l(e){return`${"width"==e?"Width":"Height"} "container" only works for single views and layered views.`}function u(e){return`${"width"==e?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==e?"x":"y"}".`}function c(e){return e?`Dropping "fit-${e}" because spec has discrete ${(0,i.getSizeChannel)(e)}.`:'Dropping "fit" because spec has discrete size.'}function d(e){return`Unknown field for ${e}. Cannot calculate view size.`}function f(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function p(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function h(e){return`The "nearest" transform is not supported for ${e} marks.`}function g(e){return`Selection not supported for ${e} yet.`}function m(e){return`Cannot find a selection named "${e}".`}const y="Scale bindings are currently only supported for scales with unbinned, continuous domains.",v="Sequntial scales are deprecated. The available quantitative scale type values are linear, log, pow, sqrt, symlog, time and utc",b="Legend bindings are only supported for selections over an individual field or encoding channel.";function x(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}function E(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}const S="The same selection must be used to override scale domains in a layered view.",w='Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.';function _(e){return`Unknown repeated value "${e}".`}function A(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}const C="Multiple timer selections in one unit spec are not supported. Ignoring all but the first.",T="Animation involving facet, layer, or concat is currently unsupported.";function k(e){return`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${(0,r.stringValue)(e)}.`}function R(e,t,n,i){return(e.length?"Multiple ":"No ")+`matching ${(0,r.stringValue)(t)} encoding found for selection ${(0,r.stringValue)(n.param)}. `+`Using "field": ${(0,r.stringValue)(i)}.`}const D="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function N(e){return`Unrecognized parse "${e}".`}function O(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}const F="Attempt to add the same child twice.";function P(e){return`Ignoring an invalid transform: ${(0,a.stringify)(e)}.`}const M='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function I(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function $(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${(0,a.stringify)(t)} is overridden by a child projection ${(0,a.stringify)(n)}.`}const L="Arc marks uses theta channel rather than angle, replacing angle with theta.";function B(e){return`${e}Offset dropped because ${e} is continuous`}function U(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${(0,a.stringify)(n)}}.`}function z(e){return`Invalid field type "${e}".`}function q(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}function j(e){return`Invalid aggregation operator "${e}".`}function H(e,t){return`Missing type for channel "${e}", using "${t}" instead.`}function G(e,t){const{fill:n,stroke:r}=t;return`Dropping color ${e} as the plot also has ${n&&r?"fill and stroke":n?"fill":"stroke"}.`}function V(e){return`Position range does not support relative band size for ${e}.`}function W(e,t){return`Dropping ${(0,a.stringify)(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}const Y="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function X(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function K(e){return`${e} encoding has no scale, so specified scale is ignored.`}function J(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}function Q(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function Z(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function ee(e){return`Facet encoding dropped as ${e.join(" and ")} ${e.length>1?"are":"is"} also specified.`}function te(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${"ordinal"===t?"order":"magnitude"}.`}function ne(e){return`The ${e} for range marks cannot be an expression`}function re(e,t){return`Line mark is for continuous lines and thus cannot be used with ${e&&t?"x2 and y2":e?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function ie(e,t){return`Specified orient "${e}" overridden with "${t}".`}const ae="Custom domain scale cannot be unioned with default field-based domain.";function oe(e){return`Cannot use the scale property "${e}" with non-color channel.`}function se(e){return`Cannot use the relative band size with ${e} scale.`}function le(e){return`Using unaggregated domain with raw field has no effect (${(0,a.stringify)(e)}).`}function ue(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function ce(e){return`Unaggregated domain is currently unsupported for log scale (${(0,a.stringify)(e)}).`}function de(e){return`Cannot apply size to non-oriented mark "${e}".`}function fe(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}function pe(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}function he(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function ge(e,t){return`Scale type "${t}" does not work with mark "${e}".`}function me(e){return`The step for "${e}" is dropped because the ${"width"===e?"x":"y"} is continuous.`}function ye(e,t,n,r){return`Conflicting ${t.toString()} property "${e.toString()}" (${(0,a.stringify)(n)} and ${(0,a.stringify)(r)}). Using ${(0,a.stringify)(n)}.`}function ve(e,t,n,r){return`Conflicting ${t.toString()} property "${e.toString()}" (${(0,a.stringify)(n)} and ${(0,a.stringify)(r)}). Using the union of the two domains.`}function be(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}function xe(e){return`Dropping sort property ${(0,a.stringify)(e)} as unioned domains only support boolean or op "count", "min", and "max".`}const Ee="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",Se="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",we="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",_e="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.",Ae="Invalid channel for axis.";function Ce(e){return`Cannot stack "${e}" if there is already "${e}2".`}function Te(e){return`Stack is applied to a non-linear scale (${e}).`}function ke(e){return`Stacking is applied even though the aggregate function is non-summative ("${e}").`}function Re(e,t){return`Invalid ${e}: ${(0,a.stringify)(t)}.`}function De(e){return`Dropping day from datetime ${(0,a.stringify)(e)} as day cannot be combined with other units.`}function Ne(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}function Oe(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}function Fe(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}function Pe(e){return`1D error band does not support ${e}.`}function Me(e){return`Channel ${e} is required for "binned" bin.`}function Ie(e){return`Channel ${e} should not be used with "binned" bin.`}function $e(e){return`Domain for ${e} is required for threshold scale.`}},90386:(e,t,n)=>{"use strict";n.r(t),n.d(t,{forEachLeaf:()=>s,isLogicalAnd:()=>a,isLogicalNot:()=>o,isLogicalOr:()=>i,normalizeLogicalComposition:()=>l});var r=n(79989);function i(e){return(0,r.hasProperty)(e,"or")}function a(e){return(0,r.hasProperty)(e,"and")}function o(e){return(0,r.hasProperty)(e,"not")}function s(e,t){if(o(e))s(e.not,t);else if(a(e))for(const n of e.and)s(n,t);else if(i(e))for(const n of e.or)s(n,t);else t(e)}function l(e,t){return o(e)?{not:l(e.not,t)}:a(e)?{and:e.and.map((e=>l(e,t)))}:i(e)?{or:e.or.map((e=>l(e,t)))}:t(e)}},75028:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ARC:()=>o,AREA:()=>s,BAR:()=>l,BAR_CORNER_RADIUS_INDEX:()=>I,CIRCLE:()=>y,FILL_CONFIG:()=>k,FILL_STROKE_CONFIG:()=>R,GEOSHAPE:()=>b,IMAGE:()=>u,LINE:()=>c,MARK_CONFIGS:()=>P,Mark:()=>a,PATH_MARKS:()=>E,POINT:()=>d,PRIMITIVE_MARKS:()=>_,RECT:()=>f,RULE:()=>p,SQUARE:()=>v,STROKE_CONFIG:()=>T,TEXT:()=>h,TICK:()=>g,TRAIL:()=>m,VL_ONLY_MARK_CONFIG_PROPERTIES:()=>D,VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX:()=>O,defaultBarConfig:()=>L,defaultMarkConfig:()=>F,defaultRectConfig:()=>$,defaultTickConfig:()=>B,getMarkType:()=>U,isMark:()=>x,isMarkDef:()=>A,isPathMark:()=>S,isPrimitiveMark:()=>C,isRectBasedMark:()=>w,isRelativeBandSize:()=>M});var r=n(26372),i=n(79989);const a={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},o=a.arc,s=a.area,l=a.bar,u=a.image,c=a.line,d=a.point,f=a.rect,p=a.rule,h=a.text,g=a.tick,m=a.trail,y=a.circle,v=a.square,b=a.geoshape;function x(e){return(0,r.hasOwnProperty)(a,e)}const E=["line","area","trail"];function S(e){return["line","area","trail"].includes(e)}function w(e){return["rect","bar","image","arc","tick"].includes(e)}const _=new Set((0,i.keys)(a));function A(e){return(0,i.hasProperty)(e,"type")}function C(e){const t=A(e)?e.type:e;return _.has(t)}const T=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],k=["fill","fillOpacity"],R=[...T,...k],D=(0,i.keys)({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),N=["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],O={area:["line","point"],bar:N,rect:N,line:["point"],tick:["bandSize","thickness",...N]},F={color:"#4c78a8",invalid:"break-paths-show-path-domains",timeUnitBandSize:1},P=(0,i.keys)({mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1});function M(e){return(0,i.hasProperty)(e,"band")}const I={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},$={binSpacing:0,continuousBandSize:5,minBandSize:.25,timeUnitBandPosition:.5},L={...$,binSpacing:1},B={...$,thickness:1};function U(e){return A(e)?e.type:e}},52362:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CoreNormalizer:()=>x});var r=n(26372),i=n(95290),a=n(79543),o=n(67982),s=n(52365),l=n(55833),u=n(98348),c=n(20916),d=n(51894),f=n(56811),p=n(31070),h=n(68859),g=n(79989),m=n(5711),y=n(8232),v=n(95741),b=n(56349);class x extends f.SpecMapper{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[o.boxPlotNormalizer,l.errorBarNormalizer,s.errorBandNormalizer,new y.PathOverlayNormalizer,new b.RuleForRangedLineNormalizer]}map(e,t){if((0,h.isUnitSpec)(e)){const n=(0,u.channelHasField)(e.encoding,i.ROW),r=(0,u.channelHasField)(e.encoding,i.COLUMN),a=(0,u.channelHasField)(e.encoding,i.FACET);if(n||r||a)return this.mapFacetedUnit(e,t)}return super.map(e,t)}mapUnit(e,t){const{parentEncoding:n,parentProjection:r}=t,i=(0,v.replaceRepeaterInEncoding)(e.encoding,t.repeater),a={...e,...e.name?{name:[t.repeaterPrefix,e.name].filter((e=>e)).join("_")}:{},...i?{encoding:i}:{}};if(n||r)return this.mapUnitWithParentEncodingOrProjection(a,t);const o=this.mapLayerOrUnit.bind(this);for(const e of this.nonFacetUnitNormalizers)if(e.hasMatchingType(a,t.config))return e.run(a,t,o);return a}mapRepeat(e,t){return(0,p.isLayerRepeatSpec)(e)?this.mapLayerRepeat(e,t):this.mapNonLayerRepeat(e,t)}mapLayerRepeat(e,t){const{repeat:n,spec:r,...i}=e,{row:a,column:o,layer:s}=n,{repeater:l={},repeaterPrefix:u=""}=t;return a||o?this.mapRepeat({...e,repeat:{...a?{row:a}:{},...o?{column:o}:{}},spec:{repeat:{layer:s},spec:r}},t):{...i,layer:s.map((e=>{const n={...l,layer:e},i=`${(r.name?`${r.name}_`:"")+u}child__layer_${(0,g.varName)(e)}`,a=this.mapLayerOrUnit(r,{...t,repeater:n,repeaterPrefix:i});return a.name=i,a}))}}mapNonLayerRepeat(e,t){const{repeat:n,spec:i,data:a,...o}=e;!(0,r.isArray)(n)&&e.columns&&(e=(0,g.omit)(e,["columns"]),c.warn(c.message.columnsNotSupportByRowCol("repeat")));const s=[],{repeater:l={},repeaterPrefix:u=""}=t,d=!(0,r.isArray)(n)&&n.row||[l?l.row:null],f=!(0,r.isArray)(n)&&n.column||[l?l.column:null],p=(0,r.isArray)(n)&&n||[l?l.repeat:null];for(const e of p)for(const a of d)for(const o of f){const c={repeat:e,row:a,column:o,layer:l.layer},d=(i.name?`${i.name}_`:"")+u+"child__"+((0,r.isArray)(n)?`${(0,g.varName)(e)}`:(n.row?`row_${(0,g.varName)(a)}`:"")+(n.column?`column_${(0,g.varName)(o)}`:"")),f=this.map(i,{...t,repeater:c,repeaterPrefix:d});f.name=d,s.push((0,g.omit)(f,["data"]))}const h=(0,r.isArray)(n)?e.columns:n.column?n.column.length:1;return{data:i.data??a,align:"all",...o,columns:h,concat:s}}mapFacet(e,t){const{facet:n}=e;return(0,d.isFacetMapping)(n)&&e.columns&&(e=(0,g.omit)(e,["columns"]),c.warn(c.message.columnsNotSupportByRowCol("facet"))),super.mapFacet(e,t)}mapUnitWithParentEncodingOrProjection(e,t){const{encoding:n,projection:r}=e,{parentEncoding:i,parentProjection:a,config:o}=t,s=S({parentProjection:a,projection:r}),l=E({parentEncoding:i,encoding:(0,v.replaceRepeaterInEncoding)(n,t.repeater)});return this.mapUnit({...e,...s?{projection:s}:{},...l?{encoding:l}:{}},{config:o})}mapFacetedUnit(e,t){const{row:n,column:r,facet:i,...a}=e.encoding,{mark:o,width:s,projection:l,height:u,view:c,params:d,encoding:f,...p}=e,{facetMapping:h,layout:g}=this.getFacetMappingAndLayout({row:n,column:r,facet:i},t),m=(0,v.replaceRepeaterInEncoding)(a,t.repeater);return this.mapFacet({...p,...g,facet:h,spec:{...s?{width:s}:{},...u?{height:u}:{},...c?{view:c}:{},...l?{projection:l}:{},mark:o,encoding:m,...d?{params:d}:{}}},t)}getFacetMappingAndLayout(e,t){const{row:n,column:r,facet:a}=e;if(n||r){a&&c.warn(c.message.facetChannelDropped([...n?[i.ROW]:[],...r?[i.COLUMN]:[]]));const t={},o={};for(const n of[i.ROW,i.COLUMN]){const r=e[n];if(r){const{align:e,center:i,spacing:a,columns:s,...l}=r;t[n]=l;for(const e of["align","center","spacing"])void 0!==r[e]&&(o[e]??(o[e]={}),o[e][n]=r[e])}}return{facetMapping:t,layout:o}}{const{align:e,center:n,spacing:r,columns:i,...o}=a;return{facetMapping:(0,v.replaceRepeaterInFacet)(o,t.repeater),layout:{...e?{align:e}:{},...n?{center:n}:{},...r?{spacing:r}:{},...i?{columns:i}:{}}}}}mapLayer(e,{parentEncoding:t,parentProjection:n,...r}){const{encoding:i,projection:a,...o}=e,s={...r,parentEncoding:E({parentEncoding:t,encoding:i,layer:!0}),parentProjection:S({parentProjection:n,projection:a})};return super.mapLayer({...o,...e.name?{name:[s.repeaterPrefix,e.name].filter((e=>e)).join("_")}:{}},s)}}function E({parentEncoding:e,encoding:t={},layer:n}){let i={};if(e){const o=new Set([...(0,g.keys)(e),...(0,g.keys)(t)]);for(const s of o){const o=t[s],l=e[s];if((0,a.isFieldOrDatumDef)(o)){const e={...l,...o};i[s]=e}else(0,a.hasConditionalFieldOrDatumDef)(o)?i[s]={...o,condition:{...l,...o.condition}}:o||null===o?i[s]=o:(n||(0,a.isValueDef)(l)||(0,m.isSignalRef)(l)||(0,a.isFieldOrDatumDef)(l)||(0,r.isArray)(l))&&(i[s]=l)}}else i=t;return!i||(0,g.isEmpty)(i)?void 0:i}function S(e){const{parentProjection:t,projection:n}=e;return t&&n&&c.warn(c.message.projectionOverridden({parentProjection:t,projection:n})),n??t}},59621:(e,t,n)=>{"use strict";n.r(t),n.d(t,{normalize:()=>d,normalizeAutoSize:()=>m});var r=n(26372),i=n(24007),a=n(20916),o=n(24777),s=n(79989),l=n(52362),u=n(9405),c=n(9794);function d(e,t){void 0===t&&(t=(0,i.initConfig)(e.config));const n=function(e,t={}){const n={config:t};return h.map(f.map(p.map(e,n),n),n)}(e,t),{width:r,height:a}=e,o=m(n,{width:r,height:a,autosize:e.autosize},t);return{...n,...o?{autosize:o}:{}}}const f=new l.CoreNormalizer,p=new u.SelectionCompatibilityNormalizer,h=new c.TopLevelSelectionsNormalizer;function g(e){return(0,r.isString)(e)?{type:e}:e??{}}function m(e,t,n){let{width:r,height:i}=t;const l=(0,o.isUnitSpec)(e)||(0,o.isLayerSpec)(e),u={};l?"container"==r&&"container"==i?(u.type="fit",u.contains="padding"):"container"==r?(u.type="fit-x",u.contains="padding"):"container"==i&&(u.type="fit-y",u.contains="padding"):("container"==r&&(a.warn(a.message.containerSizeNonSingle("width")),r=void 0),"container"==i&&(a.warn(a.message.containerSizeNonSingle("height")),i=void 0));const c={type:"pad",...u,...n?g(n.autosize):{},...g(e.autosize)};if("fit"!==c.type||l||(a.warn(a.message.FIT_NON_SINGLE),c.type="pad"),"container"==r&&"fit"!=c.type&&"fit-x"!=c.type&&a.warn(a.message.containerSizeNotCompatibleWithAutosize("width")),"container"==i&&"fit"!=c.type&&"fit-y"!=c.type&&a.warn(a.message.containerSizeNotCompatibleWithAutosize("height")),!(0,s.deepEqual)(c,{type:"pad"}))return c}},8232:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PathOverlayNormalizer:()=>h});var r=n(26372),i=n(98348),a=n(75028),o=n(68859),s=n(68889),l=n(79989),u=n(55823);function c(e){const{point:t,line:n,...r}=e;return(0,l.keys)(r).length>1?r:r.type}function d(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:(0,l.omit)(e[t],["point","line"])});return e}function f(e,t={},n){return"transparent"===e.point?{opacity:0}:e.point?(0,r.isObject)(e.point)?e.point:{}:void 0!==e.point?null:t.point||n.shape?(0,r.isObject)(t.point)?t.point:{}:void 0}function p(e,t={}){return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}class h{constructor(){this.name="path-overlay"}hasMatchingType(e,t){if((0,o.isUnitSpec)(e)){const{mark:n,encoding:r}=e,i=(0,a.isMarkDef)(n)?n:{type:n};switch(i.type){case"line":case"rule":case"trail":return!!f(i,t[i.type],r);case"area":return!!f(i,t[i.type],r)||!!p(i,t[i.type])}}return!1}run(e,t,n){const{config:r}=t,{params:o,projection:h,mark:g,name:m,encoding:y,...v}=e,b=(0,i.normalizeEncoding)(y,r),x=(0,a.isMarkDef)(g)?g:{type:g},E=f(x,r[x.type],b),S="area"===x.type&&p(x,r[x.type]),w=[{name:m,...o?{params:o}:{},mark:c({..."area"===x.type&&void 0===x.opacity&&void 0===x.fillOpacity?{opacity:.7}:{},...x}),encoding:(0,l.omit)(b,["shape"])}],_=(0,s.stack)((0,u.initMarkdef)(x,b,r),b);let A=b;if(_){const{fieldChannel:e,offset:t}=_;A={...b,[e]:{...b[e],...t?{stack:t}:{}}}}return A=(0,l.omit)(A,["y2","x2"]),S&&w.push({...h?{projection:h}:{},mark:{type:"line",...(0,l.pick)(x,["clip","interpolate","tension","tooltip"]),...S},encoding:A}),E&&w.push({...h?{projection:h}:{},mark:{type:"point",opacity:1,filled:!0,...(0,l.pick)(x,["clip","tooltip"]),...E},encoding:A}),n({...v,layer:w},{...t,config:d(r)})}}},95741:(e,t,n)=>{"use strict";n.r(t),n.d(t,{replaceRepeaterInEncoding:()=>c,replaceRepeaterInFacet:()=>u});var r=n(26372),i=n(79543),a=n(20916),o=n(46681),s=n(51894),l=n(79989);function u(e,t){return t?(0,s.isFacetMapping)(e)?g(e,t):f(e,t):e}function c(e,t){return t?g(e,t):e}function d(e,t,n){const r=t[e];return(0,i.isRepeatRef)(r)?r.repeat in n?{...t,[e]:n[r.repeat]}:void a.warn(a.message.noSuchRepeatedValue(r.repeat)):t}function f(e,t){if(void 0!==(e=d("field",e,t))){if(null===e)return null;if((0,i.isSortableFieldDef)(e)&&(0,o.isSortField)(e.sort)){const n=d("field",e.sort,t);e={...e,...n?{sort:n}:{}}}return e}}function p(e,t){if((0,i.isFieldDef)(e))return f(e,t);{const n=d("datum",e,t);return n===e||n.type||(n.type="nominal"),n}}function h(e,t){if(!(0,i.isFieldOrDatumDef)(e)){if((0,i.hasConditionalFieldOrDatumDef)(e)){const n=p(e.condition,t);if(n)return{...e,condition:n};{const{condition:t,...n}=e;return n}}return e}{const n=p(e,t);if(n)return n;if((0,i.isConditionalDef)(e))return{condition:e.condition}}}function g(e,t){const n={};for(const i in e)if((0,l.hasProperty)(e,i)){const a=e[i];if((0,r.isArray)(a))n[i]=a.map((e=>h(e,t))).filter((e=>e));else{const e=h(a,t);void 0!==e&&(n[i]=e)}}return n}},56349:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RuleForRangedLineNormalizer:()=>c});var r=n(26372),i=n(19664),a=n(95290),o=n(79543),s=n(20916),l=n(75028),u=n(68859);class c{constructor(){this.name="RuleForRangedLine"}hasMatchingType(e){if((0,u.isUnitSpec)(e)){const{encoding:t,mark:n}=e;if("line"===n||(0,l.isMarkDef)(n)&&"line"===n.type)for(const e of a.SECONDARY_RANGE_CHANNEL){const n=t[(0,a.getMainRangeChannel)(e)];if(t[e]&&((0,o.isFieldDef)(n)&&!(0,i.isBinned)(n.bin)||(0,o.isDatumDef)(n)))return!0}}return!1}run(e,t,n){const{encoding:i,mark:a}=e;return s.warn(s.message.lineWithRange(!!i.x2,!!i.y2)),n({...e,mark:(0,r.isObject)(a)?{...a,type:"rule"}:"rule"},t)}}},9405:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SelectionCompatibilityNormalizer:()=>c});var r=n(26372),i=n(19664),a=n(79543),o=n(90386),s=n(56811),l=n(65393),u=n(79989);class c extends s.SpecMapper{map(e,t){return t.emptySelections??(t.emptySelections={}),t.selectionPredicates??(t.selectionPredicates={}),e=d(e,t),super.map(e,t)}mapLayerOrUnit(e,t){if((e=d(e,t)).encoding){const n={};for(const[r,i]of(0,u.entries)(e.encoding))n[r]=f(i,t);e={...e,encoding:n}}return super.mapLayerOrUnit(e,t)}mapUnit(e,t){const{selection:n,...r}=e;return n?{...r,params:(0,u.entries)(n).map((([e,n])=>{const{init:r,bind:i,empty:a,...o}=n;"single"===o.type?(o.type="point",o.toggle=!1):"multi"===o.type&&(o.type="point"),t.emptySelections[e]="none"!==a;for(const n of(0,u.vals)(t.selectionPredicates[e]??{}))n.empty="none"!==a;return{name:e,value:r,select:o,bind:i}}))}:e}}function d(e,t){const{transform:n,...r}=e;if(n){return{...r,transform:n.map((e=>{if((0,l.isFilter)(e))return{filter:h(e,t)};if((0,l.isBin)(e)&&(0,i.isBinParams)(e.bin))return{...e,bin:p(e.bin)};if((0,l.isLookup)(e)){const{selection:t,...n}=e.from;return t?{...e,from:{param:t,...n}}:e}return e}))}}return e}function f(e,t){const n=(0,u.duplicate)(e);if((0,a.isFieldDef)(n)&&(0,i.isBinParams)(n.bin)&&(n.bin=p(n.bin)),(0,a.isScaleFieldDef)(n)&&n.scale?.domain?.selection){const{selection:e,...t}=n.scale.domain;n.scale.domain={...t,...e?{param:e}:{}}}if((0,a.isConditionalDef)(n))if((0,r.isArray)(n.condition))n.condition=n.condition.map((e=>{const{selection:n,param:r,test:i,...a}=e;return r?e:{...a,test:h(e,t)}}));else{const{selection:e,param:r,test:i,...a}=f(n.condition,t);n.condition=r?n.condition:{...a,test:h(n.condition,t)}}return n}function p(e){const t=e.extent;if(t?.selection){const{selection:n,...r}=t;return{...e,extent:{...r,param:n}}}return e}function h(e,t){const n=e=>(0,o.normalizeLogicalComposition)(e,(e=>{var n;const r={param:e,empty:t.emptySelections[e]??!0};return(n=t.selectionPredicates)[e]??(n[e]=[]),t.selectionPredicates[e].push(r),r}));return e.selection?n(e.selection):(0,o.normalizeLogicalComposition)(e.test||e.filter,(e=>e.selection?n(e.selection):e))}},9794:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TopLevelSelectionsNormalizer:()=>s});var r=n(26372),i=n(84847),a=n(24777),o=n(56811);class s extends o.SpecMapper{map(e,t){const n=t.selections??[];if(e.params&&!(0,a.isUnitSpec)(e)){const t=[];for(const r of e.params)(0,i.isSelectionParameter)(r)?n.push(r):t.push(r);e.params=t}return t.selections=n,super.map(e,t)}mapUnit(e,t){const n=t.selections;if(!n||!n.length)return e;const i=(t.path??[]).concat(e.name),a=[];for(const t of n)if(t.views&&t.views.length)for(const n of t.views)((0,r.isString)(n)&&(n===e.name||i.includes(n))||(0,r.isArray)(n)&&n.map((e=>i.indexOf(e))).every(((e,t,n)=>-1!==e&&(0===t||e>n[t-1]))))&&a.push(t);else a.push(t);return a.length&&(e.params=a),e}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=s.prototype[e];s.prototype[e]=function(e,n){return t.call(this,e,l(e,n))}}function l(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}},54778:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assembleParameterSignals:()=>i});var r=n(84847);function i(e){const t=[];for(const n of e||[]){if((0,r.isSelectionParameter)(n))continue;const{expr:e,bind:i,...a}=n;if(i&&e){const n={...a,bind:i,init:e};t.push(n)}else{const n={...a,...e?{update:e}:{},...i?{bind:i}:{}};t.push(n)}}return t}},4976:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fieldFilterExpression:()=>x,fieldValidPredicate:()=>E,isFieldEqualPredicate:()=>c,isFieldGTEPredicate:()=>h,isFieldGTPredicate:()=>p,isFieldLTEPredicate:()=>f,isFieldLTPredicate:()=>d,isFieldOneOfPredicate:()=>m,isFieldPredicate:()=>v,isFieldRangePredicate:()=>g,isFieldValidPredicate:()=>y,isSelectionPredicate:()=>u,normalizePredicate:()=>S});var r=n(26372),i=n(79543),a=n(3802),o=n(96598),s=n(79989),l=n(5711);function u(e){return(0,s.hasProperty)(e,"param")}function c(e){return!!e?.field&&void 0!==e.equal}function d(e){return!!e?.field&&void 0!==e.lt}function f(e){return!!e?.field&&void 0!==e.lte}function p(e){return!!e?.field&&void 0!==e.gt}function h(e){return!!e?.field&&void 0!==e.gte}function g(e){if(e?.field){if((0,r.isArray)(e.range)&&2===e.range.length)return!0;if((0,l.isSignalRef)(e.range))return!0}return!1}function m(e){return!!e?.field&&((0,r.isArray)(e.oneOf)||(0,r.isArray)(e.in))}function y(e){return!!e?.field&&void 0!==e.valid}function v(e){return m(e)||c(e)||g(e)||d(e)||p(e)||f(e)||h(e)}function b(e,t){return(0,i.valueExpr)(e,{timeUnit:t,wrapTime:!0})}function x(e,t=!0){const{field:n}=e,r=(0,o.normalizeTimeUnit)(e.timeUnit),{unit:u,binned:v}=r||{},x=(0,i.vgField)(e,{expr:"datum"}),S=u?`time(${v?x:(0,o.fieldExpr)(u,n)})`:x;if(c(e))return`${S}===${b(e.equal,u)}`;if(d(e)){return`${S}<${b(e.lt,u)}`}if(p(e)){return`${S}>${b(e.gt,u)}`}if(f(e)){return`${S}<=${b(e.lte,u)}`}if(h(e)){return`${S}>=${b(e.gte,u)}`}if(m(e))return`indexof([${(w=e.oneOf,_=u,w.map((e=>b(e,_)))).join(",")}], ${S}) !== -1`;if(y(e))return E(S,e.valid);if(g(e)){const{range:n}=(0,a.replaceExprRef)(e),r=(0,l.isSignalRef)(n)?{signal:`${n.signal}[0]`}:n[0],i=(0,l.isSignalRef)(n)?{signal:`${n.signal}[1]`}:n[1];if(null!==r&&null!==i&&t)return"inrange("+S+", ["+b(r,u)+", "+b(i,u)+"])";const o=[];return null!==r&&o.push(`${S} >= ${b(r,u)}`),null!==i&&o.push(`${S} <= ${b(i,u)}`),o.length>0?o.join(" && "):"true"}var w,_;throw new Error(`Invalid field predicate: ${(0,s.stringify)(e)}`)}function E(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function S(e){return v(e)&&e.timeUnit?{...e,timeUnit:(0,o.normalizeTimeUnit)(e.timeUnit)}:e}},15176:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PROJECTION_PROPERTIES:()=>r});const r=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"]},31179:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONTINUOUS_DOMAIN_SCALES:()=>v,CONTINUOUS_TO_CONTINUOUS_SCALES:()=>g,CONTINUOUS_TO_DISCRETE_SCALES:()=>y,DISCRETE_DOMAIN_SCALES:()=>b,NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTIES:()=>B,QUANTITATIVE_SCALES:()=>h,SCALE_CATEGORY_INDEX:()=>u,SCALE_PROPERTIES:()=>N,SCALE_TYPES:()=>c,ScaleType:()=>l,TIME_SCALE_TYPES:()=>x,channelScalePropertyIncompatability:()=>z,channelSupportScaleType:()=>j,defaultScaleConfig:()=>A,hasContinuousDomain:()=>S,hasDiscreteDomain:()=>E,isContinuousToContinuous:()=>w,isContinuousToDiscrete:()=>_,isDomainUnionWith:()=>k,isExtendedScheme:()=>C,isFieldRange:()=>R,isParameterDomain:()=>T,isQuantitative:()=>m,scaleCompatible:()=>d,scaleTypePrecedence:()=>p,scaleTypeSupportDataType:()=>q,scaleTypeSupportProperty:()=>U});var r=n(26372),i=n(95290),a=n(20916),o=n(99273),s=n(79989);const l={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",SYMLOG:"symlog",IDENTITY:"identity",SEQUENTIAL:"sequential",TIME:"time",UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold",BIN_ORDINAL:"bin-ordinal",ORDINAL:"ordinal",POINT:"point",BAND:"band"},u={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"},c=(0,s.keys)(u);function d(e,t){const n=u[e],r=u[t];return n===r||"ordinal-position"===n&&"time"===r||"ordinal-position"===r&&"time"===n}const f={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function p(e){return f[e]}const h=new Set(["linear","log","pow","sqrt","symlog"]),g=new Set([...h,"time","utc"]);function m(e){return h.has(e)}const y=new Set(["quantile","quantize","threshold"]),v=new Set([...g,...y,"sequential","identity"]),b=new Set(["ordinal","bin-ordinal","point","band"]),x=new Set(["time","utc"]);function E(e){return b.has(e)}function S(e){return v.has(e)}function w(e){return g.has(e)}function _(e){return y.has(e)}const A={pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,tickBandPaddingInner:.25,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:4,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0,framesPerSecond:2,animationDuration:5};function C(e){return!(0,r.isString)(e)&&(0,s.hasProperty)(e,"name")}function T(e){return(0,s.hasProperty)(e,"param")}function k(e){return(0,s.hasProperty)(e,"unionWith")}function R(e){return(0,r.isObject)(e)&&"field"in e}const D={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,domainRaw:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},N=(0,s.keys)(D),{type:O,domain:F,range:P,rangeMax:M,rangeMin:I,scheme:$,...L}=D,B=(0,s.keys)(L);function U(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return w(e)||"band"===e||"point"===e;case"padding":case"rangeMin":case"rangeMax":return w(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return"band"===e;case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return w(e);case"nice":return w(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return S(e)&&!(0,s.contains)(["log","time","utc","threshold","quantile"],e)}}function z(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return(0,i.isColorChannel)(e)?void 0:a.message.cannotUseScalePropertyWithNonColor(t);case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"domainRaw":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}function q(e,t){return(0,s.contains)([o.ORDINAL,o.NOMINAL],t)?void 0===e||E(e):t===o.TEMPORAL?(0,s.contains)([l.TIME,l.UTC,void 0],e):t!==o.QUANTITATIVE||(m(e)||_(e)||void 0===e)}function j(e,t,n=!1){if(!i.isScaleChannel(e))return!1;switch(e){case i.X:case i.Y:case i.XOFFSET:case i.YOFFSET:case i.THETA:case i.RADIUS:return!!w(t)||("band"===t||"point"===t&&!n);case i.TIME:return(0,s.contains)(["linear","band"],t);case i.SIZE:case i.STROKEWIDTH:case i.OPACITY:case i.FILLOPACITY:case i.STROKEOPACITY:case i.ANGLE:return w(t)||_(t)||(0,s.contains)(["band","point","ordinal"],t);case i.COLOR:case i.FILL:case i.STROKE:return"band"!==t;case i.STROKEDASH:case i.SHAPE:return"ordinal"===t||_(t)}}},84847:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SELECTION_ID:()=>i,defaultConfig:()=>a,isLegendBinding:()=>o,isLegendStreamBinding:()=>s,isSelectionParameter:()=>l});var r=n(26372);const i="_vgsid_",a={point:{on:"click",fields:[i],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[pointerdown, window:pointerup] > window:pointermove!",encodings:["x","y"],translate:"[pointerdown, window:pointerup] > window:pointermove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function o(e){return"legend"===e||!!e?.legend}function s(e){return o(e)&&(0,r.isObject)(e)}function l(e){return!!e?.select}},46681:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_SORT_OP:()=>a,isSortArray:()=>c,isSortByChannel:()=>s,isSortByEncoding:()=>l,isSortField:()=>u});var r=n(26372),i=n(79989);const a="min",o={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function s(e){return(0,r.hasOwnProperty)(o,e)}function l(e){return(0,i.hasProperty)(e,"encoding")}function u(e){return e&&("count"===e.op||(0,i.hasProperty)(e,"field"))}function c(e){return e&&(0,r.isArray)(e)}},89820:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_SPACING:()=>c,extractCompositionLayout:()=>f,getStepFor:()=>s,isFrameMixins:()=>u,isStep:()=>l});var r=n(26372),i=n(79989),a=n(53429),o=n(51894);function s({step:e,offsetIsDiscrete:t}){return t?e.for??"offset":"position"}function l(e){return(0,i.hasProperty)(e,"step")}function u(e){return(0,i.hasProperty)(e,"view")||(0,i.hasProperty)(e,"width")||(0,i.hasProperty)(e,"height")}const c=20,d=(0,i.keys)({align:1,bounds:1,center:1,columns:1,spacing:1});function f(e,t,n){const i=n[t],s={},{spacing:l,columns:u}=i;void 0!==l&&(s.spacing=l),void 0!==u&&((0,o.isFacetSpec)(e)&&!(0,o.isFacetMapping)(e.facet)||(0,a.isConcatSpec)(e))&&(s.columns=u),(0,a.isVConcatSpec)(e)&&(s.columns=1);for(const t of d)if(void 0!==e[t])if("spacing"===t){const n=e[t];s[t]=(0,r.isNumber)(n)?n:{row:n.row??l,column:n.column??l}}else s[t]=e[t];return s}},53429:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isAnyConcatSpec:()=>i,isConcatSpec:()=>a,isHConcatSpec:()=>s,isVConcatSpec:()=>o});var r=n(79989);function i(e){return o(e)||s(e)||a(e)}function a(e){return(0,r.hasProperty)(e,"concat")}function o(e){return(0,r.hasProperty)(e,"vconcat")}function s(e){return(0,r.hasProperty)(e,"hconcat")}},51894:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isFacetFieldDef:()=>a,isFacetMapping:()=>i,isFacetSpec:()=>o});var r=n(79989);function i(e){return(0,r.hasProperty)(e,"row")||(0,r.hasProperty)(e,"column")}function a(e){return(0,r.hasProperty)(e,"header")}function o(e){return(0,r.hasProperty)(e,"facet")}},24777:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isAnyConcatSpec:()=>r.isAnyConcatSpec,isFacetSpec:()=>i.isFacetSpec,isHConcatSpec:()=>r.isHConcatSpec,isLayerSpec:()=>a.isLayerSpec,isRepeatSpec:()=>o.isRepeatSpec,isUnitSpec:()=>s.isUnitSpec,isVConcatSpec:()=>r.isVConcatSpec});var r=n(53429),i=n(51894),a=n(42524),o=n(31070),s=n(68859)},42524:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isLayerSpec:()=>i});var r=n(79989);function i(e){return(0,r.hasProperty)(e,"layer")}},56811:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SpecMapper:()=>u});var r=n(20916),i=n(53429),a=n(51894),o=n(42524),s=n(31070),l=n(68859);class u{map(e,t){return(0,a.isFacetSpec)(e)?this.mapFacet(e,t):(0,s.isRepeatSpec)(e)?this.mapRepeat(e,t):(0,i.isHConcatSpec)(e)?this.mapHConcat(e,t):(0,i.isVConcatSpec)(e)?this.mapVConcat(e,t):(0,i.isConcatSpec)(e)?this.mapConcat(e,t):this.mapLayerOrUnit(e,t)}mapLayerOrUnit(e,t){if((0,o.isLayerSpec)(e))return this.mapLayer(e,t);if((0,l.isUnitSpec)(e))return this.mapUnit(e,t);throw new Error(r.message.invalidSpec(e))}mapLayer(e,t){return{...e,layer:e.layer.map((e=>this.mapLayerOrUnit(e,t)))}}mapHConcat(e,t){return{...e,hconcat:e.hconcat.map((e=>this.map(e,t)))}}mapVConcat(e,t){return{...e,vconcat:e.vconcat.map((e=>this.map(e,t)))}}mapConcat(e,t){const{concat:n,...r}=e;return{...r,concat:n.map((e=>this.map(e,t)))}}mapFacet(e,t){return{...e,spec:this.map(e.spec,t)}}mapRepeat(e,t){return{...e,spec:this.map(e.spec,t)}}}},31070:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isLayerRepeatSpec:()=>o,isRepeatSpec:()=>a});var r=n(26372),i=n(79989);function a(e){return(0,i.hasProperty)(e,"repeat")}function o(e){return!(0,r.isArray)(e.repeat)&&(0,i.hasProperty)(e.repeat,"layer")}},48110:(e,t,n)=>{"use strict";n.r(t),n.d(t,{extractTopLevelProperties:()=>l,getFitType:()=>o,isFitType:()=>a});var r=n(95290),i=n(15058);function a(e){return["fit","fit-x","fit-y"].includes(e)}function o(e){return e?`fit-${(0,r.getPositionScaleChannel)(e)}`:"fit"}const s=["background","padding"];function l(e,t){const n={};for(const t of s)e&&void 0!==e[t]&&(n[t]=(0,i.signalRefOrValue)(e[t]));return t&&(n.params=e.params),n}},68859:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isUnitSpec:()=>i});var r=n(79989);function i(e){return(0,r.hasProperty)(e,"mark")}},68889:(e,t,n)=>{"use strict";n.r(t),n.d(t,{STACKABLE_MARKS:()=>p,STACK_BY_DEFAULT_MARKS:()=>h,isStackOffset:()=>f,stack:()=>y});var r=n(26372),i=n(54814),a=n(95290),o=n(79543),s=n(98348),l=n(20916),u=n(75028),c=n(31179);const d={zero:1,center:1,normalize:1};function f(e){return(0,r.hasOwnProperty)(d,e)}const p=new Set([u.ARC,u.BAR,u.AREA,u.RULE,u.POINT,u.CIRCLE,u.SQUARE,u.LINE,u.TEXT,u.TICK]),h=new Set([u.BAR,u.AREA,u.ARC]);function g(e){return(0,o.isFieldDef)(e)&&"quantitative"===(0,o.channelDefType)(e)&&!e.bin}function m(e,t,{orient:n,type:r}){const i="x"===t?"y":"radius",a="x"===t&&["bar","area"].includes(r),s=e[t],l=e[i];if((0,o.isFieldDef)(s)&&(0,o.isFieldDef)(l))if(g(s)&&g(l)){if(s.stack)return t;if(l.stack)return i;const e=(0,o.isFieldDef)(s)&&!!s.aggregate;if(e!==((0,o.isFieldDef)(l)&&!!l.aggregate))return e?t:i;if(a){if("vertical"===n)return i;if("horizontal"===n)return t}}else{if(g(s))return t;if(g(l))return i}else{if(g(s)){if(a&&"vertical"===n)return;return t}if(g(l)){if(a&&"horizontal"===n)return;return i}}}function y(e,t){const n=(0,u.isMarkDef)(e)?e:{type:e},d=n.type;if(!p.has(d))return null;const g=m(t,"x",n)||m(t,"theta",n);if(!g)return null;const y=t[g],v=(0,o.isFieldDef)(y)?(0,o.vgField)(y,{}):void 0,b=function(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}(g),x=[],E=new Set;if(t[b]){const e=t[b],n=(0,o.isFieldDef)(e)?(0,o.vgField)(e,{}):void 0;n&&n!==v&&(x.push(b),E.add(n))}const S="x"===b?"xOffset":"yOffset",w=t[S],_=(0,o.isFieldDef)(w)?(0,o.vgField)(w,{}):void 0;_&&_!==v&&(x.push(S),E.add(_));const A=a.NONPOSITION_CHANNELS.reduce(((e,n)=>{if("tooltip"!==n&&(0,s.channelHasField)(t,n)){const i=t[n];for(const t of(0,r.array)(i)){const r=(0,o.getFieldDef)(t);if(r.aggregate)continue;const i=(0,o.vgField)(r,{});i&&E.has(i)||e.push({channel:n,fieldDef:r})}}return e}),[]);let C;return void 0!==y.stack?C=(0,r.isBoolean)(y.stack)?y.stack?"zero":null:y.stack:h.has(d)&&(C="zero"),C&&f(C)?(0,s.isAggregate)(t)&&0===A.length?null:(y?.scale?.type&&y?.scale?.type!==c.ScaleType.LINEAR&&y?.stack&&l.warn(l.message.stackNonLinearScale(y.scale.type)),(0,o.isFieldOrDatumDef)(t[(0,a.getSecondaryRangeChannel)(g)])?(void 0!==y.stack&&l.warn(l.message.cannotStackRangedMark(g)),null):((0,o.isFieldDef)(y)&&y.aggregate&&!i.SUM_OPS.has(y.aggregate)&&l.warn(l.message.stackNonSummativeAggregate(y.aggregate)),{groupbyChannels:x,groupbyFields:E,fieldChannel:g,impute:null!==y.impute&&(0,u.isPathMark)(d),stackBy:A,offset:C})):null}},96598:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BINNED_TIMEUNIT_INDEX:()=>f,LOCAL_MULTI_TIMEUNIT_INDEX:()=>d,LOCAL_SINGLE_TIMEUNIT_INDEX:()=>s,TIMEUNIT_PARTS:()=>l,UTC_MULTI_TIMEUNIT_INDEX:()=>g,UTC_SINGLE_TIMEUNIT_INDEX:()=>c,VEGALITE_TIMEFORMAT:()=>v,containsTimeUnit:()=>E,durationExpr:()=>T,fieldExpr:()=>S,formatExpression:()=>_,getDateTimePartAndStep:()=>D,getLocalTimeUnitFromUTCTimeUnit:()=>y,getSmallestTimeUnitPart:()=>x,getTimeUnitParts:()=>b,isBinnedTimeUnit:()=>p,isBinnedTimeUnitString:()=>h,isDatePart:()=>R,isLocalSingleTimeUnit:()=>u,isUTCTimeUnit:()=>m,normalizeTimeUnit:()=>A,timeUnitSpecifierExpression:()=>w,timeUnitToString:()=>C});var r=n(26372),i=n(20032),a=n(79989),o=n(77390);const s={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},l=(0,a.keys)(s);function u(e){return(0,o.hasOwnProperty)(s,e)}const c={utcyear:1,utcquarter:1,utcmonth:1,utcweek:1,utcday:1,utcdayofyear:1,utcdate:1,utchours:1,utcminutes:1,utcseconds:1,utcmilliseconds:1},d={yearquarter:1,yearquartermonth:1,yearmonth:1,yearmonthdate:1,yearmonthdatehours:1,yearmonthdatehoursminutes:1,yearmonthdatehoursminutesseconds:1,yearweek:1,yearweekday:1,yearweekdayhours:1,yearweekdayhoursminutes:1,yearweekdayhoursminutesseconds:1,yeardayofyear:1,quartermonth:1,monthdate:1,monthdatehours:1,monthdatehoursminutes:1,monthdatehoursminutesseconds:1,weekday:1,weekdayhours:1,weekdayhoursminutes:1,weekdayhoursminutesseconds:1,dayhours:1,dayhoursminutes:1,dayhoursminutesseconds:1,hoursminutes:1,hoursminutesseconds:1,minutesseconds:1,secondsmilliseconds:1},f={binnedyear:1,binnedyearquarter:1,binnedyearquartermonth:1,binnedyearmonth:1,binnedyearmonthdate:1,binnedyearmonthdatehours:1,binnedyearmonthdatehoursminutes:1,binnedyearmonthdatehoursminutesseconds:1,binnedyearweek:1,binnedyearweekday:1,binnedyearweekdayhours:1,binnedyearweekdayhoursminutes:1,binnedyearweekdayhoursminutesseconds:1,binnedyeardayofyear:1,binnedutcyear:1,binnedutcyearquarter:1,binnedutcyearquartermonth:1,binnedutcyearmonth:1,binnedutcyearmonthdate:1,binnedutcyearmonthdatehours:1,binnedutcyearmonthdatehoursminutes:1,binnedutcyearmonthdatehoursminutesseconds:1,binnedutcyearweek:1,binnedutcyearweekday:1,binnedutcyearweekdayhours:1,binnedutcyearweekdayhoursminutes:1,binnedutcyearweekdayhoursminutesseconds:1,binnedutcyeardayofyear:1};function p(e){return(0,r.isObject)(e)?e.binned:h(e)}function h(e){return e&&e.startsWith("binned")}const g={utcyearquarter:1,utcyearquartermonth:1,utcyearmonth:1,utcyearmonthdate:1,utcyearmonthdatehours:1,utcyearmonthdatehoursminutes:1,utcyearmonthdatehoursminutesseconds:1,utcyearweek:1,utcyearweekday:1,utcyearweekdayhours:1,utcyearweekdayhoursminutes:1,utcyearweekdayhoursminutesseconds:1,utcyeardayofyear:1,utcquartermonth:1,utcmonthdate:1,utcmonthdatehours:1,utcmonthdatehoursminutes:1,utcmonthdatehoursminutesseconds:1,utcweekday:1,utcweekdayhours:1,utcweekdayhoursminutes:1,utcweekdayhoursminutesseconds:1,utcdayhours:1,utcdayhoursminutes:1,utcdayhoursminutesseconds:1,utchoursminutes:1,utchoursminutesseconds:1,utcminutesseconds:1,utcsecondsmilliseconds:1};function m(e){return e.startsWith("utc")}function y(e){return e.substring(3)}const v={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function b(e){return l.filter((t=>E(e,t)))}function x(e){const t=b(e);return t[t.length-1]}function E(e,t){const n=e.indexOf(t);return!(n<0)&&(!(n>0&&"seconds"===t&&"i"===e.charAt(n-1))&&(!(e.length>n+3&&"day"===t&&"o"===e.charAt(n+3))&&!(n>0&&"year"===t&&"f"===e.charAt(n-1))))}function S(e,t,{end:n}={end:!1}){const r=(0,a.accessPathWithDatum)(t),o=m(e)?"utc":"";let s;const u={};for(const t of l)E(e,t)&&(u[t]="quarter"===(c=t)?`(${o}quarter(${r})-1)`:`${o}${c}(${r})`,s=t);var c;return n&&(u[s]+="+1"),(0,i.dateTimeExprToExpr)(u)}function w(e){if(!e)return;const t=b(e);return`timeUnitSpecifier(${(0,a.stringify)(t)}, ${(0,a.stringify)(v)})`}function _(e,t,n){if(!e)return;const r=w(e);return`${n||m(e)?"utc":"time"}Format(${t}, ${r})`}function A(e){if(!e)return;let t;return(0,r.isString)(e)?t=h(e)?{unit:e.substring(6),binned:!0}:{unit:e}:(0,r.isObject)(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),m(t.unit)&&(t.utc=!0,t.unit=y(t.unit)),t}function C(e){const{utc:t,...n}=A(e);return n.unit?(t?"utc":"")+(0,a.keys)(n).map((e=>(0,a.varName)(`${"unit"===e?"":`_${e}_`}${n[e]}`))).join(""):(t?"utc":"")+"timeunit"+(0,a.keys)(n).map((e=>(0,a.varName)(`_${e}_${n[e]}`))).join("")}function T(e,t=e=>e){const n=A(e),r=x(n.unit);if(r&&"day"!==r){const e={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:a,part:o}=D(r,n.step),s={...e,[o]:+e[o]+a};return`${t((0,i.dateTimeToExpr)(s))} - ${t((0,i.dateTimeToExpr)(e))}`}}const k={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function R(e){return(0,o.hasOwnProperty)(k,e)}function D(e,t=1){if(R(e))return{part:e,step:t};switch(e){case"day":case"dayofyear":return{part:"date",step:t};case"quarter":return{part:"month",step:3*t};case"week":return{part:"date",step:7*t}}}},76447:(e,t,n)=>{"use strict";n.r(t),n.d(t,{extractTitleConfig:()=>a,isText:()=>o});var r=n(26372),i=n(79989);function a(e){const{anchor:t,frame:n,offset:r,orient:a,angle:o,limit:s,color:l,subtitleColor:u,subtitleFont:c,subtitleFontSize:d,subtitleFontStyle:f,subtitleFontWeight:p,subtitleLineHeight:h,subtitlePadding:g,...m}=e,y={...t?{anchor:t}:{},...n?{frame:n}:{},...r?{offset:r}:{},...a?{orient:a}:{},...void 0!==o?{angle:o}:{},...void 0!==s?{limit:s}:{}},v={...u?{subtitleColor:u}:{},...c?{subtitleFont:c}:{},...d?{subtitleFontSize:d}:{},...f?{subtitleFontStyle:f}:{},...p?{subtitleFontWeight:p}:{},...h?{subtitleLineHeight:h}:{},...g?{subtitlePadding:g}:{}};return{titleMarkConfig:{...m,...l?{fill:l}:{}},subtitleMarkConfig:(0,i.pick)(e,["align","baseline","dx","dy","limit"]),nonMarkTitleProperties:y,subtitle:v}}function o(e){return(0,r.isString)(e)||(0,r.isArray)(e)&&(0,r.isString)(e[0])}},65393:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isAggregate:()=>_,isBin:()=>E,isCalculate:()=>x,isDensity:()=>f,isExtent:()=>T,isFilter:()=>o,isFlatten:()=>b,isFold:()=>C,isImpute:()=>S,isImputeSequence:()=>s,isJoinAggregate:()=>v,isLoess:()=>g,isLookup:()=>l,isLookupData:()=>u,isLookupSelection:()=>c,isPivot:()=>d,isQuantile:()=>p,isRegression:()=>h,isSample:()=>m,isStack:()=>A,isTimeUnit:()=>w,isWindow:()=>y,normalizeTransform:()=>k});var r=n(90386),i=n(4976),a=n(79989);function o(e){return(0,a.hasProperty)(e,"filter")}function s(e){return(0,a.hasProperty)(e,"stop")}function l(e){return(0,a.hasProperty)(e,"lookup")}function u(e){return(0,a.hasProperty)(e,"data")}function c(e){return(0,a.hasProperty)(e,"param")}function d(e){return(0,a.hasProperty)(e,"pivot")}function f(e){return(0,a.hasProperty)(e,"density")}function p(e){return(0,a.hasProperty)(e,"quantile")}function h(e){return(0,a.hasProperty)(e,"regression")}function g(e){return(0,a.hasProperty)(e,"loess")}function m(e){return(0,a.hasProperty)(e,"sample")}function y(e){return(0,a.hasProperty)(e,"window")}function v(e){return(0,a.hasProperty)(e,"joinaggregate")}function b(e){return(0,a.hasProperty)(e,"flatten")}function x(e){return(0,a.hasProperty)(e,"calculate")}function E(e){return(0,a.hasProperty)(e,"bin")}function S(e){return(0,a.hasProperty)(e,"impute")}function w(e){return(0,a.hasProperty)(e,"timeUnit")}function _(e){return(0,a.hasProperty)(e,"aggregate")}function A(e){return(0,a.hasProperty)(e,"stack")}function C(e){return(0,a.hasProperty)(e,"fold")}function T(e){return(0,a.hasProperty)(e,"extent")&&!(0,a.hasProperty)(e,"density")&&!(0,a.hasProperty)(e,"regression")}function k(e){return e.map((e=>o(e)?{filter:(0,r.normalizeLogicalComposition)(e.filter,i.normalizePredicate)}:e))}},99273:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GEOJSON:()=>p,NOMINAL:()=>f,ORDINAL:()=>c,QUANTITATIVE:()=>u,TEMPORAL:()=>d,TYPES:()=>h,Type:()=>a,getFullName:()=>g,isContinuous:()=>s,isDiscrete:()=>l,isType:()=>o});var r=n(26372),i=n(79989);const a={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function o(e){return(0,r.hasOwnProperty)(a,e)}function s(e){return"quantitative"===e||"temporal"===e}function l(e){return"ordinal"===e||"nominal"===e}const u=a.quantitative,c=a.ordinal,d=a.temporal,f=a.nominal,p=a.geojson,h=(0,i.keys)(a);function g(e){if(e)switch(e=e.toLowerCase()){case"q":case u:return"quantitative";case"t":case d:return"temporal";case"o":case c:return"ordinal";case"n":case f:return"nominal";case p:return"geojson"}}},79989:(e,t,n)=>{"use strict";n.r(t),n.d(t,{accessPathDepth:()=>L,accessPathWithDatum:()=>N,accessWithDatumToUnescapedPath:()=>F,contains:()=>d,deepEqual:()=>Y,deleteNestedProperty:()=>R,duplicate:()=>a,entries:()=>A,every:()=>p,fieldIntersection:()=>E,flatAccessWithDatum:()=>O,getFirstDefined:()=>B,hasIntersection:()=>b,hasProperty:()=>K,hash:()=>u,internalField:()=>j,isBoolean:()=>C,isEmpty:()=>S,isEqual:()=>y,isInternalField:()=>H,isNullOrFalse:()=>c,isNumeric:()=>V,keys:()=>w,logicalExpr:()=>k,mergeDeep:()=>h,never:()=>o,normalizeAngle:()=>G,omit:()=>l,pick:()=>s,prefixGenerator:()=>x,removePathFromField:()=>$,replaceAll:()=>I,replacePathInField:()=>M,resetIdCounter:()=>q,setEqual:()=>v,some:()=>f,stringify:()=>X,titleCase:()=>D,unique:()=>m,uniqueId:()=>z,vals:()=>_,varName:()=>T});var r=n(26372),i=n(90386);const a=structuredClone;function o(e){throw new Error(e)}function s(e,t){const n={};for(const i of t)(0,r.hasOwnProperty)(e,i)&&(n[i]=e[i]);return n}function l(e,t){const n={...e};for(const e of t)delete n[e];return n}function u(e){if((0,r.isNumber)(e))return e;const t=(0,r.isString)(e)?e:X(e);if(t.length<250)return t;let n=0;for(let e=0;e0===t?e:`[${e}]`)),i=e.map(((t,n)=>e.slice(0,n+1).join("")));for(const e of i)t.add(e)}return t}function E(e,t){return void 0===e||void 0===t||b(x(e),x(t))}function S(e){return 0===w(e).length}Set.prototype.toJSON=function(){return`Set(${[...this].map((e=>X(e))).join(",")})`};const w=Object.keys,_=Object.values,A=Object.entries;function C(e){return!0===e||!1===e}function T(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function k(e,t){return(0,i.isLogicalNot)(e)?`!(${k(e.not,t)})`:(0,i.isLogicalAnd)(e)?`(${e.and.map((e=>k(e,t))).join(") && (")})`:(0,i.isLogicalOr)(e)?`(${e.or.map((e=>k(e,t))).join(") || (")})`:t(e)}function R(e,t){if(0===t.length)return!0;const n=t.shift();return n in e&&R(e[n],t)&&delete e[n],S(e)}function D(e){return e.charAt(0).toUpperCase()+e.substr(1)}function N(e,t="datum"){const n=(0,r.splitAccessPath)(e),i=[];for(let e=1;e<=n.length;e++){const a=`[${n.slice(0,e).map(r.stringValue).join("][")}]`;i.push(`${t}${a}`)}return i.join(" && ")}function O(e,t="datum"){return`${t}[${(0,r.stringValue)((0,r.splitAccessPath)(e).join("."))}]`}function F(e){return`datum['${e.replaceAll("'","\\'")}']`}function P(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function M(e){return`${(0,r.splitAccessPath)(e).map(P).join("\\.")}`}function I(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function $(e){return`${(0,r.splitAccessPath)(e).join(".")}`}function L(e){return e?(0,r.splitAccessPath)(e).length:0}function B(...e){return e.find((e=>void 0!==e))}let U=42;function z(e){const t=++U;return e?String(e)+t:t}function q(){U=42}function j(e){return H(e)?e:`__${e}`}function H(e){return e.startsWith("__")}function G(e){if(void 0!==e)return(e%360+360)%360}function V(e){return!!(0,r.isNumber)(e)||!isNaN(e)&&!isNaN(parseFloat(e))}const W=Object.getPrototypeOf(structuredClone({}));function Y(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor.name!==t.constructor.name)return!1;let n,r;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Y(e[r],t[r]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;for(const n of e.entries())if(!Y(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf!==W.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString!==W.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(!Y(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function X(e){const t=[];return function e(n){if(n&&n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0===n)return;if("number"==typeof n)return isFinite(n)?""+n:"null";if("object"!=typeof n)return JSON.stringify(n);let r,i;if(Array.isArray(n)){for(i="[",r=0;r{"use strict";n.r(t),n.d(t,{VG_CORNERRADIUS_CHANNELS:()=>f,VG_MARK_CONFIGS:()=>c,VG_MARK_INDEX:()=>d,isDataRefDomain:()=>u,isDataRefUnionedDomain:()=>s,isFieldRefUnionDomain:()=>l,isSignalRef:()=>a,isVgRangeStep:()=>o});var r=n(26372),i=n(79989);function a(e){return(0,i.hasProperty)(e,"signal")}function o(e){return(0,i.hasProperty)(e,"step")}function s(e){return!(0,r.isArray)(e)&&((0,i.hasProperty)(e,"fields")&&!(0,i.hasProperty)(e,"data"))}function l(e){return!(0,r.isArray)(e)&&((0,i.hasProperty)(e,"fields")&&(0,i.hasProperty)(e,"data"))}function u(e){return!(0,r.isArray)(e)&&((0,i.hasProperty)(e,"field")&&(0,i.hasProperty)(e,"data"))}const c=(0,i.keys)({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1}),d={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},f=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"]},83418:(e,t,n)=>{"use strict";n.r(t),n.d(t,{format:()=>R,formats:()=>D,inferType:()=>S,inferTypes:()=>w,loader:()=>F,read:()=>O,responseType:()=>N,typeParsers:()=>b});var r=n(26372),i=n(84112),a=n(12196),o=n(40300);const s=/^(data:|([A-Za-z]+:)?\/\/)/,l=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,u=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,c="file://";async function d(e,t){const n=await this.sanitize(e,t),r=n.href;return n.localFile?this.file(r):this.http(r,t)}async function f(e,t){t=(0,r.extend)({},this.options,t);const n=this.fileAccess,i={href:null};let a,o,d;const f=l.test(e.replace(u,""));null!=e&&"string"==typeof e&&f||(0,r.error)("Sanitize failure, invalid URI: "+(0,r.stringValue)(e));const p=s.test(e);return(d=t.baseURL)&&!p&&(e.startsWith("/")||d.endsWith("/")||(e="/"+e),e=d+e),o=(a=e.startsWith(c))||"file"===t.mode||"http"!==t.mode&&!p&&n,a?e=e.slice(7):e.startsWith("//")&&("file"===t.defaultProtocol?(e=e.slice(2),o=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(i,"localFile",{value:!!o}),i.href=e,t.target&&(i.target=t.target+""),t.rel&&(i.rel=t.rel+""),"image"===t.context&&t.crossOrigin&&(i.crossOrigin=t.crossOrigin+""),i}function p(e){return e?t=>new Promise(((n,r)=>{e.readFile(t,((e,t)=>{e?r(e):n(t)}))})):h}async function h(){(0,r.error)("No file system access.")}function g(e){return e?async function(t,n){const i=(0,r.extend)({},this.options.http,n),a=n&&n.response,o=await e(t,i);return o.ok?(0,r.isFunction)(o[a])?o[a]():o.text():(0,r.error)(o.status+""+o.statusText)}:m}async function m(){(0,r.error)("No HTTP fetch method available.")}const y=e=>null!=e&&e==e,v=e=>!(Number.isNaN(+e)||e instanceof Date),b={boolean:r.toBoolean,integer:r.toNumber,number:r.toNumber,date:r.toDate,string:r.toString,unknown:r.identity},x=[e=>"true"===e||"false"===e||!0===e||!1===e,e=>v(e)&&Number.isInteger(+e),v,e=>!Number.isNaN(Date.parse(e))],E=["boolean","integer","number","date"];function S(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=x.length,i=x.map(((e,t)=>t+1));for(let a,o,s=0,l=0;s0===e?t:e),0)-1]}function w(e,t){return t.reduce(((t,n)=>(t[n]=S(e,n),t)),{})}function _(e){const t=function(t,n){const i={delimiter:e};return A(t,n?(0,r.extend)(n,i):i)};return t.responseType="text",t}function A(e,t){return t.header&&(e=t.header.map(r.stringValue).join(t.delimiter)+"\n"+e),(0,i.dsvFormat)(t.delimiter).parse(e+"")}function C(e,t){const n=t&&t.property?(0,r.field)(t.property):r.identity;return!(0,r.isObject)(e)||(i=e,"function"==typeof Buffer&&(0,r.isFunction)(Buffer.isBuffer)&&Buffer.isBuffer(i))?n(JSON.parse(e)):function(e,t){!(0,r.isArray)(e)&&(0,r.isIterable)(e)&&(e=[...e]);return t&&t.copy?JSON.parse(JSON.stringify(e)):e}(n(e),t);var i}A.responseType="text",C.responseType="json";const T={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function k(e,t){let n,i,o,s;return e=C(e,t),t&&t.feature?(n=a.feature,o=t.feature):t&&t.mesh?(n=a.mesh,o=t.mesh,s=T[t.filter]):(0,r.error)("Missing TopoJSON feature or mesh parameter."),i=(i=e.objects[o])?n(e,i,s):(0,r.error)("Invalid TopoJSON object: "+o),i&&i.features||[i]}k.responseType="json";const R={dsv:A,csv:_(","),tsv:_("\t"),json:C,topojson:k};function D(e,t){return arguments.length>1?(R[e]=t,this):(0,r.hasOwnProperty)(R,e)?R[e]:null}function N(e){const t=D(e);return t&&t.responseType||"text"}function O(e,t,n,i){const a=D((t=t||{}).type||"json");return a||(0,r.error)("Unknown data format type: "+t.type),e=a(e,t),t.parse&&function(e,t,n,r){if(!e.length)return;const i=(0,o.timeFormatDefaultLocale)();n=n||i.timeParse,r=r||i.utcParse;let a,s,l,u,c,d,f=e.columns||Object.keys(e[0]);"auto"===t&&(t=w(e,f));f=Object.keys(t);const p=f.map((e=>{const i=t[e];let a,o;if(i&&(i.startsWith("date:")||i.startsWith("utc:"))){a=i.split(/:(.+)?/,2),o=a[1],("'"===o[0]&&"'"===o[o.length-1]||'"'===o[0]&&'"'===o[o.length-1])&&(o=o.slice(1,-1));return("utc"===a[0]?r:n)(o)}if(!b[i])throw Error("Illegal format pattern: "+e+":"+i);return b[i]}));for(l=0,c=e.length,d=f.length;l({options:n||{},sanitize:f,load:d,fileAccess:!!t,file:p(t),http:g(e)})}("undefined"!=typeof fetch&&fetch,null)},36808:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AxisDomainRole:()=>E,AxisGridRole:()=>S,AxisLabelRole:()=>w,AxisRole:()=>x,AxisTickRole:()=>_,AxisTitleRole:()=>A,DataScope:()=>kn,FrameRole:()=>v,LegendEntryRole:()=>k,LegendLabelRole:()=>D,LegendRole:()=>C,LegendSymbolRole:()=>N,LegendTitleRole:()=>O,MarkRole:()=>y,Scope:()=>br,ScopeRole:()=>b,config:()=>_r,parse:()=>Ar,signal:()=>X,signalUpdates:()=>be,stream:()=>de});var r=n(26372),i=n(31926),a=n(45948),o=n(14588),s=n(24988);function l(e){return(0,r.isObject)(e)?e:{type:e||"pad"}}const u=e=>+e||0,c=e=>({top:e,bottom:e,left:e,right:e});function d(e){return(0,r.isObject)(e)?e.signal?e:{top:u(e.top),bottom:u(e.bottom),left:u(e.left),right:u(e.right)}:c(u(e))}const f=e=>(0,r.isObject)(e)&&!(0,r.isArray)(e)?(0,r.extend)({},e):{value:e};function p(e,t,n,i){if(null!=n){return(0,r.isObject)(n)&&!(0,r.isArray)(n)||(0,r.isArray)(n)&&n.length&&(0,r.isObject)(n[0])?e.update[t]=n:e[i||"enter"][t]={value:n},1}return 0}function h(e,t,n){for(const n in t)p(e,n,t[n]);for(const t in n)p(e,t,n[t],"update")}function g(e,t,n){for(const i in t)n&&(0,r.hasOwnProperty)(n,i)||(e[i]=(0,r.extend)(e[i]||{},t[i]));return e}function m(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const y="mark",v="frame",b="scope",x="axis",E="axis-domain",S="axis-grid",w="axis-label",_="axis-tick",A="axis-title",C="legend",T="legend-band",k="legend-entry",R="legend-gradient",D="legend-label",N="legend-symbol",O="legend-title",F="title",P="title-text",M="title-subtitle";function I(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}const $=e=>(0,r.isString)(e)?(0,r.stringValue)(e):e.signal?`(${e.signal})`:z(e);function L(e){if(null!=e.gradient)return function(e){const t=[e.start,e.stop,e.count].map((e=>null==e?null:(0,r.stringValue)(e)));for(;t.length&&null==(0,r.peek)(t);)t.pop();return t.unshift($(e.gradient)),`gradient(${t.join(",")})`}(e);let t=e.signal?`(${e.signal})`:e.color?function(e){return e.c?B("hcl",e.h,e.c,e.l):e.h||e.s?B("hsl",e.h,e.s,e.l):e.l||e.a?B("lab",e.l,e.a,e.b):e.r||e.g||e.b?B("rgb",e.r,e.g,e.b):null}(e.color):null!=e.field?z(e.field):void 0!==e.value?(0,r.stringValue)(e.value):void 0;return null!=e.scale&&(t=function(e,t){const n=$(e.scale);null!=e.range?t=`lerp(_range(${n}), ${+e.range})`:(void 0!==t&&(t=`_scale(${n}, ${t})`),e.band&&(t=(t?t+"+":"")+`_bandwidth(${n})`+(1==+e.band?"":"*"+U(e.band)),e.extra&&(t=`(datum.extra ? _scale(${n}, datum.extra.value) : ${t})`)),null==t&&(t="0"));return t}(e,t)),void 0===t&&(t=null),null!=e.exponent&&(t=`pow(${t},${U(e.exponent)})`),null!=e.mult&&(t+=`*${U(e.mult)}`),null!=e.offset&&(t+=`+${U(e.offset)}`),e.round&&(t=`round(${t})`),t}const B=(e,t,n,r)=>`(${e}(${[t,n,r].map(L).join(",")})+'')`;function U(e){return(0,r.isObject)(e)?"("+L(e)+")":e}function z(e){return q((0,r.isObject)(e)?e:{datum:e})}function q(e){let t,n,i;if(e.signal)t="datum",i=e.signal;else if(e.group||e.parent){for(n=Math.max(1,e.level||1),t="item";n-- >0;)t+=".mark.group";e.parent?(i=e.parent,t+=".datum"):i=e.group}else e.datum?(t="datum",i=e.datum):(0,r.error)("Invalid field reference: "+(0,r.stringValue)(e));return e.signal||(i=(0,r.isString)(i)?(0,r.splitAccessPath)(i).map(r.stringValue).join("]["):q(i)),t+"["+i+"]"}function j(e,t,n,i,a,o){const s={};(o=o||{}).encoders={$encode:s},e=function(e,t,n,i,a){const o={},s={};let l,u,c,d;for(u in u="lineBreak","text"!==t||null==a[u]||m(u,e)||I(o,u,a[u]),("legend"==n||String(n).startsWith("axis"))&&(n=null),d=n===v?a.group:n===y?(0,r.extend)({},a.mark,a[t]):null,d)c=m(u,e)||("fill"===u||"stroke"===u)&&(m("fill",e)||m("stroke",e)),c||I(o,u,d[u]);for(u in(0,r.array)(i).forEach((t=>{const n=a.style&&a.style[t];for(const t in n)m(t,e)||I(o,t,n[t])})),e=(0,r.extend)({},e),o)d=o[u],d.signal?(l=l||{})[u]=d:s[u]=d;return e.enter=(0,r.extend)(s,e.enter),l&&(e.update=(0,r.extend)(l,e.update)),e}(e,t,n,i,a.config);for(const n in e)s[n]=H(e[n],t,o,a);return o}function H(e,t,n,i){const a={},o={};for(const t in e)null!=e[t]&&(a[t]=G((s=e[t],(0,r.isArray)(s)?function(e){let t="";return e.forEach((e=>{const n=L(e);t+=e.test?`(${e.test})?${n}:`:n})),":"===(0,r.peek)(t)&&(t+="null"),t}(s):L(s)),i,n,o));var s;return{$expr:{marktype:t,channels:a},$fields:Object.keys(o),$output:Object.keys(e)}}function G(e,t,n,a){const o=(0,i.parseExpression)(e,t);return o.$fields.forEach((e=>a[e]=1)),(0,r.extend)(n,o.$params),o.$expr}const V="outer",W=["value","update","init","react","bind"];function Y(e,t){(0,r.error)(e+' for "outer" push: '+(0,r.stringValue)(t))}function X(e,t){const n=e.name;if(e.push===V)t.signals[n]||Y("No prior signal definition",n),W.forEach((t=>{void 0!==e[t]&&Y("Invalid property ",t)}));else{const r=t.addSignal(n,e.value);!1===e.react&&(r.react=!1),e.bind&&t.addBinding(n,e.bind)}}function K(e,t,n,r){this.id=-1,this.type=e,this.value=t,this.params=n,r&&(this.parent=r)}function J(e,t,n,r){return new K(e,t,n,r)}function Q(e,t){return J("operator",e,t)}function Z(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function ee(e,t){return t?{$field:e,$name:t}:{$field:e}}const te=ee("key");function ne(e,t){return{$compare:e,$order:t}}function re(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const ie="scope",ae="view";function oe(e){return e&&e.signal}function se(e){if(oe(e))return!0;if((0,r.isObject)(e))for(const t in e)if(se(e[t]))return!0;return!1}function le(e,t){return null!=e?e:t}function ue(e){return e&&e.signal||e}const ce="timer";function de(e,t){return(e.merge?fe:e.stream?pe:e.type?he:(0,r.error)("Invalid stream specification: "+(0,r.stringValue)(e)))(e,t)}function fe(e,t){const n=ge({merge:e.merge.map((e=>de(e,t)))},e,t);return t.addStream(n).id}function pe(e,t){const n=ge({stream:de(e.stream,t)},e,t);return t.addStream(n).id}function he(e,t){let n;var r;e.type===ce?(n=t.event(ce,e.throttle),e={between:e.between,filter:e.filter}):n=t.event((r=e.source)===ie?ae:r||ae,e.type);const i=ge({stream:n},e,t);return 1===Object.keys(i).length?n:t.addStream(i).id}function ge(e,t,n){let a=t.between;return a&&(2!==a.length&&(0,r.error)('Stream "between" parameter must have 2 entries: '+(0,r.stringValue)(t)),e.between=[de(a[0],n),de(a[1],n)]),a=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&a.push(function(e,t,n){const r="event.item";return r+(e&&"*"!==e?"&&"+r+".mark.marktype==='"+e+"'":"")+(n?"&&"+r+".mark.role==='"+n+"'":"")+(t?"&&"+r+".mark.name==='"+t+"'":"")}(t.marktype,t.markname,t.markrole)),t.source===ie&&a.push("inScope(event.item)"),a.length&&(e.filter=(0,i.parseExpression)("("+a.join(")&&(")+")",n).$expr),null!=(a=t.throttle)&&(e.throttle=+a),null!=(a=t.debounce)&&(e.debounce=+a),t.consume&&(e.consume=!0),e}const me={code:"_.$value",ast:{type:"Identifier",value:"value"}};function ye(e,t,n){const o=e.encode,s={target:n};let l=e.events,u=e.update,c=[];l||(0,r.error)("Signal update missing events specification."),(0,r.isString)(l)&&(l=(0,a.parseSelector)(l,t.isSubscope()?ie:ae)),l=(0,r.array)(l).filter((e=>e.signal||e.scale?(c.push(e),0):1)),c.length>1&&(c=[ve(c)]),l.length&&c.push(l.length>1?{merge:l}:l[0]),null!=o&&(u&&(0,r.error)("Signal encode and update are mutually exclusive."),u="encode(item(),"+(0,r.stringValue)(o)+")"),s.update=(0,r.isString)(u)?(0,i.parseExpression)(u,t):null!=u.expr?(0,i.parseExpression)(u.expr,t):null!=u.value?u.value:null!=u.signal?{$expr:me,$params:{$value:t.signalRef(u.signal)}}:(0,r.error)("Invalid signal update specification."),e.force&&(s.options={force:!0}),c.forEach((e=>t.addUpdate((0,r.extend)(function(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):de(e,t)}}(e,t),s))))}function ve(e){return{signal:"["+e.map((e=>e.scale?'scale("'+e.scale+'")':e.signal))+"]"}}function be(e,t){const n=t.getSignal(e.name);let a=e.update;e.init&&(a?(0,r.error)("Signals can not include both init and update expressions."):(a=e.init,n.initonly=!0)),a&&(a=(0,i.parseExpression)(a,t),n.update=a.$expr,n.params=a.$params),e.on&&e.on.forEach((e=>ye(e,t,n.id)))}const xe=e=>(t,n,r)=>J(e,n,t||void 0,r),Ee=xe("aggregate"),Se=xe("axisticks"),we=xe("bound"),_e=xe("collect"),Ae=xe("compare"),Ce=xe("datajoin"),Te=xe("encode"),ke=xe("expression"),Re=xe("facet"),De=xe("field"),Ne=xe("key"),Oe=xe("legendentries"),Fe=xe("load"),Pe=xe("mark"),Me=xe("multiextent"),Ie=xe("multivalues"),$e=xe("overlap"),Le=xe("params"),Be=xe("prefacet"),Ue=xe("projection"),ze=xe("proxy"),qe=xe("relay"),je=xe("render"),He=xe("scale"),Ge=xe("sieve"),Ve=xe("sortitems"),We=xe("viewlayout"),Ye=xe("values");let Xe=0;const Ke={min:"min",max:"max",count:"sum"};function Je(e,t){const n=t.getScale(e.name).params;let i;for(i in n.domain=tt(e.domain,e,t),null!=e.range&&(n.range=ut(e,t,n)),null!=e.interpolate&&function(e,t){t.interpolate=Qe(e.type||e),null!=e.gamma&&(t.interpolateGamma=Qe(e.gamma))}(e.interpolate,n),null!=e.nice&&(n.nice=function(e,t){return e.signal?t.signalRef(e.signal):(0,r.isObject)(e)?{interval:Qe(e.interval),step:Qe(e.step)}:Qe(e)}(e.nice,t)),null!=e.bins&&(n.bins=function(e,t){return e.signal||(0,r.isArray)(e)?Ze(e,t):t.objectProperty(e)}(e.bins,t)),e)(0,r.hasOwnProperty)(n,i)||"name"===i||(n[i]=Qe(e[i],t))}function Qe(e,t){return(0,r.isObject)(e)?e.signal?t.signalRef(e.signal):(0,r.error)("Unsupported object: "+(0,r.stringValue)(e)):e}function Ze(e,t){return e.signal?t.signalRef(e.signal):e.map((e=>Qe(e,t)))}function et(e){(0,r.error)("Can not find data set: "+(0,r.stringValue)(e))}function tt(e,t,n){if(e)return e.signal?n.signalRef(e.signal):((0,r.isArray)(e)?nt:e.fields?it:rt)(e,t,n);null==t.domainMin&&null==t.domainMax||(0,r.error)("No scale domain defined for domainMin/domainMax to override.")}function nt(e,t,n){return e.map((e=>Qe(e,n)))}function rt(e,t,n){const r=n.getData(e.data);return r||et(e.data),(0,o.isDiscrete)(t.type)?r.valuesRef(n,e.field,ot(e.sort,!1)):(0,o.isQuantile)(t.type)?r.domainRef(n,e.field):r.extentRef(n,e.field)}function it(e,t,n){const i=e.data,a=e.fields.reduce(((e,t)=>(t=(0,r.isString)(t)?{data:i,field:t}:(0,r.isArray)(t)||t.signal?function(e,t){const n="_:vega:_"+Xe++,i=_e({});if((0,r.isArray)(e))i.value={$ingest:e};else if(e.signal){const a="setdata("+(0,r.stringValue)(n)+","+e.signal+")";i.params.input=t.signalRef(a)}return t.addDataPipeline(n,[i,Ge({})]),{data:n,field:"data"}}(t,n):t,e.push(t),e)),[]);return((0,o.isDiscrete)(t.type)?at:(0,o.isQuantile)(t.type)?st:lt)(e,n,a)}function at(e,t,n){const r=ot(e.sort,!0);let i,a;const o=n.map((e=>{const n=t.getData(e.data);return n||et(e.data),n.countsRef(t,e.field,r)})),s={groupby:te,pulse:o};r&&(i=r.op||"count",a=r.field?re(i,r.field):"count",s.ops=[Ke[i]],s.fields=[t.fieldRef(a)],s.as=[a]),i=t.add(Ee(s));const l=t.add(_e({pulse:Z(i)}));return a=t.add(Ye({field:te,sort:t.sortRef(r),pulse:Z(l)})),Z(a)}function ot(e,t){return e&&(e.field||e.op?e.field||"count"===e.op?t&&e.field&&e.op&&!Ke[e.op]&&(0,r.error)("Multiple domain scales can not be sorted using "+e.op):(0,r.error)("No field provided for sort aggregate op: "+e.op):(0,r.isObject)(e)?e.field="key":e={field:"key"}),e}function st(e,t,n){const r=n.map((e=>{const n=t.getData(e.data);return n||et(e.data),n.domainRef(t,e.field)}));return Z(t.add(Ie({values:r})))}function lt(e,t,n){const r=n.map((e=>{const n=t.getData(e.data);return n||et(e.data),n.extentRef(t,e.field)}));return Z(t.add(Me({extents:r})))}function ut(e,t,n){const i=t.config.range;let a=e.range;if(a.signal)return t.signalRef(a.signal);if((0,r.isString)(a)){if(i&&(0,r.hasOwnProperty)(i,a))return ut(e=(0,r.extend)({},e,{range:i[a]}),t,n);"width"===a?a=[0,{signal:"width"}]:"height"===a?a=(0,o.isDiscrete)(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:(0,r.error)("Unrecognized scale range value: "+(0,r.stringValue)(a))}else{if(a.scheme)return n.scheme=(0,r.isArray)(a.scheme)?Ze(a.scheme,t):Qe(a.scheme,t),a.extent&&(n.schemeExtent=Ze(a.extent,t)),void(a.count&&(n.schemeCount=Qe(a.count,t)));if(a.step)return void(n.rangeStep=Qe(a.step,t));if((0,o.isDiscrete)(e.type)&&!(0,r.isArray)(a))return tt(a,e,t);(0,r.isArray)(a)||(0,r.error)("Unsupported range type: "+(0,r.stringValue)(a))}return a.map((e=>((0,r.isArray)(e)?Ze:Qe)(e,t)))}function ct(e,t,n){return(0,r.isArray)(e)?e.map((e=>ct(e,t,n))):(0,r.isObject)(e)?e.signal?n.signalRef(e.signal):"fit"===t?e:(0,r.error)("Unsupported parameter object: "+(0,r.stringValue)(e)):e}const dt="top",ft="left",pt="right",ht="bottom",gt="center",mt="vertical",yt="start",vt="end",bt="index",xt="label",Et="offset",St="perc",wt="perc2",_t="value",At="guide-label",Ct="guide-title",Tt="group-title",kt="group-subtitle",Rt="symbol",Dt="gradient",Nt="discrete",Ot="size",Ft=[Ot,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],Pt={name:1,style:1,interactive:1},Mt={value:0},It={value:1},$t="group",Lt="rect",Bt="rule",Ut="symbol",zt="text";function qt(e){return e.type=$t,e.interactive=e.interactive||!1,e}function jt(e,t){const n=(n,r)=>le(e[n],le(t[n],r));return n.isVertical=n=>mt===le(e.direction,t.direction||(n?t.symbolDirection:t.gradientDirection)),n.gradientLength=()=>le(e.gradientLength,t.gradientLength||t.gradientWidth),n.gradientThickness=()=>le(e.gradientThickness,t.gradientThickness||t.gradientHeight),n.entryColumns=()=>le(e.columns,le(t.columns,+n.isVertical(!0))),n}function Ht(e,t){const n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function Gt(e,t,n){return`item.anchor === '${yt}' ? ${e} : item.anchor === '${vt}' ? ${t} : ${n}`}const Vt=Gt((0,r.stringValue)(ft),(0,r.stringValue)(pt),(0,r.stringValue)(gt));function Wt(e,t){return t?e?(0,r.isObject)(e)?Object.assign({},e,{offset:Wt(e.offset,t)}):{value:e,offset:t}:t:e}function Yt(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=g(e.encode,t,Pt)):e.interactive=!1,e}function Xt(e,t,n,i){const a=jt(e,n),o=a.isVertical(),s=a.gradientThickness(),l=a.gradientLength();let u,c,d,p,g;o?(c=[0,1],d=[0,0],p=s,g=l):(c=[0,0],d=[1,0],p=l,g=s);const m={enter:u={opacity:Mt,x:Mt,y:Mt,width:f(p),height:f(g)},update:(0,r.extend)({},u,{opacity:It,fill:{gradient:t,start:c,stop:d}}),exit:{opacity:Mt}};return h(m,{stroke:a("gradientStrokeColor"),strokeWidth:a("gradientStrokeWidth")},{opacity:a("gradientOpacity")}),Yt({type:Lt,role:R,encode:m},i)}function Kt(e,t,n,i,a){const o=jt(e,n),s=o.isVertical(),l=o.gradientThickness(),u=o.gradientLength();let c,d,p,g,m="";s?(c="y",p="y2",d="x",g="width",m="1-"):(c="x",p="x2",d="y",g="height");const y={opacity:Mt,fill:{scale:t,field:_t}};y[c]={signal:m+"datum."+St,mult:u},y[d]=Mt,y[p]={signal:m+"datum."+wt,mult:u},y[g]=f(l);const v={enter:y,update:(0,r.extend)({},y,{opacity:It}),exit:{opacity:Mt}};return h(v,{stroke:o("gradientStrokeColor"),strokeWidth:o("gradientStrokeWidth")},{opacity:o("gradientOpacity")}),Yt({type:Lt,role:T,key:_t,from:a,encode:v},i)}const Jt=`datum.${St}<=0?"${ft}":datum.${St}>=1?"${pt}":"${gt}"`,Qt=`datum.${St}<=0?"${ht}":datum.${St}>=1?"${dt}":"middle"`;function Zt(e,t,n,r){const i=jt(e,t),a=i.isVertical(),o=f(i.gradientThickness()),s=i.gradientLength();let l,u,c,d,p=i("labelOverlap"),g="";const m={enter:l={opacity:Mt},update:u={opacity:It,text:{field:xt}},exit:{opacity:Mt}};return h(m,{fill:i("labelColor"),fillOpacity:i("labelOpacity"),font:i("labelFont"),fontSize:i("labelFontSize"),fontStyle:i("labelFontStyle"),fontWeight:i("labelFontWeight"),limit:le(e.labelLimit,t.gradientLabelLimit)}),a?(l.align={value:"left"},l.baseline=u.baseline={signal:Qt},c="y",d="x",g="1-"):(l.align=u.align={signal:Jt},l.baseline={value:"top"},c="x",d="y"),l[c]=u[c]={signal:g+"datum."+St,mult:s},l[d]=u[d]=o,o.offset=le(e.labelOffset,t.gradientLabelOffset)||0,p=p?{separation:i("labelSeparation"),method:p,order:"datum."+bt}:void 0,Yt({type:zt,role:D,style:At,key:_t,from:r,encode:m,overlap:p},n)}function en(e,t,n,r,i){const a=jt(e,t),o=n.entries,s=!(!o||!o.interactive),l=o?o.name:void 0,u=a("clipHeight"),c=a("symbolOffset"),d={data:"value"},p=`(${i}) ? datum.${Et} : datum.${Ot}`,m=u?f(u):{field:Ot},y=`datum.${bt}`,v=`max(1, ${i})`;let x,E,S,w,_;m.mult=.5,x={enter:E={opacity:Mt,x:{signal:p,mult:.5,offset:c},y:m},update:S={opacity:It,x:E.x,y:E.y},exit:{opacity:Mt}};let A=null,C=null;e.fill||(A=t.symbolBaseFillColor,C=t.symbolBaseStrokeColor),h(x,{fill:a("symbolFillColor",A),shape:a("symbolType"),size:a("symbolSize"),stroke:a("symbolStrokeColor",C),strokeDash:a("symbolDash"),strokeDashOffset:a("symbolDashOffset"),strokeWidth:a("symbolStrokeWidth")},{opacity:a("symbolOpacity")}),Ft.forEach((t=>{e[t]&&(S[t]=E[t]={scale:e[t],field:_t})}));const T=Yt({type:Ut,role:N,key:_t,from:d,clip:!!u||void 0,encode:x},n.symbols),k=f(c);k.offset=a("labelOffset"),x={enter:E={opacity:Mt,x:{signal:p,offset:k},y:m},update:S={opacity:It,text:{field:xt},x:E.x,y:E.y},exit:{opacity:Mt}},h(x,{align:a("labelAlign"),baseline:a("labelBaseline"),fill:a("labelColor"),fillOpacity:a("labelOpacity"),font:a("labelFont"),fontSize:a("labelFontSize"),fontStyle:a("labelFontStyle"),fontWeight:a("labelFontWeight"),limit:a("labelLimit")});const R=Yt({type:zt,role:D,style:At,key:_t,from:d,encode:x},n.labels);return x={enter:{noBound:{value:!u},width:Mt,height:u?f(u):Mt,opacity:Mt},exit:{opacity:Mt},update:S={opacity:It,row:{signal:null},column:{signal:null}}},a.isVertical(!0)?(w=`ceil(item.mark.items.length / ${v})`,S.row.signal=`${y}%${w}`,S.column.signal=`floor(${y} / ${w})`,_={field:["row",y]}):(S.row.signal=`floor(${y} / ${v})`,S.column.signal=`${y} % ${v}`,_={field:y}),S.column.signal=`(${i})?${S.column.signal}:${y}`,qt({role:b,from:r={facet:{data:r,name:"value",groupby:bt}},encode:g(x,o,Pt),marks:[T,R],name:l,interactive:s,sort:_})}const tn='item.orient === "left"',nn='item.orient === "right"',rn=`(${tn} || ${nn})`,an=`datum.vgrad && ${rn}`,on=Gt('"top"','"bottom"','"middle"'),sn=`datum.vgrad && ${nn} ? (${Gt('"right"','"left"','"center"')}) : (${rn} && !(datum.vgrad && ${tn})) ? "left" : ${Vt}`,ln=`item._anchor || (${rn} ? "middle" : "start")`,un=`${an} ? (${tn} ? -90 : 90) : 0`,cn=`${rn} ? (datum.vgrad ? (${nn} ? "bottom" : "top") : ${on}) : "top"`;function dn(e,t){let n;return(0,r.isObject)(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+fn(e.path)+")":e.sphere&&(n="geoShape("+fn(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e}function fn(e){return(0,r.isObject)(e)&&e.signal?e.signal:(0,r.stringValue)(e)}function pn(e){const t=e.role||"";return t.startsWith("axis")||t.startsWith("legend")||t.startsWith("title")?t:e.type===$t?b:t||y}function hn(e){return{marktype:e.type,name:e.name||void 0,role:e.role||pn(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function gn(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e}function mn(e,t){const n=(0,s.definition)(e.type);n||(0,r.error)("Unrecognized transform type: "+(0,r.stringValue)(e.type));const i=J(n.type.toLowerCase(),null,yn(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(i)),i.metadata=n.metadata||{},i}function yn(e,t,n){const r={},i=e.params.length;for(let a=0;axn(e,t,n)))):xn(e,i,n)}(e,t,n):"projection"===i?n.projectionRef(t[e.name]):e.array&&!oe(a)?a.map((t=>bn(e,t,n))):bn(e,a,n):void(e.required&&(0,r.error)("Missing required "+(0,r.stringValue)(t.type)+" parameter: "+(0,r.stringValue)(e.name)))}function bn(e,t,n){const a=e.type;if(oe(t))return _n(a)?(0,r.error)("Expression references can not be signals."):An(a)?n.fieldRef(t):Cn(a)?n.compareRef(t):n.signalRef(t.signal);{const r=e.expr||An(a);return r&&En(t)?n.exprRef(t.expr,t.as):r&&Sn(t)?ee(t.field,t.as):_n(a)?(0,i.parseExpression)(t,n):wn(a)?Z(n.getData(t).values):An(a)?ee(t):Cn(a)?n.compareRef(t):t}}function xn(e,t,n){const i=e.params.length;let a;for(let n=0;ne&&e.expr,Sn=e=>e&&e.field,wn=e=>"data"===e,_n=e=>"expr"===e,An=e=>"field"===e,Cn=e=>"compare"===e;function Tn(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:Z(t.getData(e.data).output)}function kn(e,t,n,r,i){this.scope=e,this.input=t,this.output=n,this.values=r,this.aggregate=i,this.index={}}function Rn(e){return(0,r.isString)(e)?e:null}function Dn(e,t,n){const r=re(n.op,n.field);let i;if(t.ops){for(let e=0,n=t.as.length;enull==e?"null":e)).join(",")+"),0)",d=(0,i.parseExpression)(c,t);u.update=d.$expr,u.params=d.$params}function Fn(e,t){const n=pn(e),i=e.type===$t,a=e.from&&e.from.facet,o=e.overlap;let s,l,u,c,d,f,p,h=e.layout||n===b||n===v;const g=n===y||h||a,m=function(e,t,n){let i,a,o,s,l;return e?(i=e.facet)&&(t||(0,r.error)("Only group marks can be faceted."),null!=i.field?s=l=Tn(i,n):(e.data?l=Z(n.getData(e.data).aggregate):(o=mn((0,r.extend)({type:"aggregate",groupby:(0,r.array)(i.groupby)},i.aggregate),n),o.params.key=n.keyRef(i.groupby),o.params.pulse=Tn(i,n),s=l=Z(n.add(o))),a=n.keyRef(i.groupby,!0))):s=Z(n.add(_e(null,[{}]))),s||(s=Tn(e,n)),{key:a,pulse:s,parent:l}}(e.from,i,t);l=t.add(Ce({key:m.key||(e.key?ee(e.key):void 0),pulse:m.pulse,clean:!i}));const x=Z(l);l=u=t.add(_e({pulse:x})),l=t.add(Pe({markdef:hn(e),interactive:gn(e.interactive,t),clip:dn(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:Z(l)}));const E=Z(l);l=c=t.add(Te(j(e.encode,e.type,n,e.style,t,{mod:!1,pulse:E}))),l.params.parent=t.encode(),e.transform&&e.transform.forEach((e=>{const n=mn(e,t),i=n.metadata;(i.generates||i.changes)&&(0,r.error)("Mark transforms should not generate new data."),i.nomod||(c.params.mod=!0),n.params.pulse=Z(l),t.add(l=n)})),e.sort&&(l=t.add(Ve({sort:t.compareRef(e.sort),pulse:Z(l)})));const S=Z(l);(a||h)&&(h=t.add(We({layout:t.objectProperty(e.layout),legends:t.legends,mark:E,pulse:S})),f=Z(h));const w=t.add(we({mark:E,pulse:f||S}));p=Z(w),i&&(g&&(s=t.operators,s.pop(),h&&s.pop()),t.pushState(S,f||p,x),a?function(e,t,n){const i=e.from.facet,a=i.name,o=Tn(i,t);let s;i.name||(0,r.error)("Facet must have a name: "+(0,r.stringValue)(i)),i.data||(0,r.error)("Facet must reference a data set: "+(0,r.stringValue)(i)),i.field?s=t.add(Be({field:t.fieldRef(i.field),pulse:o})):i.groupby?s=t.add(Re({key:t.keyRef(i.groupby),group:Z(t.proxy(n.parent)),pulse:o})):(0,r.error)("Facet must specify groupby or field: "+(0,r.stringValue)(i));const l=t.fork(),u=l.add(_e()),c=l.add(Ge({pulse:Z(u)}));l.addData(a,new kn(l,u,u,c)),l.addSignal("parent",null),s.params.subflow={$subflow:l.parse(e).toRuntime()}}(e,t,m):g?function(e,t,n){const r=t.add(Be({pulse:n.pulse})),i=t.fork();i.add(Ge()),i.addSignal("parent",null),r.params.subflow={$subflow:i.parse(e).toRuntime()}}(e,t,m):t.parse(e),t.popState(),g&&(h&&s.push(h),s.push(w))),o&&(p=function(e,t,n){const r=e.method,i=e.bound,a=e.separation,o={separation:oe(a)?n.signalRef(a.signal):a,method:oe(r)?n.signalRef(r.signal):r,pulse:t};e.order&&(o.sort=n.compareRef({field:e.order}));if(i){const e=i.tolerance;o.boundTolerance=oe(e)?n.signalRef(e.signal):+e,o.boundScale=n.scaleRef(i.scale),o.boundOrient=i.orient}return Z(n.add($e(o)))}(o,p,t));const _=t.add(je({pulse:p})),A=t.add(Ge({pulse:Z(_)},void 0,t.parent()));null!=e.name&&(d=e.name,t.addData(d,new kn(t,u,_,A)),e.on&&e.on.forEach((e=>{(e.insert||e.remove||e.toggle)&&(0,r.error)("Marks only support modify triggers."),On(e,t,d)})))}function Pn(e,t){const n=t.config.legend,a=e.encode||{},s=jt(e,n),l=a.legend||{},u=l.name||void 0,c=l.interactive,d=l.style,f={};let p,m,y,v=0;Ft.forEach((t=>e[t]?(f[t]=e[t],v=v||e[t]):0)),v||(0,r.error)("Missing valid scale for legend.");const b=function(e,t){let n=e.type||Rt;e.type||1!==function(e){return Ft.reduce(((t,n)=>t+(e[n]?1:0)),0)}(e)||!e.fill&&!e.stroke||(n=(0,o.isContinuous)(t)?Dt:(0,o.isDiscretizing)(t)?Nt:Rt);return n!==Dt?n:(0,o.isDiscretizing)(t)?Nt:Dt}(e,t.scaleType(v)),x={title:null!=e.title,scales:f,type:b,vgrad:"symbol"!==b&&s.isVertical()},E=Z(t.add(_e(null,[x]))),S=Z(t.add(Oe(m={type:b,scale:t.scaleRef(v),count:t.objectProperty(s("tickCount")),limit:t.property(s("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return b===Dt?(y=[Xt(e,v,n,a.gradient),Zt(e,n,a.labels,S)],m.count=m.count||t.signalRef(`max(2,2*floor((${ue(s.gradientLength())})/100))`)):b===Nt?y=[Kt(e,v,n,a.gradient,S),Zt(e,n,a.labels,S)]:(p=function(e,t){const n=jt(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(e,n),y=[en(e,n,a,S,ue(p.columns))],m.size=function(e,t,n){const r=ue(In("size",e,n)),a=ue(In("strokeWidth",e,n)),o=ue(function(e,t,n){return Ht("fontSize",e)||function(e,t,n){const r=t.config.style[n];return r&&r[e]}("fontSize",t,n)}(n[1].encode,t,At));return(0,i.parseExpression)(`max(ceil(sqrt(${r})+${a}),${o})`,t)}(e,t,y[0].marks)),y=[qt({role:k,from:E,encode:{enter:{x:{value:0},y:{value:0}}},marks:y,layout:p,interactive:c})],x.title&&y.push(function(e,t,n,r){const i=jt(e,t),a={enter:{opacity:Mt},update:{opacity:It,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:Mt}};return h(a,{orient:i("titleOrient"),_anchor:i("titleAnchor"),anchor:{signal:ln},angle:{signal:un},align:{signal:sn},baseline:{signal:cn},text:e.title,fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),baseline:i("titleBaseline")}),Yt({type:zt,role:O,style:Ct,from:r,encode:a},n)}(e,n,a.title,E)),Fn(qt({role:C,from:E,encode:g(Mn(s,e,n),l,Pt),marks:y,aria:s("aria"),description:s("description"),zindex:s("zindex"),name:u,interactive:c,style:d}),t)}function Mn(e,t,n){const r={enter:{},update:{}};return h(r,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),r}function In(e,t,n){return t[e]?`scale("${t[e]}",datum)`:Ht(e,n[0].encode)}kn.fromEntries=function(e,t){const n=t.length,r=t[n-1],i=t[n-2];let a=t[0],o=null,s=1;for(a&&"load"===a.type&&(a=t[1]),e.add(t[0]);s{n.push(mn(e,t))})),e.on&&e.on.forEach((n=>{On(n,t,e.name)})),t.addDataPipeline(e.name,function(e,t,n){const i=[];let a,o,s,l,u,c=null,d=!1,f=!1;e.values?oe(e.values)||se(e.format)?(i.push(qn(t,e)),i.push(c=zn())):i.push(c=zn({$ingest:e.values,$format:e.format})):e.url?se(e.url)||se(e.format)?(i.push(qn(t,e)),i.push(c=zn())):i.push(c=zn({$request:e.url,$format:e.format})):e.source&&(c=a=(0,r.array)(e.source).map((e=>Z(t.getData(e).output))),i.push(null));for(o=0,s=n.length;oe===ht||e===dt,Hn=(e,t,n)=>oe(e)?Jn(e.signal,t,n):e===ft||e===dt?t:n,Gn=(e,t,n)=>oe(e)?Xn(e.signal,t,n):jn(e)?t:n,Vn=(e,t,n)=>oe(e)?Kn(e.signal,t,n):jn(e)?n:t,Wn=(e,t,n)=>oe(e)?Qn(e.signal,t,n):e===dt?{value:t}:{value:n},Yn=(e,t,n)=>oe(e)?Zn(e.signal,t,n):e===pt?{value:t}:{value:n},Xn=(e,t,n)=>er(`${e} === '${dt}' || ${e} === '${ht}'`,t,n),Kn=(e,t,n)=>er(`${e} !== '${dt}' && ${e} !== '${ht}'`,t,n),Jn=(e,t,n)=>nr(`${e} === '${ft}' || ${e} === '${dt}'`,t,n),Qn=(e,t,n)=>nr(`${e} === '${dt}'`,t,n),Zn=(e,t,n)=>nr(`${e} === '${pt}'`,t,n),er=(e,t,n)=>(t=null!=t?f(t):t,n=null!=n?f(n):n,tr(t)&&tr(n)?{signal:`${e} ? (${t=t?t.signal||(0,r.stringValue)(t.value):null}) : (${n=n?n.signal||(0,r.stringValue)(n.value):null})`}:[(0,r.extend)({test:e},t)].concat(n||[])),tr=e=>null==e||1===Object.keys(e).length,nr=(e,t,n)=>({signal:`${e} ? (${ir(t)}) : (${ir(n)})`}),rr=(e,t,n,r,i)=>({signal:(null!=r?`${e} === '${ft}' ? (${ir(r)}) : `:"")+(null!=n?`${e} === '${ht}' ? (${ir(n)}) : `:"")+(null!=i?`${e} === '${pt}' ? (${ir(i)}) : `:"")+(null!=t?`${e} === '${dt}' ? (${ir(t)}) : `:"")+"(null)"}),ir=e=>oe(e)?e.signal:null==e?null:(0,r.stringValue)(e),ar=(e,t)=>0===t?0:oe(e)?{signal:`(${e.signal}) * ${t}`}:{value:e*t},or=(e,t)=>{const n=e.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+t.signal}:e};function sr(e,t,n,i){let a;if(t&&(0,r.hasOwnProperty)(t,e))return t[e];if((0,r.hasOwnProperty)(n,e))return n[e];if(e.startsWith("title")){switch(e){case"titleColor":a="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":a=e[5].toLowerCase()+e.slice(6)}return i[Ct][a]}if(e.startsWith("label")){switch(e){case"labelColor":a="fill";break;case"labelFont":case"labelFontSize":a=e[5].toLowerCase()+e.slice(6)}return i[At][a]}return null}function lr(e){const t={};for(const n of e)if(n)for(const e in n)t[e]=1;return Object.keys(t)}function ur(e,t){return{scale:e.scale,range:t}}function cr(e,t,n,i,a){const o=jt(e,t),s=e.orient,l=e.gridScale,u=Hn(s,1,-1),c=function(e,t){if(1===t);else if((0,r.isObject)(e)){let n=e=(0,r.extend)({},e);for(;null!=n.mult;){if(!(0,r.isObject)(n.mult))return n.mult=oe(t)?{signal:`(${n.mult}) * (${t.signal})`}:n.mult*t,e;n=n.mult=(0,r.extend)({},n.mult)}n.mult=t}else e=oe(t)?{signal:`(${t.signal}) * (${e||0})`}:t*(e||0);return e}(e.offset,u);let d,f,p;const g={enter:d={opacity:Mt},update:p={opacity:It},exit:f={opacity:Mt}};h(g,{stroke:o("gridColor"),strokeCap:o("gridCap"),strokeDash:o("gridDash"),strokeDashOffset:o("gridDashOffset"),strokeOpacity:o("gridOpacity"),strokeWidth:o("gridWidth")});const m={scale:e.scale,field:_t,band:a.band,extra:a.extra,offset:a.offset,round:o("tickRound")},y=Gn(s,{signal:"height"},{signal:"width"}),v=l?{scale:l,range:0,mult:u,offset:c}:{value:0,offset:c},b=l?{scale:l,range:1,mult:u,offset:c}:(0,r.extend)(y,{mult:u,offset:c});return d.x=p.x=Gn(s,m,v),d.y=p.y=Vn(s,m,v),d.x2=p.x2=Vn(s,b),d.y2=p.y2=Gn(s,b),f.x=Gn(s,m),f.y=Vn(s,m),Yt({type:Bt,role:S,key:_t,from:i,encode:g},n)}function dr(e,t,n,r,i){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+r+","+i+")"}}function fr(e,t,n,i){const a=jt(e,t),o=e.orient,s=Hn(o,-1,1);let l,u;const c={enter:l={opacity:Mt,anchor:f(a("titleAnchor",null)),align:{signal:Vt}},update:u=(0,r.extend)({},l,{opacity:It,text:f(e.title)}),exit:{opacity:Mt}},d={signal:`lerp(range("${e.scale}"), ${Gt(0,1,.5)})`};return u.x=Gn(o,d),u.y=Vn(o,d),l.angle=Gn(o,Mt,ar(s,90)),l.baseline=Gn(o,Wn(o,ht,dt),{value:ht}),u.angle=l.angle,u.baseline=l.baseline,h(c,{fill:a("titleColor"),fillOpacity:a("titleOpacity"),font:a("titleFont"),fontSize:a("titleFontSize"),fontStyle:a("titleFontStyle"),fontWeight:a("titleFontWeight"),limit:a("titleLimit"),lineHeight:a("titleLineHeight")},{align:a("titleAlign"),angle:a("titleAngle"),baseline:a("titleBaseline")}),function(e,t,n,r){const i=(e,t)=>null!=e?(n.update[t]=or(f(e),n.update[t]),!1):!m(t,r),a=i(e("titleX"),"x"),o=i(e("titleY"),"y");n.enter.auto=o===a?f(o):Gn(t,f(o),f(a))}(a,o,c,n),c.update.align=or(c.update.align,l.align),c.update.angle=or(c.update.angle,l.angle),c.update.baseline=or(c.update.baseline,l.baseline),Yt({type:zt,role:A,style:Ct,from:i,encode:c},n)}function pr(e,t){const n=function(e,t){var n,i,a,o=t.config,s=o.style,l=o.axis,u="band"===t.scaleType(e.scale)&&o.axisBand,c=e.orient;if(oe(c)){const e=lr([o.axisX,o.axisY]),t=lr([o.axisTop,o.axisBottom,o.axisLeft,o.axisRight]);for(a of(n={},e))n[a]=Gn(c,sr(a,o.axisX,l,s),sr(a,o.axisY,l,s));for(a of(i={},t))i[a]=rr(c.signal,sr(a,o.axisTop,l,s),sr(a,o.axisBottom,l,s),sr(a,o.axisLeft,l,s),sr(a,o.axisRight,l,s))}else n=c===dt||c===ht?o.axisX:o.axisY,i=o["axis"+c[0].toUpperCase()+c.slice(1)];return n||i||u?(0,r.extend)({},l,n,i,u):l}(e,t),i=e.encode||{},a=i.axis||{},o=a.name||void 0,s=a.interactive,l=a.style,u=jt(e,n),c=function(e){const t=e("tickBand");let n,i,a=e("tickOffset");return t?t.signal?(n={signal:`(${t.signal}) === 'extent' ? 1 : 0.5`},i={signal:`(${t.signal}) === 'extent'`},(0,r.isObject)(a)||(a={signal:`(${t.signal}) === 'extent' ? 0 : ${a}`})):"extent"===t?(n=1,i=!0,a=0):(n=.5,i=!1):(n=e("bandPosition"),i=e("tickExtra")),{extra:i,band:n,offset:a}}(u),d={scale:e.scale,ticks:!!u("ticks"),labels:!!u("labels"),grid:!!u("grid"),domain:!!u("domain"),title:null!=e.title},p=Z(t.add(_e({},[d]))),m=Z(t.add(Se({scale:t.scaleRef(e.scale),extra:t.property(c.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),y=[];let v;return d.grid&&y.push(cr(e,n,i.grid,m,c)),d.ticks&&(v=u("tickSize"),y.push(function(e,t,n,r,i,a){const o=jt(e,t),s=e.orient,l=Hn(s,-1,1);let u,c,d;const p={enter:u={opacity:Mt},update:d={opacity:It},exit:c={opacity:Mt}};h(p,{stroke:o("tickColor"),strokeCap:o("tickCap"),strokeDash:o("tickDash"),strokeDashOffset:o("tickDashOffset"),strokeOpacity:o("tickOpacity"),strokeWidth:o("tickWidth")});const g=f(i);g.mult=l;const m={scale:e.scale,field:_t,band:a.band,extra:a.extra,offset:a.offset,round:o("tickRound")};return d.y=u.y=Gn(s,Mt,m),d.y2=u.y2=Gn(s,g),c.x=Gn(s,m),d.x=u.x=Vn(s,Mt,m),d.x2=u.x2=Vn(s,g),c.y=Vn(s,m),Yt({type:Bt,role:_,key:_t,from:r,encode:p},n)}(e,n,i.ticks,m,v,c))),d.labels&&(v=d.ticks?v:0,y.push(function(e,t,n,r,i,a){const o=jt(e,t),s=e.orient,l=e.scale,u=Hn(s,-1,1),c=ue(o("labelFlush")),d=ue(o("labelFlushOffset")),p=o("labelAlign"),g=o("labelBaseline");let m,y=0===c||!!c;const v=f(i);v.mult=u,v.offset=f(o("labelPadding")||0),v.offset.mult=u;const b={scale:l,field:_t,band:.5,offset:Wt(a.offset,o("labelOffset"))},x=Gn(s,y?dr(l,c,'"left"','"right"','"center"'):{value:"center"},Yn(s,"left","right")),E=Gn(s,Wn(s,"bottom","top"),y?dr(l,c,'"top"','"bottom"','"middle"'):{value:"middle"}),S=dr(l,c,`-(${d})`,d,0);y=y&&d;const _={opacity:Mt,x:Gn(s,b,v),y:Vn(s,b,v)},A={enter:_,update:m={opacity:It,text:{field:xt},x:_.x,y:_.y,align:x,baseline:E},exit:{opacity:Mt,x:_.x,y:_.y}};h(A,{dx:!p&&y?Gn(s,S):null,dy:!g&&y?Vn(s,S):null}),h(A,{angle:o("labelAngle"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontWeight:o("labelFontWeight"),fontStyle:o("labelFontStyle"),limit:o("labelLimit"),lineHeight:o("labelLineHeight")},{align:p,baseline:g});const C=o("labelBound");let T=o("labelOverlap");return T=T||C?{separation:o("labelSeparation"),method:T,order:"datum.index",bound:C?{scale:l,orient:s,tolerance:C}:null}:void 0,m.align!==x&&(m.align=or(m.align,x)),m.baseline!==E&&(m.baseline=or(m.baseline,E)),Yt({type:zt,role:w,style:At,key:_t,from:r,encode:A,overlap:T},n)}(e,n,i.labels,m,v,c))),d.domain&&y.push(function(e,t,n,r){const i=jt(e,t),a=e.orient;let o,s;const l={enter:o={opacity:Mt},update:s={opacity:It},exit:{opacity:Mt}};h(l,{stroke:i("domainColor"),strokeCap:i("domainCap"),strokeDash:i("domainDash"),strokeDashOffset:i("domainDashOffset"),strokeWidth:i("domainWidth"),strokeOpacity:i("domainOpacity")});const u=ur(e,0),c=ur(e,1);return o.x=s.x=Gn(a,u,Mt),o.x2=s.x2=Gn(a,c),o.y=s.y=Vn(a,u,Mt),o.y2=s.y2=Vn(a,c),Yt({type:Bt,role:E,from:r,encode:l},n)}(e,n,i.domain,p)),d.title&&y.push(fr(e,n,i.title,p)),Fn(qt({role:x,from:p,encode:g(hr(u,e),a,Pt),marks:y,aria:u("aria"),description:u("description"),zindex:u("zindex"),name:o,interactive:s,style:l}),t)}function hr(e,t){const n={enter:{},update:{}};return h(n,{orient:e("orient"),offset:e("offset")||0,position:le(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:`abs(span(range("${t.scale}")))`},translate:e("translate"),format:t.format,formatType:t.formatType}),n}function gr(e,t,n){const i=(0,r.array)(e.signals),a=(0,r.array)(e.scales);return n||i.forEach((e=>X(e,t))),(0,r.array)(e.projections).forEach((e=>function(e,t){const n=t.config.projection||{},r={};for(const n in e)"name"!==n&&(r[n]=ct(e[n],n,t));for(const e in n)null==r[e]&&(r[e]=ct(n[e],e,t));t.addProjection(e.name,r)}(e,t))),a.forEach((e=>function(e,t){const n=e.type||"linear";(0,o.isValidScaleType)(n)||(0,r.error)("Unrecognized scale type: "+(0,r.stringValue)(n)),t.addScale(e.name,{type:n,domain:void 0})}(e,t))),(0,r.array)(e.data).forEach((e=>Un(e,t))),a.forEach((e=>Je(e,t))),(n||i).forEach((e=>be(e,t))),(0,r.array)(e.axes).forEach((e=>pr(e,t))),(0,r.array)(e.marks).forEach((e=>Fn(e,t))),(0,r.array)(e.legends).forEach((e=>Pn(e,t))),e.title&&Ln(e.title,t),t.parseLambdas(),t}const mr=e=>g({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e);function yr(e,t){const n=t.config,i=Z(t.root=t.add(Q())),a=function(e,t){const n=n=>le(e[n],t[n]),i=[vr("background",n("background")),vr("autosize",l(n("autosize"))),vr("padding",d(n("padding"))),vr("width",n("width")||0),vr("height",n("height")||0)],a=i.reduce(((e,t)=>(e[t.name]=t,e)),{}),o={};return(0,r.array)(e.signals).forEach((e=>{(0,r.hasOwnProperty)(a,e.name)?e=(0,r.extend)(a[e.name],e):i.push(e),o[e.name]=e})),(0,r.array)(t.signals).forEach((e=>{(0,r.hasOwnProperty)(o,e.name)||(0,r.hasOwnProperty)(a,e.name)||i.push(e)})),i}(e,n);a.forEach((e=>X(e,t))),t.description=e.description||n.description,t.eventConfig=n.events,t.legends=t.objectProperty(n.legend&&n.legend.layout),t.locale=n.locale;const o=t.add(_e()),s=t.add(Te(j(mr(e.encode),$t,v,e.style,t,{pulse:Z(o)}))),u=t.add(We({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:i,pulse:Z(s)}));t.operators.pop(),t.pushState(Z(s),Z(u),null),gr(e,t,a),t.operators.push(u);let c=t.add(we({mark:i,pulse:Z(u)}));return c=t.add(je({pulse:Z(c)})),c=t.add(Ge({pulse:Z(c)})),t.addData("root",new kn(t,o,o,c)),t}function vr(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function br(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function xr(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}function Er(e){return((0,r.isArray)(e)?Sr:wr)(e)}function Sr(e){const t=e.length;let n="[";for(let i=0;i0?",":"")+((0,r.isObject)(t)?t.signal||Er(t):(0,r.stringValue)(t))}return n+"]"}function wr(e){let t,n,i="{",a=0;for(t in e)n=e[t],i+=(++a>1?",":"")+(0,r.stringValue)(t)+":"+((0,r.isObject)(n)?n.signal||Er(n):(0,r.stringValue)(n));return i+"}"}function _r(){const e="sans-serif",t="#4c78a8",n="#000",r="#888",i="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:t},area:{fill:t},image:null,line:{stroke:t,strokeWidth:2},path:{stroke:t},rect:{fill:t},rule:{stroke:n},shape:{stroke:t},symbol:{fill:t,size:64},text:{fill:n,font:e,fontSize:11},trail:{fill:t,size:2},style:{"guide-label":{fill:n,font:e,fontSize:10},"guide-title":{fill:n,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:n,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:n,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:i},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:r,grid:!1,gridWidth:1,gridColor:i,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:r,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:i,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:r,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}function Ar(e,t,n){return(0,r.isObject)(e)||(0,r.error)("Input Vega specification must be an object."),yr(e,new br(t=(0,r.mergeConfig)(_r(),t,e.config),n)).toRuntime()}br.prototype=xr.prototype={parse(e){return gr(e,this)},fork(){return new xr(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach((t=>{t.$ref=e.id})),e.refs=null),e},proxy(e){const t=e instanceof K?Z(e):e;return this.add(ze({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(e,t,n){let r,i;e&&(r=e.data||(e.data={}),i=r[t]||(r[t]=[]),i.push(n))}for(e in this.data){t=this.data[e],n(t.input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values");for(const r in t.index)n(t.index[r],e,"index:"+r)}return this},pushState(e,t,n){this._encode.push(Z(this.add(Ge({pulse:e})))),this._parent.push(t),this._lookup.push(n?Z(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return(0,r.peek)(this._parent)},encode(){return(0,r.peek)(this._encode)},lookup(){return(0,r.peek)(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if((0,r.isString)(e))return ee(e,t);e.signal||(0,r.error)("Unsupported field reference: "+(0,r.stringValue)(e));const n=e.signal;let i=this.field[n];if(!i){const e={name:this.signalRef(n)};t&&(e.as=t),this.field[n]=i=Z(this.add(De(e)))}return i},compareRef(e){let t=!1;const n=e=>oe(e)?(t=!0,this.signalRef(e.signal)):function(e){return e&&e.expr}(e)?(t=!0,this.exprRef(e.expr)):e,i=(0,r.array)(e.field).map(n),a=(0,r.array)(e.order).map(n);return t?Z(this.add(Ae({fields:i,orders:a}))):ne(i,a)},keyRef(e,t){let n=!1;const i=this.signals;return e=(0,r.array)(e).map((e=>oe(e)?(n=!0,Z(i[e.signal])):e)),n?Z(this.add(Ne({fields:e,flat:t}))):function(e,t){const n={$key:e};return t&&(n.$flat=!0),n}(e,t)},sortRef(e){if(!e)return e;const t=re(e.op,e.field),n=e.order||"ascending";return n.signal?Z(this.add(Ae({fields:t,orders:this.signalRef(n.signal)}))):ne(t,n)},event(e,t){const n=e+":"+t;if(!this.events[n]){const r=this.id();this.streams.push({id:r,source:e,type:t}),this.events[n]=r}return this.events[n]},hasOwnSignal(e){return(0,r.hasOwnProperty)(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&(0,r.error)("Duplicate signal name: "+(0,r.stringValue)(e));const n=t instanceof K?t:this.add(Q(t));return this.signals[e]=n},getSignal(e){return this.signals[e]||(0,r.error)("Unrecognized signal name: "+(0,r.stringValue)(e)),this.signals[e]},signalRef(e){return this.signals[e]?Z(this.signals[e]):((0,r.hasOwnProperty)(this.lambdas,e)||(this.lambdas[e]=this.add(Q(null))),Z(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,n=e.length;t{"use strict";n.r(t),n.d(t,{getProjectionPath:()=>u,projection:()=>l,projectionProperties:()=>s});var r=n(51300),i=n(96108),a=n(14588);const o=(0,r.geoPath)(),s=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function l(e,t){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(c[e]=function(e,t){return function n(){const i=t();return i.type=e,i.path=(0,r.geoPath)().projection(i),i.copy=i.copy||function(){const e=n();return s.forEach((t=>{i[t]&&e[t](i[t]())})),e.path.pointRadius(i.path.pointRadius()),e},(0,a.registerScale)(i)}}(e,t),this):c[e]||null}function u(e){return e&&e.path||o}const c={albers:r.geoAlbers,albersusa:r.geoAlbersUsa,azimuthalequalarea:r.geoAzimuthalEqualArea,azimuthalequidistant:r.geoAzimuthalEquidistant,conicconformal:r.geoConicConformal,conicequalarea:r.geoConicEqualArea,conicequidistant:r.geoConicEquidistant,equalEarth:r.geoEqualEarth,equirectangular:r.geoEquirectangular,gnomonic:r.geoGnomonic,identity:r.geoIdentity,mercator:r.geoMercator,mollweide:i.geoMollweide,naturalEarth1:r.geoNaturalEarth1,orthographic:r.geoOrthographic,stereographic:r.geoStereographic,transversemercator:r.geoTransverseMercator};for(const e in c)l(e,c[e])},62804:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loess:()=>s,regression:()=>u});var r=n(48872),i=n(24988),a=n(26372);function o(e,t){var n,r,i,a,o,s,l=[],u=function(e){return e(a)};if(null==t)l.push(e);else for(n={},r=0,i=e.length;r{(0,r.regressionLoess)(t,e.x,e.y,e.bandwidth||.3).forEach((e=>{const n={};for(let e=0;e"poly"===e?t:"quad"===e?2:1)(c,d),p=e.as||[(0,a.accessorName)(e.x),(0,a.accessorName)(e.y)],h=l[c],g=[];let m=e.extent;(0,a.hasOwnProperty)(l,c)||(0,a.error)("Invalid regression method: "+c),null!=m&&"log"===c&&m[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),m=null),s.forEach((n=>{if(n.length<=f)return void t.dataflow.warn("Skipping regression with more parameters than data points.");const o=h(n,e.x,e.y,d);if(e.params)return void g.push((0,i.ingest)({keys:n.dims,coef:o.coef,rSquared:o.rSquared}));const s=m||(0,a.extent)(n,e.x),l=e=>{const t={};for(let e=0;el([e,o.predict(e)]))):(0,r.sampleCurve)(o.predict,s,25,200).forEach(l)})),this.value&&(n.rem=this.value),this.value=n.add=n.source=g}return n}})},96056:(e,t,n)=>{"use strict";n.r(t),n.d(t,{context:()=>p});var r=n(26372),i=n(24988);const a=(0,r.toSet)(["rule"]),o=(0,r.toSet)(["group","image","rect"]);function s(e){return(e+"").toLowerCase()}function l(e,t,n){n.endsWith(";")||(n="return("+n+");");const r=Function(...t.concat(n));return e&&e.functions?r.bind(e.functions):r}var u={operator:(e,t)=>l(e,["_"],t.code),parameter:(e,t)=>l(e,["datum","_"],t.code),event:(e,t)=>l(e,["event"],t.code),handler:(e,t)=>l(e,["_","event"],`var datum=event.item&&event.item.datum;return ${t.code};`),encode:(e,t)=>{const{marktype:n,channels:i}=t;let s="var o=item,datum=o.datum,m=0,$;";for(const e in i){const t="o["+(0,r.stringValue)(e)+"]";s+=`$=${i[e].code};if(${t}!==$)${t}=$,m=1;`}return s+=function(e,t){let n="";return a[t]||(e.x2&&(e.x?(o[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(o[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}(i,n),s+="return m;",l(e,["item","_"],s)},codegen:{get(e){const t=`[${e.map(r.stringValue).join("][")}]`,n=Function("_",`return _${t};`);return n.path=t,n},comparator(e,t){let n;const r=Function("a","b","var u, v; return "+e.map(((e,r)=>{const i=t[r];let a,o;return e.path?(a=`a${e.path}`,o=`b${e.path}`):((n=n||{})["f"+r]=e,a=`this.f${r}(a)`,o=`this.f${r}(b)`),function(e,t,n,r){return`((u = ${e}) < (v = ${t}) || u == null) && v != null ? ${n}\n : (u > v || v == null) && u != null ? ${r}\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${n}\n : v !== v && u === u ? ${r} : `}(a,o,-i,i)})).join("")+"0;");return n?r.bind(n):r}}};function c(e,t,n){if(!e||!(0,r.isObject)(e))return e;for(let i,a=0,o=d.length;ae&&e.$tupleid?i.tupleid:e));return t.fn[n]||(t.fn[n]=(0,r.compare)(a,e.$order,t.expr.codegen))}},{key:"$context",parse:function(e,t){return t}},{key:"$subflow",parse:function(e,t){const n=e.$subflow;return function(e,r,i){const a=t.fork().parse(n),o=a.get(n.operators[0].id),s=a.signals.parent;return s&&s.set(i),o.detachSubflow=()=>t.detach(a),o}}},{key:"$tupleid",parse:function(){return i.tupleid}}];const f={skip:!0};function p(e,t,n,r){return new h(e,t,n,r)}function h(e,t,n,r){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=r||u,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function g(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}h.prototype=g.prototype={fork(){const e=new g(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter((t=>t!==e));const t=Object.keys(e.nodes);for(const n of t)e.nodes[n]._targets=null;for(const n of t)e.nodes[n].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const n=this,r=n.dataflow,i=e.value;if(n.set(e.id,t),"collect"===s(e.type)&&i&&(i.$ingest?r.ingest(t,i.$ingest,i.$format):i.$request?r.preload(t,i.$request,i.$format):r.pulse(t,r.changeset().insert(i))),e.root&&(n.root=t),e.parent){let i=n.get(e.parent.$ref);i?(r.connect(i,[t]),t.targets().add(i)):(n.unresolved=n.unresolved||[]).push((()=>{i=n.get(e.parent.$ref),r.connect(i,[t]),t.targets().add(i)}))}if(e.signal&&(n.signals[e.signal]=t),e.scale&&(n.scales[e.scale]=t),e.data)for(const r in e.data){const i=n.data[r]||(n.data[r]={});e.data[r].forEach((e=>i[e]=t))}},resolve(){return(this.unresolved||[]).forEach((e=>e())),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[s(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,n,r,i){this.dataflow.on(t,n,r,i,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:function(e){const t=this,n=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),n.forEach((e=>t.parseOperator(e))),n.forEach((e=>t.parseOperatorParameters(e))),(e.streams||[]).forEach((e=>t.parseStream(e))),(e.updates||[]).forEach((e=>t.parseUpdate(e))),t.resolve()},parseOperator:function(e){const t=this;"operator"!==s(e.type)&&e.type?t.transform(e,e.type):t.operator(e,e.update?t.operatorExpression(e.update):null)},parseOperatorParameters:function(e){const t=this;if(e.params){const n=t.get(e.id);n||(0,r.error)("Invalid operator id: "+e.id),t.dataflow.connect(n,n.parameters(t.parseParameters(e.params),e.react,e.initonly))}},parseParameters:function(e,t){t=t||{};const n=this;for(const i in e){const a=e[i];t[i]=(0,r.isArray)(a)?a.map((e=>c(e,n,t))):c(a,n,t)}return t},parseStream:function(e){var t,n=this,i=null!=e.filter?n.eventExpression(e.filter):void 0,a=null!=e.stream?n.get(e.stream):void 0;e.source?a=n.events(e.source,e.type,i):e.merge&&(a=(t=e.merge.map((e=>n.get(e))))[0].merge.apply(t[0],t.slice(1))),e.between&&(t=e.between.map((e=>n.get(e))),a=a.between(t[0],t[1])),e.filter&&(a=a.filter(i)),null!=e.throttle&&(a=a.throttle(+e.throttle)),null!=e.debounce&&(a=a.debounce(+e.debounce)),null==a&&(0,r.error)("Invalid stream definition: "+JSON.stringify(e)),e.consume&&a.consume(!0),n.stream(e,a)},parseUpdate:function(e){var t,n=this,i=(0,r.isObject)(i=e.source)?i.$ref:i,a=n.get(i),o=e.update,s=void 0;a||(0,r.error)("Source not defined: "+e.source),t=e.target&&e.target.$expr?n.eventExpression(e.target.$expr):n.get(e.target),o&&o.$expr&&(o.$params&&(s=n.parseParameters(o.$params)),o=n.handlerExpression(o.$expr)),n.update(e,a,t,o,s)},getState:function(e){var t=this,n={};if(e.signals){var r=n.signals={};Object.keys(t.signals).forEach((n=>{const i=t.signals[n];e.signals(n,i)&&(r[n]=i.value)}))}if(e.data){var i=n.data={};Object.keys(t.data).forEach((n=>{const r=t.data[n];e.data(n,r)&&(i[n]=r.input.value)}))}return t.subcontext&&!1!==e.recurse&&(n.subcontext=t.subcontext.map((t=>t.getState(e)))),n},setState:function(e){var t=this,n=t.dataflow,i=e.data,a=e.signals;Object.keys(a||{}).forEach((e=>{n.update(t.signals[e],a[e],f)})),Object.keys(i||{}).forEach((e=>{n.pulse(t.data[e].input,n.changeset().remove(r.truthy).insert(i[e]))})),(e.subcontext||[]).forEach(((e,n)=>{const r=t.subcontext[n];r&&r.setState(e)}))}}},14588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Band:()=>A,BinOrdinal:()=>C,DiscreteLegend:()=>ue,Diverging:()=>b,GradientLegend:()=>ce,Identity:()=>c,Linear:()=>d,Log:()=>f,Ordinal:()=>w,Point:()=>_,Pow:()=>p,Quantile:()=>x,Quantize:()=>E,Sequential:()=>v,Sqrt:()=>h,SymbolLegend:()=>le,Symlog:()=>g,Threshold:()=>S,Time:()=>m,UTC:()=>y,bandSpace:()=>u,domainCaption:()=>De,interpolate:()=>ne,interpolateColors:()=>Q,interpolateRange:()=>J,isContinuous:()=>j,isDiscrete:()=>H,isDiscretizing:()=>G,isInterpolating:()=>Y,isLogarithmic:()=>V,isQuantile:()=>X,isRegisteredScale:()=>B,isTemporal:()=>W,isValidScaleType:()=>z,labelFormat:()=>we,labelFraction:()=>Re,labelValues:()=>Ee,quantizeInterpolator:()=>Z,registerScale:()=>L,scale:()=>U,scaleCopy:()=>ee,scaleFraction:()=>te,scaleImplicit:()=>a.scaleImplicit,scheme:()=>se,tickCount:()=>he,tickFormat:()=>ye,tickValues:()=>me,validTicks:()=>ge});var r=n(26372),i=n(61388),a=n(71303),o=n(82226),s=n(71864),l=n(71652);function u(e,t,n){const r=e-t+2*n;return e?r>0?r:1:0}const c="identity",d="linear",f="log",p="pow",h="sqrt",g="symlog",m="time",y="utc",v="sequential",b="diverging",x="quantile",E="quantize",S="threshold",w="ordinal",_="point",A="band",C="bin-ordinal",T="continuous",k="discrete",R="discretizing",D="interpolating",N="temporal";function O(){const e=(0,a.scaleOrdinal)().unknown(void 0),t=e.domain,n=e.range;let r,o,s=[0,1],l=!1,c=0,d=0,f=.5;function p(){const e=t().length,a=s[1]g+r*e));return n(a?m.reverse():m)}return delete e.unknown,e.domain=function(e){return arguments.length?(t(e),p()):t()},e.range=function(e){return arguments.length?(s=[+e[0],+e[1]],p()):s.slice()},e.rangeRound=function(e){return s=[+e[0],+e[1]],l=!0,p()},e.bandwidth=function(){return o},e.step=function(){return r},e.round=function(e){return arguments.length?(l=!!e,p()):l},e.padding=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),c=d,p()):c},e.paddingInner=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),p()):c},e.paddingOuter=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),p()):d},e.align=function(e){return arguments.length?(f=Math.max(0,Math.min(1,e)),p()):f},e.invertRange=function(e){if(null==e[0]||null==e[1])return;const r=s[1]s[1-r])?void 0:(u=Math.max(0,(0,i.bisectRight)(a,f)-1),c=f===p?u:(0,i.bisectRight)(a,p)-1,f-a[u]>o+1e-10&&++u,r&&(d=u,u=l-c,c=l-d),u>c?void 0:t().slice(u,c+1))},e.invert=function(t){const n=e.invertRange([t,t]);return n?n[0]:n},e.copy=function(){return O().domain(t()).range(s).round(l).paddingInner(c).paddingOuter(d).align(f)},p()}function F(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return F(t())},e}var P=Array.prototype.map;const M=Array.prototype.slice;const I=new Map,$=Symbol("vega_scale");function L(e){return e[$]=!0,e}function B(e){return e&&!0===e[$]}function U(e,t,n){return arguments.length>1?(I.set(e,function(e,t,n){const i=function(){const n=t();return n.invertRange||(n.invertRange=n.invert?function(e){return function(t){let n,r=t[0],i=t[1];return i=s&&n[a]<=l&&(u<0&&(u=a),r=a);if(!(u<0))return s=e.invertExtent(n[u]),l=e.invertExtent(n[r]),[void 0===s[0]?s[1]:s[0],void 0===l[1]?l[0]:l[1]]}}(n):void 0),n.type=e,L(n)};return i.metadata=(0,r.toSet)((0,r.array)(n)),i}(e,t,n)),this):z(e)?I.get(e):void 0}function z(e){return I.has(e)}function q(e,t){const n=I.get(e);return n&&n.metadata[t]}function j(e){return q(e,T)}function H(e){return q(e,k)}function G(e){return q(e,R)}function V(e){return q(e,f)}function W(e){return q(e,N)}function Y(e){return q(e,D)}function X(e){return q(e,x)}U(c,a.scaleIdentity),U(d,a.scaleLinear,T),U(f,a.scaleLog,[T,f]),U(p,a.scalePow,T),U(h,a.scaleSqrt,T),U(g,a.scaleSymlog,T),U(m,a.scaleTime,[T,N]),U(y,a.scaleUtc,[T,N]),U(v,a.scaleSequential,[T,D]),U(`${v}-${d}`,a.scaleSequential,[T,D]),U(`${v}-${f}`,a.scaleSequentialLog,[T,D,f]),U(`${v}-${p}`,a.scaleSequentialPow,[T,D]),U(`${v}-${h}`,a.scaleSequentialSqrt,[T,D]),U(`${v}-${g}`,a.scaleSequentialSymlog,[T,D]),U(`${b}-${d}`,a.scaleDiverging,[T,D]),U(`${b}-${f}`,a.scaleDivergingLog,[T,D,f]),U(`${b}-${p}`,a.scaleDivergingPow,[T,D]),U(`${b}-${h}`,a.scaleDivergingSqrt,[T,D]),U(`${b}-${g}`,a.scaleDivergingSymlog,[T,D]),U(x,a.scaleQuantile,[R,x]),U(E,a.scaleQuantize,R),U(S,a.scaleThreshold,R),U(C,(function e(){let t=[],n=[];function o(e){return null==e||e!=e?void 0:n[((0,i.bisect)(t,e)-1)%n.length]}return o.domain=function(e){return arguments.length?(t=function(e){return P.call(e,r.toNumber)}(e),o):t.slice()},o.range=function(e){return arguments.length?(n=M.call(e),o):n.slice()},o.tickFormat=function(e,n){return(0,a.tickFormat)(t[0],(0,r.peek)(t),null==e?10:e,n)},o.copy=function(){return e().domain(o.domain()).range(o.range())},o}),[k,R]),U(w,a.scaleOrdinal,k),U(A,O,k),U(_,(function(){return F(O().paddingInner(1))}),k);const K=["clamp","base","constant","exponent"];function J(e,t){const n=t[0],i=(0,r.peek)(t)-n;return function(t){return e(n+t*i)}}function Q(e,t,n){return o.piecewise(ne(t||"rgb",n),e)}function Z(e,t){const n=new Array(t),r=t+1;for(let i=0;ie[t]?s[t](e[t]()):0)),s):(0,r.constant)(.5)}function ne(e,t){const n=o[function(e){return"interpolate"+e.toLowerCase().split("-").map((e=>e[0].toUpperCase()+e.slice(1))).join("")}(e)];return null!=t&&n&&n.gamma?n.gamma(t):n}const re={accent:s.schemeAccent,category10:s.schemeCategory10,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:s.schemeDark2,observable10:s.schemeObservable10,paired:s.schemePaired,pastel1:s.schemePastel1,pastel2:s.schemePastel2,set1:s.schemeSet1,set2:s.schemeSet2,set3:s.schemeSet3,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function ie(e){if((0,r.isArray)(e))return e;const t=e.length/6|0,n=new Array(t);for(let r=0;r1?(oe[e]=t,this):oe[e]}ae(re,ie),ae({blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},(e=>Q(ie(e))));const le="symbol",ue="discrete",ce="gradient",de=e=>(0,r.isArray)(e)?e.map((e=>String(e))):String(e),fe=(e,t)=>e[1]-t[1],pe=(e,t)=>t[1]-e[1];function he(e,t,n){let i;return(0,r.isNumber)(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),null!=n&&(t=Math.min(t,Math.floor((0,r.span)(e.domain())/n||1)+1))),(0,r.isObject)(t)&&(i=t.step,t=t.interval),(0,r.isString)(t)&&(t=e.type===m?(0,l.timeInterval)(t):e.type==y?(0,l.utcInterval)(t):(0,r.error)("Only time and utc scales accept interval strings."),i&&(t=t.every(i))),t}function ge(e,t,n){let i=e.range(),a=i[0],o=(0,r.peek)(i),s=fe;if(a>o&&(i=o,o=a,a=i,s=pe),a=Math.floor(a),o=Math.ceil(o),t=t.map((t=>[t,e(t)])).filter((e=>a<=e[1]&&e[1]<=o)).sort(s).map((e=>e[0])),n>0&&t.length>1){const e=[t[0],(0,r.peek)(t)];for(;t.length>n&&t.length>=3;)t=t.filter(((e,t)=>!(t%2)));t.length<3&&(t=e)}return t}function me(e,t){return e.bins?ge(e,e.bins,t):e.ticks?e.ticks(t):e.domain()}function ye(e,t,n,r,i,a){const o=t.type;let s=de;if(o===m||i===m)s=e.timeFormat(r);else if(o===y||i===y)s=e.utcFormat(r);else if(V(o)){const i=e.formatFloat(r);if(a||t.bins)s=i;else{const e=ve(t,n,!1);s=t=>e(t)?i(t):""}}else if(t.tickFormat){const i=t.domain();s=e.formatSpan(i[0],i[i.length-1],n,r)}else r&&(s=e.format(r));return s}function ve(e,t,n){const r=me(e,t),i=e.base(),a=Math.log(i),o=Math.max(1,i*t/r.length),s=e=>{let t=e/Math.pow(i,Math.round(Math.log(e)/a));return t*ibe[e.type]||e.bins;function we(e,t,n,r,i,a,o){const s=xe[t.type]&&a!==m&&a!==y?function(e,t,n){const r=t[xe[t.type]](),i=r.length;let a,o=i>1?r[1]-r[0]:r[0];for(a=1;a(t,n,r)=>{const i=Ae(r[n+1],Ae(r.max,1/0)),a=ke(t,e),o=ke(i,e);return a&&o?a+" \u2013 "+o:o?"< "+o:"\u2265 "+a},Ae=(e,t)=>null!=e?e:t,Ce=e=>(t,n)=>n?e(t):null,Te=e=>t=>e(t),ke=(e,t)=>Number.isFinite(e)?t(e):null;function Re(e){const t=e.domain(),n=t.length-1;let i=+t[0],a=+(0,r.peek)(t),o=a-i;if(e.type===S){const e=n?o/n:.1;i-=e,a+=e,o=a-i}return e=>(e-i)/o}function De(e,t,n){n=n||{};const i=Math.max(3,n.maxlen||7),a=function(e,t,n,i){const a=i||t.type;return(0,r.isString)(n)&&W(a)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),n||a!==m?n||a!==y?we(e,t,5,null,n,i,!0):e.utcFormat("%A, %d %B %Y, %X UTC"):e.timeFormat("%A, %d %B %Y, %X")}(e,t,n.format,n.formatType);if(G(t.type)){const e=Ee(t).slice(1).map(a),n=e.length;return`${n} boundar${1===n?"y":"ies"}: ${e.join(", ")}`}if(H(t.type)){const e=t.domain(),n=e.length;return`${n} value${1===n?"":"s"}: ${n>i?e.slice(0,i-2).map(a).join(", ")+", ending with "+e.slice(-1).map(a):e.map(a).join(", ")}`}{const e=t.domain();return`values from ${a(e[0])} to ${a((0,r.peek)(e))}`}}},84636:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Bounds:()=>ce,CanvasHandler:()=>Yn,CanvasRenderer:()=>tr,Gradient:()=>h,GroupItem:()=>fe,Handler:()=>An,HybridHandler:()=>Vr,HybridRenderer:()=>Gr,Item:()=>de,Marks:()=>un,RenderType:()=>Kr,Renderer:()=>Tn,ResourceLoader:()=>pe,SVGHandler:()=>rr,SVGRenderer:()=>Rr,SVGStringRenderer:()=>qr,Scenegraph:()=>yn,boundClip:()=>ii,boundContext:()=>Pe,boundItem:()=>cn,boundMark:()=>fn,boundStroke:()=>me,domChild:()=>En,domClear:()=>Sn,domCreate:()=>bn,domFind:()=>xn,font:()=>en,fontFamily:()=>Zt,fontSize:()=>Yt,intersect:()=>Zr,intersectBoxLine:()=>Ge,intersectPath:()=>ze,intersectPoint:()=>qe,intersectRule:()=>He,lineHeight:()=>Xt,markup:()=>Er,multiLineOffset:()=>Jt,path:()=>a.path,pathCurves:()=>m,pathEqual:()=>si,pathParse:()=>S,pathRectangle:()=>V,pathRender:()=>F,pathSymbols:()=>$,pathTrail:()=>W,point:()=>_n,renderModule:()=>Qr,resetSVGClipId:()=>le,resetSVGDefIds:()=>li,sceneEqual:()=>oi,sceneFromJSON:()=>gn,scenePickVisit:()=>rt,sceneToJSON:()=>hn,sceneVisit:()=>nt,sceneZOrder:()=>tt,serializeXML:()=>Sr,setHybridRendererOptions:()=>Hr,textMetrics:()=>qt});var r=n(26372),i=n(76588),a=n(20066),o=n(14958),s=n(83418),l=n(14588);let u=0;const c="p_";function d(e){return e&&e.gradient}function f(e,t,n){const r=e.gradient;let i=e.id,a="radial"===r?c:"";return i||(i=e.id="gradient_"+u++,"radial"===r?(e.x1=p(e.x1,.5),e.y1=p(e.y1,.5),e.r1=p(e.r1,0),e.x2=p(e.x2,.5),e.y2=p(e.y2,.5),e.r2=p(e.r2,.5),a=c):(e.x1=p(e.x1,0),e.y1=p(e.y1,0),e.x2=p(e.x2,1),e.y2=p(e.y2,0))),t[i]=e,"url("+(n||"")+"#"+a+i+")"}function p(e,t){return null!=e?e:t}function h(e,t){var n,r=[];return n={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:r,stop:function(e,t){return r.push({offset:e,color:t}),n}}}const g={basis:{curve:i.curveBasis},"basis-closed":{curve:i.curveBasisClosed},"basis-open":{curve:i.curveBasisOpen},bundle:{curve:i.curveBundle,tension:"beta",value:.85},cardinal:{curve:i.curveCardinal,tension:"tension",value:0},"cardinal-open":{curve:i.curveCardinalOpen,tension:"tension",value:0},"cardinal-closed":{curve:i.curveCardinalClosed,tension:"tension",value:0},"catmull-rom":{curve:i.curveCatmullRom,tension:"alpha",value:.5},"catmull-rom-closed":{curve:i.curveCatmullRomClosed,tension:"alpha",value:.5},"catmull-rom-open":{curve:i.curveCatmullRomOpen,tension:"alpha",value:.5},linear:{curve:i.curveLinear},"linear-closed":{curve:i.curveLinearClosed},monotone:{horizontal:i.curveMonotoneY,vertical:i.curveMonotoneX},natural:{curve:i.curveNatural},step:{curve:i.curveStep},"step-after":{curve:i.curveStepAfter},"step-before":{curve:i.curveStepBefore}};function m(e,t,n){var i=(0,r.hasOwnProperty)(g,e)&&g[e],a=null;return i&&(a=i.curve||i[t||"vertical"],i.tension&&null!=n&&(a=a[i.tension](n))),a}const y={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},v=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,b=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,x=/^((\s+,?\s*)|(,\s*))/,E=/^[01]/;function S(e){const t=[];return(e.match(v)||[]).forEach((e=>{let n=e[0];const r=n.toLowerCase(),i=y[r],a=function(e,t,n){const r=[];for(let i=0;t&&i1&&(g=Math.sqrt(g),n*=g,r*=g);const m=f/n,y=d/n,v=-d/r,b=f/r,x=m*s+y*l,E=v*s+b*l,S=m*e+y*t,C=v*e+b*t;let k=1/((S-x)*(S-x)+(C-E)*(C-E))-.25;k<0&&(k=0);let D=Math.sqrt(k);a==i&&(D=-D);const N=.5*(x+S)-D*(C-E),O=.5*(E+C)+D*(S-x),F=Math.atan2(E-O,x-N);let P=Math.atan2(C-O,S-N)-F;P<0&&1===a?P+=A:P>0&&0===a&&(P-=A);const M=Math.ceil(Math.abs(P/(_+.001))),I=[];for(let e=0;e+e}function G(e,t,n){return Math.max(t,Math.min(e,n))}function V(){var e=U,t=z,n=q,r=j,i=H(0),o=i,s=i,l=i,u=null;function c(c,d,f){var p,h=null!=d?d:+e.call(this,c),g=null!=f?f:+t.call(this,c),m=+n.call(this,c),y=+r.call(this,c),v=Math.min(m,y)/2,b=G(+i.call(this,c),0,v),x=G(+o.call(this,c),0,v),E=G(+s.call(this,c),0,v),S=G(+l.call(this,c),0,v);if(u||(u=p=(0,a.path)()),b<=0&&x<=0&&E<=0&&S<=0)u.rect(h,g,m,y);else{var w=h+m,_=g+y;u.moveTo(h+b,g),u.lineTo(w-x,g),u.bezierCurveTo(w-B*x,g,w,g+B*x,w,g+x),u.lineTo(w,_-S),u.bezierCurveTo(w,_-B*S,w-B*S,_,w-S,_),u.lineTo(h+E,_),u.bezierCurveTo(h+B*E,_,h,_-B*E,h,_-E),u.lineTo(h,g+b),u.bezierCurveTo(h,g+B*b,h+B*b,g,h+b,g),u.closePath()}if(p)return u=null,p+""||null}return c.x=function(t){return arguments.length?(e=H(t),c):e},c.y=function(e){return arguments.length?(t=H(e),c):t},c.width=function(e){return arguments.length?(n=H(e),c):n},c.height=function(e){return arguments.length?(r=H(e),c):r},c.cornerRadius=function(e,t,n,r){return arguments.length?(i=H(e),o=null!=t?H(t):i,l=null!=n?H(n):i,s=null!=r?H(r):o,c):i},c.context=function(e){return arguments.length?(u=null==e?null:e,c):u},c}function W(){var e,t,n,r,i,o,s,l,u=null;function c(e,t,n){const r=n/2;if(i){var a=s-t,c=e-o;if(a||c){var d=Math.hypot(a,c),f=(a/=d)*l,p=(c/=d)*l,h=Math.atan2(c,a);u.moveTo(o-f,s-p),u.lineTo(e-a*r,t-c*r),u.arc(e,t,r,h-Math.PI,h),u.lineTo(o+f,s+p),u.arc(o,s,l,h,h+Math.PI)}else u.arc(e,t,r,0,A);u.closePath()}else i=1;o=e,s=t,l=r}function d(o){var s,l,d,f=o.length,p=!1;for(null==u&&(u=d=(0,a.path)()),s=0;s<=f;++s)!(se.x||0,K=e=>e.y||0,J=e=>!(!1===e.defined),Q=(0,i.arc)().startAngle((e=>e.startAngle||0)).endAngle((e=>e.endAngle||0)).padAngle((e=>e.padAngle||0)).innerRadius((e=>e.innerRadius||0)).outerRadius((e=>e.outerRadius||0)).cornerRadius((e=>e.cornerRadius||0)),Z=(0,i.area)().x(X).y1(K).y0((e=>(e.y||0)+(e.height||0))).defined(J),ee=(0,i.area)().y(K).x1(X).x0((e=>(e.x||0)+(e.width||0))).defined(J),te=(0,i.line)().x(X).y(K).defined(J),ne=V().x(X).y(K).width((e=>e.width||0)).height((e=>e.height||0)).cornerRadius((e=>Y(e.cornerRadiusTopLeft,e.cornerRadius)||0),(e=>Y(e.cornerRadiusTopRight,e.cornerRadius)||0),(e=>Y(e.cornerRadiusBottomRight,e.cornerRadius)||0),(e=>Y(e.cornerRadiusBottomLeft,e.cornerRadius)||0)),re=(0,i.symbol)().type((e=>$(e.shape||"circle"))).size((e=>Y(e.size,64))),ie=W().x(X).y(K).defined(J).size((e=>e.size||1));function ae(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function oe(e,t,n,r){return ne.context(e)(t,n,r)}var se=1;function le(){se=1}function ue(e,t,n){var i=t.clip,a=e._defs,o=t.clip_id||(t.clip_id="clip"+se++),s=a.clipping[o]||(a.clipping[o]={id:o});return(0,r.isFunction)(i)?s.path=i(null):ae(n)?s.path=oe(null,n,0,0):(s.width=n.width||0,s.height=n.height||0),"url(#"+o+")"}function ce(e){this.clear(),e&&this.union(e)}function de(e){this.mark=e,this.bounds=this.bounds||new ce}function fe(e){de.call(this,e),this.items=this.items||[]}ce.prototype={clone(){return new ce(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,n,r){return nthis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,n){const r=this.rotatedPoints(e,t,n);return this.clear().add(r[0],r[1]).add(r[2],r[3]).add(r[4],r[5]).add(r[6],r[7])},rotatedPoints(e,t,n){var{x1:r,y1:i,x2:a,y2:o}=this,s=Math.cos(e),l=Math.sin(e),u=t-t*s+n*l,c=n-t*l-n*s;return[s*r-l*i+u,l*r+s*i+c,s*r-l*o+u,l*r+s*o+c,s*a-l*i+u,l*a+s*i+c,s*a-l*o+u,l*a+s*o+c]},union(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2e.x2||this.y2e.y2)},contains(e,t){return!(ethis.x2||tthis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},(0,r.inherits)(fe,de);class pe{constructor(e){this._pending=0,this._loader=e||(0,s.loader)()}pending(){return this._pending}sanitizeURL(e){const t=this;return he(t),t._loader.sanitize(e,{context:"href"}).then((e=>(ge(t),e))).catch((()=>(ge(t),null)))}loadImage(e){const t=this,n=(0,o.image)();return he(t),t._loader.sanitize(e,{context:"image"}).then((e=>{const i=e.href;if(!i||!n)throw{url:i};const a=new n,o=(0,r.hasOwnProperty)(e,"crossOrigin")?e.crossOrigin:"anonymous";return null!=o&&(a.crossOrigin=o),a.onload=()=>ge(t),a.onerror=()=>ge(t),a.src=i,a})).catch((e=>(ge(t),{complete:!1,width:0,height:0,src:e&&e.url||""})))}ready(){const e=this;return new Promise((t=>{!function n(r){e.pending()?setTimeout((()=>{n(!0)}),10):t(r)}(!1)}))}}function he(e){e._pending+=1}function ge(e){e._pending-=1}function me(e,t,n){if(t.stroke&&0!==t.opacity&&0!==t.strokeOpacity){const r=null!=t.strokeWidth?+t.strokeWidth:1;e.expand(r+(n?function(e,t){return e.strokeJoin&&"miter"!==e.strokeJoin?0:t}(t,r):0))}return e}const ye=A-1e-8;let ve,be,xe,Ee,Se,we,_e,Ae;const Ce=(e,t)=>ve.add(e,t),Te=(e,t)=>Ce(be=e,xe=t),ke=e=>Ce(e,ve.y1),Re=e=>Ce(ve.x1,e),De=(e,t)=>Se*e+_e*t,Ne=(e,t)=>we*e+Ae*t,Oe=(e,t)=>Ce(De(e,t),Ne(e,t)),Fe=(e,t)=>Te(De(e,t),Ne(e,t));function Pe(e,t){return ve=e,t?(Ee=t*w,Se=Ae=Math.cos(Ee),we=Math.sin(Ee),_e=-we):(Se=Ae=1,Ee=we=_e=0),Me}const Me={beginPath(){},closePath(){},moveTo:Fe,lineTo:Fe,rect(e,t,n,r){Ee?(Oe(e+n,t),Oe(e+n,t+r),Oe(e,t+r),Fe(e,t)):(Ce(e+n,t+r),Te(e,t))},quadraticCurveTo(e,t,n,r){const i=De(e,t),a=Ne(e,t),o=De(n,r),s=Ne(n,r);Ie(be,i,o,ke),Ie(xe,a,s,Re),Te(o,s)},bezierCurveTo(e,t,n,r,i,a){const o=De(e,t),s=Ne(e,t),l=De(n,r),u=Ne(n,r),c=De(i,a),d=Ne(i,a);$e(be,o,l,c,ke),$e(xe,s,u,d,Re),Te(c,d)},arc(e,t,n,r,i,a){if(r+=Ee,i+=Ee,be=n*Math.cos(i)+e,xe=n*Math.sin(i)+t,Math.abs(i-r)>ye)Ce(e-n,t-n),Ce(e+n,t+n);else{const o=r=>Ce(n*Math.cos(r)+e,n*Math.sin(r)+t);let s,l;if(o(r),o(i),i!==r)if((r%=A)<0&&(r+=A),(i%=A)<0&&(i+=A),ii;++l,s-=_)o(s);else for(s=r-r%_+_,l=0;l<4&&s1e-14?(l=o*o+s*a,l>=0&&(l=Math.sqrt(l),u=(-o+l)/a,c=(-o-l)/a)):u=.5*s/o,0m)return!1;p>g&&(g=p)}else if(d>0){if(p0&&(e.globalAlpha=n,e.fillStyle=Ke(e,t,t.fill),!0)}var Qe=[];function Ze(e,t,n){var r=null!=(r=t.strokeWidth)?r:1;return!(r<=0)&&((n*=null==t.strokeOpacity?1:t.strokeOpacity)>0&&(e.globalAlpha=n,e.strokeStyle=Ke(e,t,t.stroke),e.lineWidth=r,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||Qe),e.lineDashOffset=t.strokeDashOffset||0),!0))}function et(e,t){return e.zindex-t.zindex||e.index-t.index}function tt(e){if(!e.zdirty)return e.zitems;var t,n,r,i=e.items,a=[];for(n=0,r=i.length;n=0;)if(n=t(i[r]))return n;if(i===a)for(r=(i=e.items).length;--r>=0;)if(!i[r].zindex&&(n=t(i[r])))return n;return null}function it(e){return function(t,n,r){nt(n,(n=>{r&&!r.intersects(n.bounds)||ot(e,t,n,n)}))}}function at(e){return function(t,n,r){!n.items.length||r&&!r.intersects(n.bounds)||ot(e,t,n.items[0],n.items)}}function ot(e,t,n,r){var i=null==n.opacity?1:n.opacity;0!==i&&(e(t,r)||(Ve(t,n),n.fill&&Je(t,n,i)&&t.fill(),n.stroke&&Ze(t,n,i)&&t.stroke()))}function st(e){return e=e||r.truthy,function(t,n,r,i,a,o){return r*=t.pixelRatio,i*=t.pixelRatio,rt(n,(n=>{const s=n.bounds;if((!s||s.contains(a,o))&&s)return e(t,n,r,i,a,o)?n:void 0}))}}function lt(e,t){return function(n,r,i,a){var o,s,l=Array.isArray(r)?r[0]:r,u=null==t?l.fill:t,c=l.stroke&&n.isPointInStroke;return c&&(o=l.strokeWidth,s=l.strokeCap,n.lineWidth=null!=o?o:1,n.lineCap=null!=s?s:"butt"),!e(n,r)&&(u&&n.isPointInPath(i,a)||c&&n.isPointInStroke(i,a))}}function ut(e){return st(lt(e))}function ct(e,t){return"translate("+e+","+t+")"}function dt(e){return"rotate("+e+")"}function ft(e){return ct(e.x||0,e.y||0)}function pt(e,t,n){function r(e,n){var r=n.x||0,i=n.y||0,a=n.angle||0;e.translate(r,i),a&&e.rotate(a*=w),e.beginPath(),t(e,n),a&&e.rotate(-a),e.translate(-r,-i)}return{type:e,tag:"path",nested:!1,attr:function(e,n){e("transform",function(e){return ct(e.x||0,e.y||0)+(e.angle?" "+dt(e.angle):"")}(n)),e("d",t(null,n))},bound:function(e,n){return t(Pe(e,n.angle),n),me(e,n).translate(n.x||0,n.y||0)},draw:it(r),pick:ut(r),isect:n||ze(r)}}var ht=pt("arc",(function(e,t){return Q.context(e)(t)}));function gt(e,t,n){function r(e,n){e.beginPath(),t(e,n)}const i=lt(r);return{type:e,tag:"path",nested:!0,attr:function(e,n){var r=n.mark.items;r.length&&e("d",t(null,r))},bound:function(e,n){var r=n.items;return 0===r.length?e:(t(Pe(e),r),me(e,r[0]))},draw:at(r),pick:function(e,t,n,r,a,o){var s=t.items,l=t.bounds;return!s||!s.length||l&&!l.contains(a,o)?null:(n*=e.pixelRatio,r*=e.pixelRatio,i(e,s,n,r)?s[0]:null)},isect:qe,tip:n}}var mt=gt("area",(function(e,t){const n=t[0],r=n.interpolate||"linear";return("horizontal"===n.orient?ee:Z).curve(m(r,n.orient,n.tension)).context(e)(t)}),(function(e,t){for(var n,r,i="horizontal"===e[0].orient?t[1]:t[0],a="horizontal"===e[0].orient?"y":"x",o=e.length,s=1/0;--o>=0;)!1!==e[o].defined&&(r=Math.abs(e[o][a]-i)).5&&t<1.5?.5-Math.abs(t-1):0}function bt(e,t){const n=vt(t);e("d",oe(null,t,n,n))}function xt(e,t,n,r){const i=vt(t);e.beginPath(),oe(e,t,(n||0)+i,(r||0)+i)}const Et=lt(xt),St=lt(xt,!1),wt=lt(xt,!0);var _t={type:"group",tag:"g",nested:!1,attr:function(e,t){e("transform",ft(t))},bound:function(e,t){if(!t.clip&&t.items){const n=t.items,r=n.length;for(let t=0;t{const i=t.x||0,a=t.y||0,o=t.strokeForeground,s=null==t.opacity?1:t.opacity;(t.stroke||t.fill)&&s&&(xt(e,t,i,a),Ve(e,t),t.fill&&Je(e,t,s)&&e.fill(),t.stroke&&!o&&Ze(e,t,s)&&e.stroke()),e.save(),e.translate(i,a),t.clip&&yt(e,t),n&&n.translate(-i,-a),nt(t,(t=>{("group"===t.marktype||null==r||r.includes(t.marktype))&&this.draw(e,t,n,r)})),n&&n.translate(i,a),e.restore(),o&&t.stroke&&s&&(xt(e,t,i,a),Ve(e,t),Ze(e,t,s)&&e.stroke())}))},pick:function(e,t,n,r,i,a){if(t.bounds&&!t.bounds.contains(i,a)||!t.items)return null;const o=n*e.pixelRatio,s=r*e.pixelRatio;return rt(t,(l=>{let u,c,d;const f=l.bounds;if(f&&!f.contains(i,a))return;c=l.x||0,d=l.y||0;const p=c+(l.width||0),h=d+(l.height||0),g=l.clip;if(g&&(ip||ah))return;if(e.save(),e.translate(c,d),c=i-c,d=a-d,g&&ae(l)&&!wt(e,l,o,s))return e.restore(),null;const m=l.strokeForeground,y=!1!==t.interactive;return y&&m&&l.stroke&&St(e,l,o,s)?(e.restore(),l):(u=rt(l,(e=>function(e,t,n){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,n)}(e,c,d)?this.pick(e,n,r,c,d):null)),!u&&y&&(l.fill||!m&&l.stroke)&&Et(e,l,o,s)&&(u=l),e.restore(),u||null)}))},isect:je,content:function(e,t,n){e("clip-path",t.clip?ue(n,t,t):null)},background:function(e,t){e("class","background"),e("aria-hidden",!0),bt(e,t)},foreground:function(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?bt(e,t):e("d","")}},At={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function Ct(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then((t=>{e.image=t,e.image.url=e.url}))),n}function Tt(e,t){return null!=e.width?e.width:t&&t.width?!1!==e.aspect&&e.height?e.height*t.width/t.height:t.width:0}function kt(e,t){return null!=e.height?e.height:t&&t.height?!1!==e.aspect&&e.width?e.width*t.height/t.width:t.height:0}function Rt(e,t){return"center"===e?t/2:"right"===e?t:0}function Dt(e,t){return"middle"===e?t/2:"bottom"===e?t:0}var Nt={type:"image",tag:"image",nested:!1,attr:function(e,t,n){const r=Ct(t,n),i=Tt(t,r),a=kt(t,r),o=(t.x||0)-Rt(t.align,i),s=(t.y||0)-Dt(t.baseline,a);e("href",!r.src&&r.toDataURL?r.toDataURL():r.src||"",At["xmlns:xlink"],"xlink:href"),e("transform",ct(o,s)),e("width",i),e("height",a),e("preserveAspectRatio",!1===t.aspect?"none":"xMidYMid")},bound:function(e,t){const n=t.image,r=Tt(t,n),i=kt(t,n),a=(t.x||0)-Rt(t.align,r),o=(t.y||0)-Dt(t.baseline,i);return e.set(a,o,a+r,o+i)},draw:function(e,t,n){nt(t,(t=>{if(n&&!n.intersects(t.bounds))return;const r=Ct(t,this);let i=Tt(t,r),a=kt(t,r);if(0===i||0===a)return;let o,s,l,u,c=(t.x||0)-Rt(t.align,i),d=(t.y||0)-Dt(t.baseline,a);!1!==t.aspect&&(s=r.width/r.height,l=t.width/t.height,s==s&&l==l&&s!==l&&(l=0;)if(!1!==e[a].defined&&(n=e[a].x-t[0])*n+(r=e[a].y-t[1])*r{if(!n||n.intersects(t.bounds)){var r=null==t.opacity?1:t.opacity;r&&$t(e,t,r)&&(Ve(e,t),e.stroke())}}))},pick:st((function(e,t,n,r){return!!e.isPointInStroke&&($t(e,t,1)&&e.isPointInStroke(n,r))})),isect:He},Bt=pt("shape",(function(e,t){return(t.mark.shape||t.shape).context(e)(t)})),Ut=pt("symbol",(function(e,t){return re.context(e)(t)}),qe);const zt=(0,r.lruCache)();var qt={height:Yt,measureWidth:Vt,estimateWidth:Ht,width:Ht,canvas:jt};function jt(e){qt.width=e&&Be?Vt:Ht}function Ht(e,t){return Gt(Qt(e,t),Yt(e))}function Gt(e,t){return~~(.8*e.length*t)}function Vt(e,t){return Yt(e)<=0||!(t=Qt(e,t))?0:Wt(t,en(e))}function Wt(e,t){const n=`(${t}) ${e}`;let r=zt.get(n);return void 0===r&&(Be.font=t,r=Be.measureText(e).width,zt.set(n,r)),r}function Yt(e){return null!=e.fontSize?+e.fontSize||0:11}function Xt(e){return null!=e.lineHeight?e.lineHeight:Yt(e)+2}function Kt(e){return t=e.lineBreak&&e.text&&!(0,r.isArray)(e.text)?e.text.split(e.lineBreak):e.text,(0,r.isArray)(t)?t.length>1?t:t[0]:t;var t}function Jt(e){const t=Kt(e);return((0,r.isArray)(t)?t.length-1:0)*Xt(e)}function Qt(e,t){const n=null==t?"":(t+"").trim();return e.limit>0&&n.length?function(e,t){var n=+e.limit,r=function(e){if(qt.width===Vt){const t=en(e);return e=>Wt(e,t)}if(qt.width===Ht){const t=Yt(e);return e=>Gt(e,t)}return t=>qt.width(e,t)}(e);if(r(t)>>1,r(t.slice(i))>n?s=i+1:l=i;return a+t.slice(s)}for(;s>>1),r(t.slice(0,i))Math.max(e,qt.width(t,n))),0)):i=qt.width(t,f),"center"===o?c-=i/2:"right"===o&&(c-=i),e.set(c+=l,d+=u,c+i,d+a),t.angle&&!n)e.rotate(t.angle*w,l,u);else if(2===n)return e.rotatedPoints(t.angle*w,l,u);return e}var sn={type:"text",tag:"text",nested:!1,attr:function(e,t){var n,r=t.dx||0,i=(t.dy||0)+tn(t),a=an(t),o=a.x1,s=a.y1,l=t.angle||0;e("text-anchor",nn[t.align]||"start"),l?(n=ct(o,s)+" "+dt(l),(r||i)&&(n+=" "+ct(r,i))):n=ct(o+r,s+i),e("transform",n)},bound:on,draw:function(e,t,n){nt(t,(t=>{var i,a,o,s,l,u,c,d=null==t.opacity?1:t.opacity;if(!(n&&!n.intersects(t.bounds)||0===d||t.fontSize<=0||null==t.text||0===t.text.length)){if(e.font=en(t),e.textAlign=t.align||"left",a=(i=an(t)).x1,o=i.y1,t.angle&&(e.save(),e.translate(a,o),e.rotate(t.angle*w),a=o=0),a+=t.dx||0,o+=(t.dy||0)+tn(t),u=Kt(t),Ve(e,t),(0,r.isArray)(u))for(l=Xt(t),s=0;s=0;)if(!1!==e[i].defined&&(n=e[i].x-t[0])*n+(r=e[i].y-t[1])*r<(n=e[i].size||1)*n)return e[i];return null})),un={arc:ht,area:mt,group:_t,image:Nt,line:Ot,path:Pt,rect:It,rule:Lt,shape:Bt,symbol:Ut,text:sn,trail:ln};function cn(e,t,n){var r=un[e.mark.marktype],i=t||r.bound;return r.nested&&(e=e.mark),i(e.bounds||(e.bounds=new ce),e,n)}var dn={mark:null};function fn(e,t,n){var r,i,a,o,s=un[e.marktype],l=s.bound,u=e.items,c=u&&u.length;if(s.nested)return c?a=u[0]:(dn.mark=e,a=dn),o=cn(a,l,n),t=t&&t.union(o)||o;if(t=t||e.bounds&&e.bounds.clear()||new ce,c)for(r=0,i=u.length;rt;)e.removeChild(n[--r]);return e}function wn(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function _n(e,t){const n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]}class An{constructor(e,t){this._active=null,this._handlers={},this._loader=e||(0,s.loader)(),this._tooltip=t||Cn}initialize(e,t,n){return this._el=e,this._obj=n||null,this.origin(t)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}origin(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()}scene(e){return arguments.length?(this._scene=e,this):this._scene}on(){}off(){}_handlerIndex(e,t,n){for(let r=e?e.length:0;--r>=0;)if(e[r].type===t&&(!n||e[r].handler===n))return r;return-1}handlers(e){const t=this._handlers,n=[];if(e)n.push(...t[this.eventName(e)]);else for(const e in t)n.push(...t[e]);return n}eventName(e){const t=e.indexOf(".");return t<0?e:e.slice(0,t)}handleHref(e,t,n){this._loader.sanitize(n,{context:"href"}).then((t=>{const n=new MouseEvent(e.type,e),r=bn(null,"a");for(const e in t)r.setAttribute(e,t[e]);r.dispatchEvent(n)})).catch((()=>{}))}handleTooltip(e,t,n){if(t&&null!=t.tooltip){t=function(e,t,n,r){var i,a,o=e&&e.mark;if(o&&(i=un[o.marktype]).tip){for((a=_n(t,n))[0]-=r[0],a[1]-=r[1];e=e.mark.group;)a[0]-=e.x||0,a[1]-=e.y||0;e=i.tip(o.items,a)}return e}(t,e,this.canvas(),this._origin);const r=n&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,r)}}getItemBoundingClientRect(e){const t=this.canvas();if(!t)return;const n=t.getBoundingClientRect(),r=this._origin,i=e.bounds,a=i.width(),o=i.height();let s=i.x1+r[0]+n.left,l=i.y1+r[1]+n.top;for(;e.mark&&(e=e.mark.group);)s+=e.x||0,l+=e.y||0;return{x:s,y:l,width:a,height:o,left:s,top:l,right:s+a,bottom:l+o}}}function Cn(e,t,n,r){e.element().setAttribute("title",r||"")}class Tn{constructor(e){this._el=null,this._bgcolor=null,this._loader=new pe(e)}initialize(e,t,n,r,i){return this._el=e,this.resize(t,n,r,i)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}background(e){return 0===arguments.length?this._bgcolor:(this._bgcolor=e,this)}resize(e,t,n,r){return this._width=e,this._height=t,this._origin=n||[0,0],this._scale=r||1,this}dirty(){}render(e,t){const n=this;return n._call=function(){n._render(e,t)},n._call(),n._call=null,n}_render(){}renderAsync(e,t){const n=this.render(e,t);return this._ready?this._ready.then((()=>n)):Promise.resolve(n)}_load(e,t){var n=this,r=n._loader[e](t);if(!n._ready){const e=n._call;n._ready=n._loader.ready().then((t=>{t&&e(),n._ready=null}))}return r}sanitizeURL(e){return this._load("sanitizeURL",e)}loadImage(e){return this._load("loadImage",e)}}const kn="dragenter",Rn="dragleave",Dn="dragover",Nn="pointerdown",On="pointermove",Fn="pointerout",Pn="pointerover",Mn="mousedown",In="mousemove",$n="mouseout",Ln="mouseover",Bn="click",Un="mousewheel",zn="touchstart",qn="touchmove",jn="touchend",Hn=["keydown","keypress","keyup",kn,Rn,Dn,Nn,"pointerup",On,Fn,Pn,Mn,"mouseup",In,$n,Ln,Bn,"dblclick","wheel",Un,zn,qn,jn],Gn=On,Vn=$n,Wn=Bn;class Yn extends An{constructor(e,t){super(e,t),this._down=null,this._touch=null,this._first=!0,this._events={},this.events=Hn,this.pointermove=Qn([On,In],[Pn,Ln],[Fn,$n]),this.dragover=Qn([Dn],[kn],[Rn]),this.pointerout=Zn([Fn,$n]),this.dragleave=Zn([Rn])}initialize(e,t,n){return this._canvas=e&&xn(e,"canvas"),[Bn,Mn,Nn,On,Fn,Rn].forEach((e=>Kn(this,e))),super.initialize(e,t,n)}canvas(){return this._canvas}context(){return this._canvas.getContext("2d")}DOMMouseScroll(e){this.fire(Un,e)}pointerdown(e){this._down=this._active,this.fire(Nn,e)}mousedown(e){this._down=this._active,this.fire(Mn,e)}click(e){this._down===this._active&&(this.fire(Bn,e),this._down=null)}touchstart(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(zn,e,!0)}touchmove(e){this.fire(qn,e,!0)}touchend(e){this.fire(jn,e,!0),this._touch=null}fire(e,t,n){const r=n?this._touch:this._active,i=this._handlers[e];if(t.vegaType=e,e===Wn&&r&&r.href?this.handleHref(t,r,r.href):e!==Gn&&e!==Vn||this.handleTooltip(t,r,e!==Vn),i)for(let e=0,n=i.length;e=0&&r.splice(i,1),this}pickEvent(e){const t=_n(e,this._canvas),n=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-n[0],t[1]-n[1])}pick(e,t,n,r,i){const a=this.context();return un[e.marktype].pick.call(this,a,e,t,n,r,i)}}const Xn=e=>e===zn||e===qn||e===jn?[zn,qn,jn]:[e];function Kn(e,t){Xn(t).forEach((t=>function(e,t){const n=e.canvas();n&&!e._events[t]&&(e._events[t]=1,n.addEventListener(t,e[t]?n=>e[t](n):n=>e.fire(t,n)))}(e,t)))}function Jn(e,t,n){t.forEach((t=>e.fire(t,n)))}function Qn(e,t,n){return function(r){const i=this._active,a=this.pickEvent(r);a===i||(i&&i.exit||Jn(this,n,r),this._active=a,Jn(this,t,r)),Jn(this,e,r)}}function Zn(e){return function(t){Jn(this,e,t),this._active=null}}function er(e,t,n,r,i,a){const o="undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&null!=e.parentNode,s=e.getContext("2d"),l=o?"undefined"!=typeof window&&window.devicePixelRatio||1:i;e.width=t*l,e.height=n*l;for(const e in a)s[e]=a[e];return o&&1!==l&&(e.style.width=t+"px",e.style.height=n+"px"),s.pixelRatio=l,s.setTransform(l,0,0,l,l*r[0],l*r[1]),e}class tr extends Tn{constructor(e){super(e),this._options={},this._redraw=!1,this._dirty=new ce,this._tempb=new ce}initialize(e,t,n,r,i,a){return this._options=a||{},this._canvas=this._options.externalContext?null:(0,o.canvas)(1,1,this._options.type),e&&this._canvas&&(Sn(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),super.initialize(e,t,n,r,i)}resize(e,t,n,i){if(super.resize(e,t,n,i),this._canvas)er(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const e=this._options.externalContext;e||(0,r.error)("CanvasRenderer is missing a valid canvas or context"),e.scale(this._scale,this._scale),e.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this}canvas(){return this._canvas}context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)}dirty(e){const t=this._tempb.clear().union(e.bounds);let n=e.mark.group;for(;n;)t.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(t)}_render(e,t){const n=this.context(),r=this._origin,i=this._width,a=this._height,o=this._dirty,s=nr(r,i,a);n.save();const l=this._redraw||o.empty()?(this._redraw=!1,s.expand(1)):function(e,t,n){t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio);return t.translate(-n[0]%1,-n[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(n,s.intersect(o),r);return this.clear(-r[0],-r[1],i,a),this.draw(n,e,l,t),n.restore(),o.clear(),this}draw(e,t,n,i){if("group"!==t.marktype&&null!=i&&!i.includes(t.marktype))return;const a=un[t.marktype];t.clip&&function(e,t){var n=t.clip;e.save(),(0,r.isFunction)(n)?(e.beginPath(),n(e),e.clip()):yt(e,t.group)}(e,t),a.draw.call(this,e,t,n,i),t.clip&&e.restore()}clear(e,t,n,r){const i=this._options,a=this.context();"pdf"===i.type||i.externalContext||a.clearRect(e,t,n,r),null!=this._bgcolor&&(a.fillStyle=this._bgcolor,a.fillRect(e,t,n,r))}}const nr=(e,t,n)=>(new ce).set(0,0,t,n).translate(-e[0],-e[1]);class rr extends An{constructor(e,t){super(e,t);const n=this;n._hrefHandler=ir(n,((e,t)=>{t&&t.href&&n.handleHref(e,t,t.href)})),n._tooltipHandler=ir(n,((e,t)=>{n.handleTooltip(e,t,e.type!==Vn)}))}initialize(e,t,n){let r=this._svg;return r&&(r.removeEventListener(Wn,this._hrefHandler),r.removeEventListener(Gn,this._tooltipHandler),r.removeEventListener(Vn,this._tooltipHandler)),this._svg=r=e&&xn(e,"svg"),r&&(r.addEventListener(Wn,this._hrefHandler),r.addEventListener(Gn,this._tooltipHandler),r.addEventListener(Vn,this._tooltipHandler)),super.initialize(e,t,n)}canvas(){return this._svg}on(e,t){const n=this.eventName(e),r=this._handlers;if(this._handlerIndex(r[n],e,t)<0){const i={type:e,handler:t,listener:ir(this,t)};(r[n]||(r[n]=[])).push(i),this._svg&&this._svg.addEventListener(n,i.listener)}return this}off(e,t){const n=this.eventName(e),r=this._handlers[n],i=this._handlerIndex(r,e,t);return i>=0&&(this._svg&&this._svg.removeEventListener(n,r[i].listener),r.splice(i,1)),this}}const ir=(e,t)=>n=>{let r=n.target.__data__;r=Array.isArray(r)?r[0]:r,n.vegaType=n.type,t.call(e._obj,n,r)},ar="aria-hidden",or="aria-label",sr="role",lr="aria-roledescription",ur="graphics-object",cr="graphics-symbol",dr=(e,t,n)=>({[sr]:e,[lr]:t,[or]:n||void 0}),fr=(0,r.toSet)(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),pr={axis:{desc:"axis",caption:function(e){const t=e.datum,n=e.orient,r=t.title?vr(e):null,i=e.context,a=i.scales[t.scale].value,o=i.dataflow.locale(),s=a.type;return("left"===n||"right"===n?"Y":"X")+"-axis"+(r?` titled '${r}'`:"")+` for a ${(0,l.isDiscrete)(s)?"discrete":s} scale`+` with ${(0,l.domainCaption)(o,a,e)}`}},legend:{desc:"legend",caption:function(e){const t=e.datum,n=t.title?vr(e):null,i=`${t.type||""} legend`.trim(),a=t.scales,o=Object.keys(a),s=e.context,u=s.scales[a[o[0]]].value,c=s.dataflow.locale();return d=i,(d.length?d[0].toUpperCase()+d.slice(1):d)+(n?` titled '${n}'`:"")+` for ${function(e){return e=e.map((e=>e+("fill"===e||"stroke"===e?" color":""))),e.length<2?e[0]:e.slice(0,-1).join(", ")+" and "+(0,r.peek)(e)}(o)}`+` with ${(0,l.domainCaption)(c,u,e)}`;var d}},"title-text":{desc:"title",caption:e=>`Title text '${yr(e)}'`},"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${yr(e)}'`}},hr={ariaRole:sr,ariaRoleDescription:lr,description:or};function gr(e,t){const n=!1===t.aria;if(e(ar,n||void 0),n||null==t.description)for(const t in hr)e(hr[t],void 0);else{const n=t.mark.marktype;e(or,t.description),e(sr,t.ariaRole||("group"===n?ur:cr)),e(lr,t.ariaRoleDescription||`${n} mark`)}}function mr(e){return!1===e.aria?{[ar]:!0}:fr[e.role]?null:pr[e.role]?function(e,t){try{const n=e.items[0],r=t.caption||(()=>"");return dr(t.role||cr,t.desc,n.description||r(n))}catch(e){return null}}(e,pr[e.role]):function(e){const t=e.marktype,n="group"===t||"text"===t||e.items.some((e=>null!=e.description&&!1!==e.aria));return dr(n?ur:cr,`${t} mark container`,e.description)}(e)}function yr(e){return(0,r.array)(e.text).join(" ")}function vr(e){try{return(0,r.array)((0,r.peek)(e.items).items[0].text).join(" ")}catch(e){return null}}const br=e=>(e+"").replace(/&/g,"&").replace(//g,">"),xr=e=>br(e).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ");function Er(){let e="",t="",n="";const r=[],i=()=>t=n="",a=(e,n)=>(null!=n&&(t+=` ${e}="${xr(n)}"`),o),o={open(s){(a=>{t&&(e+=`${t}>${n}`,i()),r.push(a)})(s),t="<"+s;for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c${n}`:"/>"):``,i(),o},attr:a,text:e=>(n+=br(e),o),toString:()=>e};return o}const Sr=e=>wr(Er(),e)+"";function wr(e,t){if(e.open(t.tagName),t.hasAttributes()){const n=t.attributes,r=n.length;for(let t=0;t{e.dirty=t}))),r.zdirty||(n.exit?(a.nested&&r.items.length?(l=r.items[0],l._svg&&this._update(a,l._svg,l)):n._svg&&(l=n._svg.parentNode,l&&l.removeChild(n._svg)),n._svg=null):(n=a.nested?r.items[0]:n,n._update!==t&&(n._svg&&n._svg.ownerSVGElement?this._update(a,n._svg,n):(this._dirtyAll=!1,Dr(n,t)),n._update=t)));return!this._dirtyAll}mark(e,t,n,r){if(!this.isDirty(t))return t._svg;const i=this._svg,a=t.marktype,o=un[a],s=!1===t.interactive?"none":null,l="g"===o.tag,u=Fr(t,e,n,"g",i);if("group"!==a&&null!=r&&!r.includes(a))return Sn(u,0),t._svg;u.setAttribute("class",wn(t));const c=mr(t);for(const e in c)Ur(u,e,c[e]);l||Ur(u,"pointer-events",s),Ur(u,"clip-path",t.clip?ue(this,t,t.group):null);let d=null,f=0;const p=e=>{const t=this.isDirty(e),n=Fr(e,u,d,o.tag,i);t&&(this._update(o,n,e),l&&function(e,t,n,r){t=t.lastChild.previousSibling;let i,a=0;nt(n,(n=>{i=e.mark(t,n,i,r),++a})),Sn(t,1+a)}(this,n,e,r)),d=n,++f};return o.nested?t.items.length&&p(t.items[0]):nt(t,p),Sn(u,f),u}_update(e,t,n){Pr=t,Mr=t.__values__,gr($r,n),e.attr($r,n,this);const r=Ir[e.type];r&&r.call(this,e,t,n),Pr&&this.style(Pr,n)}style(e,t){if(null!=t){for(const n in _r){let r="font"===n?Zt(t):t[n];if(r===Mr[n])continue;const i=_r[n];null==r?e.removeAttribute(i):(d(r)&&(r=f(r,this._defs.gradient,zr())),e.setAttribute(i,r+"")),Mr[n]=r}for(const n in Ar)Lr(e,Ar[n],t[n])}}defs(){const e=this._svg,t=this._defs;let n=t.el,r=0;for(const i in t.gradient)n||(t.el=n=En(e,1,"defs",kr)),r=Nr(n,t.gradient[i],r);for(const i in t.clipping)n||(t.el=n=En(e,1,"defs",kr)),r=Or(n,t.clipping[i],r);n&&(0===r?(e.removeChild(n),t.el=null):Sn(n,r))}_clearDefs(){const e=this._defs;e.gradient={},e.clipping={}}}function Dr(e,t){for(;e&&e.dirty!==t;e=e.mark.group){if(e.dirty=t,!e.mark||e.mark.dirty===t)return;e.mark.dirty=t}}function Nr(e,t,n){let r,i,a;if("radial"===t.gradient){let r=En(e,n++,"pattern",kr);Br(r,{id:c+t.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),r=En(r,0,"rect",kr),Br(r,{width:1,height:1,fill:`url(${zr()}#${t.id})`}),Br(e=En(e,n++,"radialGradient",kr),{id:t.id,fx:t.x1,fy:t.y1,fr:t.r1,cx:t.x2,cy:t.y2,r:t.r2})}else Br(e=En(e,n++,"linearGradient",kr),{id:t.id,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2});for(r=0,i=t.stops.length;r1&&e.previousSibling!=t}(o,n))&&t.insertBefore(o,n?n.nextSibling:t.firstChild),o}let Pr=null,Mr=null;const Ir={group(e,t,n){const r=Pr=t.childNodes[2];Mr=r.__values__,e.foreground($r,n,this),Mr=t.__values__,Pr=t.childNodes[1],e.content($r,n,this);const i=Pr=t.childNodes[0];e.background($r,n,this);const a=!1===n.mark.interactive?"none":null;if(a!==Mr.events&&(Ur(r,"pointer-events",a),Ur(i,"pointer-events",a),Mr.events=a),n.strokeForeground&&n.stroke){const e=n.fill;Ur(r,"display",null),this.style(i,n),Ur(i,"stroke",null),e&&(n.fill=null),Mr=r.__values__,this.style(r,n),e&&(n.fill=e),Pr=null}else Ur(r,"display","none")},image(e,t,n){!1===n.smooth?(Lr(t,"image-rendering","optimizeSpeed"),Lr(t,"image-rendering","pixelated")):Lr(t,"image-rendering",null)},text(e,t,n){const i=Kt(n);let a,o,s,l;(0,r.isArray)(i)?(o=i.map((e=>Qt(n,e))),a=o.join("\n"),a!==Mr.text&&(Sn(t,0),s=t.ownerDocument,l=Xt(n),o.forEach(((e,r)=>{const i=bn(s,"tspan",kr);i.__data__=n,i.textContent=e,r&&(i.setAttribute("x",0),i.setAttribute("dy",l)),t.appendChild(i)})),Mr.text=a)):(o=Qt(n,i),o!==Mr.text&&(t.textContent=o,Mr.text=o)),Ur(t,"font-family",Zt(n)),Ur(t,"font-size",Yt(n)+"px"),Ur(t,"font-style",n.fontStyle),Ur(t,"font-variant",n.fontVariant),Ur(t,"font-weight",n.fontWeight)}};function $r(e,t,n){t!==Mr[e]&&(n?function(e,t,n,r){null!=n?e.setAttributeNS(r,t,n):e.removeAttributeNS(r,t)}(Pr,e,t,n):Ur(Pr,e,t),Mr[e]=t)}function Lr(e,t,n){n!==Mr[t]&&(null==n?e.style.removeProperty(t):e.style.setProperty(t,n+""),Mr[t]=n)}function Br(e,t){for(const n in t)Ur(e,n,t[n])}function Ur(e,t,n){null!=n?e.setAttribute(t,n):e.removeAttribute(t)}function zr(){let e;return"undefined"==typeof window?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}class qr extends Tn{constructor(e){super(e),this._text=null,this._defs={gradient:{},clipping:{}}}svg(){return this._text}_render(e){const t=Er();t.open("svg",(0,r.extend)({},At,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const n=this._bgcolor;return n&&"transparent"!==n&&"none"!==n&&t.open("rect",{width:this._width,height:this._height,fill:n}).close(),t.open("g",Cr,{transform:"translate("+this._origin+")"}),this.mark(t,e),t.close(),this.defs(t),this._text=t.close()+"",this}mark(e,t){const n=un[t.marktype],i=n.tag,a=[gr,n.attr];e.open("g",{class:wn(t),"clip-path":t.clip?ue(this,t,t.group):null},mr(t),{"pointer-events":"g"!==i&&!1===t.interactive?"none":null});const o=o=>{const s=this.href(o);if(s&&e.open("a",s),e.open(i,this.attr(t,o,a,"g"!==i?i:null)),"text"===i){const t=Kt(o);if((0,r.isArray)(t)){const n={x:0,dy:Xt(o)};for(let r=0;rthis.mark(e,t))),e.close(),r&&a?(i&&(o.fill=null),o.stroke=a,e.open("path",this.attr(t,o,n.foreground,"bgrect")).close(),i&&(o.fill=i)):e.open("path",this.attr(t,o,n.foreground,"bgfore")).close()}e.close(),s&&e.close()};return n.nested?t.items&&t.items.length&&o(t.items[0]):nt(t,o),e.close()}href(e){const t=e.href;let n;if(t){if(n=this._hrefs&&this._hrefs[t])return n;this.sanitizeURL(t).then((e=>{e["xlink:href"]=e.href,e.href=null,(this._hrefs||(this._hrefs={}))[t]=e}))}return null}attr(e,t,n,r){const i={},a=(e,t,n,r)=>{i[r||e]=t};return Array.isArray(n)?n.forEach((e=>e(a,t,this))):n(a,t,this),r&&function(e,t,n,r,i){let a;if(null==t)return e;"bgrect"===r&&!1===n.interactive&&(e["pointer-events"]="none");if("bgfore"===r&&(!1===n.interactive&&(e["pointer-events"]="none"),e.display="none",null!==t.fill))return e;"image"===r&&!1===t.smooth&&(a=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]);"text"===r&&(e["font-family"]=Zt(t),e["font-size"]=Yt(t)+"px",e["font-style"]=t.fontStyle,e["font-variant"]=t.fontVariant,e["font-weight"]=t.fontWeight);for(const n in _r){let r=t[n];const a=_r[n];("transparent"!==r||"fill"!==a&&"stroke"!==a)&&null!=r&&(d(r)&&(r=f(r,i.gradient,"")),e[a]=r)}for(const e in Ar){const n=t[e];null!=n&&(a=a||[],a.push(`${Ar[e]}: ${n};`))}a&&(e.style=a.join(" "))}(i,t,e,r,this._defs),i}defs(e){const t=this._defs.gradient,n=this._defs.clipping;if(0!==Object.keys(t).length+Object.keys(n).length){e.open("defs");for(const n in t){const r=t[n],i=r.stops;"radial"===r.gradient?(e.open("pattern",{id:c+n,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),e.open("rect",{width:"1",height:"1",fill:"url(#"+n+")"}).close(),e.close(),e.open("radialGradient",{id:n,fx:r.x1,fy:r.y1,fr:r.r1,cx:r.x2,cy:r.y2,r:r.r2})):e.open("linearGradient",{id:n,x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2});for(let t=0;t!jr.svgMarkTypes.includes(e)));this._svgRenderer.render(e,jr.svgMarkTypes),this._canvasRenderer.render(e,n)}resize(e,t,n,r){return super.resize(e,t,n,r),this._svgRenderer.resize(e,t,n,r),this._canvasRenderer.resize(e,t,n,r),this}background(e){return jr.svgOnTop?this._canvasRenderer.background(e):this._svgRenderer.background(e),this}}class Vr extends Yn{constructor(e,t){super(e,t)}initialize(e,t,n){const r=En(En(e,0,"div"),jr.svgOnTop?0:1,"div");return super.initialize(r,t,n)}}const Wr="canvas",Yr="hybrid",Xr="none",Kr={Canvas:Wr,PNG:"png",SVG:"svg",Hybrid:Yr,None:Xr},Jr={};function Qr(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(Jr[e]=t,this):Jr[e]}function Zr(e,t,n){const i=[],a=(new ce).union(t),o=e.marktype;return o?ei(e,a,n,i):"group"===o?ti(e,a,n,i):(0,r.error)("Intersect scene must be mark node or group item.")}function ei(e,t,n,r){if(function(e,t,n){return e.bounds&&t.intersects(e.bounds)&&("group"===e.marktype||!1!==e.interactive&&(!n||n(e)))}(e,t,n)){const i=e.items,a=e.marktype,o=i.length;let s=0;if("group"===a)for(;s=0;r--)if(i[r]!=a[r])return!1;for(r=i.length-1;r>=0;r--)if(!oi(e[n=i[r]],t[n],n))return!1;return typeof e==typeof t}(e,t):e==t)}function si(e,t){return oi(S(e),S(t))}function li(){le(),u=0}},73706:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=function(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}}},76187:(e,t,n)=>{"use strict";n.r(t),n.d(t,{selectionIdTest:()=>T,selectionResolve:()=>R,selectionTest:()=>w,selectionTuples:()=>k,selectionVisitor:()=>F});var r=n(61388),i=n(26372),a=n(21720);const o=Symbol("vega_selection_getter");function s(e){return e.getter&&e.getter[o]||(e.getter=(0,i.field)(e.field),e.getter[o]=!0),e.getter}const l="intersect",u="union",c="vlMulti",d="vlPoint",f="or",p="and",h="_vgsid_",g=(0,i.field)(h),m="E",y="R",v="R-E",b="R-LE",x="R-RE",E="index:unit";function S(e,t){for(var n,r,a=t.fields,o=t.values,l=a.length,u=0;u(0,i.extend)(t.fields?{values:t.fields.map((t=>s(t)(e.datum)))}:{[h]:g(e.datum)},t)))}function R(e,t,n,r){for(var a,o,s,l,m,y,v,b,x,E,S,w,_=this.context.data[e],A=_?_.values.value:[],C={},T={},k={},R=A.length,N=0;N(e[o[n].field]=t,e)),{}))}else m=h,y=g(a),(b=(v=C[m]||(C[m]={}))[l]||(v[l]=[])).push(y),n&&(b=T[l]||(T[l]=[])).push({[h]:y});if(t=t||u,C[h]?C[h]=D[`${h}_${t}`](...Object.values(C[h])):Object.keys(C).forEach((e=>{C[e]=Object.keys(C[e]).map((t=>C[e][t])).reduce(((n,r)=>void 0===n?r:D[`${k[e]}_${t}`](n,r)))})),A=Object.keys(T),n&&A.length){C[r?d:c]=t===u?{[f]:A.reduce(((e,t)=>(e.push(...T[t]),e)),[])}:{[p]:A.map((e=>({[f]:T[e]})))}}return C}var D={[`${h}_union`]:r.union,[`${h}_intersect`]:r.intersection,E_union:function(e,t){if(!e.length)return t;for(var n=0,r=t.length;nt.indexOf(e)>=0)):t},R_union:function(e,t){var n=(0,i.toNumber)(t[0]),r=(0,i.toNumber)(t[1]);return n>r&&(n=t[1],r=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]r&&(n=t[1],r=t[0]),e.length?rr&&(e[1]=r),e):[n,r]}};const N=":",O="@";function F(e,t,n,r){t[0].type!==a.Literal&&(0,i.error)("First argument to selection functions must be a string literal.");const o=t[0].value,s=t.length>=2&&(0,i.peek)(t).value,u="unit",c=O+u,d=N+o;s!==l||(0,i.hasOwnProperty)(r,c)||(r[c]=n.getData(o).indataRef(n,u)),(0,i.hasOwnProperty)(r,d)||(r[d]=n.getData(o).tuplesRef())}},48872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bandwidthNRD:()=>s,bin:()=>l,bootstrapCI:()=>d,cumulativeLogNormal:()=>C,cumulativeNormal:()=>x,cumulativeUniform:()=>O,densityLogNormal:()=>A,densityNormal:()=>b,densityUniform:()=>N,dotbin:()=>f,quantileLogNormal:()=>T,quantileNormal:()=>E,quantileUniform:()=>F,quantiles:()=>a,quartiles:()=>o,random:()=>u,randomInteger:()=>h,randomKDE:()=>w,randomLCG:()=>p,randomLogNormal:()=>k,randomMixture:()=>R,randomNormal:()=>S,randomUniform:()=>P,regressionConstant:()=>M,regressionExp:()=>q,regressionLinear:()=>U,regressionLoess:()=>X,regressionLog:()=>z,regressionPoly:()=>G,regressionPow:()=>j,regressionQuad:()=>H,sampleCurve:()=>Z,sampleLogNormal:()=>_,sampleNormal:()=>v,sampleUniform:()=>D,setRandom:()=>c});var r=n(61388);function*i(e,t){if(null==t)for(let t of e)null!=t&&""!==t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)r=t(r,++n,e),null!=r&&""!==r&&(r=+r)>=r&&(yield r)}}function a(e,t,n){const a=Float64Array.from(i(e,n));return a.sort(r.ascending),t.map((e=>(0,r.quantileSorted)(a,e)))}function o(e,t){return a(e,[.25,.5,.75],t)}function s(e,t){const n=e.length,i=(0,r.deviation)(e,t),a=o(e,t),s=(a[2]-a[0])/1.34;return 1.06*(Math.min(i,s)||i||Math.abs(a[0])||1)*Math.pow(n,-.2)}function l(e){const t=e.maxbins||20,n=e.base||10,r=Math.log(n),i=e.divide||[5,2];let a,o,s,l,u,c,d=e.extent[0],f=e.extent[1];const p=e.span||f-d||Math.abs(d)||1;if(e.step)a=e.step;else if(e.steps){for(l=p/t,u=0,c=e.steps.length;ut;)a*=n;for(u=0,c=i.length;u=s&&p/l<=t&&(a=l)}l=Math.log(a);const h=l>=0?0:1+~~(-l/r),g=Math.pow(n,-h-1);return(e.nice||void 0===e.nice)&&(l=Math.floor(d/a+g)*a,d=de);const i=e.length,a=new Float64Array(i);let o,s=0,l=1,u=r(e[0]),c=u,d=u+t;for(;l=d){for(c=(u+c)/2;s>1);io;)e[i--]=e[a]}a=o,o=r}return e}(a,t+t/4):a}function p(e){return function(){return(e=(1103515245*e+12345)%2147483647)/2147483647}}function h(e,t){let n,r,i;null==t&&(t=e,e=0);const a={min(e){return arguments.length?(n=e||0,i=r-n,a):n},max(e){return arguments.length?(r=e||0,i=r-n,a):r},sample:()=>n+Math.floor(i*u()),pdf:e=>e===Math.floor(e)&&e>=n&&e=r?1:(t-n+1)/i},icdf:e=>e>=0&&e<=1?n-1+Math.floor(e*i):NaN};return a.min(e).max(t)}const g=Math.sqrt(2*Math.PI),m=Math.SQRT2;let y=NaN;function v(e,t){e=e||0,t=null==t?1:t;let n,r,i=0,a=0;if(y==y)i=y,y=NaN;else{do{i=2*u()-1,a=2*u()-1,n=i*i+a*a}while(0===n||n>1);r=Math.sqrt(-2*Math.log(n)/n),i*=r,y=a*r}return e+i*t}function b(e,t,n){const r=(e-(t||0))/(n=null==n?1:n);return Math.exp(-.5*r*r)/(n*g)}function x(e,t,n){const r=(e-(t=t||0))/(n=null==n?1:n),i=Math.abs(r);let a;if(i>37)a=0;else{const e=Math.exp(-i*i/2);let t;i<7.07106781186547?(t=.0352624965998911*i+.700383064443688,t=t*i+6.37396220353165,t=t*i+33.912866078383,t=t*i+112.079291497871,t=t*i+221.213596169931,t=t*i+220.206867912376,a=e*t,t=.0883883476483184*i+1.75566716318264,t=t*i+16.064177579207,t=t*i+86.7807322029461,t=t*i+296.564248779674,t=t*i+637.333633378831,t=t*i+793.826512519948,t=t*i+440.413735824752,a/=t):(t=i+.65,t=i+4/t,t=i+3/t,t=i+2/t,t=i+1/t,a=e/t/2.506628274631)}return r>0?1-a:a}function E(e,t,n){return e<0||e>1?NaN:(t||0)+(null==n?1:n)*m*function(e){let t,n=-Math.log((1-e)*(1+e));n<6.25?(n-=3.125,t=-364441206401782e-35,t=t*n-16850591381820166e-35,t=128584807152564e-32+t*n,t=11157877678025181e-33+t*n,t=t*n-1333171662854621e-31,t=20972767875968562e-33+t*n,t=6637638134358324e-30+t*n,t=t*n-4054566272975207e-29,t=t*n-8151934197605472e-29,t=26335093153082323e-28+t*n,t=t*n-12975133253453532e-27,t=t*n-5415412054294628e-26,t=1.0512122733215323e-9+t*n,t=t*n-4.112633980346984e-9,t=t*n-2.9070369957882005e-8,t=4.2347877827932404e-7+t*n,t=t*n-13654692000834679e-22,t=t*n-13882523362786469e-21,t=.00018673420803405714+t*n,t=t*n-.000740702534166267,t=t*n-.006033670871430149,t=.24015818242558962+t*n,t=1.6536545626831027+t*n):n<16?(n=Math.sqrt(n)-3.25,t=2.2137376921775787e-9,t=9.075656193888539e-8+t*n,t=t*n-2.7517406297064545e-7,t=1.8239629214389228e-8+t*n,t=15027403968909828e-22+t*n,t=t*n-4013867526981546e-21,t=29234449089955446e-22+t*n,t=12475304481671779e-21+t*n,t=t*n-47318229009055734e-21,t=6828485145957318e-20+t*n,t=24031110387097894e-21+t*n,t=t*n-.0003550375203628475,t=.0009532893797373805+t*n,t=t*n-.0016882755560235047,t=.002491442096107851+t*n,t=t*n-.003751208507569241,t=.005370914553590064+t*n,t=1.0052589676941592+t*n,t=3.0838856104922208+t*n):Number.isFinite(n)?(n=Math.sqrt(n)-5,t=-27109920616438573e-27,t=t*n-2.555641816996525e-10,t=1.5076572693500548e-9+t*n,t=t*n-3.789465440126737e-9,t=7.61570120807834e-9+t*n,t=t*n-1.496002662714924e-8,t=2.914795345090108e-8+t*n,t=t*n-6.771199775845234e-8,t=2.2900482228026655e-7+t*n,t=t*n-9.9298272942317e-7,t=4526062597223154e-21+t*n,t=t*n-1968177810553167e-20,t=7599527703001776e-20+t*n,t=t*n-.00021503011930044477,t=t*n-.00013871931833623122,t=1.0103004648645344+t*n,t=4.849906401408584+t*n):t=1/0;return t*e}(2*e-1)}function S(e,t){let n,r;const i={mean(e){return arguments.length?(n=e||0,i):n},stdev(e){return arguments.length?(r=null==e?1:e,i):r},sample:()=>v(n,r),pdf:e=>b(e,n,r),cdf:e=>x(e,n,r),icdf:e=>E(e,n,r)};return i.mean(e).stdev(t)}function w(e,t){const n=S();let r=0;const i={data(n){return arguments.length?(e=n,r=n?n.length:0,i.bandwidth(t)):e},bandwidth(n){return arguments.length?(!(t=n)&&e&&(t=s(e)),i):t},sample:()=>e[~~(u()*r)]+t*n.sample(),pdf(i){let a=0,o=0;for(;o_(n,r),pdf:e=>A(e,n,r),cdf:e=>C(e,n,r),icdf:e=>T(e,n,r)};return i.mean(e).stdev(t)}function R(e,t){let n,r=0;const i={weights(e){return arguments.length?(n=function(e){const t=[];let n,i=0;for(n=0;n=t&&e<=n?1/(n-t):0}function O(e,t,n){return null==n&&(n=null==t?1:t,t=0),en?1:(e-t)/(n-t)}function F(e,t,n){return null==n&&(n=null==t?1:t,t=0),e>=0&&e<=1?t+e*(n-t):NaN}function P(e,t){let n,r;const i={min(e){return arguments.length?(n=e||0,i):n},max(e){return arguments.length?(r=null==e?1:e,i):r},sample:()=>D(n,r),pdf:e=>N(e,n,r),cdf:e=>O(e,n,r),icdf:e=>F(e,n,r)};return null==t&&(t=null==e?1:e,e=0),i.min(e).max(t)}function M(e,t,n){let r=0,i=0;for(const a of e){const e=n(a);null==t(a)||null==e||isNaN(e)||(r+=(e-r)/++i)}return{coef:[r],predict:()=>r,rSquared:0}}function I(e,t,n,r){const i=r-e*e,a=Math.abs(i)<1e-24?0:(n-e*t)/i;return[t-a*e,a]}function $(e,t,n,r){e=e.filter((e=>{let r=t(e),i=n(e);return null!=r&&(r=+r)>=r&&null!=i&&(i=+i)>=i})),r&&e.sort(((e,n)=>t(e)-t(n)));const i=e.length,a=new Float64Array(i),o=new Float64Array(i);let s,l,u,c=0,d=0,f=0;for(u of e)a[c]=s=+t(u),o[c]=l=+n(u),++c,d+=(s-d)/c,f+=(l-f)/c;for(c=0;c=i&&null!=a&&(a=+a)>=a&&r(i,a,++o)}function B(e,t,n,r,i){let a=0,o=0;return L(e,t,n,((e,t)=>{const n=t-i(e),s=t-r;a+=n*n,o+=s*s})),1-a/o}function U(e,t,n){let r=0,i=0,a=0,o=0,s=0;L(e,t,n,((e,t)=>{++s,r+=(e-r)/s,i+=(t-i)/s,a+=(e*t-a)/s,o+=(e*e-o)/s}));const l=I(r,i,a,o),u=e=>l[0]+l[1]*e;return{coef:l,predict:u,rSquared:B(e,t,n,i,u)}}function z(e,t,n){let r=0,i=0,a=0,o=0,s=0;L(e,t,n,((e,t)=>{++s,e=Math.log(e),r+=(e-r)/s,i+=(t-i)/s,a+=(e*t-a)/s,o+=(e*e-o)/s}));const l=I(r,i,a,o),u=e=>l[0]+l[1]*Math.log(e);return{coef:l,predict:u,rSquared:B(e,t,n,i,u)}}function q(e,t,n){const[r,i,a,o]=$(e,t,n);let s,l,u,c=0,d=0,f=0,p=0,h=0;L(e,t,n,((e,t)=>{s=r[h++],l=Math.log(t),u=s*t,c+=(t*l-c)/h,d+=(u-d)/h,f+=(u*l-f)/h,p+=(s*u-p)/h}));const[g,m]=I(d/o,c/o,f/o,p/o),y=e=>Math.exp(g+m*(e-a));return{coef:[Math.exp(g-m*a),m],predict:y,rSquared:B(e,t,n,o,y)}}function j(e,t,n){let r=0,i=0,a=0,o=0,s=0,l=0;L(e,t,n,((e,t)=>{const n=Math.log(e),u=Math.log(t);++l,r+=(n-r)/l,i+=(u-i)/l,a+=(n*u-a)/l,o+=(n*n-o)/l,s+=(t-s)/l}));const u=I(r,i,a,o),c=e=>u[0]*Math.pow(e,u[1]);return u[0]=Math.exp(u[0]),{coef:u,predict:c,rSquared:B(e,t,n,s,c)}}function H(e,t,n){const[r,i,a,o]=$(e,t,n),s=r.length;let l,u,c,d,f=0,p=0,h=0,g=0,m=0;for(l=0;lb*(e-=a)*e+x*e+E+o;return{coef:[E-x*a+b*a*a+o,x-2*b*a,b],predict:S,rSquared:B(e,t,n,o,S)}}function G(e,t,n,r){if(0===r)return M(e,t,n);if(1===r)return U(e,t,n);if(2===r)return H(e,t,n);const[i,a,o,s]=$(e,t,n),l=i.length,u=[],c=[],d=r+1;let f,p,h,g,m;for(f=0;fMath.abs(e[r][o])&&(o=i);for(a=r;a=r;a--)e[a][i]-=e[a][r]*e[r][i]/e[r][r]}for(i=t-1;i>=0;--i){for(s=0,a=i+1;a{e-=o;let t=s+y[0]+y[1]*e+y[2]*e*e;for(f=3;f=0;--a)for(s=t[a],l=1,i[a]+=s,o=1;o<=a;++o)l*=(a+1-o)/o,i[a-o]+=s*Math.pow(n,o)*l;return i[0]+=r,i}const W=2,Y=1e-12;function X(e,t,n,i){const[a,o,s,l]=$(e,t,n,!0),u=a.length,c=Math.max(2,~~(i*u)),d=new Float64Array(u),f=new Float64Array(u),p=new Float64Array(u).fill(1);for(let e=-1;++e<=W;){const t=[0,c-1];for(let e=0;ea[i]-n?r:i;let l=0,u=0,c=0,h=0,g=0;const m=1/Math.abs(a[s]-n||1);for(let e=r;e<=i;++e){const t=a[e],r=o[e],i=K(Math.abs(n-t)*m)*p[e],s=t*i;l+=i,u+=s,c+=r*i,h+=r*s,g+=t*s}const[y,v]=I(u/l,c/l,h/l,g/l);d[e]=y+v*n,f[e]=Math.abs(o[e]-d[e]),J(a,e+1,t)}if(e===W)break;const n=(0,r.median)(f);if(Math.abs(n)=1?Y:(t=1-e*e)*t}return function(e,t,n,r){const i=e.length,a=[];let o,s=0,l=0,u=[];for(;s=e.length))for(;t>i&&e[a]-r<=r-e[i];)n[0]=++i,n[1]=a,++a}const Q=.5*Math.PI/180;function Z(e,t,n,r){n=n||25,r=Math.max(n,r||200);const i=t=>[t,e(t)],a=t[0],o=t[1],s=o-a,l=s/r,u=[i(a)],c=[];if(n===r){for(let e=1;e0;)c.push(i(a+e/n*s));let d=u[0],f=c[c.length-1];const p=1/s,h=function(e,t){let n=e,r=e;const i=t.length;for(let e=0;er&&(r=i)}return 1/(r-n)}(d[1],c);for(;f;){const e=i((d[0]+f[0])/2);e[0]-d[0]>=l&&ee(d,e,f,p,h)>Q?c.push(e):(d=f,u.push(f),c.pop()),f=c[c.length-1]}return u}function ee(e,t,n,r,i){const a=Math.atan2(i*(n[1]-e[1]),r*(n[0]-e[0])),o=Math.atan2(i*(t[1]-e[1]),r*(t[0]-e[0]));return Math.abs(a-o)}},80632:(e,t,n)=>{"use strict";n.r(t),n.d(t,{carbong10:()=>ne,carbong100:()=>ie,carbong90:()=>re,carbonwhite:()=>te,dark:()=>o,excel:()=>l,fivethirtyeight:()=>p,ggplot2:()=>g,googlecharts:()=>I,latimes:()=>E,powerbi:()=>X,quartz:()=>_,urbaninstitute:()=>O,version:()=>ae,vox:()=>C});var r="2.15.0";const i="#fff",a="#888",o={background:"#333",view:{stroke:a},title:{color:i,subtitleColor:i},style:{"guide-label":{fill:i},"guide-title":{fill:i}},axis:{domainColor:i,gridColor:a,tickColor:i}},s="#4572a7",l={background:"#fff",arc:{fill:s},area:{fill:s},line:{stroke:s,strokeWidth:2},path:{stroke:s},rect:{fill:s},shape:{stroke:s},symbol:{fill:s,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},u="#30a2da",c="#cbcbcb",d="#f0f0f0",f="#333",p={arc:{fill:u},area:{fill:u},axis:{domainColor:c,grid:!0,gridColor:c,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:c,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:d,group:{fill:d},legend:{labelColor:f,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:f,titleFontSize:14,titlePadding:10},line:{stroke:u,strokeWidth:2},path:{stroke:u,strokeWidth:.5},rect:{fill:u},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:u},bar:{binSpacing:2,fill:u,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},h="#000",g={group:{fill:"#e5e5e5"},arc:{fill:h},area:{fill:h},line:{stroke:h},path:{stroke:h},rect:{fill:h},shape:{stroke:h},symbol:{fill:h,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},m="Benton Gothic, sans-serif",y="#82c6df",v="Benton Gothic Bold, sans-serif",b="normal",x={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},E={background:"#ffffff",title:{anchor:"start",color:"#000000",font:v,fontSize:22,fontWeight:"normal"},arc:{fill:y},area:{fill:y},line:{stroke:y,strokeWidth:2},path:{stroke:y},rect:{fill:y},shape:{stroke:y},symbol:{fill:y,size:30},axis:{labelFont:m,labelFontSize:11.5,labelFontWeight:"normal",titleFont:v,titleFontSize:13,titleFontWeight:b},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:m,labelFontSize:11.5,symbolType:"square",titleFont:v,titleFontSize:13,titleFontWeight:b},range:{category:x["category-6"],diverging:x["fireandice-6"],heatmap:x["fire-7"],ordinal:x["fire-7"],ramp:x["fire-7"]}},S="#ab5787",w="#979797",_={background:"#f9f9f9",arc:{fill:S},area:{fill:S},line:{stroke:S},path:{stroke:S},rect:{fill:S},shape:{stroke:S},symbol:{fill:S,size:30},axis:{domainColor:w,domainWidth:.5,gridWidth:.2,labelColor:w,tickColor:w,tickWidth:.2,titleColor:w},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},A="#3e5c69",C={background:"#fff",arc:{fill:A},area:{fill:A},line:{stroke:A},path:{stroke:A},rect:{fill:A},shape:{stroke:A},symbol:{fill:A},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},T="#1696d2",k="#000000",R="Lato",D="Lato",N={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},O={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:R},axisX:{domain:!0,domainColor:k,domainWidth:1,grid:!1,labelFontSize:12,labelFont:D,labelAngle:0,tickColor:k,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:R},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:D,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:R,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:D,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:R,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:N["six-groups-cat-1"],diverging:N["diverging-colors"],heatmap:N["diverging-colors"],ordinal:N["six-groups-seq"],ramp:N["shades-blue"]},area:{fill:T},rect:{fill:T},line:{color:T,stroke:T,strokeWidth:5},trail:{color:T,stroke:T,strokeWidth:0,size:1},path:{stroke:T,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:T,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:T,stroke:null}},arc:{fill:T},shape:{stroke:T},symbol:{fill:T,size:30}},F="#3366CC",P="#ccc",M="Arial, sans-serif",I={arc:{fill:F},area:{fill:F},path:{stroke:F},rect:{fill:F},shape:{stroke:F},symbol:{stroke:F},circle:{fill:F},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:M,fontSize:12},"guide-title":{font:M,fontSize:12},"group-title":{font:M,fontSize:12}},title:{font:M,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:P,tickColor:P,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},$=e=>e*(1/3+1),L=$(9),B=$(10),U=$(12),z="Segoe UI",q="wf_standard-font, helvetica, arial, sans-serif",j="#252423",H="#605E5C",G="transparent",V="#118DFF",W="#DEEFFF",Y=[W,V],X={view:{stroke:G},background:G,font:z,header:{titleFont:q,titleFontSize:U,titleColor:j,labelFont:z,labelFontSize:B,labelColor:H},axis:{ticks:!1,grid:!1,domain:!1,labelColor:H,labelFontSize:L,titleFont:q,titleColor:j,titleFontSize:U,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:"#C8C6C4",gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:V},line:{stroke:V,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:z,fontSize:L,fill:H},arc:{fill:V},area:{fill:V,line:!0,opacity:.6},path:{stroke:V},rect:{fill:V},point:{fill:V,filled:!0,size:75},shape:{stroke:V},symbol:{fill:V,strokeWidth:1.5,size:50},legend:{titleFont:z,titleFontWeight:"bold",titleColor:H,labelFont:z,labelFontSize:B,labelColor:H,symbolType:"circle",symbolSize:75},range:{category:[V,"#12239E","#E66C37","#6B007B","#E044A7","#744EC2","#D9B300","#D64550"],diverging:Y,heatmap:Y,ordinal:[W,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",V]}},K='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',J={textPrimary:{g90:"#f4f4f4",g100:"#f4f4f4",white:"#161616",g10:"#161616"},textSecondary:{g90:"#c6c6c6",g100:"#c6c6c6",white:"#525252",g10:"#525252"},layerAccent01:{white:"#e0e0e0",g10:"#e0e0e0",g90:"#525252",g100:"#393939"},gridBg:{white:"#ffffff",g10:"#ffffff",g90:"#161616",g100:"#161616"}},Q=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],Z=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function ee({theme:e,background:t}){const n=["white","g10"].includes(e)?"light":"dark",r=J.gridBg[e],i=J.textPrimary[e],a=J.textSecondary[e],o="dark"===n?Q:Z,s="dark"===n?"#d4bbff":"#6929c4";return{background:t,arc:{fill:s},area:{fill:s},path:{stroke:s},rect:{fill:s},shape:{stroke:s},symbol:{stroke:s},circle:{fill:s},view:{fill:r,stroke:r},group:{fill:r},title:{color:i,anchor:"start",dy:-15,fontSize:16,font:K,fontWeight:600},axis:{labelColor:a,labelFontSize:12,labelFont:'IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif',labelFontWeight:400,titleColor:i,titleFontWeight:600,titleFontSize:12,grid:!0,gridColor:J.layerAccent01[e],labelAngle:0},axisX:{titlePadding:10},axisY:{titlePadding:2.5},style:{"guide-label":{font:K,fill:a,fontWeight:400},"guide-title":{font:K,fill:a,fontWeight:400}},range:{category:o,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const te=ee({theme:"white",background:"#ffffff"}),ne=ee({theme:"g10",background:"#f4f4f4"}),re=ee({theme:"g90",background:"#262626"}),ie=ee({theme:"g100",background:"#161616"}),ae=r},71652:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DATE:()=>c,DAY:()=>d,DAYOFYEAR:()=>f,HOURS:()=>p,MILLISECONDS:()=>m,MINUTES:()=>h,MONTH:()=>l,QUARTER:()=>s,SECONDS:()=>g,TIME_UNITS:()=>y,WEEK:()=>u,YEAR:()=>o,dayofyear:()=>_,timeBin:()=>he,timeFloor:()=>U,timeInterval:()=>V,timeOffset:()=>X,timeSequence:()=>Q,timeUnitSpecifier:()=>E,timeUnits:()=>b,utcFloor:()=>j,utcInterval:()=>W,utcOffset:()=>K,utcSequence:()=>Z,utcdayofyear:()=>D,utcweek:()=>N,week:()=>A});var r=n(26372),i=n(42472),a=n(61388);const o="year",s="quarter",l="month",u="week",c="date",d="day",f="dayofyear",p="hours",h="minutes",g="seconds",m="milliseconds",y=[o,s,l,u,c,d,f,p,h,g,m],v=y.reduce(((e,t,n)=>(e[t]=1+n,e)),{});function b(e){const t=(0,r.array)(e).slice(),n={};t.length||(0,r.error)("Missing time unit."),t.forEach((e=>{(0,r.hasOwnProperty)(v,e)?n[e]=1:(0,r.error)(`Invalid time unit: ${e}.`)}));return(n[u]||n[d]?1:0)+(n[s]||n[l]||n[c]?1:0)+(n[f]?1:0)>1&&(0,r.error)(`Incompatible time units: ${e}`),t.sort(((e,t)=>v[e]-v[t])),t}const x={[o]:"%Y ",[s]:"Q%q ",[l]:"%b ",[c]:"%d ",[u]:"W%U ",[d]:"%a ",[f]:"%j ",[p]:"%H:00",[h]:"00:%M",[g]:":%S",[m]:".%L",[`${o}-${l}`]:"%Y-%m ",[`${o}-${l}-${c}`]:"%Y-%m-%d ",[`${p}-${h}`]:"%H:%M"};function E(e,t){const n=(0,r.extend)({},x,t),i=b(e),a=i.length;let o,s,l="",u=0;for(u=0;uu;--o)if(s=i.slice(u,o).join("-"),null!=n[s]){l+=n[s],u=o;break}return l.trim()}const S=new Date;function w(e){return S.setFullYear(e),S.setMonth(0),S.setDate(1),S.setHours(0,0,0,0),S}function _(e){return C(new Date(e))}function A(e){return T(new Date(e))}function C(e){return i.timeDay.count(w(e.getFullYear())-1,e)}function T(e){return i.timeWeek.count(w(e.getFullYear())-1,e)}function k(e){return w(e).getDay()}function R(e,t,n,r,i,a,o){if(0<=e&&e<100){const s=new Date(-1,t,n,r,i,a,o);return s.setFullYear(e),s}return new Date(e,t,n,r,i,a,o)}function D(e){return O(new Date(e))}function N(e){return F(new Date(e))}function O(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return i.utcDay.count(t-1,e)}function F(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return i.utcWeek.count(t-1,e)}function P(e){return S.setTime(Date.UTC(e,0,1)),S.getUTCDay()}function M(e,t,n,r,i,a,o){if(0<=e&&e<100){const e=new Date(Date.UTC(-1,t,n,r,i,a,o));return e.setUTCFullYear(n.y),e}return new Date(Date.UTC(e,t,n,r,i,a,o))}function I(e,t,n,i,a){const y=t||1,v=(0,r.peek)(e),b=(e,t,r)=>function(e,t,n,r){const i=n<=1?e:r?(t,i)=>r+n*Math.floor((e(t,i)-r)/n):(t,r)=>n*Math.floor(e(t,r)/n);return t?(e,n)=>t(i(e,n),n):i}(n[r=r||e],i[r],e===v&&y,t),x=new Date,E=(0,r.toSet)(e),S=E[o]?b(o):(0,r.constant)(2012),w=E[l]?b(l):E[s]?b(s):r.zero,_=E[u]&&E[d]?b(d,1,u+d):E[u]?b(u,1):E[d]?b(d,1):E[c]?b(c,1):E[f]?b(f,1):r.one,A=E[p]?b(p):r.zero,C=E[h]?b(h):r.zero,T=E[g]?b(g):r.zero,k=E[m]?b(m):r.zero;return function(e){x.setTime(+e);const t=S(x);return a(t,w(x),_(x,t),A(x),C(x),T(x),k(x))}}function $(e,t,n){return t+7*e-(n+6)%7}const L={[o]:e=>e.getFullYear(),[s]:e=>Math.floor(e.getMonth()/3),[l]:e=>e.getMonth(),[c]:e=>e.getDate(),[p]:e=>e.getHours(),[h]:e=>e.getMinutes(),[g]:e=>e.getSeconds(),[m]:e=>e.getMilliseconds(),[f]:e=>C(e),[u]:e=>T(e),[u+d]:(e,t)=>$(T(e),e.getDay(),k(t)),[d]:(e,t)=>$(1,e.getDay(),k(t))},B={[s]:e=>3*e,[u]:(e,t)=>$(e,0,k(t))};function U(e,t){return I(e,t||1,L,B,R)}const z={[o]:e=>e.getUTCFullYear(),[s]:e=>Math.floor(e.getUTCMonth()/3),[l]:e=>e.getUTCMonth(),[c]:e=>e.getUTCDate(),[p]:e=>e.getUTCHours(),[h]:e=>e.getUTCMinutes(),[g]:e=>e.getUTCSeconds(),[m]:e=>e.getUTCMilliseconds(),[f]:e=>O(e),[u]:e=>F(e),[d]:(e,t)=>$(1,e.getUTCDay(),P(t)),[u+d]:(e,t)=>$(F(e),e.getUTCDay(),P(t))},q={[s]:e=>3*e,[u]:(e,t)=>$(e,0,P(t))};function j(e,t){return I(e,t||1,z,q,M)}const H={[o]:i.timeYear,[s]:i.timeMonth.every(3),[l]:i.timeMonth,[u]:i.timeWeek,[c]:i.timeDay,[d]:i.timeDay,[f]:i.timeDay,[p]:i.timeHour,[h]:i.timeMinute,[g]:i.timeSecond,[m]:i.timeMillisecond},G={[o]:i.utcYear,[s]:i.utcMonth.every(3),[l]:i.utcMonth,[u]:i.utcWeek,[c]:i.utcDay,[d]:i.utcDay,[f]:i.utcDay,[p]:i.utcHour,[h]:i.utcMinute,[g]:i.utcSecond,[m]:i.utcMillisecond};function V(e){return H[e]}function W(e){return G[e]}function Y(e,t,n){return e?e.offset(t,n):void 0}function X(e,t,n){return Y(V(e),t,n)}function K(e,t,n){return Y(W(e),t,n)}function J(e,t,n,r){return e?e.range(t,n,r):void 0}function Q(e,t,n,r){return J(V(e),t,n,r)}function Z(e,t,n,r){return J(W(e),t,n,r)}const ee=1e3,te=6e4,ne=36e5,re=864e5,ie=2592e6,ae=31536e6,oe=[o,l,c,p,h,g,m],se=oe.slice(0,-1),le=se.slice(0,-1),ue=le.slice(0,-1),ce=ue.slice(0,-1),de=[o,l],fe=[o],pe=[[se,1,ee],[se,5,5e3],[se,15,15e3],[se,30,3e4],[le,1,te],[le,5,3e5],[le,15,9e5],[le,30,18e5],[ue,1,ne],[ue,3,108e5],[ue,6,216e5],[ue,12,432e5],[ce,1,re],[[o,u],1,6048e5],[de,1,ie],[de,3,7776e6],[fe,1,ae]];function he(e){const t=e.extent,n=e.maxbins||40,i=Math.abs((0,r.span)(t))/n;let o,s,l=(0,a.bisector)((e=>e[2])).right(pe,i);return l===pe.length?(o=fe,s=(0,a.tickStep)(t[0]/ae,t[1]/ae,n)):l?(l=pe[i/pe[l-1][2]{"use strict";n.r(t),n.d(t,{DEFAULT_OPTIONS:()=>c,Handler:()=>b,calculatePositionRelativeToCursor:()=>p,calculatePositionRelativeToMark:()=>h,createDefaultStyle:()=>f,default:()=>E,escapeHTML:()=>d,formatValue:()=>a,getMarkBounds:()=>g,getPositions:()=>m,mouseIsOnTooltip:()=>v,replacer:()=>o,stringify:()=>s,tooltipIsInViewport:()=>y,version:()=>x});var r=n(26372),i="0.35.2";function a(e,t,n,i){if((0,r.isArray)(e))return`[${e.map((e=>t((0,r.isString)(e)?e:s(e,n)))).join(", ")}]`;if((0,r.isObject)(e)){let a="";const{title:o,image:l,...u}=e;o&&(a+=`

${t(o)}

`),l&&(a+=``);const c=Object.keys(u);if(c.length>0){a+="";for(const e of c){let i=u[e];void 0!==i&&((0,r.isObject)(i)&&(i=s(i,n)),a+=``)}a+="
${t(e)}${t(i)}
"}return a||"{}"}return t(e)}function o(e){const t=[];return function(n,r){if("object"!=typeof r||null===r)return r;const i=t.indexOf(this)+1;return t.length=i,t.length>e?"[Object]":t.indexOf(r)>=0?"[Circular]":(t.push(r),r)}}function s(e,t){return JSON.stringify(e,o(t))}var l="#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black;\n}\n#vg-tooltip-element.visible {\n visibility: visible;\n}\n#vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px;\n}\n#vg-tooltip-element table {\n border-spacing: 0;\n}\n#vg-tooltip-element table tr {\n border: none;\n}\n#vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px;\n}\n#vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px;\n}\n#vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left;\n}\n#vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf;\n}\n";const u="vg-tooltip-element",c={offsetX:10,offsetY:10,id:u,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:d,maxDepth:2,formatTooltip:a,baseURL:"",anchor:"cursor",position:["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]};function d(e){return String(e).replace(/&/g,"&").replace(/=0&&e.y>=0&&e.x+t.width<=window.innerWidth&&e.y+t.height<=window.innerHeight}function v(e,t,n){return e.clientX>=t.x&&e.clientX<=t.x+n.width&&e.clientY>=t.y&&e.clientY<=t.y+n.height}class b{constructor(e){this.options={...c,...e};const t=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const e=document.createElement("style");e.setAttribute("id",this.options.styleId),e.innerHTML=f(t);const n=document.head;n.childNodes.length>0?n.insertBefore(e,n.childNodes[0]):n.appendChild(e)}}tooltipHandler(e,t,n,r){if(this.el=document.getElementById(this.options.id),!this.el){this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip");(document.fullscreenElement??document.body).appendChild(this.el)}if(null==r||""===r)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:i,y:a}="mark"===this.options.anchor?h(e,t,n,this.el.getBoundingClientRect(),this.options):p(t,this.el.getBoundingClientRect(),this.options);this.el.style.top=`${a}px`,this.el.style.left=`${i}px`}}const x=i;function E(e,t){const n=new b(t);return e.tooltip(n.call).run(),n}},28740:(e,t,n)=>{"use strict";n.r(t),n.d(t,{aggregate:()=>w,bin:()=>_,collect:()=>C,compare:()=>T,countpattern:()=>R,cross:()=>D,density:()=>P,dotbin:()=>B,expression:()=>U,extent:()=>q,facet:()=>H,field:()=>G,filter:()=>W,flatten:()=>Y,fold:()=>X,formula:()=>K,generate:()=>J,impute:()=>ee,joinaggregate:()=>te,kde:()=>ne,key:()=>re,load:()=>ae,lookup:()=>se,multiextent:()=>le,multivalues:()=>ce,params:()=>fe,pivot:()=>pe,prefacet:()=>he,project:()=>ge,proxy:()=>me,quantile:()=>ye,relay:()=>ve,sample:()=>be,sequence:()=>xe,sieve:()=>Ee,subflow:()=>j,timeunit:()=>Se,tupleindex:()=>_e,values:()=>Ae,window:()=>De});var r=n(26372),i=n(24988),a=n(48872),o=n(61388),s=n(71652);function l(e){return e&&e.length?1===e.length?e[0]:(t=e,e=>{const n=t.length;let r=1,i=String(t[0](e));for(;r{},d={init:c,add:c,rem:c,idx:0},f={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.valid?e.sum:void 0,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||void 0===e.max)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,n)=>{t{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,n)=>{t>e.max&&(e.argmax=n)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(e,t)=>{e.exp=0,e.exp_r=t},value:e=>e.valid?e.exp*(1-e.exp_r)/(1-e.exp_r**e.valid):void 0,add:(e,t)=>e.exp=e.exp_r*e.exp+t,rem:(e,t)=>e.exp=(e.exp-t/e.exp_r**(e.valid-1))/e.exp_r},exponentialb:{value:e=>e.valid?e.exp*(1-e.exp_r):void 0,req:["exponential"],idx:1}},p=Object.keys(f).filter((e=>"__count__"!==e));function h(e,t,n){return f[e](n,t)}function g(e,t){return e.idx-t.idx}function m(){this.valid=0,this.missing=0,this._ops.forEach((e=>null==e.aggregate_param?e.init(this):e.init(this,e.aggregate_param)))}function y(e,t){null!=e&&""!==e?e==e&&(++this.valid,this._ops.forEach((n=>n.add(this,e,t)))):++this.missing}function v(e,t){null!=e&&""!==e?e==e&&(--this.valid,this._ops.forEach((n=>n.rem(this,e,t)))):--this.missing}function b(e){return this._out.forEach((t=>e[t.out]=t.value(this))),e}function x(e,t){const n=t||r.identity,i=function(e){const t={};e.forEach((e=>t[e.name]=e));const n=e=>{e.req&&e.req.forEach((e=>{t[e]||n(t[e]=f[e]())}))};return e.forEach(n),Object.values(t).sort(g)}(e),a=e.slice().sort(g);function o(e){this._ops=i,this._out=a,this.cell=e,this.init()}return o.prototype.init=m,o.prototype.add=y,o.prototype.rem=v,o.prototype.set=b,o.prototype.get=n,o.fields=e.map((e=>e.out)),o}function E(e){this._key=e?(0,r.field)(e):i.tupleid,this.reset()}[...p,"__count__"].forEach((e=>{f[e]=function(e,t){return(n,i)=>(0,r.extend)({name:e,aggregate_param:i,out:n||e},d,t)}(e,f[e])}));const S=E.prototype;function w(e){i.Transform.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}S.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},S.add=function(e){this._add.push(e)},S.rem=function(e){this._rem.push(e)},S.values=function(){if(this._get=null,0===this._rem.length)return this._add;const e=this._add,t=this._rem,n=this._key,r=e.length,i=t.length,a=Array(r-i),o={};let s,l,u;for(s=0;s=0;)i=e(t[a])+"",(0,r.hasOwnProperty)(n,i)||(n[i]=1,++o);return o},S.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),n=(0,r.extentIndex)(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext},S.argmin=function(e){return this.extent(e)[0]||{}},S.argmax=function(e){return this.extent(e)[1]||{}},S.min=function(e){const t=this.extent(e)[0];return null!=t?e(t):void 0},S.max=function(e){const t=this.extent(e)[1];return null!=t?e(t):void 0},S.quartile=function(e){return this._get===e&&this._q||(this._q=(0,a.quartiles)(this.values(),e),this._get=e),this._q},S.q1=function(e){return this.quartile(e)[0]},S.q2=function(e){return this.quartile(e)[1]},S.q3=function(e){return this.quartile(e)[2]},S.ci=function(e){return this._get===e&&this._ci||(this._ci=(0,a.bootstrapCI)(this.values(),1e3,.05,e),this._get=e),this._ci},S.ci0=function(e){return this.ci(e)[0]},S.ci1=function(e){return this.ci(e)[1]},w.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:p},{name:"aggregate_params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]},(0,r.inherits)(w,i.Transform,{transform(e,t){const n=this,r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.modified();return n.stamp=r.stamp,n.value&&(i||t.modified(n._inputs,!0))?(n._prev=n.value,n.value=i?n.init(e):Object.create(null),t.visit(t.SOURCE,(e=>n.add(e)))):(n.value=n.value||n.init(e),t.visit(t.REM,(e=>n.rem(e))),t.visit(t.ADD,(e=>n.add(e)))),r.modifies(n._outputs),n._drop=!1!==e.drop,e.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),t.clean()&&n._drop&&r.clean(!0).runAfter((()=>this.clean())),n.changes(r)},cross(){const e=this,t=e.value,n=e._dnames,r=n.map((()=>({}))),i=n.length;function a(e){let t,a,o,s;for(t in e)for(o=e[t].tuple,a=0;a{const t=(0,r.accessorName)(e);return a(e),n.push(t),t})),this.cellkey=e.key?e.key:l(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const o=e.fields||[null],s=e.ops||["count"],c=e.aggregate_params||[null],d=e.as||[],f=o.length,p={};let g,m,y,v,b,E,S;for(f!==s.length&&(0,r.error)("Unmatched number of fields and aggregate ops."),S=0;Sx(e,e.field))),Object.create(null)},cellkey:l(),cell(e,t){let n=this.value[e];return n?0===n.num&&this._drop&&n.stampo.push(e),remove:e=>s[i(e)]=++l,size:()=>a.length,data:(e,t)=>(l&&(a=a.filter((e=>!s[i(e)])),s={},l=0),t&&e&&a.sort(e),o.length&&(a=e?(0,r.merge)(e,a,o.sort(e)):a.concat(o),o=[]),a)}}function C(e){i.Transform.call(this,[],e)}function T(e){i.Operator.call(this,null,k,e)}function k(e){return this.value&&!e.modified()?this.value:(0,r.compare)(e.fields,e.orders)}function R(e){i.Transform.call(this,null,e)}function D(e){i.Transform.call(this,null,e)}_.Definition={type:"Bin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"anchor",type:"number"},{name:"maxbins",type:"number",default:20},{name:"base",type:"number",default:10},{name:"divide",type:"number",array:!0,default:[5,2]},{name:"extent",type:"number",array:!0,length:2,required:!0},{name:"span",type:"number"},{name:"step",type:"number"},{name:"steps",type:"number",array:!0},{name:"minstep",type:"number",default:0},{name:"nice",type:"boolean",default:!0},{name:"name",type:"string"},{name:"as",type:"string",array:!0,length:2,default:["bin0","bin1"]}]},(0,r.inherits)(_,i.Transform,{transform(e,t){const n=!1!==e.interval,i=this._bins(e),a=i.start,o=i.step,s=e.as||["bin0","bin1"],l=s[0],u=s[1];let c;return c=e.modified()?(t=t.reflow(!0)).SOURCE:t.modified((0,r.accessorFields)(e.field))?t.ADD_MOD:t.ADD,t.visit(c,n?e=>{const t=i(e);e[l]=t,e[u]=null==t?null:a+o*(1+(t-a)/o)}:e=>e[l]=i(e)),t.modifies(n?s:l)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,n=(0,a.bin)(e),i=n.step;let o,s,l=n.start,u=l+Math.ceil((n.stop-l)/i)*i;null!=(o=e.anchor)&&(s=o-(l+i*Math.floor((o-l)/i)),l+=s,u+=s);const c=function(e){let n=(0,r.toNumber)(t(e));return null==n?null:nu?1/0:(n=Math.max(l,Math.min(n,u-i)),l+i*Math.floor(1e-14+(n-l)/i))};return c.start=l,c.stop=n.stop,c.step=i,this.value=(0,r.accessor)(c,(0,r.accessorFields)(t),e.name||"bin_"+(0,r.accessorName)(t))}}),C.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},(0,r.inherits)(C,i.Transform,{transform(e,t){const n=t.fork(t.ALL),r=A(i.tupleid,this.value,n.materialize(n.ADD).add),a=e.sort,o=t.changed()||a&&(e.modified("sort")||t.modified(a.fields));return n.visit(n.REM,r.remove),this.modified(o),this.value=n.source=r.data((0,i.stableCompare)(a),o),t.source&&t.source.root&&(this.value.root=t.source.root),n}}),(0,r.inherits)(T,i.Operator),R.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]},(0,r.inherits)(R,i.Transform,{transform(e,t){const n=t=>n=>{for(var r,i=function(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase()}return e.match(n)}(s(n),e.case,a)||[],l=0,u=i.length;li[e]=1+(i[e]||0))),c=n((e=>i[e]-=1));return r?t.visit(t.SOURCE,u):(t.visit(t.ADD,u),t.visit(t.REM,c)),this._finish(t,l)},_parameterCheck(e,t){let n=!1;return!e.modified("stopwords")&&this._stop||(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),n=!0),!e.modified("pattern")&&this._match||(this._match=new RegExp(e.pattern||"[\\w']+","g"),n=!0),(e.modified("field")||t.modified(e.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(e,t){const n=this._counts,r=this._tuples||(this._tuples={}),a=t[0],o=t[1],s=e.fork(e.NO_SOURCE|e.NO_FIELDS);let l,u,c;for(l in n)u=r[l],c=n[l]||0,!u&&c?(r[l]=u=(0,i.ingest)({}),u[a]=l,u[o]=c,s.add.push(u)):0===c?(u&&s.rem.push(u),n[l]=null,r[l]=null):u[o]!==c&&(u[o]=c,s.mod.push(u));return s.modifies(t)}}),D.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},(0,r.inherits)(D,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE),a=e.as||["a","b"],o=a[0],s=a[1],l=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let u=this.value;return l?(u&&(n.rem=u),u=t.materialize(t.SOURCE).source,n.add=this.value=function(e,t,n,r){for(var a,o,s=[],l={},u=e.length,c=0;cF(e,t)))):typeof i[n]===O&&i[n](e[n]);return i}function P(e){i.Transform.call(this,null,e)}const M=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],I={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:M},{name:"weights",type:"number",array:!0}]};function $(e,t){return e?e.map(((e,n)=>t[n]||(0,r.accessorName)(e))):null}function L(e,t,n){const r=[],i=e=>e(l);let a,o,s,l,u,c;if(null==t)r.push(e.map(n));else for(a={},o=0,s=e.length;oe.materialize(e.SOURCE).source}(t)),s=e.steps||e.minsteps||25,l=e.steps||e.maxsteps||200;let u=e.method||"pdf";"pdf"!==u&&"cdf"!==u&&(0,r.error)("Invalid density method: "+u),e.extent||o.data||(0,r.error)("Missing density extent parameter."),u=o[u];const c=e.as||["value","density"],d=e.extent||(0,r.extent)(o.data()),f=(0,a.sampleCurve)(u,d,s,l).map((e=>{const t={};return t[c[0]]=e[0],t[c[1]]=e[1],(0,i.ingest)(t)}));this.value&&(n.rem=this.value),this.value=n.add=n.source=f}return n}});function B(e){i.Transform.call(this,null,e)}B.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:"bin"}]};function U(e){i.Operator.call(this,null,z,e),this.modified(!0)}function z(e){const t=e.expr;return this.value&&!e.modified("expr")?this.value:(0,r.accessor)((n=>t(n,e)),(0,r.accessorFields)(t),(0,r.accessorName)(t))}function q(e){i.Transform.call(this,[void 0,void 0],e)}function j(e,t){i.Operator.call(this,e),this.parent=t,this.count=0}function H(e){i.Transform.call(this,{},e),this._keys=(0,r.fastmap)();const t=this._targets=[];t.active=0,t.forEach=e=>{for(let n=0,r=t.active;n(0,r.field)(e))):(0,r.field)(e.name,e.as)}function W(e){i.Transform.call(this,(0,r.fastmap)(),e)}function Y(e){i.Transform.call(this,[],e)}function X(e){i.Transform.call(this,[],e)}function K(e){i.Transform.call(this,null,e)}function J(e){i.Transform.call(this,[],e)}(0,r.inherits)(B,i.Transform,{transform(e,t){if(this.value&&!e.modified()&&!t.changed())return t;const n=t.materialize(t.SOURCE).source,o=L(t.source,e.groupby,r.identity),s=e.smooth||!1,l=e.field,u=e.step||((e,t)=>(0,r.span)((0,r.extent)(e,t))/30)(n,l),c=(0,i.stableCompare)(((e,t)=>l(e)-l(t))),d=e.as||"bin",f=o.length;let p,h=1/0,g=-1/0,m=0;for(;mg&&(g=t),e[++p][d]=t}return this.value={start:h,stop:g,step:u},t.reflow(!0).modifies(d)}}),(0,r.inherits)(U,i.Operator),q.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},(0,r.inherits)(q,i.Transform,{transform(e,t){const n=this.value,i=e.field,a=t.changed()||t.modified(i.fields)||e.modified("field");let o=n[0],s=n[1];if((a||null==o)&&(o=1/0,s=-1/0),t.visit(a?t.SOURCE:t.ADD,(e=>{const t=(0,r.toNumber)(i(e));null!=t&&(ts&&(s=t))})),!Number.isFinite(o)||!Number.isFinite(s)){let e=(0,r.accessorName)(i);e&&(e=` for field "${e}"`),t.dataflow.warn(`Infinite extent${e}: [${o}, ${s}]`),o=s=void 0}this.value=[o,s]}}),(0,r.inherits)(j,i.Operator,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}}),(0,r.inherits)(H,i.Transform,{activate(e){this._targets[this._targets.active++]=e},subflow(e,t,n,i){const a=this.value;let o,s,l=(0,r.hasOwnProperty)(a,e)&&a[e];return l?l.value.stampe&&e.count>0));this.initTargets(e)}},initTargets(e){const t=this._targets,n=t.length,r=e?e.length:0;let i=0;for(;ithis.subflow(e,a,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,(e=>{const t=(0,i.tupleid)(e),n=o.get(t);void 0!==n&&(o.delete(t),l(n).rem(e))})),t.visit(t.ADD,(e=>{const t=r(e);o.set((0,i.tupleid)(e),t),l(t).add(e)})),s||t.modified(r.fields)?t.visit(t.MOD,(e=>{const t=(0,i.tupleid)(e),n=o.get(t),a=r(e);n===a?l(a).mod(e):(o.set(t,a),l(n).rem(e),l(a).add(e))})):t.changed(t.MOD)&&t.visit(t.MOD,(e=>{l(o.get((0,i.tupleid)(e))).mod(e)})),s&&t.visit(t.REFLOW,(e=>{const t=(0,i.tupleid)(e),n=o.get(t),a=r(e);n!==a&&(o.set(t,a),l(n).rem(e),l(a).add(e))})),t.clean()?n.runAfter((()=>{this.clean(),o.clean()})):o.empty>n.cleanThreshold&&n.runAfter(o.clean),t}}),(0,r.inherits)(G,i.Operator),W.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},(0,r.inherits)(W,i.Transform,{transform(e,t){const n=t.dataflow,r=this.value,a=t.fork(),o=a.add,s=a.rem,l=a.mod,u=e.expr;let c=!0;function d(t){const n=(0,i.tupleid)(t),a=u(t,e),d=r.get(n);a&&d?(r.delete(n),o.push(t)):a||d?c&&a&&!d&&l.push(t):(r.set(n,1),s.push(t))}return t.visit(t.REM,(e=>{const t=(0,i.tupleid)(e);r.has(t)?r.delete(t):s.push(e)})),t.visit(t.ADD,(t=>{u(t,e)?o.push(t):r.set((0,i.tupleid)(t),1)})),t.visit(t.MOD,d),e.modified()&&(c=!1,t.visit(t.REFLOW,d)),r.empty>n.cleanThreshold&&n.runAfter(r.clean),a}}),Y.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},(0,r.inherits)(Y,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.fields,a=$(r,e.as||[]),o=e.index||null,s=a.length;return n.rem=this.value,t.visit(t.SOURCE,(e=>{const t=r.map((t=>t(e))),l=t.reduce(((e,t)=>Math.max(e,t.length)),0);let u,c,d,f=0;for(;f{for(let t,r=0;rt[r]=n(t,e)))}}),(0,r.inherits)(J,i.Transform,{transform(e,t){const n=t.fork(t.ALL),r=e.generator;let a,o,s,l=this.value,u=e.size-l.length;if(u>0){for(a=[];--u>=0;)a.push(s=(0,i.ingest)(r(e))),l.push(s);n.add=n.add.length?n.materialize(n.ADD).add.concat(a):a}else o=l.slice(0,-u),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(o):o,l=l.slice(-u);return n.source=this.value=l,n}});const Q={value:"value",median:o.median,mean:o.mean,min:o.min,max:o.max},Z=[];function ee(e){i.Transform.call(this,[],e)}function te(e){w.call(this,e)}function ne(e){i.Transform.call(this,null,e)}function re(e){i.Operator.call(this,null,ie,e)}function ie(e){return this.value&&!e.modified()?this.value:(0,r.key)(e.fields,e.flat)}function ae(e){i.Transform.call(this,[],e),this._pending=null}function oe(e,t,n){n.forEach(i.ingest);const r=t.fork(t.NO_FIELDS&t.NO_SOURCE);return r.rem=e.value,e.value=r.source=r.add=n,e._pending=null,r.rem.length&&r.clean(!0),r}function se(e){i.Transform.call(this,{},e)}function le(e){i.Operator.call(this,null,ue,e)}function ue(e){if(this.value&&!e.modified())return this.value;const t=e.extents,n=t.length;let r,i,a=1/0,o=-1/0;for(r=0;ro&&(o=i[1]);return[a,o]}function ce(e){i.Operator.call(this,null,de,e)}function de(e){return this.value&&!e.modified()?this.value:e.values.reduce(((e,t)=>e.concat(t)),[])}function fe(e){i.Transform.call(this,null,e)}function pe(e){w.call(this,e)}function he(e){H.call(this,e)}function ge(e){i.Transform.call(this,null,e)}function me(e){i.Transform.call(this,null,e)}function ye(e){i.Transform.call(this,null,e)}ee.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},(0,r.inherits)(ee,i.Transform,{transform(e,t){var n,a,o,s,l,u,c,d,f,p,h=t.fork(t.ALL),g=function(e){var t,n=e.method||Q.value;if(null!=Q[n])return n===Q.value?(t=void 0!==e.value?e.value:0,()=>t):Q[n];(0,r.error)("Unrecognized imputation method: "+n)}(e),m=function(e){const t=e.field;return e=>e?t(e):NaN}(e),y=(0,r.accessorName)(e.field),v=(0,r.accessorName)(e.key),b=(e.groupby||[]).map(r.accessorName),x=function(e,t,n,r){var i,a,o,s,l,u,c,d,f=e=>e(d),p=[],h=r?r.slice():[],g={},m={};for(h.forEach(((e,t)=>g[e]=t+1)),s=0,c=e.length;sn.add(e)))):(a=n.value=n.value||this.init(e),t.visit(t.REM,(e=>n.rem(e))),t.visit(t.ADD,(e=>n.add(e)))),n.changes(),t.visit(t.SOURCE,(e=>{(0,r.extend)(e,a[n.cellkey(e)].tuple)})),t.reflow(i).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let n,r;for(n=0,r=this._alen;n{const n=(0,a.randomKDE)(t,u)[c],o=e.counts?t.length:1,s=p||(0,r.extent)(t);(0,a.sampleCurve)(n,s,h,g).forEach((e=>{const n={};for(let e=0;e(this._pending=(0,r.array)(e.data),e=>e.touch(this))));return{async:t}}return n.request(e.url,e.format).then((e=>oe(this,t,(0,r.array)(e.data))))}}),se.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},(0,r.inherits)(se,i.Transform,{transform(e,t){const n=e.fields,i=e.index,a=e.values,o=null==e.default?null:e.default,s=e.modified(),l=n.length;let u,c,d,f=s?t.SOURCE:t.ADD,p=t,h=e.as;return a?(c=a.length,l>1&&!h&&(0,r.error)('Multi-field lookup requires explicit "as" parameter.'),h&&h.length!==l*c&&(0,r.error)('The "as" parameter has too few output field names.'),h=h||a.map(r.accessorName),u=function(e){for(var t,r,s=0,u=0;st.modified(e.fields))),f|=d?t.MOD:0),t.visit(f,u),p.modifies(h)}}),(0,r.inherits)(le,i.Operator),(0,r.inherits)(ce,i.Operator),(0,r.inherits)(fe,i.Transform,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}}),pe.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:p,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},(0,r.inherits)(pe,w,{_transform:w.prototype.transform,transform(e,t){return this._transform(function(e,t){const n=e.field,i=e.value,a=("count"===e.op?"__count__":e.op)||"sum",o=(0,r.accessorFields)(n).concat((0,r.accessorFields)(i)),s=function(e,t,n){const i={},a=[];return n.visit(n.SOURCE,(t=>{const n=e(t);i[n]||(i[n]=1,a.push(n))})),a.sort(r.ascending),t?a.slice(0,t):a}(n,e.limit||0,t);t.changed()&&e.set("__pivot__",null,null,!0);return{key:e.key,groupby:e.groupby,ops:s.map((()=>a)),fields:s.map((e=>function(e,t,n,i){return(0,r.accessor)((r=>t(r)===e?n(r):NaN),i,e+"")}(e,n,i,o))),as:s.map((e=>e+"")),modified:e.modified.bind(e)}}(e,t),t)}}),(0,r.inherits)(he,H,{transform(e,t){const n=e.subflow,a=e.field,o=e=>this.subflow((0,i.tupleid)(e),n,t,e);return(e.modified("field")||a&&t.modified((0,r.accessorFields)(a)))&&(0,r.error)("PreFacet does not support field modification."),this.initTargets(),a?(t.visit(t.MOD,(e=>{const t=o(e);a(e).forEach((e=>t.mod(e)))})),t.visit(t.ADD,(e=>{const t=o(e);a(e).forEach((e=>t.add((0,i.ingest)(e))))})),t.visit(t.REM,(e=>{const t=o(e);a(e).forEach((e=>t.rem(e)))}))):(t.visit(t.MOD,(e=>o(e).mod(e))),t.visit(t.ADD,(e=>o(e).add(e))),t.visit(t.REM,(e=>o(e).rem(e)))),t.clean()&&t.runAfter((()=>this.clean())),t}}),ge.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},(0,r.inherits)(ge,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.fields,a=$(e.fields,e.as||[]),o=r?(e,t)=>function(e,t,n,r){for(let i=0,a=n.length;i{const t=(0,i.tupleid)(e);n.rem.push(s[t]),s[t]=null})),t.visit(t.ADD,(e=>{const t=o(e,(0,i.ingest)({}));s[(0,i.tupleid)(e)]=t,n.add.push(t)})),t.visit(t.MOD,(e=>{n.mod.push(o(e,s[(0,i.tupleid)(e)]))})),n}}),(0,r.inherits)(me,i.Transform,{transform(e,t){return this.value=e.value,e.modified("value")?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}}),ye.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]};function ve(e){i.Transform.call(this,null,e)}function be(e){i.Transform.call(this,[],e),this.count=0}function xe(e){i.Transform.call(this,null,e)}function Ee(e){i.Transform.call(this,null,e),this.modified(!0)}function Se(e){i.Transform.call(this,null,e)}(0,r.inherits)(ye,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS),s=e.as||["prob","value"];if(this.value&&!e.modified()&&!t.changed())return n.source=this.value,n;const l=L(t.materialize(t.SOURCE).source,e.groupby,e.field),u=(e.groupby||[]).map(r.accessorName),c=[],d=e.step||.01,f=e.probs||(0,o.range)(d/2,1-1e-14,d),p=f.length;return l.forEach((e=>{const t=(0,a.quantiles)(e,f);for(let n=0;n{const t=(0,i.tupleid)(e);n.rem.push(r[t]),r[t]=null})),t.visit(t.ADD,(e=>{const t=(0,i.derive)(e);r[(0,i.tupleid)(e)]=t,n.add.push(t)})),t.visit(t.MOD,(e=>{const t=r[(0,i.tupleid)(e)];for(const r in e)t[r]=e[r],n.modifies(r);n.mod.push(t)}))),n}}),be.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},(0,r.inherits)(be,i.Transform,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.modified("size"),o=e.size,s=this.value.reduce(((e,t)=>(e[(0,i.tupleid)(t)]=1,e)),{});let l=this.value,u=this.count,c=0;function d(e){let t,r;l.length=c&&(t=l[r],s[(0,i.tupleid)(t)]&&n.rem.push(t),l[r]=e)),++u}if(t.rem.length&&(t.visit(t.REM,(e=>{const t=(0,i.tupleid)(e);s[t]&&(s[t]=-1,n.rem.push(e)),--u})),l=l.filter((e=>-1!==s[(0,i.tupleid)(e)]))),(t.rem.length||r)&&l.length{s[(0,i.tupleid)(e)]||d(e)})),c=-1),r&&l.length>o){const e=l.length-o;for(let t=0;t{s[(0,i.tupleid)(e)]&&n.mod.push(e)})),t.add.length&&t.visit(t.ADD,d),(t.add.length||c<0)&&(n.add=l.filter((e=>!s[(0,i.tupleid)(e)]))),this.count=u,this.value=n.source=l,n}}),xe.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},(0,r.inherits)(xe,i.Transform,{transform(e,t){if(this.value&&!e.modified())return;const n=t.materialize().fork(t.MOD),r=e.as||"data";return n.rem=this.value?t.rem.concat(this.value):t.rem,this.value=(0,o.range)(e.start,e.stop,e.step||1).map((e=>{const t={};return t[r]=e,(0,i.ingest)(t)})),n.add=t.add.concat(this.value),n}}),(0,r.inherits)(Ee,i.Transform,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});const we=["unit0","unit1"];function _e(e){i.Transform.call(this,(0,r.fastmap)(),e)}function Ae(e){i.Transform.call(this,null,e)}Se.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:s.TIME_UNITS,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:we}]},(0,r.inherits)(Se,i.Transform,{transform(e,t){const n=e.field,i=!1!==e.interval,a="utc"===e.timezone,o=this._floor(e,t),l=(a?s.utcInterval:s.timeInterval)(o.unit).offset,u=e.as||we,c=u[0],d=u[1],f=o.step;let p=o.start||1/0,h=o.stop||-1/0,g=t.ADD;return(e.modified()||t.changed(t.REM)||t.modified((0,r.accessorFields)(n)))&&(g=(t=t.reflow(!0)).SOURCE,p=1/0,h=-1/0),t.visit(g,(e=>{const t=n(e);let r,a;null==t?(e[c]=null,i&&(e[d]=null)):(e[c]=r=a=o(t),i&&(e[d]=a=l(r,f)),rh&&(h=a))})),o.start=p,o.stop=h,t.modifies(i?u:c)},_floor(e,t){const n="utc"===e.timezone,{units:i,step:a}=e.units?{units:e.units,step:e.step||1}:(0,s.timeBin)({extent:e.extent||(0,r.extent)(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),o=(0,s.timeUnits)(i),l=this.value||{},u=(n?s.utcFloor:s.timeFloor)(o,a);return u.unit=(0,r.peek)(o),u.units=o,u.step=a,u.start=l.start,u.stop=l.stop,this.value=u}}),(0,r.inherits)(_e,i.Transform,{transform(e,t){const n=t.dataflow,r=e.field,i=this.value,a=e=>i.set(r(e),e);let o=!0;return e.modified("field")||t.modified(r.fields)?(i.clear(),t.visit(t.SOURCE,a)):t.changed()?(t.visit(t.REM,(e=>i.delete(r(e)))),t.visit(t.ADD,a)):o=!1,this.modified(o),i.empty>n.cleanThreshold&&n.runAfter(i.clean),t.fork()}}),(0,r.inherits)(Ae,i.Transform,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort((0,i.stableCompare)(e.sort)):t.source).map(e.field))}});const Ce={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?e=n+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?++e:e}}},percent_rank:function(){const e=Ce.rank(),t=e.next;return{init:e.init,next:e=>(t(e)-1)/(e.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const n=t.data,r=t.compare;let i=t.index;if(e0||(0,r.error)("ntile num must be greater than zero.");const n=Ce.cume_dist(),i=n.next;return{init:n.init,next:e=>Math.ceil(t*i(e))}},lag:function(e,t){return t=+t||1,{next:n=>{const r=n.index-t;return r>=0?e(n.data[r]):null}}},lead:function(e,t){return t=+t||1,{next:n=>{const r=n.index+t,i=n.data;return re(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return(t=+t)>0||(0,r.error)("nth_value nth must be greater than zero."),{next:n=>{const r=n.i0+(t-1);return rt=null,next:n=>{const r=e(n.data[n.index]);return null!=r?t=r:t}}},next_value:function(e){let t,n;return{init:()=>(t=null,n=-1),next:r=>{const i=r.data;return r.index<=n?t:(n=function(e,t,n){for(let r=t.length;nc[e]=1))}m(e.sort),t.forEach(((e,t)=>{const c=n[t],y=i[t],v=a[t]||null,b=(0,r.accessorName)(c),x=u(e,b,o[t]);if(m(c),s.push(x),(0,r.hasOwnProperty)(Ce,e))l.push(function(e,t,n,i){const a=Ce[e](t,n);return{init:a.init||r.zero,update:function(e,t){t[i]=a.next(e)}}}(e,c,y,x));else{if(null==c&&"count"!==e&&(0,r.error)("Null aggregate field specified."),"count"===e)return void f.push(x);g=!1;let t=d[b];t||(t=d[b]=[],t.field=c,p.push(t)),t.push(h(e,v,x))}})),(f.length||p.length)&&(this.cell=function(e,t,n){e=e.map((e=>x(e,e.field)));const r={num:0,agg:null,store:!1,count:t};if(!n)for(var i=e.length,a=r.agg=Array(i),o=0;o0&&!i(a[n],a[n-1])&&(e.i0=t.left(a,a[n])),re.init())),this.cell&&this.cell.init()},Re.update=function(e,t){const n=this.cell,r=this.windows,i=e.data,a=r&&r.length;let o;if(n){for(o=e.p0;othis.group(a(e));let s=this.state;s&&!n||(s=this.state=new ke(e)),n||t.modified(s.inputs)?(this.value={},t.visit(t.SOURCE,(e=>o(e).add(e)))):(t.visit(t.REM,(e=>o(e).remove(e))),t.visit(t.ADD,(e=>o(e).add(e))));for(let t=0,n=this._mlen;t{"use strict";function r(e,t,n){return e.fields=t||[],e.fname=n,e}function i(e){return null==e?null:e.fname}function a(e){return null==e?null:e.fields}function o(e){return 1===e.length?s(e[0]):l(e)}n.r(t),n.d(t,{Debug:()=>w,Error:()=>x,Info:()=>S,None:()=>b,Warn:()=>E,accessor:()=>r,accessorFields:()=>a,accessorName:()=>i,array:()=>K,ascending:()=>te,clampRange:()=>J,compare:()=>ee,constant:()=>ae,debounce:()=>oe,error:()=>u,extend:()=>se,extent:()=>le,extentIndex:()=>ue,falsy:()=>y,fastmap:()=>pe,field:()=>d,flush:()=>he,hasOwnProperty:()=>de,id:()=>f,identity:()=>p,inherits:()=>ge,inrange:()=>me,isArray:()=>A,isBoolean:()=>ye,isDate:()=>ve,isFunction:()=>Q,isIterable:()=>be,isNumber:()=>xe,isObject:()=>C,isRegExp:()=>Ee,isString:()=>Se,key:()=>we,lerp:()=>_e,logger:()=>_,lruCache:()=>Ce,merge:()=>Te,mergeConfig:()=>k,one:()=>g,pad:()=>Re,panLinear:()=>B,panLog:()=>U,panPow:()=>z,panSymlog:()=>q,peek:()=>N,quarter:()=>Y,repeat:()=>ke,span:()=>De,splitAccessPath:()=>c,stringValue:()=>Ne,toBoolean:()=>Oe,toDate:()=>Pe,toNumber:()=>O,toSet:()=>Ie,toString:()=>Me,truncate:()=>$e,truthy:()=>m,utcquarter:()=>X,visitArray:()=>Le,writeConfig:()=>R,zero:()=>h,zoomLinear:()=>H,zoomLog:()=>G,zoomPow:()=>V,zoomSymlog:()=>W});const s=e=>function(t){return t[e]},l=e=>{const t=e.length;return function(n){for(let r=0;rr&&c(),s=r=i+1):"]"===a&&(s||u("Access path missing open bracket: "+e),s>0&&c(),s=0,r=i+1):i>r?c():r=i+1}return s&&u("Access path missing closing bracket: "+e),o&&u("Access path missing closing quote: "+e),i>r&&(i++,c()),t}function d(e,t,n){const i=c(e);return e=1===i.length?i[0]:e,r((n&&n.get||o)(i),[e],t||e)}const f=d("id"),p=r((e=>e),[],"identity"),h=r((()=>0),[],"zero"),g=r((()=>1),[],"one"),m=r((()=>!0),[],"true"),y=r((()=>!1),[],"false");function v(e,t,n){const r=[t].concat([].slice.call(n));console[e].apply(console,r)}const b=0,x=1,E=2,S=3,w=4;function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v,r=e||b;return{level(e){return arguments.length?(r=+e,this):r},error(){return r>=x&&n(t||"error","ERROR",arguments),this},warn(){return r>=E&&n(t||"warn","WARN",arguments),this},info(){return r>=S&&n(t||"log","INFO",arguments),this},debug(){return r>=w&&n(t||"log","DEBUG",arguments),this}}}var A=Array.isArray;function C(e){return e===Object(e)}const T=e=>"__proto__"!==e;function k(){for(var e=arguments.length,t=new Array(e),n=0;n{for(const n in t)if("signals"===n)e.signals=D(e.signals,t.signals);else{const r="legend"===n?{layout:1}:"style"===n||null;R(e,n,t[n],r)}return e}),{})}function R(e,t,n,r){if(!T(t))return;let i,a;if(C(n)&&!A(n))for(i in a=C(e[t])?e[t]:e[t]={},n)r&&(!0===r||r[i])?R(a,i,n[i]):T(i)&&(a[i]=n[i]);else e[t]=n}function D(e,t){if(null==e)return t;const n={},r=[];function i(e){n[e.name]||(n[e.name]=1,r.push(e))}return t.forEach(i),e.forEach(i),r}function N(e){return e[e.length-1]}function O(e){return null==e||""===e?null:+e}const F=e=>t=>e*Math.exp(t),P=e=>t=>Math.log(e*t),M=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),I=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,$=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function L(e,t,n,r){const i=n(e[0]),a=n(N(e)),o=(a-i)*t;return[r(i-o),r(a-o)]}function B(e,t){return L(e,t,O,p)}function U(e,t){var n=Math.sign(e[0]);return L(e,t,P(n),F(n))}function z(e,t,n){return L(e,t,$(n),$(1/n))}function q(e,t,n){return L(e,t,M(n),I(n))}function j(e,t,n,r,i){const a=r(e[0]),o=r(N(e)),s=null!=t?r(t):(a+o)/2;return[i(s+(a-s)*n),i(s+(o-s)*n)]}function H(e,t,n){return j(e,t,n,O,p)}function G(e,t,n){const r=Math.sign(e[0]);return j(e,t,n,P(r),F(r))}function V(e,t,n,r){return j(e,t,n,$(r),$(1/r))}function W(e,t,n,r){return j(e,t,n,M(r),I(r))}function Y(e){return 1+~~(new Date(e).getMonth()/3)}function X(e){return 1+~~(new Date(e).getUTCMonth()/3)}function K(e){return null!=e?A(e)?e:[e]:[]}function J(e,t,n){let r,i=e[0],a=e[1];return a=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-r),i+r]}function Q(e){return"function"==typeof e}const Z="descending";function ee(e,t,n){n=n||{},t=K(t)||[];const i=[],o=[],s={},l=n.comparator||ne;return K(e).forEach(((e,r)=>{null!=e&&(i.push(t[r]===Z?-1:1),o.push(e=Q(e)?e:d(e,null,n)),(a(e)||[]).forEach((e=>s[e]=1)))})),0===o.length?null:r(l(o,i),Object.keys(s))}const te=(e,t)=>(et||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t==t?-1:t!=t&&e==e?1:0),ne=(e,t)=>1===e.length?re(e[0],t[0]):ie(e,t,e.length),re=(e,t)=>function(n,r){return te(e(n),e(r))*t},ie=(e,t,n)=>(t.push(0),function(r,i){let a,o=0,s=-1;for(;0===o&&++se}function oe(e,t){let n;return r=>{n&&clearTimeout(n),n=setTimeout((()=>(t(r),n=null)),e)}}function se(e){for(let t,n,r=1,i=arguments.length;ra&&(a=r))}else{for(r=t(e[o]);oa&&(a=r))}return[i,a]}function ue(e,t){const n=e.length;let r,i,a,o,s,l=-1;if(null==t){for(;++l=i){r=a=i;break}if(l===n)return[-1,-1];for(o=s=l;++li&&(r=i,o=l),a=i){r=a=i;break}if(l===n)return[-1,-1];for(o=s=l;++li&&(r=i,o=l),ar(e)?n[e]:void 0,set(e,t){return r(e)||(++i.size,n[e]===fe&&--i.empty),n[e]=t,this},delete(e){return r(e)&&(--i.size,++i.empty,n[e]=fe),this},clear(){i.size=i.empty=0,i.object=n={}},test(e){return arguments.length?(t=e,i):t},clean(){const e={};let r=0;for(const i in n){const a=n[i];a===fe||t&&t(a)||(e[i]=a,++r)}i.size=r,i.empty=0,i.object=n=e}};return e&&Object.keys(e).forEach((t=>{i.set(t,e[t])})),i}function he(e,t,n,r,i,a){if(!n&&0!==n)return a;const o=+n;let s,l=e[0],u=N(e);uo&&(i=a,a=o,o=i),r=void 0===r||r,((n=void 0===n||n)?a<=e:ae.replace(/\\(.)/g,"$1"))):K(e));const i=e&&e.length,a=n&&n.get||o,s=e=>a(t?[e]:c(e));let l;if(i)if(1===i){const t=s(e[0]);l=function(e){return""+t(e)}}else{const t=e.map(s);l=function(e){let n=""+t[0](e),r=0;for(;++r{t={},n={},r=0},a=(i,a)=>(++r>e&&(n=t,t={},r=1),t[i]=a);return i(),{clear:i,has:e=>de(t,e)||de(n,e),get:e=>de(t,e)?t[e]:de(n,e)?a(e,n[e]):void 0,set:(e,n)=>de(t,e)?t[e]=n:a(e,n)}}function Te(e,t,n,r){const i=t.length,a=n.length;if(!a)return t;if(!i)return n;const o=r||new t.constructor(i+a);let s=0,l=0,u=0;for(;s0?n[l++]:t[s++];for(;s=0;)n+=e;return n}function Re(e,t,n,r){const i=n||" ",a=e+"",o=t-a.length;return o<=0?a:"left"===r?ke(i,o)+a:"center"===r?ke(i,~~(o/2))+a+ke(i,Math.ceil(o/2)):a+ke(i,o)}function De(e){return e&&N(e)-e[0]||0}function Ne(e){return A(e)?"["+e.map(Ne)+"]":C(e)||Se(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function Oe(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e)&&!!e}const Fe=e=>xe(e)||ve(e)?e:Date.parse(e);function Pe(e,t){return t=t||Fe,null==e||""===e?null:t(e)}function Me(e){return null==e||""===e?null:e+""}function Ie(e){const t={},n=e.length;for(let r=0;r{"use strict";n.r(t),n.d(t,{bound:()=>M,identifier:()=>L,mark:()=>B,overlap:()=>U,render:()=>W,viewlayout:()=>ge});var r=n(24988),i=n(84636),a=n(26372);const o="top",s="left",l="right",u="bottom",c="start",d="middle",f="end",p="group",h="axis",g="title",m="frame",y="scope",v="legend",b="row-header",x="row-footer",E="row-title",S="column-header",w="column-footer",_="column-title",A="padding",C="fit",T="fit-x",k="fit-y",R="none",D="all",N="each",O="flush",F="column",P="row";function M(e){r.Transform.call(this,null,e)}function I(e,t,n){return t(e.bounds.clear(),e,n)}(0,a.inherits)(M,r.Transform,{transform(e,t){const n=t.dataflow,r=e.mark,a=r.marktype,o=i.Marks[a],s=o.bound;let l,u=r.bounds;if(o.nested)r.items.length&&n.dirty(r.items[0]),u=I(r,s),r.items.forEach((e=>{e.bounds.clear().union(u)}));else if(a===p||e.modified())switch(t.visit(t.MOD,(e=>n.dirty(e))),u.clear(),r.items.forEach((e=>u.union(I(e,s)))),r.role){case h:case v:case g:t.reflow()}else l=t.changed(t.REM),t.visit(t.ADD,(e=>{u.union(I(e,s))})),t.visit(t.MOD,(e=>{l=l||u.alignsWith(e.bounds),n.dirty(e),u.union(I(e,s))})),l&&(u.clear(),r.items.forEach((e=>u.union(e.bounds))));return(0,i.boundClip)(r),t.modifies("bounds")}});const $=":vega_identifier:";function L(e){r.Transform.call(this,0,e)}function B(e){r.Transform.call(this,null,e)}function U(e){r.Transform.call(this,null,e)}L.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},(0,a.inherits)(L,r.Transform,{transform(e,t){const n=(i=t.dataflow)._signals[$]||(i._signals[$]=i.add(0)),r=e.as;var i;let a=n.value;return t.visit(t.ADD,(e=>e[r]=e[r]||++a)),n.set(this.value=a),t}}),(0,a.inherits)(B,r.Transform,{transform(e,t){let n=this.value;n||(n=t.dataflow.scenegraph().mark(e.markdef,function(e){const t=e.groups,n=e.parent;return t&&1===t.size?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}(e),e.index),n.group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);const r=n.marktype===p?i.GroupItem:i.Item;return t.visit(t.ADD,(e=>r.call(e,n))),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t}});const z={parity:e=>e.filter(((e,t)=>t%2?e.opacity=0:1)),greedy:(e,t)=>{let n;return e.filter(((e,r)=>r&&q(n.bounds,e.bounds,t)?e.opacity=0:(n=e,1)))}},q=(e,t,n)=>n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),j=(e,t)=>{for(var n,r=1,i=e.length,a=e[0].bounds;r{const t=e.bounds;return t.width()>1&&t.height()>1},G=e=>(e.forEach((e=>e.opacity=1)),e),V=(e,t)=>e.reflow(t.modified()).modifies("opacity");function W(e){r.Transform.call(this,null,e)}(0,a.inherits)(U,r.Transform,{transform(e,t){const n=z[e.method]||z.parity,r=e.separation||0;let s,l,c=t.materialize(t.SOURCE).source;if(!c||!c.length)return;if(!e.method)return e.modified("method")&&(G(c),t=V(t,e)),t;if(c=c.filter(H),!c.length)return;if(e.sort&&(c=c.slice().sort(e.sort)),s=G(c),t=V(t,e),s.length>=3&&j(s,r)){do{s=n(s,r)}while(s.length>=3&&j(s,r));s.length<3&&!(0,a.peek)(c).opacity&&(s.length>1&&((0,a.peek)(s).opacity=0),(0,a.peek)(c).opacity=1)}var d,f,p,h,g;e.boundScale&&e.boundTolerance>=0&&(d=e.boundScale,f=e.boundOrient,p=+e.boundTolerance,h=d.range(),g=new i.Bounds,f===o||f===u?g.set(h[0],-1/0,h[1],1/0):g.set(-1/0,h[0],1/0,h[1]),g.expand(p||1),l=e=>g.encloses(e.bounds),c.forEach((e=>{l(e)||(e.opacity=0)})));const m=s[0].mark.bounds.clear();return c.forEach((e=>{e.opacity&&m.union(e.bounds)})),t}}),(0,a.inherits)(W,r.Transform,{transform(e,t){const n=t.dataflow;if(t.visit(t.ALL,(e=>n.dirty(e))),t.fields&&t.fields.zindex){const e=t.source&&t.source[0];e&&(e.mark.zdirty=!0)}}});const Y=new i.Bounds;function X(e,t,n){return e[t]===n?0:(e[t]=n,1)}function K(e){var t=e.items[0].orient;return t===s||t===l}function J(e,t,n,r){var a,c,d=t.items[0],f=d.datum,p=null!=d.translate?d.translate:.5,h=d.orient,g=function(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}(f),m=d.range,y=d.offset,v=d.position,b=d.minExtent,x=d.maxExtent,E=f.title&&d.items[g[2]].items[0],S=d.titlePadding,w=d.bounds,_=E&&(0,i.multiLineOffset)(E),A=0,C=0;switch(Y.clear().union(w),w.clear(),(a=g[0])>-1&&w.union(d.items[a].bounds),(a=g[1])>-1&&w.union(d.items[a].bounds),h){case o:A=v||0,C=-y,c=Math.max(b,Math.min(x,-w.y1)),w.add(0,-c).add(m,0),E&&Q(e,E,c,S,_,0,-1,w);break;case s:A=-y,C=v||0,c=Math.max(b,Math.min(x,-w.x1)),w.add(-c,0).add(0,m),E&&Q(e,E,c,S,_,1,-1,w);break;case l:A=n+y,C=v||0,c=Math.max(b,Math.min(x,w.x2)),w.add(0,0).add(c,m),E&&Q(e,E,c,S,_,1,1,w);break;case u:A=v||0,C=r+y,c=Math.max(b,Math.min(x,w.y2)),w.add(0,0).add(m,c),E&&Q(e,E,c,S,0,0,1,w);break;default:A=d.x,C=d.y}return(0,i.boundStroke)(w.translate(A,C),d),X(d,"x",A+p)|X(d,"y",C+p)&&(d.bounds=Y,e.dirty(d),d.bounds=w,e.dirty(d)),d.mark.bounds.clear().union(w)}function Q(e,t,n,r,i,a,o,s){const l=t.bounds;if(t.auto){const s=o*(n+i+r);let u=0,c=0;e.dirty(t),a?u=(t.x||0)-(t.x=s):c=(t.y||0)-(t.y=s),t.mark.bounds.clear().union(l.translate(-u,-c)),e.dirty(t)}s.union(l)}const Z=(e,t)=>Math.floor(Math.min(e,t)),ee=(e,t)=>Math.ceil(Math.max(e,t));function te(e){return(new i.Bounds).set(0,0,e.width||0,e.height||0)}function ne(e){const t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function re(e,t,n){const r=(0,a.isObject)(e)?e[t]:e;return null!=r?r:void 0!==n?n:0}function ie(e){return e<0?Math.ceil(-e):0}function ae(e,t,n){var r,i,a,o,s,l,u,c,p,h,g,m=!n.nodirty,y=n.bounds===O?te:ne,v=Y.set(0,0,0,0),b=re(n.align,F),x=re(n.align,P),E=re(n.padding,F),S=re(n.padding,P),w=n.columns||t.length,_=w<=0?1:Math.ceil(t.length/w),A=t.length,C=Array(A),T=Array(w),k=0,R=Array(A),M=Array(_),I=0,$=Array(A),L=Array(A),B=Array(A);for(i=0;i1)for(i=0;i0&&($[i]+=p/2);if(x&&re(n.center,P)&&1!==w)for(i=0;i0&&(L[i]+=h/2);for(i=0;ii&&(e.warn("Grid headers exceed limit: "+i),t=t.slice(0,i)),_+=a,g=0,y=t.length;g=0&&null==(x=n[m]);m-=f);s?(E=null==p?x.x:Math.round(x.bounds.x1+p*x.bounds.width()),S=_):(E=_,S=null==p?x.y:Math.round(x.bounds.y1+p*x.bounds.height())),v.union(b.bounds.translate(E-(b.x||0),S-(b.y||0))),b.x=E,b.y=S,e.dirty(b),A=o(A,v[u])}return A}function ce(e,t,n,r,i,a){if(t){e.dirty(t);var o=n,s=n;r?o=Math.round(i.x1+a*i.width()):s=Math.round(i.y1+a*i.height()),t.bounds.translate(o-(t.x||0),s-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=o,t.y=s,e.dirty(t)}}function de(e,t,n,r,i,a,p){const h=function(e,t){const n=e[t]||{};return(t,r)=>null!=n[t]?n[t]:null!=e[t]?e[t]:r}(n,t),g=function(e,t){let n=-1/0;return e.forEach((e=>{null!=e.offset&&(n=Math.max(n,e.offset))})),n>-1/0?n:t}(e,h("offset",0)),m=h("anchor",c),y=m===f?1:m===d?.5:0,v={align:N,bounds:h("bounds",O),columns:"vertical"===h("direction")?1:e.length,padding:h("margin",8),center:h("center"),nodirty:!0};switch(t){case s:v.anchor={x:Math.floor(r.x1)-g,column:f,y:y*(p||r.height()+2*r.y1),row:m};break;case l:v.anchor={x:Math.ceil(r.x2)+g,y:y*(p||r.height()+2*r.y1),row:m};break;case o:v.anchor={y:Math.floor(i.y1)-g,row:f,x:y*(a||i.width()+2*i.x1),column:m};break;case u:v.anchor={y:Math.ceil(i.y2)+g,x:y*(a||i.width()+2*i.x1),column:m};break;case"top-left":v.anchor={x:g,y:g};break;case"top-right":v.anchor={x:a-g,y:g,column:f};break;case"bottom-left":v.anchor={x:g,y:p-g,row:f};break;case"bottom-right":v.anchor={x:a-g,y:p-g,column:f,row:f}}return v}function fe(e,t){var n,r,a=t.items[0],o=a.datum,c=a.orient,d=a.bounds,p=a.x,h=a.y;return a._bounds?a._bounds.clear().union(d):a._bounds=d.clone(),d.clear(),function(e,t,n){var r=t.padding,i=r-n.x,a=r-n.y;if(t.datum.title){var o=t.items[1].items[0],c=o.anchor,d=t.titlePadding||0,p=r-o.x,h=r-o.y;switch(o.orient){case s:i+=Math.ceil(o.bounds.width())+d;break;case l:case u:break;default:a+=o.bounds.height()+d}switch((i||a)&&he(e,n,i,a),o.orient){case s:h+=pe(t,n,o,c,1,1);break;case l:p+=pe(t,n,o,f,0,0)+d,h+=pe(t,n,o,c,1,1);break;case u:p+=pe(t,n,o,c,0,0),h+=pe(t,n,o,f,-1,0,1)+d;break;default:p+=pe(t,n,o,c,0,0)}(p||h)&&he(e,o,p,h),(p=Math.round(o.bounds.x1-r))<0&&(he(e,n,-p,0),he(e,o,-p,0))}else(i||a)&&he(e,n,i,a)}(e,a,a.items[0].items[0]),d=function(e,t){return e.items.forEach((e=>t.union(e.bounds))),t.x1=e.padding,t.y1=e.padding,t}(a,d),n=2*a.padding,r=2*a.padding,d.empty()||(n=Math.ceil(d.width()+n),r=Math.ceil(d.height()+r)),"symbol"===o.type&&function(e){const t=e.reduce(((e,t)=>(e[t.column]=Math.max(t.bounds.x2-t.x,e[t.column]||0),e)),{});e.forEach((e=>{e.width=t[e.column],e.height=e.bounds.y2-e.y}))}(a.items[0].items[0].items[0].items),c!==R&&(a.x=p=0,a.y=h=0),a.width=n,a.height=r,(0,i.boundStroke)(d.set(p,h,p+n,h+r),a),a.mark.bounds.clear().union(d),a}function pe(e,t,n,r,a,o,s){const l="symbol"!==e.datum.type,u=n.datum.vgrad,d=(!l||!o&&u||s?t:t.items[0]).bounds[a?"y2":"x2"]-e.padding,p=u&&o?d:0,h=u&&o?0:d,g=a<=0?0:(0,i.multiLineOffset)(n);return Math.round(r===c?p:r===f?h-g:.5*(d-g))}function he(e,t,n,r){t.x+=n,t.y+=r,t.bounds.translate(n,r),t.mark.bounds.translate(n,r),e.dirty(t)}function ge(e){r.Transform.call(this,null,e)}(0,a.inherits)(ge,r.Transform,{transform(e,t){const n=t.dataflow;return e.mark.items.forEach((t=>{e.layout&&oe(n,t,e.layout),function(e,t,n){var r,a,d,D,N,O=t.items,F=Math.max(0,t.width||0),P=Math.max(0,t.height||0),M=(new i.Bounds).set(0,0,F,P),I=M.clone(),$=M.clone(),L=[];for(D=0,N=O.length;D{(d=e.orient||l)!==R&&(t[d]||(t[d]=[])).push(e)}));for(const r in t){const i=t[r];ae(e,i,de(i,r,n.legends,I,$,F,P))}L.forEach((t=>{const r=t.bounds;if(r.equals(t._bounds)||(t.bounds=t._bounds,e.dirty(t),t.bounds=r,e.dirty(t)),!n.autosize||n.autosize.type!==C&&n.autosize.type!==T&&n.autosize.type!==k)M.union(r);else switch(t.orient){case s:case l:M.add(r.x1,0).add(r.x2,0);break;case o:case u:M.add(0,r.y1).add(0,r.y2)}}))}M.union(I).union($),r&&M.union(function(e,t,n,r,i){var a,d=t.items[0],h=d.frame,g=d.orient,m=d.anchor,y=d.offset,v=d.padding,b=d.items[0].items[0],x=d.items[1]&&d.items[1].items[0],E=g===s||g===l?r:n,S=0,w=0,_=0,A=0,C=0;if(h!==p?g===s?(S=i.y2,E=i.y1):g===l?(S=i.y1,E=i.y2):(S=i.x1,E=i.x2):g===s&&(S=r,E=0),a=m===c?S:m===f?E:(S+E)/2,x&&x.text){switch(g){case o:case u:C=b.bounds.height()+v;break;case s:A=b.bounds.width()+v;break;case l:A=-b.bounds.width()-v}Y.clear().union(x.bounds),Y.translate(A-(x.x||0),C-(x.y||0)),X(x,"x",A)|X(x,"y",C)&&(e.dirty(x),x.bounds.clear().union(Y),x.mark.bounds.clear().union(Y),e.dirty(x)),Y.clear().union(x.bounds)}else Y.clear();switch(Y.union(b.bounds),g){case o:w=a,_=i.y1-Y.height()-y;break;case s:w=i.x1-Y.width()-y,_=a;break;case l:w=i.x2+Y.width()+y,_=a;break;case u:w=a,_=i.y2+y;break;default:w=d.x,_=d.y}return X(d,"x",w)|X(d,"y",_)&&(Y.translate(w,_),e.dirty(d),d.bounds.clear().union(Y),t.bounds.clear().union(Y),e.dirty(d)),d.bounds}(e,r,F,P,M));t.clip&&M.set(0,0,t.width||0,t.height||0);!function(e,t,n,r){const i=r.autosize||{},a=i.type;if(e._autosize<1||!a)return;let o=e._width,s=e._height,l=Math.max(0,t.width||0),u=Math.max(0,Math.ceil(-n.x1)),c=Math.max(0,t.height||0),d=Math.max(0,Math.ceil(-n.y1));const f=Math.max(0,Math.ceil(n.x2-l)),p=Math.max(0,Math.ceil(n.y2-c));if(i.contains===A){const t=e.padding();o-=t.left+t.right,s-=t.top+t.bottom}a===R?(u=0,d=0,l=o,c=s):a===C?(l=Math.max(0,o-u-f),c=Math.max(0,s-d-p)):a===T?(l=Math.max(0,o-u-f),s=c+d+p):a===k?(o=l+u+f,c=Math.max(0,s-d-p)):"pad"===a&&(o=l+u+f,s=c+d+p);e._resizeView(o,s,l,c,[u,d],i.resize)}(e,t,M,n)}(n,t,e)})),(r=e.mark.group)&&"legend-entry"!==r.mark.role?t.reflow():t;var r}})},84752:(e,t,n)=>{"use strict";n.r(t),n.d(t,{View:()=>Z});var r=n(26372),i=n(24988),a=n(84636),o=n(61388),s=n(31926),l=n(96056),u=n(52456),c=n(40300);function d(e,t){e&&(null==t?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}const f="default";function p(e,t){const n=e.globalCursor()?"undefined"!=typeof document&&document.body:e.container();if(n)return null==t?n.style.removeProperty("cursor"):n.style.cursor=t}function h(e,t){var n=e._runtime.data;return(0,r.hasOwnProperty)(n,t)||(0,r.error)("Unrecognized data set: "+t),n[t]}function g(e,t){(0,i.isChangeSet)(t)||(0,r.error)("Second argument to changes must be a changeset.");const n=h(this,e);return n.modified=!0,this.pulse(n.input,t)}function m(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function y(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function v(e){var t=e.padding(),n=e._origin;return[t.left+n[0],t.top+n[1]]}function b(e,t,n){var i,o,s,l=e._renderer,u=l&&l.canvas();return u&&(s=v(e),o=t.changedTouches?t.changedTouches[0]:t,(i=(0,a.point)(o,u))[0]-=s[0],i[1]-=s[1]),t.dataflow=e,t.item=n,t.vega=function(e,t,n){const i=t?"group"===t.mark.marktype?t:t.mark.group:null;function a(e){var n,r=i;if(e)for(n=t;n;n=n.mark.group)if(n.mark.name===e){r=n;break}return r&&r.mark&&r.mark.interactive?r:{}}function o(e){if(!e)return n;(0,r.isString)(e)&&(e=a(e));const t=n.slice();for(;e;)t[0]-=e.x||0,t[1]-=e.y||0,e=e.mark&&e.mark.group;return t}return{view:(0,r.constant)(e),item:(0,r.constant)(t||{}),group:a,xy:o,x:e=>o(e)[0],y:e=>o(e)[1]}}(e,n,i),t}const x="view",E={trap:!1};function S(e,t,n,i){e._eventListeners.push({type:n,sources:(0,r.array)(t),handler:i})}function w(e,t,n){const i=e._eventConfig&&e._eventConfig[t];return!(!1===i||(0,r.isObject)(i)&&!i[n])||(e.warn(`Blocked ${t} ${n} event listener.`),!1)}function _(e){return e.item}function A(e){return e.item.mark.source}function C(e){return function(t,n){return n.vega.view().changeset().encode(n.item,e)}}function T(e,t,n){const r=document.createElement(e);for(const e in t)r.setAttribute(e,t[e]);return null!=n&&(r.textContent=n),r}function k(e,t,n,r){const i=n.event||"input",a=()=>e.update(t.value);r.signal(n.signal,t.value),t.addEventListener(i,a),S(r,t,i,a),e.set=e=>{t.value=e,t.dispatchEvent(function(e){return"undefined"!=typeof Event?new Event(e):{type:e}}(i))}}function R(e,t,n,r){const i=r.signal(n.signal),a=T("div",{class:"vega-bind"}),o="radio"===n.input?a:a.appendChild(T("label"));o.appendChild(T("span",{class:"vega-bind-name"},n.name||n.signal)),t.appendChild(a);let s=D;switch(n.input){case"checkbox":s=N;break;case"select":s=O;break;case"radio":s=F;break;case"range":s=P}s(e,o,n,i)}function D(e,t,n,r){const i=T("input");for(const e in n)"signal"!==e&&"element"!==e&&i.setAttribute("input"===e?"type":e,n[e]);i.setAttribute("name",n.signal),i.value=r,t.appendChild(i),i.addEventListener("input",(()=>e.update(i.value))),e.elements=[i],e.set=e=>i.value=e}function N(e,t,n,r){const i={type:"checkbox",name:n.signal};r&&(i.checked=!0);const a=T("input",i);t.appendChild(a),a.addEventListener("change",(()=>e.update(a.checked))),e.elements=[a],e.set=e=>a.checked=!!e||null}function O(e,t,n,r){const i=T("select",{name:n.signal}),a=n.labels||[];n.options.forEach(((e,t)=>{const n={value:e};M(e,r)&&(n.selected=!0),i.appendChild(T("option",n,(a[t]||e)+""))})),t.appendChild(i),i.addEventListener("change",(()=>{e.update(n.options[i.selectedIndex])})),e.elements=[i],e.set=e=>{for(let t=0,r=n.options.length;t{const s={type:"radio",name:n.signal,value:t};M(t,r)&&(s.checked=!0);const l=T("input",s);l.addEventListener("change",(()=>e.update(t)));const u=T("label",{},(a[o]||t)+"");return u.prepend(l),i.appendChild(u),l})),e.set=t=>{const n=e.elements,r=n.length;for(let e=0;e{u.textContent=l.value,e.update(+l.value)};l.addEventListener("input",c),l.addEventListener("change",c),e.elements=[l],e.set=e=>{l.value=e,u.textContent=e}}function M(e,t){return e===t||e+""==t+""}function I(e,t,n,r,i,a){return(t=t||new r(e.loader())).initialize(n,m(e),y(e),v(e),i,a).background(e.background())}function $(e,t){return t?function(){try{t.apply(this,arguments)}catch(t){e.error(t)}}:null}function L(e,t,n){if("string"==typeof t){if("undefined"==typeof document)return e.error("DOM document instance not found."),null;if(!(t=document.querySelector(t)))return e.error("Signal bind element not found: "+t),null}if(t&&n)try{t.textContent=""}catch(n){t=null,e.error(n)}return t}const B=e=>+e||0;function U(e){return(0,r.isObject)(e)?{top:B(e.top),bottom:B(e.bottom),left:B(e.left),right:B(e.right)}:(e=>({top:e,bottom:e,left:e,right:e}))(B(e))}async function z(e,t,n,i){const o=(0,a.renderModule)(t),s=o&&o.headless;return s||(0,r.error)("Unrecognized renderer type: "+t),await e.runAsync(),I(e,null,null,s,n,i).renderAsync(e._scenegraph.root)}var q="width",j="height",H="padding",G={skip:!0};function V(e,t){var n=e.autosize(),r=e.padding();return t-(n&&n.contains===H?r.left+r.right:0)}function W(e,t){var n=e.autosize(),r=e.padding();return t-(n&&n.contains===H?r.top+r.bottom:0)}function Y(e,t){return t.modified&&(0,r.isArray)(t.input.value)&&!e.startsWith("_:vega:_")}function X(e,t){return!("parent"===e||t instanceof i.transforms.proxy)}function K(e,t,n,i){const a=e.element();a&&a.setAttribute("title",function(e){return null==e?"":(0,r.isArray)(e)?J(e):(0,r.isObject)(e)&&!(0,r.isDate)(e)?(t=e,Object.keys(t).map((e=>{const n=t[e];return e+": "+((0,r.isArray)(n)?J(n):Q(n))})).join("\n")):e+"";var t}(i))}function J(e){return"["+e.map(Q).join(", ")+"]"}function Q(e){return(0,r.isArray)(e)?"[\u2026]":(0,r.isObject)(e)&&!(0,r.isDate)(e)?"{\u2026}":e}function Z(e,t){const n=this;if(t=t||{},i.Dataflow.call(n),t.loader&&n.loader(t.loader),t.logger&&n.logger(t.logger),null!=t.logLevel&&n.logLevel(t.logLevel),t.locale||e.locale){const i=(0,r.extend)({},e.locale,t.locale);n.locale((0,c.locale)(i.number,i.time))}n._el=null,n._elBind=null,n._renderType=t.renderer||a.RenderType.Canvas,n._scenegraph=new a.Scenegraph;const o=n._scenegraph.root;n._renderer=null,n._tooltip=t.tooltip||K,n._redraw=!0,n._handler=(new a.CanvasHandler).scene(o),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=function(e){const t=(0,r.extend)({defaults:{}},e),n=(e,t)=>{t.forEach((t=>{(0,r.isArray)(e[t])&&(e[t]=(0,r.toSet)(e[t]))}))};return n(t.defaults,["prevent","allow"]),n(t,["view","window","selector"]),t}(e.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const u=function(e,t,n){return(0,l.context)(e,i.transforms,s.functionContext,n).parse(t)}(n,e,t.expr);n._runtime=u,n._signals=u.signals,n._bind=(e.bindings||[]).map((e=>({state:null,param:(0,r.extend)({},e)}))),u.root&&u.root.set(o),o.source=u.data.root.input,n.pulse(u.data.root.input,n.changeset().insert(o.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=V(n,n._width),n._viewHeight=W(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,function(e){var t=e._signals,n=t[q],r=t[j],i=t[H];function a(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,(t=>{e._width=t.size,e._viewWidth=V(e,t.size),a()}),{size:n}),e._resizeHeight=e.add(null,(t=>{e._height=t.size,e._viewHeight=W(e,t.size),a()}),{size:r});const o=e.add(null,a,{pad:i});e._resizeWidth.rank=n.rank+1,e._resizeHeight.rank=r.rank+1,o.rank=i.rank+1}(n),function(e){e.add(null,(t=>(e._background=t.bg,e._resize=1,t.bg)),{bg:e._signals.background})}(n),function(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:f,item:null}));e.on(e.events("view","pointermove"),t,((e,n)=>{const i=t.value,a=i?(0,r.isString)(i)?i:i.user:f,o=n.item&&n.item.cursor||null;return i&&a===i.user&&o==i.item?i:{user:a,item:o}})),e.add(null,(function(t){let n=t.cursor,i=this.value;return(0,r.isString)(n)||(i=n.item,n=n.user),p(e,n&&n!==f?n:i||n),i}),{cursor:t})}(n),n.description(e.description),t.hover&&n.hover(),t.container&&n.initialize(t.container,t.bind),t.watchPixelRatio&&n._watchPixelRatio()}function ee(e,t){return(0,r.hasOwnProperty)(e._signals,t)?e._signals[t]:(0,r.error)("Unrecognized signal name: "+(0,r.stringValue)(t))}function te(e,t){const n=(e._targets||[]).filter((e=>e._update&&e._update.handler===t));return n.length?n[0]:null}function ne(e,t,n,r){let i=te(n,r);return i||(i=$(e,(()=>r(t,n.value))),i.handler=r,e.on(n,null,i)),e}function re(e,t,n){const r=te(t,n);return r&&t._targets.remove(r),e}(0,r.inherits)(Z,i.Dataflow,{async evaluate(e,t,n){if(await i.Dataflow.prototype.evaluate.call(this,e,t),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,a=v(r=this),o=m(r),s=y(r),r._renderer.background(r.background()),r._renderer.resize(o,s,a),r._handler.origin(a),r._resizeListeners.forEach((e=>{try{e(o,s)}catch(e){r.error(e)}}))),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(e){this.error(e)}var r,a,o,s;return n&&(0,i.asyncCallback)(this,n),this},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=null!=e?e+"":null;return t!==this._desc&&d(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,n){const r=ee(this,e);return 1===arguments.length?r.value:this.update(r,t,n)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",U(e)):U(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?((0,a.renderModule)(e)||(0,r.error)("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(i.Dataflow.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(ee(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function(e,t,n,r,i,a){this.runAfter((o=>{let s=0;o._autosize=0,o.width()!==n&&(s=1,o.signal(q,n,G),o._resizeWidth.skip(!0)),o.height()!==r&&(s=1,o.signal(j,r,G),o._resizeHeight.skip(!0)),o._viewWidth!==e&&(o._resize=1,o._viewWidth=e),o._viewHeight!==t&&(o._resize=1,o._viewHeight=t),o._origin[0]===i[0]&&o._origin[1]===i[1]||(o._resize=1,o._origin=i),s&&o.run("enter"),a&&o.runAfter((e=>e.resize()))}),!1,1)},addEventListener(e,t,n){let r=t;return n&&!1===n.trap||(r=$(this,t),r.raw=t),this._handler.on(e,r),this},removeEventListener(e,t){for(var n,r,i=this._handler.handlers(e),a=i.length;--a>=0;)if(r=i[a].type,n=i[a].handler,e===r&&(t===n||t===n.raw)){this._handler.off(r,n);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.includes(e)||t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},addSignalListener(e,t){return ne(this,e,ee(this,e),t)},removeSignalListener(e,t){return re(this,ee(this,e),t)},addDataListener(e,t){return ne(this,e,h(this,e).values,t)},removeDataListener(e,t){return re(this,h(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=p(this,null);this._globalCursor=!!e,t&&p(this,t)}return this}return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:function(e,t){this._timers.push((0,u.interval)((function(t){e({timestamp:Date.now(),elapsed:t})}),t))},events:function(e,t,n){var r,a=this,o=new i.EventStream(n),s=function(n,r){a.runAsync(null,(()=>{e===x&&function(e,t){var n=e._eventConfig.defaults,r=n.prevent,i=n.allow;return!1!==r&&!0!==i&&(!0===r||!1===i||(r?r[t]:i?!i[t]:e.preventDefault()))}(a,t)&&n.preventDefault(),o.receive(b(a,n,r))}))};if("timer"===e)w(a,"timer",t)&&a.timer(s,t);else if(e===x)w(a,"view",t)&&a.addEventListener(t,s,E);else if("window"===e?w(a,"window",t)&&"undefined"!=typeof window&&(r=[window]):"undefined"!=typeof document&&w(a,"selector",t)&&(r=Array.from(document.querySelectorAll(e))),r){for(var l=0,u=r.length;l=0;)o[e].stop();for(e=l.length;--e>=0;)for(t=(n=l[e]).sources.length;--t>=0;)n.sources[t].removeEventListener(n.type,n.handler);for(a&&a.call(this,this._handler,null,null,null),e=s.length;--e>=0;)i=s[e].type,r=s[e].handler,this._handler.off(i,r);return this},hover:function(e,t){return t=[t||"update",(e=[e||"hover"])[0]],this.on(this.events("view","pointerover",_),A,C(e)),this.on(this.events("view","pointerout",_),A,C(t)),this},data:function(e,t){return arguments.length<2?h(this,e).values.value:g.call(this,e,(0,i.changeset)().remove(r.truthy).insert(t))},change:g,insert:function(e,t){return g.call(this,e,(0,i.changeset)().insert(t))},remove:function(e,t){return g.call(this,e,(0,i.changeset)().remove(t))},scale:function(e){var t=this._runtime.scales;return(0,r.hasOwnProperty)(t,e)||(0,r.error)("Unrecognized scale or projection: "+e),t[e].value},initialize:function(e,t){const n=this,i=n._renderType,o=n._eventConfig.bind,s=(0,a.renderModule)(i);e=n._el=e?L(n,e,!0):null,function(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),d(t,e.description()))}(n),s||n.error("Unrecognized renderer type: "+i);const l=s.handler||a.CanvasHandler,u=e?s.renderer:s.headless;return n._renderer=u?I(n,n._renderer,e,u):null,n._handler=function(e,t,n,r){const i=new r(e.loader(),$(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,v(e),e);return t&&t.handlers().forEach((e=>{i.on(e.type,e.handler)})),i}(n,n._handler,e,l),n._redraw=!0,e&&"none"!==o&&(t=t?n._elBind=L(n,t,!0):e.appendChild(T("form",{class:"vega-bindings"})),n._bind.forEach((e=>{e.param.element&&"container"!==o&&(e.element=L(n,e.param.element,!!e.param.input))})),n._bind.forEach((e=>{!function(e,t,n){if(!t)return;const i=n.param;let a=n.state;a||(a=n.state={elements:null,active:!1,set:null,update:t=>{t!=e.signal(i.signal)&&e.runAsync(null,(()=>{a.source=!0,e.signal(i.signal,t)}))}},i.debounce&&(a.update=(0,r.debounce)(i.debounce,a.update))),(null==i.input&&i.element?k:R)(a,t,i,e),a.active||(e.on(e._signals[i.signal],null,(()=>{a.source?a.source=!1:a.set(e.signal(i.signal))})),a.active=!0)}(n,e.element||t,e)}))),n},toImageURL:async function(e,t){e!==a.RenderType.Canvas&&e!==a.RenderType.SVG&&e!==a.RenderType.PNG&&(0,r.error)("Unrecognized image type: "+e);const n=await z(this,e,t);return e===a.RenderType.SVG?function(e,t){const n=new Blob([e],{type:t});return window.URL.createObjectURL(n)}(n.svg(),"image/svg+xml"):n.canvas().toDataURL("image/png")},toCanvas:async function(e,t){return(await z(this,a.RenderType.Canvas,e,t)).canvas()},toSVG:async function(e){return(await z(this,a.RenderType.SVG,e)).svg()},getState:function(e){return this._runtime.getState(e||{data:Y,signals:X,recurse:!0})},setState:function(e){return this.runAsync(null,(t=>{t._trigger=!1,t._runtime.setState(e)}),(e=>{e._trigger=!0})),this},_watchPixelRatio:function(){if("canvas"===this.renderer()&&this._renderer._canvas){let e=null;const t=()=>{null!=e&&e();const n=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);n.addEventListener("change",t),e=()=>{n.removeEventListener("change",t)},this._renderer._canvas.getContext("2d").pixelRatio=window.devicePixelRatio||1,this._redraw=!0,this._resize=1,this.resize().runAsync()};t()}}})},3548:(e,t,n)=>{"use strict";n.r(t),n.d(t,{voronoi:()=>o});var r=n(24988),i=n(26372),a=n(12008);function o(e){r.Transform.call(this,null,e)}o.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};const s=[-1e5,-1e5,1e5,1e5];function l(e){const t=e[0][0],n=e[0][1];let r=e.length-1;for(;e[r][0]===t&&e[r][1]===n;--r);return"M"+e.slice(0,r+1).join("L")+"Z"}(0,i.inherits)(o,r.Transform,{transform(e,t){const n=e.as||"path",r=t.source;if(!r||!r.length)return t;let i=e.size;i=i?[0,0,i[0],i[1]]:(i=e.extent)?[i[0][0],i[0][1],i[1][0],i[1][1]]:s;const o=this.value=a.Delaunay.from(r,e.x,e.y).voronoi(i);for(let e=0,t=r.length;e{"use strict";n.r(t),n.d(t,{wordcloud:()=>x});var r=n(14958),i=n(24988),a=n(26372),o=n(14588),s=n(48872),l=Math.PI/180,u=64,c=2048;function d(){var e,t,n,i,a,o,s,l=[256,256],d=g,v=[],b=Math.random,x={};function E(e,t,n){for(var r,i,a,o,s,u=t.x,c=t.y,f=Math.hypot(l[0],l[1]),h=d(l),g=b()<.5?1:-1,m=-g;(r=h(m+=g))&&(i=~~r[0],a=~~r[1],!(Math.min(Math.abs(i),Math.abs(a))>=f));)if(t.x=u+i,t.y=c+a,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>l[0]||t.y+t.y1>l[1]||n&&p(t,e,l[0])||n&&(s=n,!((o=t).x+o.x1>s[0].x&&o.x+o.x0s[0].y&&o.y+o.y0>5,E=l[0]>>5,S=t.x-(x<<4),w=127&S,_=32-w,A=t.y1-t.y0,C=(t.y+t.y0)*E+(S>>5),T=0;T>>w:0);C+=E}return t.sprite=null,!0}return!1}return x.layout=function(){for(var d=function(e){e.width=e.height=1;var t=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2);e.width=(u<<5)/t,e.height=c/t;var n=e.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:t}}((0,r.canvas)()),p=function(e){var t=[],n=-1;for(;++n>5)*l[1]),g=null,m=v.length,y=-1,x=[],S=v.map((r=>({text:e(r),font:t(r),style:i(r),weight:a(r),rotate:o(r),size:~~(n(r)+1e-14),padding:s(r),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:r}))).sort(((e,t)=>t.size-e.size));++y>1,w.y=l[1]*(b()+.5)>>1,f(d,w,S,y),w.hasText&&E(p,w,g)&&(x.push(w),g?h(g,w):g=[{x:w.x+w.x0,y:w.y+w.y0},{x:w.x+w.x1,y:w.y+w.y1}],w.x-=l[0]>>1,w.y-=l[1]>>1)}return x},x.words=function(e){return arguments.length?(v=e,x):v},x.size=function(e){return arguments.length?(l=[+e[0],+e[1]],x):l},x.font=function(e){return arguments.length?(t=m(e),x):t},x.fontStyle=function(e){return arguments.length?(i=m(e),x):i},x.fontWeight=function(e){return arguments.length?(a=m(e),x):a},x.rotate=function(e){return arguments.length?(o=m(e),x):o},x.text=function(t){return arguments.length?(e=m(t),x):e},x.spiral=function(e){return arguments.length?(d=y[e]||e,x):d},x.fontSize=function(e){return arguments.length?(n=m(e),x):n},x.padding=function(e){return arguments.length?(s=m(e),x):s},x.random=function(e){return arguments.length?(b=e,x):b},x}function f(e,t,n,r){if(!t.sprite){var i=e.context,a=e.ratio;i.clearRect(0,0,(u<<5)/a,c/a);var o,s,d,f,p,h=0,g=0,m=0,y=n.length;for(--r;++r>5<<5,d=~~Math.max(Math.abs(E+S),Math.abs(E-S))}else o=o+31>>5<<5;if(d>m&&(m=d),h+o>=u<<5&&(h=0,g+=m,m=0),g+d>=c)break;i.translate((h+(o>>1))/a,(g+(d>>1))/a),t.rotate&&i.rotate(t.rotate*l),i.fillText(t.text,0,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,0,0)),i.restore(),t.width=o,t.height=d,t.xoff=h,t.yoff=g,t.x1=o>>1,t.y1=d>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,h+=o}for(var _=i.getImageData(0,0,(u<<5)/a,c/a).data,A=[];--r>=0;)if((t=n[r]).hasText){for(s=(o=t.width)>>5,d=t.y1-t.y0,f=0;f>5),R=_[(g+p)*(u<<5)+(h+f)<<2]?1<<31-f%32:0;A[k]|=R,C|=R}C?T=p:(t.y0++,d--,p--,g++)}t.y1=t.y0+T,t.sprite=A.slice(0,(t.y1-t.y0)*s)}}}function p(e,t,n){n>>=5;for(var r,i=e.sprite,a=e.width>>5,o=e.x-(a<<4),s=127&o,l=32-s,u=e.y1-e.y0,c=(e.y+e.y0)*n+(o>>5),d=0;d>>s:0))&t[c+f])return!0;c+=n}return!1}function h(e,t){var n=e[0],r=e[1];t.x+t.x0r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function g(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function m(e){return"function"==typeof e?e:function(){return e}}var y={archimedean:g,rectangular:function(e){var t=4*e[0]/e[1],n=0,r=0;return function(e){var i=e<0?-1:1;switch(Math.sqrt(1+4*i*e)-i&3){case 0:n+=t;break;case 1:r+=4;break;case 2:n-=t;break;default:r-=4}return[n,r]}}};const v=["x","y","font","fontSize","fontStyle","fontWeight","angle"],b=["text","font","rotate","fontSize","fontStyle","fontWeight"];function x(e){i.Transform.call(this,d(),e)}x.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:v}]},(0,a.inherits)(x,i.Transform,{transform(e,t){!e.size||e.size[0]&&e.size[1]||(0,a.error)("Wordcloud size dimensions must be non-zero.");const n=e.modified();if(!(n||t.changed(t.ADD_REM)||b.some((function(n){const r=e[n];return(0,a.isFunction)(r)&&t.modified(r.fields)}))))return;const r=t.materialize(t.SOURCE).source,i=this.value,l=e.as||v;let u,c=e.fontSize||14;if((0,a.isFunction)(c)?u=e.fontSizeRange:c=(0,a.constant)(c),u){const e=c,t=(0,o.scale)("sqrt")().domain((0,a.extent)(r,e)).range(u);c=n=>t(e(n))}r.forEach((e=>{e[l[0]]=NaN,e[l[1]]=NaN,e[l[3]]=0}));const d=i.words(r).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(c).random(s.random).layout(),f=i.size(),p=f[0]>>1,h=f[1]>>1,g=d.length;for(let e,t,n=0;n{"use strict";n.r(t),n.d(t,{Bounds:()=>b.Bounds,CanvasHandler:()=>b.CanvasHandler,CanvasRenderer:()=>b.CanvasRenderer,DATE:()=>y.DATE,DAY:()=>y.DAY,DAYOFYEAR:()=>y.DAYOFYEAR,Dataflow:()=>i.Dataflow,Debug:()=>r.Debug,Error:()=>r.Error,EventStream:()=>i.EventStream,Gradient:()=>b.Gradient,GroupItem:()=>b.GroupItem,HOURS:()=>y.HOURS,Handler:()=>b.Handler,HybridHandler:()=>b.HybridHandler,HybridRenderer:()=>b.HybridRenderer,Info:()=>r.Info,Item:()=>b.Item,MILLISECONDS:()=>y.MILLISECONDS,MINUTES:()=>y.MINUTES,MONTH:()=>y.MONTH,Marks:()=>b.Marks,MultiPulse:()=>i.MultiPulse,None:()=>r.None,Operator:()=>i.Operator,Parameters:()=>i.Parameters,Pulse:()=>i.Pulse,QUARTER:()=>y.QUARTER,RenderType:()=>b.RenderType,Renderer:()=>b.Renderer,ResourceLoader:()=>b.ResourceLoader,SECONDS:()=>y.SECONDS,SVGHandler:()=>b.SVGHandler,SVGRenderer:()=>b.SVGRenderer,SVGStringRenderer:()=>b.SVGStringRenderer,Scenegraph:()=>b.Scenegraph,TIME_UNITS:()=>y.TIME_UNITS,Transform:()=>i.Transform,View:()=>S.View,WEEK:()=>y.WEEK,Warn:()=>r.Warn,YEAR:()=>y.YEAR,accessor:()=>r.accessor,accessorFields:()=>r.accessorFields,accessorName:()=>r.accessorName,array:()=>r.array,ascending:()=>r.ascending,bandwidthNRD:()=>m.bandwidthNRD,bin:()=>m.bin,bootstrapCI:()=>m.bootstrapCI,boundClip:()=>b.boundClip,boundContext:()=>b.boundContext,boundItem:()=>b.boundItem,boundMark:()=>b.boundMark,boundStroke:()=>b.boundStroke,changeset:()=>i.changeset,clampRange:()=>r.clampRange,codegenExpression:()=>T.codegenExpression,compare:()=>r.compare,constant:()=>r.constant,cumulativeLogNormal:()=>m.cumulativeLogNormal,cumulativeNormal:()=>m.cumulativeNormal,cumulativeUniform:()=>m.cumulativeUniform,dayofyear:()=>y.dayofyear,debounce:()=>r.debounce,defaultLocale:()=>w.defaultLocale,definition:()=>i.definition,densityLogNormal:()=>m.densityLogNormal,densityNormal:()=>m.densityNormal,densityUniform:()=>m.densityUniform,domChild:()=>b.domChild,domClear:()=>b.domClear,domCreate:()=>b.domCreate,domFind:()=>b.domFind,dotbin:()=>m.dotbin,error:()=>r.error,expressionFunction:()=>_.expressionFunction,extend:()=>r.extend,extent:()=>r.extent,extentIndex:()=>r.extentIndex,falsy:()=>r.falsy,fastmap:()=>r.fastmap,field:()=>r.field,flush:()=>r.flush,font:()=>b.font,fontFamily:()=>b.fontFamily,fontSize:()=>b.fontSize,format:()=>v.format,formatLocale:()=>w.numberFormatDefaultLocale,formats:()=>v.formats,hasOwnProperty:()=>r.hasOwnProperty,id:()=>r.id,identity:()=>r.identity,inferType:()=>v.inferType,inferTypes:()=>v.inferTypes,ingest:()=>i.ingest,inherits:()=>r.inherits,inrange:()=>r.inrange,interpolate:()=>x.interpolate,interpolateColors:()=>x.interpolateColors,interpolateRange:()=>x.interpolateRange,intersect:()=>b.intersect,intersectBoxLine:()=>b.intersectBoxLine,intersectPath:()=>b.intersectPath,intersectPoint:()=>b.intersectPoint,intersectRule:()=>b.intersectRule,isArray:()=>r.isArray,isBoolean:()=>r.isBoolean,isDate:()=>r.isDate,isFunction:()=>r.isFunction,isIterable:()=>r.isIterable,isNumber:()=>r.isNumber,isObject:()=>r.isObject,isRegExp:()=>r.isRegExp,isString:()=>r.isString,isTuple:()=>i.isTuple,key:()=>r.key,lerp:()=>r.lerp,lineHeight:()=>b.lineHeight,loader:()=>v.loader,locale:()=>w.locale,logger:()=>r.logger,lruCache:()=>r.lruCache,markup:()=>b.markup,merge:()=>r.merge,mergeConfig:()=>r.mergeConfig,multiLineOffset:()=>b.multiLineOffset,one:()=>r.one,pad:()=>r.pad,panLinear:()=>r.panLinear,panLog:()=>r.panLog,panPow:()=>r.panPow,panSymlog:()=>r.panSymlog,parse:()=>A.parse,parseExpression:()=>T.parseExpression,parseSelector:()=>k.parseSelector,path:()=>b.path,pathCurves:()=>b.pathCurves,pathEqual:()=>b.pathEqual,pathParse:()=>b.pathParse,pathRectangle:()=>b.pathRectangle,pathRender:()=>b.pathRender,pathSymbols:()=>b.pathSymbols,pathTrail:()=>b.pathTrail,peek:()=>r.peek,point:()=>b.point,projection:()=>E.projection,quantileLogNormal:()=>m.quantileLogNormal,quantileNormal:()=>m.quantileNormal,quantileUniform:()=>m.quantileUniform,quantiles:()=>m.quantiles,quantizeInterpolator:()=>x.quantizeInterpolator,quarter:()=>r.quarter,quartiles:()=>m.quartiles,random:()=>m.random,randomInteger:()=>m.randomInteger,randomKDE:()=>m.randomKDE,randomLCG:()=>m.randomLCG,randomLogNormal:()=>m.randomLogNormal,randomMixture:()=>m.randomMixture,randomNormal:()=>m.randomNormal,randomUniform:()=>m.randomUniform,read:()=>v.read,regressionConstant:()=>m.regressionConstant,regressionExp:()=>m.regressionExp,regressionLinear:()=>m.regressionLinear,regressionLoess:()=>m.regressionLoess,regressionLog:()=>m.regressionLog,regressionPoly:()=>m.regressionPoly,regressionPow:()=>m.regressionPow,regressionQuad:()=>m.regressionQuad,renderModule:()=>b.renderModule,repeat:()=>r.repeat,resetDefaultLocale:()=>w.resetDefaultLocale,resetSVGClipId:()=>b.resetSVGClipId,resetSVGDefIds:()=>b.resetSVGDefIds,responseType:()=>v.responseType,runtimeContext:()=>C.context,sampleCurve:()=>m.sampleCurve,sampleLogNormal:()=>m.sampleLogNormal,sampleNormal:()=>m.sampleNormal,sampleUniform:()=>m.sampleUniform,scale:()=>x.scale,sceneEqual:()=>b.sceneEqual,sceneFromJSON:()=>b.sceneFromJSON,scenePickVisit:()=>b.scenePickVisit,sceneToJSON:()=>b.sceneToJSON,sceneVisit:()=>b.sceneVisit,sceneZOrder:()=>b.sceneZOrder,scheme:()=>x.scheme,serializeXML:()=>b.serializeXML,setHybridRendererOptions:()=>b.setHybridRendererOptions,setRandom:()=>m.setRandom,span:()=>r.span,splitAccessPath:()=>r.splitAccessPath,stringValue:()=>r.stringValue,textMetrics:()=>b.textMetrics,timeBin:()=>y.timeBin,timeFloor:()=>y.timeFloor,timeFormatLocale:()=>w.timeFormatDefaultLocale,timeInterval:()=>y.timeInterval,timeOffset:()=>y.timeOffset,timeSequence:()=>y.timeSequence,timeUnitSpecifier:()=>y.timeUnitSpecifier,timeUnits:()=>y.timeUnits,toBoolean:()=>r.toBoolean,toDate:()=>r.toDate,toNumber:()=>r.toNumber,toSet:()=>r.toSet,toString:()=>r.toString,transform:()=>i.transform,transforms:()=>i.transforms,truncate:()=>r.truncate,truthy:()=>r.truthy,tupleid:()=>i.tupleid,typeParsers:()=>v.typeParsers,utcFloor:()=>y.utcFloor,utcInterval:()=>y.utcInterval,utcOffset:()=>y.utcOffset,utcSequence:()=>y.utcSequence,utcdayofyear:()=>y.utcdayofyear,utcquarter:()=>r.utcquarter,utcweek:()=>y.utcweek,version:()=>R,visitArray:()=>r.visitArray,week:()=>y.week,writeConfig:()=>r.writeConfig,zero:()=>r.zero,zoomLinear:()=>r.zoomLinear,zoomLog:()=>r.zoomLog,zoomPow:()=>r.zoomPow,zoomSymlog:()=>r.zoomSymlog});var r=n(26372),i=n(24988),a=n(28740),o=n(64322),s=n(73784),l=n(35886),u=n(65294),c=n(91434),d=n(43308),f=n(62804),p=n(3548),h=n(36634),g=n(37788),m=n(48872),y=n(71652),v=n(83418),b=n(84636),x=n(14588),E=n(63316),S=n(84752),w=n(40300),_=n(31926),A=n(36808),C=n(96056),T=n(21720),k=n(45948),R="5.30.0";(0,r.extend)(i.transforms,a,o,s,l,u,d,c,f,p,h,g)},18047:(e,t,n)=>{"use strict";async function r(e,t,n){try{const r=await fetch(`http://${e}:${t}/api/tags`);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const i=(await r.json()).models.map((e=>e.name));return 0===i.length&&n(),i}catch(e){return console.error("Error fetching model names:",e),n(),[]}}async function i(e,t,n,r){const i=`http://${n}:${r}/api/chat`,a={"Content-Type":"application/json"},o=JSON.stringify({model:t,messages:[{role:"system",content:"You are an expert code assistant who only responds in Python code."},{role:"user",content:e}],stream:!1,temperature:.3,frequency_penalty:0,presence_penalty:0,user:"scalene-user"});console.log(o);let s=!1,l="",u=0;for(;!s;){if(u>=3)return{};try{const e=await fetch(i,{method:"POST",headers:a,body:o});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=(await e.text()).split("\n");for(const e of t){const t=JSON.parse(e);if(t.message&&t.message.content&&(l+=t.message.content),t.done){s=!0;break}}}catch(e){console.log(`Error: ${e}`),u++}}console.log(l);try{return l}catch{return"# Query failed. See JavaScript console (in Chrome: View > Developer > JavaScript Console) for more info.\n"}}n.r(t),n.d(t,{fetchModelNames:()=>r,sendPromptToOllama:()=>i})},54699:(e,t,n)=>{"use strict";async function r(e){const t=await async function(e){return await fetch("https://api.openai.com/v1/completions",{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}})}(e),n=await t.json();return!n.error||!(n.error.code in{invalid_api_key:!0,invalid_request_error:!0,model_not_found:!0,insufficient_quota:!0})}function i(e){(async()=>{try{window.localStorage.setItem("scalene-api-key",e)}catch{}if(0===e.length)return void(document.getElementById("valid-api-key").innerHTML="");const t=await r(e);document.getElementById("valid-api-key").innerHTML=t?"✓":"✕"})()}async function a(e,t){const n=document.getElementById("language-model-openai").value,r=JSON.stringify({model:n,messages:[{role:"system",content:"You are a Python programming assistant who ONLY responds with blocks of commented, optimized code. You never respond with text. Just code, starting with ``` and ending with ```."},{role:"user",content:e}],user:"scalene-user"});console.log(r);const i=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:r}),a=await i.json();if(a.error&&a.error.code in{invalid_request_error:!0,model_not_found:!0,insufficient_quota:!0})return"model_not_found"===a.error.code&&"gpt-4"===n?alert("You either need to add funds to your OpenAI account to use this feature, or you need to switch to GPT-3.5 if you are using free credits."):alert("You need to add funds to your OpenAI account to use this feature."),"";try{console.log(`Debugging info: Retrieved ${JSON.stringify(a.choices[0],null,4)}`)}catch{console.log(`Debugging info: Failed to retrieve data.choices from the server. data = ${JSON.stringify(a)}`)}try{return a.choices[0].message.content.replace(/^\s*[\r\n]/gm,"")}catch{return"# Query failed. See JavaScript console (in Chrome: View > Developer > JavaScript Console) for more info.\n"}}n.r(t),n.d(t,{checkApiKey:()=>i,isValidApiKey:()=>r,sendPromptToOpenAI:()=>a})},77439:(e,t,n)=>{"use strict";n.r(t),n.d(t,{optimizeCode:()=>c,proposeOptimization:()=>d});var r=n(54699),i=n(18047),a=n(90217),o=n(26026),s=n(12672),l=n(43270);function u(e){if(!e)return e;const t=e.split("\n");let n=0;for(;n0&&!t.includes(" ")?e.slice(r.length):e}else i=e;const a=i.indexOf("```");return-1!==a&&(i=i.slice(0,a)),i}async function c(e,t,n,s){const l=document.getElementById("use-gpu-checkbox").checked;let c=["sklearn"];l?c.push("cupy"):c.push("numpy");const d=document.getElementById("accelerator-name").innerHTML||"GPU",f=function(e,t,n,r=[],i=!1,a="GPU"){const o=[...new Set(["NumPy","Scikit-learn","Pandas","TensorFlow","PyTorch",...r])];let s=["Optimize the following Python code to make it more efficient WITHOUT CHANGING ITS RESULTS.\n\n",e.trim(),"\n# Start of code\n",t.trim(),"\n# End of code\n\n","Rewrite the above Python code from 'Start of code' to 'End of code', aiming for clear and simple optimizations. ","Your output should consist only of valid Python code, with brief explanatory comments prefaced with #. ","Include a detailed explanatory comment before the code, starting with '# Proposed optimization:'. ",`Leverage high-performance native libraries, especially those utilizing ${a}, for significant performance improvements. `,"Consider using the following other libraries, if appropriate:\n",o.map((e=>" import "+e)).join("\n")+"\n","Eliminate as many for loops, while loops, and list or dict comprehensions as possible, replacing them with vectorized equivalents. ","Quantify the expected speedup in terms of orders of magnitude if possible. ","Fix any errors in the optimized code. "];i&&s.push(`Use ${a}-accelerated libraries whenever it would substantially increase performance. `),s.push("Consider the following insights gathered from the Scalene profiler for optimization:\n");const l=n.n_cpu_percent_python+n.n_cpu_percent_c+n.n_sys_percent;return s.push(`- CPU time: percent spent in the Python interpreter: ${(100*n.n_cpu_percent_python/l).toFixed(2)}%\n`),s.push(`- CPU time: percent spent executing native code: ${(100*n.n_cpu_percent_c/l).toFixed(2)}%\n`),s.push(`- CPU time: percent of system time: ${(100*n.n_sys_percent/l).toFixed(2)}%\n`),s.push(`- Core utilization: ${(100*n.n_core_utilization/l).toFixed(2)}%\n`),s.push(`- Peak memory usage: ${n.n_peak_mb.toFixed(0)}MB (${(100*n.n_python_fraction).toFixed(2)}% Python memory)\n`),n.n_copy_mb_s>1&&s.push(`- Megabytes copied per second by memcpy/strcpy: ${n.n_copy_mb_s.toFixed(2)}\n`),i&&s.push(`- GPU percent utilization: ${(100*n.n_gpu_percent).toFixed(2)}%\n`),s.push("Optimized code:"),s.join("")}(s,t,n,c,l,d),p=l?` or ${d}-optimizations `:" ";let h="",g=document.getElementById("service-select").value;if("openai"===g?h=document.getElementById("api-key").value:"azure-openai"===g&&(h=document.getElementById("azure-api-key").value),("openai"===g||"azure-openai"===g)&&!h)return alert("To activate proposed optimizations, enter an OpenAI API key in AI optimization options."),document.getElementById("ai-optimization-options").open=!0,"";let m=" ";t.split("\n").length<=2&&(m=" line of ");let y="import sklearn";y+=l?"\nimport cupy":"\nimport numpy as np";const v=`Optimize the following${m}Python code:\n\n${s}\n\n# Start of code\n\n${t}\n\n# End of code\n\nRewrite the above Python code only from "Start of code" to "End of code", to make it more efficient WITHOUT CHANGING ITS RESULTS. Assume the code has already executed all these imports; do NOT include them in the optimized code:\n\n${e}\n\nUse native libraries if that would make it faster than pure Python. Consider using the following other libraries, if appropriate:\n\n${y}\n\nYour output should only consist of valid Python code. Output the resulting Python with brief explanations only included as comments prefaced with #. Include a detailed explanatory comment before the code, starting with the text "# Proposed optimization:". Make the code as clear and simple as possible, while also making it as fast and memory-efficient as possible. Use vectorized operations${p}whenever it would substantially increase performance, and quantify the speedup in terms of orders of magnitude. Eliminate as many for loops, while loops, and list or dict comprehensions as possible, replacing them with vectorized equivalents. If the performance is not likely to increase, leave the code unchanged. Fix any errors in the optimized code. Optimized${m}code:`,b=`Optimize the following${m} Python code:\n\n${s}\n\n# Start of code\n\n${t}\n\n\n# End of code\n\nRewrite the above Python code only from "Start of code" to "End of code", to make it more memory-efficient WITHOUT CHANGING ITS RESULTS. Assume the code has already executed all these imports; do NOT include them in the optimized code:\n\n${e}\n\nUse native libraries if that would make it more space efficient than pure Python. Consider using the following other libraries, if appropriate:\n\n${y}\n\nYour output should only consist of valid Python code. Output the resulting Python with brief explanations only included as comments prefaced with #. Include a detailed explanatory comment before the code, starting with the text "# Proposed optimization:". Make the code as clear and simple as possible, while also making it as fast and memory-efficient as possible. Use native libraries whenever possible to reduce memory consumption; invoke del on variables and array elements as soon as it is safe to do so. If the memory consumption is not likely to be reduced, leave the code unchanged. Fix any errors in the optimized code. Optimized${m}code:`;let x;switch(x=document.getElementById("optimize-performance").checked?v:b,x=f,document.getElementById("service-select").value){case"openai":console.log(x);return u(await(0,r.sendPromptToOpenAI)(x,h));case"local":{console.log("Running "+document.getElementById("service-select").value),console.log(x);const e=await(0,i.sendPromptToOllama)(x,document.getElementById("language-model-local").value,document.getElementById("local-ip").value,document.getElementById("local-port").value);return e.includes("```")?function(e){const t=/```python\s*([\s\S]*?)```|```([\s\S]*?)```/g;let n,r="";for(;null!==(n=t.exec(e));){const e=n[1]?n[1]:n[2];r&&e&&(r+="\n\n"),r+=e}return r}(e):e}case"amazon":console.log("Running "+document.getElementById("service-select").value),console.log(x);return u(await(0,a.sendPromptToAmazon)(x));case"azure-openai":{console.log("Running "+document.getElementById("service-select").value),console.log(x);let e=document.getElementById("azure-api-url").value,t=document.getElementById("azure-api-model").value;return u(await(0,o.sendPromptToAzureOpenAI)(x,h,e,t))}}}function d(e,t,n,i){e=unescape(e);const a=i.regions,o=globalThis.profile,u=o.files[e].lines,d=o.files[e].imports.join("\n"),f=u[n.lineno-1].start_region_line,p=u[n.lineno-1].end_region_line;let h;const g=u[n.lineno-1].line;let m;a?(m=u.slice(f-1,p).map((e=>e.line)).join(""),h=u.slice(Math.max(0,f-10),Math.min(f-1,u.length)).map((e=>e.line)).join("")):(m=g,h=u.slice(Math.max(0,n.lineno-10),Math.min(n.lineno-1,u.length)).map((e=>e.line)).join(""));let y=(0,s.countSpaces)(g)+3,v=l.WhiteLightning+l.WhiteExplosion+" ".repeat(y-1);const b=document.getElementById(`code-${t}-${n.lineno}`);(async()=>{const e=document.getElementById("service-select").value;if("openai"===e){if(!await(0,r.isValidApiKey)(document.getElementById("api-key").value))return alert("You must enter a valid OpenAI API key to activate proposed optimizations."),void(document.getElementById("ai-optimization-options").open=!0)}if("local"==e&&"none"===document.getElementById("local-models-list").style.display)return alert("You must be connected to a running Ollama server to activate proposed optimizations."),void(document.getElementById("ai-optimization-options").open=!0);b.innerHTML=`${v}working...`;let i=await c(d,m,n,h);if(!i)return void(b.innerHTML="");i=i.replace(/\r?\n/g,"\n");const a=i.split("\n").map((e=>v+Prism.highlight(e,Prism.languages.python,"python"))).join("
");b.innerHTML=`
${a}`;const o=document.getElementById(`opt-${t}-${n.lineno}`);o.addEventListener("click",(async e=>{await async function(e,t){e.preventDefault(),e.stopPropagation(),await navigator.clipboard.writeText(t)}(e,i),o.style="cursor: auto",await new Promise((e=>setTimeout(e,125))),o.style="cursor: copy"}))})()}},21806:(e,t,n)=>{"use strict";function r(e){const t=localStorage.getItem(e.id);if(null!==t)switch(e.type){case"checkbox":case"radio":e.checked="true"===t;break;default:e.value=t}}function i(e){e.addEventListener("change",(()=>{switch(e.type){case"checkbox":case"radio":localStorage.setItem(e.id,e.checked);break;default:localStorage.setItem(e.id,e.value)}}))}function a(){const e=document.querySelectorAll(".persistent");e.forEach((e=>{r(e)})),e.forEach((e=>{i(e)}))}n.r(t),n.d(t,{observeDOM:()=>o,processPersistentElements:()=>a});const o=()=>{new MutationObserver((e=>{e.forEach((e=>{e.addedNodes&&e.addedNodes.forEach((e=>{1===e.nodeType&&e.matches(".persistent")&&(r(e),e.addEventListener("change",(()=>i(e))))}))}))})).observe(document.body,{childList:!0,subtree:!0})}},61684:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Prism:()=>r}),e=n.hmd(e);var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);w+=S.value.length,S=S.next){var _=S.value;if(t.length>e.length)return;if(!(_ instanceof a)){var A,C=1;if(v){if(!(A=o(E,w,e,y))||A.index>=e.length)break;var T=A.index,k=A.index+A[0].length,R=w;for(R+=S.value.length;T>=R;)R+=(S=S.next).value.length;if(w=R-=S.value.length,S.value instanceof a)continue;for(var D=S;D!==t.tail&&(Rd.reach&&(d.reach=P);var M=S.prev;if(O&&(M=u(t,M,O),w+=O.length),c(t,M,C),S=u(t,M,new a(f,m?i.tokenize(N,m):N,b,N)),F&&u(t,S,F),C>1){var I={cause:f+","+h,reach:P};s(e,t,n,S.prev,w,I),d&&I.reach>d.reach&&(d.reach=I.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function c(e,t,n){for(var r=t.next,i=0;i"+a.content+""},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()}),!1),i):i;var d=i.util.currentScript();function f(){i.manual||i.highlightAll()}if(d&&(i.filename=d.src,d.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),void 0!==n.g&&(n.g.Prism=r),r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,r.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},r.languages.python["string-interpolation"].inside.interpolation.inside.rest=r.languages.python,r.languages.py=r.languages.python,function(){if(void 0!==r){var t=Object.assign||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e};n.prototype={setDefaults:function(e){this.defaults=t(this.defaults,e)},normalize:function(e,n){for(var r in n=t(this.defaults,n)){var i=r.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));"normalize"!==r&&"setDefaults"!==i&&n[r]&&this[i]&&(e=this[i].call(this,e,n[r]))}return e},leftTrim:function(e){return e.replace(/^\s+/,"")},rightTrim:function(e){return e.replace(/\s+$/,"")},tabsToSpaces:function(e,t){return t=0|t||4,e.replace(/\t/g,new Array(++t).join(" "))},spacesToTabs:function(e,t){return t=0|t||4,e.replace(RegExp(" {"+t+"}","g"),"\t")},removeTrailing:function(e){return e.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(e){return e.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(e){var t=e.match(/^[^\S\n\r]*(?=\S)/gm);return t&&t[0].length?(t.sort((function(e,t){return e.length-t.length})),t[0].length?e.replace(RegExp("^"+t[0],"gm"),""):e):e},indent:function(e,t){return e.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++t).join("\t")+"$&")},breakLines:function(e,t){t=!0===t?80:0|t||80;for(var n=e.split("\n"),r=0;rt&&(a[s]="\n"+a[s],o=l)}n[r]=a.join("")}return n.join("\n")}},e.exports&&(e.exports=n),r.plugins.NormalizeWhitespace=new n({"remove-trailing":!0,"remove-indent":!1,"left-trim":!1,"right-trim":!0}),r.hooks.add("before-sanity-check",(function(e){var t=r.plugins.NormalizeWhitespace;if((!e.settings||!1!==e.settings["whitespace-normalization"])&&r.util.isActive(e.element,"whitespace-normalization",!0))if(e.element&&e.element.parentNode||!e.code){var n=e.element.parentNode;if(e.code&&n&&"pre"===n.nodeName.toLowerCase()){for(var i=n.childNodes,a="",o="",s=!1,l=0;l{"use strict";n.r(t),n.d(t,{default:()=>d});const r=e=>{let t;return window.CustomEvent&&"function"==typeof window.CustomEvent?t=new CustomEvent(e):(t=document.createEvent("CustomEvent"),t.initCustomEvent(e,!1,!1,void 0)),t},i=(e,t)=>e.getAttribute(t.sortAttribute||"data-sort")||e.textContent||e.innerText||"",a=(e,t)=>(e=e.trim().toLowerCase())===(t=t.trim().toLowerCase())?0:eArray.from(e).find((e=>e.getAttribute("data-sort-column-key")===t)),s=(e,t)=>(n,r)=>{const i=e(n.td,r.td);return 0===i?t?r.index-n.index:n.index-r.index:i},l=[];class u{constructor(e,t={}){if(!(e instanceof HTMLTableElement))throw new Error("Element must be a table");this.init(e,t)}static extend(e,t,n){if("function"!=typeof t||"function"!=typeof n)throw new Error("Pattern and sort must be a function");l.push({name:e,pattern:t,sort:n})}init(e,t){let n;if(this.table=e,this.thead=!1,this.options=t,e.tHead&&e.tHead.rows.length>0?(n=Array.from(e.tHead.rows).find((e=>"thead"===e.getAttribute("data-sort-method")))||e.tHead.rows[e.tHead.rows.length-1],this.thead=!0):n=e.rows[0],!n)return;const r=e=>{this.current&&this.current!==e.currentTarget&&this.current.removeAttribute("aria-sort"),this.current=e.currentTarget,this.sortTable(e.currentTarget)};for(const e of n.cells)e.setAttribute("role","columnheader"),"none"!==e.getAttribute("data-sort-method")&&(e.tabIndex=0,e.addEventListener("click",r,!1),null!==e.getAttribute("data-sort-default")&&(this.current=e,this.sortTable(e)))}sortTable(e,t=!1){const n=e.getAttribute("data-sort-column-key"),u=e.cellIndex;let c=a,d=[],f=this.thead?0:1;const p=e.getAttribute("data-sort-method");let h=e.getAttribute("aria-sort");if(this.table.dispatchEvent(r("beforeSort")),t||(h="ascending"===h?"descending":"descending"===h?"ascending":this.options.descending?"descending":"ascending",e.setAttribute("aria-sort",h)),!(this.table.rows.length<2)){for(;d.length<3&&f0&&d.push(t),f++}for(const e of l){if(p&&e.name===p){c=e.sort;break}if(d.every(e.pattern)){c=e.sort;break}}this.col=u;for(const e of this.table.tBodies){const t=[],r={};let a=0,l=0;for(const s of e.rows){if("none"===s.getAttribute("data-sort-method"))r[a]=s;else{const e=n?o(s.cells,n):s.cells[this.col];t.push({tr:s,td:e?i(e,this.options):"",index:a})}a++}"descending"===h?t.sort(s(c,!0)):t.sort(s(c,!1)).reverse();for(let n=0;ne.replace(/[^\-?0-9.]/g,"");u.extend("number",(e=>e.match(/^[-+]?[\xa3\x24\xdb\xa2\xb4\u20ac]?\d+\s*([,\.]\d{0,2})/)||e.match(/^[-+]?\d+\s*([,\.]\d{0,2})?[\xa3\x24\xdb\xa2\xb4\u20ac]/)||e.match(/^[-+]?(\d)*-?([,\.]){0,1}-?(\d)+([E,e][\-+][\d]+)?%?$/)),((e,t)=>((e,t)=>(parseFloat(t)||0)-(parseFloat(e)||0))(c(e),c(t))));const d=u},12672:(e,t,n)=>{"use strict";function r(e){return e.replace(/\\u([\dA-F]{4})/gi,(function(e,t){return String.fromCharCode(parseInt(t,16))}))}function i(e){const t=e.match(/^\s+/);return t?t[0].length:0}function a(e){let t=Math.floor(e/1024);return Math.floor(t/1024)>0?`${(e/1048576).toFixed(0)}T`:t>0?`${(e/1024).toFixed(0)}G`:`${e.toFixed(0)}M`}function o(e){let t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3),i=e%36e5/6e4,a=e%6e4/1e3;return t>0?`${t.toFixed(0)}h:${i.toFixed(0)}m:${a.toFixed(3)}s`:n>=1?`${n.toFixed(0)}m:${a.toFixed(3)}s`:r>=1?`${a.toFixed(3)}s`:`${e.toFixed(0)}ms`}n.r(t),n.d(t,{countSpaces:()=>i,memory_consumed_str:()=>a,time_consumed_str:()=>o,unescapeUnicode:()=>r})},88189:(e,t,n)=>{"use strict";n.r(t),n.d(t,{map:()=>a,slice:()=>i});var r=Array.prototype,i=r.slice,a=r.map},12902:(e,t,n)=>{"use strict";function r(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}n.r(t),n.d(t,{default:()=>r})},54901:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(88189),i=n(52016),a=n(6930),o=n(91454),s=n(25084),l=n(62447),u=n(6946),c=n(57765);function d(){var e=s.default,t=o.default,n=c.default;function d(r){Array.isArray(r)||(r=Array.from(r));var a,s,c,d=r.length,f=new Array(d);for(a=0;a=g)if(e>=g&&t===o.default){const e=(0,u.tickIncrement)(h,g,n);isFinite(e)&&(e>0?g=(Math.floor(g/e)+1)*e:e<0&&(g=(Math.ceil(g*-e)+1)/-e))}else m.pop()}for(var y=m.length,v=0,b=y;m[v]<=h;)++v;for(;m[b-1]>g;)--b;(v||b0?m[a-1]:h,x.x1=a0)for(a=0;a{"use strict";n.r(t),n.d(t,{bisectCenter:()=>u,bisectLeft:()=>l,bisectRight:()=>s,default:()=>c});var r=n(12902),i=n(86037),a=n(83131);const o=(0,i.default)(r.default),s=o.right,l=o.left,u=(0,i.default)(a.default).center,c=s},86037:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(12902),i=n(41180);function a(e){let t,n,a;function s(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<0?i=t+1:a=t}while(i(0,r.default)(e(t),n),a=(t,n)=>e(t)-n):(t=e===r.default||e===i.default?e:o,n=e,a=e),{left:s,center:function(e,t,n=0,r=e.length){const i=s(e,t,n,r-1);return i>n&&a(e[i-1],t)>-a(e[i],t)?i-1:i},right:function(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<=0?i=t+1:a=t}while(i{"use strict";function r(e,t){if(!((t=+t)>=0))throw new RangeError("invalid r");let n=e.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!t)return e;const r=u(t),i=e.slice();return r(e,i,0,n,1),r(i,e,0,n,1),r(e,i,0,n,1),e}n.r(t),n.d(t,{blur:()=>r,blur2:()=>i,blurImage:()=>a});const i=o(u),a=o((function(e){const t=u(e);return(e,n,r,i,a)=>{t(e,n,(r<<=2)+0,(i<<=2)+0,a<<=2),t(e,n,r+1,i+1,a),t(e,n,r+2,i+2,a),t(e,n,r+3,i+3,a)}}));function o(e){return function(t,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:a,height:o}=t;if(!((a=Math.floor(a))>=0))throw new RangeError("invalid width");if(!((o=Math.floor(void 0!==o?o:i.length/a))>=0))throw new RangeError("invalid height");if(!a||!o||!n&&!r)return t;const u=n&&e(n),c=r&&e(r),d=i.slice();return u&&c?(s(u,d,i,a,o),s(u,i,d,a,o),s(u,d,i,a,o),l(c,i,d,a,o),l(c,d,i,a,o),l(c,i,d,a,o)):u?(s(u,i,d,a,o),s(u,d,i,a,o),s(u,i,d,a,o)):c&&(l(c,i,d,a,o),l(c,d,i,a,o),l(c,i,d,a,o)),t}}function s(e,t,n,r,i){for(let a=0,o=r*i;a{if(!((a-=o)>=i))return;let s=e*r[i];const l=o*e;for(let e=i,t=i+l;e{if(!((o-=s)>=a))return;let l=t*i[a];const u=s*t,c=u+s;for(let e=a,t=a+u;e{"use strict";function r(e){return()=>e}n.r(t),n.d(t,{default:()=>r})},98375:(e,t,n)=>{"use strict";function r(e,t){let n=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&++n;else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i=+i)>=i&&++n}return n}n.r(t),n.d(t,{default:()=>r})},44124:(e,t,n)=>{"use strict";function r(e){return 0|e.length}function i(e){return!(e>0)}function a(e){return"object"!=typeof e||"length"in e?e:Array.from(e)}function o(...e){const t="function"==typeof e[e.length-1]&&function(e){return t=>e(...t)}(e.pop()),n=(e=e.map(a)).map(r),o=e.length-1,s=new Array(o+1).fill(0),l=[];if(o<0||n.some(i))return l;for(;;){l.push(s.map(((t,n)=>e[n][t])));let r=o;for(;++s[r]===n[r];){if(0===r)return t?l.map(t):l;s[r--]=0}}}n.r(t),n.d(t,{default:()=>o})},79700:(e,t,n)=>{"use strict";function r(e,t){var n=0,r=0;return Float64Array.from(e,void 0===t?e=>n+=+e||0:i=>n+=+t(i,r++,e)||0)}n.r(t),n.d(t,{default:()=>r})},41180:(e,t,n)=>{"use strict";function r(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}n.r(t),n.d(t,{default:()=>r})},19975:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(6613);function i(e,t){const n=(0,r.default)(e,t);return n?Math.sqrt(n):n}},56209:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(24119);function i(e,...t){e=new r.InternSet(e);for(const n of t)for(const t of n)e.delete(t);return e}},90030:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(24119);function i(e,t){const n=t[Symbol.iterator](),i=new r.InternSet;for(const t of e){if(i.has(t))return!1;let e,r;for(;({value:e,done:r}=n.next())&&!r;){if(Object.is(t,e))return!1;i.add(e)}}return!0}},27991:(e,t,n)=>{"use strict";function r(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");let n=-1;for(const r of e)if(!t(r,++n,e))return!1;return!0}n.r(t),n.d(t,{default:()=>r})},91454:(e,t,n)=>{"use strict";function r(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=a&&(n=r=a):(n>a&&(n=a),rr})},20832:(e,t,n)=>{"use strict";function r(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of e)t(i,++r,e)&&n.push(i);return n}n.r(t),n.d(t,{default:()=>r})},11047:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Adder:()=>r,fcumsum:()=>a,fsum:()=>i});class r{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r0){for(a=e[--i];i>0&&(t=a,n=e[--i],a=t+n,r=n-(a-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=a+n,n==t-a&&(a=t))}return a}}function i(e,t){const n=new r;if(void 0===t)for(let t of e)(t=+t)&&n.add(t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&n.add(i)}return+n}function a(e,t){const n=new r;let i=-1;return Float64Array.from(e,void 0===t?e=>n.add(+e||0):r=>n.add(+t(r,++i,e)||0))}},36205:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(12902);function i(e,t=r.default){let n,i=!1;if(1===t.length){let a;for(const o of e){const e=t(o);(i?(0,r.default)(e,a)>0:0===(0,r.default)(e,e))&&(n=o,a=e,i=!0)}}else for(const r of e)(i?t(r,n)>0:0===t(r,r))&&(n=r,i=!0);return n}},47817:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(12902),i=n(4504);function a(e,t=r.default){if(1===t.length)return(0,i.default)(e,t);let n,a=-1,o=-1;for(const r of e)++o,(a<0?0===t(r,r):t(r,n)>0)&&(n=r,a=o);return a}},76223:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,flatGroup:()=>l,flatRollup:()=>u,groups:()=>o,index:()=>f,indexes:()=>p,rollup:()=>c,rollups:()=>d});var r=n(24119),i=n(25084);function a(e,...t){return g(e,i.default,i.default,t)}function o(e,...t){return g(e,Array.from,i.default,t)}function s(e,t){for(let n=1,r=t.length;ne.pop().map((([t,n])=>[...e,t,n]))));return e}function l(e,...t){return s(o(e,...t),t)}function u(e,t,...n){return s(d(e,t,...n),n)}function c(e,t,...n){return g(e,i.default,t,n)}function d(e,t,...n){return g(e,Array.from,t,n)}function f(e,...t){return g(e,i.default,h,t)}function p(e,...t){return g(e,Array.from,h,t)}function h(e){if(1!==e.length)throw new Error("duplicate key");return e[0]}function g(e,t,n,i){return function e(a,o){if(o>=i.length)return n(a);const s=new r.InternMap,l=i[o++];let u=-1;for(const e of a){const t=l(e,++u,a),n=s.get(t);n?n.push(e):s.set(t,[e])}for(const[t,n]of s)s.set(t,e(n,o));return t(s)}(e,0)}},63251:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(12902),i=n(76223),a=n(68886);function o(e,t,n){return(2!==t.length?(0,a.default)((0,i.rollup)(e,t,n),(([e,t],[n,i])=>(0,r.default)(t,i)||(0,r.default)(e,n))):(0,a.default)((0,i.default)(e,n),(([e,n],[i,a])=>t(n,a)||(0,r.default)(e,i)))).map((([e])=>e))}},25084:(e,t,n)=>{"use strict";function r(e){return e}n.r(t),n.d(t,{default:()=>r})},61388:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Adder:()=>p.Adder,InternMap:()=>ae.InternMap,InternSet:()=>ae.InternSet,ascending:()=>i.default,bin:()=>m.default,bisect:()=>r.default,bisectCenter:()=>r.bisectCenter,bisectLeft:()=>r.bisectLeft,bisectRight:()=>r.bisectRight,bisector:()=>a.default,blur:()=>o.blur,blur2:()=>o.blur2,blurImage:()=>o.blurImage,count:()=>s.default,cross:()=>l.default,cumsum:()=>u.default,descending:()=>c.default,deviation:()=>d.default,difference:()=>Z.default,disjoint:()=>ee.default,every:()=>V.default,extent:()=>f.default,fcumsum:()=>p.fcumsum,filter:()=>Y.default,flatGroup:()=>h.flatGroup,flatRollup:()=>h.flatRollup,fsum:()=>p.fsum,greatest:()=>$.default,greatestIndex:()=>L.default,group:()=>h.default,groupSort:()=>g.default,groups:()=>h.groups,histogram:()=>m.default,index:()=>h.index,indexes:()=>h.indexes,intersection:()=>te.default,least:()=>M.default,leastIndex:()=>I.default,map:()=>X.default,max:()=>x.default,maxIndex:()=>E.default,mean:()=>S.default,median:()=>w.default,medianIndex:()=>w.medianIndex,merge:()=>_.default,min:()=>A.default,minIndex:()=>C.default,mode:()=>T.default,nice:()=>k.default,pairs:()=>R.default,permute:()=>D.default,quantile:()=>N.default,quantileIndex:()=>N.quantileIndex,quantileSorted:()=>N.quantileSorted,quickselect:()=>O.default,range:()=>F.default,rank:()=>P.default,reduce:()=>K.default,reverse:()=>J.default,rollup:()=>h.rollup,rollups:()=>h.rollups,scan:()=>B.default,shuffle:()=>U.default,shuffler:()=>U.shuffler,some:()=>W.default,sort:()=>Q.default,subset:()=>ne.default,sum:()=>z.default,superset:()=>re.default,thresholdFreedmanDiaconis:()=>y.default,thresholdScott:()=>v.default,thresholdSturges:()=>b.default,tickIncrement:()=>q.tickIncrement,tickStep:()=>q.tickStep,ticks:()=>q.default,transpose:()=>j.default,union:()=>ie.default,variance:()=>H.default,zip:()=>G.default});var r=n(52016),i=n(12902),a=n(86037),o=n(85843),s=n(98375),l=n(44124),u=n(79700),c=n(41180),d=n(19975),f=n(91454),p=n(11047),h=n(76223),g=n(63251),m=n(54901),y=n(95102),v=n(60191),b=n(57765),x=n(30846),E=n(4504),S=n(14375),w=n(96672),_=n(62128),A=n(49216),C=n(98026),T=n(94625),k=n(62447),R=n(14685),D=n(78314),N=n(84855),O=n(15671),F=n(6561),P=n(71440),M=n(65229),I=n(4681),$=n(36205),L=n(47817),B=n(16067),U=n(3493),z=n(91907),q=n(6946),j=n(60827),H=n(6613),G=n(51943),V=n(27991),W=n(65302),Y=n(20832),X=n(37718),K=n(39856),J=n(93618),Q=n(68886),Z=n(56209),ee=n(90030),te=n(30179),ne=n(92756),re=n(49871),ie=n(82311),ae=n(24119)},30179:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(24119);function i(e,...t){e=new r.InternSet(e),t=t.map(a);e:for(const n of e)for(const r of t)if(!r.has(n)){e.delete(n);continue e}return e}function a(e){return e instanceof r.InternSet?e:new r.InternSet(e)}},65229:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(12902);function i(e,t=r.default){let n,i=!1;if(1===t.length){let a;for(const o of e){const e=t(o);(i?(0,r.default)(e,a)<0:0===(0,r.default)(e,e))&&(n=o,a=e,i=!0)}}else for(const r of e)(i?t(r,n)<0:0===t(r,r))&&(n=r,i=!0);return n}},4681:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(12902),i=n(98026);function a(e,t=r.default){if(1===t.length)return(0,i.default)(e,t);let n,a=-1,o=-1;for(const r of e)++o,(a<0?0===t(r,r):t(r,n)<0)&&(n=r,a=o);return a}},37718:(e,t,n)=>{"use strict";function r(e,t){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!=typeof t)throw new TypeError("mapper is not a function");return Array.from(e,((n,r)=>t(n,r,e)))}n.r(t),n.d(t,{default:()=>r})},30846:(e,t,n)=>{"use strict";function r(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}n.r(t),n.d(t,{default:()=>r})},4504:(e,t,n)=>{"use strict";function r(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n=t)&&(n=t,r=i);else for(let a of e)null!=(a=t(a,++i,e))&&(n=a)&&(n=a,r=i);return r}n.r(t),n.d(t,{default:()=>r})},14375:(e,t,n)=>{"use strict";function r(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let a of e)null!=(a=t(a,++i,e))&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}n.r(t),n.d(t,{default:()=>r})},96672:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i,medianIndex:()=>a});var r=n(84855);function i(e,t){return(0,r.default)(e,.5,t)}function a(e,t){return(0,r.quantileIndex)(e,.5,t)}},62128:(e,t,n)=>{"use strict";function r(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}n.r(t),n.d(t,{default:()=>r})},49216:(e,t,n)=>{"use strict";function r(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}n.r(t),n.d(t,{default:()=>r})},98026:(e,t,n)=>{"use strict";function r(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n>t||void 0===n&&t>=t)&&(n=t,r=i);else for(let a of e)null!=(a=t(a,++i,e))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}n.r(t),n.d(t,{default:()=>r})},94625:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(24119);function i(e,t){const n=new r.InternMap;if(void 0===t)for(let t of e)null!=t&&t>=t&&n.set(t,(n.get(t)||0)+1);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&i>=i&&n.set(i,(n.get(i)||0)+1)}let i,a=0;for(const[e,t]of n)t>a&&(a=t,i=e);return i}},62447:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(6946);function i(e,t,n){let i;for(;;){const a=(0,r.tickIncrement)(e,t,n);if(a===i||0===a||!isFinite(a))return[e,t];a>0?(e=Math.floor(e/a)*a,t=Math.ceil(t/a)*a):a<0&&(e=Math.ceil(e*a)/a,t=Math.floor(t*a)/a),i=a}}},83131:(e,t,n)=>{"use strict";function r(e){return null===e?NaN:+e}function*i(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}n.r(t),n.d(t,{default:()=>r,numbers:()=>i})},14685:(e,t,n)=>{"use strict";function r(e,t=i){const n=[];let r,a=!1;for(const i of e)a&&n.push(t(r,i)),r=i,a=!0;return n}function i(e,t){return[e,t]}n.r(t),n.d(t,{default:()=>r,pair:()=>i})},78314:(e,t,n)=>{"use strict";function r(e,t){return Array.from(t,(t=>e[t]))}n.r(t),n.d(t,{default:()=>r})},84855:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d,quantileIndex:()=>p,quantileSorted:()=>f});var r=n(30846),i=n(4504),a=n(49216),o=n(98026),s=n(15671),l=n(83131),u=n(68886),c=n(36205);function d(e,t,n){if((i=(e=Float64Array.from((0,l.numbers)(e,n))).length)&&!isNaN(t=+t)){if(t<=0||i<2)return(0,a.default)(e);if(t>=1)return(0,r.default)(e);var i,o=(i-1)*t,u=Math.floor(o),c=(0,r.default)((0,s.default)(e,u).subarray(0,u+1));return c+((0,a.default)(e.subarray(u+1))-c)*(o-u)}}function f(e,t,n=l.default){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function p(e,t,n=l.default){if(!isNaN(t=+t)){if(r=Float64Array.from(e,((t,r)=>(0,l.default)(n(e[r],r,e)))),t<=0)return(0,o.default)(r);if(t>=1)return(0,i.default)(r);var r,a=Uint32Array.from(e,((e,t)=>t)),d=r.length-1,f=Math.floor(d*t);return(0,s.default)(a,f,0,d,((e,t)=>(0,u.ascendingDefined)(r[e],r[t]))),(f=(0,c.default)(a.subarray(0,f+1),(e=>r[e])))>=0?f:-1}}},15671:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(68886);function i(e,t,n=0,o=1/0,s){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),o=Math.floor(Math.min(e.length-1,o)),!(n<=t&&t<=o))return e;for(s=void 0===s?r.ascendingDefined:(0,r.compareDefined)(s);o>n;){if(o-n>600){const r=o-n+1,a=t-n+1,l=Math.log(r),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(r-u)/r)*(a-r/2<0?-1:1);i(e,t,Math.max(n,Math.floor(t-a*u/r+c)),Math.min(o,Math.floor(t+(r-a)*u/r+c)),s)}const r=e[t];let l=n,u=o;for(a(e,n,t),s(e[o],r)>0&&a(e,n,o);l0;)--u}0===s(e[n],r)?a(e,n,u):(++u,a(e,u,o)),u<=t&&(n=u+1),t<=u&&(o=u-1)}return e}function a(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}},6561:(e,t,n)=>{"use strict";function r(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++rr})},71440:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(12902),i=n(68886);function a(e,t=r.default){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");let n=Array.from(e);const a=new Float64Array(n.length);2!==t.length&&(n=n.map(t),t=r.default);const o=(e,r)=>t(n[e],n[r]);let s,l;return(e=Uint32Array.from(n,((e,t)=>t))).sort(t===r.default?(e,t)=>(0,i.ascendingDefined)(n[e],n[t]):(0,i.compareDefined)(o)),e.forEach(((e,t)=>{const n=o(e,void 0===s?e:s);n>=0?((void 0===s||n>0)&&(s=e,l=t),a[e]=l):a[e]=NaN})),a}},39856:(e,t,n)=>{"use strict";function r(e,t,n){if("function"!=typeof t)throw new TypeError("reducer is not a function");const r=e[Symbol.iterator]();let i,a,o=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++o}for(;({done:i,value:a}=r.next()),!i;)n=t(n,a,++o,e);return n}n.r(t),n.d(t,{default:()=>r})},93618:(e,t,n)=>{"use strict";function r(e){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(e).reverse()}n.r(t),n.d(t,{default:()=>r})},16067:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(4681);function i(e,t){const n=(0,r.default)(e,t);return n<0?void 0:n}},3493:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r,shuffler:()=>i});const r=i(Math.random);function i(e){return function(t,n=0,r=t.length){let i=r-(n=+n);for(;i;){const r=e()*i--|0,a=t[i+n];t[i+n]=t[r+n],t[r+n]=a}return t}}},65302:(e,t,n)=>{"use strict";function r(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");let n=-1;for(const r of e)if(t(r,++n,e))return!0;return!1}n.r(t),n.d(t,{default:()=>r})},68886:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ascendingDefined:()=>s,compareDefined:()=>o,default:()=>a});var r=n(12902),i=n(78314);function a(e,...t){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=t;if(n&&2!==n.length||t.length>1){const r=Uint32Array.from(e,((e,t)=>t));return t.length>1?(t=t.map((t=>e.map(t))),r.sort(((e,n)=>{for(const r of t){const t=s(r[e],r[n]);if(t)return t}}))):(n=e.map(n),r.sort(((e,t)=>s(n[e],n[t])))),(0,i.default)(e,r)}return e.sort(o(n))}function o(e=r.default){if(e===r.default)return s;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}function s(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(et?1:0)}},92756:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(49871);function i(e,t){return(0,r.default)(t,e)}},91907:(e,t,n)=>{"use strict";function r(e,t){let n=0;if(void 0===t)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}n.r(t),n.d(t,{default:()=>r})},49871:(e,t,n)=>{"use strict";function r(e,t){const n=e[Symbol.iterator](),r=new Set;for(const e of t){const t=i(e);if(r.has(t))continue;let a,o;for(;({value:a,done:o}=n.next());){if(o)return!1;const e=i(a);if(r.add(e),Object.is(t,e))break}}return!0}function i(e){return null!==e&&"object"==typeof e?e.valueOf():e}n.r(t),n.d(t,{default:()=>r})},95102:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(98375),i=n(84855);function a(e,t,n){const a=(0,r.default)(e),o=(0,i.default)(e,.75)-(0,i.default)(e,.25);return a&&o?Math.ceil((n-t)/(2*o*Math.pow(a,-1/3))):1}},60191:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(98375),i=n(19975);function a(e,t,n){const a=(0,r.default)(e),o=(0,i.default)(e);return a&&o?Math.ceil((n-t)*Math.cbrt(a)/(3.49*o)):1}},57765:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(98375);function i(e){return Math.max(1,Math.ceil(Math.log((0,r.default)(e))/Math.LN2)+1)}},6946:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,tickIncrement:()=>l,tickStep:()=>u});const r=Math.sqrt(50),i=Math.sqrt(10),a=Math.sqrt(2);function o(e,t,n){const s=(t-e)/Math.max(0,n),l=Math.floor(Math.log10(s)),u=s/Math.pow(10,l),c=u>=r?10:u>=i?5:u>=a?2:1;let d,f,p;return l<0?(p=Math.pow(10,-l)/c,d=Math.round(e*p),f=Math.round(t*p),d/pt&&--f,p=-p):(p=Math.pow(10,l)*c,d=Math.round(e/p),f=Math.round(t/p),d*pt&&--f),f0))return[];if((e=+e)===(t=+t))return[e];const r=t=i))return[];const l=a-i+1,u=new Array(l);if(r)if(s<0)for(let e=0;e{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(49216);function i(e){if(!(o=e.length))return[];for(var t=-1,n=(0,r.default)(e,a),i=new Array(n);++t{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(24119);function i(...e){const t=new r.InternSet;for(const n of e)for(const e of n)t.add(e);return t}},6613:(e,t,n)=>{"use strict";function r(e,t){let n,r=0,i=0,a=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(n=t-i,i+=n/++r,a+=n*(t-i));else{let o=-1;for(let s of e)null!=(s=t(s,++o,e))&&(s=+s)>=s&&(n=s-i,i+=n/++r,a+=n*(s-i))}if(r>1)return a/(r-1)}n.r(t),n.d(t,{default:()=>r})},51943:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(60827);function i(){return(0,r.default)(arguments)}},46957:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Color:()=>i,Rgb:()=>A,brighter:()=>o,darker:()=>a,default:()=>x,hsl:()=>F,hslConvert:()=>O,rgb:()=>_,rgbConvert:()=>w});var r=n(40871);function i(){}var a=.7,o=1/a,s="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c=/^#([0-9a-f]{3,8})$/,d=new RegExp(`^rgb\\(${s},${s},${s}\\)$`),f=new RegExp(`^rgb\\(${u},${u},${u}\\)$`),p=new RegExp(`^rgba\\(${s},${s},${s},${l}\\)$`),h=new RegExp(`^rgba\\(${u},${u},${u},${l}\\)$`),g=new RegExp(`^hsl\\(${l},${u},${u}\\)$`),m=new RegExp(`^hsla\\(${l},${u},${u},${l}\\)$`),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function x(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=c.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?E(t):3===n?new A(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?S(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?S(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=d.exec(e))?new A(t[1],t[2],t[3],1):(t=f.exec(e))?new A(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=p.exec(e))?S(t[1],t[2],t[3],t[4]):(t=h.exec(e))?S(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=g.exec(e))?N(t[1],t[2]/100,t[3]/100,1):(t=m.exec(e))?N(t[1],t[2]/100,t[3]/100,t[4]):y.hasOwnProperty(e)?E(y[e]):"transparent"===e?new A(NaN,NaN,NaN,0):null}function E(e){return new A(e>>16&255,e>>8&255,255&e,1)}function S(e,t,n,r){return r<=0&&(e=t=n=NaN),new A(e,t,n,r)}function w(e){return e instanceof i||(e=x(e)),e?new A((e=e.rgb()).r,e.g,e.b,e.opacity):new A}function _(e,t,n,r){return 1===arguments.length?w(e):new A(e,t,n,null==r?1:r)}function A(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function C(){return`#${D(this.r)}${D(this.g)}${D(this.b)}`}function T(){const e=k(this.opacity);return`${1===e?"rgb(":"rgba("}${R(this.r)}, ${R(this.g)}, ${R(this.b)}${1===e?")":`, ${e})`}`}function k(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function R(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function D(e){return((e=R(e))<16?"0":"")+e.toString(16)}function N(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new P(e,t,n,r)}function O(e){if(e instanceof P)return new P(e.h,e.s,e.l,e.opacity);if(e instanceof i||(e=x(e)),!e)return new P;if(e instanceof P)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-a,u=(o+a)/2;return l?(s=t===o?(n-r)/l+6*(n0&&u<1?0:s,new P(s,l,u,e.opacity)}function F(e,t,n,r){return 1===arguments.length?O(e):new P(e,t,n,null==r?1:r)}function P(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function M(e){return(e=(e||0)%360)<0?e+360:e}function I(e){return Math.max(0,Math.min(1,e||0))}function $(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}(0,r.default)(i,x,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:v,formatHex:v,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return O(this).formatHsl()},formatRgb:b,toString:b}),(0,r.default)(A,_,(0,r.extend)(i,{brighter(e){return e=null==e?o:Math.pow(o,e),new A(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?a:Math.pow(a,e),new A(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new A(R(this.r),R(this.g),R(this.b),k(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:C,formatHex:C,formatHex8:function(){return`#${D(this.r)}${D(this.g)}${D(this.b)}${D(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:T,toString:T})),(0,r.default)(P,F,(0,r.extend)(i,{brighter(e){return e=null==e?o:Math.pow(o,e),new P(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?a:Math.pow(a,e),new P(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new A($(e>=240?e-240:e+120,i,r),$(e,i,r),$(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new P(M(this.h),I(this.s),I(this.l),k(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=k(this.opacity);return`${1===e?"hsl(":"hsla("}${M(this.h)}, ${100*I(this.s)}%, ${100*I(this.l)}%${1===e?")":`, ${e})`}`}}))},75653:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Cubehelix:()=>g,default:()=>h});var r=n(40871),i=n(46957),a=n(49710),o=-.14861,s=1.78277,l=-.29227,u=-.90649,c=1.97294,d=c*u,f=c*s,p=s*l-u*o;function h(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof g)return new g(e.h,e.s,e.l,e.opacity);e instanceof i.Rgb||(e=(0,i.rgbConvert)(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(p*r+d*t-f*n)/(p+d-f),s=r-o,h=(c*(n-o)-l*s)/u,m=Math.sqrt(h*h+s*s)/(c*o*(1-o)),y=m?Math.atan2(h,s)*a.degrees-120:NaN;return new g(y<0?y+360:y,m,o,e.opacity)}(e):new g(e,t,n,null==r?1:r)}function g(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}(0,r.default)(g,h,(0,r.extend)(i.Color,{brighter(e){return e=null==e?i.brighter:Math.pow(i.brighter,e),new g(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?i.darker:Math.pow(i.darker,e),new g(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*a.radians,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),d=Math.sin(e);return new i.Rgb(255*(t+n*(o*r+s*d)),255*(t+n*(l*r+u*d)),255*(t+n*(c*r)),this.opacity)}}))},40871:(e,t,n)=>{"use strict";function r(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function i(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}n.r(t),n.d(t,{default:()=>r,extend:()=>i})},72090:(e,t,n)=>{"use strict";n.r(t),n.d(t,{color:()=>r.default,cubehelix:()=>a.default,gray:()=>i.gray,hcl:()=>i.hcl,hsl:()=>r.hsl,lab:()=>i.default,lch:()=>i.lch,rgb:()=>r.rgb});var r=n(46957),i=n(19853),a=n(75653)},19853:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Hcl:()=>_,Lab:()=>m,default:()=>g,gray:()=>h,hcl:()=>w,lch:()=>S});var r=n(40871),i=n(46957),a=n(49710);const o=.96422,s=1,l=.82521,u=4/29,c=6/29,d=3*c*c,f=c*c*c;function p(e){if(e instanceof m)return new m(e.l,e.a,e.b,e.opacity);if(e instanceof _)return A(e);e instanceof i.Rgb||(e=(0,i.rgbConvert)(e));var t,n,r=x(e.r),a=x(e.g),u=x(e.b),c=y((.2225045*r+.7168786*a+.0606169*u)/s);return r===a&&a===u?t=n=c:(t=y((.4360747*r+.3850649*a+.1430804*u)/o),n=y((.0139322*r+.0971045*a+.7141733*u)/l)),new m(116*c-16,500*(t-c),200*(c-n),e.opacity)}function h(e,t){return new m(e,0,0,null==t?1:t)}function g(e,t,n,r){return 1===arguments.length?p(e):new m(e,t,n,null==r?1:r)}function m(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function y(e){return e>f?Math.pow(e,1/3):e/d+u}function v(e){return e>c?e*e*e:d*(e-u)}function b(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function x(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function E(e){if(e instanceof _)return new _(e.h,e.c,e.l,e.opacity);if(e instanceof m||(e=p(e)),0===e.a&&0===e.b)return new _(NaN,0{"use strict";n.r(t),n.d(t,{degrees:()=>i,radians:()=>r});const r=Math.PI/180,i=180/Math.PI},34971:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(40123),i=n(37729),a=n(56186),o=n(67778);const s=2*Math.PI,l=Math.pow;function u(e){return e[0]}function c(e){return e[1]}function d(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class f{static from(e,t=u,n=c,r){return new f("length"in e?function(e,t,n,r){const i=e.length,a=new Float64Array(2*i);for(let o=0;o2&&function(e){const{triangles:t,coords:n}=e;for(let e=0;e1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},((e,t)=>t)).sort(((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]));const e=this.collinear[0],n=this.collinear[this.collinear.length-1],i=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],a=1e-8*Math.hypot(i[3]-i[1],i[2]-i[0]);for(let e=0,n=t.length/2;e0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],o[i[0]]=1,2===i.length&&(o[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new o.default(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:r,halfedges:i,triangles:a,collinear:o}=this;if(o){const t=o.indexOf(e);return t>0&&(yield o[t-1]),void(t=0&&i!==n&&i!==r;)n=i;return i}_step(e,t,n){const{inedges:r,hull:i,_hullIndex:a,halfedges:o,triangles:s,points:u}=this;if(-1===r[e]||!u.length)return(e+1)%(u.length>>1);let c=e,d=l(t-u[2*e],2)+l(n-u[2*e+1],2);const f=r[e];let p=f;do{let r=s[p];const f=l(t-u[2*r],2)+l(n-u[2*r+1],2);if(f{"use strict";n.r(t),n.d(t,{Delaunay:()=>r.default,Voronoi:()=>i.default});var r=n(34971),i=n(67778)},37729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});const r=1e-6;class i{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){const i=(e=+e)+(n=+n),a=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${i},${a}`:(Math.abs(this._x1-i)>r||Math.abs(this._y1-a)>r)&&(this._+="L"+i+","+a),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=i},${this._y1=a}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}},56186:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});class r{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}},67778:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(37729),i=n(56186);class a{constructor(e,[t,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(t=+t)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=r,this.xmin=t,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this;let i,a;const o=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,s,l=0,u=0,c=n.length;l1;)a-=2;for(let e=2;e0){if(t>=this.ymax)return null;(i=(this.ymax-t)/r)0){if(e>=this.xmax)return null;(i=(this.xmax-e)/n)this.xmax?2:0)|(tthis.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let t=0;t{"use strict";n.r(t),n.d(t,{default:()=>l});var r={value:()=>{}};function i(){for(var e,t=0,n=arguments.length,r={};t=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),l=-1,u=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++l0)for(var n,r,i=new Array(n),a=0;a{"use strict";n.r(t),n.d(t,{dispatch:()=>r.default});var r=n(41089)},62569:(e,t,n)=>{"use strict";function r(e){for(var t in e){var n,r,a=e[t].trim();if(a)if("true"===a)a=!0;else if("false"===a)a=!1;else if("NaN"===a)a=NaN;else if(isNaN(n=+a)){if(!(r=a.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;i&&r[4]&&!r[7]&&(a=a.replace(/-/g,"/").replace(/T/," ")),a=new Date(a)}else a=n;else a=null;e[t]=a}return e}n.r(t),n.d(t,{default:()=>r});const i=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours()},93004:(e,t,n)=>{"use strict";n.r(t),n.d(t,{csvFormat:()=>o,csvFormatBody:()=>s,csvFormatRow:()=>u,csvFormatRows:()=>l,csvFormatValue:()=>c,csvParse:()=>i,csvParseRows:()=>a});var r=(0,n(6973).default)(","),i=r.parse,a=r.parseRows,o=r.format,s=r.formatBody,l=r.formatRows,u=r.formatRow,c=r.formatValue},6973:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r={},i={},a=34,o=10,s=13;function l(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function u(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var r in e)r in t||n.push(t[r]=r)})),n}function c(e,t){var n=e+"",r=n.length;return r9999?"+"+c(t,6):c(t,4))+"-"+c(e.getUTCMonth()+1,2)+"-"+c(e.getUTCDate(),2)+(a?"T"+c(n,2)+":"+c(r,2)+":"+c(i,2)+"."+c(a,3)+"Z":i?"T"+c(n,2)+":"+c(r,2)+":"+c(i,2)+"Z":r||n?"T"+c(n,2)+":"+c(r,2)+"Z":"")}function f(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function c(e,t){var l,u=[],c=e.length,d=0,f=0,p=c<=0,h=!1;function g(){if(p)return i;if(h)return h=!1,r;var t,l,u=d;if(e.charCodeAt(u)===a){for(;d++=c?p=!0:(l=e.charCodeAt(d++))===o?h=!0:l===s&&(h=!0,e.charCodeAt(d)===o&&++d),e.slice(u+1,t-1).replace(/""/g,'"')}for(;d{"use strict";n.r(t),n.d(t,{autoType:()=>o.default,csvFormat:()=>i.csvFormat,csvFormatBody:()=>i.csvFormatBody,csvFormatRow:()=>i.csvFormatRow,csvFormatRows:()=>i.csvFormatRows,csvFormatValue:()=>i.csvFormatValue,csvParse:()=>i.csvParse,csvParseRows:()=>i.csvParseRows,dsvFormat:()=>r.default,tsvFormat:()=>a.tsvFormat,tsvFormatBody:()=>a.tsvFormatBody,tsvFormatRow:()=>a.tsvFormatRow,tsvFormatRows:()=>a.tsvFormatRows,tsvFormatValue:()=>a.tsvFormatValue,tsvParse:()=>a.tsvParse,tsvParseRows:()=>a.tsvParseRows});var r=n(6973),i=n(93004),a=n(93357),o=n(62569)},93357:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tsvFormat:()=>o,tsvFormatBody:()=>s,tsvFormatRow:()=>u,tsvFormatRows:()=>l,tsvFormatValue:()=>c,tsvParse:()=>i,tsvParseRows:()=>a});var r=(0,n(6973).default)("\t"),i=r.parse,a=r.parseRows,o=r.format,s=r.formatBody,l=r.formatRows,u=r.formatRow,c=r.formatValue},23093:(e,t,n)=>{"use strict";function r(e,t){var n,r=1;function i(){var i,a,o=n.length,s=0,l=0;for(i=0;ir})},3608:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(67686),i=n(10024),a=n(58480);function o(e){return e.x+e.vx}function s(e){return e.y+e.vy}function l(e){var t,n,l,u=1,c=1;function d(){for(var e,i,d,p,h,g,m,y=t.length,v=0;vp+c||rh+c||id.index){var f=p-o.x-o.vx,y=h-o.y-o.vy,v=f*f+y*y;ve.r&&(e.r=e[t].r)}function p(){if(t){var r,i,a=t.length;for(n=new Array(a),r=0;r{"use strict";function r(e){return function(){return e}}n.r(t),n.d(t,{default:()=>r})},14310:(e,t,n)=>{"use strict";n.r(t),n.d(t,{forceCenter:()=>r.default,forceCollide:()=>i.default,forceLink:()=>a.default,forceManyBody:()=>o.default,forceRadial:()=>s.default,forceSimulation:()=>l.default,forceX:()=>u.default,forceY:()=>c.default});var r=n(23093),i=n(3608),a=n(7960),o=n(74635),s=n(7979),l=n(71955),u=n(29390),c=n(62349)},58480:(e,t,n)=>{"use strict";function r(e){return 1e-6*(e()-.5)}n.r(t),n.d(t,{default:()=>r})},24856:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const r=1664525,i=1013904223,a=4294967296;function o(){let e=1;return()=>(e=(r*e+i)%a)/a}},7960:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(10024),i=n(58480);function a(e){return e.index}function o(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function s(e){var t,n,s,l,u,c,d=a,f=function(e){return 1/Math.min(l[e.source.index],l[e.target.index])},p=(0,r.default)(30),h=1;function g(r){for(var a=0,o=e.length;a[d(e,t,s),e])));for(r=0,l=new Array(a);r{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(67686),i=n(10024),a=n(58480),o=n(71955);function s(){var e,t,n,s,l,u=(0,i.default)(-30),c=1,d=1/0,f=.81;function p(n){var i,a=e.length,l=(0,r.quadtree)(e,o.x,o.y).visitAfter(g);for(s=n,i=0;i=d)){(e.data!==t||e.next)&&(0===u&&(g+=(u=(0,a.default)(n))*u),0===p&&(g+=(p=(0,a.default)(n))*p),g{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(10024);function i(e,t,n){var i,a,o,s=(0,r.default)(.1);function l(e){for(var r=0,s=i.length;r{"use strict";n.r(t),n.d(t,{default:()=>c,x:()=>o,y:()=>s});var r=n(59167),i=n(52456),a=n(24856);function o(e){return e.x}function s(e){return e.y}var l=10,u=Math.PI*(3-Math.sqrt(5));function c(e){var t,n=1,o=.001,s=1-Math.pow(o,1/300),c=0,d=.6,f=new Map,p=(0,i.timer)(m),h=(0,r.dispatch)("tick","end"),g=(0,a.default)();function m(){y(),h.call("tick",t),n1?(null==n?f.delete(e):f.set(e,b(n)),t):f.get(e)},find:function(t,n,r){var i,a,o,s,l,u=0,c=e.length;for(null==r?r=1/0:r*=r,u=0;u1?(h.on(e,n),t):h.on(e)}}}},29390:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(10024);function i(e){var t,n,i,a=(0,r.default)(.1);function o(e){for(var r,a=0,o=t.length;a{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(10024);function i(e){var t,n,i,a=(0,r.default)(.1);function o(e){for(var r,a=0,o=t.length;a{"use strict";n.r(t),n.d(t,{default:()=>s,format:()=>i,formatPrefix:()=>a});var r,i,a,o=n(16410);function s(e){return r=(0,o.default)(e),i=r.format,a=r.formatPrefix,r}s({thousands:",",grouping:[3],currency:["$",""]})},47235:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(95204);function i(e){return(e=(0,r.formatDecimalParts)(Math.abs(e)))?e[1]:NaN}},95204:(e,t,n)=>{"use strict";function r(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function i(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}n.r(t),n.d(t,{default:()=>r,formatDecimalParts:()=>i})},37168:(e,t,n)=>{"use strict";function r(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}n.r(t),n.d(t,{default:()=>r})},91728:(e,t,n)=>{"use strict";function r(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}n.r(t),n.d(t,{default:()=>r})},83520:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,prefixExponent:()=>r});var r,i=n(95204);function a(e,t){var n=(0,i.formatDecimalParts)(e,t);if(!n)return e+"";var a=n[0],o=n[1],s=o-(r=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+(0,i.formatDecimalParts)(e,Math.max(0,t+s-1))[0]}},63554:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(95204);function i(e,t){var n=(0,r.formatDecimalParts)(e,t);if(!n)return e+"";var i=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}},1631:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FormatSpecifier:()=>a,default:()=>i});var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(e){if(!(t=r.exec(e)))throw new Error("invalid format: "+e);var t;return new a({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function a(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}i.prototype=a.prototype,a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}},46715:(e,t,n)=>{"use strict";function r(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}n.r(t),n.d(t,{default:()=>r})},1866:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(95204),i=n(83520),a=n(63554);const o={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:r.default,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>(0,a.default)(100*e,t),r:a.default,s:i.default,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}},69986:(e,t,n)=>{"use strict";function r(e){return e}n.r(t),n.d(t,{default:()=>r})},4710:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FormatSpecifier:()=>a.FormatSpecifier,format:()=>r.format,formatDefaultLocale:()=>r.default,formatLocale:()=>i.default,formatPrefix:()=>r.formatPrefix,formatSpecifier:()=>a.default,precisionFixed:()=>o.default,precisionPrefix:()=>s.default,precisionRound:()=>l.default});var r=n(48701),i=n(16410),a=n(1631),o=n(1734),s=n(67590),l=n(99460)},16410:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(47235),i=n(37168),a=n(91728),o=n(1631),s=n(46715),l=n(1866),u=n(83520),c=n(69986),d=Array.prototype.map,f=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function p(e){var t=void 0===e.grouping||void 0===e.thousands?c.default:(0,i.default)(d.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",p=void 0===e.currency?"":e.currency[1]+"",h=void 0===e.decimal?".":e.decimal+"",g=void 0===e.numerals?c.default:(0,a.default)(d.call(e.numerals,String)),m=void 0===e.percent?"%":e.percent+"",y=void 0===e.minus?"\u2212":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function b(e){var r=(e=(0,o.default)(e)).fill,i=e.align,a=e.sign,c=e.symbol,d=e.zero,b=e.width,x=e.comma,E=e.precision,S=e.trim,w=e.type;"n"===w?(x=!0,w="g"):l.default[w]||(void 0===E&&(E=12),S=!0,w="g"),(d||"0"===r&&"="===i)&&(d=!0,r="0",i="=");var _="$"===c?n:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A="$"===c?p:/[%p]/.test(w)?m:"",C=l.default[w],T=/[defgprs%]/.test(w);function k(e){var n,o,l,c=_,p=A;if("c"===w)p=C(e)+p,e="";else{var m=(e=+e)<0||1/e<0;if(e=isNaN(e)?v:C(Math.abs(e),E),S&&(e=(0,s.default)(e)),m&&0==+e&&"+"!==a&&(m=!1),c=(m?"("===a?a:y:"-"===a||"("===a?"":a)+c,p=("s"===w?f[8+u.prefixExponent/3]:"")+p+(m&&"("===a?")":""),T)for(n=-1,o=e.length;++n(l=e.charCodeAt(n))||l>57){p=(46===l?h+e.slice(n+1):e.slice(n))+p,e=e.slice(0,n);break}}x&&!d&&(e=t(e,1/0));var k=c.length+e.length+p.length,R=k>1)+c+e+p+R.slice(k);break;default:e=R+c+e+p}return g(e)}return E=void 0===E?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E)),k.toString=function(){return e+""},k}return{format:b,formatPrefix:function(e,t){var n=b(((e=(0,o.default)(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor((0,r.default)(t)/3))),a=Math.pow(10,-i),s=f[8+i/3];return function(e){return n(a*e)+s}}}}},1734:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(47235);function i(e){return Math.max(0,-(0,r.default)(Math.abs(e)))}},67590:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(47235);function i(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor((0,r.default)(t)/3)))-(0,r.default)(Math.abs(e)))}},99460:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(47235);function i(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,(0,r.default)(t)-(0,r.default)(e))+1}},66841:(e,t,n)=>{"use strict";n.r(t),n.d(t,{airyRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e){var t=(0,i.tan)(e/2),n=2*(0,i.log)((0,i.cos)(e/2))/(t*t);function r(e,t){var r=(0,i.cos)(e),a=(0,i.cos)(t),o=(0,i.sin)(t),s=a*r,l=-((1-s?(0,i.log)((1+s)/2)/(1-s):-.5)+n/(1+s));return[l*a*(0,i.sin)(e),l*o]}return r.invert=function(t,r){var a,o=(0,i.sqrt)(t*t+r*r),s=-e/2,l=50;if(!o)return[0,0];do{var u=s/2,c=(0,i.cos)(u),d=(0,i.sin)(u),f=d/c,p=-(0,i.log)((0,i.abs)(c));s-=a=(2/f*p-n*f-o)/(-p/(d*d)+1-n/(2*c*c))*(c<0?.7:1)}while((0,i.abs)(a)>i.epsilon&&--l>0);var h=(0,i.sin)(s);return[(0,i.atan2)(t*h,o*(0,i.cos)(s)),(0,i.asin)(r*h/o)]},r}function o(){var e=i.halfPi,t=(0,r.geoProjectionMutator)(a),n=t(e);return n.radius=function(n){return arguments.length?t(e=n*i.radians):e*i.degrees},n.scale(179.976).clipAngle(147)}},11949:(e,t,n)=>{"use strict";n.r(t),n.d(t,{aitoffRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.cos)(t),r=(0,i.sinci)((0,i.acos)(n*(0,i.cos)(e/=2)));return[2*n*(0,i.sin)(e)*r,(0,i.sin)(t)*r]}function o(){return(0,r.geoProjection)(a).scale(152.63)}a.invert=function(e,t){if(!(e*e+4*t*t>i.pi*i.pi+i.epsilon)){var n=e,r=t,a=25;do{var o,s=(0,i.sin)(n),l=(0,i.sin)(n/2),u=(0,i.cos)(n/2),c=(0,i.sin)(r),d=(0,i.cos)(r),f=(0,i.sin)(2*r),p=c*c,h=d*d,g=l*l,m=1-h*u*u,y=m?(0,i.acos)(d*u)*(0,i.sqrt)(o=1/m):o=0,v=2*y*d*l-e,b=y*c-t,x=o*(h*g+y*d*u*p),E=o*(.5*s*f-2*y*c*l),S=.25*o*(f*l-y*c*h*s),w=o*(p*u+y*g*d),_=E*S-w*x;if(!_)break;var A=(b*E-v*w)/_,C=(v*S-b*x)/_;n-=A,r-=C}while(((0,i.abs)(A)>i.epsilon||(0,i.abs)(C)>i.epsilon)&&--a>0);return[n,r]}}},5095:(e,t,n)=>{"use strict";n.r(t),n.d(t,{armadilloRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e){var t=(0,i.sin)(e),n=(0,i.cos)(e),r=e>=0?1:-1,a=(0,i.tan)(r*e),o=(1+t-n)/2;function s(e,s){var l=(0,i.cos)(s),u=(0,i.cos)(e/=2);return[(1+l)*(0,i.sin)(e),(r*s>-(0,i.atan2)(u,a)-.001?0:10*-r)+o+(0,i.sin)(s)*n-(1+l)*t*u]}return s.invert=function(e,s){var l=0,u=0,c=50;do{var d=(0,i.cos)(l),f=(0,i.sin)(l),p=(0,i.cos)(u),h=(0,i.sin)(u),g=1+p,m=g*f-e,y=o+h*n-g*t*d-s,v=g*d/2,b=-f*h,x=t*g*f/2,E=n*p+t*d*h,S=b*x-E*v,w=(y*b-m*E)/S/2,_=(m*x-y*v)/S;(0,i.abs)(_)>2&&(_/=2),l-=w,u-=_}while(((0,i.abs)(w)>i.epsilon||(0,i.abs)(_)>i.epsilon)&&--c>0);return r*u>-(0,i.atan2)((0,i.cos)(l),a)-.001?[2*l,u]:null},s}function o(){var e=20*i.radians,t=e>=0?1:-1,n=(0,i.tan)(t*e),o=(0,r.geoProjectionMutator)(a),s=o(e),l=s.stream;return s.parallel=function(r){return arguments.length?(n=(0,i.tan)((t=(e=r*i.radians)>=0?1:-1)*e),o(e)):e*i.degrees},s.stream=function(r){var a=s.rotate(),o=l(r),u=(s.rotate([0,0]),l(r)),c=s.precision();return s.rotate(a),o.sphere=function(){u.polygonStart(),u.lineStart();for(var r=-180*t;t*r<180;r+=90*t)u.point(r,90*t);if(e)for(;t*(r-=3*t*c)>=-180;)u.point(r,t*-(0,i.atan2)((0,i.cos)(r*i.radians/2),n)*i.degrees);u.lineEnd(),u.polygonEnd()},o},s.scale(218.695).center([0,28.0974])}},70063:(e,t,n)=>{"use strict";n.r(t),n.d(t,{augustRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.tan)(t/2),r=(0,i.sqrt)(1-n*n),a=1+r*(0,i.cos)(e/=2),o=(0,i.sin)(e)*r/a,s=n/a,l=o*o,u=s*s;return[4/3*o*(3+l-3*u),4/3*s*(3+3*l-u)]}function o(){return(0,r.geoProjection)(a).scale(66.1603)}a.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&(0,i.abs)(t)>1)return null;var n=1+e*e+t*t,r=(0,i.sqrt)((n-(0,i.sqrt)(n*n-4*t*t))/2),a=(0,i.asin)(r)/3,o=r?(0,i.arcosh)((0,i.abs)(t/r))/3:(0,i.arsinh)((0,i.abs)(e))/3,s=(0,i.cos)(a),l=(0,i.cosh)(o),u=l*l-s*s;return[2*(0,i.sign)(e)*(0,i.atan2)((0,i.sinh)(o)*s,.25-u),2*(0,i.sign)(t)*(0,i.atan2)(l*(0,i.sin)(a),.25+u)]}},74925:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bakerRaw:()=>s,default:()=>l});var r=n(51300),i=n(28184),a=(0,i.sqrt)(8),o=(0,i.log)(1+i.sqrt2);function s(e,t){var n=(0,i.abs)(t);return ni.epsilon2&&--l>0);return[e/((0,i.cos)(s)*(a-1/(0,i.sin)(s))),(0,i.sign)(t)*s]}},55607:(e,t,n)=>{"use strict";n.r(t),n.d(t,{berghausRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e){var t=2*i.pi/e;function n(e,n){var a=(0,r.geoAzimuthalEquidistantRaw)(e,n);if((0,i.abs)(e)>i.halfPi){var o=(0,i.atan2)(a[1],a[0]),s=(0,i.sqrt)(a[0]*a[0]+a[1]*a[1]),l=t*(0,i.round)((o-i.halfPi)/t)+i.halfPi,u=(0,i.atan2)((0,i.sin)(o-=l),2-(0,i.cos)(o));o=l+(0,i.asin)(i.pi/s*(0,i.sin)(u))-u,a[0]=s*(0,i.cos)(o),a[1]=s*(0,i.sin)(o)}return a}return n.invert=function(e,n){var a=(0,i.sqrt)(e*e+n*n);if(a>i.halfPi){var o=(0,i.atan2)(n,e),s=t*(0,i.round)((o-i.halfPi)/t)+i.halfPi,l=o>s?-1:1,u=a*(0,i.cos)(s-o),c=1/(0,i.tan)(l*(0,i.acos)((u-i.pi)/(0,i.sqrt)(i.pi*(i.pi-2*u)+a*a)));o=s+2*(0,i.atan)((c+l*(0,i.sqrt)(c*c-3))/3),e=a*(0,i.cos)(o),n=a*(0,i.sin)(o)}return r.geoAzimuthalEquidistantRaw.invert(e,n)},n}function o(){var e=5,t=(0,r.geoProjectionMutator)(a),n=t(e),o=n.stream,s=.01,l=-(0,i.cos)(s*i.radians),u=(0,i.sin)(s*i.radians);return n.lobes=function(n){return arguments.length?t(e=+n):e},n.stream=function(t){var r=n.rotate(),a=o(t),c=(n.rotate([0,0]),o(t));return n.rotate(r),a.sphere=function(){c.polygonStart(),c.lineStart();for(var t=0,n=360/e,r=2*i.pi/e,a=90-180/e,o=i.halfPi;t{"use strict";n.r(t),n.d(t,{bertin1953Raw:()=>s,default:()=>l});var r=n(51300),i=n(72304),a=n(28184),o=n(11209);function s(){var e=(0,i.hammerRaw)(1.68,2);function t(t,n){if(t+n<-1.4){var r=(t-n+1.6)*(t+n+1.4)/8;t+=r,n-=.8*r*(0,a.sin)(n+a.pi/2)}var i=e(t,n),o=(1-(0,a.cos)(t*n))/12;return i[1]<0&&(i[0]*=1+o),i[1]>0&&(i[1]*=1+o/1.5*i[0]*i[0]),i}return t.invert=(0,o.solve2d)(t),t}function l(){return(0,r.geoProjection)(s()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}},83314:(e,t,n)=>{"use strict";n.r(t),n.d(t,{boggsRaw:()=>l,default:()=>u});var r=n(51300),i=n(88860),a=n(28184),o=2.00276,s=1.11072;function l(e,t){var n=(0,i.mollweideBromleyTheta)(a.pi,t);return[o*e/(1/(0,a.cos)(t)+s/(0,a.cos)(n)),(t+a.sqrt2*(0,a.sin)(n))/o]}function u(){return(0,r.geoProjection)(l).scale(160.857)}l.invert=function(e,t){var n,r,i=o*t,l=t<0?-a.quarterPi:a.quarterPi,u=25;do{r=i-a.sqrt2*(0,a.sin)(l),l-=n=((0,a.sin)(2*l)+2*l-a.pi*(0,a.sin)(r))/(2*(0,a.cos)(2*l)+2+a.pi*(0,a.cos)(r)*a.sqrt2*(0,a.cos)(l))}while((0,a.abs)(n)>a.epsilon&&--u>0);return r=i-a.sqrt2*(0,a.sin)(l),[e*(1/(0,a.cos)(r)+s/(0,a.cos)(l))/o,r]}},17402:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bonneRaw:()=>o,default:()=>s});var r=n(66462),i=n(28184),a=n(85801);function o(e){if(!e)return a.sinusoidalRaw;var t=1/(0,i.tan)(e);function n(n,r){var a=t+e-r,o=a?n*(0,i.cos)(r)/a:a;return[a*(0,i.sin)(o),t-a*(0,i.cos)(o)]}return n.invert=function(n,r){var a=(0,i.sqrt)(n*n+(r=t-r)*r),o=t+e-a;return[a/(0,i.cos)(o)*(0,i.atan2)(n,r),o]},n}function s(){return(0,r.default)(o).scale(123.082).center([0,26.1441]).parallel(45)}},14423:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bottomleyRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e){function t(t,n){var r=i.halfPi-n,a=r?t*e*(0,i.sin)(r)/r:r;return[r*(0,i.sin)(a)/e,i.halfPi-r*(0,i.cos)(a)]}return t.invert=function(t,n){var r=t*e,a=i.halfPi-n,o=(0,i.sqrt)(r*r+a*a),s=(0,i.atan2)(r,a);return[(o?o/(0,i.sin)(o):1)*s/e,i.halfPi-o]},t}function o(){var e=.5,t=(0,r.geoProjectionMutator)(a),n=t(e);return n.fraction=function(n){return arguments.length?t(e=+n):e},n.scale(158.837)}},54418:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bromleyRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184),a=(0,n(88860).mollweideBromleyRaw)(1,4/i.pi,i.pi);function o(){return(0,r.geoProjection)(a).scale(152.63)}},64975:(e,t,n)=>{"use strict";n.r(t),n.d(t,{chamberlinAfrica:()=>d,chamberlinRaw:()=>u,default:()=>f});var r=n(51300),i=n(28184),a=n(11209);function o(e,t,n,r,a,o){var s,l=(0,i.cos)(o);if((0,i.abs)(e)>1||(0,i.abs)(o)>1)s=(0,i.acos)(n*a+t*r*l);else{var u=(0,i.sin)(e/2),c=(0,i.sin)(o/2);s=2*(0,i.asin)((0,i.sqrt)(u*u+t*r*c*c))}return(0,i.abs)(s)>i.epsilon?[s,(0,i.atan2)(r*(0,i.sin)(o),t*a-n*r*l)]:[0,0]}function s(e,t,n){return(0,i.acos)((e*e+t*t-n*n)/(2*e*t))}function l(e){return e-2*i.pi*(0,i.floor)((e+i.pi)/(2*i.pi))}function u(e,t,n){for(var r,a=[[e[0],e[1],(0,i.sin)(e[1]),(0,i.cos)(e[1])],[t[0],t[1],(0,i.sin)(t[1]),(0,i.cos)(t[1])],[n[0],n[1],(0,i.sin)(n[1]),(0,i.cos)(n[1])]],u=a[2],c=0;c<3;++c,u=r)r=a[c],u.v=o(r[1]-u[1],u[3],u[2],r[3],r[2],r[0]-u[0]),u.point=[0,0];var d=s(a[0].v[0],a[2].v[0],a[1].v[0]),f=s(a[0].v[0],a[1].v[0],a[2].v[0]),p=i.pi-d;a[2].point[1]=0,a[0].point[0]=-(a[1].point[0]=a[0].v[0]/2);var h=[a[2].point[0]=a[0].point[0]+a[2].v[0]*(0,i.cos)(d),2*(a[0].point[1]=a[1].point[1]=a[2].v[0]*(0,i.sin)(d))];return function(e,t){var n,r=(0,i.sin)(t),u=(0,i.cos)(t),c=new Array(3);for(n=0;n<3;++n){var d=a[n];if(c[n]=o(t-d[1],d[3],d[2],u,r,e-d[0]),!c[n][0])return d.point;c[n][1]=l(c[n][1]-d.v[1])}var g=h.slice();for(n=0;n<3;++n){var m=2==n?0:n+1,y=s(a[n].v[0],c[n][0],c[m][0]);c[n][1]<0&&(y=-y),n?1==n?(y=f-y,g[0]-=c[n][0]*(0,i.cos)(y),g[1]-=c[n][0]*(0,i.sin)(y)):(y=p-y,g[0]+=c[n][0]*(0,i.cos)(y),g[1]+=c[n][0]*(0,i.sin)(y)):(g[0]+=c[n][0]*(0,i.cos)(y),g[1]-=c[n][0]*(0,i.sin)(y))}return g[0]/=3,g[1]/=3,g}}function c(e){return e[0]*=i.radians,e[1]*=i.radians,e}function d(){return f([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function f(e,t,n){var i=(0,r.geoCentroid)({type:"MultiPoint",coordinates:[e,t,n]}),o=[-i[0],-i[1]],s=(0,r.geoRotation)(o),l=u(c(s(e)),c(s(t)),c(s(n)));l.invert=(0,a.solve2d)(l);var d=(0,r.geoProjection)(l).rotate(o),f=d.center;return delete d.rotate,d.center=function(e){return arguments.length?f(s(e)):s.invert(f())},d.clipAngle(90)}},8077:(e,t,n)=>{"use strict";n.r(t),n.d(t,{collignonRaw:()=>a,default:()=>o});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.sqrt)(1-(0,i.sin)(t));return[2/i.sqrtPi*e*n,i.sqrtPi*(1-n)]}function o(){return(0,r.geoProjection)(a).scale(95.6464).center([0,30])}a.invert=function(e,t){var n=(n=t/i.sqrtPi-1)*n;return[n>0?e*(0,i.sqrt)(i.pi/n)/2:0,(0,i.asin)(1-n)]}},34924:(e,t,n)=>{"use strict";n.r(t),n.d(t,{craigRaw:()=>a,default:()=>o});var r=n(28184),i=n(66462);function a(e){var t=(0,r.tan)(e);function n(e,n){return[e,(e?e/(0,r.sin)(e):1)*((0,r.sin)(n)*(0,r.cos)(e)-t*(0,r.cos)(n))]}return n.invert=t?function(e,n){e&&(n*=(0,r.sin)(e)/e);var i=(0,r.cos)(e);return[e,2*(0,r.atan2)((0,r.sqrt)(i*i+t*t-n*n)-i,t-n)]}:function(e,t){return[e,(0,r.asin)(e?t*(0,r.tan)(e)/e:t)]},n}function o(){return(0,i.default)(a).scale(249.828).clipAngle(90)}},27884:(e,t,n)=>{"use strict";n.r(t),n.d(t,{crasterRaw:()=>o,default:()=>s});var r=n(51300),i=n(28184),a=(0,i.sqrt)(3);function o(e,t){return[a*e*(2*(0,i.cos)(2*t/3)-1)/i.sqrtPi,a*i.sqrtPi*(0,i.sin)(t/3)]}function s(){return(0,r.geoProjection)(o).scale(156.19)}o.invert=function(e,t){var n=3*(0,i.asin)(t/(a*i.sqrtPi));return[i.sqrtPi*e/(a*(2*(0,i.cos)(2*n/3)-1)),n]}},2311:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cylindricalEqualAreaRaw:()=>a,default:()=>o});var r=n(28184),i=n(66462);function a(e){var t=(0,r.cos)(e);function n(e,n){return[e*t,(0,r.sin)(n)/t]}return n.invert=function(e,n){return[e/t,(0,r.asin)(n*t)]},n}function o(){return(0,i.default)(a).parallel(38.58).scale(195.044)}},4286:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cylindricalStereographicRaw:()=>a,default:()=>o});var r=n(28184),i=n(66462);function a(e){var t=(0,r.cos)(e);function n(e,n){return[e*t,(1+t)*(0,r.tan)(n/2)]}return n.invert=function(e,n){return[e/t,2*(0,r.atan)(n/(1+t))]},n}function o(){return(0,i.default)(a).scale(124.75)}},76745:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert1Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.sqrt)(8/(3*i.pi));return[n*e*(1-(0,i.abs)(t)/i.pi),n*t]}function o(){return(0,r.geoProjection)(a).scale(165.664)}a.invert=function(e,t){var n=(0,i.sqrt)(8/(3*i.pi)),r=t/n;return[e/(n*(1-(0,i.abs)(r)/i.pi)),r]}},43792:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert2Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.sqrt)(4-3*(0,i.sin)((0,i.abs)(t)));return[2/(0,i.sqrt)(6*i.pi)*e*n,(0,i.sign)(t)*(0,i.sqrt)(2*i.pi/3)*(2-n)]}function o(){return(0,r.geoProjection)(a).scale(165.664)}a.invert=function(e,t){var n=2-(0,i.abs)(t)/(0,i.sqrt)(2*i.pi/3);return[e*(0,i.sqrt)(6*i.pi)/(2*n),(0,i.sign)(t)*(0,i.asin)((4-n*n)/3)]}},67943:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert3Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.sqrt)(i.pi*(4+i.pi));return[2/n*e*(1+(0,i.sqrt)(1-4*t*t/(i.pi*i.pi))),4/n*t]}function o(){return(0,r.geoProjection)(a).scale(180.739)}a.invert=function(e,t){var n=(0,i.sqrt)(i.pi*(4+i.pi))/2;return[e*n/(1+(0,i.sqrt)(1-t*t*(4+i.pi)/(4*i.pi))),t*n/2]}},48262:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert4Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(2+i.halfPi)*(0,i.sin)(t);t/=2;for(var r=0,a=1/0;r<10&&(0,i.abs)(a)>i.epsilon;r++){var o=(0,i.cos)(t);t-=a=(t+(0,i.sin)(t)*(o+2)-n)/(2*o*(1+o))}return[2/(0,i.sqrt)(i.pi*(4+i.pi))*e*(1+(0,i.cos)(t)),2*(0,i.sqrt)(i.pi/(4+i.pi))*(0,i.sin)(t)]}function o(){return(0,r.geoProjection)(a).scale(180.739)}a.invert=function(e,t){var n=t*(0,i.sqrt)((4+i.pi)/i.pi)/2,r=(0,i.asin)(n),a=(0,i.cos)(r);return[e/(2/(0,i.sqrt)(i.pi*(4+i.pi))*(1+a)),(0,i.asin)((r+n*(a+2))/(2+i.halfPi))]}},16005:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert5Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[e*(1+(0,i.cos)(t))/(0,i.sqrt)(2+i.pi),2*t/(0,i.sqrt)(2+i.pi)]}function o(){return(0,r.geoProjection)(a).scale(173.044)}a.invert=function(e,t){var n=(0,i.sqrt)(2+i.pi),r=t*n/2;return[n*e/(1+(0,i.cos)(r)),r]}},86268:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,eckert6Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){for(var n=(1+i.halfPi)*(0,i.sin)(t),r=0,a=1/0;r<10&&(0,i.abs)(a)>i.epsilon;r++)t-=a=(t+(0,i.sin)(t)-n)/(1+(0,i.cos)(t));return n=(0,i.sqrt)(2+i.pi),[e*(1+(0,i.cos)(t))/n,2*t/n]}function o(){return(0,r.geoProjection)(a).scale(173.044)}a.invert=function(e,t){var n=1+i.halfPi,r=(0,i.sqrt)(n/2);return[2*e*r/(1+(0,i.cos)(t*=r)),(0,i.asin)((t+(0,i.sin)(t))/n)]}},65275:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,eisenlohrRaw:()=>s});var r=n(51300),i=n(70063),a=n(28184),o=3+2*a.sqrt2;function s(e,t){var n=(0,a.sin)(e/=2),r=(0,a.cos)(e),i=(0,a.sqrt)((0,a.cos)(t)),s=(0,a.cos)(t/=2),l=(0,a.sin)(t)/(s+a.sqrt2*r*i),u=(0,a.sqrt)(2/(1+l*l)),c=(0,a.sqrt)((a.sqrt2*s+(r+n)*i)/(a.sqrt2*s+(r-n)*i));return[o*(u*(c-1/c)-2*(0,a.log)(c)),o*(u*l*(c+1/c)-2*(0,a.atan)(l))]}function l(){return(0,r.geoProjection)(s).scale(62.5271)}s.invert=function(e,t){if(!(n=i.augustRaw.invert(e/1.2,1.065*t)))return null;var n,r=n[0],s=n[1],l=20;e/=o,t/=o;do{var u=r/2,c=s/2,d=(0,a.sin)(u),f=(0,a.cos)(u),p=(0,a.sin)(c),h=(0,a.cos)(c),g=(0,a.cos)(s),m=(0,a.sqrt)(g),y=p/(h+a.sqrt2*f*m),v=y*y,b=(0,a.sqrt)(2/(1+v)),x=(a.sqrt2*h+(f+d)*m)/(a.sqrt2*h+(f-d)*m),E=(0,a.sqrt)(x),S=E-1/E,w=E+1/E,_=b*S-2*(0,a.log)(E)-e,A=b*y*w-2*(0,a.atan)(y)-t,C=p&&a.sqrt1_2*m*d*v/p,T=(a.sqrt2*f*h+m)/(2*(h+a.sqrt2*f*m)*(h+a.sqrt2*f*m)*m),k=-.5*y*b*b*b,R=k*C,D=k*T,N=(N=2*h+a.sqrt2*m*(f-d))*N*E,O=(a.sqrt2*f*h*m+g)/N,F=-a.sqrt2*d*p/(m*N),P=S*R-2*O/E+b*(O+O/x),M=S*D-2*F/E+b*(F+F/x),I=y*w*R-2*C/(1+v)+b*w*C+b*y*(O-O/x),$=y*w*D-2*T/(1+v)+b*w*T+b*y*(F-F/x),L=M*I-$*P;if(!L)break;var B=(A*M-_*$)/L,U=(_*I-A*P)/L;r-=B,s=(0,a.max)(-a.halfPi,(0,a.min)(a.halfPi,s-U))}while(((0,a.abs)(B)>a.epsilon||(0,a.abs)(U)>a.epsilon)&&--l>0);return(0,a.abs)((0,a.abs)(s)-a.halfPi){"use strict";n.r(t),n.d(t,{ellipticF:()=>s,ellipticFi:()=>o,ellipticJ:()=>a,ellipticJi:()=>i});var r=n(28184);function i(e,t,n){var r,i,o;return e?(r=a(e,n),t?(o=(i=a(t,1-n))[1]*i[1]+n*r[0]*r[0]*i[0]*i[0],[[r[0]*i[2]/o,r[1]*r[2]*i[0]*i[1]/o],[r[1]*i[1]/o,-r[0]*r[2]*i[0]*i[2]/o],[r[2]*i[1]*i[2]/o,-n*r[0]*r[1]*i[0]/o]]):[[r[0],0],[r[1],0],[r[2],0]]):[[0,(i=a(t,1-n))[0]/i[1]],[1/i[1],0],[i[2]/i[1],0]]}function a(e,t){var n,i,a,o,s;if(t=1-r.epsilon)return n=(1-t)/4,a=1/(i=(0,r.cosh)(e)),[(o=(0,r.tanh)(e))+n*((s=i*(0,r.sinh)(e))-e)/(i*i),a-n*o*a*(s-e),a+n*o*a*(s+e),2*(0,r.atan)((0,r.exp)(e))-r.halfPi+n*(s-e)/i];var l=[1,0,0,0,0,0,0,0,0],u=[(0,r.sqrt)(t),0,0,0,0,0,0,0,0],c=0;for(i=(0,r.sqrt)(1-t),s=1;(0,r.abs)(u[c]/l[c])>r.epsilon&&c<8;)n=l[c++],u[c]=(n-i)/2,l[c]=(n+i)/2,i=(0,r.sqrt)(n*i),s*=2;a=s*l[c]*e;do{o=u[c]*(0,r.sin)(i=a)/l[c],a=((0,r.asin)(o)+a)/2}while(--c);return[(0,r.sin)(a),o=(0,r.cos)(a),o/(0,r.cos)(a-i),a]}function o(e,t,n){var i=(0,r.abs)(e),a=(0,r.abs)(t),o=(0,r.sinh)(a);if(i){var l=1/(0,r.sin)(i),u=1/((0,r.tan)(i)*(0,r.tan)(i)),c=-(u+n*(o*o*l*l)-1+n),d=(n-1)*u,f=(-c+(0,r.sqrt)(c*c-4*d))/2;return[s((0,r.atan)(1/(0,r.sqrt)(f)),n)*(0,r.sign)(e),s((0,r.atan)((0,r.sqrt)((f/u-1)/n)),1-n)*(0,r.sign)(t)]}return[0,s((0,r.atan)(o),1-n)*(0,r.sign)(t)]}function s(e,t){if(!t)return e;if(1===t)return(0,r.log)((0,r.tan)(e/2+r.quarterPi));for(var n=1,i=(0,r.sqrt)(1-t),a=(0,r.sqrt)(t),o=0;(0,r.abs)(a)>r.epsilon;o++){if(e%r.pi){var s=(0,r.atan)(i*(0,r.tan)(e)/n);s<0&&(s+=r.pi),e+=s+~~(e/r.pi)*r.pi}else e+=e;a=(n+i)/2,i=(0,r.sqrt)(n*i),a=((n=a)-i)/2}return e/((0,r.pow)(2,o)*n)}},71969:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,faheyRaw:()=>o});var r=n(51300),i=n(28184),a=(0,i.cos)(35*i.radians);function o(e,t){var n=(0,i.tan)(t/2);return[e*a*(0,i.sqrt)(1-n*n),(1+a)*n]}function s(){return(0,r.geoProjection)(o).scale(137.152)}o.invert=function(e,t){var n=t/(1+a);return[e&&e/(a*(0,i.sqrt)(1-n*n)),2*(0,i.atan)(n)]}},65451:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,foucautRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=t/2,r=(0,i.cos)(n);return[2*e/i.sqrtPi*(0,i.cos)(t)*r*r,i.sqrtPi*(0,i.tan)(n)]}function o(){return(0,r.geoProjection)(a).scale(135.264)}a.invert=function(e,t){var n=(0,i.atan)(t/i.sqrtPi),r=(0,i.cos)(n),a=2*n;return[e*i.sqrtPi/2/((0,i.cos)(a)*r*r),a]}},24104:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,foucautSinusoidalRaw:()=>o});var r=n(51300),i=n(28184),a=n(11209);function o(e){var t=1-e,n=s(i.pi,0)[0]-s(-i.pi,0)[0],r=s(0,i.halfPi)[1]-s(0,-i.halfPi)[1],o=(0,i.sqrt)(2*r/n);function s(n,r){var a=(0,i.cos)(r),o=(0,i.sin)(r);return[a/(t+e*a)*n,t*r+e*o]}function l(e,t){var n=s(e,t);return[n[0]*o,n[1]/o]}function u(e){return l(0,e)[1]}return l.invert=function(n,r){var s=(0,a.solve)(u,r);return[n/o*(e+t/(0,i.cos)(s)),s]},l}function s(){var e=.5,t=(0,r.geoProjectionMutator)(o),n=t(e);return n.alpha=function(n){return arguments.length?t(e=+n):e},n.scale(168.725)}},91615:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(51300),i=n(28184);function a(e){return[e[0]/2,(0,i.asin)((0,i.tan)(e[1]/2*i.radians))*i.degrees]}function o(e){return[2*e[0],2*(0,i.atan)((0,i.sin)(e[1]*i.radians))*i.degrees]}function s(e){null==e&&(e=r.geoOrthographic);var t=e(),n=(0,r.geoEquirectangular)().scale(i.degrees).precision(0).clipAngle(null).translate([0,0]);function s(e){return t(a(e))}function l(e){s[e]=function(){return arguments.length?(t[e].apply(t,arguments),s):t[e]()}}return t.invert&&(s.invert=function(e){return o(t.invert(e))}),s.stream=function(e){var r=t.stream(e),a=n.stream({point:function(e,t){r.point(e/2,(0,i.asin)((0,i.tan)(-t/2*i.radians))*i.degrees)},lineStart:function(){r.lineStart()},lineEnd:function(){r.lineEnd()},polygonStart:function(){r.polygonStart()},polygonEnd:function(){r.polygonEnd()}});return a.sphere=r.sphere,a},s.rotate=function(e){return arguments.length?(n.rotate(e),s):n.rotate()},s.center=function(e){return arguments.length?(t.center(a(e)),s):o(t.center())},l("angle"),l("clipAngle"),l("clipExtent"),l("fitExtent"),l("fitHeight"),l("fitSize"),l("fitWidth"),l("scale"),l("translate"),l("precision"),s.scale(249.5)}},73087:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,gingeryRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=2*i.pi/t,a=e*e;function l(t,l){var u=(0,r.geoAzimuthalEquidistantRaw)(t,l),c=u[0],d=u[1],f=c*c+d*d;if(f>a){var p=(0,i.sqrt)(f),h=(0,i.atan2)(d,c),g=n*(0,i.round)(h/n),m=h-g,y=e*(0,i.cos)(m),v=(e*(0,i.sin)(m)-m*(0,i.sin)(y))/(i.halfPi-y),b=o(m,v),x=(i.pi-e)/s(b,y,i.pi);c=p;var E,S=50;do{c-=E=(e+s(b,y,c)*x-p)/(b(c)*x)}while((0,i.abs)(E)>i.epsilon&&--S>0);d=m*(0,i.sin)(c),ca){var c=(0,i.sqrt)(u),d=(0,i.atan2)(l,t),f=n*(0,i.round)(d/n),p=d-f;t=c*(0,i.cos)(p),l=c*(0,i.sin)(p);for(var h=t-i.halfPi,g=(0,i.sin)(t),m=l/g,y=t{"use strict";n.r(t),n.d(t,{default:()=>a,ginzburg4Raw:()=>i});var r=n(51300),i=(0,n(4432).default)(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function a(){return(0,r.geoProjection)(i).scale(149.995)}},84621:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,ginzburg5Raw:()=>i});var r=n(51300),i=(0,n(4432).default)(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function a(){return(0,r.geoProjection)(i).scale(153.93)}},2564:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,ginzburg6Raw:()=>o});var r=n(51300),i=n(4432),a=n(28184),o=(0,i.default)(5/6*a.pi,-.62636,-.0344,0,1.3493,-.05524,0,.045);function s(){return(0,r.geoProjection)(o).scale(130.945)}},87418:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,ginzburg8Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=e*e,r=t*t;return[e*(1-.162388*r)*(.87-952426e-9*n*n),t*(1+r/12)]}function o(){return(0,r.geoProjection)(a).scale(131.747)}a.invert=function(e,t){var n,r=e,a=t,o=50;do{var s=a*a;a-=n=(a*(1+s/12)-t)/(1+s/4)}while((0,i.abs)(n)>i.epsilon&&--o>0);o=50,e/=1-.162388*s;do{var l=(l=r*r)*l;r-=n=(r*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while((0,i.abs)(n)>i.epsilon&&--o>0);return[r,a]}},18281:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,ginzburg9Raw:()=>i});var r=n(51300),i=(0,n(4432).default)(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function a(){return(0,r.geoProjection)(i).scale(131.087)}},4432:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(28184);function i(e,t,n,i,a,o,s,l){function u(u,c){if(!c)return[e*u/r.pi,0];var d=c*c,f=e+d*(t+d*(n+d*i)),p=c*(a-1+d*(o-l+d*s)),h=(f*f+p*p)/(2*p),g=u*(0,r.asin)(f/h)/r.pi;return[h*(0,r.sin)(g),c*(1+d*l)+h*(1-(0,r.cos)(g))]}return arguments.length<8&&(l=0),u.invert=function(u,c){var d,f,p=r.pi*u/e,h=c,g=50;do{var m=h*h,y=e+m*(t+m*(n+m*i)),v=h*(a-1+m*(o-l+m*s)),b=y*y+v*v,x=2*v,E=b/x,S=E*E,w=(0,r.asin)(y/E)/r.pi,_=p*w,A=y*y,C=(2*t+m*(4*n+6*m*i))*h,T=a+m*(3*o+5*m*s),k=(2*(y*C+v*(T-1))*x-b*(2*(T-1)))/(x*x),R=(0,r.cos)(_),D=(0,r.sin)(_),N=E*R,O=E*D,F=p/r.pi*(1/(0,r.sqrt)(1-A/S))*(C*E-y*k)/S,P=O-u,M=h*(1+m*l)+E-N-c,I=k*D+N*F,$=N*w,L=1+k-(k*R-O*F),B=O*w,U=I*B-L*$;if(!U)break;p-=d=(M*I-P*L)/U,h-=f=(P*B-M*$)/U}while(((0,r.abs)(d)>r.epsilon||(0,r.abs)(f)>r.epsilon)&&--g>0);return[p,h]},u}},43915:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,gringortenRaw:()=>o});var r=n(51300),i=n(28184),a=n(73853);function o(e,t){var n=(0,i.sign)(e),r=(0,i.sign)(t),a=(0,i.cos)(t),o=(0,i.cos)(e)*a,s=(0,i.sin)(e)*a,l=(0,i.sin)(r*t);e=(0,i.abs)((0,i.atan2)(s,l)),t=(0,i.asin)(o),(0,i.abs)(e-i.halfPi)>i.epsilon&&(e%=i.halfPi);var u=function(e,t){if(t===i.halfPi)return[0,0];var n,r,a=(0,i.sin)(t),o=a*a,s=o*o,l=1+s,u=1+3*s,c=1-s,d=(0,i.asin)(1/(0,i.sqrt)(l)),f=c+o*l*d,p=(1-a)/f,h=(0,i.sqrt)(p),g=p*l,m=(0,i.sqrt)(g),y=h*c;if(0===e)return[0,-(y+o*m)];var v,b=(0,i.cos)(t),x=1/b,E=2*a*b,S=(-3*o+d*u)*E,w=(-f*b-(1-a)*S)/(f*f),_=-x*E,A=-x*(o*l*w+p*u*E),C=-2*x*(c*(.5*w/h)-2*o*h*E),T=4*e/i.pi;if(e>.222*i.pi||t.175*i.pi){if(n=(y+o*(0,i.sqrt)(g*(1+s)-y*y))/(1+s),e>i.pi/4)return[n,n];var k=n,R=.5*n;n=.5*(R+k),r=50;do{var D=n*(C+_*(0,i.sqrt)(g-n*n))+A*(0,i.asin)(n/m)-T;if(!D)break;D<0?R=n:k=n,n=.5*(R+k)}while((0,i.abs)(k-R)>i.epsilon&&--r>0)}else{n=i.epsilon,r=25;do{var N=n*n,O=(0,i.sqrt)(g-N),F=C+_*O,P=n*F+A*(0,i.asin)(n/m)-T;n-=v=O?P/(F+(A-_*N)/O):0}while((0,i.abs)(v)>i.epsilon&&--r>0)}return[n,-y-o*(0,i.sqrt)(g-n*n)]}(e>i.pi/4?i.halfPi-e:e,t);return e>i.pi/4&&(l=u[0],u[0]=-u[1],u[1]=-l),u[0]*=n,u[1]*=-r,u}function s(){return(0,r.geoProjection)((0,a.default)(o)).scale(239.75)}o.invert=function(e,t){(0,i.abs)(e)>1&&(e=2*(0,i.sign)(e)-e),(0,i.abs)(t)>1&&(t=2*(0,i.sign)(t)-t);var n=(0,i.sign)(e),r=(0,i.sign)(t),a=-n*e,o=-r*t,s=o/a<1,l=function(e,t){var n=0,r=1,a=.5,o=50;for(;;){var s=a*a,l=(0,i.sqrt)(a),u=(0,i.asin)(1/(0,i.sqrt)(1+s)),c=1-s+a*(1+s)*u,d=(1-l)/c,f=(0,i.sqrt)(d),p=d*(1+s),h=f*(1-s),g=p-e*e,m=(0,i.sqrt)(g),y=t+h+a*m;if((0,i.abs)(r-n)0?n=a:r=a,a=.5*(n+r)}if(!o)return null;var v=(0,i.asin)(l),b=(0,i.cos)(v),x=1/b,E=2*l*b,S=(-c*b-(-3*a+u*(1+3*s))*E*(1-l))/(c*c),w=.5*S/f,_=(1-s)*w-2*a*f*E,A=-2*x*_,C=-x*E,T=-x*(a*(1+s)*S+d*(1+3*s)*E);return[i.pi/4*(e*(A+C*m)+T*(0,i.asin)(e/(0,i.sqrt)(p))),v]}(s?o:a,s?a:o),u=l[0],c=l[1],d=(0,i.cos)(c);return s&&(u=-i.halfPi-u),[n*((0,i.atan2)((0,i.sin)(u)*d,-(0,i.sin)(c))+i.pi),r*(0,i.asin)((0,i.cos)(u)*d)]}},64035:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,guyouRaw:()=>s});var r=n(51300),i=n(46764),a=n(28184),o=n(73853);function s(e,t){var n=(a.sqrt2-1)/(a.sqrt2+1),r=(0,a.sqrt)(1-n*n),o=(0,i.ellipticF)(a.halfPi,r*r),s=(0,a.log)((0,a.tan)(a.pi/4+(0,a.abs)(t)/2)),l=(0,a.exp)(-1*s)/(0,a.sqrt)(n),u=function(e,t){var n=e*e,r=t+1,i=1-n-t*t;return[.5*((e>=0?a.halfPi:-a.halfPi)-(0,a.atan2)(i,2*e)),-.25*(0,a.log)(i*i+4*n)+.5*(0,a.log)(r*r+n)]}(l*(0,a.cos)(-1*e),l*(0,a.sin)(-1*e)),c=(0,i.ellipticFi)(u[0],u[1],r*r);return[-c[1],(t>=0?1:-1)*(.5*o-c[0])]}function l(){return(0,r.geoProjection)((0,o.default)(s)).scale(151.496)}s.invert=function(e,t){var n,r,o,s=(a.sqrt2-1)/(a.sqrt2+1),l=(0,a.sqrt)(1-s*s),u=(0,i.ellipticF)(a.halfPi,l*l),c=(0,i.ellipticJi)(.5*u-t,-e,l*l),d=(n=c[0],r=c[1],o=r[0]*r[0]+r[1]*r[1],[(n[0]*r[0]+n[1]*r[1])/o,(n[1]*r[0]-n[0]*r[1])/o]);return[(0,a.atan2)(d[1],d[0])/-1,2*(0,a.atan)((0,a.exp)(-.5*(0,a.log)(s*d[0]*d[0]+s*d[1]*d[1])))-a.halfPi]}},72304:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,hammerRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if(arguments.length<2&&(t=e),1===t)return r.geoAzimuthalEqualAreaRaw;if(t===1/0)return o;function n(n,i){var a=(0,r.geoAzimuthalEqualAreaRaw)(n/t,i);return a[0]*=e,a}return n.invert=function(n,i){var a=r.geoAzimuthalEqualAreaRaw.invert(n/e,i);return a[0]*=t,a},n}function o(e,t){return[e*(0,i.cos)(t)/(0,i.cos)(t/=2),2*(0,i.sin)(t)]}function s(){var e=2,t=(0,r.geoProjectionMutator)(a),n=t(e);return n.coefficient=function(n){return arguments.length?t(e=+n):e},n.scale(169.529)}o.invert=function(e,t){var n=2*(0,i.asin)(t/2);return[e*(0,i.cos)(n/2)/(0,i.cos)(n),n]}},62629:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,hammerRetroazimuthalRaw:()=>a});var r=n(51300),i=n(28184);function a(e){var t=(0,i.sin)(e),n=(0,i.cos)(e),r=o(e);function a(e,a){var o=r(e,a);e=o[0],a=o[1];var s=(0,i.sin)(a),l=(0,i.cos)(a),u=(0,i.cos)(e),c=(0,i.acos)(t*s+n*l*u),d=(0,i.sin)(c),f=(0,i.abs)(d)>i.epsilon?c/d:1;return[f*n*(0,i.sin)(e),((0,i.abs)(e)>i.halfPi?f:-f)*(t*l-n*s*u)]}return r.invert=o(-e),a.invert=function(e,n){var a=(0,i.sqrt)(e*e+n*n),o=-(0,i.sin)(a),s=(0,i.cos)(a),l=a*s,u=-n*o,c=a*t,d=(0,i.sqrt)(l*l+u*u-c*c),f=(0,i.atan2)(l*c+u*d,u*c-l*d),p=(a>i.halfPi?-1:1)*(0,i.atan2)(e*o,a*(0,i.cos)(f)*s+n*(0,i.sin)(f)*o);return r.invert(p,f)},a}function o(e){var t=(0,i.sin)(e),n=(0,i.cos)(e);return function(e,r){var a=(0,i.cos)(r),o=(0,i.cos)(e)*a,s=(0,i.sin)(e)*a,l=(0,i.sin)(r);return[(0,i.atan2)(s,o*n-l*t),(0,i.asin)(l*n+o*t)]}}function s(){var e=0,t=(0,r.geoProjectionMutator)(a),n=t(e),o=n.rotate,s=n.stream,l=(0,r.geoCircle)();return n.parallel=function(r){if(!arguments.length)return e*i.degrees;var a=n.rotate();return t(e=r*i.radians).rotate(a)},n.rotate=function(t){return arguments.length?(o.call(n,[t[0],t[1]-e*i.degrees]),l.center([-t[0],-t[1]]),n):((t=o.call(n))[1]+=e*i.degrees,t)},n.stream=function(e){return(e=s(e)).sphere=function(){e.polygonStart();var t,n=l.radius(89.99)().coordinates[0],r=n.length-1,i=-1;for(e.lineStart();++i=0;)e.point((t=n[i])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},n.scale(79.4187).parallel(45).clipAngle(179.999)}},20299:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h,healpixRaw:()=>c});var r=n(61388),i=n(51300),a=n(8077),o=n(2311),s=n(28184),l=(0,s.asin)(1-1/3)*s.degrees,u=(0,o.cylindricalEqualAreaRaw)(0);function c(e){var t=l*s.radians,n=(0,a.collignonRaw)(s.pi,t)[0]-(0,a.collignonRaw)(-s.pi,t)[0],r=u(0,t)[1],i=(0,a.collignonRaw)(0,t)[1],o=s.sqrtPi-i,c=s.tau/e,d=4/s.tau,f=r+o*o*4/s.tau;function p(l,p){var h,g=(0,s.abs)(p);if(g>t){var m=(0,s.min)(e-1,(0,s.max)(0,(0,s.floor)((l+s.pi)/c)));l+=s.pi*(e-1)/e-m*c,(h=(0,a.collignonRaw)(l,g))[0]=h[0]*s.tau/n-s.tau*(e-1)/(2*e)+m*s.tau/e,h[1]=r+4*(h[1]-i)*o/s.tau,p<0&&(h[1]=-h[1])}else h=u(l,p);return h[0]*=d,h[1]/=f,h}return p.invert=function(t,l){t/=d,l*=f;var p=(0,s.abs)(l);if(p>r){var h=(0,s.min)(e-1,(0,s.max)(0,(0,s.floor)((t+s.pi)/c)));t=(t+s.pi*(e-1)/e-h*c)*n/s.tau;var g=a.collignonRaw.invert(t,.25*(p-r)*s.tau/o+i);return g[0]-=s.pi*(e-1)/e-h*c,l<0&&(g[1]=-g[1]),g}return u.invert(t,l)},p}function d(e,t){return[e,1&t?90-s.epsilon:l]}function f(e,t){return[e,1&t?-90+s.epsilon:-l]}function p(e){return[e[0]*(1-s.epsilon),e[1]]}function h(){var e=4,t=(0,i.geoProjectionMutator)(c),n=t(e),a=n.stream;return n.lobes=function(n){return arguments.length?t(e=+n):e},n.stream=function(t){var o=n.rotate(),s=a(t),l=(n.rotate([0,0]),a(t));return n.rotate(o),s.sphere=function(){var t,n;(0,i.geoStream)((t=180/e,n=[].concat((0,r.range)(-180,180+t/2,t).map(d),(0,r.range)(180,-180-t/2,-t).map(f)),{type:"Polygon",coordinates:[180===t?n.map(p):n]}),l)},s},n.scale(239.75)}},59513:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,hillRaw:()=>a});var r=n(51300),i=n(28184);function a(e){var t,n=1+e,r=(0,i.sin)(1/n),a=(0,i.asin)(r),o=2*(0,i.sqrt)(i.pi/(t=i.pi+4*a*n)),s=.5*o*(n+(0,i.sqrt)(e*(2+e))),l=e*e,u=n*n;function c(r,c){var d,f,p=1-(0,i.sin)(c);if(p&&p<2){var h,g=i.halfPi-c,m=25;do{var y=(0,i.sin)(g),v=(0,i.cos)(g),b=a+(0,i.atan2)(y,n-v),x=1+u-2*n*v;g-=h=(g-l*a-n*y+x*b-.5*p*t)/(2*n*y*b)}while((0,i.abs)(h)>i.epsilon2&&--m>0);d=o*(0,i.sqrt)(x),f=r*b/i.pi}else d=o*(e+p),f=r*a/i.pi;return[d*(0,i.sin)(f),s-d*(0,i.cos)(f)]}return c.invert=function(e,r){var c=e*e+(r-=s)*r,d=(1+u-c/(o*o))/(2*n),f=(0,i.acos)(d),p=(0,i.sin)(f),h=a+(0,i.atan2)(p,n-d);return[(0,i.asin)(e/(0,i.sqrt)(c))*i.pi/h,(0,i.asin)(1-2*(f-l*a-n*p+(1+u-2*n*d)*h)/t)]},c}function o(){var e=1,t=(0,r.geoProjectionMutator)(a),n=t(e);return n.ratio=function(n){return arguments.length?t(e=+n):e},n.scale(167.774).center([0,18.67])}},97927:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,homolosineRaw:()=>l});var r=n(51300),i=n(28184),a=n(88860),o=n(85801),s=n(87963);function l(e,t){return(0,i.abs)(t)>s.sinuMollweidePhi?((e=(0,a.mollweideRaw)(e,t))[1]-=t>0?s.sinuMollweideY:-s.sinuMollweideY,e):(0,o.sinusoidalRaw)(e,t)}function u(){return(0,r.geoProjection)(l).scale(152.63)}l.invert=function(e,t){return(0,i.abs)(t)>s.sinuMollweidePhi?a.mollweideRaw.invert(e,t+(t>0?s.sinuMollweideY:-s.sinuMollweideY)):o.sinusoidalRaw.invert(e,t)}},63660:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,hufnagelRaw:()=>o});var r=n(51300),i=n(28184),a=n(11209);function o(e,t,n,r){var o=(0,i.sqrt)(4*i.pi/(2*n+(1+e-t/2)*(0,i.sin)(2*n)+(e+t)/2*(0,i.sin)(4*n)+t/2*(0,i.sin)(6*n))),s=(0,i.sqrt)(r*(0,i.sin)(n)*(0,i.sqrt)((1+e*(0,i.cos)(2*n)+t*(0,i.cos)(4*n))/(1+e+t))),l=n*c(1);function u(n){return(0,i.sqrt)(1+e*(0,i.cos)(2*n)+t*(0,i.cos)(4*n))}function c(r){var a=r*n;return(2*a+(1+e-t/2)*(0,i.sin)(2*a)+(e+t)/2*(0,i.sin)(4*a)+t/2*(0,i.sin)(6*a))/n}function d(e){return u(e)*(0,i.sin)(e)}var f=function(e,t){var r=n*(0,a.solve)(c,l*(0,i.sin)(t)/n,t/i.pi);isNaN(r)&&(r=n*(0,i.sign)(t));var d=o*u(r);return[d*s*e/i.pi*(0,i.cos)(r),d/s*(0,i.sin)(r)]};return f.invert=function(e,t){var r=(0,a.solve)(d,t*s/o);return[e*i.pi/((0,i.cos)(r)*o*s*u(r)),(0,i.asin)(n*c(r/n)/l)]},0===n&&(o=(0,i.sqrt)(r/i.pi),(f=function(e,t){return[e*o,(0,i.sin)(t)/o]}).invert=function(e,t){return[e/o,(0,i.asin)(t*o)]}),f}function s(){var e=1,t=0,n=45*i.radians,a=2,s=(0,r.geoProjectionMutator)(o),l=s(e,t,n,a);return l.a=function(r){return arguments.length?s(e=+r,t,n,a):e},l.b=function(r){return arguments.length?s(e,t=+r,n,a):t},l.psiMax=function(r){return arguments.length?s(e,t,n=+r*i.radians,a):n*i.degrees},l.ratio=function(r){return arguments.length?s(e,t,n,a=+r):a},l.scale(180.739)}},36081:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,hyperellipticalRaw:()=>o});var r=n(51300),i=n(28184),a=n(38331);function o(e,t,n){function r(n){return e+(1-e)*(0,i.pow)(1-(0,i.pow)(n,t),1/t)}function o(e){return(0,a.integrate)(r,0,e,1e-4)}for(var s=1/o(1),l=1e3,u=(1+1e-8)*s,c=[],d=0;d<=l;d++)c.push(o(d/l)*u);function f(e){var t=0,n=l,r=500;do{c[r]>e?n=r:t=r,r=t+n>>1}while(r>t);var i=c[r+1]-c[r];return i&&(i=(e-c[r+1])/i),(r+1+i)/l}var p=2*f(1)/i.pi*s/n,h=function(e,t){var n=f((0,i.abs)((0,i.sin)(t))),a=r(n)*e;return n/=p,[a,t>=0?n:-n]};return h.invert=function(e,t){var n;return t*=p,(0,i.abs)(t)<1&&(n=(0,i.sign)(t)*(0,i.asin)(o((0,i.abs)(t))*s)),[e/r((0,i.abs)(t)),n]},h}function s(){var e=0,t=2.5,n=1.183136,i=(0,r.geoProjectionMutator)(o),a=i(e,t,n);return a.alpha=function(r){return arguments.length?i(e=+r,t,n):e},a.k=function(r){return arguments.length?i(e,t=+r,n):t},a.gamma=function(r){return arguments.length?i(e,t,n=+r):n},a.scale(152.63)}},96108:(e,t,n)=>{"use strict";n.r(t),n.d(t,{geoAiry:()=>r.default,geoAiryRaw:()=>r.airyRaw,geoAitoff:()=>i.default,geoAitoffRaw:()=>i.aitoffRaw,geoArmadillo:()=>a.default,geoArmadilloRaw:()=>a.armadilloRaw,geoAugust:()=>o.default,geoAugustRaw:()=>o.augustRaw,geoBaker:()=>s.default,geoBakerRaw:()=>s.bakerRaw,geoBerghaus:()=>l.default,geoBerghausRaw:()=>l.berghausRaw,geoBertin1953:()=>u.default,geoBertin1953Raw:()=>u.bertin1953Raw,geoBoggs:()=>c.default,geoBoggsRaw:()=>c.boggsRaw,geoBonne:()=>d.default,geoBonneRaw:()=>d.bonneRaw,geoBottomley:()=>f.default,geoBottomleyRaw:()=>f.bottomleyRaw,geoBromley:()=>p.default,geoBromleyRaw:()=>p.bromleyRaw,geoChamberlin:()=>h.default,geoChamberlinAfrica:()=>h.chamberlinAfrica,geoChamberlinRaw:()=>h.chamberlinRaw,geoCollignon:()=>g.default,geoCollignonRaw:()=>g.collignonRaw,geoCraig:()=>m.default,geoCraigRaw:()=>m.craigRaw,geoCraster:()=>y.default,geoCrasterRaw:()=>y.crasterRaw,geoCylindricalEqualArea:()=>v.default,geoCylindricalEqualAreaRaw:()=>v.cylindricalEqualAreaRaw,geoCylindricalStereographic:()=>b.default,geoCylindricalStereographicRaw:()=>b.cylindricalStereographicRaw,geoEckert1:()=>x.default,geoEckert1Raw:()=>x.eckert1Raw,geoEckert2:()=>E.default,geoEckert2Raw:()=>E.eckert2Raw,geoEckert3:()=>S.default,geoEckert3Raw:()=>S.eckert3Raw,geoEckert4:()=>w.default,geoEckert4Raw:()=>w.eckert4Raw,geoEckert5:()=>_.default,geoEckert5Raw:()=>_.eckert5Raw,geoEckert6:()=>A.default,geoEckert6Raw:()=>A.eckert6Raw,geoEisenlohr:()=>C.default,geoEisenlohrRaw:()=>C.eisenlohrRaw,geoFahey:()=>T.default,geoFaheyRaw:()=>T.faheyRaw,geoFoucaut:()=>k.default,geoFoucautRaw:()=>k.foucautRaw,geoFoucautSinusoidal:()=>R.default,geoFoucautSinusoidalRaw:()=>R.foucautSinusoidalRaw,geoGilbert:()=>D.default,geoGingery:()=>N.default,geoGingeryRaw:()=>N.gingeryRaw,geoGinzburg4:()=>O.default,geoGinzburg4Raw:()=>O.ginzburg4Raw,geoGinzburg5:()=>F.default,geoGinzburg5Raw:()=>F.ginzburg5Raw,geoGinzburg6:()=>P.default,geoGinzburg6Raw:()=>P.ginzburg6Raw,geoGinzburg8:()=>M.default,geoGinzburg8Raw:()=>M.ginzburg8Raw,geoGinzburg9:()=>I.default,geoGinzburg9Raw:()=>I.ginzburg9Raw,geoGringorten:()=>$.default,geoGringortenQuincuncial:()=>Se.default,geoGringortenRaw:()=>$.gringortenRaw,geoGuyou:()=>L.default,geoGuyouRaw:()=>L.guyouRaw,geoHammer:()=>B.default,geoHammerRaw:()=>B.hammerRaw,geoHammerRetroazimuthal:()=>U.default,geoHammerRetroazimuthalRaw:()=>U.hammerRetroazimuthalRaw,geoHealpix:()=>z.default,geoHealpixRaw:()=>z.healpixRaw,geoHill:()=>q.default,geoHillRaw:()=>q.hillRaw,geoHomolosine:()=>j.default,geoHomolosineRaw:()=>j.homolosineRaw,geoHufnagel:()=>H.default,geoHufnagelRaw:()=>H.hufnagelRaw,geoHyperelliptical:()=>G.default,geoHyperellipticalRaw:()=>G.hyperellipticalRaw,geoInterrupt:()=>V.default,geoInterruptedBoggs:()=>W.default,geoInterruptedHomolosine:()=>Y.default,geoInterruptedMollweide:()=>X.default,geoInterruptedMollweideHemispheres:()=>K.default,geoInterruptedQuarticAuthalic:()=>pe.default,geoInterruptedSinuMollweide:()=>J.default,geoInterruptedSinusoidal:()=>Q.default,geoKavrayskiy7:()=>Z.default,geoKavrayskiy7Raw:()=>Z.kavrayskiy7Raw,geoLagrange:()=>ee.default,geoLagrangeRaw:()=>ee.lagrangeRaw,geoLarrivee:()=>te.default,geoLarriveeRaw:()=>te.larriveeRaw,geoLaskowski:()=>ne.default,geoLaskowskiRaw:()=>ne.laskowskiRaw,geoLittrow:()=>re.default,geoLittrowRaw:()=>re.littrowRaw,geoLoximuthal:()=>ie.default,geoLoximuthalRaw:()=>ie.loximuthalRaw,geoMiller:()=>ae.default,geoMillerRaw:()=>ae.millerRaw,geoModifiedStereographic:()=>oe.default,geoModifiedStereographicAlaska:()=>oe.modifiedStereographicAlaska,geoModifiedStereographicGs48:()=>oe.modifiedStereographicGs48,geoModifiedStereographicGs50:()=>oe.modifiedStereographicGs50,geoModifiedStereographicLee:()=>oe.modifiedStereographicLee,geoModifiedStereographicMiller:()=>oe.modifiedStereographicMiller,geoModifiedStereographicRaw:()=>oe.modifiedStereographicRaw,geoMollweide:()=>se.default,geoMollweideRaw:()=>se.mollweideRaw,geoMtFlatPolarParabolic:()=>le.default,geoMtFlatPolarParabolicRaw:()=>le.mtFlatPolarParabolicRaw,geoMtFlatPolarQuartic:()=>ue.default,geoMtFlatPolarQuarticRaw:()=>ue.mtFlatPolarQuarticRaw,geoMtFlatPolarSinusoidal:()=>ce.default,geoMtFlatPolarSinusoidalRaw:()=>ce.mtFlatPolarSinusoidalRaw,geoNaturalEarth2:()=>de.default,geoNaturalEarth2Raw:()=>de.naturalEarth2Raw,geoNellHammer:()=>fe.default,geoNellHammerRaw:()=>fe.nellHammerRaw,geoNicolosi:()=>he.default,geoNicolosiRaw:()=>he.nicolosiRaw,geoPatterson:()=>ge.default,geoPattersonRaw:()=>ge.pattersonRaw,geoPeirceQuincuncial:()=>we.default,geoPolyconic:()=>me.default,geoPolyconicRaw:()=>me.polyconicRaw,geoPolyhedral:()=>ye.default,geoPolyhedralButterfly:()=>ve.default,geoPolyhedralCollignon:()=>be.default,geoPolyhedralWaterman:()=>xe.default,geoProject:()=>Ee.default,geoQuantize:()=>_e.default,geoQuincuncial:()=>Ae.default,geoRectangularPolyconic:()=>Ce.default,geoRectangularPolyconicRaw:()=>Ce.rectangularPolyconicRaw,geoRobinson:()=>Te.default,geoRobinsonRaw:()=>Te.robinsonRaw,geoSatellite:()=>ke.default,geoSatelliteRaw:()=>ke.satelliteRaw,geoSinuMollweide:()=>Re.default,geoSinuMollweideRaw:()=>Re.sinuMollweideRaw,geoSinusoidal:()=>De.default,geoSinusoidalRaw:()=>De.sinusoidalRaw,geoStitch:()=>Ne.default,geoTimes:()=>Oe.default,geoTimesRaw:()=>Oe.timesRaw,geoTwoPointAzimuthal:()=>Fe.default,geoTwoPointAzimuthalRaw:()=>Fe.twoPointAzimuthalRaw,geoTwoPointAzimuthalUsa:()=>Fe.twoPointAzimuthalUsa,geoTwoPointEquidistant:()=>Pe.default,geoTwoPointEquidistantRaw:()=>Pe.twoPointEquidistantRaw,geoTwoPointEquidistantUsa:()=>Pe.twoPointEquidistantUsa,geoVanDerGrinten:()=>Me.default,geoVanDerGrinten2:()=>Ie.default,geoVanDerGrinten2Raw:()=>Ie.vanDerGrinten2Raw,geoVanDerGrinten3:()=>$e.default,geoVanDerGrinten3Raw:()=>$e.vanDerGrinten3Raw,geoVanDerGrinten4:()=>Le.default,geoVanDerGrinten4Raw:()=>Le.vanDerGrinten4Raw,geoVanDerGrintenRaw:()=>Me.vanDerGrintenRaw,geoWagner:()=>Be.default,geoWagner4:()=>Ue.default,geoWagner4Raw:()=>Ue.wagner4Raw,geoWagner6:()=>ze.default,geoWagner6Raw:()=>ze.wagner6Raw,geoWagner7:()=>Be.wagner7,geoWagnerRaw:()=>Be.wagnerRaw,geoWiechel:()=>qe.default,geoWiechelRaw:()=>qe.wiechelRaw,geoWinkel3:()=>je.default,geoWinkel3Raw:()=>je.winkel3Raw});var r=n(66841),i=n(11949),a=n(5095),o=n(70063),s=n(74925),l=n(55607),u=n(26030),c=n(83314),d=n(17402),f=n(14423),p=n(54418),h=n(64975),g=n(8077),m=n(34924),y=n(27884),v=n(2311),b=n(4286),x=n(76745),E=n(43792),S=n(67943),w=n(48262),_=n(16005),A=n(86268),C=n(65275),T=n(71969),k=n(65451),R=n(24104),D=n(91615),N=n(73087),O=n(58606),F=n(84621),P=n(2564),M=n(87418),I=n(18281),$=n(43915),L=n(64035),B=n(72304),U=n(62629),z=n(20299),q=n(59513),j=n(97927),H=n(63660),G=n(36081),V=n(37285),W=n(53211),Y=n(6624),X=n(81085),K=n(21624),J=n(54270),Q=n(41046),Z=n(46003),ee=n(69259),te=n(93416),ne=n(81284),re=n(56713),ie=n(47267),ae=n(45755),oe=n(85669),se=n(88860),le=n(1519),ue=n(41183),ce=n(97109),de=n(41963),fe=n(3353),pe=n(65897),he=n(67080),ge=n(36164),me=n(10498),ye=n(56943),ve=n(96796),be=n(68202),xe=n(33878),Ee=n(15134),Se=n(4670),we=n(53303),_e=n(49925),Ae=n(52511),Ce=n(52724),Te=n(33286),ke=n(55769),Re=n(87963),De=n(85801),Ne=n(23399),Oe=n(71810),Fe=n(37977),Pe=n(85645),Me=n(26681),Ie=n(9187),$e=n(11196),Le=n(2185),Be=n(71112),Ue=n(21782),ze=n(49164),qe=n(87105),je=n(19383)},38331:(e,t,n)=>{"use strict";function r(e,t,n,i,a,o,s,l,u,c,d){if(d.nanEncountered)return NaN;var f,p,h,g,m,y,v,b,x,E;if(p=e(t+.25*(f=n-t)),h=e(n-.25*f),isNaN(p))d.nanEncountered=!0;else{if(!isNaN(h))return E=((y=(g=f*(i+4*p+a)/12)+(m=f*(a+4*h+o)/12))-s)/15,c>u?(d.maxDepthCount++,y+E):Math.abs(E)i})},53211:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(83314),i=n(37285),a=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function o(){return(0,i.default)(r.boggsRaw,a).scale(160.857)}},6624:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(97927),i=n(37285),a=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function o(){return(0,i.default)(r.homolosineRaw,a).scale(152.63)}},37285:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(61388),i=n(51300),a=n(28184);function o(e,t){return(0,a.abs)(e[0]-t[0])a[o][2][0];++o);var l=e(n-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}n?c.invert=n(c):e.invert&&(c.invert=function(n,r){for(var i=u[+(r<0)],a=t[+(r<0)],s=0,l=i.length;s=0;--c)n=(t=e[1][c])[0][0],i=t[0][1],o=t[1][1],l=t[2][0],u=t[2][1],d.push(s([[l-a.epsilon,u-a.epsilon],[l-a.epsilon,o+a.epsilon],[n+a.epsilon,o+a.epsilon],[n+a.epsilon,i-a.epsilon]],30));return{type:"Polygon",coordinates:[(0,r.merge)(d)]}}(n),t=n.map((function(e){return e.map((function(e){return[[e[0][0]*a.radians,e[0][1]*a.radians],[e[1][0]*a.radians,e[1][1]*a.radians],[e[2][0]*a.radians,e[2][1]*a.radians]]}))})),u=t.map((function(t){return t.map((function(t){var n,r=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(n=a,a=o,o=n),[[r,a],[i,o]]}))})),d):t.map((function(e){return e.map((function(e){return[[e[0][0]*a.degrees,e[0][1]*a.degrees],[e[1][0]*a.degrees,e[1][1]*a.degrees],[e[2][0]*a.degrees,e[2][1]*a.degrees]]}))}))},null!=t&&d.lobes(t),d}},81085:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(88860),i=n(37285),a=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function o(){return(0,i.default)(r.mollweideRaw,a).scale(169.529)}},21624:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(88860),i=n(37285),a=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function o(){return(0,i.default)(r.mollweideRaw,a).scale(169.529).rotate([20,0])}},65897:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(72304),i=n(37285),a=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function o(){return(0,i.default)((0,r.hammerRaw)(1/0),a).rotate([20,0]).scale(152.63)}},54270:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(87963),i=n(37285),a=n(11209),o=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function s(){return(0,i.default)(r.sinuMollweideRaw,o,a.solve2d).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}},41046:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(85801),i=n(37285),a=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function o(){return(0,i.default)(r.sinusoidalRaw,a).scale(152.63).rotate([-20,0])}},46003:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,kavrayskiy7Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[3/i.tau*e*(0,i.sqrt)(i.pi*i.pi/3-t*t),t]}function o(){return(0,r.geoProjection)(a).scale(158.837)}a.invert=function(e,t){return[i.tau/3*e/(0,i.sqrt)(i.pi*i.pi/3-t*t),t]}},69259:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,lagrangeRaw:()=>a});var r=n(51300),i=n(28184);function a(e){function t(t,n){if((0,i.abs)((0,i.abs)(n)-i.halfPi)2)return null;var a=(t/=2)*t,o=(n/=2)*n,s=2*n/(1+a+o);return s=(0,i.pow)((1+s)/(1-s),1/e),[(0,i.atan2)(2*t,1-a-o)/e,(0,i.asin)((s-1)/(s+1))]},t}function o(){var e=.5,t=(0,r.geoProjectionMutator)(a),n=t(e);return n.spacing=function(n){return arguments.length?t(e=+n):e},n.scale(124.75)}},93416:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,larriveeRaw:()=>o});var r=n(51300),i=n(28184),a=i.pi/i.sqrt2;function o(e,t){return[e*(1+(0,i.sqrt)((0,i.cos)(t)))/2,t/((0,i.cos)(t/2)*(0,i.cos)(e/6))]}function s(){return(0,r.geoProjection)(o).scale(97.2672)}o.invert=function(e,t){var n=(0,i.abs)(e),r=(0,i.abs)(t),o=i.epsilon,s=i.halfPi;r{"use strict";n.r(t),n.d(t,{default:()=>o,laskowskiRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=e*e,r=t*t;return[e*(.975534+r*(-.0143059*n-.119161+-.0547009*r)),t*(1.00384+n*(.0802894+-.02855*r+199025e-9*n)+r*(.0998909+-.0491032*r))]}function o(){return(0,r.geoProjection)(a).scale(139.98)}a.invert=function(e,t){var n=(0,i.sign)(e)*i.pi,r=t/2,a=50;do{var o=n*n,s=r*r,l=n*r,u=n*(.975534+s*(-.0143059*o-.119161+-.0547009*s))-e,c=r*(1.00384+o*(.0802894+-.02855*s+199025e-9*o)+s*(.0998909+-.0491032*s))-t,d=.975534-s*(.119161+3*o*.0143059+.0547009*s),f=-l*(.238322+.2188036*s+.0286118*o),p=l*(.1605788+7961e-7*o+-.0571*s),h=1.00384+o*(.0802894+199025e-9*o)+s*(3*(.0998909-.02855*o)-.245516*s),g=f*p-h*d,m=(c*f-u*h)/g,y=(u*p-c*d)/g;n-=m,r-=y}while(((0,i.abs)(m)>i.epsilon||(0,i.abs)(y)>i.epsilon)&&--a>0);return a&&[n,r]}},56713:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,littrowRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[(0,i.sin)(e)/(0,i.cos)(t),(0,i.tan)(t)*(0,i.cos)(e)]}function o(){return(0,r.geoProjection)(a).scale(144.049).clipAngle(89.999)}a.invert=function(e,t){var n=e*e,r=t*t+1,a=n+r,o=e?i.sqrt1_2*(0,i.sqrt)((a-(0,i.sqrt)(a*a-4*n))/n):1/(0,i.sqrt)(r);return[(0,i.asin)(e*o),(0,i.sign)(t)*(0,i.acos)(o)]}},47267:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,loximuthalRaw:()=>a});var r=n(66462),i=n(28184);function a(e){var t=(0,i.cos)(e),n=(0,i.tan)(i.quarterPi+e/2);function r(r,a){var o=a-e,s=(0,i.abs)(o){"use strict";n.r(t),n.d(t,{abs:()=>r,acos:()=>N,arcosh:()=>$,arsinh:()=>I,asin:()=>D,atan:()=>i,atan2:()=>a,ceil:()=>o,cos:()=>s,cosh:()=>M,degrees:()=>T,epsilon:()=>v,epsilon2:()=>b,exp:()=>l,floor:()=>u,halfPi:()=>E,log:()=>c,max:()=>d,min:()=>f,pi:()=>x,pow:()=>p,quarterPi:()=>S,radians:()=>k,round:()=>h,sign:()=>g,sin:()=>m,sinci:()=>R,sinh:()=>P,sqrt:()=>O,sqrt1_2:()=>w,sqrt2:()=>_,sqrtPi:()=>A,tan:()=>y,tanh:()=>F,tau:()=>C});var r=Math.abs,i=Math.atan,a=Math.atan2,o=Math.ceil,s=Math.cos,l=Math.exp,u=Math.floor,c=Math.log,d=Math.max,f=Math.min,p=Math.pow,h=Math.round,g=Math.sign||function(e){return e>0?1:e<0?-1:0},m=Math.sin,y=Math.tan,v=1e-6,b=1e-12,x=Math.PI,E=x/2,S=x/4,w=Math.SQRT1_2,_=O(2),A=O(x),C=2*x,T=180/x,k=x/180;function R(e){return e?e/Math.sin(e):1}function D(e){return e>1?E:e<-1?-E:Math.asin(e)}function N(e){return e>1?0:e<-1?x:Math.acos(e)}function O(e){return e>0?Math.sqrt(e):0}function F(e){return((e=l(2*e))-1)/(e+1)}function P(e){return(l(e)-l(-e))/2}function M(e){return(l(e)+l(-e))/2}function I(e){return c(e+O(e*e+1))}function $(e){return c(e+O(e*e-1))}},45755:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,millerRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[e,1.25*(0,i.log)((0,i.tan)(i.quarterPi+.4*t))]}function o(){return(0,r.geoProjection)(a).scale(108.318)}a.invert=function(e,t){return[e,2.5*(0,i.atan)((0,i.exp)(.8*t))-.625*i.pi]}},85669:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m,modifiedStereographicAlaska:()=>d,modifiedStereographicGs48:()=>f,modifiedStereographicGs50:()=>p,modifiedStereographicLee:()=>g,modifiedStereographicMiller:()=>h,modifiedStereographicRaw:()=>a});var r=n(51300),i=n(28184);function a(e){var t=e.length-1;function n(n,r){for(var a,o=(0,i.cos)(r),s=2/(1+o*(0,i.cos)(n)),l=s*o*(0,i.sin)(n),u=s*(0,i.sin)(r),c=t,d=e[c],f=d[0],p=d[1];--c>=0;)f=(d=e[c])[0]+l*(a=f)-u*p,p=d[1]+l*p+u*a;return[f=l*(a=f)-u*p,p=l*p+u*a]}return n.invert=function(n,r){var a=20,o=n,s=r;do{for(var l,u=t,c=e[u],d=c[0],f=c[1],p=0,h=0;--u>=0;)p=d+o*(l=p)-s*h,h=f+o*h+s*l,d=(c=e[u])[0]+o*(l=d)-s*f,f=c[1]+o*f+s*l;var g,m,y=(p=d+o*(l=p)-s*h)*p+(h=f+o*h+s*l)*h;o-=g=((d=o*(l=d)-s*f-n)*p+(f=o*f+s*l-r)*h)/y,s-=m=(f*p-d*h)/y}while((0,i.abs)(g)+(0,i.abs)(m)>i.epsilon*i.epsilon&&--a>0);if(a){var v=(0,i.sqrt)(o*o+s*s),b=2*(0,i.atan)(.5*v),x=(0,i.sin)(b);return[(0,i.atan2)(o*x,v*(0,i.cos)(b)),v?(0,i.asin)(s*x/v):0]}},n}var o=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],s=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],l=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],u=[[.9245,0],[0,0],[.01943,0]],c=[[.721316,0],[0,0],[-.00881625,-.00617325]];function d(){return m(o,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function f(){return m(s,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function p(){return m(l,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function h(){return m(u,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function g(){return m(c,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function m(e,t){var n=(0,r.geoProjection)(a(e)).rotate(t).clipAngle(90),i=(0,r.geoRotation)(t),o=n.center;return delete n.rotate,n.center=function(e){return arguments.length?o(i(e)):i.invert(o())},n}},88860:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,mollweideBromleyRaw:()=>o,mollweideBromleyTheta:()=>a,mollweideRaw:()=>s});var r=n(51300),i=n(28184);function a(e,t){var n,r=e*(0,i.sin)(t),a=30;do{t-=n=(t+(0,i.sin)(t)-r)/(1+(0,i.cos)(t))}while((0,i.abs)(n)>i.epsilon&&--a>0);return t/2}function o(e,t,n){function r(r,o){return[e*r*(0,i.cos)(o=a(n,o)),t*(0,i.sin)(o)]}return r.invert=function(r,a){return a=(0,i.asin)(a/t),[r/(e*(0,i.cos)(a)),(0,i.asin)((2*a+(0,i.sin)(2*a))/n)]},r}var s=o(i.sqrt2/i.halfPi,i.sqrt2,i.pi);function l(){return(0,r.geoProjection)(s).scale(169.529)}},1519:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,mtFlatPolarParabolicRaw:()=>s});var r=n(51300),i=n(28184),a=(0,i.sqrt)(6),o=(0,i.sqrt)(7);function s(e,t){var n=(0,i.asin)(7*(0,i.sin)(t)/(3*a));return[a*e*(2*(0,i.cos)(2*n/3)-1)/o,9*(0,i.sin)(n/3)/o]}function l(){return(0,r.geoProjection)(s).scale(164.859)}s.invert=function(e,t){var n=3*(0,i.asin)(t*o/9);return[e*o/(a*(2*(0,i.cos)(2*n/3)-1)),(0,i.asin)(3*(0,i.sin)(n)*a/7)]}},41183:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,mtFlatPolarQuarticRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){for(var n,r=(1+i.sqrt1_2)*(0,i.sin)(t),a=t,o=0;o<25&&(a-=n=((0,i.sin)(a/2)+(0,i.sin)(a)-r)/(.5*(0,i.cos)(a/2)+(0,i.cos)(a)),!((0,i.abs)(n){"use strict";n.r(t),n.d(t,{default:()=>o,mtFlatPolarSinusoidalRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){for(var n,r=(0,i.sqrt)(6/(4+i.pi)),a=(1+i.pi/4)*(0,i.sin)(t),o=t/2,s=0;s<25&&(o-=n=(o/2+(0,i.sin)(o)-a)/(.5+(0,i.cos)(o)),!((0,i.abs)(n){"use strict";n.r(t),n.d(t,{default:()=>o,naturalEarth2Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=t*t,r=n*n,i=n*r;return[e*(.84719-.13063*n+i*i*(.05494*n-.04515-.02326*r+.00331*i)),t*(1.01183+r*r*(.01926*n-.02625-.00396*r))]}function o(){return(0,r.geoProjection)(a).scale(175.295)}a.invert=function(e,t){var n,r,a,o,s=t,l=25;do{s-=n=(s*(1.01183+(a=(r=s*s)*r)*a*(.01926*r-.02625-.00396*a))-t)/(1.01183+a*a*(.21186*r-.23625+-.05148*a))}while((0,i.abs)(n)>i.epsilon2&&--l>0);return[e/(.84719-.13063*(r=s*s)+(o=r*(a=r*r))*o*(.05494*r-.04515-.02326*a+.00331*o)),s]}},3353:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,nellHammerRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[e*(1+(0,i.cos)(t))/2,2*(t-(0,i.tan)(t/2))]}function o(){return(0,r.geoProjection)(a).scale(152.63)}a.invert=function(e,t){for(var n=t/2,r=0,a=1/0;r<10&&(0,i.abs)(a)>i.epsilon;++r){var o=(0,i.cos)(t/2);t-=a=(t-(0,i.tan)(t/2)-n)/(1-.5/(o*o))}return[2*e/(1+(0,i.cos)(t)),t]}},11209:(e,t,n)=>{"use strict";n.r(t),n.d(t,{solve:()=>i,solve2d:()=>a});var r=n(28184);function i(e,t,n){var i,a,o,s=100;n=void 0===n?0:+n,t=+t;do{(a=e(n))===(o=e(n+r.epsilon))&&(o=a+r.epsilon),n-=i=-1*r.epsilon*(a-t)/(a-o)}while(s-- >0&&(0,r.abs)(i)>r.epsilon);return s<0?NaN:n}function a(e,t,n){return void 0===t&&(t=40),void 0===n&&(n=r.epsilon2),function(i,a,o,s){var l,u,c;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var d=0;dl)o-=u/=2,s-=c/=2;else{l=g;var m=(o>0?-1:1)*n,y=(s>0?-1:1)*n,v=e(o+m,s),b=e(o,s+y),x=(v[0]-f[0])/m,E=(v[1]-f[1])/m,S=(b[0]-f[0])/y,w=(b[1]-f[1])/y,_=w*x-E*S,A=((0,r.abs)(_)<.5?.5:1)/_;if(o+=u=(h*S-p*w)*A,s+=c=(p*E-h*x)*A,(0,r.abs)(u){"use strict";n.r(t),n.d(t,{default:()=>s,nicolosiRaw:()=>o});var r=n(51300),i=n(28184),a=n(11209);function o(e,t){var n=(0,i.sin)(t),r=(0,i.cos)(t),a=(0,i.sign)(e);if(0===e||(0,i.abs)(t)===i.halfPi)return[0,t];if(0===t)return[e,0];if((0,i.abs)(e)===i.halfPi)return[e*r,i.halfPi*n];var o=i.pi/(2*e)-2*e/i.pi,s=2*t/i.pi,l=(1-s*s)/(n-s),u=o*o,c=l*l,d=1+u/c,f=1+c/u,p=(o*n/l-o/2)/d,h=(c*n/u+l/2)/f,g=p*p+r*r/d,m=h*h-(c*n*n/u+l*n-1)/f;return[i.halfPi*(p+(0,i.sqrt)(g)*a),i.halfPi*(h+(0,i.sqrt)(m<0?0:m)*(0,i.sign)(-t*o)*a)]}function s(){return(0,r.geoProjection)(o).scale(127.267)}o.invert=function(e,t){var n=(e/=i.halfPi)*e,r=n+(t/=i.halfPi)*t,o=i.pi*i.pi;return[e?(r-1+(0,i.sqrt)((1-r)*(1-r)+4*n))/(2*e)*i.halfPi:0,(0,a.solve)((function(e){return r*(i.pi*(0,i.sin)(e)-2*e)*i.pi+4*e*e*(t-(0,i.sin)(e))+2*i.pi*e-o*t}),0)]}},13210:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=()=>{}},66462:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(51300),i=n(28184);function a(e){var t=0,n=(0,r.geoProjectionMutator)(e),a=n(t);return a.parallel=function(e){return arguments.length?n(t=e*i.radians):t*i.degrees},a}},36164:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g,pattersonRaw:()=>h});var r=n(51300),i=n(28184),a=1.0148,o=.23185,s=-.14499,l=.02406,u=a,c=5*o,d=7*s,f=9*l,p=1.790857183;function h(e,t){var n=t*t;return[e,t*(a+n*n*(o+n*(s+l*n)))]}function g(){return(0,r.geoProjection)(h).scale(139.319)}h.invert=function(e,t){t>p?t=p:t<-1.790857183&&(t=-1.790857183);var n,r=t;do{var h=r*r;r-=n=(r*(a+h*h*(o+h*(s+l*h)))-t)/(u+h*h*(c+h*(d+f*h)))}while((0,i.abs)(n)>i.epsilon);return[e,r]}},10498:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,polyconicRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if((0,i.abs)(t)i.epsilon&&--o>0);return s=(0,i.tan)(a),[((0,i.abs)(t)<(0,i.abs)(a+1/s)?(0,i.asin)(e*s):(0,i.sign)(t)*(0,i.sign)(e)*((0,i.acos)((0,i.abs)(e*s))+i.halfPi))/(0,i.sin)(a),a]}},96796:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(51300),i=n(28184),a=n(56943),o=n(51238);function s(e){e=e||function(e){var t=(0,r.geoCentroid)({type:"MultiPoint",coordinates:e});return(0,r.geoGnomonic)().scale(1).translate([0,0]).rotate([-t[0],-t[1]])};var t=o.default.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,n){var r=t[e];r&&(r.children||(r.children=[])).push(t[n])})),(0,a.default)(t[0],(function(e,n){return t[e<-i.pi/2?n<0?6:4:e<0?n<0?2:0:e{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(51300),i=n(8077),a=n(28184),o=n(56943),s=n(51238),l=2/(0,a.sqrt)(3);function u(e,t){var n=(0,i.collignonRaw)(e,t);return[n[0]*l,n[1]]}function c(e){e=e||function(e){var t=(0,r.geoCentroid)({type:"MultiPoint",coordinates:e});return(0,r.geoProjection)(u).translate([0,0]).scale(1).rotate(t[1]>0?[-t[0],0]:[180-t[0],180])};var t=s.default.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,n){var r=t[e];r&&(r.children||(r.children=[])).push(t[n])})),(0,o.default)(t[0],(function(e,n){return t[e<-a.pi/2?n<0?6:4:e<0?n<0?2:0:e{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(51300),i=n(28184),a=n(93054);function o(e,t){function n(e,n){var r,a=t(e,n),o=a.project([e*i.degrees,n*i.degrees]);return(r=a.transform)?[r[0]*o[0]+r[1]*o[1]+r[2],-(r[3]*o[0]+r[4]*o[1]+r[5])]:(o[1]=-o[1],o)}function o(e,n){var r=e.project.invert,s=e.transform,l=n;if(s&&(l=[(s=(0,a.inverse)(s))[0]*l[0]+s[1]*l[1]+s[2],s[3]*l[0]+s[4]*l[1]+s[5]]),r&&e===function(e){return t(e[0]*i.radians,e[1]*i.radians)}(u=r(l)))return u;for(var u,c=e.children,d=0,f=c&&c.length;d=0;)if(r=t[s],n[0]===r[0]&&n[1]===r[1]){if(a)return[a,n];a=n}}}(t.face,n.face),i=(0,a.default)(r.map(n.project),r.map(t.project));t.transform=n.transform?(0,a.multiply)(n.transform,i):i;for(var o=n.edges,s=0,u=o.length;s{"use strict";n.r(t),n.d(t,{default:()=>i,inverse:()=>a,multiply:()=>o});var r=n(28184);function i(e,t){var n=s(e[1],e[0]),i=s(t[1],t[0]),a=function(e,t){return(0,r.atan2)(e[0]*t[1]-e[1]*t[0],e[0]*t[0]+e[1]*t[1])}(n,i),u=l(n)/l(i);return o([1,0,e[0][0],0,1,e[0][1]],o([u,0,0,0,u,0],o([(0,r.cos)(a),(0,r.sin)(a),0,-(0,r.sin)(a),(0,r.cos)(a),0],[1,0,-t[0][0],0,1,-t[0][1]])))}function a(e){var t=1/(e[0]*e[4]-e[1]*e[3]);return[t*e[4],-t*e[1],t*(e[1]*e[5]-e[2]*e[4]),-t*e[3],t*e[0],t*(e[2]*e[3]-e[0]*e[5])]}function o(e,t){return[e[0]*t[0]+e[1]*t[3],e[0]*t[1]+e[1]*t[4],e[0]*t[2]+e[1]*t[5]+e[2],e[3]*t[0]+e[4]*t[3],e[3]*t[1]+e[4]*t[4],e[3]*t[2]+e[4]*t[5]+e[5]]}function s(e,t){return[e[0]-t[0],e[1]-t[1]]}function l(e){return(0,r.sqrt)(e[0]*e[0]+e[1]*e[1])}},51238:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]];const i=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map((function(e){return e.map((function(e){return r[e]}))}))},33878:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(51300),i=n(28184),a=n(56943),o=n(51238);function s(e){e=e||function(e){var t=6===e.length?(0,r.geoCentroid)({type:"MultiPoint",coordinates:e}):e[0];return(0,r.geoGnomonic)().scale(1).translate([0,0]).rotate([-t[0],-t[1]])};var t=o.default.map((function(e){for(var t,n=e.map(c),r=n.length,i=n[r-1],a=[],o=0;o{"use strict";function r(e){if((t=e.length)<4)return!1;for(var t,n=0,r=e[t-1][1]*e[0][0]-e[t-1][0]*e[0][1];++nr})},74681:(e,t,n)=>{"use strict";function r(e,t){for(var n=t[0],r=t[1],i=!1,a=0,o=e.length,s=o-1;ar^p>r&&n<(f-u)*(r-c)/(p-c)+u&&(i=!i)}return i}n.r(t),n.d(t,{default:()=>r})},15134:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(51300),i=n(13210),a=n(41776),o=n(74681);function s(e,t){var n,r=t.stream;if(!r)throw new Error("invalid projection");switch(e&&e.type){case"Feature":n=u;break;case"FeatureCollection":n=l;break;default:n=c}return n(e,r)}function l(e,t){return{type:"FeatureCollection",features:e.features.map((function(e){return u(e,t)}))}}function u(e,t){return{type:"Feature",id:e.id,properties:e.properties,geometry:c(e.geometry,t)}}function c(e,t){if(!e)return null;if("GeometryCollection"===e.type)return function(e,t){return{type:"GeometryCollection",geometries:e.geometries.map((function(e){return c(e,t)}))}}(e,t);var n;switch(e.type){case"Point":case"MultiPoint":n=p;break;case"LineString":case"MultiLineString":n=h;break;case"Polygon":case"MultiPolygon":case"Sphere":n=g;break;default:return null}return(0,r.geoStream)(e,t(n)),n.result()}var d=[],f=[],p={point:function(e,t){d.push([e,t])},result:function(){var e=d.length?d.length<2?{type:"Point",coordinates:d[0]}:{type:"MultiPoint",coordinates:d}:null;return d=[],e}},h={lineStart:i.default,point:function(e,t){d.push([e,t])},lineEnd:function(){d.length&&(f.push(d),d=[])},result:function(){var e=f.length?f.length<2?{type:"LineString",coordinates:f[0]}:{type:"MultiLineString",coordinates:f}:null;return f=[],e}},g={polygonStart:i.default,lineStart:i.default,point:function(e,t){d.push([e,t])},lineEnd:function(){var e=d.length;if(e){do{d.push(d[0].slice())}while(++e<4);f.push(d),d=[]}},polygonEnd:i.default,result:function(){if(!f.length)return null;var e=[],t=[];return f.forEach((function(n){(0,a.default)(n)?e.push([n]):t.push(n)})),t.forEach((function(t){var n=t[0];e.some((function(e){if((0,o.default)(e[0],n))return e.push(t),!0}))||e.push([t])})),f=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}}},49925:(e,t,n)=>{"use strict";function r(e,t){if(!(0<=(t=+t)&&t<=20))throw new Error("invalid digits");function n(e){var n=e.length,r=2,i=new Array(n);for(i[0]=+e[0].toFixed(t),i[1]=+e[1].toFixed(t);r2||a[0]!=t[0]||a[1]!=t[1])&&(r.push(a),t=a)}return 1===r.length&&e.length>1&&r.push(n(e[e.length-1])),r}function a(e){return e.map(i)}function o(e){if(null==e)return e;var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(o)};break;case"Point":t={type:"Point",coordinates:n(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:r(e.coordinates)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:a(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(a)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function s(e){var t={type:"Feature",properties:e.properties,geometry:o(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return s(e);case"FeatureCollection":var l={type:"FeatureCollection",features:e.features.map(s)};return null!=e.bbox&&(l.bbox=e.bbox),l;default:return o(e)}return e}n.r(t),n.d(t,{default:()=>r})},4670:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(43915),i=n(52511);function a(){return(0,i.default)(r.gringortenRaw).scale(176.423)}},52511:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(51300),i=n(28184);function a(e){var t=e(i.halfPi,0)[0]-e(-i.halfPi,0)[0];function n(n,r){var a=(0,i.abs)(n)0?n-i.pi:n+i.pi,r),s=(o[0]-o[1])*i.sqrt1_2,l=(o[0]+o[1])*i.sqrt1_2;if(a)return[s,l];var u=t*i.sqrt1_2,c=s>0^l>0?-1:1;return[c*s-(0,i.sign)(l)*u,c*l-(0,i.sign)(s)*u]}return e.invert&&(n.invert=function(n,r){var a=(n+r)*i.sqrt1_2,o=(r-n)*i.sqrt1_2,s=(0,i.abs)(a)<.5*t&&(0,i.abs)(o)<.5*t;if(!s){var l=t*i.sqrt1_2,u=a>0^o>0?-1:1,c=-u*n+(o>0?1:-1)*l,d=-u*r+(a>0?1:-1)*l;a=(-c-d)*i.sqrt1_2,o=(c-d)*i.sqrt1_2}var f=e.invert(a,o);return s||(f[0]+=a>0?i.pi:-i.pi),f}),(0,r.geoProjection)(n).rotate([-90,-90,45]).clipAngle(179.999)}},53303:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(64035),i=n(52511);function a(){return(0,i.default)(r.guyouRaw).scale(111.48)}},52724:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,rectangularPolyconicRaw:()=>a});var r=n(28184),i=n(66462);function a(e){var t=(0,r.sin)(e);function n(n,i){var a=t?(0,r.tan)(n*t/2)/t:n/2;if(!i)return[2*a,-e];var o=2*(0,r.atan)(a*(0,r.sin)(i)),s=1/(0,r.tan)(i);return[(0,r.sin)(o)*s,i+(1-(0,r.cos)(o))*s-e]}return n.invert=function(n,i){if((0,r.abs)(i+=e)r.epsilon&&--l>0);var f=n*(u=(0,r.tan)(s)),p=(0,r.tan)((0,r.abs)(i)<(0,r.abs)(s+1/u)?.5*(0,r.asin)(f):.5*(0,r.acos)(f)+r.pi/4)/(0,r.sin)(s);return[t?2*(0,r.atan)(t*p)/t:2*p,s]},n}function o(){return(0,i.default)(a).scale(131.215)}},33286:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,robinsonRaw:()=>o});var r=n(51300),i=n(28184),a=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function o(e,t){var n,r=(0,i.min)(18,36*(0,i.abs)(t)/i.pi),o=(0,i.floor)(r),s=r-o,l=(n=a[o])[0],u=n[1],c=(n=a[++o])[0],d=n[1],f=(n=a[(0,i.min)(19,++o)])[0],p=n[1];return[e*(c+s*(f-l)/2+s*s*(f-2*c+l)/2),(0,i.sign)(t)*(d+s*(p-u)/2+s*s*(p-2*d+u)/2)]}function s(){return(0,r.geoProjection)(o).scale(152.63)}a.forEach((function(e){e[1]*=1.593415793900743})),o.invert=function(e,t){var n=90*t,r=(0,i.min)(18,(0,i.abs)(n/5)),o=(0,i.max)(0,(0,i.floor)(r));do{var s=a[o][1],l=a[o+1][1],u=a[(0,i.min)(19,o+2)][1],c=u-s,d=u-2*l+s,f=2*((0,i.abs)(t)-l)/c,p=d/c,h=f*(1-p*f*(1-2*p*f));if(h>=0||1===o){n=(t>=0?5:-5)*(h+r);var g,m=50;do{h=(r=(0,i.min)(18,(0,i.abs)(n)/5))-(o=(0,i.floor)(r)),s=a[o][1],l=a[o+1][1],u=a[(0,i.min)(19,o+2)][1],n-=(g=(0,i.sign)(t)*(l+h*(u-s)/2+h*h*(u-2*l+s)/2)-t)*i.degrees}while((0,i.abs)(g)>i.epsilon2&&--m>0);break}}while(--o>=0);var y=a[o][0],v=a[o+1][0],b=a[(0,i.min)(19,o+2)][0];return[e/(v+h*(b-y)/2+h*h*(b-2*v+y)/2),n*i.radians]}},55769:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,satelliteRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=function(e){function t(t,n){var r=(0,i.cos)(n),a=(e-1)/(e-r*(0,i.cos)(t));return[a*r*(0,i.sin)(t),a*(0,i.sin)(n)]}return t.invert=function(t,n){var r=t*t+n*n,a=(0,i.sqrt)(r),o=(e-(0,i.sqrt)(1-r*(e+1)/(e-1)))/((e-1)/a+a/(e-1));return[(0,i.atan2)(t*o,a*(0,i.sqrt)(1-o*o)),a?(0,i.asin)(n*o/a):0]},t}(e);if(!t)return n;var r=(0,i.cos)(t),a=(0,i.sin)(t);function o(t,i){var o=n(t,i),s=o[1],l=s*a/(e-1)+r;return[o[0]*r/l,s/l]}return o.invert=function(t,i){var o=(e-1)/(e-1-i*a);return n.invert(o*t,o*i*r)},o}function o(){var e=2,t=0,n=(0,r.geoProjectionMutator)(a),o=n(e,t);return o.distance=function(r){return arguments.length?n(e=+r,t):e},o.tilt=function(r){return arguments.length?n(e,t=r*i.radians):t*i.degrees},o.scale(432.147).clipAngle((0,i.acos)(1/e)*i.degrees-1e-6)}},87963:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,sinuMollweidePhi:()=>o,sinuMollweideRaw:()=>l,sinuMollweideY:()=>s});var r=n(51300),i=n(88860),a=n(85801),o=.7109889596207567,s=.0528035274542;function l(e,t){return t>-o?((e=(0,i.mollweideRaw)(e,t))[1]+=s,e):(0,a.sinusoidalRaw)(e,t)}function u(){return(0,r.geoProjection)(l).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}l.invert=function(e,t){return t>-o?i.mollweideRaw.invert(e,t-s):a.sinusoidalRaw.invert(e,t)}},85801:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,sinusoidalRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[e*(0,i.cos)(t),t]}function o(){return(0,r.geoProjection)(a).scale(152.63)}a.invert=function(e,t){return[e/(0,i.cos)(t),t]}},73853:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(28184);function i(e){var t=e(r.halfPi,0)[0]-e(-r.halfPi,0)[0];function n(n,i){var a=n>0?-.5:.5,o=e(n+a*r.pi,i);return o[0]-=a*t,o}return e.invert&&(n.invert=function(n,i){var a=n>0?-.5:.5,o=e.invert(n+a*t,i),s=o[0]-a*r.pi;return s<-r.pi?s+=2*r.pi:s>r.pi&&(s-=2*r.pi),o[0]=s,o}),n}},23399:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>E});var r=1e-4,i=1e4,a=-180,o=a+r,s=180,l=s-r,u=-90,c=u+r,d=90,f=d-r;function p(e){return e.length>0}function h(e){return e===u||e===d?[0,e]:[a,(t=e,Math.floor(t*i)/i)];var t}function g(e){var t=e[0],n=e[1],r=!1;return t<=o?(t=a,r=!0):t>=l&&(t=s,r=!0),n<=c?(n=u,r=!0):n>=f&&(n=d,r=!0),r?[t,n]:e}function m(e){return e.map(g)}function y(e,t,n){for(var r=0,i=e.length;r=l||m<=c||m>=f){a[s]=g(d);for(var y=s+1;yo&&bc&&x=u)break;n.push({index:-1,polygon:t,ring:a=a.slice(y-1)}),a[0]=h(a[0][1]),s=-1,u=a.length}}}}function v(e){var t,n,r,i,a,o,s=e.length,l={},u={};for(t=0;t{"use strict";n.r(t),n.d(t,{default:()=>o,timesRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.tan)(t/2),r=(0,i.sin)(i.quarterPi*n);return[e*(.74482-.34588*r*r),1.70711*n]}function o(){return(0,r.geoProjection)(a).scale(146.153)}a.invert=function(e,t){var n=t/1.70711,r=(0,i.sin)(i.quarterPi*n);return[e/(.74482-.34588*r*r),2*(0,i.atan)(n)]}},19858:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(51300),i=n(28184);function a(e,t,n){var a=(0,r.geoInterpolate)(t,n),o=a(.5),s=(0,r.geoRotation)([-o[0],-o[1]])(t),l=a.distance/2,u=-(0,i.asin)((0,i.sin)(s[1]*i.radians)/(0,i.sin)(l)),c=[-o[0],-o[1],-(s[0]>0?i.pi-u:u)*i.degrees],d=(0,r.geoProjection)(e(l)).rotate(c),f=(0,r.geoRotation)(c),p=d.center;return delete d.rotate,d.center=function(e){return arguments.length?p(f(e)):f.invert(p())},d.clipAngle(90)}},37977:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,twoPointAzimuthalRaw:()=>o,twoPointAzimuthalUsa:()=>s});var r=n(51300),i=n(28184),a=n(19858);function o(e){var t=(0,i.cos)(e);function n(e,n){var i=(0,r.geoGnomonicRaw)(e,n);return i[0]*=t,i}return n.invert=function(e,n){return r.geoGnomonicRaw.invert(e/t,n)},n}function s(){return l([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function l(e,t){return(0,a.default)(o,e,t)}},85645:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,twoPointEquidistantRaw:()=>o,twoPointEquidistantUsa:()=>s});var r=n(51300),i=n(28184),a=n(19858);function o(e){if(!(e*=2))return r.geoAzimuthalEquidistantRaw;var t=-e/2,n=-t,a=e*e,o=(0,i.tan)(n),s=.5/(0,i.sin)(n);function l(r,o){var s=(0,i.acos)((0,i.cos)(o)*(0,i.cos)(r-t)),l=(0,i.acos)((0,i.cos)(o)*(0,i.cos)(r-n));return[((s*=s)-(l*=l))/(2*e),(o<0?-1:1)*(0,i.sqrt)(4*a*l-(a-s+l)*(a-s+l))/(2*e)]}return l.invert=function(e,r){var a,l,u=r*r,c=(0,i.cos)((0,i.sqrt)(u+(a=e+t)*a)),d=(0,i.cos)((0,i.sqrt)(u+(a=e+n)*a));return[(0,i.atan2)(l=c-d,a=(c+d)*o),(r<0?-1:1)*(0,i.acos)((0,i.sqrt)(a*a+l*l)*s)]},l}function s(){return l([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function l(e,t){return(0,a.default)(o,e,t)}},26681:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,vanDerGrintenRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if((0,i.abs)(t){"use strict";n.r(t),n.d(t,{default:()=>o,vanDerGrinten2Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if((0,i.abs)(t){"use strict";n.r(t),n.d(t,{default:()=>o,vanDerGrinten3Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if((0,i.abs)(t){"use strict";n.r(t),n.d(t,{default:()=>o,vanDerGrinten4Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){if(!t)return[e,0];var n=(0,i.abs)(t);if(!e||n===i.halfPi)return[0,t];var r=n/i.halfPi,a=r*r,o=(8*r-a*(a+2)-5)/(2*a*(r-1)),s=o*o,l=r*o,u=a+s+2*l,c=r+3*o,d=e/i.halfPi,f=d+1/d,p=(0,i.sign)((0,i.abs)(e)-i.halfPi)*(0,i.sqrt)(f*f-4),h=p*p,g=u*(a+s*h-1)+(1-a)*(a*(c*c+4*s)+12*l*s+4*s*s),m=(p*(u+s-1)+2*(0,i.sqrt)(g))/(4*u+h);return[(0,i.sign)(e)*i.halfPi*m,(0,i.sign)(t)*i.halfPi*(0,i.sqrt)(1+p*(0,i.abs)(m)-m*m)]}function o(){return(0,r.geoProjection)(a).scale(127.16)}a.invert=function(e,t){var n;if(!e||!t)return[e,t];var r=(0,i.sign)(t);t=(0,i.abs)(t)/i.pi;var a=(0,i.sign)(e)*e/i.halfPi,o=(a*a-1+4*t*t)/(0,i.abs)(a),s=o*o,l=t*(2-(t>.5?(0,i.min)(t,(0,i.abs)(e)):0)),u=e*e+t*t,c=50;do{var d=l*l,f=(8*l-d*(d+2)-5)/(2*d*(l-1)),p=(3*l-d*l-10)/(2*d*l),h=f*f,g=l*f,m=l+f,y=m*m,v=l+3*f,b=y*(d+h*s-1)+(1-d)*(d*(v*v+4*h)+h*(12*g+4*h)),x=-2*m*(4*g*h+(1-4*d+3*d*d)*(1+p)+h*(14*d-6-s+(8*d-8-2*s)*p)+g*(12*d-8+(10*d-10-s)*p)),E=(0,i.sqrt)(b);l-=n=(o*(y+h-1)+2*E-a*(4*y+s))/(o*(2*f*p+2*m*(1+p))+x/E-8*m*(o*(-1+h+y)+2*E)*(1+p)/(s+4*y))}while(n*u*u>i.epsilon&&--c>0);return[(0,i.sign)(e)*((0,i.sqrt)(o*o+4)+o)*i.pi/4,r*i.halfPi*l]}},71112:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,wagner7:()=>s,wagnerRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t,n,r){var a=i.pi/3;e=(0,i.max)(e,i.epsilon),t=(0,i.max)(t,i.epsilon),e=(0,i.min)(e,i.halfPi),t=(0,i.min)(t,i.pi-i.epsilon),n=(0,i.max)(n,0);var o=(n=(0,i.min)(n,100-i.epsilon))/100+1,s=(r=(0,i.max)(r,i.epsilon))/100,l=(0,i.acos)(o*(0,i.cos)(a))/a,u=(0,i.sin)(e)/(0,i.sin)(l*i.halfPi),c=t/i.pi,d=(0,i.sqrt)(s*(0,i.sin)(e/2)/(0,i.sin)(t/2));return function(e,t,n,r,a){function o(o,s){var l=n*(0,i.sin)(r*s),u=(0,i.sqrt)(1-l*l),c=(0,i.sqrt)(2/(1+u*(0,i.cos)(o*=a)));return[e*u*c*(0,i.sin)(o),t*l*c]}return o.invert=function(o,s){var l=o/e,u=s/t,c=(0,i.sqrt)(l*l+u*u),d=2*(0,i.asin)(c/2);return[(0,i.atan2)(o*(0,i.tan)(d),e*c)/a,c&&(0,i.asin)(s*(0,i.sin)(d)/(t*n*c))/r]},o}(d/(0,i.sqrt)(c*u*l),1/(d*(0,i.sqrt)(c*u*l)),u,l,c)}function o(){var e=65*i.radians,t=60*i.radians,n=20,o=200,s=(0,r.geoProjectionMutator)(a),l=s(e,t,n,o);return l.poleline=function(r){return arguments.length?s(e=+r*i.radians,t,n,o):e*i.degrees},l.parallels=function(r){return arguments.length?s(e,t=+r*i.radians,n,o):t*i.degrees},l.inflation=function(r){return arguments.length?s(e,t,n=+r,o):n},l.ratio=function(r){return arguments.length?s(e,t,n,o=+r):o},l.scale(163.775)}function s(){return o().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}},21782:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,wagner4Raw:()=>l});var r=n(51300),i=n(28184),a=n(88860),o=4*i.pi+3*(0,i.sqrt)(3),s=2*(0,i.sqrt)(2*i.pi*(0,i.sqrt)(3)/o),l=(0,a.mollweideBromleyRaw)(s*(0,i.sqrt)(3)/i.pi,s,o/6);function u(){return(0,r.geoProjection)(l).scale(176.84)}},49164:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,wagner6Raw:()=>a});var r=n(51300),i=n(28184);function a(e,t){return[e*(0,i.sqrt)(1-3*t*t/(i.pi*i.pi)),t]}function o(){return(0,r.geoProjection)(a).scale(152.63)}a.invert=function(e,t){return[e/(0,i.sqrt)(1-3*t*t/(i.pi*i.pi)),t]}},87105:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,wiechelRaw:()=>a});var r=n(51300),i=n(28184);function a(e,t){var n=(0,i.cos)(t),r=(0,i.cos)(e)*n,a=1-r,o=(0,i.cos)(e=(0,i.atan2)((0,i.sin)(e)*n,-(0,i.sin)(t))),s=(0,i.sin)(e);return[s*(n=(0,i.sqrt)(1-r*r))-o*a,-o*n-s*a]}function o(){return(0,r.geoProjection)(a).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}a.invert=function(e,t){var n=(e*e+t*t)/-2,r=(0,i.sqrt)(-n*(2+n)),a=t*n+e*r,o=e*n-t*r,s=(0,i.sqrt)(o*o+a*a);return[(0,i.atan2)(r*a,s*(1+n)),s?-(0,i.asin)(r*o/s):0]}},19383:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,winkel3Raw:()=>o});var r=n(51300),i=n(11949),a=n(28184);function o(e,t){var n=(0,i.aitoffRaw)(e,t);return[(n[0]+e/a.halfPi)/2,(n[1]+t)/2]}function s(){return(0,r.geoProjection)(o).scale(158.837)}o.invert=function(e,t){var n=e,r=t,i=25;do{var o,s=(0,a.cos)(r),l=(0,a.sin)(r),u=(0,a.sin)(2*r),c=l*l,d=s*s,f=(0,a.sin)(n),p=(0,a.cos)(n/2),h=(0,a.sin)(n/2),g=h*h,m=1-d*p*p,y=m?(0,a.acos)(s*p)*(0,a.sqrt)(o=1/m):o=0,v=.5*(2*y*s*h+n/a.halfPi)-e,b=.5*(y*l+r)-t,x=.5*o*(d*g+y*s*p*c)+.5/a.halfPi,E=o*(f*u/4-y*l*h),S=.125*o*(u*h-y*l*d*f),w=.5*o*(c*p+y*g*s)+.5,_=E*S-w*x,A=(b*E-v*w)/_,C=(v*S-b*x)/_;n-=A,r-=C}while(((0,a.abs)(A)>a.epsilon||(0,a.abs)(C)>a.epsilon)&&--i>0);return[n,r]}},3247:(e,t,n)=>{"use strict";n.r(t),n.d(t,{areaRingSum:()=>f,areaStream:()=>h,default:()=>b});var r,i,a,o,s,l=n(61388),u=n(32080),c=n(81250),d=n(79418),f=new l.Adder,p=new l.Adder,h={point:c.default,lineStart:c.default,lineEnd:c.default,polygonStart:function(){f=new l.Adder,h.lineStart=g,h.lineEnd=m},polygonEnd:function(){var e=+f;p.add(e<0?u.tau+e:e),this.lineStart=this.lineEnd=this.point=c.default},sphere:function(){p.add(u.tau)}};function g(){h.point=y}function m(){v(r,i)}function y(e,t){h.point=v,r=e,i=t,e*=u.radians,t*=u.radians,a=e,o=(0,u.cos)(t=t/2+u.quarterPi),s=(0,u.sin)(t)}function v(e,t){e*=u.radians,t=(t*=u.radians)/2+u.quarterPi;var n=e-a,r=n>=0?1:-1,i=r*n,l=(0,u.cos)(t),c=(0,u.sin)(t),d=s*c,p=o*l+d*(0,u.cos)(i),h=d*r*(0,u.sin)(i);f.add((0,u.atan2)(h,p)),a=e,o=l,s=c}function b(e){return p=new l.Adder,(0,d.default)(e,h),2*p}},30299:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>D});var r,i,a,o,s,l,u,c,d,f,p,h=n(61388),g=n(3247),m=n(68946),y=n(32080),v=n(79418),b={point:x,lineStart:S,lineEnd:w,polygonStart:function(){b.point=_,b.lineStart=A,b.lineEnd=C,d=new h.Adder,g.areaStream.polygonStart()},polygonEnd:function(){g.areaStream.polygonEnd(),b.point=x,b.lineStart=S,b.lineEnd=w,g.areaRingSum<0?(r=-(a=180),i=-(o=90)):d>y.epsilon?o=90:d<-y.epsilon&&(i=-90),p[0]=r,p[1]=a},sphere:function(){r=-(a=180),i=-(o=90)}};function x(e,t){f.push(p=[r=e,a=e]),to&&(o=t)}function E(e,t){var n=(0,m.cartesian)([e*y.radians,t*y.radians]);if(c){var l=(0,m.cartesianCross)(c,n),u=[l[1],-l[0],0],d=(0,m.cartesianCross)(u,l);(0,m.cartesianNormalizeInPlace)(d),d=(0,m.spherical)(d);var h,g=e-s,v=g>0?1:-1,b=d[0]*y.degrees*v,x=(0,y.abs)(g)>180;x^(v*so&&(o=h):x^(v*s<(b=(b+360)%360-180)&&bo&&(o=t)),x?eT(r,a)&&(a=e):T(e,a)>T(r,a)&&(r=e):a>=r?(ea&&(a=e)):e>s?T(r,e)>T(r,a)&&(a=e):T(e,a)>T(r,a)&&(r=e)}else f.push(p=[r=e,a=e]);to&&(o=t),c=n,s=e}function S(){b.point=E}function w(){p[0]=r,p[1]=a,b.point=x,c=null}function _(e,t){if(c){var n=e-s;d.add((0,y.abs)(n)>180?n+(n>0?360:-360):n)}else l=e,u=t;g.areaStream.point(e,t),E(e,t)}function A(){g.areaStream.lineStart()}function C(){_(l,u),g.areaStream.lineEnd(),(0,y.abs)(d)>y.epsilon&&(r=-(a=180)),p[0]=r,p[1]=a,c=null}function T(e,t){return(t-=e)<0?t+360:t}function k(e,t){return e[0]-t[0]}function R(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tT(s[0],s[1])&&(s[1]=l[1]),T(l[0],s[1])>T(s[0],s[1])&&(s[0]=l[0])):u.push(s=l);for(c=-1/0,t=0,s=u[n=u.length-1];t<=n;s=l,++t)l=u[t],(d=T(s[1],l[0]))>c&&(c=d,r=l[0],a=s[1])}return f=p=null,r===1/0||i===1/0?[[NaN,NaN],[NaN,NaN]]:[[r,i],[a,o]]}},68946:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cartesian:()=>a,cartesianAddInPlace:()=>l,cartesianCross:()=>s,cartesianDot:()=>o,cartesianNormalizeInPlace:()=>c,cartesianScale:()=>u,spherical:()=>i});var r=n(32080);function i(e){return[(0,r.atan2)(e[1],e[0]),(0,r.asin)(e[2])]}function a(e){var t=e[0],n=e[1],i=(0,r.cos)(n);return[i*(0,r.cos)(t),i*(0,r.sin)(t),(0,r.sin)(n)]}function o(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function s(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function l(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function u(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function c(e){var t=(0,r.sqrt)(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}},2874:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>P});var r,i,a,o,s,l,u,c,d,f,p,h,g,m,y,v,b=n(61388),x=n(32080),E=n(81250),S=n(79418),w={sphere:E.default,point:_,lineStart:C,lineEnd:R,polygonStart:function(){w.lineStart=D,w.lineEnd=N},polygonEnd:function(){w.lineStart=C,w.lineEnd=R}};function _(e,t){e*=x.radians,t*=x.radians;var n=(0,x.cos)(t);A(n*(0,x.cos)(e),n*(0,x.sin)(e),(0,x.sin)(t))}function A(e,t,n){++r,a+=(e-a)/r,o+=(t-o)/r,s+=(n-s)/r}function C(){w.point=T}function T(e,t){e*=x.radians,t*=x.radians;var n=(0,x.cos)(t);m=n*(0,x.cos)(e),y=n*(0,x.sin)(e),v=(0,x.sin)(t),w.point=k,A(m,y,v)}function k(e,t){e*=x.radians,t*=x.radians;var n=(0,x.cos)(t),r=n*(0,x.cos)(e),a=n*(0,x.sin)(e),o=(0,x.sin)(t),s=(0,x.atan2)((0,x.sqrt)((s=y*o-v*a)*s+(s=v*r-m*o)*s+(s=m*a-y*r)*s),m*r+y*a+v*o);i+=s,l+=s*(m+(m=r)),u+=s*(y+(y=a)),c+=s*(v+(v=o)),A(m,y,v)}function R(){w.point=_}function D(){w.point=O}function N(){F(h,g),w.point=_}function O(e,t){h=e,g=t,e*=x.radians,t*=x.radians,w.point=F;var n=(0,x.cos)(t);m=n*(0,x.cos)(e),y=n*(0,x.sin)(e),v=(0,x.sin)(t),A(m,y,v)}function F(e,t){e*=x.radians,t*=x.radians;var n=(0,x.cos)(t),r=n*(0,x.cos)(e),a=n*(0,x.sin)(e),o=(0,x.sin)(t),s=y*o-v*a,h=v*r-m*o,g=m*a-y*r,b=(0,x.hypot)(s,h,g),E=(0,x.asin)(b),S=b&&-E/b;d.add(S*s),f.add(S*h),p.add(S*g),i+=E,l+=E*(m+(m=r)),u+=E*(y+(y=a)),c+=E*(v+(v=o)),A(m,y,v)}function P(e){r=i=a=o=s=l=u=c=0,d=new b.Adder,f=new b.Adder,p=new b.Adder,(0,S.default)(e,w);var t=+d,n=+f,h=+p,g=(0,x.hypot)(t,n,h);return g{"use strict";n.r(t),n.d(t,{circleStream:()=>s,default:()=>u});var r=n(68946),i=n(84154),a=n(32080),o=n(75872);function s(e,t,n,i,o,s){if(n){var u=(0,a.cos)(t),c=(0,a.sin)(t),d=i*n;null==o?(o=t+i*a.tau,s=t-d/2):(o=l(u,o),s=l(u,s),(i>0?os)&&(o+=i*a.tau));for(var f,p=o;i>0?p>s:p{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(30283),i=n(32080);const a=(0,r.default)((function(){return!0}),(function(e){var t,n=NaN,r=NaN,a=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,s){var l=o>0?i.pi:-i.pi,u=(0,i.abs)(o-n);(0,i.abs)(u-i.pi)0?i.halfPi:-i.halfPi),e.point(a,r),e.lineEnd(),e.lineStart(),e.point(l,r),e.point(o,r),t=0):a!==l&&u>=i.pi&&((0,i.abs)(n-a)i.epsilon?(0,i.atan)(((0,i.sin)(t)*(o=(0,i.cos)(r))*(0,i.sin)(n)-(0,i.sin)(r)*(a=(0,i.cos)(t))*(0,i.sin)(e))/(a*o*s)):(t+r)/2}(n,r,o,s),e.point(a,r),e.lineEnd(),e.lineStart(),e.point(l,r),t=0),e.point(n=o,r=s),a=l},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var a;if(null==e)a=n*i.halfPi,r.point(-i.pi,a),r.point(0,a),r.point(i.pi,a),r.point(i.pi,0),r.point(i.pi,-a),r.point(0,-a),r.point(-i.pi,-a),r.point(-i.pi,0),r.point(-i.pi,a);else if((0,i.abs)(e[0]-t[0])>i.epsilon){var o=e[0]{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(81250);function i(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:r.default,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}},8579:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(68946),i=n(23494),a=n(32080),o=n(4164),s=n(30283);function l(e){var t=(0,a.cos)(e),n=2*a.radians,l=t>0,u=(0,a.abs)(t)>a.epsilon;function c(e,n){return(0,a.cos)(e)*(0,a.cos)(n)>t}function d(e,n,i){var o=(0,r.cartesian)(e),s=(0,r.cartesian)(n),l=[1,0,0],u=(0,r.cartesianCross)(o,s),c=(0,r.cartesianDot)(u,u),d=u[0],f=c-d*d;if(!f)return!i&&e;var p=t*c/f,h=-t*d/f,g=(0,r.cartesianCross)(l,u),m=(0,r.cartesianScale)(l,p),y=(0,r.cartesianScale)(u,h);(0,r.cartesianAddInPlace)(m,y);var v=g,b=(0,r.cartesianDot)(m,v),x=(0,r.cartesianDot)(v,v),E=b*b-x*((0,r.cartesianDot)(m,m)-1);if(!(E<0)){var S=(0,a.sqrt)(E),w=(0,r.cartesianScale)(v,(-b-S)/x);if((0,r.cartesianAddInPlace)(w,m),w=(0,r.spherical)(w),!i)return w;var _,A=e[0],C=n[0],T=e[1],k=n[1];C0^w[1]<((0,a.abs)(w[0]-A)a.pi^(A<=w[0]&&w[0]<=C)){var N=(0,r.cartesianScale)(v,(-b+S)/x);return(0,r.cartesianAddInPlace)(N,m),[w,(0,r.spherical)(N)]}}}function f(t,n){var r=l?e:a.pi-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}return(0,s.default)(c,(function(e){var t,n,r,i,s;return{lineStart:function(){i=r=!1,s=1},point:function(p,h){var g,m=[p,h],y=c(p,h),v=l?y?0:f(p,h):y?f(p+(p<0?a.pi:-a.pi),h):0;if(!t&&(i=r=y)&&e.lineStart(),y!==r&&(!(g=d(t,m))||(0,o.default)(t,g)||(0,o.default)(m,g))&&(m[2]=1),y!==r)s=0,y?(e.lineStart(),g=d(m,t),e.point(g[0],g[1])):(g=d(t,m),e.point(g[0],g[1],2),e.lineEnd()),t=g;else if(u&&t&&l^y){var b;v&n||!(b=d(m,t,!0))||(s=0,l?(e.lineStart(),e.point(b[0][0],b[0][1]),e.point(b[1][0],b[1][1]),e.lineEnd()):(e.point(b[1][0],b[1][1]),e.lineEnd(),e.lineStart(),e.point(b[0][0],b[0][1],3)))}!y||t&&(0,o.default)(t,m)||e.point(m[0],m[1]),t=m,r=y,n=v},lineEnd:function(){r&&e.lineEnd(),t=null},clean:function(){return s|(i&&r)<<1}}}),(function(t,r,a,o){(0,i.circleStream)(o,e,n,a,t,r)}),l?[0,-e]:[-a.pi,e-a.pi])}},96415:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(93846);function i(){var e,t,n,i=0,a=0,o=960,s=500;return n={stream:function(n){return e&&t===n?e:e=(0,r.default)(i,a,o,s)(t=n)},extent:function(r){return arguments.length?(i=+r[0][0],a=+r[0][1],o=+r[1][0],s=+r[1][1],e=t=null,n):[[i,a],[o,s]]}}}},30283:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(89189),i=n(67630),a=n(32080),o=n(2855),s=n(61388);function l(e,t,n,a){return function(l){var d,f,p,h=t(l),g=(0,r.default)(),m=t(g),y=!1,v={point:b,lineStart:E,lineEnd:S,polygonStart:function(){v.point=w,v.lineStart=_,v.lineEnd=A,f=[],d=[]},polygonEnd:function(){v.point=b,v.lineStart=E,v.lineEnd=S,f=(0,s.merge)(f);var e=(0,o.default)(d,a);f.length?(y||(l.polygonStart(),y=!0),(0,i.default)(f,c,e,n,l)):e&&(y||(l.polygonStart(),y=!0),l.lineStart(),n(null,null,1,l),l.lineEnd()),y&&(l.polygonEnd(),y=!1),f=d=null},sphere:function(){l.polygonStart(),l.lineStart(),n(null,null,1,l),l.lineEnd(),l.polygonEnd()}};function b(t,n){e(t,n)&&l.point(t,n)}function x(e,t){h.point(e,t)}function E(){v.point=x,h.lineStart()}function S(){v.point=b,h.lineEnd()}function w(e,t){p.push([e,t]),m.point(e,t)}function _(){m.lineStart(),p=[]}function A(){w(p[0][0],p[0][1]),m.lineEnd();var e,t,n,r,i=m.clean(),a=g.result(),o=a.length;if(p.pop(),d.push(p),p=null,o)if(1&i){if((t=(n=a[0]).length-1)>0){for(y||(l.polygonStart(),y=!0),l.lineStart(),e=0;e1&&2&i&&a.push(a.pop().concat(a.shift())),f.push(a.filter(u))}return v}}function u(e){return e.length>1}function c(e,t){return((e=e.x)[0]<0?e[1]-a.halfPi-a.epsilon:a.halfPi-e[1])-((t=t.x)[0]<0?t[1]-a.halfPi-a.epsilon:a.halfPi-t[1])}},48733:(e,t,n)=>{"use strict";function r(e,t,n,r,i,a){var o,s=e[0],l=e[1],u=0,c=1,d=t[0]-s,f=t[1]-l;if(o=n-s,d||!(o>0)){if(o/=d,d<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=i-s,d||!(o<0)){if(o/=d,d<0){if(o>c)return;o>u&&(u=o)}else if(d>0){if(o0)){if(o/=f,f<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>u&&(u=o)}else if(f>0){if(o0&&(e[0]=s+u*d,e[1]=l+u*f),c<1&&(t[0]=s+c*d,t[1]=l+c*f),!0}}}}}n.r(t),n.d(t,{default:()=>r})},93846:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(32080),i=n(89189),a=n(48733),o=n(67630),s=n(61388),l=1e9,u=-l;function c(e,t,n,c){function d(r,i){return e<=r&&r<=n&&t<=i&&i<=c}function f(r,i,a,o){var s=0,l=0;if(null==r||(s=p(r,a))!==(l=p(i,a))||g(r,i)<0^a>0)do{o.point(0===s||3===s?e:n,s>1?c:t)}while((s=(s+a+4)%4)!==l);else o.point(i[0],i[1])}function p(i,a){return(0,r.abs)(i[0]-e)0?0:3:(0,r.abs)(i[0]-n)0?2:1:(0,r.abs)(i[1]-t)0?1:0:a>0?3:2}function h(e,t){return g(e.x,t.x)}function g(e,t){var n=p(e,1),r=p(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(r){var p,g,m,y,v,b,x,E,S,w,_,A=r,C=(0,i.default)(),T={point:k,lineStart:function(){T.point=R,g&&g.push(m=[]);w=!0,S=!1,x=E=NaN},lineEnd:function(){p&&(R(y,v),b&&S&&C.rejoin(),p.push(C.result()));T.point=k,S&&A.lineEnd()},polygonStart:function(){A=C,p=[],g=[],_=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,r=g.length;nc&&(d-i)*(c-a)>(f-a)*(e-i)&&++t:f<=c&&(d-i)*(c-a)<(f-a)*(e-i)&&--t;return t}(),n=_&&t,i=(p=(0,s.merge)(p)).length;(n||i)&&(r.polygonStart(),n&&(r.lineStart(),f(null,null,1,r),r.lineEnd()),i&&(0,o.default)(p,h,t,f,r),r.polygonEnd());A=r,p=g=m=null}};function k(e,t){d(e,t)&&A.point(e,t)}function R(r,i){var o=d(r,i);if(g&&m.push([r,i]),w)y=r,v=i,b=o,w=!1,o&&(A.lineStart(),A.point(r,i));else if(o&&S)A.point(r,i);else{var s=[x=Math.max(u,Math.min(l,x)),E=Math.max(u,Math.min(l,E))],f=[r=Math.max(u,Math.min(l,r)),i=Math.max(u,Math.min(l,i))];(0,a.default)(s,f,e,t,n,c)?(S||(A.lineStart(),A.point(s[0],s[1])),A.point(f[0],f[1]),o||A.lineEnd(),_=!1):o&&(A.lineStart(),A.point(r,i),_=!1)}x=r,E=i,S=o}return T}}},67630:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4164),i=n(32080);function a(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function o(e,t,n,o,l){var u,c,d=[],f=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,o=e[0],s=e[t];if((0,r.default)(o,s)){if(!o[2]&&!s[2]){for(l.lineStart(),u=0;u=0;--u)l.point((h=p[u])[0],h[1]);else o(m.x,m.p.x,-1,l);m=m.p}p=(m=m.o).z,y=!y}while(!m.v);l.lineEnd()}}}function s(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r{"use strict";function r(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}n.r(t),n.d(t,{default:()=>r})},84154:(e,t,n)=>{"use strict";function r(e){return function(){return e}}n.r(t),n.d(t,{default:()=>r})},25707:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(2855),i=n(19689),a=n(32080),o={Feature:function(e,t){return l(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r0&&(o=(0,i.default)(e[s],e[s-1]))>0&&n<=o&&r<=o&&(n+r-o)*(1-Math.pow((n-r)/o,2)){"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(65098),i=[null,null],a={type:"LineString",coordinates:i};function o(e,t){return i[0]=e,i[1]=t,(0,r.default)(a)}},11992:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,graticule10:()=>l});var r=n(61388),i=n(32080);function a(e,t,n){var a=(0,r.range)(e,t-i.epsilon,n).concat(t);return function(e){return a.map((function(t){return[e,t]}))}}function o(e,t,n){var a=(0,r.range)(e,t-i.epsilon,n).concat(t);return function(e){return a.map((function(t){return[t,e]}))}}function s(){var e,t,n,s,l,u,c,d,f,p,h,g,m=10,y=m,v=90,b=360,x=2.5;function E(){return{type:"MultiLineString",coordinates:S()}}function S(){return(0,r.range)((0,i.ceil)(s/v)*v,n,v).map(h).concat((0,r.range)((0,i.ceil)(d/b)*b,c,b).map(g)).concat((0,r.range)((0,i.ceil)(t/m)*m,e,m).filter((function(e){return(0,i.abs)(e%v)>i.epsilon})).map(f)).concat((0,r.range)((0,i.ceil)(u/y)*y,l,y).filter((function(e){return(0,i.abs)(e%b)>i.epsilon})).map(p))}return E.lines=function(){return S().map((function(e){return{type:"LineString",coordinates:e}}))},E.outline=function(){return{type:"Polygon",coordinates:[h(s).concat(g(c).slice(1),h(n).reverse().slice(1),g(d).reverse().slice(1))]}},E.extent=function(e){return arguments.length?E.extentMajor(e).extentMinor(e):E.extentMinor()},E.extentMajor=function(e){return arguments.length?(s=+e[0][0],n=+e[1][0],d=+e[0][1],c=+e[1][1],s>n&&(e=s,s=n,n=e),d>c&&(e=d,d=c,c=e),E.precision(x)):[[s,d],[n,c]]},E.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],u=+n[0][1],l=+n[1][1],t>e&&(n=t,t=e,e=n),u>l&&(n=u,u=l,l=n),E.precision(x)):[[t,u],[e,l]]},E.step=function(e){return arguments.length?E.stepMajor(e).stepMinor(e):E.stepMinor()},E.stepMajor=function(e){return arguments.length?(v=+e[0],b=+e[1],E):[v,b]},E.stepMinor=function(e){return arguments.length?(m=+e[0],y=+e[1],E):[m,y]},E.precision=function(r){return arguments.length?(x=+r,f=a(u,l,90),p=o(t,e,x),h=a(d,c,90),g=o(s,n,x),E):x},E.extentMajor([[-180,-90+i.epsilon],[180,90-i.epsilon]]).extentMinor([[-180,-80-i.epsilon],[180,80+i.epsilon]])}function l(){return s()()}},32212:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=e=>e},51300:(e,t,n)=>{"use strict";n.r(t),n.d(t,{geoAlbers:()=>y.default,geoAlbersUsa:()=>v.default,geoArea:()=>r.default,geoAzimuthalEqualArea:()=>b.default,geoAzimuthalEqualAreaRaw:()=>b.azimuthalEqualAreaRaw,geoAzimuthalEquidistant:()=>x.default,geoAzimuthalEquidistantRaw:()=>x.azimuthalEquidistantRaw,geoBounds:()=>i.default,geoCentroid:()=>a.default,geoCircle:()=>o.default,geoClipAntimeridian:()=>s.default,geoClipCircle:()=>l.default,geoClipExtent:()=>u.default,geoClipRectangle:()=>c.default,geoConicConformal:()=>E.default,geoConicConformalRaw:()=>E.conicConformalRaw,geoConicEqualArea:()=>S.default,geoConicEqualAreaRaw:()=>S.conicEqualAreaRaw,geoConicEquidistant:()=>w.default,geoConicEquidistantRaw:()=>w.conicEquidistantRaw,geoContains:()=>d.default,geoDistance:()=>f.default,geoEqualEarth:()=>_.default,geoEqualEarthRaw:()=>_.equalEarthRaw,geoEquirectangular:()=>A.default,geoEquirectangularRaw:()=>A.equirectangularRaw,geoGnomonic:()=>C.default,geoGnomonicRaw:()=>C.gnomonicRaw,geoGraticule:()=>p.default,geoGraticule10:()=>p.graticule10,geoIdentity:()=>T.default,geoInterpolate:()=>h.default,geoLength:()=>g.default,geoMercator:()=>R.default,geoMercatorRaw:()=>R.mercatorRaw,geoNaturalEarth1:()=>D.default,geoNaturalEarth1Raw:()=>D.naturalEarth1Raw,geoOrthographic:()=>N.default,geoOrthographicRaw:()=>N.orthographicRaw,geoPath:()=>m.default,geoProjection:()=>k.default,geoProjectionMutator:()=>k.projectionMutator,geoRotation:()=>P.default,geoStereographic:()=>O.default,geoStereographicRaw:()=>O.stereographicRaw,geoStream:()=>M.default,geoTransform:()=>I.default,geoTransverseMercator:()=>F.default,geoTransverseMercatorRaw:()=>F.transverseMercatorRaw});var r=n(3247),i=n(30299),a=n(2874),o=n(23494),s=n(26164),l=n(8579),u=n(96415),c=n(93846),d=n(25707),f=n(19689),p=n(11992),h=n(55379),g=n(65098),m=n(74558),y=n(42109),v=n(25738),b=n(90940),x=n(27380),E=n(56689),S=n(10903),w=n(62039),_=n(28878),A=n(77144),C=n(89110),T=n(66748),k=n(80588),R=n(58227),D=n(73102),N=n(17100),O=n(52228),F=n(64620),P=n(75872),M=n(79418),I=n(16308)},55379:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(32080);function i(e,t){var n=e[0]*r.radians,i=e[1]*r.radians,a=t[0]*r.radians,o=t[1]*r.radians,s=(0,r.cos)(i),l=(0,r.sin)(i),u=(0,r.cos)(o),c=(0,r.sin)(o),d=s*(0,r.cos)(n),f=s*(0,r.sin)(n),p=u*(0,r.cos)(a),h=u*(0,r.sin)(a),g=2*(0,r.asin)((0,r.sqrt)((0,r.haversin)(o-i)+s*u*(0,r.haversin)(a-n))),m=(0,r.sin)(g),y=g?function(e){var t=(0,r.sin)(e*=g)/m,n=(0,r.sin)(g-e)/m,i=n*d+t*p,a=n*f+t*h,o=n*l+t*c;return[(0,r.atan2)(a,i)*r.degrees,(0,r.atan2)(o,(0,r.sqrt)(i*i+a*a))*r.degrees]}:function(){return[n*r.degrees,i*r.degrees]};return y.distance=g,y}},65098:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r,i,a,o,s=n(61388),l=n(32080),u=n(81250),c=n(79418),d={sphere:u.default,point:u.default,lineStart:function(){d.point=p,d.lineEnd=f},lineEnd:u.default,polygonStart:u.default,polygonEnd:u.default};function f(){d.point=d.lineEnd=u.default}function p(e,t){e*=l.radians,t*=l.radians,i=e,a=(0,l.sin)(t),o=(0,l.cos)(t),d.point=h}function h(e,t){e*=l.radians,t*=l.radians;var n=(0,l.sin)(t),s=(0,l.cos)(t),u=(0,l.abs)(e-i),c=(0,l.cos)(u),d=s*(0,l.sin)(u),f=o*n-a*s*c,p=a*n+o*s*c;r.add((0,l.atan2)((0,l.sqrt)(d*d+f*f),p)),i=e,a=n,o=s}function g(e){return r=new s.Adder,(0,c.default)(e,d),+r}},32080:(e,t,n)=>{"use strict";n.r(t),n.d(t,{abs:()=>d,acos:()=>A,asin:()=>C,atan:()=>f,atan2:()=>p,ceil:()=>g,cos:()=>h,degrees:()=>u,epsilon:()=>r,epsilon2:()=>i,exp:()=>m,floor:()=>y,halfPi:()=>o,haversin:()=>T,hypot:()=>v,log:()=>b,pi:()=>a,pow:()=>x,quarterPi:()=>s,radians:()=>c,sign:()=>S,sin:()=>E,sqrt:()=>w,tan:()=>_,tau:()=>l});var r=1e-6,i=1e-12,a=Math.PI,o=a/2,s=a/4,l=2*a,u=180/a,c=a/180,d=Math.abs,f=Math.atan,p=Math.atan2,h=Math.cos,g=Math.ceil,m=Math.exp,y=Math.floor,v=Math.hypot,b=Math.log,x=Math.pow,E=Math.sin,S=Math.sign||function(e){return e>0?1:e<0?-1:0},w=Math.sqrt,_=Math.tan;function A(e){return e>1?0:e<-1?a:Math.acos(e)}function C(e){return e>1?o:e<-1?-o:Math.asin(e)}function T(e){return(e=E(e/2))*e}},81250:(e,t,n)=>{"use strict";function r(){}n.r(t),n.d(t,{default:()=>r})},69605:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>y});var r,i,a,o,s=n(61388),l=n(32080),u=n(81250),c=new s.Adder,d=new s.Adder,f={point:u.default,lineStart:u.default,lineEnd:u.default,polygonStart:function(){f.lineStart=p,f.lineEnd=m},polygonEnd:function(){f.lineStart=f.lineEnd=f.point=u.default,c.add((0,l.abs)(d)),d=new s.Adder},result:function(){var e=c/2;return c=new s.Adder,e}};function p(){f.point=h}function h(e,t){f.point=g,r=a=e,i=o=t}function g(e,t){d.add(o*e-a*t),a=e,o=t}function m(){g(r,i)}const y=f},71093:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(81250),i=1/0,a=i,o=-i,s=o;const l={point:function(e,t){eo&&(o=e);ts&&(s=t)},lineStart:r.default,lineEnd:r.default,polygonStart:r.default,polygonEnd:r.default,result:function(){var e=[[i,a],[o,s]];return o=s=-(a=i=1/0),e}}},23076:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>T});var r,i,a,o,s=n(32080),l=0,u=0,c=0,d=0,f=0,p=0,h=0,g=0,m=0,y={point:v,lineStart:b,lineEnd:S,polygonStart:function(){y.lineStart=w,y.lineEnd=_},polygonEnd:function(){y.point=v,y.lineStart=b,y.lineEnd=S},result:function(){var e=m?[h/m,g/m]:p?[d/p,f/p]:c?[l/c,u/c]:[NaN,NaN];return l=u=c=d=f=p=h=g=m=0,e}};function v(e,t){l+=e,u+=t,++c}function b(){y.point=x}function x(e,t){y.point=E,v(a=e,o=t)}function E(e,t){var n=e-a,r=t-o,i=(0,s.sqrt)(n*n+r*r);d+=i*(a+e)/2,f+=i*(o+t)/2,p+=i,v(a=e,o=t)}function S(){y.point=v}function w(){y.point=A}function _(){C(r,i)}function A(e,t){y.point=C,v(r=a=e,i=o=t)}function C(e,t){var n=e-a,r=t-o,i=(0,s.sqrt)(n*n+r*r);d+=i*(a+e)/2,f+=i*(o+t)/2,p+=i,h+=(i=o*e-a*t)*(a+e),g+=i*(o+t),m+=3*i,v(a=e,o=t)}const T=y},55577:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(32080),i=n(81250);function a(e){this._context=e}a.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,r.tau)}},result:i.default}},74558:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(32212),i=n(79418),a=n(69605),o=n(71093),s=n(23076),l=n(55577),u=n(80350),c=n(56221);function d(e,t){let n,d,f=3,p=4.5;function h(e){return e&&("function"==typeof p&&d.pointRadius(+p.apply(this,arguments)),(0,i.default)(e,n(d))),d.result()}return h.area=function(e){return(0,i.default)(e,n(a.default)),a.default.result()},h.measure=function(e){return(0,i.default)(e,n(u.default)),u.default.result()},h.bounds=function(e){return(0,i.default)(e,n(o.default)),o.default.result()},h.centroid=function(e){return(0,i.default)(e,n(s.default)),s.default.result()},h.projection=function(t){return arguments.length?(n=null==t?(e=null,r.default):(e=t).stream,h):e},h.context=function(e){return arguments.length?(d=null==e?(t=null,new c.default(f)):new l.default(t=e),"function"!=typeof p&&d.pointRadius(p),h):t},h.pointRadius=function(e){return arguments.length?(p="function"==typeof e?e:(d.pointRadius(+e),+e),h):p},h.digits=function(e){if(!arguments.length)return f;if(null==e)f=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);f=t}return null===t&&(d=new c.default(f)),h},h.projection(e).digits(f).context(t)}},80350:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r,i,a,o,s,l=n(61388),u=n(32080),c=n(81250),d=new l.Adder,f={point:c.default,lineStart:function(){f.point=p},lineEnd:function(){r&&h(i,a),f.point=c.default},polygonStart:function(){r=!0},polygonEnd:function(){r=null},result:function(){var e=+d;return d=new l.Adder,e}};function p(e,t){f.point=h,i=o=e,a=s=t}function h(e,t){o-=e,s-=t,d.add((0,u.sqrt)(o*o+s*s)),o=e,s=t}const g=f},56221:(e,t,n)=>{"use strict";let r,i,a,o;n.r(t),n.d(t,{default:()=>s});class s{constructor(e){this._append=null==e?l:function(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return l;if(t!==r){const e=10**t;r=t,i=function(t){let n=1;this._+=t[0];for(const r=t.length;n{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(32080);function i(e,t){return(0,r.abs)(e[0]-t[0]){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(61388),i=n(68946),a=n(32080);function o(e){return(0,a.abs)(e[0])<=a.pi?e[0]:(0,a.sign)(e[0])*(((0,a.abs)(e[0])+a.pi)%a.tau-a.pi)}function s(e,t){var n=o(t),s=t[1],l=(0,a.sin)(s),u=[(0,a.sin)(n),-(0,a.cos)(n),0],c=0,d=0,f=new r.Adder;1===l?s=a.halfPi+a.epsilon:-1===l&&(s=-a.halfPi-a.epsilon);for(var p=0,h=e.length;p=0?1:-1,D=R*k,N=D>a.pi,O=x*C;if(f.add((0,a.atan2)(O*R*(0,a.sin)(D),E*T+O*(0,a.cos)(D))),c+=N?k+R*a.tau:k,N^v>=n^_>=n){var F=(0,i.cartesianCross)((0,i.cartesian)(y),(0,i.cartesian)(w));(0,i.cartesianNormalizeInPlace)(F);var P=(0,i.cartesianCross)(u,F);(0,i.cartesianNormalizeInPlace)(P);var M=(N^k>=0?-1:1)*(0,a.asin)(P[2]);(s>M||s===M&&(F[0]||F[1]))&&(d+=N^k>=0?1:-1)}}return(c<-a.epsilon||c{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(10903);function i(){return(0,r.default)().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}},25738:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(32080),i=n(42109),a=n(10903),o=n(51007);function s(){var e,t,n,s,l,u,c=(0,i.default)(),d=(0,a.default)().rotate([154,0]).center([-2,58.5]).parallels([55,65]),f=(0,a.default)().rotate([157,0]).center([-3,19.9]).parallels([8,18]),p={point:function(e,t){u=[e,t]}};function h(e){var t=e[0],r=e[1];return u=null,n.point(t,r),u||(s.point(t,r),u)||(l.point(t,r),u)}function g(){return e=t=null,h}return h.invert=function(e){var t=c.scale(),n=c.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?d:i>=.166&&i<.234&&r>=-.214&&r<-.115?f:c).invert(e)},h.stream=function(n){return e&&t===n?e:(r=[c.stream(t=n),d.stream(n),f.stream(n)],i=r.length,e={point:function(e,t){for(var n=-1;++n{"use strict";n.r(t),n.d(t,{azimuthalInvert:()=>a,azimuthalRaw:()=>i});var r=n(32080);function i(e){return function(t,n){var i=(0,r.cos)(t),a=(0,r.cos)(n),o=e(i*a);return o===1/0?[2,0]:[o*a*(0,r.sin)(t),o*(0,r.sin)(n)]}}function a(e){return function(t,n){var i=(0,r.sqrt)(t*t+n*n),a=e(i),o=(0,r.sin)(a),s=(0,r.cos)(a);return[(0,r.atan2)(t*o,i*s),(0,r.asin)(i&&n*o/i)]}}},90940:(e,t,n)=>{"use strict";n.r(t),n.d(t,{azimuthalEqualAreaRaw:()=>o,default:()=>s});var r=n(32080),i=n(18585),a=n(80588),o=(0,i.azimuthalRaw)((function(e){return(0,r.sqrt)(2/(1+e))}));function s(){return(0,a.default)(o).scale(124.75).clipAngle(179.999)}o.invert=(0,i.azimuthalInvert)((function(e){return 2*(0,r.asin)(e/2)}))},27380:(e,t,n)=>{"use strict";n.r(t),n.d(t,{azimuthalEquidistantRaw:()=>o,default:()=>s});var r=n(32080),i=n(18585),a=n(80588),o=(0,i.azimuthalRaw)((function(e){return(e=(0,r.acos)(e))&&e/(0,r.sin)(e)}));function s(){return(0,a.default)(o).scale(79.4188).clipAngle(179.999)}o.invert=(0,i.azimuthalInvert)((function(e){return e}))},70952:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conicProjection:()=>a});var r=n(32080),i=n(80588);function a(e){var t=0,n=r.pi/3,a=(0,i.projectionMutator)(e),o=a(t,n);return o.parallels=function(e){return arguments.length?a(t=e[0]*r.radians,n=e[1]*r.radians):[t*r.degrees,n*r.degrees]},o}},56689:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conicConformalRaw:()=>s,default:()=>l});var r=n(32080),i=n(70952),a=n(58227);function o(e){return(0,r.tan)((r.halfPi+e)/2)}function s(e,t){var n=(0,r.cos)(e),i=e===t?(0,r.sin)(e):(0,r.log)(n/(0,r.cos)(t))/(0,r.log)(o(t)/o(e)),s=n*(0,r.pow)(o(e),i)/i;if(!i)return a.mercatorRaw;function l(e,t){s>0?t<-r.halfPi+r.epsilon&&(t=-r.halfPi+r.epsilon):t>r.halfPi-r.epsilon&&(t=r.halfPi-r.epsilon);var n=s/(0,r.pow)(o(t),i);return[n*(0,r.sin)(i*e),s-n*(0,r.cos)(i*e)]}return l.invert=function(e,t){var n=s-t,a=(0,r.sign)(i)*(0,r.sqrt)(e*e+n*n),o=(0,r.atan2)(e,(0,r.abs)(n))*(0,r.sign)(n);return n*i<0&&(o-=r.pi*(0,r.sign)(e)*(0,r.sign)(n)),[o/i,2*(0,r.atan)((0,r.pow)(s/a,1/i))-r.halfPi]},l}function l(){return(0,i.conicProjection)(s).scale(109.5).parallels([30,30])}},10903:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conicEqualAreaRaw:()=>o,default:()=>s});var r=n(32080),i=n(70952),a=n(13383);function o(e,t){var n=(0,r.sin)(e),i=(n+(0,r.sin)(t))/2;if((0,r.abs)(i){"use strict";n.r(t),n.d(t,{conicEquidistantRaw:()=>o,default:()=>s});var r=n(32080),i=n(70952),a=n(77144);function o(e,t){var n=(0,r.cos)(e),i=e===t?(0,r.sin)(e):(n-(0,r.cos)(t))/(t-e),o=n/i+e;if((0,r.abs)(i){"use strict";n.r(t),n.d(t,{cylindricalEqualAreaRaw:()=>i});var r=n(32080);function i(e){var t=(0,r.cos)(e);function n(e,n){return[e*t,(0,r.sin)(n)/t]}return n.invert=function(e,n){return[e/t,(0,r.asin)(n*t)]},n}},28878:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d,equalEarthRaw:()=>c});var r=n(80588),i=n(32080),a=1.340264,o=-.081106,s=893e-6,l=.003796,u=(0,i.sqrt)(3)/2;function c(e,t){var n=(0,i.asin)(u*(0,i.sin)(t)),r=n*n,c=r*r*r;return[e*(0,i.cos)(n)/(u*(a+3*o*r+c*(7*s+9*l*r))),n*(a+o*r+c*(s+l*r))]}function d(){return(0,r.default)(c).scale(177.158)}c.invert=function(e,t){for(var n,r=t,c=r*r,d=c*c*c,f=0;f<12&&(d=(c=(r-=n=(r*(a+o*c+d*(s+l*c))-t)/(a+3*o*c+d*(7*s+9*l*c)))*r)*c*c,!((0,i.abs)(n){"use strict";n.r(t),n.d(t,{default:()=>a,equirectangularRaw:()=>i});var r=n(80588);function i(e,t){return[e,t]}function a(){return(0,r.default)(i).scale(152.63)}i.invert=i},51007:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fitExtent:()=>o,fitHeight:()=>u,fitSize:()=>s,fitWidth:()=>l});var r=n(79418),i=n(71093);function a(e,t,n){var a=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=a&&e.clipExtent(null),(0,r.default)(n,e.stream(i.default)),t(i.default.result()),null!=a&&e.clipExtent(a),e}function o(e,t,n){return a(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])}),n)}function s(e,t,n){return o(e,[[0,0],t],n)}function l(e,t,n){return a(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])}),n)}function u(e,t,n){return a(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])}),n)}},89110:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,gnomonicRaw:()=>o});var r=n(32080),i=n(18585),a=n(80588);function o(e,t){var n=(0,r.cos)(t),i=(0,r.cos)(e)*n;return[n*(0,r.sin)(e)/i,(0,r.sin)(t)/i]}function s(){return(0,a.default)(o).scale(144.049).clipAngle(60)}o.invert=(0,i.azimuthalInvert)(r.atan)},66748:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(93846),i=n(32212),a=n(16308),o=n(51007),s=n(32080);function l(){var e,t,n,l,u,c,d,f=1,p=0,h=0,g=1,m=1,y=0,v=null,b=1,x=1,E=(0,a.transformer)({point:function(e,t){var n=_([e,t]);this.stream.point(n[0],n[1])}}),S=i.default;function w(){return b=f*g,x=f*m,c=d=null,_}function _(n){var r=n[0]*b,i=n[1]*x;if(y){var a=i*e-r*t;r=r*e+i*t,i=a}return[r+p,i+h]}return _.invert=function(n){var r=n[0]-p,i=n[1]-h;if(y){var a=i*e+r*t;r=r*e-i*t,i=a}return[r/b,i/x]},_.stream=function(e){return c&&d===e?c:c=E(S(d=e))},_.postclip=function(e){return arguments.length?(S=e,v=n=l=u=null,w()):S},_.clipExtent=function(e){return arguments.length?(S=null==e?(v=n=l=u=null,i.default):(0,r.default)(v=+e[0][0],n=+e[0][1],l=+e[1][0],u=+e[1][1]),w()):null==v?null:[[v,n],[l,u]]},_.scale=function(e){return arguments.length?(f=+e,w()):f},_.translate=function(e){return arguments.length?(p=+e[0],h=+e[1],w()):[p,h]},_.angle=function(n){return arguments.length?(y=n%360*s.radians,t=(0,s.sin)(y),e=(0,s.cos)(y),w()):y*s.degrees},_.reflectX=function(e){return arguments.length?(g=e?-1:1,w()):g<0},_.reflectY=function(e){return arguments.length?(m=e?-1:1,w()):m<0},_.fitExtent=function(e,t){return(0,o.fitExtent)(_,e,t)},_.fitSize=function(e,t){return(0,o.fitSize)(_,e,t)},_.fitWidth=function(e,t){return(0,o.fitWidth)(_,e,t)},_.fitHeight=function(e,t){return(0,o.fitHeight)(_,e,t)},_}},80588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g,projectionMutator:()=>m});var r=n(26164),i=n(8579),a=n(93846),o=n(51692),s=n(32212),l=n(32080),u=n(75872),c=n(16308),d=n(51007),f=n(11073),p=(0,c.transformer)({point:function(e,t){this.stream.point(e*l.radians,t*l.radians)}});function h(e,t,n,r,i,a){if(!a)return function(e,t,n,r,i){function a(a,o){return[t+e*(a*=r),n-e*(o*=i)]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}(e,t,n,r,i);var o=(0,l.cos)(a),s=(0,l.sin)(a),u=o*e,c=s*e,d=o/e,f=s/e,p=(s*n-o*t)/e,h=(s*t+o*n)/e;function g(e,a){return[u*(e*=r)-c*(a*=i)+t,n-c*e-u*a]}return g.invert=function(e,t){return[r*(d*e-f*t+p),i*(h-f*e-d*t)]},g}function g(e){return m((function(){return e}))()}function m(e){var t,n,g,m,y,v,b,x,E,S,w=150,_=480,A=250,C=0,T=0,k=0,R=0,D=0,N=0,O=1,F=1,P=null,M=r.default,I=null,$=s.default,L=.5;function B(e){return x(e[0]*l.radians,e[1]*l.radians)}function U(e){return(e=x.invert(e[0],e[1]))&&[e[0]*l.degrees,e[1]*l.degrees]}function z(){var e=h(w,0,0,O,F,N).apply(null,t(C,T)),r=h(w,_-e[0],A-e[1],O,F,N);return n=(0,u.rotateRadians)(k,R,D),b=(0,o.default)(t,r),x=(0,o.default)(n,b),v=(0,f.default)(b,L),q()}function q(){return E=S=null,B}return B.stream=function(e){return E&&S===e?E:E=p(function(e){return(0,c.transformer)({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(n)(M(v($(S=e)))))},B.preclip=function(e){return arguments.length?(M=e,P=void 0,q()):M},B.postclip=function(e){return arguments.length?($=e,I=g=m=y=null,q()):$},B.clipAngle=function(e){return arguments.length?(M=+e?(0,i.default)(P=e*l.radians):(P=null,r.default),q()):P*l.degrees},B.clipExtent=function(e){return arguments.length?($=null==e?(I=g=m=y=null,s.default):(0,a.default)(I=+e[0][0],g=+e[0][1],m=+e[1][0],y=+e[1][1]),q()):null==I?null:[[I,g],[m,y]]},B.scale=function(e){return arguments.length?(w=+e,z()):w},B.translate=function(e){return arguments.length?(_=+e[0],A=+e[1],z()):[_,A]},B.center=function(e){return arguments.length?(C=e[0]%360*l.radians,T=e[1]%360*l.radians,z()):[C*l.degrees,T*l.degrees]},B.rotate=function(e){return arguments.length?(k=e[0]%360*l.radians,R=e[1]%360*l.radians,D=e.length>2?e[2]%360*l.radians:0,z()):[k*l.degrees,R*l.degrees,D*l.degrees]},B.angle=function(e){return arguments.length?(N=e%360*l.radians,z()):N*l.degrees},B.reflectX=function(e){return arguments.length?(O=e?-1:1,z()):O<0},B.reflectY=function(e){return arguments.length?(F=e?-1:1,z()):F<0},B.precision=function(e){return arguments.length?(v=(0,f.default)(b,L=e*e),q()):(0,l.sqrt)(L)},B.fitExtent=function(e,t){return(0,d.fitExtent)(B,e,t)},B.fitSize=function(e,t){return(0,d.fitSize)(B,e,t)},B.fitWidth=function(e,t){return(0,d.fitWidth)(B,e,t)},B.fitHeight=function(e,t){return(0,d.fitHeight)(B,e,t)},function(){return t=e.apply(this,arguments),B.invert=t.invert&&U,z()}}},58227:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,mercatorProjection:()=>l,mercatorRaw:()=>o});var r=n(32080),i=n(75872),a=n(80588);function o(e,t){return[e,(0,r.log)((0,r.tan)((r.halfPi+t)/2))]}function s(){return l(o).scale(961/r.tau)}function l(e){var t,n,s,l=(0,a.default)(e),u=l.center,c=l.scale,d=l.translate,f=l.clipExtent,p=null;function h(){var a=r.pi*c(),u=l((0,i.default)(l.rotate()).invert([0,0]));return f(null==p?[[u[0]-a,u[1]-a],[u[0]+a,u[1]+a]]:e===o?[[Math.max(u[0]-a,p),t],[Math.min(u[0]+a,n),s]]:[[p,Math.max(u[1]-a,t)],[n,Math.min(u[1]+a,s)]])}return l.scale=function(e){return arguments.length?(c(e),h()):c()},l.translate=function(e){return arguments.length?(d(e),h()):d()},l.center=function(e){return arguments.length?(u(e),h()):u()},l.clipExtent=function(e){return arguments.length?(null==e?p=t=n=s=null:(p=+e[0][0],t=+e[0][1],n=+e[1][0],s=+e[1][1]),h()):null==p?null:[[p,t],[n,s]]},h()}o.invert=function(e,t){return[e,2*(0,r.atan)((0,r.exp)(t))-r.halfPi]}},73102:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,naturalEarth1Raw:()=>a});var r=n(80588),i=n(32080);function a(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function o(){return(0,r.default)(a).scale(175.295)}a.invert=function(e,t){var n,r=t,a=25;do{var o=r*r,s=o*o;r-=n=(r*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-t)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while((0,i.abs)(n)>i.epsilon&&--a>0);return[e/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]}},17100:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,orthographicRaw:()=>o});var r=n(32080),i=n(18585),a=n(80588);function o(e,t){return[(0,r.cos)(t)*(0,r.sin)(e),(0,r.sin)(t)]}function s(){return(0,a.default)(o).scale(249.5).clipAngle(90+r.epsilon)}o.invert=(0,i.azimuthalInvert)(r.asin)},11073:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(68946),i=n(32080),a=n(16308),o=16,s=(0,i.cos)(30*i.radians);function l(e,t){return+t?function(e,t){function n(r,a,o,l,u,c,d,f,p,h,g,m,y,v){var b=d-r,x=f-a,E=b*b+x*x;if(E>4*t&&y--){var S=l+h,w=u+g,_=c+m,A=(0,i.sqrt)(S*S+w*w+_*_),C=(0,i.asin)(_/=A),T=(0,i.abs)((0,i.abs)(_)-1)t||(0,i.abs)((b*N+x*O)/E-.5)>.3||l*h+u*g+c*m{"use strict";n.r(t),n.d(t,{default:()=>s,stereographicRaw:()=>o});var r=n(32080),i=n(18585),a=n(80588);function o(e,t){var n=(0,r.cos)(t),i=1+(0,r.cos)(e)*n;return[n*(0,r.sin)(e)/i,(0,r.sin)(t)/i]}function s(){return(0,a.default)(o).scale(250).clipAngle(142)}o.invert=(0,i.azimuthalInvert)((function(e){return 2*(0,r.atan)(e)}))},64620:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,transverseMercatorRaw:()=>a});var r=n(32080),i=n(58227);function a(e,t){return[(0,r.log)((0,r.tan)((r.halfPi+t)/2)),-e]}function o(){var e=(0,i.mercatorProjection)(a),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}a.invert=function(e,t){return[-t,2*(0,r.atan)((0,r.exp)(e))-r.halfPi]}},75872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c,rotateRadians:()=>o});var r=n(51692),i=n(32080);function a(e,t){return(0,i.abs)(e)>i.pi&&(e-=Math.round(e/i.tau)*i.tau),[e,t]}function o(e,t,n){return(e%=i.tau)?t||n?(0,r.default)(l(e),u(t,n)):l(e):t||n?u(t,n):a}function s(e){return function(t,n){return t+=e,(0,i.abs)(t)>i.pi&&(t-=Math.round(t/i.tau)*i.tau),[t,n]}}function l(e){var t=s(e);return t.invert=s(-e),t}function u(e,t){var n=(0,i.cos)(e),r=(0,i.sin)(e),a=(0,i.cos)(t),o=(0,i.sin)(t);function s(e,t){var s=(0,i.cos)(t),l=(0,i.cos)(e)*s,u=(0,i.sin)(e)*s,c=(0,i.sin)(t),d=c*n+l*r;return[(0,i.atan2)(u*a-d*o,l*n-c*r),(0,i.asin)(d*a+u*o)]}return s.invert=function(e,t){var s=(0,i.cos)(t),l=(0,i.cos)(e)*s,u=(0,i.sin)(e)*s,c=(0,i.sin)(t),d=c*a-u*o;return[(0,i.atan2)(u*a+c*o,l*n+d*r),(0,i.asin)(d*n-l*r)]},s}function c(e){function t(t){return(t=e(t[0]*i.radians,t[1]*i.radians))[0]*=i.degrees,t[1]*=i.degrees,t}return e=o(e[0]*i.radians,e[1]*i.radians,e.length>2?e[2]*i.radians:0),t.invert=function(t){return(t=e.invert(t[0]*i.radians,t[1]*i.radians))[0]*=i.degrees,t[1]*=i.degrees,t},t}a.invert=a},79418:(e,t,n)=>{"use strict";function r(e,t){e&&a.hasOwnProperty(e.type)&&a[e.type](e,t)}n.r(t),n.d(t,{default:()=>l});var i={Feature:function(e,t){r(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,a=n.length;++i{"use strict";function r(e){return{stream:i(e)}}function i(e){return function(t){var n=new a;for(var r in e)n[r]=e[r];return n.stream=t,n}}function a(){}n.r(t),n.d(t,{default:()=>r,transformer:()=>i}),a.prototype={constructor:a,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}}},54902:(e,t,n)=>{"use strict";function r(e){return null==e?null:i(e)}function i(e){if("function"!=typeof e)throw new Error;return e}n.r(t),n.d(t,{optional:()=>r,required:()=>i})},70507:(e,t,n)=>{"use strict";function r(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function i(e,t){let n,r,i=e.length;for(;i;)r=t()*i--|0,n=e[i],e[i]=e[r],e[r]=n;return e}n.r(t),n.d(t,{default:()=>r,shuffle:()=>i})},94292:(e,t,n)=>{"use strict";function r(e,t){return e.parent===t.parent?1:2}function i(e,t){return e+t.x}function a(e,t){return Math.max(e,t.y)}function o(){var e=r,t=1,n=1,o=!1;function s(r){var s,l=0;r.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(i,0)/e.length}(n),t.y=function(e){return 1+e.reduce(a,0)}(n)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)}));var u=function(e){for(var t;t=e.children;)e=t[0];return e}(r),c=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(r),d=u.x-e(u,c)/2,f=c.x+e(c,u)/2;return r.eachAfter(o?function(e){e.x=(e.x-r.x)*t,e.y=(r.y-e.y)*n}:function(e){e.x=(e.x-d)/(f-d)*t,e.y=(1-(r.y?e.y/r.y:1))*n})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(o=!1,t=+e[0],n=+e[1],s):o?null:[t,n]},s.nodeSize=function(e){return arguments.length?(o=!0,t=+e[0],n=+e[1],s):o?[t,n]:null},s}n.r(t),n.d(t,{default:()=>o})},69112:(e,t,n)=>{"use strict";function r(){return 0}function i(e){return function(){return e}}n.r(t),n.d(t,{constantZero:()=>r,default:()=>i})},54044:(e,t,n)=>{"use strict";function r(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}n.r(t),n.d(t,{default:()=>r})},17489:(e,t,n)=>{"use strict";function r(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function i(){return this.eachAfter(r)}n.r(t),n.d(t,{default:()=>i})},63242:(e,t,n)=>{"use strict";function r(){return Array.from(this)}n.r(t),n.d(t,{default:()=>r})},34705:(e,t,n)=>{"use strict";function r(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}n.r(t),n.d(t,{default:()=>r})},57235:(e,t,n)=>{"use strict";function r(e,t){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;rr})},49514:(e,t,n)=>{"use strict";function r(e,t){for(var n,r,i=this,a=[i],o=-1;i=a.pop();)if(e.call(t,i,++o,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this}n.r(t),n.d(t,{default:()=>r})},40827:(e,t,n)=>{"use strict";function r(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}n.r(t),n.d(t,{default:()=>r})},79070:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Node:()=>E,computeHeight:()=>x,default:()=>m});var r=n(17489),i=n(34705),a=n(49514),o=n(57235),s=n(40827),l=n(8429),u=n(48604),c=n(89495),d=n(54044),f=n(63242),p=n(4632),h=n(7023),g=n(51774);function m(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=v)):void 0===t&&(t=y);for(var n,r,i,a,o,s=new E(e),l=[s];n=l.pop();)if((i=t(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)l.push(r=i[a]=new E(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(x)}function y(e){return e.children}function v(e){return Array.isArray(e)?e[1]:null}function b(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function x(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function E(e){this.data=e,this.depth=this.height=0,this.parent=null}E.prototype=m.prototype={constructor:E,count:r.default,each:i.default,eachAfter:o.default,eachBefore:a.default,find:s.default,sum:l.default,sort:u.default,path:c.default,ancestors:d.default,descendants:f.default,leaves:p.default,links:h.default,copy:function(){return m(this).eachBefore(b)},[Symbol.iterator]:g.default}},51774:(e,t,n)=>{"use strict";function*r(){var e,t,n,r,i=this,a=[i];do{for(e=a.reverse(),a=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;nr})},4632:(e,t,n)=>{"use strict";function r(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e}n.r(t),n.d(t,{default:()=>r})},7023:(e,t,n)=>{"use strict";function r(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t}n.r(t),n.d(t,{default:()=>r})},89495:(e,t,n)=>{"use strict";function r(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}n.r(t),n.d(t,{default:()=>r})},48604:(e,t,n)=>{"use strict";function r(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))}n.r(t),n.d(t,{default:()=>r})},8429:(e,t,n)=>{"use strict";function r(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))}n.r(t),n.d(t,{default:()=>r})},37750:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Node:()=>i.Node,cluster:()=>r.default,hierarchy:()=>i.default,pack:()=>a.default,packEnclose:()=>s.default,packSiblings:()=>o.default,partition:()=>l.default,stratify:()=>u.default,tree:()=>c.default,treemap:()=>d.default,treemapBinary:()=>f.default,treemapDice:()=>p.default,treemapResquarify:()=>y.default,treemapSlice:()=>h.default,treemapSliceDice:()=>g.default,treemapSquarify:()=>m.default});var r=n(94292),i=n(79070),a=n(16486),o=n(24747),s=n(6155),l=n(61464),u=n(15904),c=n(84768),d=n(67415),f=n(13706),p=n(82684),h=n(48009),g=n(64006),m=n(38273),y=n(76340)},68584:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const r=1664525,i=1013904223,a=4294967296;function o(){let e=1;return()=>(e=(r*e+i)%a)/a}},6155:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,packEncloseRandom:()=>o});var r=n(70507),i=n(68584);function a(e){return o(e,(0,i.default)())}function o(e,t){for(var n,i,a=0,o=(e=(0,r.shuffle)(Array.from(e),t)).length,l=[];a0&&n*n>r*r+i*i}function c(e,t){for(var n=0;n1e-6?(T+Math.sqrt(T*T-4*C*k))/(2*C):k/T);return{x:r+S+w*R,y:i+_+A*R,r:R}}},16486:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(54902),i=n(69112),a=n(68584),o=n(24747);function s(e){return Math.sqrt(e.value)}function l(){var e=null,t=1,n=1,o=i.constantZero;function l(r){const l=(0,a.default)();return r.x=t/2,r.y=n/2,e?r.eachBefore(u(e)).eachAfter(c(o,.5,l)).eachBefore(d(1)):r.eachBefore(u(s)).eachAfter(c(i.constantZero,1,l)).eachAfter(c(o,r.r/Math.min(t,n),l)).eachBefore(d(Math.min(t,n)/(2*r.r))),r}return l.radius=function(t){return arguments.length?(e=(0,r.optional)(t),l):e},l.size=function(e){return arguments.length?(t=+e[0],n=+e[1],l):[t,n]},l.padding=function(e){return arguments.length?(o="function"==typeof e?e:(0,i.default)(+e),l):o},l}function u(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function c(e,t,n){return function(r){if(i=r.children){var i,a,s,l=i.length,u=e(r)*t||0;if(u)for(a=0;a{"use strict";n.r(t),n.d(t,{default:()=>d,packSiblingsRandom:()=>c});var r=n(70507),i=n(68584),a=n(6155);function o(e,t,n){var r,i,a,o,s=e.x-t.x,l=e.y-t.y,u=s*s+l*l;u?(i=t.r+n.r,i*=i,o=e.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=e.x-r*s-a*l,n.y=e.y-r*l+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=t.x+r*s-a*l,n.y=t.y+r*l+a*s)):(n.x=t.x+n.r,n.y=t.y)}function s(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function l(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function u(e){this._=e,this.next=null,this.previous=null}function c(e,t){if(!(d=(e=(0,r.default)(e)).length))return 0;var n,i,c,d,f,p,h,g,m,y,v;if((n=e[0]).x=0,n.y=0,!(d>1))return n.r;if(i=e[1],n.x=-i.r,i.x=n.r,i.y=0,!(d>2))return n.r+i.r;o(i,n,c=e[2]),n=new u(n),i=new u(i),c=new u(c),n.next=c.previous=i,i.next=n.previous=c,c.next=i.previous=n;e:for(h=3;h{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(61003),i=n(82684);function a(){var e=1,t=1,n=0,a=!1;function o(o){var s=o.height+1;return o.x0=o.y0=n,o.x1=e,o.y1=t/s,o.eachBefore(function(e,t){return function(r){r.children&&(0,i.default)(r,r.x0,e*(r.depth+1)/t,r.x1,e*(r.depth+2)/t);var a=r.x0,o=r.y0,s=r.x1-n,l=r.y1-n;s{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(54902),i=n(79070),a={depth:-1},o={},s={};function l(e){return e.id}function u(e){return e.parentId}function c(){var e,t=l,n=u;function c(r){var l,u,c,p,h,g,m,y,v=Array.from(r),b=t,x=n,E=new Map;if(null!=e){const t=v.map(((t,n)=>function(e){e=`${e}`;let t=e.length;f(e,t-1)&&!f(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(d),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(d(e)),v.push(s));b=(e,n)=>t[n],x=(e,t)=>n[t]}for(c=0,l=v.length;c=0&&(g=v[e]).data===s;--e)g.data=null}if(p.parent=a,p.eachBefore((function(e){e.depth=e.parent.depth+1,--l})).eachBefore(i.computeHeight),p.parent=null,l>0)throw new Error("cycle");return p}return c.id=function(e){return arguments.length?(t=(0,r.optional)(e),c):t},c.parentId=function(e){return arguments.length?(n=(0,r.optional)(e),c):n},c.path=function(t){return arguments.length?(e=(0,r.optional)(t),c):e},c}function d(e){let t=e.length;if(t<2)return"";for(;--t>1&&!f(e,t););return e.slice(0,t)}function f(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}},84768:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(79070);function i(e,t){return e.parent===t.parent?1:2}function a(e){var t=e.children;return t?t[0]:e.t}function o(e){var t=e.children;return t?t[t.length-1]:e.t}function s(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function l(e,t,n){return e.a.parent===t.parent?e.a:n}function u(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function c(){var e=i,t=1,n=1,r=null;function c(i){var a=function(e){for(var t,n,r,i,a,o=new u(e,0),s=[o];t=s.pop();)if(r=t._.children)for(t.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=t.children[i]=new u(r[i],i)),n.parent=t;return(o.parent=new u(null,0)).children=[o],o}(i);if(a.eachAfter(d),a.parent.m=-a.z,a.eachBefore(f),r)i.eachBefore(p);else{var o=i,s=i,l=i;i.eachBefore((function(e){e.xs.x&&(s=e),e.depth>l.depth&&(l=e)}));var c=o===s?1:e(o,s)/2,h=c-o.x,g=t/(s.x+c+h),m=n/(l.depth||1);i.eachBefore((function(e){e.x=(e.x+h)*g,e.y=e.depth*m}))}return i}function d(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var u=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-u):t.z=u}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,u=t,c=t,d=n,f=u.parent.children[0],p=u.m,h=c.m,g=d.m,m=f.m;d=o(d),u=a(u),d&&u;)f=a(f),(c=o(c)).a=t,(i=d.z+g-u.z-p+e(d._,u._))>0&&(s(l(d,t,r),t,i),p+=i,h+=i),g+=d.m,p+=u.m,m+=f.m,h+=c.m;d&&!o(c)&&(c.t=d,c.m+=g-h),u&&!a(f)&&(f.t=u,f.m+=p-m,r=t)}return r}(t,i,t.parent.A||r[0])}function f(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function p(e){e.x*=t,e.y=e.depth*n}return c.separation=function(t){return arguments.length?(e=t,c):e},c.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],c):r?null:[t,n]},c.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],c):r?[t,n]:null},c}u.prototype=Object.create(r.Node.prototype)},13706:(e,t,n)=>{"use strict";function r(e,t,n,r,i){var a,o,s=e.children,l=s.length,u=new Array(l+1);for(u[0]=o=a=0;a=n-1){var c=s[t];return c.x0=i,c.y0=a,c.x1=o,void(c.y1=l)}var d=u[t],f=r/2+d,p=t+1,h=n-1;for(;p>>1;u[g]l-a){var v=r?(i*y+o*m)/r:o;e(t,p,m,i,a,v,l),e(p,n,y,v,a,o,l)}else{var b=r?(a*y+l*m)/r:l;e(t,p,m,i,a,o,b),e(p,n,y,i,b,o,l)}}(0,l,e.value,t,n,r,i)}n.r(t),n.d(t,{default:()=>r})},82684:(e,t,n)=>{"use strict";function r(e,t,n,r,i){for(var a,o=e.children,s=-1,l=o.length,u=e.value&&(r-t)/e.value;++sr})},67415:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(61003),i=n(38273),a=n(54902),o=n(69112);function s(){var e=i.default,t=!1,n=1,s=1,l=[0],u=o.constantZero,c=o.constantZero,d=o.constantZero,f=o.constantZero,p=o.constantZero;function h(e){return e.x0=e.y0=0,e.x1=n,e.y1=s,e.eachBefore(g),l=[0],t&&e.eachBefore(r.default),e}function g(t){var n=l[t.depth],r=t.x0+n,i=t.y0+n,a=t.x1-n,o=t.y1-n;a{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(82684),i=n(48009),a=n(38273);const o=function e(t){function n(e,n,o,s,l){if((u=e._squarify)&&u.ratio===t)for(var u,c,d,f,p,h=-1,g=u.length,m=e.value;++h1?t:1)},n}(a.phi)},61003:(e,t,n)=>{"use strict";function r(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}n.r(t),n.d(t,{default:()=>r})},48009:(e,t,n)=>{"use strict";function r(e,t,n,r,i){for(var a,o=e.children,s=-1,l=o.length,u=e.value&&(i-n)/e.value;++sr})},64006:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(82684),i=n(48009);function a(e,t,n,a,o){(1&e.depth?i.default:r.default)(e,t,n,a,o)}},38273:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,phi:()=>a,squarifyRatio:()=>o});var r=n(82684),i=n(48009),a=(1+Math.sqrt(5))/2;function o(e,t,n,a,o,s){for(var l,u,c,d,f,p,h,g,m,y,v,b=[],x=t.children,E=0,S=0,w=x.length,_=t.value;Eh&&(h=u),v=f*f*y,(g=Math.max(h/v,v/p))>m){f-=u;break}m=g}b.push(l={value:f,dice:c1?t:1)},n}(a)},68079:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,genericArray:()=>o});var r=n(58503),i=n(10128);function a(e,t){return((0,i.isNumberArray)(t)?i.default:o)(e,t)}function o(e,t){var n,i=t?t.length:0,a=e?Math.min(i,e.length):0,o=new Array(a),s=new Array(i);for(n=0;n{"use strict";function r(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function i(e){var t=e.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[i],o=e[i+1],s=i>0?e[i-1]:2*a-o,l=ir,default:()=>i})},19804:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(86160);function i(e){var t=e.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*t),a=e[(i+t-1)%t],o=e[i%t],s=e[(i+1)%t],l=e[(i+2)%t];return(0,r.basis)((n-i/t)*t,a,o,s,l)}}},84709:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,gamma:()=>o,hue:()=>a});var r=n(3116);function i(e,t){return function(n){return e+n*t}}function a(e,t){var n=t-e;return n?i(e,n>180||n<-180?n-360*Math.round(n/360):n):(0,r.default)(isNaN(e)?t:e)}function o(e){return 1==(e=+e)?s:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):(0,r.default)(isNaN(t)?n:t)}}function s(e,t){var n=t-e;return n?i(e,n):(0,r.default)(isNaN(e)?t:e)}},3116:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=e=>()=>e},69837:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cubehelixLong:()=>s,default:()=>o});var r=n(72090),i=n(84709);function a(e){return function t(n){function a(t,a){var o=e((t=(0,r.cubehelix)(t)).h,(a=(0,r.cubehelix)(a)).h),s=(0,i.default)(t.s,a.s),l=(0,i.default)(t.l,a.l),u=(0,i.default)(t.opacity,a.opacity);return function(e){return t.h=o(e),t.s=s(e),t.l=l(Math.pow(e,n)),t.opacity=u(e),t+""}}return n=+n,a.gamma=t,a}(1)}const o=a(i.hue);var s=a(i.default)},58172:(e,t,n)=>{"use strict";function r(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}n.r(t),n.d(t,{default:()=>r})},28403:(e,t,n)=>{"use strict";function r(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}n.r(t),n.d(t,{default:()=>r})},21785:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,hclLong:()=>s});var r=n(72090),i=n(84709);function a(e){return function(t,n){var a=e((t=(0,r.hcl)(t)).h,(n=(0,r.hcl)(n)).h),o=(0,i.default)(t.c,n.c),s=(0,i.default)(t.l,n.l),l=(0,i.default)(t.opacity,n.opacity);return function(e){return t.h=a(e),t.c=o(e),t.l=s(e),t.opacity=l(e),t+""}}}const o=a(i.hue);var s=a(i.default)},17705:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,hslLong:()=>s});var r=n(72090),i=n(84709);function a(e){return function(t,n){var a=e((t=(0,r.hsl)(t)).h,(n=(0,r.hsl)(n)).h),o=(0,i.default)(t.s,n.s),s=(0,i.default)(t.l,n.l),l=(0,i.default)(t.opacity,n.opacity);return function(e){return t.h=a(e),t.s=o(e),t.l=s(e),t.opacity=l(e),t+""}}}const o=a(i.hue);var s=a(i.default)},16232:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(84709);function i(e,t){var n=(0,r.hue)(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}}},82226:(e,t,n)=>{"use strict";n.r(t),n.d(t,{interpolate:()=>r.default,interpolateArray:()=>i.default,interpolateBasis:()=>a.default,interpolateBasisClosed:()=>o.default,interpolateCubehelix:()=>E.default,interpolateCubehelixLong:()=>E.cubehelixLong,interpolateDate:()=>s.default,interpolateDiscrete:()=>l.default,interpolateHcl:()=>x.default,interpolateHclLong:()=>x.hclLong,interpolateHsl:()=>v.default,interpolateHslLong:()=>v.hslLong,interpolateHue:()=>u.default,interpolateLab:()=>b.default,interpolateNumber:()=>c.default,interpolateNumberArray:()=>d.default,interpolateObject:()=>f.default,interpolateRgb:()=>y.default,interpolateRgbBasis:()=>y.rgbBasis,interpolateRgbBasisClosed:()=>y.rgbBasisClosed,interpolateRound:()=>p.default,interpolateString:()=>h.default,interpolateTransformCss:()=>g.interpolateTransformCss,interpolateTransformSvg:()=>g.interpolateTransformSvg,interpolateZoom:()=>m.default,piecewise:()=>S.default,quantize:()=>w.default});var r=n(58503),i=n(68079),a=n(86160),o=n(19804),s=n(58172),l=n(28403),u=n(16232),c=n(8981),d=n(10128),f=n(34287),p=n(49770),h=n(67737),g=n(91957),m=n(95835),y=n(21197),v=n(17705),b=n(74917),x=n(21785),E=n(69837),S=n(23104),w=n(70819)},74917:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(72090),i=n(84709);function a(e,t){var n=(0,i.default)((e=(0,r.lab)(e)).l,(t=(0,r.lab)(t)).l),a=(0,i.default)(e.a,t.a),o=(0,i.default)(e.b,t.b),s=(0,i.default)(e.opacity,t.opacity);return function(t){return e.l=n(t),e.a=a(t),e.b=o(t),e.opacity=s(t),e+""}}},8981:(e,t,n)=>{"use strict";function r(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}n.r(t),n.d(t,{default:()=>r})},10128:(e,t,n)=>{"use strict";function r(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(n=0;nr,isNumberArray:()=>i})},34287:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(58503);function i(e,t){var n,i={},a={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=(0,r.default)(e[n],t[n]):a[n]=t[n];return function(e){for(n in i)a[n]=i[n](e);return a}}},23104:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(58503);function i(e,t){void 0===t&&(t=e,e=r.default);for(var n=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);n{"use strict";function r(e,t){for(var n=new Array(t),r=0;rr})},21197:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,rgbBasis:()=>u,rgbBasisClosed:()=>c});var r=n(72090),i=n(86160),a=n(19804),o=n(84709);const s=function e(t){var n=(0,o.gamma)(t);function i(e,t){var i=n((e=(0,r.rgb)(e)).r,(t=(0,r.rgb)(t)).r),a=n(e.g,t.g),s=n(e.b,t.b),l=(0,o.default)(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=a(t),e.b=s(t),e.opacity=l(t),e+""}}return i.gamma=e,i}(1);function l(e){return function(t){var n,i,a=t.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n{"use strict";function r(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}n.r(t),n.d(t,{default:()=>r})},67737:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(8981),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,a=new RegExp(i.source,"g");function o(e,t){var n,o,s,l=i.lastIndex=a.lastIndex=0,u=-1,c=[],d=[];for(e+="",t+="";(n=i.exec(e))&&(o=a.exec(t));)(s=o.index)>l&&(s=t.slice(l,s),c[u]?c[u]+=s:c[++u]=s),(n=n[0])===(o=o[0])?c[u]?c[u]+=o:c[++u]=o:(c[++u]=null,d.push({i:u,x:(0,r.default)(n,o)})),l=a.lastIndex;return l{"use strict";n.r(t),n.d(t,{default:()=>a,identity:()=>i});var r=180/Math.PI,i={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function a(e,t,n,i,a,o){var s,l,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(l=Math.sqrt(n*n+i*i))&&(n/=l,i/=l,u/=l),e*i{"use strict";n.r(t),n.d(t,{interpolateTransformCss:()=>o,interpolateTransformSvg:()=>s});var r=n(8981),i=n(41226);function a(e,t,n,i){function a(e){return e.length?e.pop()+" ":""}return function(o,s){var l=[],u=[];return o=e(o),s=e(s),function(e,i,a,o,s,l){if(e!==a||i!==o){var u=s.push("translate(",null,t,null,n);l.push({i:u-4,x:(0,r.default)(e,a)},{i:u-2,x:(0,r.default)(i,o)})}else(a||o)&&s.push("translate("+a+t+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,l,u),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(a(n)+"rotate(",null,i)-2,x:(0,r.default)(e,t)})):t&&n.push(a(n)+"rotate("+t+i)}(o.rotate,s.rotate,l,u),function(e,t,n,o){e!==t?o.push({i:n.push(a(n)+"skewX(",null,i)-2,x:(0,r.default)(e,t)}):t&&n.push(a(n)+"skewX("+t+i)}(o.skewX,s.skewX,l,u),function(e,t,n,i,o,s){if(e!==n||t!==i){var l=o.push(a(o)+"scale(",null,",",null,")");s.push({i:l-4,x:(0,r.default)(e,n)},{i:l-2,x:(0,r.default)(t,i)})}else 1===n&&1===i||o.push(a(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,l,u),o=s=null,function(e){for(var t,n=-1,r=u.length;++n{"use strict";n.r(t),n.d(t,{parseCss:()=>a,parseSvg:()=>o});var r,i=n(31852);function a(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?i.identity:(0,i.default)(t.a,t.b,t.c,t.d,t.e,t.f)}function o(e){return null==e?i.identity:(r||(r=document.createElementNS("http://www.w3.org/2000/svg","g")),r.setAttribute("transform",e),(e=r.transform.baseVal.consolidate())?(e=e.matrix,(0,i.default)(e.a,e.b,e.c,e.d,e.e,e.f)):i.identity)}},58503:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(72090),i=n(21197),a=n(68079),o=n(58172),s=n(8981),l=n(34287),u=n(67737),c=n(3116),d=n(10128);function f(e,t){var n,f=typeof t;return null==t||"boolean"===f?(0,c.default)(t):("number"===f?s.default:"string"===f?(n=(0,r.color)(t))?(t=n,i.default):u.default:t instanceof r.color?i.default:t instanceof Date?o.default:(0,d.isNumberArray)(t)?d.default:Array.isArray(t)?a.genericArray:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?l.default:s.default)(e,t)}},95835:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});function r(e){return((e=Math.exp(e))+1/e)/2}const i=function e(t,n,i){function a(e,a){var o,s,l=e[0],u=e[1],c=e[2],d=a[0],f=a[1],p=a[2],h=d-l,g=f-u,m=h*h+g*g;if(m<1e-12)s=Math.log(p/c)/t,o=function(e){return[l+e*h,u+e*g,c*Math.exp(t*e*s)]};else{var y=Math.sqrt(m),v=(p*p-c*c+i*m)/(2*c*n*y),b=(p*p-c*c-i*m)/(2*p*n*y),x=Math.log(Math.sqrt(v*v+1)-v),E=Math.log(Math.sqrt(b*b+1)-b);s=(E-x)/t,o=function(e){var i,a=e*s,o=r(x),d=c/(n*y)*(o*(i=t*a+x,((i=Math.exp(2*i))-1)/(i+1))-function(e){return((e=Math.exp(e))-1/e)/2}(x));return[l+d*h,u+d*g,c*o/r(t*a+x)]}}return o.duration=1e3*s*t/Math.SQRT2,o}return a.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},a}(Math.SQRT2,2,4)},20066:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Path:()=>r.Path,path:()=>r.path,pathRound:()=>r.pathRound});var r=n(14083)},14083:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Path:()=>l,path:()=>u,pathRound:()=>c});const r=Math.PI,i=2*r,a=1e-6,o=i-a;function s(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return s;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;ta)if(Math.abs(f*u-c*d)>a&&o){let h=n-s,g=i-l,m=u*u+c*c,y=h*h+g*g,v=Math.sqrt(m),b=Math.sqrt(p),x=o*Math.tan((r-Math.acos((m+p-y)/(2*v*b)))/2),E=x/b,S=x/v;Math.abs(E-1)>a&&this._append`L${e+E*d},${t+E*f}`,this._append`A${o},${o},0,0,${+(f*h>d*g)},${this._x1=e+S*u},${this._y1=t+S*c}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,s,l,u){if(e=+e,t=+t,u=!!u,(n=+n)<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(s),d=n*Math.sin(s),f=e+c,p=t+d,h=1^u,g=u?s-l:l-s;null===this._x1?this._append`M${f},${p}`:(Math.abs(this._x1-f)>a||Math.abs(this._y1-p)>a)&&this._append`L${f},${p}`,n&&(g<0&&(g=g%i+i),g>o?this._append`A${n},${n},0,1,${h},${e-c},${t-d}A${n},${n},0,1,${h},${this._x1=f},${this._y1=p}`:g>a&&this._append`A${n},${n},0,${+(g>=r)},${h},${this._x1=e+n*Math.cos(l)},${this._y1=t+n*Math.sin(l)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function u(){return new l}function c(e=3){return new l(+e)}u.prototype=l.prototype},16277:(e,t,n)=>{"use strict";function r(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return i(this.cover(t,n),t,n,e)}function i(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a,o,s,l,u,c,d,f,p=e._root,h={data:r},g=e._x0,m=e._y0,y=e._x1,v=e._y1;if(!p)return e._root=h,e;for(;p.length;)if((u=t>=(a=(g+y)/2))?g=a:y=a,(c=n>=(o=(m+v)/2))?m=o:v=o,i=p,!(p=p[d=c<<1|u]))return i[d]=h,e;if(s=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===s&&n===l)return h.next=p,i?i[d]=h:e._root=h,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(u=t>=(a=(g+y)/2))?g=a:y=a,(c=n>=(o=(m+v)/2))?m=o:v=o}while((d=c<<1|u)==(f=(l>=o)<<1|s>=a));return i[f]=p,i[d]=h,e}function a(e){var t,n,r,a,o=e.length,s=new Array(o),l=new Array(o),u=1/0,c=1/0,d=-1/0,f=-1/0;for(n=0;nd&&(d=r),af&&(f=a));if(u>d||c>f)return this;for(this.cover(u,c).cover(d,f),n=0;na,default:()=>r})},82017:(e,t,n)=>{"use strict";function r(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o,s,l=i-n||1,u=this._root;n>e||e>=i||r>t||t>=a;)switch(s=(tr})},63892:(e,t,n)=>{"use strict";function r(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}n.r(t),n.d(t,{default:()=>r})},32980:(e,t,n)=>{"use strict";function r(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}n.r(t),n.d(t,{default:()=>r})},21539:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(50975);function i(e,t,n){var i,a,o,s,l,u,c,d=this._x0,f=this._y0,p=this._x1,h=this._y1,g=[],m=this._root;for(m&&g.push(new r.default(m,d,f,p,h)),null==n?n=1/0:(d=e-n,f=t-n,p=e+n,h=t+n,n*=n);u=g.pop();)if(!(!(m=u.node)||(a=u.x0)>p||(o=u.y0)>h||(s=u.x1)=v)<<1|e>=y)&&(u=g[g.length-1],g[g.length-1]=g[g.length-1-c],g[g.length-1-c]=u)}else{var b=e-+this._x.call(null,m.data),x=t-+this._y.call(null,m.data),E=b*b+x*x;if(E{"use strict";n.r(t),n.d(t,{quadtree:()=>r.default});var r=n(62479)},50975:(e,t,n)=>{"use strict";function r(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}n.r(t),n.d(t,{default:()=>r})},62479:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(16277),i=n(82017),a=n(63892),o=n(32980),s=n(21539),l=n(59616),u=n(89232),c=n(53977),d=n(2621),f=n(93759),p=n(11086),h=n(55437);function g(e,t,n){var r=new m(null==t?p.defaultX:t,null==n?h.defaultY:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function m(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function y(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var v=g.prototype=m.prototype;v.copy=function(){var e,t,n=new m(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=y(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=y(t));return n},v.add=r.default,v.addAll=r.addAll,v.cover=i.default,v.data=a.default,v.extent=o.default,v.find=s.default,v.remove=l.default,v.removeAll=l.removeAll,v.root=u.default,v.size=c.default,v.visit=d.default,v.visitAfter=f.default,v.x=p.default,v.y=h.default},59616:(e,t,n)=>{"use strict";function r(e){if(isNaN(a=+this._x.call(null,e))||isNaN(o=+this._y.call(null,e)))return this;var t,n,r,i,a,o,s,l,u,c,d,f,p=this._root,h=this._x0,g=this._y0,m=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((u=a>=(s=(h+m)/2))?h=s:m=s,(c=o>=(l=(g+y)/2))?g=l:y=l,t=p,!(p=p[d=c<<1|u]))return this;if(!p.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(n=t,f=d)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):t?(i?t[d]=i:delete t[d],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[f]=p:this._root=p),this):(this._root=i,this)}function i(e){for(var t=0,n=e.length;tr,removeAll:()=>i})},89232:(e,t,n)=>{"use strict";function r(){return this._root}n.r(t),n.d(t,{default:()=>r})},53977:(e,t,n)=>{"use strict";function r(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}n.r(t),n.d(t,{default:()=>r})},2621:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(50975);function i(e){var t,n,i,a,o,s,l=[],u=this._root;for(u&&l.push(new r.default(u,this._x0,this._y0,this._x1,this._y1));t=l.pop();)if(!e(u=t.node,i=t.x0,a=t.y0,o=t.x1,s=t.y1)&&u.length){var c=(i+o)/2,d=(a+s)/2;(n=u[3])&&l.push(new r.default(n,c,d,o,s)),(n=u[2])&&l.push(new r.default(n,i,d,c,s)),(n=u[1])&&l.push(new r.default(n,c,a,o,d)),(n=u[0])&&l.push(new r.default(n,i,a,c,d))}return this}},93759:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(50975);function i(e){var t,n=[],i=[];for(this._root&&n.push(new r.default(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var a=t.node;if(a.length){var o,s=t.x0,l=t.y0,u=t.x1,c=t.y1,d=(s+u)/2,f=(l+c)/2;(o=a[0])&&n.push(new r.default(o,s,l,d,f)),(o=a[1])&&n.push(new r.default(o,d,l,u,f)),(o=a[2])&&n.push(new r.default(o,s,f,d,c)),(o=a[3])&&n.push(new r.default(o,d,f,u,c))}i.push(t)}for(;t=i.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}},11086:(e,t,n)=>{"use strict";function r(e){return e[0]}function i(e){return arguments.length?(this._x=e,this):this._x}n.r(t),n.d(t,{default:()=>i,defaultX:()=>r})},55437:(e,t,n)=>{"use strict";function r(e){return e[1]}function i(e){return arguments.length?(this._y=e,this):this._y}n.r(t),n.d(t,{default:()=>i,defaultY:()=>r})},69573:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666")},54025:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666")},96018:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")},35167:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2")},76786:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc")},52612:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999")},51021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3")},25006:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f")},38512:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")},96406:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")},61995:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=(0,n(40938).default)("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0")},40938:(e,t,n)=>{"use strict";function r(e){for(var t=e.length/6|0,n=new Array(t),r=0;rr})},79505:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(r.default);const o=(0,i.default)(a)},59429:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(r.default);const o=(0,i.default)(a)},22389:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(r.default);const o=(0,i.default)(a)},57680:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(r.default);const o=(0,i.default)(a)},69501:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(r.default);const o=(0,i.default)(a)},91060:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(r.default);const o=(0,i.default)(a)},64704:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(r.default);const o=(0,i.default)(a)},46268:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(r.default);const o=(0,i.default)(a)},25874:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(r.default);const o=(0,i.default)(a)},71864:(e,t,n)=>{"use strict";n.r(t),n.d(t,{interpolateBlues:()=>M.default,interpolateBrBG:()=>h.default,interpolateBuGn:()=>w.default,interpolateBuPu:()=>_.default,interpolateCividis:()=>z.default,interpolateCool:()=>j.cool,interpolateCubehelixDefault:()=>q.default,interpolateGnBu:()=>A.default,interpolateGreens:()=>I.default,interpolateGreys:()=>$.default,interpolateInferno:()=>V.inferno,interpolateMagma:()=>V.magma,interpolateOrRd:()=>C.default,interpolateOranges:()=>U.default,interpolatePRGn:()=>g.default,interpolatePiYG:()=>m.default,interpolatePlasma:()=>V.plasma,interpolatePuBu:()=>k.default,interpolatePuBuGn:()=>T.default,interpolatePuOr:()=>y.default,interpolatePuRd:()=>R.default,interpolatePurples:()=>L.default,interpolateRainbow:()=>j.default,interpolateRdBu:()=>v.default,interpolateRdGy:()=>b.default,interpolateRdPu:()=>D.default,interpolateRdYlBu:()=>x.default,interpolateRdYlGn:()=>E.default,interpolateReds:()=>B.default,interpolateSinebow:()=>H.default,interpolateSpectral:()=>S.default,interpolateTurbo:()=>G.default,interpolateViridis:()=>V.default,interpolateWarm:()=>j.warm,interpolateYlGn:()=>O.default,interpolateYlGnBu:()=>N.default,interpolateYlOrBr:()=>F.default,interpolateYlOrRd:()=>P.default,schemeAccent:()=>i.default,schemeBlues:()=>M.scheme,schemeBrBG:()=>h.scheme,schemeBuGn:()=>w.scheme,schemeBuPu:()=>_.scheme,schemeCategory10:()=>r.default,schemeDark2:()=>a.default,schemeGnBu:()=>A.scheme,schemeGreens:()=>I.scheme,schemeGreys:()=>$.scheme,schemeObservable10:()=>o.default,schemeOrRd:()=>C.scheme,schemeOranges:()=>U.scheme,schemePRGn:()=>g.scheme,schemePaired:()=>s.default,schemePastel1:()=>l.default,schemePastel2:()=>u.default,schemePiYG:()=>m.scheme,schemePuBu:()=>k.scheme,schemePuBuGn:()=>T.scheme,schemePuOr:()=>y.scheme,schemePuRd:()=>R.scheme,schemePurples:()=>L.scheme,schemeRdBu:()=>v.scheme,schemeRdGy:()=>b.scheme,schemeRdPu:()=>D.scheme,schemeRdYlBu:()=>x.scheme,schemeRdYlGn:()=>E.scheme,schemeReds:()=>B.scheme,schemeSet1:()=>c.default,schemeSet2:()=>d.default,schemeSet3:()=>f.default,schemeSpectral:()=>S.scheme,schemeTableau10:()=>p.default,schemeYlGn:()=>O.scheme,schemeYlGnBu:()=>N.scheme,schemeYlOrBr:()=>F.scheme,schemeYlOrRd:()=>P.scheme});var r=n(96406),i=n(69573),a=n(54025),o=n(61995),s=n(96018),l=n(35167),u=n(76786),c=n(52612),d=n(51021),f=n(25006),p=n(38512),h=n(79505),g=n(59429),m=n(22389),y=n(57680),v=n(69501),b=n(91060),x=n(64704),E=n(46268),S=n(25874),w=n(51632),_=n(2402),A=n(50456),C=n(97971),T=n(91223),k=n(65430),R=n(21077),D=n(5961),N=n(26041),O=n(28732),F=n(17616),P=n(94630),M=n(96476),I=n(44425),$=n(16417),L=n(59902),B=n(95813),U=n(67666),z=n(95169),q=n(16253),j=n(5988),H=n(60541),G=n(67138),V=n(98710)},27810:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(82226);const i=e=>(0,r.interpolateRgbBasis)(e[e.length-1])},51632:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(r.default);const o=(0,i.default)(a)},2402:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(r.default);const o=(0,i.default)(a)},50456:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(r.default);const o=(0,i.default)(a)},97971:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(r.default);const o=(0,i.default)(a)},65430:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(r.default);const o=(0,i.default)(a)},91223:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(r.default);const o=(0,i.default)(a)},21077:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(r.default);const o=(0,i.default)(a)},5961:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(r.default);const o=(0,i.default)(a)},28732:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(r.default);const o=(0,i.default)(a)},26041:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(r.default);const o=(0,i.default)(a)},17616:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(r.default);const o=(0,i.default)(a)},94630:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(r.default);const o=(0,i.default)(a)},95169:(e,t,n)=>{"use strict";function r(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"}n.r(t),n.d(t,{default:()=>r})},16253:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(72090);const i=(0,n(82226).interpolateCubehelixLong)((0,r.cubehelix)(300,.5,0),(0,r.cubehelix)(-240,.5,1))},5988:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cool:()=>o,default:()=>l,warm:()=>a});var r=n(72090),i=n(82226),a=(0,i.interpolateCubehelixLong)((0,r.cubehelix)(-100,.75,.35),(0,r.cubehelix)(80,1.5,.8)),o=(0,i.interpolateCubehelixLong)((0,r.cubehelix)(260,.75,.35),(0,r.cubehelix)(80,1.5,.8)),s=(0,r.cubehelix)();function l(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return s.h=360*e-100,s.s=1.5-1.5*t,s.l=.8-.9*t,s+""}},60541:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=(0,n(72090).rgb)(),i=Math.PI/3,a=2*Math.PI/3;function o(e){var t;return e=(.5-e)*Math.PI,r.r=255*(t=Math.sin(e))*t,r.g=255*(t=Math.sin(e+i))*t,r.b=255*(t=Math.sin(e+a))*t,r+""}},67138:(e,t,n)=>{"use strict";function r(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"}n.r(t),n.d(t,{default:()=>r})},98710:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,inferno:()=>s,magma:()=>o,plasma:()=>l});var r=n(40938);function i(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const a=i((0,r.default)("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var o=i((0,r.default)("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),s=i((0,r.default)("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),l=i((0,r.default)("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))},96476:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(r.default);const o=(0,i.default)(a)},44425:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(r.default);const o=(0,i.default)(a)},16417:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(r.default);const o=(0,i.default)(a)},67666:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(r.default);const o=(0,i.default)(a)},59902:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(r.default);const o=(0,i.default)(a)},95813:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,scheme:()=>a});var r=n(40938),i=n(27810),a=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(r.default);const o=(0,i.default)(a)},91392:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,point:()=>l});var r=n(61388),i=n(99065),a=n(10106);function o(){var e,t,n=(0,a.default)().unknown(void 0),s=n.domain,l=n.range,u=0,c=1,d=!1,f=0,p=0,h=.5;function g(){var n=s().length,i=c{"use strict";function r(e){return function(){return e}}n.r(t),n.d(t,{default:()=>r})},21052:(e,t,n)=>{"use strict";n.r(t),n.d(t,{copy:()=>f,default:()=>h,identity:()=>l,transformer:()=>p});var r=n(61388),i=n(82226),a=n(19279),o=n(70414),s=[0,1];function l(e){return e}function u(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(0,a.default)(isNaN(t)?NaN:.5)}function c(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return it&&(n=e,e=t,t=n),g=function(n){return Math.max(e,Math.min(t,n))}),r=i>2?d:c,a=u=null,y}function y(t){return null==t||isNaN(t=+t)?n:(a||(a=r(f.map(e),p,h)))(e(g(t)))}return y.invert=function(n){return g(t((u||(u=r(p,f.map(e),i.interpolateNumber)))(n)))},y.domain=function(e){return arguments.length?(f=Array.from(e,o.default),m()):f.slice()},y.range=function(e){return arguments.length?(p=Array.from(e),m()):p.slice()},y.rangeRound=function(e){return p=Array.from(e),h=i.interpolateRound,m()},y.clamp=function(e){return arguments.length?(g=!!e||l,m()):g!==l},y.interpolate=function(e){return arguments.length?(h=e,m()):h},y.unknown=function(e){return arguments.length?(n=e,y):n},function(n,r){return e=n,t=r,m()}}function h(){return p()(l,l)}},61436:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f,divergingLog:()=>p,divergingPow:()=>g,divergingSqrt:()=>m,divergingSymlog:()=>h});var r=n(82226),i=n(21052),a=n(99065),o=n(76502),s=n(21721),l=n(18980),u=n(7304),c=n(43837);function d(){var e,t,n,a,o,s,l,u=0,c=.5,d=1,f=1,p=i.identity,h=!1;function g(e){return isNaN(e=+e)?l:(e=.5+((e=+s(e))-t)*(f*e{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(76502),i=n(70414);function a(e){var t;function n(e){return null==e||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,i.default),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return a(e).unknown(t)},e=arguments.length?Array.from(e,i.default):[0,1],(0,r.linearish)(n)}},71303:(e,t,n)=>{"use strict";n.r(t),n.d(t,{scaleBand:()=>r.default,scaleDiverging:()=>v.default,scaleDivergingLog:()=>v.divergingLog,scaleDivergingPow:()=>v.divergingPow,scaleDivergingSqrt:()=>v.divergingSqrt,scaleDivergingSymlog:()=>v.divergingSymlog,scaleIdentity:()=>i.default,scaleImplicit:()=>l.implicit,scaleLinear:()=>a.default,scaleLog:()=>o.default,scaleOrdinal:()=>l.default,scalePoint:()=>r.point,scalePow:()=>u.default,scaleQuantile:()=>d.default,scaleQuantize:()=>f.default,scaleRadial:()=>c.default,scaleSequential:()=>m.default,scaleSequentialLog:()=>m.sequentialLog,scaleSequentialPow:()=>m.sequentialPow,scaleSequentialQuantile:()=>y.default,scaleSequentialSqrt:()=>m.sequentialSqrt,scaleSequentialSymlog:()=>m.sequentialSymlog,scaleSqrt:()=>u.sqrt,scaleSymlog:()=>s.default,scaleThreshold:()=>p.default,scaleTime:()=>h.default,scaleUtc:()=>g.default,tickFormat:()=>b.default});var r=n(91392),i=n(69609),a=n(76502),o=n(21721),s=n(7304),l=n(10106),u=n(43837),c=n(5900),d=n(61990),f=n(94660),p=n(51004),h=n(97910),g=n(1232),m=n(18980),y=n(62445),v=n(61436),b=n(58993)},99065:(e,t,n)=>{"use strict";function r(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function i(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}n.r(t),n.d(t,{initInterpolator:()=>i,initRange:()=>r})},76502:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,linearish:()=>s});var r=n(61388),i=n(21052),a=n(99065),o=n(58993);function s(e){var t=e.domain;return e.ticks=function(e){var n=t();return(0,r.ticks)(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return(0,o.default)(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var i,a,o=t(),s=0,l=o.length-1,u=o[s],c=o[l],d=10;for(c0;){if((a=(0,r.tickIncrement)(u,c,n))===i)return o[s]=u,o[l]=c,t(o);if(a>0)u=Math.floor(u/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;u=Math.ceil(u*a)/a,c=Math.floor(c*a)/a}i=a}return e},e}function l(){var e=(0,i.default)();return e.copy=function(){return(0,i.copy)(e,l())},a.initRange.apply(e,arguments),s(e)}},21721:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g,loggish:()=>h});var r=n(61388),i=n(4710),a=n(8206),o=n(21052),s=n(99065);function l(e){return Math.log(e)}function u(e){return Math.exp(e)}function c(e){return-Math.log(-e)}function d(e){return-Math.exp(-e)}function f(e){return isFinite(e)?+("1e"+e):e<0?0:e}function p(e){return(t,n)=>-e(-t,n)}function h(e){const t=e(l,u),n=t.domain;let o,s,h=10;function g(){return o=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(h),s=function(e){return 10===e?f:e===Math.E?Math.exp:t=>Math.pow(e,t)}(h),n()[0]<0?(o=p(o),s=p(s),e(c,d)):e(l,u),t}return t.base=function(e){return arguments.length?(h=+e,g()):h},t.domain=function(e){return arguments.length?(n(e),g()):n()},t.ticks=e=>{const t=n();let i=t[0],a=t[t.length-1];const l=a0){for(;d<=f;++d)for(u=1;ua)break;g.push(c)}}else for(;d<=f;++d)for(u=h-1;u>=1;--u)if(c=d>0?u/s(-d):u*s(d),!(ca)break;g.push(c)}2*g.length{if(null==e&&(e=10),null==n&&(n=10===h?"s":","),"function"!=typeof n&&(h%1||null!=(n=(0,i.formatSpecifier)(n)).precision||(n.trim=!0),n=(0,i.format)(n)),e===1/0)return n;const r=Math.max(1,h*e/t.ticks().length);return e=>{let t=e/s(Math.round(o(e)));return t*hn((0,a.default)(n(),{floor:e=>s(Math.floor(o(e))),ceil:e=>s(Math.ceil(o(e)))})),t}function g(){const e=h((0,o.transformer)()).domain([1,10]);return e.copy=()=>(0,o.copy)(e,g()).base(e.base()),s.initRange.apply(e,arguments),e}},8206:(e,t,n)=>{"use strict";function r(e,t){var n,r=0,i=(e=e.slice()).length-1,a=e[r],o=e[i];return or})},70414:(e,t,n)=>{"use strict";function r(e){return+e}n.r(t),n.d(t,{default:()=>r})},10106:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,implicit:()=>a});var r=n(61388),i=n(99065);const a=Symbol("implicit");function o(){var e=new r.InternMap,t=[],n=[],s=a;function l(r){let i=e.get(r);if(void 0===i){if(s!==a)return s;e.set(r,i=t.push(r)-1)}return n[i%n.length]}return l.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new r.InternMap;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return l},l.range=function(e){return arguments.length?(n=Array.from(e),l):n.slice()},l.unknown=function(e){return arguments.length?(s=e,l):s},l.copy=function(){return o(t,n).unknown(s)},i.initRange.apply(l,arguments),l}},43837:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c,powish:()=>u,sqrt:()=>d});var r=n(76502),i=n(21052),a=n(99065);function o(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function s(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function l(e){return e<0?-e*e:e*e}function u(e){var t=e(i.identity,i.identity),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(i.identity,i.identity):.5===n?e(s,l):e(o(n),o(1/n)):n},(0,r.linearish)(t)}function c(){var e=u((0,i.transformer)());return e.copy=function(){return(0,i.copy)(e,c()).exponent(e.exponent())},a.initRange.apply(e,arguments),e}function d(){return c.apply(null,arguments).exponent(.5)}},61990:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(61388),i=n(99065);function a(){var e,t=[],n=[],o=[];function s(){var e=0,i=Math.max(1,n.length);for(o=new Array(i-1);++e0?o[r-1]:t[0],r{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(61388),i=n(76502),a=n(99065);function o(){var e,t=0,n=1,s=1,l=[.5],u=[0,1];function c(t){return null!=t&&t<=t?u[(0,r.bisect)(l,t,0,s)]:e}function d(){var e=-1;for(l=new Array(s);++e=s?[l[s-1],n]:[l[r-1],l[r]]},c.unknown=function(t){return arguments.length?(e=t,c):c},c.thresholds=function(){return l.slice()},c.copy=function(){return o().domain([t,n]).range(u).unknown(e)},a.initRange.apply((0,i.linearish)(c),arguments)}},5900:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(21052),i=n(99065),a=n(76502),o=n(70414);function s(e){return Math.sign(e)*e*e}function l(){var e,t=(0,r.default)(),n=[0,1],u=!1;function c(n){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(t(n));return isNaN(r)?e:u?Math.round(r):r}return c.invert=function(e){return t.invert(s(e))},c.domain=function(e){return arguments.length?(t.domain(e),c):t.domain()},c.range=function(e){return arguments.length?(t.range((n=Array.from(e,o.default)).map(s)),c):n.slice()},c.rangeRound=function(e){return c.range(e).round(!0)},c.round=function(e){return arguments.length?(u=!!e,c):u},c.clamp=function(e){return arguments.length?(t.clamp(e),c):t.clamp()},c.unknown=function(t){return arguments.length?(e=t,c):e},c.copy=function(){return l(t.domain(),n).round(u).clamp(t.clamp()).unknown(e)},i.initRange.apply(c,arguments),(0,a.linearish)(c)}},18980:(e,t,n)=>{"use strict";n.r(t),n.d(t,{copy:()=>d,default:()=>f,sequentialLog:()=>p,sequentialPow:()=>g,sequentialSqrt:()=>m,sequentialSymlog:()=>h});var r=n(82226),i=n(21052),a=n(99065),o=n(76502),s=n(21721),l=n(7304),u=n(43837);function c(){var e,t,n,a,o,s=0,l=1,u=i.identity,c=!1;function d(t){return null==t||isNaN(t=+t)?o:u(0===n?.5:(t=(a(t)-e)*n,c?Math.max(0,Math.min(1,t)):t))}function f(e){return function(t){var n,r;return arguments.length?([n,r]=t,u=e(n,r),d):[u(0),u(1)]}}return d.domain=function(r){return arguments.length?([s,l]=r,e=a(s=+s),t=a(l=+l),n=e===t?0:1/(t-e),d):[s,l]},d.clamp=function(e){return arguments.length?(c=!!e,d):c},d.interpolator=function(e){return arguments.length?(u=e,d):u},d.range=f(r.interpolate),d.rangeRound=f(r.interpolateRound),d.unknown=function(e){return arguments.length?(o=e,d):o},function(r){return a=r,e=r(s),t=r(l),n=e===t?0:1/(t-e),d}}function d(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function f(){var e=(0,o.linearish)(c()(i.identity));return e.copy=function(){return d(e,f())},a.initInterpolator.apply(e,arguments)}function p(){var e=(0,s.loggish)(c()).domain([1,10]);return e.copy=function(){return d(e,p()).base(e.base())},a.initInterpolator.apply(e,arguments)}function h(){var e=(0,l.symlogish)(c());return e.copy=function(){return d(e,h()).constant(e.constant())},a.initInterpolator.apply(e,arguments)}function g(){var e=(0,u.powish)(c());return e.copy=function(){return d(e,g()).exponent(e.exponent())},a.initInterpolator.apply(e,arguments)}function m(){return g.apply(null,arguments).exponent(.5)}},62445:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(61388),i=n(21052),a=n(99065);function o(){var e=[],t=i.identity;function n(n){if(null!=n&&!isNaN(n=+n))return t(((0,r.bisect)(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(r.ascending),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map(((n,r)=>t(r/(e.length-1))))},n.quantiles=function(t){return Array.from({length:t+1},((n,i)=>(0,r.quantile)(e,i/t)))},n.copy=function(){return o(t).domain(e)},a.initInterpolator.apply(n,arguments)}},7304:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,symlogish:()=>l});var r=n(76502),i=n(21052),a=n(99065);function o(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function s(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function l(e){var t=1,n=e(o(t),s(t));return n.constant=function(n){return arguments.length?e(o(t=+n),s(t)):t},(0,r.linearish)(n)}function u(){var e=l((0,i.transformer)());return e.copy=function(){return(0,i.copy)(e,u()).constant(e.constant())},a.initRange.apply(e,arguments)}},51004:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(61388),i=n(99065);function a(){var e,t=[.5],n=[0,1],o=1;function s(i){return null!=i&&i<=i?n[(0,r.bisect)(t,i,0,o)]:e}return s.domain=function(e){return arguments.length?(t=Array.from(e),o=Math.min(t.length,n.length-1),s):t.slice()},s.range=function(e){return arguments.length?(n=Array.from(e),o=Math.min(t.length,n.length-1),s):n.slice()},s.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},s.unknown=function(t){return arguments.length?(e=t,s):e},s.copy=function(){return a().domain(t).range(n).unknown(e)},i.initRange.apply(s,arguments)}},58993:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(61388),i=n(4710);function a(e,t,n,a){var o,s=(0,r.tickStep)(e,t,n);switch((a=(0,i.formatSpecifier)(null==a?",f":a)).type){case"s":var l=Math.max(Math.abs(e),Math.abs(t));return null!=a.precision||isNaN(o=(0,i.precisionPrefix)(s,l))||(a.precision=o),(0,i.formatPrefix)(a,l);case"":case"e":case"g":case"p":case"r":null!=a.precision||isNaN(o=(0,i.precisionRound)(s,Math.max(Math.abs(e),Math.abs(t))))||(a.precision=o-("e"===a.type));break;case"f":case"%":null!=a.precision||isNaN(o=(0,i.precisionFixed)(s))||(a.precision=o-2*("%"===a.type))}return(0,i.format)(a)}},97910:(e,t,n)=>{"use strict";n.r(t),n.d(t,{calendar:()=>c,default:()=>d});var r=n(42472),i=n(98090),a=n(21052),o=n(99065),s=n(8206);function l(e){return new Date(e)}function u(e){return e instanceof Date?+e:+new Date(+e)}function c(e,t,n,r,i,o,d,f,p,h){var g=(0,a.default)(),m=g.invert,y=g.domain,v=h(".%L"),b=h(":%S"),x=h("%I:%M"),E=h("%I %p"),S=h("%a %d"),w=h("%b %d"),_=h("%B"),A=h("%Y");function C(e){return(p(e){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(42472),i=n(98090),a=n(97910),o=n(99065);function s(){return o.initRange.apply((0,a.calendar)(r.utcTicks,r.utcTickInterval,r.utcYear,r.utcMonth,r.utcWeek,r.utcDay,r.utcHour,r.utcMinute,r.utcSecond,i.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}},42716:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(48946),i=n(34552),a=n(54125);function o(e){return e.innerRadius}function s(e){return e.outerRadius}function l(e){return e.startAngle}function u(e){return e.endAngle}function c(e){return e&&e.padAngle}function d(e,t,n,r,a,o,s){var l=e-n,u=t-r,c=(s?o:-o)/(0,i.sqrt)(l*l+u*u),d=c*u,f=-c*l,p=e+d,h=t+f,g=n+d,m=r+f,y=(p+g)/2,v=(h+m)/2,b=g-p,x=m-h,E=b*b+x*x,S=a-o,w=p*m-g*h,_=(x<0?-1:1)*(0,i.sqrt)((0,i.max)(0,S*S*E-w*w)),A=(w*x-b*_)/E,C=(-w*b-x*_)/E,T=(w*x+b*_)/E,k=(-w*b+x*_)/E,R=A-y,D=C-v,N=T-y,O=k-v;return R*R+D*D>N*N+O*O&&(A=T,C=k),{cx:A,cy:C,x01:-d,y01:-f,x11:A*(a/S-1),y11:C*(a/S-1)}}function f(){var e=o,t=s,n=(0,r.default)(0),f=null,p=l,h=u,g=c,m=null,y=(0,a.withPath)(v);function v(){var r,a,o=+e.apply(this,arguments),s=+t.apply(this,arguments),l=p.apply(this,arguments)-i.halfPi,u=h.apply(this,arguments)-i.halfPi,c=(0,i.abs)(u-l),v=u>l;if(m||(m=r=y()),si.epsilon)if(c>i.tau-i.epsilon)m.moveTo(s*(0,i.cos)(l),s*(0,i.sin)(l)),m.arc(0,0,s,l,u,!v),o>i.epsilon&&(m.moveTo(o*(0,i.cos)(u),o*(0,i.sin)(u)),m.arc(0,0,o,u,l,v));else{var b,x,E=l,S=u,w=l,_=u,A=c,C=c,T=g.apply(this,arguments)/2,k=T>i.epsilon&&(f?+f.apply(this,arguments):(0,i.sqrt)(o*o+s*s)),R=(0,i.min)((0,i.abs)(s-o)/2,+n.apply(this,arguments)),D=R,N=R;if(k>i.epsilon){var O=(0,i.asin)(k/o*(0,i.sin)(T)),F=(0,i.asin)(k/s*(0,i.sin)(T));(A-=2*O)>i.epsilon?(w+=O*=v?1:-1,_-=O):(A=0,w=_=(l+u)/2),(C-=2*F)>i.epsilon?(E+=F*=v?1:-1,S-=F):(C=0,E=S=(l+u)/2)}var P=s*(0,i.cos)(E),M=s*(0,i.sin)(E),I=o*(0,i.cos)(_),$=o*(0,i.sin)(_);if(R>i.epsilon){var L,B=s*(0,i.cos)(S),U=s*(0,i.sin)(S),z=o*(0,i.cos)(w),q=o*(0,i.sin)(w);if(ci.epsilon?N>i.epsilon?(b=d(z,q,P,M,s,N,v),x=d(B,U,I,$,s,N,v),m.moveTo(b.cx+b.x01,b.cy+b.y01),Ni.epsilon&&A>i.epsilon?D>i.epsilon?(b=d(I,$,B,U,o,-D,v),x=d(P,M,z,q,o,-D,v),m.lineTo(b.cx+b.x01,b.cy+b.y01),D{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(45917),i=n(48946),a=n(26343),o=n(18640),s=n(54125),l=n(29206);function u(e,t,n){var u=null,c=(0,i.default)(!0),d=null,f=a.default,p=null,h=(0,s.withPath)(g);function g(i){var a,o,s,l,g,m=(i=(0,r.default)(i)).length,y=!1,v=new Array(m),b=new Array(m);for(null==d&&(p=f(g=h())),a=0;a<=m;++a){if(!(a=o;--s)p.point(v[s],b[s]);p.lineEnd(),p.areaEnd()}y&&(v[a]=+e(l,a,i),b[a]=+t(l,a,i),p.point(u?+u(l,a,i):v[a],n?+n(l,a,i):b[a]))}if(g)return p=null,g+""||null}function m(){return(0,o.default)().defined(c).curve(f).context(d)}return e="function"==typeof e?e:void 0===e?l.x:(0,i.default)(+e),t="function"==typeof t?t:void 0===t?(0,i.default)(0):(0,i.default)(+t),n="function"==typeof n?n:void 0===n?l.y:(0,i.default)(+n),g.x=function(t){return arguments.length?(e="function"==typeof t?t:(0,i.default)(+t),u=null,g):e},g.x0=function(t){return arguments.length?(e="function"==typeof t?t:(0,i.default)(+t),g):e},g.x1=function(e){return arguments.length?(u=null==e?null:"function"==typeof e?e:(0,i.default)(+e),g):u},g.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,i.default)(+e),n=null,g):t},g.y0=function(e){return arguments.length?(t="function"==typeof e?e:(0,i.default)(+e),g):t},g.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:(0,i.default)(+e),g):n},g.lineX0=g.lineY0=function(){return m().x(e).y(t)},g.lineY1=function(){return m().x(e).y(n)},g.lineX1=function(){return m().x(u).y(t)},g.defined=function(e){return arguments.length?(c="function"==typeof e?e:(0,i.default)(!!e),g):c},g.curve=function(e){return arguments.length?(f=e,null!=d&&(p=f(d)),g):f},g.context=function(e){return arguments.length?(null==e?d=p=null:p=f(d=e),g):d},g}},30544:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(55529),i=n(64439),a=n(44319);function o(){var e=(0,i.default)().curve(r.curveRadialLinear),t=e.curve,n=e.lineX0,o=e.lineX1,s=e.lineY0,l=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return(0,a.lineRadial)(n())},delete e.lineX0,e.lineEndAngle=function(){return(0,a.lineRadial)(o())},delete e.lineX1,e.lineInnerRadius=function(){return(0,a.lineRadial)(s())},delete e.lineY0,e.lineOuterRadius=function(){return(0,a.lineRadial)(l())},delete e.lineY1,e.curve=function(e){return arguments.length?t((0,r.default)(e)):t()._curve},e}},45917:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i,slice:()=>r});var r=Array.prototype.slice;function i(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}},48946:(e,t,n)=>{"use strict";function r(e){return function(){return e}}n.r(t),n.d(t,{default:()=>r})},58134:(e,t,n)=>{"use strict";function r(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function i(e){this._context=e}function a(e){return new i(e)}n.r(t),n.d(t,{Basis:()=>i,default:()=>a,point:()=>r}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:r(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}},76806:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(76090),i=n(58134);function a(e){this._context=e}function o(e){return new a(e)}a.prototype={areaStart:r.default,areaEnd:r.default,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:(0,i.point)(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}},37002:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(58134);function i(e){this._context=e}function a(e){return new i(e)}i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:(0,r.point)(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}},76422:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bumpRadial:()=>l,bumpX:()=>o,bumpY:()=>s});var r=n(31321);class i{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}class a{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,t){if(e=+e,t=+t,0===this._point)this._point=1;else{const n=(0,r.default)(this._x0,this._y0),i=(0,r.default)(this._x0,this._y0=(this._y0+t)/2),a=(0,r.default)(e,this._y0),o=(0,r.default)(e,t);this._context.moveTo(...n),this._context.bezierCurveTo(...i,...a,...o)}this._x0=e,this._y0=t}}function o(e){return new i(e,!0)}function s(e){return new i(e,!1)}function l(e){return new a(e)}},36606:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(58134);function i(e,t){this._basis=new r.Basis(e),this._beta=t}i.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],a=t[0],o=e[n]-i,s=t[n]-a,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*o),this._beta*t[l]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const a=function e(t){function n(e){return 1===t?new r.Basis(e):new i(e,t)}return n.beta=function(t){return e(+t)},n}(.85)},42314:(e,t,n)=>{"use strict";function r(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function i(e,t){this._context=e,this._k=(1-t)/6}n.r(t),n.d(t,{Cardinal:()=>i,default:()=>a,point:()=>r}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:r(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:r(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const a=function e(t){function n(e){return new i(e,t)}return n.tension=function(t){return e(+t)},n}(0)},16074:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CardinalClosed:()=>a,default:()=>o});var r=n(76090),i=n(42314);function a(e,t){this._context=e,this._k=(1-t)/6}a.prototype={areaStart:r.default,areaEnd:r.default,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:(0,i.point)(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const o=function e(t){function n(e){return new a(e,t)}return n.tension=function(t){return e(+t)},n}(0)},89894:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CardinalOpen:()=>i,default:()=>a});var r=n(42314);function i(e,t){this._context=e,this._k=(1-t)/6}i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:(0,r.point)(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const a=function e(t){function n(e){return new i(e,t)}return n.tension=function(t){return e(+t)},n}(0)},49750:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s,point:()=>a});var r=n(34552),i=n(42314);function a(e,t,n){var i=e._x1,a=e._y1,o=e._x2,s=e._y2;if(e._l01_a>r.epsilon){var l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,a=(a*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>r.epsilon){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/d,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/d}e._context.bezierCurveTo(i,a,o,s,e._x2,e._y2)}function o(e,t){this._context=e,this._alpha=t}o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:a(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const s=function e(t){function n(e){return t?new o(e,t):new i.Cardinal(e,0)}return n.alpha=function(t){return e(+t)},n}(.5)},83014:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(16074),i=n(76090),a=n(49750);function o(e,t){this._context=e,this._alpha=t}o.prototype={areaStart:i.default,areaEnd:i.default,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:(0,a.point)(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const s=function e(t){function n(e){return t?new o(e,t):new r.CardinalClosed(e,0)}return n.alpha=function(t){return e(+t)},n}(.5)},91786:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(89894),i=n(49750);function a(e,t){this._context=e,this._alpha=t}a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:(0,i.point)(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const o=function e(t){function n(e){return t?new a(e,t):new r.CardinalOpen(e,0)}return n.alpha=function(t){return e(+t)},n}(.5)},26343:(e,t,n)=>{"use strict";function r(e){this._context=e}function i(e){return new r(e)}n.r(t),n.d(t,{default:()=>i}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}}},43895:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(76090);function i(e){this._context=e}function a(e){return new i(e)}i.prototype={areaStart:r.default,areaEnd:r.default,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}},31253:(e,t,n)=>{"use strict";function r(e){return e<0?-1:1}function i(e,t,n){var i=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(i||a<0&&-0),s=(n-e._y1)/(a||i<0&&-0),l=(o*a+s*i)/(i+a);return(r(o)+r(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(l))||0}function a(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function o(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function s(e){this._context=e}function l(e){this._context=new u(e)}function u(e){this._context=e}function c(e){return new s(e)}function d(e){return new l(e)}n.r(t),n.d(t,{monotoneX:()=>c,monotoneY:()=>d}),s.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:o(this,this._t0,a(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,o(this,a(this,n=i(this,e,t)),n);break;default:o(this,this._t0,n=i(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(l.prototype=Object.create(s.prototype)).point=function(e,t){s.prototype.point.call(this,t,e)},u.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}}},74537:(e,t,n)=>{"use strict";function r(e){this._context=e}function i(e){var t,n,r=e.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;ta}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=i(e),a=i(t),o=0,s=1;s{"use strict";n.r(t),n.d(t,{curveRadialLinear:()=>r,default:()=>a});var r=a(n(26343).default);function i(e){this._curve=e}function a(e){function t(t){return new i(e(t))}return t._curve=e,t}i.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}}},45836:(e,t,n)=>{"use strict";function r(e,t){this._context=e,this._t=t}function i(e){return new r(e,.5)}function a(e){return new r(e,0)}function o(e){return new r(e,1)}n.r(t),n.d(t,{default:()=>i,stepAfter:()=>o,stepBefore:()=>a}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}}},28796:(e,t,n)=>{"use strict";function r(e,t){return te?1:t>=e?0:NaN}n.r(t),n.d(t,{default:()=>r})},75452:(e,t,n)=>{"use strict";function r(e){return e}n.r(t),n.d(t,{default:()=>r})},76588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{arc:()=>r.default,area:()=>i.default,areaRadial:()=>s.default,curveBasis:()=>T.default,curveBasisClosed:()=>A.default,curveBasisOpen:()=>C.default,curveBumpX:()=>k.bumpX,curveBumpY:()=>k.bumpY,curveBundle:()=>R.default,curveCardinal:()=>O.default,curveCardinalClosed:()=>D.default,curveCardinalOpen:()=>N.default,curveCatmullRom:()=>M.default,curveCatmullRomClosed:()=>F.default,curveCatmullRomOpen:()=>P.default,curveLinear:()=>$.default,curveLinearClosed:()=>I.default,curveMonotoneX:()=>L.monotoneX,curveMonotoneY:()=>L.monotoneY,curveNatural:()=>B.default,curveStep:()=>U.default,curveStepAfter:()=>U.stepAfter,curveStepBefore:()=>U.stepBefore,line:()=>a.default,lineRadial:()=>l.default,link:()=>c.link,linkHorizontal:()=>c.linkHorizontal,linkRadial:()=>c.linkRadial,linkVertical:()=>c.linkVertical,pie:()=>o.default,pointRadial:()=>u.default,radialArea:()=>s.default,radialLine:()=>l.default,stack:()=>z.default,stackOffsetDiverging:()=>j.default,stackOffsetExpand:()=>q.default,stackOffsetNone:()=>H.default,stackOffsetSilhouette:()=>G.default,stackOffsetWiggle:()=>V.default,stackOrderAppearance:()=>W.default,stackOrderAscending:()=>Y.default,stackOrderDescending:()=>X.default,stackOrderInsideOut:()=>K.default,stackOrderNone:()=>J.default,stackOrderReverse:()=>Q.default,symbol:()=>d.default,symbolAsterisk:()=>f.default,symbolCircle:()=>p.default,symbolCross:()=>h.default,symbolDiamond:()=>g.default,symbolDiamond2:()=>m.default,symbolPlus:()=>y.default,symbolSquare:()=>v.default,symbolSquare2:()=>b.default,symbolStar:()=>x.default,symbolTimes:()=>_.default,symbolTriangle:()=>E.default,symbolTriangle2:()=>S.default,symbolWye:()=>w.default,symbolX:()=>_.default,symbols:()=>d.symbolsFill,symbolsFill:()=>d.symbolsFill,symbolsStroke:()=>d.symbolsStroke});var r=n(42716),i=n(64439),a=n(18640),o=n(12130),s=n(30544),l=n(44319),u=n(31321),c=n(68622),d=n(90902),f=n(74165),p=n(9185),h=n(48233),g=n(18361),m=n(56995),y=n(43317),v=n(1838),b=n(5542),x=n(56657),E=n(47233),S=n(68027),w=n(57002),_=n(82067),A=n(76806),C=n(37002),T=n(58134),k=n(76422),R=n(36606),D=n(16074),N=n(89894),O=n(42314),F=n(83014),P=n(91786),M=n(49750),I=n(43895),$=n(26343),L=n(31253),B=n(74537),U=n(45836),z=n(8872),q=n(96488),j=n(58801),H=n(93414),G=n(61530),V=n(93629),W=n(63737),Y=n(47305),X=n(37953),K=n(10395),J=n(34873),Q=n(55589)},18640:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(45917),i=n(48946),a=n(26343),o=n(54125),s=n(29206);function l(e,t){var n=(0,i.default)(!0),l=null,u=a.default,c=null,d=(0,o.withPath)(f);function f(i){var a,o,s,f=(i=(0,r.default)(i)).length,p=!1;for(null==l&&(c=u(s=d())),a=0;a<=f;++a)!(a{"use strict";n.r(t),n.d(t,{default:()=>o,lineRadial:()=>a});var r=n(55529),i=n(18640);function a(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t((0,r.default)(e)):t()._curve},e}function o(){return a((0,i.default)().curve(r.curveRadialLinear))}},68622:(e,t,n)=>{"use strict";n.r(t),n.d(t,{link:()=>c,linkHorizontal:()=>d,linkRadial:()=>p,linkVertical:()=>f});var r=n(45917),i=n(48946),a=n(76422),o=n(54125),s=n(29206);function l(e){return e.source}function u(e){return e.target}function c(e){let t=l,n=u,a=s.x,c=s.y,d=null,f=null,p=(0,o.withPath)(h);function h(){let i;const o=r.slice.call(arguments),s=t.apply(this,o),l=n.apply(this,o);if(null==d&&(f=e(i=p())),f.lineStart(),o[0]=s,f.point(+a.apply(this,o),+c.apply(this,o)),o[0]=l,f.point(+a.apply(this,o),+c.apply(this,o)),f.lineEnd(),i)return f=null,i+""||null}return h.source=function(e){return arguments.length?(t=e,h):t},h.target=function(e){return arguments.length?(n=e,h):n},h.x=function(e){return arguments.length?(a="function"==typeof e?e:(0,i.default)(+e),h):a},h.y=function(e){return arguments.length?(c="function"==typeof e?e:(0,i.default)(+e),h):c},h.context=function(t){return arguments.length?(null==t?d=f=null:f=e(d=t),h):d},h}function d(){return c(a.bumpX)}function f(){return c(a.bumpY)}function p(){const e=c(a.bumpRadial);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}},34552:(e,t,n)=>{"use strict";n.r(t),n.d(t,{abs:()=>r,acos:()=>h,asin:()=>g,atan2:()=>i,cos:()=>a,epsilon:()=>c,halfPi:()=>f,max:()=>o,min:()=>s,pi:()=>d,sin:()=>l,sqrt:()=>u,tau:()=>p});const r=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,d=Math.PI,f=d/2,p=2*d;function h(e){return e>1?0:e<-1?d:Math.acos(e)}function g(e){return e>=1?f:e<=-1?-f:Math.asin(e)}},76090:(e,t,n)=>{"use strict";function r(){}n.r(t),n.d(t,{default:()=>r})},58801:(e,t,n)=>{"use strict";function r(e,t){if((s=e.length)>0)for(var n,r,i,a,o,s,l=0,u=e[t[0]].length;l0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}n.r(t),n.d(t,{default:()=>r})},96488:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(93414);function i(e,t){if((i=e.length)>0){for(var n,i,a,o=0,s=e[0].length;o{"use strict";function r(e,t){if((i=e.length)>1)for(var n,r,i,a=1,o=e[t[0]],s=o.length;ar})},61530:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(93414);function i(e,t){if((n=e.length)>0){for(var n,i=0,a=e[t[0]],o=a.length;i{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(93414);function i(e,t){if((a=e.length)>0&&(i=(n=e[t[0]]).length)>0){for(var n,i,a,o=0,s=1;s{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34873);function i(e){var t=e.map(a);return(0,r.default)(e).sort((function(e,n){return t[e]-t[n]}))}function a(e){for(var t,n=-1,r=0,i=e.length,a=-1/0;++na&&(a=t,r=n);return r}},47305:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i,sum:()=>a});var r=n(34873);function i(e){var t=e.map(a);return(0,r.default)(e).sort((function(e,n){return t[e]-t[n]}))}function a(e){for(var t,n=0,r=-1,i=e.length;++r{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(47305);function i(e){return(0,r.default)(e).reverse()}},10395:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(63737),i=n(47305);function a(e){var t,n,a=e.length,o=e.map(i.sum),s=(0,r.default)(e),l=0,u=0,c=[],d=[];for(t=0;t{"use strict";function r(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}n.r(t),n.d(t,{default:()=>r})},55589:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34873);function i(e){return(0,r.default)(e).reverse()}},54125:(e,t,n)=>{"use strict";n.r(t),n.d(t,{withPath:()=>i});var r=n(20066);function i(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new r.Path(t)}},12130:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(45917),i=n(48946),a=n(28796),o=n(75452),s=n(34552);function l(){var e=o.default,t=a.default,n=null,l=(0,i.default)(0),u=(0,i.default)(s.tau),c=(0,i.default)(0);function d(i){var a,o,d,f,p,h=(i=(0,r.default)(i)).length,g=0,m=new Array(h),y=new Array(h),v=+l.apply(this,arguments),b=Math.min(s.tau,Math.max(-s.tau,u.apply(this,arguments)-v)),x=Math.min(Math.abs(b)/h,c.apply(this,arguments)),E=x*(b<0?-1:1);for(a=0;a0&&(g+=p);for(null!=t?m.sort((function(e,n){return t(y[e],y[n])})):null!=n&&m.sort((function(e,t){return n(i[e],i[t])})),a=0,d=g?(b-h*E)/g:0;a0?p*d:0)+E,y[o]={data:i[o],index:a,value:p,startAngle:v,endAngle:f,padAngle:x};return y}return d.value=function(t){return arguments.length?(e="function"==typeof t?t:(0,i.default)(+t),d):e},d.sortValues=function(e){return arguments.length?(t=e,n=null,d):t},d.sort=function(e){return arguments.length?(n=e,t=null,d):n},d.startAngle=function(e){return arguments.length?(l="function"==typeof e?e:(0,i.default)(+e),d):l},d.endAngle=function(e){return arguments.length?(u="function"==typeof e?e:(0,i.default)(+e),d):u},d.padAngle=function(e){return arguments.length?(c="function"==typeof e?e:(0,i.default)(+e),d):c},d}},29206:(e,t,n)=>{"use strict";function r(e){return e[0]}function i(e){return e[1]}n.r(t),n.d(t,{x:()=>r,y:()=>i})},31321:(e,t,n)=>{"use strict";function r(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}n.r(t),n.d(t,{default:()=>r})},8872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(45917),i=n(48946),a=n(93414),o=n(34873);function s(e,t){return e[t]}function l(e){const t=[];return t.key=e,t}function u(){var e=(0,i.default)([]),t=o.default,n=a.default,u=s;function c(i){var a,o,s=Array.from(e.apply(this,arguments),l),c=s.length,d=-1;for(const e of i)for(a=0,++d;a{"use strict";n.r(t),n.d(t,{default:()=>x,symbolsFill:()=>v,symbolsStroke:()=>b});var r=n(48946),i=n(54125),a=n(74165),o=n(9185),s=n(48233),l=n(18361),u=n(56995),c=n(43317),d=n(1838),f=n(5542),p=n(56657),h=n(47233),g=n(68027),m=n(57002),y=n(82067);const v=[o.default,s.default,l.default,d.default,p.default,h.default,m.default],b=[o.default,c.default,y.default,g.default,a.default,f.default,u.default];function x(e,t){let n=null,a=(0,i.withPath)(s);function s(){let r;if(n||(n=r=a()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),r)return n=null,r+""||null}return e="function"==typeof e?e:(0,r.default)(e||o.default),t="function"==typeof t?t:(0,r.default)(void 0===t?64:+t),s.type=function(t){return arguments.length?(e="function"==typeof t?t:(0,r.default)(t),s):e},s.size=function(e){return arguments.length?(t="function"==typeof e?e:(0,r.default)(+e),s):t},s.context=function(e){return arguments.length?(n=null==e?null:e,s):n},s}},74165:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(34552);const i=(0,r.sqrt)(3),a={draw(e,t){const n=.59436*(0,r.sqrt)(t+(0,r.min)(t/28,.75)),a=n/2,o=a*i;e.moveTo(0,n),e.lineTo(0,-n),e.moveTo(-o,-a),e.lineTo(o,a),e.moveTo(-o,a),e.lineTo(o,-a)}}},9185:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=(0,r.sqrt)(t/r.pi);e.moveTo(n,0),e.arc(0,0,n,0,r.tau)}}},48233:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=(0,r.sqrt)(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}}},18361:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(34552);const i=(0,r.sqrt)(1/3),a=2*i,o={draw(e,t){const n=(0,r.sqrt)(t/a),o=n*i;e.moveTo(0,-n),e.lineTo(o,0),e.lineTo(0,n),e.lineTo(-o,0),e.closePath()}}},56995:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=.62625*(0,r.sqrt)(t);e.moveTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.lineTo(-n,0),e.closePath()}}},43317:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=.87559*(0,r.sqrt)(t-(0,r.min)(t/7,2));e.moveTo(-n,0),e.lineTo(n,0),e.moveTo(0,n),e.lineTo(0,-n)}}},1838:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=(0,r.sqrt)(t),i=-n/2;e.rect(i,i,n,n)}}},5542:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=.4431*(0,r.sqrt)(t);e.moveTo(n,n),e.lineTo(n,-n),e.lineTo(-n,-n),e.lineTo(-n,n),e.closePath()}}},56657:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(34552);const i=(0,r.sin)(r.pi/10)/(0,r.sin)(7*r.pi/10),a=(0,r.sin)(r.tau/10)*i,o=-(0,r.cos)(r.tau/10)*i,s={draw(e,t){const n=(0,r.sqrt)(.8908130915292852*t),i=a*n,s=o*n;e.moveTo(0,-n),e.lineTo(i,s);for(let t=1;t<5;++t){const a=r.tau*t/5,o=(0,r.cos)(a),l=(0,r.sin)(a);e.lineTo(l*n,-o*n),e.lineTo(o*i-l*s,l*i+o*s)}e.closePath()}}},82067:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(34552);const i={draw(e,t){const n=.6189*(0,r.sqrt)(t-(0,r.min)(t/6,1.7));e.moveTo(-n,-n),e.lineTo(n,n),e.moveTo(-n,n),e.lineTo(n,-n)}}},47233:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(34552);const i=(0,r.sqrt)(3),a={draw(e,t){const n=-(0,r.sqrt)(t/(3*i));e.moveTo(0,2*n),e.lineTo(-i*n,-n),e.lineTo(i*n,-n),e.closePath()}}},68027:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(34552);const i=(0,r.sqrt)(3),a={draw(e,t){const n=.6824*(0,r.sqrt)(t),a=n/2,o=n*i/2;e.moveTo(0,-n),e.lineTo(o,a),e.lineTo(-o,a),e.closePath()}}},57002:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(34552);const i=-.5,a=(0,r.sqrt)(3)/2,o=1/(0,r.sqrt)(12),s=3*(o/2+1),l={draw(e,t){const n=(0,r.sqrt)(t/s),l=n/2,u=n*o,c=l,d=n*o+n,f=-c,p=d;e.moveTo(l,u),e.lineTo(c,d),e.lineTo(f,p),e.lineTo(i*l-a*u,a*l+i*u),e.lineTo(i*c-a*d,a*c+i*d),e.lineTo(i*f-a*p,a*f+i*p),e.lineTo(i*l+a*u,i*u-a*l),e.lineTo(i*c+a*d,i*d-a*c),e.lineTo(i*f+a*p,i*p-a*f),e.closePath()}}},53705:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,timeFormat:()=>i,timeParse:()=>a,utcFormat:()=>o,utcParse:()=>s});var r,i,a,o,s,l=n(64398);function u(e){return r=(0,l.default)(e),i=r.format,a=r.parse,o=r.utcFormat,s=r.utcParse,r}u({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})},98090:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isoFormat:()=>a.default,isoParse:()=>o.default,timeFormat:()=>r.timeFormat,timeFormatDefaultLocale:()=>r.default,timeFormatLocale:()=>i.default,timeParse:()=>r.timeParse,utcFormat:()=>r.utcFormat,utcParse:()=>r.utcParse});var r=n(53705),i=n(64398),a=n(20584),o=n(71612)},20584:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,isoSpecifier:()=>i});var r=n(53705),i="%Y-%m-%dT%H:%M:%S.%LZ";const a=Date.prototype.toISOString?function(e){return e.toISOString()}:(0,r.utcFormat)(i)},71612:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(20584),i=n(53705);const a=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:(0,i.utcParse)(r.isoSpecifier)},64398:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(42472);function i(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function a(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function o(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function s(e){var t=e.dateTime,n=e.date,s=e.time,u=e.periods,c=e.days,d=e.shortDays,f=e.months,p=e.shortMonths,W=h(u),pe=g(u),Ae=h(c),Ce=g(c),Te=h(d),ke=g(d),Re=h(f),De=g(f),Ne=h(p),Oe=g(p),Fe={a:function(e){return d[e.getDay()]},A:function(e){return c[e.getDay()]},b:function(e){return p[e.getMonth()]},B:function(e){return f[e.getMonth()]},c:null,d:I,e:I,f:z,g:Q,G:ee,H:$,I:L,j:B,L:U,m:q,M:j,p:function(e){return u[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:we,s:_e,S:H,u:G,U:V,V:Y,w:X,W:K,x:null,X:null,y:J,Y:Z,Z:te,"%":Se},Pe={a:function(e){return d[e.getUTCDay()]},A:function(e){return c[e.getUTCDay()]},b:function(e){return p[e.getUTCMonth()]},B:function(e){return f[e.getUTCMonth()]},c:null,d:ne,e:ne,f:se,g:ve,G:xe,H:re,I:ie,j:ae,L:oe,m:le,M:ue,p:function(e){return u[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:we,s:_e,S:ce,u:de,U:fe,V:he,w:ge,W:me,x:null,X:null,y:ye,Y:be,Z:Ee,"%":Se},Me={a:function(e,t,n){var r=Te.exec(t.slice(n));return r?(e.w=ke.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=Ae.exec(t.slice(n));return r?(e.w=Ce.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=Ne.exec(t.slice(n));return r?(e.m=Oe.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=Re.exec(t.slice(n));return r?(e.m=De.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return Le(e,t,n,r)},d:C,e:C,f:O,g:S,G:E,H:k,I:k,j:T,L:N,m:A,M:R,p:function(e,t,n){var r=W.exec(t.slice(n));return r?(e.p=pe.get(r[0].toLowerCase()),n+r[0].length):-1},q:_,Q:P,s:M,S:D,u:y,U:v,V:b,w:m,W:x,x:function(e,t,r){return Le(e,n,t,r)},X:function(e,t,n){return Le(e,s,t,n)},y:S,Y:E,Z:w,"%":F};function Ie(e,t){return function(n){var r,i,a,o=[],s=-1,u=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in u||(u.w=1),"Z"in u?(l=(s=a(o(u.y,0,1))).getUTCDay(),s=l>4||0===l?r.utcMonday.ceil(s):(0,r.utcMonday)(s),s=r.utcDay.offset(s,7*(u.V-1)),u.y=s.getUTCFullYear(),u.m=s.getUTCMonth(),u.d=s.getUTCDate()+(u.w+6)%7):(l=(s=i(o(u.y,0,1))).getDay(),s=l>4||0===l?r.timeMonday.ceil(s):(0,r.timeMonday)(s),s=r.timeDay.offset(s,7*(u.V-1)),u.y=s.getFullYear(),u.m=s.getMonth(),u.d=s.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),l="Z"in u?a(o(u.y,0,1)).getUTCDay():i(o(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(l+5)%7:u.w+7*u.U-(l+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,a(u)):i(u)}}function Le(e,t,n,r){for(var i,a,o=0,s=t.length,u=n.length;o=u)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=Me[i in l?t.charAt(o++):i])||(r=a(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return Fe.x=Ie(n,Fe),Fe.X=Ie(s,Fe),Fe.c=Ie(t,Fe),Pe.x=Ie(n,Pe),Pe.X=Ie(s,Pe),Pe.c=Ie(t,Pe),{format:function(e){var t=Ie(e+="",Fe);return t.toString=function(){return e},t},parse:function(e){var t=$e(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Ie(e+="",Pe);return t.toString=function(){return e},t},utcParse:function(e){var t=$e(e+="",!0);return t.toString=function(){return e},t}}}var l={"-":"",_:" ",0:"0"},u=/^\s*\d+/,c=/^%/,d=/[\\^$*+?|[\]().{}]/g;function f(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[e.toLowerCase(),t])))}function m(e,t,n){var r=u.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function y(e,t,n){var r=u.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function v(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function b(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function x(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function E(e,t,n){var r=u.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function S(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function w(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function _(e,t,n){var r=u.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function A(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function C(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function T(e,t,n){var r=u.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function k(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function R(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function D(e,t,n){var r=u.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function N(e,t,n){var r=u.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function O(e,t,n){var r=u.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function F(e,t,n){var r=c.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function P(e,t,n){var r=u.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function M(e,t,n){var r=u.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function I(e,t){return f(e.getDate(),t,2)}function $(e,t){return f(e.getHours(),t,2)}function L(e,t){return f(e.getHours()%12||12,t,2)}function B(e,t){return f(1+r.timeDay.count((0,r.timeYear)(e),e),t,3)}function U(e,t){return f(e.getMilliseconds(),t,3)}function z(e,t){return U(e,t)+"000"}function q(e,t){return f(e.getMonth()+1,t,2)}function j(e,t){return f(e.getMinutes(),t,2)}function H(e,t){return f(e.getSeconds(),t,2)}function G(e){var t=e.getDay();return 0===t?7:t}function V(e,t){return f(r.timeSunday.count((0,r.timeYear)(e)-1,e),t,2)}function W(e){var t=e.getDay();return t>=4||0===t?(0,r.timeThursday)(e):r.timeThursday.ceil(e)}function Y(e,t){return e=W(e),f(r.timeThursday.count((0,r.timeYear)(e),e)+(4===(0,r.timeYear)(e).getDay()),t,2)}function X(e){return e.getDay()}function K(e,t){return f(r.timeMonday.count((0,r.timeYear)(e)-1,e),t,2)}function J(e,t){return f(e.getFullYear()%100,t,2)}function Q(e,t){return f((e=W(e)).getFullYear()%100,t,2)}function Z(e,t){return f(e.getFullYear()%1e4,t,4)}function ee(e,t){var n=e.getDay();return f((e=n>=4||0===n?(0,r.timeThursday)(e):r.timeThursday.ceil(e)).getFullYear()%1e4,t,4)}function te(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+f(t/60|0,"0",2)+f(t%60,"0",2)}function ne(e,t){return f(e.getUTCDate(),t,2)}function re(e,t){return f(e.getUTCHours(),t,2)}function ie(e,t){return f(e.getUTCHours()%12||12,t,2)}function ae(e,t){return f(1+r.utcDay.count((0,r.utcYear)(e),e),t,3)}function oe(e,t){return f(e.getUTCMilliseconds(),t,3)}function se(e,t){return oe(e,t)+"000"}function le(e,t){return f(e.getUTCMonth()+1,t,2)}function ue(e,t){return f(e.getUTCMinutes(),t,2)}function ce(e,t){return f(e.getUTCSeconds(),t,2)}function de(e){var t=e.getUTCDay();return 0===t?7:t}function fe(e,t){return f(r.utcSunday.count((0,r.utcYear)(e)-1,e),t,2)}function pe(e){var t=e.getUTCDay();return t>=4||0===t?(0,r.utcThursday)(e):r.utcThursday.ceil(e)}function he(e,t){return e=pe(e),f(r.utcThursday.count((0,r.utcYear)(e),e)+(4===(0,r.utcYear)(e).getUTCDay()),t,2)}function ge(e){return e.getUTCDay()}function me(e,t){return f(r.utcMonday.count((0,r.utcYear)(e)-1,e),t,2)}function ye(e,t){return f(e.getUTCFullYear()%100,t,2)}function ve(e,t){return f((e=pe(e)).getUTCFullYear()%100,t,2)}function be(e,t){return f(e.getUTCFullYear()%1e4,t,4)}function xe(e,t){var n=e.getUTCDay();return f((e=n>=4||0===n?(0,r.utcThursday)(e):r.utcThursday.ceil(e)).getUTCFullYear()%1e4,t,4)}function Ee(){return"+0000"}function Se(){return"%"}function we(e){return+e}function _e(e){return Math.floor(+e/1e3)}},55334:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeDay:()=>a,timeDays:()=>o,unixDay:()=>u,unixDays:()=>c,utcDay:()=>s,utcDays:()=>l});var r=n(37591),i=n(81134);const a=(0,r.timeInterval)((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.durationMinute)/i.durationDay),(e=>e.getDate()-1)),o=a.range,s=(0,r.timeInterval)((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/i.durationDay),(e=>e.getUTCDate()-1)),l=s.range,u=(0,r.timeInterval)((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/i.durationDay),(e=>Math.floor(e/i.durationDay))),c=u.range},81134:(e,t,n)=>{"use strict";n.r(t),n.d(t,{durationDay:()=>o,durationHour:()=>a,durationMinute:()=>i,durationMonth:()=>l,durationSecond:()=>r,durationWeek:()=>s,durationYear:()=>u});const r=1e3,i=60*r,a=60*i,o=24*a,s=7*o,l=30*o,u=365*o},54612:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeHour:()=>a,timeHours:()=>o,utcHour:()=>s,utcHours:()=>l});var r=n(37591),i=n(81134);const a=(0,r.timeInterval)((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*i.durationSecond-e.getMinutes()*i.durationMinute)}),((e,t)=>{e.setTime(+e+t*i.durationHour)}),((e,t)=>(t-e)/i.durationHour),(e=>e.getHours())),o=a.range,s=(0,r.timeInterval)((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*i.durationHour)}),((e,t)=>(t-e)/i.durationHour),(e=>e.getUTCHours())),l=s.range},42472:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeDay:()=>l.timeDay,timeDays:()=>l.timeDays,timeFriday:()=>u.timeFriday,timeFridays:()=>u.timeFridays,timeHour:()=>s.timeHour,timeHours:()=>s.timeHours,timeInterval:()=>r.timeInterval,timeMillisecond:()=>i.millisecond,timeMilliseconds:()=>i.milliseconds,timeMinute:()=>o.timeMinute,timeMinutes:()=>o.timeMinutes,timeMonday:()=>u.timeMonday,timeMondays:()=>u.timeMondays,timeMonth:()=>c.timeMonth,timeMonths:()=>c.timeMonths,timeSaturday:()=>u.timeSaturday,timeSaturdays:()=>u.timeSaturdays,timeSecond:()=>a.second,timeSeconds:()=>a.seconds,timeSunday:()=>u.timeSunday,timeSundays:()=>u.timeSundays,timeThursday:()=>u.timeThursday,timeThursdays:()=>u.timeThursdays,timeTickInterval:()=>f.timeTickInterval,timeTicks:()=>f.timeTicks,timeTuesday:()=>u.timeTuesday,timeTuesdays:()=>u.timeTuesdays,timeWednesday:()=>u.timeWednesday,timeWednesdays:()=>u.timeWednesdays,timeWeek:()=>u.timeSunday,timeWeeks:()=>u.timeSundays,timeYear:()=>d.timeYear,timeYears:()=>d.timeYears,unixDay:()=>l.unixDay,unixDays:()=>l.unixDays,utcDay:()=>l.utcDay,utcDays:()=>l.utcDays,utcFriday:()=>u.utcFriday,utcFridays:()=>u.utcFridays,utcHour:()=>s.utcHour,utcHours:()=>s.utcHours,utcMillisecond:()=>i.millisecond,utcMilliseconds:()=>i.milliseconds,utcMinute:()=>o.utcMinute,utcMinutes:()=>o.utcMinutes,utcMonday:()=>u.utcMonday,utcMondays:()=>u.utcMondays,utcMonth:()=>c.utcMonth,utcMonths:()=>c.utcMonths,utcSaturday:()=>u.utcSaturday,utcSaturdays:()=>u.utcSaturdays,utcSecond:()=>a.second,utcSeconds:()=>a.seconds,utcSunday:()=>u.utcSunday,utcSundays:()=>u.utcSundays,utcThursday:()=>u.utcThursday,utcThursdays:()=>u.utcThursdays,utcTickInterval:()=>f.utcTickInterval,utcTicks:()=>f.utcTicks,utcTuesday:()=>u.utcTuesday,utcTuesdays:()=>u.utcTuesdays,utcWednesday:()=>u.utcWednesday,utcWednesdays:()=>u.utcWednesdays,utcWeek:()=>u.utcSunday,utcWeeks:()=>u.utcSundays,utcYear:()=>d.utcYear,utcYears:()=>d.utcYears});var r=n(37591),i=n(32613),a=n(55030),o=n(13298),s=n(54612),l=n(55334),u=n(78926),c=n(75878),d=n(24355),f=n(526)},37591:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeInterval:()=>a});const r=new Date,i=new Date;function a(e,t,n,o){function s(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return s.floor=t=>(e(t=new Date(+t)),t),s.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),s.round=e=>{const t=s(e),n=s.ceil(e);return e-t(t(e=new Date(+e),null==n?1:Math.floor(n)),e),s.range=(n,r,i)=>{const a=[];if(n=s.ceil(n),i=null==i?1:Math.floor(i),!(n0))return a;let o;do{a.push(o=new Date(+n)),t(n,i),e(n)}while(oa((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(s.count=(t,a)=>(r.setTime(+t),i.setTime(+a),e(r),e(i),Math.floor(n(r,i))),s.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(o?t=>o(t)%e==0:t=>s.count(0,t)%e==0):s:null)),s}},32613:(e,t,n)=>{"use strict";n.r(t),n.d(t,{millisecond:()=>i,milliseconds:()=>a});var r=n(37591);const i=(0,r.timeInterval)((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?(0,r.timeInterval)((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):i:null);const a=i.range},13298:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeMinute:()=>a,timeMinutes:()=>o,utcMinute:()=>s,utcMinutes:()=>l});var r=n(37591),i=n(81134);const a=(0,r.timeInterval)((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*i.durationSecond)}),((e,t)=>{e.setTime(+e+t*i.durationMinute)}),((e,t)=>(t-e)/i.durationMinute),(e=>e.getMinutes())),o=a.range,s=(0,r.timeInterval)((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*i.durationMinute)}),((e,t)=>(t-e)/i.durationMinute),(e=>e.getUTCMinutes())),l=s.range},75878:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeMonth:()=>i,timeMonths:()=>a,utcMonth:()=>o,utcMonths:()=>s});var r=n(37591);const i=(0,r.timeInterval)((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth())),a=i.range,o=(0,r.timeInterval)((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth())),s=o.range},55030:(e,t,n)=>{"use strict";n.r(t),n.d(t,{second:()=>a,seconds:()=>o});var r=n(37591),i=n(81134);const a=(0,r.timeInterval)((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*i.durationSecond)}),((e,t)=>(t-e)/i.durationSecond),(e=>e.getUTCSeconds())),o=a.range},526:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeTickInterval:()=>y,timeTicks:()=>m,utcTickInterval:()=>g,utcTicks:()=>h});var r=n(61388),i=n(81134),a=n(32613),o=n(55030),s=n(13298),l=n(54612),u=n(55334),c=n(78926),d=n(75878),f=n(24355);function p(e,t,n,s,l,u){const c=[[o.second,1,i.durationSecond],[o.second,5,5*i.durationSecond],[o.second,15,15*i.durationSecond],[o.second,30,30*i.durationSecond],[u,1,i.durationMinute],[u,5,5*i.durationMinute],[u,15,15*i.durationMinute],[u,30,30*i.durationMinute],[l,1,i.durationHour],[l,3,3*i.durationHour],[l,6,6*i.durationHour],[l,12,12*i.durationHour],[s,1,i.durationDay],[s,2,2*i.durationDay],[n,1,i.durationWeek],[t,1,i.durationMonth],[t,3,3*i.durationMonth],[e,1,i.durationYear]];function d(t,n,o){const s=Math.abs(n-t)/o,l=(0,r.bisector)((([,,e])=>e)).right(c,s);if(l===c.length)return e.every((0,r.tickStep)(t/i.durationYear,n/i.durationYear,o));if(0===l)return a.millisecond.every(Math.max((0,r.tickStep)(t,n,o),1));const[u,d]=c[s/c[l-1][2]{"use strict";n.r(t),n.d(t,{timeFriday:()=>d,timeFridays:()=>v,timeMonday:()=>s,timeMondays:()=>h,timeSaturday:()=>f,timeSaturdays:()=>b,timeSunday:()=>o,timeSundays:()=>p,timeThursday:()=>c,timeThursdays:()=>y,timeTuesday:()=>l,timeTuesdays:()=>g,timeWednesday:()=>u,timeWednesdays:()=>m,utcFriday:()=>C,utcFridays:()=>F,utcMonday:()=>S,utcMondays:()=>R,utcSaturday:()=>T,utcSaturdays:()=>P,utcSunday:()=>E,utcSundays:()=>k,utcThursday:()=>A,utcThursdays:()=>O,utcTuesday:()=>w,utcTuesdays:()=>D,utcWednesday:()=>_,utcWednesdays:()=>N});var r=n(37591),i=n(81134);function a(e){return(0,r.timeInterval)((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.durationMinute)/i.durationWeek))}const o=a(0),s=a(1),l=a(2),u=a(3),c=a(4),d=a(5),f=a(6),p=o.range,h=s.range,g=l.range,m=u.range,y=c.range,v=d.range,b=f.range;function x(e){return(0,r.timeInterval)((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/i.durationWeek))}const E=x(0),S=x(1),w=x(2),_=x(3),A=x(4),C=x(5),T=x(6),k=E.range,R=S.range,D=w.range,N=_.range,O=A.range,F=C.range,P=T.range},24355:(e,t,n)=>{"use strict";n.r(t),n.d(t,{timeYear:()=>i,timeYears:()=>a,utcYear:()=>o,utcYears:()=>s});var r=n(37591);const i=(0,r.timeInterval)((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));i.every=e=>isFinite(e=Math.floor(e))&&e>0?(0,r.timeInterval)((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null;const a=i.range,o=(0,r.timeInterval)((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));o.every=e=>isFinite(e=Math.floor(e))&&e>0?(0,r.timeInterval)((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null;const s=o.range},52456:(e,t,n)=>{"use strict";n.r(t),n.d(t,{interval:()=>a.default,now:()=>r.now,timeout:()=>i.default,timer:()=>r.timer,timerFlush:()=>r.timerFlush});var r=n(70029),i=n(61463),a=n(65399)},65399:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(70029);function i(e,t,n){var i=new r.Timer,a=t;return null==t?(i.restart(e,t,n),i):(i._restart=i.restart,i.restart=function(e,t,n){t=+t,n=null==n?(0,r.now)():+n,i._restart((function r(o){o+=a,i._restart(r,a+=t,n),e(o)}),t,n)},i.restart(e,t,n),i)}},61463:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(70029);function i(e,t,n){var i=new r.Timer;return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}},70029:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Timer:()=>g,now:()=>p,timer:()=>m,timerFlush:()=>y});var r,i,a=0,o=0,s=0,l=0,u=0,c=0,d="object"==typeof performance&&performance.now?performance:Date,f="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function p(){return u||(f(h),u=d.now()+c)}function h(){u=0}function g(){this._call=this._time=this._next=null}function m(e,t,n){var r=new g;return r.restart(e,t,n),r}function y(){p(),++a;for(var e,t=r;t;)(e=u-t._time)>=0&&t._call.call(void 0,e),t=t._next;--a}function v(){u=(l=d.now())+c,a=o=0;try{y()}finally{a=0,function(){var e,t,n=r,a=1/0;for(;n;)n._call?(a>n._time&&(a=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:r=t);i=e,x(a)}(),u=0}}function b(){var e=d.now(),t=e-l;t>1e3&&(c-=t,l=e)}function x(e){a||(o&&(o=clearTimeout(o)),e-u>24?(e<1/0&&(o=setTimeout(v,e-d.now()-c)),s&&(s=clearInterval(s))):(s||(l=d.now(),s=setInterval(b,1e3)),a=1,f(v)))}g.prototype=m.prototype={constructor:g,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?p():+n)+(null==t?0:+t),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=e,this._time=n,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}}},40123:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(13674);const i=Math.pow(2,-52),a=new Uint32Array(512);class o{static from(e,t=f,n=p){const r=e.length,i=new Float64Array(2*r);for(let a=0;a>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:a,_hullHash:o}=this,l=e.length>>1;let d=1/0,f=1/0,p=-1/0,h=-1/0;for(let t=0;tp&&(p=n),r>h&&(h=r),this._ids[t]=t}const g=(d+p)/2,m=(f+h)/2;let y,v,b;for(let t=0,n=1/0;t0&&(v=t,n=r)}let S=e[2*v],w=e[2*v+1],_=1/0;for(let t=0;tr&&(t[n++]=i,r=a)}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if((0,r.orient2d)(x,E,S,w,A,C)<0){const e=v,t=S,n=w;v=b,S=A,w=C,b=e,A=t,C=n}const T=function(e,t,n,r,i,a){const o=n-e,s=r-t,l=i-e,u=a-t,c=o*o+s*s,d=l*l+u*u,f=.5/(o*u-s*l);return{x:e+(u*c-s*d)*f,y:t+(o*d-l*c)*f}}(x,E,S,w,A,C);this._cx=T.x,this._cy=T.y;for(let t=0;t0&&Math.abs(d-s)<=i&&Math.abs(f-l)<=i)continue;if(s=d,l=f,c===y||c===v||c===b)continue;let p=0;for(let e=0,t=this._hashKey(d,f);e=0;)if(g=h,g===p){g=-1;break}if(-1===g)continue;let m=this._addTriangle(g,c,n[g],-1,-1,a[g]);a[c]=this._legalize(m+2),a[g]=m,k++;let x=n[g];for(;h=n[x],(0,r.orient2d)(d,f,e[2*x],e[2*x+1],e[2*h],e[2*h+1])<0;)m=this._addTriangle(x,c,h,a[c],-1,a[x]),a[c]=this._legalize(m+2),n[x]=x,k--,x=h;if(g===p)for(;h=t[g],(0,r.orient2d)(d,f,e[2*h],e[2*h+1],e[2*g],e[2*g+1])<0;)m=this._addTriangle(h,c,g,-1,a[g],a[h]),this._legalize(m+2),a[h]=m,n[g]=g,k--,g=h;this._hullStart=t[c]=g,n[g]=t[x]=c,n[c]=x,o[this._hashKey(d,f)]=c,o[this._hashKey(e[2*g],e[2*g+1])]=g}this.hull=new Uint32Array(k);for(let e=0,t=this._hullStart;e0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const s=n[e],u=e-e%3;if(o=u+(e+2)%3,-1===s){if(0===i)break;e=a[--i];continue}const c=s-s%3,d=u+(e+1)%3,f=c+(s+2)%3,p=t[o],h=t[e],g=t[d],m=t[f];if(l(r[2*p],r[2*p+1],r[2*h],r[2*h+1],r[2*g],r[2*g+1],r[2*m],r[2*m+1])){t[e]=m,t[s]=p;const r=n[f];if(-1===r){let t=this._hullStart;do{if(this._hullTri[t]===f){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(s,n[o]),this._link(o,f);const l=c+(s+1)%3;i=n&&t[e[o]]>a;)e[o+1]=e[o--];e[o+1]=r}else{let i=n+1,a=r;d(e,n+r>>1,i),t[e[n]]>t[e[r]]&&d(e,n,r),t[e[i]]>t[e[r]]&&d(e,i,r),t[e[n]]>t[e[i]]&&d(e,n,i);const o=e[i],s=t[o];for(;;){do{i++}while(t[e[i]]s);if(a=a-n?(c(e,t,i,r),c(e,t,n,a-1)):(c(e,t,n,a-1),c(e,t,i,r))}}function d(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function f(e){return e[0]}function p(e){return e[1]}},24119:(e,t,n)=>{"use strict";n.r(t),n.d(t,{InternMap:()=>r,InternSet:()=>i});class r extends Map{constructor(e,t=l){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(a(this,e))}has(e){return super.has(a(this,e))}set(e,t){return super.set(o(this,e),t)}delete(e){return super.delete(s(this,e))}}class i extends Set{constructor(e,t=l){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const t of e)this.add(t)}has(e){return super.has(a(this,e))}add(e){return super.add(o(this,e))}delete(e){return super.delete(s(this,e))}}function a({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function o({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function s({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function l(e){return null!==e&&"object"==typeof e?e.valueOf():e}},73709:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});const r=/("(?:[^\\"]|\\.)*")|[:,]/g;function i(e,t={}){const n=JSON.stringify([1],void 0,void 0===t.indent?2:t.indent).slice(2,-3),i=""===n?1/0:void 0===t.maxLength?80:t.maxLength;let{replacer:a}=t;return function e(t,o,s){t&&"function"==typeof t.toJSON&&(t=t.toJSON());const l=JSON.stringify(t,a);if(void 0===l)return l;const u=i-o.length-s;if(l.length<=u){const e=l.replace(r,((e,t)=>t||`${e} `));if(e.length<=u)return e}if(null!=a&&(t=JSON.parse(l),a=void 0),"object"==typeof t&&null!==t){const r=o+n,i=[];let a,s,l=0;if(Array.isArray(t)){a="[",s="]";const{length:n}=t;for(;l0)return[a,n+i.join(`,\n${r}`),s].join(`\n${o}`)}return l}(e,"",0)}},71807:(e,t,n)=>{"use strict";n.r(t),n.d(t,{incircle:()=>L,incirclefast:()=>B});var r=n(62056);const i=(10+96*r.epsilon)*r.epsilon,a=(4+48*r.epsilon)*r.epsilon,o=(44+576*r.epsilon)*r.epsilon*r.epsilon,s=(0,r.vec)(4),l=(0,r.vec)(4),u=(0,r.vec)(4),c=(0,r.vec)(4),d=(0,r.vec)(4),f=(0,r.vec)(4),p=(0,r.vec)(4),h=(0,r.vec)(4),g=(0,r.vec)(8),m=(0,r.vec)(8),y=(0,r.vec)(8),v=(0,r.vec)(8),b=(0,r.vec)(8),x=(0,r.vec)(8),E=(0,r.vec)(8),S=(0,r.vec)(8),w=(0,r.vec)(8),_=(0,r.vec)(4),A=(0,r.vec)(4),C=(0,r.vec)(4),T=(0,r.vec)(8),k=(0,r.vec)(16),R=(0,r.vec)(16),D=(0,r.vec)(16),N=(0,r.vec)(32),O=(0,r.vec)(32),F=(0,r.vec)(48),P=(0,r.vec)(64);let M=(0,r.vec)(1152),I=(0,r.vec)(1152);function $(e,t,n){e=(0,r.sum)(e,M,t,n,I);const i=M;return M=I,I=i,e}function L(e,t,n,I,L,B,U,z){const q=e-U,j=n-U,H=L-U,G=t-z,V=I-z,W=B-z,Y=j*W,X=H*V,K=q*q+G*G,J=H*G,Q=q*W,Z=j*j+V*V,ee=q*V,te=j*G,ne=H*H+W*W,re=K*(Y-X)+Z*(J-Q)+ne*(ee-te),ie=(Math.abs(Y)+Math.abs(X))*K+(Math.abs(J)+Math.abs(Q))*Z+(Math.abs(ee)+Math.abs(te))*ne,ae=i*ie;return re>ae||-re>ae?re:function(e,t,n,i,I,L,B,U,z){let q,j,H,G,V,W,Y,X,K,J,Q,Z,ee,te,ne,re,ie,ae,oe,se,le,ue,ce,de,fe,pe,he,ge,me,ye,ve,be,xe,Ee,Se;const we=e-B,_e=n-B,Ae=I-B,Ce=t-U,Te=i-U,ke=L-U;ve=_e*ke,ce=r.splitter*_e,de=ce-(ce-_e),fe=_e-de,ce=r.splitter*ke,pe=ce-(ce-ke),he=ke-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=Ae*Te,ce=r.splitter*Ae,de=ce-(ce-Ae),fe=Ae-de,ce=r.splitter*Te,pe=ce-(ce-Te),he=Te-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be-Ee,ue=be-ge,s[0]=be-(ge+ue)+(ue-Ee),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-xe,ue=ye-ge,s[1]=ye-(ge+ue)+(ue-xe),Se=me+ge,ue=Se-me,s[2]=me-(Se-ue)+(ge-ue),s[3]=Se,ve=Ae*Ce,ce=r.splitter*Ae,de=ce-(ce-Ae),fe=Ae-de,ce=r.splitter*Ce,pe=ce-(ce-Ce),he=Ce-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=we*ke,ce=r.splitter*we,de=ce-(ce-we),fe=we-de,ce=r.splitter*ke,pe=ce-(ce-ke),he=ke-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be-Ee,ue=be-ge,l[0]=be-(ge+ue)+(ue-Ee),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-xe,ue=ye-ge,l[1]=ye-(ge+ue)+(ue-xe),Se=me+ge,ue=Se-me,l[2]=me-(Se-ue)+(ge-ue),l[3]=Se,ve=we*Te,ce=r.splitter*we,de=ce-(ce-we),fe=we-de,ce=r.splitter*Te,pe=ce-(ce-Te),he=Te-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=_e*Ce,ce=r.splitter*_e,de=ce-(ce-_e),fe=_e-de,ce=r.splitter*Ce,pe=ce-(ce-Ce),he=Ce-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be-Ee,ue=be-ge,u[0]=be-(ge+ue)+(ue-Ee),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-xe,ue=ye-ge,u[1]=ye-(ge+ue)+(ue-xe),Se=me+ge,ue=Se-me,u[2]=me-(Se-ue)+(ge-ue),u[3]=Se,q=(0,r.sum)((0,r.sum)((0,r.sum)((0,r.scale)((0,r.scale)(4,s,we,T),T,we,k),k,(0,r.scale)((0,r.scale)(4,s,Ce,T),T,Ce,R),R,N),N,(0,r.sum)((0,r.scale)((0,r.scale)(4,l,_e,T),T,_e,k),k,(0,r.scale)((0,r.scale)(4,l,Te,T),T,Te,R),R,O),O,P),P,(0,r.sum)((0,r.scale)((0,r.scale)(4,u,Ae,T),T,Ae,k),k,(0,r.scale)((0,r.scale)(4,u,ke,T),T,ke,R),R,N),N,M);let Re=(0,r.estimate)(q,M),De=a*z;if(Re>=De||-Re>=De)return Re;if(ue=e-we,j=e-(we+ue)+(ue-B),ue=t-Ce,V=t-(Ce+ue)+(ue-U),ue=n-_e,H=n-(_e+ue)+(ue-B),ue=i-Te,W=i-(Te+ue)+(ue-U),ue=I-Ae,G=I-(Ae+ue)+(ue-B),ue=L-ke,Y=L-(ke+ue)+(ue-U),0===j&&0===H&&0===G&&0===V&&0===W&&0===Y)return Re;if(De=o*z+r.resulterrbound*Math.abs(Re),Re+=(we*we+Ce*Ce)*(_e*Y+ke*H-(Te*G+Ae*W))+2*(we*j+Ce*V)*(_e*ke-Te*Ae)+((_e*_e+Te*Te)*(Ae*V+Ce*G-(ke*j+we*Y))+2*(_e*H+Te*W)*(Ae*Ce-ke*we))+((Ae*Ae+ke*ke)*(we*W+Te*j-(Ce*H+_e*V))+2*(Ae*G+ke*Y)*(we*Te-Ce*_e)),Re>=De||-Re>=De)return Re;if(0===H&&0===W&&0===G&&0===Y||(ve=we*we,ce=r.splitter*we,de=ce-(ce-we),fe=we-de,be=fe*fe-(ve-de*de-(de+de)*fe),xe=Ce*Ce,ce=r.splitter*Ce,de=ce-(ce-Ce),fe=Ce-de,Ee=fe*fe-(xe-de*de-(de+de)*fe),ge=be+Ee,ue=ge-be,c[0]=be-(ge-ue)+(Ee-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+xe,ue=ge-ye,c[1]=ye-(ge-ue)+(xe-ue),Se=me+ge,ue=Se-me,c[2]=me-(Se-ue)+(ge-ue),c[3]=Se),0===G&&0===Y&&0===j&&0===V||(ve=_e*_e,ce=r.splitter*_e,de=ce-(ce-_e),fe=_e-de,be=fe*fe-(ve-de*de-(de+de)*fe),xe=Te*Te,ce=r.splitter*Te,de=ce-(ce-Te),fe=Te-de,Ee=fe*fe-(xe-de*de-(de+de)*fe),ge=be+Ee,ue=ge-be,d[0]=be-(ge-ue)+(Ee-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+xe,ue=ge-ye,d[1]=ye-(ge-ue)+(xe-ue),Se=me+ge,ue=Se-me,d[2]=me-(Se-ue)+(ge-ue),d[3]=Se),0===j&&0===V&&0===H&&0===W||(ve=Ae*Ae,ce=r.splitter*Ae,de=ce-(ce-Ae),fe=Ae-de,be=fe*fe-(ve-de*de-(de+de)*fe),xe=ke*ke,ce=r.splitter*ke,de=ce-(ce-ke),fe=ke-de,Ee=fe*fe-(xe-de*de-(de+de)*fe),ge=be+Ee,ue=ge-be,f[0]=be-(ge-ue)+(Ee-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+xe,ue=ge-ye,f[1]=ye-(ge-ue)+(xe-ue),Se=me+ge,ue=Se-me,f[2]=me-(Se-ue)+(ge-ue),f[3]=Se),0!==j&&(X=(0,r.scale)(4,s,j,g),q=$(q,(0,r.sum_three)((0,r.scale)(X,g,2*we,k),k,(0,r.scale)((0,r.scale)(4,f,j,T),T,Te,R),R,(0,r.scale)((0,r.scale)(4,d,j,T),T,-ke,D),D,N,F),F)),0!==V&&(K=(0,r.scale)(4,s,V,m),q=$(q,(0,r.sum_three)((0,r.scale)(K,m,2*Ce,k),k,(0,r.scale)((0,r.scale)(4,d,V,T),T,Ae,R),R,(0,r.scale)((0,r.scale)(4,f,V,T),T,-_e,D),D,N,F),F)),0!==H&&(J=(0,r.scale)(4,l,H,y),q=$(q,(0,r.sum_three)((0,r.scale)(J,y,2*_e,k),k,(0,r.scale)((0,r.scale)(4,c,H,T),T,ke,R),R,(0,r.scale)((0,r.scale)(4,f,H,T),T,-Ce,D),D,N,F),F)),0!==W&&(Q=(0,r.scale)(4,l,W,v),q=$(q,(0,r.sum_three)((0,r.scale)(Q,v,2*Te,k),k,(0,r.scale)((0,r.scale)(4,f,W,T),T,we,R),R,(0,r.scale)((0,r.scale)(4,c,W,T),T,-Ae,D),D,N,F),F)),0!==G&&(Z=(0,r.scale)(4,u,G,b),q=$(q,(0,r.sum_three)((0,r.scale)(Z,b,2*Ae,k),k,(0,r.scale)((0,r.scale)(4,d,G,T),T,Ce,R),R,(0,r.scale)((0,r.scale)(4,c,G,T),T,-Te,D),D,N,F),F)),0!==Y&&(ee=(0,r.scale)(4,u,Y,x),q=$(q,(0,r.sum_three)((0,r.scale)(ee,x,2*ke,k),k,(0,r.scale)((0,r.scale)(4,c,Y,T),T,_e,R),R,(0,r.scale)((0,r.scale)(4,d,Y,T),T,-we,D),D,N,F),F)),0!==j||0!==V){if(0!==H||0!==W||0!==G||0!==Y?(ve=H*ke,ce=r.splitter*H,de=ce-(ce-H),fe=H-de,ce=r.splitter*ke,pe=ce-(ce-ke),he=ke-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=_e*Y,ce=r.splitter*_e,de=ce-(ce-_e),fe=_e-de,ce=r.splitter*Y,pe=ce-(ce-Y),he=Y-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be+Ee,ue=ge-be,p[0]=be-(ge-ue)+(Ee-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+xe,ue=ge-ye,p[1]=ye-(ge-ue)+(xe-ue),Se=me+ge,ue=Se-me,p[2]=me-(Se-ue)+(ge-ue),p[3]=Se,ve=G*-Te,ce=r.splitter*G,de=ce-(ce-G),fe=G-de,ce=r.splitter*-Te,pe=ce-(ce- -Te),he=-Te-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=Ae*-W,ce=r.splitter*Ae,de=ce-(ce-Ae),fe=Ae-de,ce=r.splitter*-W,pe=ce-(ce- -W),he=-W-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be+Ee,ue=ge-be,h[0]=be-(ge-ue)+(Ee-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+xe,ue=ge-ye,h[1]=ye-(ge-ue)+(xe-ue),Se=me+ge,ue=Se-me,h[2]=me-(Se-ue)+(ge-ue),h[3]=Se,ne=(0,r.sum)(4,p,4,h,S),ve=H*Y,ce=r.splitter*H,de=ce-(ce-H),fe=H-de,ce=r.splitter*Y,pe=ce-(ce-Y),he=Y-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=G*W,ce=r.splitter*G,de=ce-(ce-G),fe=G-de,ce=r.splitter*W,pe=ce-(ce-W),he=W-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be-Ee,ue=be-ge,A[0]=be-(ge+ue)+(ue-Ee),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-xe,ue=ye-ge,A[1]=ye-(ge+ue)+(ue-xe),Se=me+ge,ue=Se-me,A[2]=me-(Se-ue)+(ge-ue),A[3]=Se,ae=4):(S[0]=0,ne=1,A[0]=0,ae=1),0!==j){const e=(0,r.scale)(ne,S,j,D);q=$(q,(0,r.sum)((0,r.scale)(X,g,j,k),k,(0,r.scale)(e,D,2*we,N),N,F),F);const t=(0,r.scale)(ae,A,j,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*we,k),k,(0,r.scale)(t,T,j,R),R,(0,r.scale)(e,D,j,N),N,O,P),P),0!==W&&(q=$(q,(0,r.scale)((0,r.scale)(4,f,j,T),T,W,k),k)),0!==Y&&(q=$(q,(0,r.scale)((0,r.scale)(4,d,-j,T),T,Y,k),k))}if(0!==V){const e=(0,r.scale)(ne,S,V,D);q=$(q,(0,r.sum)((0,r.scale)(K,m,V,k),k,(0,r.scale)(e,D,2*Ce,N),N,F),F);const t=(0,r.scale)(ae,A,V,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*Ce,k),k,(0,r.scale)(t,T,V,R),R,(0,r.scale)(e,D,V,N),N,O,P),P)}}if(0!==H||0!==W){if(0!==G||0!==Y||0!==j||0!==V?(ve=G*Ce,ce=r.splitter*G,de=ce-(ce-G),fe=G-de,ce=r.splitter*Ce,pe=ce-(ce-Ce),he=Ce-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=Ae*V,ce=r.splitter*Ae,de=ce-(ce-Ae),fe=Ae-de,ce=r.splitter*V,pe=ce-(ce-V),he=V-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be+Ee,ue=ge-be,p[0]=be-(ge-ue)+(Ee-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+xe,ue=ge-ye,p[1]=ye-(ge-ue)+(xe-ue),Se=me+ge,ue=Se-me,p[2]=me-(Se-ue)+(ge-ue),p[3]=Se,se=-ke,le=-Y,ve=j*se,ce=r.splitter*j,de=ce-(ce-j),fe=j-de,ce=r.splitter*se,pe=ce-(ce-se),he=se-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=we*le,ce=r.splitter*we,de=ce-(ce-we),fe=we-de,ce=r.splitter*le,pe=ce-(ce-le),he=le-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be+Ee,ue=ge-be,h[0]=be-(ge-ue)+(Ee-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+xe,ue=ge-ye,h[1]=ye-(ge-ue)+(xe-ue),Se=me+ge,ue=Se-me,h[2]=me-(Se-ue)+(ge-ue),h[3]=Se,re=(0,r.sum)(4,p,4,h,w),ve=G*V,ce=r.splitter*G,de=ce-(ce-G),fe=G-de,ce=r.splitter*V,pe=ce-(ce-V),he=V-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=j*Y,ce=r.splitter*j,de=ce-(ce-j),fe=j-de,ce=r.splitter*Y,pe=ce-(ce-Y),he=Y-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be-Ee,ue=be-ge,C[0]=be-(ge+ue)+(ue-Ee),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-xe,ue=ye-ge,C[1]=ye-(ge+ue)+(ue-xe),Se=me+ge,ue=Se-me,C[2]=me-(Se-ue)+(ge-ue),C[3]=Se,oe=4):(w[0]=0,re=1,C[0]=0,oe=1),0!==H){const e=(0,r.scale)(re,w,H,D);q=$(q,(0,r.sum)((0,r.scale)(J,y,H,k),k,(0,r.scale)(e,D,2*_e,N),N,F),F);const t=(0,r.scale)(oe,C,H,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*_e,k),k,(0,r.scale)(t,T,H,R),R,(0,r.scale)(e,D,H,N),N,O,P),P),0!==Y&&(q=$(q,(0,r.scale)((0,r.scale)(4,c,H,T),T,Y,k),k)),0!==V&&(q=$(q,(0,r.scale)((0,r.scale)(4,f,-H,T),T,V,k),k))}if(0!==W){const e=(0,r.scale)(re,w,W,D);q=$(q,(0,r.sum)((0,r.scale)(Q,v,W,k),k,(0,r.scale)(e,D,2*Te,N),N,F),F);const t=(0,r.scale)(oe,C,W,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*Te,k),k,(0,r.scale)(t,T,W,R),R,(0,r.scale)(e,D,W,N),N,O,P),P)}}if(0!==G||0!==Y){if(0!==j||0!==V||0!==H||0!==W?(ve=j*Te,ce=r.splitter*j,de=ce-(ce-j),fe=j-de,ce=r.splitter*Te,pe=ce-(ce-Te),he=Te-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=we*W,ce=r.splitter*we,de=ce-(ce-we),fe=we-de,ce=r.splitter*W,pe=ce-(ce-W),he=W-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be+Ee,ue=ge-be,p[0]=be-(ge-ue)+(Ee-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+xe,ue=ge-ye,p[1]=ye-(ge-ue)+(xe-ue),Se=me+ge,ue=Se-me,p[2]=me-(Se-ue)+(ge-ue),p[3]=Se,se=-Ce,le=-V,ve=H*se,ce=r.splitter*H,de=ce-(ce-H),fe=H-de,ce=r.splitter*se,pe=ce-(ce-se),he=se-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=_e*le,ce=r.splitter*_e,de=ce-(ce-_e),fe=_e-de,ce=r.splitter*le,pe=ce-(ce-le),he=le-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be+Ee,ue=ge-be,h[0]=be-(ge-ue)+(Ee-ue),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye+xe,ue=ge-ye,h[1]=ye-(ge-ue)+(xe-ue),Se=me+ge,ue=Se-me,h[2]=me-(Se-ue)+(ge-ue),h[3]=Se,te=(0,r.sum)(4,p,4,h,E),ve=j*W,ce=r.splitter*j,de=ce-(ce-j),fe=j-de,ce=r.splitter*W,pe=ce-(ce-W),he=W-pe,be=fe*he-(ve-de*pe-fe*pe-de*he),xe=H*V,ce=r.splitter*H,de=ce-(ce-H),fe=H-de,ce=r.splitter*V,pe=ce-(ce-V),he=V-pe,Ee=fe*he-(xe-de*pe-fe*pe-de*he),ge=be-Ee,ue=be-ge,_[0]=be-(ge+ue)+(ue-Ee),me=ve+ge,ue=me-ve,ye=ve-(me-ue)+(ge-ue),ge=ye-xe,ue=ye-ge,_[1]=ye-(ge+ue)+(ue-xe),Se=me+ge,ue=Se-me,_[2]=me-(Se-ue)+(ge-ue),_[3]=Se,ie=4):(E[0]=0,te=1,_[0]=0,ie=1),0!==G){const e=(0,r.scale)(te,E,G,D);q=$(q,(0,r.sum)((0,r.scale)(Z,b,G,k),k,(0,r.scale)(e,D,2*Ae,N),N,F),F);const t=(0,r.scale)(ie,_,G,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*Ae,k),k,(0,r.scale)(t,T,G,R),R,(0,r.scale)(e,D,G,N),N,O,P),P),0!==V&&(q=$(q,(0,r.scale)((0,r.scale)(4,d,G,T),T,V,k),k)),0!==W&&(q=$(q,(0,r.scale)((0,r.scale)(4,c,-G,T),T,W,k),k))}if(0!==Y){const e=(0,r.scale)(te,E,Y,D);q=$(q,(0,r.sum)((0,r.scale)(ee,x,Y,k),k,(0,r.scale)(e,D,2*ke,N),N,F),F);const t=(0,r.scale)(ie,_,Y,T);q=$(q,(0,r.sum_three)((0,r.scale)(t,T,2*ke,k),k,(0,r.scale)(t,T,Y,R),R,(0,r.scale)(e,D,Y,N),N,O,P),P)}}return M[q-1]}(e,t,n,I,L,B,U,z,ie)}function B(e,t,n,r,i,a,o,s){const l=e-o,u=t-s,c=n-o,d=r-s,f=i-o,p=a-s;return(l*l+u*u)*(c*p-f*d)+(c*c+d*d)*(f*u-l*p)+(f*f+p*p)*(l*d-c*u)}},43914:(e,t,n)=>{"use strict";n.r(t),n.d(t,{insphere:()=>re,inspherefast:()=>ie});var r=n(62056);const i=(16+224*r.epsilon)*r.epsilon,a=(5+72*r.epsilon)*r.epsilon,o=(71+1408*r.epsilon)*r.epsilon*r.epsilon,s=(0,r.vec)(4),l=(0,r.vec)(4),u=(0,r.vec)(4),c=(0,r.vec)(4),d=(0,r.vec)(4),f=(0,r.vec)(4),p=(0,r.vec)(4),h=(0,r.vec)(4),g=(0,r.vec)(4),m=(0,r.vec)(4),y=(0,r.vec)(24),v=(0,r.vec)(24),b=(0,r.vec)(24),x=(0,r.vec)(24),E=(0,r.vec)(24),S=(0,r.vec)(24),w=(0,r.vec)(24),_=(0,r.vec)(24),A=(0,r.vec)(24),C=(0,r.vec)(24),T=(0,r.vec)(1152),k=(0,r.vec)(1152),R=(0,r.vec)(1152),D=(0,r.vec)(1152),N=(0,r.vec)(1152),O=(0,r.vec)(2304),F=(0,r.vec)(2304),P=(0,r.vec)(3456),M=(0,r.vec)(5760),I=(0,r.vec)(8),$=(0,r.vec)(8),L=(0,r.vec)(8),B=(0,r.vec)(16),U=(0,r.vec)(24),z=(0,r.vec)(48),q=(0,r.vec)(48),j=(0,r.vec)(96),H=(0,r.vec)(192),G=(0,r.vec)(384),V=(0,r.vec)(384),W=(0,r.vec)(384),Y=(0,r.vec)(768);function X(e,t,n,i,a,o,s){return(0,r.sum_three)((0,r.scale)(4,e,i,I),I,(0,r.scale)(4,t,a,$),$,(0,r.scale)(4,n,o,L),L,B,s)}function K(e,t,n,i,a,o,s,l,u,c,d,f){const p=(0,r.sum)((0,r.sum)(e,t,n,i,z),z,(0,r.negate)((0,r.sum)(a,o,s,l,q),q),q,j);return(0,r.sum_three)((0,r.scale)((0,r.scale)(p,j,u,H),H,u,G),G,(0,r.scale)((0,r.scale)(p,j,c,H),H,c,V),V,(0,r.scale)((0,r.scale)(p,j,d,H),H,d,W),W,Y,f)}const J=(0,r.vec)(96),Q=(0,r.vec)(96),Z=(0,r.vec)(96),ee=(0,r.vec)(1152);function te(e,t,n,i,a,o,s,l,u,c){const d=X(e,t,n,i,a,o,U);return(0,r.sum_three)((0,r.scale)((0,r.scale)(d,U,s,z),z,s,J),J,(0,r.scale)((0,r.scale)(d,U,l,z),z,l,Q),Q,(0,r.scale)((0,r.scale)(d,U,u,z),z,u,Z),Z,H,c)}function ne(e,t,n,i,I,$,L,B,U,z,q,j,H,G,V,W){let Y,J,Q,Z,ne,re,ie,ae,oe,se,le,ue,ce,de,fe,pe,he,ge,me,ye,ve,be,xe,Ee,Se,we,_e,Ae,Ce,Te,ke;const Re=e-H,De=i-H,Ne=L-H,Oe=z-H,Fe=t-G,Pe=I-G,Me=B-G,Ie=q-G,$e=n-V,Le=$-V,Be=U-V,Ue=j-V;Ae=Re*Pe,ye=r.splitter*Re,ve=ye-(ye-Re),be=Re-ve,ye=r.splitter*Pe,xe=ye-(ye-Pe),Ee=Pe-xe,Ce=be*Ee-(Ae-ve*xe-be*xe-ve*Ee),Te=De*Fe,ye=r.splitter*De,ve=ye-(ye-De),be=De-ve,ye=r.splitter*Fe,xe=ye-(ye-Fe),Ee=Fe-xe,ke=be*Ee-(Te-ve*xe-be*xe-ve*Ee),Se=Ce-ke,me=Ce-Se,s[0]=Ce-(Se+me)+(me-ke),we=Ae+Se,me=we-Ae,_e=Ae-(we-me)+(Se-me),Se=_e-Te,me=_e-Se,s[1]=_e-(Se+me)+(me-Te),Y=we+Se,me=Y-we,s[2]=we-(Y-me)+(Se-me),s[3]=Y,Ae=De*Me,ye=r.splitter*De,ve=ye-(ye-De),be=De-ve,ye=r.splitter*Me,xe=ye-(ye-Me),Ee=Me-xe,Ce=be*Ee-(Ae-ve*xe-be*xe-ve*Ee),Te=Ne*Pe,ye=r.splitter*Ne,ve=ye-(ye-Ne),be=Ne-ve,ye=r.splitter*Pe,xe=ye-(ye-Pe),Ee=Pe-xe,ke=be*Ee-(Te-ve*xe-be*xe-ve*Ee),Se=Ce-ke,me=Ce-Se,l[0]=Ce-(Se+me)+(me-ke),we=Ae+Se,me=we-Ae,_e=Ae-(we-me)+(Se-me),Se=_e-Te,me=_e-Se,l[1]=_e-(Se+me)+(me-Te),J=we+Se,me=J-we,l[2]=we-(J-me)+(Se-me),l[3]=J,Ae=Ne*Ie,ye=r.splitter*Ne,ve=ye-(ye-Ne),be=Ne-ve,ye=r.splitter*Ie,xe=ye-(ye-Ie),Ee=Ie-xe,Ce=be*Ee-(Ae-ve*xe-be*xe-ve*Ee),Te=Oe*Me,ye=r.splitter*Oe,ve=ye-(ye-Oe),be=Oe-ve,ye=r.splitter*Me,xe=ye-(ye-Me),Ee=Me-xe,ke=be*Ee-(Te-ve*xe-be*xe-ve*Ee),Se=Ce-ke,me=Ce-Se,u[0]=Ce-(Se+me)+(me-ke),we=Ae+Se,me=we-Ae,_e=Ae-(we-me)+(Se-me),Se=_e-Te,me=_e-Se,u[1]=_e-(Se+me)+(me-Te),Q=we+Se,me=Q-we,u[2]=we-(Q-me)+(Se-me),u[3]=Q,Ae=Oe*Fe,ye=r.splitter*Oe,ve=ye-(ye-Oe),be=Oe-ve,ye=r.splitter*Fe,xe=ye-(ye-Fe),Ee=Fe-xe,Ce=be*Ee-(Ae-ve*xe-be*xe-ve*Ee),Te=Re*Ie,ye=r.splitter*Re,ve=ye-(ye-Re),be=Re-ve,ye=r.splitter*Ie,xe=ye-(ye-Ie),Ee=Ie-xe,ke=be*Ee-(Te-ve*xe-be*xe-ve*Ee),Se=Ce-ke,me=Ce-Se,g[0]=Ce-(Se+me)+(me-ke),we=Ae+Se,me=we-Ae,_e=Ae-(we-me)+(Se-me),Se=_e-Te,me=_e-Se,g[1]=_e-(Se+me)+(me-Te),Z=we+Se,me=Z-we,g[2]=we-(Z-me)+(Se-me),g[3]=Z,Ae=Re*Me,ye=r.splitter*Re,ve=ye-(ye-Re),be=Re-ve,ye=r.splitter*Me,xe=ye-(ye-Me),Ee=Me-xe,Ce=be*Ee-(Ae-ve*xe-be*xe-ve*Ee),Te=Ne*Fe,ye=r.splitter*Ne,ve=ye-(ye-Ne),be=Ne-ve,ye=r.splitter*Fe,xe=ye-(ye-Fe),Ee=Fe-xe,ke=be*Ee-(Te-ve*xe-be*xe-ve*Ee),Se=Ce-ke,me=Ce-Se,f[0]=Ce-(Se+me)+(me-ke),we=Ae+Se,me=we-Ae,_e=Ae-(we-me)+(Se-me),Se=_e-Te,me=_e-Se,f[1]=_e-(Se+me)+(me-Te),ne=we+Se,me=ne-we,f[2]=we-(ne-me)+(Se-me),f[3]=ne,Ae=De*Ie,ye=r.splitter*De,ve=ye-(ye-De),be=De-ve,ye=r.splitter*Ie,xe=ye-(ye-Ie),Ee=Ie-xe,Ce=be*Ee-(Ae-ve*xe-be*xe-ve*Ee),Te=Oe*Pe,ye=r.splitter*Oe,ve=ye-(ye-Oe),be=Oe-ve,ye=r.splitter*Pe,xe=ye-(ye-Pe),Ee=Pe-xe,ke=be*Ee-(Te-ve*xe-be*xe-ve*Ee),Se=Ce-ke,me=Ce-Se,p[0]=Ce-(Se+me)+(me-ke),we=Ae+Se,me=we-Ae,_e=Ae-(we-me)+(Se-me),Se=_e-Te,me=_e-Se,p[1]=_e-(Se+me)+(me-Te),re=we+Se,me=re-we,p[2]=we-(re-me)+(Se-me),p[3]=re;const ze=(0,r.sum)((0,r.sum)((0,r.negate)(te(l,u,p,Ue,Le,-Be,Re,Fe,$e,T),T),T,te(u,g,f,$e,Be,Ue,De,Pe,Le,k),k,O),O,(0,r.sum)((0,r.negate)(te(g,s,p,Le,Ue,$e,Ne,Me,Be,R),R),R,te(s,l,f,Be,$e,-Le,Oe,Ie,Ue,D),D,F),F,ee);let qe=(0,r.estimate)(ze,ee),je=a*W;if(qe>=je||-qe>=je)return qe;if(me=e-Re,ie=e-(Re+me)+(me-H),me=t-Fe,le=t-(Fe+me)+(me-G),me=n-$e,fe=n-($e+me)+(me-V),me=i-De,ae=i-(De+me)+(me-H),me=I-Pe,ue=I-(Pe+me)+(me-G),me=$-Le,pe=$-(Le+me)+(me-V),me=L-Ne,oe=L-(Ne+me)+(me-H),me=B-Me,ce=B-(Me+me)+(me-G),me=U-Be,he=U-(Be+me)+(me-V),me=z-Oe,se=z-(Oe+me)+(me-H),me=q-Ie,de=q-(Ie+me)+(me-G),me=j-Ue,ge=j-(Ue+me)+(me-V),0===ie&&0===le&&0===fe&&0===ae&&0===ue&&0===pe&&0===oe&&0===ce&&0===he&&0===se&&0===de&&0===ge)return qe;je=o*W+r.resulterrbound*Math.abs(qe);const He=Re*ue+Pe*ie-(Fe*ae+De*le),Ge=De*ce+Me*ae-(Pe*oe+Ne*ue),Ve=Ne*de+Ie*oe-(Me*se+Oe*ce),We=Oe*le+Fe*se-(Ie*ie+Re*de),Ye=Re*ce+Me*ie-(Fe*oe+Ne*le),Xe=De*de+Ie*ae-(Pe*se+Oe*ue);return qe+=(De*De+Pe*Pe+Le*Le)*(Be*We+Ue*Ye+$e*Ve+(he*Z+ge*ne+fe*Q))+(Oe*Oe+Ie*Ie+Ue*Ue)*($e*Ge-Le*Ye+Be*He+(fe*J-pe*ne+he*Y))-((Re*Re+Fe*Fe+$e*$e)*(Le*Ve-Be*Xe+Ue*Ge+(pe*Q-he*re+ge*J))+(Ne*Ne+Me*Me+Be*Be)*(Ue*He+$e*Xe+Le*We+(ge*Y+fe*re+pe*Z)))+2*((De*ae+Pe*ue+Le*pe)*(Be*Z+Ue*ne+$e*Q)+(Oe*se+Ie*de+Ue*ge)*($e*J-Le*ne+Be*Y)-((Re*ie+Fe*le+$e*fe)*(Le*Q-Be*re+Ue*J)+(Ne*oe+Me*ce+Be*he)*(Ue*Y+$e*re+Le*Z))),qe>=je||-qe>=je?qe:function(e,t,n,i,a,o,I,$,L,B,U,z,q,j,H){let G,V,W,Y,J,Q,Z,ee,te,ne,re,ie,ae,oe;ne=e*a,V=r.splitter*e,W=V-(V-e),Y=e-W,V=r.splitter*a,J=V-(V-a),Q=a-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=i*t,V=r.splitter*i,W=V-(V-i),Y=i-W,V=r.splitter*t,J=V-(V-t),Q=t-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,s[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,s[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,s[2]=ee-(oe-G)+(Z-G),s[3]=oe,ne=i*$,V=r.splitter*i,W=V-(V-i),Y=i-W,V=r.splitter*$,J=V-(V-$),Q=$-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=I*a,V=r.splitter*I,W=V-(V-I),Y=I-W,V=r.splitter*a,J=V-(V-a),Q=a-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,l[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,l[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,l[2]=ee-(oe-G)+(Z-G),l[3]=oe,ne=I*U,V=r.splitter*I,W=V-(V-I),Y=I-W,V=r.splitter*U,J=V-(V-U),Q=U-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=B*$,V=r.splitter*B,W=V-(V-B),Y=B-W,V=r.splitter*$,J=V-(V-$),Q=$-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,u[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,u[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,u[2]=ee-(oe-G)+(Z-G),u[3]=oe,ne=B*j,V=r.splitter*B,W=V-(V-B),Y=B-W,V=r.splitter*j,J=V-(V-j),Q=j-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=q*U,V=r.splitter*q,W=V-(V-q),Y=q-W,V=r.splitter*U,J=V-(V-U),Q=U-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,c[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,c[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,c[2]=ee-(oe-G)+(Z-G),c[3]=oe,ne=q*t,V=r.splitter*q,W=V-(V-q),Y=q-W,V=r.splitter*t,J=V-(V-t),Q=t-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=e*j,V=r.splitter*e,W=V-(V-e),Y=e-W,V=r.splitter*j,J=V-(V-j),Q=j-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,d[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,d[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,d[2]=ee-(oe-G)+(Z-G),d[3]=oe,ne=e*$,V=r.splitter*e,W=V-(V-e),Y=e-W,V=r.splitter*$,J=V-(V-$),Q=$-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=I*t,V=r.splitter*I,W=V-(V-I),Y=I-W,V=r.splitter*t,J=V-(V-t),Q=t-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,f[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,f[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,f[2]=ee-(oe-G)+(Z-G),f[3]=oe,ne=i*U,V=r.splitter*i,W=V-(V-i),Y=i-W,V=r.splitter*U,J=V-(V-U),Q=U-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=B*a,V=r.splitter*B,W=V-(V-B),Y=B-W,V=r.splitter*a,J=V-(V-a),Q=a-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,p[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,p[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,p[2]=ee-(oe-G)+(Z-G),p[3]=oe,ne=I*j,V=r.splitter*I,W=V-(V-I),Y=I-W,V=r.splitter*j,J=V-(V-j),Q=j-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=q*$,V=r.splitter*q,W=V-(V-q),Y=q-W,V=r.splitter*$,J=V-(V-$),Q=$-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,h[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,h[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,h[2]=ee-(oe-G)+(Z-G),h[3]=oe,ne=B*t,V=r.splitter*B,W=V-(V-B),Y=B-W,V=r.splitter*t,J=V-(V-t),Q=t-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=e*U,V=r.splitter*e,W=V-(V-e),Y=e-W,V=r.splitter*U,J=V-(V-U),Q=U-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,g[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,g[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,g[2]=ee-(oe-G)+(Z-G),g[3]=oe,ne=q*a,V=r.splitter*q,W=V-(V-q),Y=q-W,V=r.splitter*a,J=V-(V-a),Q=a-J,re=Y*Q-(ne-W*J-Y*J-W*Q),ie=i*j,V=r.splitter*i,W=V-(V-i),Y=i-W,V=r.splitter*j,J=V-(V-j),Q=j-J,ae=Y*Q-(ie-W*J-Y*J-W*Q),Z=re-ae,G=re-Z,m[0]=re-(Z+G)+(G-ae),ee=ne+Z,G=ee-ne,te=ne-(ee-G)+(Z-G),Z=te-ie,G=te-Z,m[1]=te-(Z+G)+(G-ie),oe=ee+Z,G=oe-ee,m[2]=ee-(oe-G)+(Z-G),m[3]=oe;const se=X(s,l,f,L,n,-o,y),le=X(l,u,p,z,o,-L,v),ue=X(u,c,h,H,L,-z,b),ce=X(c,d,g,n,z,-H,x),de=X(d,s,m,o,H,-n,E),fe=X(s,p,g,z,n,o,S),pe=X(l,h,m,H,o,L,w),he=X(u,g,f,n,L,z,_),ge=X(c,m,p,o,z,H,A),me=X(d,f,h,L,H,n,C),ye=(0,r.sum_three)(K(ue,b,pe,w,ge,A,le,v,e,t,n,T),T,K(ce,x,he,_,me,C,ue,b,i,a,o,k),k,(0,r.sum_three)(K(de,E,ge,A,fe,S,ce,x,I,$,L,R),R,K(se,y,me,C,pe,w,de,E,B,U,z,D),D,K(le,v,fe,S,he,_,se,y,q,j,H,N),N,F,P),P,O,M);return M[ye-1]}(e,t,n,i,I,$,L,B,U,z,q,j,H,G,V)}function re(e,t,n,r,a,o,s,l,u,c,d,f,p,h,g){const m=e-p,y=r-p,v=s-p,b=c-p,x=t-h,E=a-h,S=l-h,w=d-h,_=n-g,A=o-g,C=u-g,T=f-g,k=m*E,R=y*x,D=k-R,N=y*S,O=v*E,F=N-O,P=v*w,M=b*S,I=P-M,$=b*x,L=m*w,B=$-L,U=m*S,z=v*x,q=U-z,j=y*w,H=b*E,G=j-H,V=m*m+x*x+_*_,W=y*y+E*E+A*A,Y=v*v+S*S+C*C,X=b*b+w*w+T*T,K=Y*(T*D+_*G+A*B)-X*(_*F-A*q+C*D)+(V*(A*I-C*G+T*F)-W*(C*B+T*q+_*I)),J=Math.abs(_),Q=Math.abs(A),Z=Math.abs(C),ee=Math.abs(T),te=Math.abs(k)+Math.abs(R),re=Math.abs(N)+Math.abs(O),ie=Math.abs(P)+Math.abs(M),ae=Math.abs($)+Math.abs(L),oe=Math.abs(U)+Math.abs(z),se=Math.abs(j)+Math.abs(H),le=(ie*Q+se*Z+re*ee)*V+(ae*Z+oe*ee+ie*J)*W+(te*ee+se*J+ae*Q)*Y+(re*J+oe*Q+te*Z)*X,ue=i*le;return K>ue||-K>ue?K:-ne(e,t,n,r,a,o,s,l,u,c,d,f,p,h,g,le)}function ie(e,t,n,r,i,a,o,s,l,u,c,d,f,p,h){const g=e-f,m=r-f,y=o-f,v=u-f,b=t-p,x=i-p,E=s-p,S=c-p,w=n-h,_=a-h,A=l-h,C=d-h,T=g*x-m*b,k=m*E-y*x,R=y*S-v*E,D=v*b-g*S,N=g*E-y*b,O=m*S-v*x;return(y*y+E*E+A*A)*(C*T+w*O+_*D)-(v*v+S*S+C*C)*(w*k-_*N+A*T)+((g*g+b*b+w*w)*(_*R-A*O+C*k)-(m*m+x*x+_*_)*(A*D+C*N+w*R))}},11083:(e,t,n)=>{"use strict";n.r(t),n.d(t,{orient2d:()=>f,orient2dfast:()=>p});var r=n(62056);const i=(3+16*r.epsilon)*r.epsilon,a=(2+12*r.epsilon)*r.epsilon,o=(9+64*r.epsilon)*r.epsilon*r.epsilon,s=(0,r.vec)(4),l=(0,r.vec)(8),u=(0,r.vec)(12),c=(0,r.vec)(16),d=(0,r.vec)(4);function f(e,t,n,f,p,h){const g=(t-h)*(n-p),m=(e-p)*(f-h),y=g-m,v=Math.abs(g+m);return Math.abs(y)>=i*v?y:-function(e,t,n,i,f,p,h){let g,m,y,v,b,x,E,S,w,_,A,C,T,k,R,D,N,O;const F=e-f,P=n-f,M=t-p,I=i-p;k=F*I,x=r.splitter*F,E=x-(x-F),S=F-E,x=r.splitter*I,w=x-(x-I),_=I-w,R=S*_-(k-E*w-S*w-E*_),D=M*P,x=r.splitter*M,E=x-(x-M),S=M-E,x=r.splitter*P,w=x-(x-P),_=P-w,N=S*_-(D-E*w-S*w-E*_),A=R-N,b=R-A,s[0]=R-(A+b)+(b-N),C=k+A,b=C-k,T=k-(C-b)+(A-b),A=T-D,b=T-A,s[1]=T-(A+b)+(b-D),O=C+A,b=O-C,s[2]=C-(O-b)+(A-b),s[3]=O;let $=(0,r.estimate)(4,s),L=a*h;if($>=L||-$>=L)return $;if(b=e-F,g=e-(F+b)+(b-f),b=n-P,y=n-(P+b)+(b-f),b=t-M,m=t-(M+b)+(b-p),b=i-I,v=i-(I+b)+(b-p),0===g&&0===m&&0===y&&0===v)return $;if(L=o*h+r.resulterrbound*Math.abs($),$+=F*v+I*g-(M*y+P*m),$>=L||-$>=L)return $;k=g*I,x=r.splitter*g,E=x-(x-g),S=g-E,x=r.splitter*I,w=x-(x-I),_=I-w,R=S*_-(k-E*w-S*w-E*_),D=m*P,x=r.splitter*m,E=x-(x-m),S=m-E,x=r.splitter*P,w=x-(x-P),_=P-w,N=S*_-(D-E*w-S*w-E*_),A=R-N,b=R-A,d[0]=R-(A+b)+(b-N),C=k+A,b=C-k,T=k-(C-b)+(A-b),A=T-D,b=T-A,d[1]=T-(A+b)+(b-D),O=C+A,b=O-C,d[2]=C-(O-b)+(A-b),d[3]=O;const B=(0,r.sum)(4,s,4,d,l);k=F*v,x=r.splitter*F,E=x-(x-F),S=F-E,x=r.splitter*v,w=x-(x-v),_=v-w,R=S*_-(k-E*w-S*w-E*_),D=M*y,x=r.splitter*M,E=x-(x-M),S=M-E,x=r.splitter*y,w=x-(x-y),_=y-w,N=S*_-(D-E*w-S*w-E*_),A=R-N,b=R-A,d[0]=R-(A+b)+(b-N),C=k+A,b=C-k,T=k-(C-b)+(A-b),A=T-D,b=T-A,d[1]=T-(A+b)+(b-D),O=C+A,b=O-C,d[2]=C-(O-b)+(A-b),d[3]=O;const U=(0,r.sum)(B,l,4,d,u);k=g*v,x=r.splitter*g,E=x-(x-g),S=g-E,x=r.splitter*v,w=x-(x-v),_=v-w,R=S*_-(k-E*w-S*w-E*_),D=m*y,x=r.splitter*m,E=x-(x-m),S=m-E,x=r.splitter*y,w=x-(x-y),_=y-w,N=S*_-(D-E*w-S*w-E*_),A=R-N,b=R-A,d[0]=R-(A+b)+(b-N),C=k+A,b=C-k,T=k-(C-b)+(A-b),A=T-D,b=T-A,d[1]=T-(A+b)+(b-D),O=C+A,b=O-C,d[2]=C-(O-b)+(A-b),d[3]=O;const z=(0,r.sum)(U,u,4,d,c);return c[z-1]}(e,t,n,f,p,h,v)}function p(e,t,n,r,i,a){return(t-a)*(n-i)-(e-i)*(r-a)}},98302:(e,t,n)=>{"use strict";n.r(t),n.d(t,{orient3d:()=>R,orient3dfast:()=>D});var r=n(62056);const i=(7+56*r.epsilon)*r.epsilon,a=(3+28*r.epsilon)*r.epsilon,o=(26+288*r.epsilon)*r.epsilon*r.epsilon,s=(0,r.vec)(4),l=(0,r.vec)(4),u=(0,r.vec)(4),c=(0,r.vec)(4),d=(0,r.vec)(4),f=(0,r.vec)(4),p=(0,r.vec)(4),h=(0,r.vec)(4),g=(0,r.vec)(4),m=(0,r.vec)(8),y=(0,r.vec)(8),v=(0,r.vec)(8),b=(0,r.vec)(4),x=(0,r.vec)(8),E=(0,r.vec)(8),S=(0,r.vec)(8),w=(0,r.vec)(12);let _=(0,r.vec)(192),A=(0,r.vec)(192);function C(e,t,n){e=(0,r.sum)(e,_,t,n,A);const i=_;return _=A,A=i,e}function T(e,t,n,i,a,o,s,l){let u,c,d,f,p,h,g,m,y,v,b,x,E,S,w;return 0===e?0===t?(s[0]=0,l[0]=0,1):(w=-t,v=w*n,c=r.splitter*w,d=c-(c-w),f=w-d,c=r.splitter*n,p=c-(c-n),h=n-p,s[0]=f*h-(v-d*p-f*p-d*h),s[1]=v,v=t*a,c=r.splitter*t,d=c-(c-t),f=t-d,c=r.splitter*a,p=c-(c-a),h=a-p,l[0]=f*h-(v-d*p-f*p-d*h),l[1]=v,2):0===t?(v=e*i,c=r.splitter*e,d=c-(c-e),f=e-d,c=r.splitter*i,p=c-(c-i),h=i-p,s[0]=f*h-(v-d*p-f*p-d*h),s[1]=v,w=-e,v=w*o,c=r.splitter*w,d=c-(c-w),f=w-d,c=r.splitter*o,p=c-(c-o),h=o-p,l[0]=f*h-(v-d*p-f*p-d*h),l[1]=v,2):(v=e*i,c=r.splitter*e,d=c-(c-e),f=e-d,c=r.splitter*i,p=c-(c-i),h=i-p,b=f*h-(v-d*p-f*p-d*h),x=t*n,c=r.splitter*t,d=c-(c-t),f=t-d,c=r.splitter*n,p=c-(c-n),h=n-p,E=f*h-(x-d*p-f*p-d*h),g=b-E,u=b-g,s[0]=b-(g+u)+(u-E),m=v+g,u=m-v,y=v-(m-u)+(g-u),g=y-x,u=y-g,s[1]=y-(g+u)+(u-x),S=m+g,u=S-m,s[2]=m-(S-u)+(g-u),s[3]=S,v=t*a,c=r.splitter*t,d=c-(c-t),f=t-d,c=r.splitter*a,p=c-(c-a),h=a-p,b=f*h-(v-d*p-f*p-d*h),x=e*o,c=r.splitter*e,d=c-(c-e),f=e-d,c=r.splitter*o,p=c-(c-o),h=o-p,E=f*h-(x-d*p-f*p-d*h),g=b-E,u=b-g,l[0]=b-(g+u)+(u-E),m=v+g,u=m-v,y=v-(m-u)+(g-u),g=y-x,u=y-g,l[1]=y-(g+u)+(u-x),S=m+g,u=S-m,l[2]=m-(S-u)+(g-u),l[3]=S,4)}function k(e,t,n,i,a){let o,s,l,u,c,d,f,p,h,g,m,y,v;return m=t*n,s=r.splitter*t,l=s-(s-t),u=t-l,s=r.splitter*n,c=s-(s-n),d=n-c,y=u*d-(m-l*c-u*c-l*d),s=r.splitter*i,c=s-(s-i),d=i-c,f=y*i,s=r.splitter*y,l=s-(s-y),u=y-l,b[0]=u*d-(f-l*c-u*c-l*d),p=m*i,s=r.splitter*m,l=s-(s-m),u=m-l,g=u*d-(p-l*c-u*c-l*d),h=f+g,o=h-f,b[1]=f-(h-o)+(g-o),v=p+h,b[2]=h-(v-p),b[3]=v,e=C(e,4,b),0!==a&&(s=r.splitter*a,c=s-(s-a),d=a-c,f=y*a,s=r.splitter*y,l=s-(s-y),u=y-l,b[0]=u*d-(f-l*c-u*c-l*d),p=m*a,s=r.splitter*m,l=s-(s-m),u=m-l,g=u*d-(p-l*c-u*c-l*d),h=f+g,o=h-f,b[1]=f-(h-o)+(g-o),v=p+h,b[2]=h-(v-p),b[3]=v,e=C(e,4,b)),e}function R(e,t,n,b,A,R,D,N,O,F,P,M){const I=e-F,$=b-F,L=D-F,B=t-P,U=A-P,z=N-P,q=n-M,j=R-M,H=O-M,G=$*z,V=L*U,W=L*B,Y=I*z,X=I*U,K=$*B,J=q*(G-V)+j*(W-Y)+H*(X-K),Q=(Math.abs(G)+Math.abs(V))*Math.abs(q)+(Math.abs(W)+Math.abs(Y))*Math.abs(j)+(Math.abs(X)+Math.abs(K))*Math.abs(H),Z=i*Q;return J>Z||-J>Z?J:function(e,t,n,i,b,A,R,D,N,O,F,P,M){let I,$,L,B,U,z,q,j,H,G,V,W,Y,X,K,J,Q,Z,ee,te,ne,re,ie,ae;const oe=e-O,se=i-O,le=R-O,ue=t-F,ce=b-F,de=D-F,fe=n-P,pe=A-P,he=N-P;te=se*de,W=r.splitter*se,Y=W-(W-se),X=se-Y,W=r.splitter*de,K=W-(W-de),J=de-K,ne=X*J-(te-Y*K-X*K-Y*J),re=le*ce,W=r.splitter*le,Y=W-(W-le),X=le-Y,W=r.splitter*ce,K=W-(W-ce),J=ce-K,ie=X*J-(re-Y*K-X*K-Y*J),Q=ne-ie,V=ne-Q,s[0]=ne-(Q+V)+(V-ie),Z=te+Q,V=Z-te,ee=te-(Z-V)+(Q-V),Q=ee-re,V=ee-Q,s[1]=ee-(Q+V)+(V-re),ae=Z+Q,V=ae-Z,s[2]=Z-(ae-V)+(Q-V),s[3]=ae,te=le*ue,W=r.splitter*le,Y=W-(W-le),X=le-Y,W=r.splitter*ue,K=W-(W-ue),J=ue-K,ne=X*J-(te-Y*K-X*K-Y*J),re=oe*de,W=r.splitter*oe,Y=W-(W-oe),X=oe-Y,W=r.splitter*de,K=W-(W-de),J=de-K,ie=X*J-(re-Y*K-X*K-Y*J),Q=ne-ie,V=ne-Q,l[0]=ne-(Q+V)+(V-ie),Z=te+Q,V=Z-te,ee=te-(Z-V)+(Q-V),Q=ee-re,V=ee-Q,l[1]=ee-(Q+V)+(V-re),ae=Z+Q,V=ae-Z,l[2]=Z-(ae-V)+(Q-V),l[3]=ae,te=oe*ce,W=r.splitter*oe,Y=W-(W-oe),X=oe-Y,W=r.splitter*ce,K=W-(W-ce),J=ce-K,ne=X*J-(te-Y*K-X*K-Y*J),re=se*ue,W=r.splitter*se,Y=W-(W-se),X=se-Y,W=r.splitter*ue,K=W-(W-ue),J=ue-K,ie=X*J-(re-Y*K-X*K-Y*J),Q=ne-ie,V=ne-Q,u[0]=ne-(Q+V)+(V-ie),Z=te+Q,V=Z-te,ee=te-(Z-V)+(Q-V),Q=ee-re,V=ee-Q,u[1]=ee-(Q+V)+(V-re),ae=Z+Q,V=ae-Z,u[2]=Z-(ae-V)+(Q-V),u[3]=ae,I=(0,r.sum)((0,r.sum)((0,r.scale)(4,s,fe,x),x,(0,r.scale)(4,l,pe,E),E,S),S,(0,r.scale)(4,u,he,x),x,_);let ge=(0,r.estimate)(I,_),me=a*M;if(ge>=me||-ge>=me)return ge;if(V=e-oe,$=e-(oe+V)+(V-O),V=i-se,L=i-(se+V)+(V-O),V=R-le,B=R-(le+V)+(V-O),V=t-ue,U=t-(ue+V)+(V-F),V=b-ce,z=b-(ce+V)+(V-F),V=D-de,q=D-(de+V)+(V-F),V=n-fe,j=n-(fe+V)+(V-P),V=A-pe,H=A-(pe+V)+(V-P),V=N-he,G=N-(he+V)+(V-P),0===$&&0===L&&0===B&&0===U&&0===z&&0===q&&0===j&&0===H&&0===G)return ge;if(me=o*M+r.resulterrbound*Math.abs(ge),ge+=fe*(se*q+de*L-(ce*B+le*z))+j*(se*de-ce*le)+pe*(le*U+ue*B-(de*$+oe*q))+H*(le*ue-de*oe)+he*(oe*z+ce*$-(ue*L+se*U))+G*(oe*ce-ue*se),ge>=me||-ge>=me)return ge;const ye=T($,U,se,ce,le,de,c,d),ve=T(L,z,le,de,oe,ue,f,p),be=T(B,q,oe,ue,se,ce,h,g),xe=(0,r.sum)(ve,f,be,g,m);I=C(I,(0,r.scale)(xe,m,fe,S),S);const Ee=(0,r.sum)(be,h,ye,d,y);I=C(I,(0,r.scale)(Ee,y,pe,S),S);const Se=(0,r.sum)(ye,c,ve,p,v);return I=C(I,(0,r.scale)(Se,v,he,S),S),0!==j&&(I=C(I,(0,r.scale)(4,s,j,w),w),I=C(I,(0,r.scale)(xe,m,j,S),S)),0!==H&&(I=C(I,(0,r.scale)(4,l,H,w),w),I=C(I,(0,r.scale)(Ee,y,H,S),S)),0!==G&&(I=C(I,(0,r.scale)(4,u,G,w),w),I=C(I,(0,r.scale)(Se,v,G,S),S)),0!==$&&(0!==z&&(I=k(I,$,z,he,G)),0!==q&&(I=k(I,-$,q,pe,H))),0!==L&&(0!==q&&(I=k(I,L,q,fe,j)),0!==U&&(I=k(I,-L,U,he,G))),0!==B&&(0!==U&&(I=k(I,B,U,pe,H)),0!==z&&(I=k(I,-B,z,fe,j))),_[I-1]}(e,t,n,b,A,R,D,N,O,F,P,M,Q)}function D(e,t,n,r,i,a,o,s,l,u,c,d){const f=t-c,p=i-c,h=s-c,g=n-d,m=a-d,y=l-d;return(e-u)*(p*y-m*h)+(r-u)*(h*g-y*f)+(o-u)*(f*m-g*p)}},62056:(e,t,n)=>{"use strict";n.r(t),n.d(t,{epsilon:()=>r,estimate:()=>c,negate:()=>u,resulterrbound:()=>a,scale:()=>l,splitter:()=>i,sum:()=>o,sum_three:()=>s,vec:()=>d});const r=11102230246251565e-32,i=134217729,a=(3+8*r)*r;function o(e,t,n,r,i){let a,o,s,l,u=t[0],c=r[0],d=0,f=0;c>u==c>-u?(a=u,u=t[++d]):(a=c,c=r[++f]);let p=0;if(du==c>-u?(o=u+a,s=a-(o-u),u=t[++d]):(o=c+a,s=a-(o-c),c=r[++f]),a=o,0!==s&&(i[p++]=s);du==c>-u?(o=a+u,l=o-a,s=a-(o-l)+(u-l),u=t[++d]):(o=a+c,l=o-a,s=a-(o-l)+(c-l),c=r[++f]),a=o,0!==s&&(i[p++]=s);for(;d{"use strict";n.r(t),n.d(t,{incircle:()=>a.incircle,incirclefast:()=>a.incirclefast,insphere:()=>o.insphere,inspherefast:()=>o.inspherefast,orient2d:()=>r.orient2d,orient2dfast:()=>r.orient2dfast,orient3d:()=>i.orient3d,orient3dfast:()=>i.orient3dfast});var r=n(11083),i=n(98302),a=n(71807),o=n(43914)},31635:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>M,__assign:()=>a,__asyncDelegator:()=>A,__asyncGenerator:()=>_,__asyncValues:()=>C,__await:()=>w,__awaiter:()=>h,__classPrivateFieldGet:()=>O,__classPrivateFieldIn:()=>P,__classPrivateFieldSet:()=>F,__createBinding:()=>m,__decorate:()=>s,__disposeResources:()=>$,__esDecorate:()=>u,__exportStar:()=>y,__extends:()=>i,__generator:()=>g,__importDefault:()=>N,__importStar:()=>D,__makeTemplateObject:()=>T,__metadata:()=>p,__param:()=>l,__propKey:()=>d,__read:()=>b,__rest:()=>o,__rewriteRelativeImportExtension:()=>L,__runInitializers:()=>c,__setFunctionName:()=>f,__spread:()=>x,__spreadArray:()=>S,__spreadArrays:()=>E,__values:()=>v,default:()=>B});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function l(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,i,a){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var g in r)h[g]="access"===g?{}:r[g];for(var g in r.access)h.access[g]=r.access[g];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(e||null))};var m=(0,n[p])("accessor"===l?{get:d.get,set:d.set}:d[u],h);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=o(m.get))&&(d.get=s),(s=o(m.set))&&(d.set=s),(s=o(m.init))&&i.unshift(s)}else(s=o(m))&&("field"===l?i.unshift(s):d[u]=s)}c&&Object.defineProperty(c,r.name,d),f=!0}function c(e,t,n){for(var r=arguments.length>2,i=0;i0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function x(){for(var e=[],t=0;t1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=i[e](t)).value instanceof w?Promise.resolve(n.value.v).then(l,u):c(a[0][2],n)}catch(e){c(a[0][3],e)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function A(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:w(e[r](t)),done:!1}:i?i(t):t}:i}}function C(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=v(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},R=function(e){return R=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},R(e)};function D(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=R(e),r=0;r{"use strict";e.exports=JSON.parse('{"name":"@aws-sdk/client-bedrock-runtime","description":"AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native","version":"3.726.1","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-bedrock-runtime","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo bedrock-runtime"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.726.0","@aws-sdk/client-sts":"3.726.1","@aws-sdk/core":"3.723.0","@aws-sdk/credential-provider-node":"3.726.0","@aws-sdk/middleware-host-header":"3.723.0","@aws-sdk/middleware-logger":"3.723.0","@aws-sdk/middleware-recursion-detection":"3.723.0","@aws-sdk/middleware-user-agent":"3.726.0","@aws-sdk/region-config-resolver":"3.723.0","@aws-sdk/types":"3.723.0","@aws-sdk/util-endpoints":"3.726.0","@aws-sdk/util-user-agent-browser":"3.723.0","@aws-sdk/util-user-agent-node":"3.726.0","@smithy/config-resolver":"^4.0.0","@smithy/core":"^3.0.0","@smithy/eventstream-serde-browser":"^4.0.0","@smithy/eventstream-serde-config-resolver":"^4.0.0","@smithy/eventstream-serde-node":"^4.0.0","@smithy/fetch-http-handler":"^5.0.0","@smithy/hash-node":"^4.0.0","@smithy/invalid-dependency":"^4.0.0","@smithy/middleware-content-length":"^4.0.0","@smithy/middleware-endpoint":"^4.0.0","@smithy/middleware-retry":"^4.0.0","@smithy/middleware-serde":"^4.0.0","@smithy/middleware-stack":"^4.0.0","@smithy/node-config-provider":"^4.0.0","@smithy/node-http-handler":"^4.0.0","@smithy/protocol-http":"^5.0.0","@smithy/smithy-client":"^4.0.0","@smithy/types":"^4.0.0","@smithy/url-parser":"^4.0.0","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.0","@smithy/util-defaults-mode-node":"^4.0.0","@smithy/util-endpoints":"^3.0.0","@smithy/util-middleware":"^4.0.0","@smithy/util-retry":"^4.0.0","@smithy/util-stream":"^4.0.0","@smithy/util-utf8":"^4.0.0","@types/uuid":"^9.0.1","tslib":"^2.6.2","uuid":"^9.0.1"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.2.2"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock-runtime","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-bedrock-runtime"}}')},4787:e=>{"use strict";e.exports=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}')},67383:e=>{"use strict";e.exports=JSON.parse('{"name":"vega-lite","author":"Dominik Moritz, Kanit \\"Ham\\" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer","version":"5.23.0","collaborators":["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Arvind Satyanarayan (https://arvindsatya.com)","Jeffrey Heer (https://jheer.org)"],"homepage":"https://vega.github.io/vega-lite/","description":"Vega-Lite is a concise high-level language for interactive visualization.","keywords":["vega","chart","visualization"],"main":"build/vega-lite.js","unpkg":"build/vega-lite.min.js","jsdelivr":"build/vega-lite.min.js","module":"build/src/index","types":"build/src/index.d.ts","bin":{"vl2pdf":"./bin/vl2pdf","vl2png":"./bin/vl2png","vl2svg":"./bin/vl2svg","vl2vg":"./bin/vl2vg"},"files":["bin","build","src","vega-lite*","tsconfig.json"],"scripts":{"changelog":"conventional-changelog -p angular -r 2","prebuild":"yarn clean:build","build":"yarn build:only","build:only":"tsc -p tsconfig.build.json && rollup -c","prebuild:examples":"yarn build:only","build:examples":"yarn data && TZ=America/Los_Angeles scripts/build-examples.sh","prebuild:examples-full":"yarn build:only","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"yarn build:jekyll && scripts/generate-toc","build:site":"rollup -c site/rollup.config.mjs","build:jekyll":"pushd site && bundle exec jekyll build -q && popd","build:versions":"scripts/update-version.sh","clean":"yarn clean:build && del-cli \'site/data/*\' \'examples/compiled/*.png\' && find site/examples ! -name \'index.md\' ! -name \'data\' -type f -delete","clean:build":"del-cli \'build/*\' !build/vega-lite-schema.json","data":"rsync -r node_modules/vega-datasets/data/* site/data","build-editor-preview":"scripts/build-editor-preview.sh","schema":"mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/","renameschema":"scripts/rename-schema.sh","presite":"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh","site":"yarn site:only","site:only":"pushd site && bundle exec jekyll serve -I -l && popd","prettierbase":"prettier \'**/*.{md,css,yml}\'","format":"eslint . --fix && yarn prettierbase --write","lint":"eslint . && yarn prettierbase --check","test":"yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime","test:cover":"yarn jest --collectCoverage test/","test:inspect":"node --inspect-brk ./node_modules/.bin/jest --runInBand test","test:runtime":"TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json","test:runtime:generate":"yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime","watch":"tsc -p tsconfig.build.json -w","watch:site":"yarn build:site -w","watch:test":"yarn jest --watch test/","watch:test:runtime":"TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json","release":"release-it"},"repository":{"type":"git","url":"https://github.com/vega/vega-lite.git"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/vega/vega-lite/issues"},"devDependencies":{"@babel/core":"^7.26.0","@babel/preset-env":"^7.26.0","@babel/preset-typescript":"^7.26.0","@release-it/conventional-changelog":"^9.0.3","@rollup/plugin-alias":"^5.1.1","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^28.0.1","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.3.0","@rollup/plugin-terser":"^0.4.4","@types/d3":"^7.4.3","@types/jest":"^29.5.14","@types/pako":"^2.0.3","@typescript-eslint/eslint-plugin":"^7.17.0","@typescript-eslint/parser":"^7.17.0","ajv":"^8.17.1","ajv-formats":"^3.0.1","cheerio":"^1.0.0","conventional-changelog-cli":"^5.0.0","d3":"^7.9.0","del-cli":"^6.0.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-jest":"^27.9.0","eslint-plugin-prettier":"^5.2.1","fast-json-stable-stringify":"~2.1.0","highlight.js":"^11.10.0","jest":"^29.7.0","jest-dev-server":"^10.1.4","mkdirp":"^3.0.1","pako":"^2.1.0","prettier":"^3.3.3","puppeteer":"^15.0.0","release-it":"17.10.0","rollup":"^4.27.3","rollup-plugin-bundle-size":"^1.0.3","serve":"^14.2.4","terser":"^5.36.0","ts-jest":"^29.2.5","ts-json-schema-generator":"^2.3.0","typescript":"~5.7.2","vega-cli":"^5.30.0","vega-datasets":"^2.11.0","vega-embed":"^6.28.0","vega-tooltip":"^0.35.2","yaml-front-matter":"^4.1.1"},"dependencies":{"json-stringify-pretty-compact":"~4.0.0","tslib":"~2.8.1","vega-event-selector":"~3.0.1","vega-expression":"~5.1.1","vega-util":"~1.17.2","yargs":"~17.7.2"},"peerDependencies":{"vega":"^5.24.0"},"engines":{"node":">=18"},"packageManager":"yarn@1.22.22"}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{collapseAll:()=>A,expandAll:()=>C,load:()=>N,loadDemo:()=>M,loadFetch:()=>O,loadFile:()=>F,proposeOptimizationLine:()=>m,proposeOptimizationRegion:()=>g,toggleDisplay:()=>R,toggleReduced:()=>S,toggleServiceFields:()=>I,vsNavigate:()=>f});var e=n(48287),t=n(47990),i=n(61684),a=n(16213),o=n(77439),s=n(12672),l=n(43270),u=n(54699),c=n(18047),d=n(21806);function f(e,t){try{acquireVsCodeApi().postMessage({command:"jumpToLine",filePath:e,lineNumber:t})}catch{}}window.Buffer=e.Buffer,window.checkApiKey=u.checkApiKey;const p=50;let h={};function g(e,t,n){(0,o.proposeOptimization)(e,t,JSON.parse(decodeURIComponent(n)),{regions:!0})}function m(e,t,n){(0,o.proposeOptimization)(e,t,JSON.parse(decodeURIComponent(n)),{regions:!1})}const y="blue",v="green",b="goldenrod";let x=[];function E(e,t,n,r,i){let a;a=i.functions?"function profile":"line profile",x=[{title:["time",""],color:y,width:0,info:"Execution time (Python + native + system)"}],r&&(x=x.concat([{title:["memory","peak"],color:v,width:0,info:"Peak amount of memory allocated by line / function"},{title:["memory","average"],color:v,width:0,info:"Average amount of memory allocated by line / function"},{title:["memory","timeline"],color:v,width:0,info:"Memory footprint over time"},{title:["memory","activity"],color:v,width:0,info:"% of bytes allocated by line / function over total bytes allocated in file"},{title:["copy",""],color:b,width:0,info:"Rate of copying memory"}])),t&&(x.push({title:[n,"util."],color:b,width:0,info:`% utilization of ${n} by line / function (may be inaccurate if ${n} is not dedicated)`}),x.push({title:[n,"memory"],color:b,width:0,info:`Peak ${n} memory allocated by line / function (may be inaccurate if ${n} is not dedicated)`})),x.push({title:["",""],color:"black",width:100});let o,s="";s+='',s+='';for(const t of x)s+=``,t.info?s+=`${t.title[0]}`:s+=`${t.title[0]}`,s+="  ";o=i.functions?"functionProfile":"lineProfile",s+=`${a}  (click to reset order)`,s+="",s+='';for(const e of x)s+=`${e.title[1]}`;return s+=`${e}`,s+="",s}function S(){const e=document.getElementsByClassName("empty-profile");for(const t of e){const e=t.style;""==e.display?e.display="none":e.display=""}}function w(e,t,n,r,a,o,u,c,d,f){let g=e.n_cpu_percent_python+e.n_cpu_percent_c+e.n_sys_percent,m=0,y=0,v=0;for(let n=e.start_region_line;n=.01),v|=e.n_gpu_percent>=1}f&&(g<1&&e.start_region_line===e.end_region_line&&(f=!1),e.start_region_line!=e.end_region_line&&m<1&&(f=!1));const x=e.n_avg_mb+e.n_peak_mb+e.memory_samples.length+(e.n_usage_fraction>=.01),E=e.n_gpu_percent>=1,S=e.start_region_line,w=e.end_region_line;let _,A;S===w||[[S-1,w]]in h?(_=l.WhiteExplosion,A=!1):(_=l.Explosion,S&&w&&(h[[S-1,w]]=!0,A=!0)),A&=w-S<=p;let C="";C+=g>1||x||E||A&&S!=w&&(m>=1||y||v)?"":"";if(C+=``,C+=``,g?a.push((0,l.makeBar)(e.n_cpu_percent_python,e.n_cpu_percent_c,e.n_sys_percent,{height:20,width:100})):a.push(null),r.memory){if(C+=``,C+=``,e.n_peak_mb?o.push((0,l.makeMemoryBar)(e.n_peak_mb.toFixed(0),"peak memory",parseFloat(e.n_python_fraction),r.max_footprint_mb.toFixed(2),"darkgreen",{height:20,width:100})):o.push(null),C+=``,C+=``,C+="",e.n_avg_mb?o.push((0,l.makeMemoryBar)(e.n_avg_mb.toFixed(0),"average memory",parseFloat(e.n_python_fraction),r.max_footprint_mb.toFixed(2),"darkgreen",{height:20,width:100})):o.push(null),C+="",C+=``,C+="",e.memory_samples.length>0){let n=0;"leaks"in r.files[t]&&e.lineno in r.files[t].leaks&&(n=r.files[t].leaks[e.lineno].velocity_mb_s),u.push((0,l.makeSparkline)(e.memory_samples,1e9*r.elapsed_time_sec,r.max_footprint_mb,n,{height:20,width:75}))}else u.push(null);C+='',e.n_usage_fraction>=.01?(C+=``,c.push((0,l.makeMemoryPie)(100*e.n_usage_fraction*(1-parseFloat(e.n_python_fraction)),100*e.n_usage_fraction*parseFloat(e.n_python_fraction),{width:30}))):c.push(null),C+="",e.n_copy_mb_s<1?C+='':C+=`${e.n_copy_mb_s.toFixed(0)}   `}if(r.gpu)if(e.n_gpu_percent<1?C+='':(C+=``,C+=``,C+="",d.push((0,l.makeGPUPie)(e.n_gpu_percent,r.gpu_device,{height:20,width:30}))),e.n_gpu_peak_memory_mb<1||e.n_gpu_percent<1)C+='';else{let t=e.n_gpu_peak_memory_mb,n="MB";t>=1024&&(t/=1024,n="GB"),C+=`${t.toFixed(0)}${n}  `}const T=g||x||E||w!=S?"":"empty-profile";C+=`${e.lineno} `;const k=f&&A?`${_} `:`${l.WhiteExplosion} `;e.line=(0,s.unescapeUnicode)(e.line);const R=i.Prism.highlight(e.line,i.Prism.languages.python,"python");C+=``;let D=structuredClone(e);if(f&&A){let e=0;for(let n=S;nD.n_peak_mb&&(D.n_peak_mb=i.n_peak_mb,D.n_python_fraction=i.n_python_fraction),D.n_core_utilization+=(i.n_cpu_percent_python+i.n_cpu_percent_c)*i.n_core_utilization}D.n_copy_mb_s=e/r.elapsed_time_sec,C+=`${k}`}else C+=k;const N=f?`${l.Lightning}`:`${l.WhiteLightning}`;return C+=f?`${N}`:N,C+=`
${R}
`,C+="",C}let _=[];function A(){for(const e of _)T(e)}function C(){for(const e of _)k(e)}function T(e){document.getElementById(`profile-${e}`).style.display="none",document.getElementById(`button-${e}`).innerHTML=l.RightTriangle}function k(e){document.getElementById(`profile-${e}`).style.display="block",document.getElementById(`button-${e}`).innerHTML=l.DownTriangle}function R(e){const t=document.getElementById(`profile-${e}`);"block"==t.style.display?(t.style.display="none",document.getElementById(`button-${e}`).innerHTML=l.RightTriangle):(t.style.display="block",document.getElementById(`button-${e}`).innerHTML=l.DownTriangle)}async function D(e){h={};let n="";n=window.localStorage.getItem("scalene-api-key"),n&&(document.getElementById("api-key").value=n,(0,u.checkApiKey)(n));let r=window.localStorage.getItem("scalene-service-select");r&&(document.getElementById("service-select").value=r,I());const i=document.getElementById("use-gpu-checkbox")||"";i.checked!=e.gpu&&i.click(),e.gpu&&(document.getElementById("accelerator-name").innerHTML=e.gpu_device),globalThis.profile=e;let o=[],c=[],d=[],f=[],p=[],g=0,m="";m+='',m+='',m+='',m+="",m+='',m+='',e.memory&&(m+='',m+='',m+='"),m+="",m+="",m+='',m+="",e.memory&&(m+='',m+="",m+='',o.push((0,l.makeSparkline)(e.samples,1e9*e.elapsed_time_sec,e.max_footprint_mb,0,{height:20,width:200}))),m+="";let y=0,v=0,b=0,x=0,S=0,A={},C={},T={},k={},R={};for(const t in e.files){A[t]=0,C[t]=0,T[t]=0,k[t]=0,R[t]=0;for(const n in e.files[t].lines){const r=e.files[t].lines[n];A[t]+=r.n_cpu_percent_python,C[t]+=r.n_cpu_percent_c,T[t]+=r.n_sys_percent,r.n_peak_mb>R[t]&&(R[t]=r.n_peak_mb,k[t]+=r.n_peak_mb*r.n_python_fraction),S+=r.n_malloc_mb}y+=A[t],v+=C[t],b+=T[t],x+=k[t]}if(d.push((0,l.makeBar)(y,v,b,{height:20,width:200})),e.memory&&p.push((0,l.makeMemoryBar)(e.max_footprint_mb.toFixed(2),"memory",x/S,e.max_footprint_mb.toFixed(2),"darkgreen",{height:20,width:150})),m+='",m+="
Time: Python | native | system
Memory: Python | native
',m+=`Memory timeline: (max: ${(0,s.memory_consumed_str)(e.max_footprint_mb)}, growth: ${e.growth_rate.toFixed(1)}%)`,m+="
',m+='hover over bars to see breakdowns; click on column headers to sort.',m+="
",m+="
",m+="
","{}"===JSON.stringify(e)){m+='\n
\n
\n\t
\n\t \n\t \n\t
\n
\n
\n ';return void(document.getElementById("profile").innerHTML=m)}m+='
 show all | hide all',m+=' | only display profiled lines 
',m+='
';let D=Object.entries(e.files);D.sort(((e,t)=>t[1].percent_cpu_time-e[1].percent_cpu_time));let N=0;_=[];let O=new Set;for(const t of D){if(N++,t[1].percent_cpu_time<1&&R[t[0]]<.01*S){O.add(t);continue}const n=`file-${N}`;_.push(n),m+='

';let r="display:block;",i=l.DownTriangle;1!==N&&(r="display:none;",i=l.RightTriangle),m+=` `,d.push((0,l.makeBar)(A[t[0]],C[t[0]],T[t[0]],{height:20,width:100})),e.memory&&(m+=``,p.push((0,l.makeMemoryBar)(R[t[0]],"peak memory",k[t[0]]/R[t[0]],e.max_footprint_mb.toFixed(2),"darkgreen",{height:20,width:100}))),m+=`% of time = ${t[1].percent_cpu_time.toFixed(1).padWithNonBreakingSpaces(5)}% (${(0,s.time_consumed_str)(t[1].percent_cpu_time/100*e.elapsed_time_sec*1e3).padWithNonBreakingSpaces(8)} / ${(0,s.time_consumed_str)(1e3*e.elapsed_time_sec).padWithNonBreakingSpaces(8)})
`,m+=``,m+=`${i}`,m+="",m+=` ${t[0]}`,m+="

",m+=`
`,m+=``,g++,m+=E(t[0],e.gpu,e.gpu_device,e.memory,{functions:!1}),m+="";let a=-1;for(const n in t[1].lines){const r=t[1].lines[n];0,a=r.lineno,m+=w(r,t[0],N,e,d,p,o,c,f,!0)}if(m+="",m+="
",e.files[t[0]].functions.length){m+=``,m+=E(t[0],e.gpu,e.gpu_device,e.memory,{functions:!0}),m+="",g++;for(const n in e.files[t[0]].functions){m+=w(e.files[t[0]].functions[n],t[0],N,e,d,p,o,c,f,!1)}m+="
"}m+="
",N")}D=D.filter((e=>!O.has(e))),m+="
";document.getElementById("profile").innerHTML=m;for(const e of D){const t=document.getElementsByClassName(`F${escape(e[0])}-nonline`);for(let n=0;n{const t=document.getElementsByClassName(`F${escape(e[0])}-blankline`);for(let e=0;e{const t=document.getElementsByClassName(`F${escape(e[0])}-blankline`);for(let e=0;e{e&&(async()=>{await(0,t.default)(`#${n}${r}`,e,{actions:!1})})()}))}o.forEach(((e,n)=>{e&&(async()=>{await(0,t.default)(`#memory_sparkline${n}`,e,{actions:!1,renderer:"svg"})})()})),F(d,"cpu_bar"),F(f,"gpu_pie"),F(c,"memory_activity"),F(p,"memory_bar"),function(){const e=document.getElementsByClassName("empty-profile");for(const t of e)t.style.display="none"}(),e.program?document.title="Scalene - "+e.program:document.title="Scalene"}function N(e){(async()=>{await D(e)})()}function O(){(async()=>{let e=await fetch("profile.json");N(await e.json())})()}function F(){const e=document.getElementById("fileinput").files[0],t=new FileReader;t.onload=P,t.readAsText(e)}function P(e){let t=e.target.result;N(JSON.parse(t))}function M(){N(example_profile)}function I(){let e=document.getElementById("service-select").value;window.localStorage.setItem("scalene-service-select",e),document.getElementById("openai-fields").style.display="openai"===e?"block":"none",document.getElementById("amazon-fields").style.display="amazon"===e?"block":"none",document.getElementById("local-fields").style.display="local"===e?"block":"none",document.getElementById("azure-openai-fields").style.display="azure-openai"===e?"block":"none"}function $(){document.getElementById("install-models-message").style.display="block",document.getElementById("local-models-list").style.display="none"}String.prototype.padWithNonBreakingSpaces=function(e){let t=" ",n="",r=6*this.length;for(e*=6;r{const t=function(e){const t=document.createElement("select");return t.style.fontSize="0.8rem",t.id="language-model-local",t.classList.add("persistent"),t.name="language-model-local-label",e.forEach((e=>{const n=document.createElement("option");n.value=e,n.textContent=e,n.id=e,t.appendChild(n)})),t}(e),n=document.getElementById("language-local-models");n?(n.innerHTML="",n.appendChild(t)):console.error('Div with ID "language-local-models" not found.')}))}(),document.addEventListener("DOMContentLoaded",(()=>{(0,d.processPersistentElements)()})),(0,d.observeDOM)(),window.addEventListener("load",(()=>{N(profile)})),setInterval((function(){let e=new XMLHttpRequest;e.open("GET","/heartbeat",!0),e.send()}),1e4)})();var i=window;for(var a in r)i[a]=r[a];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})(); +//# sourceMappingURL=scalene-gui-bundle.js.map \ No newline at end of file diff --git a/scalene/scalene-gui/webpack.config.js b/scalene/scalene-gui/webpack.config.js index 04634705e..5b30a9ab2 100644 --- a/scalene/scalene-gui/webpack.config.js +++ b/scalene/scalene-gui/webpack.config.js @@ -1,5 +1,6 @@ const path = require('path'); const webpack = require('webpack'); +const TerserPlugin = require('terser-webpack-plugin'); module.exports = { entry: './scalene-gui.js', @@ -11,30 +12,43 @@ module.exports = { }, resolve: { fallback: { - "crypto": require.resolve("crypto-browserify"), - "stream": require.resolve("stream-browserify"), - "buffer": require.resolve("buffer"), - "util": require.resolve("util"), - "assert": require.resolve("assert"), - "os": require.resolve("os-browserify/browser"), - "http": require.resolve("stream-http"), - "https": require.resolve("https-browserify"), - "url": require.resolve("url/"), - "zlib": require.resolve("browserify-zlib"), - "path": require.resolve("path-browserify"), - "fs": false, + crypto: require.resolve('crypto-browserify'), + stream: require.resolve('stream-browserify'), + buffer: require.resolve('buffer'), + util: require.resolve('util'), + assert: require.resolve('assert'), + os: require.resolve('os-browserify/browser'), + http: require.resolve('stream-http'), + https: require.resolve('https-browserify'), + url: require.resolve('url/'), + zlib: require.resolve('browserify-zlib'), + path: require.resolve('path-browserify'), + fs: false, }, }, plugins: [ new webpack.ProvidePlugin({ process: 'process/browser', }), + new webpack.DefinePlugin({ + 'process.env.LANG': JSON.stringify('en_US.UTF-8'), + }), ], optimization: { - minimize: true, // Enable minimization - usedExports: false, // Disable tree shaking - sideEffects: false, // Include all files, assuming they have side effects - concatenateModules: false, // Disable module concatenation (scope hoisting) - innerGraph: false, // Disable inner graph analysis + minimize: true, + minimizer: [ + new TerserPlugin({ + terserOptions: { + output: { + ascii_only: true, // Escape non-ASCII characters + }, + }, + }), + ], + usedExports: false, + sideEffects: false, + concatenateModules: false, + innerGraph: false, }, + devtool: 'source-map', // Enable debugging via source maps }; diff --git a/scalene/scalene_utility.py b/scalene/scalene_utility.py index 2d06e5257..5aaac89bd 100644 --- a/scalene/scalene_utility.py +++ b/scalene/scalene_utility.py @@ -110,12 +110,26 @@ def read_file_content( directory: str, subdirectory: str, filename: str ) -> str: file_path = os.path.join(directory, subdirectory, filename) - return pathlib.Path(file_path).read_text() + file_content = "" + try: + file_content = pathlib.Path(file_path).read_text(encoding="utf-8") + except UnicodeDecodeError as e: + raise UnicodeDecodeError( + f"Failed to decode file {file_path}. Ensure the file is UTF-8 encoded." + ) from e + return file_content try: # Load the profile profile_file = pathlib.Path(profile_fname) - profile = profile_file.read_text() + profile = "" + try: + profile = profile_file.read_text(encoding="utf-8") + except UnicodeDecodeError as e: + raise UnicodeDecodeError( + f"Failed to decode file {profile_file}. Ensure the file is UTF-8 encoded." + ) from e + except FileNotFoundError: assert profile_fname == "demo" profile = ""