diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index 1625c00f..1e2c300e 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -1,6 +1,6 @@ name: app -# Tests the Impulse App in apps/adhoc-reporting/. Not a required check, and it runs only on PRs that +# Tests the Impulse App in apps/adhoc-reporting/. The test job runs only on PRs that # change the app: Codecov (require_ci_to_pass) holds back its status while any other check fails, so # an app check on framework PRs would affect the framework's CI. Framework changes (src/) run it # once they are on main, where the contract tests build the app's generated notebooks against the @@ -8,9 +8,6 @@ name: app on: pull_request: types: [ opened, synchronize, ready_for_review ] - paths: - - 'apps/adhoc-reporting/**' - - '.github/workflows/app.yml' push: branches: - main @@ -37,9 +34,29 @@ jobs: steps: - run: echo "Not a fork PR, proceeding" + changes: + needs: not-a-fork + runs-on: + group: databrickslabs-protected-runner-group + labels: linux-ubuntu-latest + outputs: + app: ${{ steps.diff.outputs.app }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 2 + + - name: Does the PR change the app? + id: diff + run: | + if [ "$GITHUB_EVENT_NAME" = pull_request ] && git diff --quiet HEAD^ HEAD -- apps/adhoc-reporting .github/workflows/app.yml; then + echo "app=false" >> "$GITHUB_OUTPUT" + fi + test: name: Test the app - needs: not-a-fork + needs: [ not-a-fork, changes ] + if: ${{ !cancelled() && needs.not-a-fork.result != 'skipped' && needs.changes.outputs.app != 'false' }} runs-on: group: databrickslabs-protected-runner-group labels: linux-ubuntu-latest @@ -79,3 +96,11 @@ jobs: - name: Build the frontend run: make frontend + + - name: The committed frontend matches its source + run: | + if [ -n "$(git status --porcelain -- frontend/dist)" ]; then + git status --short -- frontend/dist + echo "::error::frontend/dist doesn't match frontend/src. Run 'make frontend' in apps/adhoc-reporting and commit frontend/dist." + exit 1 + fi diff --git a/apps/adhoc-reporting/.gitignore b/apps/adhoc-reporting/.gitignore index 466c1b0b..4724d5a8 100644 --- a/apps/adhoc-reporting/.gitignore +++ b/apps/adhoc-reporting/.gitignore @@ -8,7 +8,7 @@ node_modules/ CLAUDE.md .databricks/ .vscode/ -frontend/dist/ +!frontend/dist/ *.tsbuildinfo .isaac/ .env diff --git a/apps/adhoc-reporting/README.md b/apps/adhoc-reporting/README.md index 3803de9a..1bbf8db5 100644 --- a/apps/adhoc-reporting/README.md +++ b/apps/adhoc-reporting/README.md @@ -32,10 +32,13 @@ Run the commands from this folder. `make test` needs no workspace. The other tar | `make smoke` | Runs the fixture report on serverless without writing gold tables | | `make smoke-persist` | Same, but writes the fixture report's gold tables, which `make live` reads | | `make eval` | Runs the assistant scenarios against FMAPI | +| `make frontend` | Builds the frontend into `frontend/dist/` | | `make deploy` | Builds the frontend and deploys the app (commit the app first) | | `make logs` | Shows the app logs | | `make lock` | Updates `uv.lock` and `requirements.txt`, keeping both lockfiles on the public registries | +The built frontend in `frontend/dist/` is committed, so deployments need neither Node.js nor access to the npm registry. After changing `frontend/`, run `make frontend` and commit the rebuilt `frontend/dist/` with the change. CI fails when the two differ, and `make deploy` refuses to deploy until the rebuild is committed. + ## Updating Impulse ``` diff --git a/apps/adhoc-reporting/databricks.yml b/apps/adhoc-reporting/databricks.yml index 55d519f1..35ebc33d 100644 --- a/apps/adhoc-reporting/databricks.yml +++ b/apps/adhoc-reporting/databricks.yml @@ -30,7 +30,6 @@ resources: impulse_app: name: ${var.app_name} description: Impulse report builder - source_code_path: . user_api_scopes: - sql - workspace.workspace @@ -52,3 +51,17 @@ targets: default: true workspace: root_path: /Workspace/Users/${workspace.current_user.userName}/.bundle/${bundle.name}/${bundle.target} + resources: + apps: + impulse_app: + source_code_path: . + github: + resources: + apps: + impulse_app: + git_repository: + url: https://github.com/databrickslabs/impulse + provider: gitHub + git_source: + commit: ${bundle.git.commit} + source_code_path: ${bundle.git.bundle_root_path} diff --git a/apps/adhoc-reporting/frontend/dist/assets/index-Bnk2zU0V.js b/apps/adhoc-reporting/frontend/dist/assets/index-Bnk2zU0V.js new file mode 100644 index 00000000..23e431a8 --- /dev/null +++ b/apps/adhoc-reporting/frontend/dist/assets/index-Bnk2zU0V.js @@ -0,0 +1,19 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function ee(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var x=ee.prototype=new b;x.constructor=ee,_(x,y.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function te(){}var C={H:null,A:null,T:null,S:null},ne=Object.prototype.hasOwnProperty;function w(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function re(e,t){return w(e.type,t,e.props)}function ie(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ae(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var oe=/\/+/g;function se(e,t){return typeof e==`object`&&e&&e.key!=null?ae(``+e.key):t.toString(36)}function ce(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(te,te):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function le(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,le(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+se(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(oe,`$&/`)+`/`),le(o,r,i,``,function(e){return e})):o!=null&&(ie(o)&&(o=re(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(oe,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function ee(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,x||(x=!0,re());else{var t=n(l);t!==null&&oe(ee,t.startTime-e)}}}var x=!1,S=-1,te=5,C=-1;function ne(){return g?!0:!(e.unstable_now()-Ct&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&oe(ee,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?re():x=!1}}}var re;if(typeof y==`function`)re=function(){y(w)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=w,re=function(){ae.postMessage(null)}}else re=function(){_(w,0)};function oe(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,oe(ee,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,x||(x=!0,re()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1De||(e.current=Ee[De],Ee[De]=null,De--)}function O(e,t){De++,Ee[De]=e.current,e.current=t}var Ae=Oe(null),je=Oe(null),Me=Oe(null),Ne=Oe(null);function Pe(e,t){switch(O(Me,t),O(je,e),O(Ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ke(Ae),O(Ae,e)}function Fe(){ke(Ae),ke(je),ke(Me)}function Ie(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,O(Ne,e)),t=Ae.current;var n=dp(t,e.type);t!==n&&(O(je,e),O(Ae,n))}function Le(e){je.current===e&&(ke(Ae),ke(je)),Ne.current===e&&(ke(Ne),sh._currentValue=Te)}var Re,ze;function Be(e){if(Re===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Re=t&&t[1]||``,ze=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Be(n):``}function Ue(e,t){switch(e.tag){case 26:case 27:case 5:return Be(e.type);case 16:return Be(`Lazy`);case 13:return e.child!==t&&t!==null?Be(`Suspense Fallback`):Be(`Suspense`);case 19:return Be(`SuspenseList`);case 0:case 15:return He(e.type,!1);case 11:return He(e.type.render,!1);case 1:return He(e.type,!0);case 31:return Be(`Activity`);case 30:return Be(`ViewTransition`);default:return``}}function We(e){try{var t=``,n=null;do t+=Ue(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var Ge=Object.prototype.hasOwnProperty,Ke=t.unstable_scheduleCallback,qe=t.unstable_cancelCallback,Je=t.unstable_shouldYield,Ye=t.unstable_requestPaint,Xe=t.unstable_now,Ze=t.unstable_getCurrentPriorityLevel,Qe=t.unstable_ImmediatePriority,$e=t.unstable_UserBlockingPriority,et=t.unstable_NormalPriority,tt=t.unstable_LowPriority,nt=t.unstable_IdlePriority,rt=t.log,it=t.unstable_setDisableYieldValue,at=null,ot=null;function st(e){if(typeof rt==`function`&&it(e),ot&&typeof ot.setStrictMode==`function`)try{ot.setStrictMode(at,e)}catch{}}var ct=Math.clz32?Math.clz32:dt,lt=Math.log,ut=Math.LN2;function dt(e){return e>>>=0,e===0?32:31-(lt(e)/ut|0)|0}var ft=256,pt=262144,mt=4194304;function ht(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ht(n))):i=ht(o):i=ht(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ht(n))):i=ht(o)):i=ht(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function _t(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function St(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ct(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=_r),br=` `,xr=!1;function Sr(e,t){switch(e){case`keyup`:return hr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Cr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var wr=!1;function Tr(e,t){switch(e){case`compositionend`:return Cr(t);case`keypress`:return t.which===32?(xr=!0,br):null;case`textInput`:return e=t.data,e===br&&xr?null:e;default:return null}}function Er(e,t){if(wr)return e===`compositionend`||!gr&&Sr(e,t)?(e=Rn(),Ln=In=Fn=null,wr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Yr(n)}}function Zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Jr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Jr(e.document)}return t}function $r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var ei=Mn&&`documentMode`in document&&11>=document.documentMode,ti=null,ni=null,ri=null,ii=!1;function ai(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ii||ti==null||ti!==Jr(r)||(r=ti,`selectionStart`in r&&$r(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ri&&qr(ri,r)||(ri=r,r=Jf(ni,`onSelect`),0>=o,i-=o,ta=1<<32-ct(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),I&&ra(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),I&&ra(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return I&&ra(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),I&&ra(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===oe&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ie:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===oe){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),po(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===me&&ao(l)===r.type){n(e,r.sibling),c=a(r,o.props),po(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===oe?(c=Hi(o.props.children,e.mode,c,o.key),po(c,o),c.return=e,e=c):(c=Vi(o.type,o.key,o.props,null,e.mode,c),po(c,o),c.return=e,e=c)}return s(e);case ae:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Gi(o,e.mode,c),c.return=e,e=c}return s(e);case me:return o=ao(o),_(e,r,o,c)}if(we(o))return h(e,r,o,c);if(xe(o)){if(l=xe(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,fo(o),c);if(o.$$typeof===ue)return _(e,r,Aa(e,o),c);mo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{uo=0;var i=_(e,t,n,r);return lo=null,i}catch(t){if(t===$a||t===to)throw t;var a=Li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var go=ho(!0),_o=ho(!1),vo=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function So(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Pi(e),Ni(e,null,n),t}return Ai(e,r,t,n),Pi(e)}function Co(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Tt(e,n)}}function wo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var To=!1;function Eo(){if(To){var e=Wa;if(e!==null)throw e}}function Do(e,t,n,r){To=!1;var i=e.updateQueue;vo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(q&f)===f:(r&f)===f){f!==0&&f===Ua&&(To=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=w({},d,f);break a;case 2:vo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),sd|=o,e.lanes=o,e.memoizedState=d}}function Oo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ko(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=E.T,s={};s.types=o===null?null:o.types,E.T=s,pc(e,!1,t,n);try{var c=i(),l=E.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?fc(e,t,qa(c,r),jd(e)):fc(e,t,r,jd(e))}catch(n){fc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{D.p=a,o!==null&&s.types!==null&&(o.types=s.types),E.T=o}}function nc(){}function rc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ic(e).queue;tc(e,a,t,Te,n===null?nc:function(){return ac(e),n(r)})}function ic(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Te,baseState:Te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:Te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ac(e){var t=ic(e);t.next===null&&(t=e.alternate.memoizedState),fc(e,t.next.queue,{},jd())}function oc(){return ka(sh)}function sc(){return B().memoizedState}function cc(){return B().memoizedState}function lc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=xo(n);var r=So(t,e,n);r!==null&&(Pd(r,t,n),Co(r,t,n)),t={cache:Ia()},e.payload=t;return}t=t.return}}function uc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},mc(e)?hc(t,n):(n=ji(e,t,n,r),n!==null&&(Pd(n,e,r),gc(n,t,r)))}function dc(e,t,n){fc(e,t,n,jd())}function fc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(mc(e))hc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Kr(s,o))return Ai(e,t,i,0),G===null&&ki(),!1}catch{}if(n=ji(e,t,i,r),n!==null)return Pd(n,e,r),gc(n,t,r),!0}return!1}function pc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},mc(e)){if(t)throw Error(i(479))}else t=ji(e,n,r,2),t!==null&&Pd(t,e,2)}function mc(e){var t=e.alternate;return e===L||t!==null&&t===L}function hc(e,t){Yo=Jo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Tt(e,n)}}var _c={readContext:ka,use:fs,useCallback:z,useContext:z,useEffect:z,useImperativeHandle:z,useLayoutEffect:z,useInsertionEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useSyncExternalStore:z,useId:z,useHostTransitionStatus:z,useFormState:z,useActionState:z,useOptimistic:z,useMemoCache:z,useCacheRefresh:z,useEffectEvent:z},vc={readContext:ka,use:fs,useCallback:function(e,t){return ls().memoizedState=[e,t===void 0?null:t],e},useContext:ka,useEffect:Hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Bs(4194308,4,Js.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bs(4194308,4,e,t)},useInsertionEffect:function(e,t){Bs(4,2,e,t)},useMemo:function(e,t){var n=ls();t=t===void 0?null:t;var r=e();if(Xo){st(!0);try{e()}finally{st(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ls();if(n!==void 0){var i=n(t);if(Xo){st(!0);try{n(t)}finally{st(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=uc.bind(null,L,e),[r.memoizedState,e]},useRef:function(e){var t=ls();return e={current:e},t.memoizedState=e},useState:function(e){e=ws(e);var t=e.queue,n=dc.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xs,useDeferredValue:function(e,t){return $s(ls(),e,t)},useTransition:function(){var e=ws(!1);return e=tc.bind(null,L,e.queue,!0,!1),ls().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,a=ls();if(I){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),G===null)throw Error(i(349));q&127||ys(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Hs(xs.bind(null,r,o,e),[e]),r.flags|=2048,Rs(9,{destroy:void 0},bs.bind(null,r,o,n,t),null),n},useId:function(){var e=ls(),t=G.identifierPrefix;if(I){var n=na,r=ta;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Zo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[k]=t,o[Mt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&gl(t)}}return V(t),t.subtreeFlags&=-33554433,_l(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Me.current,ha(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ca,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[k]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||fa(t,!0)}else e=lp(e).createTextNode(r),e[k]=t,t.stateNode=e}return V(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ha(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[k]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;V(t),e=!1}else n=_a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Vo(t),t):(Vo(t),null);if(t.flags&128)throw Error(i(558))}return V(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ha(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[k]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;V(t),a=!1}else a=_a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Vo(t),t):(Vo(t),null)}return Vo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),yl(t,t.updateQueue),V(t),null);case 4:return Fe(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,V(t),null;case 10:return Ca(t.type),V(t),null;case 19:if(Wo(t),r=t.memoizedState,r===null)return V(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)bl(r,!1);else{if(Y!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Go(e),o!==null){for(t.flags|=128,bl(r,!1),e=o.updateQueue,t.updateQueue=e,yl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Bi(n,e),n=n.sibling;return Uo(t,Ho.current&1|2),I&&ra(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Xe()>_d&&(t.flags|=128,a=!0,bl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Go(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,yl(t,e),bl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!I)return V(t),null}else 2*Xe()-r.renderingStartTime>_d&&n!==536870912&&(t.flags|=128,a=!0,bl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Xe(),e.sibling=null,o=Ho.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||I?Uo(t,o):(n=o,O(Fo,t),O(Ho,n),Io===null&&(Io=t)),I&&ra(t,r.treeForkCount),e}return V(t),null;case 22:case 23:return Vo(t),Po(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(V(t),t.subtreeFlags&6&&(t.flags|=8192)):V(t),n=t.updateQueue,n!==null&&yl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ke(Ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ca(Fa),V(t),null;case 25:return null;case 30:return t.flags|=33554432,V(t),null}throw Error(i(156,t.tag))}function Sl(e,t){switch(oa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ca(Fa),Fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Le(t),null;case 31:if(t.memoizedState!==null){if(Vo(t),t.alternate===null)throw Error(i(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Vo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Wo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Fe(),null;case 10:return Ca(t.type),null;case 22:case 23:return Vo(t),Po(),e!==null&&ke(Ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ca(Fa),null;case 25:return null;default:return null}}function Cl(e,t){switch(oa(t),t.tag){case 3:Ca(Fa),Fe();break;case 26:case 27:case 5:Le(t);break;case 4:Fe();break;case 31:t.memoizedState!==null&&Vo(t);break;case 13:Vo(t);break;case 19:Wo(t);break;case 10:Ca(t.type);break;case 22:case 23:Vo(t),Po(),e!==null&&ke(Ya);break;case 24:Ca(Fa)}}function wl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Tl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function El(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ko(t,n)}catch(t){Z(e,e.return,t)}}}function Dl(e,t,n){n.props=Tc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Ol(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=Si(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);h(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function kl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Al(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),np(r,t,n),r[k]=e,j(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Xr(s,h),v=Xr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,E.T=null,n=wd,wd=null;var o=bd,s=Sd;if(X=0,xd=bd=null,Sd=0,W&6)throw Error(i(331));var c=W;if(W|=4,Zu(o.current),Uu(o,o.current,s,n),W=c,Df(0,!1),ot&&typeof ot.onPostCommitFiberRoot==`function`)try{ot.onPostCommitFiberRoot(at,o)}catch{}return!0}finally{D.p=a,E.T=r,uf(e,t)}}function pf(e,t,n){t=qi(n,t),t=jc(e.stateNode,t,2),e=So(e,t,2),e!==null&&(St(e,2),Ef(e))}function Z(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(yd===null||!yd.has(r))){e=qi(n,e),n=Mc(2),r=So(t,n,2),r!==null&&(Nc(n,r,t,e),St(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new td;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ad=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,G===e&&(q&n)===n&&(Y===4||Y===3&&(q&62914560)===q&&300>Xe()-hd?W&2?ld|=n:Vd(e,0):ld|=n,dd===q&&(dd=0)),Ef(e)}function gf(e,t){t===0&&(t=bt()),e=Mi(e,t),e!==null&&(St(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return Ke(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ct(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=q,a=gt(r,r===G?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||_t(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=Xe(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}X!==0&&X!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=cn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),j(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+cn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+cn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+cn(n.imageSizes)+`"]`)):i+=`[href="`+cn(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=w({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Rt]=!0,o.onload=o.onerror=function(){Wt(o)}),j(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+cn(r)+`"][href="`+cn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=w({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),j(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Ut(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=w({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);j(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Ut(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=w({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),j(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Ut(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=w({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),j(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=Me.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Ut(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Ut(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Ut(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+cn(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Rt]){r.loading=1;return}}else t=e.createElement(`link`),t[Rt]=!0,t.onload=t.onerror=Wt.bind(null,t),np(t,`link`,n),j(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+cn(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+cn(n.href)+`"]`);if(r)return t.instance=r,j(r),r;var a=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),j(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,j(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),j(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,j(a),a):(r=n,(a=vm.get(o))&&(r=w({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),j(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,j(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),j(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=u(),v=g(),y=class extends Error{status;code;constructor(e,t,n){super(n),this.status=e,this.code=t}};async function b(e,t,n,r){let i=await fetch(t,{method:e,headers:n===void 0?void 0:{"Content-Type":`application/json`},body:n===void 0?void 0:JSON.stringify(n),signal:r}),a=await i.json().catch(()=>null);if(!i.ok){let e=Array.isArray(a?.detail)?a.detail.map(e=>`${(e.loc??[]).slice(1).join(`.`)}: ${e.msg}`).join(`; `):a?.detail;throw new y(i.status,a?.error?.code??`http_error`,a?.error?.message??e??i.statusText)}return a}var ee=e=>new URLSearchParams(e).toString(),x=e=>`/api/reports/${encodeURIComponent(e)}`,S={me:()=>b(`GET`,`/api/meta/me`),warmup:()=>b(`POST`,`/api/meta/warmup`),reports:()=>b(`GET`,`/api/reports`).then(e=>e.reports),createReport:(e,t)=>b(`POST`,`/api/reports`,{name:e,description:t}),report:e=>b(`GET`,x(e)),saveReport:e=>b(`PUT`,x(e.name),e),deleteReport:e=>b(`DELETE`,x(e)),check:(e,t)=>b(`POST`,`${x(e.name)}/check`,e,t).then(e=>e.issues),catalogs:()=>b(`GET`,`/api/data/catalogs`).then(e=>e.catalogs),schemas:e=>b(`GET`,`/api/data/schemas?${ee({catalog:e})}`).then(e=>e.schemas),source:(e,t)=>b(`GET`,`/api/data/source?${ee({catalog:e,schema:t})}`),uuts:(e,t)=>b(`GET`,`/api/data/uuts?${ee({catalog:e,schema:t})}`),channels:(e,t,n,r)=>b(`POST`,`/api/data/channels`,{catalog:e,schema:t,uuts:n,window:r}),preflight:e=>b(`POST`,`${x(e)}/preflight`),grant:e=>b(`POST`,`${x(e)}/grants`),run:e=>b(`POST`,`${x(e)}/runs`),runs:e=>b(`GET`,`${x(e)}/runs`).then(e=>e.runs),runDetail:(e,t)=>b(`GET`,`${x(e)}/runs/${t}`),cancelRun:(e,t)=>b(`POST`,`${x(e)}/runs/${t}/cancel`),results:e=>b(`GET`,`${x(e)}/results`),chatStart:(e,t)=>b(`POST`,`/api/chat/turns`,{message:e,report:t}),chatEvents:(e,t)=>b(`GET`,`/api/chat/turns/${e}?${ee({after:String(t)})}`),chatHistory:e=>b(`GET`,`/api/chat/history${e?`?${ee({report:e})}`:``}`).then(e=>e.messages),chatClear:e=>b(`DELETE`,`/api/chat/history${e?`?${ee({report:e})}`:``}`),model:()=>b(`GET`,`/api/data/model`),checkModel:(e,t,n)=>b(`POST`,`/api/data/model/check`,{yaml:e,catalog:t,schema:n}),saveModel:e=>b(`PUT`,`/api/data/model`,{yaml:e}),settings:()=>b(`GET`,`/api/settings`),saveSettings:e=>b(`PUT`,`/api/settings`,e),settingsOptions:()=>b(`GET`,`/api/settings/options`)},te=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function C(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:te(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var ne=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},w=e=>{let t=ne(e);return t.charAt(0).toUpperCase()+t.slice(1)},re=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ie={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function ae(e){return e!=null}function oe(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??ie.width,a=e.size??e.height??ie.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?re(...c):re(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??ie[`stroke-width`])*Number(e.size??e.width??ie.width)/Number(t.size??t.width??ie.width):t.strokeWidth??ie[`stroke-width`];return[`svg`,{...Object.entries(ie).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&ae(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&ae(t.width)&&{[r(`width`)]:t.width},...`height`in t&&ae(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function se(e,t={}){return oe(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var ce=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},le=(0,_.createContext)({}),ue=()=>(0,_.useContext)(le),de=(0,_.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:v=`currentColor`,className:y=``}=ue()??{},b=!!c||ce(d),[ee,x,S=[]]=se(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:re(y,s),hasA11yProp:b,attributes:d});return(0,_.createElement)(ee,{ref:f,...x},[...S.map(([e,t])=>(0,_.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function T(e,t=[],n=[]){let r=typeof e==`string`?C(e,t,n):e,i=(0,_.forwardRef)(({className:e,...t},n)=>(0,_.createElement)(de,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=w(r.name)),i}var fe={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};fe.node;var pe=T(fe),me={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};me.node;var he=T(me),ge={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};ge.node;var _e=T(ge),ve={name:`box`,size:24,node:[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]};ve.node;var ye=T(ve),be={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};be.node;var xe=T(be),Se={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Se.node;var Ce=T(Se),we={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};we.node;var E=T(we),D={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};D.node;var Te=T(D),Ee={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};Ee.node;var De=T(Ee),Oe={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};Oe.node;var ke=T(Oe),O={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};O.node;var Ae=T(O),je={name:`crosshair`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]};je.node;var Me=T(je),Ne={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};Ne.node;var Pe=T(Ne),Fe={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Fe.node;var Ie=T(Fe),Le={name:`file-chart-column`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 18v-1`,key:`zg0ygc`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`M16 18v-3`,key:`j5jt4h`}]],aliases:[`file-bar-chart-2`]};Le.node;var Re=T(Le),ze={name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]};ze.node;var Be=T(ze),Ve={name:`grid-3x3`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]],aliases:[`grid`,`grid-3-x-3`]};Ve.node;var He=T(Ve),Ue={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};Ue.node;var We=T(Ue),Ge={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};Ge.node;var Ke=T(Ge),qe={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};qe.node;var Je=T(qe),Ye={name:`panel-right-close`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]};Ye.node;var Xe=T(Ye),Ze={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]};Ze.node;var Qe=T(Ze),$e={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};$e.node;var et=T($e),tt={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};tt.node;var nt=T(tt),rt={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};rt.node;var it=T(rt),at={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};at.node;var ot=T(at),st={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};st.node;var ct=T(st),lt={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};lt.node;var ut=T(lt),dt={name:`sigma`,size:24,node:[[`path`,{d:`M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2`,key:`wuwx1p`}]]};dt.node;var ft=T(dt),pt={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};pt.node;var mt=T(pt),ht={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};ht.node;var gt=T(ht),_t={name:`stethoscope`,size:24,node:[[`path`,{d:`M11 2v2`,key:`1539x4`}],[`path`,{d:`M5 2v2`,key:`1yf1q8`}],[`path`,{d:`M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1`,key:`rb5t3r`}],[`path`,{d:`M8 15a6 6 0 0 0 12 0v-3`,key:`x18d4x`}],[`circle`,{cx:`20`,cy:`10`,r:`2`,key:`ts1r5v`}]]};_t.node;var vt=T(_t),yt={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};yt.node;var bt=T(yt),xt={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};xt.node;var St=T(xt),Ct={name:`waves-horizontal`,size:24,node:[[`path`,{d:`M2 12q2.5 2 5 0t5 0 5 0 5 0`,key:`8ddzzs`}],[`path`,{d:`M2 19q2.5 2 5 0t5 0 5 0 5 0`,key:`1wj4st`}],[`path`,{d:`M2 5q2.5 2 5 0t5 0 5 0 5 0`,key:`69x50u`}]],aliases:[`waves`]};Ct.node;var wt=T(Ct),Tt={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Tt.node;var Et=T(Tt),Dt=[`min`,`max`,`mean`,`median`,`start`,`end`],Ot=[{key:`data`,label:`Data`},{key:`uuts`,label:`Units under test`},{key:`signals`,label:`Signals`},{key:`aggregations`,label:`Aggregations`},{key:`run`,label:`Review & run`}];function kt(e,t){let[n,r]=(0,_.useState)({loading:!0}),[i,a]=(0,_.useState)(0);(0,_.useEffect)(()=>{let t=e();if(!t){r({loading:!1});return}let n=!0;return r(e=>({data:e.data,loading:!0})),t.then(e=>n&&r({data:e,loading:!1}),e=>n&&r({error:e,loading:!1})),()=>{n=!1}},[...t,i]);let o=(0,_.useCallback)(()=>a(e=>e+1),[]);return{...n,reload:o}}function At(e){let[,t,n,r]=e.replace(/^#/,``).split(`/`);if(t===`r`&&n){let e=Ot.some(e=>e.key===r);return{page:`report`,name:decodeURIComponent(n),step:e?r:`data`}}return t===`data-model`?{page:`data-model`}:{page:`home`}}function jt(){let[e,t]=(0,_.useState)(()=>At(window.location.hash));return(0,_.useEffect)(()=>{let e=()=>t(At(window.location.hash));return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),e}var k=(e,t=`data`)=>`#/r/${encodeURIComponent(e)}/${t}`;function Mt(e){if(!e)return``;let t=(new Date(e).getTime()-Date.now())/1e3,n=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});for(let[e,r]of[[`day`,86400],[`hour`,3600],[`minute`,60]])if(Math.abs(t)>=r)return n.format(Math.round(t/r),e);return`just now`}var Nt=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),A=o(((e,t)=>{t.exports=Nt()}))(),Pt=(0,_.createContext)(null),Ft={};function It(){let e=(0,_.useContext)(Pt);if(!e)throw Error(`useReport must be used inside ReportProvider`);return e}function Lt(e){let{issues:t}=It(),n=(t??[]).filter(t=>t.step===e);return{all:n,general:n.filter(e=>!e.item).map(e=>e.message),of:e=>n.filter(t=>t.item===e).map(e=>e.message)}}function Rt({initial:e,children:t}){let[n,r]=(0,_.useState)(e),[i,a]=(0,_.useState)(`idle`),[o,s]=(0,_.useState)(),[c,l]=(0,_.useState)(),u=(0,_.useRef)(e),d=(0,_.useRef)(e.revision),f=(0,_.useRef)(void 0),p=(0,_.useRef)(!1),m=(0,_.useRef)(!1),h=(0,_.useRef)(!0),g=(0,_.useRef)(Promise.resolve()),v=(0,_.useCallback)(()=>(window.clearTimeout(f.current),f.current=void 0,p.current?(m.current=!0,g.current):(p.current=!0,a(`saving`),g.current=(async()=>{try{let e=await S.saveReport({...u.current,revision:d.current});d.current=e.revision,h.current=!0,a(`saved`)}catch(e){h.current=!1,m.current=!1,e instanceof y&&e.status===409?a(`conflict`):(a(`error`),s(e.message))}finally{p.current=!1,m.current&&(m.current=!1,v())}})(),g.current)),[]),b=(0,_.useCallback)(async()=>{for(;f.current!==void 0||p.current;)await(f.current===void 0?g.current:v());return h.current},[v]),ee=(0,_.useCallback)(e=>{let t=e(u.current);u.current=t,r(t),window.clearTimeout(f.current),f.current=window.setTimeout(()=>void v(),1e3)},[v]);return(0,_.useEffect)(()=>{let e=new AbortController,t=window.setTimeout(()=>{S.check(n,e.signal).then(l,e=>{e.name!==`AbortError`&&l([{step:`data`,item:``,message:e.message}])})},400);return()=>{window.clearTimeout(t),e.abort()}},[n]),(0,_.useEffect)(()=>(Ft.report=e.name,Ft.flush=b,()=>{Ft.flush===b&&(Ft.report=void 0,Ft.flush=void 0),f.current!==void 0&&v()}),[v,b,e.name]),(0,A.jsx)(Pt.Provider,{value:{spec:n,update:ee,save:i,saveError:o,issues:c,flushNow:b},children:t})}var zt=/(\*\*[^*]+\*\*|`[^`]+`|\[[^\]]+\]\(https?:\/\/[^)\s]+\))/g;function Bt(e){return e.split(zt).map((e,t)=>{if(e.startsWith(`**`)&&e.endsWith(`**`)&&e.length>4)return(0,A.jsx)(`strong`,{children:e.slice(2,-2)},t);if(e.startsWith("`")&&e.endsWith("`")&&e.length>2)return(0,A.jsx)(`code`,{children:e.slice(1,-1)},t);let n=e.match(/^\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)$/);return n?(0,A.jsx)(`a`,{href:n[2],target:`_blank`,rel:`noreferrer`,children:n[1]},t):(0,A.jsx)(_.Fragment,{children:e},t)})}function Vt(e,t){if(e.every(e=>/^\s*[-*] /.test(e)))return(0,A.jsx)(`ul`,{children:e.map((e,t)=>(0,A.jsx)(`li`,{children:Bt(e.replace(/^\s*[-*] /,``))},t))},t);if(e.every(e=>/^\s*\d+\. /.test(e)))return(0,A.jsx)(`ol`,{children:e.map((e,t)=>(0,A.jsx)(`li`,{children:Bt(e.replace(/^\s*\d+\. /,``))},t))},t);if(e.length>=2&&e.every(e=>e.trim().startsWith(`|`))){let n=e.filter(e=>!/^\s*\|[\s:|-]+\|\s*$/.test(e)).map(e=>e.trim().replace(/^\||\|$/g,``).split(`|`).map(e=>e.trim()));return(0,A.jsx)(`table`,{children:(0,A.jsx)(`tbody`,{children:n.map((e,t)=>(0,A.jsx)(`tr`,{children:e.map((e,n)=>t===0?(0,A.jsx)(`th`,{children:Bt(e)},n):(0,A.jsx)(`td`,{children:Bt(e)},n))},t))})},t)}let n=e.length===1&&e[0].match(/^#{1,4}\s+(.*)$/);return n?(0,A.jsx)(`p`,{className:`md-heading`,children:Bt(n[1])},t):(0,A.jsx)(`p`,{children:e.map((e,t)=>(0,A.jsxs)(_.Fragment,{children:[t>0&&(0,A.jsx)(`br`,{}),Bt(e)]},t))},t)}function Ht({text:e}){let t=e.split(/```[a-zA-Z0-9]*\n?/),n=[];return t.forEach((e,t)=>{if(t%2==1){n.push((0,A.jsx)(`pre`,{className:`md-code`,children:e.replace(/\n$/,``)},`c${t}`));return}let r=[],i=()=>{r.length&&n.push(Vt(r,n.length)),r=[]};for(let t of e.split(` +`))t.trim()?(r.length&&/^\s*([-*]|\d+\.) /.test(t)!==/^\s*([-*]|\d+\.) /.test(r[0])&&i(),r.push(t)):i();i()}),(0,A.jsx)(`div`,{className:`md`,children:n})}var Ut=`impulse.chat`,j=320,Wt=360,Gt=[`n`,`s`,`e`,`w`,`ne`,`nw`,`se`,`sw`],Kt=e=>new Promise(t=>window.setTimeout(t,e));function qt(){let e=Math.min(600,window.innerHeight-120);return{mode:`closed`,last:`open`,geometry:{x:window.innerWidth-420-24,y:window.innerHeight-e-24,w:420,h:e},dockWidth:420}}function Jt(e){let t=Math.min(Math.max(e.w,j),window.innerWidth-16),n=Math.min(Math.max(e.h,Wt),window.innerHeight-16);return{w:t,h:n,x:Math.min(Math.max(e.x,8),window.innerWidth-t-8),y:Math.min(Math.max(e.y,8),window.innerHeight-n-8)}}function Yt(){try{let e={...qt(),...JSON.parse(localStorage.getItem(Ut)??`{}`)};return{...e,geometry:Jt(e.geometry)}}catch{return qt()}}function Xt(e,t,n,r){let{x:i,y:a,w:o,h:s}=e;return t.includes(`e`)&&(o=Math.max(j,e.w+n)),t.includes(`s`)&&(s=Math.max(Wt,e.h+r)),t.includes(`w`)&&(o=Math.max(j,e.w-n),i=e.x+e.w-o),t.includes(`n`)&&(s=Math.max(Wt,e.h-r),a=e.y+e.h-s),Jt({x:i,y:a,w:o,h:s})}function Zt(e){return e.map(e=>({role:e.role,text:e.text,tools:e.tools.map((e,t)=>({id:`${t}`,label:e,status:`done`}))}))}function Qt(e,t){let n=e[e.length-1];return n?.role===`assistant`?[...e.slice(0,-1),t(n)]:[...e,t({role:`assistant`,text:``,tools:[]})]}function M({report:e}){let[t,n]=(0,_.useState)(Yt),r=(0,_.useRef)(null),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(void 0),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(``),f=(0,_.useRef)(null),p=(0,_.useRef)(null);(0,_.useEffect)(()=>{localStorage.setItem(Ut,JSON.stringify(t)),document.documentElement.style.setProperty(`--chat-dock`,t.mode===`docked`?`${t.dockWidth}px`:`0px`)},[t]);let m=(0,_.useCallback)(e=>n(t=>({...t,mode:e,last:e===`closed`?t.last:e})),[]);(0,_.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),n(e=>e.mode===`closed`?{...e,mode:e.last}:{...e,mode:`closed`}))},t=()=>n(e=>({...e,geometry:Jt(e.geometry)}));return window.addEventListener(`keydown`,e),window.addEventListener(`resize`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`resize`,t)}},[]),(0,_.useEffect)(()=>{t.mode===`closed`||c||o===e||(s(e),a([]),S.chatHistory(e).then(e=>a(Zt(e)),()=>a([])))},[t.mode,e,o,c]),(0,_.useEffect)(()=>{f.current?.scrollTo({top:f.current.scrollHeight,behavior:`smooth`})},[i]),(0,_.useEffect)(()=>{t.mode!==`closed`&&p.current?.focus()},[t.mode]);let h=e=>{e.type===`text`?a(t=>Qt(t,t=>({...t,text:t.text?`${t.text}\n\n${e.text}`:e.text}))):e.type===`tool`?a(t=>Qt(t,t=>{let n={id:e.id,label:e.label,status:e.status,detail:e.detail},r=t.tools.some(t=>t.id===e.id);return{...t,tools:r?t.tools.map(t=>t.id===e.id?n:t):[...t.tools,n]}})):e.type===`spec`||e.type===`run`?window.dispatchEvent(new CustomEvent(`impulse:${e.type}`,{detail:e})):e.type===`goto`?(s(e.report),window.location.hash=k(e.report,e.step)):e.type===`error`&&a(t=>[...t,{role:`error`,text:e.message,tools:[]}])},g=async t=>{let n=t.trim();if(n&&!c){d(``),l(!0),a(e=>[...e,{role:`user`,text:n,tools:[]}]);try{Ft.flush&&Ft.report===e&&await Ft.flush();let{turn_id:t}=await S.chatStart(n,e),r=0;for(let e=!1;!e;){await Kt(r===0?300:700);let n=await S.chatEvents(t,r);n.events.forEach(h),r+=n.events.length,e=n.done}}catch(e){a(t=>[...t,{role:`error`,text:e.message,tools:[]}])}finally{l(!1)}}},v=async()=>{await S.chatClear(e).catch(()=>void 0),a([])},y=e=>n=>{n.target.closest(`button`)||(e!==`move`||t.mode===`open`)&&(n.preventDefault(),n.currentTarget.setPointerCapture(n.pointerId),r.current={kind:e,startX:n.clientX,startY:n.clientY,geometry:t.geometry,dockWidth:t.dockWidth})},b=e=>{let t=r.current;if(!t)return;let i=e.clientX-t.startX,a=e.clientY-t.startY;t.kind===`move`?n(e=>({...e,geometry:Jt({...t.geometry,x:t.geometry.x+i,y:t.geometry.y+a})})):t.kind===`dock`?n(e=>({...e,dockWidth:Math.min(Math.max(j,t.dockWidth-i),window.innerWidth*.6)})):n(e=>({...e,geometry:Xt(t.geometry,t.kind,i,a)}))},ee=()=>{r.current=null};if(t.mode===`closed`)return(0,A.jsx)(`button`,{className:`chat-launcher`,onClick:()=>m(t.last),"aria-label":`Open assistant`,title:`Assistant (Ctrl K)`,children:(0,A.jsx)(Ke,{size:20})});let x=t.mode===`docked`?{top:`var(--topbar)`,right:0,bottom:0,width:t.dockWidth}:t.mode===`expanded`?{top:`6vh`,left:`8vw`,width:`84vw`,height:`88vh`}:{left:t.geometry.x,top:t.geometry.y,width:t.geometry.w,height:t.geometry.h};return(0,A.jsxs)(`section`,{className:`chat${t.mode===`docked`?` docked`:``}`,style:x,"aria-label":`Assistant`,onPointerMove:b,onPointerUp:ee,children:[t.mode===`open`&&Gt.map(e=>(0,A.jsx)(`div`,{className:`resize ${e}`,onPointerDown:y(e)},e)),t.mode===`docked`&&(0,A.jsx)(`div`,{className:`resize w`,onPointerDown:y(`dock`)}),(0,A.jsxs)(`header`,{className:`chat-head`,onPointerDown:y(`move`),children:[(0,A.jsxs)(`span`,{className:`chat-title`,children:[(0,A.jsx)(`span`,{className:`chat-dot${c?` busy`:``}`}),`Assistant`]}),(0,A.jsx)(`span`,{className:`chip chat-context`,children:e??`No report open`}),(0,A.jsx)(`span`,{className:`spacer`}),(0,A.jsx)(`button`,{className:`btn ghost icon`,onClick:()=>void v(),disabled:c||!i.length,"aria-label":`Clear conversation`,title:`Clear conversation`,children:(0,A.jsx)(bt,{size:15})}),(0,A.jsx)(`button`,{className:`btn ghost icon`,onClick:()=>m(t.mode===`docked`?`open`:`docked`),"aria-label":t.mode===`docked`?`Undock`:`Dock right`,title:t.mode===`docked`?`Undock`:`Dock right`,children:t.mode===`docked`?(0,A.jsx)(Xe,{size:15}):(0,A.jsx)(Qe,{size:15})}),(0,A.jsx)(`button`,{className:`btn ghost icon`,onClick:()=>m(t.mode===`expanded`?`open`:`expanded`),"aria-label":t.mode===`expanded`?`Restore size`:`Expand`,title:t.mode===`expanded`?`Restore size`:`Expand`,children:t.mode===`expanded`?(0,A.jsx)(Je,{size:15}):(0,A.jsx)(We,{size:15})}),(0,A.jsx)(`button`,{className:`btn ghost icon`,onClick:()=>m(`closed`),"aria-label":`Close`,title:`Close (Ctrl K)`,children:(0,A.jsx)(Et,{size:15})})]}),(0,A.jsxs)(`div`,{className:`chat-body`,ref:f,children:[i.map((e,t)=>(0,A.jsxs)(`div`,{className:`msg ${e.role}`,children:[e.tools.length>0&&(0,A.jsx)(`div`,{className:`tool-chips`,children:e.tools.map(e=>(0,A.jsxs)(`span`,{className:`tool-chip ${e.status}`,title:e.detail||void 0,children:[e.status===`running`?(0,A.jsx)(`span`,{className:`spinner`}):e.status===`done`?(0,A.jsx)(Ce,{size:11}):(0,A.jsx)(Et,{size:11}),e.label]},e.id))}),e.role===`assistant`?e.text&&(0,A.jsx)(Ht,{text:e.text}):e.text]},t)),c&&i[i.length-1]?.role===`user`&&(0,A.jsxs)(`div`,{className:`msg assistant thinking`,children:[(0,A.jsx)(`span`,{className:`spinner`}),`Thinking`]})]}),(0,A.jsxs)(`form`,{className:`chat-compose`,onSubmit:e=>{e.preventDefault(),g(u)},children:[(0,A.jsx)(`textarea`,{ref:p,rows:1,value:u,placeholder:c?`Working…`:`Ask the assistant`,onChange:e=>d(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),g(u))},"aria-label":`Message`}),(0,A.jsx)(`button`,{className:`btn primary icon`,style:{height:38,width:38},disabled:c||!u.trim(),"aria-label":`Send`,type:`submit`,children:(0,A.jsx)(_e,{size:16})})]})]})}function N({label:e,hint:t,bad:n,children:r}){return(0,A.jsxs)(`div`,{className:`field`,children:[(0,A.jsx)(`label`,{children:e}),r,t&&(0,A.jsx)(`span`,{className:n?`hint bad`:`hint`,children:t})]})}function $t({value:e,options:t,placeholder:n,disabled:r,onChange:i}){let a=t??[],o=e===``||a.includes(e);return(0,A.jsxs)(`select`,{className:`select`,value:e,disabled:r||!t,onChange:e=>i(e.target.value),children:[(0,A.jsx)(`option`,{value:``,children:t?n:`Loading…`}),!o&&(0,A.jsx)(`option`,{value:e,children:e}),a.map(e=>(0,A.jsx)(`option`,{value:e,children:e},e))]})}function P({children:e,warn:t}){return(0,A.jsxs)(`div`,{className:t?`banner warn`:`banner`,role:`alert`,children:[(0,A.jsx)(St,{size:16,style:{flexShrink:0,marginTop:2}}),(0,A.jsx)(`div`,{children:e})]})}function en({messages:e}){return e.length?(0,A.jsx)(`div`,{className:`problems`,role:`alert`,children:e.map(e=>(0,A.jsx)(`div`,{children:e},e))}):null}function tn({rows:e,columns:t}){return(0,A.jsx)(A.Fragment,{children:Array.from({length:e},(e,n)=>(0,A.jsx)(`tr`,{children:Array.from({length:t},(e,t)=>(0,A.jsx)(`td`,{children:(0,A.jsx)(`div`,{className:`skeleton`,style:{width:t===0?18:`${50+(n*7+t*13)%40}%`}})},t))},n))})}function nn({icon:e,title:t,children:n}){return(0,A.jsxs)(`div`,{className:`empty`,children:[(0,A.jsx)(`div`,{className:`glyph`,children:e}),(0,A.jsx)(`div`,{style:{color:`var(--text)`,fontWeight:600},children:t}),n]})}function rn({title:e,sub:t,report:n,next:r,ready:i}){return(0,A.jsxs)(`div`,{className:`page-head`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h1`,{children:e}),(0,A.jsx)(`p`,{className:`sub`,children:t})]}),r&&(0,A.jsxs)(`a`,{className:`btn primary${i?``:` disabled`}`,href:i?k(n,r.step):void 0,"aria-disabled":!i,children:[r.label,(0,A.jsx)(he,{size:15})]})]})}function an({value:e,taken:t,check:n,onCommit:r,label:i}){let[a,o]=(0,_.useState)(e);(0,_.useEffect)(()=>o(e),[e]);let s=a===e?null:n(a)??(t.includes(a)?`${a} is already used`:null);return(0,A.jsxs)(`div`,{className:`name-input`,children:[(0,A.jsx)(`input`,{className:`input mono${s?` invalid`:``}`,value:a,"aria-label":i,spellCheck:!1,onChange:e=>o(e.target.value.trim()),onBlur:()=>{a!==e&&(s?o(e):r(a))},onKeyDown:t=>{t.key===`Enter`&&t.target.blur(),t.key===`Escape`&&o(e)}}),s&&(0,A.jsx)(`span`,{className:`hint bad`,children:s})]})}function on({value:e,onChange:t,placeholder:n,mono:r,invalid:i,label:a}){return(0,A.jsx)(`input`,{className:`input${r?` mono`:``}${i?` invalid`:``}`,value:e,placeholder:n,"aria-label":a,spellCheck:!1,onChange:e=>t(e.target.value)})}function sn({options:e,value:t,onChange:n,label:r}){return(0,A.jsx)(`div`,{className:`toggles`,role:`group`,"aria-label":r,children:e.map(r=>{let i=t.includes(r);return(0,A.jsx)(`button`,{type:`button`,className:`toggle${i?` on`:``}`,"aria-pressed":i,onClick:()=>n(i?t.filter(e=>e!==r):e.filter(e=>e===r||t.includes(e))),children:r},r)})})}function cn(e,t=3e3){let[n,r]=(0,_.useState)(!1);return(0,_.useEffect)(()=>{if(!e){r(!1);return}let n=window.setTimeout(()=>r(!0),t);return()=>window.clearTimeout(n)},[e,t]),n}var ln=class extends _.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidUpdate(e){e.resetKey!==this.props.resetKey&&this.state.error&&this.setState({error:null})}render(){return this.state.error?(0,A.jsx)(`main`,{className:`main`,children:(0,A.jsxs)(P,{children:[`Something went wrong on this page: `,this.state.error.message,` `,(0,A.jsx)(`button`,{className:`btn ghost`,style:{height:24},onClick:()=>window.location.reload(),children:`Reload`})]})}):this.props.children}},un=/^[a-z][a-z0-9_]{0,62}$/;function dn({onCancel:e}){let[t,n]=(0,_.useState)(``),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(),l=un.test(t);return(0,A.jsxs)(`div`,{className:`card`,style:{marginBottom:16},children:[(0,A.jsx)(`div`,{className:`card-head`,children:(0,A.jsx)(`h2`,{children:`New report`})}),(0,A.jsxs)(`div`,{className:`card-body`,children:[s&&(0,A.jsx)(P,{children:s}),(0,A.jsxs)(`div`,{className:`grid`,children:[(0,A.jsx)(N,{label:`Name`,hint:t&&!l?`Lowercase letters, digits and underscores`:`Also used as the gold table prefix`,bad:!!t&&!l,children:(0,A.jsx)(`input`,{className:`input`,autoFocus:!0,value:t,placeholder:`engine_load_profile`,onChange:e=>n(e.target.value.trim())})}),(0,A.jsx)(N,{label:`Description`,children:(0,A.jsx)(`input`,{className:`input`,value:r,placeholder:`Optional`,onChange:e=>i(e.target.value)})})]}),(0,A.jsxs)(`div`,{className:`row`,style:{marginTop:16,justifyContent:`flex-end`},children:[(0,A.jsx)(`button`,{className:`btn ghost`,onClick:e,children:`Cancel`}),(0,A.jsxs)(`button`,{className:`btn primary`,disabled:!l||a,onClick:async()=>{o(!0),c(void 0);try{let e=await S.createReport(t,r);window.location.hash=k(e.name)}catch(e){c(e.message),o(!1)}},children:[a?(0,A.jsx)(`span`,{className:`spinner`}):(0,A.jsx)(nt,{size:15}),`Create report`]})]})]})]})}function fn(){let e=kt(()=>S.reports(),[]),[t,n]=(0,_.useState)(!1),r=async t=>{window.confirm(`Delete report ${t} with its job and run history? A running job is cancelled. Gold tables are not touched.`)&&(await S.deleteReport(t),e.reload())},i=e.data??[];return(0,A.jsxs)(`main`,{className:`main`,children:[(0,A.jsxs)(`div`,{className:`page-head`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h1`,{children:`Reports`}),(0,A.jsx)(`p`,{className:`sub`,children:`Build Impulse reports on your measurement data, guided step by step or through the assistant.`})]}),!t&&(0,A.jsxs)(`button`,{className:`btn primary`,onClick:()=>n(!0),children:[(0,A.jsx)(nt,{size:15}),`New report`]})]}),t&&(0,A.jsx)(dn,{onCancel:()=>n(!1)}),e.error&&(0,A.jsx)(P,{children:e.error.message}),(0,A.jsx)(`div`,{className:`card`,children:!e.loading&&i.length===0?(0,A.jsx)(nn,{icon:(0,A.jsx)(Re,{size:22}),title:`No reports yet`,children:`Create a report to select data, define signals and aggregations, and run it on your workspace.`}):(0,A.jsxs)(`table`,{className:`table`,children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{children:`Name`}),(0,A.jsx)(`th`,{children:`Description`}),(0,A.jsx)(`th`,{children:`Units under test`}),(0,A.jsx)(`th`,{children:`Aggregations`}),(0,A.jsx)(`th`,{children:`Updated`}),(0,A.jsx)(`th`,{})]})}),(0,A.jsx)(`tbody`,{children:e.loading&&!e.data?(0,A.jsx)(tn,{rows:3,columns:6}):i.map(e=>(0,A.jsxs)(`tr`,{className:`clickable`,onClick:()=>window.location.hash=k(e.name),children:[(0,A.jsx)(`td`,{style:{fontWeight:550},children:e.name}),(0,A.jsx)(`td`,{style:{color:`var(--text-2)`},children:e.description}),(0,A.jsx)(`td`,{className:`num`,children:e.uuts}),(0,A.jsx)(`td`,{className:`num`,children:e.aggregations}),(0,A.jsx)(`td`,{className:`num`,children:Mt(e.updated_at)}),(0,A.jsx)(`td`,{style:{textAlign:`right`},children:(0,A.jsx)(`button`,{className:`btn ghost icon danger`,"aria-label":`Delete ${e.name}`,onClick:t=>{t.stopPropagation(),r(e.name)},children:(0,A.jsx)(bt,{size:15})})})]},e.name))})]})})]})}var pn=/^[a-z][a-z0-9_]{0,62}$/,mn=new Set(`and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield match case type spark dbutils display report db page config sink table tables`.split(` `));function hn(e){return pn.test(e)?mn.has(e)||e.startsWith(`ev_`)?`${e} is reserved`:null:`Lowercase letters, digits and underscores, starting with a letter`}function gn(e){return pn.test(e)?null:`Lowercase letters, digits and underscores, starting with a letter`}function _n(e,t,n=`signal`){let r=e.toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``).slice(0,40);(!r||!/^[a-z]/.test(r))&&(r=`${n}_${r}`.replace(/_+$/,``)),hn(r)&&(r=`${r}_1`);let i=new Set(t),a=r;for(let e=2;i.has(a);e++)a=`${r}_${e}`;return a}function vn(e,t,n=20){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t)return[e,e+1];let r=(t-e)/n,i=10**Math.floor(Math.log10(r)),a=[1,2,2.5,5,10].map(e=>e*i).find(e=>e>=r)??r;return yn(Math.floor(e/a)*a,Math.ceil(t/a)*a,a)}function yn(e,t,n){if(!(n>0)||!(t>e))return[];let r=Math.min(Math.round((t-e)/n),499),i=Math.max(0,-Math.floor(Math.log10(n))+2);return Array.from({length:r+1},(t,r)=>Number((e+r*n).toFixed(i)))}function bn(e){return e==null?``:Math.abs(e)>=1e5||Math.abs(e)<.001&&e!==0?e.toExponential(2):String(Number(e.toFixed(3)))}var xn=[{kind:`histogram`,label:`Histogram`,icon:(0,A.jsx)(xe,{size:15}),text:`HistogramDuration, HistogramDistance`},{kind:`histogram_2d`,label:`Heatmap`,icon:(0,A.jsx)(He,{size:15}),text:`Histogram2DDuration`},{kind:`statistics`,label:`Statistics`,icon:(0,A.jsx)(ft,{size:15}),text:`StatsAggregator`},{kind:`point_values`,label:`Values at points`,icon:(0,A.jsx)(Me,{size:15}),text:`PointValueAggregator`}];function Sn(e){if(e.length<2)return{from:``,to:``,step:``};let t=e[1]-e[0];return e.every((n,r)=>r===0||Math.abs(n-e[r-1]-t)Sn(t)),[o,s]=(0,_.useState)(null),c=t.join(`,`);(0,_.useEffect)(()=>a(Sn(t)),[c]);let l=e=>{a(e);let t=yn(Number(e.from),Number(e.to),Number(e.step));e.from!==``&&e.to!==``&&e.step!==``&&t.length>=2&&n(t)},u=r?.kind===`channel`&&r.min!==null&&r.max!==null?r:void 0,d=t.length>=2?`${t.length-1} bins: ${t.slice(0,4).map(bn).join(`, `)}${t.length>5?`, …`:``}${t.length>4?`, ${bn(t[t.length-1])}`:``}`:`No bins yet`;return(0,A.jsxs)(`div`,{className:`field bins`,children:[(0,A.jsx)(`label`,{children:e}),o===null?(0,A.jsxs)(`div`,{className:`bins-row`,children:[[`from`,`to`,`step`].map(t=>(0,A.jsxs)(`span`,{className:`affix`,children:[(0,A.jsx)(`span`,{children:t}),(0,A.jsx)(`input`,{className:`input`,inputMode:`decimal`,"aria-label":`${e} ${t}`,value:i[t],onChange:e=>l({...i,[t]:e.target.value})})]},t)),u&&(0,A.jsxs)(`button`,{className:`btn`,type:`button`,title:`Fit to ${bn(u.min)} to ${bn(u.max)}`,onClick:()=>n(vn(u.min,u.max)),children:[(0,A.jsx)(mt,{size:14}),`Suggest`]})]}):(0,A.jsx)(`textarea`,{className:`input mono bins-raw`,value:o,"aria-label":`${e} edges`,onChange:e=>s(e.target.value),onBlur:()=>{let e=o.split(/[\s,;]+/).filter(Boolean).map(Number);e.every(Number.isFinite)&&n(e),s(null)},autoFocus:!0}),(0,A.jsxs)(`span`,{className:`hint`,children:[d,o===null&&(0,A.jsx)(`button`,{className:`link`,type:`button`,onClick:()=>s(t.join(`, `)),children:`Edit edges`})]})]})}function wn({value:e,signals:t,onChange:n,label:r,placeholder:i=`Select signal`}){return(0,A.jsxs)(`select`,{className:`select`,value:e,onChange:e=>n(e.target.value),"aria-label":r,children:[(0,A.jsx)(`option`,{value:``,children:i}),t.map(e=>(0,A.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}function Tn({value:e,spec:t,points:n,onChange:r}){let i=t.events.filter(e=>n?e.kind===`points`:e.kind===`condition`);return(0,A.jsxs)(`select`,{className:`select`,value:e,onChange:e=>r(e.target.value),"aria-label":`Scope`,children:[n?(0,A.jsx)(`option`,{value:``,children:`Select points-in-time event`}):(0,A.jsx)(`option`,{value:``,children:`Whole series`}),i.map(e=>(0,A.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}function En({index:e}){let{spec:t,update:n}=It(),r=Lt(`aggregations`),i=t.aggregations[e],a=xn.find(e=>e.kind===i.kind),o=e=>t.signals.find(t=>t.name===e),s=t=>n(n=>({...n,aggregations:n.aggregations.map((n,r)=>r===e?{...n,...t}:n)})),c=t.aggregations.map(e=>e.name).filter(e=>e!==i.name),l;return l=i.kind===`histogram`?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{className:`grid`,children:[(0,A.jsx)(N,{label:`Signal`,children:(0,A.jsx)(wn,{value:i.signal,signals:t.signals,label:`Signal`,onChange:e=>s({signal:e})})}),(0,A.jsx)(N,{label:`Scope`,children:(0,A.jsx)(Tn,{value:i.event,spec:t,onChange:e=>s({event:e})})}),(0,A.jsx)(N,{label:`Weight`,children:(0,A.jsxs)(`select`,{className:`select`,value:i.weight,onChange:e=>s({weight:e.target.value}),"aria-label":`Weight`,children:[(0,A.jsx)(`option`,{value:`duration`,children:`Time spent`}),(0,A.jsx)(`option`,{value:`distance`,children:`Distance travelled`})]})}),i.weight===`distance`&&(0,A.jsx)(N,{label:`Cumulative distance signal`,children:(0,A.jsx)(wn,{value:i.distance,signals:t.signals,label:`Cumulative distance signal`,onChange:e=>s({distance:e})})})]}),(0,A.jsx)(Cn,{label:`Bins`,value:i.bins,signal:o(i.signal),onChange:e=>s({bins:e})})]}):i.kind===`histogram_2d`?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{className:`grid`,children:[(0,A.jsx)(N,{label:`X signal`,children:(0,A.jsx)(wn,{value:i.x,signals:t.signals,label:`X signal`,onChange:e=>s({x:e})})}),(0,A.jsx)(N,{label:`Y signal`,children:(0,A.jsx)(wn,{value:i.y,signals:t.signals,label:`Y signal`,onChange:e=>s({y:e})})}),(0,A.jsx)(N,{label:`Scope`,children:(0,A.jsx)(Tn,{value:i.event,spec:t,onChange:e=>s({event:e})})})]}),(0,A.jsxs)(`div`,{className:`grid`,children:[(0,A.jsx)(Cn,{label:`X bins`,value:i.x_bins,signal:o(i.x),onChange:e=>s({x_bins:e})}),(0,A.jsx)(Cn,{label:`Y bins`,value:i.y_bins,signal:o(i.y),onChange:e=>s({y_bins:e})})]})]}):i.kind===`statistics`?(0,A.jsxs)(`div`,{className:`grid`,children:[(0,A.jsx)(N,{label:`Signals`,children:(0,A.jsx)(sn,{options:t.signals.map(e=>e.name),value:i.signals,label:`Signals`,onChange:e=>s({signals:e})})}),(0,A.jsx)(N,{label:`Statistics`,children:(0,A.jsx)(sn,{options:Dt,value:i.statistics,label:`Statistics`,onChange:e=>s({statistics:e})})}),(0,A.jsx)(N,{label:`Scope`,children:(0,A.jsx)(Tn,{value:i.event,spec:t,onChange:e=>s({event:e})})})]}):(0,A.jsxs)(`div`,{className:`grid`,children:[(0,A.jsx)(N,{label:`Signals`,children:(0,A.jsx)(sn,{options:t.signals.map(e=>e.name),value:i.signals,label:`Signals`,onChange:e=>s({signals:e})})}),(0,A.jsx)(N,{label:`Points in time`,children:(0,A.jsx)(Tn,{value:i.event,spec:t,points:!0,onChange:e=>s({event:e})})})]}),(0,A.jsxs)(`div`,{className:`card agg`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsxs)(`div`,{className:`row`,style:{minWidth:0},children:[(0,A.jsx)(`span`,{className:`agg-icon`,children:a.icon}),(0,A.jsx)(`span`,{className:`agg-kind`,children:a.label}),(0,A.jsx)(an,{value:i.name,taken:c,check:gn,label:`Aggregation name`,onCommit:t=>n(n=>({...n,aggregations:n.aggregations.map((n,r)=>r===e?{...n,name:t}:n)}))})]}),(0,A.jsx)(`button`,{className:`btn ghost icon danger`,"aria-label":`Remove ${i.name}`,onClick:()=>n(t=>({...t,aggregations:t.aggregations.filter((t,n)=>n!==e)})),children:(0,A.jsx)(bt,{size:15})})]}),(0,A.jsxs)(`div`,{className:`card-body stack`,children:[l,(0,A.jsxs)(`div`,{className:`grid`,children:[(0,A.jsx)(N,{label:`Description`,children:(0,A.jsx)(on,{value:i.desc,placeholder:`Optional`,label:`Description`,onChange:e=>s({desc:e})})}),(0,A.jsx)(N,{label:`Values unit`,children:(0,A.jsx)(on,{value:i.values_unit,placeholder:`Optional`,label:`Values unit`,onChange:e=>s({values_unit:e})})})]}),(0,A.jsx)(en,{messages:r.of(i.name)})]})]})}function Dn(e,t){let[n,r]=e.signals,i=e=>e?.kind===`channel`&&e.min!==null&&e.max!==null?vn(e.min,e.max):[],a=e.aggregations.map(e=>e.name),o=(e,t=n?.name??`report`)=>_n(`${t}_${e}`,a,`agg`);switch(t){case`histogram`:return{kind:t,name:o(`hist`),signal:n?.name??``,bins:i(n),event:``,weight:`duration`,distance:``,bins_unit:``,values_unit:``,desc:``};case`histogram_2d`:return{kind:t,name:o(`vs_${r?.name??`y`}`),x:n?.name??``,y:r?.name??``,x_bins:i(n),y_bins:i(r),event:``,x_unit:``,y_unit:``,values_unit:``,desc:``};case`statistics`:return{kind:t,name:o(`stats`,`signal`),signals:e.signals.slice(0,3).map(e=>e.name),statistics:[`min`,`max`,`mean`],event:``,values_unit:``,desc:``};default:return{kind:t,name:o(`at_points`),signals:n?[n.name]:[],event:e.events.find(e=>e.kind===`points`)?.name??``,values_unit:``,desc:``}}}function On(){let{spec:e,update:t}=It(),n=Lt(`aggregations`);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(rn,{title:`Aggregations`,sub:`Choose what the report computes per recording.`,report:e.name,next:{step:`run`,label:`Review`},ready:e.aggregations.length>0&&n.all.length===0}),(0,A.jsx)(`div`,{className:`kinds`,children:xn.map(n=>(0,A.jsxs)(`button`,{className:`kind`,disabled:!e.signals.length,onClick:()=>t(e=>({...e,aggregations:[...e.aggregations,Dn(e,n.kind)]})),children:[(0,A.jsx)(`span`,{className:`agg-icon`,children:n.icon}),(0,A.jsxs)(`span`,{children:[(0,A.jsx)(`strong`,{children:n.label}),(0,A.jsx)(`span`,{children:n.text})]})]},n.kind))}),(0,A.jsx)(en,{messages:n.general.filter(t=>!(e.aggregations.length===0&&t.startsWith(`Add at least`)))}),e.aggregations.length===0?(0,A.jsx)(`div`,{className:`card`,children:(0,A.jsx)(nn,{icon:(0,A.jsx)(xe,{size:22}),title:`No aggregations yet`,children:e.signals.length?`Add a histogram, heatmap, statistics or values at points above.`:`Define signals first, then add aggregations over them.`})}):e.aggregations.map((e,t)=>(0,A.jsx)(En,{index:t},t))]})}var kn=[{key:`container_metrics`,label:`Container metrics`,required:!0},{key:`channel_metrics`,label:`Channel metrics`,required:!0},{key:`channels`,label:`Channels`,required:!0},{key:`container_tags`,label:`Container tags`,required:!1},{key:`channel_tags`,label:`Channel tags`,required:!1}],An=/^[a-z][a-z0-9_]{0,62}$/,jn=e=>e?.split(`.`).pop()??``;function Mn({source:e}){let t=e.uut_source===`column`?`${jn(e.tables.container_metrics)}.${e.uut_key}`:e.uut_source===`tag`?`${jn(e.tables.container_tags)||`container_tags`} key ${e.uut_key}`:null,n=[{label:`Data type`,value:e.data_type},{label:`Unit under test id`,value:t}];return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`div`,{className:`row`,style:{marginBottom:12},children:(0,A.jsx)(`span`,{className:e.issues.length?`badge bad`:`badge ok`,children:e.issues.length?`Needs attention`:`Impulse-ready`})}),e.issues.length>0&&(0,A.jsx)(P,{children:e.issues.map(e=>(0,A.jsx)(`div`,{children:e},e))}),(0,A.jsxs)(`div`,{className:`checklist`,children:[kn.map(t=>{let n=e.tables[t.key],r=n?(0,A.jsx)(Te,{size:16,color:`var(--success)`}):t.required?(0,A.jsx)(ke,{size:16,color:`var(--error)`}):(0,A.jsx)(De,{size:16,color:`var(--muted)`});return(0,A.jsxs)(`div`,{className:`check-item`,children:[r,(0,A.jsx)(`span`,{className:`name`,children:t.label}),(0,A.jsx)(`span`,{className:`path mono`,title:n??void 0,children:n?jn(n):t.required?`missing`:`not used`})]},t.key)}),n.map(e=>(0,A.jsxs)(`div`,{className:`check-item`,children:[e.value?(0,A.jsx)(Te,{size:16,color:`var(--success)`}):(0,A.jsx)(ke,{size:16,color:`var(--error)`}),(0,A.jsx)(`span`,{className:`name`,children:e.label}),(0,A.jsx)(`span`,{className:`path mono`,title:e.value??void 0,children:e.value??`not detected`})]},e.label))]})]})}function Nn(){let{spec:e,update:t}=It(),{catalog:n,schema:r}=e.source,i=kt(()=>S.catalogs(),[]),a=kt(()=>n?S.schemas(n):null,[n]),o=kt(()=>e.sink.catalog?S.schemas(e.sink.catalog):null,[e.sink.catalog]),s=kt(()=>n&&r?S.source(n,r):null,[n,r]),c=e=>t(t=>{let n={...t.source,...e};e.catalog!==void 0&&e.catalog!==t.source.catalog&&(n.schema=``);let r=!t.sink.catalog&&!t.sink.schema||t.sink.catalog===t.source.catalog&&t.sink.schema===t.source.schema;return{...t,source:n,sink:r?{...t.sink,catalog:n.catalog,schema:n.schema}:t.sink,uuts:[],window:{start:null,stop:null}}}),l=e=>t(t=>{let n={...t.sink,...e};return e.catalog!==void 0&&e.catalog!==t.sink.catalog&&(n.schema=``),{...t,sink:n}}),u=An.test(e.sink.table_prefix),d=Lt(`data`),f=!!s.data&&s.data.issues.length===0&&d.all.length===0;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(rn,{title:`Data`,sub:`Pick the silver schema Impulse reads and where the report writes its gold tables.`,report:e.name,next:{step:`uuts`,label:`Units under test`},ready:f}),i.error&&(0,A.jsx)(P,{children:i.error.message}),(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsx)(`h2`,{children:`Source`}),(0,A.jsx)(`span`,{className:`sub`,style:{margin:0},children:`Read with your permissions`})]}),(0,A.jsxs)(`div`,{className:`card-body`,children:[(0,A.jsxs)(`div`,{className:`grid`,style:{marginBottom:18},children:[(0,A.jsx)(N,{label:`Catalog`,children:(0,A.jsx)($t,{value:n,options:i.data,placeholder:`Select catalog`,onChange:e=>c({catalog:e})})}),(0,A.jsx)(N,{label:`Schema`,children:(0,A.jsx)($t,{value:r,options:n?a.data:[],placeholder:`Select schema`,disabled:!n,onChange:e=>c({schema:e})})})]}),s.loading&&n&&r&&(0,A.jsxs)(`div`,{className:`row`,style:{color:`var(--text-2)`},children:[(0,A.jsx)(`span`,{className:`spinner`}),`Checking tables`]}),s.error&&(0,A.jsx)(P,{children:s.error.message}),s.data&&(0,A.jsx)(Mn,{source:s.data})]})]}),(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsx)(`h2`,{children:`Output`}),(0,A.jsxs)(`span`,{className:`sub`,style:{margin:0},children:[`Gold tables are named `,e.sink.table_prefix||``,`_*`]})]}),(0,A.jsx)(`div`,{className:`card-body`,children:(0,A.jsxs)(`div`,{className:`grid`,children:[(0,A.jsx)(N,{label:`Catalog`,children:(0,A.jsx)($t,{value:e.sink.catalog,options:i.data,placeholder:`Select catalog`,onChange:e=>l({catalog:e})})}),(0,A.jsx)(N,{label:`Schema`,children:(0,A.jsx)($t,{value:e.sink.schema,options:e.sink.catalog?o.data:[],placeholder:`Select schema`,disabled:!e.sink.catalog,onChange:e=>l({schema:e})})}),(0,A.jsx)(N,{label:`Table prefix`,hint:u?void 0:`Lowercase letters, digits and underscores`,bad:!u,children:(0,A.jsx)(`input`,{className:`input mono`,value:e.sink.table_prefix,onChange:e=>l({table_prefix:e.target.value.trim()})})})]})})]})]})}var Pn=`modulepreload`,Fn=function(e){return`/`+e},In={},Ln=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Fn(t,n),t=s(t),t in In)return;In[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Pn,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Rn={gridcolor:`#2a2a2e`,zerolinecolor:`#3a3a40`,linecolor:`#3a3a40`,tickcolor:`#3a3a40`,automargin:!0},zn={paper_bgcolor:`rgba(0,0,0,0)`,plot_bgcolor:`rgba(0,0,0,0)`,font:{family:`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif`,color:`#a1a1aa`,size:12},margin:{l:64,r:16,t:12,b:64},hoverlabel:{bgcolor:`#1c1c1f`,bordercolor:`#3a3a40`,font:{color:`#f4f4f5`}},bargap:.08},Bn=[[0,`#141416`],[.35,`#7a1a10`],[.7,`#ff3621`],[1,`#ffffff`]];function Vn({data:e,layout:t,height:n=320}){let r=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let i=!0,a=r.current;return Ln(async()=>{let{default:e}=await import(`./plotly-cartesian.min-i9wm5hku.js`).then(e=>c(e.default,1));return{default:e}},[]).then(({default:r})=>{i&&a&&r.react(a,e,{...zn,...t,height:n,xaxis:{...Rn,...t.xaxis},yaxis:{...Rn,...t.yaxis}},{displaylogo:!1,responsive:!0,modeBarButtonsToRemove:[`select2d`,`lasso2d`,`autoScale2d`]})}),()=>{i=!1}},[e,t,n]),(0,_.useEffect)(()=>{let e=r.current;return()=>{e&&Ln(async()=>{let{default:e}=await import(`./plotly-cartesian.min-i9wm5hku.js`).then(e=>c(e.default,1));return{default:e}},[]).then(({default:t})=>t.purge(e))}},[]),(0,A.jsx)(`div`,{ref:r,style:{height:n}})}var Hn=(e,t)=>`${bn(e)} to ${bn(t)}`;function Un(e){return e===null?``:e<120?`${bn(e)} s`:e<7200?`${bn(e/60)} min`:`${bn(e/3600)} h`}function Wn({result:e}){let t=(0,_.useMemo)(()=>[{type:`bar`,x:e.bins.map(e=>Hn(e.lo,e.hi)),y:e.bins.map(e=>e.value),marker:{color:`#ff3621`},hovertemplate:`%{x} ${e.axis}
%{y:.4g} ${e.unit}`}],[e]),n=(0,_.useMemo)(()=>({xaxis:{title:{text:e.axis},type:`category`},yaxis:{title:{text:e.unit===`s`?`Time (s)`:e.unit}}}),[e]);return(0,A.jsx)(Vn,{data:t,layout:n})}function Gn({result:e}){let t=(0,_.useMemo)(()=>{let t=[...new Map(e.cells.map(e=>[e.x,Hn(e.x_lo,e.x_hi)])).entries()].sort((e,t)=>e[0]-t[0]),n=[...new Map(e.cells.map(e=>[e.y,Hn(e.y_lo,e.y_hi)])).entries()].sort((e,t)=>e[0]-t[0]),r=n.map(([n])=>t.map(([t])=>e.cells.find(e=>e.x===t&&e.y===n)?.value??0));return[{type:`heatmap`,x:t.map(([,e])=>e),y:n.map(([,e])=>e),z:r,colorscale:Bn,hovertemplate:`x %{x}
y %{y}
%{z:.4g} s`,colorbar:{outlinewidth:0,tickfont:{color:`#a1a1aa`},title:{text:`s`,font:{color:`#a1a1aa`}}}}]},[e]),n=(0,_.useMemo)(()=>({xaxis:{title:{text:e.x_axis},type:`category`},yaxis:{title:{text:e.y_axis},type:`category`}}),[e]);return(0,A.jsx)(Vn,{data:t,layout:n,height:380})}function Kn({result:e}){let t=e.kind===`statistics`,n=e.unit?` (${e.unit})`:``;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`div`,{className:`table-scroll`,children:(0,A.jsxs)(`table`,{className:`table`,children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{children:`Recording`}),e.scoped&&(0,A.jsxs)(`th`,{children:[e.event??`Instance`,` #`]}),t&&(0,A.jsx)(`th`,{children:`Signal`}),e.columns.map(e=>(0,A.jsxs)(`th`,{className:`right`,children:[e,n]},e))]})}),(0,A.jsx)(`tbody`,{children:e.rows.map((n,r)=>(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{className:`num`,children:n.recording}),e.scoped&&(0,A.jsx)(`td`,{className:`num`,children:n.instance}),t&&(0,A.jsx)(`td`,{style:{fontWeight:550},children:n.signal}),e.columns.map(e=>{let t=n.values[e];return(0,A.jsx)(`td`,{className:`right num stat`,children:t==null?``:bn(t)},e)})]},r))})]})}),e.more&&(0,A.jsxs)(`div`,{className:`more`,children:[`Showing the first `,e.rows.length,` rows`]})]})}var qn={histogram:(0,A.jsx)(xe,{size:15}),histogram_2d:(0,A.jsx)(He,{size:15}),statistics:(0,A.jsx)(ft,{size:15}),point_values:(0,A.jsx)(Me,{size:15})};function Jn({results:e}){return e.available?(0,A.jsx)(A.Fragment,{children:e.aggregations.map(e=>{let t=e.kind===`histogram`?!e.bins.length:e.kind===`histogram_2d`?!e.cells.length:!e.rows.length;return(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsx)(`div`,{className:`card-head`,children:(0,A.jsxs)(`div`,{className:`row`,children:[(0,A.jsx)(`span`,{className:`agg-icon`,children:qn[e.kind]}),(0,A.jsx)(`h2`,{children:e.name})]})}),t?(0,A.jsx)(`div`,{className:`more`,children:`No rows for this aggregation. Run the report again after changing it.`}):e.kind===`histogram`?(0,A.jsx)(`div`,{className:`card-body`,children:(0,A.jsx)(Wn,{result:e})}):e.kind===`histogram_2d`?(0,A.jsx)(`div`,{className:`card-body`,children:(0,A.jsx)(Gn,{result:e})}):(0,A.jsx)(Kn,{result:e})]},e.name)})}):(0,A.jsx)(`div`,{className:`card`,children:(0,A.jsx)(nn,{icon:(0,A.jsx)(xe,{size:22}),title:`No results yet`,children:`Run the report to compute its gold tables.`})})}function Yn({text:e,label:t=`Copy`}){let[n,r]=(0,_.useState)(!1);return(0,A.jsxs)(`button`,{className:`btn ghost`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),window.setTimeout(()=>r(!1),1500)})},children:[n?(0,A.jsx)(Te,{size:14}):(0,A.jsx)(Ae,{size:14}),n?`Copied`:t]})}function Xn(e){let[t,n]=(0,_.useState)(Date.now());return(0,_.useEffect)(()=>{if(!e)return;let t=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),t}var Zn={QUEUED:`Queued`,PENDING:`Starting`,BLOCKED:`Waiting`,RUNNING:`Running`,TERMINATING:`Finishing`,SUCCESS:`Succeeded`,FAILED:`Failed`,TIMEDOUT:`Timed out`,CANCELED:`Cancelled`,INTERNAL_ERROR:`Failed`};function Qn(e){return Zn[e.active?e.state??``:e.result??e.state??``]??e.result??e.state??`Unknown`}function $n(e){return e.active?`badge`:e.result===`SUCCESS`?`badge ok`:`badge bad`}function er({preflight:e,busy:t,onGrant:n}){return(0,A.jsxs)(`div`,{className:`card-body stack preflight`,children:[e.user.length>0&&(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h3`,{children:`Your permissions`}),(0,A.jsx)(`p`,{className:`sub`,children:`The report reads and writes only data you can access yourself. Ask a data owner for these privileges.`}),(0,A.jsx)(`ul`,{className:`todo`,children:e.user.map(e=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`span`,{className:`mono priv`,children:e.privilege}),(0,A.jsxs)(`span`,{children:[(0,A.jsx)(`span`,{className:`mono`,children:e.object}),(0,A.jsxs)(`span`,{className:`hint`,children:[` `,e.message]})]})]},`${e.privilege}:${e.object}`))})]}),e.app.length>0&&(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h3`,{children:`The app's service principal`}),(0,A.jsxs)(`p`,{className:`sub`,children:[`Report jobs run as `,e.app_principal.name,`, which needs access once per catalog and schema:`]}),(0,A.jsx)(`ul`,{className:`todo`,children:e.app.map(e=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`span`,{className:`mono priv`,children:e.privilege}),(0,A.jsx)(`span`,{className:`mono`,children:e.object})]},`${e.privilege}:${e.object}`))}),e.grants&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{className:`grants`,children:[(0,A.jsx)(`pre`,{className:`code`,children:e.grants}),(0,A.jsx)(Yn,{text:e.grants,label:`Copy SQL`})]}),e.user.length===0&&(0,A.jsxs)(`div`,{className:`row grant-row`,children:[(0,A.jsxs)(`button`,{className:`btn primary`,onClick:n,disabled:!!t,children:[t===`grant`?(0,A.jsx)(`span`,{className:`spinner`}):(0,A.jsx)(ut,{size:15}),`Grant and run`]}),(0,A.jsx)(`span`,{className:`hint`,children:`Runs these statements as you, so it works only if you may grant access to these catalogs and schemas. Otherwise copy the SQL for someone who can.`})]})]})]})]})}function tr({onSuccess:e}){let{spec:t,flushNow:n}=It(),[r,i]=(0,_.useState)(),[a,o]=(0,_.useState)(),[s,c]=(0,_.useState)(),[l,u]=(0,_.useState)(),[d,f]=(0,_.useState)(),p=Xn(!!a?.active),m=(0,_.useCallback)(async()=>{let e=await S.runs(t.name);return i(e),e},[t.name]);(0,_.useEffect)(()=>{m().then(e=>e[0]&&S.runDetail(t.name,e[0].run_id).then(o),e=>f(e.message))},[m,t.name]),(0,_.useEffect)(()=>{let e=e=>{let n=e.detail;n.report===t.name&&(c(void 0),S.runDetail(t.name,n.run_id).then(o),m())};return window.addEventListener(`impulse:run`,e),()=>window.removeEventListener(`impulse:run`,e)},[m,t.name]),(0,_.useEffect)(()=>{if(!a?.active)return;let n=window.setInterval(()=>{S.runDetail(t.name,a.run_id).then(t=>{o(t),t.active||(m(),t.result===`SUCCESS`&&e())},()=>void 0)},5e3);return()=>window.clearInterval(n)},[a?.active,a?.run_id,t.name,m,e]);let h=async()=>{u(`run`),f(void 0),c(void 0);try{if(!await n())throw Error(`The report could not be saved. Fix the save error first.`);let e=await S.run(t.name);if(!e.run){c(e.preflight);return}o(await S.runDetail(t.name,e.run.run_id)),m()}catch(e){f(e.message)}finally{u(void 0)}},g=async()=>{u(`grant`),f(void 0);try{if(!await n())throw Error(`The report could not be saved. Fix the save error first.`);await S.grant(t.name)}catch(e){f(e.message),u(void 0);return}await h()},v=async()=>{if(a){u(`cancel`);try{await S.cancelRun(t.name,a.run_id),o(await S.runDetail(t.name,a.run_id))}catch(e){f(e.message)}finally{u(void 0)}}},y=a?.start_time?((a.end_time??p)-a.start_time)/1e3:null;return(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsxs)(`div`,{className:`row`,children:[(0,A.jsx)(et,{size:16}),(0,A.jsx)(`h2`,{children:`Run`})]}),a?.active?(0,A.jsxs)(`button`,{className:`btn`,onClick:()=>void v(),disabled:!!l,children:[l===`cancel`?(0,A.jsx)(`span`,{className:`spinner`}):(0,A.jsx)(gt,{size:14}),`Cancel`]}):(0,A.jsxs)(`button`,{className:`btn primary`,onClick:()=>void h(),disabled:!!l,children:[l===`run`?(0,A.jsx)(`span`,{className:`spinner`}):(0,A.jsx)(et,{size:15}),l===`run`?`Checking access`:`Run report`]})]}),d&&(0,A.jsx)(`div`,{className:`card-body`,children:(0,A.jsx)(P,{children:d})}),s&&!s.ok&&(0,A.jsx)(er,{preflight:s,busy:l,onGrant:()=>void g()}),a&&(0,A.jsxs)(`div`,{className:`card-body stack`,children:[(0,A.jsxs)(`div`,{className:`row`,children:[(0,A.jsxs)(`span`,{className:$n(a),children:[a.active&&(0,A.jsx)(`span`,{className:`spinner`}),Qn(a)]}),y!==null&&(0,A.jsx)(`span`,{className:`sub`,style:{margin:0},children:Un(y)}),(0,A.jsx)(`span`,{className:`spacer`}),a.url&&(0,A.jsxs)(`a`,{className:`btn ghost`,href:a.url,target:`_blank`,rel:`noreferrer`,children:[(0,A.jsx)(Ie,{size:14}),`Job run`]})]}),!a.active&&a.result!==`SUCCESS`&&(a.error||a.message)&&(0,A.jsxs)(`div`,{className:`run-error`,children:[(0,A.jsxs)(`div`,{className:`row`,children:[(0,A.jsx)(ke,{size:15,color:`var(--error)`}),(0,A.jsx)(`strong`,{children:a.error||a.message})]}),a.trace&&(0,A.jsxs)(`details`,{children:[(0,A.jsx)(`summary`,{children:`Error trace`}),(0,A.jsx)(`pre`,{className:`code`,children:a.trace})]})]})]}),r&&r.length>1&&(0,A.jsxs)(`details`,{className:`history`,children:[(0,A.jsx)(`summary`,{children:`Earlier runs`}),(0,A.jsx)(`table`,{className:`table compact`,children:(0,A.jsx)(`tbody`,{children:r.slice(1).map(e=>(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:$n(e),children:Qn(e)})}),(0,A.jsx)(`td`,{className:`num`,children:e.start_time?new Date(e.start_time).toLocaleString():``}),(0,A.jsx)(`td`,{className:`num`,children:e.start_time&&e.end_time?Un((e.end_time-e.start_time)/1e3):``}),(0,A.jsx)(`td`,{style:{textAlign:`right`},children:e.url&&(0,A.jsx)(`a`,{className:`btn ghost icon`,href:e.url,target:`_blank`,rel:`noreferrer`,"aria-label":`Open job run`,children:(0,A.jsx)(Ie,{size:14})})})]},e.run_id))})})]})]})}function nr(){let{spec:e,issues:t}=It(),[n,r]=(0,_.useState)(0),i=kt(()=>S.results(e.name),[e.name,n]),a=(0,_.useCallback)(()=>r(e=>e+1),[]),o=t??[];return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(rn,{title:`Review & run`,sub:`Run the report on serverless compute and inspect its results.`,report:e.name}),o.length>0?(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsx)(`div`,{className:`card-head`,children:(0,A.jsxs)(`h2`,{children:[o.length,` thing`,o.length>1?`s`:``,` to fix before running`]})}),(0,A.jsx)(`div`,{className:`card-body`,children:(0,A.jsx)(`ul`,{className:`todo`,children:o.map(t=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`a`,{href:k(e.name,t.step),children:Ot.find(e=>e.key===t.step)?.label}),(0,A.jsx)(`span`,{children:t.message})]},`${t.step}:${t.message}`))})})]}):t&&(0,A.jsx)(tr,{onSuccess:a}),(0,A.jsx)(`div`,{className:`section-head`,children:(0,A.jsx)(`h2`,{children:`Results`})}),i.error&&(0,A.jsx)(P,{children:i.error.message}),i.data?(0,A.jsx)(Jn,{results:i.data}):!i.error&&(0,A.jsx)(`div`,{className:`card`,children:(0,A.jsxs)(`div`,{className:`card-body`,children:[(0,A.jsx)(`div`,{className:`skeleton`,style:{width:`30%`,marginBottom:12}}),(0,A.jsx)(`div`,{className:`skeleton`,style:{width:`70%`}})]})})]})}var rr=e=>RegExp(`\\b${e}\\b`,`g`);function ir(e,t,n){let r=e=>e===t?n:e,i=e=>e.replace(rr(t),n),a=e.aggregations.map(e=>{switch(e.kind){case`histogram`:return{...e,signal:r(e.signal),distance:r(e.distance)};case`histogram_2d`:return{...e,x:r(e.x),y:r(e.y)};default:return{...e,signals:e.signals.map(r)}}});return{...e,signals:e.signals.map(e=>({...e,name:r(e.name),...e.kind===`expression`?{expr:i(e.expr)}:{}})),events:e.events.map(e=>({...e,expr:i(e.expr)})),aggregations:a}}function ar(e,t,n){return{...e,events:e.events.map(e=>e.name===t?{...e,name:n}:e),aggregations:e.aggregations.map(e=>e.event===t?{...e,event:n}:e)}}function or(e,t){let n=rr(t);return[...e.signals.flatMap(e=>e.kind===`expression`&&e.name!==t?[e.expr]:[]),...e.events.map(e=>e.expr)].filter(e=>e.match(n)).length+e.aggregations.filter(e=>e.kind===`histogram`?e.signal===t||e.distance===t:e.kind===`histogram_2d`?e.x===t||e.y===t:e.signals.includes(t)).length}function sr(e){return Object.values(e).filter(Boolean).join(` · `)}var cr=200;function lr(){let{spec:e,update:t}=It(),{catalog:n,schema:r}=e.source,i=kt(()=>n&&r?S.channels(n,r,e.uuts,e.window):null,[JSON.stringify([n,r,e.uuts,e.window])]),a=cn(i.loading),[o,s]=(0,_.useState)(``),c=new Set(e.signals.flatMap(e=>e.kind===`channel`?[sr(e.channel)]:[])),l=i.data?.channels??[],u=o.trim().toLowerCase(),d=u?l.filter(e=>sr(e.channel).toLowerCase().includes(u)):l,f=Math.max(0,...l.map(e=>e.containers)),p=e=>t(t=>{let n={kind:`channel`,name:_n(sr(e.channel),t.signals.map(e=>e.name)),channel:e.channel,unit:e.unit,desc:``,min:e.min,max:e.max};return{...t,signals:[...t.signals,n]}});return(0,A.jsxs)(`div`,{className:`card picker`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsx)(`h2`,{children:`Channels`}),(0,A.jsxs)(`span`,{className:`sub row`,style:{margin:0},children:[i.loading&&a&&(0,A.jsx)(`span`,{className:`spinner`}),i.data?`${l.length} channels`:a?`Starting SQL warehouse`:``]})]}),(0,A.jsxs)(`div`,{className:`search`,children:[(0,A.jsx)(ot,{size:14}),(0,A.jsx)(`input`,{className:`input`,placeholder:`Search channels`,value:o,onChange:e=>s(e.target.value),"aria-label":`Search channels`})]}),i.error&&(0,A.jsx)(`div`,{className:`card-body`,children:(0,A.jsx)(P,{children:i.error.message})}),(0,A.jsxs)(`div`,{className:`picker-list`,children:[(0,A.jsx)(`table`,{className:`table compact`,children:(0,A.jsx)(`tbody`,{children:i.loading&&!i.data?(0,A.jsx)(tn,{rows:7,columns:3}):d.slice(0,cr).map(e=>{let t=sr(e.channel);return(0,A.jsxs)(`tr`,{children:[(0,A.jsxs)(`td`,{children:[(0,A.jsx)(`div`,{className:`channel-name`,children:t}),(0,A.jsxs)(`div`,{className:`channel-meta`,children:[e.unit&&(0,A.jsx)(`span`,{children:e.unit}),e.min!==null&&e.max!==null&&(0,A.jsxs)(`span`,{children:[bn(e.min),` to `,bn(e.max)]})]})]}),(0,A.jsxs)(`td`,{className:`num`,title:`Recordings that contain this channel`,children:[e.containers,`/`,f]}),(0,A.jsx)(`td`,{style:{textAlign:`right`,width:44},children:c.has(t)?(0,A.jsx)(`span`,{className:`added`,title:`Added`,children:(0,A.jsx)(Ce,{size:15})}):(0,A.jsx)(`button`,{className:`btn icon`,onClick:()=>p(e),"aria-label":`Add ${t}`,title:`Add as signal`,children:(0,A.jsx)(nt,{size:15})})})]},t)})})}),i.data&&d.length===0&&(0,A.jsx)(`div`,{className:`more`,children:`No channels match`}),d.length>cr&&(0,A.jsxs)(`div`,{className:`more`,children:[`Showing `,cr,` of `,d.length,`; refine the search`]})]})]})}function ur(){let{spec:e,update:t}=It(),n=Lt(`signals`),r=e.signals.map(e=>e.name),i=(e,n)=>t(t=>({...t,signals:t.signals.map((t,r)=>r===e?{...t,...n}:t)})),a=n=>{let r=or(e,n);(!r||window.confirm(`${n} is used in ${r} place${r>1?`s`:``}. Remove it anyway?`))&&t(e=>({...e,signals:e.signals.filter(e=>e.name!==n)}))};return(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsx)(`h2`,{children:`Signals`}),(0,A.jsxs)(`button`,{className:`btn`,onClick:()=>t(e=>({...e,signals:[...e.signals,{kind:`expression`,name:_n(`derived`,e.signals.map(e=>e.name)),expr:``,unit:``,desc:``}]})),disabled:!e.signals.length,children:[(0,A.jsx)(nt,{size:15}),`Derived signal`]})]}),e.signals.length===0?(0,A.jsx)(nn,{icon:(0,A.jsx)(wt,{size:22}),title:`No signals yet`,children:`Add channels from the list.`}):(0,A.jsxs)(`table`,{className:`table`,children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{style:{width:190},children:`Name`}),(0,A.jsx)(`th`,{children:`Definition`}),(0,A.jsx)(`th`,{style:{width:96},children:`Unit`}),(0,A.jsx)(`th`,{style:{width:44}})]})}),(0,A.jsx)(`tbody`,{children:e.signals.map((e,o)=>{let s=n.of(e.name);return(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(an,{value:e.name,taken:r.filter(t=>t!==e.name),check:hn,label:`Signal name`,onCommit:n=>t(t=>ir(t,e.name,n))})}),(0,A.jsxs)(`td`,{children:[e.kind===`channel`?(0,A.jsx)(`span`,{className:`channel-name`,children:sr(e.channel)}):(0,A.jsx)(on,{mono:!0,value:e.expr,placeholder:`(amb_temp + intake_temp) / 2`,invalid:s.length>0,label:`Expression for ${e.name}`,onChange:e=>i(o,{expr:e})}),(0,A.jsx)(en,{messages:s})]}),(0,A.jsx)(`td`,{children:(0,A.jsx)(on,{value:e.unit,label:`Unit of ${e.name}`,onChange:e=>i(o,{unit:e})})}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`button`,{className:`btn ghost icon danger`,onClick:()=>a(e.name),"aria-label":`Remove ${e.name}`,children:(0,A.jsx)(bt,{size:15})})})]},o)})})]})]})}function dr(){let{spec:e,update:t}=It(),n=Lt(`signals`),r=e.events.map(e=>e.name),i=(e,n)=>t(t=>({...t,events:t.events.map((t,r)=>r===e?{...t,...n}:t)})),a=n=>{let r=e.aggregations.filter(e=>e.event===n).length;(!r||window.confirm(`${n} scopes ${r} aggregation${r>1?`s`:``}. Remove it anyway?`))&&t(e=>({...e,events:e.events.filter(e=>e.name!==n),aggregations:e.aggregations.map(e=>e.event===n?{...e,event:``}:e)}))};return(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsx)(`h2`,{children:`Events`}),(0,A.jsxs)(`button`,{className:`btn`,onClick:()=>t(e=>({...e,events:[...e.events,{kind:`condition`,name:_n(`event`,e.events.map(e=>e.name),`event`),expr:``,desc:``}]})),disabled:!e.signals.length,children:[(0,A.jsx)(nt,{size:15}),`Event`]})]}),e.events.length===0?(0,A.jsx)(nn,{icon:(0,A.jsx)(Be,{size:22}),title:`No events`}):(0,A.jsxs)(`table`,{className:`table`,children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{style:{width:190},children:`Name`}),(0,A.jsx)(`th`,{style:{width:150},children:`Kind`}),(0,A.jsx)(`th`,{children:`Expression`}),(0,A.jsx)(`th`,{style:{width:220},children:`Description`}),(0,A.jsx)(`th`,{style:{width:44}})]})}),(0,A.jsx)(`tbody`,{children:e.events.map((e,o)=>{let s=n.of(e.name);return(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(an,{value:e.name,taken:r.filter(t=>t!==e.name),check:gn,label:`Event name`,onCommit:n=>t(t=>ar(t,e.name,n))})}),(0,A.jsx)(`td`,{children:(0,A.jsxs)(`select`,{className:`select`,value:e.kind,onChange:e=>i(o,{kind:e.target.value}),"aria-label":`Event kind`,children:[(0,A.jsx)(`option`,{value:`condition`,children:`Condition`}),(0,A.jsx)(`option`,{value:`points`,children:`Points in time`})]})}),(0,A.jsxs)(`td`,{children:[(0,A.jsx)(on,{mono:!0,value:e.expr,placeholder:e.kind===`condition`?`(veh_spd > 0) & (eng_rpm > 3000)`:`veh_spd.rising_edges()`,invalid:s.length>0,label:`Expression for ${e.name}`,onChange:e=>i(o,{expr:e})}),(0,A.jsx)(en,{messages:s})]}),(0,A.jsx)(`td`,{children:(0,A.jsx)(on,{value:e.desc,placeholder:`Optional`,label:`Description of ${e.name}`,onChange:e=>i(o,{desc:e})})}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`button`,{className:`btn ghost icon danger`,onClick:()=>a(e.name),"aria-label":`Remove ${e.name}`,children:(0,A.jsx)(bt,{size:15})})})]},o)})})]})]})}function fr(){let{spec:e}=It(),t=Lt(`signals`);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(rn,{title:`Signals`,sub:`Pick channels, derive signals from them and define the events that scope aggregations.`,report:e.name,next:{step:`aggregations`,label:`Aggregations`},ready:e.signals.length>0&&t.all.length===0}),!e.uuts.length&&(0,A.jsx)(P,{warn:!0,children:`No units under test are selected, so channels from all recordings are listed.`}),(0,A.jsxs)(`div`,{className:`split`,children:[(0,A.jsx)(lr,{}),(0,A.jsx)(ur,{})]}),(0,A.jsx)(dr,{})]})}function pr(){let{spec:e,update:t}=It(),n=Lt(`uuts`),{catalog:r,schema:i}=e.source,a=!!(r&&i),o=kt(()=>a?S.uuts(r,i):null,[r,i]),s=cn(o.loading),c=new Set(e.uuts),l=o.data?.uuts??[],u=l.length>0&&l.every(e=>c.has(e.id)),d=l.map(e=>e.first).filter(Boolean).sort()[0]??null,f=l.map(e=>e.last).filter(Boolean).sort().reverse()[0]??null,p=!e.window.start&&!e.window.stop,m=e.window.start===d&&e.window.stop===f;(0,_.useEffect)(()=>{p&&!o.loading&&d&&f&&t(e=>({...e,window:{start:d,stop:f}}))},[p,o.loading,d,f,t]);let h=e=>t(t=>({...t,uuts:t.uuts.includes(e)?t.uuts.filter(t=>t!==e):[...t.uuts,e]})),g=()=>t(e=>({...e,uuts:u?[]:l.map(e=>e.id)})),v=(e,n)=>t(t=>({...t,window:{...t.window,[e]:n||null}}));return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(rn,{title:`Units under test`,sub:`Choose the units under test and the time window of their recordings.`,report:e.name,next:{step:`signals`,label:`Signals`},ready:e.uuts.length>0&&n.all.length===0}),!a&&(0,A.jsxs)(P,{warn:!0,children:[`Choose a source catalog and schema in `,(0,A.jsx)(`a`,{href:k(e.name,`data`),children:`Data`}),` first.`]}),o.error&&(0,A.jsx)(P,{children:o.error.message}),o.data&&o.data.issues.length>0&&(0,A.jsx)(P,{children:o.data.issues.map(e=>(0,A.jsx)(`div`,{children:e},e))}),a&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsxs)(`h2`,{children:[e.uuts.length,` of `,l.length,` selected`]}),s&&(0,A.jsxs)(`span`,{className:`row sub`,style:{margin:0},children:[(0,A.jsx)(`span`,{className:`spinner`}),`Starting SQL warehouse`]})]}),!o.loading&&l.length===0&&!o.error?(0,A.jsx)(nn,{icon:(0,A.jsx)(ye,{size:22}),title:`No units under test found`,children:!o.data?.issues.length&&`The container tables in ${r}.${i} contain no unit under test ids. Set uut.key on the Data model page to the column or tag that holds them.`}):(0,A.jsx)(`div`,{className:`table-scroll`,children:(0,A.jsxs)(`table`,{className:`table`,children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{style:{width:36},children:(0,A.jsx)(`input`,{className:`checkbox`,type:`checkbox`,checked:u,onChange:g,"aria-label":`Select all units under test`})}),(0,A.jsx)(`th`,{children:`Unit under test`}),(0,A.jsx)(`th`,{children:`Recordings`}),(0,A.jsx)(`th`,{children:`First`}),(0,A.jsx)(`th`,{children:`Last`})]})}),(0,A.jsx)(`tbody`,{children:o.loading&&!o.data?(0,A.jsx)(tn,{rows:4,columns:5}):l.map(e=>(0,A.jsxs)(`tr`,{className:`clickable`,onClick:()=>h(e.id),children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(`input`,{className:`checkbox`,type:`checkbox`,checked:c.has(e.id),onChange:()=>h(e.id),onClick:e=>e.stopPropagation(),"aria-label":`Select ${e.id}`})}),(0,A.jsx)(`td`,{style:{fontWeight:550},children:e.id}),(0,A.jsx)(`td`,{className:`num`,children:e.containers}),(0,A.jsx)(`td`,{className:`num`,children:e.first}),(0,A.jsx)(`td`,{className:`num`,children:e.last})]},e.id))})]})})]}),(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsxs)(`div`,{className:`row`,children:[(0,A.jsx)(`h2`,{children:`Time window`}),(0,A.jsx)(`span`,{className:`sub`,style:{margin:0},children:`Includes recordings that start and stop inside the window`})]}),d&&f&&!m&&(0,A.jsx)(`button`,{className:`btn ghost`,onClick:()=>t(e=>({...e,window:{start:d,stop:f}})),children:`Full range`})]}),(0,A.jsxs)(`div`,{className:`card-body`,children:[(0,A.jsxs)(`div`,{className:`grid`,style:{maxWidth:560},children:[(0,A.jsx)(N,{label:`From`,hint:d?`Earliest recording ${d}`:void 0,children:(0,A.jsx)(on,{mono:!0,value:e.window.start??``,label:`Window start`,onChange:e=>v(`start`,e)})}),(0,A.jsx)(N,{label:`To`,hint:f?`Latest recording ${f}`:void 0,children:(0,A.jsx)(on,{mono:!0,value:e.window.stop??``,label:`Window stop`,onChange:e=>v(`stop`,e)})})]}),(0,A.jsx)(en,{messages:n.general.filter(e=>e!==`Select at least one unit under test`)})]})]})]})]})}var mr=m();function hr(){let[e,t]=(0,_.useState)(),[n,r]=(0,_.useState)(),[i,a]=(0,_.useState)(),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(),u=(0,_.useRef)(null),d=(0,_.useRef)(null),f=!!e;(0,_.useEffect)(()=>{if(!f)return;l(void 0),s(!1),S.settings().then(r,e=>l(e.message)),S.settingsOptions().then(a,e=>l(e.message));let e=()=>t(void 0),n=t=>{let n=t.target;!d.current?.contains(n)&&!u.current?.contains(n)&&e()},i=t=>{t.key===`Escape`&&e()};return document.addEventListener(`pointerdown`,n),document.addEventListener(`keydown`,i),window.addEventListener(`resize`,e),()=>{document.removeEventListener(`pointerdown`,n),document.removeEventListener(`keydown`,i),window.removeEventListener(`resize`,e)}},[f]),(0,_.useEffect)(()=>{if(!o)return;let e=window.setTimeout(()=>s(!1),1500);return()=>window.clearTimeout(e)},[o]);let p=()=>{let e=u.current?.getBoundingClientRect();t(f||!e?void 0:{top:e.bottom+6,right:window.innerWidth-e.right})},m=async e=>{if(!n)return;let t=n;r({...n,...e}),s(!1),l(void 0);try{r(await S.saveSettings({warehouse_id:t.warehouse_id,serving_endpoint:t.serving_endpoint,...e})),s(!0)}catch(e){r(t),l(e.message)}},h=i?.warehouses??[],g=i?.models??[],v=!n||!i,y=n&&(h.find(e=>e.id===n.default_warehouse_id)?.name??n.default_warehouse_id);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`button`,{ref:u,className:`btn ghost${f?` active`:``}`,onClick:p,"aria-expanded":f,"aria-haspopup":`dialog`,children:[(0,A.jsx)(ct,{size:15}),`Settings`]}),e&&(0,mr.createPortal)((0,A.jsxs)(`div`,{ref:d,className:`settings-pop`,style:e,role:`dialog`,"aria-label":`Settings`,children:[(0,A.jsxs)(`div`,{className:`field`,children:[(0,A.jsx)(`label`,{htmlFor:`settings-warehouse`,children:`SQL warehouse`}),(0,A.jsxs)(`select`,{id:`settings-warehouse`,className:`select`,value:n?.warehouse_id??``,disabled:v,onChange:e=>void m({warehouse_id:e.target.value}),children:[(0,A.jsx)(`option`,{value:``,children:v?`Loading…`:y?`App default · ${y}`:`App default`}),n?.warehouse_id&&!h.some(e=>e.id===n.warehouse_id)&&(0,A.jsx)(`option`,{value:n.warehouse_id,children:n.warehouse_id}),h.map(e=>(0,A.jsx)(`option`,{value:e.id,children:`${e.name} · ${e.state.toLowerCase()}`},e.id))]}),(0,A.jsx)(`span`,{className:i?.warehouses_error?`hint bad`:`hint`,children:i?.warehouses_error??`Used for the app's queries. Report jobs run on serverless compute.`})]}),(0,A.jsxs)(`div`,{className:`field`,children:[(0,A.jsx)(`label`,{htmlFor:`settings-model`,children:`Chat model`}),(0,A.jsxs)(`select`,{id:`settings-model`,className:`select`,value:n?.serving_endpoint??``,disabled:v,onChange:e=>void m({serving_endpoint:e.target.value}),children:[(0,A.jsx)(`option`,{value:``,children:v?`Loading…`:n?.default_model?`Automatic · ${n.default_model}`:`Automatic`}),n?.serving_endpoint&&!g.some(e=>e.name===n.serving_endpoint)&&(0,A.jsx)(`option`,{value:n.serving_endpoint,children:n.serving_endpoint}),g.map(e=>(0,A.jsx)(`option`,{value:e.name,children:e.ready?e.name:`${e.name} · not ready`},e.name))]}),i?.models_error&&(0,A.jsx)(`span`,{className:`hint bad`,children:i.models_error})]}),(0,A.jsx)(en,{messages:c?[c]:[]}),(0,A.jsxs)(`div`,{className:`settings-foot`,children:[(0,A.jsxs)(`a`,{className:`btn ghost`,href:`#/data-model`,onClick:()=>t(void 0),children:[(0,A.jsx)(Pe,{size:15}),`Data model`]}),o&&(0,A.jsxs)(`span`,{className:`settings-saved`,role:`status`,children:[(0,A.jsx)(Ce,{size:14}),`Saved`]})]})]}),document.body)]})}function gr(e){let t=(e.split(`@`)[0]??``).split(/[._-]/).filter(Boolean);return((t[0]?.[0]??``)+(t[1]?.[0]??``)).toUpperCase()||`?`}function _r({me:e,crumb:t,center:n,status:r}){return(0,A.jsxs)(`header`,{className:`topbar`,children:[(0,A.jsxs)(`div`,{className:`topbar-left`,children:[(0,A.jsxs)(`a`,{className:`logo`,href:`#/`,children:[(0,A.jsx)(`span`,{className:`logo-mark`,children:(0,A.jsx)(pe,{size:16,strokeWidth:2.6})}),`Impulse`]}),(0,A.jsxs)(`nav`,{className:`crumbs`,"aria-label":`Breadcrumb`,children:[(0,A.jsx)(E,{size:14}),(0,A.jsx)(`a`,{href:`#/`,children:`Reports`}),t&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(E,{size:14}),(0,A.jsx)(`span`,{className:`current`,children:t})]})]})]}),(0,A.jsx)(`div`,{children:n}),(0,A.jsxs)(`div`,{className:`topbar-right`,children:[r,(0,A.jsx)(hr,{}),e&&(0,A.jsxs)(`span`,{className:`chip`,children:[`Impulse `,e.impulse_version]}),e&&(0,A.jsx)(`span`,{className:`avatar`,title:e.email,children:gr(e.email)})]})]})}function vr(e,t){let n=(e,n)=>{let r=(t??[]).some(t=>t.step===e);return n&&!r?`done`:n&&r?`bad`:`todo`};return{data:n(`data`,!!(e.source.catalog&&e.source.schema)),uuts:n(`uuts`,e.uuts.length>0),signals:n(`signals`,e.signals.length>0),aggregations:n(`aggregations`,e.aggregations.length>0),run:`todo`}}function yr({name:e,step:t,states:n}){return(0,A.jsx)(`nav`,{className:`stepper`,"aria-label":`Report steps`,children:Ot.map((r,i)=>{let a=r.key===t,o=n[r.key];return(0,A.jsxs)(_.Fragment,{children:[i>0&&(0,A.jsx)(`span`,{className:`step-sep`}),(0,A.jsxs)(`a`,{href:k(e,r.key),className:`step${a?` active`:``}${o===`done`&&!a?` done`:``}${o===`bad`?` bad`:``}`,"aria-current":a?`step`:void 0,children:[(0,A.jsx)(`span`,{className:`step-index`,children:o===`done`&&!a?(0,A.jsx)(Ce,{size:12,strokeWidth:3}):i+1}),r.label]})]},r.key)})})}function br({state:e}){return e===`saving`?(0,A.jsxs)(`span`,{className:`save-state`,children:[(0,A.jsx)(`span`,{className:`spinner`}),`Saving`]}):e===`saved`?(0,A.jsxs)(`span`,{className:`save-state`,children:[(0,A.jsx)(Ce,{size:13}),`Saved`]}):e===`error`||e===`conflict`?(0,A.jsxs)(`span`,{className:`save-state bad`,children:[(0,A.jsx)(St,{size:13}),`Not saved`]}):null}function xr({me:e,step:t,onReload:n}){let{spec:r,save:i,saveError:a,issues:o}=It();return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(_r,{me:e,crumb:r.name,center:(0,A.jsx)(yr,{name:r.name,step:t,states:vr(r,o)}),status:(0,A.jsx)(br,{state:i})}),(0,A.jsxs)(`main`,{className:`main`,children:[i===`conflict`&&(0,A.jsxs)(P,{warn:!0,children:[`This report was changed in another tab or by another user.`,` `,(0,A.jsx)(`button`,{className:`btn ghost`,style:{height:24},onClick:n,children:`Reload`})]}),i===`error`&&(0,A.jsxs)(P,{children:[`Saving failed: `,a]}),t===`data`&&(0,A.jsx)(Nn,{}),t===`uuts`&&(0,A.jsx)(pr,{}),t===`signals`&&(0,A.jsx)(fr,{}),t===`aggregations`&&(0,A.jsx)(On,{}),t===`run`&&(0,A.jsx)(nr,{})]})]})}function Sr({me:e,name:t,step:n}){let r=kt(()=>S.report(t),[t]),{reload:i}=r;return(0,_.useEffect)(()=>{let e=e=>{e.detail.report===t&&i()};return window.addEventListener(`impulse:spec`,e),()=>window.removeEventListener(`impulse:spec`,e)},[t,i]),r.data?(0,A.jsx)(Rt,{initial:r.data,children:(0,A.jsx)(xr,{me:e,step:n,onReload:r.reload})},`${r.data.name}:${r.data.revision}`):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(_r,{me:e,crumb:t}),(0,A.jsx)(`main`,{className:`main`,children:r.error?(0,A.jsx)(P,{children:r.error.message}):(0,A.jsx)(`div`,{className:`card`,children:(0,A.jsxs)(`div`,{className:`card-body`,children:[(0,A.jsx)(`div`,{className:`skeleton`,style:{width:`35%`,marginBottom:12}}),(0,A.jsx)(`div`,{className:`skeleton`,style:{width:`60%`}})]})})})]})}var Cr=`silver_catalog: main +silver_schema: measurements +tables: + channels: channel_data +uut: + key: uut_id +solver_config: + container_metrics: + column_name_mapping: + measurement_id: container_id`;function wr({me:e}){let t=kt(()=>S.model(),[]),n=kt(()=>S.catalogs(),[]),[r,i]=(0,_.useState)(),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(``),l=kt(()=>a?S.schemas(a):null,[a]),[u,d]=(0,_.useState)(),[f,p]=(0,_.useState)(),[m,h]=(0,_.useState)(),[g,v]=(0,_.useState)(!1);(0,_.useEffect)(()=>{t.data&&r===void 0&&i(t.data.yaml)},[t.data,r]);let y=async e=>{p(e),h(void 0),v(!1),e===`check`&&d(void 0);try{e===`check`?d(await S.checkModel(r??``,a,s)):(await S.saveModel(r??``),v(!0))}catch(e){h(e.message)}finally{p(void 0)}};return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(_r,{me:e,crumb:`Data model`}),(0,A.jsxs)(`main`,{className:`main`,children:[(0,A.jsxs)(`div`,{className:`page-head`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h1`,{children:`Data model`}),(0,A.jsxs)(`p`,{className:`sub`,children:[`How Impulse finds your silver tables. Leave this empty for the standard Impulse layout; list only the settings that differ. Shared by all users`,t.data?` in ${t.data.path}`:``,`.`]})]}),(0,A.jsxs)(`div`,{className:`row`,children:[(0,A.jsxs)(`button`,{className:`btn`,disabled:!!f||r===void 0,onClick:()=>void y(`check`),children:[f===`check`?(0,A.jsx)(`span`,{className:`spinner`}):(0,A.jsx)(vt,{size:15}),`Test`]}),(0,A.jsxs)(`button`,{className:`btn primary`,disabled:!!f||r===void 0,onClick:()=>void y(`save`),children:[f===`save`?(0,A.jsx)(`span`,{className:`spinner`}):(0,A.jsx)(it,{size:15}),`Save`]})]})]}),t.error&&(0,A.jsx)(P,{children:t.error.message}),t.data?.error&&(0,A.jsxs)(P,{children:[`The saved file is invalid: `,t.data.error]}),m&&(0,A.jsx)(P,{children:m}),g&&(0,A.jsxs)(`div`,{className:`banner ok`,role:`status`,children:[(0,A.jsx)(Te,{size:16}),`Saved. New and reopened reports use this data model.`]}),(0,A.jsxs)(`div`,{className:`split wide`,children:[(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsx)(`h2`,{children:`config.yaml`}),(0,A.jsx)(`span`,{className:`sub`,style:{margin:0},children:t.data?t.data.exists?`Customized`:`Using defaults`:``})]}),(0,A.jsx)(`textarea`,{className:`editor`,value:r??``,placeholder:`Empty: the standard Impulse layout is used.`,spellCheck:!1,"aria-label":`Data model YAML`,onChange:e=>{i(e.target.value),v(!1)}})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsxs)(`div`,{className:`card`,children:[(0,A.jsx)(`div`,{className:`card-head`,children:(0,A.jsx)(`h2`,{children:`Test against a schema`})}),(0,A.jsxs)(`div`,{className:`card-body stack`,children:[(0,A.jsxs)(`div`,{className:`grid`,children:[(0,A.jsx)(N,{label:`Catalog`,children:(0,A.jsx)($t,{value:a,options:n.data,placeholder:`silver_catalog`,onChange:e=>(o(e),c(``))})}),(0,A.jsx)(N,{label:`Schema`,children:(0,A.jsx)($t,{value:s,options:a?l.data:[],placeholder:`silver_schema`,disabled:!a,onChange:c})})]}),u?.source?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Mn,{source:u.source}),u.uuts!==null&&(0,A.jsxs)(`p`,{className:`sub`,children:[u.uuts,` unit`,u.uuts===1?``:`s`,` under test found with your permissions.`]})]}):u&&(0,A.jsx)(P,{warn:!0,children:u.issues.join(` `)})]})]}),(0,A.jsxs)(`details`,{className:`card reference`,children:[(0,A.jsx)(`summary`,{className:`card-head`,children:(0,A.jsx)(`h2`,{children:`Example`})}),(0,A.jsx)(`pre`,{className:`code`,children:Cr})]})]})]}),(0,A.jsxs)(`details`,{className:`card reference`,children:[(0,A.jsx)(`summary`,{className:`card-head`,children:(0,A.jsx)(`h2`,{children:`All settings and defaults`})}),(0,A.jsxs)(`table`,{className:`table settings-table`,children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{children:`Setting`}),(0,A.jsx)(`th`,{children:`Default`}),(0,A.jsx)(`th`,{children:`Description`})]})}),(0,A.jsx)(`tbody`,{children:t.data?.reference.map(e=>(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{className:`mono`,children:e.key}),(0,A.jsx)(`td`,{className:`mono`,children:e.default}),(0,A.jsxs)(`td`,{children:[e.description,e.example&&(0,A.jsx)(`pre`,{className:`code`,children:e.example})]})]},e.key))})]})]})]})]})}function Tr(){let e=jt(),t=kt(()=>S.me(),[]);return(0,_.useEffect)(()=>{S.warmup().catch(()=>void 0)},[]),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(ln,{resetKey:window.location.hash,children:[e.page===`home`&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(_r,{me:t.data}),(0,A.jsx)(fn,{})]}),e.page===`data-model`&&(0,A.jsx)(wr,{me:t.data}),e.page===`report`&&(0,A.jsx)(Sr,{me:t.data,name:e.name,step:e.step},e.name)]}),(0,A.jsx)(M,{report:e.page===`report`?e.name:null})]})}(0,v.createRoot)(document.getElementById(`root`)).render((0,A.jsx)(_.StrictMode,{children:(0,A.jsx)(Tr,{})}));export{o as t}; \ No newline at end of file diff --git a/apps/adhoc-reporting/frontend/dist/assets/index-CbcUiC_u.css b/apps/adhoc-reporting/frontend/dist/assets/index-CbcUiC_u.css new file mode 100644 index 00000000..ab589f51 --- /dev/null +++ b/apps/adhoc-reporting/frontend/dist/assets/index-CbcUiC_u.css @@ -0,0 +1 @@ +:root{--bg:#0b0b0c;--surface:#141416;--raised:#1c1c1f;--hover:#232327;--border:#2a2a2e;--border-strong:#3a3a40;--text:#f4f4f5;--text-2:#a1a1aa;--muted:#71717a;--accent:#ff3621;--accent-hover:#ff5f46;--accent-press:#e02e1b;--accent-soft:#ff36211f;--success:#22c55e;--warning:#f59e0b;--error:#f87171;--error-soft:#f871711a;--radius:6px;--radius-lg:10px;--shadow:0 12px 40px #0000008c, 0 0 0 1px var(--border);--font:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--mono:"SF Mono", ui-monospace, Menlo, Consolas, monospace;--topbar:52px;--chat-dock:0px}*{box-sizing:border-box;margin:0}html,body,#root{height:100%}body{background:var(--bg);color:var(--text);font:13px/20px var(--font);-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit;color:inherit}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}a{color:inherit;text-decoration:none}.topbar{z-index:10;height:var(--topbar);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--border);background:#0b0b0ceb;grid-template-columns:minmax(0,1fr) auto minmax(max-content,1fr);align-items:center;gap:16px;padding:0 20px;display:grid;position:sticky;top:0}.topbar-left,.topbar-right{align-items:center;gap:12px;min-width:0;display:flex}.topbar-right{justify-content:flex-end}.logo{letter-spacing:-.01em;align-items:center;gap:8px;font-size:15px;font-weight:650;display:flex}.logo-mark{background:var(--accent);color:#fff;border-radius:7px;place-items:center;width:26px;height:26px;display:grid}.crumbs{color:var(--text-2);align-items:center;gap:6px;min-width:0;display:flex}.crumbs a:hover{color:var(--text)}.crumbs .current{color:var(--text);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chip{border:1px solid var(--border);height:22px;color:var(--text-2);white-space:nowrap;border-radius:999px;align-items:center;gap:6px;padding:0 8px;font-size:12px;display:inline-flex}.avatar{background:var(--raised);border:1px solid var(--border-strong);border-radius:50%;place-items:center;width:28px;height:28px;font-size:11px;font-weight:600;display:grid}.stepper{align-items:center;gap:4px;display:flex}.step{height:32px;color:var(--text-2);cursor:pointer;background:0 0;border:0;border-radius:999px;align-items:center;gap:8px;padding:0 12px 0 6px;transition:background .12s,color .12s;display:flex}.step:hover{background:var(--hover);color:var(--text)}.step-index{border:1px solid var(--border-strong);border-radius:50%;place-items:center;width:20px;height:20px;font-size:11px;font-weight:600;display:grid}.step.active{color:var(--text);background:var(--raised)}.step.active .step-index{border-color:var(--accent);background:var(--accent);color:#fff}.step.done .step-index{border-color:var(--success);color:var(--success)}.step-sep{background:var(--border-strong);width:14px;height:1px}.main{max-width:1180px;padding:28px calc(24px + var(--chat-dock)) 96px 24px;margin:0 auto;transition:padding-right .16s}.page-head{justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:20px;display:flex}h1{letter-spacing:-.015em;font-size:22px;font-weight:650;line-height:28px}h2{font-size:14px;font-weight:600}.sub{color:var(--text-2);margin-top:4px}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg)}.card+.card{margin-top:16px}.card-head{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;display:flex}.card-body{padding:18px}.grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;display:grid}.field{flex-direction:column;gap:6px;display:flex}.field label{color:var(--text-2);font-size:12px;font-weight:500}.field .hint{color:var(--muted);font-size:12px}.field .hint.bad{color:var(--error)}.input,.select{background:var(--bg);border:1px solid var(--border-strong);border-radius:var(--radius);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;outline:none;height:34px;padding:0 10px;transition:border-color .12s,box-shadow .12s}.input:hover,.select:hover{border-color:#4a4a52}.input:focus,.select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.input:disabled,.select:disabled{opacity:.5}.btn{border-radius:var(--radius);border:1px solid var(--border-strong);background:var(--raised);cursor:pointer;white-space:nowrap;justify-content:center;align-items:center;gap:6px;height:34px;padding:0 14px;font-weight:550;transition:background .12s,border-color .12s,transform 60ms;display:inline-flex}.btn:hover{background:var(--hover)}.btn:active{transform:translateY(1px)}.btn:disabled{opacity:.5;cursor:default}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}.btn.primary:active{background:var(--accent-press)}.btn.ghost{color:var(--text-2);background:0 0;border-color:#0000}.btn.ghost:hover{background:var(--hover);color:var(--text)}.btn.icon{width:30px;height:30px;padding:0}.btn.danger:hover{color:var(--error)}.row{align-items:center;gap:10px;display:flex}.spacer{flex:1}.table{border-collapse:collapse;width:100%}.table th{text-align:left;color:var(--muted);border-bottom:1px solid var(--border);padding:10px 18px;font-size:12px;font-weight:500}.table td{border-bottom:1px solid var(--border);vertical-align:middle;padding:11px 18px}.table tr:last-child td{border-bottom:0}.table tbody tr.clickable{cursor:pointer}.table tbody tr:hover td{background:#ffffff05}.num{font-variant-numeric:tabular-nums;color:var(--text-2)}.mono{font-family:var(--mono);font-size:12px}.badge{letter-spacing:.02em;background:var(--raised);border:1px solid var(--border-strong);height:20px;color:var(--text-2);border-radius:4px;align-items:center;gap:5px;padding:0 7px;font-size:11px;font-weight:600;display:inline-flex}.badge.ok{color:var(--success);background:#22c55e14;border-color:#22c55e59}.badge.bad{color:var(--error);background:var(--error-soft);border-color:#f8717159}.badge.red{color:#fff;border-color:var(--accent);background:var(--accent)}.banner{border-radius:var(--radius);background:var(--error-soft);color:#fecaca;border:1px solid #f8717159;align-items:flex-start;gap:10px;margin-bottom:16px;padding:10px 14px;display:flex}.banner.warn{color:#fde68a;background:#f59e0b14;border-color:#f59e0b59}.empty{color:var(--text-2);text-align:center;flex-direction:column;align-items:center;gap:10px;padding:48px 24px;display:flex}.empty .glyph{background:var(--accent-soft);width:44px;height:44px;color:var(--accent);border-radius:12px;place-items:center;display:grid}.skeleton{background:linear-gradient(90deg, var(--raised) 25%, var(--hover) 50%, var(--raised) 75%);background-size:200% 100%;border-radius:4px;height:12px;animation:1.2s infinite shimmer}@keyframes shimmer{to{background-position:-200% 0}}.spinner{border:2px solid var(--border-strong);border-top-color:var(--accent);border-radius:50%;width:14px;height:14px;animation:.7s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.save-state{color:var(--muted);align-items:center;gap:6px;font-size:12px;display:inline-flex}.save-state.bad{color:var(--error)}.checklist{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px;display:grid}.check-item{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg);align-items:center;gap:8px;min-width:0;padding:8px 10px;display:flex}.check-item .name{font-weight:500}.check-item .path{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.checkbox{width:15px;height:15px;accent-color:var(--accent)}.chat-launcher{z-index:30;background:var(--accent);color:#fff;cursor:pointer;border:0;border-radius:50%;place-items:center;width:48px;height:48px;transition:transform .12s,background .12s;display:grid;position:fixed;bottom:24px;right:24px;box-shadow:0 8px 24px #ff362159}.chat-launcher:hover{background:var(--accent-hover);transform:translateY(-1px)}.chat{z-index:40;background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow);flex-direction:column;animation:.14s ease-out pop;display:flex;position:fixed;overflow:hidden}@keyframes pop{0%{opacity:0;transform:translateY(6px)scale(.985)}}.chat.docked{box-shadow:-1px 0 0 var(--border);border-radius:0;animation:none}.chat-head{border-bottom:1px solid var(--border);background:var(--raised);cursor:grab;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;height:42px;padding:0 6px 0 14px;display:flex}.chat-head:active{cursor:grabbing}.chat.docked .chat-head{cursor:default}.chat-title{align-items:center;gap:8px;font-weight:600;display:flex}.chat-dot{background:var(--accent);width:7px;height:7px;box-shadow:0 0 0 3px var(--accent-soft);border-radius:50%}.chat-body{flex-direction:column;flex:1;gap:12px;padding:16px;display:flex;overflow-y:auto}.msg{border-radius:10px;max-width:88%;padding:9px 12px;line-height:19px}.msg.assistant{background:var(--raised);border:1px solid var(--border)}.msg.user{background:var(--accent);color:#fff;align-self:flex-end}.chat-compose{border-top:1px solid var(--border);gap:8px;padding:10px;display:flex}.chat-compose textarea{resize:none;background:var(--bg);border:1px solid var(--border-strong);border-radius:var(--radius);outline:none;flex:1;min-height:38px;max-height:140px;padding:9px 10px}.chat-compose textarea:focus{border-color:var(--accent)}.resize{z-index:2;position:absolute}.resize.n,.resize.s{cursor:ns-resize;height:6px;left:8px;right:8px}.resize.e,.resize.w{cursor:ew-resize;width:6px;top:8px;bottom:8px}.resize.n{top:-3px}.resize.s{bottom:-3px}.resize.e{right:-3px}.resize.w{left:-3px}.resize.ne,.resize.nw,.resize.se,.resize.sw{width:14px;height:14px}.resize.ne{cursor:nesw-resize;top:-4px;right:-4px}.resize.sw{cursor:nesw-resize;bottom:-4px;left:-4px}.resize.nw{cursor:nwse-resize;top:-4px;left:-4px}.resize.se{cursor:nwse-resize;bottom:-4px;right:-4px}kbd{font-family:var(--mono);border:1px solid var(--border-strong);color:var(--text-2);border-radius:4px;padding:1px 5px;font-size:11px}.btn.disabled{opacity:.5;pointer-events:none}.step.bad .step-index{border-color:var(--error);color:var(--error)}.banner.ok{color:#bbf7d0;background:#22c55e14;border-color:#22c55e59}.split{grid-template-columns:minmax(300px,380px) 1fr;align-items:start;gap:16px;margin-bottom:16px;display:grid}.split.wide{grid-template-columns:1fr minmax(320px,440px)}.split>.card+.card{margin-top:0}.stack{flex-direction:column;gap:14px;display:flex}.picker{top:calc(var(--topbar) + 16px);max-height:min(560px, calc(100vh - var(--topbar) - 48px));flex-direction:column;display:flex;position:sticky}.table-scroll{max-height:400px;overflow:auto}.table-scroll th{z-index:1;background:var(--surface);box-shadow:inset 0 -1px 0 var(--border);border-bottom:0;position:sticky;top:0}.search{border-bottom:1px solid var(--border);padding:12px 14px;position:relative}.search svg{color:var(--muted);position:absolute;top:22px;left:25px}.search .input{width:100%;padding-left:32px}.picker-list{min-height:120px;overflow:auto}.table.compact td{padding:8px 14px}.channel-name{word-break:break-word;font-weight:550}.channel-meta{color:var(--muted);gap:10px;font-size:12px;display:flex}.added{width:30px;height:30px;color:var(--success);place-items:center;display:inline-grid}.more{color:var(--muted);text-align:center;padding:12px 14px;font-size:12px}.table td .input,.table td .select{width:100%}.input.invalid{border-color:#f87171b3}.name-input{flex-direction:column;gap:4px;min-width:0;display:flex}.name-input .hint{font-size:12px}.hint.bad{color:var(--error)}.problems{color:var(--error);margin-top:6px;font-size:12px;line-height:18px}.toggles{flex-wrap:wrap;gap:6px;display:flex}.toggle{border:1px solid var(--border-strong);background:var(--bg);height:28px;color:var(--text-2);cursor:pointer;font-size:12px;font-family:var(--mono);border-radius:999px;padding:0 10px}.toggle:hover{color:var(--text);border-color:#4a4a52}.toggle.on{color:#fff;border-color:var(--accent);background:var(--accent-soft)}.kinds{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin-bottom:16px;display:grid}.kind{text-align:left;border-radius:var(--radius-lg);border:1px solid var(--border);background:var(--surface);cursor:pointer;align-items:flex-start;gap:12px;padding:14px;transition:border-color .12s,background .12s;display:flex}.kind:hover:not(:disabled){border-color:var(--accent);background:var(--raised)}.kind:disabled{opacity:.5;cursor:default}.kind strong{font-weight:600;display:block}.kind span span{color:var(--text-2);margin-top:2px;font-size:12px;line-height:17px;display:block}.agg-icon{background:var(--accent-soft);width:28px;height:28px;color:var(--accent);border-radius:7px;flex-shrink:0;place-items:center;display:grid}.agg-kind{color:var(--text-2);white-space:nowrap;font-weight:550}.agg .card-head .name-input{width:260px}.bins-row{grid-template-columns:repeat(3,minmax(90px,140px)) auto;align-items:center;gap:8px;display:grid}.bins-raw{resize:vertical;height:64px;padding:8px 10px}.link{color:var(--text-2);cursor:pointer;background:0 0;border:0;margin-left:10px;padding:0;font-size:12px;text-decoration:underline}.link:hover{color:var(--text)}.todo{flex-direction:column;gap:8px;padding:0;list-style:none;display:flex}.todo li{align-items:baseline;gap:12px;display:flex}.todo a{width:92px;color:var(--accent);flex-shrink:0;font-weight:550}.todo a:hover{text-decoration:underline}.code{max-height:560px;font-family:var(--mono);color:#d4d4d8;background:var(--bg);border-radius:0 0 var(--radius-lg) var(--radius-lg);white-space:pre;margin:0;padding:16px 18px;font-size:12px;line-height:18px;overflow:auto}.editor{resize:vertical;background:var(--bg);border-radius:0 0 var(--radius-lg) var(--radius-lg);width:100%;min-height:460px;font-family:var(--mono);color:var(--text);tab-size:2;border:0;outline:none;padding:16px 18px;font-size:12px;line-height:19px;display:block}.reference{margin-top:16px}.reference summary{cursor:pointer;list-style:none}.reference:not([open]) summary{border-bottom:0}.split+.reference{margin-top:0}.settings-table td{vertical-align:top;line-height:19px}.settings-table td.mono{white-space:nowrap}.settings-table .code{border-radius:var(--radius);margin-top:8px;padding:10px 12px}@media (width<=900px){.split,.split.wide{grid-template-columns:1fr}.picker{max-height:420px;position:static}}.affix{display:block;position:relative}.affix span{color:var(--muted);pointer-events:none;font-size:11px;position:absolute;top:50%;left:10px;transform:translateY(-50%)}.affix .input{width:100%;padding-left:44px}.card-head.flush{border-bottom:0}.right{text-align:right!important}.stat{color:var(--text)}.section-head{justify-content:space-between;align-items:baseline;gap:12px;margin:28px 0 12px;display:flex}.section-head h2{font-size:16px}.preflight h3{margin-bottom:2px;font-size:13px;font-weight:600}.preflight .sub{margin-bottom:10px}.priv{width:110px;color:var(--error);flex-shrink:0}.grants{border:1px solid var(--border);border-radius:var(--radius);margin-top:12px;position:relative}.grants .code{border-radius:var(--radius);padding-right:120px}.grants .btn{position:absolute;top:8px;right:8px}.grant-row{margin-top:10px}.grant-row .btn{flex-shrink:0}.run-error{border-radius:var(--radius);background:var(--error-soft);border:1px solid #f8717159;padding:12px 14px}.run-error strong{color:#fecaca;word-break:break-word;font-weight:550}.run-error details{margin-top:10px}.run-error summary,.history summary{cursor:pointer;color:var(--text-2);font-size:12px}.run-error .code{border-radius:var(--radius);max-height:320px;margin-top:8px}.history{border-top:1px solid var(--border)}.history>summary{padding:12px 18px}.badge .spinner{border-width:1.5px;width:10px;height:10px}.chat-context{text-overflow:ellipsis;max-width:160px;overflow:hidden}.chat-dot.busy{animation:1s ease-in-out infinite pulse}@keyframes pulse{50%{opacity:.3}}.msg.error{background:var(--error-soft);color:#fecaca;border:1px solid #f8717159;align-self:stretch}.msg.thinking{color:var(--text-2);align-items:center;gap:8px;display:inline-flex}.tool-chips{flex-wrap:wrap;gap:4px;margin-bottom:8px;display:flex}.tool-chip{border:1px solid var(--border-strong);height:22px;color:var(--text-2);border-radius:999px;align-items:center;gap:5px;padding:0 8px;font-size:11px;display:inline-flex}.tool-chip.done svg{color:var(--success)}.tool-chip.error{color:#fecaca;border-color:#f8717180}.tool-chip .spinner{border-width:1.5px;width:10px;height:10px}.md p+p,.md p+ul,.md p+ol,.md ul+p,.md ol+p,.md table,.md .md-code{margin-top:8px}.md ul,.md ol{padding-left:18px}.md li+li{margin-top:2px}.md code{font-family:var(--mono);background:var(--bg);border:1px solid var(--border);border-radius:4px;padding:1px 4px;font-size:12px}.md .md-code{border-radius:var(--radius);background:var(--bg);border:1px solid var(--border);font-family:var(--mono);white-space:pre;padding:10px 12px;font-size:12px;overflow:auto}.md .md-heading{color:var(--text);font-weight:600}.md table{border-collapse:collapse;font-size:12px}.md th,.md td{border:1px solid var(--border);text-align:left;padding:4px 8px}.md a{color:var(--accent);text-decoration:underline}.btn.ghost.active{background:var(--hover);color:var(--text)}.settings-pop{z-index:60;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);width:340px;box-shadow:var(--shadow);flex-direction:column;gap:14px;padding:16px;display:flex;position:fixed}.settings-foot{border-top:1px solid var(--border);justify-content:space-between;align-items:center;padding-top:10px;display:flex}.settings-foot .btn{margin-left:-10px}.settings-saved{color:var(--success);align-items:center;gap:6px;font-size:12px;display:inline-flex} diff --git a/apps/adhoc-reporting/frontend/dist/assets/plotly-cartesian.min-i9wm5hku.js b/apps/adhoc-reporting/frontend/dist/assets/plotly-cartesian.min-i9wm5hku.js new file mode 100644 index 00000000..694f702f --- /dev/null +++ b/apps/adhoc-reporting/frontend/dist/assets/plotly-cartesian.min-i9wm5hku.js @@ -0,0 +1,84 @@ +import{t as e}from"./index-Bnk2zU0V.js";var t=e(((e,t)=>{(function(e,n){typeof t==`object`&&t.exports?t.exports=n():e.moduleName=n()})(typeof self<`u`?self:e,()=>{var e=(()=>{var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,s=(e,t)=>{for(var n in t||={})i.call(t,n)&&o(e,n,t[n]);if(r)for(var n of r(t))a.call(t,n)&&o(e,n,t[n]);return e},c=(e,r)=>t(e,n(r)),l=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},u=l(e=>{e.version=`3.7.0`}),d=l((e,t)=>{(function(e,n,r){n[e]=n[e]||r(),t!==void 0&&t.exports&&(t.exports=n[e])})(`Promise`,typeof window<`u`?window:e,function(){var e,t,n,r=Object.prototype.toString,i=typeof setImmediate<`u`?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:r!==!1})}}catch{e=function(e,t,n){return e[t]=n,e}}n=(function(){var e,n,r;function i(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(t,a){r=new i(t,a),n?n.next=r:e=r,n=r,r=void 0},drain:function(){var r=e;for(e=n=t=void 0;r;)r.fn.call(r.self),r=r.next}}})();function a(e,r){n.add(e,r),t||=i(n.drain)}function o(e){var t,n=typeof e;return e!=null&&(n==`object`||n==`function`)&&(t=e.then),typeof t==`function`&&t}function s(){for(var e=0;e0&&a(s,n))}catch(e){u.call(new f(n),e)}}}function u(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(s,t))}function d(e,t,n,r){for(var i=0;i{(function(){var e={version:`3.8.2`},n=[].slice,r=function(e){return n.call(e)},i=self.document;function a(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(i)try{r(i.documentElement.childNodes)[0].nodeType}catch{r=function(e){for(var t=e.length,n=Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement(`DIV`).style.setProperty(`opacity`,0,``)}catch{var s=this.Element.prototype,c=s.setAttribute,l=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,d=u.setProperty;s.setAttribute=function(e,t){c.call(this,e,t+``)},s.setAttributeNS=function(e,t,n){l.call(this,e,t,n+``)},u.setProperty=function(e,t,n){d.call(this,e,t+``,n)}}e.ascending=f;function f(e,t){return et?1:e>=t?0:NaN}e.descending=function(e,t){return te?1:t>=e?0:NaN},e.min=function(e,t){var n=-1,r=e.length,i,a;if(arguments.length===1){for(;++n=a){i=a;break}for(;++na&&(i=a)}else{for(;++n=a){i=a;break}for(;++na&&(i=a)}return i},e.max=function(e,t){var n=-1,r=e.length,i,a;if(arguments.length===1){for(;++n=a){i=a;break}for(;++ni&&(i=a)}else{for(;++n=a){i=a;break}for(;++ni&&(i=a)}return i},e.extent=function(e,t){var n=-1,r=e.length,i,a,o;if(arguments.length===1){for(;++n=a){i=o=a;break}for(;++na&&(i=a),o=a){i=o=a;break}for(;++na&&(i=a),o1)return o/(c-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t&&Math.sqrt(t)};function h(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}var g=h(f);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return h(e.length===1?function(t,n){return f(e(t),n)}:e)},e.shuffle=function(e,t,n){(r=arguments.length)<3&&(n=e.length,r<2&&(t=0));for(var r=n-t,i,a;r;)a=Math.random()*r--|0,i=e[r+t],e[r+t]=e[a+t],e[a+t]=i;return e},e.permute=function(e,t){for(var n=t.length,r=Array(n);n--;)r[n]=e[t[n]];return r},e.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=Array(n<0?0:n);t=0;)for(o=e[t],n=o.length;--n>=0;)a[--i]=o[n];return a};var v=Math.abs;e.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw Error(`infinite range`);var r=[],i=y(v(n)),a=-1,o;if(e*=i,t*=i,n*=i,n<0)for(;(o=e+n*++a)>t;)r.push(o/i);else for(;(o=e+n*++a)=n.length)return a?a.call(t,r):i?r.sort(i):r;for(var c=-1,l=r.length,u=n[s++],d,f,p,m=new x,h;++c=n.length)return e;var i=[],a=r[t++];return e.forEach(function(e,n){i.push({key:e,values:s(n,t)})}),a?i.sort(function(e,t){return a(e.key,t.key)}):i}return t.map=function(e,t){return o(t,e,0)},t.entries=function(t){return s(o(e.map,t,0),0)},t.key=function(e){return n.push(e),t},t.sortKeys=function(e){return r[n.length-1]=e,t},t.sortValues=function(e){return i=e,t},t.rollup=function(e){return a=e,t},t},e.set=function(e){var t=new j;if(e)for(var n=0,r=e.length;n=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(arguments.length===2){if(t==null)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}};function R(e){var t=[],n=new x;function r(){for(var n=t,r=-1,i=n.length,a;++r=0&&(n=e.slice(0,t))!==`xmlns`&&(e=e.slice(t+1)),Z.hasOwnProperty(n)?{space:Z[n],local:e}:e}},J.attr=function(t,n){if(arguments.length<2){if(typeof t==`string`){var r=this.node();return t=e.ns.qualify(t),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(n in t)this.each(te(n,t[n]));return this}return this.each(te(t,n))};function te(t,n){t=e.ns.qualify(t);function r(){this.removeAttribute(t)}function i(){this.removeAttributeNS(t.space,t.local)}function a(){this.setAttribute(t,n)}function o(){this.setAttributeNS(t.space,t.local,n)}function s(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}function c(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}return n==null?t.local?i:r:typeof n==`function`?t.local?c:s:t.local?o:a}function ne(e){return e.trim().replace(/\s+/g,` `)}J.classed=function(e,t){if(arguments.length<2){if(typeof e==`string`){var n=this.node(),r=(e=ie(e)).length,i=-1;if(t=n.classList){for(;++i=0;)(a=n[r])&&(i&&i!==a.nextSibling&&i.parentNode.insertBefore(a,i),i=a);return this},J.sort=function(e){e=fe.apply(this,arguments);for(var t=-1,n=this.length;++t=t&&(t=i+1);!(c=o[t])&&++t0&&(t=t.slice(0,o));var c=ve.get(t);c&&(t=c,s=be);function l(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}function u(){var e=s(n,r(arguments));l.call(this),this.addEventListener(t,this[a]=e,e.$=i),e._=n}function d(){var n=RegExp(`^__on([^.]+)`+e.requote(t)+`$`),r;for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}return o?n?u:l:n?I:d}var ve=e.map({mouseenter:`mouseover`,mouseleave:`mouseout`});i&&ve.forEach(function(e){`on`+e in i&&ve.remove(e)});function ye(t,n){return function(r){var i=e.event;e.event=r,n[0]=this.__data__;try{t.apply(this,n)}finally{e.event=i}}}function be(e,t){var n=ye(e,t);return function(e){var t=this,r=e.relatedTarget;(!r||r!==t&&!(r.compareDocumentPosition(t)&8))&&n.call(t,e)}}var xe,Se=0;function Ce(t){var n=`.dragsuppress-`+ ++Se,r=`click`+n,i=e.select(o(t)).on(`touchmove`+n,z).on(`dragstart`+n,z).on(`selectstart`+n,z);if(xe??=`onselectstart`in t?!1:P(t.style,`userSelect`),xe){var s=a(t).style,c=s[xe];s[xe]=`none`}return function(e){if(i.on(n,null),xe&&(s[xe]=c),e){var t=function(){i.on(r,null)};i.on(r,function(){z(),t()},!0),setTimeout(t,0)}}}e.mouse=function(e){return Te(e,B())};var we=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Te(t,n){n.changedTouches&&(n=n.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(we<0){var a=o(t);if(a.scrollX||a.scrollY){r=e.select(`body`).append(`svg`).style({position:`absolute`,top:0,left:0,margin:0,padding:0,border:`none`},`important`);var s=r[0][0].getScreenCTM();we=!(s.f||s.e),r.remove()}}return we?(i.x=n.pageX,i.y=n.pageY):(i.x=n.clientX,i.y=n.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var c=t.getBoundingClientRect();return[n.clientX-c.left-t.clientLeft,n.clientY-c.top-t.clientTop]}e.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=B().changedTouches),t){for(var r=0,i=t.length,a;r1?Me:e<-1?-Me:Math.asin(e)}function Le(e){return((e=Math.exp(e))-1/e)/2}function Re(e){return((e=Math.exp(e))+1/e)/2}function ze(e){return((e=Math.exp(2*e))-1)/(e+1)}var Be=Math.SQRT2,Ve=2,He=4;e.interpolateZoom=function(e,t){var n=e[0],r=e[1],i=e[2],a=t[0],o=t[1],s=t[2],c=a-n,l=o-r,u=c*c+l*l,d,f;if(u0&&(n=n.transition().duration(l)),n.call(S.event)}function O(){y&&y.domain(v.range().map(function(e){return(e-t.x)/t.k}).map(v.invert)),x&&x.domain(b.range().map(function(e){return(e-t.y)/t.k}).map(b.invert))}function k(e){u++||e({type:`zoomstart`})}function A(e){O(),e({type:`zoom`,scale:t.k,translate:[t.x,t.y]})}function j(e){--u||(e({type:`zoomend`}),r=null)}function M(){var t=this,n=_.of(t,arguments),r=0,i=e.select(o(t)).on(f,c).on(p,l),a=C(e.mouse(t)),s=Ce(t);Ia.call(t),k(n);function c(){r=1,E(e.mouse(t),a),A(n)}function l(){i.on(f,null).on(p,null),s(r),j(n)}}function N(){var n=this,r=_.of(n,arguments),i={},a=0,o,s=`.zoom-`+e.event.changedTouches[0].identifier,c=`touchmove`+s,l=`touchend`+s,u=[],f=e.select(n),p=Ce(n);v(),k(r),f.on(d,null).on(h,v);function m(){var r=e.touches(n);return o=t.k,r.forEach(function(e){e.identifier in i&&(i[e.identifier]=C(e))}),r}function v(){var r=e.event.target;e.select(r).on(c,y).on(l,b),u.push(r);for(var o=e.event.changedTouches,s=0,d=o.length;s1){var h=f[0],_=f[1],v=h[0]-_[0],x=h[1]-_[1];a=v*v+x*x}}function y(){var t=e.touches(n),s,c,l,u;Ia.call(n);for(var d=0,f=t.length;d1?1:t,n=n<0?0:n>1?1:n,i=n<=.5?n*(1+t):n+t-n*t,r=2*n-i;function a(e){return e>360?e-=360:e<0&&(e+=360),e<60?r+(i-r)*e/60:e<180?i:e<240?r+(i-r)*(240-e)/60:r}function o(e){return Math.round(a(e)*255)}return new lt(o(e+120),o(e),o(e-120))}e.hcl=Xe;function Xe(t,n,r){return this instanceof Xe?(this.h=+t,this.c=+n,void(this.l=+r)):arguments.length<2?t instanceof Xe?new Xe(t.h,t.c,t.l):t instanceof $e?at(t.l,t.a,t.b):at((t=gt((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Xe(t,n,r)}var Ze=Xe.prototype=new Ke;Ze.brighter=function(e){return new Xe(this.h,this.c,Math.min(100,this.l+et*(arguments.length?e:1)))},Ze.darker=function(e){return new Xe(this.h,this.c,Math.max(0,this.l-et*(arguments.length?e:1)))},Ze.rgb=function(){return Qe(this.h,this.c,this.l).rgb()};function Qe(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new $e(n,Math.cos(e*=Ne)*t,Math.sin(e)*t)}e.lab=$e;function $e(e,t,n){return this instanceof $e?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof $e?new $e(e.l,e.a,e.b):e instanceof Xe?Qe(e.h,e.c,e.l):gt((e=lt(e)).r,e.g,e.b):new $e(e,t,n)}var et=18,$=.95047,tt=1,nt=1.08883,rt=$e.prototype=new Ke;rt.brighter=function(e){return new $e(Math.min(100,this.l+et*(arguments.length?e:1)),this.a,this.b)},rt.darker=function(e){return new $e(Math.max(0,this.l-et*(arguments.length?e:1)),this.a,this.b)},rt.rgb=function(){return it(this.l,this.a,this.b)};function it(e,t,n){var r=(e+16)/116,i=r+t/500,a=r-n/200;return i=ot(i)*$,r=ot(r)*tt,a=ot(a)*nt,new lt(ct(3.2404542*i-1.5371385*r-.4985314*a),ct(-.969266*i+1.8760108*r+.041556*a),ct(.0556434*i-.2040259*r+1.0572252*a))}function at(e,t,n){return e>0?new Xe(Math.atan2(n,t)*Pe,Math.sqrt(t*t+n*n),e):new Xe(NaN,NaN,e)}function ot(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function st(e){return e>.008856?e**(1/3):7.787037*e+4/29}function ct(e){return Math.round(255*(e<=.00304?12.92*e:1.055*e**(1/2.4)-.055))}e.rgb=lt;function lt(e,t,n){return this instanceof lt?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof lt?new lt(e.r,e.g,e.b):mt(``+e,lt,Ye):new lt(e,t,n)}function ut(e){return new lt(e>>16,e>>8&255,e&255)}function dt(e){return ut(e)+``}var ft=lt.prototype=new Ke;ft.brighter=function(e){e=.7**(arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return!t&&!n&&!r?new lt(i,i,i):(t&&t>4,r=r>>4|r,i=c&240,i=i>>4|i,a=c&15,a=a<<4|a):e.length===7&&(r=(c&16711680)>>16,i=(c&65280)>>8,a=c&255)),t(r,i,a))}function ht(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),a=i-r,o,s,c=(i+r)/2;return a?(s=c<.5?a/(i+r):a/(2-i-r),o=e==i?(t-n)/a+(t0&&c<1?0:o),new qe(o,s,c)}function gt(e,t,n){e=_t(e),t=_t(t),n=_t(n);var r=st((.4124564*e+.3575761*t+.1804375*n)/$),i=st((.2126729*e+.7151522*t+.072175*n)/tt),a=st((.0193339*e+.119192*t+.9503041*n)/nt);return $e(116*i-16,500*(r-i),200*(i-a))}function _t(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function vt(e){var t=parseFloat(e);return e.charAt(e.length-1)===`%`?Math.round(t*2.55):t}var yt=e.map({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});yt.forEach(function(e,t){yt.set(e,ut(t))});function bt(e){return typeof e==`function`?e:function(){return e}}e.functor=bt,e.xhr=xt(M);function xt(e){return function(t,n,r){return arguments.length===2&&typeof n==`function`&&(r=n,n=null),St(t,n,e,r)}}function St(t,n,i,a){var o={},s=e.dispatch(`beforesend`,`progress`,`load`,`error`),c={},l=new XMLHttpRequest,u=null;self.XDomainRequest&&!(`withCredentials`in l)&&/^(http(s)?:)?\/\//.test(t)&&(l=new XDomainRequest),`onload`in l?l.onload=l.onerror=d:l.onreadystatechange=function(){l.readyState>3&&d()};function d(){var e=l.status,t;if(!e&&wt(l)||e>=200&&e<300||e===304){try{t=i.call(o,l)}catch(e){s.error.call(o,e);return}s.load.call(o,t)}else s.error.call(o,l)}return l.onprogress=function(t){var n=e.event;e.event=t;try{s.progress.call(o,l)}finally{e.event=n}},o.header=function(e,t){return e=(e+``).toLowerCase(),arguments.length<2?c[e]:(t==null?delete c[e]:c[e]=t+``,o)},o.mimeType=function(e){return arguments.length?(n=e==null?null:e+``,o):n},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return i=e,o},[`get`,`post`].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(r(arguments)))}}),o.send=function(e,r,i){if(arguments.length===2&&typeof r==`function`&&(i=r,r=null),l.open(e,t,!0),n!=null&&!(`accept`in c)&&(c.accept=n+`,*/*`),l.setRequestHeader)for(var a in c)l.setRequestHeader(a,c[a]);return n!=null&&l.overrideMimeType&&l.overrideMimeType(n),u!=null&&(l.responseType=u),i!=null&&o.on(`error`,i).on(`load`,function(e){i(null,e)}),s.beforesend.call(o,l),l.send(r??null),o},o.abort=function(){return l.abort(),o},e.rebind(o,s,`on`),a==null?o:o.get(Ct(a))}function Ct(e){return e.length===1?function(t,n){e(t==null?n:null)}:e}function wt(e){var t=e.responseType;return t&&t!==`text`?e.response:e.responseText}e.dsv=function(e,t){var n=RegExp(`["`+e+` +]`),r=e.charCodeAt(0);function i(e,n,r){arguments.length<3&&(r=n,n=null);var i=St(e,t,n==null?a:o(n),r);return i.row=function(e){return arguments.length?i.response((n=e)==null?a:o(e)):n},i}function a(e){return i.parse(e.responseText)}function o(e){return function(t){return i.parse(t.responseText,e)}}i.parse=function(e,t){var n;return i.parseRows(e,function(e,r){if(n)return n(e,r-1);var i=function(t){for(var n={},r=e.length,i=0;i=o)return i;if(u)return u=!1,n;var t=s;if(e.charCodeAt(t)===34){for(var a=t;a++24?(isFinite(t)&&(clearTimeout(Ot),Ot=setTimeout(jt,t)),Dt=0):(Dt=1,kt(jt))}e.timer.flush=function(){Mt(),Nt()};function Mt(){for(var e=Date.now(),t=Tt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Nt(){for(var e,t=Tt,n=1/0;t;)t.c?(t.t=0;--a)p.push(e[s[l[a]][2]]);for(a=+d;a1&&Fe(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Lt(e,t){return e[0]-t[0]||e[1]-t[1]}e.geom.polygon=function(e){return U(e,Rt),e};var Rt=e.geom.polygon.prototype=[];Rt.area=function(){for(var e=-1,t=this.length,n,r=this[t-1],i=0;++eDe)s=s.L;else if(o=t-tn(s,n),o>De){if(!s.R){r=s;break}s=s.R}else{a>-De?(r=s.P,i=s):o>-De?(r=s,i=s.N):r=i=s;break}var c=Xt(e);if(Wt.insert(r,c),r||i){if(r===i){cn(r),i=Xt(r.site),Wt.insert(c,i),c.edge=i.edge=pn(r.site,c.site),sn(r),sn(i);return}if(!i){c.edge=pn(r.site,c.site);return}cn(r),cn(i);var l=r.site,u=l.x,d=l.y,f=e.x-u,p=e.y-d,m=i.site,h=m.x-u,g=m.y-d,_=2*(f*g-p*h),v=f*f+p*p,y=h*h+g*g,b={x:(g*v-p*y)/_+u,y:(f*y-h*v)/_+d};hn(i.edge,l,m,b),c.edge=pn(l,e,null,b),i.edge=pn(e,m,null,b),sn(r),sn(i)}}function en(e,t){var n=e.site,r=n.x,i=n.y,a=i-t;if(!a)return r;var o=e.P;if(!o)return-1/0;n=o.site;var s=n.x,c=n.y,l=c-t;if(!l)return s;var u=s-r,d=1/a-1/l,f=u/l;return d?(-f+Math.sqrt(f*f-2*d*(u*u/(-2*l)-c+l/2+i-a/2)))/d+r:(r+s)/2}function tn(e,t){var n=e.N;if(n)return en(n,t);var r=e.site;return r.y===t?r.x:1/0}function nn(e){this.site=e,this.edges=[]}nn.prototype.prepare=function(){for(var e=this.edges,t=e.length,n;t--;)n=e[t].edge,(!n.b||!n.a)&&e.splice(t,1);return e.sort(an),e.length};function rn(e){for(var t=e[0][0],n=e[1][0],r=e[0][1],i=e[1][1],a,o,s,c,l=Ut,u=l.length,d,f,p,m,h,g;u--;)if(d=l[u],d&&d.prepare())for(p=d.edges,m=p.length,f=0;fDe||v(c-o)>De)&&(p.splice(f,0,new gn(mn(d.site,g,v(s-t)De?{x:t,y:v(a-t)De?{x:v(o-i)De?{x:n,y:v(a-n)De?{x:v(o-r)=-Oe)){var p=c*c+l*l,m=u*u+d*d,h=(d*p-l*m)/f,g=(c*m-u*p)/f,d=g+s,_=Jt.pop()||new on;_.arc=e,_.site=i,_.x=h+o,_.y=d+Math.sqrt(h*h+g*g),_.cy=d,e.circle=_;for(var v=null,y=qt._;y;)if(_.y0)){if(h/=p,p<0){if(h0){if(h>f)return;h>d&&(d=h)}if(h=n-s,!(!p&&h<0)){if(h/=p,p<0){if(h>f)return;h>d&&(d=h)}else if(p>0){if(h0)){if(h/=m,m<0){if(h0){if(h>f)return;h>d&&(d=h)}if(h=r-c,!(!m&&h<0)){if(h/=m,m<0){if(h>f)return;h>d&&(d=h)}else if(m>0){if(h0&&(i.a={x:s+d*p,y:c+d*m}),f<1&&(i.b={x:s+f*p,y:c+f*m}),i}}}}}}function un(e){for(var t=Ht,n=ln(e[0][0],e[0][1],e[1][0],e[1][1]),r=t.length,i;r--;)i=t[r],(!dn(i,e)||!n(i)||v(i.a.x-i.b.x)=a)return;if(u>f){if(!r)r={x:m,y:o};else if(r.y>=s)return;n={x:m,y:s}}else{if(!r)r={x:m,y:s};else if(r.y1){if(u>f){if(!r)r={x:(o-_)/g,y:o};else if(r.y>=s)return;n={x:(s-_)/g,y:s}}else{if(!r)r={x:(s-_)/g,y:s};else if(r.y=a)return;n={x:a,y:g*a+_}}else{if(!r)r={x:a,y:g*a+_};else if(r.x=n&&l.x<=i&&l.y>=r&&l.y<=o?[[n,o],[i,o],[i,r],[n,r]]:[];u.point=e[s]}),t}function s(e){return e.map(function(e,t){return{x:Math.round(r(e,t)/De)*De,y:Math.round(i(e,t)/De)*De,i:t}})}return o.links=function(e){return Sn(s(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},o.triangles=function(e){var t=[];return Sn(s(e)).cells.forEach(function(n,r){for(var i=n.site,a=n.edges.sort(an),o=-1,s=a.length,c,l=a[s-1].edge,u=l.l===i?l.r:l.l;++o_&&(_=c.x),c.y>y&&(y=c.y),d.push(c.x),f.push(c.y);else for(p=0;p_&&(_=b),x>y&&(y=x),d.push(b),f.push(x)}var S=_-h,C=y-g;S>C?y=g+S:_=h+C;function w(e,t,n,r,i,a,o,s){if(!(isNaN(n)||isNaN(r))){if(e.leaf){var c=e.x,l=e.y;if(c!=null){if(v(c-n)+v(l-r)<.01)T(e,t,n,r,i,a,o,s);else{var u=e.point;e.x=e.y=e.point=null,T(e,u,c,l,i,a,o,s),T(e,t,n,r,i,a,o,s)}}else e.x=n,e.y=r,e.point=t}else T(e,t,n,r,i,a,o,s)}}function T(e,t,n,r,i,a,o,s){var c=(i+o)*.5,l=(a+s)*.5,u=n>=c,d=r>=l,f=d<<1|u;e.leaf=!1,e=e.nodes[f]||(e.nodes[f]=On()),u?i=c:o=c,d?a=l:s=l,w(e,t,n,r,i,a,o,s)}var E=On();if(E.add=function(e){w(E,e,+l(e,++p),+u(e,p),h,g,_,y)},E.visit=function(e){kn(e,E,h,g,_,y)},E.find=function(e){return An(E,e[0],e[1],h,g,_,y)},p=-1,t==null){for(;++pa||d>o||f=x)<<1|t>=b,C=S+4;Sn&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Nn(r,i)})),n=In.lastIndex;return n=0&&!(i=e.interpolators[r](t,n)););return i}e.interpolators=[function(e,t){var n=typeof t;return(n===`string`?yt.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?jn:Pn:t instanceof Ke?jn:Array.isArray(t)?Rn:n===`object`&&isNaN(t)?Mn:Nn)(e,t)}],e.interpolateArray=Rn;function Rn(e,t){for(var n=[],r=[],i=e.length,a=t.length,o=Math.min(e.length,t.length),s=0;s=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):`in`;return r=Bn.get(r)||zn,i=Vn.get(i)||M,Hn(i(r.apply(null,n.call(arguments,1))))};function Hn(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function Un(e){return function(t){return 1-e(1-t)}}function Wn(e){return function(t){return .5*(t<.5?e(2*t):2-e(2-2*t))}}function Gn(e){return e*e}function Kn(e){return e*e*e}function qn(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function Jn(e){return function(t){return t**+e}}function Yn(e){return 1-Math.cos(e*Me)}function Xn(e){return 2**(10*(e-1))}function Zn(e){return 1-Math.sqrt(1-e*e)}function Qn(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Ae*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*2**(-10*r)*Math.sin((r-n)*Ae/t)}}function $n(e){return e||=1.70158,function(t){return t*t*((e+1)*t-e)}}function er(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}e.interpolateHcl=tr;function tr(t,n){t=e.hcl(t),n=e.hcl(n);var r=t.h,i=t.c,a=t.l,o=n.h-r,s=n.c-i,c=n.l-a;return isNaN(s)&&(s=0,i=isNaN(i)?n.c:i),isNaN(o)?(o=0,r=isNaN(r)?n.h:r):o>180?o-=360:o<-180&&(o+=360),function(e){return Qe(r+o*e,i+s*e,a+c*e)+``}}e.interpolateHsl=nr;function nr(t,n){t=e.hsl(t),n=e.hsl(n);var r=t.h,i=t.s,a=t.l,o=n.h-r,s=n.s-i,c=n.l-a;return isNaN(s)&&(s=0,i=isNaN(i)?n.s:i),isNaN(o)?(o=0,r=isNaN(r)?n.h:r):o>180?o-=360:o<-180&&(o+=360),function(e){return Ye(r+o*e,i+s*e,a+c*e)+``}}e.interpolateLab=rr;function rr(t,n){t=e.lab(t),n=e.lab(n);var r=t.l,i=t.a,a=t.b,o=n.l-r,s=n.a-i,c=n.b-a;return function(e){return it(r+o*e,i+s*e,a+c*e)+``}}e.interpolateRound=ir;function ir(e,t){return t-=e,function(n){return Math.round(e+t*n)}}e.transform=function(t){var n=i.createElementNS(e.ns.prefix.svg,`g`);return(e.transform=function(e){if(e!=null){n.setAttribute(`transform`,e);var t=n.transform.baseVal.consolidate()}return new ar(t?t.matrix:lr)})(t)};function ar(e){var t=[e.a,e.b],n=[e.c,e.d],r=sr(t),i=or(t,n),a=sr(cr(n,t,-i))||0;t[0]*n[1]180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(ur(n)+`rotate(`,null,`)`)-2,x:Nn(e,t)}))}function pr(e,t,n,r){e===t?t&&n.push(ur(n)+`skewX(`+t+`)`):r.push({i:n.push(ur(n)+`skewX(`,null,`)`)-2,x:Nn(e,t)})}function mr(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(ur(n)+`scale(`,null,`,`,null,`)`);r.push({i:i-4,x:Nn(e[0],t[0])},{i:i-2,x:Nn(e[1],t[1])})}else(t[0]!==1||t[1]!==1)&&n.push(ur(n)+`scale(`+t+`)`)}function hr(t,n){var r=[],i=[];return t=e.transform(t),n=e.transform(n),dr(t.translate,n.translate,r,i),fr(t.rotate,n.rotate,r,i),pr(t.skew,n.skew,r,i),mr(t.scale,n.scale,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t0?o=e:(r.c=null,r.t=NaN,r=null,n.end({type:`end`,alpha:o=0})):e>0&&(n.start({type:`start`,alpha:o=e}),r=At(t.tick)),t):o},t.start=function(){var e,n=m.length,r=h.length,a=i[0],o=i[1],s,d;for(e=0;e=0;)a.push(u=l[c]),u.parent=s,u.depth=s.depth+1;n&&(s.value=0),s.children=l}else n&&(s.value=+n.call(r,s,s.depth)||0),delete s.children;return jr(i,function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)}),o}return r.sort=function(t){return arguments.length?(e=t,r):e},r.children=function(e){return arguments.length?(t=e,r):t},r.value=function(e){return arguments.length?(n=e,r):n},r.revalue=function(e){return n&&(Ar(e,function(e){e.children&&(e.value=0)}),jr(e,function(e){var t;e.children||(e.value=+n.call(r,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)})),e},r};function kr(t,n){return e.rebind(t,n,`sort`,`children`,`value`),t.nodes=t,t.links=Fr,t}function Ar(e,t){for(var n=[e];(e=n.pop())!=null;)if(t(e),(i=e.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function jr(e,t){for(var n=[e],r=[];(e=n.pop())!=null;)if(r.push(e),(o=e.children)&&(a=o.length))for(var i=-1,a,o;++ii&&(i=s),r.push(s)}for(o=0;or&&(n=t,r=i);return n}function Gr(e){return e.reduce(Kr,0)}function Kr(e,t){return e+t[1]}e.layout.histogram=function(){var t=!0,n=Number,r=Yr,i=qr;function a(a,o){for(var s=[],c=a.map(n,this),l=r.call(this,c,o),u=i.call(this,l,c,o),d,o=-1,f=c.length,p=u.length-1,m=t?1:1/f,h;++o0)for(o=-1;++o=l[0]&&h<=l[1]&&(d=s[e.bisect(u,h,1,p)-1],d.y+=m,d.push(a[o]));return s}return a.value=function(e){return arguments.length?(n=e,a):n},a.range=function(e){return arguments.length?(r=bt(e),a):r},a.bins=function(e){return arguments.length?(i=typeof e==`number`?function(t){return Jr(t,e)}:bt(e),a):i},a.frequency=function(e){return arguments.length?(t=!!e,a):t},a};function qr(e,t){return Jr(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Jr(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,a=[];++n<=t;)a[n]=i*n+r;return a}function Yr(t){return[e.min(t),e.max(t)]}e.layout.pack=function(){var t=e.layout.hierarchy().sort(Xr),n=0,r=[1,1],i;function a(e,a){var o=t.call(this,e,a),s=o[0],c=r[0],l=r[1],u=i==null?Math.sqrt:typeof i==`function`?i:function(){return i};if(s.x=s.y=0,jr(s,function(e){e.r=+u(e.value)}),jr(s,ei),n){var d=n*(i?1:Math.max(2*s.r/c,2*s.r/l))/2;jr(s,function(e){e.r+=d}),jr(s,ei),jr(s,function(e){e.r-=d})}return ri(s,c/2,l/2,i?1:1/Math.max(2*s.r/c,2*s.r/l)),o}return a.size=function(e){return arguments.length?(r=e,a):r},a.radius=function(e){return arguments.length?(i=e==null||typeof e==`function`?e:+e,a):i},a.padding=function(e){return arguments.length?(n=+e,a):n},kr(a,t)};function Xr(e,t){return e.value-t.value}function Zr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Qr(e,t){e._pack_next=t,t._pack_prev=e}function $r(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return .999*i*i>n*n+r*r}function ei(e){if(!(t=e.children)||!(f=t.length))return;var t,n=1/0,r=-1/0,i=1/0,a=-1/0,o,s,c,l,u,d,f;function p(e){n=Math.min(e.x-e.r,n),r=Math.max(e.x+e.r,r),i=Math.min(e.y-e.r,i),a=Math.max(e.y+e.r,a)}if(t.forEach(ti),o=t[0],o.x=-o.r,o.y=0,p(o),f>1&&(s=t[1],s.x=s.r,s.y=0,p(s),f>2))for(c=t[2],ii(o,s,c),p(c),Zr(o,c),o._pack_prev=c,Zr(c,s),s=o._pack_next,l=3;lm.x&&(m=e),e.depth>h.depth&&(h=e)});var g=n(p,m)/2-p.x,_=r[0]/(m.x+n(m,p)/2+g),v=r[1]/(h.depth||1);Ar(d,function(e){e.x=(e.x+g)*_,e.y=e.depth*v})}return l}function o(e){for(var t={A:null,children:[e]},n=[t],r;(r=n.pop())!=null;)for(var i=r.children,a,o=0,s=i.length;o0&&(ci(ui(o,e,r),e,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!si(a)&&(a.t=o,a.m+=u-l),i&&!oi(s)&&(s.t=i,s.m+=c-d,r=e)}return r}function u(e){e.x*=r[0],e.y=e.depth*r[1]}return a.separation=function(e){return arguments.length?(n=e,a):n},a.size=function(e){return arguments.length?(i=(r=e)==null?u:null,a):i?null:r},a.nodeSize=function(e){return arguments.length?(i=(r=e)==null?null:u,a):i?r:null},kr(a,t)};function ai(e,t){return e.parent==t.parent?1:2}function oi(e){var t=e.children;return t.length?t[0]:e.t}function si(e){var t=e.children,n;return(n=t.length)?t[n-1]:e.t}function ci(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 li(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function ui(e,t,n){return e.a.parent===t.parent?e.a:n}e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),n=ai,r=[1,1],i=!1;function a(e,a){var o=t.call(this,e,a),s=o[0],c,l=0;jr(s,function(e){var t=e.children;t&&t.length?(e.x=fi(t),e.y=di(t)):(e.x=c?l+=n(e,c):0,e.y=0,c=e)});var u=pi(s),d=mi(s),f=u.x-n(u,d)/2,p=d.x+n(d,u)/2;return jr(s,i?function(e){e.x=(e.x-s.x)*r[0],e.y=(s.y-e.y)*r[1]}:function(e){e.x=(e.x-f)/(p-f)*r[0],e.y=(1-(s.y?e.y/s.y:1))*r[1]}),o}return a.separation=function(e){return arguments.length?(n=e,a):n},a.size=function(e){return arguments.length?(i=(r=e)==null,a):i?null:r},a.nodeSize=function(e){return arguments.length?(i=(r=e)!=null,a):i?r:null},kr(a,t)};function di(t){return 1+e.max(t,function(e){return e.y})}function fi(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function pi(e){var t=e.children;return t&&t.length?pi(t[0]):e}function mi(e){var t=e.children,n;return t&&(n=t.length)?mi(t[n-1]):e}e.layout.treemap=function(){var t=e.layout.hierarchy(),n=Math.round,r=[1,1],i=null,a=hi,o=!1,s,c=`squarify`,l=.5*(1+Math.sqrt(5));function u(e,t){for(var n=-1,r=e.length,i,a;++n0;)r.push(o=i[h-1]),r.area+=o.area,c!==`squarify`||(l=p(r,f))<=s?(i.pop(),s=l):(r.area-=r.pop().area,m(r,f,n,!1),f=Math.min(n.dx,n.dy),r.length=r.area=0,s=1/0);r.length&&=(m(r,f,n,!0),r.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var n=a(e),r=t.slice(),i,o=[];for(u(r,n.dx*n.dy/e.value),o.area=0;i=r.pop();)o.push(i),o.area+=i.area,i.z!=null&&(m(o,i.z?n.dx:n.dy,n,!r.length),o.length=o.area=0);t.forEach(f)}}function p(e,t){for(var n=e.area,r,i=0,a=1/0,o=-1,s=e.length;++oi&&(i=r));return n*=n,t*=t,n?Math.max(t*i*l/n,n/(t*a*l)):1/0}function m(e,t,r,i){var a=-1,o=e.length,s=r.x,c=r.y,l=t?n(e.area/t):0,u;if(t==r.dx){for((i||l>r.dy)&&(l=r.dy);++ar.dx)&&(l=r.dx);++a1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=e.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(e){return function(){for(var t=0,n=0;n2?Ci:yi,c=r?_r:gr;return i=o(e,t,c,n),a=o(t,e,c,Ln),s}function s(e){return i(e)}return s.invert=function(e){return a(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},s.range=function(e){return arguments.length?(t=e,o()):t},s.rangeRound=function(e){return s.range(e).interpolate(ir)},s.clamp=function(e){return arguments.length?(r=e,o()):r},s.interpolate=function(e){return arguments.length?(n=e,o()):n},s.ticks=function(t){return Oi(e,t)},s.tickFormat=function(t,n){return d3_scale_linearTickFormat(e,t,n)},s.nice=function(t){return Ei(e,t),o()},s.copy=function(){return wi(e,t,n,r)},o()}function Ti(t,n){return e.rebind(t,n,`range`,`rangeRound`,`interpolate`,`clamp`)}function Ei(e,t){return bi(e,xi(Di(e,t)[2])),bi(e,xi(Di(e,t)[2])),e}function Di(e,t){t??=10;var n=_i(e),r=n[1]-n[0],i=10**Math.floor(Math.log(r/t)/Math.LN10),a=t/r*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+i*.5,n[2]=i,n}function Oi(t,n){return e.range.apply(e,Di(t,n))}e.scale.log=function(){return ki(e.scale.linear().domain([0,1]),10,!0,[1,10])};function ki(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function a(e){return n?t**+e:-(t**+-e)}function o(t){return e(i(t))}return o.invert=function(t){return a(e.invert(t))},o.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),o):r},o.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),o):t},o.nice=function(){var t=bi(r.map(i),n?Math:Ai);return e.domain(t),r=t.map(a),o},o.ticks=function(){var e=_i(r),o=[],s=e[0],c=e[1],l=Math.floor(i(s)),u=Math.ceil(i(c)),d=t%1?2:t;if(isFinite(u-l)){if(n){for(;l0;f--)o.push(a(l)*f);for(l=0;o[l]c;u--);o=o.slice(l,u)}return o},o.copy=function(){return ki(e.copy(),t,n,r)},Ti(o,e)}var Ai={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};e.scale.pow=function(){return ji(e.scale.linear(),1,[0,1])};function ji(e,t,n){var r=Mi(t),i=Mi(1/t);function a(t){return e(r(t))}return a.invert=function(t){return i(e.invert(t))},a.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(r)),a):n},a.ticks=function(e){return Oi(n,e)},a.tickFormat=function(e,t){return d3_scale_linearTickFormat(n,e,t)},a.nice=function(e){return a.domain(Ei(n,e))},a.exponent=function(o){return arguments.length?(r=Mi(t=o),i=Mi(1/t),e.domain(n.map(r)),a):t},a.copy=function(){return ji(e.copy(),t,n)},Ti(a,e)}function Mi(e){return function(t){return t<0?-((-t)**+e):t**+e}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return Ni([],{t:`range`,a:[[]]})};function Ni(t,n){var r,i,a;function o(e){return i[((r.get(e)||(n.t===`range`?r.set(e,t.push(e)):NaN))-1)%i.length]}function s(n,r){return e.range(t.length).map(function(e){return n+r*e})}return o.domain=function(e){if(!arguments.length)return t;t=[],r=new x;for(var i=-1,a=e.length,s;++i0?r[e-1]:t[0],ed?0:1;if(l=je)return c(l,p)+(s?c(s,1-p):``)+`Z`;var m,h,g,_,v=0,y=0,b,x,S,C,w,T,E,D,O=[];if((_=(+o.apply(this,arguments)||0)/2)&&(g=r===Ui?Math.sqrt(s*s+l*l):+r.apply(this,arguments),p||(y*=-1),l&&(y=Ie(g/l*Math.sin(_))),s&&(v=Ie(g/s*Math.sin(_)))),l){b=l*Math.cos(u+y),x=l*Math.sin(u+y),S=l*Math.cos(d-y),C=l*Math.sin(d-y);var k=Math.abs(d-u-2*y)<=ke?0:1;if(y&&Yi(b,x,S,C)===p^k){var A=(u+d)/2;b=l*Math.cos(A),x=l*Math.sin(A),S=C=null}}else b=x=0;if(s){w=s*Math.cos(d-v),T=s*Math.sin(d-v),E=s*Math.cos(u+v),D=s*Math.sin(u+v);var j=Math.abs(u-d+2*v)<=ke?0:1;if(v&&Yi(w,T,E,D)===1-p^j){var M=(u+d)/2;w=s*Math.cos(M),T=s*Math.sin(M),E=D=null}}else w=T=0;if(f>De&&(m=Math.min(Math.abs(l-s)/2,+n.apply(this,arguments)))>.001){h=s0?0:1}function Xi(e,t,n,r,i){var a=e[0]-t[0],o=e[1]-t[1],s=(i?r:-r)/Math.sqrt(a*a+o*o),c=s*o,l=-s*a,u=e[0]+c,d=e[1]+l,f=t[0]+c,p=t[1]+l,m=(u+f)/2,h=(d+p)/2,g=f-u,_=p-d,v=g*g+_*_,y=n-r,b=u*p-f*d,x=(_<0?-1:1)*Math.sqrt(Math.max(0,y*y*v-b*b)),S=(b*_-g*x)/v,C=(-b*g-_*x)/v,w=(b*_+g*x)/v,T=(-b*g+_*x)/v,E=S-m,D=C-h,O=w-m,k=T-h;return E*E+D*D>O*O+k*k&&(S=w,C=T),[[S-c,C-l],[S*n/y,C*n/y]]}function Zi(){return!0}function Qi(e){var t=Pt,n=Ft,r=Zi,i=ea,a=i.key,o=.7;function s(a){var s=[],c=[],l=-1,u=a.length,d,f=bt(t),p=bt(n);function m(){s.push(`M`,i(e(c),o))}for(;++l1?e.join(`L`):e+`Z`}function ta(e){return e.join(`L`)+`Z`}function na(e){for(var t=0,n=e.length,r=e[0],i=[r[0],`,`,r[1]];++t1&&i.push(`H`,r[0]),i.join(``)}function ra(e){for(var t=0,n=e.length,r=e[0],i=[r[0],`,`,r[1]];++t1){s=t[1],a=e[c],c++,r+=`C`+(i[0]+o[0])+`,`+(i[1]+o[1])+`,`+(a[0]-s[0])+`,`+(a[1]-s[1])+`,`+a[0]+`,`+a[1];for(var l=2;l9&&(a=n*3/Math.sqrt(a),o[s]=a*r,o[s+1]=a*i));for(s=-1;++s<=c;)a=(e[Math.min(c,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),t.push([a||0,o[s]*a||0]);return t}function Sa(e){return e.length<3?ea(e):e[0]+ca(e,xa(e))}e.svg.line.radial=function(){var e=Qi(Ca);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e};function Ca(e){for(var t,n=-1,r=e.length,i,a;++nke)+`,1 `+t}function l(e,t,n,r){return`Q 0,0 `+r}return a.radius=function(e){return arguments.length?(n=bt(e),a):n},a.source=function(t){return arguments.length?(e=bt(t),a):e},a.target=function(e){return arguments.length?(t=bt(e),a):t},a.startAngle=function(e){return arguments.length?(r=bt(e),a):r},a.endAngle=function(e){return arguments.length?(i=bt(e),a):i},a};function Da(e){return e.radius}e.svg.diagonal=function(){var e=Ta,t=Ea,n=Oa;function r(r,i){var a=e.call(this,r,i),o=t.call(this,r,i),s=(a.y+o.y)/2,c=[a,{x:a.x,y:s},{x:o.x,y:s},o];return c=c.map(n),`M`+c[0]+`C`+c[1]+` `+c[2]+` `+c[3]}return r.source=function(t){return arguments.length?(e=bt(t),r):e},r.target=function(e){return arguments.length?(t=bt(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r};function Oa(e){return[e.x,e.y]}e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),n=Oa,r=t.projection;return t.projection=function(e){return arguments.length?r(ka(n=e)):n},t};function ka(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Me;return[n*Math.cos(r),n*Math.sin(r)]}}e.svg.symbol=function(){var e=ja,t=Aa;function n(n,r){return(Na.get(e.call(this,n,r))||Ma)(t.call(this,n,r))}return n.type=function(t){return arguments.length?(e=bt(t),n):e},n.size=function(e){return arguments.length?(t=bt(e),n):t},n};function Aa(){return 64}function ja(){return`circle`}function Ma(e){var t=Math.sqrt(e/ke);return`M0,`+t+`A`+t+`,`+t+` 0 1,1 0,`+-t+`A`+t+`,`+t+` 0 1,1 0,`+t+`Z`}var Na=e.map({circle:Ma,cross:function(e){var t=Math.sqrt(e/5)/2;return`M`+-3*t+`,`+-t+`H`+-t+`V`+-3*t+`H`+t+`V`+-t+`H`+3*t+`V`+t+`H`+t+`V`+3*t+`H`+-t+`V`+t+`H`+-3*t+`Z`},diamond:function(e){var t=Math.sqrt(e/(2*Fa)),n=t*Fa;return`M0,`+-t+`L`+n+`,0 0,`+t+` `+-n+`,0Z`},square:function(e){var t=Math.sqrt(e)/2;return`M`+-t+`,`+-t+`L`+t+`,`+-t+` `+t+`,`+t+` `+-t+`,`+t+`Z`},"triangle-down":function(e){var t=Math.sqrt(e/Pa),n=t*Pa/2;return`M0,`+n+`L`+t+`,`+-n+` `+-t+`,`+-n+`Z`},"triangle-up":function(e){var t=Math.sqrt(e/Pa),n=t*Pa/2;return`M0,`+-n+`L`+t+`,`+n+` `+-t+`,`+n+`Z`}});e.svg.symbolTypes=Na.keys();var Pa=Math.sqrt(3),Fa=Math.tan(30*Ne);J.transition=function(e){for(var t=Va||++Ba,n=Ga(e),r=[],i,a,o=Ha||{time:Date.now(),ease:qn,delay:0,duration:250},s=-1,c=this.length;++s0;)d[--f].call(e,c);if(s>=1)return o.event&&o.event.end.call(e,e.__data__,t),--a.count?delete a[r]:delete e[n],1}o||(s=i.time,c=At(f,0,s),o=a[r]={tween:new x,time:s,timer:c,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++a.count)}e.svg.axis=function(){var t=e.scale.linear(),n=qa,i=6,a=6,o=3,s=[10],c=null,l;function u(r){r.each(function(){var r=e.select(this),u=this.__chart__||t,d=this.__chart__=t.copy(),f=c??(d.ticks?d.ticks.apply(d,s):d.domain()),p=l??(d.tickFormat?d.tickFormat.apply(d,s):M),m=r.selectAll(`.tick`).data(f,d),h=m.enter().insert(`g`,`.domain`).attr(`class`,`tick`).style(`opacity`,De),g=e.transition(m.exit()).style(`opacity`,De).remove(),_=e.transition(m.order()).style(`opacity`,1),v=Math.max(i,0)+o,y,b=vi(d),x=r.selectAll(`.domain`).data([0]),S=(x.enter().append(`path`).attr(`class`,`domain`),e.transition(x));h.append(`line`),h.append(`text`);var C=h.select(`line`),w=_.select(`line`),T=m.select(`text`).text(p),E=h.select(`text`),D=_.select(`text`),O=n===`top`||n===`left`?-1:1,k,A,j,N;if(n===`bottom`||n===`top`?(y=Ya,k=`x`,j=`y`,A=`x2`,N=`y2`,T.attr(`dy`,O<0?`0em`:`.71em`).style(`text-anchor`,`middle`),S.attr(`d`,`M`+b[0]+`,`+O*a+`V0H`+b[1]+`V`+O*a)):(y=Xa,k=`y`,j=`x`,A=`y2`,N=`x2`,T.attr(`dy`,`.32em`).style(`text-anchor`,O<0?`end`:`start`),S.attr(`d`,`M`+O*a+`,`+b[0]+`H0V`+b[1]+`H`+O*a)),C.attr(N,O*i),E.attr(j,O*v),w.attr(A,0).attr(N,O*i),D.attr(k,0).attr(j,O*v),d.rangeBand){var P=d,F=P.rangeBand()/2;u=d=function(e){return P(e)+F}}else u.rangeBand?u=d:g.call(y,d,u);h.call(y,u,d),_.call(y,d,d)})}return u.scale=function(e){return arguments.length?(t=e,u):t},u.orient=function(e){return arguments.length?(n=e in Ja?e+``:qa,u):n},u.ticks=function(){return arguments.length?(s=r(arguments),u):s},u.tickValues=function(e){return arguments.length?(c=e,u):c},u.tickFormat=function(e){return arguments.length?(l=e,u):l},u.tickSize=function(e){var t=arguments.length;return t?(i=+e,a=+arguments[t-1],u):i},u.innerTickSize=function(e){return arguments.length?(i=+e,u):i},u.outerTickSize=function(e){return arguments.length?(a=+e,u):a},u.tickPadding=function(e){return arguments.length?(o=+e,u):o},u.tickSubdivide=function(){return arguments.length&&u},u};var qa=`bottom`,Ja={top:1,right:1,bottom:1,left:1};function Ya(e,t,n){e.attr(`transform`,function(e){var r=t(e);return`translate(`+(isFinite(r)?r:n(e))+`,0)`})}function Xa(e,t,n){e.attr(`transform`,function(e){var r=t(e);return`translate(0,`+(isFinite(r)?r:n(e))+`)`})}e.svg.brush=function(){var t=V(f,`brushstart`,`brush`,`brushend`),n=null,r=null,i=[0,0],a=[0,0],s,c,l=!0,u=!0,d=Qa[0];function f(t){t.each(function(){var t=e.select(this).style(`pointer-events`,`all`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`).on(`mousedown.brush`,g).on(`touchstart.brush`,g),i=t.selectAll(`.background`).data([0]);i.enter().append(`rect`).attr(`class`,`background`).style(`visibility`,`hidden`).style(`cursor`,`crosshair`),t.selectAll(`.extent`).data([0]).enter().append(`rect`).attr(`class`,`extent`).style(`cursor`,`move`);var a=t.selectAll(`.resize`).data(d,M);a.exit().remove(),a.enter().append(`g`).attr(`class`,function(e){return`resize `+e}).style(`cursor`,function(e){return Za[e]}).append(`rect`).attr(`x`,function(e){return/[ew]$/.test(e)?-3:null}).attr(`y`,function(e){return/^[ns]/.test(e)?-3:null}).attr(`width`,6).attr(`height`,6).style(`visibility`,`hidden`),a.style(`display`,f.empty()?`none`:null);var o=e.transition(t),s=e.transition(i),c;n&&(c=vi(n),s.attr(`x`,c[0]).attr(`width`,c[1]-c[0]),m(o)),r&&(c=vi(r),s.attr(`y`,c[0]).attr(`height`,c[1]-c[0]),h(o)),p(o)})}f.event=function(n){n.each(function(){var n=t.of(this,arguments),r={x:i,y:a,i:s,j:c},o=this.__chart__||r;this.__chart__=r,Va?e.select(this).transition().each(`start.brush`,function(){s=o.i,c=o.j,i=o.x,a=o.y,n({type:`brushstart`})}).tween(`brush:brush`,function(){var e=Rn(i,r.x),t=Rn(a,r.y);return s=c=null,function(o){i=r.x=e(o),a=r.y=t(o),n({type:`brush`,mode:`resize`})}}).each(`end.brush`,function(){s=r.i,c=r.j,n({type:`brush`,mode:`resize`}),n({type:`brushend`})}):(n({type:`brushstart`}),n({type:`brush`,mode:`resize`}),n({type:`brushend`}))})};function p(e){e.selectAll(`.resize`).attr(`transform`,function(e){return`translate(`+i[+/e$/.test(e)]+`,`+a[+/^s/.test(e)]+`)`})}function m(e){e.select(`.extent`).attr(`x`,i[0]),e.selectAll(`.extent,.n>rect,.s>rect`).attr(`width`,i[1]-i[0])}function h(e){e.select(`.extent`).attr(`y`,a[0]),e.selectAll(`.extent,.e>rect,.w>rect`).attr(`height`,a[1]-a[0])}function g(){var d=this,g=e.select(e.event.target),_=t.of(d,arguments),v=e.select(d),y=g.datum(),b=!/^(n|s)$/.test(y)&&n,x=!/^(e|w)$/.test(y)&&r,S=g.classed(`extent`),C=Ce(d),w,T=e.mouse(d),E,D=e.select(o(d)).on(`keydown.brush`,A).on(`keyup.brush`,j);if(e.event.changedTouches?D.on(`touchmove.brush`,M).on(`touchend.brush`,P):D.on(`mousemove.brush`,M).on(`mouseup.brush`,P),v.interrupt().selectAll(`*`).interrupt(),S)T[0]=i[0]-T[0],T[1]=a[0]-T[1];else if(y){var O=+/w$/.test(y),k=+/^n/.test(y);E=[i[1-O]-T[0],a[1-k]-T[1]],T[0]=i[O],T[1]=a[k]}else e.event.altKey&&(w=T.slice());v.style(`pointer-events`,`none`).selectAll(`.resize`).style(`display`,null),e.select(`body`).style(`cursor`,g.style(`cursor`)),_({type:`brushstart`}),M();function A(){e.event.keyCode==32&&(S||=(w=null,T[0]-=i[1],T[1]-=a[1],2),z())}function j(){e.event.keyCode==32&&S==2&&(T[0]+=i[1],T[1]+=a[1],S=0,z())}function M(){var t=e.mouse(d),o=!1;E&&(t[0]+=E[0],t[1]+=E[1]),S||(e.event.altKey?(w||=[(i[0]+i[1])/2,(a[0]+a[1])/2],T[0]=i[+(t[0]{(function(n,r){typeof e==`object`&&t!==void 0?r(e):(n||=self,r(n.d3=n.d3||{}))})(e,function(e){var t=new Date,n=new Date;function r(e,i,a,o){function s(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return s.floor=function(t){return e(t=new Date(+t)),t},s.ceil=function(t){return e(t=new Date(t-1)),i(t,1),e(t),t},s.round=function(e){var t=s(e),n=s.ceil(e);return e-t0))return a;do a.push(o=new Date(+t)),i(t,r),e(t);while(o=n)for(;e(n),!t(n);)n.setTime(n-1)},function(e,n){if(e>=e){if(n<0)for(;++n<=0;)for(;i(e,-1),!t(e););else for(;--n>=0;)for(;i(e,1),!t(e););}})},a&&(s.count=function(r,i){return t.setTime(+r),n.setTime(+i),e(t),e(n),Math.floor(a(t,n))},s.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?s.filter(o?function(t){return o(t)%e===0}:function(t){return s.count(0,t)%e===0}):s}),s}var i=r(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});i.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?r(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):i};var a=i.range,o=1e3,s=6e4,c=36e5,l=864e5,u=6048e5,d=r(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*o)},function(e,t){return(t-e)/o},function(e){return e.getUTCSeconds()}),f=d.range,p=r(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*o)},function(e,t){e.setTime(+e+t*s)},function(e,t){return(t-e)/s},function(e){return e.getMinutes()}),m=p.range,h=r(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*o-e.getMinutes()*s)},function(e,t){e.setTime(+e+t*c)},function(e,t){return(t-e)/c},function(e){return e.getHours()}),g=h.range,_=r(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/l},function(e){return e.getDate()-1}),v=_.range;function y(e){return r(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t*7)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/u})}var b=y(0),x=y(1),S=y(2),C=y(3),w=y(4),T=y(5),E=y(6),D=b.range,O=x.range,k=S.range,A=C.range,j=w.range,M=T.range,N=E.range,P=r(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),F=P.range,I=r(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});I.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:r(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};var L=I.range,R=r(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*s)},function(e,t){return(t-e)/s},function(e){return e.getUTCMinutes()}),z=R.range,B=r(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*c)},function(e,t){return(t-e)/c},function(e){return e.getUTCHours()}),V=B.range,H=r(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/l},function(e){return e.getUTCDate()-1}),U=H.range;function W(e){return r(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t*7)},function(e,t){return(t-e)/u})}var G=W(0),K=W(1),q=W(2),J=W(3),Y=W(4),X=W(5),ee=W(6),Z=G.range,te=K.range,ne=q.range,re=J.range,ie=Y.range,ae=X.range,oe=ee.range,se=r(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),ce=se.range,Q=r(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});Q.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:r(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};var le=Q.range;e.timeDay=_,e.timeDays=v,e.timeFriday=T,e.timeFridays=M,e.timeHour=h,e.timeHours=g,e.timeInterval=r,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=p,e.timeMinutes=m,e.timeMonday=x,e.timeMondays=O,e.timeMonth=P,e.timeMonths=F,e.timeSaturday=E,e.timeSaturdays=N,e.timeSecond=d,e.timeSeconds=f,e.timeSunday=b,e.timeSundays=D,e.timeThursday=w,e.timeThursdays=j,e.timeTuesday=S,e.timeTuesdays=k,e.timeWednesday=C,e.timeWednesdays=A,e.timeWeek=b,e.timeWeeks=D,e.timeYear=I,e.timeYears=L,e.utcDay=H,e.utcDays=U,e.utcFriday=X,e.utcFridays=ae,e.utcHour=B,e.utcHours=V,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=R,e.utcMinutes=z,e.utcMonday=K,e.utcMondays=te,e.utcMonth=se,e.utcMonths=ce,e.utcSaturday=ee,e.utcSaturdays=oe,e.utcSecond=d,e.utcSeconds=f,e.utcSunday=G,e.utcSundays=Z,e.utcThursday=Y,e.utcThursdays=ie,e.utcTuesday=q,e.utcTuesdays=ne,e.utcWednesday=J,e.utcWednesdays=re,e.utcWeek=G,e.utcWeeks=Z,e.utcYear=Q,e.utcYears=le,Object.defineProperty(e,"__esModule",{value:!0})})}),m=l((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e,p()):(n||=self,r(n.d3=n.d3||{},n.d3))})(e,function(e,t){function n(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 r(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 i(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function a(e){var a=e.dateTime,s=e.date,c=e.time,l=e.periods,u=e.days,d=e.shortDays,ve=e.months,ye=e.shortMonths,be=f(l),xe=p(l),Se=f(u),Ce=p(u),we=f(d),Te=p(d),Ee=f(ve),De=p(ve),Oe=f(ye),ke=p(ye),Ae={a:We,A:Ge,b:Ke,B:qe,c:null,d:P,e:P,f:z,H:F,I,j:L,L:R,m:B,M:V,p:Je,q:Ye,Q:ge,s:_e,S:H,u:U,U:W,V:G,w:K,W:q,x:null,X:null,y:J,Y,Z:X,"%":he},je={a:Xe,A:Ze,b:Qe,B:$e,c:null,d:ee,e:ee,f:ie,H:Z,I:te,j:ne,L:re,m:ae,M:oe,p:et,q:$,Q:ge,s:_e,S:se,u:ce,U:Q,V:le,w:ue,W:de,x:null,X:null,y:fe,Y:pe,Z:me,"%":he},Me={a:Le,A:Re,b:ze,B:Be,c:Ve,d:w,e:w,f:A,H:E,I:E,j:T,L:k,m:C,M:D,p:Ie,q:S,Q:M,s:N,S:O,u:h,U:g,V:_,w:m,W:v,x:He,X:Ue,y:b,Y:y,Z:x,"%":j};Ae.x=Ne(s,Ae),Ae.X=Ne(c,Ae),Ae.c=Ne(a,Ae),je.x=Ne(s,je),je.X=Ne(c,je),je.c=Ne(a,je);function Ne(e,t){return function(n){var r=[],i=-1,a=0,s=e.length,c,l,u;for(n instanceof Date||(n=new Date(+n));++i53)return null;`w`in s||(s.w=1),`Z`in s?(l=r(i(s.y,0,1)),u=l.getUTCDay(),l=u>4||u===0?t.utcMonday.ceil(l):t.utcMonday(l),l=t.utcDay.offset(l,(s.V-1)*7),s.y=l.getUTCFullYear(),s.m=l.getUTCMonth(),s.d=l.getUTCDate()+(s.w+6)%7):(l=n(i(s.y,0,1)),u=l.getDay(),l=u>4||u===0?t.timeMonday.ceil(l):t.timeMonday(l),l=t.timeDay.offset(l,(s.V-1)*7),s.y=l.getFullYear(),s.m=l.getMonth(),s.d=l.getDate()+(s.w+6)%7)}else(`W`in s||`U`in s)&&(`w`in s||(s.w=`u`in s?s.u%7:+(`W`in s)),u=`Z`in s?r(i(s.y,0,1)).getUTCDay():n(i(s.y,0,1)).getDay(),s.m=0,s.d=`W`in s?(s.w+6)%7+s.W*7-(u+5)%7:s.w+s.U*7-(u+6)%7);return`Z`in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,r(s)):n(s)}}function Fe(e,t,n,r){for(var i=0,a=t.length,s=n.length,c,l;i=s)return-1;if(c=t.charCodeAt(i++),c===37){if(c=t.charAt(i++),l=Me[c in o?t.charAt(i++):c],!l||(r=l(e,n,r))<0)return-1}else if(c!=n.charCodeAt(r++))return-1}return r}function Ie(e,t,n){var r=be.exec(t.slice(n));return r?(e.p=xe[r[0].toLowerCase()],n+r[0].length):-1}function Le(e,t,n){var r=we.exec(t.slice(n));return r?(e.w=Te[r[0].toLowerCase()],n+r[0].length):-1}function Re(e,t,n){var r=Se.exec(t.slice(n));return r?(e.w=Ce[r[0].toLowerCase()],n+r[0].length):-1}function ze(e,t,n){var r=Oe.exec(t.slice(n));return r?(e.m=ke[r[0].toLowerCase()],n+r[0].length):-1}function Be(e,t,n){var r=Ee.exec(t.slice(n));return r?(e.m=De[r[0].toLowerCase()],n+r[0].length):-1}function Ve(e,t,n){return Fe(e,a,t,n)}function He(e,t,n){return Fe(e,s,t,n)}function Ue(e,t,n){return Fe(e,c,t,n)}function We(e){return d[e.getDay()]}function Ge(e){return u[e.getDay()]}function Ke(e){return ye[e.getMonth()]}function qe(e){return ve[e.getMonth()]}function Je(e){return l[+(e.getHours()>=12)]}function Ye(e){return 1+~~(e.getMonth()/3)}function Xe(e){return d[e.getUTCDay()]}function Ze(e){return u[e.getUTCDay()]}function Qe(e){return ye[e.getUTCMonth()]}function $e(e){return ve[e.getUTCMonth()]}function et(e){return l[+(e.getUTCHours()>=12)]}function $(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=Ne(e+=``,Ae);return t.toString=function(){return e},t},parse:function(e){var t=Pe(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Ne(e+=``,je);return t.toString=function(){return e},t},utcParse:function(e){var t=Pe(e+=``,!0);return t.toString=function(){return e},t}}}var o={"-":``,_:` `,0:`0`},s=/^\s*\d+/,c=/^%/,l=/[\\^$*+?|[\]().{}]/g;function u(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a68?1900:2e3),n+r[0].length):-1}function x(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 S(e,t,n){var r=s.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function C(e,t,n){var r=s.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function w(e,t,n){var r=s.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function T(e,t,n){var r=s.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function E(e,t,n){var r=s.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function D(e,t,n){var r=s.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function O(e,t,n){var r=s.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function k(e,t,n){var r=s.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function A(e,t,n){var r=s.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function j(e,t,n){var r=c.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function M(e,t,n){var r=s.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function N(e,t,n){var r=s.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function P(e,t){return u(e.getDate(),t,2)}function F(e,t){return u(e.getHours(),t,2)}function I(e,t){return u(e.getHours()%12||12,t,2)}function L(e,n){return u(1+t.timeDay.count(t.timeYear(e),e),n,3)}function R(e,t){return u(e.getMilliseconds(),t,3)}function z(e,t){return R(e,t)+`000`}function B(e,t){return u(e.getMonth()+1,t,2)}function V(e,t){return u(e.getMinutes(),t,2)}function H(e,t){return u(e.getSeconds(),t,2)}function U(e){var t=e.getDay();return t===0?7:t}function W(e,n){return u(t.timeSunday.count(t.timeYear(e)-1,e),n,2)}function G(e,n){var r=e.getDay();return e=r>=4||r===0?t.timeThursday(e):t.timeThursday.ceil(e),u(t.timeThursday.count(t.timeYear(e),e)+(t.timeYear(e).getDay()===4),n,2)}function K(e){return e.getDay()}function q(e,n){return u(t.timeMonday.count(t.timeYear(e)-1,e),n,2)}function J(e,t){return u(e.getFullYear()%100,t,2)}function Y(e,t){return u(e.getFullYear()%1e4,t,4)}function X(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+u(t/60|0,`0`,2)+u(t%60,`0`,2)}function ee(e,t){return u(e.getUTCDate(),t,2)}function Z(e,t){return u(e.getUTCHours(),t,2)}function te(e,t){return u(e.getUTCHours()%12||12,t,2)}function ne(e,n){return u(1+t.utcDay.count(t.utcYear(e),e),n,3)}function re(e,t){return u(e.getUTCMilliseconds(),t,3)}function ie(e,t){return re(e,t)+`000`}function ae(e,t){return u(e.getUTCMonth()+1,t,2)}function oe(e,t){return u(e.getUTCMinutes(),t,2)}function se(e,t){return u(e.getUTCSeconds(),t,2)}function ce(e){var t=e.getUTCDay();return t===0?7:t}function Q(e,n){return u(t.utcSunday.count(t.utcYear(e)-1,e),n,2)}function le(e,n){var r=e.getUTCDay();return e=r>=4||r===0?t.utcThursday(e):t.utcThursday.ceil(e),u(t.utcThursday.count(t.utcYear(e),e)+(t.utcYear(e).getUTCDay()===4),n,2)}function ue(e){return e.getUTCDay()}function de(e,n){return u(t.utcMonday.count(t.utcYear(e)-1,e),n,2)}function fe(e,t){return u(e.getUTCFullYear()%100,t,2)}function pe(e,t){return u(e.getUTCFullYear()%1e4,t,4)}function me(){return`+0000`}function he(){return`%`}function ge(e){return+e}function _e(e){return Math.floor(e/1e3)}var ve;ye({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`]});function ye(t){return ve=a(t),e.timeFormat=ve.format,e.timeParse=ve.parse,e.utcFormat=ve.utcFormat,e.utcParse=ve.utcParse,ve}var be=`%Y-%m-%dT%H:%M:%S.%LZ`;function xe(e){return e.toISOString()}var Se=Date.prototype.toISOString?xe:e.utcFormat(be);function Ce(e){var t=new Date(e);return isNaN(t)?null:t}var we=+new Date(`2000-01-01T00:00:00.000Z`)?Ce:e.utcParse(be);e.isoFormat=Se,e.isoParse=we,e.timeFormatDefaultLocale=ye,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})}),h=l((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):(n=typeof globalThis<`u`?globalThis:n||self,r(n.d3=n.d3||{}))})(e,(function(e){function t(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function n(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)]}function r(e){return e=n(Math.abs(e)),e?e[1]:NaN}function i(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function a(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(e){if(!(t=o.exec(e)))throw Error(`invalid format: `+e);var t;return new c({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]})}s.prototype=c.prototype;function c(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}c.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function l(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var u;function d(e,t){var r=n(e,t);if(!r)return e+``;var i=r[0],a=r[1],o=a-(u=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=i.length;return o===s?i:o>s?i+Array(o-s+1).join(`0`):o>0?i.slice(0,o)+`.`+i.slice(o):`0.`+Array(1-o).join(`0`)+n(e,Math.max(0,t+o-1))[0]}function f(e,t){var r=n(e,t);if(!r)return e+``;var i=r[0],a=r[1];return a<0?`0.`+Array(-a).join(`0`)+i:i.length>a+1?i.slice(0,a+1)+`.`+i.slice(a+1):i+Array(a-i.length+2).join(`0`)}var p={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+``},d:t,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return f(e*100,t)},r:f,s:d,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function m(e){return e}var h=Array.prototype.map,g=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function _(e){var t=e.grouping===void 0||e.thousands===void 0?m:i(h.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,o=e.currency===void 0?``:e.currency[1]+``,c=e.decimal===void 0?`.`:e.decimal+``,d=e.numerals===void 0?m:a(h.call(e.numerals,String)),f=e.percent===void 0?`%`:e.percent+``,_=e.minus===void 0?`-`:e.minus+``,v=e.nan===void 0?`NaN`:e.nan+``;function y(e){e=s(e);var r=e.fill,i=e.align,a=e.sign,m=e.symbol,h=e.zero,y=e.width,b=e.comma,x=e.precision,S=e.trim,C=e.type;C===`n`?(b=!0,C=`g`):p[C]||(x===void 0&&(x=12),S=!0,C=`g`),(h||r===`0`&&i===`=`)&&(h=!0,r=`0`,i=`=`);var w=m===`$`?n:m===`#`&&/[boxX]/.test(C)?`0`+C.toLowerCase():``,T=m===`$`?o:/[%p]/.test(C)?f:``,E=p[C],D=/[defgprs%]/.test(C);x=x===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function O(e){var n=w,o=T,s,f,p;if(C===`c`)o=E(e)+o,e=``;else{e=+e;var m=e<0||1/e<0;if(e=isNaN(e)?v:E(Math.abs(e),x),S&&(e=l(e)),m&&+e==0&&a!==`+`&&(m=!1),n=(m?a===`(`?a:_:a===`-`||a===`(`?``:a)+n,o=(C===`s`?g[8+u/3]:``)+o+(m&&a===`(`?`)`:``),D){for(s=-1,f=e.length;++sp||p>57){o=(p===46?c+e.slice(s+1):e.slice(s))+o,e=e.slice(0,s);break}}}b&&!h&&(e=t(e,1/0));var O=n.length+e.length+o.length,k=O>1)+n+e+o+k.slice(O);break;default:e=k+n+e+o}return d(e)}return O.toString=function(){return e+``},O}function b(e,t){var n=y((e=s(e),e.type=`f`,e)),i=Math.max(-8,Math.min(8,Math.floor(r(t)/3)))*3,a=10**-i,o=g[8+i/3];return function(e){return n(a*e)+o}}return{format:y,formatPrefix:b}}var v;y({decimal:`.`,thousands:`,`,grouping:[3],currency:[`$`,``],minus:`-`});function y(t){return v=_(t),e.format=v.format,e.formatPrefix=v.formatPrefix,v}function b(e){return Math.max(0,-r(Math.abs(e)))}function x(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(r(t)/3)))*3-r(Math.abs(e)))}function S(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,r(t)-r(e))+1}e.FormatSpecifier=c,e.formatDefaultLocale=y,e.formatLocale=_,e.formatSpecifier=s,e.precisionFixed=b,e.precisionPrefix=x,e.precisionRound=S,Object.defineProperty(e,"__esModule",{value:!0})}))}),g=l((e,t)=>{t.exports=function(e){for(var t=e.length,n,r=0;r13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}}),_=l((e,t)=>{var n=g();t.exports=function(e){var t=typeof e;if(t===`string`){var r=e;if(e=+e,e===0&&n(r))return!1}else if(t!==`number`)return!1;return e-e<1}}),v=l((e,t)=>{t.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:`−`}}),y=l((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`base64-arraybuffer`]={}))})(e,(function(e){for(var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,n=typeof Uint8Array>`u`?[]:new Uint8Array(256),r=0;r>4,d[a++]=(s&15)<<4|c>>2,d[a++]=(c&3)<<6|l&63;return u},e.encode=function(e){var n=new Uint8Array(e),r,i=n.length,a=``;for(r=0;r>2],a+=t[(n[r]&3)<<4|n[r+1]>>4],a+=t[(n[r+1]&15)<<2|n[r+2]>>6],a+=t[n[r+2]&63];return i%3==2?a=a.substring(0,a.length-1)+`=`:i%3==1&&(a=a.substring(0,a.length-2)+`==`),a},Object.defineProperty(e,"__esModule",{value:!0})}))}),b=l((e,t)=>{t.exports=function(e){return window&&window.process&&window.process.versions?Object.prototype.toString.call(e)===`[object Object]`:Object.prototype.toString.call(e)===`[object Object]`&&Object.getPrototypeOf(e).hasOwnProperty(`hasOwnProperty`)}}),x=l(e=>{var t=y().decode,n=b(),r=Array.isArray,i=ArrayBuffer,a=DataView;function o(e){return i.isView(e)&&!(e instanceof a)}e.isTypedArray=o;function s(e){return r(e)||o(e)}e.isArrayOrTypedArray=s;function c(e){return!s(e[0])}e.isArray1D=c,e.ensureArray=function(e,t){return r(e)||(e=[]),e.length=t,e};var l={u1c:typeof Uint8ClampedArray>`u`?void 0:Uint8ClampedArray,i1:typeof Int8Array>`u`?void 0:Int8Array,u1:typeof Uint8Array>`u`?void 0:Uint8Array,i2:typeof Int16Array>`u`?void 0:Int16Array,u2:typeof Uint16Array>`u`?void 0:Uint16Array,i4:typeof Int32Array>`u`?void 0:Int32Array,u4:typeof Uint32Array>`u`?void 0:Uint32Array,f4:typeof Float32Array>`u`?void 0:Float32Array,f8:typeof Float64Array>`u`?void 0:Float64Array};l.uint8c=l.u1c,l.uint8=l.u1,l.int8=l.i1,l.uint16=l.u2,l.int16=l.i2,l.uint32=l.u4,l.int32=l.i4,l.float32=l.f4,l.float64=l.f8;function u(e){return e.constructor===ArrayBuffer}e.isArrayBuffer=u,e.decodeTypedArraySpec=function(e){var n=[],r=d(e),i=r.dtype,a=l[i];if(!a)throw Error(`Error in dtype: "`+i+`"`);var o=a.BYTES_PER_ELEMENT,s=r.bdata;u(s)||(s=t(s));var c=r.shape===void 0?[s.byteLength/o]:(``+r.shape).split(`,`);c.reverse();var f=c.length,p,m,h=+c[0],g=o*h,_=0;if(f===1)n=new a(s);else if(f===2)for(p=+c[1],m=0;m{var n=_(),r=x().isArrayOrTypedArray;t.exports=function(e,t){if(n(t))t=String(t);else if(typeof t!=`string`||t.slice(-4)===`[-1]`)throw`bad property string`;for(var r=t.split(`.`),a,o,c,l=0;l{var n=S(),r=/^\w*$/,i=0,a=1,o=2,s=3,c=4;t.exports=function(e,t,l,u){l||=`name`,u||=`value`;var d,f,p,m={};t&&t.length?(p=n(e,t),f=p.get()):f=e,t||=``;var h={};if(f)for(d=0;d2)return m[t]=m[t]|o,_.set(e,null);if(g){for(d=t;d{var n=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;t.exports=function(e,t){for(;t;){var i=e.match(n);if(i)e=i[1];else if(e.match(r))e=``;else throw Error(`bad relativeAttr call:`+[e,t]);if(t.charAt(0)===`^`)t=t.slice(1);else break}return e&&t.charAt(0)!==`[`?e+`.`+t:e+t}}),T=l((e,t)=>{var n=_();t.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}}),E=l((e,t)=>{var n=x().isArrayOrTypedArray,r=b();t.exports=function e(t,i){for(var a in i){var o=i[a],s=t[a];if(s!==o){if(a.charAt(0)===`_`||typeof o==`function`){if(a in t)continue;t[a]=o}else if(n(o)&&n(s)&&r(o[0])){if(a===`customdata`||a===`ids`)continue;for(var c=Math.min(o.length,s.length),l=0;l{function n(e,t){var n=e%t;return n<0?n+t:n}function r(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}t.exports={mod:n,modHalf:r}}),O=l((e,t)=>{(function(e){var n=/^\s+/,r=/\s+$/,i=0,a=e.round,o=e.min,s=e.max,c=e.random;function l(e,t){if(e||=``,t||={},e instanceof l)return e;if(!(this instanceof l))return new l(e,t);var n=u(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=i++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n=t.r/255,r=t.g/255,i=t.b/255,a=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),o=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),s=i<=.03928?i/12.92:e.pow((i+.055)/1.055,2.4);return .2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=F(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=m(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=m(this._r,this._g,this._b),t=a(e.h*360),n=a(e.s*100),r=a(e.v*100);return this._a==1?`hsv(`+t+`, `+n+`%, `+r+`%)`:`hsva(`+t+`, `+n+`%, `+r+`%, `+this._roundA+`)`},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=a(e.h*360),n=a(e.s*100),r=a(e.l*100);return this._a==1?`hsl(`+t+`, `+n+`%, `+r+`%)`:`hsla(`+t+`, `+n+`%, `+r+`%, `+this._roundA+`)`},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return`#`+this.toHex(e)},toHex8:function(e){return _(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return`#`+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return this._a==1?`rgb(`+a(this._r)+`, `+a(this._g)+`, `+a(this._b)+`)`:`rgba(`+a(this._r)+`, `+a(this._g)+`, `+a(this._b)+`, `+this._roundA+`)`},toPercentageRgb:function(){return{r:a(I(this._r,255)*100)+`%`,g:a(I(this._g,255)*100)+`%`,b:a(I(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+a(I(this._r,255)*100)+`%, `+a(I(this._g,255)*100)+`%, `+a(I(this._b,255)*100)+`%)`:`rgba(`+a(I(this._r,255)*100)+`%, `+a(I(this._g,255)*100)+`%, `+a(I(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:N[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t=`#`+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?`GradientType = 1, `:``;if(e){var i=l(e);n=`#`+v(i._r,i._g,i._b,i._a)}return`progid:DXImageTransform.Microsoft.gradient(`+r+`startColorstr=`+t+`,endColorstr=`+n+`)`},toString:function(e){var t=!!e;e||=this._format;var n=!1,r=this._a<1&&this._a>=0;return!t&&r&&(e===`hex`||e===`hex6`||e===`hex3`||e===`hex4`||e===`hex8`||e===`name`)?e===`name`&&this._a===0?this.toName():this.toRgbString():(e===`rgb`&&(n=this.toRgbString()),e===`prgb`&&(n=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(n=this.toHexString()),e===`hex3`&&(n=this.toHexString(!0)),e===`hex4`&&(n=this.toHex8String(!0)),e===`hex8`&&(n=this.toHex8String()),e===`name`&&(n=this.toName()),e===`hsl`&&(n=this.toHslString()),e===`hsv`&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(S,arguments)},brighten:function(){return this._applyModification(C,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(y,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(j,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(D,arguments)},tetrad:function(){return this._applyCombination(O,arguments)}},l.fromRatio=function(e,t){if(typeof e==`object`){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=r===`a`?e[r]:H(e[r]));e=n}return l(e,t)};function u(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,c=!1,l=!1;return typeof e==`string`&&(e=q(e)),typeof e==`object`&&(K(e.r)&&K(e.g)&&K(e.b)?(t=d(e.r,e.g,e.b),c=!0,l=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):K(e.h)&&K(e.s)&&K(e.v)?(r=H(e.s),i=H(e.v),t=h(e.h,r,i),c=!0,l=`hsv`):K(e.h)&&K(e.s)&&K(e.l)&&(r=H(e.s),a=H(e.l),t=p(e.h,r,a),c=!0,l=`hsl`),e.hasOwnProperty(`a`)&&(n=e.a)),n=F(n),{ok:c,format:e.format||l,r:o(255,s(t.r,0)),g:o(255,s(t.g,0)),b:o(255,s(t.b,0)),a:n}}function d(e,t,n){return{r:I(e,255)*255,g:I(t,255)*255,b:I(n,255)*255}}function f(e,t,n){e=I(e,255),t=I(t,255),n=I(n,255);var r=s(e,t,n),i=o(e,t,n),a,c,l=(r+i)/2;if(r==i)a=c=0;else{var u=r-i;switch(c=l>.5?u/(2-r-i):u/(r+i),r){case e:a=(t-n)/u+(t1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(t===0)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=o(c,s,e+1/3),i=o(c,s,e),a=o(c,s,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function m(e,t,n){e=I(e,255),t=I(t,255),n=I(n,255);var r=s(e,t,n),i=o(e,t,n),a,c,l=r,u=r-i;if(c=r===0?0:u/r,r==i)a=0;else{switch(r){case e:a=(t-n)/u+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(l(r));return a}function j(e,t){t||=6;for(var n=l(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(l({h:r,s:i,v:a})),a=(a+s)%1;return o}l.mix=function(e,t,n){n=n===0?0:n||50;var r=l(e).toRgb(),i=l(t).toRgb(),a=n/100;return l({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},l.readability=function(t,n){var r=l(t),i=l(n);return(e.max(r.getLuminance(),i.getLuminance())+.05)/(e.min(r.getLuminance(),i.getLuminance())+.05)},l.isReadable=function(e,t,n){var r=l.readability(e,t),i,a=!1;switch(i=J(n),i.level+i.size){case`AAsmall`:case`AAAlarge`:a=r>=4.5;break;case`AAlarge`:a=r>=3;break;case`AAAsmall`:a=r>=7}return a},l.mostReadable=function(e,t,n){var r=null,i=0,a,o,s,c;n||={},o=n.includeFallbackColors,s=n.level,c=n.size;for(var u=0;ui&&(i=a,r=l(t[u]));return l.isReadable(e,r,{level:s,size:c})||!o?r:(n.includeFallbackColors=!1,l.mostReadable(e,[`#fff`,`#000`],n))};var M=l.names={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`0ff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000`,blanchedalmond:`ffebcd`,blue:`00f`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,burntsienna:`ea7e5d`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`0ff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkgrey:`a9a9a9`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkslategrey:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dimgrey:`696969`,dodgerblue:`1e90ff`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`f0f`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,grey:`808080`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgray:`d3d3d3`,lightgreen:`90ee90`,lightgrey:`d3d3d3`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslategray:`789`,lightslategrey:`789`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`0f0`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`f0f`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370db`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`db7093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,rebeccapurple:`663399`,red:`f00`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,slategrey:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`fff`,whitesmoke:`f5f5f5`,yellow:`ff0`,yellowgreen:`9acd32`},N=l.hexNames=P(M);function P(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(t,n){z(t)&&(t=`100%`);var r=B(t);return t=o(n,s(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),e.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function L(e){return o(1,s(0,e))}function R(e){return parseInt(e,16)}function z(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function B(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function V(e){return e.length==1?`0`+e:``+e}function H(e){return e<=1&&(e=e*100+`%`),e}function U(t){return e.round(parseFloat(t)*255).toString(16)}function W(e){return R(e)/255}var G=(function(){var e=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,t=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`,n=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`;return{CSS_UNIT:new RegExp(e),rgb:RegExp(`rgb`+t),rgba:RegExp(`rgba`+n),hsl:RegExp(`hsl`+t),hsla:RegExp(`hsla`+n),hsv:RegExp(`hsv`+t),hsva:RegExp(`hsva`+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function K(e){return!!G.CSS_UNIT.exec(e)}function q(e){e=e.replace(n,``).replace(r,``).toLowerCase();var t=!1;if(M[e])e=M[e],t=!0;else if(e==`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var i;return(i=G.rgb.exec(e))?{r:i[1],g:i[2],b:i[3]}:(i=G.rgba.exec(e))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=G.hsl.exec(e))?{h:i[1],s:i[2],l:i[3]}:(i=G.hsla.exec(e))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=G.hsv.exec(e))?{h:i[1],s:i[2],v:i[3]}:(i=G.hsva.exec(e))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=G.hex8.exec(e))?{r:R(i[1]),g:R(i[2]),b:R(i[3]),a:W(i[4]),format:t?`name`:`hex8`}:(i=G.hex6.exec(e))?{r:R(i[1]),g:R(i[2]),b:R(i[3]),format:t?`name`:`hex`}:(i=G.hex4.exec(e))?{r:R(i[1]+``+i[1]),g:R(i[2]+``+i[2]),b:R(i[3]+``+i[3]),a:W(i[4]+``+i[4]),format:t?`name`:`hex8`}:(i=G.hex3.exec(e))?{r:R(i[1]+``+i[1]),g:R(i[2]+``+i[2]),b:R(i[3]+``+i[3]),format:t?`name`:`hex`}:!1}function J(e){var t,n;return e||={level:`AA`,size:`small`},t=(e.level||`AA`).toUpperCase(),n=(e.size||`small`).toLowerCase(),t!==`AA`&&t!==`AAA`&&(t=`AA`),n!==`small`&&n!==`large`&&(n=`small`),{level:t,size:n}}t!==void 0&&t.exports?t.exports=l:window.tinycolor=l})(Math)}),k=l(e=>{var t=b(),n=Array.isArray;function r(e,t){for(var n=0,r;n{t.exports=function(e){var t=e.variantValues,n=e.editType,r=e.colorEditType;r===void 0&&(r=n);var i={editType:n,valType:`integer`,min:1,max:1e3,extras:[`normal`,`bold`],dflt:`normal`};e.noNumericWeightValues&&(i.valType=`enumerated`,i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:`string`,noBlank:!0,strict:!0,editType:n},size:{valType:`number`,min:1,editType:n},color:{valType:`color`,editType:r},weight:i,style:{editType:n,valType:`enumerated`,values:[`normal`,`italic`],dflt:`normal`},variant:e.noFontVariant?void 0:{editType:n,valType:`enumerated`,values:t||[`normal`,`small-caps`,`all-small-caps`,`all-petite-caps`,`petite-caps`,`unicase`],dflt:`normal`},textcase:e.noFontTextcase?void 0:{editType:n,valType:`enumerated`,values:[`normal`,`word caps`,`upper`,`lower`],dflt:`normal`},lineposition:e.noFontLineposition?void 0:{editType:n,valType:`flaglist`,flags:[`under`,`over`,`through`],extras:[`none`],dflt:`none`},shadow:e.noFontShadow?void 0:{editType:n,valType:`string`,dflt:e.autoShadowDflt?`auto`:`none`},editType:n};return e.autoSize&&(a.size.dflt=`auto`),e.autoColor&&(a.color.dflt=`auto`),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}}),j=l((e,t)=>{t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:`Arial, sans-serif`,HOVERMINTIME:50,HOVERID:`-hover`}}),M=l((e,t)=>{var n=j(),r=A(),i=r({editType:`none`});i.family.dflt=n.HOVERFONT,i.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:`flaglist`,flags:[`event`,`select`],dflt:`event`,editType:`plot`,extras:[`none`]},dragmode:{valType:`enumerated`,values:[`zoom`,`pan`,`select`,`lasso`,`drawclosedpath`,`drawopenpath`,`drawline`,`drawrect`,`drawcircle`,`orbit`,`turntable`,!1],dflt:`zoom`,editType:`modebar`},hovermode:{valType:`enumerated`,values:[`x`,`y`,`closest`,!1,`x unified`,`y unified`],dflt:`closest`,editType:`modebar`},hoversort:{valType:`enumerated`,values:[`trace`,`value descending`,`value ascending`],dflt:`trace`,editType:`none`},hoversubplots:{valType:`enumerated`,values:[`single`,`overlaying`,`axis`],dflt:`overlaying`,editType:`none`},hoveranywhere:{valType:`boolean`,dflt:!1,editType:`none`},clickanywhere:{valType:`boolean`,dflt:!1,editType:`none`},hoverdistance:{valType:`integer`,min:-1,dflt:20,editType:`none`},spikedistance:{valType:`integer`,min:-1,dflt:-1,editType:`none`},hoverlabel:{bgcolor:{valType:`color`,editType:`none`},bordercolor:{valType:`color`,editType:`none`},font:i,grouptitlefont:r({editType:`none`}),align:{valType:`enumerated`,values:[`left`,`right`,`auto`],dflt:`auto`,editType:`none`},namelength:{valType:`integer`,min:-1,dflt:15,editType:`none`},showarrow:{valType:`boolean`,dflt:!0,editType:`none`},editType:`none`},selectdirection:{valType:`enumerated`,values:[`h`,`v`,`d`,`any`],dflt:`any`,editType:`none`}}}),N=l((e,t)=>{var n=A(),r=M().hoverlabel,i=k().extendFlat;t.exports={hoverlabel:{bgcolor:i({},r.bgcolor,{arrayOk:!0}),bordercolor:i({},r.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:`none`}),align:i({},r.align,{arrayOk:!0}),namelength:i({},r.namelength,{arrayOk:!0}),showarrow:i({},r.showarrow),editType:`none`}}}),P=l((e,t)=>{var n=A(),r=N();t.exports={type:{valType:`enumerated`,values:[],dflt:`scatter`,editType:`calc+clearAxisTypes`,_noTemplating:!0},visible:{valType:`enumerated`,values:[!0,!1,`legendonly`],dflt:!0,editType:`calc`},showlegend:{valType:`boolean`,dflt:!0,editType:`style`},legend:{valType:`subplotid`,dflt:`legend`,editType:`style`},legendgroup:{valType:`string`,dflt:``,editType:`style`},legendgrouptitle:{text:{valType:`string`,dflt:``,editType:`style`},font:n({editType:`style`}),editType:`style`},legendrank:{valType:`number`,dflt:1e3,editType:`style`},legendwidth:{valType:`number`,min:0,editType:`style`},opacity:{valType:`number`,min:0,max:1,dflt:1,editType:`style`},name:{valType:`string`,editType:`style`},uid:{valType:`string`,editType:`plot`,anim:!0},ids:{valType:`data_array`,editType:`calc`,anim:!0},customdata:{valType:`data_array`,editType:`calc`},meta:{valType:`any`,arrayOk:!0,editType:`plot`},selectedpoints:{valType:`any`,editType:`calc`},hoverinfo:{valType:`flaglist`,flags:[`x`,`y`,`z`,`text`,`name`],extras:[`all`,`none`,`skip`],arrayOk:!0,dflt:`all`,editType:`none`},hoverlabel:r.hoverlabel,stream:{token:{valType:`string`,noBlank:!0,strict:!0,editType:`calc`},maxpoints:{valType:`number`,min:0,max:1e4,dflt:500,editType:`calc`},editType:`calc`},uirevision:{valType:`any`,editType:`none`}}}),F=l((e,t)=>{var n=O(),r={Greys:[[0,`rgb(0,0,0)`],[1,`rgb(255,255,255)`]],YlGnBu:[[0,`rgb(8,29,88)`],[.125,`rgb(37,52,148)`],[.25,`rgb(34,94,168)`],[.375,`rgb(29,145,192)`],[.5,`rgb(65,182,196)`],[.625,`rgb(127,205,187)`],[.75,`rgb(199,233,180)`],[.875,`rgb(237,248,217)`],[1,`rgb(255,255,217)`]],Greens:[[0,`rgb(0,68,27)`],[.125,`rgb(0,109,44)`],[.25,`rgb(35,139,69)`],[.375,`rgb(65,171,93)`],[.5,`rgb(116,196,118)`],[.625,`rgb(161,217,155)`],[.75,`rgb(199,233,192)`],[.875,`rgb(229,245,224)`],[1,`rgb(247,252,245)`]],YlOrRd:[[0,`rgb(128,0,38)`],[.125,`rgb(189,0,38)`],[.25,`rgb(227,26,28)`],[.375,`rgb(252,78,42)`],[.5,`rgb(253,141,60)`],[.625,`rgb(254,178,76)`],[.75,`rgb(254,217,118)`],[.875,`rgb(255,237,160)`],[1,`rgb(255,255,204)`]],Bluered:[[0,`rgb(0,0,255)`],[1,`rgb(255,0,0)`]],RdBu:[[0,`rgb(5,10,172)`],[.35,`rgb(106,137,247)`],[.5,`rgb(190,190,190)`],[.6,`rgb(220,170,132)`],[.7,`rgb(230,145,90)`],[1,`rgb(178,10,28)`]],Reds:[[0,`rgb(220,220,220)`],[.2,`rgb(245,195,157)`],[.4,`rgb(245,160,105)`],[1,`rgb(178,10,28)`]],Blues:[[0,`rgb(5,10,172)`],[.35,`rgb(40,60,190)`],[.5,`rgb(70,100,245)`],[.6,`rgb(90,120,245)`],[.7,`rgb(106,137,247)`],[1,`rgb(220,220,220)`]],Picnic:[[0,`rgb(0,0,255)`],[.1,`rgb(51,153,255)`],[.2,`rgb(102,204,255)`],[.3,`rgb(153,204,255)`],[.4,`rgb(204,204,255)`],[.5,`rgb(255,255,255)`],[.6,`rgb(255,204,255)`],[.7,`rgb(255,153,255)`],[.8,`rgb(255,102,204)`],[.9,`rgb(255,102,102)`],[1,`rgb(255,0,0)`]],Rainbow:[[0,`rgb(150,0,90)`],[.125,`rgb(0,0,200)`],[.25,`rgb(0,25,255)`],[.375,`rgb(0,152,255)`],[.5,`rgb(44,255,150)`],[.625,`rgb(151,255,0)`],[.75,`rgb(255,234,0)`],[.875,`rgb(255,111,0)`],[1,`rgb(255,0,0)`]],Portland:[[0,`rgb(12,51,131)`],[.25,`rgb(10,136,186)`],[.5,`rgb(242,211,56)`],[.75,`rgb(242,143,56)`],[1,`rgb(217,30,30)`]],Jet:[[0,`rgb(0,0,131)`],[.125,`rgb(0,60,170)`],[.375,`rgb(5,255,255)`],[.625,`rgb(255,255,0)`],[.875,`rgb(250,0,0)`],[1,`rgb(128,0,0)`]],Hot:[[0,`rgb(0,0,0)`],[.3,`rgb(230,0,0)`],[.6,`rgb(255,210,0)`],[1,`rgb(255,255,255)`]],Blackbody:[[0,`rgb(0,0,0)`],[.2,`rgb(230,0,0)`],[.4,`rgb(230,210,0)`],[.7,`rgb(255,255,255)`],[1,`rgb(160,200,255)`]],Earth:[[0,`rgb(0,0,130)`],[.1,`rgb(0,180,180)`],[.2,`rgb(40,210,40)`],[.4,`rgb(230,230,50)`],[.6,`rgb(120,70,20)`],[1,`rgb(255,255,255)`]],Electric:[[0,`rgb(0,0,0)`],[.15,`rgb(30,0,100)`],[.4,`rgb(120,0,100)`],[.6,`rgb(160,90,0)`],[.8,`rgb(230,200,0)`],[1,`rgb(255,250,220)`]],Viridis:[[0,`#440154`],[.06274509803921569,`#48186a`],[.12549019607843137,`#472d7b`],[.18823529411764706,`#424086`],[.25098039215686274,`#3b528b`],[.3137254901960784,`#33638d`],[.3764705882352941,`#2c728e`],[.4392156862745098,`#26828e`],[.5019607843137255,`#21918c`],[.5647058823529412,`#1fa088`],[.6274509803921569,`#28ae80`],[.6901960784313725,`#3fbc73`],[.7529411764705882,`#5ec962`],[.8156862745098039,`#84d44b`],[.8784313725490196,`#addc30`],[.9411764705882353,`#d8e219`],[1,`#fde725`]],Cividis:[[0,`rgb(0,32,76)`],[.058824,`rgb(0,42,102)`],[.117647,`rgb(0,52,110)`],[.176471,`rgb(39,63,108)`],[.235294,`rgb(60,74,107)`],[.294118,`rgb(76,85,107)`],[.352941,`rgb(91,95,109)`],[.411765,`rgb(104,106,112)`],[.470588,`rgb(117,117,117)`],[.529412,`rgb(131,129,120)`],[.588235,`rgb(146,140,120)`],[.647059,`rgb(161,152,118)`],[.705882,`rgb(176,165,114)`],[.764706,`rgb(192,177,109)`],[.823529,`rgb(209,191,102)`],[.882353,`rgb(225,204,92)`],[.941176,`rgb(243,219,79)`],[1,`rgb(255,233,69)`]]},i=r.RdBu;function a(e,t){if(t||=i,!e)return t;function n(){try{e=r[e]||JSON.parse(e)}catch{e=t}}return typeof e==`string`&&(n(),typeof e==`string`&&n()),o(e)?e:t}function o(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r{e.defaults=[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],e.defaultLine=`#444`,e.lightLine=`#eee`,e.background=`#fff`,e.borderLine=`#BEC8D9`,e.lightFraction=1e3/11}),L=l((e,t)=>{var n=O(),r=_(),i=x().isTypedArray,a=t.exports={},o=I();a.defaults=o.defaults;var s=a.defaultLine=o.defaultLine;a.lightLine=o.lightLine;var c=a.background=o.background;a.tinyRGB=function(e){var t=e.toRgb();return`rgb(`+Math.round(t.r)+`, `+Math.round(t.g)+`, `+Math.round(t.b)+`)`},a.rgb=function(e){return a.tinyRGB(n(e))},a.opacity=function(e){return e?n(e).getAlpha():0},a.addOpacity=function(e,t){var r=n(e).toRgb();return`rgba(`+Math.round(r.r)+`, `+Math.round(r.g)+`, `+Math.round(r.b)+`, `+t+`)`},a.combine=function(e,t){var r=n(e).toRgb();if(r.a===1)return n(e).toRgbString();var i=n(t||c).toRgb(),a=i.a===1?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a};return n({r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a}).toRgbString()},a.interpolate=function(e,t,r){var i=n(e).toRgb(),a=n(t).toRgb();return n({r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b}).toRgbString()},a.contrast=function(e,t,r){var i=n(e);return i.getAlpha()!==1&&(i=n(a.combine(e,c))),(i.isDark()?t?i.lighten(t):c:r?i.darken(r):s).toString()},a.stroke=function(e,t){var r=n(t);e.style({stroke:a.tinyRGB(r),"stroke-opacity":r.getAlpha()})},a.fill=function(e,t){var r=n(t);e.style({fill:a.tinyRGB(r),"fill-opacity":r.getAlpha()})},a.clean=function(e){if(e&&typeof e==`object`)for(var t=Object.keys(e),n=0,r,o,s;n=0)))return e;if(o===3)i[o]>1&&(i[o]=1);else if(i[o]>=1)return e}var s=Math.round(i[0]*255)+`, `+Math.round(i[1]*255)+`, `+Math.round(i[2]*255);return a?`rgba(`+s+`, `+i[3]+`)`:`rgb(`+s+`)`}}),R=l((e,t)=>{t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}),z=l(e=>{e.counter=function(e,t,n,r){var i=(t||``)+(n?``:`$`),a=r===!1?``:`^`;return RegExp(e===`xy`?a+`x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?`+i:a+e+`([2-9]|[1-9][0-9]+)?`+i)}}),B=l(e=>{var t=_(),n=O(),r=k().extendFlat,i=P(),a=F(),o=L(),s=R().DESELECTDIM,c=S(),l=z().counter,u=D().modHalf,d=x().isArrayOrTypedArray,f=x().isTypedArraySpec,p=x().decodeTypedArraySpec;e.valObjectMeta={data_array:{coerceFunction:function(e,t,n){t.set(d(e)?e:f(e)?p(e):n)}},enumerated:{coerceFunction:function(e,t,n,r){r.coerceNumber&&(e=+e),r.values.indexOf(e)===-1?t.set(n):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var n=t.values,r=0;re===!0||e===!1;i(e)||r.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(i)?t.set(e):t.set(n)}},number:{coerceFunction:function(e,n,r,i){f(e)&&(e=p(e)),!t(e)||i.min!==void 0&&ei.max?n.set(r):n.set(+e)}},integer:{coerceFunction:function(e,n,r,i){if((i.extras||[]).indexOf(e)!==-1){n.set(e);return}f(e)&&(e=p(e)),e%1||!t(e)||i.min!==void 0&&ei.max?n.set(r):n.set(+e)}},string:{coerceFunction:function(e,t,n,r){if(typeof e!=`string`){var i=typeof e==`number`;r.strict===!0||!i?t.set(n):t.set(String(e))}else r.noBlank&&!e?t.set(n):t.set(e)}},color:{coerceFunction:function(e,t,r){f(e)&&(e=p(e)),n(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function i(e){return n(e).isValid()}!Array.isArray(e)||!e.length?t.set(r):e.every(i)?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,n){t.set(a.get(e,n))}},angle:{coerceFunction:function(e,n,r){f(e)&&(e=p(e)),e===`auto`?n.set(`auto`):t(e)?n.set(u(+e,360)):n.set(r)}},subplotid:{coerceFunction:function(e,t,n,r){var i=r.regex||l(n);let a=e=>typeof e==`string`&&i.test(e);a(e)||r.arrayOk&&d(e)&&e.length>0&&e.every(a)?t.set(e):t.set(n)},validateFunction:function(e,t){var n=t.dflt;return e===n||typeof e==`string`&&!!l(n).test(e)}},flaglist:{coerceFunction:function(e,t,n,r){if((r.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!=`string`){t.set(n);return}for(var i=e.split(`+`),a=0;a{var n={staticPlot:{valType:`boolean`,dflt:!1},typesetMath:{valType:`boolean`,dflt:!0},plotlyServerURL:{valType:`string`,dflt:``},editable:{valType:`boolean`,dflt:!1},edits:{annotationPosition:{valType:`boolean`,dflt:!1},annotationTail:{valType:`boolean`,dflt:!1},annotationText:{valType:`boolean`,dflt:!1},axisTitleText:{valType:`boolean`,dflt:!1},colorbarPosition:{valType:`boolean`,dflt:!1},colorbarTitleText:{valType:`boolean`,dflt:!1},legendPosition:{valType:`boolean`,dflt:!1},legendText:{valType:`boolean`,dflt:!1},shapePosition:{valType:`boolean`,dflt:!1},titleText:{valType:`boolean`,dflt:!1}},editSelection:{valType:`boolean`,dflt:!0},autosizable:{valType:`boolean`,dflt:!1},responsive:{valType:`boolean`,dflt:!1},fillFrame:{valType:`boolean`,dflt:!1},frameMargins:{valType:`number`,dflt:0,min:0,max:.5},scrollZoom:{valType:`flaglist`,flags:[`cartesian`,`gl3d`,`geo`,`mapbox`,`map`],extras:[!0,!1],dflt:`gl3d+geo+map`},doubleClick:{valType:`enumerated`,values:[!1,`reset`,`autosize`,`reset+autosize`],dflt:`reset+autosize`},doubleClickDelay:{valType:`number`,dflt:300,min:0},showAxisDragHandles:{valType:`boolean`,dflt:!0},showAxisRangeEntryBoxes:{valType:`boolean`,dflt:!0},showTips:{valType:`boolean`,dflt:!0},displayNotifier:{valType:`boolean`,dflt:!0},showLink:{valType:`boolean`,dflt:!1},linkText:{valType:`string`,dflt:`Edit chart`,noBlank:!0},sendData:{valType:`boolean`,dflt:!0},showSources:{valType:`any`,dflt:!1},displayModeBar:{valType:`enumerated`,values:[`hover`,!0,!1],dflt:`hover`},showSendToCloud:{valType:`boolean`,dflt:!1},showEditInChartStudio:{valType:`boolean`,dflt:!1},modeBarButtonsToRemove:{valType:`any`,dflt:[]},modeBarButtonsToAdd:{valType:`any`,dflt:[]},modeBarButtons:{valType:`any`,dflt:!1},toImageButtonOptions:{valType:`any`,dflt:{}},displaylogo:{valType:`boolean`,dflt:!0},watermark:{valType:`boolean`,dflt:!1},plotGlPixelRatio:{valType:`number`,dflt:2,min:1,max:4},setBackground:{valType:`any`,dflt:`transparent`},topojsonURL:{valType:`string`,noBlank:!0,dflt:`https://cdn.plot.ly/un/`},mapboxAccessToken:{valType:`string`,dflt:null},logging:{valType:`integer`,min:0,max:2,dflt:1},notifyOnLogging:{valType:`integer`,min:0,max:2,dflt:0},queueLength:{valType:`integer`,min:0,dflt:0},locale:{valType:`string`,dflt:`en-US`},locales:{valType:`any`,dflt:{}}},r={};function i(e,t){for(var n in e){var r=e[n];r.valType?t[n]=r.dflt:(t[n]||(t[n]={}),i(r,t[n]))}}i(n,r),t.exports={configAttributes:n,dfltConfig:r}}),H=l((e,t)=>{var n=f(),r=_(),i=[];t.exports=function(e,t,a){if(a?._context?.displayNotifier===!1||i.indexOf(e)!==-1)return;i.push(e);var o=1e3;r(t)?o=t:t===`long`&&(o=3e3);var s=n.select(`body`).selectAll(`.plotly-notifier`).data([0]);s.enter().append(`div`).classed(`plotly-notifier`,!0);var c=s.selectAll(`.notifier-note`).data(i);function l(e){e.duration(700).style(`opacity`,0).each(`end`,function(e){var t=i.indexOf(e);t!==-1&&i.splice(t,1),n.select(this).remove()})}c.enter().append(`div`).classed(`notifier-note`,!0).style(`opacity`,0).each(function(e){var r=n.select(this);r.append(`button`).classed(`notifier-close`,!0).html(`×`).on(`click`,function(){r.transition().call(l)});for(var i=r.append(`p`),a=e.split(//g),s=0;s{var n=V().dfltConfig,r=H(),i=t.exports={};i.log=function(){var e;if(n.logging>1){var t=[`LOG:`];for(e=0;e1){var i=[];for(e=0;e`),`long`)}},i.warn=function(){var e;if(n.logging>0){var t=[`WARN:`];for(e=0;e0){var i=[];for(e=0;e`),`stick`)}},i.error=function(){var e;if(n.logging>0){var t=[`ERROR:`];for(e=0;e0){var i=[];for(e=0;e`),`stick`)}}}),W=l((e,t)=>{t.exports=function(){}}),G=l((e,t)=>{t.exports=function(e,t){if(t instanceof RegExp){for(var n=t.toString(),r=0;r{t.exports=n;function n(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),q=l((e,t)=>{t.exports=n;function n(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}}),J=l((e,t)=>{t.exports=n;function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}}),Y=l((e,t)=>{t.exports=n;function n(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),X=l((e,t)=>{t.exports=n;function n(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}}),ee=l((e,t)=>{t.exports=n;function n(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14],_=t[15],v=n*s-r*o,y=n*c-i*o,b=n*l-a*o,x=r*c-i*s,S=r*l-a*s,C=i*l-a*c,w=u*h-d*m,T=u*g-f*m,E=u*_-p*m,D=d*g-f*h,O=d*_-p*h,k=f*_-p*g,A=v*k-y*O+b*D+x*E-S*T+C*w;return A?(A=1/A,e[0]=(s*k-c*O+l*D)*A,e[1]=(i*O-r*k-a*D)*A,e[2]=(h*C-g*S+_*x)*A,e[3]=(f*S-d*C-p*x)*A,e[4]=(c*E-o*k-l*T)*A,e[5]=(n*k-i*E+a*T)*A,e[6]=(g*b-m*C-_*y)*A,e[7]=(u*C-f*b+p*y)*A,e[8]=(o*O-s*E+l*w)*A,e[9]=(r*E-n*O-a*w)*A,e[10]=(m*S-h*b+_*v)*A,e[11]=(d*b-u*S-p*v)*A,e[12]=(s*T-o*D-c*w)*A,e[13]=(n*D-r*T+i*w)*A,e[14]=(h*y-m*x-g*v)*A,e[15]=(u*x-d*y+f*v)*A,e):null}}),Z=l((e,t)=>{t.exports=n;function n(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14],_=t[15];return e[0]=s*(f*_-p*g)-d*(c*_-l*g)+h*(c*p-l*f),e[1]=-(r*(f*_-p*g)-d*(i*_-a*g)+h*(i*p-a*f)),e[2]=r*(c*_-l*g)-s*(i*_-a*g)+h*(i*l-a*c),e[3]=-(r*(c*p-l*f)-s*(i*p-a*f)+d*(i*l-a*c)),e[4]=-(o*(f*_-p*g)-u*(c*_-l*g)+m*(c*p-l*f)),e[5]=n*(f*_-p*g)-u*(i*_-a*g)+m*(i*p-a*f),e[6]=-(n*(c*_-l*g)-o*(i*_-a*g)+m*(i*l-a*c)),e[7]=n*(c*p-l*f)-o*(i*p-a*f)+u*(i*l-a*c),e[8]=o*(d*_-p*h)-u*(s*_-l*h)+m*(s*p-l*d),e[9]=-(n*(d*_-p*h)-u*(r*_-a*h)+m*(r*p-a*d)),e[10]=n*(s*_-l*h)-o*(r*_-a*h)+m*(r*l-a*s),e[11]=-(n*(s*p-l*d)-o*(r*p-a*d)+u*(r*l-a*s)),e[12]=-(o*(d*g-f*h)-u*(s*g-c*h)+m*(s*f-c*d)),e[13]=n*(d*g-f*h)-u*(r*g-i*h)+m*(r*f-i*d),e[14]=-(n*(s*g-c*h)-o*(r*g-i*h)+m*(r*c-i*s)),e[15]=n*(s*f-c*d)-o*(r*f-i*d)+u*(r*c-i*s),e}}),te=l((e,t)=>{t.exports=n;function n(e){var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],h=e[14],g=e[15],_=t*o-n*a,v=t*s-r*a,y=t*c-i*a,b=n*s-r*o,x=n*c-i*o,S=r*c-i*s,C=l*m-u*p,w=l*h-d*p,T=l*g-f*p,E=u*h-d*m,D=u*g-f*m;return _*(d*g-f*h)-v*D+y*E+b*T-x*w+S*C}}),ne=l((e,t)=>{t.exports=n;function n(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13],_=t[14],v=t[15],y=n[0],b=n[1],x=n[2],S=n[3];return e[0]=y*r+b*s+x*d+S*h,e[1]=y*i+b*c+x*f+S*g,e[2]=y*a+b*l+x*p+S*_,e[3]=y*o+b*u+x*m+S*v,y=n[4],b=n[5],x=n[6],S=n[7],e[4]=y*r+b*s+x*d+S*h,e[5]=y*i+b*c+x*f+S*g,e[6]=y*a+b*l+x*p+S*_,e[7]=y*o+b*u+x*m+S*v,y=n[8],b=n[9],x=n[10],S=n[11],e[8]=y*r+b*s+x*d+S*h,e[9]=y*i+b*c+x*f+S*g,e[10]=y*a+b*l+x*p+S*_,e[11]=y*o+b*u+x*m+S*v,y=n[12],b=n[13],x=n[14],S=n[15],e[12]=y*r+b*s+x*d+S*h,e[13]=y*i+b*c+x*f+S*g,e[14]=y*a+b*l+x*p+S*_,e[15]=y*o+b*u+x*m+S*v,e}}),re=l((e,t)=>{t.exports=n;function n(e,t,n){var r=n[0],i=n[1],a=n[2],o,s,c,l,u,d,f,p,m,h,g,_;return t===e?(e[12]=t[0]*r+t[4]*i+t[8]*a+t[12],e[13]=t[1]*r+t[5]*i+t[9]*a+t[13],e[14]=t[2]*r+t[6]*i+t[10]*a+t[14],e[15]=t[3]*r+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],c=t[2],l=t[3],u=t[4],d=t[5],f=t[6],p=t[7],m=t[8],h=t[9],g=t[10],_=t[11],e[0]=o,e[1]=s,e[2]=c,e[3]=l,e[4]=u,e[5]=d,e[6]=f,e[7]=p,e[8]=m,e[9]=h,e[10]=g,e[11]=_,e[12]=o*r+u*i+m*a+t[12],e[13]=s*r+d*i+h*a+t[13],e[14]=c*r+f*i+g*a+t[14],e[15]=l*r+p*i+_*a+t[15]),e}}),ie=l((e,t)=>{t.exports=n;function n(e,t,n){var r=n[0],i=n[1],a=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}}),ae=l((e,t)=>{t.exports=n;function n(e,t,n,r){var i=r[0],a=r[1],o=r[2],s=Math.sqrt(i*i+a*a+o*o),c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,c=Math.sin(n),l=Math.cos(n),u=1-l,d=t[0],f=t[1],p=t[2],m=t[3],h=t[4],g=t[5],_=t[6],v=t[7],y=t[8],b=t[9],x=t[10],S=t[11],C=i*i*u+l,w=a*i*u+o*c,T=o*i*u-a*c,E=i*a*u-o*c,D=a*a*u+l,O=o*a*u+i*c,k=i*o*u+a*c,A=a*o*u-i*c,j=o*o*u+l,e[0]=d*C+h*w+y*T,e[1]=f*C+g*w+b*T,e[2]=p*C+_*w+x*T,e[3]=m*C+v*w+S*T,e[4]=d*E+h*D+y*O,e[5]=f*E+g*D+b*O,e[6]=p*E+_*D+x*O,e[7]=m*E+v*D+S*O,e[8]=d*k+h*A+y*j,e[9]=f*k+g*A+b*j,e[10]=p*k+_*A+x*j,e[11]=m*k+v*A+S*j,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}}),oe=l((e,t)=>{t.exports=n;function n(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+l*r,e[5]=o*i+u*r,e[6]=s*i+d*r,e[7]=c*i+f*r,e[8]=l*i-a*r,e[9]=u*i-o*r,e[10]=d*i-s*r,e[11]=f*i-c*r,e}}),se=l((e,t)=>{t.exports=n;function n(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],c=t[3],l=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-l*r,e[1]=o*i-u*r,e[2]=s*i-d*r,e[3]=c*i-f*r,e[8]=a*r+l*i,e[9]=o*r+u*i,e[10]=s*r+d*i,e[11]=c*r+f*i,e}}),ce=l((e,t)=>{t.exports=n;function n(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],c=t[3],l=t[4],u=t[5],d=t[6],f=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+l*r,e[1]=o*i+u*r,e[2]=s*i+d*r,e[3]=c*i+f*r,e[4]=l*i-a*r,e[5]=u*i-o*r,e[6]=d*i-s*r,e[7]=f*i-c*r,e}}),Q=l((e,t)=>{t.exports=n;function n(e,t,n){var r,i,a,o=n[0],s=n[1],c=n[2],l=Math.sqrt(o*o+s*s+c*c);return Math.abs(l)<1e-6?null:(l=1/l,o*=l,s*=l,c*=l,r=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+c*r,e[2]=c*o*a-s*r,e[3]=0,e[4]=o*s*a-c*r,e[5]=s*s*a+i,e[6]=c*s*a+o*r,e[7]=0,e[8]=o*c*a+s*r,e[9]=s*c*a-o*r,e[10]=c*c*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}}),le=l((e,t)=>{t.exports=n;function n(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=r+r,c=i+i,l=a+a,u=r*s,d=r*c,f=r*l,p=i*c,m=i*l,h=a*l,g=o*s,_=o*c,v=o*l;return e[0]=1-(p+h),e[1]=d+v,e[2]=f-_,e[3]=0,e[4]=d-v,e[5]=1-(u+h),e[6]=m+g,e[7]=0,e[8]=f+_,e[9]=m-g,e[10]=1-(u+p),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}}),ue=l((e,t)=>{t.exports=n;function n(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),de=l((e,t)=>{t.exports=n;function n(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}}),fe=l((e,t)=>{t.exports=n;function n(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),pe=l((e,t)=>{t.exports=n;function n(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),me=l((e,t)=>{t.exports=n;function n(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),he=l((e,t)=>{t.exports=n;function n(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n+n,s=r+r,c=i+i,l=n*o,u=r*o,d=r*s,f=i*o,p=i*s,m=i*c,h=a*o,g=a*s,_=a*c;return e[0]=1-d-m,e[1]=u+_,e[2]=f-g,e[3]=0,e[4]=u-_,e[5]=1-l-m,e[6]=p+h,e[7]=0,e[8]=f+g,e[9]=p-h,e[10]=1-l-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}),ge=l((e,t)=>{t.exports=n;function n(e,t,n,r,i,a,o){var s=1/(n-t),c=1/(i-r),l=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*c,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*c,e[10]=(o+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*l,e[15]=0,e}}),_e=l((e,t)=>{t.exports=n;function n(e,t,n,r,i){var a=1/Math.tan(t/2),o=1/(r-i);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+r)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*r*o,e[15]=0,e}}),ve=l((e,t)=>{t.exports=n;function n(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),c=2/(o+s),l=2/(i+a);return e[0]=c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-((o-s)*c*.5),e[9]=(i-a)*l*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e}}),ye=l((e,t)=>{t.exports=n;function n(e,t,n,r,i,a,o){var s=1/(t-n),c=1/(r-i),l=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*l,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*c,e[14]=(o+a)*l,e[15]=1,e}}),be=l((e,t)=>{var n=Y();t.exports=r;function r(e,t,r,i){var a,o,s,c,l,u,d,f,p,m,h=t[0],g=t[1],_=t[2],v=i[0],y=i[1],b=i[2],x=r[0],S=r[1],C=r[2];return Math.abs(h-x)<1e-6&&Math.abs(g-S)<1e-6&&Math.abs(_-C)<1e-6?n(e):(d=h-x,f=g-S,p=_-C,m=1/Math.sqrt(d*d+f*f+p*p),d*=m,f*=m,p*=m,a=y*p-b*f,o=b*d-v*p,s=v*f-y*d,m=Math.sqrt(a*a+o*o+s*s),m?(m=1/m,a*=m,o*=m,s*=m):(a=0,o=0,s=0),c=f*s-p*o,l=p*a-d*s,u=d*o-f*a,m=Math.sqrt(c*c+l*l+u*u),m?(m=1/m,c*=m,l*=m,u*=m):(c=0,l=0,u=0),e[0]=a,e[1]=c,e[2]=d,e[3]=0,e[4]=o,e[5]=l,e[6]=f,e[7]=0,e[8]=s,e[9]=u,e[10]=p,e[11]=0,e[12]=-(a*h+o*g+s*_),e[13]=-(c*h+l*g+u*_),e[14]=-(d*h+f*g+p*_),e[15]=1,e)}}),xe=l((e,t)=>{t.exports=n;function n(e){return`mat4(`+e[0]+`, `+e[1]+`, `+e[2]+`, `+e[3]+`, `+e[4]+`, `+e[5]+`, `+e[6]+`, `+e[7]+`, `+e[8]+`, `+e[9]+`, `+e[10]+`, `+e[11]+`, `+e[12]+`, `+e[13]+`, `+e[14]+`, `+e[15]+`)`}}),Se=l((e,t)=>{t.exports={create:K(),clone:q(),copy:J(),identity:Y(),transpose:X(),invert:ee(),adjoint:Z(),determinant:te(),multiply:ne(),translate:re(),scale:ie(),rotate:ae(),rotateX:oe(),rotateY:se(),rotateZ:ce(),fromRotation:Q(),fromRotationTranslation:le(),fromScaling:ue(),fromTranslation:de(),fromXRotation:fe(),fromYRotation:pe(),fromZRotation:me(),fromQuat:he(),frustum:ge(),perspective:_e(),perspectiveFromFieldOfView:ve(),ortho:ye(),lookAt:be(),str:xe()}}),Ce=l(e=>{var t=Se();e.init2dArray=function(e,t){for(var n=Array(e),r=0;r{var n=f(),r=U(),i=Ce(),a=Se();function o(e){var t;if(typeof e==`string`){if(t=document.getElementById(e),t===null)throw Error(`No DOM element with id '`+e+`' exists on the page.`);return t}if(e==null)throw Error(`DOM element provided is null or undefined`);return e}function s(e){var t=n.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed(`js-plotly-plot`)}function c(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function l(e,t){u(`global`,e,t)}function u(e,t,n){var i=`plotly.js-style-`+e,a=document.getElementById(i);if(!(a&&a.matches(`.no-inline-styles`))){a||(a=document.createElement(`style`),a.setAttribute(`id`,i),a.appendChild(document.createTextNode(``)),document.head.appendChild(a));var o=a.sheet;o?o.insertRule?o.insertRule(t+`{`+n+`}`,0):o.addRule?o.addRule(t,n,0):r.warn(`addStyleRule failed`):r.warn(`Cannot addRelatedStyleRule, probably due to strict CSP...`)}}function d(e){var t=`plotly.js-style-`+e,n=document.getElementById(t);n&&c(n)}function p(e,t,n,r,i,a){var o=r.split(`:`),s=i.split(`:`),c=`data-btn-style-event-added`;a||=document,a.querySelectorAll(e).forEach(function(e){e.getAttribute(c)||(e.addEventListener(`mouseenter`,function(){var e=this.querySelector(n);e&&(e.style[o[0]]=o[1])}),e.addEventListener(`mouseleave`,function(){var e=this.querySelector(n);e&&(t&&this.matches(t)?e.style[o[0]]=o[1]:e.style[s[0]]=s[1])}),e.setAttribute(c,!0))})}function m(e){var t=g(e),n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(e){var t=h(e);if(t){var r=i.convertCssMatrix(t);n=a.multiply(n,n,r)}}),n}function h(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue(`-webkit-transform`)||t.getPropertyValue(`-moz-transform`)||t.getPropertyValue(`-ms-transform`)||t.getPropertyValue(`-o-transform`)||t.getPropertyValue(`transform`);return n===`none`?null:n.replace(`matrix`,``).replace(`3d`,``).slice(1,-1).split(`,`).map(function(e){return+e})}function g(e){for(var t=[];_(e);)t.push(e),e=e.parentNode,typeof ShadowRoot==`function`&&e instanceof ShadowRoot&&(e=e.host);return t}function _(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function v(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}t.exports={getGraphDiv:o,isPlotDiv:s,removeElement:c,addStyleRule:l,addRelatedStyleRule:u,deleteRelatedStyleRule:d,setStyleOnHover:p,getFullTransformMatrix:m,getElementTransformMatrix:h,getElementAndAncestors:g,equalDomRects:v}}),Te=l((e,t)=>{t.exports={mode:{valType:`enumerated`,dflt:`afterall`,values:[`immediate`,`next`,`afterall`]},direction:{valType:`enumerated`,values:[`forward`,`reverse`],dflt:`forward`},fromcurrent:{valType:`boolean`,dflt:!1},frame:{duration:{valType:`number`,min:0,dflt:500},redraw:{valType:`boolean`,dflt:!0}},transition:{duration:{valType:`number`,min:0,dflt:500,editType:`none`},easing:{valType:`enumerated`,dflt:`cubic-in-out`,values:`linear.quad.cubic.sin.exp.circle.elastic.back.bounce.linear-in.quad-in.cubic-in.sin-in.exp-in.circle-in.elastic-in.back-in.bounce-in.linear-out.quad-out.cubic-out.sin-out.exp-out.circle-out.elastic-out.back-out.bounce-out.linear-in-out.quad-in-out.cubic-in-out.sin-in-out.exp-in-out.circle-in-out.elastic-in-out.back-in-out.bounce-in-out`.split(`.`),editType:`none`},ordering:{valType:`enumerated`,values:[`layout first`,`traces first`],dflt:`layout first`,editType:`none`}}}}),Ee=l((e,t)=>{var n=k().extendFlat,r=b(),i={valType:`flaglist`,extras:[`none`],flags:[`calc`,`clearAxisTypes`,`plot`,`style`,`markerSize`,`colorbars`]},a={valType:`flaglist`,extras:[`none`],flags:[`calc`,`plot`,`legend`,`ticks`,`axrange`,`layoutstyle`,`modebar`,`camera`,`arraydraw`,`colorbars`]},o=i.flags.slice().concat([`fullReplot`]),s=a.flags.slice().concat(`layoutReplot`);t.exports={traces:i,layout:a,traceFlags:function(){return c(o)},layoutFlags:function(){return c(s)},update:function(e,t){var n=t.editType;if(n&&n!==`none`)for(var r=n.split(`+`),i=0;i{e.dash={valType:`string`,values:[`solid`,`dot`,`dash`,`longdash`,`dashdot`,`longdashdot`],dflt:`solid`,editType:`style`},e.pattern={shape:{valType:`enumerated`,values:[``,`/`,`\\`,`x`,`-`,`|`,`+`,`.`],dflt:``,arrayOk:!0,editType:`style`},path:{valType:`string`,arrayOk:!0,editType:`style`},fillmode:{valType:`enumerated`,values:[`replace`,`overlay`],dflt:`replace`,editType:`style`},bgcolor:{valType:`color`,arrayOk:!0,editType:`style`},fgcolor:{valType:`color`,arrayOk:!0,editType:`style`},fgopacity:{valType:`number`,editType:`style`,min:0,max:1},size:{valType:`number`,min:0,dflt:8,arrayOk:!0,editType:`style`},solidity:{valType:`number`,min:0,max:1,dflt:.3,arrayOk:!0,editType:`style`},editType:`style`}}),Oe=l((e,t)=>{t.exports={FORMAT_LINK:`https://github.com/d3/d3-format/tree/v1.4.5#d3-format`,DATE_FORMAT_LINK:`https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format`}}),ke=l(e=>{var{DATE_FORMAT_LINK:t,FORMAT_LINK:n}=Oe(),r=[`Variables that can't be found will be replaced with the specifier.`,`For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.`,`Variables with an undefined value will be replaced with the fallback value.`].join(` `);function i({supportOther:e}={}){return[`Variables are inserted using %{variable},`,`for example "y: %{y}"`+(e?` as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.`:`.`),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,n,`for details on the formatting syntax.`,`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,t,`for details on the date formatting syntax.`,r].join(` `)}e.templateFormatStringDescription=i,e.hovertemplateAttrs=({editType:e=`none`,arrayOk:t}={},n={})=>s({valType:`string`,dflt:``,editType:e},t===!1?{}:{arrayOk:!0}),e.texttemplateAttrs=({editType:e=`calc`,arrayOk:t}={},n={})=>s({valType:`string`,dflt:``,editType:e},t===!1?{}:{arrayOk:!0}),e.shapeTexttemplateAttrs=({editType:e=`arraydraw`,newshape:t}={},n={})=>({valType:`string`,dflt:``,editType:e}),e.templatefallbackAttrs=({editType:e=`none`}={})=>({valType:`any`,dflt:`-`,editType:e})}),Ae=l((e,t)=>{function n(e,t){return t?t.d2l(e):e}function r(e,t){return t?t.l2d(e):e}function i(e){return e.x0}function a(e){return e.x1}function o(e){return e.y0}function s(e){return e.y1}function c(e){return e.x0shift||0}function l(e){return e.x1shift||0}function u(e){return e.y0shift||0}function d(e){return e.y1shift||0}function f(e,t){return n(e.x1,t)+l(e)-n(e.x0,t)-c(e)}function p(e,t,r){return n(e.y1,r)+d(e)-n(e.y0,r)-u(e)}function m(e,t){return Math.abs(f(e,t))}function h(e,t,n){return Math.abs(p(e,t,n))}function g(e,t,n){return e.type===`line`?Math.sqrt(f(e,t)**2+p(e,t,n)**2):void 0}function _(e,t){return r((n(e.x1,t)+l(e)+n(e.x0,t)+c(e))/2,t)}function v(e,t,i){return r((n(e.y1,i)+d(e)+n(e.y0,i)+u(e))/2,i)}function y(e,t,n){return e.type===`line`?p(e,t,n)/f(e,t):void 0}t.exports={x0:i,x1:a,y0:o,y1:s,slope:y,dx:f,dy:p,width:m,height:h,length:g,xcenter:_,ycenter:v,simpleXVariables:[`x0`,`x1`,`y0`,`y1`,`dy`,`height`,`ycenter`],simpleYVariables:[`x0`,`x1`,`y0`,`y1`,`dx`,`width`,`xcenter`]}}),je=l((e,t)=>{var n=Ee().overrideAll,r=P(),i=A(),a=De().dash,o=k().extendFlat,{shapeTexttemplateAttrs:s,templatefallbackAttrs:c}=ke(),l=Ae();t.exports=n({newshape:{visible:o({},r.visible,{}),showlegend:{valType:`boolean`,dflt:!1},legend:o({},r.legend,{}),legendgroup:o({},r.legendgroup,{}),legendgrouptitle:{text:o({},r.legendgrouptitle.text,{}),font:i({})},legendrank:o({},r.legendrank,{}),legendwidth:o({},r.legendwidth,{}),line:{color:{valType:`color`},width:{valType:`number`,min:0,dflt:4},dash:o({},a,{dflt:`solid`})},fillcolor:{valType:`color`,dflt:`rgba(0,0,0,0)`},fillrule:{valType:`enumerated`,values:[`evenodd`,`nonzero`],dflt:`evenodd`},opacity:{valType:`number`,min:0,max:1,dflt:1},layer:{valType:`enumerated`,values:[`below`,`above`,`between`],dflt:`above`},drawdirection:{valType:`enumerated`,values:[`ortho`,`horizontal`,`vertical`,`diagonal`],dflt:`diagonal`},name:o({},r.name,{}),label:{text:{valType:`string`,dflt:``},texttemplate:s({newshape:!0},{keys:Object.keys(l)}),texttemplatefallback:c({editType:`arraydraw`}),font:i({}),textposition:{valType:`enumerated`,values:[`top left`,`top center`,`top right`,`middle left`,`middle center`,`middle right`,`bottom left`,`bottom center`,`bottom right`,`start`,`middle`,`end`]},textangle:{valType:`angle`,dflt:`auto`},xanchor:{valType:`enumerated`,values:[`auto`,`left`,`center`,`right`],dflt:`auto`},yanchor:{valType:`enumerated`,values:[`top`,`middle`,`bottom`]},padding:{valType:`number`,dflt:3,min:0}}},activeshape:{fillcolor:{valType:`color`,dflt:`rgb(255,0,255)`,description:`Sets the color filling the active shape' interior.`},opacity:{valType:`number`,min:0,max:1,dflt:.5}}},`none`,`from-root`)}),Me=l((e,t)=>{var n=De().dash,r=k().extendFlat;t.exports={newselection:{mode:{valType:`enumerated`,values:[`immediate`,`gradual`],dflt:`immediate`,editType:`none`},line:{color:{valType:`color`,editType:`none`},width:{valType:`number`,min:1,dflt:1,editType:`none`},dash:r({},n,{dflt:`dot`,editType:`none`}),editType:`none`},editType:`none`},activeselection:{fillcolor:{valType:`color`,dflt:`rgba(0,0,0,0)`,editType:`none`},opacity:{valType:`number`,min:0,max:1,dflt:.5,editType:`none`},editType:`none`}}}),Ne=l((e,t)=>{t.exports=function(e){var t=e.editType;return{t:{valType:`number`,dflt:0,editType:t},r:{valType:`number`,dflt:0,editType:t},b:{valType:`number`,dflt:0,editType:t},l:{valType:`number`,dflt:0,editType:t},editType:t}}}),Pe=l((e,t)=>{var n=A(),r=Te(),i=I(),a=je(),o=Me(),s=Ne(),c=k().extendFlat,l=n({editType:`calc`});l.family.dflt=`"Open Sans", verdana, arial, sans-serif`,l.size.dflt=12,l.color.dflt=i.defaultLine,t.exports={font:l,title:{text:{valType:`string`,editType:`layoutstyle`},font:n({editType:`layoutstyle`}),subtitle:{text:{valType:`string`,editType:`layoutstyle`},font:n({editType:`layoutstyle`}),editType:`layoutstyle`},xref:{valType:`enumerated`,dflt:`container`,values:[`container`,`paper`],editType:`layoutstyle`},yref:{valType:`enumerated`,dflt:`container`,values:[`container`,`paper`],editType:`layoutstyle`},x:{valType:`number`,min:0,max:1,dflt:.5,editType:`layoutstyle`},y:{valType:`number`,min:0,max:1,dflt:`auto`,editType:`layoutstyle`},xanchor:{valType:`enumerated`,dflt:`auto`,values:[`auto`,`left`,`center`,`right`],editType:`layoutstyle`},yanchor:{valType:`enumerated`,dflt:`auto`,values:[`auto`,`top`,`middle`,`bottom`],editType:`layoutstyle`},pad:c(s({editType:`layoutstyle`}),{}),automargin:{valType:`boolean`,dflt:!1,editType:`plot`},editType:`layoutstyle`},uniformtext:{mode:{valType:`enumerated`,values:[!1,`hide`,`show`],dflt:!1,editType:`plot`},minsize:{valType:`number`,min:0,dflt:0,editType:`plot`},editType:`plot`},autosize:{valType:`boolean`,dflt:!1,editType:`none`},width:{valType:`number`,min:10,dflt:700,editType:`plot`},height:{valType:`number`,min:10,dflt:450,editType:`plot`},minreducedwidth:{valType:`number`,min:2,dflt:64,editType:`plot`},minreducedheight:{valType:`number`,min:2,dflt:64,editType:`plot`},margin:{l:{valType:`number`,min:0,dflt:80,editType:`plot`},r:{valType:`number`,min:0,dflt:80,editType:`plot`},t:{valType:`number`,min:0,dflt:100,editType:`plot`},b:{valType:`number`,min:0,dflt:80,editType:`plot`},pad:{valType:`number`,min:0,dflt:0,editType:`plot`},autoexpand:{valType:`boolean`,dflt:!0,editType:`plot`},editType:`plot`},computed:{valType:`any`,editType:`none`},paper_bgcolor:{valType:`color`,dflt:i.background,editType:`plot`},plot_bgcolor:{valType:`color`,dflt:i.background,editType:`layoutstyle`},autotypenumbers:{valType:`enumerated`,values:[`convert types`,`strict`],dflt:`convert types`,editType:`calc`},separators:{valType:`string`,editType:`plot`},hidesources:{valType:`boolean`,dflt:!1,editType:`plot`},showlegend:{valType:`boolean`,editType:`legend`},colorway:{valType:`colorlist`,dflt:i.defaults,editType:`calc`},datarevision:{valType:`any`,editType:`calc`},uirevision:{valType:`any`,editType:`none`},editrevision:{valType:`any`,editType:`none`},selectionrevision:{valType:`any`,editType:`none`},template:{valType:`any`,editType:`calc`},newshape:a.newshape,activeshape:a.activeshape,newselection:o.newselection,activeselection:o.activeselection,meta:{valType:`any`,arrayOk:!0,editType:`plot`},transition:c({},r.transition,{editType:`none`})}}),Fe=l(()=>{(function(){if(!document.getElementById(`ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe`)){var e=document.createElement(`style`);e.id=`ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe`,e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()}),Ie=l(e=>{var t=U(),n=W(),r=G(),i=b(),a=we().addStyleRule,o=k(),s=P(),c=Pe(),l=o.extendFlat,u=o.extendDeepAll;e.modules={},e.allCategories={},e.allTypes=[],e.subplotsRegistry={},e.componentsRegistry={},e.layoutArrayContainers=[],e.layoutArrayRegexes=[],e.traceLayoutAttributes={},e.localeRegistry={},e.apiMethodRegistry={},e.collectableSubplotTypes=null,e.register=function(t){if(e.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw Error(`No argument passed to Plotly.register.`);for(var n=0;n{var t=m().timeFormat,n=_(),r=U(),i=D().mod,a=v(),o=a.BADNUM,s=a.ONEDAY,c=a.ONEHOUR,l=a.ONEMIN,u=a.ONESEC,d=a.EPOCHJD,f=Ie(),p=m().utcFormat,h=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,g=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,y=new Date().getFullYear()-70;function b(e){return e&&f.componentsRegistry.calendars&&typeof e==`string`&&e!==`gregorian`}e.dateTick0=function(t,n){var r=x(t,!!n);if(n<2)return r;var i=e.dateTime2ms(r,t);return i+=s*(n-1),e.ms2DateTime(i,0,t)};function x(e,t){return b(e)?t?f.getComponentMethod(`calendars`,`CANONICAL_SUNDAY`)[e]:f.getComponentMethod(`calendars`,`CANONICAL_TICK`)[e]:t?`2000-01-02`:`2000-01-01`}e.dfltRange=function(e){return b(e)?f.getComponentMethod(`calendars`,`DFLTRANGE`)[e]:[`2000-01-01`,`2001-01-01`]},e.isJSDate=function(e){return typeof e==`object`&&!!e&&typeof e.getTime==`function`};var S,C;e.dateTime2ms=function(t,n){if(e.isJSDate(t)){var r=t.getTimezoneOffset()*l,a=(t.getUTCMinutes()-t.getMinutes())*l+(t.getUTCSeconds()-t.getSeconds())*u+(t.getUTCMilliseconds()-t.getMilliseconds());if(a){var p=3*l;r=r-p/2+i(a-r+p/2,p)}return t=Number(t)-r,t>=S&&t<=C?t:o}if(typeof t!=`string`&&typeof t!=`number`)return o;t=String(t);var m=b(n),_=t.charAt(0);m&&(_===`G`||_===`g`)&&(t=t.slice(1),n=``);var v=m&&n.slice(0,7)===`chinese`,x=t.match(v?g:h);if(!x)return o;var w=x[1],T=x[3]||`1`,E=Number(x[5]||1),D=Number(x[7]||0),O=Number(x[9]||0),k=Number(x[11]||0);if(m){if(w.length===2)return o;w=Number(w);var A;try{var j=f.getComponentMethod(`calendars`,`getCal`)(n);if(v){var M=T.charAt(T.length-1)===`i`;T=parseInt(T,10),A=j.newDate(w,j.toMonthIndex(w,T,M),E)}else A=j.newDate(w,Number(T),E)}catch{return o}return A?(A.toJD()-d)*s+D*c+O*l+k*u:o}w=w.length===2?(Number(w)+2e3-y)%100+y:Number(w),--T;var N=new Date(Date.UTC(2e3,T,E,D,O));return N.setUTCFullYear(w),N.getUTCMonth()!==T||N.getUTCDate()!==E?o:N.getTime()+k*u},S=e.MIN_MS=e.dateTime2ms(`-9999`),C=e.MAX_MS=e.dateTime2ms(`9999-12-31 23:59:59.9999`),e.isDateTime=function(t,n){return e.dateTime2ms(t,n)!==o};function w(e,t){return String(e+10**t).slice(1)}var T=90*s,E=3*c,O=5*l;e.ms2DateTime=function(e,t,n){if(typeof e!=`number`||!(e>=S&&e<=C))return o;t||=0;var r=Math.floor(i(e+.05,1)*10),a=Math.round(e-r/10),m,h,g,_,v,y;if(b(n)){var x=Math.floor(a/s)+d,w=Math.floor(i(e,s));try{m=f.getComponentMethod(`calendars`,`getCal`)(n).fromJD(x).formatDate(`yyyy-mm-dd`)}catch{m=p(`G%Y-%m-%d`)(new Date(a))}if(m.charAt(0)===`-`)for(;m.length<11;)m=`-0`+m.slice(1);else for(;m.length<10;)m=`0`+m;h=t=S+s&&e<=C-s))return o;var n=Math.floor(i(e+.05,1)*10),r=new Date(Math.round(e-n/10));return k(t(`%Y-%m-%d`)(r),r.getHours(),r.getMinutes(),r.getSeconds(),r.getUTCMilliseconds()*10+n)};function k(e,t,n,r,i){if((t||n||r||i)&&(e+=` `+w(t,2)+`:`+w(n,2),(r||i)&&(e+=`:`+w(r,2),i))){for(var a=4;i%10==0;)--a,i/=10;e+=`.`+w(i,a)}return e}e.cleanDate=function(t,n,i){if(t===o)return n;if(e.isJSDate(t)||typeof t==`number`&&isFinite(t)){if(b(i))return r.error(`JS Dates and milliseconds are incompatible with world calendars`,t),n;if(t=e.ms2DateTimeLocal(+t),!t&&n!==void 0)return n}else if(!e.isDateTime(t,i))return r.error(`unrecognized date`,t),n;return t};var A=/%\d?f/g,j=/%h/g,M={1:`1`,2:`1`,3:`2`,4:`2`};function N(e,t,n,r){e=e.replace(A,function(e){var n=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(n).slice(2).replace(/0+$/,``)||`0`});var i=new Date(Math.floor(t+.05));if(e=e.replace(j,function(){return M[n(`%q`)(i)]}),b(r))try{e=f.getComponentMethod(`calendars`,`worldCalFmt`)(e,t,r)}catch{return`Invalid`}return n(e)(i)}var P=[59,59.9,59.99,59.999,59.9999];function F(e,t){var r=i(e+.05,s),a=w(Math.floor(r/c),2)+`:`+w(i(Math.floor(r/l),60),2);if(t!==`M`){n(t)||(t=0);var o=(100+Math.min(i(e/u,60),P[t])).toFixed(t).slice(1);t>0&&(o=o.replace(/0+$/,``).replace(/[\.]$/,``)),a+=`:`+o}return a}e.formatDate=function(e,t,n,r,i,a){if(i=b(i)&&i,!t){if(n===`y`)t=a.year;else if(n===`m`)t=a.month;else if(n===`d`)t=a.dayMonth+` +`+a.year;else return F(e,n)+` +`+N(a.dayMonthYear,e,r,i)}return N(t,e,r,i)};var I=3*s;e.incrementMonth=function(e,t,n){n=b(n)&&n;var a=i(e,s);if(e=Math.round(e-a),n)try{var o=Math.round(e/s)+d,c=f.getComponentMethod(`calendars`,`getCal`)(n),l=c.fromJD(o);return t%12?c.add(l,t,`m`):c.add(l,t/12,`y`),(l.toJD()-d)*s+a}catch{r.error(`invalid ms `+e+` in calendar `+n)}var u=new Date(e+I);return u.setUTCMonth(u.getUTCMonth()+t)+a-I},e.findExactDates=function(e,t){for(var r=0,i=0,a=0,o=0,c,l,u=b(t)&&f.getComponentMethod(`calendars`,`getCal`)(t),p=0;p{t.exports=function(e){return e}}),ze=l(e=>{var t=_(),n=U(),r=Re(),i=v().BADNUM,a=1e-9;e.findBin=function(e,r,i){if(t(r.start))return i?Math.ceil((e-r.start)/r.size-a)-1:Math.floor((e-r.start)/r.size+a);var u=0,d=r.length,f=0,p=d>1?(r[d-1]-r[0])/(d-1):1,m,h=p>=0?i?o:s:i?l:c;for(e+=p*a*(i?-1:1)*(p>=0?1:-1);u90&&n.log(`Long binary search...`),u-1};function o(e,t){return et}function l(e,t){return e>=t}e.sorterAsc=function(e,t){return e-t},e.sorterDes=function(e,t){return t-e},e.distinctVals=function(t){var n=t.slice();n.sort(e.sorterAsc);for(var r=n.length-1;r>-1&&n[r]===i;r--);for(var a=n[r]-n[0]||1,o=a/(r||1)/1e4,s=[],c,l=0;l<=r;l++){var u=n[l],d=u-c;c===void 0?(s.push(u),c=u):d>o&&(a=Math.min(a,d),s.push(u),c=u)}return{vals:s,minDiff:a}},e.roundUp=function(e,t,n){for(var r=0,i=t.length-1,a,o=0,s=+!n,c=+!!n,l=n?Math.ceil:Math.floor;r0&&(r=1),n&&r)return e.sort(t)}return r?e:e.reverse()},e.findIndexOfMin=function(e,t){t||=r;for(var n=1/0,i,a=0;a{t.exports=function(e){return Object.keys(e).sort()}}),Ve=l(e=>{var t=_(),n=x().isArrayOrTypedArray;e.aggNums=function(r,i,a,o){var s,c;if((!o||o>a.length)&&(o=a.length),t(i)||(i=!1),n(a[0])){for(c=Array(o),s=0;se.length-1)return e[e.length-1];var r=n%1;return r*e[Math.ceil(n)]+(1-r)*e[Math.floor(n)]}}),He=l((e,t)=>{var n=D(),r=n.mod,i=n.modHalf,a=Math.PI,o=2*a;function s(e){return e/180*a}function c(e){return e/a*180}function l(e){return Math.abs(e[1]-e[0])>o-1e-14}function u(e,t){return i(t-e,o)}function d(e,t){return Math.abs(u(e,t))}function f(e,t){if(l(t))return!0;var n,i;t[0]i&&(i+=o);var a=r(e,o),s=a+o;return a>=n&&a<=i||s>=n&&s<=i}function p(e,t,n,r){if(!f(t,r))return!1;var i,a;return n[0]=i&&e<=a}function m(e,t,n,r,i,s,c){i||=0,s||=0;var u=l([n,r]),d,f,p,m,h;u?(d=0,f=a,p=o):n{e.isLeftAnchor=function(e){return e.xanchor===`left`||e.xanchor===`auto`&&e.x<=1/3},e.isCenterAnchor=function(e){return e.xanchor===`center`||e.xanchor===`auto`&&e.x>1/3&&e.x<2/3},e.isRightAnchor=function(e){return e.xanchor===`right`||e.xanchor===`auto`&&e.x>=2/3},e.isTopAnchor=function(e){return e.yanchor===`top`||e.yanchor===`auto`&&e.y>=2/3},e.isMiddleAnchor=function(e){return e.yanchor===`middle`||e.yanchor===`auto`&&e.y>1/3&&e.y<2/3},e.isBottomAnchor=function(e){return e.yanchor===`bottom`||e.yanchor===`auto`&&e.y<=1/3}}),We=l(e=>{var t=D().mod;e.segmentsIntersect=n;function n(e,t,n,r,i,a,o,s){var c=n-e,l=i-e,u=o-i,d=r-t,f=a-t,p=s-a,m=c*p-u*d;if(m===0)return null;var h=(l*p-u*f)/m,g=(l*d-c*f)/m;return g<0||g>1||h<0||h>1?null:{x:e+c*h,y:t+d*h}}e.segmentDistance=function(e,t,i,a,o,s,c,l){if(n(e,t,i,a,o,s,c,l))return 0;var u=i-e,d=a-t,f=c-o,p=l-s,m=u*u+d*d,h=f*f+p*p,g=Math.min(r(u,d,m,o-e,s-t),r(u,d,m,c-e,l-t),r(f,p,h,e-o,t-s),r(f,p,h,i-o,a-s));return Math.sqrt(g)};function r(e,t,n,r,i){var a=r*e+i*t;if(a<0)return r*r+i*i;if(a>n){var o=r-e,s=i-t;return o*o+s*s}var c=r*t-i*e;return c*c/n}var i,a,o;e.getTextLocation=function(e,n,r,s){if((e!==a||s!==o)&&(i={},a=e,o=s),i[r])return i[r];var c=e.getPointAtLength(t(r-s/2,n)),l=e.getPointAtLength(t(r+s/2,n)),u=Math.atan((l.y-c.y)/(l.x-c.x)),d=e.getPointAtLength(t(r,n)),f={x:(d.x*4+c.x+l.x)/6,y:(d.y*4+c.y+l.y)/6,theta:u};return i[r]=f,f},e.clearLocationCache=function(){a=null},e.getVisibleSegment=function(e,t,n){var r=t.left,i=t.right,a=t.top,o=t.bottom,s=0,c=e.getTotalLength(),l=c,u,d;function f(t){var n=e.getPointAtLength(t);t===0?u=n:t===c&&(d=n);var s=n.xi?n.x-i:0,l=n.yo?n.y-o:0;return Math.sqrt(s*s+l*l)}for(var p=f(s);p;){if(s+=p+n,s>l)return;p=f(s)}for(p=f(l);p;){if(l-=p+n,s>l)return;p=f(l)}return{min:s,max:l,len:l-s,total:c,isClosed:s===0&&l===c&&Math.abs(u.x-d.x)<.1&&Math.abs(u.y-d.y)<.1}},e.findPointOnPath=function(e,t,n,r){r||={};for(var i=r.pathLength||e.getTotalLength(),a=r.tolerance||.001,o=r.iterationLimit||30,s=e.getPointAtLength(0)[n]>e.getPointAtLength(i)[n]?-1:1,c=0,l=0,u=i,d,f,p;c0?u=d:l=d,c++}return f}}),Ge=l(e=>{var t={};e.throttle=function(e,r,i){var a=t[e],o=Date.now();if(!a){for(var s in t)t[s].tsa.ts+r){c();return}a.timer=setTimeout(function(){c(),a.timer=null},r)},e.done=function(e){var n=t[e];return!n||!n.timer?Promise.resolve():new Promise(function(e){var t=n.onDone;n.onDone=function(){t&&t(),e(),n.onDone=null}})},e.clear=function(r){if(r)n(t[r]),delete t[r];else for(var i in t)e.clear(i)};function n(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}}),Ke=l((e,t)=>{t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener(`resize`,e._responsiveChartHandler),delete e._responsiveChartHandler)}}),qe=l((e,t)=>{t.exports=a,t.exports.isMobile=a,t.exports.default=a;var n=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,i=/android|ipad|playbook|silk/i;function a(e){e||={};let t=e.ua;if(!t&&typeof navigator<`u`&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers[`user-agent`]==`string`&&(t=t.headers[`user-agent`]),typeof t!=`string`)return!1;let a=n.test(t)&&!r.test(t)||!!e.tablet&&i.test(t);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf(`Macintosh`)!==-1&&t.indexOf(`Safari`)!==-1&&(a=!0),a}}),Je=l((e,t)=>{var n=_(),r=qe();t.exports=function(e){var t=e&&e.hasOwnProperty(`userAgent`)?e.userAgent:i();if(typeof t!=`string`)return!0;var a=r({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a){for(var o=t.split(` `),s=1;s-1;c--){var l=o[c];if(l.slice(0,8)===`Version/`){var u=l.slice(8).split(`.`)[0];if(n(u)&&(u=+u),u>=13)return!0}}}return a};function i(){var e;return typeof navigator<`u`&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers[`user-agent`]==`string`&&(e=e.headers[`user-agent`]),e}}),Ye=l((e,t)=>{var n=f();t.exports=function(e,t,r){var i=e.selectAll(`g.`+r.replace(/\s/g,`.`)).data(t,function(e){return e[0].trace.uid});i.exit().remove(),i.enter().append(`g`).attr(`class`,r),i.order();var a=e.classed(`rangeplot`)?`nodeRangePlot3`:`node3`;return i.each(function(e){e[0][a]=n.select(this)}),i}}),Xe=l((e,t)=>{var n=Ie();t.exports=function(e,t){for(var r=e._context.locale,i=0;i<2;i++){for(var a=e._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var c=s[t];if(c)return c}a=n.localeRegistry}var l=r.split(`-`)[0];if(l===r)break;r=l}return t}}),Ze=l((e,t)=>{t.exports=function(e){for(var t={},n=[],r=0,i=0;i{t.exports=function(e){for(var t=i(e)?r:n,a=[],o=0;o{t.exports=function(e,t){if(!t)return e;var n=1/Math.abs(t),r=n>1?(n*e+n*t)/n:e+t,i=String(r).length;if(i>16){var a=String(t).length;if(i>=String(e).length+a){var o=parseFloat(r).toPrecision(12);o.indexOf(`e+`)===-1&&(r=+o)}}return r}}),et=l((e,t)=>{var n=_(),r=v().BADNUM,i=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(e){return typeof e==`string`&&(e=e.replace(i,``)),n(e)?Number(e):r}}),$=l((e,t)=>{var n=f(),r=m().utcFormat,i=h().format,a=_(),o=v(),l=o.FP_SAFE,u=-l,d=o.BADNUM,p=t.exports={};p.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:e===`0.f`?`~f`:/^\d%/.test(e)?`~%`:/^\ds/.test(e)?`~s`:!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?`~`+e:e};var g={};p.warnBadFormat=function(e){var t=String(e);g[t]||(g[t]=1,p.warn(`encountered bad format: "`+t+`"`))},p.noFormat=function(e){return String(e)},p.numberFormat=function(e){var t;try{t=i(p.adjustFormat(e))}catch{return p.warnBadFormat(e),p.noFormat}return t},p.nestedProperty=S(),p.keyedContainer=C(),p.relativeAttr=w(),p.isPlainObject=b(),p.toLogRange=T(),p.relinkPrivateKeys=E();var y=x();p.isArrayBuffer=y.isArrayBuffer,p.isTypedArray=y.isTypedArray,p.isArrayOrTypedArray=y.isArrayOrTypedArray,p.isArray1D=y.isArray1D,p.ensureArray=y.ensureArray,p.concat=y.concat,p.maxRowLength=y.maxRowLength,p.minRowLength=y.minRowLength;var O=D();p.mod=O.mod,p.modHalf=O.modHalf;var A=B();p.valObjectMeta=A.valObjectMeta,p.coerce=A.coerce,p.coerce2=A.coerce2,p.coerceFont=A.coerceFont,p.coercePattern=A.coercePattern,p.coerceHoverinfo=A.coerceHoverinfo,p.coerceSelectionMarkerOpacity=A.coerceSelectionMarkerOpacity,p.validate=A.validate;var j=Le();p.dateTime2ms=j.dateTime2ms,p.isDateTime=j.isDateTime,p.ms2DateTime=j.ms2DateTime,p.ms2DateTimeLocal=j.ms2DateTimeLocal,p.cleanDate=j.cleanDate,p.isJSDate=j.isJSDate,p.formatDate=j.formatDate,p.incrementMonth=j.incrementMonth,p.dateTick0=j.dateTick0,p.dfltRange=j.dfltRange,p.findExactDates=j.findExactDates,p.MIN_MS=j.MIN_MS,p.MAX_MS=j.MAX_MS;var M=ze();p.findBin=M.findBin,p.sorterAsc=M.sorterAsc,p.sorterDes=M.sorterDes,p.distinctVals=M.distinctVals,p.roundUp=M.roundUp,p.sort=M.sort,p.findIndexOfMin=M.findIndexOfMin,p.sortObjectKeys=Be();var N=Ve();p.aggNums=N.aggNums,p.len=N.len,p.mean=N.mean,p.geometricMean=N.geometricMean,p.median=N.median,p.midRange=N.midRange,p.variance=N.variance,p.stdev=N.stdev,p.interp=N.interp;var P=Ce();p.init2dArray=P.init2dArray,p.transposeRagged=P.transposeRagged,p.dot=P.dot,p.translationMatrix=P.translationMatrix,p.rotationMatrix=P.rotationMatrix,p.rotationXYMatrix=P.rotationXYMatrix,p.apply3DTransform=P.apply3DTransform,p.apply2DTransform=P.apply2DTransform,p.apply2DTransform2=P.apply2DTransform2,p.convertCssMatrix=P.convertCssMatrix,p.inverseTransformMatrix=P.inverseTransformMatrix;var F=He();p.deg2rad=F.deg2rad,p.rad2deg=F.rad2deg,p.angleDelta=F.angleDelta,p.angleDist=F.angleDist,p.isFullCircle=F.isFullCircle,p.isAngleInsideSector=F.isAngleInsideSector,p.isPtInsideSector=F.isPtInsideSector,p.pathArc=F.pathArc,p.pathSector=F.pathSector,p.pathAnnulus=F.pathAnnulus;var I=Ue();p.isLeftAnchor=I.isLeftAnchor,p.isCenterAnchor=I.isCenterAnchor,p.isRightAnchor=I.isRightAnchor,p.isTopAnchor=I.isTopAnchor,p.isMiddleAnchor=I.isMiddleAnchor,p.isBottomAnchor=I.isBottomAnchor;var L=We();p.segmentsIntersect=L.segmentsIntersect,p.segmentDistance=L.segmentDistance,p.getTextLocation=L.getTextLocation,p.clearLocationCache=L.clearLocationCache,p.getVisibleSegment=L.getVisibleSegment,p.findPointOnPath=L.findPointOnPath;var R=k();p.extendFlat=R.extendFlat,p.extendDeep=R.extendDeep,p.extendDeepAll=R.extendDeepAll,p.extendDeepNoArrays=R.extendDeepNoArrays;var V=U();p.log=V.log,p.warn=V.warn,p.error=V.error,p.counterRegex=z().counter;var K=Ge();p.throttle=K.throttle,p.throttleDone=K.done,p.clearThrottle=K.clear;var q=we();p.getGraphDiv=q.getGraphDiv,p.isPlotDiv=q.isPlotDiv,p.removeElement=q.removeElement,p.addStyleRule=q.addStyleRule,p.addRelatedStyleRule=q.addRelatedStyleRule,p.deleteRelatedStyleRule=q.deleteRelatedStyleRule,p.setStyleOnHover=q.setStyleOnHover,p.getFullTransformMatrix=q.getFullTransformMatrix,p.getElementTransformMatrix=q.getElementTransformMatrix,p.getElementAndAncestors=q.getElementAndAncestors,p.equalDomRects=q.equalDomRects,p.clearResponsive=Ke(),p.preserveDrawingBuffer=Je(),p.makeTraceGroups=Ye(),p._=Xe(),p.notifier=H(),p.filterUnique=Ze(),p.filterVisible=Qe(),p.pushUnique=G(),p.increment=$e(),p.cleanNumber=et(),p.ensureNumber=function(e){return a(e)?(e=Number(e),e>l||e=t?!1:a(e)&&e>=0&&e%1==0},p.noop=W(),p.identity=Re(),p.repeat=function(e,t){for(var n=Array(t),r=0;rn?Math.max(n,Math.min(t,e)):Math.max(t,Math.min(n,e))},p.bBoxIntersect=function(e,t,n){return n||=0,e.left<=t.right+n&&t.left<=e.right+n&&e.top<=t.bottom+n&&t.top<=e.bottom+n},p.simpleMap=function(e,t,n,r,i){for(var a=e.length,o=Array(a),s=0;s=2**n?i>10?(p.warn(`randstr failed uniqueness`),o):e(t,n,r,(i||0)+1):o},p.OptionControl=function(e,t){e||={},t||=`opt`;var n={};return n.optionList=[],n._newoption=function(r){r[t]=e,n[r.name]=r,n.optionList.push(r)},n[`_`+t]=e,n},p.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;for(var n=e.length,r=2*n,i=2*t-1,a=Array(i),o=Array(n),s=0,c,l,u;s=r&&(l-=r*Math.floor(l/r)),l<0?l=-1-l:l>=n&&(l=r-1-l),u+=e[l]*a[c];o[s]=u}return o},p.syncOrAsync=function(e,t,n){var r,i;function a(){return p.syncOrAsync(e,t,n)}for(;e.length;)if(i=e.splice(0,1)[0],r=i(t),r&&r.then)return r.then(a);return n&&n(t)},p.stripTrailingSlash=function(e){return e.slice(-1)===`/`?e.slice(0,-1):e},p.noneOrAll=function(e,t,n){if(e){for(var r=!1,i=!0,a=0,o;a0?t:0})},p.fillArray=function(e,t,n,r){if(r||=p.identity,p.isArrayOrTypedArray(e))for(var i=0;iZ.test(window.navigator.userAgent);var te=/Firefox\/(\d+)\.\d+/;p.getFirefoxVersion=function(){var e=te.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},p.isD3Selection=function(e){return e instanceof n.selection},p.ensureSingle=function(e,t,n,r){var i=e.select(t+(n?`.`+n:``));if(i.size())return i;var a=e.append(t);return n&&a.classed(n,!0),r&&a.call(r),a},p.ensureSingleById=function(e,t,n,r){var i=e.select(t+`#`+n);if(i.size())return i;var a=e.append(t).attr(`id`,n);return r&&a.call(r),a},p.objectFromPath=function(e,t){for(var n=e.split(`.`),r,i=r={},a=0;a1?i+o[1]:``;if(a&&(o.length>1||s.length>4||n))for(;r.test(s);)s=s.replace(r,`$1`+a+`$2`);return s+c},p.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var ae=/^\w*$/;p.templateString=function(e,t){var n={};return e.replace(p.TEMPLATE_STRING_REGEX,function(e,r){var i;return ae.test(r)?i=t[r]:(n[r]=n[r]||p.nestedProperty(t,r).get,i=n[r](!0)),i===void 0?``:i})};var oe={max:10,count:0,name:`hovertemplate`};p.hovertemplateString=e=>de(c(s({},e),{opts:oe}));var se={max:10,count:0,name:`texttemplate`};p.texttemplateString=e=>de(c(s({},e),{opts:se}));var ce=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Q(e){var t=e.match(ce);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var le={max:10,count:0,name:`texttemplate`,parseMultDiv:!0};p.texttemplateStringForShapes=e=>de(c(s({},e),{opts:le}));var ue=/^[:|\|]/;function de({data:e=[],locale:t,fallback:n,labels:i={},opts:a,template:o}){return o.replace(p.TEMPLATE_STRING_REGEX,(o,s,c)=>{let l=[`xother`,`yother`].includes(s),u=[`_xother`,`_yother`].includes(s),d=[`_xother_`,`_yother_`].includes(s),f=[`xother_`,`yother_`].includes(s),m=l||u||f||d;(u||d)&&(s=s.substring(1)),(f||d)&&(s=s.substring(0,s.length-1));let h=null,g=null;if(a.parseMultDiv){var _=Q(s);s=_.key,h=_.op,g=_.number}let v;if(m){if(i[s]===void 0)return``;v=i[s]}else for(let t of e)if(t){if(t.hasOwnProperty(s)){v=t[s];break}if(ae.test(s)||(v=p.nestedProperty(t,s).get(!0)),v!==void 0)break}if(v===void 0){let{count:e,max:t,name:r}=a,i=n===!1?o:n;return e=fe&&o<=pe,l=s>=fe&&s<=pe;if(c&&(r=10*r+o-fe),l&&(i=10*i+s-fe),!c||!l){if(r!==i)return r-i;if(o!==s)return o-s}}return i-r};var me=2e9;p.seedPseudoRandom=function(){me=2e9},p.pseudoRandom=function(){var e=me;return me=(69069*me+1)%4294967296,Math.abs(me-e)<429496729?p.pseudoRandom():me/4294967296},p.fillText=function(e,t,n){var r=Array.isArray(n)?function(e){n.push(e)}:function(e){n.text=e},i=p.extractOption(e,t,`htx`,`hovertext`);if(p.isValidTextValue(i))return r(i);var a=p.extractOption(e,t,`tx`,`text`);if(p.isValidTextValue(a))return r(a)},p.isValidTextValue=function(e){return e||e===0},p.formatPercent=function(e,t){t||=0;for(var n=(Math.round(100*e*10**t)*.1**t).toFixed(t)+`%`,r=0;r1&&(l=1):l=0,p.strTranslate(i-l*(n+o),a-l*(r+s))+p.strScale(l)+(c?`rotate(`+c+(t?``:` `+n+` `+r)+`)`:``)},p.setTransormAndDisplay=function(e,t){e.attr(`transform`,p.getTextTransform(t)),e.style(`display`,t.scale?null:`none`)},p.ensureUniformFontSize=function(e,t){var n=p.extendFlat({},t);return n.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),n},p.join2=function(e,t,n){var r=e.length;return r>1?e.slice(0,-1).join(t)+n+e[r-1]:e.join(t)},p.bigFont=function(e){return Math.round(1.2*e)};var he=p.getFirefoxVersion(),ge=he!==null&&he<86;p.getPositionFromD3Event=function(){return ge?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}}),tt=l(()=>{var e=$(),t={"X,X div":`direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;`,"X input,X button":`font-family:"Open Sans",verdana,arial,sans-serif;`,"X input:focus,X button:focus":`outline:none;`,"X a":`text-decoration:none;`,"X a:hover":`text-decoration:none;`,"X .crisp":`shape-rendering:crispEdges;`,"X .user-select-none":`-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;`,"X svg a":`fill:#447adb;`,"X svg a:hover":`fill:#3c6dc5;`,"X .main-svg":`position:absolute;top:0;left:0;pointer-events:none;`,"X .main-svg .draglayer":`pointer-events:all;`,"X .cursor-default":`cursor:default;`,"X .cursor-pointer":`cursor:pointer;`,"X .cursor-crosshair":`cursor:crosshair;`,"X .cursor-move":`cursor:move;`,"X .cursor-col-resize":`cursor:col-resize;`,"X .cursor-row-resize":`cursor:row-resize;`,"X .cursor-ns-resize":`cursor:ns-resize;`,"X .cursor-ew-resize":`cursor:ew-resize;`,"X .cursor-sw-resize":`cursor:sw-resize;`,"X .cursor-s-resize":`cursor:s-resize;`,"X .cursor-se-resize":`cursor:se-resize;`,"X .cursor-w-resize":`cursor:w-resize;`,"X .cursor-e-resize":`cursor:e-resize;`,"X .cursor-nw-resize":`cursor:nw-resize;`,"X .cursor-n-resize":`cursor:n-resize;`,"X .cursor-ne-resize":`cursor:ne-resize;`,"X .cursor-grab":`cursor:-webkit-grab;cursor:grab;`,"X .modebar":`position:absolute;top:2px;right:2px;`,"X .ease-bg":`-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;`,"X .modebar--hover>:not(.watermark)":`opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;`,"X:hover .modebar--hover .modebar-group":`opacity:1;`,"X:focus-within .modebar--hover .modebar-group":`opacity:1;`,"X .modebar-group":`float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;`,"X .modebar-group a":`display:grid;place-content:center;`,"X .modebar-btn":`position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);`,"X .modebar-btn svg":`position:relative;`,"X .modebar-btn:focus-visible":`outline:1px solid #000;outline-offset:1px;border-radius:3px;`,"X .modebar.vertical":`display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;`,"X .modebar.vertical svg":`top:-1px;`,"X .modebar.vertical .modebar-group":`display:block;float:none;padding-left:0px;padding-bottom:8px;`,"X .modebar.vertical .modebar-group .modebar-btn":`display:block;text-align:center;`,"X [data-title]:before,X [data-title]:after":`position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;`,"X [data-title]:hover:before,X [data-title]:hover:after":`display:block;opacity:1;`,"X [data-title]:before":`content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;`,"X [data-title]:after":`content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;`,"X .vertical [data-title]:before,X .vertical [data-title]:after":`top:0%;right:200%;`,"X .vertical [data-title]:before":`border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;`,"X .plotly-cloud-dialog":`font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);`,"X .plotly-cloud-dialog .plotly-cloud-dialog-box":`box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;`,"X .plotly-cloud-dialog .plotly-cloud-dialog-title":`font-size:16px;font-weight:bold;margin-bottom:12px;`,"X .plotly-cloud-dialog .plotly-cloud-dialog-message":`line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;`,"X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":`display:flex;justify-content:flex-end;margin-top:20px;`,"X .plotly-cloud-dialog .plotly-cloud-dialog-btn":`font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;`,"X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":`outline:2px solid #447adb;outline-offset:1px;`,"X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":`background-color:#fff;border-color:#e0e2e5;color:#777;`,"X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":`background-color:#f3f3f3;`,"X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":`background-color:#447adb;color:#fff;`,"X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":`background-color:#1d3b84;`,Y:`font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;`,"Y p":`margin:0;`,"Y .notifier-note":`min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;`,"Y .notifier-close":`color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;`,"Y .notifier-close:hover":`color:#444;text-decoration:none;cursor:pointer;`};for(r in t)n=r.replace(/^,/,` ,`).replace(/X/g,`.js-plotly-plot .plotly`).replace(/Y/g,`.plotly-notifier`),e.addStyleRule(n,t[r]);var n,r}),nt=l((e,t)=>{t.exports=!0}),rt=l((e,t)=>{var n=nt();t.exports=typeof window.matchMedia==`function`?!window.matchMedia(`(hover: none)`).matches:n}),it=l((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r{var n=it().EventEmitter;t.exports={init:function(e){if(e._ev instanceof n)return e;var t=new n,r=new n;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(e,n){t.emit(e,n),r.emit(e,n)},typeof e.addEventListener==`function`&&e.addEventListener(`wheel`,()=>{},{passive:!0}),e},triggerHandler:function(e,t,n){var r,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(e){if(e.listener){if(i.removeListener(t,e.listener),!e.fired)return e.fired=!0,e.listener.apply(i,[n])}else return e.apply(i,[n])}a=Array.isArray(a)?a:[a];for(var s=0;s{var n=$(),r=V().dfltConfig;function i(e,t){for(var r=[],i,a=0;ar.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},a.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},a.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},a.undo=function(e){var t,n;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n{t.exports={_isLinkedToArray:`frames_entry`,group:{valType:`string`},name:{valType:`string`},traces:{valType:`any`},baseframe:{valType:`string`},data:{valType:`any`},layout:{valType:`any`}}}),ct=l(e=>{var t=Ie(),n=$(),r=P(),i=Pe(),a=st(),o=Te(),s=V().configAttributes,c=Ee(),l=n.extendDeepAll,u=n.isPlainObject,d=n.isArrayOrTypedArray,f=n.nestedProperty,p=n.valObjectMeta,m=`_isSubplotObj`,h=`_isLinkedToArray`,g=`_arrayAttrRegexps`,_=`_deprecated`,v=[m,h,g,_];e.IS_SUBPLOT_OBJ=m,e.IS_LINKED_TO_ARRAY=h,e.DEPRECATED=_,e.UNDERSCORE_ATTRS=v,e.get=function(){var e={};return t.allTypes.forEach(function(t){e[t]=S(t)}),{defs:{valObjects:p,metaKeys:v.concat([`description`,`role`,`editType`,`impliedEdits`]),editType:{traces:c.traces,layout:c.layout},impliedEdits:{}},traces:e,layout:C(),frames:w(),animation:T(o),config:T(s)}},e.crawl=function(t,n,r,i){var a=r||0;i||=``,Object.keys(t).forEach(function(r){var o=t[r];if(v.indexOf(r)===-1){var s=(i?i+`.`:``)+r;n(o,r,t,a,s),!e.isValObject(o)&&u(o)&&r!==`impliedEdits`&&e.crawl(o,n,a+1,s)}})},e.isValObject=function(e){return e&&e.valType!==void 0},e.findArrayAttributes=function(t){var n=[],i=[],a=[],o,s;function c(e,t,n,r){i=i.slice(0,r).concat([t]),a=a.slice(0,r).concat([e&&e._isLinkedToArray]),e&&(e.valType===`data_array`||e.arrayOk===!0)&&(i[r-1]!==`colorbar`||t!==`ticktext`&&t!==`tickvals`)&&l(o,0,``)}function l(e,t,r){var o=e[i[t]],c=r+i[t];if(t===i.length-1)d(o)&&n.push(s+c);else if(a[t]){if(Array.isArray(o))for(var f=0;f=a.length)return!1;if(e.dimensions===2){if(n++,t.length===n)return e;var o=t[n];if(!x(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function x(e){return e===Math.round(e)&&e>=0}function S(n){var i=t.modules[n]._module,a=i.basePlotModule,o={};o.type=null;var s=l({},r),c=l({},i.attributes);e.crawl(c,function(e,t,n,r,i){f(s,i).set(void 0),e===void 0&&f(c,i).set(void 0)}),l(o,s),t.traceIs(n,`noOpacity`)&&delete o.opacity,t.traceIs(n,`showLegend`)||(delete o.showlegend,delete o.legendgroup),t.traceIs(n,`noHover`)&&(delete o.hoverinfo,delete o.hoverlabel),i.selectPoints||delete o.selectedpoints,l(o,c),a.attributes&&l(o,a.attributes),o.type=n;var u={meta:i.meta||{},categories:i.categories||{},animatable:!!i.animatable,type:n,attributes:T(o)};if(i.layoutAttributes){var d={};l(d,i.layoutAttributes),u.layoutAttributes=T(d)}return i.animatable||e.crawl(u,function(t){e.isValObject(t)&&`anim`in t&&delete t.anim}),u}function C(){var e={},n,r;for(n in l(e,i),t.subplotsRegistry)if(r=t.subplotsRegistry[n],r.layoutAttributes){if(Array.isArray(r.attr))for(var a=0;a{var t=$(),n=P(),r=`templateitemname`,i={name:{valType:`string`,editType:`none`}};i[r]={valType:`string`,editType:`calc`},e.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=i.name,t[r]=i[r],t},e.traceTemplater=function(e){var r={},i,a;for(i in e)a=e[i],Array.isArray(a)&&a.length&&(r[i]=0);function o(o){i=t.coerce(o,{},n,`type`);var s={type:i,_template:null};if(i in r){a=e[i];var c=r[i]%a.length;r[i]++,s._template=a[c]}return s}return{newTrace:o}},e.newContainer=function(e,n,r){var i=e._template,a=i&&(i[n]||r&&i[r]);return t.isPlainObject(a)||(a=null),e[n]={_template:a}},e.arrayTemplater=function(e,t,n){var i=e._template,s=i&&i[o(t)],c=i&&i[t];(!Array.isArray(c)||!c.length)&&(c=[]);var l={};function u(e){var t={name:e.name,_input:e},i=t[r]=e[r];if(!a(i))return t._template=s,t;for(var o=0;o=a&&(i._input||{})._templateitemname;s&&(o=a);var c=n+`[`+o+`]`,l;function u(){l={},s&&(l[c]={},l[c][r]=s)}u();function d(e,t){l[e]=t}function f(e,n){s?t.nestedProperty(l[c],e).set(n):l[c+`.`+e]=n}function p(){var e=l;return u(),e}function m(n,r){n&&f(n,r);var i=p();for(var a in i)t.nestedProperty(e,a).set(i[a])}return{modifyBase:d,modifyItem:f,getUpdateObj:p,applyUpdate:m}}}),ut=l((e,t)=>{var n=z().counter;t.exports={idRegex:{x:n(`x`,`( domain)?`),y:n(`y`,`( domain)?`)},attrRegex:n(`[xy]axis`),xAxisMatch:n(`xaxis`),yAxisMatch:n(`yaxis`),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:`hour`,WEEKDAY_PATTERN:`day of week`,MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:[`imagelayer`,`heatmaplayer`,`contourcarpetlayer`,`contourlayer`,`funnellayer`,`waterfalllayer`,`barlayer`,`carpetlayer`,`violinlayer`,`boxlayer`,`ohlclayer`,`scattercarpetlayer`,`scatterlayer`],clipOnAxisFalseQuery:[`.scatterlayer`,`.barlayer`,`.funnellayer`,`.waterfalllayer`],layerValue2layerClass:{"above traces":`above`,"below traces":`below`},zindexSeparator:`z`}}),dt=l(e=>{var t=Ie(),n=ut();e.id2name=function(e){if(typeof e==`string`&&e.match(n.AX_ID_PATTERN)){var t=e.split(` `)[0].slice(1);return t===`1`&&(t=``),e.charAt(0)+`axis`+t}},e.name2id=function(e){if(e.match(n.AX_NAME_PATTERN)){var t=e.slice(5);return t===`1`&&(t=``),e.charAt(0)+t}},e.cleanId=function(e,t,r){var i=/( domain)$/.test(e);if(typeof e==`string`&&e.match(n.AX_ID_PATTERN)&&!(t&&e.charAt(0)!==t)&&(!i||r)){var a=e.split(` `)[0].slice(1).replace(/^0+/,``);return a===`1`&&(a=``),e.charAt(0)+a+(i&&r?` domain`:``)}},e.list=function(t,n,r){var i=t._fullLayout;if(!i)return[];for(var a=e.listIds(t,n),o=Array(a.length),s=0;sr?1:-1},e.ref2id=function(e){return/^[xyz]/.test(e)?e.split(` `)[0]:!1};function r(e,t){if(t&&t.length){for(var n=0;n{function n(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(`.outline-controllers`).remove()}function r(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(`.select-outline`).remove(),e._fullLayout._outlining=!1}t.exports={clearOutlineControllers:n,clearOutline:r}}),pt=l((e,t)=>{t.exports={scattermode:{valType:`enumerated`,values:[`group`,`overlay`],dflt:`overlay`,editType:`calc`},scattergap:{valType:`number`,min:0,max:1,editType:`calc`}}}),mt=l(e=>{var t=Ie();ut().SUBPLOT_PATTERN,e.getSubplotCalcData=function(e,n,r){var i=t.subplotsRegistry[n];if(!i)return[];for(var a=i.attr,o=[],s=0;s{var t=Ie(),n=$();e.manageCommandObserver=function(t,i,a,o){var s={},c=!0;i&&i._commandObserver&&(s=i._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var l=e.hasSimpleAPICommandBindings(t,a,s.lookupTable);if(i&&i._commandObserver){if(l)return s;if(i._commandObserver.remove)return i._commandObserver.remove(),i._commandObserver=null,s}if(l){r(t,l,s.cache),s.check=function(){if(c){var e=r(t,l,s.cache);return e.changed&&o&&s.lookupTable[e.value]!==void 0&&(s.disable(),Promise.resolve(o({value:e.value,type:l.type,prop:l.prop,traces:l.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=[`plotly_relayout`,`plotly_redraw`,`plotly_restyle`,`plotly_update`,`plotly_animatingframe`,`plotly_afterplot`],d=0;d0?`.`:``)+a;n.isPlainObject(o)?s(o,t,c,i+1):t(c,a,o)}})}}),gt=l((e,t)=>{var n=f(),r=m().timeFormatLocale,i=h().formatLocale,a=_(),o=y(),s=u().version,c=Ie(),l=ct(),d=lt(),p=$(),g=L(),b=v().BADNUM,x=dt(),S=ft().clearOutline,C=pt(),w=Te(),T=st(),E=mt().getModuleCalcData,D=p.relinkPrivateKeys,O=p._,k=t.exports={};p.extendFlat(k,c),k.attributes=P(),k.attributes.type.values=k.allTypes,k.fontAttrs=A(),k.layoutAttributes=Pe();var j=ht();k.executeAPICommand=j.executeAPICommand,k.computeAPICommandBindings=j.computeAPICommandBindings,k.manageCommandObserver=j.manageCommandObserver,k.hasSimpleAPICommandBindings=j.hasSimpleAPICommandBindings,k.redrawText=function(e){return e=p.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(c.getComponentMethod(`annotations`,`draw`)(e),c.getComponentMethod(`legend`,`draw`)(e),c.getComponentMethod(`colorbar`,`draw`)(e),t(k.previousPromises(e)))},300)})},k.resize=function(e){e=p.getGraphDiv(e);var t,n=new Promise(function(n,r){(!e||p.isHidden(e))&&r(Error(`Resize must be passed a displayed plot div element.`)),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||p.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var t=e.changed;e.autoplay=!0,c.call(`relayout`,e,{autosize:!0}).then(function(){e.changed=t,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(n),n},k.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})},k.addLinks=function(e){if(e._context.showLink||e._context.showSources){var t=e._fullLayout,r=p.ensureSingle(t._paper,`text`,`js-plot-link-container`,function(e){e.style({"font-family":`"Open Sans", Arial, sans-serif`,"font-size":`12px`,fill:g.defaultLine,"pointer-events":`all`}).each(function(){var e=n.select(this);e.append(`tspan`).classed(`js-link-to-tool`,!0),e.append(`tspan`).classed(`js-link-spacer`,!0),e.append(`tspan`).classed(`js-sourcelinks`,!0)})}),i=r.node(),a={y:t._paper.attr(`height`)-9};document.body.contains(i)&&i.getComputedTextLength()>=t.width-20?(a[`text-anchor`]=`start`,a.x=5):(a[`text-anchor`]=`end`,a.x=t._paper.attr(`width`)-7),r.attr(a);var o=r.select(`.js-link-to-tool`),s=r.select(`.js-link-spacer`),c=r.select(`.js-sourcelinks`);e._context.showSources&&e._context.showSources(e),e._context.showLink&&M(e,o),s.text(o.text()&&c.text()?` - `:``)}};function M(e,t){t.text(``);var n=t.append(`a`).attr({"xlink:xlink:href":`#`,class:`link--impt link--embedview`,"font-weight":`bold`}).text(e._context.linkText+` »`);if(e._context.sendData)n.on(`click`,function(){k.sendDataToCloud(e)});else{var r=window.location.pathname.split(`/`),i=window.location.search;n.attr({"xlink:xlink:show":`new`,"xlink:xlink:href":`/`+r[2].split(`.`)[0]+`/`+r[1]+i})}}k.sendDataToCloud=function(e,t){e.emit(`plotly_beforeexport`);let n=new URL(t).origin;var r=k.graphJson(e,!1,`keepdata`,`object`);r.version=s;var i=new URL(t);i.searchParams.set(`origin`,window.location.origin);var a=window.open(i.href,`_blank`);if(!a){console.error(`Unable to open Plotly Cloud (the popup may have been blocked)`),e.emit(`plotly_exportfail`);return}var o=function(t){t.origin===n&&t.data&&t.data.type===`CHART_AUTH_SUCCESS`&&(a.postMessage({type:`chart`,chart:r},n),window.removeEventListener(`message`,o),e.emit(`plotly_afterexport`))};return window.addEventListener(`message`,o),!1};var N=[`days`,`shortDays`,`months`,`shortMonths`,`periods`,`dateTime`,`date`,`time`,`decimal`,`thousands`,`grouping`,`currency`],F=[`year`,`month`,`dayMonth`,`dayMonthYear`];k.supplyDefaults=function(e,t){var n=t&&t.skipUpdateCalc,r=e._fullLayout||{};if(r._skipDefaults){delete r._skipDefaults;return}var i=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],d=e._context||{},f;e._transitionData||k.createTransitionData(e),i._dfltTitle={plot:O(e,`Click to enter Plot title`),subtitle:O(e,`Click to enter Plot subtitle`),x:O(e,`Click to enter X axis title`),y:O(e,`Click to enter Y axis title`),colorbar:O(e,`Click to enter Colorscale title`),annotation:O(e,`new text`)},i._traceWord=O(e,`trace`);var m=z(e,N);if(i._mapboxAccessToken=d.mapboxAccessToken,r._initialAutoSizeIsDone){var h=r.width,g=r.height;k.supplyLayoutGlobalDefaults(a,i,m),a.width||(i.width=h),a.height||(i.height=g),k.sanitizeMargins(i)}else{k.supplyLayoutGlobalDefaults(a,i,m);var _=!a.width||!a.height,v=i.autosize,y=d.autosizable;_&&(v||y)?k.plotAutoSize(e,a,i):_&&k.sanitizeMargins(i),!v&&_&&(a.width=i.width,a.height=i.height)}i._d3locale=B(m,i.separators),i._extraFormat=z(e,F),i._initialAutoSizeIsDone=!0,i._dataLength=l.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var b=i._subplots=R(),x=i._splomAxes={x:{},y:{}},C=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=I(o,l),k.supplyDataDefaults(l,s,a,i);var w=Object.keys(x.x),T=Object.keys(x.y);if(w.length>1&&T.length>1){for(c.getComponentMethod(`grid`,`sizeDefaults`)(a,i),f=0;f15&&T.length>15&&i.shapes.length===0&&i.images.length===0,k.linkSubplots(s,i,o,r),k.cleanPlot(s,i,o,r);var P=!!(r._has&&r._has(`cartesian`)),L=!!(i._has&&i._has(`cartesian`)),H=P,U=L;H&&!U?r._bgLayer.remove():U&&!H&&(i._shouldCreateBgLayer=!0),r._zoomlayer&&!e._dragging&&S({_fullLayout:r}),V(s,i),D(i,r),c.getComponentMethod(`colorscale`,`crossTraceDefaults`)(s,i),i._preGUI||={},i._tracePreGUI||={};var G=i._tracePreGUI,K={},q;for(q in G)K[q]=`old`;for(f=0;f0){var u=1-2*i;o=Math.round(u*o),s=Math.round(u*s)}}var d=k.layoutAttributes.width.min,f=k.layoutAttributes.height.min;o1,h=!t.height&&Math.abs(n.height-s)>1;(h||m)&&(m&&(n.width=o),h&&(n.height=s)),e._initialAutoSize||={width:o,height:s},k.sanitizeMargins(n)},k.supplyLayoutModuleDefaults=function(e,t,n,r){var i=c.componentsRegistry,a=t._basePlotModules,o,s,l,u=c.subplotsRegistry.cartesian;for(o in i)l=i[o],l.includeBasePlot&&l.includeBasePlot(e,t);for(var d in a.length||a.push(u),t._has(`cartesian`)&&(c.getComponentMethod(`grid`,`contentDefaults`)(e,t),u.finalizeSubplots(e,t)),t._subplots)t._subplots[d].sort(p.subplotSort);for(s=0;s1&&(n.l/=_,n.r/=_)}if(f){var v=(n.t+n.b)/f;v>1&&(n.t/=v,n.b/=v)}var y=n.xl===void 0?n.x:n.xl,b=n.xr===void 0?n.x:n.xr,x=n.yt===void 0?n.y:n.yt,S=n.yb===void 0?n.y:n.yb;m[t]={l:{val:y,size:n.l+g},r:{val:b,size:n.r+g},b:{val:S,size:n.b+g},t:{val:x,size:n.t+g}},h[t]=1}if(!r._replotting)return k.doAutoMargin(e)}};function q(e){if(`_redrawFromAutoMarginCount`in e._fullLayout)return!1;var t=x.list(e,``,!0);for(var n in t)if(t[n].autoshift||t[n].shift)return!0;return!1}k.doAutoMargin=function(e){var t=e._fullLayout,n=t.width,r=t.height;t._size||={},W(t);var i=t._size,o=t.margin,s={t:0,b:0,l:0,r:0},l=p.extendFlat({},i),u=o.l,d=o.r,f=o.t,m=o.b,h=t._pushmargin,g=t._pushmarginIds,_=t.minreducedwidth,v=t.minreducedheight;if(o.autoexpand!==!1){for(var y in h)g[y]||delete h[y];var b=e._fullLayout._reservedMargin;for(var x in b)for(var S in b[x]){var C=b[x][S];s[S]=Math.max(s[S],C)}for(var w in h.base={l:{val:0,size:u},r:{val:1,size:d},t:{val:1,size:f},b:{val:0,size:m}},s){var T=0;for(var E in h)E!==`base`&&a(h[E][w].size)&&(T=h[E][w].size>T?h[E][w].size:T);var D=Math.max(0,o[w]-T);s[w]=Math.max(0,s[w]-D)}for(var O in h){var A=h[O].l||{},j=h[O].b||{},M=A.val,N=A.size,P=j.val,F=j.size,I=n-s.r-s.l,L=r-s.t-s.b;for(var R in h){if(a(N)&&h[R].r){var z=h[R].r.val,B=h[R].r.size;if(z>M){var V=(N*z+(B-I)*M)/(z-M),H=(B*(1-M)+(N-I)*(1-z))/(z-M);V+H>u+d&&(u=V,d=H)}}if(a(F)&&h[R].t){var U=h[R].t.val,Y=h[R].t.size;if(U>P){var X=(F*U+(Y-L)*P)/(U-P),ee=(Y*(1-P)+(F-L)*(1-U))/(U-P);X+ee>m+f&&(m=X,f=ee)}}}}}var Z=p.constrain(n-o.l-o.r,G,_),te=p.constrain(r-o.t-o.b,K,v),ne=Math.max(0,n-Z),re=Math.max(0,r-te);if(ne){var ie=(u+d)/ne;ie>1&&(u/=ie,d/=ie)}if(re){var ae=(m+f)/re;ae>1&&(m/=ae,f/=ae)}if(i.l=Math.round(u)+s.l,i.r=Math.round(d)+s.r,i.t=Math.round(f)+s.t,i.b=Math.round(m)+s.b,i.p=Math.round(o.pad),i.w=Math.round(n)-i.l-i.r,i.h=Math.round(r)-i.t-i.b,!t._replotting&&(k.didMarginChange(l,i)||q(e))){`_redrawFromAutoMarginCount`in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var oe=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount1)return!0}return!1},k.graphJson=function(e,t,n,r,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&k.supplyDefaults(e);var s=i?e._fullData:e.data,c=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function u(e,t){if(typeof e==`function`)return t?`_function_`:null;if(p.isPlainObject(e)){var r={},i;return Object.keys(e).sort().forEach(function(a){if([`_`,`[`].indexOf(a.charAt(0))===-1){if(typeof e[a]==`function`){t&&(r[a]=`_function`);return}if(n===`keepdata`){if(a.slice(-3)===`src`)return}else if(n===`keepstream`){if(i=e[a+`src`],typeof i==`string`&&i.indexOf(`:`)>0&&!p.isPlainObject(e.stream))return}else if(n!==`keepall`&&(i=e[a+`src`],typeof i==`string`&&i.indexOf(`:`)>0))return;r[a]=u(e[a],t)}}),r}var a=Array.isArray(e),s=p.isTypedArray(e);if((a||s)&&e.dtype&&e.shape){var c=e.bdata;return u({dtype:e.dtype,shape:e.shape,bdata:p.isArrayBuffer(c)?o.encode(c):c},t)}return a?e.map(function(e){return u(e,t)}):s?p.simpleMap(e,p.identity):p.isJSDate(e)?p.ms2DateTimeLocal(+e):e}var d={data:(s||[]).map(function(e){var n=u(e);return t&&delete n.fit,n})};if(!t&&(d.layout=u(c),i)){var f=c._size;d.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(d.frames=u(l)),a&&(d.config=u(e._context,!0)),r===`object`?d:JSON.stringify(d)},k.modifyFrames=function(e,t){var n,r,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(n=0;n0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){r=!0}),n.redraw&&e._transitionData._interruptCallbacks.push(function(){return c.call(`redraw`,e)}),e._transitionData._interruptCallbacks.push(function(){e.emit(`plotly_transitioninterrupted`,[])});var a=0,o=0;function l(){return a++,function(){o++,!r&&o===a&&s(i)}}n.runFn(l),setTimeout(l())})}function s(t){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(n.redraw)return c.call(`redraw`,e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit(`plotly_transitioned`,[])}).then(t)}function l(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var u=[k.previousPromises,l,n.prepareFn,k.rehover,k.reselect,o],d=p.syncOrAsync(u,e);return(!d||!d.then)&&(d=Promise.resolve()),d.then(function(){return e})}k.doCalcdata=function(e,t){var n=x.list(e),r=e._fullData,i=e._fullLayout,a,o,s,u,d=Array(r.length),f=(e.calcdata||[]).slice();for(e.calcdata=d,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},s=0;s=0;u--)if(s[u].enabled){a._indexToPoints=s[u]._indexToPoints;break}o&&o.calc&&(i=o.calc(e,a))}(!Array.isArray(i)||!i[0])&&(i=[{x:b,y:b}]),i[0].t||(i[0].t={}),i[0].trace=a,d[t]=i}}for(te(n,r,i),s=0;s{e.xmlns=`http://www.w3.org/2000/xmlns/`,e.svg=`http://www.w3.org/2000/svg`,e.xlink=`http://www.w3.org/1999/xlink`,e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}}),vt=l((e,t)=>{t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:`right`,right:`left`,top:`bottom`,bottom:`top`}}}),yt=l(e=>{var t=f(),n=$(),r=n.strTranslate,i=_t(),a=vt().LINE_SPACING,o=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(n,i,a){var s=n.text(),c=!n.attr(`data-notex`)&&i&&i._context.typesetMath&&typeof MathJax<`u`&&s.match(o),l=t.select(n.node().parentNode);if(l.empty())return;var u=n.attr(`class`)?n.attr(`class`).split(` `)[0]:`text`;u+=`-math`,l.selectAll(`svg.`+u).remove(),l.selectAll(`g.`+u+`-group`).remove(),n.style(`display`,null).attr({"data-unformatted":s,"data-math":`N`});function f(){l.empty()||(u=n.attr(`class`)+`-math`,l.select(`svg.`+u).remove()),n.text(``).style(`white-space`,`pre`),M(n.node(),s)&&n.style(`pointer-events`,`all`),e.positionText(n),a&&a.call(n)}return c?(i&&i._promises||[]).push(new Promise(function(e){n.style(`display`,`none`);var t=parseInt(n.node().style.fontSize,10),i={fontSize:t};d(c[2],i,function(i,o,c){l.selectAll(`svg.`+u).remove(),l.selectAll(`g.`+u+`-group`).remove();var d=i&&i.select(`svg`);if(!d||!d.node()){f(),e();return}var p=l.append(`g`).classed(u+`-group`,!0).attr({"pointer-events":`none`,"data-unformatted":s,"data-math":`Y`});p.node().appendChild(d.node()),o&&o.node()&&d.node().insertBefore(o.node().cloneNode(!0),d.node().firstChild);var m=c.width,h=c.height;d.attr({class:u,height:h,preserveAspectRatio:`xMinYMin meet`}).style({overflow:`visible`,"pointer-events":`none`});var g=n.node().style.fill||`black`,_=d.select(`g`);_.attr({fill:g,stroke:g});var v=_.node().getBoundingClientRect(),y=v.width,b=v.height;(y>m||b>h)&&(d.style(`overflow`,`hidden`),v=d.node().getBoundingClientRect(),y=v.width,b=v.height);var x=+n.attr(`x`),S=+n.attr(`y`),C=-(t||n.node().getBoundingClientRect().height)/4;if(u[0]===`y`)p.attr({transform:`rotate(`+[-90,x,S]+`)`+r(-y/2,C-b/2)});else if(u[0]===`l`)S=C-b/2;else if(u[0]===`a`&&u.indexOf(`atitle`)!==0)x=0,S=C;else{var w=n.attr(`text-anchor`);x-=y*(w===`middle`?.5:+(w===`end`)),S=S+C-b/2}d.attr({x,y:S}),a&&a.call(n,p),e(p)})})):f(),n};var s=/(<|<|<)/g,c=/(>|>|>)/g;function l(e){return e.replace(s,`\\lt `).replace(c,`\\gt `)}var u=[[`$`,`$`],[`\\(`,`\\)`]];function d(e,r,i){var a=parseInt((MathJax.version||``).split(`.`)[0]);if(a!==2&&a!==3){n.warn(`No MathJax version:`,MathJax.version);return}var o,s,c,d,f=function(){return s=n.extendDeepAll({},MathJax.Hub.config),c=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:`none`,tex2jax:{inlineMath:u},displayAlign:`left`})},p=function(){s=n.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=u},m=function(){if(o=MathJax.Hub.config.menuSettings.renderer,o!==`SVG`)return MathJax.Hub.setRenderer(`SVG`)},h=function(){o=MathJax.config.startup.output,o!==`svg`&&(MathJax.config.startup.output=`svg`)},g=function(){var i=`math-output-`+n.randstr({},64);d=t.select(`body`).append(`div`).attr({id:i}).style({visibility:`hidden`,position:`absolute`,"font-size":r.fontSize+`px`}).text(l(e));var o=d.node();return a===2?MathJax.Hub.Typeset(o):MathJax.typeset([o])},_=function(){var r=d.select(a===2?`.MathJax_SVG`:`.MathJax`),o=!r.empty()&&d.select(`svg`).node();if(!o)n.log(`There was an error in the tex syntax.`,e),i();else{var s=o.getBoundingClientRect();i(r,a===2?t.select(`body`).select(`#MathJax_SVG_glyphs`):r.select(`defs`),s)}d.remove()},v=function(){if(o!==`SVG`)return MathJax.Hub.setRenderer(o)},y=function(){o!==`svg`&&(MathJax.config.startup.output=o)},b=function(){return c!==void 0&&(MathJax.Hub.processSectionDelay=c),MathJax.Hub.Config(s)},x=function(){MathJax.config=s};a===2?MathJax.Hub.Queue(f,m,g,_,v,b):a===3&&(p(),h(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){g(),_(),y(),x()}))}var p={sup:`font-size:70%`,sub:`font-size:70%`,s:`text-decoration:line-through`,u:`text-decoration:underline`,b:`font-weight:bold`,i:`font-style:italic`,a:`cursor:pointer`,span:``,em:`font-style:italic;font-weight:bold`},m={sub:`0.3em`,sup:`-0.6em`},h={sub:`-0.21em`,sup:`0.42em`},g=`​`,_=[`http:`,`https:`,`mailto:`,``,void 0,`:`],v=e.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,b=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;e.BR_TAG_ALL=//gi;var S=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,C=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function E(e,t){if(!e)return null;var n=e.match(t),r=n&&(n[3]||n[4]);return r&&A(r)}var D=/(^|;)\s*color:/;e.plainText=function(e,t){t||={};for(var n=t.len!==void 0&&t.len!==-1?t.len:1/0,r=t.allowedTags===void 0?[`br`]:t.allowedTags,i=`...`,a=i.length,o=e.split(y),s=[],c=``,l=0,u=0;ua?s.push(d.slice(0,Math.max(0,h-a))+i):s.push(d.slice(0,h));break}c=``}}return s.join(``)};var O={mu:`μ`,amp:`&`,lt:`<`,gt:`>`,nbsp:`\xA0`,times:`×`,plusmn:`±`,deg:`°`},k=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function A(e){return e.replace(k,function(e,t){return(t.charAt(0)===`#`?j(t.charAt(1)===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10)):O[t])||e})}e.convertEntities=A;function j(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var n=String.fromCharCode;return e<=65535?n(e):n((e>>10)+55232,e%1024+56320)}}function M(e,r){r=r.replace(v,` `);var o=!1,s=[],c,l=-1;function u(){l++;var n=document.createElementNS(i.svg,`tspan`);t.select(n).attr({class:`line`,dy:l*a+`em`}),e.appendChild(n),c=n;var r=s;if(s=[{node:n}],r.length>1)for(var o=1;o.`,r);return}var t=s.pop();e!==t.type&&n.log(`Start tag <`+t.type+`> doesnt match end tag <`+e+`>. Pretending it did match.`,r),c=s[s.length-1].node}x.test(r)?u():(c=e,s=[{node:e}]);for(var O=r.split(y),k=0;k{var n=f(),r=O(),i=_(),a=$(),o=L(),s=F().isValid;function c(e,t,n){var r=t?a.nestedProperty(e,t).get()||{}:e,o=r[n||`color`];o&&o._inputArray&&(o=o._inputArray);var c=!1;if(a.isArrayOrTypedArray(o)){for(var l=0;l=0;r--,i++){var a=e[r];n[i]=[1-a[0],a[1]]}return n}function h(e,t){t||={};for(var a=e.domain,s=e.range,c=s.length,l=Array(c),u=0;u{var n=Oe(),r=n.FORMAT_LINK,i=n.DATE_FORMAT_LINK;function a(e,t){return{valType:`string`,dflt:``,editType:`none`,description:(t?o:s)(`hover text`,e)+[`By default the values are formatted using `+(t?`generic number format`:"`"+e+"axis.hoverformat`")+`.`].join(` `)}}function o(e,t){return[`Sets the `+e+` formatting rule`+(t?"for `"+t+"` ":``),`using d3 formatting mini-languages`,`which are very similar to those in Python. For numbers, see: `+r+`.`].join(` `)}function s(e,t){return o(e,t)+[` And for dates see: `+i+`.`,`We add two items to d3's date formatter:`,`*%h* for half of the year as a decimal number as well as`,`*%{n}f* for fractional seconds`,`with n digits. For example, *2016-10-13 09:15:23.456* with tickformat`,`*%H~%M~%S.%2f* would display *09~15~23.46*`].join(` `)}t.exports={axisHoverFormat:a,descriptionOnlyNumbers:o,descriptionWithDates:s}}),St=l((e,t)=>{var n=A(),r=I(),i=De().dash,a=k().extendFlat,o=lt().templatedArray;ke().templateFormatStringDescription;var s=xt().descriptionWithDates,c=v().ONEDAY,l=ut(),u=l.HOUR_PATTERN,d=l.WEEKDAY_PATTERN,f={valType:`enumerated`,values:[`auto`,`linear`,`array`],editType:`ticks`,impliedEdits:{tick0:void 0,dtick:void 0}},p=a({},f,{values:f.values.slice().concat([`sync`])});function m(e){return{valType:`integer`,min:0,dflt:e?5:0,editType:`ticks`}}var h={valType:`any`,editType:`ticks`,impliedEdits:{tickmode:`linear`}},g={valType:`any`,editType:`ticks`,impliedEdits:{tickmode:`linear`}},_={valType:`data_array`,editType:`ticks`},y={valType:`enumerated`,values:[`outside`,`inside`,``],editType:`ticks`};function b(e){var t={valType:`number`,min:0,editType:`ticks`};return e||(t.dflt=5),t}function x(e){var t={valType:`number`,min:0,editType:`ticks`};return e||(t.dflt=1),t}var S={valType:`color`,dflt:r.defaultLine,editType:`ticks`},C={valType:`color`,dflt:r.lightLine,editType:`ticks`};function w(e){var t={valType:`number`,min:0,editType:`ticks`};return e||(t.dflt=1),t}var T=a({},i,{editType:`ticks`}),E={valType:`boolean`,editType:`ticks`};t.exports={visible:{valType:`boolean`,editType:`plot`},color:{valType:`color`,dflt:r.defaultLine,editType:`ticks`},title:{text:{valType:`string`,editType:`ticks`},font:n({editType:`ticks`}),standoff:{valType:`number`,min:0,editType:`ticks`},editType:`ticks`},type:{valType:`enumerated`,values:[`-`,`linear`,`log`,`date`,`category`,`multicategory`],dflt:`-`,editType:`calc`,_noTemplating:!0},autotypenumbers:{valType:`enumerated`,values:[`convert types`,`strict`],dflt:`convert types`,editType:`calc`},autorange:{valType:`enumerated`,values:[!0,!1,`reversed`,`min reversed`,`max reversed`,`min`,`max`],dflt:!0,editType:`axrange`,impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:`any`,editType:`plot`,impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:`any`,editType:`plot`,impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:`any`,editType:`plot`,impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:`any`,editType:`plot`,impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:`any`,arrayOk:!0,editType:`plot`,impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:`plot`},rangemode:{valType:`enumerated`,values:[`normal`,`tozero`,`nonnegative`],dflt:`normal`,editType:`plot`},range:{valType:`info_array`,items:[{valType:`any`,editType:`axrange`,impliedEdits:{"^autorange":!1},anim:!0},{valType:`any`,editType:`axrange`,impliedEdits:{"^autorange":!1},anim:!0}],editType:`axrange`,impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:`any`,editType:`plot`,impliedEdits:{"^autorange":!1}},maxallowed:{valType:`any`,editType:`plot`,impliedEdits:{"^autorange":!1}},fixedrange:{valType:`boolean`,dflt:!1,editType:`calc`},modebardisable:{valType:`flaglist`,flags:[`autoscale`,`zoominout`],extras:[`none`],dflt:`none`,editType:`modebar`},insiderange:{valType:`info_array`,items:[{valType:`any`,editType:`plot`},{valType:`any`,editType:`plot`}],editType:`plot`},scaleanchor:{valType:`enumerated`,values:[l.idRegex.x.toString(),l.idRegex.y.toString(),!1],editType:`plot`},scaleratio:{valType:`number`,min:0,dflt:1,editType:`plot`},constrain:{valType:`enumerated`,values:[`range`,`domain`],editType:`plot`},constraintoward:{valType:`enumerated`,values:[`left`,`center`,`right`,`top`,`middle`,`bottom`],editType:`plot`},matches:{valType:`enumerated`,values:[l.idRegex.x.toString(),l.idRegex.y.toString()],editType:`calc`},rangebreaks:o(`rangebreak`,{enabled:{valType:`boolean`,dflt:!0,editType:`calc`},bounds:{valType:`info_array`,items:[{valType:`any`,editType:`calc`},{valType:`any`,editType:`calc`}],editType:`calc`},pattern:{valType:`enumerated`,values:[d,u,``],editType:`calc`},values:{valType:`info_array`,freeLength:!0,editType:`calc`,items:{valType:`any`,editType:`calc`}},dvalue:{valType:`number`,editType:`calc`,min:0,dflt:c},editType:`calc`}),tickmode:p,nticks:m(),tick0:h,dtick:g,ticklabelstep:{valType:`integer`,min:1,dflt:1,editType:`ticks`},tickvals:_,ticktext:{valType:`data_array`,editType:`ticks`},ticks:y,tickson:{valType:`enumerated`,values:[`labels`,`boundaries`],dflt:`labels`,editType:`ticks`},ticklabelmode:{valType:`enumerated`,values:[`instant`,`period`],dflt:`instant`,editType:`ticks`},ticklabelposition:{valType:`enumerated`,values:[`outside`,`inside`,`outside top`,`inside top`,`outside left`,`inside left`,`outside right`,`inside right`,`outside bottom`,`inside bottom`],dflt:`outside`,editType:`calc`},ticklabeloverflow:{valType:`enumerated`,values:[`allow`,`hide past div`,`hide past domain`],editType:`calc`},ticklabelshift:{valType:`integer`,dflt:0,editType:`ticks`},ticklabelstandoff:{valType:`integer`,dflt:0,editType:`ticks`},ticklabelindex:{valType:`integer`,arrayOk:!0,editType:`calc`},mirror:{valType:`enumerated`,values:[!0,`ticks`,!1,`all`,`allticks`],dflt:!1,editType:`ticks+layoutstyle`},ticklen:b(),tickwidth:x(),tickcolor:S,showticklabels:{valType:`boolean`,dflt:!0,editType:`ticks`},labelalias:{valType:`any`,dflt:!1,editType:`ticks`},automargin:{valType:`flaglist`,flags:[`height`,`width`,`left`,`right`,`top`,`bottom`],extras:[!0,!1],dflt:!1,editType:`ticks`},showspikes:{valType:`boolean`,dflt:!1,editType:`modebar`},spikecolor:{valType:`color`,dflt:null,editType:`none`},spikethickness:{valType:`number`,dflt:3,editType:`none`},spikedash:a({},i,{dflt:`dash`,editType:`none`}),spikemode:{valType:`flaglist`,flags:[`toaxis`,`across`,`marker`],dflt:`toaxis`,editType:`none`},spikesnap:{valType:`enumerated`,values:[`data`,`cursor`,`hovered data`],dflt:`hovered data`,editType:`none`},tickfont:n({editType:`ticks`}),tickangle:{valType:`angle`,dflt:`auto`,editType:`ticks`},autotickangles:{valType:`info_array`,freeLength:!0,items:{valType:`angle`},dflt:[0,30,90],editType:`ticks`},tickprefix:{valType:`string`,dflt:``,editType:`ticks`},showtickprefix:{valType:`enumerated`,values:[`all`,`first`,`last`,`none`],dflt:`all`,editType:`ticks`},ticksuffix:{valType:`string`,dflt:``,editType:`ticks`},showticksuffix:{valType:`enumerated`,values:[`all`,`first`,`last`,`none`],dflt:`all`,editType:`ticks`},showexponent:{valType:`enumerated`,values:[`all`,`first`,`last`,`none`],dflt:`all`,editType:`ticks`},exponentformat:{valType:`enumerated`,values:[`none`,`e`,`E`,`power`,`SI`,`B`,`SI extended`],dflt:`B`,editType:`ticks`},minexponent:{valType:`number`,dflt:3,min:0,editType:`ticks`},separatethousands:{valType:`boolean`,dflt:!1,editType:`ticks`},tickformat:{valType:`string`,dflt:``,editType:`ticks`,description:s(`tick label`)},tickformatstops:o(`tickformatstop`,{enabled:{valType:`boolean`,dflt:!0,editType:`ticks`},dtickrange:{valType:`info_array`,items:[{valType:`any`,editType:`ticks`},{valType:`any`,editType:`ticks`}],editType:`ticks`},value:{valType:`string`,dflt:``,editType:`ticks`},editType:`ticks`}),hoverformat:{valType:`string`,dflt:``,editType:`none`,description:s(`hover text`)},unifiedhovertitle:{text:{valType:`string`,dflt:``,editType:`none`},editType:`none`},showline:{valType:`boolean`,dflt:!1,editType:`ticks+layoutstyle`},linecolor:{valType:`color`,dflt:r.defaultLine,editType:`layoutstyle`},linewidth:{valType:`number`,min:0,dflt:1,editType:`ticks+layoutstyle`},showgrid:E,gridcolor:C,gridwidth:w(),griddash:T,zeroline:{valType:`boolean`,editType:`ticks`},zerolinecolor:{valType:`color`,dflt:r.defaultLine,editType:`ticks`},zerolinelayer:{valType:`enumerated`,values:[`above traces`,`below traces`],dflt:`below traces`,editType:`plot`},zerolinewidth:{valType:`number`,dflt:1,editType:`ticks`},showdividers:{valType:`boolean`,dflt:!0,editType:`ticks`},dividercolor:{valType:`color`,dflt:r.defaultLine,editType:`ticks`},dividerwidth:{valType:`number`,dflt:1,editType:`ticks`},anchor:{valType:`enumerated`,values:[`free`,l.idRegex.x.toString(),l.idRegex.y.toString()],editType:`plot`},side:{valType:`enumerated`,values:[`top`,`bottom`,`left`,`right`],editType:`plot`},overlaying:{valType:`enumerated`,values:[`free`,l.idRegex.x.toString(),l.idRegex.y.toString()],editType:`plot`},minor:{tickmode:f,nticks:m(`minor`),tick0:h,dtick:g,tickvals:_,ticks:y,ticklen:b(`minor`),tickwidth:x(`minor`),tickcolor:S,gridcolor:C,gridwidth:w(`minor`),griddash:T,showgrid:E,editType:`ticks`},minorloglabels:{valType:`enumerated`,values:[`small digits`,`complete`,`none`],dflt:`small digits`,editType:`calc`},layer:{valType:`enumerated`,values:[`above traces`,`below traces`],dflt:`above traces`,editType:`plot`},domain:{valType:`info_array`,items:[{valType:`number`,min:0,max:1,editType:`plot`},{valType:`number`,min:0,max:1,editType:`plot`}],dflt:[0,1],editType:`plot`},position:{valType:`number`,min:0,max:1,dflt:0,editType:`plot`},autoshift:{valType:`boolean`,dflt:!1,editType:`plot`},shift:{valType:`number`,editType:`plot`},categoryorder:{valType:`enumerated`,values:[`trace`,`category ascending`,`category descending`,`array`,`total ascending`,`total descending`,`min ascending`,`min descending`,`max ascending`,`max descending`,`sum ascending`,`sum descending`,`mean ascending`,`mean descending`,`geometric mean ascending`,`geometric mean descending`,`median ascending`,`median descending`],dflt:`trace`,editType:`calc`},categoryarray:{valType:`data_array`,editType:`calc`},uirevision:{valType:`any`,editType:`none`},editType:`calc`}}),Ct=l((e,t)=>{var n=St(),r=A(),i=k().extendFlat,a=Ee().overrideAll;t.exports=a({orientation:{valType:`enumerated`,values:[`h`,`v`],dflt:`v`},thicknessmode:{valType:`enumerated`,values:[`fraction`,`pixels`],dflt:`pixels`},thickness:{valType:`number`,min:0,dflt:30},lenmode:{valType:`enumerated`,values:[`fraction`,`pixels`],dflt:`fraction`},len:{valType:`number`,min:0,dflt:1},x:{valType:`number`},xref:{valType:`enumerated`,dflt:`paper`,values:[`container`,`paper`],editType:`layoutstyle`},xanchor:{valType:`enumerated`,values:[`left`,`center`,`right`]},xpad:{valType:`number`,min:0,dflt:10},y:{valType:`number`},yref:{valType:`enumerated`,dflt:`paper`,values:[`container`,`paper`],editType:`layoutstyle`},yanchor:{valType:`enumerated`,values:[`top`,`middle`,`bottom`]},ypad:{valType:`number`,min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:`number`,min:0,dflt:0},bgcolor:{valType:`color`,dflt:`rgba(0,0,0,0)`},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:i({},n.ticks,{dflt:``}),ticklabeloverflow:i({},n.ticklabeloverflow,{}),ticklabelposition:{valType:`enumerated`,values:[`outside`,`inside`,`outside top`,`inside top`,`outside left`,`inside left`,`outside right`,`inside right`,`outside bottom`,`inside bottom`],dflt:`outside`},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:r({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:`string`},font:r({}),side:{valType:`enumerated`,values:[`right`,`top`,`bottom`]}}},`colorbars`,`from-root`)}),wt=l((e,t)=>{var n=Ct(),r=z().counter,i=Be(),a=F().scales;i(a);function o(e){return"`"+e+"`"}t.exports=function(e,t){e||=``,t||={};var i=t.cLetter||`c`,s=`onlyIfNumerical`in t?t.onlyIfNumerical:!!e,c=`noScale`in t?t.noScale:e===`marker.line`,l=`showScaleDflt`in t?t.showScaleDflt:i===`z`,u=typeof t.colorscaleDflt==`string`?a[t.colorscaleDflt]:null,d=t.editTypeOverride||``,f=e?e+`.`:``,p,m;`colorAttr`in t?(p=t.colorAttr,m=t.colorAttr):(p={z:`z`,c:`color`}[i],m=`in `+o(f+p)),s&&``+m;var h=i+`auto`,g=i+`min`,_=i+`max`,v=i+`mid`;o(f+h);var y=o(f+g),b=o(f+_);y+``+b;var x={};x[g]=x[_]=void 0;var S={};S[h]=!1;var C={};return p===`color`&&(C.color={valType:`color`,arrayOk:!0,editType:d||`style`},t.anim&&(C.color.anim=!0)),C[h]={valType:`boolean`,dflt:!0,editType:`calc`,impliedEdits:x},C[g]={valType:`number`,dflt:null,editType:d||`plot`,impliedEdits:S},C[_]={valType:`number`,dflt:null,editType:d||`plot`,impliedEdits:S},C[v]={valType:`number`,dflt:null,editType:`calc`,impliedEdits:x},C.colorscale={valType:`colorscale`,editType:`calc`,dflt:u,impliedEdits:{autocolorscale:!1}},C.autocolorscale={valType:`boolean`,dflt:t.autoColorDflt!==!1,editType:`calc`,impliedEdits:{colorscale:void 0}},C.reversescale={valType:`boolean`,dflt:!1,editType:`plot`},c||(C.showscale={valType:`boolean`,dflt:l,editType:`calc`},C.colorbar=n),t.noColorAxis||(C.coloraxis={valType:`subplotid`,regex:r(`coloraxis`),dflt:null,editType:`calc`}),C}}),Tt=l((e,t)=>{var n=k().extendFlat,r=wt(),i=F().scales;t.exports={editType:`calc`,colorscale:{editType:`calc`,sequential:{valType:`colorscale`,dflt:i.Reds,editType:`calc`},sequentialminus:{valType:`colorscale`,dflt:i.Blues,editType:`calc`},diverging:{valType:`colorscale`,dflt:i.RdBu,editType:`calc`}},coloraxis:n({_isSubplotObj:!0,editType:`calc`},r(``,{colorAttr:`corresponding trace color array(s)`,noColorAxis:!0,showScaleDflt:!0}))}}),Et=l((e,t)=>{var n=$();t.exports=function(e){return n.isPlainObject(e.colorbar)}}),Dt=l(e=>{var t=_(),n=$(),r=v(),i=r.ONEDAY,a=r.ONEWEEK;e.dtick=function(e,n){var r=n===`log`,a=n===`date`,o=n===`category`,s=a?i:1;if(!e)return s;if(t(e))return e=Number(e),e<=0?s:o?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if(typeof e!=`string`||!(a||r))return s;var c=e.charAt(0),l=e.slice(1);return l=t(l)?Number(l):0,l<=0||!(a&&c===`M`&&l===Math.round(l)||r&&c===`L`||r&&c===`D`&&(l===1||l===2))?s:e},e.tick0=function(e,r,i,o){if(r===`date`)return n.cleanDate(e,n.dateTick0(i,+(o%a===0)));if(o!==`D1`&&o!==`D2`)return t(e)?Number(e):0}}),Ot=l((e,t)=>{var n=Dt(),r=$().isArrayOrTypedArray,i=x().isTypedArraySpec,a=x().decodeTypedArraySpec;t.exports=function(e,t,o,s,c){c||={};var l=c.isMinor,u=l?e.minor||{}:e,d=l?t.minor:t,f=l?`minor.`:``;function p(e){var t=u[e];return i(t)&&(t=a(t)),t===void 0?(d._template||{})[e]:t}var m=p(`tick0`),h=p(`dtick`),g=r(p(`tickvals`))?`array`:h?`linear`:`auto`,_=o(f+`tickmode`,g);if(_===`auto`||_===`sync`)o(f+`nticks`);else if(_===`linear`){var v=d.dtick=n.dtick(h,s);d.tick0=n.tick0(m,s,t.calendar,v)}else s!==`multicategory`&&(o(f+`tickvals`)===void 0?d.tickmode=`auto`:l||o(`ticktext`))}}),kt=l((e,t)=>{var n=$(),r=St();t.exports=function(e,t,i,a){var o=a.isMinor,s=o?e.minor||{}:e,c=o?t.minor:t,l=o?r.minor:r,u=o?`minor.`:``,d=n.coerce2(s,c,l,`ticklen`,o?(t.ticklen||5)*.6:void 0),f=n.coerce2(s,c,l,`tickwidth`,o?t.tickwidth||1:void 0),p=n.coerce2(s,c,l,`tickcolor`,(o?t.tickcolor:void 0)||c.color);i(u+`ticks`,!o&&a.outerTicks||d||f||p?`outside`:``)||(delete c.ticklen,delete c.tickwidth,delete c.tickcolor)}}),At=l((e,t)=>{t.exports=function(e){var t=[`showexponent`,`showtickprefix`,`showticksuffix`].filter(function(t){return e[t]!==void 0});if(t.every(function(n){return e[n]===e[t[0]]})||t.length===1)return e[t[0]]}}),jt=l((e,t)=>{var n=$(),r=lt();t.exports=function(e,t,i){for(var a=i.name,o=i.inclusionAttr||`visible`,s=t[a],c=n.isArrayOrTypedArray(e[a])?e[a]:[],l=t[a]=[],u=r.arrayTemplater(t,a,o),d=0,f;d{var n=$(),r=L().contrast,i=St(),a=At(),o=jt();t.exports=function(e,t,c,l,u){u||={};var d=c(`labelalias`);n.isPlainObject(d)||delete t.labelalias;var f=a(e);if(c(`showticklabels`)){u.noTicklabelshift||c(`ticklabelshift`),u.noTicklabelstandoff||c(`ticklabelstandoff`);var p=u.font||{},m=t.color,h=(t.ticklabelposition||``).indexOf(`inside`)===-1?m&&m!==i.color.dflt?m:p.color:r(u.bgColor);if(n.coerceFont(c,`tickfont`,p,{overrideDflt:{color:h}}),!u.noTicklabelstep&&l!==`multicategory`&&l!==`log`&&c(`ticklabelstep`),!u.noAng){var g=c(`tickangle`);!u.noAutotickangles&&g===`auto`&&c(`autotickangles`)}if(l!==`category`){var _=c(`tickformat`);o(e,t,{name:`tickformatstops`,inclusionAttr:`enabled`,handleItemDefaults:s}),t.tickformatstops.length||delete t.tickformatstops,!u.noExp&&!_&&l!==`date`&&(c(`showexponent`,f),c(`exponentformat`),c(`minexponent`),c(`separatethousands`))}!u.noMinorloglabels&&l===`log`&&c(`minorloglabels`)}};function s(e,t){function r(r,a){return n.coerce(e,t,i.tickformatstops,r,a)}r(`enabled`)&&(r(`dtickrange`),r(`value`))}}),Nt=l((e,t)=>{var n=At();t.exports=function(e,t,r,i,a){a||={};var o=a.tickSuffixDflt,s=n(e);r(`tickprefix`)&&r(`showtickprefix`,s),r(`ticksuffix`,o)&&r(`showticksuffix`,s)}}),Pt=l((e,t)=>{var n=$(),r=lt(),i=Ot(),a=kt(),o=Mt(),s=Nt(),c=Ct();t.exports=function(e,t,l){var u=r.newContainer(t,`colorbar`),d=e.colorbar||{};function f(e,t){return n.coerce(d,u,c,e,t)}var p=l.margin||{t:0,b:0,l:0,r:0},m=l.width-p.l-p.r,h=l.height-p.t-p.b,g=f(`orientation`)===`v`;f(`thickness`,f(`thicknessmode`)===`fraction`?30/(g?m:h):30),f(`len`,f(`lenmode`)===`fraction`?1:g?h:m);var _=f(`yref`),v=f(`xref`),y=_===`paper`,b=v===`paper`,x,S,C,w=`left`;g?(C=`middle`,w=b?`left`:`right`,x=b?1.02:1,S=.5):(C=y?`bottom`:`top`,w=`center`,x=.5,S=y?1.02:1),n.coerce(d,u,{x:{valType:`number`,min:b?-2:0,max:b?3:1,dflt:x}},`x`),n.coerce(d,u,{y:{valType:`number`,min:y?-2:0,max:y?3:1,dflt:S}},`y`),f(`xanchor`,w),f(`xpad`),f(`yanchor`,C),f(`ypad`),n.noneOrAll(d,u,[`x`,`y`]),f(`outlinecolor`),f(`outlinewidth`),f(`bordercolor`),f(`borderwidth`),f(`bgcolor`);var T=n.coerce(d,u,{ticklabelposition:{valType:`enumerated`,dflt:`outside`,values:g?[`outside`,`inside`,`outside top`,`inside top`,`outside bottom`,`inside bottom`]:[`outside`,`inside`,`outside left`,`inside left`,`outside right`,`inside right`]}},`ticklabelposition`);f(`ticklabeloverflow`,T.indexOf(`inside`)===-1?`hide past div`:`hide past domain`),i(d,u,f,`linear`);var E=l.font,D={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:E};T.indexOf(`inside`)!==-1&&(D.bgColor=`black`),s(d,u,f,`linear`,D),o(d,u,f,`linear`,D),a(d,u,f,`linear`,D),f(`title.text`,l._dfltTitle.colorbar);var O=u.showticklabels?u.tickfont:E,k=n.extendFlat({},E,{family:O.family,size:n.bigFont(O.size)});n.coerceFont(f,`title.font`,k),f(`title.side`,g?`top`:`right`)}}),Ft=l((e,t)=>{var n=_(),r=$(),i=Et(),a=Pt(),o=F().isValid,s=Ie().traceIs;function c(e,t){var n=t.slice(0,t.length-1);return t?r.nestedProperty(e,n).get()||{}:e}t.exports=function e(t,l,u,d,f){var p=f.prefix,m=f.cLetter,h=`_module`in l,g=c(t,p),_=c(l,p),v=c(l._template||{},p)||{},y=function(){return delete t.coloraxis,delete l.coloraxis,e(t,l,u,d,f)};if(h){var b=u._colorAxes||{},x=d(p+`coloraxis`);if(x){var S=s(l,`contour`)&&r.nestedProperty(l,`contours.coloring`).get()||`heatmap`,C=b[x];C?(C[2].push(y),C[0]!==S&&(C[0]=!1,r.warn([`Ignoring coloraxis:`,x,`setting`,`as it is linked to incompatible colorscales.`].join(` `)))):b[x]=[S,l,[y]];return}}var w=g[m+`min`],T=g[m+`max`],E=n(w)&&n(T)&&w{var n=$(),r=lt(),i=Tt(),a=Ft();t.exports=function(e,t){function o(r,a){return n.coerce(e,t,i,r,a)}o(`colorscale.sequential`),o(`colorscale.sequentialminus`),o(`colorscale.diverging`);var s=t._colorAxes,c,l;function u(e,t){return n.coerce(c,l,i.coloraxis,e,t)}for(var d in s){var f=s[d];if(f[0])c=e[d]||{},l=r.newContainer(t,d,`coloraxis`),l._name=d,a(c,l,t,u,{prefix:``,cLetter:`c`});else{for(var p=0;p{var n=$(),r=bt().hasColorscale,i=bt().extractOpts;t.exports=function(e,t){function a(e,t){var n=e[`_`+t];n!==void 0&&(e[t]=n)}function o(e,r){var o=r.container?n.nestedProperty(e,r.container).get():e;if(o){if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var s=i(o),c=s.auto;(c||s.min===void 0)&&a(o,r.min),(c||s.max===void 0)&&a(o,r.max),s.autocolorscale&&a(o,`colorscale`)}}}for(var s=0;s{var n=_(),r=$(),i=bt().extractOpts;t.exports=function(e,t,a){var o=e._fullLayout,s=a.vals,c=a.containerStr,l=c?r.nestedProperty(t,c).get():t,u=i(l),d=u.auto!==!1,f=u.min,p=u.max,m=u.mid,h=function(){return r.aggNums(Math.min,null,s)},g=function(){return r.aggNums(Math.max,null,s)};if(f===void 0?f=h():d&&(f=l._colorAx&&n(f)?Math.min(f,h()):h()),p===void 0?p=g():d&&(p=l._colorAx&&n(p)?Math.max(p,g()):g()),d&&m!==void 0&&(p-m>m-f?f=m-(p-m):p-m=0?o.colorscale.sequential:o.colorscale.sequentialminus;u._sync(`colorscale`,_)}}}),zt=l((e,t)=>{var n=F(),r=bt();t.exports={moduleType:`component`,name:`colorscale`,attributes:wt(),layoutAttributes:Tt(),supplyLayoutDefaults:It(),handleDefaults:Ft(),crossTraceDefaults:Lt(),calc:Rt(),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:r.hasColorscale,extractOpts:r.extractOpts,extractScale:r.extractScale,flipScale:r.flipScale,makeColorScaleFunc:r.makeColorScaleFunc,makeColorScaleFuncFromTrace:r.makeColorScaleFuncFromTrace}}),Bt=l((e,t)=>{var n=$(),r=x().isTypedArraySpec;t.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf(`lines`)!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf(`markers`)!==-1||e.type===`splom`)},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf(`text`)!==-1},isBubble:function(e){var t=e.marker;return n.isPlainObject(t)&&(n.isArrayOrTypedArray(t.size)||r(t.size))}}}),Vt=l((e,t)=>{var n=_();t.exports=function(e,t){t||=2;var r=e.marker,i=r.sizeref||1,a=r.sizemin||0,o=r.sizemode===`area`?function(e){return Math.sqrt(e/i)}:function(e){return e/i};return function(e){var r=o(e/t);return n(r)&&r>0?Math.max(r,a):0}}}),Ht=l(e=>{var t=$();e.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},e.isTraceInSubplots=function(t,n){if(t.type===`splom`){for(var r=t.xaxes||[],i=t.yaxes||[],a=0;a=0&&n.index{t.exports=i;var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/gi;function i(e){var t=[];return e.replace(r,function(e,r,i){var a=r.toLowerCase();for(i=o(i),a==`m`&&i.length>2&&(t.push([r].concat(i.splice(0,2))),a=`l`,r=r==`m`?`l`:`L`);;){if(i.length==n[a])return i.unshift(r),t.push(i);if(i.length{var n=Ut(),r=function(e,t){return t?Math.round(e*(t=10**t))/t:Math.round(e)},i=`M0,0Z`,a=Math.sqrt(2),o=Math.sqrt(3),s=Math.PI,c=Math.cos,l=Math.sin;t.exports={circle:{n:0,f:function(e,t,n){if(u(t))return i;var a=r(e,2),o=`M`+a+`,0A`+a+`,`+a+` 0 1,1 0,-`+a+`A`+a+`,`+a+` 0 0,1 `+a+`,0Z`;return n?h(t,n,o):o}},square:{n:1,f:function(e,t,n){if(u(t))return i;var a=r(e,2);return h(t,n,`M`+a+`,`+a+`H-`+a+`V-`+a+`H`+a+`Z`)}},diamond:{n:2,f:function(e,t,n){if(u(t))return i;var a=r(e*1.3,2);return h(t,n,`M`+a+`,0L0,`+a+`L-`+a+`,0L0,-`+a+`Z`)}},cross:{n:3,f:function(e,t,n){if(u(t))return i;var a=r(e*.4,2),o=r(e*1.2,2);return h(t,n,`M`+o+`,`+a+`H`+a+`V`+o+`H-`+a+`V`+a+`H-`+o+`V-`+a+`H-`+a+`V-`+o+`H`+a+`V-`+a+`H`+o+`Z`)}},x:{n:4,f:function(e,t,n){if(u(t))return i;var o=r(e*.8/a,2),s=`l`+o+`,`+o,c=`l`+o+`,-`+o,l=`l-`+o+`,-`+o,d=`l-`+o+`,`+o;return h(t,n,`M0,`+o+s+c+l+c+l+d+l+d+s+d+s+`Z`)}},"triangle-up":{n:5,f:function(e,t,n){if(u(t))return i;var a=r(e*2/o,2),s=r(e/2,2),c=r(e,2);return h(t,n,`M-`+a+`,`+s+`H`+a+`L0,-`+c+`Z`)}},"triangle-down":{n:6,f:function(e,t,n){if(u(t))return i;var a=r(e*2/o,2),s=r(e/2,2),c=r(e,2);return h(t,n,`M-`+a+`,-`+s+`H`+a+`L0,`+c+`Z`)}},"triangle-left":{n:7,f:function(e,t,n){if(u(t))return i;var a=r(e*2/o,2),s=r(e/2,2),c=r(e,2);return h(t,n,`M`+s+`,-`+a+`V`+a+`L-`+c+`,0Z`)}},"triangle-right":{n:8,f:function(e,t,n){if(u(t))return i;var a=r(e*2/o,2),s=r(e/2,2),c=r(e,2);return h(t,n,`M-`+s+`,-`+a+`V`+a+`L`+c+`,0Z`)}},"triangle-ne":{n:9,f:function(e,t,n){if(u(t))return i;var a=r(e*.6,2),o=r(e*1.2,2);return h(t,n,`M-`+o+`,-`+a+`H`+a+`V`+o+`Z`)}},"triangle-se":{n:10,f:function(e,t,n){if(u(t))return i;var a=r(e*.6,2),o=r(e*1.2,2);return h(t,n,`M`+a+`,-`+o+`V`+a+`H-`+o+`Z`)}},"triangle-sw":{n:11,f:function(e,t,n){if(u(t))return i;var a=r(e*.6,2),o=r(e*1.2,2);return h(t,n,`M`+o+`,`+a+`H-`+a+`V-`+o+`Z`)}},"triangle-nw":{n:12,f:function(e,t,n){if(u(t))return i;var a=r(e*.6,2),o=r(e*1.2,2);return h(t,n,`M-`+a+`,`+o+`V-`+a+`H`+o+`Z`)}},pentagon:{n:13,f:function(e,t,n){if(u(t))return i;var a=r(e*.951,2),o=r(e*.588,2),s=r(-e,2),c=r(e*-.309,2),l=r(e*.809,2);return h(t,n,`M`+a+`,`+c+`L`+o+`,`+l+`H-`+o+`L-`+a+`,`+c+`L0,`+s+`Z`)}},hexagon:{n:14,f:function(e,t,n){if(u(t))return i;var a=r(e,2),s=r(e/2,2),c=r(e*o/2,2);return h(t,n,`M`+c+`,-`+s+`V`+s+`L0,`+a+`L-`+c+`,`+s+`V-`+s+`L0,-`+a+`Z`)}},hexagon2:{n:15,f:function(e,t,n){if(u(t))return i;var a=r(e,2),s=r(e/2,2),c=r(e*o/2,2);return h(t,n,`M-`+s+`,`+c+`H`+s+`L`+a+`,0L`+s+`,-`+c+`H-`+s+`L-`+a+`,0Z`)}},octagon:{n:16,f:function(e,t,n){if(u(t))return i;var a=r(e*.924,2),o=r(e*.383,2);return h(t,n,`M-`+o+`,-`+a+`H`+o+`L`+a+`,-`+o+`V`+o+`L`+o+`,`+a+`H-`+o+`L-`+a+`,`+o+`V-`+o+`Z`)}},star:{n:17,f:function(e,t,n){if(u(t))return i;var a=e*1.4,o=r(a*.225,2),s=r(a*.951,2),c=r(a*.363,2),l=r(a*.588,2),d=r(-a,2),f=r(a*-.309,2),p=r(a*.118,2),m=r(a*.809,2),g=r(a*.382,2);return h(t,n,`M`+o+`,`+f+`H`+s+`L`+c+`,`+p+`L`+l+`,`+m+`L0,`+g+`L-`+l+`,`+m+`L-`+c+`,`+p+`L-`+s+`,`+f+`H-`+o+`L0,`+d+`Z`)}},hexagram:{n:18,f:function(e,t,n){if(u(t))return i;var a=r(e*.66,2),o=r(e*.38,2),s=r(e*.76,2);return h(t,n,`M-`+s+`,0l-`+o+`,-`+a+`h`+s+`l`+o+`,-`+a+`l`+o+`,`+a+`h`+s+`l-`+o+`,`+a+`l`+o+`,`+a+`h-`+s+`l-`+o+`,`+a+`l-`+o+`,-`+a+`h-`+s+`Z`)}},"star-triangle-up":{n:19,f:function(e,t,n){if(u(t))return i;var a=r(e*o*.8,2),s=r(e*.8,2),c=r(e*1.6,2),l=r(e*4,2),d=`A `+l+`,`+l+` 0 0 1 `;return h(t,n,`M-`+a+`,`+s+d+a+`,`+s+d+`0,-`+c+d+`-`+a+`,`+s+`Z`)}},"star-triangle-down":{n:20,f:function(e,t,n){if(u(t))return i;var a=r(e*o*.8,2),s=r(e*.8,2),c=r(e*1.6,2),l=r(e*4,2),d=`A `+l+`,`+l+` 0 0 1 `;return h(t,n,`M`+a+`,-`+s+d+`-`+a+`,-`+s+d+`0,`+c+d+a+`,-`+s+`Z`)}},"star-square":{n:21,f:function(e,t,n){if(u(t))return i;var a=r(e*1.1,2),o=r(e*2,2),s=`A `+o+`,`+o+` 0 0 1 `;return h(t,n,`M-`+a+`,-`+a+s+`-`+a+`,`+a+s+a+`,`+a+s+a+`,-`+a+s+`-`+a+`,-`+a+`Z`)}},"star-diamond":{n:22,f:function(e,t,n){if(u(t))return i;var a=r(e*1.4,2),o=r(e*1.9,2),s=`A `+o+`,`+o+` 0 0 1 `;return h(t,n,`M-`+a+`,0`+s+`0,`+a+s+a+`,0`+s+`0,-`+a+s+`-`+a+`,0Z`)}},"diamond-tall":{n:23,f:function(e,t,n){if(u(t))return i;var a=r(e*.7,2),o=r(e*1.4,2);return h(t,n,`M0,`+o+`L`+a+`,0L0,-`+o+`L-`+a+`,0Z`)}},"diamond-wide":{n:24,f:function(e,t,n){if(u(t))return i;var a=r(e*1.4,2),o=r(e*.7,2);return h(t,n,`M0,`+o+`L`+a+`,0L0,-`+o+`L-`+a+`,0Z`)}},hourglass:{n:25,f:function(e,t,n){if(u(t))return i;var a=r(e,2);return h(t,n,`M`+a+`,`+a+`H-`+a+`L`+a+`,-`+a+`H-`+a+`Z`)},noDot:!0},bowtie:{n:26,f:function(e,t,n){if(u(t))return i;var a=r(e,2);return h(t,n,`M`+a+`,`+a+`V-`+a+`L-`+a+`,`+a+`V-`+a+`Z`)},noDot:!0},"circle-cross":{n:27,f:function(e,t,n){if(u(t))return i;var a=r(e,2);return h(t,n,`M0,`+a+`V-`+a+`M`+a+`,0H-`+a+`M`+a+`,0A`+a+`,`+a+` 0 1,1 0,-`+a+`A`+a+`,`+a+` 0 0,1 `+a+`,0Z`)},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,n){if(u(t))return i;var o=r(e,2),s=r(e/a,2);return h(t,n,`M`+s+`,`+s+`L-`+s+`,-`+s+`M`+s+`,-`+s+`L-`+s+`,`+s+`M`+o+`,0A`+o+`,`+o+` 0 1,1 0,-`+o+`A`+o+`,`+o+` 0 0,1 `+o+`,0Z`)},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,n){if(u(t))return i;var a=r(e,2);return h(t,n,`M0,`+a+`V-`+a+`M`+a+`,0H-`+a+`M`+a+`,`+a+`H-`+a+`V-`+a+`H`+a+`Z`)},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,n){if(u(t))return i;var a=r(e,2);return h(t,n,`M`+a+`,`+a+`L-`+a+`,-`+a+`M`+a+`,-`+a+`L-`+a+`,`+a+`M`+a+`,`+a+`H-`+a+`V-`+a+`H`+a+`Z`)},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,n){if(u(t))return i;var a=r(e*1.3,2);return h(t,n,`M`+a+`,0L0,`+a+`L-`+a+`,0L0,-`+a+`ZM0,-`+a+`V`+a+`M-`+a+`,0H`+a)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,n){if(u(t))return i;var a=r(e*1.3,2),o=r(e*.65,2);return h(t,n,`M`+a+`,0L0,`+a+`L-`+a+`,0L0,-`+a+`ZM-`+o+`,-`+o+`L`+o+`,`+o+`M-`+o+`,`+o+`L`+o+`,-`+o)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,n){if(u(t))return i;var a=r(e*1.4,2);return h(t,n,`M0,`+a+`V-`+a+`M`+a+`,0H-`+a)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,n){if(u(t))return i;var a=r(e,2);return h(t,n,`M`+a+`,`+a+`L-`+a+`,-`+a+`M`+a+`,-`+a+`L-`+a+`,`+a)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,n){if(u(t))return i;var a=r(e*1.2,2),o=r(e*.85,2);return h(t,n,`M0,`+a+`V-`+a+`M`+a+`,0H-`+a+`M`+o+`,`+o+`L-`+o+`,-`+o+`M`+o+`,-`+o+`L-`+o+`,`+o)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,n){if(u(t))return i;var a=r(e/2,2),o=r(e,2);return h(t,n,`M`+a+`,`+o+`V-`+o+`M`+(a-o)+`,-`+o+`V`+o+`M`+o+`,`+a+`H-`+o+`M-`+o+`,`+(a-o)+`H`+o)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,n){if(u(t))return i;var a=r(e*1.2,2),o=r(e*1.6,2),s=r(e*.8,2);return h(t,n,`M-`+a+`,`+s+`L0,0M`+a+`,`+s+`L0,0M0,-`+o+`L0,0`)},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,n){if(u(t))return i;var a=r(e*1.2,2),o=r(e*1.6,2),s=r(e*.8,2);return h(t,n,`M-`+a+`,-`+s+`L0,0M`+a+`,-`+s+`L0,0M0,`+o+`L0,0`)},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,n){if(u(t))return i;var a=r(e*1.2,2),o=r(e*1.6,2),s=r(e*.8,2);return h(t,n,`M`+s+`,`+a+`L0,0M`+s+`,-`+a+`L0,0M-`+o+`,0L0,0`)},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,n){if(u(t))return i;var a=r(e*1.2,2),o=r(e*1.6,2),s=r(e*.8,2);return h(t,n,`M-`+s+`,`+a+`L0,0M-`+s+`,-`+a+`L0,0M`+o+`,0L0,0`)},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,n){if(u(t))return i;var a=r(e*1.4,2);return h(t,n,`M`+a+`,0H-`+a)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,n){if(u(t))return i;var a=r(e*1.4,2);return h(t,n,`M0,`+a+`V-`+a)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,n){if(u(t))return i;var a=r(e,2);return h(t,n,`M`+a+`,-`+a+`L-`+a+`,`+a)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,n){if(u(t))return i;var a=r(e,2);return h(t,n,`M`+a+`,`+a+`L-`+a+`,-`+a)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,n){if(u(t))return i;var a=r(e,2),o=r(e*2,2);return h(t,n,`M0,0L-`+a+`,`+o+`H`+a+`Z`)},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,n){if(u(t))return i;var a=r(e,2),o=r(e*2,2);return h(t,n,`M0,0L-`+a+`,-`+o+`H`+a+`Z`)},noDot:!0},"arrow-left":{n:47,f:function(e,t,n){if(u(t))return i;var a=r(e*2,2),o=r(e,2);return h(t,n,`M0,0L`+a+`,-`+o+`V`+o+`Z`)},noDot:!0},"arrow-right":{n:48,f:function(e,t,n){if(u(t))return i;var a=r(e*2,2),o=r(e,2);return h(t,n,`M0,0L-`+a+`,-`+o+`V`+o+`Z`)},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,n){if(u(t))return i;var a=r(e,2),o=r(e*2,2);return h(t,n,`M-`+a+`,0H`+a+`M0,0L-`+a+`,`+o+`H`+a+`Z`)},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,n){if(u(t))return i;var a=r(e,2),o=r(e*2,2);return h(t,n,`M-`+a+`,0H`+a+`M0,0L-`+a+`,-`+o+`H`+a+`Z`)},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,n){if(u(t))return i;var a=r(e*2,2),o=r(e,2);return h(t,n,`M0,-`+o+`V`+o+`M0,0L`+a+`,-`+o+`V`+o+`Z`)},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,n){if(u(t))return i;var a=r(e*2,2),o=r(e,2);return h(t,n,`M0,-`+o+`V`+o+`M0,0L-`+a+`,-`+o+`V`+o+`Z`)},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,n){if(u(t))return i;var r=s/2.5,a=2*e*c(r),o=2*e*l(r);return h(t,n,`M0,0L`+-a+`,`+o+`L`+a+`,`+o+`Z`)},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,n){if(u(t))return i;var r=s/4,a=2*e*c(r),o=2*e*l(r);return h(t,n,`M0,0L`+-a+`,`+o+`A `+2*e+`,`+2*e+` 0 0 1 `+a+`,`+o+`Z`)},backoff:.4,noDot:!0}};function u(e){return e===null}var d,f,p,m;function h(e,t,r){if((!e||e%360==0)&&!t)return r;if(p===e&&m===t&&d===r)return f;p=e,m=t,d=r;function i(e,n){var r=c(e),i=l(e),a=n[0],o=n[1]+(t||0);return[a*r-o*i,a*i+o*r]}for(var a=e/180*s,o=0,u=0,h=n(r),g=``,_=0;_{var n=f(),r=$(),i=r.numberFormat,a=_(),o=O(),s=Ie(),c=L(),l=zt(),u=r.strTranslate,d=yt(),p=_t(),m=vt().LINE_SPACING,h=R().DESELECTDIM,g=Bt(),v=Vt(),y=Ht().appendArrayPointValue,b=t.exports={};b.font=function(e,t){var n=t.variant,r=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,f=t.textcase;s&&e.style(`font-family`,s),o+1&&e.style(`font-size`,o+`px`),a&&e.call(c.fill,a),i&&e.style(`font-weight`,i),r&&e.style(`font-style`,r),n&&e.style(`font-variant`,n),f&&e.style(`text-transform`,x(C(f))),l&&e.style(`text-shadow`,l===`auto`?d.makeTextShadow(c.contrast(a)):x(l)),u&&e.style(`text-decoration-line`,x(w(u)))};function x(e){return e===`none`?void 0:e}var S={normal:`none`,lower:`lowercase`,upper:`uppercase`,"word caps":`capitalize`};function C(e){return S[e]}function w(e){return e.replace(`under`,`underline`).replace(`over`,`overline`).replace(`through`,`line-through`).split(`+`).join(` `)}b.setPosition=function(e,t,n){e.attr(`x`,t).attr(`y`,n)},b.setSize=function(e,t,n){e.attr(`width`,t).attr(`height`,n)},b.setRect=function(e,t,n,r,i){e.call(b.setPosition,t,n).call(b.setSize,r,i)},b.translatePoint=function(e,t,n,r){var i=n.c2p(e.x),o=r.c2p(e.y);if(a(i)&&a(o)&&t.node())t.node().nodeName===`text`?t.attr(`x`,i).attr(`y`,o):t.attr(`transform`,u(i,o));else return!1;return!0},b.translatePoints=function(e,t,r){e.each(function(e){var i=n.select(this);b.translatePoint(e,i,t,r)})},b.hideOutsideRangePoint=function(e,t,n,r,i,a){t.attr(`display`,n.isPtWithinRange(e,i)&&r.isPtWithinRange(e,a)?null:`none`)},b.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,i=t.yaxis;e.each(function(t){var a=t[0].trace,o=a.xcalendar,c=a.ycalendar,l=s.traceIs(a,`bar-like`)?`.bartext`:`.point,.textpoint`;e.selectAll(l).each(function(e){b.hideOutsideRangePoint(e,n.select(this),r,i,o,c)})})}},b.crispRound=function(e,t,n){return!t||!a(t)?n||0:e._context.staticPlot?t:t<1?1:Math.round(t)},b.singleLineStyle=function(e,t,n,r,i){t.style(`fill`,`none`);var a=(((e||[])[0]||{}).trace||{}).line||{},o=n||a.width||0,s=i||a.dash||``;c.stroke(t,r||a.color),b.dashLine(t,s,o)},b.lineGroupStyle=function(e,t,r,i){e.style(`fill`,`none`).each(function(e){var a=(((e||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=i||a.dash||``;n.select(this).call(c.stroke,r||a.color).call(b.dashLine,s,o)})},b.dashLine=function(e,t,n){n=+n||0,t=b.dashStyle(t,n),e.style({"stroke-dasharray":t,"stroke-width":n+`px`})},b.dashStyle=function(e,t){t=+t||1;var n=Math.max(t,3);return e===`solid`?e=``:e===`dot`?e=n+`px,`+n+`px`:e===`dash`?e=3*n+`px,`+3*n+`px`:e===`longdash`?e=5*n+`px,`+5*n+`px`:e===`dashdot`?e=3*n+`px,`+n+`px,`+n+`px,`+n+`px`:e===`longdashdot`&&(e=5*n+`px,`+2*n+`px,`+n+`px,`+2*n+`px`),e};function T(e,t,n,r){var i=t.fillpattern,a=t.fillgradient,o=b.getPatternAttr,s=i&&(o(i.shape,0,``)||o(i.path,0,``));if(s){var l=o(i.bgcolor,0,null),u=o(i.fgcolor,0,null),d=i.fgopacity,f=o(i.size,0,8),p=o(i.solidity,0,.3),m=t.uid;b.pattern(e,`point`,n,m,s,f,p,void 0,i.fillmode,l,u,d)}else if(a&&a.type!==`none`){var h=a.type,g=`scatterfill-`+t.uid;if(r&&(g=`legendfill-`+t.uid),!r&&(a.start!==void 0||a.stop!==void 0)){var _,v;h===`horizontal`?(_={x:a.start,y:0},v={x:a.stop,y:0}):h===`vertical`&&(_={x:0,y:a.start},v={x:0,y:a.stop}),_.x=t._xA.c2p(_.x===void 0?t._extremes.x.min[0].val:_.x,!0),_.y=t._yA.c2p(_.y===void 0?t._extremes.y.min[0].val:_.y,!0),v.x=t._xA.c2p(v.x===void 0?t._extremes.x.max[0].val:v.x,!0),v.y=t._yA.c2p(v.y===void 0?t._extremes.y.max[0].val:v.y,!0),e.call(N,n,g,`linear`,a.colorscale,`fill`,_,v,!0,!1)}else h===`horizontal`&&(h+=`reversed`),e.call(b.gradient,n,g,h,a.colorscale,`fill`)}else t.fillcolor&&e.call(c.fill,t.fillcolor)}b.singleFillStyle=function(e,t){T(e,((n.select(e.node()).data()[0]||[])[0]||{}).trace||{},t,!1)},b.fillGroupStyle=function(e,t,r){e.style(`stroke-width`,0).each(function(e){var i=n.select(this);e[0].trace&&T(i,e[0].trace,t,r)})};var E=Wt();b.symbolNames=[],b.symbolFuncs=[],b.symbolBackOffs=[],b.symbolNeedLines={},b.symbolNoDot={},b.symbolNoFill={},b.symbolList=[],Object.keys(E).forEach(function(e){var t=E[e],n=t.n;b.symbolList.push(n,String(n),e,n+100,String(n+100),e+`-open`),b.symbolNames[n]=e,b.symbolFuncs[n]=t.f,b.symbolBackOffs[n]=t.backoff||0,t.needLine&&(b.symbolNeedLines[n]=!0),t.noDot?b.symbolNoDot[n]=!0:b.symbolList.push(n+200,String(n+200),e+`-dot`,n+300,String(n+300),e+`-open-dot`),t.noFill&&(b.symbolNoFill[n]=!0)});var D=b.symbolNames.length,k=`M0,0.5L0.5,0L0,-0.5L-0.5,0Z`;b.symbolNumber=function(e){if(a(e))e=+e;else if(typeof e==`string`){var t=0;e.indexOf(`-open`)>0&&(t=100,e=e.replace(`-open`,``)),e.indexOf(`-dot`)>0&&(t+=200,e=e.replace(`-dot`,``)),e=b.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=D||e>=400?0:Math.floor(Math.max(e,0))};function A(e,t,n,r){var i=e%100;return b.symbolFuncs[i](t,n,r)+(e>=200?k:``)}var j=i(`~f`),M={radial:{type:`radial`},radialreversed:{type:`radial`,reversed:!0},horizontal:{type:`linear`,start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:`linear`,start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:`linear`,start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:`linear`,start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};b.gradient=function(e,t,n,r,i,a){var o=M[r];return N(e,t,n,o.type,i,a,o.start,o.stop,!1,o.reversed)};function N(e,t,i,a,s,l,u,d,f,p){var m=s.length,h;a===`linear`?h={node:`linearGradient`,attrs:{x1:u.x,y1:u.y,x2:d.x,y2:d.y,gradientUnits:f?`userSpaceOnUse`:`objectBoundingBox`},reversed:p}:a===`radial`&&(h={node:`radialGradient`,reversed:p});for(var g=Array(m),_=0;_=0&&e.i===void 0&&(e.i=o.i),t.style(`opacity`,i.selectedOpacityFn?i.selectedOpacityFn(e):e.mo===void 0?s.opacity:e.mo),i.ms2mrc){var u=e.ms===`various`||s.size===`various`?3:i.ms2mrc(e.ms);e.mrc=u,i.selectedSizeFn&&(u=e.mrc=i.selectedSizeFn(e));var d=b.symbolNumber(e.mx||s.symbol)||0;e.om=d%200>=100;var f=pe(e,n),p=re(e,n);t.attr(`d`,A(d,u,f,p))}var m=!1,h,g,_;if(e.so)_=l.outlierwidth,g=l.outliercolor,h=s.outliercolor;else{var v=(l||{}).width;_=(e.mlw+1||v+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,g=`mlc`in e?e.mlcc=i.lineScale(e.mlc):r.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,r.isArrayOrTypedArray(s.color)&&(h=c.defaultLine,m=!0),h=`mc`in e?e.mcc=i.markerScale(e.mc):s.color||s.colors||`rgba(0,0,0,0)`,i.selectedColorFn&&(h=i.selectedColorFn(e))}let y=e.mld||(l||{}).dash;if(y&&b.dashLine(t,y,_),e.om)t.call(c.stroke,h).style({"stroke-width":(_||1)+`px`,fill:`none`});else{t.style(`stroke-width`,(e.isBlank?0:_)+`px`);var x=s.gradient,S=e.mgt;S?m=!0:S=x&&x.type,r.isArrayOrTypedArray(S)&&(S=S[0],M[S]||(S=0));var C=s.pattern,w=b.getPatternAttr,T=C&&(w(C.shape,e.i,``)||w(C.path,e.i,``));if(S&&S!==`none`){var E=e.mgc;E?m=!0:E=x.color;var D=n.uid;m&&(D+=`-`+e.i),b.gradient(t,a,D,S,[[0,E],[1,h]],`fill`)}else if(T){var O=!1,k=C.fgcolor;!k&&o&&o.color&&(k=o.color,O=!0);var j=w(k,e.i,o&&o.color||null),N=w(C.bgcolor,e.i,null),P=C.fgopacity,F=w(C.size,e.i,8),I=w(C.solidity,e.i,.3);O=O||e.mcc||r.isArrayOrTypedArray(C.shape)||r.isArrayOrTypedArray(C.path)||r.isArrayOrTypedArray(C.bgcolor)||r.isArrayOrTypedArray(C.fgcolor)||r.isArrayOrTypedArray(C.size)||r.isArrayOrTypedArray(C.solidity);var L=n.uid;O&&(L+=`-`+e.i),b.pattern(t,`point`,a,L,T,F,I,e.mcc,C.fillmode,N,j,P)}else r.isArrayOrTypedArray(h)?c.fill(t,h[e.i]):c.fill(t,h);_&&c.stroke(t,g)}},b.makePointStyleFns=function(e){var t={},n=e.marker;return t.markerScale=b.tryColorscale(n,``),t.lineScale=b.tryColorscale(n,`line`),s.traceIs(e,`symbols`)&&(t.ms2mrc=g.isBubble(e)?v(e):function(){return(n.size||6)/2}),e.selectedpoints&&r.extendFlat(t,b.makeSelectedPointStyleFns(e)),t},b.makeSelectedPointStyleFns=function(e){var t={},n=e.selected||{},i=e.unselected||{},a=e.marker||{},o=n.marker||{},c=i.marker||{},l=a.opacity,u=o.opacity,d=c.opacity,f=u!==void 0,p=d!==void 0;(r.isArrayOrTypedArray(l)||f||p)&&(t.selectedOpacityFn=function(e){var t=e.mo===void 0?a.opacity:e.mo;return e.selected?f?u:t:p?d:h*t});var m=a.color,g=o.color,_=c.color;(g||_)&&(t.selectedColorFn=function(e){var t=e.mcc||m;return e.selected?g||t:_||t});var v=a.size,y=o.size,b=c.size,x=y!==void 0,S=b!==void 0;return s.traceIs(e,`symbols`)&&(x||S)&&(t.selectedSizeFn=function(e){var t=e.mrc||v/2;return e.selected?x?y/2:t:S?b/2:t}),t},b.makeSelectedTextStyleFns=function(e){var t={},n=e.selected||{},r=e.unselected||{},i=e.textfont||{},a=n.textfont||{},o=r.textfont||{},s=i.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:u||(l?t:c.addOpacity(t,h))},t},b.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=b.makeSelectedPointStyleFns(t),i=t.marker||{},a=[];r.selectedOpacityFn&&a.push(function(e,t){e.style(`opacity`,r.selectedOpacityFn(t))}),r.selectedColorFn&&a.push(function(e,t){c.fill(e,r.selectedColorFn(t))}),r.selectedSizeFn&&a.push(function(e,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);e.attr(`d`,A(b.symbolNumber(a),o,pe(n,t),re(n,t))),n.mrc2=o}),a.length&&e.each(function(e){for(var t=n.select(this),r=0;r0?n:0}b.textPointStyle=function(e,t,i){if(e.size()){var a;t.selectedpoints&&(a=b.makeSelectedTextStyleFns(t).selectedTextColorFn);var o=t.texttemplate,s=i._fullLayout;e.each(function(e){var c=n.select(this),l=o?r.extractOption(e,t,`txt`,`texttemplate`):r.extractOption(e,t,`tx`,`text`);if(!l&&l!==0){c.remove();return}if(o){var u=t._module.formatLabels,f=u?u(e,t,s):{},p={};y(p,t,e.i),l=r.texttemplateString({data:[p,e,t._meta],fallback:t.texttemplatefallback,labels:f,locale:s._d3locale,template:l})}var m=e.tp||t.textposition,h=I(e,t),g=a?a(e):e.tc||t.textfont.color;c.call(b.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:h,color:g}).text(l).call(d.convertToTspans,i).call(F,m,h,e.mrc)})}},b.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=b.makeSelectedTextStyleFns(t);e.each(function(e){var i=n.select(this),a=r.selectedTextColorFn(e),o=e.tp||t.textposition,l=I(e,t);c.fill(i,a);var u=s.traceIs(t,`bar-like`);F(i,o,l,e.mrc2||e.mrc,u)})}};var z=.5;b.smoothopen=function(e,t){if(e.length<3)return`M`+e.join(`L`);for(var n=`M`+e[0],r=[],i=1;i=l||S>=d&&S<=l)&&(C<=f&&C>=u||C>=f&&C<=u)&&(e=[S,C])}return e}b.applyBackoff=J,b.makeTester=function(){var e=r.ensureSingleById(n.select(`body`),`svg`,`js-plotly-tester`,function(e){e.attr(p.svgAttrs).style({position:`absolute`,left:`-10000px`,top:`-10000px`,width:`9000px`,height:`9000px`,"z-index":`1`})}),t=r.ensureSingle(e,`path`,`js-reference-point`,function(e){e.attr(`d`,`M0,0H1V1H0Z`).style({"stroke-width":0,fill:`black`})});b.tester=e,b.testref=t},b.savedBBoxes={};var Y=0,X=1e4;b.bBox=function(e,t,i){i||=ee(e);var a;if(i){if(a=b.savedBBoxes[i],a)return r.extendFlat({},a)}else if(e.childNodes.length===1){var o=e.childNodes[0];if(i=ee(o),i){var s=+o.getAttribute(`x`)||0,c=+o.getAttribute(`y`)||0,l=o.getAttribute(`transform`);if(!l){var u=b.bBox(o,!1,i);return s&&(u.left+=s,u.right+=s),c&&(u.top+=c,u.bottom+=c),u}if(i+=`~`+s+`~`+c+`~`+l,a=b.savedBBoxes[i],a)return r.extendFlat({},a)}}var f,p;t?f=e:(p=b.tester.node(),f=e.cloneNode(!0),p.appendChild(f)),n.select(f).attr(`transform`,null).call(d.positionText,0,0);var m=f.getBoundingClientRect(),h=b.testref.node().getBoundingClientRect();t||p.removeChild(f);var g={height:m.height,width:m.width,left:m.left-h.left,top:m.top-h.top,right:m.right-h.left,bottom:m.bottom-h.top};return Y>=X&&(b.savedBBoxes={},Y=0),i&&(b.savedBBoxes[i]=g),Y++,r.extendFlat({},g)};function ee(e){var t=e.getAttribute(`data-unformatted`);if(t!==null)return t+e.getAttribute(`data-math`)+e.getAttribute(`text-anchor`)+e.getAttribute(`style`)}b.setClipUrl=function(e,t,n){e.attr(`clip-path`,Z(t,n))};function Z(e,t){if(!e)return null;var n=t._context,r=n._exportedPlot?``:n._baseUrl||``;return r?`url('`+r+`#`+e+`')`:`url(#`+e+`)`}b.getTranslate=function(e){var t=(e[e.attr?`attr`:`getAttribute`](`transform`)||``).replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(e,t,n){return[t,n].join(` `)}).split(` `);return{x:+t[0]||0,y:+t[1]||0}},b.setTranslate=function(e,t,n){var r=/(\btranslate\(.*?\);?)/,i=e.attr?`attr`:`getAttribute`,a=e.attr?`attr`:`setAttribute`,o=e[i](`transform`)||``;return t||=0,n||=0,o=o.replace(r,``).trim(),o+=u(t,n),o=o.trim(),e[a](`transform`,o),o},b.getScale=function(e){var t=(e[e.attr?`attr`:`getAttribute`](`transform`)||``).replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(e,t,n){return[t,n].join(` `)}).split(` `);return{x:+t[0]||1,y:+t[1]||1}},b.setScale=function(e,t,n){var r=/(\bscale\(.*?\);?)/,i=e.attr?`attr`:`getAttribute`,a=e.attr?`attr`:`setAttribute`,o=e[i](`transform`)||``;return t||=1,n||=1,o=o.replace(r,``).trim(),o+=`scale(`+t+`,`+n+`)`,o=o.trim(),e[a](`transform`,o),o};var te=/\s*sc.*/;b.setPointGroupScale=function(e,t,n){if(t||=1,n||=1,e){var r=t===1&&n===1?``:`scale(`+t+`,`+n+`)`;e.each(function(){var e=(this.getAttribute(`transform`)||``).replace(te,``);e+=r,e=e.trim(),this.setAttribute(`transform`,e)})}};var ne=/translate\([^)]*\)\s*$/;b.setTextPointsScale=function(e,t,r){e&&e.each(function(){var e,i=n.select(this),a=i.select(`text`);if(a.node()){var o=parseFloat(a.attr(`x`)||0),s=parseFloat(a.attr(`y`)||0),c=(i.attr(`transform`)||``).match(ne);e=t===1&&r===1?[]:[u(o,s),`scale(`+t+`,`+r+`)`,u(-o,-s)],c&&e.push(c),i.attr(`transform`,e.join(``))}})};function re(e,t){var n;return e&&(n=e.mf),n===void 0&&(n=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-n:n}b.getMarkerStandoff=re;var ie=Math.atan2,ae=Math.cos,oe=Math.sin;function se(e,t){var n=t[0],r=t[1];return[n*ae(e)-r*oe(e),n*oe(e)+r*ae(e)]}var ce,Q,le,ue,de,fe;function pe(e,t){var n=e.ma;n===void 0&&(n=t.marker.angle,(!n||r.isArrayOrTypedArray(n))&&(n=0));var i,o,s=t.marker.angleref;if(s===`previous`||s===`north`){if(t._geo){var c=t._geo.project(e.lonlat);i=c[0],o=c[1]}else{var l=t._xA,u=t._yA;if(l&&u)i=l.c2p(e.x),o=u.c2p(e.y);else return 90}if(t._geo){var d=e.lonlat[0],f=e.lonlat[1],p=t._geo.project([d,f+1e-5]),m=t._geo.project([d+1e-5,f]),h=ie(m[1]-o,m[0]-i),g=ie(p[1]-o,p[0]-i),_;if(s===`north`)_=n/180*Math.PI;else if(s===`previous`){var v=d/180*Math.PI,y=f/180*Math.PI,b=ce/180*Math.PI,x=Q/180*Math.PI,S=b-v;_=-ie(ae(x)*oe(S),oe(x)*ae(y)-ae(x)*oe(y)*ae(S))-Math.PI,ce=d,Q=f}var C=se(h,[ae(_),0]),w=se(g,[oe(_),0]);n=ie(C[1]+w[1],C[0]+w[0])/Math.PI*180,s===`previous`&&(fe!==t.uid||e.i!==de+1)&&(n=null)}if(s===`previous`&&!t._geo){if(fe===t.uid&&e.i===de+1&&a(i)&&a(o)){var T=i-le,E=o-ue,D=t.line&&t.line.shape||``,O=D.slice(D.length-1);O===`h`&&(E=0),O===`v`&&(T=0),n+=ie(E,T)/Math.PI*180+90}else n=null}}return le=i,ue=o,de=e.i,fe=t.uid,n}b.getMarkerAngle=pe}),Kt=l((e,t)=>{var n=f(),r=_(),i=gt(),a=Ie(),o=$(),s=o.strTranslate,c=Gt(),l=L(),u=yt(),d=R(),p=vt().OPPOSITE_SIDE,m=/ [XY][0-9]* /,h=1.6,g=1.6;function v(e,t,f){var _=e._fullLayout,v=f.propContainer,y=f.propName,b=f.placeholder,x=f.traceIndex,S=f.avoid||{},C=f.attributes,w=f.transform,T=f.containerGroup,E=1,D=v.title,O=(D&&D.text?D.text:``).trim(),k=!1,A=D&&D.font?D.font:{},j=A.family,M=A.size,N=A.color,P=A.weight,F=A.style,I=A.variant,L=A.textcase,R=A.lineposition,z=A.shadow,B=!!f.subtitlePropName,V=f.subtitlePlaceholder,H=(v.title||{}).subtitle||{text:``,font:{}},U=(H.text||``).trim(),W=!1,G=1,K=H.font,q=K.family,J=K.size,Y=K.color,X=K.weight,ee=K.style,Z=K.variant,te=K.textcase,ne=K.lineposition,re=K.shadow,ie;y===`title.text`?ie=`titleText`:y.indexOf(`axis`)===-1?y.indexOf(`colorbar`)!==-1&&(ie=`colorbarTitleText`):ie=`axisTitleText`;var ae=e._context.edits[ie];function oe(e,t){return e===void 0||t===void 0?!1:e.replace(m,` % `)===t.replace(m,` % `)}O===``?E=0:oe(O,b)&&(ae||(O=``),E=.2,k=!0),B&&(U===``?G=0:oe(U,V)&&(ae||(U=``),G=.2,W=!0)),f._meta?O=o.templateString(O,f._meta):_._meta&&(O=o.templateString(O,_._meta));var se=O||U||ae,ce;T||(T=o.ensureSingle(_._infolayer,`g`,`g-`+t),ce=_._hColorbarMoveTitle);var Q=T.selectAll(`text.`+t).data(se?[0]:[]);Q.enter().append(`text`),Q.text(O).attr(`class`,t),Q.exit().remove();var le=null,ue=t+`-subtitle`,de=U||ae;if(B&&(le=T.selectAll(`text.`+ue).data(de?[0]:[]),le.enter().append(`text`),le.text(U).attr(`class`,ue),le.exit().remove()),!se)return T;function fe(e,t){o.syncOrAsync([pe,me],{title:e,subtitle:t})}function pe(r){var a=r.title,d=r.subtitle,f;!w&&ce&&(w={}),w?(f=``,w.rotate&&(f+=`rotate(`+[w.rotate,C.x,C.y]+`)`),(w.offset||ce)&&(f+=s(0,(w.offset||0)-(ce||0)))):f=null,a.attr(`transform`,f);function p(e){if(e){var t=n.select(e.node().parentNode).select(`.`+ue);if(!t.empty()){var r=e.node().getBBox();if(r.height){var i=r.y+r.height+h*J;t.attr(`y`,i)}}}}if(a.style(`opacity`,E*l.opacity(N)).call(c.font,{color:l.rgb(N),size:n.round(M,2),family:j,weight:P,style:F,variant:I,textcase:L,shadow:z,lineposition:R}).attr(C).call(u.convertToTspans,e,p),d&&!d.empty()){var m=T.select(`.`+t+`-math-group`),_=a.node().getBBox(),v=m.node()?m.node().getBBox():void 0,y=v?v.y+v.height+h*J:_.y+_.height+g*J,b=o.extendFlat({},C,{y});d.attr(`transform`,f),d.style(`opacity`,G*l.opacity(Y)).call(c.font,{color:l.rgb(Y),size:n.round(J,2),family:q,weight:X,style:ee,variant:Z,textcase:te,shadow:re,lineposition:ne}).attr(b).call(u.convertToTspans,e)}return i.previousPromises(e)}function me(t){var i=t.title,a=n.select(i.node().parentNode);if(S&&S.selection&&S.side&&O){a.attr(`transform`,null);var l=p[S.side],u=S.side===`left`||S.side===`top`?-1:1,d=r(S.pad)?S.pad:2,f=c.bBox(a.node()),m={t:0,b:0,l:0,r:0},h=e._fullLayout._reservedMargin;for(var g in h)for(var y in h[g]){var b=h[g][y];m[y]=Math.max(m[y],b)}var x={left:m.l,top:m.t,right:_.width-m.r,bottom:_.height-m.b},C=S.maxShift||u*(x[S.side]-f[S.side]),w=0;if(C<0)w=C;else{var T=S.offsetLeft||0,E=S.offsetTop||0;f.left-=T,f.right-=T,f.top-=E,f.bottom-=E,S.selection.each(function(){var e=c.bBox(this);o.bBoxIntersect(f,e,d)&&(w=Math.max(w,u*(e[S.side]-f[l])+d))}),w=Math.min(C,w),v._titleScoot=Math.abs(w)}if(w>0||C<0){var D={left:[-w,0],right:[w,0],top:[0,-w],bottom:[0,w]}[S.side];a.attr(`transform`,s(D[0],D[1]))}}}Q.call(fe,le);function he(e,t){e.text(t).on(`mouseover.opacity`,function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style(`opacity`,1)}).on(`mouseout.opacity`,function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style(`opacity`,0)})}if(ae&&(O?Q.on(`.opacity`,null):(he(Q,b),k=!0),Q.call(u.makeEditable,{gd:e}).on(`edit`,function(t){x===void 0?a.call(`_guiRelayout`,e,y,t):a.call(`_guiRestyle`,e,y,t,x)}).on(`cancel`,function(){this.text(this.attr(`data-unformatted`)).call(fe)}).on(`input`,function(e){this.text(e||` `).call(u.positionText,C.x,C.y)}),B)){if(B&&!O){var ge=Q.node().getBBox(),_e=ge.y+ge.height+g*J;le.attr(`y`,_e)}U?le.on(`.opacity`,null):(he(le,V),W=!0),le.call(u.makeEditable,{gd:e}).on(`edit`,function(t){a.call(`_guiRelayout`,e,`title.subtitle.text`,t)}).on(`cancel`,function(){this.text(this.attr(`data-unformatted`)).call(fe)}).on(`input`,function(e){this.text(e||` `).call(u.positionText,le.attr(`x`),le.attr(`y`))})}return Q.classed(`js-placeholder`,k),le&&!le.empty()&&le.classed(`js-placeholder`,W),T}t.exports={draw:v,SUBTITLE_PADDING_EM:g,SUBTITLE_PADDING_MATHJAX_EM:h}}),qt=l((e,t)=>{var n=f(),r=m().utcFormat,i=$(),a=i.numberFormat,o=_(),s=i.cleanNumber,c=i.ms2DateTime,l=i.dateTime2ms,u=i.ensureNumber,d=i.isArrayOrTypedArray,p=v(),h=p.FP_SAFE,g=p.BADNUM,y=p.LOG_CLIP,b=p.ONEWEEK,x=p.ONEDAY,S=p.ONEHOUR,C=p.ONEMIN,w=p.ONESEC,T=dt(),E=ut(),D=E.HOUR_PATTERN,O=E.WEEKDAY_PATTERN;function k(e){return 10**e}function A(e){return e!=null}t.exports=function(e,t){t||={};var f=e._id||`x`,p=f.charAt(0);function m(t,n){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&n&&e.range&&e.range.length===2){var r=e.range[0],i=e.range[1];return .5*(r+i-2*y*Math.abs(r-i))}return g}function _(t,n,r,a){if((a||{}).msUTC&&o(t))return+t;var s=l(t,r||e.calendar);if(s===g){if(o(t)){t=+t;var c=Math.floor(i.mod(t+.05,1)*10),u=Math.round(t-c/10);s=l(new Date(u))+c/10}else return g}return s}function v(t,n,r){return c(t,n,r||e.calendar)}function j(t){return e._categories[Math.round(t)]}function M(t){if(A(t)){if(e._categoriesMap===void 0&&(e._categoriesMap={}),e._categoriesMap[t]!==void 0)return e._categoriesMap[t];e._categories.push(typeof t==`number`?String(t):t);var n=e._categories.length-1;return e._categoriesMap[t]=n,n}return g}function N(e,t){for(var n=Array(t),r=0;re.range[1]&&(r=!r);for(var i=r?-1:1,a=i*t,s=0,c=0;cu)s=c+1;else{s=a<(l+u)/2?c:c+1;break}}var d=e._B[s]||0;return isFinite(d)?L(t,e._m2,d):0},B=function(t){var n=e._rangebreaks.length;if(!n)return R(t,e._m,e._b);for(var r=0,i=0;ie._rangebreaks[i].pmax&&(r=i+1);return R(t,e._m2,e._B[r])}}e.c2l=e.type===`log`?m:u,e.l2c=e.type===`log`?k:u,e.l2p=z,e.p2l=B,e.c2p=e.type===`log`?function(e,t){return z(m(e,t))}:z,e.p2c=e.type===`log`?function(e){return k(B(e))}:B,[`linear`,`-`].indexOf(e.type)===-1?e.type===`log`?(e.d2r=e.d2l=function(e,t){return m(s(e),t)},e.r2d=e.r2c=function(e){return k(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=u,e.c2r=m,e.l2d=k,e.d2p=function(t,n){return e.l2p(e.d2r(t,n))},e.p2d=function(e){return k(B(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=B,e.cleanPos=u):e.type===`date`?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=_,e.c2d=e.c2r=e.l2d=e.l2r=v,e.d2p=e.r2p=function(t,n,r){return e.l2p(_(t,0,r))},e.p2d=e.p2r=function(e,t,n){return v(B(e),t,n)},e.cleanPos=function(t){return i.cleanDate(t,g,e.calendar)}):e.type===`category`?(e.d2c=e.d2l=M,e.r2d=e.c2d=e.l2d=j,e.d2r=e.d2l_noadd=F,e.r2c=function(t){var n=I(t);return n===void 0?e.fraction2r(.5):n},e.l2r=e.c2r=u,e.r2l=I,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return j(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return typeof e==`string`&&e!==``?e:u(e)}):e.type===`multicategory`&&(e.r2d=e.c2d=e.l2d=j,e.d2r=e.d2l_noadd=F,e.r2c=function(t){var n=F(t);return n===void 0?e.fraction2r(.5):n},e.r2c_just_indices=P,e.l2r=e.c2r=u,e.r2l=F,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return j(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return Array.isArray(e)||typeof e==`string`&&e!==``?e:u(e)},e.setupMultiCategory=function(n){var r=e._traceIndices,a,o,s=e._matchGroup;if(s&&e._categories.length===0){for(var c in s)if(c!==f){var l=t[T.id2name(c)];r=r.concat(l._traceIndices)}}var u=[[0,{}],[0,{}]],m=[];for(a=0;ac[1]&&(a[+!s]=r,o[1]=c[1]),o[0]>=o[1]){if(n!==void 0){var l=c[0]+1;r!==void 0&&(l=Math.min(l,c[1])),a[+!s]=e.l2r(l)}else r!==void 0&&(a[+!!s]=e.l2r(c[1]-1))}}},e.cleanRange=function(t,n){e._cleanRange(t,n),e.limitRange(t)},e._cleanRange=function(t,n){n||={},t||=`range`;var r=i.nestedProperty(e,t).get(),a,s=e.type===`date`?i.dfltRange(e.calendar):p===`y`?E.DFLTRANGEY:e._name===`realaxis`?[0,1]:n.dfltRange||E.DFLTRANGEX;if(s=s.slice(),(e.rangemode===`tozero`||e.rangemode===`nonnegative`)&&(s[0]=0),!r||r.length!==2){i.nestedProperty(e,t).set(s);return}var c=r[0]===null,l=r[1]===null;for(e.type===`date`&&!e.autorange&&(r[0]=i.cleanDate(r[0],g,e.calendar),r[1]=i.cleanDate(r[1],g,e.calendar)),a=0;a<2;a++)if(e.type===`date`){if(!i.isDateTime(r[a],e.calendar)){e[t]=s;break}if(e.r2l(r[0])===e.r2l(r[1])){var u=i.constrain(e.r2l(r[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);r[0]=e.l2r(u-1e3),r[1]=e.l2r(u+1e3);break}}else{if(!o(r[a])){if(!(c||l)&&o(r[1-a]))r[a]=r[1-a]*(a?10:.1);else{e[t]=s;break}}if(r[a]<-h?r[a]=-h:r[a]>h&&(r[a]=h),r[0]===r[1]){var d=Math.max(1,Math.abs(r[0]*1e-6));r[0]-=d,r[1]+=d}}},e.setScale=function(n){var r=t._size;e.overlaying&&(e.domain=T.getFromId({_fullLayout:t},e.overlaying).domain);var i=n&&e._r?`_r`:`range`,a=e.calendar;e.cleanRange(i);var o=e.r2l(e[i][0],a),s=e.r2l(e[i][1],a),c=p===`y`;if(c?(e._offset=r.t+(1-e.domain[1])*r.h,e._length=r.h*(e.domain[1]-e.domain[0]),e._m=e._length/(o-s),e._b=-e._m*s):(e._offset=r.l+e.domain[0]*r.w,e._length=r.w*(e.domain[1]-e.domain[0]),e._m=e._length/(s-o),e._b=-e._m*o),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks){var l,u;if(e._rangebreaks=e.locateBreaks(Math.min(o,s),Math.max(o,s)),e._rangebreaks.length){for(l=0;ls&&(d=!d),d&&e._rangebreaks.reverse();var f=d?-1:1;for(e._m2=f*e._length/(Math.abs(s-o)-e._lBreaks),e._B.push(-e._m2*(c?s:o)),l=0;lo&&(o+=7,co&&(o+=24,c=a&&c=a&&t=s.min&&(es.max&&(s.max=r),a=!1)}a&&l.push({min:e,max:r})}};for(r=0;r{var n=_(),r=$(),i=v().BADNUM,a=r.isArrayOrTypedArray,o=r.isDateTime,s=r.cleanNumber,c=Math.round;t.exports=function(e,t,n){var r=e,i=n.noMultiCategory;if(a(r)&&!r.length)return`-`;if(!i&&m(r))return`multicategory`;if(i&&Array.isArray(r[0])){for(var o=[],s=0;ss*2}function f(e){return Math.max(1,(e-1)/1e3)}function p(e,t){for(var n=e.length,r=f(n),a=0,o=0,l={},u=0;ua*2}function m(e){return a(e[0])&&a(e[1])}}),Yt=l((e,t)=>{var n=f(),r=_(),i=$(),a=v().FP_SAFE,o=Ie(),s=Gt(),c=dt(),l=c.getFromId,u=c.isLinked;t.exports={applyAutorangeOptions:j,getAutoRange:d,makePadFn:m,doAutoRange:b,findExtremes:x,concatExtremes:y};function d(e,t){var n,r,a=[],o=e._fullLayout,s=m(o,t,0),c=m(o,t,1),l=y(e,t),u=l.min,d=l.max;if(u.length===0||d.length===0)return i.simpleMap(t.range,t.r2l);var f=u[0].val,h=d[0].val;for(n=1;n0&&(A=C-s(E)-c(D),A>w?M/A>T&&(O=E,k=D,T=M/A):M/C>T&&(O={val:E.val,nopad:1},k={val:D.val,nopad:1},T=M/C));function N(e,t){return Math.max(e,c(t))}if(f===h){var P=f-1,F=f+1;if(x){if(f===0)a=[0,1];else{var I=(f>0?d:u).reduce(N,0),L=f/(1-Math.min(.5,I/C));a=f>0?[0,L]:[L,0]}}else a=S?[Math.max(0,P),Math.max(1,F)]:[P,F]}else x?(O.val>=0&&(O={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):S&&(O.val-T*s(O)<0&&(O={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),T=(k.val-O.val-p(t,E.val,D.val))/(C-s(O)-c(k)),a=[O.val-T*s(O),k.val+T*c(k)];return a=j(a,t),t.limitRange&&t.limitRange(),_&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function p(e,t,n){var r=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,n),a=0;a0?n.ppadplus:n.ppadminus)||n.ppad||0),D=w((e._m>0?n.ppadminus:n.ppadplus)||n.ppad||0),O=w(n.vpadplus||n.vpad),k=w(n.vpadminus||n.vpad);if(!d){if(b=1/0,x=-1/0,u)for(p=0;p0&&(b=m),m>x&&m-a&&(b=m),m>x&&m=M;p--)j(p);return{min:i,max:o,opts:n}}function S(e,t,n,r){w(e,t,n,r,E)}function C(e,t,n,r){w(e,t,n,r,D)}function w(e,t,n,r,i){for(var a=r.tozero,o=r.extrapad,s=!0,c=0;c=n&&(l.extrapad||!o)){s=!1;break}i(t,l.val)&&l.pad<=n&&(o||!l.extrapad)&&(e.splice(c,1),c--)}if(s){var u=a&&t===0;e.push({val:t,pad:u?0:n,extrapad:!u&&o})}}function T(e){return r(e)&&Math.abs(e)=t}function O(e,t){var n=t.autorangeoptions;return n&&n.minallowed!==void 0&&A(t,n.minallowed,n.maxallowed)?n.minallowed:n&&n.clipmin!==void 0&&A(t,n.clipmin,n.clipmax)?Math.max(e,t.d2l(n.clipmin)):e}function k(e,t){var n=t.autorangeoptions;return n&&n.maxallowed!==void 0&&A(t,n.minallowed,n.maxallowed)?n.maxallowed:n&&n.clipmax!==void 0&&A(t,n.clipmin,n.clipmax)?Math.min(e,t.d2l(n.clipmax)):e}function A(e,t,n){return t!==void 0&&n!==void 0?(t=e.d2l(t),n=e.d2l(n),t=l&&(o=l,n=l),s<=l&&(s=l,r=l)}}return n=O(n,t),r=k(r,t),[n,r]}}),Xt=l((e,t)=>{var n=f(),r=_(),i=gt(),a=Ie(),o=$(),s=o.strTranslate,c=yt(),l=Kt(),u=L(),d=Gt(),p=St(),m=Dt();ut();var h=v(),g=h.ONEMAXYEAR,y=h.ONEAVGYEAR,b=h.ONEMINYEAR,x=h.ONEMAXQUARTER,S=h.ONEAVGQUARTER,C=h.ONEMINQUARTER,w=h.ONEMAXMONTH,T=h.ONEAVGMONTH,E=h.ONEMINMONTH,D=h.ONEWEEK,O=h.ONEDAY,k=O/2,A=h.ONEHOUR,j=h.ONEMIN,M=h.ONESEC,N=h.ONEMILLI,P=h.ONEMICROSEC,F=h.MINUS_SIGN,I=h.BADNUM,R={K:`zeroline`},z={K:`gridline`,L:`path`},B={K:`minor-gridline`,L:`path`},V={K:`tick`,L:`path`},H={K:`tick`,L:`text`},U={width:[`x`,`r`,`l`,`xl`,`xr`],height:[`y`,`t`,`b`,`yt`,`yb`],right:[`r`,`xr`],left:[`l`,`xl`],top:[`t`,`yt`],bottom:[`b`,`yb`]},W=vt(),G=W.MID_SHIFT,K=W.CAP_SHIFT,q=W.LINE_SPACING,J=W.OPPOSITE_SIDE,Y=3,X=t.exports={};X.setConvert=qt();var ee=Jt(),Z=dt(),te=Z.idSort,ne=Z.isLinked;X.id2name=Z.id2name,X.name2id=Z.name2id,X.cleanId=Z.cleanId,X.list=Z.list,X.listIds=Z.listIds,X.getFromId=Z.getFromId,X.getFromTrace=Z.getFromTrace;var re=Yt();X.getAutoRange=re.getAutoRange,X.findExtremes=re.findExtremes;var ie=1e-4;function ae(e){var t=(e[1]-e[0])*ie;return[e[0]-t,e[1]+t]}X.coerceRef=function(e,t,n,r,i,a){var s=r.charAt(r.length-1),c=n._fullLayout._subplots[s+`axis`],l=r+`ref`,u={};return i||=c[0]||(typeof a==`string`?a:a[0]),a||=i,c=c.concat(c.map(function(e){return e+` domain`})),u[l]={valType:`enumerated`,values:c.concat(a?typeof a==`string`?[a]:a:[]),dflt:i},o.coerce(e,t,u,l)},X.coerceRefArray=function(e,t,n,r,i,a,s){let c=r.charAt(r.length-1);var l=n._fullLayout._subplots[c+`axis`];let u=r+`ref`;var d=e[u];i||=l[0]||(typeof a==`string`?a:a[0]),l=l.concat(l.map(e=>e+` domain`)),l=l.concat(a||[]),d.length>s?(o.warn(`Array attribute `+u+` has more entries than expected, truncating to `+s),d=d.slice(0,s)):d.length2e-6||((n-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))},X.saveRangeInitial=function(e,t){for(var n=X.list(e,``,!0),r=!1,i=0;if*.3||u(i)||u(a))){var p=n.dtick/2;e+=e+ps){var c=Number(n.slice(1));a.exactYears>s&&c%12==0?e=X.tickIncrement(e,`M6`,`reverse`)+O*1.5:a.exactMonths>s?e=X.tickIncrement(e,`M1`,`reverse`)+O*15.5:e-=k;var l=X.tickIncrement(e,n);if(l<=r)return l}return e}X.prepMinorTicks=function(e,t,n){var i;if(!((i=t.minor)!=null&&i.dtick)){delete e.dtick;var a=t.dtick&&r(t._tmin),s;if(a){var c=X.tickIncrement(t._tmin,t.dtick,!0);s=[t._tmin,c*.99+t._tmin*.01]}else{var l=o.simpleMap(t.range,t.r2l);s=[l[0],.8*l[0]+.2*l[1]]}if(e.range=o.simpleMap(s,t.l2r),e._isMinor=!0,X.prepTicks(e,n),a){var u=r(t.dtick),d=r(e.dtick),f=u?t.dtick:+t.dtick.substring(1),p=d?e.dtick:+e.dtick.substring(1);u&&d?ue(f,p)?f===2*D&&p===2*O&&(e.dtick=D):e.dtick=f===2*D&&p===3*O?D:f===D&&!(t._input.minor||{}).nticks?O:de(f/p,2.5)?f/2:f:String(t.dtick).charAt(0)===`M`?d?e.dtick=`M1`:ue(f,p)?f>=12&&p===2&&(e.dtick=`M3`):e.dtick=t.dtick:String(e.dtick).charAt(0)===`L`?String(t.dtick).charAt(0)===`L`?ue(f,p)||(e.dtick=de(f/p,2.5)?t.dtick/2:t.dtick):e.dtick=`D1`:e.dtick===`D2`&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}t.minor?._tick0Init===void 0&&(e.tick0=t.tick0)};function ue(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function de(e,t){return Math.abs(e/t-1)<.001}X.prepTicks=function(e,t){var n=o.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode===`auto`||!e.dtick){var r=e.nticks,i;r||(e.type===`category`||e.type===`multicategory`?(i=e.tickfont?o.bigFont(e.tickfont.size||12):15,r=e._length/i):(i=e._id.charAt(0)===`y`?40:80,r=o.constrain(e._length/i,4,9)+1),e._name===`radialaxis`&&(r*=2)),e.minor&&e.minor.tickmode!==`array`||e.tickmode===`array`&&(r*=100),e._roughDTick=Math.abs(n[1]-n[0])/r,X.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(a=r-1,o=r):(a=r,o=r);var s=e[a].value,c=e[o].value,l=Math.abs(c-s),u=n||l,d=0;u>=b?d=l>=b&&l<=g?l:y:n===S&&u>=C?d=l>=C&&l<=x?l:S:u>=E?d=l>=E&&l<=w?l:T:n===D&&u>=D?d=D:u>=O?d=O:n===k&&u>=k?d=k:n===A&&u>=A&&(d=A);var f;d>=l&&(d=l,f=!0);var p=i+d;if(t.rangebreaks&&d>0){for(var m=84,h=0,_=0;_D&&(d=l)}(d>0||r===0)&&(e[r].periodX=i+d/2)}}X.calcTicks=function(e,t){for(var n=e.type,i=e.calendar,a=e.ticklabelstep,s=e.ticklabelmode===`period`,c=e.range[0]>e.range[1],l=!e.ticklabelindex||o.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],u=o.simpleMap(e.range,e.r2l,void 0,void 0,t),d=u[1]=+!x;S--){var C=!S;S?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):x&&(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var w=S?e:o.extendFlat({},e,x?e.minor:{minor:{}});if(C?X.prepMinorTicks(w,e,t):X.prepTicks(w,t),w.tickmode===`array`){S?(_=[],h=_e(e,!C)):(v=[],g=_e(e,!C));continue}if(w.tickmode===`sync`){_=[],h=ge(e);continue}var E=ae(u),D=E[0],O=E[1],k=r(w.dtick),A=n===`log`&&!(k||w.dtick.charAt(0)===`L`),j=X.tickFirst(w,t);if(S){if(e._tmin=j,j=O:N<=O;N=X.tickIncrement(N,L,d,i)){if(S&&P++,w.rangebreaks&&!d){if(N=p)break}if(_.length>m||N===M)break;M=N;var R={value:N};S?(A&&N!==(N|0)&&(R.simpleLabel=!0),a>1&&P%a&&(R.skipLabel=!0),_.push(R)):(R.minor=!0,v.push(R))}}if(!v||v.length<3?l=!1:Ct((v[2].value-v[1].value)*(c?-1:1),e.tickformat)||(l=!1,v=v.slice(1)),!l)y=_;else{var z=_.concat(v);s&&_.length&&(z=z.slice(1)),z=z.sort(function(e,t){return e.value-t.value}).filter(function(e,t,n){return t===0||e.value!==n[t-1].value}),z.map(function(e,t){return e.minor===void 0&&!e.skipLabel?t:null}).filter(function(e){return e!==null}).forEach(function(e){l.map(function(t){var n=e+t;n>=0&&n-1;q--){if(_[q].drop){_.splice(q,1);continue}_[q].value=mt(_[q].value,e);var Z=e.c2p(_[q].value);(J?ee>Z-Y:eep||rp&&(n.periodX=p),rr&&fy)t/=y,i=a(10),e.dtick=`M`+12*Te(t,i,ve);else if(s>T)t/=T,e.dtick=`M`+Te(t,1,ye);else if(s>O){if(e.dtick=Te(t,O,e._hasDayOfWeekBreaks?[1,2,7,14]:xe),!n){var c=X.getTickFormat(e),l=e.ticklabelmode===`period`;l&&(e._rawTick0=e.tick0),e.tick0=/%[uVW]/.test(c)?o.dateTick0(e.calendar,2):o.dateTick0(e.calendar,1),l&&(e._dowTick0=e.tick0)}}else s>A?e.dtick=Te(t,A,ye):s>j?e.dtick=Te(t,j,be):s>M?e.dtick=Te(t,M,be):(i=a(10),e.dtick=Te(t,i,ve))}else if(e.type===`log`){e.tick0=0;var u=o.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var d=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(10**u[1]-10**u[0])/d,i=a(10),e.dtick=`L`+Te(t,i,ve)}else e.dtick=t>.3?`D2`:`D1`}else e.type===`category`||e.type===`multicategory`?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):pt(e)?(e.tick0=0,i=1,e.dtick=Te(t,i,we)):(e.tick0=0,i=a(10),e.dtick=Te(t,i,ve));if(e.dtick===0&&(e.dtick=1),!r(e.dtick)&&typeof e.dtick!=`string`){var f=e.dtick;throw e.dtick=1,`ax.dtick error: `+String(f)}};function Ee(e){var t=e.dtick;if(e._tickexponent=0,!r(t)&&typeof t!=`string`&&(t=1),(e.type===`category`||e.type===`multicategory`)&&(e._tickround=null),e.type===`date`){var n=e.r2l(e.tick0),i=e.l2r(n).replace(/(^-|i)/g,``),a=i.length;if(String(t).charAt(0)===`M`)e._tickround=a>10||i.slice(5)!==`01-01`?`d`:t.slice(1)%12==0?`y`:`m`;else if(t>=O&&a<=10||t>=O*15)e._tickround=`d`;else if(t>=j&&a<=16||t>=A)e._tickround=`M`;else if(t>=M&&a<=19||t>=j)e._tickround=`S`;else{var o=e.l2r(n+t).replace(/^-/,``).length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(r(t)||t.charAt(0)===`L`){var s=e.range.map(e.r2d||Number);r(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var c=Math.max(Math.abs(s[0]),Math.abs(s[1])),l=Math.floor(Math.log(c)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(e._tickexponent=Re(e.exponentformat)&&e.exponentformat!==`SI extended`&&!ze(l)||Re(e.exponentformat)&&e.exponentformat===`SI extended`&&!Be(l)?3*Math.round((l-1)/3):l)}else e._tickround=null}X.tickIncrement=function(e,t,i,a){var s=i?-1:1;if(r(t))return o.increment(e,s*t);var c=t.charAt(0),l=s*Number(t.slice(1));if(c===`M`)return o.incrementMonth(e,l,a);if(c===`L`)return Math.log(10**e+l)/Math.LN10;if(c===`D`){var u=t===`D2`?Ce:Se,d=e+s*.01,f=o.roundUp(o.mod(d,1),u,i);return Math.floor(d)+Math.log(n.round(10**f,1))/Math.LN10}throw`unrecognized dtick `+String(t)},X.tickFirst=function(e,t){var i=e.r2l||Number,a=o.simpleMap(e.range,i,void 0,void 0,t),s=a[1]=0&&n<=e._length?t:null};if(a&&o.isArrayOrTypedArray(e.ticktext)){var f=o.simpleMap(e.range,e.r2l),p=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(u=0;u`+l;else{var d=ht(e),f=e._trueSide||e.side;(!d&&f===`top`||d&&f===`bottom`)&&(c+=`
`)}}t.text=c}function ke(e,t,n,i,a){var s=e.dtick,c=t.x,l=e.tickformat,u=typeof s==`string`&&s.charAt(0);if(a===`never`&&(a=``),i&&u!==`L`&&(s=`L3`,u=`L`),l||u===`L`)t.text=He(10**c,e,a,i);else if(r(s)||u===`D`&&(e.minorloglabels===`complete`||o.mod(c+.01,1)<.1)){e.minorloglabels===`complete`&&!(o.mod(c+.01,1)<.1)&&(t.fontSize*=.75);var d=(10**c).toExponential(0).split(`e`),f=+d[1],p=Math.abs(f),m=e.exponentformat;m===`power`||Re(m)&&m!==`SI extended`&&ze(f)||Re(m)&&m===`SI extended`&&Be(f)?(t.text=d[0],p>0&&(t.text+=`x10`),t.text===`1x10`&&(t.text=`10`),f!==0&&f!==1&&(t.text+=``+(f>0?``:F)+p+``),t.fontSize*=1.25):(m===`e`||m===`E`)&&p>2?t.text=d[0]+m+(f>0?`+`:F)+p:(t.text=He(10**c,e,``,`fakehover`),s===`D1`&&e._id.charAt(0)===`y`&&(t.dy-=t.fontSize/6))}else if(u===`D`)t.text=e.minorloglabels===`none`?``:String(Math.round(10**o.mod(c,1))),t.fontSize*=.75;else throw`unrecognized dtick `+String(s);if(e.dtick===`D1`){var h=String(t.text).charAt(0);(h===`0`||h===`1`)&&(e._id.charAt(0)===`y`?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(c<0?.5:.25)))}}function Ae(e,t){var n=e._categories[Math.round(t.x)];n===void 0&&(n=``),t.text=String(n)}function je(e,t,n){var r=Math.round(t.x),i=e._categories[r]||[],a=i[1]===void 0?``:String(i[1]),o=i[0]===void 0?``:String(i[0]);n?t.text=o+` - `+a:(t.text=a,t.text2=o)}function Me(e,t,n,r,i){i===`never`?i=``:e.showexponent===`all`&&Math.abs(t.x/e.dtick)<1e-6&&(i=`hide`),t.text=He(t.x,e,i,r)}function Ne(e,t,n,r,i){if(e.thetaunit===`radians`&&!n){var a=t.x/180;if(a===0)t.text=`0`;else{var s=Pe(a);if(s[1]>=100)t.text=He(o.deg2rad(t.x),e,i,r);else{var c=t.x<0;t.text=s[1]===1?s[0]===1?`π`:s[0]+`π`:[``,s[0],``,`⁄`,``,s[1],``,`π`].join(``),c&&(t.text=F+t.text)}}}else t.text=He(t.x,e,i,r)}function Pe(e){function t(e,t){return Math.abs(e-t)<=1e-6}function n(e,r){return t(r,0)?e:n(r,e%r)}function r(e){for(var n=1;!t(Math.round(e*n)/n,e);)n*=10;return n}var i=r(e),a=e*i,o=Math.abs(n(a,i));return[Math.round(a/o),Math.round(i/o)]}var Fe=[`f`,`p`,`n`,`μ`,`m`,``,`k`,`M`,`G`,`T`],Le=[`q`,`r`,`y`,`z`,`a`,...Fe,`P`,`E`,`Z`,`Y`,`R`,`Q`],Re=e=>[`SI`,`SI extended`,`B`].includes(e);function ze(e){return e>14||e<-15}function Be(e){return e>32||e<-30}function Ve(e,t){return Re(t)?!!(t===`SI extended`&&Be(e)||t!==`SI extended`&&ze(e)):!1}function He(e,t,n,i){var a=e<0,s=t._tickround,c=n||t.exponentformat||`B`,l=t._tickexponent,u=X.getTickFormat(t),d=t.separatethousands;if(i){var f={exponentformat:c,minexponent:t.minexponent,dtick:t.showexponent===`none`?t.dtick:r(e)&&Math.abs(e)||1,range:t.showexponent===`none`?t.range.map(t.r2d):[0,e||1]};Ee(f),s=(Number(f._tickround)||0)+4,l=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,F);var p=10**-s/2;if(c===`none`&&(l=0),e=Math.abs(e),e`+g+``:c===`B`&&l===9?e+=`B`:Re(c)&&(e+=c===`SI extended`?Le[l/3+10]:Fe[l/3+5])}return a?F+e:e}X.getTickFormat=function(e){var t;function n(e){return typeof e==`string`?Number(e.replace(`M`,``))*T:e}function r(e,t){var n=[`L`,`D`];if(typeof e==typeof t){if(typeof e==`number`)return e-t;var r=n.indexOf(e.charAt(0)),i=n.indexOf(t.charAt(0));return r===i?Number(e.replace(/(L|D)/g,``))-Number(t.replace(/(L|D)/g,``)):r-i}return typeof e==`number`?1:-1}function i(e,t,n){var r=n||function(e){return e},i=t[0],a=t[1];return(!i&&typeof i!=`number`||r(i)<=r(e))&&(!a&&typeof a!=`number`||r(a)>=r(e))}function a(e,t){var n=t[0]===null,i=t[1]===null,a=r(e,t[0])>=0,o=r(e,t[1])<=0;return(n||a)&&(i||o)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case`date`:case`linear`:for(t=0;t=0&&i.unshift(i.splice(r,1).shift())}});var s={false:{left:0,right:0}};return o.syncOrAsync(i.map(function(t){return function(){if(t){var r=X.getFromId(e,t);n||={},n.axShifts=s,n.overlayingShiftedAx=a;var i=X.drawOne(e,r,n);return r._shiftPusher&&bt(r,r._fullDepth||0,s,!0),r._r=r.range.slice(),r._rl=o.simpleMap(r._r,r.r2l),i}}}))},X.drawOne=function(e,t,n){n||={};var r=n.axShifts||{},s=n.overlayingShiftedAx||[],c,l,u;t.setScale();var d=e._fullLayout,f=t._id,p=f.charAt(0),m=X.counterLetter(f),h=d._plots[t._mainSubplot],g=t.zerolinelayer===`above traces`;if(!h)return;if(t._shiftPusher=t.autoshift||s.indexOf(t._id)!==-1||s.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor===`free`){var _=t.linewidth/2||0;t.ticks===`inside`&&(_+=t.ticklen),bt(t,_,r,!0),bt(t,t.shift||0,r,!1)}(n.skipTitle!==!0||t._shift===void 0)&&(t._shift=xt(t,r));var v=h[p+`axislayer`],y=t._mainLinePosition,b=y+=t._shift,x=t._mainMirrorPosition,S=t._vals=X.calcTicks(t),C=[t.mirror,b,x].join(`_`);for(c=0;c0?c.bottom-o:0,s))));var h=0,g=0;if(t._shiftPusher&&(h=Math.max(s,c.height>0?n===`l`?o-c.left:c.right-o:0),t.title.text!==d._dfltTitle[p]&&(g=(t._titleStandoff||0)+(t._titleScoot||0),n===`l`&&(g+=Qe(t))),t._fullDepth=Math.max(h,g)),t.automargin){l={x:0,y:0,r:0,l:0,t:0,b:0};var _=[0,1],v=typeof t._shift==`number`?t._shift:0;if(p===`x`){if(n===`b`?l[n]=t._depth:(l[n]=t._depth=Math.max(c.width>0?o-c.top:0,s),_.reverse()),c.width>0){var y=c.right-(t._offset+t._length);y>0&&(l.xr=1,l.r=y);var b=t._offset-c.left;b>0&&(l.xl=0,l.l=b)}}else if(n===`l`?(t._depth=Math.max(c.height>0?o-c.left:0,s),l[n]=t._depth-v):(t._depth=Math.max(c.height>0?c.right-o:0,s),l[n]=t._depth+v,_.reverse()),c.height>0){var x=c.bottom-(t._offset+t._length);x>0&&(l.yb=0,l.b=x);var S=t._offset-c.top;S>0&&(l.yt=1,l.t=S)}l[m]=t.anchor===`free`?t.position:t._anchorAxis.domain[_[0]],t.title.text!==d._dfltTitle[p]&&(l[n]+=Qe(t)+(t.title.standoff||0)),t.mirror&&t.anchor!==`free`&&(u={x:0,y:0,r:0,l:0,t:0,b:0},u[r]=t.linewidth,t.mirror&&t.mirror!==!0&&(u[r]+=s),t.mirror===!0||t.mirror===`ticks`?u[m]=t._anchorAxis.domain[_[1]]:(t.mirror===`all`||t.mirror===`allticks`)&&(u[m]=[t._counterDomainMin,t._counterDomainMax][_[1]]))}Q&&(f=a.getComponentMethod(`rangeslider`,`autoMarginOpts`)(e,t)),typeof t.automargin==`string`&&(Ue(l,t.automargin),Ue(u,t.automargin)),i.autoMargin(e,it(t),l),i.autoMargin(e,at(t),u),i.autoMargin(e,ot(t),f)}),o.syncOrAsync(se)}};function Ue(e,t){if(e){var n=Object.keys(U).reduce(function(e,n){return t.indexOf(n)!==-1&&U[n].forEach(function(t){e[t]=1}),e},{});Object.keys(e).forEach(function(t){n[t]||(t.length===1?e[t]=0:delete e[t])})}}function We(e,t){var n=[],r,i=function(e,t){var r=e.xbnd[t];r!==null&&n.push(o.extendFlat({},e,{x:r}))};if(t.length){for(r=0;re.range[1],c=e.ticklabelposition&&e.ticklabelposition.indexOf(`inside`)!==-1,l=!c;if(n&&(n*=o?-1:1),r){var u=e.side;r*=c&&(u===`top`||u===`left`)||l&&(u===`bottom`||u===`right`)?1:-1}return e._id.charAt(0)===`x`?function(t){return s(i+e._offset+e.l2p(Je(t))+n,a+r)}:function(t){return s(a+r,i+e._offset+e.l2p(Je(t))+n)}};function Je(e){return e.periodX===void 0?e.x:e.periodX}function Ye(e){var t=e.ticklabelposition||``,n=e.tickson||``,r=function(e){return t.indexOf(e)!==-1},i=r(`top`),a=r(`left`),o=r(`right`),s=r(`bottom`),c=r(`inside`),l=n!==`boundaries`&&(s||a||i||o);if(!l&&!c)return[0,0];var u=e.side,d=l?(e.tickwidth||0)/2:0,f=Y,p=e.tickfont?e.tickfont.size:12;return(s||i)&&(d+=p*K,f+=(e.linewidth||0)/2),(a||o)&&(d+=(e.linewidth||0)/2,f+=Y),c&&u===`top`&&(f-=p*(1-K)),(a||i)&&(d=-d),(u===`bottom`||u===`right`)&&(f=-f),[l?d:0,c?f:0]}X.makeTickPath=function(e,t,n,r){r||={};var i=r.minor;if(i&&!e.minor)return``;var a=r.len===void 0?i?e.minor.ticklen:e.ticklen:r.len,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o===`x`?`M0,`+(t+s*n)+`v`+a*n:`M`+(t+s*n)+`,0h`+a*n},X.makeLabelFns=function(e,t,n){var i=e.ticklabelposition||``,a=e.tickson||``,s=function(e){return i.indexOf(e)!==-1},c=s(`top`),l=s(`left`),u=s(`right`),d=s(`bottom`),f=a!==`boundaries`&&(d||l||c||u),p=s(`inside`),m=i===`inside`&&e.ticks===`inside`||!p&&e.ticks===`outside`&&a!==`boundaries`,h=0,g=0,_=m?e.ticklen:0;if(p?_*=-1:f&&(_=0),m&&(h+=_,n)){var v=o.deg2rad(n);h=_*Math.cos(v)+1,g=_*Math.sin(v)}e.showticklabels&&(m||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(p?-1:1);var y={labelStandoff:h,labelShift:g},b,x,S,C,w=0,T=e.side,E=e._id.charAt(0),D=e.tickangle,O;if(E===`x`)O=!p&&T===`bottom`||p&&T===`top`,C=O?1:-1,p&&(C*=-1),b=g*C,x=t+h*C,S=O?1:-.2,Math.abs(D)===90&&(p?S+=G:S=D===-90&&T===`bottom`?K:D===90&&T===`top`?G:.5,w=G/2*(D/90)),y.xFn=function(e){return e.dx+b+w*e.fontSize},y.yFn=function(e){return e.dy+x+e.fontSize*S},y.anchorFn=function(e,t){if(f){if(l)return`end`;if(u)return`start`}return!r(t)||t===0||t===180?`middle`:t*C<0===p?`start`:`end`},y.heightFn=function(t,n,r){return n<-60||n>60?-.5*r:e.side===`top`===p?0:-r};else if(E===`y`){if(O=!p&&T===`left`||p&&T===`right`,C=O?1:-1,p&&(C*=-1),b=h,x=g*C,S=0,!p&&Math.abs(D)===90&&(S=D===-90&&T===`left`||D===90&&T===`right`?K:.5),p){var k=r(D)?+D:0;if(k!==0){var A=o.deg2rad(k);w=Math.abs(Math.sin(A))*K*C,S=0}}y.xFn=function(e){return e.dx+t-(b+e.fontSize*S)*C+w*e.fontSize},y.yFn=function(e){return e.dy+x+e.fontSize*G},y.anchorFn=function(e,t){return r(t)&&Math.abs(t)===90?`middle`:O?`end`:`start`},y.heightFn=function(t,n,r){return e.side===`right`&&(n*=-1),n<-30?-r:n<30?-.5*r:0}}return y};function Xe(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join(`_`)}X.drawTicks=function(e,t,r){r||={};var i=t._id+`tick`,a=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(e){return e.minor&&!e.noTick}):[],t.ticks?r.vals.filter(function(e){return!e.minor&&!e.noTick}):[]),o=r.layer.selectAll(`path.`+i).data(a,Xe);o.exit().remove(),o.enter().append(`path`).classed(i,1).classed(`ticks`,1).classed(`crisp`,r.crisp!==!1).each(function(e){return u.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)}).style(`stroke-width`,function(n){return d.crispRound(e,n.minor?t.minor.tickwidth:t.tickwidth,1)+`px`}).attr(`d`,r.path).style(`display`,null),_t(t,[V]),o.attr(`transform`,r.transFn)},X.drawGrid=function(e,t,r){if(r||={},t.tickmode!==`sync`){var i=t._id+`grid`,a=t.minor&&t.minor.showgrid,o=a?r.vals.filter(function(e){return e.minor}):[],s=t.showgrid?r.vals.filter(function(e){return!e.minor}):[],c=r.counterAxis;if(c&&X.shouldShowZeroLine(e,t,c))for(var l=t.tickmode===`array`,f=0;f=0;_--){var v=_?h:g;if(v){var y=v.selectAll(`path.`+i).data(_?s:o,Xe);y.exit().remove(),y.enter().append(`path`).classed(i,1).classed(`crisp`,r.crisp!==!1),y.attr(`transform`,r.transFn).attr(`d`,r.path).each(function(e){return u.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||`#ddd`)}).style(`stroke-dasharray`,function(e){return d.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)}).style(`stroke-width`,function(e){return(e.minor?m:t._gw)+`px`}).style(`display`,null),typeof r.path==`function`&&y.attr(`d`,r.path)}}_t(t,[z,B])}},X.drawZeroLine=function(e,t,n){n||=n;var r=t._id+`zl`,i=X.shouldShowZeroLine(e,t,n.counterAxis),a=n.layer.selectAll(`path.`+r).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append(`path`).classed(r,1).classed(`zl`,1).classed(`crisp`,n.crisp!==!1).each(function(){n.layer.selectAll(`path`).sort(function(e,t){return te(e.id,t.id)})}),a.attr(`transform`,n.transFn).attr(`d`,n.path).call(u.stroke,t.zerolinecolor||u.defaultLine).style(`stroke-width`,d.crispRound(e,t.zerolinewidth,t._gw||1)+`px`).style(`display`,null),_t(t,[R])},X.drawLabels=function(e,t,i){i||={};var a=e._fullLayout,l=t._id,u=t.zerolinelayer===`above traces`,f=i.cls||l+`tick`,p=i.vals.filter(function(e){return e.text}),m=i.labelFns,h=i.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[f],_=i.layer.selectAll(`g.`+f).data(t.showticklabels?p:[],Xe),v=[];_.enter().append(`g`).classed(f,1).append(`text`).attr(`text-anchor`,`middle`).each(function(t){var r=n.select(this),i=e._promises.length;r.call(c.positionText,m.xFn(t),m.yFn(t)).call(d.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(c.convertToTspans,e),e._promises[i]?v.push(e._promises.pop().then(function(){y(r,h)})):y(r,h)}),_t(t,[H]),_.exit().remove(),i.repositionOnUpdate&&_.each(function(e){n.select(this).select(`text`).call(c.positionText,m.xFn(e),m.yFn(e))});function y(e,a){e.each(function(e){var o=n.select(this),l=o.select(`.text-math-group`),u=m.anchorFn(e,a),f=i.transFn.call(o.node(),e)+(r(a)&&+a!=0?` rotate(`+a+`,`+m.xFn(e)+`,`+(m.yFn(e)-e.fontSize/2)+`)`:``),p=c.lineCount(o),h=q*e.fontSize,g=m.heightFn(e,r(a)?+a:0,(p-1)*h);if(g&&(f+=s(0,g)),l.empty()){var _=o.select(`text`);_.attr({transform:f,"text-anchor":u}),_.style(`display`,null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var v=d.bBox(l.node()).width*{end:-.5,start:.5}[u];l.attr(`transform`,f+s(v,0))}})}t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&r!==`allow`){var i=r.indexOf(`hide`)!==-1,s=t._id.charAt(0)===`x`,c=0,l=s?e._fullLayout.width:e._fullLayout.height;if(r.indexOf(`domain`)!==-1){var u=o.simpleMap(t.range,t.r2l);c=t.l2p(u[0])+t._offset,l=t.l2p(u[1])+t._offset}var f=Math.min(c,l),p=Math.max(c,l),m=t.side,h=1/0,g=-1/0;for(var v in _.each(function(e){var r=n.select(this);if(r.select(`.text-math-group`).empty()){var a=d.bBox(r.node()),o=0;s?(a.right>p||a.leftp||a.top+(t.tickangle?0:e.fontSize/4)t[`_visibleLabelMin_`+r._id]?c.style(`display`,`none`):e.K===`tick`&&!i&&c.node().style.display!==`none`&&c.style(`display`,null)})})})})},y(_,g+1?g:h);function b(){return v.length&&Promise.all(v)}var x=null;function S(){if(y(_,h),p.length&&t.autotickangles&&(t.type!==`log`||String(t.dtick).charAt(0)!==`D`)){x=t.autotickangles[0];var e=0,n=[],r,a=1;_.each(function(r){e=Math.max(e,r.fontSize);var i=t.l2p(r.x),o=rt(this),s=d.bBox(o.node());a=Math.max(a,c.lineCount(o)),n.push({top:0,bottom:10,height:10,left:i-s.width/2,right:i+s.width/2+2,width:s.width+2})});var s=(t.tickson===`boundaries`||t.showdividers)&&!i.secondary,l=p.length,u=Math.abs((p[l-1].x-p[0].x)*t._m)/(l-1),f=s?u/2:u,m=s?t.ticklen:e*1.25*a,g=f/Math.sqrt(f**2+m**2),v=t.autotickangles.map(function(e){return e*Math.PI/180}),b=v.find(function(e){return Math.abs(Math.cos(e))<=g});b===void 0&&(b=v.reduce(function(e,t){return Math.abs(Math.cos(e))U*L&&(P=L,j[A]=M[A]=F[A])}var W=Math.abs(P-N);W-D>0?(W-=D,D*=1+D/W):D=0,t._id.charAt(0)!==`y`&&(D=-D),j[k]=T.p2r(T.r2p(M[k])+O*D),T.autorange===`min`||T.autorange===`max reversed`?(j[0]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0):(T.autorange===`max`||T.autorange===`min reversed`)&&(j[1]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[T._name+`.range`]=j}var G=o.syncOrAsync(C);return G&&G.then&&e._promises.push(G),G};function Ze(e,t,n){var r=t._id+`divider`,i=n.vals,a=n.layer.selectAll(`path.`+r).data(i,Xe);a.exit().remove(),a.enter().insert(`path`,`:first-child`).classed(r,1).classed(`crisp`,1).call(u.stroke,t.dividercolor).style(`stroke-width`,d.crispRound(e,t.dividerwidth,1)+`px`),a.attr(`transform`,n.transFn).attr(`d`,n.path)}X.getPxPosition=function(e,t){var n=e._fullLayout._size,r=t._id.charAt(0),i=t.side,a;if(t.anchor===`free`?r===`x`?a={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:r===`y`&&(a={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}):a=t._anchorAxis,i===`top`||i===`left`)return a._offset;if(i===`bottom`||i===`right`)return a._offset+a._length};function Qe(e){var t=e.title.font.size,n=(e.title.text.match(c.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty(`standoff`)?t*(K+n*q):n?t*(n+1)*q:t}function $e(e,t){var n=e._fullLayout,r=t._id,i=r.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(c.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty(`standoff`))t.side===`bottom`||t.side===`right`?o=t._depth+t.title.standoff+a*K:(t.side===`top`||t.side===`left`)&&(o=t._depth+t.title.standoff+a*(G+s*q));else{var u=ht(t);if(t.type===`multicategory`)o=t._depth;else{var f=1.5*a;u&&(f=.5*a,t.ticks===`outside`&&(f+=t.ticklen)),o=10+f+(t.linewidth?t.linewidth-1:0)}u||(o+=i===`x`?t.side===`top`?a*+!!t.showticklabels:a*(t.showticklabels?1.5:.5):t.side===`right`?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var p=X.getPxPosition(e,t),m,h,g;i===`x`?(h=t._offset+t._length/2,g=t.side===`top`?p-o:p+o):(g=t._offset+t._length/2,h=t.side===`right`?p+o:p-o,m={rotate:`-90`,offset:0});var _;if(t.type!==`multicategory`){var v=t._selections[t._id+`tick`];if(_={selection:v,side:t.side},v&&v.node()&&v.node().parentNode){var y=d.getTranslate(v.node().parentNode);_.offsetLeft=y.x,_.offsetTop=y.y}t.title.hasOwnProperty(`standoff`)&&(_.pad=0)}return t._titleStandoff=o,l.draw(e,r+`title`,{propContainer:t,propName:t._name+`.title.text`,placeholder:n._dfltTitle[i],avoid:_,transform:m,attributes:{x:h,y:g,"text-anchor":`middle`}})}X.shouldShowZeroLine=function(e,t,n){var r=o.simpleMap(t.range,t.r2l);return r[0]*r[1]<=0&&t.zeroline&&(t.type===`linear`||t.type===`-`)&&!(t.rangebreaks&&t.maskBreaks(0)===I)&&(et(t,0)||!tt(e,t,n,r)||nt(e,t))},X.clipEnds=function(e,t){return t.filter(function(t){return et(e,t.x)})};function et(e,t){var n=e.l2p(t);return n>1&&n1)for(i=1;i=i.min&&e=P:/%L/.test(t)?e>=N:/%[SX]/.test(t)?e>=M:/%M/.test(t)?e>=j:/%[HI]/.test(t)?e>=A:/%p/.test(t)?e>=k:/%[Aadejuwx]/.test(t)?e>=O:/%[UVW]/.test(t)?e>=D:/%[Bbm]/.test(t)?e>=E:/%[q]/.test(t)?e>=C:!/%[Yy]/.test(t)||e>=b}}),Zt=l((e,t)=>{t.exports=function(e,t,n){var r,i;if(n){var a=t===`reversed`||t===`min reversed`||t===`max reversed`;r=n[+!!a],i=n[+!a]}var o=e(`autorangeoptions.minallowed`,i===null?r:void 0),s=e(`autorangeoptions.maxallowed`,r===null?i:void 0);o===void 0&&e(`autorangeoptions.clipmin`),s===void 0&&e(`autorangeoptions.clipmax`),e(`autorangeoptions.include`)}}),Qt=l((e,t)=>{var n=Zt();t.exports=function(e,t,r,i){var a=t._template||{},o=t.type||a.type||`-`;r(`minallowed`),r(`maxallowed`);var s=r(`range`);if(!s){var c;!i.noInsiderange&&o!==`log`&&(c=r(`insiderange`),c&&(c[0]===null||c[1]===null)&&(t.insiderange=!1,c=void 0),c&&(s=r(`range`,c)))}var l=t.getAutorangeDflt(s,i),u=r(`autorange`,l),d;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(u===`reversed`||u===!0)||s[0]!==null&&(u===`min`||u===`max reversed`)||s[1]!==null&&(u===`max`||u===`min reversed`))&&(s=void 0,delete t.range,t.autorange=!0,d=!0),d||(l=t.getAutorangeDflt(s,i),u=r(`autorange`,l)),u&&(n(r,u,s),(o===`linear`||o===`-`)&&r(`rangemode`)),t.cleanRange()}}),$t=l((e,t)=>{var n={left:0,top:0};t.exports=r;function r(e,t,n){t=t||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var r=e.clientX||0,a=e.clientY||0,o=i(t);return n[0]=r-o.left,n[1]=a-o.top,n}function i(e){return e===window||e===document||e===document.body?n:e.getBoundingClientRect()}}),en=l((e,t)=>{var n=nt();function r(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener(`test`,null,t),window.removeEventListener(`test`,null,t)}catch{e=!1}return e}t.exports=n&&r()}),tn=l((e,t)=>{t.exports=function(e,t,n,r,i){var a=(e-n)/(r-n),o=a+t/(r-n),s=(a+o)/2;return i===`left`||i===`bottom`?a:i===`center`||i===`middle`?s:i===`right`||i===`top`?o:a<2/3-s?a:o>4/3-s?o:s}}),nn=l((e,t)=>{var n=$(),r=[[`sw-resize`,`s-resize`,`se-resize`],[`w-resize`,`move`,`e-resize`],[`nw-resize`,`n-resize`,`ne-resize`]];t.exports=function(e,t,i,a){return e=i===`left`?0:i===`center`?1:i===`right`?2:n.constrain(Math.floor(e*3),0,2),t=a===`bottom`?0:a===`middle`?1:a===`top`?2:n.constrain(Math.floor(t*3),0,2),r[t][e]}}),rn=l((e,t)=>{var n=at(),r=Ge(),i=we().getGraphDiv,a=j(),o=t.exports={};o.wrapped=function(e,t,n){e=i(e),e._fullLayout&&r.clear(e._fullLayout._uid+a.HOVERID),o.raw(e,t,n)},o.raw=function(e,t){var r=e._fullLayout,i=e._hoverdata;t||={},(!t.target||e._dragged||n.triggerHandler(e,`plotly_beforehover`,t)!==!1)&&(r._hoverlayer.selectAll(`g`).remove(),r._hoverlayer.selectAll(`line`).remove(),r._hoverlayer.selectAll(`circle`).remove(),e._hoverdata=void 0,t.target&&i&&e.emit(`plotly_unhover`,{event:t,points:i}))}}),an=l((e,t)=>{var n=$t(),r=rt(),i=en(),a=$().removeElement,o=ut(),s=t.exports={};s.align=tn(),s.getCursor=nn();var c=rn();s.unhover=c.wrapped,s.unhoverRaw=c.raw,s.init=function(e){var t=e.gd,n=1,c=t._context.doubleClickDelay,d=e.element,f,p,m,h,g,_,v,y;t._mouseDownTime||=0,d.style.pointerEvents=`all`,d.onmousedown=S,i?(d._ontouchstart&&d.removeEventListener(`touchstart`,d._ontouchstart),d._ontouchstart=S,d.addEventListener(`touchstart`,S,{passive:!1})):d.ontouchstart=S;function b(e,t,n){return Math.abs(e)c&&(n=Math.max(n-1,1)),t._dragged)e.doneFn&&e.doneFn();else{var o;_.target===v?o=_:(o={target:v,srcElement:v,toElement:v},Object.keys(_).concat(Object.keys(_.__proto__)).forEach(e=>{var t=_[e];!o[e]&&typeof t!=`function`&&(o[e]=t)})),e.clickFn&&e.clickFn(n,o),y||v.dispatchEvent(new MouseEvent(`click`,i))}t._dragging=!1,t._dragged=!1}};function l(){var e=document.createElement(`div`);e.className=`dragcover`;var t=e.style;return t.position=`fixed`,t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background=`none`,document.body.appendChild(e),e}s.coverSlip=l;function u(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}}),on=l((e,t)=>{t.exports=function(e,t){(e.attr(`class`)||``).split(` `).forEach(function(t){t.indexOf(`cursor-`)===0&&e.classed(t,!1)}),t&&e.classed(`cursor-`+t,!0)}}),sn=l((e,t)=>{var n=on(),r=`data-savedcursor`,i=`!!`;t.exports=function(e,t){var a=e.attr(r);if(t){if(!a){for(var o=(e.attr(`class`)||``).split(` `),s=0;s{var n=A();t.exports={_isSubplotObj:!0,visible:{valType:`boolean`,dflt:!0,editType:`legend`},bgcolor:{valType:`color`,editType:`legend`},bordercolor:{valType:`color`,dflt:I().defaultLine,editType:`legend`},maxheight:{valType:`number`,min:0,editType:`legend`},borderwidth:{valType:`number`,min:0,dflt:0,editType:`legend`},font:n({editType:`legend`}),grouptitlefont:n({editType:`legend`}),orientation:{valType:`enumerated`,values:[`v`,`h`],dflt:`v`,editType:`legend`},traceorder:{valType:`flaglist`,flags:[`reversed`,`grouped`],extras:[`normal`],editType:`legend`},tracegroupgap:{valType:`number`,min:0,dflt:10,editType:`legend`},entrywidth:{valType:`number`,min:0,editType:`legend`},entrywidthmode:{valType:`enumerated`,values:[`fraction`,`pixels`],dflt:`pixels`,editType:`legend`},indentation:{valType:`number`,min:-15,dflt:0,editType:`legend`},itemsizing:{valType:`enumerated`,values:[`trace`,`constant`],dflt:`trace`,editType:`legend`},itemwidth:{valType:`number`,min:30,dflt:30,editType:`legend`},itemclick:{valType:`enumerated`,values:[`toggle`,`toggleothers`,!1],dflt:`toggle`,editType:`legend`},itemdoubleclick:{valType:`enumerated`,values:[`toggle`,`toggleothers`,!1],dflt:`toggleothers`,editType:`legend`},groupclick:{valType:`enumerated`,values:[`toggleitem`,`togglegroup`],dflt:`togglegroup`,editType:`legend`},titleclick:{valType:`enumerated`,values:[`toggle`,`toggleothers`,!1],editType:`legend`},titledoubleclick:{valType:`enumerated`,values:[`toggle`,`toggleothers`,!1],editType:`legend`},x:{valType:`number`,editType:`legend`},xref:{valType:`enumerated`,dflt:`paper`,values:[`container`,`paper`],editType:`layoutstyle`},xanchor:{valType:`enumerated`,values:[`auto`,`left`,`center`,`right`],dflt:`left`,editType:`legend`},y:{valType:`number`,editType:`legend`},yref:{valType:`enumerated`,dflt:`paper`,values:[`container`,`paper`],editType:`layoutstyle`},yanchor:{valType:`enumerated`,values:[`auto`,`top`,`middle`,`bottom`],editType:`legend`},uirevision:{valType:`any`,editType:`none`},valign:{valType:`enumerated`,values:[`top`,`middle`,`bottom`],dflt:`middle`,editType:`legend`},title:{text:{valType:`string`,dflt:``,editType:`legend`},font:n({editType:`legend`}),side:{valType:`enumerated`,values:[`top`,`left`,`top left`,`top center`,`top right`],editType:`legend`},editType:`legend`},editType:`legend`}}),ln=l(e=>{e.isGrouped=function(e){return(e.traceorder||``).indexOf(`grouped`)!==-1},e.isVertical=function(e){return e.orientation!==`h`},e.isReversed=function(e){return(e.traceorder||``).indexOf(`reversed`)!==-1},e.getId=function(e){return e._id||`legend`}}),un=l((e,t)=>{var n=Ie(),r=$(),i=lt(),a=P(),o=cn(),s=Pe(),c=ln();function l(e,t,l,u,d){var f=t[e]||{},p=i.newContainer(l,e);function m(e,t){return r.coerce(f,p,o,e,t)}var h=r.coerceFont(m,`font`,l.font);if(m(`bgcolor`,l.paper_bgcolor),m(`bordercolor`),!m(`visible`))return;var g,_=function(e,t){var n=g._input,i=g;return r.coerce(n,i,a,e,t)},v=l.font||{},y=r.coerceFont(m,`grouptitlefont`,v,{overrideDflt:{size:Math.round(v.size*1.1)}}),b=0,x=!1,S=`normal`,C=(l.shapes||[]).filter(function(e){return e.showlegend});function w(e){return n.traceIs(e,`pie-like`)&&e._length!=null&&(Array.isArray(e.legend)||Array.isArray(e.showlegend))}u.filter(w).forEach(function(t){t.visible&&b++;for(var n=0;nt.legend.length)for(var r=t.legend.length;r+(e===`legend`));if(O===!1&&(l[e]=void 0),(O!==!1||f.uirevision)&&(m(`uirevision`,l.uirevision),O!==!1)){m(`borderwidth`);var k=m(`orientation`),A=m(`yref`),j=m(`xref`),M=k===`h`,N=A===`paper`,P=j===`paper`,F,I,L,R=`left`;if(M?(F=0,n.getComponentMethod(`rangeslider`,`isVisible`)(t.xaxis)?N?(I=1.1,L=`bottom`):(I=1,L=`top`):N?(I=-.1,L=`top`):(I=0,L=`bottom`)):(I=1,L=`auto`,P?F=1.02:(F=1,R=`right`)),r.coerce(f,p,{x:{valType:`number`,editType:`legend`,min:P?-2:0,max:P?3:1,dflt:F}},`x`),r.coerce(f,p,{y:{valType:`number`,editType:`legend`,min:N?-2:0,max:N?3:1,dflt:I}},`y`),m(`traceorder`,S),c.isGrouped(l[e])&&m(`tracegroupgap`),m(`entrywidth`),m(`entrywidthmode`),m(`indentation`),m(`itemsizing`),m(`itemwidth`),m(`itemclick`),m(`itemdoubleclick`),m(`groupclick`),m(`xanchor`,R),m(`yanchor`,L),m(`maxheight`),m(`valign`),r.noneOrAll(f,p,[`x`,`y`]),m(`title.text`)){m(`title.side`,M?`left`:`top`);var z=r.extendFlat({},h,{size:r.bigFont(h.size)});r.coerceFont(m,`title.font`,z);let e=d>1;m(`titleclick`,e?`toggle`:!1),m(`titledoubleclick`,e?`toggleothers`:!1)}}}t.exports=function(e,t,n){var i,a=n.slice(),o=t.shapes;if(o)for(i=0;i{var t=Ie(),n=$(),r=n.pushUnique,i=ln(),a=!0;e.handleItemClick=function(e,i,o,s){var c=i._fullLayout;if(i._dragged||i._editing)return;var l=e.data()[0][0];if(l.groupTitle&&l.noClick)return;var u=o.groupclick;s===`toggle`&&o.itemdoubleclick===`toggleothers`&&a&&i.data&&i._context.showTips&&(n.notifier(n._(i,`Double-click on legend to isolate one trace`),`long`,i),a=!1);var d=u===`togglegroup`,f=c.hiddenlabels?c.hiddenlabels.slice():[],p=i._fullData;let m=(c.shapes||[]).filter(e=>e.showlegend||e.legendgroup);var h=p.concat(m),g=l.trace;g._isShape&&(g=g._fullInput);var _=g.legendgroup,v,y,b,x,S,C,w={},T=[],E=[],D=[];function O(e,t){var n=T.indexOf(e),r=w.visible;return r||=w.visible=[],T.indexOf(e)===-1&&(T.push(e),n=T.length-1),r[n]=t,n}var k=(c.shapes||[]).map(function(e){return e._input}),A=!1;function j(e,t){k[e].visible=t,A=!0}function M(e,t){if(!l.groupTitle||d){var n=e._fullInput||e,r=n._isShape,i=n.index;i===void 0&&(i=n._index);var a=n.visible!==!1&&t;r?j(i,a):O(i,a)}}var N=g.legend,P=g._fullInput;if(!(P&&P._isShape)&&t.traceIs(g,`pie-like`)){var F=l.label,I=f.indexOf(F);if(s===`toggle`)I===-1?f.push(F):f.splice(I,1);else if(s===`toggleothers`){var L=I!==-1,R=[];for(v=0;ve.showlegend||e.legendgroup),l=o.concat(c);function u(e){return(e.legend||`legend`)===s}var d,f;if(r===`toggle`)d=!l.some(function(e){return u(e)&&e.visible===!0}),f=!1;else{let e=l.some(function(e){return!u(e)&&e.visible===!0&&e.showlegend!==!1});d=!0,f=!e}let p={visible:[]},m=[],h=(a.shapes||[]).map(function(e){return e._input});for(var g=!1,_=0;_{t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:`#808BA4`,scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}),pn=l((e,t)=>{var{isArrayOrTypedArray:n}=x(),r=Ie(),i=ln();t.exports=function(e,t,a){var o=t._inHover,s=i.isGrouped(t),c=i.isReversed(t),l={},u=[],d=!1,f={},p=0,m=0,h,g;function _(e,n,r){if(t.visible!==!1&&!(a&&e!==t._id)){if(n===``||!i.isGrouped(t)){var o=`~~i`+p;u.push(o),l[o]=[r],p++}else u.indexOf(n)===-1?(u.push(n),d=!0,l[n]=[r]):l[n].push(r)}}for(h=0;hj&&(k=j)}D[h][0]._groupMinRank=k,D[h][0]._preGroupSort=h}var M=function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort},N=function(e,t){return(n(e.trace.legendrank)?e.trace.legendrank[e.i]:e.trace.legendrank)-(n(t.trace.legendrank)?t.trace.legendrank[t.i]:t.trace.legendrank)||e._preSort-t._preSort};for(D.forEach(function(e,t){e[0]._preGroupSort=t}),D.sort(M),h=0;h{var t=$();function n(e){return e.indexOf(`e`)===-1?e.indexOf(`.`)===-1?e:e.replace(/[.]?0+$/,``):e.replace(/[.]?0+e/,`e`)}e.formatPiePercent=function(e,r){var i=n((e*100).toPrecision(3));return t.numSeparate(i,r)+`%`},e.formatPieValue=function(e,r){var i=n(e.toPrecision(10));return t.numSeparate(i,r)},e.getFirstFilled=function(e,n){if(t.isArrayOrTypedArray(e))for(var r=0;r{var n=Gt(),r=L();t.exports=function(e,t,i,a){var o=i.marker.pattern;o&&o.shape?n.pointStyle(e,i,a,t):r.fill(e,t.color)}}),gn=l((e,t)=>{var n=L(),r=mn().castOption,i=hn();t.exports=function(e,t,a,o){var s=a.marker.line,c=r(s.color,t.pts)||n.defaultLine,l=r(s.width,t.pts)||0;e.call(i,t,a,o).style(`stroke-width`,l).call(n.stroke,c)}}),_n=l((e,t)=>{var n=f(),r=Ie(),i=$(),a=i.strTranslate,o=Gt(),s=L(),c=bt().extractOpts,l=Bt(),u=gn(),d=mn().castOption,p=fn(),m=12,h=5,g=2,_=10,v=5;t.exports=function(e,t,f){var S=t._fullLayout;f||=S.legend;var C=f.itemsizing===`constant`,w=f.itemwidth,T=a((w+p.itemGap*2)/2,0),E=function(e,t,n,r){var i;if(e+1)i=e;else if(t&&t.width>0)i=t.width;else return 0;return C?r:Math.min(i,n)};e.each(function(e){var t=n.select(this),r=i.ensureSingle(t,`g`,`layers`);r.style(`opacity`,e[0].trace.opacity);var o=f.indentation,s=f.valign,c=e[0].lineHeight,l=e[0].height;if(s===`middle`&&o===0||!c||!l)r.attr(`transform`,null);else{var u={top:1,bottom:-1}[s]*(.5*(c-l+3))||0,d=f.indentation;r.attr(`transform`,a(d,u))}r.selectAll(`g.legendfill`).data([e]).enter().append(`g`).classed(`legendfill`,!0),r.selectAll(`g.legendlines`).data([e]).enter().append(`g`).classed(`legendlines`,!0);var p=r.selectAll(`g.legendsymbols`).data([e]);p.enter().append(`g`).classed(`legendsymbols`,!0),p.selectAll(`g.legendpoints`).data([e]).enter().append(`g`).classed(`legendpoints`,!0)}).each(z).each(k).each(j).each(A).each(N).each(L).each(I).each(D).each(O).each(P).each(F);function D(e){var r=b(e),a=r.showFill,s=r.showLine,u=r.showGradientLine,d=r.showGradientFill,f=r.anyFill,p=r.anyLine,m=e[0],g=m.trace,v,x,S=c(g),C=S.colorscale,T=S.reversescale,D=function(e){if(e.size()){if(a)o.fillGroupStyle(e,t,!0);else{var n=`legendfill-`+g.uid;o.gradient(e,t,n,y(T),C,`fill`)}}},O=function(e){if(e.size()){var n=`legendline-`+g.uid;o.lineGroupStyle(e),o.gradient(e,t,n,y(T),C,`stroke`)}},k=l.hasMarkers(g)||!f?`M5,0`:p?`M5,-2`:`M5,-3`,A=n.select(this),j=A.select(`.legendfill`).selectAll(`path`).data(a||d?[e]:[]);if(j.enter().append(`path`).classed(`js-fill`,!0),j.exit().remove(),j.attr(`d`,k+`h`+w+`v6h-`+w+`z`).call(D),s||u){var M=E(void 0,g.line,_,h);x=i.minExtend(g,{line:{width:M}}),v=[i.minExtend(m,{trace:x})]}var N=A.select(`.legendlines`).selectAll(`path`).data(s||u?[v]:[]);N.enter().append(`path`).classed(`js-line`,!0),N.exit().remove(),N.attr(`d`,k+(u?`l`+w+`,0.0001`:`h`+w)).call(s?o.lineGroupStyle:O)}function O(e){var r=b(e),a=r.anyFill,s=r.anyLine,c=r.showLine,u=r.showMarker,d=e[0],f=d.trace,p=!u&&!s&&!a&&l.hasText(f),_,v;function y(e,t,n,r){var a=i.nestedProperty(f,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(C&&o&&r!==void 0&&(o=r),n){if(on[1])return n[1]}return o}function x(e){return d._distinct&&d.index&&e[d.index]?e[d.index]:e[0]}if(u||p||c){var S={},w={};if(u){S.mc=y(`marker.color`,x),S.mx=y(`marker.symbol`,x),S.mo=y(`marker.opacity`,i.mean,[.2,1]),S.mlc=y(`marker.line.color`,x),S.mlw=y(`marker.line.width`,i.mean,[0,5],g),S.mld=f._isShape?`solid`:y(`marker.line.dash`,x),w.marker={sizeref:1,sizemin:1,sizemode:`diameter`};var E=y(`marker.size`,i.mean,[2,16],m);S.ms=E,w.marker.size=E}c&&(w.line={width:y(`line.width`,x,[0,10],h)}),p&&(S.tx=`Aa`,S.tp=y(`textposition`,x),S.ts=10,S.tc=y(`textfont.color`,x),S.tf=y(`textfont.family`,x),S.tw=y(`textfont.weight`,x),S.ty=y(`textfont.style`,x),S.tv=y(`textfont.variant`,x),S.tC=y(`textfont.textcase`,x),S.tE=y(`textfont.lineposition`,x),S.tS=y(`textfont.shadow`,x)),_=[i.minExtend(d,S)],v=i.minExtend(f,w),v.selectedpoints=null,v.texttemplate=null}var D=n.select(this).select(`g.legendpoints`),O=D.selectAll(`path.scatterpts`).data(u?_:[]);O.enter().insert(`path`,`:first-child`).classed(`scatterpts`,!0).attr(`transform`,T),O.exit().remove(),O.call(o.pointStyle,v,t),u&&(_[0].mrc=3);var k=D.selectAll(`g.pointtext`).data(p?_:[]);k.enter().append(`g`).classed(`pointtext`,!0).append(`text`).attr(`transform`,T),k.exit().remove(),k.selectAll(`text`).call(o.textPointStyle,v,t)}function k(e){var t=e[0].trace,r=t.type===`waterfall`;if(e[0]._distinct&&r){var i=e[0].trace[e[0].dir].marker;return e[0].mc=i.color,e[0].mlw=i.line.width,e[0].mlc=i.line.color,M(e,this,`waterfall`)}var a=[];t.visible&&r&&(a=e[0].hasTotals?[[`increasing`,`M-6,-6V6H0Z`],[`totals`,`M6,6H0L-6,-6H-0Z`],[`decreasing`,`M6,6V-6H0Z`]]:[[`increasing`,`M-6,-6V6H6Z`],[`decreasing`,`M6,6V-6H-6Z`]]);var o=n.select(this).select(`g.legendpoints`).selectAll(`path.legendwaterfall`).data(a);o.enter().append(`path`).classed(`legendwaterfall`,!0).attr(`transform`,T).style(`stroke-miterlimit`,1),o.exit().remove(),o.each(function(e){var r=n.select(this),i=t[e[0]].marker,a=E(void 0,i.line,v,g);r.attr(`d`,e[1]).style(`stroke-width`,a+`px`).call(s.fill,i.color),a&&r.call(s.stroke,i.line.color)})}function A(e){M(e,this)}function j(e){M(e,this,`funnel`)}function M(e,i,a){var l=e[0].trace,u=l.marker||{},d=u.line||{},p=u.cornerradius?`M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z`:`M6,6H-6V-6H6Z`,m=a?l.visible&&l.type===a:r.traceIs(l,`bar`),h=n.select(i).select(`g.legendpoints`).selectAll(`path.legend`+a).data(m?[e]:[]);h.enter().append(`path`).classed(`legend`+a,!0).attr(`d`,p).attr(`transform`,T),h.exit().remove(),h.each(function(e){var r=n.select(this),i=e[0],a=E(i.mlw,u.line,v,g);r.style(`stroke-width`,a+`px`);var p=i.mcc;if(!f._inHover&&`mc`in i){var m=c(u),h=m.mid;h===void 0&&(h=(m.max+m.min)/2),p=o.tryColorscale(u,``)(h)}var _=p||i.mc||u.color,y=u.pattern,b=o.getPatternAttr,S=y&&(b(y.shape,0,``)||b(y.path,0,``));if(S){var C=b(y.bgcolor,0,null),w=b(y.fgcolor,0,null),T=y.fgopacity,D=x(y.size,8,10),O=x(y.solidity,.5,1),k=`legend-`+l.uid;r.call(o.pattern,`legend`,t,k,S,D,O,p,y.fillmode,C,w,T)}else r.call(s.fill,_);a&&s.stroke(r,i.mlc||d.color)})}function N(e){var a=e[0].trace,c=n.select(this).select(`g.legendpoints`).selectAll(`path.legendbox`).data(a.visible&&r.traceIs(a,`box-violin`)?[e]:[]);c.enter().append(`path`).classed(`legendbox`,!0).attr(`d`,`M6,6H-6V-6H6Z`).attr(`transform`,T),c.exit().remove(),c.each(function(){var e=n.select(this);if((a.boxpoints===`all`||a.points===`all`)&&s.opacity(a.fillcolor)===0&&s.opacity((a.line||{}).color)===0){var r=i.minExtend(a,{marker:{size:C?m:i.constrain(a.marker.size,2,16),sizeref:1,sizemin:1,sizemode:`diameter`}});c.call(o.pointStyle,r,t)}else{var l=E(void 0,a.line,v,g);e.style(`stroke-width`,l+`px`).call(s.fill,a.fillcolor),l&&s.stroke(e,a.line.color)}})}function P(e){var t=e[0].trace,r=n.select(this).select(`g.legendpoints`).selectAll(`path.legendcandle`).data(t.visible&&t.type===`candlestick`?[e,e]:[]);r.enter().append(`path`).classed(`legendcandle`,!0).attr(`d`,function(e,t){return t?`M-15,0H-8M-8,6V-6H8Z`:`M15,0H8M8,-6V6H-8Z`}).attr(`transform`,T).style(`stroke-miterlimit`,1),r.exit().remove(),r.each(function(e,r){var i=n.select(this),a=t[r?`increasing`:`decreasing`],o=E(void 0,a.line,v,g);i.style(`stroke-width`,o+`px`).call(s.fill,a.fillcolor),o&&s.stroke(i,a.line.color)})}function F(e){var t=e[0].trace,r=n.select(this).select(`g.legendpoints`).selectAll(`path.legendohlc`).data(t.visible&&t.type===`ohlc`?[e,e]:[]);r.enter().append(`path`).classed(`legendohlc`,!0).attr(`d`,function(e,t){return t?`M-15,0H0M-8,-6V0`:`M15,0H0M8,6V0`}).attr(`transform`,T).style(`stroke-miterlimit`,1),r.exit().remove(),r.each(function(e,r){var i=n.select(this),a=t[r?`increasing`:`decreasing`],c=E(void 0,a.line,v,g);i.style(`fill`,`none`).call(o.dashLine,a.line.dash,c),c&&s.stroke(i,a.line.color)})}function I(e){R(e,this,`pie`)}function L(e){R(e,this,`funnelarea`)}function R(e,a,o){var s=e[0],c=s.trace,l=o?c.visible&&c.type===o:r.traceIs(c,o),f=n.select(a).select(`g.legendpoints`).selectAll(`path.legend`+o).data(l?[e]:[]);if(f.enter().append(`path`).classed(`legend`+o,!0).attr(`d`,`M6,6H-6V-6H6Z`).attr(`transform`,T),f.exit().remove(),f.size()){var p=c.marker||{},m=E(d(p.line.width,s.pts),p.line,v,g),h=`pieLike`,_=i.minExtend(c,{marker:{line:{width:m}}},h);u(f,i.minExtend(s,{trace:_},h),_,t)}}function z(e){var r=e[0].trace,a,l=[];if(r.visible)switch(r.type){case`histogram2d`:case`heatmap`:l=[[`M-15,-2V4H15V-2Z`]],a=!0;break;case`choropleth`:case`choroplethmapbox`:case`choroplethmap`:l=[[`M-6,-6V6H6V-6Z`]],a=!0;break;case`densitymapbox`:case`densitymap`:l=[[`M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0`]],a=`radial`;break;case`cone`:l=[[`M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z`],[`M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z`],[`M-6,-2 A2,2 0 0,0 -6,2 L6,0Z`]],a=!1;break;case`streamtube`:l=[[`M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z`],[`M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z`],[`M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z`]],a=!1;break;case`surface`:l=[[`M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z`],[`M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z`]],a=!0;break;case`mesh3d`:l=[[`M-6,6H0L-6,-6Z`],[`M6,6H0L6,-6Z`],[`M-6,-6H6L0,6Z`]],a=!1;break;case`volume`:l=[[`M-6,6H0L-6,-6Z`],[`M6,6H0L6,-6Z`],[`M-6,-6H6L0,6Z`]],a=!0;break;case`isosurface`:l=[[`M-6,6H0L-6,-6Z`],[`M6,6H0L6,-6Z`],[`M-6,-6 A12,24 0 0,0 6,-6 L0,6Z`]],a=!1}var u=n.select(this).select(`g.legendpoints`).selectAll(`path.legend3dandfriends`).data(l);u.enter().append(`path`).classed(`legend3dandfriends`,!0).attr(`transform`,T).style(`stroke-miterlimit`,1),u.exit().remove(),u.each(function(e,l){var u=n.select(this),d=c(r),f=d.colorscale,p=d.reversescale,m=function(e){if(e.size()){var n=`legendfill-`+r.uid;o.gradient(e,t,n,y(p,a===`radial`),f,`fill`)}},h;if(f){if(!a){var g=f.length;h=l===0?f[p?g-1:0][1]:l===1?f[p?0:g-1][1]:f[Math.floor((g-1)/2)][1]}}else{var _=r.vertexcolor||r.facecolor||r.color;h=i.isArrayOrTypedArray(_)?_[l]||_[0]:_}u.attr(`d`,e[0]),h?u.call(s.fill,h):u.call(m)})}};function y(e,t){return(t?`radial`:`horizontal`)+(e?``:`reversed`)}function b(e){var t=e[0].trace,n=t.contours,r=l.hasLines(t),i=l.hasMarkers(t),a=t.visible&&t.fill&&t.fill!==`none`,o=!1,s=!1;if(n){var c=n.coloring;c===`lines`?o=!0:r=c===`none`||c===`heatmap`||n.showlines,n.type===`constraint`?a=n._operation!==`=`:(c===`fill`||c===`heatmap`)&&(s=!0)}return{showMarker:i,showLine:r,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:r||o,anyFill:a||s}}function x(e,t,n){return e&&i.isArrayOrTypedArray(e)?t:e>n?n:e}}),vn=l((e,t)=>{var n=f(),r=$(),i=gt(),a=Ie(),o=at(),s=an(),c=Gt(),l=L(),u=yt(),d=dn().handleItemClick,p=dn().handleTitleClick,m=fn(),h=vt(),g=h.LINE_SPACING,_=h.FROM_TL,v=h.FROM_BR,y=pn(),b=_n(),x=ln(),S=1,C=/^legend[0-9]*$/;t.exports=function(e,t){if(t)T(e,t);else{var r=e._fullLayout,i=r._legends;r._infolayer.selectAll(`[class^="legend"]`).each(function(){var e=n.select(this),t=e.attr(`class`).split(` `)[0];t.match(C)&&i.indexOf(t)===-1&&e.remove()});for(var a=0;a1)}var k=u.hiddenlabels||[];if(!h&&(!u.showlegend||!g.length))return p.selectAll(`.`+d).remove(),u._topdefs.select(`#`+f).remove(),i.autoMargin(e,d);var N=r.ensureSingle(p,`g`,d,function(e){h||e.attr(`pointer-events`,`all`)}),P=r.ensureSingleById(u._topdefs,`clipPath`,f,function(e){e.append(`rect`)}),L=r.ensureSingle(N,`rect`,`bg`,function(e){e.attr(`shape-rendering`,`crispEdges`)});L.call(l.stroke,o.bordercolor).call(l.fill,o.bgcolor).style(`stroke-width`,o.borderwidth+`px`);var B=r.ensureSingle(N,`g`,`scrollbox`),V=o.title;o._titleWidth=0,o._titleHeight=0;var H;V.text?(H=r.ensureSingle(B,`text`,d+`titletext`),H.attr(`text-anchor`,`start`).call(c.font,V.font).text(V.text),M(H,B,e,o,S),!h&&(o.titleclick||o.titledoubleclick)&&j(B,e,o,d)):(B.selectAll(`.`+d+`titletext`).remove(),B.selectAll(`.`+d+`titletoggle`).remove());var U=r.ensureSingle(N,`rect`,`scrollbar`,function(e){e.attr(m.scrollBarEnterAttrs).call(l.fill,m.scrollBarColor)}),W=B.selectAll(`g.groups`).data(g);W.enter().append(`g`).attr(`class`,`groups`),W.exit().remove();var G=W.selectAll(`g.traces`).data(r.identity);G.enter().append(`g`).attr(`class`,`traces`),G.exit().remove(),G.style(`opacity`,function(t){let n=t[0],r=n.trace;if(n.groupTitle){let t=r.legendgroup,n=(u.shapes||[]).filter(function(e){return e.showlegend});return e._fullData.concat(n).some(function(e){return e.legendgroup===t&&(e.legend||`legend`)===d&&e.visible===!0})?1:.5}return a.traceIs(r,`pie-like`)?k.indexOf(t[0].label)===-1?1:.5:r.visible===`legendonly`?.5:1}).each(function(){n.select(this).call(O,e,o)}).call(b,e,o).each(function(t){h||t[0].groupTitle&&o.groupclick===`toggleitem`||n.select(this).call(A,e,d)}),r.syncOrAsync([i.previousPromises,function(){return F(e,W,G,o,B)},function(){var t=u._size,i=o.borderwidth,l=o.xref===`paper`,g=o.yref===`paper`;if(V.text){let t=(u.shapes||[]).filter(function(e){return e.showlegend}),n=e._fullData.concat(t).some(function(e){let t=e.legend||`legend`;return(Array.isArray(t)?t.includes(d):t===d)&&e.visible===!0});H.style(`opacity`,n?1:.5)}if(!h){var v=l?t.l+t.w*o.x-_[R(o)]*o._width:u.width*o.x-_[R(o)]*o._width,y=g?t.t+t.h*(1-o.y)-_[z(o)]*o._effHeight:u.height*(1-o.y)-_[z(o)]*o._effHeight;if(I(e,d,v,y))return;if(u.margin.autoexpand){var b=v,x=y;v=l?r.constrain(v,0,u.width-o._width):b,y=g?r.constrain(y,0,u.height-o._effHeight):x,v!==b&&r.log(`Constrain `+d+`.x to make legend fit inside graph`),y!==x&&r.log(`Constrain `+d+`.y to make legend fit inside graph`)}c.setTranslate(N,v,y)}if(U.on(`.drag`,null),N.on(`wheel`,null),h||o._height<=o._maxHeight||e._context.staticPlot){var S=o._effHeight;h&&(S=o._height),L.attr({width:o._width-i,height:S-i,x:i/2,y:i/2}),c.setTranslate(B,0,0),P.select(`rect`).attr({width:o._width-2*i,height:S-2*i,x:i,y:i}),c.setClipUrl(B,f,e),c.setRect(U,0,0,0,0),delete o._scrollY}else{var C=Math.max(m.scrollBarMinHeight,o._effHeight*o._effHeight/o._height),w=o._effHeight-C-2*m.scrollBarMargin,T=o._height-o._effHeight,E=w/T,O=Math.min(o._scrollY||0,T);L.attr({width:o._width-2*i+m.scrollBarWidth+m.scrollBarMargin,height:o._effHeight-i,x:i/2,y:i/2}),P.select(`rect`).attr({width:o._width-2*i+m.scrollBarWidth+m.scrollBarMargin,height:o._effHeight-2*i,x:i,y:i+O}),c.setClipUrl(B,f,e),K(O,C,E),N.on(`wheel`,function(){O=r.constrain(o._scrollY+n.event.deltaY/T*w,0,T),K(O,C,E),O!==0&&O!==T&&n.event.preventDefault()});var k,A,j,M=function(e,t,n){var i=(n-t)/E+e;return r.constrain(i,0,T)},F=function(e,t,n){var i=(t-n)/E+e;return r.constrain(i,0,T)},W=n.behavior.drag().on(`dragstart`,function(){var e=n.event.sourceEvent;k=e.type===`touchstart`?e.changedTouches[0].clientY:e.clientY,j=O}).on(`drag`,function(){var e=n.event.sourceEvent;e.buttons===2||e.ctrlKey||(A=e.type===`touchmove`?e.changedTouches[0].clientY:e.clientY,O=M(j,k,A),K(O,C,E))});U.call(W);var G=n.behavior.drag().on(`dragstart`,function(){var e=n.event.sourceEvent;e.type===`touchstart`&&(k=e.changedTouches[0].clientY,j=O)}).on(`drag`,function(){var e=n.event.sourceEvent;e.type===`touchmove`&&(A=e.changedTouches[0].clientY,O=F(j,k,A),K(O,C,E))});B.call(G)}function K(t,n,r){o._scrollY=e._fullLayout[d]._scrollY=t,c.setTranslate(B,0,-t),c.setRect(U,o._width,m.scrollBarMargin+t*r,m.scrollBarWidth,n),P.select(`rect`).attr(`y`,i+t)}if(e._context.edits.legendPosition){var q,J,Y,X;N.classed(`cursor-move`,!0),s.init({element:N.node(),gd:e,prepFn:function(e){if(e.target!==U.node()){var t=c.getTranslate(N);Y=t.x,X=t.y}},moveFn:function(e,n){if(Y!==void 0&&X!==void 0){var r=Y+e,i=X+n;c.setTranslate(N,r,i),q=s.align(r,o._width,t.l,t.l+t.w,o.xanchor),J=s.align(i+o._height,-o._height,t.t+t.h,t.t,o.yanchor)}},doneFn:function(){if(q!==void 0&&J!==void 0){var t={};t[d+`.x`]=q,t[d+`.y`]=J,a.call(`_guiRelayout`,e,t)}},clickFn:function(t,n){var r=p.selectAll(`g.traces`).filter(function(){var e=this.getBoundingClientRect();return n.clientX>=e.left&&n.clientX<=e.right&&n.clientY>=e.top&&n.clientY<=e.bottom});r.size()>0&&D(e,o,r,t,n)}})}}],e)}}function E(e,t,n){var r=e[0],i=r.width,a=t.entrywidthmode,o=r.trace.legendwidth||t.entrywidth;return a===`fraction`?t._maxWidth*o:n+(o||i)}function D(e,t,n,r,i){var s=e._fullLayout,c=n.data()[0][0].trace,l=t.itemclick,u=t.itemdoubleclick,f={event:i,node:n.node(),curveNumber:c.index,expandedIndex:c.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:s};c._group&&(f.group=c._group),a.traceIs(c,`pie-like`)&&(f.label=n.datum()[0].label);var p=o.triggerHandler(e,`plotly_legendclick`,f);if(r===1){if(p===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&l&&d(n,e,t,l)},e._context.doubleClickDelay)}else r===2&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,o.triggerHandler(e,`plotly_legenddoubleclick`,f)!==!1&&p!==!1&&u&&d(n,e,t,u))}function O(e,t,n){var i=x.getId(n),o=e.data()[0][0],s=o.trace,l=a.traceIs(s,`pie-like`),d=!n._inHover&&t._context.edits.legendText&&!l,f=n._maxNameLength,p,h;o.groupTitle?(p=o.groupTitle.text,h=o.groupTitle.font):(h=n.font,n.entries?p=o.text:(p=l?o.label:s.name,s._meta&&(p=r.templateString(p,s._meta))));var g=r.ensureSingle(e,`text`,i+`text`);g.attr(`text-anchor`,`start`).call(c.font,h).text(d?k(p,f):p);var _=n.indentation+n.itemwidth+m.itemGap*2;u.positionText(g,_,0),d?g.call(u.makeEditable,{gd:t,text:p}).call(M,e,t,n).on(`edit`,function(r){this.text(k(r,f)).call(M,e,t,n);var i=o.trace._fullInput||{},c={};return c.name=r,i._isShape?a.call(`_guiRelayout`,t,`shapes[`+s.index+`].name`,c.name):a.call(`_guiRestyle`,t,c,s.index)}):M(g,e,t,n)}function k(e,t){var n=Math.max(4,t);if(e&&e.trim().length>=n/2)return e;e||=``;for(var r=n-e.length;r>0;r--)e+=` `;return e}function A(e,t,i){var a=t._context.doubleClickDelay,o,s=1,c=r.ensureSingle(e,`rect`,i+`toggle`,function(e){t._context.staticPlot||e.style(`cursor`,`pointer`).attr(`pointer-events`,`all`),e.call(l.fill,`rgba(0,0,0,0)`)});t._context.staticPlot||(c.on(`mousedown`,function(){o=new Date().getTime(),o-t._legendMouseDownTimea&&(s=Math.max(s-1,1)),D(t,r,e,s,n.event)}}))}function j(e,t,i,s){if(t._fullData.some(function(e){let t=e.legend||`legend`;return(Array.isArray(t)?t.includes(s):t===s)&&a.traceIs(e,`pie-like`)}))return;let c=t._context.doubleClickDelay;var u,d=1;let f=r.ensureSingle(e,`rect`,s+`titletoggle`,function(e){t._context.staticPlot||e.style(`cursor`,`pointer`).attr(`pointer-events`,`all`),e.call(l.fill,`rgba(0,0,0,0)`)});t._context.staticPlot||(f.on(`mousedown`,function(){u=new Date().getTime(),u-t._legendMouseDownTimec&&(d=Math.max(d-1,1));let e={event:n.event,legendId:s,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(d===1&&i.titleclick){if(o.triggerHandler(t,`plotly_legendtitleclick`,e)===!1)return;i._titleClickTimeout=setTimeout(function(){t._fullLayout&&p(t,i,i.titleclick)},c)}else d===2&&(i._titleClickTimeout&&clearTimeout(i._titleClickTimeout),t._legendMouseDownTime=0,o.triggerHandler(t,`plotly_legendtitledoubleclick`,e)!==!1&&i.titledoubleclick&&p(t,i,i.titledoubleclick))}))}function M(e,t,n,r,i){r._inHover&&e.attr(`data-notex`,!0),u.convertToTspans(e,n,function(){N(t,n,r,i)})}function N(e,t,n,r){var i=e.data()[0][0],a=i&&i.trace.showlegend;if(Array.isArray(a)&&(a=a[i.i]!==!1),!n._inHover&&i&&!a){e.remove();return}var o=e.select(`g[class*=math-group]`),s=o.node(),l=x.getId(n);n||=t._fullLayout[l];var d=n.borderwidth,f=(r===S?n.title.font:i.groupTitle?i.groupTitle.font:n.font).size*g,p,h;if(s){var _=c.bBox(s);p=_.height,h=_.width,r===S?c.setTranslate(o,d,d+p*.75):c.setTranslate(o,0,p*.25)}else{var v=`.`+l+(r===S?`title`:``)+`text`,y=e.select(v),b=u.lineCount(y),C=y.node();if(p=f*b,h=C?c.bBox(C).width:0,r===S)n.title.side===`left`&&(h+=m.itemGap*2),u.positionText(y,d+m.titlePad,d+f);else{var w=m.itemGap*2+n.indentation+n.itemwidth;i.groupTitle&&(w=m.itemGap,h-=n.indentation+n.itemwidth),u.positionText(y,w,-f*((b-1)/2-.3))}}r===S?(n._titleWidth=h,n._titleHeight=p):(i.lineHeight=f,i.height=Math.max(p,16)+3,i.width=h)}function P(e){var t=0,n=0,r=e.title.side;return r&&(r.indexOf(`left`)!==-1&&(t=e._titleWidth),r.indexOf(`top`)!==-1&&(n=e._titleHeight)),[t,n]}function F(e,t,r,i,a){var o=e._fullLayout,s=x.getId(i);i||=o[s];var l=o._size,u=x.isVertical(i),d=x.isGrouped(i),f=i.entrywidthmode===`fraction`,p=i.borderwidth,h=2*p,g=m.itemGap,_=i.indentation+i.itemwidth+g*2,v=2*(p+g),y=z(i),b=i.y<0||i.y===0&&y===`top`,S=i.y>1||i.y===1&&y===`bottom`,C=i.tracegroupgap,T={};let{orientation:D,yref:O}=i,{maxheight:k}=i,A=b||S||D!==`v`||O!==`paper`;k||=A?.5:1;let j=A?o.height:l.h;i._maxHeight=Math.max(k>1?k:k*j,30);var M=0;i._width=0,i._height=0;var N=P(i);if(u)r.each(function(e){var t=e[0].height;c.setTranslate(this,p+N[0],p+N[1]+i._height+t/2+g),i._height+=t,i._width=Math.max(i._width,e[0].width)}),M=_+i._width,i._width+=g+_+h,i._height+=v,d&&(t.each(function(e,t){c.setTranslate(this,0,t*i.tracegroupgap)}),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var F=R(i),I=i.x<0||i.x===0&&F===`right`,L=i.x>1||i.x===1&&F===`left`,B=S||b,V=o.width/2;i._maxWidth=Math.max(I?B&&F===`left`?l.l+l.w:V:L?B&&F===`right`?l.r+l.w:V:l.w,2*_);var H=0,U=0;r.each(function(e){var t=E(e,i,_);H=Math.max(H,t),U+=t}),M=null;var W=0;if(d){var G=0,K=0,q=0;t.each(function(){var e=0,t=0;n.select(this).selectAll(`g.traces`).each(function(n){var r=E(n,i,_),a=n[0].height;c.setTranslate(this,N[0],N[1]+p+g+a/2+t),t+=a,e=Math.max(e,r),T[n[0].trace.legendgroup]=e});var r=e+g;K>0&&r+p+K>i._maxWidth?(W=Math.max(W,K),K=0,q+=G+C,G=t):G=Math.max(G,t),c.setTranslate(this,K,q),K+=r}),i._width=Math.max(W,K)+p,i._height=q+G+v}else{var J=r.size(),Y=U+h+(J-1)*g=i._maxWidth&&(W=Math.max(W,te),ee=0,Z+=X,i._height+=X,X=0),c.setTranslate(this,N[0]+p+ee,N[1]+p+Z+t/2+g),te=ee+n+g,ee+=r,X=Math.max(X,t)}),Y?(i._width=ee+h,i._height=X+v):(i._width=Math.max(W,te)+h,i._height+=X+v)}}i._width=Math.ceil(Math.max(i._width+N[0],i._titleWidth+2*(p+m.titlePad))),i._height=Math.ceil(Math.max(i._height+N[1],i._titleHeight+2*(p+m.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var ne=e._context.edits,re=ne.legendText||ne.legendPosition;r.each(function(e){var t=n.select(this).select(`.`+s+`toggle`),r=e[0].height,a=e[0].trace.legendgroup,o=E(e,i,_);d&&a!==``&&(o=T[a]);var l=re?_:M||o;!u&&!f&&(l+=g/2),c.setRect(t,0,-r/2,l,r)});var ie=a.select(`.`+s+`titletext`);ie.node()&&w(ie,i,p);var ae=a.select(`.`+s+`titletoggle`);if(ae.size()&&ie.node()){var oe=ie.attr(`x`)||0,se=m.titlePad;c.setRect(ae,oe-se,p,i._titleWidth+2*se,i._titleHeight+2*se)}}function I(e,t,n,r){var a=e._fullLayout,o=a[t],s=R(o),c=z(o),l=o.xref===`paper`,u=o.yref===`paper`;e._fullLayout._reservedMargin[t]={};var d=o.y<.5?`b`:`t`,f=o.x<.5?`l`:`r`,p={r:a.width-n,l:n+o._width,b:a.height-r,t:r+o._effHeight};if(l&&u)return i.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*_[s],r:o._width*v[s],b:o._effHeight*v[c],t:o._effHeight*_[c]});l?e._fullLayout._reservedMargin[t][d]=p[d]:u||o.orientation===`v`?e._fullLayout._reservedMargin[t][f]=p[f]:e._fullLayout._reservedMargin[t][d]=p[d]}function R(e){return r.isRightAnchor(e)?`right`:r.isCenterAnchor(e)?`center`:`left`}function z(e){return r.isBottomAnchor(e)?`bottom`:r.isMiddleAnchor(e)?`middle`:`top`}}),yn=l(e=>{var t=f(),n=_(),r=O(),i=$(),a=i.pushUnique,o=i.strTranslate,s=i.strRotate,c=at(),l=yt(),u=sn(),d=Gt(),p=L(),m=an(),h=Xt(),g=ut().zindexSeparator,v=Ie(),y=Ht(),b=j(),x=un(),S=vn(),C=b.YANGLE,w=Math.PI*C/180,T=1/Math.sin(w),E=Math.cos(w),D=Math.sin(w),k=b.HOVERARROWSIZE,A=b.HOVERTEXTPAD,M={box:!0,ohlc:!0,violin:!0,candlestick:!0},N={scatter:!0,scattergl:!0,splom:!0};function P(e,t){return e.distance-t.distance}e.hover=function(e,t,n,r){e=i.getGraphDiv(e);var a=t.target;i.throttle(e._fullLayout._uid+b.HOVERID,b.HOVERMINTIME,function(){F(e,t,n,r,a)})},e.loneHover=function(e,n){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var i=n.gd,a=Z(i),o=te(i),s=e.map(function(e){var t=e._x0||e.x0||e.x||0,r=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,c=e._y1||e.y1||e.y||0,l=e.eventData;if(l){var u=Math.min(t,r),d=Math.max(t,r),f=Math.min(s,c),m=Math.max(s,c),h=e.trace;if(v.traceIs(h,`gl3d`)){var g=i._fullLayout[h.scene]._scene.container,_=g.offsetLeft,y=g.offsetTop;u+=_,d+=_,f+=y,m+=y}l.bbox={x0:u+o,x1:d+o,y0:f+a,y1:m+a},l.xPixel=(t+r)/2,l.yPixel=(s+c)/2,n.inOut_bbox&&n.inOut_bbox.push(l.bbox)}else l=!1;return{color:e.color||p.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:``},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:l}}),c=!1,l=z(s,{gd:i,hovermode:`closest`,rotateLabels:c,bgColor:n.bgColor||p.background,container:t.select(n.container),outerContainer:n.outerContainer||n.container}).hoverLabels,u=5,d=0,f=0;l.sort(function(e,t){return e.y0-t.y0}).each(function(e,t){var r=e.y0-e.by/2;e.offset=r-uB[0]._length||we<0||we>H[0]._length)return m.unhoverRaw(e,r)}if(r.pointerX=Ce+B[0]._offset,r.pointerY=we+H[0]._offset,se=`xval`in r?y.flat(d,r.xval):y.p2c(B,Ce),ce=`yval`in r?y.flat(d,r.yval):y.p2c(H,we),!n(se[0])||!n(ce[0]))return i.warn(`Fx.hover failed`,r,e),m.unhoverRaw(e,r)}_.clickanywhere&&(e._hoverXVals=se,e._hoverYVals=ce,e._hoverXAxes=B,e._hoverYAxes=H);var De=1/0;function Oe(t,a){for(le=0;leve&&(ae.splice(0,ve),De=ae[0].distance),C&&ie!==0&&ae.length===0){_e.distance=ie,_e.index=!1;var u=de._module.hoverPoints(_e,he,ge,`closest`,{hoverLayer:_._hoverlayer});if(u&&=u.filter(function(e){return e.spikeDistance<=ie}),u&&u.length){var f,m=u.filter(function(e){return e.xa.showspikes&&e.xa.spikesnap!==`hovered data`});if(m.length){var h=m[0];n(h.x0)&&n(h.y0)&&(f=Ae(h),(!ye.vLinePoint||ye.vLinePoint.spikeDistance>f.spikeDistance)&&(ye.vLinePoint=f))}var g=u.filter(function(e){return e.ya.showspikes&&e.ya.spikesnap!==`hovered data`});if(g.length){var v=g[0];n(v.x0)&&n(v.y0)&&(f=Ae(v),(!ye.hLinePoint||ye.hLinePoint.spikeDistance>f.spikeDistance)&&(ye.hLinePoint=f))}}}}}Oe();function ke(e,t,n){for(var r=null,i=1/0,a,o=0;oe.trace.index===Re.trace.index):[Re];var ze=ae.length;Oe(ee(`x`,Re,_),ee(`y`,Re,_));for(var Be=[],Ve={},He=0,Ue=function(e){var t=M[e.trace.type]?I(e):e.trace.index;if(!Ve[t])He++,Ve[t]=He,Be.push(e);else{var n=Ve[t]-1,r=Be[n];n>0&&Math.abs(e.distance)ze-1;We--)Ue(ae[We]);ae=Be,Ne()}var Ge=e._hoverdata,Ke=[],qe=Z(e),Je=te(e);for(let e of ae){var Ye=y.makeEventData(e,e.trace,e.cd);if(e.hovertemplate!==!1){var Xe=!1;e.cd[e.index]&&e.cd[e.index].ht&&(Xe=e.cd[e.index].ht),e.hovertemplate=Xe||e.trace.hovertemplate||!1}if(e.xa&&e.ya){var Ze=e.x0+e.xa._offset,Qe=e.x1+e.xa._offset,$e=e.y0+e.ya._offset,et=e.y1+e.ya._offset,$=Math.min(Ze,Qe),tt=Math.max(Ze,Qe),nt=Math.min($e,et),rt=Math.max($e,et);Ye.bbox={x0:$+Je,x1:tt+Je,y0:nt+qe,y1:rt+qe},Ye.xPixel=(Ze+Qe)/2,Ye.yPixel=($e+et)/2}e.eventData=[Ye],Ke.push(Ye)}e._hoverdata=Ke;var it=w===`y`&&(oe.length>1||ae.length>1)||w===`closest`&&be&&ae.length>1,at=p.combine(_.plot_bgcolor||p.background,_.paper_bgcolor),ot=z(ae,{gd:e,hovermode:w,rotateLabels:it,bgColor:at,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),st=ot.hoverLabels;if(y.isUnifiedHover(w)||(V(st,it,_,ot.commonLabelBoundingBox),W(st,it,_._invScaleX,_._invScaleY)),l&&l.tagName){var ct=v.getComponentMethod(`annotations`,`hasClickToShow`)(e,Ke);u(t.select(l),ct?`pointer`:``)}var lt=q(e,r,Ge);if(!l||s||!lt&&!_.hoveranywhere)return;Ge&<&&e.emit(`plotly_unhover`,{event:r,points:Ge}),ut(e._hoverdata);function ut(t){e.emit(`plotly_hover`,{event:r,points:t,xaxes:B,yaxes:H,xvals:se,yvals:ce})}}function I(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:``,e.ya?e.ya._id:``].join(`,`)}var R=/([\s\S]*)<\/extra>/;function z(e,n){var r=n.gd,a=r._fullLayout,c=n.hovermode,u=n.rotateLabels,f=n.bgColor,m=n.container,h=n.outerContainer,g=n.commonLabelOpts||{};if(e.length===0)return[[]];var _=n.fontFamily||b.HOVERFONT,w=n.fontSize||b.HOVERFONTSIZE,T=n.fontWeight||a.font.weight,E=n.fontStyle||a.font.style,D=n.fontVariant||a.font.variant,O=n.fontTextcase||a.font.textcase,j=n.fontLineposition||a.font.lineposition,M=n.fontShadow||a.font.shadow,N=e[0],P=N.xa,F=N.ya,L=c.charAt(0),R=L+`Label`,z=N[R];if(z===void 0&&P.type===`multicategory`)for(var V=0;Va.width-C&&(I=a.width-C),n.attr(`d`,`M`+(b-I)+`,0L`+(b-I+k)+`,`+S+k+`H`+C+`v`+S+(A*2+y.height)+`H`+-C+`V`+S+k+`H`+(b-I-k)+`Z`),b=I,Z.minX=b-C,Z.maxX=b+C,P.side===`top`?(Z.minY=x-(A*2+y.height),Z.maxY=x-A):(Z.minY=x+A,Z.maxY=x+(A*2+y.height))}else{var L,R,B;F.side===`right`?(L=`start`,R=1,B=``,b=P._offset+P._length):(L=`end`,R=-1,B=`-`,b=P._offset),x=F._offset+(N.y0+N.y1)/2,s.attr(`text-anchor`,L),n.attr(`d`,`M0,0L`+B+k+`,`+k+`V`+(A+y.height/2)+`h`+B+(A*2+y.width)+`V-`+(A+y.height/2)+`H`+B+k+`V-`+k+`Z`),Z.minY=x-(A+y.height/2),Z.maxY=x+(A+y.height/2),F.side===`right`?(Z.minX=b+k,Z.maxX=b+k+(A*2+y.width)):(Z.minX=b-k-(A*2+y.width),Z.maxX=b-k);var V=y.height/2,H=U-y.top-V,W=`clip`+a._uid+`commonlabel`+F._id,G;if(be.hoverinfo!==`none`);if(t.length===0)return[];var te=a.hoverlabel,re=te.font,ie=t[0],ae=((c===`x unified`?ie.xa:ie.ya).unifiedhovertitle||{}).text,oe={showlegend:!0,legend:{title:{text:ae?i.hovertemplateString({data:c===`x unified`?[{xa:ie.xa,x:ie.xVal}]:[{ya:ie.ya,y:ie.yVal}],fallback:ie.trace.hovertemplatefallback,locale:a._d3locale,template:ae}):z,font:re},font:re,bgcolor:te.bgcolor,bordercolor:te.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:`v`}},se={font:re};x(oe,se,r._fullData);var ce=se.legend;ce.entries=[];for(var Q=0;Q=0?we:Te+ge=0?Te:Ee+ge=0?Se:Ce+_e=0?Ce:De+_e=0,(e.idealAlign===`top`||!ee)&&Z?(R-=H/2,e.anchor=`end`):ee?(R+=H/2,e.anchor=`start`):e.anchor=`middle`,e.crossPos=R;else{if(e.pos=R,ee=L+V/2+X<=W,Z=L-V/2-X>=0,(e.idealAlign===`left`||!ee)&&Z)L-=V/2,e.anchor=`end`;else if(ee)L+=V/2,e.anchor=`start`;else{e.anchor=`middle`;var te=X/2,re=L+te-W,ie=L-te;re>0&&(L-=re),ie<0&&(L+=-ie)}e.crossPos=L}S.attr(`text-anchor`,e.anchor),P&&N.attr(`text-anchor`,e.anchor),n.attr(`transform`,o(L,R)+(u?s(C):``))}),{hoverLabels:Ae,commonLabelBoundingBox:Z}}function B(e,t,n,r,a,o){var s,c=``,l=``;e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=i.templateString(e.name,e.trace._meta)),c=Y(e.name,e.nameLength));var u=n.charAt(0),d=u===`x`?`y`:`x`;e.zLabel===void 0?t&&e[u+`Label`]===a?l=e[d+`Label`]||``:e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!==`scattercarpet`&&(l=e.yLabel):l=e.yLabel===void 0?e.xLabel:`(`+e.xLabel+`, `+e.yLabel+`)`:(e.xLabel!==void 0&&(l+=`x: `+e.xLabel+`
`),e.yLabel!==void 0&&(l+=`y: `+e.yLabel+`
`),e.trace.type!==`choropleth`&&e.trace.type!==`choroplethmapbox`&&e.trace.type!==`choroplethmap`&&(l+=(l?`z: `:``)+e.zLabel)),(e.text||e.text===0)&&!Array.isArray(e.text)&&(l+=(l?`
`:``)+e.text),e.extraText!==void 0&&(l+=(l?`
`:``)+e.extraText),o&&l===``&&!e.hovertemplate&&(c===``&&o.remove(),l=c),(s=e.trace?.hoverlabel)!=null&&s.split&&(e.hovertemplate=``);let{hovertemplate:f=!1}=e;if(f){let t=e.hovertemplateLabels||e;e[u+`Label`]!==a&&(t[u+`other`]=t[u+`Val`],t[u+`otherLabel`]=t[u+`Label`]),l=i.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:t,locale:r._d3locale,template:f}),l=l.replace(R,(t,n)=>(c=Y(n,e.nameLength),``))}return[l,c]}function V(e,t,n,r){var i=t?`xa`:`ya`,a=t?`ya`:`xa`,o=0,s=1,c=e.size(),l=Array(c),u=0,d=r.minX,f=r.maxX,p=r.minY,m=r.maxY,h=function(e){return e*n._invScaleX},g=function(e){return e*n._invScaleY};e.each(function(e){var r=e[i],o=e[a],c=r._id.charAt(0)===`x`,_=r.range;u===0&&_&&_[0]>_[1]!==c&&(s=-1);var v=0,y=c?n.width:n.height;if(n.hovermode===`x`||n.hovermode===`y`){var b=H(e,t),x=e.anchor,S=x===`end`?-1:1,C,w;if(x===`middle`)C=e.crossPos+(c?g(b.y-e.by/2):h(e.bx/2+e.tx2width/2)),w=C+(c?g(e.by):h(e.bx));else if(c)C=e.crossPos+g(k+b.y)-g(e.by/2-k),w=C+g(e.by);else{var E=h(S*k+b.x),D=E+h(S*e.bx);C=e.crossPos+Math.min(E,D),w=e.crossPos+Math.max(E,D)}c?p!==void 0&&m!==void 0&&Math.min(w,m)-Math.max(C,p)>1&&(o.side===`left`?(v=o._mainLinePosition,y=n.width):y=o._mainLinePosition):d!==void 0&&f!==void 0&&Math.min(w,f)-Math.max(C,d)>1&&(o.side===`top`?(v=o._mainLinePosition,y=n.height):y=o._mainLinePosition)}l[u++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(c?T:1)/2,pmin:v,pmax:y}]}),l.sort(function(e,t){return e[0].posref-t[0].posref||s*(t[0].traceIndex-e[0].traceIndex)});var _,v,y,b,x,S,C;function w(e){var t=e[0],n=e[e.length-1];if(v=t.pmin-t.pos-t.dp+t.size,y=n.pos+n.dp+n.size-t.pmax,v>.01){for(x=e.length-1;x>=0;x--)e[x].dp+=v;_=!1}if(!(y<.01)){if(v<-.01){for(x=e.length-1;x>=0;x--)e[x].dp-=y;_=!1}if(_){var r=0;for(b=0;bt.pmax&&r++;for(b=e.length-1;b>=0&&!(r<=0);b--)S=e[b],S.pos>t.pmax-1&&(S.del=!0,r--);for(b=0;b=0;x--)e[x].dp-=y;for(b=e.length-1;b>=0&&!(r<=0);b--)S=e[b],S.pos+S.dp+S.size>t.pmax&&(S.del=!0,r--)}}}for(;!_&&o<=c;){for(o++,_=!0,b=0;b.01){for(x=D.length-1;x>=0;x--)D[x].dp+=v;for(E.push.apply(E,D),l.splice(b+1,1),C=0,x=E.length-1;x>=0;x--)C+=E[x].dp;for(y=C/E.length,x=E.length-1;x>=0;x--)E[x].dp-=y;_=!1}else b++}l.forEach(w)}for(b=l.length-1;b>=0;b--){var j=l[b];for(x=j.length-1;x>=0;x--){var M=j[x],N=M.datum;N.offset=M.dp,N.del=M.del}}}function H(e,t){var n=0,r=e.offset;return t&&(r*=-D,n=e.offset*E),{x:n,y:r}}function U(e){var t={start:1,end:-1,middle:0}[e.anchor],n=t*(k+A),r=n+t*(e.txwidth+A);return e.anchor===`middle`&&(n-=e.tx2width/2,r+=e.txwidth/2+A),{alignShift:t,textShiftX:n,text2ShiftX:r}}function W(e,n,r,i){var a=function(e){return e*r},o=function(e){return e*i};e.each(function(e){var r=t.select(this);if(e.del)return r.remove();var i=r.select(`text.nums`),s=e.anchor,c=s===`end`?-1:1,u=U(e),f=H(e,n),p=f.x,m=f.y,h=s===`middle`,g=`hoverlabel`in e.trace?e.trace.hoverlabel.showarrow:!0,_=h?`M-`+a(e.bx/2+e.tx2width/2)+`,`+o(m-e.by/2)+`h`+a(e.bx)+`v`+o(e.by)+`h-`+a(e.bx)+`Z`:g?`M0,0L`+a(c*k+p)+`,`+o(k+m)+`v`+o(e.by/2-k)+`h`+a(c*e.bx)+`v-`+o(e.by)+`H`+a(c*k+p)+`V`+o(m-k)+`Z`:`M`+a(c*k+p)+`,`+o(m-e.by/2)+`h`+a(c*e.bx)+`v`+o(e.by)+`h`+a(-c*e.bx)+`Z`;r.select(`path`).attr(`d`,_);var v=p+u.textShiftX,y=m+e.ty0-e.by/2+A,b=e.textAlign||`auto`;b!==`auto`&&(b===`left`&&s!==`start`?(i.attr(`text-anchor`,`start`),v=h?-e.bx/2-e.tx2width/2+A:-e.bx-A):b===`right`&&s!==`end`&&(i.attr(`text-anchor`,`end`),v=h?e.bx/2-e.tx2width/2-A:e.bx+A)),i.call(l.positionText,a(v),o(y)),e.tx2width&&(r.select(`text.name`).call(l.positionText,a(u.text2ShiftX+u.alignShift*A+p),o(m+e.ty0-e.by/2+A)),r.select(`rect`).call(d.setRect,a(u.text2ShiftX+(u.alignShift-1)*e.tx2width/2+p),o(m-e.by/2-1),a(e.tx2width),o(e.by+2)))})}function G(e,t){var r=e.index,a=e.trace||{},o=e.cd[0],s=e.cd[r]||{};function c(e){return e||n(e)&&e===0}var l=Array.isArray(r)?function(e,t){var n=i.castOption(o,r,e);return c(n)?n:i.extractOption({},a,``,t)}:function(e,t){return i.extractOption(s,a,e,t)};function u(t,n,r){var i=l(n,r);c(i)&&(e[t]=i)}if(u(`hoverinfo`,`hi`,`hoverinfo`),u(`bgcolor`,`hbg`,`hoverlabel.bgcolor`),u(`borderColor`,`hbc`,`hoverlabel.bordercolor`),u(`fontFamily`,`htf`,`hoverlabel.font.family`),u(`fontSize`,`hts`,`hoverlabel.font.size`),u(`fontColor`,`htc`,`hoverlabel.font.color`),u(`fontWeight`,`htw`,`hoverlabel.font.weight`),u(`fontStyle`,`hty`,`hoverlabel.font.style`),u(`fontVariant`,`htv`,`hoverlabel.font.variant`),u(`nameLength`,`hnl`,`hoverlabel.namelength`),u(`textAlign`,`hta`,`hoverlabel.align`),e.posref=t===`y`||t===`closest`&&a.orientation===`h`?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=i.constrain(e.x0,0,e.xa._length),e.x1=i.constrain(e.x1,0,e.xa._length),e.y0=i.constrain(e.y0,0,e.ya._length),e.y1=i.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel=`xLabel`in e?e.xLabel:h.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel=`yLabel`in e?e.yLabel:h.hoverLabelText(e.ya,e.yLabelVal,a.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type===`log`&&e.xerr<=0)){var d=h.tickText(e.xa,e.xa.c2l(e.xerr),`hover`).text;e.xerrneg===void 0?e.xLabel+=` ± `+d:e.xLabel+=` +`+d+` / -`+h.tickText(e.xa,e.xa.c2l(e.xerrneg),`hover`).text,t===`x`&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type===`log`&&e.yerr<=0)){var f=h.tickText(e.ya,e.ya.c2l(e.yerr),`hover`).text;e.yerrneg===void 0?e.yLabel+=` ± `+f:e.yLabel+=` +`+f+` / -`+h.tickText(e.ya,e.ya.c2l(e.yerrneg),`hover`).text,t===`y`&&(e.distance+=1)}var p=e.hoverinfo||e.trace.hoverinfo;return p&&p!==`all`&&(p=Array.isArray(p)?p:p.split(`+`),p.indexOf(`x`)===-1&&(e.xLabel=void 0),p.indexOf(`y`)===-1&&(e.yLabel=void 0),p.indexOf(`z`)===-1&&(e.zLabel=void 0),p.indexOf(`text`)===-1&&(e.text=void 0),p.indexOf(`name`)===-1&&(e.name=void 0)),e}function K(e,t,n){var i=n.container,a=n.fullLayout,o=a._size,s=n.event,c=!!t.hLinePoint,l=!!t.vLinePoint,u,f;if(i.selectAll(`.spikeline`).remove(),l||c){var m=p.combine(a.plot_bgcolor,a.paper_bgcolor);if(c){var g=t.hLinePoint,_,v;u=g&&g.xa,f=g&&g.ya,f.spikesnap===`cursor`?(_=s.pointerX,v=s.pointerY):(_=u._offset+g.x,v=f._offset+g.y);var y=r.readability(g.color,m)<1.5?p.contrast(m):g.color,b=f.spikemode,x=f.spikethickness,S=f.spikecolor||y,C=h.getPxPosition(e,f),w,T;if(b.indexOf(`toaxis`)!==-1||b.indexOf(`across`)!==-1){if(b.indexOf(`toaxis`)!==-1&&(w=C,T=_),b.indexOf(`across`)!==-1){var E=f._counterDomainMin,D=f._counterDomainMax;f.anchor===`free`&&(E=Math.min(E,f.position),D=Math.max(D,f.position)),w=o.l+E*o.w,T=o.l+D*o.w}i.insert(`line`,`:first-child`).attr({x1:w,x2:T,y1:v,y2:v,"stroke-width":x,stroke:S,"stroke-dasharray":d.dashStyle(f.spikedash,x)}).classed(`spikeline`,!0).classed(`crisp`,!0),i.insert(`line`,`:first-child`).attr({x1:w,x2:T,y1:v,y2:v,"stroke-width":x+2,stroke:m}).classed(`spikeline`,!0).classed(`crisp`,!0)}b.indexOf(`marker`)!==-1&&i.insert(`circle`,`:first-child`).attr({cx:C+(f.side===`right`?-x:x),cy:v,r:x,fill:S}).classed(`spikeline`,!0)}if(l){var O=t.vLinePoint,k,A;u=O&&O.xa,f=O&&O.ya,u.spikesnap===`cursor`?(k=s.pointerX,A=s.pointerY):(k=u._offset+O.x,A=f._offset+O.y);var j=r.readability(O.color,m)<1.5?p.contrast(m):O.color,M=u.spikemode,N=u.spikethickness,P=u.spikecolor||j,F=h.getPxPosition(e,u),I,L;if(M.indexOf(`toaxis`)!==-1||M.indexOf(`across`)!==-1){if(M.indexOf(`toaxis`)!==-1&&(I=F,L=A),M.indexOf(`across`)!==-1){var R=u._counterDomainMin,z=u._counterDomainMax;u.anchor===`free`&&(R=Math.min(R,u.position),z=Math.max(z,u.position)),I=o.t+(1-z)*o.h,L=o.t+(1-R)*o.h}i.insert(`line`,`:first-child`).attr({x1:k,x2:k,y1:I,y2:L,"stroke-width":N,stroke:P,"stroke-dasharray":d.dashStyle(u.spikedash,N)}).classed(`spikeline`,!0).classed(`crisp`,!0),i.insert(`line`,`:first-child`).attr({x1:k,x2:k,y1:I,y2:L,"stroke-width":N+2,stroke:m}).classed(`spikeline`,!0).classed(`crisp`,!0)}M.indexOf(`marker`)!==-1&&i.insert(`circle`,`:first-child`).attr({cx:k,cy:F-(u.side===`top`?-N:N),r:N,fill:P}).classed(`spikeline`,!0)}}}function q(e,t,n){if(!n||n.length!==e._hoverdata.length)return!0;for(var r=n.length-1;r>=0;r--){var i=n[r],a=e._hoverdata[r];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers)||i.binNumber!==a.binNumber)return!0}return!1}function J(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Y(e,t){return l.plainText(e||``,{len:t,allowedTags:[`br`,`sub`,`sup`,`b`,`i`,`em`,`s`,`u`]})}function X(e,t){for(var n=t.charAt(0),r=[],i=[],a=[],o=0;oe.offsetTop+e.clientTop,te=e=>e.offsetLeft+e.clientLeft;function ne(e,t){var n=e._fullLayout,r=t.getBoundingClientRect(),a=r.left,o=r.top,s=a+r.width,c=o+r.height,l=i.apply3DTransform(n._invTransform)(a,o),u=i.apply3DTransform(n._invTransform)(s,c),d=l[0],f=l[1],p=u[0],m=u[1];return{x:d,y:f,width:p-d,height:m-f,top:Math.min(f,m),left:Math.min(d,p),right:Math.max(d,p),bottom:Math.max(f,m)}}}),bn=l((e,t)=>{var n=$(),r=L(),i=Ht().isUnifiedHover;t.exports=function(e,t,a,o){o||={};var s=t.legend;function c(e){o.font[e]||(o.font[e]=s?t.legend.font[e]:t.font[e])}t&&i(t.hovermode)&&(o.font||(o.font={}),c(`size`),c(`family`),c(`color`),c(`weight`),c(`style`),c(`variant`),s?(o.bgcolor||(o.bgcolor=r.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),a(`hoverlabel.bgcolor`,o.bgcolor),a(`hoverlabel.bordercolor`,o.bordercolor),a(`hoverlabel.namelength`,o.namelength),a(`hoverlabel.showarrow`,o.showarrow),n.coerceFont(a,`hoverlabel.font`,o.font),a(`hoverlabel.align`,o.align)}}),xn=l((e,t)=>{var n=$(),r=bn(),i=M();t.exports=function(e,t){function a(r,a){return n.coerce(e,t,i,r,a)}r(e,t,a)}}),Sn=l((e,t)=>{var n=$(),r=N(),i=bn();t.exports=function(e,t,a,o){function s(i,a){return n.coerce(e,t,r,i,a)}var c=n.extendFlat({},o.hoverlabel);t.hovertemplate&&(c.namelength=-1),i(e,t,s,c)}}),Cn=l((e,t)=>{var n=$(),r=M();t.exports=function(e,t){function i(i,a){return t[i]===void 0?n.coerce(e,t,r,i,a):t[i]}return i(`clickmode`),i(`hoversubplots`),i(`hoveranywhere`),i(`clickanywhere`),i(`hovermode`)}}),wn=l((e,t)=>{var n=$(),r=M(),i=Cn(),a=bn();t.exports=function(e,t){function o(i,a){return n.coerce(e,t,r,i,a)}var s=i(e,t);s&&(o(`hoverdistance`),o(`spikedistance`),s.indexOf(`unified`)!==-1&&o(`hoversort`)),o(`dragmode`)===`select`&&o(`selectdirection`);var c=t._has(`mapbox`),l=t._has(`map`),u=t._has(`geo`),d=t._basePlotModules.length;t.dragmode===`zoom`&&((c||l||u)&&d===1||(c||l)&&u&&d===2)&&(t.dragmode=`pan`),a(e,t,o),n.coerceFont(o,`hoverlabel.grouptitlefont`,t.hoverlabel.font)}}),Tn=l((e,t)=>{var n=$(),r=Ie();t.exports=function(e){var t=e.calcdata,a=e._fullLayout;function o(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},a)}}for(var s=0;s{var n=Ie(),r=yn().hover;t.exports=function(e,t,i){var a=n.getComponentMethod(`annotations`,`onClick`)(e,e._hoverdata),o=e._fullLayout;i!==void 0&&r(e,t,i,!0);function s(){var n={points:e._hoverdata,event:t};n.xaxes??=e._hoverXAxes,n.yaxes??=e._hoverYAxes,n.xvals??=e._hoverXVals,n.yvals??=e._hoverYVals,e.emit(`plotly_click`,n)}(e._hoverdata||o.clickanywhere)&&t&&t.target&&(e._hoverdata||=[],a&&a.then?a.then(s):s(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}}),Dn=l((e,t)=>{var n=f(),r=$(),i=an(),a=Ht(),o=M(),s=yn();t.exports={moduleType:`component`,name:`fx`,constants:j(),schema:{layout:o},attributes:N(),layoutAttributes:o,supplyLayoutGlobalDefaults:xn(),supplyDefaults:Sn(),supplyLayoutDefaults:wn(),calc:Tn(),getDistanceFunction:a.getDistanceFunction,getClosest:a.getClosest,inbox:a.inbox,quadrature:a.quadrature,appendArrayPointValue:a.appendArrayPointValue,castHoverOption:l,castHoverinfo:u,hover:s.hover,unhover:i.unhover,loneHover:s.loneHover,loneUnhover:c,click:En()};function c(e){var t=r.isD3Selection(e)?e:n.select(e);t.selectAll(`g.hovertext`).remove(),t.selectAll(`.spikeline`).remove()}function l(e,t,n){return r.castOption(e,t,`hoverlabel.`+n)}function u(e,t,n){function i(n){return r.coerceHoverinfo({hoverinfo:n},{_module:e._module},t)}return r.castOption(e,n,`hoverinfo`,i)}}),On=l(e=>{e.selectMode=function(e){return e===`lasso`||e===`select`},e.drawMode=function(e){return e===`drawclosedpath`||e===`drawopenpath`||e===`drawline`||e===`drawrect`||e===`drawcircle`},e.openMode=function(e){return e===`drawline`||e===`drawopenpath`},e.rectMode=function(e){return e===`select`||e===`drawline`||e===`drawrect`||e===`drawcircle`},e.freeMode=function(e){return e===`lasso`||e===`drawclosedpath`||e===`drawopenpath`},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}}),kn=l((e,t)=>{t.exports=function(e){var t=e._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(e){e.regl&&e.regl.clear({color:!0,depth:!0})})}}),An=l((e,t)=>{t.exports={undo:{width:857.1,height:1e3,path:`m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z`,transform:`matrix(1 0 0 -1 0 850)`},home:{width:928.6,height:1e3,path:`m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z`,transform:`matrix(1 0 0 -1 0 850)`},"camera-retro":{width:1e3,height:1e3,path:`m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z`,transform:`matrix(1 0 0 -1 0 850)`},zoombox:{width:1e3,height:1e3,path:`m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z`,transform:`matrix(1 0 0 -1 0 850)`},pan:{width:1e3,height:1e3,path:`m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z`,transform:`matrix(1 0 0 -1 0 850)`},zoom_plus:{width:875,height:1e3,path:`m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z`,transform:`matrix(1 0 0 -1 0 850)`},zoom_minus:{width:875,height:1e3,path:`m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z`,transform:`matrix(1 0 0 -1 0 850)`},autoscale:{width:1e3,height:1e3,path:`m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z`,transform:`matrix(1 0 0 -1 0 850)`},tooltip_basic:{width:1500,height:1e3,path:`m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z`,transform:`matrix(1 0 0 -1 0 850)`},tooltip_compare:{width:1125,height:1e3,path:`m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z`,transform:`matrix(1 0 0 -1 0 850)`},plotlylogo:{width:1542,height:1e3,path:`m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z`,transform:`matrix(1 0 0 -1 0 850)`},"z-axis":{width:1e3,height:1e3,path:`m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z`,transform:`matrix(1 0 0 -1 0 850)`},"3d_rotate":{width:1e3,height:1e3,path:`m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z`,transform:`matrix(1 0 0 -1 0 850)`},camera:{width:1e3,height:1e3,path:`m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z`,transform:`matrix(1 0 0 -1 0 850)`},movie:{width:1e3,height:1e3,path:`m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z`,transform:`matrix(1 0 0 -1 0 850)`},question:{width:857.1,height:1e3,path:`m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z`,transform:`matrix(1 0 0 -1 0 850)`},disk:{width:857.1,height:1e3,path:`m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z`,transform:`matrix(1 0 0 -1 0 850)`},cloudupload:{width:640,height:640,path:`M176 544C96.5 544 32 479.5 32 400C32 336.6 73 282.8 129.9 263.5C128.6 255.8 128 248 128 240C128 160.5 192.5 96 272 96C327.4 96 375.5 127.3 399.6 173.1C413.8 164.8 430.4 160 448 160C501 160 544 203 544 256C544 271.7 540.2 286.6 533.5 299.7C577.5 320 608 364.4 608 416C608 486.7 550.7 544 480 544L176 544zM337 255C327.6 245.6 312.4 245.6 303.1 255L231.1 327C221.7 336.4 221.7 351.6 231.1 360.9C240.5 370.2 255.7 370.3 265 360.9L296 329.9L296 432C296 445.3 306.7 456 320 456C333.3 456 344 445.3 344 432L344 329.9L375 360.9C384.4 370.3 399.6 370.3 408.9 360.9C418.2 351.5 418.3 336.3 408.9 327L336.9 255z`,transform:`matrix(1 0 0 1 -15 -15)`},drawopenpath:{width:70,height:70,path:`M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z`,transform:`matrix(1 0 0 1 -15 -15)`},drawclosedpath:{width:90,height:90,path:`M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z`,transform:`matrix(1 0 0 1 -5 -5)`},lasso:{width:1031,height:1e3,path:`m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z`,transform:`matrix(1 0 0 -1 0 850)`},selectbox:{width:1e3,height:1e3,path:`m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z`,transform:`matrix(1 0 0 -1 0 850)`},drawline:{width:70,height:70,path:`M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z`,transform:`matrix(1 0 0 1 -15 -15)`},drawrect:{width:80,height:80,path:`M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z`,transform:`matrix(1 0 0 1 -10 -10)`},drawcircle:{width:80,height:80,path:`M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z`,transform:`matrix(1 0 0 1 -10 -10)`},eraseshape:{width:80,height:80,path:`M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z`,transform:`matrix(1 0 0 1 -10 -10)`},spikeline:{width:1e3,height:1e3,path:`M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z`,transform:`matrix(1.5 0 0 -1.5 0 850)`},pencil:{width:1792,height:1792,path:`M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z`,transform:`matrix(1 0 0 1 0 1)`},newplotlylogo:{name:`newplotlylogo`,svg:[``,` plotly-logomark`,` `,` `,` `,` `,` `,` `,` `,` `,` `,` `,` `,` `,` `,``].join(``)}}}),jn=l((e,t)=>{var n=32;t.exports={CIRCLE_SIDES:n,i000:0,i090:n/4,i180:n/2,i270:n/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}),Mn=l((e,t)=>{var n=$().strTranslate;function r(e,t){switch(e.type){case`log`:return e.p2d(t);case`date`:return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function i(e,t){switch(e.type){case`log`:return e.d2p(t);case`date`:return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function a(e){var t=+(e._id.charAt(0)===`y`);return function(n){return r(e,n[t])}}function o(e){return n(e.xaxis._offset,e.yaxis._offset)}t.exports={p2r:r,r2p:i,axValue:a,getTransform:o}}),Nn=l(e=>{var t=Ut(),n=jn(),r=n.CIRCLE_SIDES,i=n.SQRT2,a=Mn(),o=a.p2r,s=a.r2p,c=[0,3,4,5,6,1,2],l=[0,3,4,1,2];e.writePaths=function(e){var t=e.length;if(!t)return`M0,0Z`;for(var n=``,r=0;r0&&u{var n=dt(),r=On(),i=r.drawMode,a=r.openMode,o=jn(),s=o.i000,c=o.i090,l=o.i180,u=o.i270,d=o.cos45,f=o.sin45,p=Mn(),m=p.p2r,h=p.r2p,g=ft().clearOutline,_=Nn(),v=_.readPaths,y=_.writePaths,b=_.ellipseOver,x=_.fixDatesForPaths;function S(e,t){if(e.length&&e[0][0]){var r=t.gd,a=t.isActiveShape,o=t.dragmode,s=(r.layout||{}).shapes||[];if(!i(o)&&a!==void 0){var c=r._fullLayout._activeShapeIndex;if(c{var n=On().selectMode,r=ft().clearOutline,i=Nn(),a=i.readPaths,o=i.writePaths,s=i.fixDatesForPaths;t.exports=function(e,t){if(e.length){var i=e[0][0];if(i){var c=i.getAttribute(`d`),l=t.gd,u=l._fullLayout.newselection,d=t.plotinfo,f=d.xaxis,p=d.yaxis,m=t.isActiveSelection,h=t.dragmode,g=(l.layout||{}).selections||[];if(!n(h)&&m!==void 0){var _=l._fullLayout._activeSelectionIndex;if(_{t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}}),Ln=l(e=>{var t=In(),n=$(),r=Xt();e.rangeToShapePosition=function(e){return e.type===`log`?e.r2d:function(e){return e}},e.shapePositionToRange=function(e){return e.type===`log`?e.d2r:function(e){return e}},e.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace(`_`,` `)),e(t)}},e.encodeDate=function(e){return function(t){return e(t).replace(` `,`_`)}},e.extractPathCoords=function(e,r,i){var a=[];return e.match(t.segmentRE).forEach(function(e){var o=r[e.charAt(0)].drawn;if(o!==void 0){var s=e.slice(1).match(t.paramRE);if(!(!s||s.length{let n=t.charAt(0);return e+(a[n].drawn===void 0?0:1)},0)},e.getDataToPixel=function(t,n,r,i,o){var s=t._fullLayout._size,c;if(n){if(o===`domain`)c=function(e){return n._length*(i?1-e:e)+n._offset};else{var l=e.shapePositionToRange(n);c=function(e){var t=a(n,r);return n._offset+n.r2p(l(e,!0))+t},n.type===`date`&&(c=e.decodeDate(c))}}else c=i?function(e){return s.t+s.h*(1-e)}:function(e){return s.l+s.w*e};return c},e.getPixelToData=function(t,n,r,i){var a=t._fullLayout._size,o;if(n){if(i===`domain`)o=function(e){var t=(e-n._offset)/n._length;return r?1-t:t};else{var s=e.rangeToShapePosition(n);o=function(e){return s(n.p2r(e-n._offset))}}}else o=r?function(e){return 1-(e-a.t)/a.h}:function(e){return(e-a.l)/a.w};return o},e.roundPositionForSharpStrokeRendering=function(e,t){var n=Math.round(t%2)===1,r=Math.round(e);return n?r+.5:r},e.makeShapesOptionsAndPlotinfo=function(e,t){var n=e._fullLayout.shapes[t]||{},r=e._fullLayout._plots[n.xref+n.yref];return r?r._hadPlotinfo=!0:(r={},n.xref&&n.xref!==`paper`&&(r.xaxis=e._fullLayout[n.xref+`axis`]),n.yref&&n.yref!==`paper`&&(r.yaxis=e._fullLayout[n.yref+`axis`])),r.xsizemode=n.xsizemode,r.ysizemode=n.ysizemode,r.xanchor=n.xanchor,r.yanchor=n.yanchor,{options:n,plotinfo:r}},e.makeSelectionsOptionsAndPlotinfo=function(e,t){var n=e._fullLayout.selections[t]||{},r=e._fullLayout._plots[n.xref+n.yref];return r?r._hadPlotinfo=!0:(r={},n.xref&&(r.xaxis=e._fullLayout[n.xref+`axis`]),n.yref&&(r.yaxis=e._fullLayout[n.yref+`axis`])),{options:n,plotinfo:r}},e.getPathString=function(t,n){let o=n.type,s=r.getRefType(n.xref),c=r.getRefType(n.yref),l=t._fullLayout._size;var u,d,f,p,m,h,g,_,v,y,b,x;function S(t,n,r,i){var a;if(t){if(n===`domain`)a=i?function(e){return t._offset+t._length*(1-e)}:function(e){return t._offset+t._length*e};else{let n=e.shapePositionToRange(t);a=function(e){return t._offset+t.r2p(n(e,!0))},r===`path`&&t.type===`date`&&(a=e.decodeDate(a))}}else a=i?function(e){return l.t+l.h*(1-e)}:function(e){return l.l+l.w*e};return a}if(s===`array`?(g=[],u=n.xref.map(function(e){return r.getFromId(t,e)}),g=n.xref.map(function(e,t){return S(u[t],r.getRefType(e),o,!1)})):(u=r.getFromId(t,n.xref),g=S(u,s,o,!1)),c===`array`?(_=[],d=n.yref.map(function(e){return r.getFromId(t,e)}),_=n.yref.map(function(e,t){return S(d[t],r.getRefType(e),o,!0)})):(d=r.getFromId(t,n.yref),_=S(d,c,o,!0)),o===`path`)return i(n,g,_);if(s===`array`)f=a(u[0],n.x0shift),p=a(u[1],n.x1shift),v=g[0](n.x0)+f,y=g[1](n.x1)+p;else if(f=a(u,n.x0shift),p=a(u,n.x1shift),n.xsizemode===`pixel`){let e=g(n.xanchor);v=e+n.x0+f,y=e+n.x1+p}else v=g(n.x0)+f,y=g(n.x1)+p;if(c===`array`)m=a(d[0],n.y0shift),h=a(d[1],n.y1shift),b=_[0](n.y0)+m,x=_[1](n.y1)+h;else if(m=a(d,n.y0shift),h=a(d,n.y1shift),n.ysizemode===`pixel`){let e=_(n.yanchor);b=e-n.y0+m,x=e-n.y1+h}else b=_(n.y0)+m,x=_(n.y1)+h;if(o===`line`)return`M`+v+`,`+b+`L`+y+`,`+x;if(o===`rect`)return`M`+v+`,`+b+`H`+y+`V`+x+`H`+v+`Z`;var C=(v+y)/2,w=(b+x)/2,T=Math.abs(C-v),E=Math.abs(w-b),D=`A`+T+`,`+E,O=C+T+`,`+w,k=C+`,`+(w-E);return`M`+O+D+` 0 1,1 `+k+D+` 0 0,1 `+O+`Z`};function i(e,r,i){let a=e.path,o=e.xsizemode,s=e.ysizemode,c=e.xanchor,l=e.yanchor,u=Array.isArray(e.xref),d=Array.isArray(e.yref);var f=0,p=0;return a.replace(t.segmentRE,function(e){var a=0,m=e.charAt(0),h=t.paramIsX[m],g=t.paramIsY[m],_=t.numParams[m];let v=h.drawn!==void 0,y=g.drawn!==void 0,b=u?r[f]:r,x=d?i[p]:i;var S=e.slice(1).replace(t.paramRE,function(e){return h[a]?e=o===`pixel`?b(c)+Number(e):b(e):g[a]&&(e=s===`pixel`?x(l)-Number(e):x(e)),a++,a>_&&(e=`X`),e});return a>_&&(S=S.replace(/[\s,]*X.*/,``),n.log(`Ignoring extra params in segment `+e)),v&&f++,y&&p++,m+S})}e.getPixelShift=a;function a(e,t){t||=0;var n=0;return t&&e&&(e.type===`category`||e.type===`multicategory`)&&(n=(e.r2p(1)-e.r2p(0))*t),n}}),Rn=l((e,t)=>{var n=$(),r=Xt(),i=yt(),a=Gt(),o=Nn().readPaths,s=Ln(),c=s.getPathString,l=Ae(),u=vt().FROM_TL;t.exports=function(e,t,u,p){if(p.selectAll(`.shape-label`).remove(),u.label.text||u.label.texttemplate){var m;if(u.label.texttemplate){var h={};if(u.type!==`path`){var g=r.getFromId(e,u.xref),_=r.getFromId(e,u.yref);let t=Array.isArray(u.xref),n=Array.isArray(u.yref);for(var v in l){var y=typeof l[v]==`function`,b=!t||l.simpleXVariables.includes(v),x=!n||l.simpleYVariables.includes(v);if(y&&b&&x){var S=l[v](u,g,_);S!==void 0&&(h[v]=S)}}}m=n.texttemplateStringForShapes({data:[h],fallback:u.label.texttemplatefallback,locale:e._fullLayout._d3locale,template:u.label.texttemplate})}else m=u.label.text;var C={"data-index":t},w=u.label.font,T=p.append(`g`).attr(C).classed(`shape-label`,!0).append(`text`).attr({"data-notex":1}).classed(`shape-label-text`,!0).text(m),E,D,O,k;if(u.path){var A=o(c(e,u),e);E=1/0,O=1/0,D=-1/0,k=-1/0;for(var j=0;js.getDataToPixel(e,r,n,!1,i)(t),h=(t,n,r,i)=>s.getDataToPixel(e,r,n,!0,i)(t);if(u.xsizemode===`pixel`){let e=m(u.xanchor,void 0,i,l),t=s.getPixelShift(i,u.x0shift),n=s.getPixelShift(i,u.x1shift);E=e+u.x0+t,D=e+u.x1+n}else E=m(u.x0,u.x0shift,i,l),D=m(u.x1,u.x1shift,a,d);if(u.ysizemode===`pixel`){let e=h(u.yanchor,void 0,o,f),t=s.getPixelShift(o,u.y0shift),n=s.getPixelShift(o,u.y1shift);O=e-u.y0+t,k=e-u.y1+n}else O=h(u.y0,u.y0shift,o,f),k=h(u.y1,u.y1shift,c,p)}var L=u.label.textangle;L===`auto`&&(L=u.type===`line`?d(E,O,D,k):0),T.call(function(t){return t.call(a.font,w).attr({}),i.convertToTspans(t,e),t});var R=a.bBox(T.node()),z=f(E,O,D,k,u,L,R),B=z.textx,V=z.texty,H=z.xanchor;T.attr({"text-anchor":{left:`start`,center:`middle`,right:`end`}[H],y:V,x:B,transform:`rotate(`+L+`,`+B+`,`+V+`)`}).call(i.positionText,B,V)}};function d(e,t,n,r){var i,a=Math.abs(n-e);return i=n>=e?t-r:r-t,-180/Math.PI*Math.atan2(i,a)}function f(e,t,n,r,i,a,o){var s=i.label.textposition,c=i.label.textangle,l=i.label.padding,d=i.type,f=Math.PI/180*a,p=Math.sin(f),m=Math.cos(f),h=i.label.xanchor,g=i.label.yanchor,_,v,y,b;if(d===`line`){s===`start`?(_=e,v=t):s===`end`?(_=n,v=r):(_=(e+n)/2,v=(t+r)/2),h===`auto`&&(h=s===`start`?c===`auto`?n>e?`left`:ne?`right`:ne?`right`:ne?`left`:n{var n=$().strTranslate,r=an(),i=On(),a=i.drawMode,o=i.selectMode,s=Ie(),c=L(),l=jn(),u=l.i000,d=l.i090,f=l.i180,p=l.i270,m=ft().clearOutlineControllers,h=Nn(),g=h.pointsOnRectangle,_=h.pointsOnEllipse,v=h.writePaths,y=Pn().newShapes,b=Pn().createShapeObj,x=Fn(),S=Rn();t.exports=function e(t,i,l,h){h||=0;var E=l.gd;function D(){e(t,i,l,h++),(_(t[0])||l.hasText)&&O({redrawing:!0})}function O(e){var t={};l.isActiveShape!==void 0&&(l.isActiveShape=!1,t=y(i,l)),l.isActiveSelection!==void 0&&(l.isActiveSelection=!1,t=x(i,l),E._fullLayout._reselect=!0),Object.keys(t).length&&s.call((e||{}).redrawing?`relayout`:`_guiRelayout`,E,t)}var k=E._fullLayout._zoomlayer,A=l.dragmode,j=a(A),M=o(A);(j||M)&&(E._fullLayout._outlining=!0),m(E),i.attr(`d`,v(t));var N,P,F,I,L;if(!h&&(l.isActiveShape||l.isActiveSelection)&&(L=C([],t),W(k.append(`g`).attr(`class`,`outline-controllers`)),X()),j&&l.hasText){var R=k.select(`.label-temp`);S(E,`label-temp`,b(i,l,l.dragmode),R)}function z(e){F=+e.srcElement.getAttribute(`data-i`),I=+e.srcElement.getAttribute(`data-j`),N[F][I].moveFn=B}function B(e,n){if(t.length){var r=L[F][I][1],i=L[F][I][2],a=t[F],o=a.length;if(g(a)){var s=e,c=n;l.isActiveSelection&&(w(a,I)[1]===a[I][1]?c=0:s=0);for(var u=0;u1&&(e.length!==2||e[1][0]!==`Z`)&&(I===0&&(e[0][0]=`M`),t[F]=e,D(),O())}}function U(e,n){if(e===2){F=+n.srcElement.getAttribute(`data-i`),I=+n.srcElement.getAttribute(`data-j`);var r=t[F];!g(r)&&!_(r)&&H()}}function W(e){N=[];for(var i=0;i{var n=f(),r=Ie(),i=$(),a=Xt(),o=Nn().readPaths,s=zn(),c=Rn(),l=ft().clearOutlineControllers,u=L(),d=Gt(),p=lt().arrayEditor,m=an(),h=Dn(),g=on(),_=In(),v=Ln(),y=v.getPathString;t.exports={draw:b,drawOne:C,eraseActiveShape:j,drawLabel:c};function b(e){var t=e._fullLayout;for(var n in t._shapeUpperLayer.selectAll(`path`).remove(),t._shapeLowerLayer.selectAll(`path`).remove(),t._shapeUpperLayer.selectAll(`text`).remove(),t._shapeLowerLayer.selectAll(`text`).remove(),t._plots){var r=t._plots[n].shapelayer;r&&(r.selectAll(`path`).remove(),r.selectAll(`text`).remove())}for(var i=0;i{if(!e._dragging&&e._fullLayout.hoveranywhere){let r=i(t);r&&h.hover(e,r,n.id)}}),r.addEventListener(`click`,t=>{if(!e._dragged&&e._fullLayout.clickanywhere){let r=i(t);r&&h.click(e,r,n.id)}})}function T(e,t,n){let r=n.xref,a=n.yref;if(Array.isArray(r)||Array.isArray(a)){let o=`clip`+t._fullLayout._uid+`shape`+n._index,s=E(t,r,a);i.ensureSingleById(t._fullLayout._clips,`clipPath`,o,function(e){e.append(`rect`)}).select(`rect`).attr(s),d.setClipUrl(e,o,t)}else{let n=(r+a).replace(/paper/g,``).replace(/[xyz][0-9]* *domain/g,``);d.setClipUrl(e,n?`clip`+t._fullLayout._uid+n:null,t)}}function E(e,t,n){let r=e._fullLayout._size;function i(t,n){let i=(Array.isArray(t)?t:[t]).map(t=>a.getFromId(e,t)).filter(Boolean);if(!i.length)return n?[r.t,r.t+r.h]:[r.l,r.l+r.w];let o=i.map(function(e){return e._offset}),s=i.map(function(e){return e._offset+e._length});return[Math.min(...o),Math.max(...s)]}let o=i(t,!1),s=i(n,!0);return{x:o[0],y:s[0],width:o[1]-o[0],height:s[1]-s[0]}}function D(e,t,o,s,l,u){var f=o.xsizemode===`pixel`,p=o.ysizemode===`pixel`,h=o.type===`line`,b=o.type===`path`,S=u.modifyItem,C,w,E,D,k,A,j,M,N,P,F,I,L,R,z,B=n.select(t.node().parentNode),V=a.getFromId(e,o.xref),H=a.getRefType(o.xref),U=a.getFromId(e,o.yref),W=a.getRefType(o.yref),G=o.x0shift,K=o.x1shift,q=o.y0shift,J=o.y1shift,Y=function(t,n){return v.getDataToPixel(e,V,n,!1,H)(t)},X=function(t,n){return v.getDataToPixel(e,U,n,!0,W)(t)},ee=v.getPixelToData(e,V,!1,H),Z=v.getPixelToData(e,U,!0,W),te=ie(),ne={element:te.node(),gd:e,prepFn:se,doneFn:ce,clickFn:Q},re;m.init(ne),te.node().onmousemove=oe;function ie(){return h?ae():t}function ae(){var e=10,n=Math.max(o.line.width,e),r=l.append(`g`).attr(`data-index`,s).attr(`drag-helper`,!0);r.append(`path`).attr(`d`,t.attr(`d`)).style({cursor:`move`,"stroke-width":n,"stroke-opacity":`0`});var i={"fill-opacity":`0`},a=Math.max(n/2,e);return r.append(`circle`).attr({"data-line-point":`start-point`,cx:f?Y(o.xanchor)+o.x0:Y(o.x0,G),cy:p?X(o.yanchor)-o.y0:X(o.y0,q),r:a}).style(i).classed(`cursor-grab`,!0),r.append(`circle`).attr({"data-line-point":`end-point`,cx:f?Y(o.xanchor)+o.x1:Y(o.x1,K),cy:p?X(o.yanchor)-o.y1:X(o.y1,J),r:a}).style(i).classed(`cursor-grab`,!0),r}function oe(n){if(x(e)){re=null;return}if(h)re=n.target.tagName===`path`?`move`:n.target.attributes[`data-line-point`].value===`start-point`?`resize-over-start-point`:`resize-over-end-point`;else{var r=ne.element.getBoundingClientRect(),i=r.right-r.left,a=r.bottom-r.top,o=n.clientX-r.left,s=n.clientY-r.top,c=!b&&i>10&&a>10&&!n.shiftKey?m.getCursor(o/i,1-s/a):`move`;g(t,c),re=c.split(`-`)[0]}}function se(n){x(e)||(f&&(k=Y(o.xanchor)),p&&(A=X(o.yanchor)),o.type===`path`?z=o.path:(C=f?o.x0:Y(o.x0),w=p?o.y0:X(o.y0),E=f?o.x1:Y(o.x1),D=p?o.y1:X(o.y1)),CD?(j=w,F=`y0`,M=D,I=`y1`):(j=D,F=`y1`,M=w,I=`y0`),oe(n),de(l,o),pe(t,o,e),ne.moveFn=re===`move`?le:ue,ne.altKey=n.altKey)}function ce(){x(e)||(g(t),fe(l),T(t,e,o),r.call(`_guiRelayout`,e,u.getUpdateObj()))}function Q(){x(e)||fe(l)}function le(n,r){if(o.type===`path`){var i=function(e){return e},a=i,u=i;f?S(`xanchor`,o.xanchor=ee(k+n)):(a=function(e){return ee(Y(e)+n)},V&&V.type===`date`&&(a=v.encodeDate(a))),p?S(`yanchor`,o.yanchor=Z(A+r)):(u=function(e){return Z(X(e)+r)},U&&U.type===`date`&&(u=v.encodeDate(u))),S(`path`,o.path=O(z,a,u))}else f?S(`xanchor`,o.xanchor=ee(k+n)):(S(`x0`,o.x0=ee(C+n)),S(`x1`,o.x1=ee(E+n))),p?S(`yanchor`,o.yanchor=Z(A+r)):(S(`y0`,o.y0=Z(w+r)),S(`y1`,o.y1=Z(D+r)));t.attr(`d`,y(e,o)),de(l,o),c(e,s,o,B)}function ue(n,r){if(b){var i=function(e){return e},a=i,u=i;f?S(`xanchor`,o.xanchor=ee(k+n)):(a=function(e){return ee(Y(e)+n)},V&&V.type===`date`&&(a=v.encodeDate(a))),p?S(`yanchor`,o.yanchor=Z(A+r)):(u=function(e){return Z(X(e)+r)},U&&U.type===`date`&&(u=v.encodeDate(u))),S(`path`,o.path=O(z,a,u))}else if(h){if(re===`resize-over-start-point`){var d=C+n,m=p?w-r:w+r;S(`x0`,o.x0=f?d:ee(d)),S(`y0`,o.y0=p?m:Z(m))}else if(re===`resize-over-end-point`){var g=E+n,_=p?D-r:D+r;S(`x1`,o.x1=f?g:ee(g)),S(`y1`,o.y1=p?_:Z(_))}}else{var x=function(e){return re.indexOf(e)!==-1},T=x(`n`),H=x(`s`),W=x(`w`),G=x(`e`),K=T?j+r:j,q=H?M+r:M,J=W?N+n:N,te=G?P+n:P;p&&(T&&(K=j-r),H&&(q=M-r)),(!p&&q-K>10||p&&K-q>10)&&(S(F,o[F]=p?K:Z(K)),S(I,o[I]=p?q:Z(q))),te-J>10&&(S(L,o[L]=f?J:ee(J)),S(R,o[R]=f?te:ee(te)))}t.attr(`d`,y(e,o)),de(l,o),c(e,s,o,B)}function de(e,t){(f||p)&&n();function n(){var n=t.type!==`path`,r=e.selectAll(`.visual-cue`).data([0]),a=1;r.enter().append(`path`).attr({fill:`#fff`,"fill-rule":`evenodd`,stroke:`#000`,"stroke-width":a}).classed(`visual-cue`,!0);var o=Y(f?t.xanchor:i.midRange(n?[t.x0,t.x1]:v.extractPathCoords(t.path,_.paramIsX))),s=X(p?t.yanchor:i.midRange(n?[t.y0,t.y1]:v.extractPathCoords(t.path,_.paramIsY)));if(o=v.roundPositionForSharpStrokeRendering(o,a),s=v.roundPositionForSharpStrokeRendering(s,a),f&&p){var c=`M`+(o-1-a)+`,`+(s-1-a)+`h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z`;r.attr(`d`,c)}else if(f){var l=`M`+(o-1-a)+`,`+(s-9-a)+`v18 h2 v-18 Z`;r.attr(`d`,l)}else{var u=`M`+(o-9-a)+`,`+(s-1-a)+`h18 v2 h-18 Z`;r.attr(`d`,u)}}}function fe(e){e.selectAll(`.visual-cue`).remove()}function pe(e,t,n){var r=t.xref,i=t.yref,o=a.getFromId(n,r),s=a.getFromId(n,i),c=``;r!==`paper`&&!o.autorange&&(c+=r),i!==`paper`&&!s.autorange&&(c+=i),d.setClipUrl(e,c?`clip`+n._fullLayout._uid+c:null,n)}}function O(e,t,n){return e.replace(_.segmentRE,function(e){var r=0,i=e.charAt(0),a=_.paramIsX[i],o=_.paramIsY[i],s=_.numParams[i];return i+e.slice(1).replace(_.paramRE,function(e){return r>=s||(a[r]?e=t(e):o[r]&&(e=n(e)),r++),e})})}function k(e,t){if(S(e)){var n=+t.node().getAttribute(`data-index`);if(n>=0){if(n===e._fullLayout._activeShapeIndex){A(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=A,b(e)}}}function A(e){S(e)&&e._fullLayout._activeShapeIndex>=0&&(l(e),delete e._fullLayout._activeShapeIndex,b(e))}function j(e){if(S(e)){l(e);var t=e._fullLayout._activeShapeIndex,n=(e.layout||{}).shapes||[];if(t{var n=f(),r=$()._;t.exports=function(e,t,i){var a=n.select(e._fullLayout._paperdiv.node());a.selectAll(`.plotly-cloud-dialog`).remove();var o=a.append(`div`).classed(`plotly-cloud-dialog`,!0),s=o.append(`div`).classed(`plotly-cloud-dialog-box`,!0);s.append(`div`).classed(`plotly-cloud-dialog-title`,!0).text(r(e,`Share with Plotly Cloud`)),s.append(`div`).classed(`plotly-cloud-dialog-message`,!0).text(r(e,`This chart and its data will be sent to`)+` `+t+`.`);var c=s.append(`div`).classed(`plotly-cloud-dialog-buttons`,!0);function l(){o.remove(),document.removeEventListener(`keydown`,u)}function u(e){(e.key===`Escape`||e.keyCode===27)&&l()}document.addEventListener(`keydown`,u),o.on(`click`,function(){n.event.target===o.node()&&l()}),c.append(`button`).classed(`plotly-cloud-dialog-btn`,!0).classed(`plotly-cloud-dialog-btn--cancel`,!0).text(r(e,`Cancel`)).on(`click`,l),c.append(`button`).classed(`plotly-cloud-dialog-btn`,!0).classed(`plotly-cloud-dialog-btn--confirm`,!0).text(r(e,`Share`)).on(`click`,function(){l(),i()})}}),Hn=l((e,t)=>{var n=Ie(),r=gt(),i=dt(),a=An(),o=Bn().eraseActiveShape,s=Vn(),c=$(),l=c._,u=t.exports={};u.toImage={name:`toImage`,title:function(e){return((e._context.toImageButtonOptions||{}).format||`png`)===`png`?l(e,`Download plot as a PNG`):l(e,`Download plot`)},icon:a.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||`png`};c.notifier(l(e,`Taking snapshot - this may take a few seconds`),`long`,e),[`filename`,`width`,`height`,`scale`].forEach(function(e){e in t&&(r[e]=t[e])}),n.call(`downloadImage`,e,r).then(function(t){c.notifier(l(e,`Snapshot succeeded`)+` - `+t,`long`,e)}).catch(function(){c.notifier(l(e,`Sorry, there was a problem downloading your snapshot!`),`long`,e)})}},u.sendChartToCloud={name:`sendChartToCloud`,title:function(e){return l(e,`Share with Plotly Cloud`)},icon:a.cloudupload,click:function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(!t){console.error(`No destination URL provided (plotlyServerURL is not set)`);return}try{new URL(t)}catch{console.error(`Invalid plotlyServerURL: `+t);return}s(e,t,function(){r.sendDataToCloud(e,t)})}},u.sendDataToCloud=u.sendChartToCloud,u.zoom2d={name:`zoom2d`,_cat:`zoom`,title:function(e){return l(e,`Zoom`)},attr:`dragmode`,val:`zoom`,icon:a.zoombox,click:d},u.pan2d={name:`pan2d`,_cat:`pan`,title:function(e){return l(e,`Pan`)},attr:`dragmode`,val:`pan`,icon:a.pan,click:d},u.select2d={name:`select2d`,_cat:`select`,title:function(e){return l(e,`Box Select`)},attr:`dragmode`,val:`select`,icon:a.selectbox,click:d},u.lasso2d={name:`lasso2d`,_cat:`lasso`,title:function(e){return l(e,`Lasso Select`)},attr:`dragmode`,val:`lasso`,icon:a.lasso,click:d},u.drawclosedpath={name:`drawclosedpath`,title:function(e){return l(e,`Draw closed freeform`)},attr:`dragmode`,val:`drawclosedpath`,icon:a.drawclosedpath,click:d},u.drawopenpath={name:`drawopenpath`,title:function(e){return l(e,`Draw open freeform`)},attr:`dragmode`,val:`drawopenpath`,icon:a.drawopenpath,click:d},u.drawline={name:`drawline`,title:function(e){return l(e,`Draw line`)},attr:`dragmode`,val:`drawline`,icon:a.drawline,click:d},u.drawrect={name:`drawrect`,title:function(e){return l(e,`Draw rectangle`)},attr:`dragmode`,val:`drawrect`,icon:a.drawrect,click:d},u.drawcircle={name:`drawcircle`,title:function(e){return l(e,`Draw circle`)},attr:`dragmode`,val:`drawcircle`,icon:a.drawcircle,click:d},u.eraseshape={name:`eraseshape`,title:function(e){return l(e,`Erase active shape`)},icon:a.eraseshape,click:o},u.zoomIn2d={name:`zoomIn2d`,_cat:`zoomin`,title:function(e){return l(e,`Zoom in`)},attr:`zoom`,val:`in`,icon:a.zoom_plus,click:d},u.zoomOut2d={name:`zoomOut2d`,_cat:`zoomout`,title:function(e){return l(e,`Zoom out`)},attr:`zoom`,val:`out`,icon:a.zoom_minus,click:d},u.autoScale2d={name:`autoScale2d`,_cat:`autoscale`,title:function(e){return l(e,`Autoscale`)},attr:`zoom`,val:`auto`,icon:a.autoscale,click:d},u.resetScale2d={name:`resetScale2d`,_cat:`resetscale`,title:function(e){return l(e,`Reset axes`)},attr:`zoom`,val:`reset`,icon:a.home,click:d},u.hoverClosestCartesian={name:`hoverClosestCartesian`,_cat:`hoverclosest`,title:function(e){return l(e,`Show closest data on hover`)},attr:`hovermode`,val:`closest`,icon:a.tooltip_basic,gravity:`ne`,click:d},u.hoverCompareCartesian={name:`hoverCompareCartesian`,_cat:`hoverCompare`,title:function(e){return l(e,`Compare data on hover`)},attr:`hovermode`,val:function(e){return e._fullLayout._isHoriz?`y`:`x`},icon:a.tooltip_compare,gravity:`ne`,click:d};function d(e,t){var r=t.currentTarget,a=r.getAttribute(`data-attr`),o=r.getAttribute(`data-val`)||!0,s=e._fullLayout,c={},l=i.list(e,null,!0),u=s._cartesianSpikesEnabled,d,f;if(a===`zoom`){var p=o===`in`?.5:2,m=(1+p)/2,h=(1-p)/2,g,_;for(f=0;f{var n=Hn(),r=Object.keys(n),i=[`drawline`,`drawopenpath`,`drawclosedpath`,`drawcircle`,`drawrect`,`eraseshape`],a=[`v1hovermode`,`hoverclosest`,`hovercompare`,`togglehover`,`togglespikelines`].concat(i),o=[],s=function(e){if(a.indexOf(e._cat||e.name)===-1){var t=e.name,n=(e._cat||e.name).toLowerCase();o.indexOf(t)===-1&&o.push(t),o.indexOf(n)===-1&&o.push(n)}};r.forEach(function(e){s(n[e])}),o.sort(),t.exports={DRAW_MODES:i,backButtons:a,foreButtons:o}}),Wn=l((e,t)=>{Un(),t.exports={editType:`modebar`,orientation:{valType:`enumerated`,values:[`v`,`h`],dflt:`h`,editType:`modebar`},bgcolor:{valType:`color`,editType:`modebar`},color:{valType:`color`,editType:`modebar`},activecolor:{valType:`color`,editType:`modebar`},uirevision:{valType:`any`,editType:`none`},add:{valType:`string`,arrayOk:!0,dflt:``,editType:`modebar`},remove:{valType:`string`,arrayOk:!0,dflt:``,editType:`modebar`}}}),Gn=l((e,t)=>{var n=$(),r=L(),i=lt(),a=Wn();t.exports=function(e,t){var o=e.modebar||{},s=i.newContainer(t,`modebar`);function c(e,t){return n.coerce(o,s,a,e,t)}c(`orientation`),c(`bgcolor`,r.addOpacity(t.paper_bgcolor,.5));var l=r.contrast(r.rgb(t.modebar.bgcolor));c(`color`,r.addOpacity(l,.3)),c(`activecolor`,r.addOpacity(l,.7)),c(`uirevision`,t.uirevision),c(`add`),c(`remove`)}}),Kn=l((e,t)=>{var n=f(),r=_(),i=$(),a=An(),o=u().version,s=new DOMParser;function c(e){this.container=e.container,this.element=document.createElement(`div`),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var l=c.prototype;l.update=function(e,t){this.graphInfo=e;var n=this.graphInfo._context,r=this.graphInfo._fullLayout,a=`modebar-`+r._uid;this.element.setAttribute(`id`,a),this.element.setAttribute(`role`,`toolbar`),this._uid=a,this.element.className=`modebar modebar--custom`,n.displayModeBar===`hover`&&(this.element.className+=` modebar--hover ease-bg`),r.modebar.orientation===`v`&&(this.element.className+=` vertical`,t=t.reverse());var o=r.modebar,s=`#`+a+` .modebar-group`;document.querySelectorAll(s).forEach(function(e){e.style.backgroundColor=o.bgcolor});var c=!this.hasButtons(t),l=this.hasLogo!==n.displaylogo,u=this.locale!==n.locale;if(this.locale=n.locale,(c||l||u)&&(this.removeAllButtons(),this.updateButtons(t),n.watermark||n.displaylogo)){var d=this.getLogo();n.watermark&&(d.className+=` watermark`),r.modebar.orientation===`v`?this.element.insertBefore(d,this.element.childNodes[0]):this.element.appendChild(d),this.hasLogo=!0}this.updateActiveButton(),i.setStyleOnHover(`#`+a+` .modebar-btn`,`.active`,`.icon path`,`fill: `+o.activecolor,`fill: `+o.color,this.element)},l.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(e){var n=t.createGroup();e.forEach(function(e){var r=e.name;if(!r)throw Error(`must provide button 'name' in button config`);if(t.buttonsNames.indexOf(r)!==-1)throw Error(`button name '`+r+`' is taken`);t.buttonsNames.push(r);var i=t.createButton(e);t.buttonElements.push(i),n.appendChild(i)}),t.element.appendChild(n)})},l.createGroup=function(){var e=document.createElement(`div`);e.className=`modebar-group`;var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e},l.createButton=function(e){var t=this,r=document.createElement(`button`);r.setAttribute(`type`,`button`),r.setAttribute(`rel`,`tooltip`),r.className=`modebar-btn`;var i=e.title;i===void 0?i=e.name:typeof i==`function`&&(i=i(this.graphInfo)),(i||i===0)&&(r.setAttribute(`data-title`,i),r.setAttribute(`aria-label`,i)),e.attr!==void 0&&r.setAttribute(`data-attr`,e.attr);var o=e.val;if(o!==void 0&&(typeof o==`function`&&(o=o(this.graphInfo)),r.setAttribute(`data-val`,o)),typeof e.click!=`function`)throw Error(`must provide button 'click' function in button config`);r.addEventListener(`click`,function(n){e.click(t.graphInfo,n),t.updateActiveButton(n.currentTarget)}),r.setAttribute(`data-toggle`,e.toggle||!1),e.toggle&&n.select(r).classed(`active`,!0);var s=e.icon;return typeof s==`function`?r.appendChild(s()):r.appendChild(this.createIcon(s||a.question)),r.setAttribute(`data-gravity`,e.gravity||`n`),r},l.createIcon=function(e){var t=r(e.height)?Number(e.height):e.ascent-e.descent,n=`http://www.w3.org/2000/svg`,i;if(e.path){i=document.createElementNS(n,`svg`),i.setAttribute(`viewBox`,[0,0,e.width,t].join(` `)),i.setAttribute(`class`,`icon`);var a=document.createElementNS(n,`path`);a.setAttribute(`d`,e.path),e.transform?a.setAttribute(`transform`,e.transform):e.ascent!==void 0&&a.setAttribute(`transform`,`matrix(1 0 0 -1 0 `+e.ascent+`)`),i.appendChild(a)}return e.svg&&(i=s.parseFromString(e.svg,`application/xml`).childNodes[0]),i.setAttribute(`height`,`1em`),i.setAttribute(`width`,`1em`),i},l.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e===void 0?null:e.getAttribute(`data-attr`);this.buttonElements.forEach(function(e){var a=e.getAttribute(`data-val`)||!0,o=e.getAttribute(`data-attr`),s=e.getAttribute(`data-toggle`)===`true`,c=n.select(e),l=function(e,n){var r=t.modebar,i=e.querySelector(`.icon path`);i&&(n||e.matches(`:hover`)?i.style.fill=r.activecolor:i.style.fill=r.color)};if(s){if(o===r){var u=!c.classed(`active`);c.classed(`active`,u),l(e,u)}}else{var d=o===null?o:i.nestedProperty(t,o).get();c.classed(`active`,d===a),l(e,d===a)}})},l.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var n=0;n{var n=dt(),r=Bt(),i=Ie(),a=Ht().isUnifiedHover,o=Kn(),s=Hn(),c=Un().DRAW_MODES,l=$().extendDeep;t.exports=function(e){var t=e._fullLayout,n=e._context,r=t._modeBar;if(!n.displayModeBar&&!n.watermark){r&&(r.destroy(),delete t._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw Error([`*modeBarButtonsToRemove* configuration options`,`must be an array.`].join(` `));if(!Array.isArray(n.modeBarButtonsToAdd))throw Error([`*modeBarButtonsToAdd* configuration options`,`must be an array.`].join(` `));var i=n.modeBarButtons,a=Array.isArray(i)&&i.length?h(i):!n.displayModeBar&&n.watermark?[]:u(e);r?r.update(e,a):t._modeBar=o(e,a)};function u(e){var t=e._fullLayout,n=e._fullData,r=e._context;function i(e,t){if(typeof t==`string`){if(t.toLowerCase()===e.toLowerCase())return!0}else{var n=t.name,r=t._cat||t.name;if(n===e||r===e.toLowerCase())return!0}return!1}var o=t.modebar.add;typeof o==`string`&&(o=[o]);var l=t.modebar.remove;typeof l==`string`&&(l=[l]);var u=r.modeBarButtonsToAdd.concat(o.filter(function(e){for(var t=0;t1?(N=[`toggleHover`],P=[`resetViews`]):v?(M=[`zoomInGeo`,`zoomOutGeo`],N=[`hoverClosestGeo`],P=[`resetGeo`]):_?(N=[`hoverClosest3d`],P=[`resetCameraDefault3d`,`resetCameraLastSave3d`]):S?(M=[`zoomInMapbox`,`zoomOutMapbox`],N=[`toggleHover`],P=[`resetViewMapbox`]):C?(M=[`zoomInMap`,`zoomOutMap`],N=[`toggleHover`],P=[`resetViewMap`]):y?N=[`hoverClosestPie`]:E?(N=[`hoverClosestCartesian`,`hoverCompareCartesian`],P=[`resetViewSankey`]):N=[`toggleHover`],g&&N.push(`toggleSpikelines`,`hoverClosestCartesian`,`hoverCompareCartesian`),(p(n)||O)&&(N=[]),g&&!D&&(M=[`zoomIn2d`,`zoomOut2d`,`autoScale2d`],P[0]!==`resetViews`&&(P=[`resetScale2d`])),_?F=[`zoom3d`,`pan3d`,`orbitRotation`,`tableRotation`]:g&&!D||x?F=[`zoom2d`,`pan2d`]:S||C||v?F=[`pan2d`]:w&&(F=[`zoom2d`]),f(n)&&F.push(`select2d`,`lasso2d`);var I=[],L=function(e){I.indexOf(e)===-1&&N.indexOf(e)!==-1&&I.push(e)};if(Array.isArray(u)){for(var R=[],z=0;z{t.exports={moduleType:`component`,name:`modebar`,layoutAttributes:Wn(),supplyLayoutDefaults:Gn(),manage:qn()}}),Yn=l((e,t)=>{var n=vt().FROM_BL;t.exports=function(e,t,r){r===void 0&&(r=n[e.constraintoward||`center`]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],a=i[0]+(i[1]-i[0])*r;e.range=e._input.range=[e.l2r(a+(i[0]-a)*t),e.l2r(a+(i[1]-a)*t)],e.setScale()}}),Xn=l(e=>{var t=$(),n=Yt(),r=dt().id2name,i=St(),a=Yn(),o=qt(),s=v().ALMOST_EQUAL,c=vt().FROM_BL;e.handleDefaults=function(e,n,i){for(var a=i.axIds,s=i.axHasImage,c=n._axisConstraintGroups=[],u=n._axisMatchGroups=[],d=0,f,p,m,h,g,_,v;da?n.slice(a):r.slice(i))+o}function m(e,t){for(var n=t._size,r=n.h/n.w,i={},a=Object.keys(e),o=0;os*y&&!C)){for(c=0;c<_.length;c++)if(u=_[c],f=x[u],d=S[u],p=d.constrain,f!==b||p===`domain`){if(g=f/b,p===`range`)a(d,g);else{var w=d._inputDomain,T=(d.domain[1]-d.domain[0])/(w[1]-w[0]),E=(d.r2l(d.range[1])-d.r2l(d.range[0]))/(d.r2l(d._inputRange[1])-d.r2l(d._inputRange[0]));if(g/=T,g*E<1){d.domain=d._input.domain=w.slice(),a(d,g);continue}if(E<1&&(d.range=d._input.range=d._inputRange.slice(),g*=E),d.autorange){var D=d.r2l(d.range[0]),O=d.r2l(d.range[1]),k=(D+O)/2,A=k,j=k,M=Math.abs(O-k),N=k-M*g*1.0001,P=k+M*g*1.0001,F=n.makePadFn(t,d,0),I=n.makePadFn(t,d,1);h(d,g);for(var L=Math.abs(d._m),R=n.concatExtremes(e,d),z=R.min,B=R.max,V,H=0;HN&&Vj&&(j=V);var U=(j-A)/(2*M);g/=U,A=d.l2r(A),j=d.l2r(j),d.range=d._input.range=D{var t=f(),n=Ie(),r=gt(),i=$(),a=yt(),o=kn(),s=L(),c=Gt(),l=Kt(),u=Jn(),d=Xt(),p=vt(),m=Xn(),h=m.enforce,g=m.clean,_=Yt().doAutoRange,v=`start`,y=`middle`,b=`end`,x=ut().zindexSeparator;e.layoutStyles=function(e){return i.syncOrAsync([r.doAutoMargin,C],e)};function S(e,t,n){for(var r=0;r=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function C(n){var a=n._fullLayout,o=a._size,l=o.p,f=d.list(n,``,!0),m,h,g,_,v,y;if(a._paperdiv.style({width:n._context.responsive&&a.autosize&&!n._context._hasZeroWidth&&!n.layout.width?`100%`:a.width+`px`,height:n._context.responsive&&a.autosize&&!n._context._hasZeroHeight&&!n.layout.height?`100%`:a.height+`px`}).selectAll(`.main-svg`).call(c.setSize,a.width,a.height),n._context.setBackground(n,a.paper_bgcolor),e.drawMainTitle(n),u.manage(n),!a._has(`cartesian`))return r.previousPromises(n);function b(e,t,n){var r=e._lw/2;if(e._id.charAt(0)===`x`){if(t){if(n===`top`)return t._offset-l-r}else return o.t+o.h*(1-(e.position||0))+r%1;return t._offset+t._length+l+r}if(t){if(n===`right`)return t._offset+t._length+l+r}else return o.l+o.w*(e.position||0)+r%1;return t._offset-l-r}for(m=0;m0){A(e,s,m,f),d.attr({x:u,y:s,"text-anchor":i,dy:N(n.yanchor)}).call(a.positionText,u,s);var h=(n.text.match(a.BR_TAG_ALL)||[]).length;if(h){var g=p.LINE_SPACING*h+p.MID_SHIFT;n.y===0&&(g=-g),d.selectAll(`.line`).each(function(){var e=+this.getAttribute(`dy`).slice(0,-2)-g+`em`;this.setAttribute(`dy`,e)})}var _=t.select(e).selectAll(`.gtitle-subtitle`);if(_.node()){var v=d.node().getBBox(),y=v.y+v.height+l.SUBTITLE_PADDING_EM*n.subtitle.font.size;_.attr({x:u,y,"text-anchor":i,dy:N(n.yanchor)}).call(a.positionText,u,y)}}}};function D(e,t,n,r,a){var o=t.yref===`paper`?e._fullLayout._size.h:e._fullLayout.height,s=i.isTopAnchor(t)?r:r-a,c=n===`b`?o-s:s;return i.isTopAnchor(t)&&n===`t`||i.isBottomAnchor(t)&&n===`b`?!1:c.5?`t`:`b`,o=e._fullLayout.margin[a],s=0;return t.yref===`paper`?s=n+t.pad.t+t.pad.b:t.yref===`container`&&(s=O(a,r,i,e._fullLayout.height,n)+t.pad.t+t.pad.b),s>o?s:0}function A(e,t,n,i){var a=`title.automargin`,o=e._fullLayout.title,s=o.y>.5?`t`:`b`,c={x:o.x,y:o.y,t:0,b:0},l={};o.yref===`paper`&&D(e,o,s,t,i)?c[s]=n:o.yref===`container`&&(l[s]=n,e._fullLayout._reservedMargin[a]=l),r.allowAutoMargin(e,a),r.autoMargin(e,a,c)}function j(e,t){var n=e.title,r=e._size,i=0;return t===v?i=n.pad.l:t===b&&(i=-n.pad.r),n.xref===`paper`?r.l+r.w*n.x+i:e.width*n.x+i}function M(e,t){var n=e.title,r=e._size,i=0;return t===`0em`||!t?i=-n.pad.b:t===p.CAP_SHIFT+`em`&&(i=n.pad.t),n.y===`auto`?r.t/2:n.yref===`paper`?r.t+r.h-r.h*n.y+i:e.height-e.height*n.y+i}function N(e){return e===`top`?p.CAP_SHIFT+.3+`em`:e===`bottom`?`-0.3em`:p.MID_SHIFT+`em`}function P(e){var t=e.title,n=y;return i.isRightAnchor(t)?n=b:i.isLeftAnchor(t)&&(n=v),n}function F(e){var t=e.title,n=`0em`;return i.isTopAnchor(t)?n=p.CAP_SHIFT+`em`:i.isMiddleAnchor(t)&&(n=p.MID_SHIFT+`em`),n}e.doTraceStyle=function(t){for(var i=t.calcdata,a=[],s=0;s{var n=Nn().readPaths,r=zn(),i=ft().clearOutlineControllers,a=L(),o=Gt(),s=lt().arrayEditor,c=Ln(),l=c.getPathString;t.exports={draw:u,drawOne:f,activateLastSelection:h};function u(e){var t=e._fullLayout;for(var n in i(e),t._selectionLayer.selectAll(`path`).remove(),t._plots){var r=t._plots[n].selectionLayer;r&&r.selectAll(`path`).remove()}for(var a=0;a=0;C--){var w=i.append(`path`).attr(h).style(`opacity`,C?.1:g).call(a.stroke,v).call(a.fill,_).call(o.dashLine,C?`solid`:b,C?4+y:y);if(p(w,e,u),x){var T=s(e.layout,`selections`,u);w.style({cursor:`move`});var E={element:w.node(),plotinfo:f,gd:e,editHelpers:T,isActiveSelection:!0};r(n(c,e),w,E)}else w.style(`pointer-events`,C?`all`:`none`);S[C]=w}var D=S[0];S[1].node().addEventListener(`click`,function(){return m(e,D)})}}function p(e,t,n){var r=n.xref+n.yref;o.setClipUrl(e,`clip`+t._fullLayout._uid+r,t)}function m(e,t){if(d(e)){var n=+t.node().getAttribute(`data-index`);if(n>=0){if(n===e._fullLayout._activeSelectionIndex){g(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=g,u(e)}}}function h(e){if(d(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=g,u(e)}}function g(e){d(e)&&e._fullLayout._activeSelectionIndex>=0&&(i(e),delete e._fullLayout._activeSelectionIndex,u(e))}}),$n=l((e,t)=>{function n(){var e,t=0,n=!1;function r(t,n){return e.list.push({type:t,data:n?JSON.parse(JSON.stringify(n)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return r(`check`,{seg1:e,seg2:t})},segmentChop:function(e,t){return r(`div_seg`,{seg:e,pt:t}),r(`chop`,{seg:e,pt:t})},statusRemove:function(e){return r(`pop_seg`,{seg:e})},segmentUpdate:function(e){return r(`seg_update`,{seg:e})},segmentNew:function(e,t){return r(`new_seg`,{seg:e,primary:t})},segmentRemove:function(e){return r(`rem_seg`,{seg:e})},tempStatus:function(e,t,n){return r(`temp_status`,{seg:e,above:t,below:n})},rewind:function(e){return r(`rewind`,{seg:e})},status:function(e,t,n){return r(`status`,{seg:e,above:t,below:n})},vert:function(t){return t===n?e:(n=t,r(`vert`,{x:t}))},log:function(e){return typeof e!=`string`&&(e=JSON.stringify(e,!1,` `)),r(`log`,{txt:e})},reset:function(){return r(`reset`)},selected:function(e){return r(`selected`,{segs:e})},chainStart:function(e){return r(`chain_start`,{seg:e})},chainRemoveHead:function(e,t){return r(`chain_rem_head`,{index:e,pt:t})},chainRemoveTail:function(e,t){return r(`chain_rem_tail`,{index:e,pt:t})},chainNew:function(e,t){return r(`chain_new`,{pt1:e,pt2:t})},chainMatch:function(e){return r(`chain_match`,{index:e})},chainClose:function(e){return r(`chain_close`,{index:e})},chainAddHead:function(e,t){return r(`chain_add_head`,{index:e,pt:t})},chainAddTail:function(e,t){return r(`chain_add_tail`,{index:e,pt:t})},chainConnect:function(e,t){return r(`chain_con`,{index1:e,index2:t})},chainReverse:function(e){return r(`chain_rev`,{index:e})},chainJoin:function(e,t){return r(`chain_join`,{index1:e,index2:t})},done:function(){return r(`done`)}},e}t.exports=n}),er=l((e,t)=>{function n(e){typeof e!=`number`&&(e=1e-10);var t={epsilon:function(t){return typeof t==`number`&&(e=t),e},pointAboveOrOnLine:function(t,n,r){var i=n[0],a=n[1],o=r[0],s=r[1],c=t[0],l=t[1];return(o-i)*(l-a)-(s-a)*(c-i)>=-e},pointBetween:function(t,n,r){var i=t[1]-n[1],a=r[0]-n[0],o=t[0]-n[0],s=r[1]-n[1],c=o*a+i*s;return c-e)},pointsSameX:function(t,n){return Math.abs(t[0]-n[0])e!=o-i>e&&(a-l)*(i-u)/(o-u)+l-r>e&&(s=!s),a=l,o=u}return s}};return t}t.exports=n}),tr=l((e,t)=>{t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return t!==null&&t!==e.root},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,n){for(var r=e.root,i=e.root.next;i!==null;){if(n(i)){t.prev=i.prev,t.next=i,i.prev.next=t,i.prev=t;return}r=i,i=i.next}r.next=t,t.prev=r,t.next=null},findTransition:function(t){for(var n=e.root,r=e.root.next;r!==null&&!t(r);)n=r,r=r.next;return{before:n===e.root?null:n,after:r,insert:function(e){return e.prev=n,e.next=r,n.next=e,r!==null&&(r.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}}),nr=l((e,t)=>{var n=tr();function r(e,t,r){function i(e,t){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:null,below:null},otherFill:null}}function a(e,t,n){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var o=n.create();function s(e,n,r,i,a,o){var s=t.pointsCompare(n,a);return s===0?t.pointsSame(r,o)?0:e===i?t.pointAboveOrOnLine(r,i?a:o,i?o:a)?1:-1:e?1:-1:s}function c(e,t){o.insertBefore(e,function(n){return s(e.isStart,e.pt,t,n.isStart,n.pt,n.other.pt)<0})}function l(e,t){var r=n.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return c(r,e.end),r}function u(e,t,r){var i=n.node({isStart:!1,pt:t.end,seg:t,primary:r,other:e,status:null});e.other=i,c(i,e.pt)}function d(e,t){var n=l(e,t);return u(n,e,t),n}function f(e,t){r&&r.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,c(e.other,e.pt)}function p(e,t){var n=a(t,e.seg.end,e.seg);return f(e,t),d(n,e.primary)}function m(i,a){var s=n.create();function c(e,n){var r=e.seg.start,i=e.seg.end,a=n.seg.start,o=n.seg.end;return t.pointsCollinear(r,a,o)?t.pointsCollinear(i,a,o)||t.pointAboveOrOnLine(i,a,o)?1:-1:t.pointAboveOrOnLine(r,a,o)?1:-1}function l(e){return s.findTransition(function(t){return c(e,t.ev)>0})}function u(e,n){var i=e.seg,a=n.seg,o=i.start,s=i.end,c=a.start,l=a.end;r&&r.checkIntersection(i,a);var u=t.linesIntersect(o,s,c,l);if(u===!1){if(!t.pointsCollinear(o,s,c)||t.pointsSame(o,l)||t.pointsSame(s,c))return!1;var d=t.pointsSame(o,c),f=t.pointsSame(s,l);if(d&&f)return n;var m=!d&&t.pointBetween(o,c,l),h=!f&&t.pointBetween(s,c,l);if(d)return h?p(n,s):p(e,l),n;m&&(f||(h?p(n,s):p(e,l)),p(n,o))}else u.alongA===0&&(u.alongB===-1?p(e,c):u.alongB===0?p(e,u.pt):u.alongB===1&&p(e,l)),u.alongB===0&&(u.alongA===-1?p(n,o):u.alongA===0?p(n,u.pt):u.alongA===1&&p(n,s));return!1}for(var d=[];!o.isEmpty();){var f=o.getHead();if(r&&r.vert(f.pt[0]),f.isStart){let t=function(){if(h){var e=u(f,h);if(e)return e}return g?u(f,g):!1};r&&r.segmentNew(f.seg,f.primary);var m=l(f),h=m.before?m.before.ev:null,g=m.after?m.after.ev:null;r&&r.tempStatus(f.seg,h?h.seg:!1,g?g.seg:!1);var _=t();if(_){if(e){var v=f.seg.myFill.below===null||f.seg.myFill.above!==f.seg.myFill.below;v&&(_.seg.myFill.above=!_.seg.myFill.above)}else _.seg.otherFill=f.seg.myFill;r&&r.segmentUpdate(_.seg),f.other.remove(),f.remove()}if(o.getHead()!==f){r&&r.rewind(f.seg);continue}if(e){var v=f.seg.myFill.below===null||f.seg.myFill.above!==f.seg.myFill.below;g?f.seg.myFill.below=g.seg.myFill.above:f.seg.myFill.below=i,v?f.seg.myFill.above=!f.seg.myFill.below:f.seg.myFill.above=f.seg.myFill.below}else if(f.seg.otherFill===null){var y=g?f.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:f.primary?a:i;f.seg.otherFill={above:y,below:y}}r&&r.status(f.seg,h?h.seg:!1,g?g.seg:!1),f.other.status=m.insert(n.node({ev:f}))}else{var b=f.status;if(b===null)throw Error(`PolyBool: Zero-length segment detected; your epsilon is probably too small or too large`);if(s.exists(b.prev)&&s.exists(b.next)&&u(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!f.primary){var x=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=x}d.push(f.seg)}o.getHead().remove()}return r&&r.done(),d}return e?{addRegion:function(e){for(var n,r=e[e.length-1],a=0;a{function n(e,t,n){var r=[],i=[];return e.forEach(function(e){var a=e.start,o=e.end;if(t.pointsSame(a,o)){console.warn(`PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large`);return}n&&n.chainStart(e);var s={index:0,matches_head:!1,matches_pt1:!1},c={index:0,matches_head:!1,matches_pt1:!1},l=s;function u(e,t,n){return l.index=e,l.matches_head=t,l.matches_pt1=n,l===s?(l=c,!1):(l=null,!0)}for(var d=0;d{function n(e,t,n){var r=[];return e.forEach(function(e){var i=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);t[i]!==0&&r.push({id:n?n.segmentId():-1,start:e.start,end:e.end,myFill:{above:t[i]===1,below:t[i]===2},otherFill:null})}),n&&n.selected(r),r}t.exports={union:function(e,t){return n(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return n(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return n(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return n(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return n(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}}}),ar=l((e,t)=>{t.exports={toPolygon:function(e,t){function n(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function n(t){var n=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[n]})}for(var r=n(t[0]),i=1;i{var n=$n(),r=er(),i=nr(),a=rr(),o=ir(),s=ar(),c=!1,l=r(),u={buildLog:function(e){return e===!0?c=n():e===!1&&(c=!1),c!==!1&&c.list},epsilon:function(e){return l.epsilon(e)},segments:function(e){var t=i(!0,l,c);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:i(!1,l,c).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:o.union(e.combined,c),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:o.intersect(e.combined,c),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:o.difference(e.combined,c),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:o.differenceRev(e.combined,c),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:o.xor(e.combined,c),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:a(e.segments,l,c),inverted:e.inverted}},polygonFromGeoJSON:function(e){return s.toPolygon(u,e)},polygonToGeoJSON:function(e){return s.fromPolygon(u,l,e)},union:function(e,t){return d(e,t,u.selectUnion)},intersect:function(e,t){return d(e,t,u.selectIntersect)},difference:function(e,t){return d(e,t,u.selectDifference)},differenceRev:function(e,t){return d(e,t,u.selectDifferenceRev)},xor:function(e,t){return d(e,t,u.selectXor)}};function d(e,t,n){var r=u.segments(e),i=u.segments(t),a=n(u.combine(r,i));return u.polygon(a)}typeof window==`object`&&(window.PolyBool=u),t.exports=u}),sr=l((e,t)=>{t.exports=function(e,t,n,r){var i=e[0],a=e[1],o=!1;n===void 0&&(n=0),r===void 0&&(r=t.length);for(var s=r-n,c=0,l=s-1;ca!=p>a&&i<(f-u)*(a-d)/(p-d)+u&&(o=!o)}return o}}),cr=l((e,t)=>{var n=Ce().dot,r=v().BADNUM,i=t.exports={};i.tester=function(e){var t=e.slice(),n=t[0][0],i=n,a=t[0][1],o=a,s;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),s=1;si||c===r||co||t&&l(e))}function d(e,s){var c=e[0],l=e[1];if(c===r||ci||l===r||lo)return!1;for(var u=t.length,d=t[0][0],f=t[0][1],p=0,m=1,h,g,_,v;mMath.max(h,d)||l>Math.max(g,f))){if(ls||Math.abs(n(d,l))>i)return!0;return!1},i.filter=function(e,t){var n=[e[0]],r=0,a=0;function o(o){e.push(o);var s=n.length,c=r;n.splice(a+1);for(var l=c+1;l1&&o(e.pop()),{addPt:o,raw:e,filtered:n}}}),lr=l((e,t)=>{t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:`-select`}}),ur=l((e,t)=>{var n=or(),r=sr(),i=Ie(),a=Gt().dashStyle,o=L(),s=Dn(),c=Ht().makeEventData,l=On(),u=l.freeMode,d=l.rectMode,f=l.drawMode,p=l.openMode,m=l.selectMode,h=Ln(),g=In(),_=zn(),v=ft().clearOutline,y=Nn(),b=y.handleEllipse,x=y.readPaths,S=Pn().newShapes,C=Fn(),w=Qn().activateLastSelection,T=$(),E=T.sorterAsc,D=cr(),O=Ge(),k=dt().getFromId,A=kn(),j=Zn().redrawReglTraces,M=lr(),N=M.MINSELECT,P=D.filter,F=D.tester,I=Mn(),R=I.p2r,z=I.axValue,B=I.getTransform;function V(e){return e.subplot!==void 0}function H(e,t,n,r,c){var l=!V(r),h=u(c),g=d(c),v=p(c),y=f(c),x=m(c),S=c===`drawline`,C=c===`drawcircle`,w=S||C,E=r.gd,D=E._fullLayout,k=x&&D.newselection.mode===`immediate`&&l,A=D._zoomlayer,j=r.element.getBoundingClientRect(),I=r.plotinfo,L=B(I),R=t-j.left,z=n-j.top;D._calcInverseTransform(E);var H=T.apply3DTransform(D._invTransform)(R,z);R=H[0],z=H[1];var W=D._invScaleX,G=D._invScaleY,K=R,Y=z,X=`M`+R+`,`+z,Z=r.xaxes[0],ne=r.yaxes[0],re=Z._length,ie=ne._length,ae=e.altKey&&!(f(c)&&v),oe,se,Q,ue,me,he,_e;J(e,E,r),h&&(oe=P([[R,z]],M.BENDPX));var ve=A.selectAll(`path.select-outline-`+I.id).data([1]),ye=y?D.newshape:D.newselection;y&&(r.hasText=ye.label.text||ye.label.texttemplate);var be=y&&!v?ye.fillcolor:`rgba(0,0,0,0)`,Se=ye.line.color||(l?o.contrast(E._fullLayout.plot_bgcolor):`#7f7f7f`);ve.enter().append(`path`).attr(`class`,`select-outline select-outline-`+I.id).style({opacity:y?ye.opacity/2:1,"stroke-dasharray":a(ye.line.dash,ye.line.width),"stroke-width":ye.line.width+`px`,"shape-rendering":`crispEdges`}).call(o.stroke,Se).call(o.fill,be).attr(`fill-rule`,`evenodd`).classed(`cursor-move`,!!y).attr(`transform`,L).attr(`d`,X+`Z`);var Ce=A.append(`path`).attr(`class`,`zoombox-corners`).style({fill:o.background,stroke:o.defaultLine,"stroke-width":1}).attr(`transform`,L).attr(`d`,`M0,0Z`);if(y&&r.hasText){var Oe=A.select(`.label-temp`);Oe.empty()&&(Oe=A.append(`g`).classed(`label-temp`,!0).classed(`select-outline`,!0).style({opacity:.8}))}var ke=D._uid+M.SELECTID,Ae=[],je=te(E,r.xaxes,r.yaxes,r.subplot);k&&!e.shiftKey&&(r._clearSubplotSelections=function(){if(l){var e=Z._id,t=ne._id;ge(E,e,t,je);for(var n=(E.layout||{}).selections||[],r=[],a=!1,o=0;o=0){E._fullLayout._deactivateShape(E);return}if(!y){var n=D.clickmode;O.done(ke).then(function(){if(O.clear(ke),e===2){for(ve.remove(),me=0;me-1&&U(t,E,r.xaxes,r.yaxes,r.subplot,r,ve),n===`event`&&Ee(E,void 0);s.click(E,t,I.id)}).catch(T.error)}},r.doneFn=function(){Ce.remove(),O.done(ke).then(function(){O.clear(ke),!k&&ue&&r.selectionDefs&&(ue.subtract=ae,r.selectionDefs.push(ue),r.mergedPolygons.length=0,[].push.apply(r.mergedPolygons,Q)),(k||y)&&ee(r,k),r.doneFnCompleted&&r.doneFnCompleted(Ae),x&&Ee(E,_e)}).catch(T.error)}}function U(e,t,n,r,i,a,o){var s=t._hoverdata,c=t._fullLayout.clickmode.indexOf(`event`)>-1,l=[],u,d,f,m,h,g,v,y,b,x;if(re(s)){J(e,t,a),u=te(t,n,r,i);var S=ie(s,u);if(S.pointNumbers.length>0?oe(u,S):se(u)&&(v=ae(S))){for(o&&o.remove(),x=0;x=0}function X(e){return e._fullLayout._activeSelectionIndex>=0}function ee(e,t){var n=e.dragmode,r=e.plotinfo,a=e.gd;Y(a)&&a._fullLayout._deactivateShape(a),X(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,s=f(n),c=m(n);if(s||c){var l=o.selectAll(`.select-outline-`+r.id);if(l&&a._fullLayout._outlining){var u;s&&(u=S(l,e)),u&&i.call(`_guiRelayout`,a,{shapes:u});var d;c&&!V(e)&&(d=C(l,e)),d&&(a._fullLayout._noEmitSelectedAtStart=!0,i.call(`_guiRelayout`,a,{selections:d}).then(function(){t&&w(a)})),a._fullLayout._outlining=!1}}r.selection={},r.selection.selectionDefs=e.selectionDefs=[],r.selection.mergedPolygons=e.mergedPolygons=[]}function Z(e){return e._id}function te(e,t,n,r){if(!e.calcdata)return[];for(var i=[],a=t.map(Z),o=n.map(Z),s,c,l=0;l0?r[0]:n;return t.selectedpoints?t.selectedpoints.indexOf(i)>-1:!1}function oe(e,t){for(var n=[],r,i,a,o=0;o0&&n.push(r);if(n.length===1&&(a=n[0]===t.searchInfo,a&&(i=t.searchInfo.cd[0].trace,i.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=r.selectedpoints.length,t>1)))return!1;return t===1}function ce(e,t,n){for(var r=0;r-1&&t;if(!o&&t){var Z=ve(e,!0);if(Z.length){var ne=Z[0].xref,re=Z[0].yref;if(ne&&re){var ie=xe(Z);Ce([k(e,ne,`x`),k(e,re,`y`)])(X,ie)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&Ee(e,X),p._reselect=!1}if(!o&&p._deselect){var ae=p._deselect;s=ae.xref,c=ae.yref,he(s,c,u)||ge(e,s,c,r),ee&&(X.points.length?Ee(e,X):De(e)),p._deselect=!1}return{eventData:X,selectionTesters:n}}function me(e){var t=e.calcdata;if(t)for(var n=0;n{t.exports=[{path:``,backoff:0},{path:`M-2.4,-3V3L0.6,0Z`,backoff:.6},{path:`M-3.7,-2.5V2.5L1.3,0Z`,backoff:1.3},{path:`M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z`,backoff:1.55},{path:`M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z`,backoff:1.6},{path:`M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z`,backoff:2},{path:`M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z`,backoff:0,noRotate:!0},{path:`M2,2V-2H-2V2Z`,backoff:0,noRotate:!0}]}),fr=l((e,t)=>{t.exports={axisRefDescription:function(e,t,n){return[`If set to a`,e,`axis id (e.g. *`+e+`* or`,`*`+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`",`position refers to the distance from the`,t,`of the plotting`,`area in normalized coordinates where *0* (*1*) corresponds to the`,t,`(`+n+`). If set to a`,e,`axis ID followed by`,`*domain* (separated by a space), the position behaves like for`,`*paper*, but refers to the distance in fractions of the domain`,`length from the`,t,`of the domain of that axis: e.g.,`,`*`+e+`2 domain* refers to the domain of the second`,e,` axis and a`,e,`position of 0.5 refers to the`,`point between the`,t,`and the`,n,`of the domain of the`,`second`,e,`axis.`].join(` `)}}}),pr=l((e,t)=>{var n=dr(),r=A(),i=ut(),a=lt().templatedArray;fr(),t.exports=a(`annotation`,{visible:{valType:`boolean`,dflt:!0,editType:`calc+arraydraw`},text:{valType:`string`,editType:`calc+arraydraw`},textangle:{valType:`angle`,dflt:0,editType:`calc+arraydraw`},font:r({editType:`calc+arraydraw`,colorEditType:`arraydraw`}),width:{valType:`number`,min:1,dflt:null,editType:`calc+arraydraw`},height:{valType:`number`,min:1,dflt:null,editType:`calc+arraydraw`},opacity:{valType:`number`,min:0,max:1,dflt:1,editType:`arraydraw`},align:{valType:`enumerated`,values:[`left`,`center`,`right`],dflt:`center`,editType:`arraydraw`},valign:{valType:`enumerated`,values:[`top`,`middle`,`bottom`],dflt:`middle`,editType:`arraydraw`},bgcolor:{valType:`color`,dflt:`rgba(0,0,0,0)`,editType:`arraydraw`},bordercolor:{valType:`color`,dflt:`rgba(0,0,0,0)`,editType:`arraydraw`},borderpad:{valType:`number`,min:0,dflt:1,editType:`calc+arraydraw`},borderwidth:{valType:`number`,min:0,dflt:1,editType:`calc+arraydraw`},showarrow:{valType:`boolean`,dflt:!0,editType:`calc+arraydraw`},arrowcolor:{valType:`color`,editType:`arraydraw`},arrowhead:{valType:`integer`,min:0,max:n.length,dflt:1,editType:`arraydraw`},startarrowhead:{valType:`integer`,min:0,max:n.length,dflt:1,editType:`arraydraw`},arrowside:{valType:`flaglist`,flags:[`end`,`start`],extras:[`none`],dflt:`end`,editType:`arraydraw`},arrowsize:{valType:`number`,min:.3,dflt:1,editType:`calc+arraydraw`},startarrowsize:{valType:`number`,min:.3,dflt:1,editType:`calc+arraydraw`},arrowwidth:{valType:`number`,min:.1,editType:`calc+arraydraw`},standoff:{valType:`number`,min:0,dflt:0,editType:`calc+arraydraw`},startstandoff:{valType:`number`,min:0,dflt:0,editType:`calc+arraydraw`},ax:{valType:`any`,editType:`calc+arraydraw`},ay:{valType:`any`,editType:`calc+arraydraw`},axref:{valType:`enumerated`,dflt:`pixel`,values:[`pixel`,i.idRegex.x.toString()],editType:`calc`},ayref:{valType:`enumerated`,dflt:`pixel`,values:[`pixel`,i.idRegex.y.toString()],editType:`calc`},xref:{valType:`enumerated`,values:[`paper`,i.idRegex.x.toString()],editType:`calc`},x:{valType:`any`,editType:`calc+arraydraw`},xanchor:{valType:`enumerated`,values:[`auto`,`left`,`center`,`right`],dflt:`auto`,editType:`calc+arraydraw`},xshift:{valType:`number`,dflt:0,editType:`calc+arraydraw`},yref:{valType:`enumerated`,values:[`paper`,i.idRegex.y.toString()],editType:`calc`},y:{valType:`any`,editType:`calc+arraydraw`},yanchor:{valType:`enumerated`,values:[`auto`,`top`,`middle`,`bottom`],dflt:`auto`,editType:`calc+arraydraw`},yshift:{valType:`number`,dflt:0,editType:`calc+arraydraw`},clicktoshow:{valType:`enumerated`,values:[!1,`onoff`,`onout`],dflt:!1,editType:`arraydraw`},xclick:{valType:`any`,editType:`arraydraw`},yclick:{valType:`any`,editType:`arraydraw`},hovertext:{valType:`string`,editType:`arraydraw`},hoverlabel:{bgcolor:{valType:`color`,editType:`arraydraw`},bordercolor:{valType:`color`,editType:`arraydraw`},font:r({editType:`arraydraw`}),editType:`arraydraw`},captureevents:{valType:`boolean`,editType:`arraydraw`},editType:`calc`})}),mr=l((e,t)=>{t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}),hr=l((e,t)=>{t.exports=function(e){return{valType:`color`,editType:`style`,anim:!0}}}),gr=l((e,t)=>{var n=xt().axisHoverFormat,{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:a}=ke(),o=wt(),s=A(),c=De().dash,l=De().pattern,u=Gt(),d=mr(),f=k().extendFlat,p=hr();function m(e){return{valType:`any`,dflt:0,editType:`calc`}}function h(e){return{valType:`any`,editType:`calc`}}function g(e){return{valType:`enumerated`,values:[`start`,`middle`,`end`],dflt:`middle`,editType:`calc`}}t.exports={x:{valType:`data_array`,editType:`calc+clearAxisTypes`,anim:!0},x0:{valType:`any`,dflt:0,editType:`calc+clearAxisTypes`,anim:!0},dx:{valType:`number`,dflt:1,editType:`calc`,anim:!0},y:{valType:`data_array`,editType:`calc+clearAxisTypes`,anim:!0},y0:{valType:`any`,dflt:0,editType:`calc+clearAxisTypes`,anim:!0},dy:{valType:`number`,dflt:1,editType:`calc`,anim:!0},xperiod:m(`x`),yperiod:m(`y`),xperiod0:h(`x0`),yperiod0:h(`y0`),xperiodalignment:g(`x`),yperiodalignment:g(`y`),xhoverformat:n(`x`),yhoverformat:n(`y`),offsetgroup:{valType:`string`,dflt:``,editType:`calc`},alignmentgroup:{valType:`string`,dflt:``,editType:`calc`},stackgroup:{valType:`string`,dflt:``,editType:`calc`},orientation:{valType:`enumerated`,values:[`v`,`h`],editType:`calc`},groupnorm:{valType:`enumerated`,values:[``,`fraction`,`percent`],dflt:``,editType:`calc`},stackgaps:{valType:`enumerated`,values:[`infer zero`,`interpolate`],dflt:`infer zero`,editType:`calc`},text:{valType:`string`,dflt:``,arrayOk:!0,editType:`calc`},texttemplate:i(),texttemplatefallback:a({editType:`calc`}),hovertext:{valType:`string`,dflt:``,arrayOk:!0,editType:`style`},mode:{valType:`flaglist`,flags:[`lines`,`markers`,`text`],extras:[`none`],editType:`calc`},hoveron:{valType:`flaglist`,flags:[`points`,`fills`],editType:`style`},hovertemplate:r({},{keys:d.eventDataKeys}),hovertemplatefallback:a(),line:{color:{valType:`color`,editType:`style`,anim:!0},width:{valType:`number`,min:0,dflt:2,editType:`style`,anim:!0},shape:{valType:`enumerated`,values:[`linear`,`spline`,`hv`,`vh`,`hvh`,`vhv`],dflt:`linear`,editType:`plot`},smoothing:{valType:`number`,min:0,max:1.3,dflt:1,editType:`plot`},dash:f({},c,{editType:`style`}),backoff:{valType:`number`,min:0,dflt:`auto`,arrayOk:!0,editType:`plot`},simplify:{valType:`boolean`,dflt:!0,editType:`plot`},editType:`plot`},connectgaps:{valType:`boolean`,dflt:!1,editType:`calc`},cliponaxis:{valType:`boolean`,dflt:!0,editType:`plot`},fill:{valType:`enumerated`,values:[`none`,`tozeroy`,`tozerox`,`tonexty`,`tonextx`,`toself`,`tonext`],editType:`calc`},fillcolor:p(!0),fillgradient:f({type:{valType:`enumerated`,values:[`radial`,`horizontal`,`vertical`,`none`],dflt:`none`,editType:`calc`},start:{valType:`number`,editType:`calc`},stop:{valType:`number`,editType:`calc`},colorscale:{valType:`colorscale`,editType:`style`},editType:`calc`}),fillpattern:l,marker:f({symbol:{valType:`enumerated`,values:u.symbolList,dflt:`circle`,arrayOk:!0,editType:`style`},opacity:{valType:`number`,min:0,max:1,arrayOk:!0,editType:`style`,anim:!0},angle:{valType:`angle`,dflt:0,arrayOk:!0,editType:`plot`,anim:!1},angleref:{valType:`enumerated`,values:[`previous`,`up`],dflt:`up`,editType:`plot`,anim:!1},standoff:{valType:`number`,min:0,dflt:0,arrayOk:!0,editType:`plot`,anim:!0},size:{valType:`number`,min:0,dflt:6,arrayOk:!0,editType:`calc`,anim:!0},maxdisplayed:{valType:`number`,min:0,dflt:0,editType:`plot`},sizeref:{valType:`number`,dflt:1,editType:`calc`},sizemin:{valType:`number`,min:0,dflt:0,editType:`calc`},sizemode:{valType:`enumerated`,values:[`diameter`,`area`],dflt:`diameter`,editType:`calc`},line:f({width:{valType:`number`,min:0,arrayOk:!0,editType:`style`,anim:!0},dash:f({},c,{arrayOk:!0}),editType:`calc`},o(`marker.line`,{anim:!0})),gradient:{type:{valType:`enumerated`,values:[`radial`,`horizontal`,`vertical`,`none`],arrayOk:!0,dflt:`none`,editType:`calc`},color:{valType:`color`,arrayOk:!0,editType:`calc`},editType:`calc`},editType:`calc`},o(`marker`,{anim:!0})),selected:{marker:{opacity:{valType:`number`,min:0,max:1,editType:`style`},color:{valType:`color`,editType:`style`},size:{valType:`number`,min:0,editType:`style`},editType:`style`},textfont:{color:{valType:`color`,editType:`style`},editType:`style`},editType:`style`},unselected:{marker:{opacity:{valType:`number`,min:0,max:1,editType:`style`},color:{valType:`color`,editType:`style`},size:{valType:`number`,min:0,editType:`style`},editType:`style`},textfont:{color:{valType:`color`,editType:`style`},editType:`style`},editType:`style`},textposition:{valType:`enumerated`,values:[`top left`,`top center`,`top right`,`middle left`,`middle center`,`middle right`,`bottom left`,`bottom center`,`bottom right`],dflt:`middle center`,arrayOk:!0,editType:`calc`},textfont:s({editType:`calc`,colorEditType:`style`,arrayOk:!0}),zorder:{valType:`integer`,dflt:0,editType:`plot`}}}),_r=l((e,t)=>{var n=pr(),r=gr().line,i=De().dash,a=k().extendFlat,o=Ee().overrideAll,s=lt().templatedArray;fr(),t.exports=o(s(`selection`,{type:{valType:`enumerated`,values:[`rect`,`path`]},xref:a({},n.xref,{}),yref:a({},n.yref,{}),x0:{valType:`any`},x1:{valType:`any`},y0:{valType:`any`},y1:{valType:`any`},path:{valType:`string`,editType:`arraydraw`},opacity:{valType:`number`,min:0,max:1,dflt:.7,editType:`arraydraw`},line:{color:r.color,width:a({},r.width,{min:1,dflt:1}),dash:a({},i,{dflt:`dot`})}}),`arraydraw`,`from-root`)}),vr=l((e,t)=>{var n=$(),r=Xt(),i=jt(),a=_r(),o=Ln();t.exports=function(e,t){i(e,t,{name:`selections`,handleItemDefaults:s});for(var n=t.selections,r=0;r{t.exports=function(e,t,n){n(`newselection.mode`),n(`newselection.line.width`)&&(n(`newselection.line.color`),n(`newselection.line.dash`)),n(`activeselection.fillcolor`),n(`activeselection.opacity`)}}),br=l((e,t)=>{var n=Ie(),r=$(),i=dt();t.exports=function(e){return function(t,a){var o=t[e];if(Array.isArray(o))for(var s=n.subplotsRegistry.cartesian,c=s.idRegex,l=a._subplots,u=l.xaxis,d=l.yaxis,f=l.cartesian,p=a._has(`cartesian`),m=0;m{var n=Qn(),r=ur();t.exports={moduleType:`component`,name:`selections`,layoutAttributes:_r(),supplyLayoutDefaults:vr(),supplyDrawNewSelectionDefaults:yr(),includeBasePlot:br()(`selections`),draw:n.draw,drawOne:n.drawOne,reselect:r.reselect,prepSelect:r.prepSelect,clearOutline:r.clearOutline,clearSelectionsCache:r.clearSelectionsCache,selectOnClick:r.selectOnClick}}),Sr=l((e,t)=>{var n=f(),r=$(),i=r.numberFormat,a=O(),o=en(),s=Ie(),c=r.strTranslate,l=yt(),u=L(),d=Gt(),p=Dn(),m=Xt(),h=on(),g=an(),_=On(),v=_.selectingOrDrawing,y=_.freeMode,b=vt().FROM_TL,x=kn(),S=Zn().redrawReglTraces,C=gt(),w=dt().getFromId,T=xr().prepSelect,E=xr().clearOutline,D=xr().selectOnClick,k=Yn(),A=ut(),j=A.MINDRAG,M=A.MINZOOM,N=!0;function P(e,t,i,o,c,u,f,h){var _=e._fullLayout._zoomlayer,O=f+h===`nsew`,N=(f+h).length===1,P,F,L,q,ie,ae,oe,se,ce,Q,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,be,xe;i+=t.yaxis._shift;function Se(){if(P=t.xaxis,F=t.yaxis,ce=P._length,Q=F._length,oe=P._offset,se=F._offset,L={},L[P._id]=P,q={},q[F._id]=F,f&&h)for(var n=t.overlays,r=0;r=0){i._fullLayout._deactivateShape(i);return}var a=i._fullLayout.clickmode;if(J(i),e===2&&!N&&Xe(),O)a.indexOf(`select`)>-1&&D(r,i,ie,ae,t.id,Te),a.indexOf(`event`)>-1&&p.click(i,r,t.id);else if(e===1&&N){var o=f?F:P,c=f===`s`||h===`w`?0:1,u=o._name+`.range[`+c+`]`,d=z(o,c),m=`left`,g=`middle`;if(o.fixedrange)return;f?(g=f===`n`?`top`:`bottom`,o.side===`right`&&(m=`right`)):h===`e`&&(m=`right`),i._context.showAxisRangeEntryBoxes&&n.select(we).call(l.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(d),fill:o.tickfont?o.tickfont.color:`#444`,horizontalAlign:m,verticalAlign:g}).on(`edit`,function(e){var t=o.d2r(e);t!==void 0&&s.call(`_guiRelayout`,i,u,t)})}}g.init(Te);var Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le;function Re(t,n,i){var o=we.getBoundingClientRect();Oe=n-o.left,ke=i-o.top,e._fullLayout._calcInverseTransform(e);var s=r.apply3DTransform(e._fullLayout._invTransform)(Oe,ke);Oe=s[0],ke=s[1],Ae={l:Oe,r:Oe,w:0,t:ke,b:ke,h:0},je=e._hmpixcount?e._hmlumcount/e._hmpixcount:a(e._fullLayout.plot_bgcolor).getLuminance(),Me=`M0,0H`+ce+`V`+Q+`H0V0`,Ne=!1,Pe=`xy`,Le=!1,Fe=W(_,je,oe,se,Me),Ie=G(_,oe,se)}function ze(t,n){if(e._transitioningWithDuration)return!1;var r=Math.max(0,Math.min(ce,be*t+Oe)),i=Math.max(0,Math.min(Q,xe*n+ke)),a=Math.abs(r-Oe),o=Math.abs(i-ke);Ae.l=Math.min(Oe,r),Ae.r=Math.max(Oe,r),Ae.t=Math.min(ke,i),Ae.b=Math.max(ke,i);function s(){Pe=``,Ae.r=Ae.l,Ae.t=Ae.b,Ie.attr(`d`,`M0,0Z`)}if(le.isSubplotConstrained)a>M||o>M?(Pe=`xy`,a/ce>o/Q?(o=a*Q/ce,ke>i?Ae.t=ke-o:Ae.b=ke+o):(a=o*ce/Q,Oe>r?Ae.l=Oe-a:Ae.r=Oe+a),Ie.attr(`d`,Z(Ae))):s();else if(ue.isSubplotConstrained){if(a>M||o>M){Pe=`xy`;var c=Math.min(Ae.l/ce,(Q-Ae.b)/Q),l=Math.max(Ae.r/ce,(Q-Ae.t)/Q);Ae.l=c*ce,Ae.r=l*ce,Ae.b=(1-c)*Q,Ae.t=(1-l)*Q,Ie.attr(`d`,Z(Ae))}else s()}else!fe||o0){var d;if(ue.isSubplotConstrained||!de&&fe.length===1){for(d=0;d1&&(l.maxallowed!==void 0&&me===(l.range[0]1&&(u.maxallowed!==void 0&&he===(u.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function U(e,t,n){return e?e===`nsew`?n?``:t===`pan`?`move`:`crosshair`:e.toLowerCase()+`-resize`:`pointer`}function W(e,t,n,r,i){return e.append(`path`).attr(`class`,`zoombox`).style({fill:t>.2?`rgba(0,0,0,0)`:`rgba(255,255,255,0)`,"stroke-width":0}).attr(`transform`,c(n,r)).attr(`d`,i+`Z`)}function G(e,t,n){return e.append(`path`).attr(`class`,`zoombox-corners`).style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr(`transform`,c(t,n)).attr(`d`,`M0,0Z`)}function K(e,t,n,r,i,a){e.attr(`d`,r+`M`+n.l+`,`+n.t+`v`+n.h+`h`+n.w+`v-`+n.h+`h-`+n.w+`Z`),q(e,t,i,a)}function q(e,t,n,r){n||(e.transition().style(`fill`,r>.2?`rgba(0,0,0,0.4)`:`rgba(255,255,255,0.3)`).duration(200),t.transition().style(`opacity`,1).duration(200))}function J(e){n.select(e).selectAll(`.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners`).remove()}function Y(e){N&&e.data&&e._context.showTips&&(r.notifier(r._(e,`Double-click to zoom back out`),`long`,e),N=!1)}function X(e,t){return`M`+(e.l-.5)+`,`+(t-M-.5)+`h-3v`+(2*M+1)+`h3ZM`+(e.r+.5)+`,`+(t-M-.5)+`h3v`+(2*M+1)+`h-3Z`}function ee(e,t){return`M`+(t-M-.5)+`,`+(e.t-.5)+`v-3h`+(2*M+1)+`v3ZM`+(t-M-.5)+`,`+(e.b+.5)+`v3h`+(2*M+1)+`v-3Z`}function Z(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,M)/2);return`M`+(e.l-3.5)+`,`+(e.t-.5+t)+`h3v`+-t+`h`+t+`v-3h-`+(t+3)+`ZM`+(e.r+3.5)+`,`+(e.t-.5+t)+`h-3v`+-t+`h`+-t+`v-3h`+(t+3)+`ZM`+(e.r+3.5)+`,`+(e.b+.5-t)+`h-3v`+t+`h`+-t+`v3h`+(t+3)+`ZM`+(e.l-3.5)+`,`+(e.b+.5-t)+`h3v`+t+`h`+t+`v3h-`+(t+3)+`Z`}function te(e,t,n,i,a){for(var o=!1,s={},c={},l,u,d,f,p=(a||{}).xaHash,m=(a||{}).yaHash,h=0;h{var t=f(),n=Dn(),r=an(),i=on(),a=Sr().makeDragBox,o=ut().DRAGGERSIZE;e.initInteractions=function(i){var s=i._fullLayout;if(i._context.staticPlot){t.select(i).selectAll(`.drag`).remove();return}if(s._has(`cartesian`)||s._has(`splom`)){Object.keys(s._plots||{}).sort(function(e,t){if((s._plots[e].mainplot&&!0)===(s._plots[t].mainplot&&!0)){var n=e.split(`y`),r=t.split(`y`);return n[0]===r[0]?Number(n[1]||1)-Number(r[1]||1):Number(n[0]||1)-Number(r[0]||1)}return s._plots[e].mainplot?1:-1}).forEach(function(e){var t=s._plots[e],c=t.xaxis,l=t.yaxis;if(!t.mainplot){var u=a(i,t,c._offset,l._offset,c._length,l._length,`ns`,`ew`);u.onmousemove=function(t){i._fullLayout._rehover=function(){i._fullLayout._hoversubplot===e&&i._fullLayout._plots[e]&&n.hover(i,t,e)},n.hover(i,t,e),i._fullLayout._lasthover=u,i._fullLayout._hoversubplot=e},u.onmouseout=function(e){i._dragging||(i._fullLayout._hoversubplot=null,r.unhover(i,e))},i._context.showAxisDragHandles&&(a(i,t,c._offset-o,l._offset-o,o,o,`n`,`w`),a(i,t,c._offset+c._length,l._offset-o,o,o,`n`,`e`),a(i,t,c._offset-o,l._offset+l._length,o,o,`s`,`w`),a(i,t,c._offset+c._length,l._offset+l._length,o,o,`s`,`e`))}if(i._context.showAxisDragHandles){if(e===c._mainSubplot){var d=c._mainLinePosition;c.side===`top`&&(d-=o),a(i,t,c._offset+c._length*.1,d,c._length*.8,o,``,`ew`),a(i,t,c._offset,d,c._length*.1,o,``,`w`),a(i,t,c._offset+c._length*.9,d,c._length*.1,o,``,`e`)}if(e===l._mainSubplot){var f=l._mainLinePosition;l.side!==`right`&&(f-=o),a(i,t,f,l._offset+l._length*.1,o,l._length*.8,`ns`,``),a(i,t,f,l._offset+l._length*.9,o,l._length*.1,`s`,``),a(i,t,f,l._offset,o,l._length*.1,`n`,``)}}});var c=s._hoverlayer.node();c.onmousemove=function(e){e.target=i._fullLayout._lasthover,n.hover(i,e,s._hoversubplot)},c.onclick=function(e){e.target=i._fullLayout._lasthover,n.click(i,e)},c.onmousedown=function(e){i._fullLayout._lasthover.onmousedown(e)},e.updateFx(i)}},e.updateFx=function(e){var t=e._fullLayout,n=t.dragmode===`pan`?`move`:`crosshair`;i(t._draggers,n)}}),wr=l((e,t)=>{var n=Ie();t.exports=function(e){for(var t=n.layoutArrayContainers,r=n.layoutArrayRegexes,i=e.split(`[`)[0],a,o,s=0;s{var t=b(),n=W(),r=U(),i=ze().sorterAsc,a=Ie();e.containerArrayMatch=wr();var o=e.isAddVal=function(e){return e===`add`||t(e)},s=e.isRemoveVal=function(e){return e===null||e===`remove`};e.applyContainerArrayChanges=function(e,t,c,l,u){var d=t.astr,f=a.getComponentMethod(d,`supplyLayoutDefaults`),p=a.getComponentMethod(d,`draw`),m=a.getComponentMethod(d,`drawOne`),h=l.replot||l.recalc||f===n||p===n,g=e.layout,_=e._fullLayout;if(c[``]){Object.keys(c).length>1&&r.warn(`Full array edits are incompatible with other edits`,d);var v=c[``][``];if(s(v))t.set(null);else if(Array.isArray(v))t.set(v);else return r.warn(`Unrecognized full array edit value`,d,v),!0;return!h&&(f(g,_),p(e),!0)}for(var y=Object.keys(c).map(Number).sort(i),b=t.get(),x=b||[],S=u(_,d).get(),C=[],w=-1,T=x.length,E=0,D,O,k,A,j,M,N;Ex.length-+!M){r.warn(`index out of range`,d,O);continue}if(j!==void 0)A.length>1&&r.warn(`Insertion & removal are incompatible with edits to the same index.`,d,O),s(j)?C.push(O):M?(j===`add`&&(j={}),x.splice(O,0,j),S&&S.splice(O,0,{})):r.warn(`Unrecognized full object edit value`,d,O,j),w===-1&&(w=O);else for(D=0;D=0;E--)x.splice(C[E],1),S&&S.splice(C[E],1);if(x.length?b||t.set(x):t.set(null),h)return!1;if(f(g,_),m!==n){var P;if(w===-1)P=y;else{for(T=Math.max(x.length,T),P=[],E=0;E=w));E++)P.push(O);for(E=w;E{var t=_(),n=Ie(),r=$(),i=gt(),a=dt(),o=L(),s=a.cleanId,c=a.getFromTrace,l=n.traceIs,u=[`x`,`y`,`z`];e.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&r.log(`Clearing previous rejected promises from queue.`),e._promises=[]},e.cleanLayout=function(t){var n;t||={},t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(i.subplotsRegistry.cartesian||{}).attrRegex;(i.subplotsRegistry.polar||{}).attrRegex,(i.subplotsRegistry.ternary||{}).attrRegex,(i.subplotsRegistry.gl3d||{}).attrRegex;var c=Object.keys(t);for(n=0;n3?(y.x=1.02,y.xanchor=`left`):y.x<-2&&(y.x=-.02,y.xanchor=`right`),y.y>3?(y.y=1.02,y.yanchor=`bottom`):y.y<-2&&(y.y=-.02,y.yanchor=`top`)),t.dragmode===`rotate`&&(t.dragmode=`orbit`),o.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t};function d(e,t,n=!1){var r=e[t],i=t.charAt(0);n&&Array.isArray(r)||r&&r!==`paper`&&(e[t]=s(r,i,!0))}e.cleanData=function(t){for(var a=0;a0)return e.slice(0,t)}e.hasParent=function(e,t){for(var n=v(t);n;){if(n in e)return!0;n=v(n)}return!1},e.clearAxisTypes=function(e,t,n){for(var i=0;i{let n=(...e)=>e.every(e=>r.isPlainObject(e))||e.every(e=>Array.isArray(e));if([e,t].every(e=>Array.isArray(e))){if(e.length!==t.length)return!1;for(let r=0;rr.isPlainObject(e))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){if(r.startsWith(`_`))continue;let i=e[r],a=t[r];if(i!==a&&!(n(i,a)&&y(i,a)))return!1}return!0}return!1};e.collectionsAreEqual=y}),Dr=l(e=>{var t=f(),n=_(),r=rt(),i=$(),a=i.nestedProperty,o=at(),s=ot(),c=Ie(),l=ct(),u=gt(),d=Xt(),p=Qt(),m=St(),h=Gt(),g=L(),v=Cr().initInteractions,y=_t(),b=xr().clearOutline,x=V().dfltConfig,S=Tr(),C=Er(),w=Zn(),T=Ee(),E=ut().AX_NAME_PATTERN,D=0,O=5;function k(n,r,a,s){var l;if(n=i.getGraphDiv(n),o.init(n),i.isPlainObject(r)){var f=r;r=f.data,a=f.layout,s=f.config,l=f.frames}if(o.triggerHandler(n,`plotly_beforeplot`,[r,a,s])===!1)return Promise.reject();!r&&!a&&!i.isPlotDiv(n)&&i.warn(`Calling _doPlot as if redrawing but this container doesn't yet have a plot.`,n);function p(){if(l)return e.addFrames(n,l)}P(n,s),a||={},t.select(n).classed(`js-plotly-plot`,!0),h.makeTester(),Array.isArray(n._promises)||(n._promises=[]);var m=(n.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(C.cleanData(r),m?n.data=r:n.data.push.apply(n.data,r),n.empty=!1),(!n.layout||m)&&(n.layout=C.cleanLayout(a)),u.supplyDefaults(n);var g=n._fullLayout,_=g._has(`cartesian`);g._replotting=!0,(m||g._shouldCreateBgLayer)&&(Ne(n),g._shouldCreateBgLayer&&delete g._shouldCreateBgLayer),h.initGradients(n),h.initPatterns(n),m&&d.saveShowSpikeInitial(n);var y=!n.calcdata||n.calcdata.length!==(n._fullData||[]).length;y&&u.doCalcdata(n);for(var b=0;b=e.data.length||i<-e.data.length)throw Error(n+` must be valid indices for gd.data.`);if(t.indexOf(i,r+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw Error(`each index in `+n+` must be unique.`)}}function B(e,t,n){if(!Array.isArray(e.data))throw Error(`gd.data must be an array.`);if(t===void 0)throw Error(`currentIndices is a required argument.`);if(Array.isArray(t)||(t=[t]),z(e,t,`currentIndices`),n!==void 0&&!Array.isArray(n)&&(n=[n]),n!==void 0&&z(e,n,`newIndices`),n!==void 0&&t.length!==n.length)throw Error(`current and new indices must be of equal length.`)}function H(e,t,n){var r,i;if(!Array.isArray(e.data))throw Error(`gd.data must be an array.`);if(t===void 0)throw Error(`traces must be defined.`);for(Array.isArray(t)||(t=[t]),r=0;r=0&&n=0&&n0&&typeof N.parts[F]!=`string`;)F--;var I=N.parts[F],L=N.parts[F-1]+`.`+I,R=N.parts.slice(0,F).join(`.`),z=a(e.layout,R).get(),B=a(r,R).get(),V=N.get();if(P!==void 0){w[M]=P,D[M]=I===`reverse`?P:te(V);var H=l.getLayoutValObject(r,N.parts);if(H&&H.impliedEdits&&P!==null)for(var U in H.impliedEdits)O(i.relativeAttr(M,U),H.impliedEdits[U]);if([`width`,`height`].indexOf(M)!==-1){if(P){O(`autosize`,null);var W=M===`height`?`width`:`height`;O(W,r[W])}else r[M]=e._initialAutoSize[M]}else if(M===`autosize`)O(`width`,P?null:r.width),O(`height`,P?null:r.height);else if(L.match(Q))j(L),a(r,R+`._inputRange`).set(null);else if(L.match(le)){j(L),a(r,R+`._inputRange`).set(null);var G=a(r,R).get();G._inputDomain&&(G._input.domain=G._inputDomain.slice())}else L.match(ue)&&a(r,R+`._inputDomain`).set(null);if(I===`type`){A=z;var K=B.type===`linear`&&P===`log`,q=B.type===`log`&&P===`linear`;if(K||q){if(!A||!A.range)O(R+`.autorange`,!0);else if(B.autorange)K&&(A.range=A.range[1]>A.range[0]?[1,2]:[2,1]);else{var J=A.range[0],Y=A.range[1];K?(J<=0&&Y<=0&&O(R+`.autorange`,!0),J<=0?J=Y/1e6:Y<=0&&(Y=J/1e6),O(R+`.range[0]`,Math.log(J)/Math.LN10),O(R+`.range[1]`,Math.log(Y)/Math.LN10)):(O(R+`.range[0]`,10**J),O(R+`.range[1]`,10**Y))}Array.isArray(r._subplots.polar)&&r._subplots.polar.length&&r[N.parts[0]]&&N.parts[1]===`radialaxis`&&delete r[N.parts[0]]._subplot.viewInitial[`radialaxis.range`],c.getComponentMethod(`annotations`,`convertCoords`)(e,B,P,O),c.getComponentMethod(`images`,`convertCoords`)(e,B,P,O)}else O(R+`.autorange`,!0),O(R+`.range`,null);a(r,R+`._inputRange`).set(null)}else if(I.match(E)){var X=a(r,M).get(),ee=(P||{}).type;(!ee||ee===`-`)&&(ee=`linear`),c.getComponentMethod(`annotations`,`convertCoords`)(e,X,ee,O),c.getComponentMethod(`images`,`convertCoords`)(e,X,ee,O)}var Z=S.containerArrayMatch(M);if(Z){h=Z.array,g=Z.index;var re=Z.property,ie=H||{editType:`calc`};g!==``&&re===``&&(S.isAddVal(P)?D[M]=null:S.isRemoveVal(P)?D[M]=(a(n,h).get()||[])[g]:i.warn(`unrecognized full object value`,t)),T.update(x,ie),m[h]||(m[h]={});var ae=m[h][g];ae||=m[h][g]={},ae[re]=P,delete t[M]}else I===`reverse`?(z.range?z.range.reverse():(O(R+`.autorange`,!0),z.range=[1,0]),B.autorange?x.calc=!0:x.plot=!0):(M===`dragmode`&&(P===!1&&V!==!1||P!==!1&&V===!1)||r._has(`scatter-like`)&&r._has(`regl`)&&M===`dragmode`&&(P===`lasso`||P===`select`)&&V!==`lasso`&&V!==`select`?x.plot=!0:H?T.update(x,H):x.calc=!0,N.set(P))}}for(h in m)S.applyContainerArrayChanges(e,s(n,h),m[h],x,s)||(x.plot=!0);for(var oe in k){A=d.getFromId(e,oe);var se=A&&A._constraintGroup;if(se)for(var ce in x.calc=!0,se)k[ce]||(d.getFromId(e,ce)._constraintShrinkable=!0)}(fe(e)||t.height||t.width)&&(x.plot=!0);var de=r.shapes;for(g=0;g1;)if(r.pop(),n=a(t,r.join(`.`)+`.uirevision`).get(),n!==void 0)return n;return t.uirevision}function ye(e,t){for(var n=0;n[e,t._ev.listeners(e)]);s=e.newPlot(t,n,r,a).then(()=>{for(let[e,n]of i)n.forEach(n=>t.on(e,n));return e.react(t,n,r,a)})}else{t.data=n||[],C.cleanData(t.data),t.layout=r||{},C.cleanLayout(t.layout),Se(t.data,t.layout,d,f),u.supplyDefaults(t,{skipUpdateCalc:!0});var h=t._fullData,g=t._fullLayout,_=g.datarevision===void 0,v=g.transition,y=Te(t,f,g,_,v),b=y.newDataRevision,x=we(t,d,h,_,v,b);if(fe(t)&&(y.layoutReplot=!0),x.calc||y.calc){t.calcdata=void 0;for(var S=Object.getOwnPropertyNames(g),T=0;T(m||t.emit(`plotly_react`,{config:a,data:n,layout:r}),t))}function we(e,t,n,r,i,a){var o=t.length===n.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s=T.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var c,u;function d(e){var t=l.getTraceValObject(u,e);return!u._module.animatable&&t.anim&&(t.anim=!1),t}var f={getValObject:d,flags:s,immutable:r,transition:i,newDataRevision:a,gd:e},p={};for(c=0;c=a.length?a[0]:a[e]:a}function c(e){return Array.isArray(o)?e>=o.length?o[0]:o[e]:o}function l(e,t){var n=0;return function(){if(e&&++n===t)return e()}}return new Promise(function(o,d){function f(){if(r._frameQueue.length!==0){for(;r._frameQueue.length;){var t=r._frameQueue.pop();t.onInterrupt&&t.onInterrupt()}e.emit(`plotly_animationinterrupted`,[])}}function p(t){if(t.length!==0){for(var i=0;ir._timeToNext&&h()};t()}var _=0;function v(e){return e.transitionOpts=Array.isArray(a)?_>=a.length?a[_]:a[0]:a,_++,e}var y,b,x=[],S=t==null,w=Array.isArray(t);if(!S&&!w&&i.isPlainObject(t))x.push({type:`object`,data:v(i.extendFlat({},t))});else if(S||[`string`,`number`].indexOf(typeof t)!==-1)for(y=0;y0&&DD)&&O.push(b);x=O}}x.length>0?p(x):(e.emit(`plotly_animated`),o())})}function ke(e,t,n){if(e=i.getGraphDiv(e),t==null)return Promise.resolve();if(!i.isPlotDiv(e))throw Error(`This element is not a Plotly plot: `+e+`. It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/`);var r,a,o,c,l=e._transitionData._frames,d=e._transitionData._frameHash;if(!Array.isArray(t))throw Error(`addFrames failure: frameList must be an Array of frame definitions`+t);var f=l.length+t.length*2,p=[],m={};for(r=t.length-1;r>=0;r--)if(i.isPlainObject(t[r])){var h=t[r].name,g=(d[h]||m[h]||{}).name,_=t[r].name,v=d[g]||m[g];g&&_&&typeof _==`number`&&v&&Dt.index?-1:+(e.index=0;r--){if(a=p[r].frame,typeof a.name==`number`&&i.warn(`Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings`),!a.name)for(;d[a.name=`frame `+e._transitionData._counter++];);if(d[a.name]){for(o=0;o=0;n--)r=t[n],o.push({type:`delete`,index:r}),c.unshift({type:`insert`,index:r,value:a[r]});var l=u.modifyFrames,d=u.modifyFrames,f=[e,c],p=[e,o];return s&&s.add(e,l,f,d,p),u.modifyFrames(e,o)}function je(e){e=i.getGraphDiv(e);var t=e._fullLayout||{},n=e._fullData||[];return u.cleanPlot([],{},n,t),u.purge(e),o.purge(e),t._container&&t._container.remove(),delete e._context,e}function Me(e){var t=e._fullLayout,n=e.getBoundingClientRect();if(!i.equalDomRects(n,t._lastBBox)){var r=t._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(r[0][0]*r[0][0]+r[0][1]*r[0][1]+r[0][2]*r[0][2]),t._invScaleY=Math.sqrt(r[1][0]*r[1][0]+r[1][1]*r[1][1]+r[1][2]*r[1][2]),t._lastBBox=n}}function Ne(e){var n=t.select(e),r=e._fullLayout;if(r._calcInverseTransform=Me,r._calcInverseTransform(e),r._container=n.selectAll(`.plot-container`).data([0]),r._container.enter().insert(`div`,`:first-child`).classed(`plot-container`,!0).classed(`plotly`,!0).style({width:`100%`,height:`100%`}),r._paperdiv=r._container.selectAll(`.svg-container`).data([0]),r._paperdiv.enter().append(`div`).classed(`user-select-none`,!0).classed(`svg-container`,!0).style(`position`,`relative`),r._glcontainer=r._paperdiv.selectAll(`.gl-container`).data([{}]),r._glcontainer.enter().append(`div`).classed(`gl-container`,!0),r._paperdiv.selectAll(`.main-svg`).remove(),r._paperdiv.select(`.modebar-container`).remove(),r._paper=r._paperdiv.insert(`svg`,`:first-child`).classed(`main-svg`,!0),r._toppaper=r._paperdiv.append(`svg`).classed(`main-svg`,!0),r._modebardiv=r._paperdiv.append(`div`),delete r._modeBar,r._hoverpaper=r._paperdiv.append(`svg`).classed(`main-svg`,!0),!r._uid){var a={};t.selectAll(`defs`).each(function(){this.id&&(a[this.id.split(`-`)[1]]=1)}),r._uid=i.randstr(a)}r._paperdiv.selectAll(`.main-svg`).attr(y.svgAttrs),r._defs=r._paper.append(`defs`).attr(`id`,`defs-`+r._uid),r._clips=r._defs.append(`g`).classed(`clips`,!0),r._topdefs=r._toppaper.append(`defs`).attr(`id`,`topdefs-`+r._uid),r._topclips=r._topdefs.append(`g`).classed(`clips`,!0),r._bgLayer=r._paper.append(`g`).classed(`bglayer`,!0),r._draggers=r._paper.append(`g`).classed(`draglayer`,!0);var o=r._paper.append(`g`).classed(`layer-below`,!0);r._imageLowerLayer=o.append(`g`).classed(`imagelayer`,!0),r._shapeLowerLayer=o.append(`g`).classed(`shapelayer`,!0),r._cartesianlayer=r._paper.append(`g`).classed(`cartesianlayer`,!0),r._polarlayer=r._paper.append(`g`).classed(`polarlayer`,!0),r._smithlayer=r._paper.append(`g`).classed(`smithlayer`,!0),r._ternarylayer=r._paper.append(`g`).classed(`ternarylayer`,!0),r._geolayer=r._paper.append(`g`).classed(`geolayer`,!0),r._funnelarealayer=r._paper.append(`g`).classed(`funnelarealayer`,!0),r._pielayer=r._paper.append(`g`).classed(`pielayer`,!0),r._iciclelayer=r._paper.append(`g`).classed(`iciclelayer`,!0),r._treemaplayer=r._paper.append(`g`).classed(`treemaplayer`,!0),r._sunburstlayer=r._paper.append(`g`).classed(`sunburstlayer`,!0),r._indicatorlayer=r._toppaper.append(`g`).classed(`indicatorlayer`,!0),r._glimages=r._paper.append(`g`).classed(`glimages`,!0);var s=r._toppaper.append(`g`).classed(`layer-above`,!0);r._imageUpperLayer=s.append(`g`).classed(`imagelayer`,!0),r._shapeUpperLayer=s.append(`g`).classed(`shapelayer`,!0),r._selectionLayer=r._toppaper.append(`g`).classed(`selectionlayer`,!0),r._infolayer=r._toppaper.append(`g`).classed(`infolayer`,!0),r._menulayer=r._toppaper.append(`g`).classed(`menulayer`,!0),r._zoomlayer=r._toppaper.append(`g`).classed(`zoomlayer`,!0),r._hoverlayer=r._hoverpaper.append(`g`).classed(`hoverlayer`,!0),r._modebardiv.classed(`modebar-container`,!0).style(`position`,`absolute`).style(`top`,`0px`).style(`right`,`0px`),e.emit(`plotly_framework`)}e.animate=Oe,e.addFrames=ke,e.deleteFrames=Ae,e.addTraces=Y,e.deleteTraces=X,e.extendTraces=q,e.moveTraces=ee,e.prependTraces=J,e.newPlot=I,e._doPlot=k,e.purge=je,e.react=Ce,e.redraw=F,e.relayout=oe,e.restyle=Z,e.setPlotConfig=j,e.update=pe,e._guiRelayout=me(oe),e._guiRestyle=me(Z),e._guiUpdate=me(pe),e._storeDirectGUIEdit=ie}),Or=l(e=>{var t=Ie();e.getDelay=function(e){return e._has&&(e._has(`gl3d`)||e._has(`mapbox`)||e._has(`map`))?500:0},e.getRedrawFunc=function(e){return function(){t.getComponentMethod(`colorbar`,`draw`)(e)}},e.encodeSVG=function(e){return`data:image/svg+xml,`+encodeURIComponent(e)},e.encodeJSON=function(e){return`data:application/json,`+encodeURIComponent(e)};var n=window.URL||window.webkitURL;e.createObjectURL=function(e){return n.createObjectURL(e)},e.revokeObjectURL=function(e){return n.revokeObjectURL(e)},e.createBlob=function(e,t){if(t===`svg`)return new window.Blob([e],{type:`image/svg+xml;charset=utf-8`});if(t===`full-json`)return new window.Blob([e],{type:`application/json;charset=utf-8`});var n=r(window.atob(e));return new window.Blob([n],{type:`image/`+t})},e.octetStream=function(e){document.location.href=`data:application/octet-stream`+e};function r(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i{var n=f();$();var r=Gt(),i=L();_t();var a=/"/g,o=`TOBESTRIPPED`,s=RegExp(`("${o})|(${o}")|("${o})|(${o}")`,`g`),c=[`&`,`&`,`&`,`"`,`"`,`"`,`'`,`'`,`'`],l=[`<`,`<`,`<`],u=[`>`,`>`,`>`];function d(e){let t=n.select(`body`).append(`div`).style({display:`none`}).html(``),r=e.replace(/(&[^;]*;)/gi,e=>{let n=e.toLowerCase();return c.includes(n)?e:l.includes(n)?`<`:u.includes(n)?`>`:e.includes(`<`)||e.includes(`>`)?``:t.html(e).text()});return t.remove(),r}function p(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,`&`)}t.exports=function(e,t,c){var l=e._fullLayout,u=l._paper,f=l._toppaper,m=l.width,h=l.height,g;u.insert(`rect`,`:first-child`).call(r.setRect,0,0,m,h).call(i.fill,l.paper_bgcolor);var _=l._basePlotModules||[];for(g=0;g<_.length;g++){var v=_[g];v.toSVG&&v.toSVG(e)}if(f){var y=f.node().childNodes,b=Array.prototype.slice.call(y);for(g=0;g{var n=$(),r=it().EventEmitter,i=Or();function a(e){var t=e.emitter||new r,a=new Promise(function(r,a){var o=window.Image,s=e.svg,c=e.format||`png`,l=e.canvas,u=e.scale||1,d=e.width||300,f=e.height||150,p=u*d,m=u*f,h=l.getContext(`2d`,{willReadFrequently:!0}),g=new o,_,v;c===`svg`||n.isSafari()?v=i.encodeSVG(s):(_=i.createBlob(s,`svg`),v=i.createObjectURL(_)),l.width=p,l.height=m,g.onload=function(){var n;switch(_=null,i.revokeObjectURL(v),c!==`svg`&&h.drawImage(g,0,0,p,m),c){case`jpeg`:n=l.toDataURL(`image/jpeg`);break;case`png`:n=l.toDataURL(`image/png`);break;case`webp`:n=l.toDataURL(`image/webp`);break;case`svg`:n=v;break;default:var o=`Image format is not jpeg, png, svg or webp.`;if(a(Error(o)),!e.promise)return t.emit(`error`,o)}r(n),e.promise||t.emit(`success`,n)},g.onerror=function(n){if(_=null,i.revokeObjectURL(v),a(n),!e.promise)return t.emit(`error`,n)},g.src=v});return e.promise?a:t}t.exports=a}),jr=l((e,t)=>{var n=_(),r=Dr(),i=gt(),a=$(),o=Or(),s=kr(),c=Ar(),l=u().version,d={format:{valType:`enumerated`,values:[`png`,`jpeg`,`webp`,`svg`,`full-json`],dflt:`png`},width:{valType:`number`,min:1},height:{valType:`number`,min:1},scale:{valType:`number`,min:0,dflt:1},setBackground:{valType:`any`,dflt:!1},imageDataOnly:{valType:`boolean`,dflt:!1}};function f(e,t){t||={};var u,f,p,m;a.isPlainObject(e)?(u=e.data||[],f=e.layout||{},p=e.config||{},m={}):(e=a.getGraphDiv(e),u=a.extendDeep([],e.data),f=a.extendDeep({},e.layout),p=e._context,m=e._fullLayout||{});function h(e){return!(e in t)||a.validate(t[e],d[e])}if(!h(`width`)&&t.width!==null||!h(`height`)&&t.height!==null)throw Error(`Height and width should be pixel values.`);if(!h(`format`))throw Error(`Export format is not `+a.join2(d.format.values,`, `,` or `)+`.`);var g={};function _(e,n){return a.coerce(t,g,d,e,n)}var v=_(`format`),y=_(`width`),b=_(`height`),x=_(`scale`),S=_(`setBackground`),C=_(`imageDataOnly`),w=document.createElement(`div`);w.style.position=`absolute`,w.style.left=`-5000px`,document.body.appendChild(w);var T=a.extendFlat({},f);y?T.width=y:t.width===null&&n(m.width)&&(T.width=m.width),b?T.height=b:t.height===null&&n(m.height)&&(T.height=m.height);var E=a.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:S}),D=o.getRedrawFunc(w);function O(){return new Promise(function(e){setTimeout(e,o.getDelay(w._fullLayout))})}function k(){return new Promise(function(e,t){var n=s(w,v,x),u=w._fullLayout.width,d=w._fullLayout.height;function f(){r.purge(w),document.body.removeChild(w)}if(v===`full-json`){var p=i.graphJson(w,!1,`keepdata`,`object`,!0,!0);return p.version=l,p=JSON.stringify(p),f(),e(C?p:o.encodeJSON(p))}if(f(),v===`svg`)return e(C?n:o.encodeSVG(n));var m=document.createElement(`canvas`);m.id=a.randstr(),c({format:v,width:u,height:d,scale:x,canvas:m,svg:n,promise:!0}).then(e).catch(t)})}function A(e){return C?e.replace(o.IMAGE_URL_PREFIX,``):e}return new Promise(function(e,t){r.newPlot(w,u,T,E).then(D).then(O).then(k).then(function(t){e(A(t))}).catch(function(e){t(e)})})}t.exports=f}),Mr=l((e,t)=>{var n=$(),r=gt(),i=ct(),a=V().dfltConfig,o=n.isPlainObject,s=Array.isArray,c=n.isArrayOrTypedArray;t.exports=function(e,t){e===void 0&&(e=[]),t===void 0&&(t={});var c=i.get(),d=[],f={_context:n.extendFlat({},a)},m,h;s(e)?(f.data=n.extendDeep([],e),m=e):(f.data=[],m=[],d.push(p(`array`,`data`))),o(t)?(f.layout=n.extendDeep({},t),h=t):(f.layout={},h={},arguments.length>1&&d.push(p(`object`,`layout`))),r.supplyDefaults(f);for(var g=f._fullData,_=m.length,v=0;v<_;v++){var y=m[v],b=[`data`,v];if(!o(y)){d.push(p(`object`,b));continue}var x=g[v],S=x.type,C=c.traces[S].attributes;C.type={valType:`enumerated`,values:[S]},x.visible===!1&&y.visible!==!1&&d.push(p(`invisible`,b)),l(y,x,C,d,b)}var w=f._fullLayout,T=u(c,g);return l(h,w,T,d,`layout`),d.length===0?void 0:d};function l(e,t,r,i,a,u){u||=[];for(var d=Object.keys(e),f=0;fy.length&&i.push(p(`unused`,a,_.concat(y.length)));var T=y.length,E=Array.isArray(w);E&&(T=Math.min(T,w.length));var D,O,k,A,j;if(b.dimensions===2)for(O=0;Oy[O].length&&i.push(p(`unused`,a,_.concat(O,y[O].length)));var M=y[O].length;for(D=0;D<(E?Math.min(M,w[O].length):M);D++)k=E?w[O][D]:w,A=v[O][D],j=y[O][D],n.validate(A,k)?j!==A&&j!==+A&&i.push(p(`dynamic`,a,_.concat(O,D),A,j)):i.push(p(`value`,a,_.concat(O,D),A))}else i.push(p(`array`,a,_.concat(O),v[O]));else for(O=0;O{var n=$(),r=Or();function i(e,t,i){var a=document.createElement(`a`),o=`download`in a;return new Promise(function(s,c){var l,u;if(o)return l=r.createBlob(e,i),u=r.createObjectURL(l),a.href=u,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),r.revokeObjectURL(u),l=null,s(t);if(n.isSafari()){var d=i===`svg`?`,`:`;base64,`;return r.octetStream(d+encodeURIComponent(e)),s(t)}c(Error(`download error`))})}t.exports=i}),Pr=l((e,t)=>{var n=$(),r=jr(),i=Nr();Or();function a(e,t){var a;return n.isPlainObject(e)||(a=n.getGraphDiv(e)),t||={},t.format=t.format||`png`,t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,o){a&&a._snapshotInProgress&&o(Error(`Snapshotting already in progress.`)),a&&(a._snapshotInProgress=!0);var s=r(e,t),c=t.filename||e.fn||`newplot`;c+=`.`+t.format.replace(`-`,`.`),s.then(function(e){return a&&(a._snapshotInProgress=!1),i(e,c,t.format)}).then(function(e){n(e)}).catch(function(e){a&&(a._snapshotInProgress=!1),o(e)})})}t.exports=a}),Fr=l(e=>{var t=$(),n=t.isPlainObject,r=ct(),i=gt(),a=P(),o=lt(),s=V().dfltConfig;e.makeTemplate=function(e){e=t.isPlainObject(e)?e:t.getGraphDiv(e),e=t.extendDeep({_context:s},{data:e.data,layout:e.layout}),i.supplyDefaults(e);var r=e.data||[],o=e.layout||{};o._basePlotModules=e._fullLayout._basePlotModules,o._modules=e._fullLayout._modules;var l={data:{},layout:{}};r.forEach(function(e){var n={};u(e,n,f.bind(null,e));var r=t.coerce(e,{},a,`type`),i=l.data[r];i||=l.data[r]=[],i.push(n)}),u(o,l.layout,d.bind(null,o)),delete l.layout.template;var p=o.template;if(n(p)){var m=p.layout,h,g,_,v,y,b;n(m)&&c(m,l.layout);var x=p.data;if(n(x)){for(g in l.data)if(_=x[g],Array.isArray(_)){for(y=l.data[g],b=y.length,v=_.length,h=0;hT?d.push({code:`unused`,traceType:x,templateCount:w,dataCount:T}):T>w&&d.push({code:`reused`,traceType:x,templateCount:w,dataCount:T})}}function E(e,t){for(var r in e)if(r.charAt(0)!==`_`){var i=e[r],a=p(e,r,t);n(i)?(Array.isArray(e)&&i._template===!1&&i.templateitemname&&d.push({code:`missing`,path:a,templateitemname:i.templateitemname}),E(i,a)):Array.isArray(i)&&m(i)&&E(i,a)}}if(E({data:g,layout:f},``),d.length)return d.map(h)};function m(e){for(var t=0;t{var t=Dr();e._doPlot=t._doPlot,e.newPlot=t.newPlot,e.restyle=t.restyle,e.relayout=t.relayout,e.redraw=t.redraw,e.update=t.update,e._guiRestyle=t._guiRestyle,e._guiRelayout=t._guiRelayout,e._guiUpdate=t._guiUpdate,e._storeDirectGUIEdit=t._storeDirectGUIEdit,e.react=t.react,e.extendTraces=t.extendTraces,e.prependTraces=t.prependTraces,e.addTraces=t.addTraces,e.deleteTraces=t.deleteTraces,e.moveTraces=t.moveTraces,e.purge=t.purge,e.addFrames=t.addFrames,e.deleteFrames=t.deleteFrames,e.animate=t.animate,e.setPlotConfig=t.setPlotConfig;var n=we().getGraphDiv,r=Bn().eraseActiveShape;e.deleteActiveShape=function(e){return r(n(e))},e.toImage=jr(),e.validate=Mr(),e.downloadImage=Pr();var i=Fr();e.makeTemplate=i.makeTemplate,e.validateTemplate=i.validateTemplate}),Lr=l((e,t)=>{var n=$(),r=Ie();t.exports=function(e,t,i,a){var o=a(`x`),s=a(`y`),c;if(r.getComponentMethod(`calendars`,`handleTraceDefaults`)(e,t,[`x`,`y`],i),o){var l=n.minRowLength(o);s?c=Math.min(l,n.minRowLength(s)):(c=l,a(`y0`),a(`dy`))}else{if(!s)return 0;c=n.minRowLength(s),a(`x0`),a(`dx`)}return t._length=c,c}}),Rr=l((e,t)=>{var n=$().dateTick0,r=v().ONEWEEK;function i(e,t){return e%r===0?n(t,1):n(t,0)}t.exports=function(e,t,n,r,a){if(a||={x:!0,y:!0},a.x){var o=r(`xperiod`);o&&(r(`xperiod0`,i(o,t.xcalendar)),r(`xperiodalignment`))}if(a.y){var s=r(`yperiod`);s&&(r(`yperiod0`,i(s,t.ycalendar)),r(`yperiodalignment`))}}}),zr=l((e,t)=>{var n=[`orientation`,`groupnorm`,`stackgaps`];t.exports=function(e,t,r,i){var a=r._scatterStackOpts,o=i(`stackgroup`);if(o){var s=t.xaxis+t.yaxis,c=a[s];c||=a[s]={};var l=c[o],u=!1;l?l.traces.push(t):(l=c[o]={traceIndices:[],traces:[t]},u=!0);for(var d={orientation:t.x&&!t.y?`h`:`v`},f=0;f{var n=L(),r=bt().hasColorscale,i=Ft(),a=Bt();t.exports=function(e,t,o,s,c,l={}){var u=a.isBubble(e),d=(e.line||{}).color,f;d&&(o=d),c(`marker.symbol`),c(`marker.opacity`,u?.7:1),c(`marker.size`),l.noAngle||(c(`marker.angle`),l.noAngleRef||c(`marker.angleref`),l.noStandOff||c(`marker.standoff`)),c(`marker.color`,o),r(e,`marker`)&&i(e,t,s,c,{prefix:`marker.`,cLetter:`c`}),l.noSelect||(c(`selected.marker.color`),c(`unselected.marker.color`),c(`selected.marker.size`),c(`unselected.marker.size`)),l.noLine||(f=d&&!Array.isArray(d)&&t.marker.color!==d?d:u?n.background:n.defaultLine,c(`marker.line.color`,f),r(e,`marker.line`)&&i(e,t,s,c,{prefix:`marker.line.`,cLetter:`c`}),c(`marker.line.width`,+!!u),l.noLineDash||c(`marker.line.dash`)),u&&(c(`marker.sizeref`),c(`marker.sizemin`),c(`marker.sizemode`)),l.gradient&&c(`marker.gradient.type`)!==`none`&&c(`marker.gradient.color`)}}),Vr=l((e,t)=>{var n=$().isArrayOrTypedArray,r=bt().hasColorscale,i=Ft();t.exports=function(e,t,a,o,s,c){c||={};var l=(e.marker||{}).color;l&&l._inputArray&&(l=l._inputArray),s(`line.color`,a),r(e,`line`)?i(e,t,o,s,{prefix:`line.`,cLetter:`c`}):s(`line.color`,!n(l)&&l||a),s(`line.width`),c.noDash||s(`line.dash`),c.backoff&&s(`line.backoff`)}}),Hr=l((e,t)=>{t.exports=function(e,t,n){n(`line.shape`)===`spline`&&n(`line.smoothing`)}}),Ur=l((e,t)=>{var n=$();t.exports=function(e,t,r,i,a){a||={},i(`textposition`),n.coerceFont(i,`textfont`,a.font||r.font,a),a.noSelect||(i(`selected.textfont.color`),i(`unselected.textfont.color`))}}),Wr=l((e,t)=>{var n=L(),r=$().isArrayOrTypedArray;function i(e){for(var t=n.interpolate(e[0][1],e[1][1],.5),r=2;r{var n=$(),r=Ie(),i=gr(),a=mr(),o=Bt(),s=Lr(),c=Rr(),l=zr(),u=Br(),d=Vr(),f=Hr(),p=Ur(),m=Wr(),h=$().coercePattern;t.exports=function(e,t,g,_){function v(r,a){return n.coerce(e,t,i,r,a)}var y=s(e,t,_,v);if(y||(t.visible=!1),t.visible){c(e,t,_,v),v(`xhoverformat`),v(`yhoverformat`),v(`zorder`);var b=l(e,t,_,v);_.scattermode===`group`&&t.orientation===void 0&&v(`orientation`,`v`);var x=!b&&y{var n=Xn().getAxisGroup;t.exports=function(e,t,r,i,a){var o=t.orientation,s=t[{v:`x`,h:`y`}[o]+`axis`],c=n(r,s)+o,l=r._alignmentOpts||{},u=i(`alignmentgroup`),d=l[c];d||=l[c]={};var f=d[u];f?f.traces.push(t):f=d[u]={traces:[t],alignmentIndex:Object.keys(d).length,offsetGroups:{}};var p=i(`offsetgroup`)||``,m=f.offsetGroups,h=m[p];t._offsetIndex=0,(a!==`group`||p)&&(h||=m[p]={offsetIndex:Object.keys(m).length},t._offsetIndex=h.offsetIndex)}}),qr=l((e,t)=>{var n=$(),r=Kr(),i=gr();t.exports=function(e,t){var a,o,s,c=t.scattermode;function l(e){return n.coerce(o._input,o,i,e)}if(t.scattermode===`group`)for(s=0;s=0;f--){var p=e[f];if(p.type===`scatter`&&p.xaxis===u.xaxis&&p.yaxis===u.yaxis){p.opacity=void 0;break}}}}}}),Jr=l((e,t)=>{var n=$(),r=pt();t.exports=function(e,t){function i(i,a){return n.coerce(e,t,r,i,a)}var a=t.barmode===`group`;t.scattermode===`group`&&i(`scattergap`,a?t.bargap:.2)}}),Yr=l((e,t)=>{var n=_(),r=$(),i=r.dateTime2ms,a=r.incrementMonth,o=v().ONEAVGMONTH;t.exports=function(e,t,r,s){if(t.type!==`date`)return{vals:s};var c=e[r+`periodalignment`];if(!c)return{vals:s};var l=e[r+`period`],u;if(n(l)){if(l=+l,l<=0)return{vals:s}}else if(typeof l==`string`&&l.charAt(0)===`M`){var d=+l.substring(1);if(d>0&&Math.round(d)===d)u=d;else return{vals:s}}for(var f=t.calendar,p=c===`start`,m=c===`end`,h=e[r+`period0`],g=i(h,f)||0,_=[],v=[],y=[],b=s.length,x=0;xS;)T=a(T,-u,f);for(;T<=S;)T=a(T,u,f);w=a(T,-u,f)}else{for(C=Math.round((S-g)/l),T=g+C*l;T>S;)T-=l;for(;T<=S;)T+=l;w=T-l}_[x]=p?w:m?T:(w+T)/2,v[x]=w,y[x]=T}return{vals:_,starts:v,ends:y}}}),Xr=l((e,t)=>{var n=bt().hasColorscale,r=Rt(),i=Bt();t.exports=function(e,t){i.hasLines(t)&&n(t,`line`)&&r(e,t,{vals:t.line.color,containerStr:`line`,cLetter:`c`}),i.hasMarkers(t)&&(n(t,`marker`)&&r(e,t,{vals:t.marker.color,containerStr:`marker`,cLetter:`c`}),n(t,`marker.line`)&&r(e,t,{vals:t.marker.line.color,containerStr:`marker.line`,cLetter:`c`}))}}),Zr=l((e,t)=>{var n=$();t.exports=function(e,t){for(var r=0;r{var n=$();t.exports=function(e,t){n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(e,t)}}),$r=l((e,t)=>{var n=_(),r=$(),i=Xt(),a=Yr(),o=v().BADNUM,s=Bt(),c=Xr(),l=Zr(),u=Qr();function d(e,t){var s=e._fullLayout,d=t._xA=i.getFromId(e,t.xaxis||`x`,`x`),h=t._yA=i.getFromId(e,t.yaxis||`y`,`y`),_=d.makeCalcdata(t,`x`),v=h.makeCalcdata(t,`y`),y=a(t,d,`x`,_),b=a(t,h,`y`,v),x=y.vals,S=b.vals,C=t._length,w=Array(C),T=t.ids,E=g(t,s,d,h),D=!1,O,k,A,j,M,N;m(s,t);var P=`x`,F=`y`,I;E?(r.pushUnique(E.traceIndices,t.index),O=E.orientation===`v`,O?(F=`s`,I=`x`):(P=`s`,I=`y`),M=E.stackgaps===`interpolate`):f(e,t,d,h,x,S,p(t,C));var L=!!t.xperiodalignment,R=!!t.yperiodalignment;for(k=0;kk&&w[j].gap;)j--;for(N=w[j].s,A=w.length-1;A>j;A--)w[A].s=N;for(;k{t.exports=r;var n=$().distinctVals;function r(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=t.posAxis._id.charAt(0),a=[],o=0;o{t.exports={TEXTPAD:3,eventDataKeys:[`value`,`label`]}}),ni=l((e,t)=>{var n=_(),{isArrayOrTypedArray:r}=$(),{BADNUM:i}=v(),a=Ie(),o=Xt(),{getAxisGroup:s}=Xn(),c=ei(),{TEXTPAD:l}=ti(),{LINE_SPACING:u}=vt(),{BR_TAG_ALL:d}=yt();function f(e,t){for(var n=t.xaxis,r=t.yaxis,i=e._fullLayout,o=e._fullData,s=e.calcdata,c=[],l=[],u=0;ud+l||!n(u))}for(var p=0;pi(e))):i(e.text);let a=e.outsidetextfont.size*u*n+l;return{ppadplus:t.some(e=>e.s<0)?a:0,ppadminus:t.some(e=>e.s>=0)?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function M(e,t,n,r){for(var i=P(r),a=0;a{var n=$r(),r=ni().setGroupPositions;function i(e,t){for(var n=t.xaxis,i=t.yaxis,a=e._fullLayout,o=e._fullData,s=e.calcdata,c=[],l=[],u=0;uD[f]&&f{var n=Gt(),r=v(),i=r.BADNUM,a=r.LOG_CLIP,o=a+.5,s=a-.5,c=$(),l=c.segmentsIntersect,u=c.constrain,d=mr();t.exports=function(e,t){var r=t.trace||{},a=t.xaxis,f=t.yaxis,p=a.type===`log`,m=f.type===`log`,h=a._length,g=f._length,_=t.backoff,v=r.marker,y=t.connectGaps,b=t.baseTolerance,x=t.shape,S=x===`linear`,C=r.fill&&r.fill!==`none`,w=[],T=d.minTolerance,E=e.length,D=Array(E),O=0,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W;function G(n){var r=e[n];if(!r)return!1;var c=t.linearized?a.l2p(r.x):a.c2p(r.x),l=t.linearized?f.l2p(r.y):f.c2p(r.y);if(c===i){if(p&&(c=a.c2p(r.x,!0)),c===i)return!1;m&&l===i&&(c*=Math.abs(a._m*g*(a._m>0?o:s)/(f._m*h*(f._m>0?o:s)))),c*=1e3}if(l===i){if(m&&(l=f.c2p(r.y,!0)),l===i)return!1;l*=1e3}return[c,l]}function K(e,t,n,r){var i=n-e,a=r-t,o=.5-e,s=.5-t,c=i*i+a*a,l=i*o+a*s;if(l>0&&l1||Math.abs(o.y-n[0][1])>1)&&(o=[o.x,o.y],r&&X(o,e)te||e[1]re)return[u(e[0],Z,te),u(e[1],ne,re)]}function fe(e,t){if(e[0]===t[0]&&(e[0]===Z||e[0]===te)||e[1]===t[1]&&(e[1]===ne||e[1]===re))return!0}function pe(e,t){var n=[],r=de(e),i=de(t);return r&&i&&fe(r,i)||(r&&n.push(r),i&&n.push(i)),n}function me(e,t,n){return function(r,i){var a=de(r),o=de(i),s=[];if(a&&o&&fe(a,o))return s;a&&s.push(a),o&&s.push(o);var l=2*c.constrain((r[e]+i[e])/2,t,n)-((a||r)[e]+(o||i)[e]);if(l){var u=a&&o?l>0==a[e]>o[e]?a:o:a||o;u[e]+=l}return s}}var he;x===`linear`||x===`spline`?he=ue:x===`hv`||x===`vh`?he=pe:x===`hvh`?he=me(0,Z,te):x===`vhv`&&(he=me(1,ne,re));function ge(e,t){var n=t[0]-e[0],r=(t[1]-e[1])/n;return(e[1]*t[0]-t[1]*e[0])/n>0?[r>0?Z:te,re]:[r>0?te:Z,ne]}function _e(e){var t=e[0],n=e[1],r=t===D[O-1][0],i=n===D[O-1][1];if(!(r&&i)){if(O>1){var a=t===D[O-2][0],o=n===D[O-2][1];r&&(t===Z||t===te)&&a?o?O--:D[O-1]=e:i&&(n===ne||n===re)&&o?a?O--:D[O-1]=e:D[O++]=e}else D[O++]=e}}function ve(e){D[O-1][0]!==e[0]&&D[O-1][1]!==e[1]&&_e([se,ce]),_e(e),Q=null,se=ce=0}var ye=c.isArrayOrTypedArray(v);function be(t){if(t&&_&&(t.i=k,t.d=e,t.trace=r,t.marker=ye?v[t.i]:v,t.backoff=_),q=t[0]/h,J=t[1]/g,ae=t[0]te?te:0,oe=t[1]re?re:0,ae||oe){if(!O)D[O++]=[ae||t[0],oe||t[1]];else if(Q){var n=he(Q,t);n.length>1&&(ve(n[0]),D[O++]=n[1])}else le=he(D[O-1],t)[0],D[O++]=le;var i=D[O-1];ae&&oe&&(i[0]!==ae||i[1]!==oe)?(Q&&(se!==ae&&ce!==oe?_e(se&&ce?ge(Q,t):[se||ae,ce||oe]):se&&ce&&_e([se,ce])),_e([ae,oe])):se-ae&&ce-oe&&_e([ae||se,oe||ce]),Q=t,se=ae,ce=oe}else Q&&ve(he(Q,t)[0]),D[O++]=t}for(k=0;kY(P,xe))break;j=P,V=L[0]*I[0]+L[1]*I[1],V>z?(z=V,M=P,F=!1):V=e.length||!P)break;be(P),A=P}}Q&&_e([se||Q[0],ce||Q[1]]),w.push(D.slice(0,O))}var Se=x.slice(x.length-1);if(_&&Se!==`h`&&Se!==`v`){for(var Ce=!1,we=-1,Te=[],Ee=0;Ee{var n={tonextx:1,tonexty:1,tonext:1};t.exports=function(e,t,r){var i,a,o,s,c,l={},u=!1,d=-1,f=0,p=-1;for(a=0;a=0?c=p:(c=p=f,f++),c{var n=f(),r=Ie(),i=$(),a=i.ensureSingle,o=i.identity,s=Gt(),c=Bt(),l=ii(),u=ai(),d=cr().tester;t.exports=function(e,t,r,i,a,o){var s,c,l=!a,d=!!a&&a.duration>0,f=u(e,t,r);s=i.selectAll(`g.trace`).data(f,function(e){return e[0].trace.uid}),s.enter().append(`g`).attr(`class`,function(e){return`trace scatter trace`+e[0].trace.uid}).style(`stroke-miterlimit`,2),s.order(),p(e,s,t),d?(o&&(c=o()),n.transition().duration(a.duration).ease(a.easing).each(`end`,function(){c&&c()}).each(`interrupt`,function(){c&&c()}).each(function(){i.selectAll(`g.trace`).each(function(n,r){m(e,r,t,n,f,this,a)})})):s.each(function(n,r){m(e,r,t,n,f,this,a)}),l&&s.exit().remove(),i.selectAll(`path:not([d])`).remove()};function p(e,t,r){t.each(function(t){var i=a(n.select(this),`g`,`fills`);s.setClipUrl(i,r.layerClipId,e);var c=t[0].trace;c._ownFill=null,c._nextFill=null;var l=[];c._ownfill&&l.push(`_ownFill`),c._nexttrace&&l.push(`_nextFill`);var u=i.selectAll(`g`).data(l,o);u.enter().append(`g`),u.exit().remove(),u.order().each(function(e){c[e]=a(n.select(this),`path`,`js-fill`)})})}function m(e,t,u,f,p,m,g){var _=e._context.staticPlot,v;h(e,t,u,f,p);var y=!!g&&g.duration>0;function b(e){return y?e.transition():e}var x=u.xaxis,S=u.yaxis,C=f[0].trace,w=C.line,T=n.select(m),E=a(T,`g`,`errorbars`),D=a(T,`g`,`lines`),O=a(T,`g`,`points`),k=a(T,`g`,`text`);if(r.getComponentMethod(`errorbars`,`plot`)(e,E,u,g),C.visible!==!0)return;b(T).style(`opacity`,C.opacity);var A,j,M=C.fill.charAt(C.fill.length-1);M!==`x`&&M!==`y`&&(M=``);var N,P;M===`y`?(N=1,P=S.c2p(0,!0)):M===`x`&&(N=0,P=x.c2p(0,!0)),f[0][u.isRangePlot?`nodeRangePlot3`:`node3`]=T;var F=``,I=[],L=C._prevtrace,R=null,z=null;L&&(F=L._prevRevpath||``,j=L._nextFill,I=L._ownPolygons,R=L._fillsegments,z=L._fillElement);var B,V,H=``,U=``,W,G,K,q,J,Y,X=[];C._polygons=[];var ee=[],Z=[],te=i.noop;if(A=C._ownFill,c.hasLines(C)||C.fill!==`none`){j&&j.datum(f),[`hv`,`vh`,`hvh`,`vhv`].indexOf(w.shape)===-1?W=G=w.shape===`spline`?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),w.smoothing):s.smoothopen(e,w.smoothing)}:function(e){return`M`+e.join(`L`)}:(W=s.steps(w.shape),G=s.steps(w.shape.split(``).reverse().join(``))),K=function(e){return G(e.reverse())},Z=l(f,{xaxis:x,yaxis:S,trace:C,connectGaps:C.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:C.fill}),ee=Array(Z.length);var ne=0;for(v=0;v=u[0]&&e.x<=u[1]&&e.y>=d[0]&&e.y<=d[1]}),h=Math.ceil(m.length/p),g=0;o.forEach(function(e,n){var r=e[0].trace;c.hasMarkers(r)&&r.marker.maxdisplayed>0&&n{t.exports={container:`marker`,min:`cmin`,max:`cmax`}}),ci=l((e,t)=>{var n=Xt();t.exports=function(e,t,r){var i={},a={_fullLayout:r},o=n.getFromTrace(a,t,`x`),s=n.getFromTrace(a,t,`y`),c=e.orig_x;c===void 0&&(c=e.x);var l=e.orig_y;return l===void 0&&(l=e.y),i.xLabel=n.tickText(o,o.c2l(c),!0).text,i.yLabel=n.tickText(s,s.c2l(l),!0).text,i}}),li=l((e,t)=>{var n=f(),r=Gt(),i=Ie();function a(e){var t=n.select(e).selectAll(`g.trace.scatter`);t.style(`opacity`,function(e){return e[0].trace.opacity}),t.selectAll(`g.points`).each(function(t){o(n.select(this),t.trace||t[0].trace,e)}),t.selectAll(`g.text`).each(function(t){s(n.select(this),t.trace||t[0].trace,e)}),t.selectAll(`g.trace path.js-line`).call(r.lineGroupStyle),t.selectAll(`g.trace path.js-fill`).call(r.fillGroupStyle,e,!1),i.getComponentMethod(`errorbars`,`style`)(t)}function o(e,t,n){r.pointStyle(e.selectAll(`path.point`),t,n)}function s(e,t,n){r.textPointStyle(e.selectAll(`text`),t,n)}function c(e,t,n){var i=t[0].trace;i.selectedpoints?(r.selectedPointStyle(n.selectAll(`path.point`),i),r.selectedTextStyle(n.selectAll(`text`),i)):(o(n,i,e),s(n,i,e))}t.exports={style:a,stylePoints:o,styleText:s,styleOnSelect:c}}),ui=l((e,t)=>{var n=L(),r=Bt();t.exports=function(e,t){var i,a;if(e.mode===`lines`)return i=e.line.color,i&&n.opacity(i)?i:e.fillcolor;if(e.mode===`none`)return e.fill?e.fillcolor:``;var o=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return a=o&&n.opacity(o)?o:s&&n.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:``,a?n.opacity(a)<.3?n.addOpacity(a,.3):a:(i=(e.line||{}).color,i&&n.opacity(i)&&r.hasLines(e)&&e.line.width?i:e.fillcolor)}}),di=l((e,t)=>{var n=$(),r=Dn(),i=Ie(),a=ui(),o=L(),s=n.fillText;t.exports=function(e,t,c,l){var u=e.cd,d=u[0].trace,f=e.xa,p=e.ya,m=f.c2p(t),h=p.c2p(c),g=[m,h],_=d.hoveron||``,v=d.mode.indexOf(`markers`)===-1?.5:3,y=!!d.xperiodalignment,b=!!d.yperiodalignment;if(_.indexOf(`points`)!==-1){var x=function(e){if(y){var t=f.c2p(e.xStart),n=f.c2p(e.xEnd);return m>=Math.min(t,n)&&m<=Math.max(t,n)?0:1/0}var r=Math.max(3,e.mrc||0),i=1-1/r,a=Math.abs(f.c2p(e.x)-m);return a=Math.min(t,n)&&h<=Math.max(t,n)?0:1/0}var r=Math.max(3,e.mrc||0),i=1-1/r,a=Math.abs(p.c2p(e.y)-h);return as!=v>=s&&(m=u[l-1][0],h=u[l][0],v-_&&(d=m+(h-m)*(s-_)/(v-_),r=Math.min(r,d),i=Math.max(i,d)));return r=Math.max(r,0),i=Math.min(i,f._length),{x0:r,x1:i,y0:s,y1:s}}if(_.indexOf(`fills`)!==-1&&d._fillElement&&N(d._fillElement)&&!N(d._fillExclusionElement)){var F=P(d._polygons);F===null&&(F={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var I=o.defaultLine;return o.opacity(d.fillcolor)?I=d.fillcolor:o.opacity((d.line||{}).color)&&(I=d.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:F.x0,x1:F.x1,y0:F.y0,y1:F.y1,color:I,hovertemplate:!1}),delete e.index,e.text=d.text&&!n.isArrayOrTypedArray(d.text)?String(d.text):d.name,[e]}}}),fi=l((e,t)=>{var n=Bt();t.exports=function(e,t){var r=e.cd,i=e.xaxis,a=e.yaxis,o=[],s=r[0].trace,c,l,u,d;if(!n.hasMarkers(s)&&!n.hasText(s))return[];if(t===!1)for(c=0;c{t.exports={xaxis:{valType:`subplotid`,dflt:`x`,editType:`calc+clearAxisTypes`},yaxis:{valType:`subplotid`,dflt:`y`,editType:`calc+clearAxisTypes`}}}),mi=l((e,t)=>{var n=Ie().traceIs,r=Jt();t.exports=function(e,t,n,r){n(`autotypenumbers`,r.autotypenumbersDflt),n(`type`,(r.splomStash||{}).type)===`-`&&(i(t,r.data),t.type===`-`?t.type=`linear`:e.type=t.type)};function i(e,t){if(e.type===`-`){var i=e._id,c=i.charAt(0),l;i.indexOf(`scene`)!==-1&&(i=c);var u=a(t,i,c);if(u){if(u.type===`histogram`&&c==={v:`y`,h:`x`}[u.orientation||`v`]){e.type=`linear`;return}var d=c+`calendar`,f=u[d],p={noMultiCategory:!n(u,`cartesian`)||n(u,`noMultiCategory`)};if(u.type===`box`&&u._hasPreCompStats&&c==={h:`x`,v:`y`}[u.orientation||`v`]&&(p.noMultiCategory=!0),p.autotypenumbers=e.autotypenumbers,s(u,c)){var m=o(u),h=[];for(l=0;l0&&(i[`_`+n+`axes`]||{})[t]||(i[n+`axis`]||n)===t&&(s(i,n)||(i[n]||[]).length||i[n+`0`]))return i}}function o(e){return{v:`x`,h:`y`}[e.orientation||`v`]}function s(e,t){var r=o(e),i=n(e,`box-violin`),a=n(e._fullInput||{},`candlestick`);return i&&!a&&t===r&&e[r]===void 0&&e[r+`0`]===void 0}}),hi=l((e,t)=>{var n=x().isTypedArraySpec;function r(e,t){var n=t.dataAttr||e._id.charAt(0),r={},i,a,o;if(t.axData)i=t.axData;else for(i=[],a=0;a0||n(o),c;s&&(c=`array`);var l=i(`categoryorder`,c),u;l===`array`&&(u=i(`categoryarray`)),!s&&l===`array`&&(l=t.categoryorder=`trace`),l===`trace`?t._initialCategories=[]:l===`array`?t._initialCategories=u.slice():(u=r(t,a).sort(),l===`category ascending`?t._initialCategories=u:l===`category descending`&&(t._initialCategories=u.reverse()))}}}),gi=l((e,t)=>{var n=O().mix,r=I(),i=$();t.exports=function(e,t,a,o){o||={};var s=o.dfltColor;function c(n,r){return i.coerce2(e,t,o.attributes,n,r)}var l=c(`linecolor`,s),u=c(`linewidth`);a(`showline`,o.showLine||!!l||!!u)||(delete t.linecolor,delete t.linewidth);var d=c(`gridcolor`,n(s,o.bgColor,o.blend||r.lightFraction).toRgbString()),f=c(`gridwidth`),p=c(`griddash`);if(a(`showgrid`,o.showGrid||!!d||!!f||!!p)||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var m=c(`minor.gridcolor`,n(t.gridcolor,o.bgColor,67).toRgbString()),h=c(`minor.gridwidth`,t.gridwidth||1),g=c(`minor.griddash`,t.griddash||`solid`);a(`minor.showgrid`,!!m||!!h||!!g)||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){c(`zerolinelayer`);var _=c(`zerolinecolor`,s),v=c(`zerolinewidth`);a(`zeroline`,o.showGrid||!!_||!!v)||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}),_i=l((e,t)=>{var n=_(),r=Ie(),i=$(),a=lt(),o=jt(),s=St(),c=Ot(),l=kt(),u=Mt(),d=Nt(),f=hi(),p=gi(),m=Qt(),h=qt(),g=ut().WEEKDAY_PATTERN,v=ut().HOUR_PATTERN;t.exports=function(e,t,n,_,v){var b=_.letter,x=_.font||{},S=_.splomStash||{},C=n(`visible`,!_.visibleDflt),w=t._template||{},T=t.type||w.type||`-`,E;T===`date`&&(r.getComponentMethod(`calendars`,`handleDefaults`)(e,t,`calendar`,_.calendar),_.noTicklabelmode||(E=n(`ticklabelmode`))),!_.noTicklabelindex&&(T===`date`||T===`linear`)&&n(`ticklabelindex`);var D=``;(!_.noTicklabelposition||T===`multicategory`)&&(D=i.coerce(e,t,{ticklabelposition:{valType:`enumerated`,dflt:`outside`,values:E===`period`?[`outside`,`inside`]:b===`x`?[`outside`,`inside`,`outside left`,`inside left`,`outside right`,`inside right`]:[`outside`,`inside`,`outside top`,`inside top`,`outside bottom`,`inside bottom`]}},`ticklabelposition`)),_.noTicklabeloverflow||n(`ticklabeloverflow`,D.indexOf(`inside`)===-1?T===`category`||T===`multicategory`?`allow`:`hide past div`:`hide past domain`),h(t,v),m(e,t,n,_),f(e,t,n,_),_.noHover||(T!==`category`&&n(`hoverformat`),_.noUnifiedhovertitle||n(`unifiedhovertitle.text`));var O=n(`color`),k=O===s.color.dflt?x.color:O,A=S.label||v._dfltTitle[b];if(d(e,t,n,T,_),!C)return t;n(`title.text`,A),i.coerceFont(n,`title.font`,x,{overrideDflt:{size:i.bigFont(x.size),color:k}}),c(e,t,n,T);var j=_.hasMinor;if(j&&(a.newContainer(t,`minor`),c(e,t,n,T,{isMinor:!0})),u(e,t,n,T,_),l(e,t,n,_),j){var M=_.isMinor;_.isMinor=!0,l(e,t,n,_),_.isMinor=M}p(e,t,n,{dfltColor:O,bgColor:_.bgColor,showGrid:_.showGrid,hasMinor:j,attributes:s}),j&&t.ticklabelindex==null&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&n(`mirror`);var N=T===`multicategory`;if(!_.noTickson&&(T===`category`||N)&&(t.ticks||t.showgrid)&&(N?(n(`tickson`,`boundaries`),delete t.ticklabelposition):n(`tickson`)),N&&n(`showdividers`)&&(n(`dividercolor`),n(`dividerwidth`)),T===`date`){if(o(e,t,{name:`rangebreaks`,inclusionAttr:`enabled`,handleItemDefaults:y}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var P=0;P=2){var c=``,l,u;if(o.length===2){for(l=0;l<2;l++)if(u=x(o[l]),u){c=g;break}}var d=a(`pattern`,c);if(d===g)for(l=0;l<2;l++)u=x(o[l]),u&&(t.bounds[l]=o[l]=u-1);if(d)for(l=0;l<2;l++)switch(u=o[l],d){case g:if(!n(u)){t.enabled=!1;return}if(u=+u,u!==Math.floor(u)||u<0||u>=7){t.enabled=!1;return}t.bounds[l]=o[l]=u;break;case v:if(!n(u)){t.enabled=!1;return}if(u=+u,u<0||u>24){t.enabled=!1;return}t.bounds[l]=o[l]=u}if(r.autorange===!1){var f=r.range;if(f[0]f[1]){t.enabled=!1;return}}else if(o[0]>f[0]&&o[1]{var n=_(),r=$();t.exports=function(e,t,i,a){var o=a.counterAxes||[],s=a.overlayableAxes||[],c=a.letter,l=a.grid,u=a.overlayingDomain,d,f,p,m,h,g;l&&(f=l._domains[c][l._axisMap[t._id]],d=l._anchors[t._id],f&&(p=l[c+`side`].split(` `)[0],m=l.domain[c][+(p===`right`||p===`top`)])),f||=[0,1],d||=n(e.position)?`free`:o[0]||`free`,p||=c===`x`?`bottom`:`left`,m||=0,h=0,g=!1;var _=r.coerce(e,t,{anchor:{valType:`enumerated`,values:[`free`].concat(o),dflt:d}},`anchor`),v=r.coerce(e,t,{side:{valType:`enumerated`,values:c===`x`?[`bottom`,`top`]:[`left`,`right`],dflt:p}},`side`);_===`free`&&(c===`y`&&(i(`autoshift`)&&(m=v===`left`?u[0]:u[1],g=!t.automargin||t.automargin,h=v===`left`?-3:3),i(`shift`,h)),i(`position`,m)),i(`automargin`,g);var y=!1;if(s.length&&(y=r.coerce(e,t,{overlaying:{valType:`enumerated`,values:[!1].concat(s),dflt:!1}},`overlaying`)),!y){var b=i(`domain`,f);b[0]>b[1]-1/4096&&(t.domain=f),r.noneOrAll(e.domain,t.domain,f),t.tickmode===`sync`&&(t.tickmode=`auto`)}return i(`layer`),t}}),yi=l((e,t)=>{var n=$(),r=L(),i=Ht().isUnifiedHover,a=Cn(),o=lt(),s=Pe(),c=St(),l=mi(),u=_i(),d=Xn(),f=vi(),p=dt(),m=p.id2name,h=p.name2id,g=ut().AX_ID_PATTERN,_=Ie(),v=_.traceIs,y=_.getComponentMethod;function b(e,t,n){Array.isArray(e[t])?e[t].push(n):e[t]=[n]}t.exports=function(e,t,_){for(var x=t.autotypenumbers,S={},C={},w={},T={},E={},D={},O={},k={},A={},j={},M=0,N;M<_.length;M++){var P=_[M];if(v(P,`cartesian`)){var F;if(P.xaxis)F=m(P.xaxis),b(S,F,P);else if(P.xaxes)for(N=0;N{var n=f(),r=Ie(),i=$(),a=Gt(),o=Xt();t.exports=function(e,t,s,c){var l=e._fullLayout;if(t.length===0){o.redrawComponents(e);return}function u(e){var t=e.xaxis,n=e.yaxis;l._defs.select(`#`+e.clipId+`> rect`).call(a.setTranslate,0,0).call(a.setScale,1,1),e.plot.call(a.setTranslate,t._offset,n._offset).call(a.setScale,1,1);var r=e.plot.selectAll(`.scatterlayer .trace`);r.selectAll(`.point`).call(a.setPointGroupScale,1,1),r.selectAll(`.textpoint`).call(a.setTextPointsScale,1,1),r.call(a.hideOutsideRangePoints,e)}function d(t,n){var r=t.plotinfo,s=r.xaxis,c=r.yaxis,l=s._length,u=c._length,d=!!t.xr1,f=!!t.yr1,p=[];if(d){var m=i.simpleMap(t.xr0,s.r2l),h=i.simpleMap(t.xr1,s.r2l),g=m[1]-m[0],_=h[1]-h[0];p[0]=(m[0]*(1-n)+n*h[0]-m[0])/(m[1]-m[0])*l,p[2]=l*(1-n+n*_/g),s.range[0]=s.l2r(m[0]*(1-n)+n*h[0]),s.range[1]=s.l2r(m[1]*(1-n)+n*h[1])}else p[0]=0,p[2]=l;if(f){var v=i.simpleMap(t.yr0,c.r2l),y=i.simpleMap(t.yr1,c.r2l),b=v[1]-v[0],x=y[1]-y[0];p[1]=(v[1]*(1-n)+n*y[1]-v[1])/(v[0]-v[1])*u,p[3]=u*(1-n+n*x/b),c.range[0]=s.l2r(v[0]*(1-n)+n*y[0]),c.range[1]=c.l2r(v[1]*(1-n)+n*y[1])}else p[1]=0,p[3]=u;o.drawOne(e,s,{skipTitle:!0}),o.drawOne(e,c,{skipTitle:!0}),o.redrawComponents(e,[s._id,c._id]);var S=d?l/p[2]:1,C=f?u/p[3]:1,w=d?p[0]:0,T=f?p[1]:0,E=d?p[0]/p[2]*l:0,D=f?p[1]/p[3]*u:0,O=s._offset-E,k=c._offset-D;r.clipRect.call(a.setTranslate,w,T).call(a.setScale,1/S,1/C),r.plot.call(a.setTranslate,O,k).call(a.setScale,S,C),a.setPointGroupScale(r.zoomScalePts,1/S,1/C),a.setTextPointsScale(r.zoomScaleTxt,1/S,1/C)}var f;c&&(f=c());function p(){for(var n={},i=0;is.duration?(p(),_=window.cancelAnimationFrame(y)):_=window.requestAnimationFrame(y)}return h=Date.now(),_=window.requestAnimationFrame(y),Promise.resolve()}}),xi=l(e=>{var t=f(),n=Ie(),r=$(),i=gt(),a=Gt(),o=mt().getModuleCalcData,s=dt(),c=ut(),l=_t(),u=r.ensureSingle;function d(e,t,n){return r.ensureSingle(e,t,n,function(e){e.datum(n)})}var p=c.zindexSeparator;e.name=`cartesian`,e.attr=[`xaxis`,`yaxis`],e.idRoot=[`x`,`y`],e.idRegex=c.idRegex,e.attrRegex=c.attrRegex,e.attributes=pi(),e.layoutAttributes=St(),e.supplyLayoutDefaults=yi(),e.transitionAxes=bi(),e.finalizeSubplots=function(e,t){for(var n=t._subplots,i=n.xaxis,a=n.yaxis,o=n.cartesian,l=o,u={},d={},f=0,p,m;f0){var g=h.id;if(g.indexOf(p)!==-1)continue;g+=p+(u+1),h=r.extendFlat({},h,{id:g,plot:a._cartesianlayer.selectAll(`.subplot`).select(`.`+g)})}for(var _=[],v,y=0;y1&&(S+=p+x),b.push(s+S),o=0;o1,h=t.mainplotinfo;if(!t.mainplot||m){if(f)t.xlines=u(r,`path`,`xlines-above`),t.ylines=u(r,`path`,`ylines-above`),t.xaxislayer=u(r,`g`,`xaxislayer-above`),t.yaxislayer=u(r,`g`,`yaxislayer-above`);else{if(!a){var g=u(r,`g`,`layer-subplot`);t.shapelayer=u(g,`g`,`shapelayer`),t.imagelayer=u(g,`g`,`imagelayer`),h&&m?(t.minorGridlayer=h.minorGridlayer,t.gridlayer=h.gridlayer,t.zerolinelayer=h.zerolinelayer):(t.minorGridlayer=u(r,`g`,`minor-gridlayer`),t.gridlayer=u(r,`g`,`gridlayer`),t.zerolinelayer=u(r,`g`,`zerolinelayer`));var _=u(r,`g`,`layer-between`);t.shapelayerBetween=u(_,`g`,`shapelayer`),t.imagelayerBetween=u(_,`g`,`imagelayer`),u(r,`path`,`xlines-below`),u(r,`path`,`ylines-below`),t.overlinesBelow=u(r,`g`,`overlines-below`),u(r,`g`,`xaxislayer-below`),u(r,`g`,`yaxislayer-below`),t.overaxesBelow=u(r,`g`,`overaxes-below`)}t.overplot=u(r,`g`,`overplot`),t.plot=u(t.overplot,`g`,i),t.zerolinelayerAbove=h&&m?h.zerolinelayerAbove:u(r,`g`,`zerolinelayer-above`),a||(t.xlines=u(r,`path`,`xlines-above`),t.ylines=u(r,`path`,`ylines-above`),t.overlinesAbove=u(r,`g`,`overlines-above`),u(r,`g`,`xaxislayer-above`),u(r,`g`,`yaxislayer-above`),t.overaxesAbove=u(r,`g`,`overaxes-above`),t.xlines=r.select(`.xlines-`+o),t.ylines=r.select(`.ylines-`+l),t.xaxislayer=r.select(`.xaxislayer-`+o),t.yaxislayer=r.select(`.yaxislayer-`+l))}}else{var v=h.plotgroup,y=i+`-x`,b=i+`-y`;t.minorGridlayer=h.minorGridlayer,t.gridlayer=h.gridlayer,t.zerolinelayer=h.zerolinelayer,t.zerolinelayerAbove=h.zerolinelayerAbove,u(h.overlinesBelow,`path`,y),u(h.overlinesBelow,`path`,b),u(h.overaxesBelow,`g`,y),u(h.overaxesBelow,`g`,b),t.plot=u(h.overplot,`g`,i),u(h.overlinesAbove,`path`,y),u(h.overlinesAbove,`path`,b),u(h.overaxesAbove,`g`,y),u(h.overaxesAbove,`g`,b),t.xlines=v.select(`.overlines-`+o).select(`.`+y),t.ylines=v.select(`.overlines-`+l).select(`.`+b),t.xaxislayer=v.select(`.overaxes-`+o).select(`.`+y),t.yaxislayer=v.select(`.overaxes-`+l).select(`.`+b)}a||(f||(d(t.minorGridlayer,`g`,t.xaxis._id),d(t.minorGridlayer,`g`,t.yaxis._id),t.minorGridlayer.selectAll(`g`).map(function(e){return e[0]}).sort(s.idSort),d(t.gridlayer,`g`,t.xaxis._id),d(t.gridlayer,`g`,t.yaxis._id),t.gridlayer.selectAll(`g`).map(function(e){return e[0]}).sort(s.idSort)),t.xlines.style(`fill`,`none`).classed(`crisp`,!0),t.ylines.style(`fill`,`none`).classed(`crisp`,!0))}function _(e,n){if(e){var r={};for(var i in e.each(function(e){var i=e[0];t.select(this).remove(),v(i,n),r[i]=!0}),n._plots)for(var a=n._plots[i],o=a.overlays||[],s=0;s{var n=Bt();t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:gr(),layoutAttributes:pt(),supplyDefaults:Gr(),crossTraceDefaults:qr(),supplyLayoutDefaults:Jr(),calc:$r().calc,crossTraceCalc:ri(),arraysToCalcdata:Zr(),plot:oi(),colorbar:si(),formatLabels:ci(),style:li().style,styleOnSelect:li().styleOnSelect,hoverPoints:di(),selectPoints:fi(),animatable:!0,moduleType:`trace`,name:`scatter`,basePlotModule:xi(),categories:[`cartesian`,`svg`,`symbols`,`errorBarsOK`,`showLegend`,`scatter-like`,`zoomScale`],meta:{}}}),Ci=l((e,t)=>{var n=f(),r=L(),i=dr(),a=$(),o=a.strScale,s=a.strRotate,c=a.strTranslate;t.exports=function(e,t,a){var l=e.node(),u=i[a.arrowhead||0],d=i[a.startarrowhead||0],f=(a.arrowwidth||1)*(a.arrowsize||1),p=(a.arrowwidth||1)*(a.startarrowsize||1),m=t.indexOf(`start`)>=0,h=t.indexOf(`end`)>=0,g=u.backoff*f+a.standoff,_=d.backoff*p+a.startstandoff,v,y,b,x;if(l.nodeName===`line`){v={x:+e.attr(`x1`),y:+e.attr(`y1`)},y={x:+e.attr(`x2`),y:+e.attr(`y2`)};var S=v.x-y.x,C=v.y-y.y;if(b=Math.atan2(C,S),x=b+Math.PI,g&&_&&g+_>Math.sqrt(S*S+C*C)){F();return}if(g){if(g*g>S*S+C*C){F();return}var w=g*Math.cos(b),T=g*Math.sin(b);y.x+=w,y.y+=T,e.attr({x2:y.x,y2:y.y})}if(_){if(_*_>S*S+C*C){F();return}var E=_*Math.cos(b),D=_*Math.sin(b);v.x-=E,v.y-=D,e.attr({x1:v.x,y1:v.y})}}else if(l.nodeName===`path`){var O=l.getTotalLength(),k=``;if(O{var n=f(),r=Ie(),i=gt(),a=$(),o=a.strTranslate,s=Xt(),c=L(),l=Gt(),u=Dn(),d=yt(),p=on(),m=an(),h=lt().arrayEditor,g=Ci();t.exports={draw:_,drawOne:v,drawRaw:b};function _(e){var t=e._fullLayout;t._infolayer.selectAll(`.annotation`).remove();for(var n=0;n2/3?`right`:`center`),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var q=!1,J=[`x`,`y`],Y=0;Y1)&&(Z===ee?(me=te.r2fraction(t[`a`+X]),(me<0||me>1)&&(q=!0)):q=!0),Q=te._offset+te.r2p(t[X]),de=.5}else{var he=pe===`domain`;X===`x`?(ue=t[X],Q=he?te._offset+te._length*ue:Q=x.l+x.w*ue):(ue=1-t[X],Q=he?te._offset+te._length*ue:Q=x.t+x.h*ue),de=t.showarrow?.5:ue}if(t.showarrow){ce.head=Q;var ge=t[`a`+X];if(fe=re*K(.5,t.xanchor)-ie*K(.5,t.yanchor),Z===ee){var _e=s.getRefType(Z);_e===`domain`?(X===`y`&&(ge=1-ge),ce.tail=te._offset+te._length*ge):_e===`paper`?X===`y`?(ge=1-ge,ce.tail=x.t+x.h*ge):ce.tail=x.l+x.w*ge:ce.tail=te._offset+te.r2p(ge),le=fe}else ce.tail=Q+ge,le=fe+ge;ce.text=ce.tail+fe;var ve=b[X===`x`?`width`:`height`];if(ee===`paper`&&(ce.head=a.constrain(ce.head,1,ve-1)),Z===`pixel`){var ye=-Math.max(ce.tail-3,ce.text),be=Math.min(ce.tail+3,ce.text)-ve;ye>0?(ce.tail+=ye,ce.text+=ye):be>0&&(ce.tail-=be,ce.text-=be)}ce.tail+=se,ce.head+=se}else fe=ae*K(de,oe),le=fe,ce.text=Q+fe;ce.text+=se,fe+=se,le+=se,t[`_`+X+`padplus`]=ae/2+le,t[`_`+X+`padminus`]=ae/2-le,t[`_`+X+`size`]=ae,t[`_`+X+`shift`]=fe}if(q){L.remove();return}var xe=0,Se=0;if(t.align!==`left`&&(xe=(T-C)*(t.align===`center`?.5:1)),t.valign!==`top`&&(Se=(F-w)*(t.valign===`middle`?.5:1)),u)i.select(`svg`).attr({x:z+xe-1,y:z+Se}).call(l.setClipUrl,V?k:null,e);else{var Ce=z+Se-h.top,we=z+xe-h.left;G.call(d.positionText,we,Ce).call(l.setClipUrl,V?k:null,e)}H.select(`rect`).call(l.setRect,z,z,T,F),B.call(l.setRect,R/2,R/2,U-R,W-R),L.call(l.setTranslate,Math.round(A.x.text-U/2),Math.round(A.y.text-W/2)),N.attr({transform:`rotate(`+j+`,`+A.x.text+`,`+A.y.text+`)`});var Te=function(n,i){M.selectAll(`.annotation-arrow-g`).remove();var s=A.x.head,u=A.y.head,d=A.x.tail+n,p=A.y.tail+i,h=A.x.text+n,b=A.y.text+i,C=a.rotationXYMatrix(j,h,b),w=a.apply2DTransform(C),T=a.apply2DTransform2(C),k=+B.attr(`width`),P=+B.attr(`height`),F=h-.5*k,I=F+k,R=b-.5*P,z=R+P,V=[[F,R,F,z],[F,z,I,z],[I,z,I,R],[I,R,F,R]].map(T);if(!V.reduce(function(e,t){return e^!!a.segmentsIntersect(s,u,s+1e6,u+1e6,t[0],t[1],t[2],t[3])},!1)){V.forEach(function(e){var t=a.segmentsIntersect(d,p,s,u,e[0],e[1],e[2],e[3]);t&&(d=t.x,p=t.y)});var H=t.arrowwidth,U=t.arrowcolor,W=t.arrowside,G=M.append(`g`).style({opacity:c.opacity(U)}).classed(`annotation-arrow-g`,!0),K=G.append(`path`).attr(`d`,`M`+d+`,`+p+`L`+s+`,`+u).style(`stroke-width`,H+`px`).call(c.stroke,c.rgb(U));if(g(K,W,t),S.annotationPosition&&K.node().parentNode&&!f){var q=s,J=u;if(t.standoff){var Y=Math.sqrt((s-d)**2+(u-p)**2);q+=t.standoff*(d-s)/Y,J+=t.standoff*(p-u)/Y}var X=G.append(`path`).classed(`annotation-arrow`,!0).classed(`anndrag`,!0).classed(`cursor-move`,!0).attr({d:`M3,3H-3V-3H3ZM0,0L`+(d-q)+`,`+(p-J),transform:o(q,J)}).style(`stroke-width`,H+6+`px`).call(c.stroke,`rgba(0,0,0,0)`).call(c.fill,`rgba(0,0,0,0)`),ee,Z;m.init({element:X.node(),gd:e,prepFn:function(){var e=l.getTranslate(L);ee=e.x,Z=e.y,_&&_.autorange&&E(_._name+`.autorange`,!0),v&&v.autorange&&E(v._name+`.autorange`,!0)},moveFn:function(e,n){var r=w(ee,Z),i=r[0]+e,a=r[1]+n;L.call(l.setTranslate,i,a),D(`x`,y(_,e,`x`,x,t)),D(`y`,y(v,n,`y`,x,t)),t.axref===t.xref&&D(`ax`,y(_,e,`ax`,x,t)),t.ayref===t.yref&&D(`ay`,y(v,n,`ay`,x,t)),G.attr(`transform`,o(e,n)),N.attr({transform:`rotate(`+j+`,`+i+`,`+a+`)`})},doneFn:function(){r.call(`_guiRelayout`,e,O());var t=document.querySelector(`.js-notes-box-panel`);t&&t.redraw(t.selectedObj)}})}}};if(t.showarrow&&Te(0,0),P){var Ee;m.init({element:L.node(),gd:e,prepFn:function(){Ee=N.attr(`transform`)},moveFn:function(e,n){var r=`pointer`;if(t.showarrow)t.axref===t.xref?D(`ax`,y(_,e,`ax`,x,t)):D(`ax`,t.ax+e),t.ayref===t.yref?D(`ay`,y(v,n,`ay`,x.w,t)):D(`ay`,t.ay+n),Te(e,n);else{if(f)return;var i,a;if(_)i=y(_,e,`x`,x,t);else{var s=t._xsize/x.w,c=t.x+(t._xshift-t.xshift)/x.w-s/2;i=m.align(c+e/x.w,s,0,1,t.xanchor)}if(v)a=y(v,n,`y`,x,t);else{var l=t._ysize/x.h,u=t.y-(t._yshift+t.yshift)/x.h-l/2;a=m.align(u-n/x.h,l,0,1,t.yanchor)}D(`x`,i),D(`y`,a),(!_||!v)&&(r=m.getCursor(_?.5:i,v?.5:a,t.xanchor,t.yanchor))}N.attr({transform:o(e,n)+Ee}),p(L,r)},clickFn:function(n,r){t.captureevents&&e.emit(`plotly_clickannotation`,I(r))},doneFn:function(){p(L),r.call(`_guiRelayout`,e,O());var t=document.querySelector(`.js-notes-box-panel`);t&&t.redraw(t.selectedObj)}})}}S.annotationText?G.call(d.makeEditable,{delegate:L,gd:e}).call(K).on(`edit`,function(n){t.text=n,this.call(K),D(`text`,n),_&&_.autorange&&E(_._name+`.autorange`,!0),v&&v.autorange&&E(v._name+`.autorange`,!0),r.call(`_guiRelayout`,e,O())}):G.call(K)}}),Ti=l((e,t)=>{var n=$(),r=Ie(),i=lt().arrayEditor;t.exports={hasClickToShow:a,onClick:o};function a(e,t){var n=s(e,t);return n.on.length>0||n.explicitOff.length>0}function o(e,t){var a=s(e,t),o=a.on,c=a.off.concat(a.explicitOff),l={},u=e._fullLayout.annotations,d,f;if(o.length||c.length){for(d=0;d{var n=$(),r=L();t.exports=function(e,t,i,a){a(`opacity`);var o=a(`bgcolor`),s=a(`bordercolor`),c=r.opacity(s);a(`borderpad`);var l=a(`borderwidth`),u=a(`showarrow`);if(a(`text`,u?` `:i._dfltTitle.annotation),a(`textangle`),n.coerceFont(a,`font`,i.font),a(`width`),a(`align`),a(`height`)&&a(`valign`),u){var d=a(`arrowside`),f,p;d.indexOf(`end`)!==-1&&(f=a(`arrowhead`),p=a(`arrowsize`)),d.indexOf(`start`)!==-1&&(a(`startarrowhead`,f),a(`startarrowsize`,p)),a(`arrowcolor`,c?t.bordercolor:r.defaultLine),a(`arrowwidth`,(c&&l||1)*2),a(`standoff`),a(`startstandoff`)}var m=a(`hovertext`),h=i.hoverlabel||{};if(m){var g=a(`hoverlabel.bgcolor`,h.bgcolor||(r.opacity(o)?r.rgb(o):r.defaultLine)),_=a(`hoverlabel.bordercolor`,h.bordercolor||r.contrast(g)),v=n.extendFlat({},h.font);v.color||=_,n.coerceFont(a,`hoverlabel.font`,v)}a(`captureevents`,!!m)}}),Di=l((e,t)=>{var n=$(),r=Xt(),i=jt(),a=Ei(),o=pr();t.exports=function(e,t){i(e,t,{name:`annotations`,handleItemDefaults:s})};function s(e,t,i){function s(r,i){return n.coerce(e,t,o,r,i)}var c=s(`visible`),l=s(`clicktoshow`);if(c||l){a(e,t,i,s);for(var u=t.showarrow,d=[`x`,`y`],f=[-10,-30],p={_fullLayout:i},m=0;m<2;m++){var h=d[m],g=r.coerceRef(e,t,p,h,``,`paper`);if(g!==`paper`&&r.getFromId(p,g)._annIndices.push(t._index),r.coercePosition(t,p,s,g,h,.5),u){var _=`a`+h,v=r.coerceRef(e,t,p,_,`pixel`,[`pixel`,`paper`]);v!==`pixel`&&v!==g&&(v=t[_]=`pixel`);var y=v===`pixel`?f[m]:.4;r.coercePosition(t,p,s,v,_,y)}s(h+`anchor`),s(h+`shift`)}if(n.noneOrAll(e,t,[`x`,`y`]),u&&n.noneOrAll(e,t,[`ax`,`ay`]),l){var b=s(`xclick`),x=s(`yclick`);t._xclick=b===void 0?t.x:r.cleanPosition(b,p,t.xref),t._yclick=x===void 0?t.y:r.cleanPosition(x,p,t.yref)}}}}),Oi=l((e,t)=>{var n=$(),r=Xt(),i=wi().draw;t.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([i,a],e)};function a(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach(function(t){var n=r.getFromId(e,t.xref),i=r.getFromId(e,t.yref),a=r.getRefType(t.xref),s=r.getRefType(t.yref);t._extremes={},a===`range`&&o(t,n),s===`range`&&o(t,i)})}function o(e,t){var n=t._id,i=n.charAt(0),a=e[i],o=e[`a`+i],s=e[i+`ref`],c=e[`a`+i+`ref`],l=e[`_`+i+`padplus`],u=e[`_`+i+`padminus`],d={x:1,y:-1}[i]*e[i+`shift`],f=3*e.arrowsize*e.arrowwidth||0,p=f+d,m=f-d,h=3*e.startarrowsize*e.arrowwidth||0,g=h+d,_=h-d,v;if(c===s){var y=r.findExtremes(t,[t.r2c(a)],{ppadplus:p,ppadminus:m}),b=r.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(l,g),ppadminus:Math.max(u,_)});v={min:[y.min[0],b.min[0]],max:[y.max[0],b.max[0]]}}else g=o?g+o:g,_=o?_-o:_,v=r.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,p,g),ppadminus:Math.max(u,m,_)});e._extremes[n]=v}}),ki=l((e,t)=>{var n=_(),r=T();t.exports=function(e,t,i,a){t||={};var o=i===`log`&&t.type===`linear`,s=i===`linear`&&t.type===`log`;if(!(o||s))return;var c=e._fullLayout.annotations,l=t._id.charAt(0),u,d;function f(e){var i=u[e],s=null;s=o?r(i,t.range):10**i,n(s)||(s=null),a(d+e,s)}for(var p=0;p{var n=wi(),r=Ti();t.exports={moduleType:`component`,name:`annotations`,layoutAttributes:pr(),supplyLayoutDefaults:Di(),includeBasePlot:br()(`annotations`),calcAutorange:Oi(),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:r.hasClickToShow,onClick:r.onClick,convertCoords:ki()}}),ji=l((e,t)=>{var n=pr(),r=Ee().overrideAll,i=lt().templatedArray;t.exports=r(i(`annotation`,{visible:n.visible,x:{valType:`any`},y:{valType:`any`},z:{valType:`any`},ax:{valType:`number`},ay:{valType:`number`},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),`calc`,`from-root`)}),Mi=l((e,t)=>{var n=$(),r=Xt(),i=jt(),a=Ei(),o=ji();t.exports=function(e,t,n){i(e,t,{name:`annotations`,handleItemDefaults:s,fullLayout:n.fullLayout})};function s(e,t,i,s){function c(r,i){return n.coerce(e,t,o,r,i)}function l(e){var n=e+`axis`,a={_fullLayout:{}};return a._fullLayout[n]=i[n],r.coercePosition(t,a,c,e,e,.5)}c(`visible`)&&(a(e,t,s.fullLayout,c),l(`x`),l(`y`),l(`z`),n.noneOrAll(e,t,[`x`,`y`,`z`]),t.xref=`x`,t.yref=`y`,t.zref=`z`,c(`xanchor`),c(`yanchor`),c(`xshift`),c(`yshift`),t.showarrow&&(t.axref=`pixel`,t.ayref=`pixel`,c(`ax`,-10),c(`ay`,-30),n.noneOrAll(e,t,[`ax`,`ay`])))}}),Ni=l((e,t)=>{var n=$(),r=Xt();t.exports=function(e){for(var t=e.fullSceneLayout.annotations,n=0;n{function n(e,t){for(var n=[0,0,0,0],r=0,i;r<4;++r)for(i=0;i<4;++i)n[i]+=e[4*r+i]*t[r];return n}function r(e,t){return n(e.projection,n(e.view,n(e.model,[t[0],t[1],t[2],1])))}t.exports=r}),Fi=l((e,t)=>{var n=wi().drawRaw,r=Pi(),i=[`x`,`y`,`z`];t.exports=function(e){for(var t=e.fullSceneLayout,a=e.dataScale,o=t.annotations,s=0;s1){l=!0;break}}l?e.fullLayout._infolayer.select(`.annotation-`+e.id+`[data-index="`+s+`"]`).remove():(c._pdata=r(e.glplot.cameraParams,[t.xaxis.r2l(c.x)*a[0],t.yaxis.r2l(c.y)*a[1],t.zaxis.r2l(c.z)*a[2]]),n(e.graphDiv,c,s,e.id,c._xa,c._ya))}}}),Ii=l((e,t)=>{var n=Ie(),r=$();t.exports={moduleType:`component`,name:`annotations3d`,schema:{subplots:{scene:{annotations:ji()}}},layoutAttributes:ji(),handleDefaults:Mi(),includeBasePlot:i,convert:Ni(),draw:Fi()};function i(e,t){var i=n.subplotsRegistry.gl3d;if(i)for(var a=i.attrRegex,o=Object.keys(e),s=0;s{ut();var n=A(),r=gr().line,i=De().dash,a=k().extendFlat,o=lt().templatedArray;fr();var s=P(),c=pr(),{shapeTexttemplateAttrs:l,templatefallbackAttrs:u}=ke(),d=Ae();t.exports=o(`shape`,{visible:a({},s.visible,{editType:`calc+arraydraw`}),showlegend:{valType:`boolean`,dflt:!1,editType:`calc+arraydraw`},legend:a({},s.legend,{editType:`calc+arraydraw`}),legendgroup:a({},s.legendgroup,{editType:`calc+arraydraw`}),legendgrouptitle:{text:a({},s.legendgrouptitle.text,{editType:`calc+arraydraw`}),font:n({editType:`calc+arraydraw`}),editType:`calc+arraydraw`},legendrank:a({},s.legendrank,{editType:`calc+arraydraw`}),legendwidth:a({},s.legendwidth,{editType:`calc+arraydraw`}),type:{valType:`enumerated`,values:[`circle`,`rect`,`path`,`line`],editType:`calc+arraydraw`},layer:{valType:`enumerated`,values:[`below`,`above`,`between`],dflt:`above`,editType:`arraydraw`},xref:a({},c.xref,{arrayOk:!0}),xsizemode:{valType:`enumerated`,values:[`scaled`,`pixel`],dflt:`scaled`,editType:`calc+arraydraw`},xanchor:{valType:`any`,editType:`calc+arraydraw`},x0:{valType:`any`,editType:`calc+arraydraw`},x1:{valType:`any`,editType:`calc+arraydraw`},x0shift:{valType:`number`,dflt:0,min:-1,max:1,editType:`calc`},x1shift:{valType:`number`,dflt:0,min:-1,max:1,editType:`calc`},yref:a({},c.yref,{arrayOk:!0}),ysizemode:{valType:`enumerated`,values:[`scaled`,`pixel`],dflt:`scaled`,editType:`calc+arraydraw`},yanchor:{valType:`any`,editType:`calc+arraydraw`},y0:{valType:`any`,editType:`calc+arraydraw`},y1:{valType:`any`,editType:`calc+arraydraw`},y0shift:{valType:`number`,dflt:0,min:-1,max:1,editType:`calc`},y1shift:{valType:`number`,dflt:0,min:-1,max:1,editType:`calc`},path:{valType:`string`,editType:`calc+arraydraw`},opacity:{valType:`number`,min:0,max:1,dflt:1,editType:`arraydraw`},line:{color:a({},r.color,{editType:`arraydraw`}),width:a({},r.width,{editType:`calc+arraydraw`}),dash:a({},i,{editType:`arraydraw`}),editType:`calc+arraydraw`},fillcolor:{valType:`color`,dflt:`rgba(0,0,0,0)`,editType:`arraydraw`},fillrule:{valType:`enumerated`,values:[`evenodd`,`nonzero`],dflt:`evenodd`,editType:`arraydraw`},editable:{valType:`boolean`,dflt:!1,editType:`calc+arraydraw`},label:{text:{valType:`string`,dflt:``,editType:`arraydraw`},texttemplate:l({},{keys:Object.keys(d)}),texttemplatefallback:u({editType:`arraydraw`}),font:n({editType:`calc+arraydraw`,colorEditType:`arraydraw`}),textposition:{valType:`enumerated`,values:[`top left`,`top center`,`top right`,`middle left`,`middle center`,`middle right`,`bottom left`,`bottom center`,`bottom right`,`start`,`middle`,`end`],editType:`arraydraw`},textangle:{valType:`angle`,dflt:`auto`,editType:`calc+arraydraw`},xanchor:{valType:`enumerated`,values:[`auto`,`left`,`center`,`right`],dflt:`auto`,editType:`calc+arraydraw`},yanchor:{valType:`enumerated`,values:[`top`,`middle`,`bottom`],editType:`calc+arraydraw`},padding:{valType:`number`,dflt:3,min:0,editType:`arraydraw`},editType:`arraydraw`},editType:`arraydraw`})}),Ri=l((e,t)=>{var n=$(),r=Xt(),i=jt(),a=Li(),o=Ln();t.exports=function(e,t){i(e,t,{name:`shapes`,handleItemDefaults:c})};function s(e,t){return e?`bottom`:t.indexOf(`top`)===-1?t.indexOf(`bottom`)===-1?`middle`:`bottom`:`top`}function c(e,t,i){function c(r,i){return n.coerce(e,t,a,r,i)}if(t._isShape=!0,!c(`visible`))return;var l=c(`showlegend`);c(`legend`),c(`legendgroup`),l&&(c(`legendwidth`),c(`legendgrouptitle.text`),n.coerceFont(c,`legendgrouptitle.font`),c(`legendrank`));var u=c(`path`),d=c(`type`,u?`path`:`rect`),f=d!==`path`;f&&delete t.path,c(`editable`),c(`layer`),c(`opacity`),c(`fillcolor`),c(`fillrule`),c(`line.width`)&&(c(`line.color`),c(`line.dash`));var p=c(`xsizemode`),m=c(`ysizemode`);let h=[.25,.75],g=[0,10];[`x`,`y`].forEach(a=>{var s=a+`anchor`,l=a===`x`?p:m,_={_fullLayout:i},v,y,b,x;let S=e[a+`ref`];if(Array.isArray(S)&&S.length>0){let n=o.countDefiningCoords(d,u,a);x=r.coerceRefArray(e,t,_,a,void 0,`paper`,n),t[`_`+a+`refArray`]=!0}else x=r.coerceRef(e,t,_,a,void 0,`paper`);if(Array.isArray(x))x.forEach(function(e){r.getRefType(e)===`range`&&(v=r.getFromId(_,e),v&&v._shapeIndices.indexOf(t._index)===-1&&v._shapeIndices.push(t._index))}),f&&[0,1].forEach(function(i){let u=x[i];r.getRefType(u)===`range`?(v=r.getFromId(_,u),y=o.shapePositionToRange(v),b=o.rangeToShapePosition(v),(v.type===`category`||v.type===`multicategory`)&&c(a+i+`shift`)):y=b=n.identity;let d=a+i,f=e[d];if(e[d]=y(e[d],!0),l===`pixel`?c(d,g[i]):r.coercePosition(t,_,c,u,d,h[i]),t[d]=b(t[d]),e[d]=f,i===0&&l===`pixel`){let n=e[s];e[s]=y(e[s],!0),r.coercePosition(t,_,c,u,s,.25),t[s]=b(t[s]),e[s]=n}});else{if(r.getRefType(x)===`range`?(v=r.getFromId(_,x),v._shapeIndices.push(t._index),b=o.rangeToShapePosition(v),y=o.shapePositionToRange(v),f&&(v.type===`category`||v.type===`multicategory`)&&(c(a+`0shift`),c(a+`1shift`))):y=b=n.identity,f){let n=a+`0`,i=a+`1`,o=e[n],s=e[i];e[n]=y(e[n],!0),e[i]=y(e[i],!0),l===`pixel`?(c(n,g[0]),c(i,g[1])):(r.coercePosition(t,_,c,x,n,h[0]),r.coercePosition(t,_,c,x,i,h[1])),t[n]=b(t[n]),t[i]=b(t[i]),e[n]=o,e[i]=s}if(l===`pixel`){let n=e[s];e[s]=y(e[s],!0),r.coercePosition(t,_,c,x,s,.25),t[s]=b(t[s]),e[s]=n}}}),f&&n.noneOrAll(e,t,[`x0`,`x1`,`y0`,`y1`]);var _=d===`line`,v,y;if(f&&(v=c(`label.texttemplate`),c(`label.texttemplatefallback`)),v||(y=c(`label.text`)),y||v){c(`label.textangle`);var b=c(`label.textposition`,_?`middle`:`middle center`);c(`label.xanchor`),c(`label.yanchor`,s(_,b)),c(`label.padding`),n.coerceFont(c,`label.font`,i.font)}}}),zi=l((e,t)=>{var n=L(),r=$();function i(e,t){return e?`bottom`:t.indexOf(`top`)===-1?t.indexOf(`bottom`)===-1?`middle`:`bottom`:`top`}t.exports=function(e,t,a){if(a(`newshape.visible`),a(`newshape.name`),a(`newshape.showlegend`),a(`newshape.legend`),a(`newshape.legendwidth`),a(`newshape.legendgroup`),a(`newshape.legendgrouptitle.text`),r.coerceFont(a,`newshape.legendgrouptitle.font`),a(`newshape.legendrank`),a(`newshape.drawdirection`),a(`newshape.layer`),a(`newshape.fillcolor`),a(`newshape.fillrule`),a(`newshape.opacity`),a(`newshape.line.width`)){var o=(e||{}).plot_bgcolor||`#FFF`;a(`newshape.line.color`,n.contrast(o)),a(`newshape.line.dash`)}var s=e.dragmode===`drawline`,c=a(`newshape.label.text`),l=a(`newshape.label.texttemplate`);if(a(`newshape.label.texttemplatefallback`),c||l){a(`newshape.label.textangle`);var u=a(`newshape.label.textposition`,s?`middle`:`middle center`);a(`newshape.label.xanchor`),a(`newshape.label.yanchor`,i(s,u)),a(`newshape.label.padding`),r.coerceFont(a,`newshape.label.font`,t.font)}a(`activeshape.fillcolor`),a(`activeshape.opacity`)}}),Bi=l((e,t)=>{var n=$(),r=Xt(),i=In(),a=Ln();t.exports=function(e){var t=e._fullLayout,a=n.filterVisible(t.shapes);if(a.length&&e._fullData.length)for(var l=0;l{f=r.getFromId(e,t),d._extremes[f._id]=r.findExtremes(f,n,s(d))})}else d.xref!==`paper`&&m!==`domain`&&(f=r.getFromId(e,d.xref),p=u(f,d,i.paramIsX),p&&(d._extremes[f._id]=r.findExtremes(f,p,s(d))));if(h===`array`){let t=o(e,d,`y`);Object.entries(t).forEach(([t,n])=>{f=r.getFromId(e,t),d._extremes[f._id]=r.findExtremes(f,n,c(d))})}else d.yref!==`paper`&&h!==`domain`&&(f=r.getFromId(e,d.yref),p=u(f,d,i.paramIsY),p&&(d._extremes[f._id]=r.findExtremes(f,p,c(d))))}};function o(e,t,n){let o=t[n+`ref`],s=n===`x`?i.paramIsX:i.paramIsY;function c(e,t){e===`paper`||r.getRefType(e)===`domain`||(l[e]||(l[e]=[]),l[e].push(t))}let l={};if(t.type===`path`&&t.path){let e=t.path.match(i.segmentRE)||[];for(var u=0,d=0;dn&&(c(o[u],r[n]),u++)}}else c(o[0],t[n+`0`]),c(o[1],t[n+`1`]);let f={};for(let t in l){let n=r.getFromId(e,t);if(n){var p=n.type===`category`||n.type===`multicategory`?n.r2c:n.d2c;n.type===`date`&&(p=a.decodeDate(p)),f[n._id]=l[t].map(p)}}return f}function s(e){return l(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function c(e){return l(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function l(e,t,r,o,s,c){var l=e/2,u=c;if(t===`pixel`){var d=s?a.extractPathCoords(s,c?i.paramIsY:i.paramIsX):[r,o],f=n.aggNums(Math.max,null,d),p=n.aggNums(Math.min,null,d),m=p<0?Math.abs(p)+l:l,h=f>0?f+l:l;return{ppad:l,ppadplus:u?m:h,ppadminus:u?h:m}}return{ppad:l}}function u(e,t,n){var r=e._id.charAt(0)===`x`?`x`:`y`,o=e.type===`category`||e.type===`multicategory`,s,c,l=0,u=0,d=o?e.r2c:e.d2c;if(t[r+`sizemode`]===`scaled`?(s=t[r+`0`],c=t[r+`1`],o&&(l=t[r+`0shift`],u=t[r+`1shift`])):(s=t[r+`anchor`],c=t[r+`anchor`]),s!==void 0)return[d(s)+l,d(c)+u];if(t.path){var f=1/0,p=-1/0,m=t.path.match(i.segmentRE),h,g,_,v,y;for(e.type===`date`&&(d=a.decodeDate(d)),h=0;hp&&(p=y)));if(p>=f)return[f,p]}}}),Vi=l((e,t)=>{var n=Bn();t.exports={moduleType:`component`,name:`shapes`,layoutAttributes:Li(),supplyLayoutDefaults:Ri(),supplyDrawNewShapeDefaults:zi(),includeBasePlot:br()(`shapes`),calcAutorange:Bi(),draw:n.draw,drawOne:n.drawOne}}),Hi=l((e,t)=>{var n=ut(),r=lt().templatedArray;fr(),t.exports=r(`image`,{visible:{valType:`boolean`,dflt:!0,editType:`arraydraw`},source:{valType:`string`,editType:`arraydraw`},layer:{valType:`enumerated`,values:[`below`,`above`],dflt:`above`,editType:`arraydraw`},sizex:{valType:`number`,dflt:0,editType:`arraydraw`},sizey:{valType:`number`,dflt:0,editType:`arraydraw`},sizing:{valType:`enumerated`,values:[`fill`,`contain`,`stretch`],dflt:`contain`,editType:`arraydraw`},opacity:{valType:`number`,min:0,max:1,dflt:1,editType:`arraydraw`},x:{valType:`any`,dflt:0,editType:`arraydraw`},y:{valType:`any`,dflt:0,editType:`arraydraw`},xanchor:{valType:`enumerated`,values:[`left`,`center`,`right`],dflt:`left`,editType:`arraydraw`},yanchor:{valType:`enumerated`,values:[`top`,`middle`,`bottom`],dflt:`top`,editType:`arraydraw`},xref:{valType:`enumerated`,values:[`paper`,n.idRegex.x.toString()],dflt:`paper`,editType:`arraydraw`},yref:{valType:`enumerated`,values:[`paper`,n.idRegex.y.toString()],dflt:`paper`,editType:`arraydraw`},editType:`arraydraw`})}),Ui=l((e,t)=>{var n=$(),r=Xt(),i=jt(),a=Hi(),o=`images`;t.exports=function(e,t){i(e,t,{name:o,handleItemDefaults:s})};function s(e,t,i){function o(r,i){return n.coerce(e,t,a,r,i)}if(!o(`visible`,!!o(`source`)))return t;o(`layer`),o(`xanchor`),o(`yanchor`),o(`sizex`),o(`sizey`),o(`sizing`),o(`opacity`);for(var s={_fullLayout:i},c=[`x`,`y`],l=0;l<2;l++){var u=c[l],d=r.coerceRef(e,t,s,u,`paper`,void 0);d!==`paper`&&r.getFromId(s,d)._imgIndices.push(t._index),r.coercePosition(t,s,o,d,u,0)}return t}}),Wi=l((e,t)=>{var n=f(),r=Gt(),i=Xt(),a=dt(),o=_t();t.exports=function(e){for(var t=e._fullLayout,s=[],c={},l=[],u,d=0;d{var n=_(),r=T();t.exports=function(e,t,i,a){t||={};var o=i===`log`&&t.type===`linear`,s=i===`linear`&&t.type===`log`;if(o||s){for(var c=e._fullLayout.images,l=t._id.charAt(0),u,d,f=0;f{t.exports={moduleType:`component`,name:`images`,layoutAttributes:Hi(),supplyLayoutDefaults:Ui(),includeBasePlot:br()(`images`),draw:Wi(),convertCoords:Gi()}}),qi=l((e,t)=>{t.exports={name:`updatemenus`,containerClassName:`updatemenu-container`,headerGroupClassName:`updatemenu-header-group`,headerClassName:`updatemenu-header`,headerArrowClassName:`updatemenu-header-arrow`,dropdownButtonGroupClassName:`updatemenu-dropdown-button-group`,dropdownButtonClassName:`updatemenu-dropdown-button`,buttonClassName:`updatemenu-button`,itemRectClassName:`updatemenu-item-rect`,itemTextClassName:`updatemenu-item-text`,menuIndexAttrName:`updatemenu-active-index`,autoMarginIdRoot:`updatemenu-`,blankHeaderOpts:{label:` `},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:`#F4FAFF`,hoverColor:`#F4FAFF`,arrowSymbol:{left:`◄`,right:`►`,up:`▲`,down:`▼`}}}),Ji=l((e,t)=>{var n=A(),r=I(),i=k().extendFlat,a=Ee().overrideAll,o=Ne(),s=lt().templatedArray;t.exports=a(s(`updatemenu`,{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:`boolean`},type:{valType:`enumerated`,values:[`dropdown`,`buttons`],dflt:`dropdown`},direction:{valType:`enumerated`,values:[`left`,`right`,`up`,`down`],dflt:`down`},active:{valType:`integer`,min:-1,dflt:0},showactive:{valType:`boolean`,dflt:!0},buttons:s(`button`,{visible:{valType:`boolean`},method:{valType:`enumerated`,values:[`restyle`,`relayout`,`animate`,`update`,`skip`],dflt:`restyle`},args:{valType:`info_array`,freeLength:!0,items:[{valType:`any`},{valType:`any`},{valType:`any`}]},args2:{valType:`info_array`,freeLength:!0,items:[{valType:`any`},{valType:`any`},{valType:`any`}]},label:{valType:`string`,dflt:``},execute:{valType:`boolean`,dflt:!0}}),x:{valType:`number`,min:-2,max:3,dflt:-.05},xanchor:{valType:`enumerated`,values:[`auto`,`left`,`center`,`right`],dflt:`right`},y:{valType:`number`,min:-2,max:3,dflt:1},yanchor:{valType:`enumerated`,values:[`auto`,`top`,`middle`,`bottom`],dflt:`top`},pad:i(o({editType:`arraydraw`}),{}),font:n({}),bgcolor:{valType:`color`},bordercolor:{valType:`color`,dflt:r.borderLine},borderwidth:{valType:`number`,min:0,dflt:1,editType:`arraydraw`}}),`arraydraw`,`from-root`)}),Yi=l((e,t)=>{var n=$(),r=jt(),i=Ji(),a=qi().name,o=i.buttons;t.exports=function(e,t){r(e,t,{name:a,handleItemDefaults:s})};function s(e,t,a){function o(r,a){return n.coerce(e,t,i,r,a)}o(`visible`,r(e,t,{name:`buttons`,handleItemDefaults:c}).length>0)&&(o(`active`),o(`direction`),o(`type`),o(`showactive`),o(`x`),o(`y`),n.noneOrAll(e,t,[`x`,`y`]),o(`xanchor`),o(`yanchor`),o(`pad.t`),o(`pad.r`),o(`pad.b`),o(`pad.l`),n.coerceFont(o,`font`,a.font),o(`bgcolor`,a.paper_bgcolor),o(`bordercolor`),o(`borderwidth`))}function c(e,t){function r(r,i){return n.coerce(e,t,o,r,i)}r(`visible`,e.method===`skip`||Array.isArray(e.args))&&(r(`method`),r(`args`),r(`args2`),r(`label`),r(`execute`))}}),Xi=l((e,t)=>{t.exports=o;var n=f(),r=L(),i=Gt(),a=$();function o(e,t,n){this.gd=e,this.container=t,this.id=n,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll(`rect.scrollbox-bg`).data([0]),this.bg.exit().on(`.drag`,null).on(`wheel`,null).remove(),this.bg.enter().append(`rect`).classed(`scrollbox-bg`,!0).style(`pointer-events`,`all`).attr({opacity:0,x:0,y:0,width:0,height:0})}o.barWidth=2,o.barLength=20,o.barRadius=2,o.barPad=1,o.barColor=`#808BA4`,o.prototype.enable=function(e,t,a){var s=this.gd._fullLayout,c=s.width,l=s.height;this.position=e;var u=this.position.l,d=this.position.w,f=this.position.t,p=this.position.h,m=this.position.direction,h=m===`down`,g=m===`left`,_=m===`right`,v=m===`up`,y=d,b=p,x,S,C,w;!h&&!g&&!_&&!v&&(this.position.direction=`down`,h=!0),h||v?(x=u,S=x+y,h?(C=f,w=Math.min(C+b,l),b=w-C):(w=f+b,C=Math.max(w-b,0),b=w-C)):(C=f,w=C+b,g?(S=u+y,x=Math.max(S-y,0),y=S-x):(x=u,S=Math.min(x+y,c),y=S-x)),this._box={l:x,t:C,w:y,h:b};var T=d>y,E=o.barLength+2*o.barPad,D=o.barWidth+2*o.barPad,O=u,k=f+p;k+D>l&&(k=l-D);var A=this.container.selectAll(`rect.scrollbar-horizontal`).data(T?[0]:[]);A.exit().on(`.drag`,null).remove(),A.enter().append(`rect`).classed(`scrollbar-horizontal`,!0).call(r.fill,o.barColor),T?(this.hbar=A.attr({rx:o.barRadius,ry:o.barRadius,x:O,y:k,width:E,height:D}),this._hbarXMin=O+E/2,this._hbarTranslateMax=y-E):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var j=p>b,M=o.barWidth+2*o.barPad,N=o.barLength+2*o.barPad,P=u+d,F=f;P+M>c&&(P=c-M);var I=this.container.selectAll(`rect.scrollbar-vertical`).data(j?[0]:[]);I.exit().on(`.drag`,null).remove(),I.enter().append(`rect`).classed(`scrollbar-vertical`,!0).call(r.fill,o.barColor),j?(this.vbar=I.attr({rx:o.barRadius,ry:o.barRadius,x:P,y:F,width:M,height:N}),this._vbarYMin=F+N/2,this._vbarTranslateMax=b-N):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var L=this.id,R=x-.5,z=j?S+M+.5:S+.5,B=C-.5,V=T?w+D+.5:w+.5,H=s._topdefs.selectAll(`#`+L).data(T||j?[0]:[]);if(H.exit().remove(),H.enter().append(`clipPath`).attr(`id`,L).append(`rect`),T||j?(this._clipRect=H.select(`rect`).attr({x:Math.floor(R),y:Math.floor(B),width:Math.ceil(z)-Math.floor(R),height:Math.ceil(V)-Math.floor(B)}),this.container.call(i.setClipUrl,L,this.gd),this.bg.attr({x:u,y:f,width:d,height:p})):(this.bg.attr({width:0,height:0}),this.container.on(`wheel`,null).on(`.drag`,null).call(i.setClipUrl,null),delete this._clipRect),T||j){var U=n.behavior.drag().on(`dragstart`,function(){n.event.sourceEvent.preventDefault()}).on(`drag`,this._onBoxDrag.bind(this));this.container.on(`wheel`,null).on(`wheel`,this._onBoxWheel.bind(this)).on(`.drag`,null).call(U);var W=n.behavior.drag().on(`dragstart`,function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()}).on(`drag`,this._onBarDrag.bind(this));T&&this.hbar.on(`.drag`,null).call(W),j&&this.vbar.on(`.drag`,null).call(W)}this.setTranslate(t,a)},o.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on(`wheel`,null).on(`.drag`,null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(`.drag`,null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(`.drag`,null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},o.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},o.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},o.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,i=r+this._hbarTranslateMax;e=(a.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,s=o+this._vbarTranslateMax;t=(a.constrain(n.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},o.prototype.setTranslate=function(e,t){var n=this.position.w-this._box.w,r=this.position.h-this._box.h;if(e=a.constrain(e||0,0,n),t=a.constrain(t||0,0,r),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var o=e/n;this.hbar.call(i.setTranslate,e+o*this._hbarTranslateMax,t)}if(this.vbar){var s=t/r;this.vbar.call(i.setTranslate,e,t+s*this._vbarTranslateMax)}}}),Zi=l((e,t)=>{var n=f(),r=gt(),i=L(),a=Gt(),o=$(),s=yt(),c=lt().arrayEditor,l=vt().LINE_SPACING,u=qi(),d=Xi();t.exports=function(e){var t=e._fullLayout,i=o.filterVisible(t[u.name]);function a(t){r.autoMargin(e,O(t))}var s=t._menulayer.selectAll(`g.`+u.containerClassName).data(i.length>0?[0]:[]);if(s.enter().append(`g`).classed(u.containerClassName,!0).style(`cursor`,`pointer`),s.exit().each(function(){n.select(this).selectAll(`g.`+u.headerGroupClassName).each(a)}).remove(),i.length!==0){var c=s.selectAll(`g.`+u.headerGroupClassName).data(i,p);c.enter().append(`g`).classed(u.headerGroupClassName,!0);for(var l=o.ensureSingle(s,`g`,u.dropdownButtonGroupClassName,function(e){e.style(`pointer-events`,`all`)}),f=0;f{t.exports={moduleType:`component`,name:qi().name,layoutAttributes:Ji(),supplyLayoutDefaults:Yi(),draw:Zi()}}),$i=l((e,t)=>{t.exports={name:`sliders`,containerClassName:`slider-container`,groupClassName:`slider-group`,inputAreaClass:`slider-input-area`,railRectClass:`slider-rail-rect`,railTouchRectClass:`slider-rail-touch-rect`,gripRectClass:`slider-grip-rect`,tickRectClass:`slider-tick-rect`,inputProxyClass:`slider-input-proxy`,labelsClass:`slider-labels`,labelGroupClass:`slider-label-group`,labelClass:`slider-label`,currentValueClass:`slider-current-value`,railHeight:5,menuIndexAttrName:`slider-active-index`,autoMarginIdRoot:`slider-`,minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:`#bec8d9`,railBgColor:`#f8fafc`,railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:`#bec8d9`,gripBgColor:`#f6f8fa`,gripBgActiveColor:`#dbdde0`,labelPadding:8,labelOffset:0,tickWidth:1,tickColor:`#333`,tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:`#333`,minorTickLength:4,currentValuePadding:8,currentValueInset:0}}),ea=l((e,t)=>{var n=A(),r=Ne(),i=k().extendDeepAll,a=Ee().overrideAll,o=Te(),s=lt().templatedArray,c=$i();t.exports=a(s(`slider`,{visible:{valType:`boolean`,dflt:!0},active:{valType:`number`,min:0,dflt:0},steps:s(`step`,{visible:{valType:`boolean`,dflt:!0},method:{valType:`enumerated`,values:[`restyle`,`relayout`,`animate`,`update`,`skip`],dflt:`restyle`},args:{valType:`info_array`,freeLength:!0,items:[{valType:`any`},{valType:`any`},{valType:`any`}]},label:{valType:`string`},value:{valType:`string`},execute:{valType:`boolean`,dflt:!0}}),lenmode:{valType:`enumerated`,values:[`fraction`,`pixels`],dflt:`fraction`},len:{valType:`number`,min:0,dflt:1},x:{valType:`number`,min:-2,max:3,dflt:0},pad:i(r({editType:`arraydraw`}),{},{t:{dflt:20}}),xanchor:{valType:`enumerated`,values:[`auto`,`left`,`center`,`right`],dflt:`left`},y:{valType:`number`,min:-2,max:3,dflt:0},yanchor:{valType:`enumerated`,values:[`auto`,`top`,`middle`,`bottom`],dflt:`top`},transition:{duration:{valType:`number`,min:0,dflt:150},easing:{valType:`enumerated`,values:o.transition.easing.values,dflt:`cubic-in-out`}},currentvalue:{visible:{valType:`boolean`,dflt:!0},xanchor:{valType:`enumerated`,values:[`left`,`center`,`right`],dflt:`left`},offset:{valType:`number`,dflt:10},prefix:{valType:`string`},suffix:{valType:`string`},font:n({})},font:n({}),activebgcolor:{valType:`color`,dflt:c.gripBgActiveColor},bgcolor:{valType:`color`,dflt:c.railBgColor},bordercolor:{valType:`color`,dflt:c.railBorderColor},borderwidth:{valType:`number`,min:0,dflt:c.railBorderWidth},ticklen:{valType:`number`,min:0,dflt:c.tickLength},tickcolor:{valType:`color`,dflt:c.tickColor},tickwidth:{valType:`number`,min:0,dflt:1},minorticklen:{valType:`number`,min:0,dflt:c.minorTickLength}}),`arraydraw`,`from-root`)}),ta=l((e,t)=>{var n=$(),r=jt(),i=ea(),a=$i().name,o=i.steps;t.exports=function(e,t){r(e,t,{name:a,handleItemDefaults:s})};function s(e,t,a){function o(r,a){return n.coerce(e,t,i,r,a)}for(var s=r(e,t,{name:`steps`,handleItemDefaults:c}),l=0,u=0;u{var n=f(),r=gt(),i=L(),a=Gt(),o=$(),s=o.strTranslate,c=yt(),l=lt().arrayEditor,u=$i(),d=vt(),p=d.LINE_SPACING,m=d.FROM_TL,h=d.FROM_BR;t.exports=function(e){var t=e._context.staticPlot,i=e._fullLayout,a=_(i,e),o=i._infolayer.selectAll(`g.`+u.containerClassName).data(a.length>0?[0]:[]);o.enter().append(`g`).classed(u.containerClassName,!0).style(`cursor`,t?null:`ew-resize`);function s(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),r.autoMargin(e,g(t))}if(o.exit().each(function(){n.select(this).selectAll(`g.`+u.groupClassName).each(s)}).remove(),a.length!==0){var c=o.selectAll(`g.`+u.groupClassName).data(a,v);c.enter().append(`g`).classed(u.groupClassName,!0),c.exit().each(s).remove();for(var l=0;l0&&(c=c.transition().duration(t.transition.duration).ease(t.transition.easing)),c.attr(`transform`,s(o-u.gripWidth*.5,t._dims.currentValueTotalHeight))}}function j(e,t){var n=e._dims;return n.inputAreaStart+u.stepInset+(n.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,t))}function M(e,t){var n=e._dims;return Math.min(1,Math.max(0,(t-u.stepInset-n.inputAreaStart)/(n.inputAreaLength-2*u.stepInset-2*n.inputAreaStart)))}function N(e,t,n){var r=n._dims,s=o.ensureSingle(e,`rect`,u.railTouchRectClass,function(r){r.call(D,t,e,n).style(`pointer-events`,`all`)});s.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,u.tickOffset+n.ticklen+r.labelHeight)}).call(i.fill,n.bgcolor).attr(`opacity`,0),a.setTranslate(s,0,r.currentValueTotalHeight)}function P(e,t){var n=t._dims,r=n.inputAreaLength-u.railInset*2,s=o.ensureSingle(e,`rect`,u.railRectClass);s.attr({width:r,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":`crispEdges`}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style(`stroke-width`,t.borderwidth+`px`),a.setTranslate(s,u.railInset,(n.inputAreaWidth-u.railWidth)*.5+n.currentValueTotalHeight)}}),ra=l((e,t)=>{t.exports={moduleType:`component`,name:$i().name,layoutAttributes:ea(),supplyLayoutDefaults:ta(),draw:na()}}),ia=l((e,t)=>{var n=I();t.exports={bgcolor:{valType:`color`,dflt:n.background,editType:`plot`},bordercolor:{valType:`color`,dflt:n.defaultLine,editType:`plot`},borderwidth:{valType:`integer`,dflt:0,min:0,editType:`plot`},autorange:{valType:`boolean`,dflt:!0,editType:`calc`,impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:`info_array`,items:[{valType:`any`,editType:`calc`,impliedEdits:{"^autorange":!1}},{valType:`any`,editType:`calc`,impliedEdits:{"^autorange":!1}}],editType:`calc`,impliedEdits:{autorange:!1}},thickness:{valType:`number`,dflt:.15,min:0,max:1,editType:`plot`},visible:{valType:`boolean`,dflt:!0,editType:`calc`},editType:`calc`}}),aa=l((e,t)=>{t.exports={_isSubplotObj:!0,rangemode:{valType:`enumerated`,values:[`auto`,`fixed`,`match`],dflt:`match`,editType:`calc`},range:{valType:`info_array`,items:[{valType:`any`,editType:`plot`},{valType:`any`,editType:`plot`}],editType:`plot`},editType:`calc`}}),oa=l((e,t)=>{t.exports={name:`rangeslider`,containerClassName:`rangeslider-container`,bgClassName:`rangeslider-bg`,rangePlotClassName:`rangeslider-rangeplot`,maskMinClassName:`rangeslider-mask-min`,maskMaxClassName:`rangeslider-mask-max`,slideBoxClassName:`rangeslider-slidebox`,grabberMinClassName:`rangeslider-grabber-min`,grabAreaMinClassName:`rangeslider-grabarea-min`,handleMinClassName:`rangeslider-handle-min`,grabberMaxClassName:`rangeslider-grabber-max`,grabAreaMaxClassName:`rangeslider-grabarea-max`,handleMaxClassName:`rangeslider-handle-max`,maskMinOppAxisClassName:`rangeslider-mask-min-opp-axis`,maskMaxOppAxisClassName:`rangeslider-mask-max-opp-axis`,maskColor:`rgba(0,0,0,0.4)`,maskOppAxisColor:`rgba(0,0,0,0.2)`,slideBoxFill:`transparent`,slideBoxCursor:`ew-resize`,grabAreaFill:`transparent`,grabAreaCursor:`col-resize`,grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}),sa=l(e=>{var t=dt(),n=yt(),r=oa(),i=vt().LINE_SPACING,a=r.name;function o(e){var t=e&&e[a];return t&&t.visible}e.isVisible=o,e.makeData=function(e){for(var n=t.list({_fullLayout:e},`x`,!0),r=e.margin,i=[],s=0;s{var n=$(),r=lt(),i=dt(),a=ia(),o=aa();t.exports=function(e,t,s){var c=e[s],l=t[s];if(!(c.rangeslider||t._requestRangeslider[l._id]))return;n.isPlainObject(c.rangeslider)||(c.rangeslider={});var u=c.rangeslider,d=r.newContainer(l,`rangeslider`);function f(e,t){return n.coerce(u,d,a,e,t)}var p,m;function h(e,t){return n.coerce(p,m,o,e,t)}if(f(`visible`)){f(`bgcolor`,t.plot_bgcolor),f(`bordercolor`),f(`borderwidth`),f(`thickness`),f(`autorange`,!l.isValidRange(u.range)),f(`range`);var g=t._subplots;if(g)for(var _=g.cartesian.filter(function(e){return e.slice(0,Math.max(0,e.indexOf(`y`)))===i.name2id(s)}).map(function(e){return e.slice(e.indexOf(`y`),e.length)}),v=n.simpleMap(_,i.id2name),y=0;y{var n=dt().list,r=Yt().getAutoRange,i=oa();t.exports=function(e){for(var t=n(e,`x`,!0),a=0;a{var n=f(),r=Ie(),i=gt(),a=$(),o=a.strTranslate,s=Gt(),c=L(),l=Kt(),u=xi(),d=dt(),p=an(),m=on(),h=oa();t.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,i=0;i=r.max)t=I[n+1];else if(e=r.pmax)t=I[n+1];else if(e0?e.touches[0].clientX:0}function _(e,t,r,i){if(t._context.staticPlot)return;var o=e.select(`rect.`+h.slideBoxClassName).node(),s=e.select(`rect.`+h.grabAreaMinClassName).node(),c=e.select(`rect.`+h.grabAreaMaxClassName).node();function l(){var l=n.event,u=l.target,d=g(l),f=d-e.node().getBoundingClientRect().left,h=i.d2p(r._rl[0]),_=i.d2p(r._rl[1]),y=p.coverSlip();this.addEventListener(`touchmove`,b),this.addEventListener(`touchend`,x),y.addEventListener(`mousemove`,b),y.addEventListener(`mouseup`,x);function b(a){var l=+g(a)-d,p,b,x;switch(u){case o:if(x=`ew-resize`,h+l>r._length||_+l<0)return;p=h+l,b=_+l;break;case s:if(x=`col-resize`,h+l>r._length)return;p=h+l,b=_;break;case c:if(x=`col-resize`,_+l<0)return;p=h,b=_+l;break;default:x=`ew-resize`,p=f,b=f+l}if(b{var n=$(),r=ia(),i=aa(),a=sa();t.exports={moduleType:`component`,name:`rangeslider`,schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},r,{yaxis:i})}}},layoutAttributes:ia(),handleDefaults:ca(),calcAutorange:la(),draw:ua(),isVisible:a.isVisible,makeData:a.makeData,autoMarginOpts:a.autoMarginOpts}}),fa=l((e,t)=>{var n=A(),r=I(),i=lt().templatedArray;t.exports={visible:{valType:`boolean`,editType:`plot`},buttons:i(`button`,{visible:{valType:`boolean`,dflt:!0,editType:`plot`},step:{valType:`enumerated`,values:[`month`,`year`,`day`,`hour`,`minute`,`second`,`all`],dflt:`month`,editType:`plot`},stepmode:{valType:`enumerated`,values:[`backward`,`todate`],dflt:`backward`,editType:`plot`},count:{valType:`number`,min:0,dflt:1,editType:`plot`},label:{valType:`string`,editType:`plot`},editType:`plot`}),x:{valType:`number`,min:-2,max:3,editType:`plot`},xanchor:{valType:`enumerated`,values:[`auto`,`left`,`center`,`right`],dflt:`left`,editType:`plot`},y:{valType:`number`,min:-2,max:3,editType:`plot`},yanchor:{valType:`enumerated`,values:[`auto`,`top`,`middle`,`bottom`],dflt:`bottom`,editType:`plot`},font:n({editType:`plot`}),bgcolor:{valType:`color`,dflt:r.lightLine,editType:`plot`},activecolor:{valType:`color`,editType:`plot`},bordercolor:{valType:`color`,dflt:r.defaultLine,editType:`plot`},borderwidth:{valType:`number`,min:0,dflt:0,editType:`plot`},editType:`plot`}}),pa=l((e,t)=>{t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}),ma=l((e,t)=>{var n=$(),r=L(),i=lt(),a=jt(),o=fa(),s=pa();t.exports=function(e,t,u,d,f){var p=e.rangeselector||{},m=i.newContainer(t,`rangeselector`);function h(e,t){return n.coerce(p,m,o,e,t)}if(h(`visible`,a(p,m,{name:`buttons`,handleItemDefaults:c,calendar:f}).length>0)){var g=l(t,u,d);h(`x`,g[0]),h(`y`,g[1]),n.noneOrAll(e,t,[`x`,`y`]),h(`xanchor`),h(`yanchor`),n.coerceFont(h,`font`,u.font);var _=h(`bgcolor`);h(`activecolor`,r.contrast(_,s.lightAmount,s.darkAmount)),h(`bordercolor`),h(`borderwidth`)}};function c(e,t,r,i){var a=i.calendar;function s(r,i){return n.coerce(e,t,o.buttons,r,i)}if(s(`visible`)){var c=s(`step`);c!==`all`&&(a&&a!==`gregorian`&&(c===`month`||c===`year`)?t.stepmode=`backward`:s(`stepmode`),s(`count`)),s(`label`)}}function l(e,t,n){for(var r=n.filter(function(n){return t[n].anchor===e._id}),i=0,a=0;a{var n=p(),r=$().titleCase;t.exports=function(e,t){var n=e._name,r={};if(t.step===`all`)r[n+`.autorange`]=!0;else{var a=i(e,t);r[n+`.range[0]`]=a[0],r[n+`.range[1]`]=a[1]}return r};function i(e,t){var i=e.range,a=new Date(e.r2l(i[1])),o=t.step,s=n[`utc`+r(o)],c=t.count,l;switch(t.stepmode){case`backward`:l=e.l2r(+s.offset(a,-c));break;case`todate`:var u=s.offset(a,-c);l=e.l2r(+s.ceil(u))}var d=i[1];return[l,d]}}),ga=l((e,t)=>{var n=f(),r=Ie(),i=gt(),a=L(),o=Gt(),s=$(),c=s.strTranslate,l=yt(),u=dt(),d=vt(),p=d.LINE_SPACING,m=d.FROM_TL,h=d.FROM_BR,g=pa(),_=ha();t.exports=function(e){var t=e._fullLayout._infolayer.selectAll(`.rangeselector`).data(v(e),y);t.enter().append(`g`).classed(`rangeselector`,!0),t.exit().remove(),t.style({cursor:`pointer`,"pointer-events":`all`}),t.each(function(t){var i=n.select(this),a=t,o=a.rangeselector,c=i.selectAll(`g.button`).data(s.filterVisible(o.buttons));c.enter().append(`g`).classed(`button`,!0),c.exit().remove(),c.each(function(t){var i=n.select(this),s=_(a,t);t._isActive=b(a,t,s),i.call(x,o,t),i.call(C,o,t,e),i.on(`click`,function(){e._dragged||r.call(`_guiRelayout`,e,s)}),i.on(`mouseover`,function(){t._isHovered=!0,i.call(x,o,t)}),i.on(`mouseout`,function(){t._isHovered=!1,i.call(x,o,t)})}),T(e,c,o,a._name,i)})};function v(e){for(var t=u.list(e,`x`,!0),n=[],r=0;r{t.exports={moduleType:`component`,name:`rangeselector`,schema:{subplots:{xaxis:{rangeselector:fa()}}},layoutAttributes:fa(),handleDefaults:ma(),draw:ga()}}),va=l(e=>{var t=k().extendFlat;e.attributes=function(e,n){e||={},n||={};var r={valType:`info_array`,editType:e.editType,items:[{valType:`number`,min:0,max:1,editType:e.editType},{valType:`number`,min:0,max:1,editType:e.editType}],dflt:[0,1]};e.name&&e.name+``,e.trace,n.description&&``+n.description;var i={x:t({},r,{}),y:t({},r,{}),editType:e.editType};return e.noGridCell||(i.row={valType:`integer`,min:0,dflt:0,editType:e.editType},i.column={valType:`integer`,min:0,dflt:0,editType:e.editType}),i},e.defaults=function(e,t,n,r){var i=r&&r.x||[0,1],a=r&&r.y||[0,1],o=t.grid;if(o){var s=n(`domain.column`);s!==void 0&&(s{var n=$(),r=z().counter,i=va().attributes,a=ut().idRegex,o=lt(),s={rows:{valType:`integer`,min:1,editType:`plot`},roworder:{valType:`enumerated`,values:[`top to bottom`,`bottom to top`],dflt:`top to bottom`,editType:`plot`},columns:{valType:`integer`,min:1,editType:`plot`},subplots:{valType:`info_array`,freeLength:!0,dimensions:2,items:{valType:`enumerated`,values:[r(`xy`).toString(),``],editType:`plot`},editType:`plot`},xaxes:{valType:`info_array`,freeLength:!0,items:{valType:`enumerated`,values:[a.x.toString(),``],editType:`plot`},editType:`plot`},yaxes:{valType:`info_array`,freeLength:!0,items:{valType:`enumerated`,values:[a.y.toString(),``],editType:`plot`},editType:`plot`},pattern:{valType:`enumerated`,values:[`independent`,`coupled`],dflt:`coupled`,editType:`plot`},xgap:{valType:`number`,min:0,max:1,editType:`plot`},ygap:{valType:`number`,min:0,max:1,editType:`plot`},domain:i({name:`grid`,editType:`plot`,noGridCell:!0},{}),xside:{valType:`enumerated`,values:[`bottom`,`bottom plot`,`top plot`,`top`],dflt:`bottom plot`,editType:`plot`},yside:{valType:`enumerated`,values:[`left`,`left plot`,`right plot`,`right`],dflt:`left plot`,editType:`plot`},editType:`plot`};function c(e,t,n){var r=t[n+`axes`],i=Object.keys((e._splomAxes||{})[n]||{});if(Array.isArray(r))return r;if(i.length)return i}function l(e,t){var r=e.grid||{},i=c(t,r,`x`),a=c(t,r,`y`);if(!e.grid&&!i&&!a)return;var l=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),d=Array.isArray(i),f=Array.isArray(a),p=d&&i!==r.xaxes&&f&&a!==r.yaxes,m,h;l?(m=r.subplots.length,h=r.subplots[0].length):(f&&(m=a.length),d&&(h=i.length));var g=o.newContainer(t,`grid`);function _(e,t){return n.coerce(r,g,s,e,t)}var v=_(`rows`,m),y=_(`columns`,h);if(!(v*y>1)){delete t.grid;return}!l&&!d&&!f&&_(`pattern`)===`independent`&&(l=!0),g._hasSubplotGrid=l;var b=_(`roworder`)===`top to bottom`,x=l?.2:.1,S=l?.3:.1,C,w;p&&t._splomGridDflt&&(C=t._splomGridDflt.xside,w=t._splomGridDflt.yside),g._domains={x:u(`x`,_,x,C,y),y:u(`y`,_,S,w,v,b)}}function u(e,t,n,r,i,a){var o=t(e+`gap`,n),s=t(`domain.`+e);t(e+`side`,r);for(var c=Array(i),l=s[0],u=(s[1]-l)/(i-o),d=u*(1-o),f=0;f{t.exports={visible:{valType:`boolean`,editType:`calc`},type:{valType:`enumerated`,values:[`percent`,`constant`,`sqrt`,`data`],editType:`calc`},symmetric:{valType:`boolean`,editType:`calc`},array:{valType:`data_array`,editType:`calc`},arrayminus:{valType:`data_array`,editType:`calc`},value:{valType:`number`,min:0,dflt:10,editType:`calc`},valueminus:{valType:`number`,min:0,dflt:10,editType:`calc`},traceref:{valType:`integer`,min:0,dflt:0,editType:`style`},tracerefminus:{valType:`integer`,min:0,dflt:0,editType:`style`},copy_ystyle:{valType:`boolean`,editType:`plot`},copy_zstyle:{valType:`boolean`,editType:`style`},color:{valType:`color`,editType:`style`},thickness:{valType:`number`,min:0,dflt:2,editType:`style`},width:{valType:`number`,min:0,editType:`plot`},editType:`calc`}}),xa=l((e,t)=>{var n=_(),r=Ie(),i=$(),a=lt(),o=ba();t.exports=function(e,t,s,c){var l=`error_`+c.axis,u=a.newContainer(t,l),d=e[l]||{};function f(e,t){return i.coerce(d,u,o,e,t)}if(f(`visible`,d.array!==void 0||d.value!==void 0||d.type===`sqrt`)!==!1){var p=f(`type`,`array`in d?`data`:`percent`),m=!0;p!==`sqrt`&&(m=f(`symmetric`,!((p===`data`?`arrayminus`:`valueminus`)in d))),p===`data`?(f(`array`),f(`traceref`),m||(f(`arrayminus`),f(`tracerefminus`))):(p===`percent`||p===`constant`)&&(f(`value`),m||f(`valueminus`));var h=`copy_`+c.inherit+`style`;c.inherit&&(t[`error_`+c.inherit]||{}).visible&&f(h,!(d.color||n(d.thickness)||n(d.width))),(!c.inherit||!u[h])&&(f(`color`,s),f(`thickness`),f(`width`,r.traceIs(t,`gl3d`)?0:4))}}}),Sa=l((e,t)=>{t.exports=function(e){var t=e.type,r=e.symmetric;if(t===`data`){var i=e.array||[];if(r)return function(e,t){var n=+i[t];return[n,n]};var a=e.arrayminus||[];return function(e,t){var n=+i[t],r=+a[t];return!isNaN(n)||!isNaN(r)?[r||0,n||0]:[NaN,NaN]}}var o=n(t,e.value),s=n(t,e.valueminus);return r||e.valueminus===void 0?function(e){var t=o(e);return[t,t]}:function(e){return[s(e),o(e)]}};function n(e,t){if(e===`percent`)return function(e){return Math.abs(e*t/100)};if(e===`constant`)return function(){return Math.abs(t)};if(e===`sqrt`)return function(e){return Math.sqrt(Math.abs(e))}}}),Ca=l((e,t)=>{var n=_(),r=Ie(),i=Xt(),a=$(),o=Sa();t.exports=function(e){for(var t=e.calcdata,n=0;n{var n=f(),r=_(),i=Gt(),a=Bt();t.exports=function(e,t,s,c){var l,u=s.xaxis,d=s.yaxis,f=c&&c.duration>0,p=e._context.staticPlot;t.each(function(t){var m=t[0].trace,h=m.error_x||{},g=m.error_y||{},_;m.ids&&(_=function(e){return e.id});var v=a.hasMarkers(m)&&m.marker.maxdisplayed>0;!g.visible&&!h.visible&&(t=[]);var y=n.select(this).selectAll(`g.errorbar`).data(t,_);if(y.exit().remove(),t.length){h.visible||y.selectAll(`path.xerror`).remove(),g.visible||y.selectAll(`path.yerror`).remove(),y.style(`opacity`,1);var b=y.enter().append(`g`).classed(`errorbar`,!0);f&&b.style(`opacity`,0).transition().duration(c.duration).style(`opacity`,1),i.setClipUrl(y,s.layerClipId,e),y.each(function(e){var t=n.select(this),i=o(e,u,d);if(!v||e.vis){var a,s=t.select(`path.yerror`);if(g.visible&&r(i.x)&&r(i.yh)&&r(i.ys)){var m=g.width;a=`M`+(i.x-m)+`,`+i.yh+`h`+2*m+`m-`+m+`,0V`+i.ys,i.noYS||(a+=`m-`+m+`,0h`+2*m),l=!s.size(),l?s=t.append(`path`).style(`vector-effect`,p?`none`:`non-scaling-stroke`).classed(`yerror`,!0):f&&(s=s.transition().duration(c.duration).ease(c.easing)),s.attr(`d`,a)}else s.remove();var _=t.select(`path.xerror`);if(h.visible&&r(i.y)&&r(i.xh)&&r(i.xs)){var y=(h.copy_ystyle?g:h).width;a=`M`+i.xh+`,`+(i.y-y)+`v`+2*y+`m0,-`+y+`H`+i.xs,i.noXS||(a+=`m0,-`+y+`v`+2*y),l=!_.size(),l?_=t.append(`path`).style(`vector-effect`,p?`none`:`non-scaling-stroke`).classed(`xerror`,!0):f&&(_=_.transition().duration(c.duration).ease(c.easing)),_.attr(`d`,a)}else _.remove()}})}})};function o(e,t,n){var i={x:t.c2p(e.x),y:n.c2p(e.y)};return e.yh!==void 0&&(i.yh=n.c2p(e.yh),i.ys=n.c2p(e.ys),r(i.ys)||(i.noYS=!0,i.ys=n.c2p(e.ys,!0))),e.xh!==void 0&&(i.xh=t.c2p(e.xh),i.xs=t.c2p(e.xs),r(i.xs)||(i.noXS=!0,i.xs=t.c2p(e.xs,!0))),i}}),Ta=l((e,t)=>{var n=f(),r=L();t.exports=function(e){e.each(function(e){var t=e[0].trace,i=t.error_y||{},a=t.error_x||{},o=n.select(this);o.selectAll(`path.yerror`).style(`stroke-width`,i.thickness+`px`).call(r.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll(`path.xerror`).style(`stroke-width`,a.thickness+`px`).call(r.stroke,a.color)})}}),Ea=l((e,t)=>{var n=$(),r=Ee().overrideAll,i=ba(),a={error_x:n.extendFlat({},i),error_y:n.extendFlat({},i)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var o={error_x:n.extendFlat({},i),error_y:n.extendFlat({},i),error_z:n.extendFlat({},i)};delete o.error_x.copy_ystyle,delete o.error_y.copy_ystyle,delete o.error_z.copy_ystyle,delete o.error_z.copy_zstyle,t.exports={moduleType:`component`,name:`errorbars`,schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:r(o,`calc`,`nested`),scattergl:r(a,`calc`,`nested`)}},supplyDefaults:xa(),calc:Ca(),makeComputeError:Sa(),plot:wa(),style:Ta(),hoverInfo:s};function s(e,t,n){(t.error_y||{}).visible&&(n.yerr=e.yh-e.y,t.error_y.symmetric||(n.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(n.xerr=e.xh-e.x,t.error_x.symmetric||(n.xerrneg=e.x-e.xs))}}),Da=l((e,t)=>{t.exports={cn:{colorbar:`colorbar`,cbbg:`cbbg`,cbfill:`cbfill`,cbfills:`cbfills`,cbline:`cbline`,cblines:`cblines`,cbaxis:`cbaxis`,cbtitleunshift:`cbtitleunshift`,cbtitle:`cbtitle`,cboutline:`cboutline`,crisp:`crisp`,jsPlaceholder:`js-placeholder`}}}),Oa=l((e,t)=>{var n=f(),r=O(),i=gt(),a=Ie(),o=Xt(),s=an(),c=$(),l=c.strTranslate,u=k().extendFlat,d=on(),p=Gt(),m=L(),h=Kt(),g=yt(),_=bt().flipScale,v=_i(),y=vi(),b=St(),x=vt(),S=x.LINE_SPACING,C=x.FROM_TL,w=x.FROM_BR,T=Da().cn;function E(e){var t=e._fullLayout._infolayer.selectAll(`g.`+T.colorbar).data(D(e),function(e){return e._id});t.enter().append(`g`).attr(`class`,function(e){return e._id}).classed(T.colorbar,!0),t.each(function(t){var r=n.select(this);c.ensureSingle(r,`rect`,T.cbbg),c.ensureSingle(r,`g`,T.cbfills),c.ensureSingle(r,`g`,T.cblines),c.ensureSingle(r,`g`,T.cbaxis,function(e){e.classed(T.crisp,!0)}),c.ensureSingle(r,`g`,T.cbtitleunshift,function(e){e.append(`g`).classed(T.cbtitle,!0)}),c.ensureSingle(r,`rect`,T.cboutline);var i=A(r,t,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&j(r,t,e)}),t.exit().each(function(t){i.autoMargin(e,t._id)}).remove(),t.order()}function D(e){var t=e._fullLayout,n=e.calcdata,r=[],i,a,o,s;function c(e){return u(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function l(){typeof s.calc==`function`?s.calc(e,o,i):(i._fillgradient=a.reversescale?_(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var d=0;d1){var pe=10**Math.floor(Math.log(fe)/Math.LN10);ue*=pe*c.roundUp(fe/pe,[2,5,10]),(Math.abs(G.start)/G.size+1e-6)%1<2e-6&&(Q.tick0=0)}Q.dtick=ue}Q.domain=s?[se+k/L.h,se+Z-k/L.h]:[se+O/L.w,se+Z-O/L.w],Q.setScale(),e.attr(`transform`,l(Math.round(L.l),Math.round(L.t)));var me=e.select(`.`+T.cbtitleunshift).attr(`transform`,l(-Math.round(L.l),-Math.round(L.t))),he=Q.ticklabelposition,ge=Q.title.font.size,_e=e.select(`.`+T.cbaxis),ve,ye=0,be=0;function xe(n,r){var i={propContainer:Q,propName:t._propPrefix+`title.text`,traceIndex:t._traceIndex,_meta:t._meta,placeholder:I._dfltTitle.colorbar,containerGroup:e.select(`.`+T.cbtitle)},o=n.charAt(0)===`h`?n.slice(1):`h`+n;e.selectAll(`.`+o+`,.`+o+`-math-group`).remove(),h.draw(a,n,u(i,r||{}))}function Se(){if(s&&le||!s&&!le){var e,t;V===`top`&&(e=O+L.l+te*A,t=k+L.t+ne*(1-se-Z)+3+ge*.75),V===`bottom`&&(e=O+L.l+te*A,t=k+L.t+ne*(1-se)-3-ge*.25),V===`right`&&(t=k+L.t+ne*j+3+ge*.75,e=O+L.l+te*se),xe(Q._id+`title`,{attributes:{x:e,y:t,"text-anchor":s?`start`:`middle`}})}}function Ce(){if(s&&!le||!s&&le){var e=Q.position||0,r=Q._offset+Q._length/2,i,o;if(V===`right`)o=r,i=L.l+te*e+10+ge*(Q.showticklabels?1:.5);else if(i=r,V===`bottom`&&(o=L.t+ne*e+10+(he.indexOf(`inside`)===-1?Q.tickfont.size:0)+(Q.ticks!==`inside`&&t.ticklen||0)),V===`top`){var c=B.text.split(`
`).length;o=L.t+ne*e+10-Y-S*ge*c}xe((s?`h`:`v`)+Q._id+`title`,{avoid:{selection:n.select(a).selectAll(`g.`+Q._id+`tick`),side:V,offsetTop:s?0:L.t,offsetLeft:s?L.l:0,maxShift:s?I.width:I.height},attributes:{x:i,y:o,"text-anchor":`middle`},transform:{rotate:s?-90:0,offset:0}})}}function we(){if(!s&&!le||s&&le){var i=e.select(`.`+T.cbtitle),u=i.select(`text`),d=[-y/2,y/2],f=i.select(`.h`+Q._id+`title-math-group`).node(),m=15.6;u.node()&&(m=parseInt(u.node().style.fontSize,10)*S);var h;if(f?(h=p.bBox(f),be=h.width,ye=h.height,ye>m&&(d[1]-=(ye-m)/2)):u.node()&&!u.classed(T.jsPlaceholder)&&(h=p.bBox(u.node()),be=h.width,ye=h.height),s){if(ye){if(ye+=5,V===`top`)Q.domain[1]-=ye/L.h,d[1]*=-1;else{Q.domain[0]+=ye/L.h;var _=g.lineCount(u);d[1]+=(1-_)*m}i.attr(`transform`,l(d[0],d[1])),Q.setScale()}}else be&&(V===`right`&&(Q.domain[0]+=(be+ge/2)/L.w),i.attr(`transform`,l(d[0],d[1])),Q.setScale())}e.selectAll(`.`+T.cbfills+`,.`+T.cblines).attr(`transform`,s?l(0,Math.round(L.h*(1-Q.domain[1]))):l(Math.round(L.w*Q.domain[0]),0)),_e.attr(`transform`,s?l(0,Math.round(-L.t)):l(Math.round(-L.l),0));var v=e.select(`.`+T.cbfills).selectAll(`rect.`+T.cbfill).attr(`style`,``).data(q);v.enter().append(`rect`).classed(T.cbfill,!0).attr(`style`,``),v.exit().remove();var b=H.map(Q.c2p).map(Math.round).sort(function(e,t){return e-t});v.each(function(e,i){var o=[i===0?H[0]:(q[i]+q[i-1])/2,i===q.length-1?H[1]:(q[i]+q[i+1])/2].map(Q.c2p).map(Math.round);s&&(o[1]=c.constrain(o[1]+(o[1]>o[0])?1:-1,b[0],b[1]));var l=n.select(this).attr(s?`x`:`y`,re).attr(s?`y`:`x`,n.min(o)).attr(s?`width`:`height`,Math.max(Y,2)).attr(s?`height`:`width`,Math.max(n.max(o)-n.min(o),2));if(t._fillgradient)p.gradient(l,a,t._id,s?`vertical`:`horizontalreversed`,t._fillgradient,`fill`);else{var u=W(e).replace(`e-`,``);l.attr(`fill`,r(u).toHexString())}});var x=e.select(`.`+T.cblines).selectAll(`path.`+T.cbline).data(z.color&&z.width?J:[]);x.enter().append(`path`).classed(T.cbline,!0),x.exit().remove(),x.each(function(e){var t=re,r=Math.round(Q.c2p(e))+z.width/2%1;n.select(this).attr(`d`,`M`+(s?t+`,`+r:r+`,`+t)+(s?`h`:`v`)+Y).call(p.lineGroupStyle,z.width,U(e),z.dash)}),_e.selectAll(`g.`+Q._id+`tick,path`).remove();var C=re+Y+(y||0)/2-+(t.ticks===`outside`),w=o.calcTicks(Q),E=o.getTickSigns(Q)[2];return o.drawTicks(a,Q,{vals:Q.ticks===`inside`?o.clipEnds(Q,w):w,layer:_e,path:o.makeTickPath(Q,C,E),transFn:o.makeTransTickFn(Q)}),o.drawLabels(a,Q,{vals:w,layer:_e,transFn:o.makeTransTickLabelFn(Q),labelFns:o.makeLabelFns(Q,C)})}function Te(){var n,o=Y+y/2;he.indexOf(`inside`)===-1&&(n=p.bBox(_e.node()),o+=s?n.width:n.height),ve=me.select(`text`);var c=0,u=s&&V===`top`,h=!s&&V===`right`,g=0;if(ve.node()&&!ve.classed(T.jsPlaceholder)){var S,M=me.select(`.h`+Q._id+`title-math-group`).node();M&&(s&&le||!s&&!le)?(n=p.bBox(M),c=n.width,S=n.height):(n=p.bBox(me.node()),c=n.right-L.l-(s?re:ce),S=n.bottom-L.t-(s?ce:re),!s&&V===`top`&&(o+=n.height,g=n.height)),h&&(ve.attr(`transform`,l(c/2+ge/2,0)),c*=2),o=Math.max(o,s?c:S)}var N=(s?O:k)*2+o+b+y/2,R=0;!s&&B.text&&D===`bottom`&&j<=0&&(R=N/2,N+=R,g+=R),I._hColorbarMoveTitle=R,I._hColorbarMoveCBTitle=g;var z=b+y,H=(s?re:ce)-z/2-(s?O:0),U=(s?ce:re)-(s?ee:k+g-R);e.select(`.`+T.cbbg).attr(`x`,H).attr(`y`,U).attr(s?`width`:`height`,Math.max(N-R,2)).attr(s?`height`:`width`,Math.max(ee+z,2)).call(m.fill,x).call(m.stroke,t.bordercolor).style(`stroke-width`,b);var W=h?Math.max(c-10,0):0;e.selectAll(`.`+T.cboutline).attr(`x`,(s?re:ce+O)+W).attr(`y`,(s?ce+k-ee:re)+(u?ye:0)).attr(s?`width`:`height`,Math.max(Y,2)).attr(s?`height`:`width`,Math.max(ee-(s?2*k+ye:2*O+W),2)).call(m.stroke,t.outlinecolor).style({fill:`none`,"stroke-width":y});var G=s?ie*N:0,K=s?0:(1-ae)*N-g;if(G=F?L.l-G:-G,K=P?L.t-K:-K,e.attr(`transform`,l(G,K)),!s&&(b||r(x).getAlpha()&&!r.equals(I.paper_bgcolor,x))){var q=_e.selectAll(`text`),J=q[0].length,X=e.select(`.`+T.cbbg).node(),Z=p.bBox(X),te=p.getTranslate(e),ne=2;q.each(function(e,t){var n=0,r=J-1;if(t===n||t===r){var i=p.bBox(this),a=p.getTranslate(this),o;if(t===r){var s=i.right+a.x;o=Z.right+te.x+ce-b-ne+A-s,o>0&&(o=0)}else if(t===n){var c=i.left+a.x;o=Z.left+te.x+ce+b+ne-c,o<0&&(o=0)}o&&(J<3?this.setAttribute(`transform`,`translate(`+o+`,0) `+this.getAttribute(`transform`)):this.setAttribute(`visibility`,`hidden`))}})}var oe={},se=C[E],ue=w[E],de=C[D],fe=w[D],pe=N-Y;s?(f===`pixels`?(oe.y=j,oe.t=ee*de,oe.b=ee*fe):(oe.t=oe.b=0,oe.yt=j+d*de,oe.yb=j-d*fe),v===`pixels`?(oe.x=A,oe.l=N*se,oe.r=N*ue):(oe.l=pe*se,oe.r=pe*ue,oe.xl=A-_*se,oe.xr=A+_*ue)):(f===`pixels`?(oe.x=A,oe.l=ee*se,oe.r=ee*ue):(oe.l=oe.r=0,oe.xl=A+d*se,oe.xr=A-d*ue),v===`pixels`?(oe.y=1-j,oe.t=N*de,oe.b=N*fe):(oe.t=pe*de,oe.b=pe*fe,oe.yt=j-_*de,oe.yb=j+_*fe));var be=t.y<.5?`b`:`t`,xe=t.x<.5?`l`:`r`;a._fullLayout._reservedMargin[t._id]={};var Se={r:I.width-H-G,l:H+oe.r,b:I.height-U-K,t:U+oe.b};F&&P?i.autoMargin(a,t._id,oe):F?a._fullLayout._reservedMargin[t._id][be]=Se[be]:P||s?a._fullLayout._reservedMargin[t._id][xe]=Se[xe]:a._fullLayout._reservedMargin[t._id][be]=Se[be]}return c.syncOrAsync([i.previousPromises,Se,we,Ce,i.previousPromises,Te],a)}function j(e,t,n){var r=t.orientation===`v`,i=n._fullLayout._size,o,c,u;s.init({element:e.node(),gd:n,prepFn:function(){o=e.attr(`transform`),d(e)},moveFn:function(n,a){e.attr(`transform`,o+l(n,a)),c=s.align((r?t._uFrac:t._vFrac)+n/i.w,r?t._thickFrac:t._lenFrac,0,1,t.xanchor),u=s.align((r?t._vFrac:1-t._uFrac)-a/i.h,r?t._lenFrac:t._thickFrac,0,1,t.yanchor),d(e,s.getCursor(c,u,t.xanchor,t.yanchor))},doneFn:function(){if(d(e),c!==void 0&&u!==void 0){var r={};r[t._propPrefix+`x`]=c,r[t._propPrefix+`y`]=u,t._traceIndex===void 0?a.call(`_guiRelayout`,n,r):a.call(`_guiRestyle`,n,r,t._traceIndex)}}})}function M(e,t,n){var r=t._levels,i=[],a=[],o,s,c=r.end+r.size/100,l=r.size,u=1.001*n[0]-.001*n[1],d=1.001*n[1]-.001*n[0];for(s=0;s<1e5&&(o=r.start+s*l,!(l>0?o>=c:o<=c));s++)o>u&&o0?o>=c:o<=c));s++)o>n[0]&&o{t.exports={moduleType:`component`,name:`colorbar`,attributes:Ct(),supplyDefaults:Pt(),draw:Oa().draw,hasColorbar:Et()}}),Aa=l((e,t)=>{t.exports={moduleType:`component`,name:`legend`,layoutAttributes:cn(),supplyLayoutDefaults:un(),draw:vn(),style:_n()}}),ja=l((e,t)=>{t.exports={moduleType:`locale`,name:`en`,dictionary:{"Click to enter Colorscale title":`Click to enter Colourscale title`},format:{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`],periods:[`AM`,`PM`],dateTime:`%a %b %e %X %Y`,date:`%d/%m/%Y`,time:`%H:%M:%S`,decimal:`.`,thousands:`,`,grouping:[3],currency:[`$`,``],year:`%Y`,month:`%b %Y`,dayMonth:`%b %-d`,dayMonthYear:`%b %-d, %Y`}}}),Ma=l((e,t)=>{t.exports={moduleType:`locale`,name:`en-US`,dictionary:{"Click to enter Colorscale title":`Click to enter Colorscale title`},format:{date:`%m/%d/%Y`}}}),Na=l((e,t)=>{var n=Ie(),r=$(),i=r.extendFlat,a=r.extendDeep;function o(e){var t;switch(e){case`themes__thumb`:t={autosize:!0,width:150,height:150,title:{text:``},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case`thumbnail`:t={title:{text:``},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:``,margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function s(e){return[`xaxis`,`yaxis`,`zaxis`].indexOf(e.slice(0,5))>-1}t.exports=function(e,t){var r,c=e.data,l=e.layout,u=a([],c),d=a({},l,o(t.tileClass)),f=e._context||{};if(t.width&&(d.width=t.width),t.height&&(d.height=t.height),t.tileClass===`thumbnail`||t.tileClass===`themes__thumb`){d.annotations=[];var p=Object.keys(d);for(r=0;r{var n=it().EventEmitter,r=Ie(),i=$(),a=Or(),o=Na(),s=kr(),c=Ar();function l(e,t){var l=new n,u=o(e,{format:`png`}),d=u.gd;d.style.position=`absolute`,d.style.left=`-5000px`,document.body.appendChild(d);function f(){var e=a.getDelay(d._fullLayout);setTimeout(function(){var e=s(d),n=document.createElement(`canvas`);n.id=i.randstr(),l=c({format:t.format,width:d._fullLayout.width,height:d._fullLayout.height,canvas:n,emitter:l,svg:e}),l.clean=function(){d&&document.body.removeChild(d)}},e)}var p=a.getRedrawFunc(d);return r.call(`_doPlot`,d,u.data,u.layout,u.config).then(p).then(f).catch(function(e){l.emit(`error`,e)}),l}t.exports=l}),Fa=l((e,t)=>{var n=Or();t.exports={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:Na(),toSVG:kr(),svgToImg:Ar(),toImage:Pa(),downloadImage:Pr()}}),Ia=l(e=>{e.version=u().version,d(),tt();var t=e.register=Ie().register,n=Ir(),r=Object.keys(n);for(a=0;a{t.exports=Ia()}),Ra=l((e,t)=>{var n=gr(),r=xt().axisHoverFormat,{hovertemplateAttrs:i,texttemplateAttrs:a,templatefallbackAttrs:o}=ke(),s=wt(),c=A(),l=ti(),u=De().pattern,d=k().extendFlat,f=c({editType:`calc`,arrayOk:!0,colorEditType:`style`}),p=n.marker.line,m=d({line:d({width:d({},p.width,{dflt:0}),editType:`calc`},s(`marker.line`)),editType:`calc`},s(`marker`),{opacity:{valType:`number`,arrayOk:!0,dflt:1,min:0,max:1,editType:`style`},pattern:u,cornerradius:{valType:`any`,editType:`calc`}});t.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:r(`x`),yhoverformat:r(`y`),text:n.text,texttemplate:a({editType:`plot`},{keys:l.eventDataKeys}),texttemplatefallback:o({editType:`plot`}),hovertext:n.hovertext,hovertemplate:i({},{keys:l.eventDataKeys}),hovertemplatefallback:o(),textposition:{valType:`enumerated`,values:[`inside`,`outside`,`auto`,`none`],dflt:`auto`,arrayOk:!0,editType:`calc`},insidetextanchor:{valType:`enumerated`,values:[`end`,`middle`,`start`],dflt:`end`,editType:`plot`},textangle:{valType:`angle`,dflt:`auto`,editType:`plot`},textfont:d({},f,{}),insidetextfont:d({},f,{}),outsidetextfont:d({},f,{}),constraintext:{valType:`enumerated`,values:[`inside`,`outside`,`both`,`none`],dflt:`both`,editType:`calc`},cliponaxis:d({},n.cliponaxis,{}),orientation:{valType:`enumerated`,values:[`v`,`h`],editType:`calc+clearAxisTypes`},base:{valType:`any`,dflt:null,arrayOk:!0,editType:`calc`},offset:{valType:`number`,dflt:null,arrayOk:!0,editType:`calc`},width:{valType:`number`,dflt:null,min:0,arrayOk:!0,editType:`calc`},marker:m,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:`style`},textfont:n.selected.textfont,editType:`style`},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:`style`},textfont:n.unselected.textfont,editType:`style`},zorder:n.zorder}}),za=l((e,t)=>{t.exports={barmode:{valType:`enumerated`,values:[`stack`,`group`,`overlay`,`relative`],dflt:`group`,editType:`calc`},barnorm:{valType:`enumerated`,values:[``,`fraction`,`percent`],dflt:``,editType:`calc`},bargap:{valType:`number`,min:0,max:1,editType:`calc`},bargroupgap:{valType:`number`,min:0,max:1,dflt:0,editType:`calc`},barcornerradius:{valType:`any`,editType:`calc`}}}),Ba=l((e,t)=>{var n=L(),r=bt().hasColorscale,i=Ft(),a=$().coercePattern;t.exports=function(e,t,o,s,c){var l=o(`marker.color`,s),u=r(e,`marker`);u&&i(e,t,c,o,{prefix:`marker.`,cLetter:`c`}),o(`marker.line.color`,n.defaultLine),r(e,`marker.line`)&&i(e,t,c,o,{prefix:`marker.line.`,cLetter:`c`}),o(`marker.line.width`),o(`marker.opacity`),a(o,`marker.pattern`,l,u),o(`selected.marker.color`),o(`unselected.marker.color`)}}),Va=l((e,t)=>{var n=_(),r=$(),i=L(),a=Ie(),o=Lr(),s=Rr(),c=Ba(),l=Kr(),u=Ra(),d=r.coerceFont;function f(e,t,n,l){function d(n,i){return r.coerce(e,t,u,n,i)}if(!o(e,t,l,d)){t.visible=!1;return}s(e,t,l,d),d(`xhoverformat`),d(`yhoverformat`),d(`zorder`),d(`orientation`,t.x&&!t.y?`h`:`v`),d(`base`),d(`offset`),d(`width`),d(`text`),d(`hovertext`),d(`hovertemplate`),d(`hovertemplatefallback`),h(e,t,l,d,d(`textposition`),{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c(e,t,d,n,l);var f=(t.marker.line||{}).color,p=a.getComponentMethod(`errorbars`,`supplyDefaults`);p(e,t,f||i.defaultLine,{axis:`y`}),p(e,t,f||i.defaultLine,{axis:`x`,inherit:`y`}),r.coerceSelectionMarkerOpacity(t,d)}function p(e,t){var n,i;function a(e,t){return r.coerce(i._input,i,u,e,t)}for(var o=0;o=0)return e}else if(typeof e==`string`&&(e=e.trim(),e.slice(-1)===`%`&&n(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+`%`}function h(e,t,n,i,a,o){o||={};var s=o.moduleHasSelected!==!1,c=o.moduleHasUnselected!==!1,l=o.moduleHasConstrain!==!1,u=o.moduleHasCliponaxis!==!1,f=o.moduleHasTextangle!==!1,p=o.moduleHasInsideanchor!==!1,m=!!o.hasPathbar,h=Array.isArray(a)||a===`auto`,g=h||a===`inside`,_=h||a===`outside`;if(g||_){var v=d(i,`textfont`,n.font),y=r.extendFlat({},v),b=!(e.textfont&&e.textfont.color);if(b&&delete y.color,d(i,`insidetextfont`,y),m){var x=r.extendFlat({},v);b&&delete x.color,d(i,`pathbar.textfont`,x)}_&&d(i,`outsidetextfont`,v),s&&i(`selected.textfont.color`),c&&i(`unselected.textfont.color`),l&&i(`constraintext`),u&&i(`cliponaxis`),f&&i(`textangle`),i(`texttemplate`),i(`texttemplatefallback`)}g&&p&&i(`insidetextanchor`)}t.exports={supplyDefaults:f,crossTraceDefaults:p,handleText:h,validateCornerradius:m}}),Ha=l((e,t)=>{var n=Ie(),r=Xt(),i=$(),a=za(),o=Va().validateCornerradius;t.exports=function(e,t,s){function c(n,r){return i.coerce(e,t,a,n,r)}for(var l=!1,u=!1,d=!1,f={},p=c(`barmode`),m=p===`group`,h=0;h0&&!f[_]&&(d=!0),f[_]=!0),g.visible&&g.type===`histogram`&&r.getFromId({_fullLayout:t},g[g.orientation===`v`?`xaxis`:`yaxis`]).type!==`category`&&(u=!0)}if(!l){delete t.barmode;return}p!==`overlay`&&c(`barnorm`),c(`bargap`,u&&!d?0:.2),c(`bargroupgap`),t.barcornerradius=o(c(`barcornerradius`))}}),Ua=l((e,t)=>{var n=$();t.exports=function(e,t){for(var r=0;r{var n=Xt(),r=Yr(),i=bt().hasColorscale,a=Rt(),o=Ua(),s=Qr();t.exports=function(e,t){var c=n.getFromId(e,t.xaxis||`x`),l=n.getFromId(e,t.yaxis||`y`),u,d,f,p,m,h,g={msUTC:!!(t.base||t.base===0)};t.orientation===`h`?(u=c.makeCalcdata(t,`x`,g),f=l.makeCalcdata(t,`y`),p=r(t,l,`y`,f),m=!!t.yperiodalignment,h=`y`):(u=l.makeCalcdata(t,`y`,g),f=c.makeCalcdata(t,`x`),p=r(t,c,`x`,f),m=!!t.xperiodalignment,h=`x`),d=p.vals;for(var _=Math.min(d.length,u.length),v=Array(_),y=0;y<_;y++)v[y]={p:d[y],s:u[y]},m&&(v[y].orig_p=f[y],v[y][h+`End`]=p.ends[y],v[y][h+`Start`]=p.starts[y]),t.ids&&(v[y].id=String(t.ids[y]));return i(t,`marker`)&&a(e,t,{vals:t.marker.color,containerStr:`marker`,cLetter:`c`}),i(t,`marker.line`)&&a(e,t,{vals:t.marker.line.color,containerStr:`marker.line`,cLetter:`c`}),o(v,t),s(v,t),v}}),Ga=l((e,t)=>{var n=f(),r=$();function i(e,t,i){var a=e._fullLayout,o=a[`_`+i+`Text_minsize`];if(o){var s=a.uniformtext.mode===`hide`,c;switch(i){case`funnelarea`:case`pie`:case`sunburst`:c=`g.slice`;break;case`treemap`:case`icicle`:c=`g.slice, g.pathbar`;break;default:c=`g.points > g.point`}t.selectAll(c).each(function(e){var t=e.transform;if(t){t.scale=s&&t.hide?0:o/t.fontSize;var i=n.select(this).select(`text`);r.setTransormAndDisplay(i,t)}})}}function a(e,t,n){if(n.uniformtext.mode){var r=s(e),i=n.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{var t=_(),n=O(),r=$().isArrayOrTypedArray;e.coerceString=function(e,t,n){if(typeof t==`string`){if(t||!e.noBlank)return t}else if((typeof t==`number`||t===!0)&&!e.strict)return String(t);return n===void 0?e.dflt:n},e.coerceNumber=function(e,n,r){if(t(n)){n=+n;var i=e.min,a=e.max;if(!(i!==void 0&&na))return n}return r===void 0?e.dflt:r},e.coerceColor=function(e,t,r){return n(t).isValid()?t:r===void 0?e.dflt:r},e.coerceEnumerated=function(e,t,n){return e.coerceNumber&&(t=+t),e.values.indexOf(t)===-1?n===void 0?e.dflt:n:t},e.getValue=function(e,t){var n;return r(e)?t{var n=f(),r=L(),i=Gt(),a=$(),o=Ie(),s=Ga().resizeText,c=Ra(),l=c.textfont,u=c.insidetextfont,d=c.outsidetextfont,p=Ka();function m(e){var t=n.select(e).selectAll(`g[class^="barlayer"]`).selectAll(`g.trace`);s(e,t,`bar`);var r=t.size(),i=e._fullLayout;t.style(`opacity`,function(e){return e[0].trace.opacity}).each(function(e){(i.barmode===`stack`&&r>1||i.bargap===0&&i.bargroupgap===0&&!e[0].trace.marker.line.width)&&n.select(this).attr(`shape-rendering`,`crispEdges`)}),t.selectAll(`g.points`).each(function(t){var r=n.select(this),i=t[0].trace;h(r,i,e)}),o.getComponentMethod(`errorbars`,`style`)(t)}function h(e,t,n){i.pointStyle(e.selectAll(`path`),t,n),g(e,t,n)}function g(e,t,r){e.selectAll(`text`).each(function(e){var o=n.select(this),s=a.ensureUniformFontSize(r,b(o,e,t,r));i.font(o,s)})}function _(e,t,n){var r=t[0].trace;r.selectedpoints?v(n,r,e):(h(n,r,e),o.getComponentMethod(`errorbars`,`style`)(n))}function v(e,t,n){i.selectedPointStyle(e.selectAll(`path`),t),y(e.selectAll(`text`),t,n)}function y(e,t,r){e.each(function(e){var o=n.select(this),s;if(e.selected){s=a.ensureUniformFontSize(r,b(o,e,t,r));var c=t.selected.textfont&&t.selected.textfont.color;c&&(s.color=c),i.font(o,s)}else i.selectedTextStyle(o,t)})}function b(e,t,n,r){var i=r._fullLayout.font,a=n.textfont;if(e.classed(`bartext-inside`)){var o=T(t,n);a=S(n,t.i,i,o)}else e.classed(`bartext-outside`)&&(a=C(n,t.i,i));return a}function x(e,t,n){return w(l,e.textfont,t,n)}function S(e,t,n,i){var a=x(e,t,n);return(e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0)&&(a={color:r.contrast(i),family:a.family,size:a.size,weight:a.weight,style:a.style,variant:a.variant,textcase:a.textcase,lineposition:a.lineposition,shadow:a.shadow}),w(u,e.insidetextfont,t,a)}function C(e,t,n){var r=x(e,t,n);return w(d,e.outsidetextfont,t,r)}function w(e,t,n,r){t||={};var i=p.getValue(t.family,n),a=p.getValue(t.size,n),o=p.getValue(t.color,n),s=p.getValue(t.weight,n),c=p.getValue(t.style,n),l=p.getValue(t.variant,n),u=p.getValue(t.textcase,n),d=p.getValue(t.lineposition,n),f=p.getValue(t.shadow,n);return{family:p.coerceString(e.family,i,r.family),size:p.coerceNumber(e.size,a,r.size),color:p.coerceColor(e.color,o,r.color),weight:p.coerceString(e.weight,s,r.weight),style:p.coerceString(e.style,c,r.style),variant:p.coerceString(e.variant,l,r.variant),textcase:p.coerceString(e.variant,u,r.textcase),lineposition:p.coerceString(e.variant,d,r.lineposition),shadow:p.coerceString(e.variant,f,r.shadow)}}function T(e,t){return t.type===`waterfall`?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}t.exports={style:m,styleTextPoints:g,styleOnSelect:_,getInsideTextFont:S,getOutsideTextFont:C,getBarColor:T,resizeText:s}}),Ja=l((e,t)=>{var n=f(),r=_(),i=$(),a=yt(),o=L(),s=Gt(),c=Ie(),l=Xt().tickText,u=Ga(),d=u.recordMinTextSize,p=u.clearMinTextSize,m=qa(),h=Ka(),g=ti(),v=Ra(),y=v.text,b=v.textposition,x=Ht().appendArrayPointValue,S=g.TEXTPAD;function C(e){return e.id}function w(e){if(e.ids)return C}function T(e){return(e>0)-(e<0)}function E(e,t){return e0}function A(e,t,a,l,u,d){var f=t.xaxis,m=t.yaxis,g=e._fullLayout,_=e._context.staticPlot;u||(u={mode:g.barmode,norm:g.barmode,gap:g.bargap,groupgap:g.bargroupgap},p(`bar`,g));var v=i.makeTraceGroups(l,a,`trace bars`).each(function(a){var c=n.select(this),l=a[0].trace,p=a[0].t,v=l.type===`waterfall`,y=l.type===`funnel`,b=l.type===`histogram`,x=l.type===`bar`,S=x||y,C=0;v&&l.connector.visible&&l.connector.mode===`between`&&(C=l.connector.line.width/2);var A=l.orientation===`h`,M=k(u),N=i.ensureSingle(c,`g`,`points`),P=w(l),F=N.selectAll(`g.point`).data(i.identity,P);F.enter().append(`g`).classed(`point`,!0),F.exit().remove(),F.each(function(c,v){var y=n.select(this),w=D(c,f,m,A),k=w[0][0],N=w[0][1],P=w[1][0],F=w[1][1],I=(A?N-k:F-P)===0;I&&S&&h.getLineWidth(l,c)&&(I=!1),I||=!r(k)||!r(N)||!r(P)||!r(F),c.isBlank=I,I&&(A?N=k:F=P),C&&!I&&(A?(k-=E(k,N)*C,N+=E(k,N)*C):(P-=E(P,F)*C,F+=E(P,F)*C));var L,R;if(l.type===`waterfall`){if(!I){var z=l[c.dir].marker;L=z.line.width,R=z.color}}else L=h.getLineWidth(l,c),R=c.mc||l.marker.color;function B(e){var t=n.round(L/2%1,2);return u.gap===0&&u.groupgap===0?n.round(Math.round(e)-t,2):e}function V(e,t,n){return n&&e===t?e:Math.abs(e-t)>=2?B(e):e>t?Math.ceil(e):Math.floor(e)}var H=o.opacity(R)<1||L>.01?B:V;e._context.staticPlot||(k=H(k,N,A),N=H(N,k,A),P=H(P,F,!A),F=H(F,P,!A));var U=A?f.c2p:m.c2p,W=c.s0>0?c._sMax:c.s0<0?c._sMin:c.s1>0?c._sMax:c._sMin;function G(e,t){if(!e)return 0;var n=Math.abs(A?F-P:N-k),r=Math.abs(A?N-k:F-P),i=H(Math.abs(U(W,!0)-U(0,!0))),a=c.hasB?Math.min(n/2,r/2):Math.min(n/2,i),o=t===`%`?Math.min(50,e)/100*n:e;return H(Math.max(Math.min(o,a),0))}var K=x||b?G(p.cornerradiusvalue,p.cornerradiusform):0,q,J,Y=`M`+k+`,`+P+`V`+F+`H`+N+`V`+P+`Z`,X=0;if(K&&c.s){var ee=T(c.s0)===0||T(c.s)===T(c.s0)?c.s1:c.s0;if(X=H(c.hasB?0:Math.abs(U(W,!0)-U(ee,!0))),X0?Math.sqrt(X*(2*K-X)):0,ae=Z>0?Math.max:Math.min;q=`M`+k+`,`+P+`V`+(F-re*te)+`H`+ae(N-(K-X)*Z,k)+`A `+K+`,`+K+` 0 0 `+ne+` `+N+`,`+(F-K*te-ie)+`V`+(P+K*te+ie)+`A `+K+`,`+K+` 0 0 `+ne+` `+ae(N-(K-X)*Z,k)+`,`+(P+re*te)+`Z`}}else if(c.hasB)q=`M`+(k+K*Z)+`,`+P+`A `+K+`,`+K+` 0 0 `+ne+` `+k+`,`+(P+K*te)+`V`+(F-K*te)+`A `+K+`,`+K+` 0 0 `+ne+` `+(k+K*Z)+`,`+F+`H`+(N-K*Z)+`A `+K+`,`+K+` 0 0 `+ne+` `+N+`,`+(F-K*te)+`V`+(P+K*te)+`A `+K+`,`+K+` 0 0 `+ne+` `+(N-K*Z)+`,`+P+`Z`;else{J=Math.abs(F-P)+X;var oe=J0?Math.sqrt(X*(2*K-X)):0,ce=te>0?Math.max:Math.min;q=`M`+(k+oe*Z)+`,`+P+`V`+ce(F-(K-X)*te,P)+`A `+K+`,`+K+` 0 0 `+ne+` `+(k+K*Z-se)+`,`+F+`H`+(N-K*Z+se)+`A `+K+`,`+K+` 0 0 `+ne+` `+(N-oe*Z)+`,`+ce(F-(K-X)*te,P)+`V`+P+`Z`}}else q=Y}else q=Y;var Q=O(i.ensureSingle(y,`path`),g,u,d);if(Q.style(`vector-effect`,_?`none`:`non-scaling-stroke`).attr(`d`,isNaN((N-k)*(F-P))||I&&e._context.staticPlot?`M0,0Z`:q).call(s.setClipUrl,t.layerClipId,e),!g.uniformtext.mode&&M){var le=s.makePointStyleFns(l);s.singlePointStyle(c,Q,l,le,e)}j(e,t,y,a,v,k,N,P,F,K,X,u,d),t.layerClipId&&s.hideOutsideRangePoint(c,y.select(`text`),f,m,l.xcalendar,l.ycalendar)});var I=l.cliponaxis===!1;s.setClipUrl(c,I?null:t.layerClipId,e)});c.getComponentMethod(`errorbars`,`plot`)(e,v,t,u)}function j(e,t,n,r,o,c,l,u,f,p,h,g,_){var v=t.xaxis,y=t.yaxis,b=e._fullLayout,x;function C(t,n,r){return i.ensureSingle(t,`text`).text(n).attr({class:`bartext bartext-`+x,"text-anchor":`middle`,"data-notex":1}).call(s.font,r).call(a.convertToTspans,e)}var w=r[0].trace,T=w.orientation===`h`,E=z(b,r,o,v,y);x=B(w,o);var D=g.mode===`stack`||g.mode===`relative`,k=r[o],A=!D||k._outmost,j=k.hasB,N=p&&p-h>S;if(!E||x===`none`||(k.isBlank||c===l||u===f)&&(x===`auto`||x===`inside`)){n.select(`text`).remove();return}var P=b.font,I=m.getBarColor(r[o],w),L=m.getInsideTextFont(w,o,P,I),V=m.getOutsideTextFont(w,o,P),H=w.insidetextanchor||`end`,U=n.datum();T?v.type===`log`&&U.s0<=0&&(c=v.range[0]0&&ee>0,ne=N?j?M(K-2*p,q,X,ee,T)||M(K,q-2*p,X,ee,T):T?M(K-(p-h),q,X,ee,T)||M(K,q-2*(p-h),X,ee,T):M(K,q-(p-h),X,ee,T)||M(K-2*(p-h),q,X,ee,T):M(K,q,X,ee,T);te&&ne?x=`inside`:(x=`outside`,J.remove(),J=null)}else x=`inside`}if(!J){Z=i.ensureUniformFontSize(e,x===`outside`?V:L),J=C(n,E,Z);var re=J.attr(`transform`);if(J.attr(`transform`,``),Y=s.bBox(J.node()),X=Y.width,ee=Y.height,J.attr(`transform`,re),X<=0||ee<=0){J.remove();return}}var ie=w.textangle,ae,oe;x===`outside`?(oe=w.constraintext===`both`||w.constraintext===`outside`,ae=R(c,l,u,f,Y,{isHorizontal:T,constrained:oe,angle:ie})):(oe=w.constraintext===`both`||w.constraintext===`inside`,ae=F(c,l,u,f,Y,{isHorizontal:T,constrained:oe,angle:ie,anchor:H,hasB:j,r:p,overhead:h})),ae.fontSize=Z.size,d(w.type===`histogram`?`bar`:w.type,ae,b),k.transform=ae;var se=O(J,b,g,_);i.setTransormAndDisplay(se,ae)}function M(e,t,n,r,i){if(e<0||t<0)return!1;var a=n<=e&&r<=t,o=n<=t&&r<=e,s=i?e>=t/r*n:t>=e/n*r;return a||o||s}function N(e){return e===`auto`?0:e}function P(e,t){var n=Math.PI/180*t,r=Math.abs(Math.sin(n)),i=Math.abs(Math.cos(n));return{x:e.width*i+e.height*r,y:e.width*r+e.height*i}}function F(e,t,n,r,i,a){var o=!!a.isHorizontal,s=!!a.constrained,c=a.angle||0,l=a.anchor,u=l===`end`,d=l===`start`,f=((a.leftToRight||0)+1)/2,p=1-f,m=a.hasB,h=a.r,g=a.overhead,_=i.width,v=i.height,y=Math.abs(t-e),b=Math.abs(r-n),x=y>2*S&&b>2*S?S:0;y-=2*x,b-=2*x;var C=N(c);c===`auto`&&!(_<=y&&v<=b)&&(_>y||v>b)&&(!(_>b||v>y)||_S){var O=I(e,t,n,r,w,h,g,o,m);T=O.scale,D=O.pad}else T=1,s&&(T=Math.min(1,y/w.x,b/w.y)),D=0;var k=i.left*p+i.right*f,A=(i.top+i.bottom)/2,j=(e+S)*p+(t-S)*f,M=(n+r)/2,F=0,L=0;if(d||u){var R=(o?w.x:w.y)/2;h&&(u||m)&&(x+=D);var z=o?E(e,t):E(n,r);o?d?(j=e+z*x,F=-z*R):(j=t-z*x,F=z*R):d?(M=n+z*x,L=-z*R):(M=r-z*x,L=z*R)}return{textX:k,textY:A,targetX:j,targetY:M,anchorX:F,anchorY:L,scale:T,rotate:C}}function I(e,t,n,r,i,a,o,s,c){var l=Math.max(0,Math.abs(t-e)-2*S),u=Math.max(0,Math.abs(r-n)-2*S),d=a-S,f=o?d-Math.sqrt(d*d-(d-o)*(d-o)):d,p=c?d*2:s?d-o:2*f,m=c?d*2:s?2*f:d-o,h,g,_,v,y;return i.y/i.x>=u/(l-p)?v=u/i.y:i.y/i.x<=(u-m)/l?v=l/i.x:!c&&s?(h=i.x*i.x+i.y*i.y/4,g=-2*i.x*(l-d)-i.y*(u/2-d),_=(l-d)*(l-d)+(u/2-d)*(u/2-d)-d*d,v=(-g+Math.sqrt(g*g-4*h*_))/(2*h)):c?(h=(i.x*i.x+i.y*i.y)/4,g=-i.x*(l/2-d)-i.y*(u/2-d),_=(l/2-d)*(l/2-d)+(u/2-d)*(u/2-d)-d*d,v=(-g+Math.sqrt(g*g-4*h*_))/(2*h)):(h=i.x*i.x/4+i.y*i.y,g=-i.x*(l/2-d)-2*i.y*(u-d),_=(l/2-d)*(l/2-d)+(u-d)*(u-d)-d*d,v=(-g+Math.sqrt(g*g-4*h*_))/(2*h)),v=Math.min(1,v),y=s?Math.max(0,d-Math.sqrt(Math.max(0,d*d-(d-(u-i.y*v)/2)*(d-(u-i.y*v)/2)))-o):Math.max(0,d-Math.sqrt(Math.max(0,d*d-(d-(l-i.x*v)/2)*(d-(l-i.x*v)/2)))-o),{scale:v,pad:y}}function R(e,t,n,r,i,a){var o=!!a.isHorizontal,s=!!a.constrained,c=a.angle||0,l=i.width,u=i.height,d=Math.abs(t-e),f=Math.abs(r-n),p=o?f>2*S?S:0:d>2*S?S:0,m=1;s&&(m=o?Math.min(1,f/u):Math.min(1,d/l));var h=N(c),g=P(i,h),_=(o?g.x:g.y)/2,v=(i.left+i.right)/2,y=(i.top+i.bottom)/2,b=(e+t)/2,x=(n+r)/2,C=0,w=0,T=o?E(t,e):E(n,r);return o?(b=t-T*p,C=T*_):(x=r+T*p,w=-T*_),{textX:v,textY:y,targetX:b,targetY:x,anchorX:C,anchorY:w,scale:m,rotate:h}}function z(e,t,n,r,i){var a=t[0].trace,o=a.texttemplate?V(e,t,n,r,i):a.textinfo?H(t,n,r,i):h.getValue(a.text,n);return h.coerceString(y,o)}function B(e,t){var n=h.getValue(e.textposition,t);return h.coerceEnumerated(b,n)}function V(e,t,n,r,a){var o=t[0].trace,s=i.castOption(o,n,`texttemplate`);if(!s)return``;var c=o.type===`histogram`,u=o.type===`waterfall`,d=o.type===`funnel`,f=o.orientation===`h`,p,m,h,g;f?(p=`y`,m=a,h=`x`,g=r):(p=`x`,m=r,h=`y`,g=a);function _(e){return l(m,m.c2l(e),!0).text}function v(e){return l(g,g.c2l(e),!0).text}var y=t[n],b={};b.label=y.p,b.labelLabel=b[p+`Label`]=_(y.p);var S=i.castOption(o,y.i,`text`);(S===0||S)&&(b.text=S),b.value=y.s,b.valueLabel=b[h+`Label`]=v(y.s);var C={};x(C,o,y.i),(c||C.x===void 0)&&(C.x=f?b.value:b.label),(c||C.y===void 0)&&(C.y=f?b.label:b.value),(c||C.xLabel===void 0)&&(C.xLabel=f?b.valueLabel:b.labelLabel),(c||C.yLabel===void 0)&&(C.yLabel=f?b.labelLabel:b.valueLabel),u&&(b.delta=+y.rawS||y.s,b.deltaLabel=v(b.delta),b.final=y.v,b.finalLabel=v(b.final),b.initial=b.final-b.delta,b.initialLabel=v(b.initial)),d&&(b.value=y.s,b.valueLabel=v(b.value),b.percentInitial=y.begR,b.percentInitialLabel=i.formatPercent(y.begR),b.percentPrevious=y.difR,b.percentPreviousLabel=i.formatPercent(y.difR),b.percentTotal=y.sumR,b.percenTotalLabel=i.formatPercent(y.sumR));var w=i.castOption(o,y.i,`customdata`);return w&&(b.customdata=w),i.texttemplateString({data:[C,b,o._meta],fallback:o.texttemplatefallback,labels:b,locale:e._d3locale,template:s})}function H(e,t,n,r){var a=e[0].trace,o=a.orientation===`h`,s=a.type===`waterfall`,c=a.type===`funnel`;function u(e){return l(o?r:n,e,!0).text}function d(e){return l(o?n:r,+e,!0).text}var f=a.textinfo,p=e[t],m=f.split(`+`),h=[],g,_=function(e){return m.indexOf(e)!==-1};if(_(`label`)&&h.push(u(e[t].p)),_(`text`)&&(g=i.castOption(a,p.i,`text`),(g===0||g)&&h.push(g)),s){var v=+p.rawS||p.s,y=p.v,b=y-v;_(`initial`)&&h.push(d(b)),_(`delta`)&&h.push(d(v)),_(`final`)&&h.push(d(y))}if(c){_(`value`)&&h.push(d(p.s));var x=0;_(`percent initial`)&&x++,_(`percent previous`)&&x++,_(`percent total`)&&x++;var S=x>1;_(`percent initial`)&&(g=i.formatPercent(p.begR),S&&(g+=` of initial`),h.push(g)),_(`percent previous`)&&(g=i.formatPercent(p.difR),S&&(g+=` of previous`),h.push(g)),_(`percent total`)&&(g=i.formatPercent(p.sumR),S&&(g+=` of total`),h.push(g))}return h.join(`
`)}t.exports={plot:A,toMoveInsideBar:F}}),Ya=l((e,t)=>{var n=Dn(),r=Ie(),i=L(),a=$().fillText,o=Ka().getLineWidth,s=Xt().hoverLabelText,c=v().BADNUM;function l(e,t,n,i,a){var o=u(e,t,n,i,a);if(o){var s=o.cd,c=s[0].trace,l=s[o.index];return o.color=d(c,l),r.getComponentMethod(`errorbars`,`hoverInfo`)(l,c,o),[o]}}function u(e,t,r,i,o){var l=e.cd,u=l[0].trace,d=l[0].t,f=i===`closest`,p=u.type===`waterfall`,m=e.maxHoverDistance,h=e.maxSpikeDistance,g,_,v,y,b,x,S;u.orientation===`h`?(g=r,_=t,v=`y`,y=`x`,b=F,x=M):(g=t,_=r,v=`x`,y=`y`,x=F,b=M);var C=u[v+`period`],w=f||C;function T(e){return D(e,-1)}function E(e){return D(e,1)}function D(e,t){var n=e.w;return e[v]+t*n/2}function O(e){return e[v+`End`]-e[v+`Start`]}var k=f?T:C?function(e){return e.p-O(e)/2}:function(e){return Math.min(T(e),e.p-d.bardelta/2)},A=f?E:C?function(e){return e.p+O(e)/2}:function(e){return Math.max(E(e),e.p+d.bardelta/2)};function j(e,t,r){return o.finiteRange&&(r=0),n.inbox(e-g,t-g,r+Math.min(1,Math.abs(t-e)/S)-1)}function M(e){return j(k(e),A(e),m)}function N(e){return j(T(e),E(e),h)}function P(e){var t=e[y];if(p){var n=Math.abs(e.rawS)||0;_>0?t+=n:_<0&&(t-=n)}return t}function F(e){var t=_,r=e.b,i=P(e);return n.inbox(r-t,i-t,m+(i-t)/(i-r)-1)}function I(e){var t=_,r=e.b,i=P(e);return n.inbox(r-t,i-t,h+(i-t)/(i-r)-1)}var L=e[v+`a`],R=e[y+`a`];S=Math.abs(L.r2c(L.range[1])-L.r2c(L.range[0]));function z(e){return(b(e)+x(e))/2}var B=n.getDistanceFunction(i,b,x,z);if(n.getClosest(l,B,e),e.index!==!1&&l[e.index].p!==c){w||(k=function(e){return Math.min(T(e),e.p-d.bargroupwidth/2)},A=function(e){return Math.max(E(e),e.p+d.bargroupwidth/2)});var V=l[e.index],H=u.base?V.b+V.s:V.s;e[y+`0`]=e[y+`1`]=R.c2p(V[y],!0),e[y+`LabelVal`]=H;var U=d.extents[d.extents.round(V.p)];e[v+`0`]=L.c2p(f?k(V):U[0],!0),e[v+`1`]=L.c2p(f?A(V):U[1],!0);var W=V.orig_p!==void 0;return e[v+`LabelVal`]=W?V.orig_p:V.p,e.labelLabel=s(L,e[v+`LabelVal`],u[v+`hoverformat`]),e.valueLabel=s(R,e[y+`LabelVal`],u[y+`hoverformat`]),e.baseLabel=s(R,V.b,u[y+`hoverformat`]),e.spikeDistance=(I(V)+N(V))/2,e[v+`Spike`]=L.c2p(V.p,!0),a(V,u,e),e.hovertemplate=u.hovertemplate,e}}function d(e,t){var n=t.mcc||e.marker.color,r=t.mlcc||e.marker.line.color,a=o(e,t);if(i.opacity(n))return n;if(i.opacity(r)&&a)return r}t.exports={hoverPoints:l,hoverOnBars:u,getTraceColor:d}}),Xa=l((e,t)=>{t.exports=function(e,t,n){return e.x=`xVal`in t?t.xVal:t.x,e.y=`yVal`in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),n.orientation===`h`?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}}),Za=l((e,t)=>{t.exports=function(e,t){var r=e.cd,i=e.xaxis,a=e.yaxis,o=r[0].trace,s=o.type===`funnel`,c=o.orientation===`h`,l=[],u;if(t===!1)for(u=0;u{t.exports={attributes:Ra(),layoutAttributes:za(),supplyDefaults:Va().supplyDefaults,crossTraceDefaults:Va().crossTraceDefaults,supplyLayoutDefaults:Ha(),calc:Wa(),crossTraceCalc:ni().crossTraceCalc,colorbar:si(),arraysToCalcdata:Ua(),plot:Ja().plot,style:qa().style,styleOnSelect:qa().styleOnSelect,hoverPoints:Ya().hoverPoints,eventData:Xa(),selectPoints:Za(),moduleType:`trace`,name:`bar`,basePlotModule:xi(),categories:[`bar-like`,`cartesian`,`svg`,`bar`,`oriented`,`errorBarsOK`,`showLegend`,`zoomScale`],animatable:!0,meta:{}}}),$a=l((e,t)=>{t.exports=Qa()}),eo=l((e,t)=>{var n=hr(),r=gr(),i=Ra(),a=I(),o=xt().axisHoverFormat,{hovertemplateAttrs:s,templatefallbackAttrs:c}=ke(),l=k().extendFlat,u=r.marker,d=u.line;t.exports={y:{valType:`data_array`,editType:`calc+clearAxisTypes`},x:{valType:`data_array`,editType:`calc+clearAxisTypes`},x0:{valType:`any`,editType:`calc+clearAxisTypes`},y0:{valType:`any`,editType:`calc+clearAxisTypes`},dx:{valType:`number`,editType:`calc`},dy:{valType:`number`,editType:`calc`},xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:o(`x`),yhoverformat:o(`y`),name:{valType:`string`,editType:`calc+clearAxisTypes`},q1:{valType:`data_array`,editType:`calc+clearAxisTypes`},median:{valType:`data_array`,editType:`calc+clearAxisTypes`},q3:{valType:`data_array`,editType:`calc+clearAxisTypes`},lowerfence:{valType:`data_array`,editType:`calc`},upperfence:{valType:`data_array`,editType:`calc`},notched:{valType:`boolean`,editType:`calc`},notchwidth:{valType:`number`,min:0,max:.5,dflt:.25,editType:`calc`},notchspan:{valType:`data_array`,editType:`calc`},boxpoints:{valType:`enumerated`,values:[`all`,`outliers`,`suspectedoutliers`,!1],editType:`calc`},jitter:{valType:`number`,min:0,max:1,editType:`calc`},pointpos:{valType:`number`,min:-2,max:2,editType:`calc`},sdmultiple:{valType:`number`,min:0,editType:`calc`,dflt:1},sizemode:{valType:`enumerated`,values:[`quartiles`,`sd`],editType:`calc`,dflt:`quartiles`},boxmean:{valType:`enumerated`,values:[!0,`sd`,!1],editType:`calc`},mean:{valType:`data_array`,editType:`calc`},sd:{valType:`data_array`,editType:`calc`},orientation:{valType:`enumerated`,values:[`v`,`h`],editType:`calc+clearAxisTypes`},quartilemethod:{valType:`enumerated`,values:[`linear`,`exclusive`,`inclusive`],dflt:`linear`,editType:`calc`},width:{valType:`number`,min:0,dflt:0,editType:`calc`},marker:{outliercolor:{valType:`color`,dflt:`rgba(0, 0, 0, 0)`,editType:`style`},symbol:l({},u.symbol,{arrayOk:!1,editType:`plot`}),opacity:l({},u.opacity,{arrayOk:!1,dflt:1,editType:`style`}),angle:l({},u.angle,{arrayOk:!1,editType:`calc`}),size:l({},u.size,{arrayOk:!1,editType:`calc`}),color:l({},u.color,{arrayOk:!1,editType:`style`}),line:{color:l({},d.color,{arrayOk:!1,dflt:a.defaultLine,editType:`style`}),width:l({},d.width,{arrayOk:!1,dflt:0,editType:`style`}),outliercolor:{valType:`color`,editType:`style`},outlierwidth:{valType:`number`,min:0,dflt:1,editType:`style`},editType:`style`},editType:`plot`},line:{color:{valType:`color`,editType:`style`},width:{valType:`number`,min:0,dflt:2,editType:`style`},editType:`plot`},fillcolor:n(),whiskerwidth:{valType:`number`,min:0,max:1,dflt:.5,editType:`calc`},showwhiskers:{valType:`boolean`,editType:`calc`},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:r.selected.marker,editType:`style`},unselected:{marker:r.unselected.marker,editType:`style`},text:l({},r.text,{}),hovertext:l({},r.hovertext,{}),hovertemplate:s({}),hovertemplatefallback:c(),hoveron:{valType:`flaglist`,flags:[`boxes`,`points`],dflt:`boxes+points`,editType:`style`},zorder:r.zorder}}),to=l((e,t)=>{t.exports={boxmode:{valType:`enumerated`,values:[`group`,`overlay`],dflt:`overlay`,editType:`calc`},boxgap:{valType:`number`,min:0,max:1,dflt:.3,editType:`calc`},boxgroupgap:{valType:`number`,min:0,max:1,dflt:.3,editType:`calc`}}}),no=l((e,t)=>{var n=$(),r=Ie(),i=L(),a=Rr(),o=Kr(),s=Jt(),c=eo();function l(e,t,r,o){function s(r,i){return n.coerce(e,t,c,r,i)}if(u(e,t,s,o),t.visible!==!1){a(e,t,o,s),s(`xhoverformat`),s(`yhoverformat`);var l=t._hasPreCompStats;l&&(s(`lowerfence`),s(`upperfence`)),s(`line.color`,(e.marker||{}).color||r),s(`line.width`),s(`fillcolor`,i.addOpacity(t.line.color,.5));var f=!1;if(l){var p=s(`mean`),m=s(`sd`);p&&p.length&&(f=!0,m&&m.length&&(f=`sd`))}s(`whiskerwidth`);var h=s(`sizemode`),g;h===`quartiles`&&(g=s(`boxmean`,f)),s(`showwhiskers`,h===`quartiles`),(h===`sd`||g===`sd`)&&s(`sdmultiple`),s(`width`),s(`quartilemethod`);var _=!1;if(l){var v=s(`notchspan`);v&&v.length&&(_=!0)}else n.validate(e.notchwidth,c.notchwidth)&&(_=!0);s(`notched`,_)&&s(`notchwidth`),d(e,t,s,{prefix:`box`}),s(`zorder`)}}function u(e,t,i,a){function o(e){var t=0;return e&&e.length&&(t+=1,n.isArrayOrTypedArray(e[0])&&e[0].length&&(t+=1)),t}function l(t){return n.validate(e[t],c[t])}var u=i(`y`),d=i(`x`),f;if(t.type===`box`){var p=i(`q1`),m=i(`median`),h=i(`q3`);t._hasPreCompStats=p&&p.length&&m&&m.length&&h&&h.length,f=Math.min(n.minRowLength(p),n.minRowLength(m),n.minRowLength(h))}else t._hasPreCompStats=!1;var g=o(u),_=o(d),v=g&&n.minRowLength(u),y=_&&n.minRowLength(d),b=a.calendar,x={autotypenumbers:a.autotypenumbers},S,C;if(t._hasPreCompStats)switch(String(_)+String(g)){case`00`:var w=l(`x0`)||l(`dx`);S=(l(`y0`)||l(`dy`))&&!w?`h`:`v`,C=f;break;case`10`:S=`v`,C=Math.min(f,y);break;case`20`:S=`h`,C=Math.min(f,d.length);break;case`01`:S=`h`,C=Math.min(f,v);break;case`02`:S=`v`,C=Math.min(f,u.length);break;case`12`:S=`v`,C=Math.min(f,y,u.length);break;case`21`:S=`h`,C=Math.min(f,d.length,v);break;case`11`:C=0;break;case`22`:for(var T=!1,E=0;E0?(S=`v`,C=_>0?Math.min(y,v):Math.min(v)):_>0?(S=`h`,C=Math.min(y)):C=0;if(!C){t.visible=!1;return}t._length=C;var D=i(`orientation`,S);t._hasPreCompStats?D===`v`&&_===0?(i(`x0`,0),i(`dx`,1)):D===`h`&&g===0&&(i(`y0`,0),i(`dy`,1)):D===`v`&&_===0?i(`x0`):D===`h`&&g===0&&i(`y0`),r.getComponentMethod(`calendars`,`handleTraceDefaults`)(e,t,[`x`,`y`],a)}function d(e,t,r,i){var a=i.prefix,o=n.coerce2(e,t,c,`marker.outliercolor`),s=r(`marker.line.outliercolor`),l=`outliers`;t._hasPreCompStats?l=`all`:(o||s)&&(l=`suspectedoutliers`);var u=r(a+`points`,l);u?(r(`jitter`,u===`all`?.3:0),r(`pointpos`,u===`all`?-1.5:0),r(`marker.symbol`),r(`marker.opacity`),r(`marker.size`),r(`marker.angle`),r(`marker.color`,t.line.color),r(`marker.line.color`),r(`marker.line.width`),u===`suspectedoutliers`&&(r(`marker.line.outliercolor`,t.marker.color),r(`marker.line.outlierwidth`)),r(`selected.marker.color`),r(`unselected.marker.color`),r(`selected.marker.size`),r(`unselected.marker.size`),r(`text`),r(`hovertext`)):delete t.marker;var d=r(`hoveron`);(d===`all`||d.indexOf(`points`)!==-1)&&(r(`hovertemplate`),r(`hovertemplatefallback`)),n.coerceSelectionMarkerOpacity(t,r)}function f(e,t){var r,i;function a(e){return n.coerce(i._input,i,c,e)}for(var s=0;s{var n=Ie(),r=$(),i=to();function a(e,t,r,i,a){for(var o=a+`Layout`,s=!1,c=0;c{var n=_(),r=Xt(),i=Yr(),a=$(),o=v().BADNUM,s=a._;t.exports=function(e,t){var i=e._fullLayout,d=r.getFromId(e,t.xaxis||`x`),_=r.getFromId(e,t.yaxis||`y`),v=[],C=t.type===`violin`?`_numViolins`:`_numBoxes`,w,T,E,D,O,k,A;t.orientation===`h`?(E=d,D=`x`,O=_,k=`y`,A=!!t.yperiodalignment):(E=_,D=`y`,O=d,k=`x`,A=!!t.xperiodalignment);var j=c(t,k,O,i[C]),M=j[0],N=j[1],P=a.distinctVals(M,O),F=P.vals,I=P.minDiff/2,L,R,z,B,V,H,U=(t.boxpoints||t.points)===`all`?a.identity:function(e){return e.vL.uf};if(t._hasPreCompStats){var W=t[D],G=function(e){return E.d2c((t[e]||[])[w])},K=1/0,q=-1/0;for(w=0;w=L.q1&&L.q3>=L.med){var Y=G(`lowerfence`);L.lf=Y!==o&&Y<=L.q1?Y:g(L,z,B);var X=G(`upperfence`);L.uf=X!==o&&X>=L.q3?X:y(L,z,B);var ee=G(`mean`);L.mean=ee===o?B?a.mean(z,B):(L.q1+L.q3)/2:ee;var Z=G(`sd`);L.sd=ee!==o&&Z>=0?Z:B?a.stdev(z,B,L.mean):L.q3-L.q1,L.lo=b(L),L.uo=x(L);var te=G(`notchspan`);te=te!==o&&te>0?te:S(L,B),L.ln=L.med-te,L.un=L.med+te;var ne=L.lf,re=L.uf;t.boxpoints&&z.length&&(ne=Math.min(ne,z[0]),re=Math.max(re,z[B-1])),t.notched&&(ne=Math.min(ne,L.ln),re=Math.max(re,L.un)),L.min=ne,L.max=re}else{a.warn([`Invalid input - make sure that q1 <= median <= q3`,`q1 = `+L.q1,`median = `+L.med,`q3 = `+L.q3].join(` +`));var ie=L.med===o?L.q1===o?L.q3===o?0:L.q3:L.q3===o?L.q1:(L.q1+L.q3)/2:L.med;L.med=ie,L.q1=L.q3=ie,L.lf=L.uf=ie,L.mean=L.sd=ie,L.ln=L.un=ie,L.min=L.max=ie}K=Math.min(K,L.min),q=Math.max(q,L.max),L.pts2=R.filter(U),v.push(L)}}t._extremes[E._id]=r.findExtremes(E,[K,q],{padded:!0})}else{var ae=E.makeCalcdata(t,D),oe=l(F,I),se=F.length,ce=u(se);for(w=0;w=0&&Q0){if(L={},L.pos=L[k]=F[w],R=L.pts=ce[w].sort(m),z=L[D]=R.map(h),B=z.length,L.min=z[0],L.max=z[B-1],L.mean=a.mean(z,B),L.sd=a.stdev(z,B,L.mean)*t.sdmultiple,L.med=a.interp(z,.5),B%2&&(fe||pe)){var me,he;fe?(me=z.slice(0,B/2),he=z.slice(B/2+1)):pe&&(me=z.slice(0,B/2+1),he=z.slice(B/2)),L.q1=a.interp(me,.5),L.q3=a.interp(he,.5)}else L.q1=a.interp(z,.25),L.q3=a.interp(z,.75);L.lf=g(L,z,B),L.uf=y(L,z,B),L.lo=b(L),L.uo=x(L);var ge=S(L,B);L.ln=L.med-ge,L.un=L.med+ge,le=Math.min(le,L.ln),ue=Math.max(ue,L.un),L.pts2=R.filter(U),v.push(L)}t.notched&&a.isTypedArray(ae)&&(ae=Array.from(ae)),t._extremes[E._id]=r.findExtremes(E,t.notched?ae.concat([le,ue]):ae,{padded:!0})}return p(v,t),v.length>0?(v[0].t={num:i[C],dPos:I,posLetter:k,valLetter:D,labels:{med:s(e,`median:`),min:s(e,`min:`),q1:s(e,`q1:`),q3:s(e,`q3:`),max:s(e,`max:`),mean:t.boxmean===`sd`||t.sizemode===`sd`?s(e,`mean ± σ:`).replace(`σ`,t.sdmultiple===1?`σ`:t.sdmultiple+`σ`):s(e,`mean:`),lf:s(e,`lower fence:`),uf:s(e,`upper fence:`)}},i[C]++,v):[{t:{empty:!0}}]};function c(e,t,r,o){var s=t in e,c=t+`0`in e,l=`d`+t in e;if(s||c&&l){var u=r.makeCalcdata(e,t);return[i(e,r,t,u).vals,u]}for(var d=c?e[t+`0`]:(`name`in e)&&(r.type===`category`||n(e.name)&&[`linear`,`log`].indexOf(r.type)!==-1||a.isDateTime(e.name)&&r.type===`date`)?e.name:o,f=r.type===`multicategory`?r.r2c_just_indices(d):r.d2c(d,0,e[t+`calendar`]),p=e._length,m=Array(p),h=0;h{var n=Xt(),r=$(),i=Xn().getAxisGroup,a=[`v`,`h`];function o(e,t){for(var n=e.calcdata,r=t.xaxis,i=t.yaxis,o=0;o1,b=1-c[e+`gap`],x=1-c[e+`groupgap`];for(d=0;d0;if(T===`positive`?(F=E*(w?1:.5),R=L,I=R=O):T===`negative`?(F=R=O,I=E*(w?1:.5),z=L):(F=I=E,R=z=L),G){var K=S.pointpos,q=S.jitter,J=S.marker.size/2,Y=0;K+q>=0&&(Y=L*(K+q),Y>F?(W=!0,H=J,B=Y):Y>R&&(H=J,B=F)),Y<=F&&(B=F);var X=0;K-q<=0&&(X=-L*(K-q),X>I?(W=!0,U=J,V=X):X>z&&(U=J,V=I)),X<=I&&(V=I)}else B=F,V=I;var ee=Array(p.length);for(f=0;f{var n=f(),r=$(),i=Gt(),a=5,o=.01;function s(e,t,i,a){var o=e._context.staticPlot,s=t.xaxis,d=t.yaxis;r.makeTraceGroups(a,i,`trace boxes`).each(function(e){var t=n.select(this),r=e[0],i=r.t,a=r.trace;if(i.wdPos=i.bdPos*a.whiskerwidth,a.visible!==!0||i.empty){t.remove();return}var f,p;a.orientation===`h`?(f=d,p=s):(f=s,p=d),c(t,{pos:f,val:p},a,i,o),l(t,{x:s,y:d},a,i),u(t,{pos:f,val:p},a,i)})}function c(e,t,i,a,o){var s=i.orientation===`h`,c=t.val,l=t.pos,u=!!l.rangebreaks,d=a.bPos,f=a.wdPos||0,p=a.bPosPxOffset||0,m=i.whiskerwidth||0,h=i.showwhiskers!==!1,g=i.notched||!1,_=g?1-2*i.notchwidth:1,v,y;Array.isArray(a.bdPos)?(v=a.bdPos[0],y=a.bdPos[1]):(v=a.bdPos,y=a.bdPos);var b=e.selectAll(`path.box`).data(i.type!==`violin`||i.box.visible?r.identity:[]);b.enter().append(`path`).style(`vector-effect`,o?`none`:`non-scaling-stroke`).attr(`class`,`box`),b.exit().remove(),b.each(function(e){if(e.empty)return n.select(this).attr(`d`,`M0,0Z`);var t=l.c2l(e.pos+d,!0),a=l.l2p(t-v)+p,o=l.l2p(t+y)+p,b=u?(a+o)/2:l.l2p(t)+p,x=i.whiskerwidth,S=u?a*x+(1-x)*b:l.l2p(t-f)+p,C=u?o*x+(1-x)*b:l.l2p(t+f)+p,w=l.l2p(t-v*_)+p,T=l.l2p(t+y*_)+p,E=i.sizemode===`sd`,D=c.c2p(E?e.mean-e.sd:e.q1,!0),O=E?c.c2p(e.mean+e.sd,!0):c.c2p(e.q3,!0),k=r.constrain(E?c.c2p(e.mean,!0):c.c2p(e.med,!0),Math.min(D,O)+1,Math.max(D,O)-1),A=e.lf===void 0||i.boxpoints===!1||E,j=c.c2p(A?e.min:e.lf,!0),M=c.c2p(A?e.max:e.uf,!0),N=c.c2p(e.ln,!0),P=c.c2p(e.un,!0);s?n.select(this).attr(`d`,`M`+k+`,`+w+`V`+T+`M`+D+`,`+a+`V`+o+(g?`H`+N+`L`+k+`,`+T+`L`+P+`,`+o:``)+`H`+O+`V`+a+(g?`H`+P+`L`+k+`,`+w+`L`+N+`,`+a:``)+`Z`+(h?`M`+D+`,`+b+`H`+j+`M`+O+`,`+b+`H`+M+(m===0?``:`M`+j+`,`+S+`V`+C+`M`+M+`,`+S+`V`+C):``)):n.select(this).attr(`d`,`M`+w+`,`+k+`H`+T+`M`+a+`,`+D+`H`+o+(g?`V`+N+`L`+T+`,`+k+`L`+o+`,`+P:``)+`V`+O+`H`+a+(g?`V`+P+`L`+w+`,`+k+`L`+a+`,`+N:``)+`Z`+(h?`M`+b+`,`+D+`V`+j+`M`+b+`,`+O+`V`+M+(m===0?``:`M`+S+`,`+j+`H`+C+`M`+S+`,`+M+`H`+C):``))})}function l(e,t,n,s){var c=t.x,l=t.y,u=s.bdPos,d=s.bPos,f=n.boxpoints||n.points;r.seedPseudoRandom();var p=e.selectAll(`g.points`).data(f?function(e){return e.forEach(function(e){e.t=s,e.trace=n}),e}:[]);p.enter().append(`g`).attr(`class`,`points`),p.exit().remove();var m=p.selectAll(`path`).data(function(e){var t,i=e.pts2,s=Math.max((e.max-e.min)/10,e.q3-e.q1),c=s*1e-9,l=s*o,p=[],m=0,h;if(n.jitter){if(s===0)for(m=1,p=Array(i.length),t=0;te.lo&&(x.so=!0)}return i});m.enter().append(`path`).classed(`point`,!0),m.exit().remove(),m.call(i.translatePoints,c,l)}function u(e,t,i,a){var o=t.val,s=t.pos,c=!!s.rangebreaks,l=a.bPos,u=a.bPosPxOffset||0,d=i.boxmean||(i.meanline||{}).visible,f,p;Array.isArray(a.bdPos)?(f=a.bdPos[0],p=a.bdPos[1]):(f=a.bdPos,p=a.bdPos);var m=e.selectAll(`path.mean`).data(i.type===`box`&&i.boxmean||i.type===`violin`&&i.box.visible&&i.meanline.visible?r.identity:[]);m.enter().append(`path`).attr(`class`,`mean`).style({fill:`none`,"vector-effect":`non-scaling-stroke`}),m.exit().remove(),m.each(function(e){var t=s.c2l(e.pos+l,!0),r=s.l2p(t-f)+u,a=s.l2p(t+p)+u,m=c?(r+a)/2:s.l2p(t)+u,h=o.c2p(e.mean,!0),g=o.c2p(e.mean-e.sd,!0),_=o.c2p(e.mean+e.sd,!0);i.orientation===`h`?n.select(this).attr(`d`,`M`+h+`,`+r+`V`+a+(d===`sd`?`m0,0L`+g+`,`+m+`L`+h+`,`+r+`L`+_+`,`+m+`Z`:``)):n.select(this).attr(`d`,`M`+r+`,`+h+`H`+a+(d===`sd`?`m0,0L`+m+`,`+g+`L`+r+`,`+h+`L`+m+`,`+_+`Z`:``))})}t.exports={plot:s,plotBoxAndWhiskers:c,plotPoints:l,plotBoxMean:u}}),so=l((e,t)=>{var n=f(),r=L(),i=Gt();function a(e,t,a){var o=a||n.select(e).selectAll(`g.trace.boxes`);o.style(`opacity`,function(e){return e[0].trace.opacity}),o.each(function(t){var a=n.select(this),o=t[0].trace,s=o.line.width;function c(e,t,n,i){e.style(`stroke-width`,t+`px`).call(r.stroke,n).call(r.fill,i)}var l=a.selectAll(`path.box`);if(o.type===`candlestick`)l.each(function(e){if(!e.empty){var t=n.select(this),r=o[e.dir];c(t,r.line.width,r.line.color,r.fillcolor),t.style(`opacity`,o.selectedpoints&&!e.selected?.3:1)}});else{c(l,s,o.line.color,o.fillcolor),a.selectAll(`path.mean`).style({"stroke-width":s,"stroke-dasharray":2*s+`px,`+s+`px`}).call(r.stroke,o.line.color);var u=a.selectAll(`path.point`);i.pointStyle(u,o,e)}})}function o(e,t,n){var r=t[0].trace,a=n.selectAll(`path.point`);r.selectedpoints?i.selectedPointStyle(a,r):i.pointStyle(a,r,e)}t.exports={style:a,styleOnSelect:o}}),co=l((e,t)=>{var n=Xt(),r=$(),i=Dn(),a=L(),o=r.fillText;function s(e,t,n,r){var i=e.cd[0].trace.hoveron,a=[],o;return i.indexOf(`boxes`)!==-1&&(a=a.concat(c(e,t,n,r))),i.indexOf(`points`)!==-1&&(o=l(e,t,n)),r===`closest`?o?[o]:a:(o&&a.push(o),a)}function c(e,t,o,s){var c=e.cd,l=e.xa,u=e.ya,d=c[0].trace,f=c[0].t,p=d.type===`violin`,m,h,g,_,v,y,b,x,S,C,w,T=f.bdPos,E,D,O=f.wHover,k=function(e){return g.c2l(e.pos)+f.bPos-g.c2l(y)};p&&d.side!==`both`?(d.side===`positive`&&(S=function(e){var t=k(e);return i.inbox(t,t+O,C)},E=T,D=0),d.side===`negative`&&(S=function(e){var t=k(e);return i.inbox(t-O,t,C)},E=0,D=T)):(S=function(e){var t=k(e);return i.inbox(t-O,t+O,C)},E=D=T);var A=p?function(e){return i.inbox(e.span[0]-v,e.span[1]-v,C)}:function(e){return i.inbox(e.min-v,e.max-v,C)};d.orientation===`h`?(v=t,y=o,b=A,x=S,m=`y`,g=u,h=`x`,_=l):(v=o,y=t,b=S,x=A,m=`x`,g=l,h=`y`,_=u);var j=Math.min(1,T/Math.abs(g.r2c(g.range[1])-g.r2c(g.range[0])));C=e.maxHoverDistance-j,w=e.maxSpikeDistance-j;function M(e){return(b(e)+x(e))/2}var N=i.getDistanceFunction(s,b,x,M);if(i.getClosest(c,N,e),e.index===!1)return[];var P=c[e.index],F=d.line.color,I=(d.marker||{}).color;e.color=a.opacity(F)&&d.line.width?F:a.opacity(I)&&d.boxpoints?I:d.fillcolor,e[m+`0`]=g.c2p(P.pos+f.bPos-D,!0),e[m+`1`]=g.c2p(P.pos+f.bPos+E,!0),e[m+`LabelVal`]=P.orig_p===void 0?P.pos:P.orig_p;var L=m+`Spike`;e.spikeDistance=M(P)*w/C,e[L]=g.c2p(P.pos,!0);var R=d.boxmean||d.sizemode===`sd`||(d.meanline||{}).visible,z=d.boxpoints||d.points,B=z&&R?[`max`,`uf`,`q3`,`med`,`mean`,`q1`,`lf`,`min`]:z&&!R?[`max`,`uf`,`q3`,`med`,`q1`,`lf`,`min`]:!z&&R?[`max`,`q3`,`med`,`mean`,`q1`,`min`]:[`max`,`q3`,`med`,`q1`,`min`],V=_.range[1]<_.range[0];d.orientation===(V?`v`:`h`)&&B.reverse();for(var H=e.spikeDistance,U=e[L],W=[],G=0;G{t.exports=function(e,t){return t.hoverOnBox&&(e.hoverOnBox=t.hoverOnBox),`xVal`in t&&(e.x=t.xVal),`yVal`in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}),uo=l((e,t)=>{t.exports=function(e,t){var n=e.cd,r=e.xaxis,i=e.yaxis,a=[],o,s;if(t===!1)for(o=0;o{t.exports={attributes:eo(),layoutAttributes:to(),supplyDefaults:no().supplyDefaults,crossTraceDefaults:no().crossTraceDefaults,supplyLayoutDefaults:ro().supplyLayoutDefaults,calc:io(),crossTraceCalc:ao().crossTraceCalc,plot:oo().plot,style:so().style,styleOnSelect:so().styleOnSelect,hoverPoints:co().hoverPoints,eventData:lo(),selectPoints:uo(),moduleType:`trace`,name:`box`,basePlotModule:xi(),categories:[`cartesian`,`svg`,`symbols`,`oriented`,`box-violin`,`showLegend`,`boxLayout`,`zoomScale`],meta:{}}}),po=l((e,t)=>{t.exports=fo()}),mo=l((e,t)=>{var n=wt(),{extendFlat:r}=k(),i=P(),{axisHoverFormat:a}=xt(),o=A(),{hovertemplateAttrs:s,templatefallbackAttrs:c,texttemplateAttrs:l}=ke(),u=gr();t.exports=r({z:{valType:`data_array`,editType:`calc`},x:r({},u.x,{impliedEdits:{xtype:`array`}}),x0:r({},u.x0,{impliedEdits:{xtype:`scaled`}}),dx:r({},u.dx,{impliedEdits:{xtype:`scaled`}}),y:r({},u.y,{impliedEdits:{ytype:`array`}}),y0:r({},u.y0,{impliedEdits:{ytype:`scaled`}}),dy:r({},u.dy,{impliedEdits:{ytype:`scaled`}}),xperiod:r({},u.xperiod,{impliedEdits:{xtype:`scaled`}}),yperiod:r({},u.yperiod,{impliedEdits:{ytype:`scaled`}}),xperiod0:r({},u.xperiod0,{impliedEdits:{xtype:`scaled`}}),yperiod0:r({},u.yperiod0,{impliedEdits:{ytype:`scaled`}}),xperiodalignment:r({},u.xperiodalignment,{impliedEdits:{xtype:`scaled`}}),yperiodalignment:r({},u.yperiodalignment,{impliedEdits:{ytype:`scaled`}}),text:{valType:`data_array`,editType:`calc`},hovertext:{valType:`data_array`,editType:`calc`},transpose:{valType:`boolean`,dflt:!1,editType:`calc`},xtype:{valType:`enumerated`,values:[`array`,`scaled`],editType:`calc+clearAxisTypes`},ytype:{valType:`enumerated`,values:[`array`,`scaled`],editType:`calc+clearAxisTypes`},zsmooth:{valType:`enumerated`,values:[`fast`,`best`,!1],dflt:!1,editType:`calc`},hoverongaps:{valType:`boolean`,dflt:!0,editType:`none`},connectgaps:{valType:`boolean`,editType:`calc`},xgap:{valType:`number`,dflt:0,min:0,editType:`plot`},ygap:{valType:`number`,dflt:0,min:0,editType:`plot`},xhoverformat:a(`x`),yhoverformat:a(`y`),zhoverformat:a(`z`,1),hovertemplate:s(),hovertemplatefallback:c(),texttemplate:l({arrayOk:!1,editType:`plot`},{keys:[`x`,`y`,`z`,`text`]}),texttemplatefallback:c({editType:`plot`}),textfont:o({editType:`plot`,autoSize:!0,autoColor:!0,colorEditType:`style`}),showlegend:r({},i.showlegend,{dflt:!1}),zorder:u.zorder},n(``,{cLetter:`z`,autoColorDflt:!1}))}),ho=l((e,t)=>{var n=_(),r=$(),i=Ie();t.exports=function(e,t,n,s,c,l){var u=n(`z`);c||=`x`,l||=`y`;var d,f;if(u===void 0||!u.length)return 0;if(r.isArray1D(u)){d=n(c),f=n(l);var p=r.minRowLength(d),m=r.minRowLength(f);if(p===0||m===0)return 0;t._length=Math.min(p,m,u.length)}else{if(d=a(c,n),f=a(l,n),!o(u))return 0;n(`transpose`),t._length=null}return i.getComponentMethod(`calendars`,`handleTraceDefaults`)(e,t,[c,l],s),!0};function a(e,t){var n=t(e);return(n?t(e+`type`,`array`):`scaled`)===`scaled`&&(t(e+`0`),t(`d`+e)),n}function o(e){for(var t=!0,i=!1,a=!1,o,s=0;s0&&(i=!0);for(var c=0;c{var n=$();t.exports=function(e,t){e(`texttemplate`),e(`texttemplatefallback`);var r=n.extendFlat({},t.font,{color:`auto`,size:`auto`});n.coerceFont(e,`textfont`,r)}}),_o=l((e,t)=>{t.exports=function(e,t,n){n(`zsmooth`)===!1&&(n(`xgap`),n(`ygap`)),n(`zhoverformat`)}}),vo=l((e,t)=>{var n=$(),r=ho(),i=go(),a=Rr(),o=_o(),s=Ft(),c=mo();t.exports=function(e,t,l,u){function d(r,i){return n.coerce(e,t,c,r,i)}if(!r(e,t,d,u)){t.visible=!1;return}a(e,t,u,d),d(`xhoverformat`),d(`yhoverformat`),d(`text`),d(`hovertext`),d(`hovertemplate`),d(`hovertemplatefallback`),i(d,u),o(e,t,d,u),d(`hoverongaps`),d(`connectgaps`,n.isArray1D(t.z)&&t.zsmooth!==!1),s(e,t,u,d,{prefix:``,cLetter:`z`}),d(`zorder`)}}),yo=l((e,t)=>{var n=_();t.exports={count:function(e,t,n){return n[e]++,1},sum:function(e,t,r,i){var a=i[t];return n(a)?(a=Number(a),r[e]+=a,a):0},avg:function(e,t,r,i,a){var o=i[t];return n(o)&&(o=Number(o),r[e]+=o,a[e]++),0},min:function(e,t,r,i){var a=i[t];if(n(a)){if(a=Number(a),n(r[e])){if(r[e]>a){var o=a-r[e];return r[e]=a,o}}else return r[e]=a,a}return 0},max:function(e,t,r,i){var a=i[t];if(n(a)){if(a=Number(a),n(r[e])){if(r[e]{t.exports={percent:function(e,t){for(var n=e.length,r=100/t,i=0;i{t.exports=function(e,t){for(var n=e.length,r=0,i=0;i{var n=v(),r=n.ONEAVGYEAR,i=n.ONEAVGMONTH,a=n.ONEDAY,o=n.ONEHOUR,s=n.ONEMIN,c=n.ONESEC,l=Xt().tickIncrement;t.exports=function(e,t,n,i,o){var s=-1.1*t,c=-.1*t,d=e-c,f=n[0],p=n[1],m=Math.min(u(f+c,f+d,i,o),u(p+c,p+d,i,o)),h=Math.min(u(f+s,f+c,i,o),u(p+s,p+c,i,o)),g,_;if(m>h&&ha){var v=g===r?1:6,y=g===r?`M12`:`M1`;return function(t,n){var a=i.c2d(t,r,o),s=a.indexOf(`-`,v);s>0&&(a=a.slice(0,s));var c=i.d2c(a,0,o);if(cc?e>a?e>r*1.1?r:e>i*1.1?i:a:e>o?o:e>s?s:c:10**Math.floor(Math.log(e)/Math.LN10)}function f(e,t,n,i,o,s){if(i&&e>a){var c=p(t,o,s),l=p(n,o,s),u=e===r?0:1;return c[u]!==l[u]}return Math.floor(n/e)-Math.floor(t/e)>.1}function p(e,t,n){var i=t.c2d(e,r,n).split(`-`);return i[0]===``&&(i.unshift(),i[0]=`-`+i[0]),i}}),Co=l((e,t)=>{var n=_(),r=$(),i=Ie(),a=Xt(),{hasColorscale:o}=bt(),s=Rt(),c=Ua(),l=yo(),u=bo(),d=xo(),f=So();function p(e,t){var i=[],p=[],h=t.orientation===`h`,g=a.getFromId(e,h?t.yaxis:t.xaxis),_=h?`y`:`x`,y={x:`y`,y:`x`}[_],b=t[_+`calendar`],x=t.cumulative,S,C=m(e,t,g,_),w=C[0],T=C[1],E=typeof w.size==`string`,D=[],O=E?D:w,k=[],A=[],j=[],M=0,N=t.histnorm,P=t.histfunc,F=N.indexOf(`density`)!==-1,I,L,R;x.enabled&&F&&(N=N.replace(/ ?density$/,``),F=!1);var z=P===`max`||P===`min`?null:0,B=l.count,V=u[N],H=!1,U=function(e){return g.r2c(e,0,b)},W;for(r.isArrayOrTypedArray(t[y])&&P!==`count`&&(W=t[y],H=P===`avg`,B=l[P]),S=U(w.start),L=U(w.end)+(S-a.tickIncrement(S,w.size,!1,b))/1e6;S=0&&R=ie;S--)if(p[S]){ae=S;break}for(S=ie;S<=ae;S++)if(n(i[S])&&n(p[S])){var oe={p:i[S],s:p[S],b:0};x.enabled||(oe.pts=j[S],J?oe.ph0=oe.ph1=j[S].length?T[j[S][0]]:i[S]:(t._computePh=!0,oe.ph0=te(D[S]),oe.ph1=te(D[S+1],!0))),re.push(oe)}return re.length===1&&(re[0].width1=a.tickIncrement(re[0].p,w.size,!1,b)-re[0].p),o(t,`marker`)&&s(e,t,{vals:t.marker.color,containerStr:`marker`,cLetter:`c`}),o(t,`marker.line`)&&s(e,t,{vals:t.marker.line.color,containerStr:`marker.line`,cLetter:`c`}),c(re,t),r.isArrayOrTypedArray(t.selectedpoints)&&r.tagSelected(re,t,ee),re}function m(e,t,o,s,c){var l=s+`bins`,u=e._fullLayout,d=t[`_`+s+`bingroup`],f=u._histogramBinOpts[d],p=u.barmode===`overlay`,m,g,_,v,y,b,x,S=function(e){return o.r2c(e,0,v)},C=function(e){return o.c2r(e,0,v)},w=o.type===`date`?function(e){return e||e===0?r.cleanDate(e,null,v):null}:function(e){return n(e)?Number(e):null};function T(e,t,n){t[e+`Found`]?(t[e]=w(t[e]),t[e]===null&&(t[e]=n[e])):(b[e]=t[e]=n[e],r.nestedProperty(g[0],l+`.`+e).set(n[e]))}if(t[`_`+s+`autoBinFinished`])delete t[`_`+s+`autoBinFinished`];else{g=f.traces;var E=[],D=!0,O=!1,k=!1;for(m=0;mo.r2l(R)&&(B=a.tickIncrement(B,f.size,!0,v)),P.start=o.l2r(B),L||r.nestedProperty(t,l+`.start`).set(P.start)}var V=f.end,H=o.r2l(N.end),U=H!==void 0;if((f.endFound||U)&&H!==o.r2l(V)){var W=U?H:r.aggNums(Math.max,null,y);P.end=o.l2r(W),U||r.nestedProperty(t,l+`.start`).set(P.end)}var G=`autobin`+s;return t._input[G]===!1&&(t._input[l]=r.extendFlat({},t[l]||{}),delete t._input[G],delete t[G]),[P,y]}function h(e,t,n,i,a){for(var o=e._fullLayout,s=g(e,t),c=!1,l=1/0,u=[t],d=0,f,p;d=0;r--)s(r)}else if(t===`increasing`){for(r=1;r=0;r--)e[r]+=e[r+1];n===`exclude`&&(e.push(0),e.shift())}}t.exports={calc:p,calcAllAutoBins:m}}),wo=l((e,t)=>{var n=$(),r=Xt(),i=yo(),a=bo(),o=xo(),s=So(),c=Co().calcAllAutoBins;t.exports=function(e,t){var s=r.getFromId(e,t.xaxis),f=r.getFromId(e,t.yaxis),p=t.xcalendar,m=t.ycalendar,h=function(e){return s.r2c(e,0,p)},g=function(e){return f.r2c(e,0,m)},_=function(e){return s.c2r(e,0,p)},v=function(e){return f.c2r(e,0,m)},y,b,x,S,C=c(e,t,s,`x`),w=C[0],T=C[1],E=c(e,t,f,`y`),D=E[0],O=E[1],k=t._length;T.length>k&&T.splice(k,T.length-k),O.length>k&&O.splice(k,O.length-k);var A=[],j=[],M=[],N=typeof w.size==`string`,P=typeof D.size==`string`,F=[],I=[],L=N?F:w,R=P?I:D,z=0,B=[],V=[],H=t.histnorm,U=t.histfunc,W=H.indexOf(`density`)!==-1,G=U===`max`||U===`min`?null:0,K=i.count,q=a[H],J=!1,Y=[],X=[],ee=`z`in t?t.z:`marker`in t&&Array.isArray(t.marker.color)?t.marker.color:``;ee&&U!==`count`&&(J=U===`avg`,K=i[U]);var Z=w.size,te=h(w.start),ne=h(w.end)+(te-r.tickIncrement(te,Z,!1,p))/1e6;for(y=te;y=0&&x=0&&S{var n=$(),r=v().BADNUM,i=Yr();t.exports=function(e,t,a,o,s,c){var l=e._length,u=t.makeCalcdata(e,o),d=a.makeCalcdata(e,s);u=i(e,t,o,u).vals,d=i(e,a,s,d).vals;var f=e.text,p=f!==void 0&&n.isArray1D(f),m=e.hovertext,h=m!==void 0&&n.isArray1D(m),g,_,v=n.distinctVals(u),y=v.vals,b=n.distinctVals(d),x=b.vals,S=[],C,w,T=x.length,E=y.length;for(g=0;g{var n=_(),r=$(),i=v().BADNUM;t.exports=function(e,t,a,o){var s,c,l,u,d,f;function p(e){if(n(e))return+e}if(t&&t.transpose){for(s=0,d=0;d{var n=$(),r=.01,i=[[-1,0],[1,0],[0,-1],[0,1]];function a(e){return .5-.25*Math.min(1,e*.5)}t.exports=function(e,t){var i=1,s;for(o(e,t),s=0;sr;s++)i=o(e,t,a(i));return i>r&&n.log(`interp2d didn't converge quickly`,i),e};function o(e,t,n){for(var r=0,a,o,s,c=0,l,u,d,f,p,m,h,g,_;cg&&(r=Math.max(r,Math.abs(e[o][s]-h)/(_-g))))}return r}}),Oo=l((e,t)=>{var n=$().maxRowLength;t.exports=function(e){for(var t=[],r={},i=[],a=e[0],o=[],s=[0,0,0],c=n(e),l,u=0,d,f,p,m,h,g;u=0;p--)f=i[p],u=f[0],d=f[1],m=((r[[u-1,d]]||s)[2]+(r[[u+1,d]]||s)[2]+(r[[u,d-1]]||s)[2]+(r[[u,d+1]]||s)[2])/20,m&&(h[f]=[u,d,m],i.splice(p,1),g=!0);if(!g)throw`findEmpties iterated with no new neighbors`;for(f in h)r[f]=h[f],t.push(h[f])}return t.sort(function(e,t){return t[2]-e[2]})}}),ko=l((e,t)=>{var n=Ie(),r=$().isArrayOrTypedArray;t.exports=function(e,t,i,a,o,s){var c=[],l=n.traceIs(e,`contour`),u=n.traceIs(e,`histogram`),d,f,p;if(r(t)&&t.length>1&&!u&&s.type!==`category`){var m=t.length;if(m<=o){if(l)c=Array.from(t).slice(0,o);else if(o===1)c=s.type===`log`?[.5*t[0],2*t[0]]:[t[0]-.5,t[0]+.5];else if(s.type===`log`){for(c=[t[0]**1.5/t[1]**.5],p=1;p{var n=Ie(),r=$(),i=Xt(),a=Yr(),o=wo(),s=Rt(),c=To(),l=Eo(),u=Do(),d=Oo(),f=ko(),p=v().BADNUM;t.exports=function(e,t){var p=i.getFromId(e,t.xaxis||`x`),g=i.getFromId(e,t.yaxis||`y`),_=n.traceIs(t,`contour`),v=n.traceIs(t,`histogram`),y=_?`best`:t.zsmooth,b,x,S,C,w,T,E,D,O,k,A;if(p._minDtick=0,g._minDtick=0,v)A=o(e,t),C=A.orig_x,b=A.x,x=A.x0,S=A.dx,D=A.orig_y,w=A.y,T=A.y0,E=A.dy,O=A.z;else{var j=t.z;r.isArray1D(j)?(c(t,p,g,`x`,`y`,[`z`]),b=t._x,w=t._y,j=t._z):(C=t.x?p.makeCalcdata(t,`x`):[],D=t.y?g.makeCalcdata(t,`y`):[],b=a(t,p,`x`,C).vals,w=a(t,g,`y`,D).vals,t._x=b,t._y=w),x=t.x0,S=t.dx,T=t.y0,E=t.dy,O=l(j,t,p,g)}(p.rangebreaks||g.rangebreaks)&&(O=h(b,w,O),v||(b=m(b),w=m(w),t._x=b,t._y=w)),!v&&(_||t.connectgaps)&&(t._emptypoints=d(O),u(O,t._emptypoints));function M(e){y=t._input.zsmooth=t.zsmooth=!1,r.warn(`cannot use zsmooth: "fast": `+e)}function N(e){if(e.length>1){var t=(e[e.length-1]-e[0])/(e.length-1),n=Math.abs(t/100);for(k=0;kn)return!1}return!0}t._islinear=!1,p.type===`log`||g.type===`log`?y===`fast`&&M(`log axis found`):N(b)?N(w)?t._islinear=!0:y===`fast`&&M(`y scale is not linear`):y===`fast`&&M(`x scale is not linear`);var P=r.maxRowLength(O),F=t.xtype===`scaled`?``:b,I=f(t,F,x,S,P,p),L=t.ytype===`scaled`?``:w,R=f(t,L,T,E,O.length,g);t._extremes[p._id]=i.findExtremes(p,I),t._extremes[g._id]=i.findExtremes(g,R);var z={x:I,y:R,z:O,text:t._text||t.text,hovertext:t._hovertext||t.hovertext};if(t.xperiodalignment&&C&&(z.orig_x=C),t.yperiodalignment&&D&&(z.orig_y=D),F&&F.length===I.length-1&&(z.xCenter=F),L&&L.length===R.length-1&&(z.yCenter=L),v&&(z.xRanges=A.xRanges,z.yRanges=A.yRanges,z.pts=A.pts),_||s(e,t,{vals:O,cLetter:`z`}),_&&t.contours&&t.contours.coloring===`heatmap`){var B={type:t.type===`contour`?`heatmap`:`histogram2d`,xcalendar:t.xcalendar,ycalendar:t.ycalendar};z.xfill=f(B,F,x,S,P,p),z.yfill=f(B,L,T,E,O.length,g)}return[z]};function m(e){for(var t=[],n=e.length,r=0;r{e.CSS_DECLARATIONS=[[`image-rendering`,`optimizeSpeed`],[`image-rendering`,`-moz-crisp-edges`],[`image-rendering`,`-o-crisp-edges`],[`image-rendering`,`-webkit-optimize-contrast`],[`image-rendering`,`optimize-contrast`],[`image-rendering`,`crisp-edges`],[`image-rendering`,`pixelated`]],e.STYLE=e.CSS_DECLARATIONS.map(function(e){return e.join(`: `)+`; `}).join(``)}),Mo=l((e,t)=>{var n=jo(),r=Gt(),i=$(),a=null;function o(){if(a!==null)return a;a=!1;var e=i.isSafari()||i.isMacWKWebView()||i.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(n.CSS_DECLARATIONS).reverse(),o=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof o==`function`)a=t.some(function(e){return o.apply(null,e)});else{var s=r.tester.append(`image`).attr(`style`,n.STYLE),c=window.getComputedStyle(s.node()).imageRendering;a=t.some(function(e){var t=e[1];return c===t||c===t.toLowerCase()}),s.remove()}}return a}t.exports=o}),No=l((e,t)=>{var n=f(),r=O(),i=Ie(),a=Gt(),o=Xt(),s=$(),c=yt(),l=ci(),u=L(),d=zt().extractOpts,p=zt().makeColorScaleFuncFromTrace,m=_t(),h=vt().LINE_SPACING,g=Mo(),_=jo().STYLE,v=`heatmap-label`;function y(e){return e.selectAll(`g.`+v)}function b(e){y(e).remove()}t.exports=function(e,t,f,w){var T=t.xaxis,E=t.yaxis;s.makeTraceGroups(w,f,`hm`).each(function(t){for(var f=n.select(this),w=t[0],D=w.trace,O=D.xgap||0,k=D.ygap||0,A=w.z,j=w.x,M=w.y,N=w.xCenter,P=w.yCenter,F=i.traceIs(D,`contour`),I=F?`best`:D.zsmooth,L=A.length,R=s.maxRowLength(A),z=!1,B=!1,V,H,U,W,G,K=0,q,J;V===void 0&&K0;)H=T.c2p(j[K]),K--;for(H0;)G=E.c2p(M[K]),K--;G=T._length||H<=0||W>=E._length||G<=0){f.selectAll(`image`).data([]).exit().remove(),b(f);return}var te,ne;Y===`fast`?(te=R,ne=L):(te=ee,ne=Z);var re=document.createElement(`canvas`);re.width=te,re.height=ne;var ie=re.getContext(`2d`,{willReadFrequently:!0}),ae=p(D,{noNumericCheck:!0,returnArray:!0}),oe,se;Y===`fast`?(oe=z?function(e){return R-1-e}:s.identity,se=B?function(e){return L-1-e}:s.identity):(oe=function(e){return s.constrain(Math.round(T.c2p(j[e])-V),0,ee)},se=function(e){return s.constrain(Math.round(E.c2p(M[e])-W),0,Z)});var ce=se(0),Q=[ce,ce],le=+!z,ue=+!B,de=0,fe=0,pe=0,me=0,he,ge,_e,ve,ye;function be(e,t){if(e!==void 0){var n=ae(e);return n[0]=Math.round(n[0]),n[1]=Math.round(n[1]),n[2]=Math.round(n[2]),de+=t,fe+=n[0]*t,pe+=n[1]*t,me+=n[2]*t,n}return[0,0,0,0]}function xe(e,t,n,r){var i=e[n.bin0];if(i===void 0)return be(void 0,1);var a=e[n.bin1],o=t[n.bin0],s=t[n.bin1],c=a-i||0,l=o-i||0,u=a===void 0?s===void 0?0:o===void 0?2*(s-i):(2*s-o-i)*2/3:s===void 0?o===void 0?0:(2*i-a-o)*2/3:o===void 0?(2*s-a-i)*2/3:s+i-a-o;return be(i+n.frac*c+r.frac*(l+n.frac*u))}if(Y!=="default"){var Se=0,Ce;try{Ce=new Uint8Array(te*ne*4)}catch{Ce=Array(te*ne*4)}if(Y===`smooth`){var we=N||j,Te=P||M,Ee=Array(we.length),De=Array(Te.length),Oe=Array(ee),ke=N?S:x,Ae=P?S:x,je,Me,Ne;for(K=0;KQe||Qe>E._length))for(q=Je;qet||et>T._length)){var $=l({x:$e,y:Ze},D,e._fullLayout);$.x=$e,$.y=Ze;var tt=w.z[K][q];tt===void 0?($.z=``,$.zLabel=``):($.z=tt,$.zLabel=o.tickText(Ue,tt,`hover`).text);var nt=w.text&&w.text[K]&&w.text[K][q];(nt===void 0||nt===!1)&&(nt=``),$.text=nt;var rt=s.texttemplateString({data:[$,D._meta],fallback:D.texttemplatefallback,labels:$,locale:e._fullLayout._d3locale,template:Ve});if(rt){var it=rt.split(`
`),at=it.length,ot=0;for(J=0;J{t.exports={min:`zmin`,max:`zmax`}}),Fo=l((e,t)=>{var n=f();t.exports=function(e){n.select(e).selectAll(`.hm image`).style(`opacity`,function(e){return e.trace.opacity})}}),Io=l((e,t)=>{var n=Dn(),r=$(),i=r.isArrayOrTypedArray,a=Xt(),o=zt().extractOpts;t.exports=function(e,t,s,c,l){l||={};var u=l.isContour,d=e.cd[0],f=d.trace,p=e.xa,m=e.ya,h=d.x,g=d.y,_=d.z,v=d.xCenter,y=d.yCenter,b=d.zmask,x=f.zhoverformat,S=h,C=g,w,T,E,D;if(e.index!==!1){try{E=Math.round(e.index[1]),D=Math.round(e.index[0])}catch{r.error(`Error hovering on heatmap, pointNumber must be [row,col], found:`,e.index);return}if(E<0||E>=_[0].length||D<0||D>_.length)return}else{if(n.inbox(t-h[0],t-h[h.length-1],0)>0||n.inbox(s-g[0],s-g[g.length-1],0)>0)return;if(u){var O;for(S=[2*h[0]-h[1]],O=1;O{t.exports={attributes:mo(),supplyDefaults:vo(),calc:Ao(),plot:No(),colorbar:Po(),style:Fo(),hoverPoints:Io(),moduleType:`trace`,name:`heatmap`,basePlotModule:xi(),categories:[`cartesian`,`svg`,`2dMap`,`showLegend`],meta:{}}}),Ro=l((e,t)=>{t.exports=Lo()}),zo=l((e,t)=>{t.exports=function(e,t){return{start:{valType:`any`,editType:`calc`},end:{valType:`any`,editType:`calc`},size:{valType:`any`,editType:`calc`},editType:`calc`}}}),Bo=l((e,t)=>{t.exports={eventDataKeys:[`binNumber`]}}),Vo=l((e,t)=>{var n=Ra(),r=xt().axisHoverFormat,{hovertemplateAttrs:i,texttemplateAttrs:a,templatefallbackAttrs:o}=ke(),s=A(),c=zo(),l=Bo(),u=k().extendFlat;t.exports={x:{valType:`data_array`,editType:`calc+clearAxisTypes`},y:{valType:`data_array`,editType:`calc+clearAxisTypes`},xhoverformat:r(`x`),yhoverformat:r(`y`),text:u({},n.text,{}),hovertext:u({},n.hovertext,{}),orientation:n.orientation,histfunc:{valType:`enumerated`,values:[`count`,`sum`,`avg`,`min`,`max`],dflt:`count`,editType:`calc`},histnorm:{valType:`enumerated`,values:[``,`percent`,`probability`,`density`,`probability density`],dflt:``,editType:`calc`},cumulative:{enabled:{valType:`boolean`,dflt:!1,editType:`calc`},direction:{valType:`enumerated`,values:[`increasing`,`decreasing`],dflt:`increasing`,editType:`calc`},currentbin:{valType:`enumerated`,values:[`include`,`exclude`,`half`],dflt:`include`,editType:`calc`},editType:`calc`},nbinsx:{valType:`integer`,min:0,dflt:0,editType:`calc`},xbins:c(`x`,!0),nbinsy:{valType:`integer`,min:0,dflt:0,editType:`calc`},ybins:c(`y`,!0),autobinx:{valType:`boolean`,dflt:null,editType:`calc`},autobiny:{valType:`boolean`,dflt:null,editType:`calc`},bingroup:{valType:`string`,dflt:``,editType:`calc`},hovertemplate:i({},{keys:l.eventDataKeys}),hovertemplatefallback:o(),texttemplate:a({arrayOk:!1,editType:`plot`},{keys:[`label`,`value`]}),texttemplatefallback:o({editType:`plot`}),textposition:u({},n.textposition,{arrayOk:!1}),textfont:s({arrayOk:!1,editType:`plot`,colorEditType:`style`}),outsidetextfont:s({arrayOk:!1,editType:`plot`,colorEditType:`style`}),insidetextfont:s({arrayOk:!1,editType:`plot`,colorEditType:`style`}),insidetextanchor:n.insidetextanchor,textangle:n.textangle,cliponaxis:n.cliponaxis,constraintext:n.constraintext,marker:n.marker,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:n.selected,unselected:n.unselected,zorder:n.zorder}}),Ho=l((e,t)=>{var n=Ie(),r=$(),i=L(),a=Va().handleText,o=Ba(),s=Vo();t.exports=function(e,t,c,l){function u(n,i){return r.coerce(e,t,s,n,i)}var d=u(`x`),f=u(`y`);u(`cumulative.enabled`)&&(u(`cumulative.direction`),u(`cumulative.currentbin`)),u(`text`),a(e,t,l,u,u(`textposition`),{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u(`hovertext`),u(`hovertemplate`),u(`hovertemplatefallback`),u(`xhoverformat`),u(`yhoverformat`);var p=u(`orientation`,f&&!d?`h`:`v`),m=p===`v`?`x`:`y`,h=p===`v`?`y`:`x`,g=d&&f?Math.min(r.minRowLength(d)&&r.minRowLength(f)):r.minRowLength(t[m]||[]);if(!g){t.visible=!1;return}t._length=g,n.getComponentMethod(`calendars`,`handleTraceDefaults`)(e,t,[`x`,`y`],l),t[h]&&u(`histfunc`),u(`histnorm`),u(`autobin`+m),o(e,t,u,c,l),r.coerceSelectionMarkerOpacity(t,u);var _=(t.marker.line||{}).color,v=n.getComponentMethod(`errorbars`,`supplyDefaults`);v(e,t,_||i.defaultLine,{axis:`y`}),v(e,t,_||i.defaultLine,{axis:`x`,inherit:`y`}),u(`zorder`)}}),Uo=l((e,t)=>{var n=$(),r=dt(),i=Ie().traceIs,a=Kr(),o=Va().validateCornerradius,s=n.nestedProperty,c=Xn().getAxisGroup,l=[{aStr:{x:`xbins.start`,y:`ybins.start`},name:`start`},{aStr:{x:`xbins.end`,y:`ybins.end`},name:`end`},{aStr:{x:`xbins.size`,y:`ybins.size`},name:`size`},{aStr:{x:`nbinsx`,y:`nbinsy`},name:`nbins`}],u=[`x`,`y`];t.exports=function(e,t){var d=t._histogramBinOpts={},f=[],p={},m=[],h,g,_,v,y,b,x;function S(e,t){return n.coerce(h._input,h,h._module.attributes,e,t)}function C(e){return e.orientation===`v`?`x`:`y`}function w(e,n){return r.getFromTrace({_fullLayout:t},e,n).type}function T(e,t,r){var i=e.uid+`__`+r;t||=i;var a=w(e,r),o=e[r+`calendar`]||``,s=d[t],c=!0;s&&(a===s.axType&&o===s.calendar?(c=!1,s.traces.push(e),s.dirs.push(r)):(t=i,a!==s.axType&&n.warn([`Attempted to group the bins of trace`,e.index,`set on a`,`type:`+a,`axis`,`with bins on`,`type:`+s.axType,`axis.`].join(` `)),o!==s.calendar&&n.warn([`Attempted to group the bins of trace`,e.index,`set with a`,o,`calendar`,`with bins`,s.calendar?`on a `+s.calendar+` calendar`:`w/o a set calendar`].join(` `)))),c&&(d[t]={traces:[e],dirs:[r],axType:a,calendar:e[r+`calendar`]||``}),e[`_`+r+`bingroup`]=t}for(y=0;y{var n=Ya().hoverPoints,r=Xt().hoverLabelText;t.exports=function(e,t,i,a,o){var s=n(e,t,i,a,o);if(s){e=s[0];var c=e.cd[e.index],l=e.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation===`h`?`y`:`x`;e[u+`Label`]=r(e[u+`a`],[c.ph0,c.ph1],l[u+`hoverformat`])}return s}}}),Go=l((e,t)=>{t.exports=function(e,t,n,r,i){if(e.x=`xVal`in t?t.xVal:t.x,e.y=`yVal`in t?t.yVal:t.y,`zLabelVal`in t&&(e.z=t.zLabelVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),!(n.cumulative||{}).enabled){var a=Array.isArray(i)?r[0].pts[i[0]][i[1]]:r[i].pts;e.pointNumbers=a,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex;var o;if(n._indexToPoints){o=[];for(var s=0;s{t.exports={attributes:Vo(),layoutAttributes:za(),supplyDefaults:Ho(),crossTraceDefaults:Uo(),supplyLayoutDefaults:Ha(),calc:Co().calc,crossTraceCalc:ni().crossTraceCalc,plot:Ja().plot,layerName:`barlayer`,style:qa().style,styleOnSelect:qa().styleOnSelect,colorbar:si(),hoverPoints:Wo(),selectPoints:Za(),eventData:Go(),moduleType:`trace`,name:`histogram`,basePlotModule:xi(),categories:[`bar-like`,`cartesian`,`svg`,`bar`,`histogram`,`oriented`,`errorBarsOK`,`showLegend`],meta:{}}}),qo=l((e,t)=>{t.exports=Ko()}),Jo=l((e,t)=>{var n=Vo(),r=zo(),i=mo(),a=P(),o=xt().axisHoverFormat,{hovertemplateAttrs:s,texttemplateAttrs:c,templatefallbackAttrs:l}=ke(),u=wt(),d=k().extendFlat;t.exports=d({x:n.x,y:n.y,z:{valType:`data_array`,editType:`calc`},marker:{color:{valType:`data_array`,editType:`calc`},editType:`calc`},histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:r(`x`),nbinsy:n.nbinsy,ybins:r(`y`),autobinx:n.autobinx,autobiny:n.autobiny,bingroup:d({},n.bingroup,{}),xbingroup:d({},n.bingroup,{}),ybingroup:d({},n.bingroup,{}),xgap:i.xgap,ygap:i.ygap,zsmooth:i.zsmooth,xhoverformat:o(`x`),yhoverformat:o(`y`),zhoverformat:o(`z`,1),hovertemplate:s({},{keys:[`z`]}),hovertemplatefallback:l(),texttemplate:c({arrayOk:!1,editType:`plot`},{keys:[`z`]}),texttemplatefallback:l({editType:`plot`}),textfont:i.textfont,showlegend:d({},a.showlegend,{dflt:!1})},u(``,{cLetter:`z`,autoColorDflt:!1}))}),Yo=l((e,t)=>{var n=Ie(),r=$();t.exports=function(e,t,i,a){var o=i(`x`),s=i(`y`),c=r.minRowLength(o),l=r.minRowLength(s);if(!c||!l){t.visible=!1;return}t._length=Math.min(c,l),n.getComponentMethod(`calendars`,`handleTraceDefaults`)(e,t,[`x`,`y`],a),(i(`z`)||i(`marker.color`))&&i(`histfunc`),i(`histnorm`),i(`autobinx`),i(`autobiny`)}}),Xo=l((e,t)=>{var n=$(),r=Yo(),i=_o(),a=Ft(),o=go(),s=Jo();t.exports=function(e,t,c,l){function u(r,i){return n.coerce(e,t,s,r,i)}r(e,t,u,l),t.visible!==!1&&(i(e,t,u,l),a(e,t,l,u,{prefix:``,cLetter:`z`}),u(`hovertemplate`),u(`hovertemplatefallback`),o(u,l),u(`xhoverformat`),u(`yhoverformat`))}}),Zo=l((e,t)=>{var n=Io(),r=Xt().hoverLabelText;t.exports=function(e,t,i,a,o){var s=n(e,t,i,a,o);if(s){e=s[0];var c=e.index,l=c[0],u=c[1],d=e.cd[0],f=d.trace,p=d.xRanges[u],m=d.yRanges[l];return e.xLabel=r(e.xa,[p[0],p[1]],f.xhoverformat),e.yLabel=r(e.ya,[m[0],m[1]],f.yhoverformat),s}}}),Qo=l((e,t)=>{t.exports={attributes:Jo(),supplyDefaults:Xo(),crossTraceDefaults:Uo(),calc:Ao(),plot:No(),layerName:`heatmaplayer`,colorbar:Po(),style:Fo(),hoverPoints:Zo(),eventData:Go(),moduleType:`trace`,name:`histogram2d`,basePlotModule:xi(),categories:[`cartesian`,`svg`,`2dMap`,`histogram`,`showLegend`],meta:{}}}),$o=l((e,t)=>{t.exports=Qo()}),es=l((e,t)=>{t.exports={COMPARISON_OPS:[`=`,`!=`,`<`,`>=`,`>`,`<=`],COMPARISON_OPS2:[`=`,`<`,`>=`,`>`,`<=`],INTERVAL_OPS:[`[]`,`()`,`[)`,`(]`,`][`,`)(`,`](`,`)[`],SET_OPS:[`{}`,`}{`],CONSTRAINT_REDUCTION:{"=":`=`,"<":`<`,"<=":`<`,">":`>`,">=":`>`,"[]":`[]`,"()":`[]`,"[)":`[]`,"(]":`[]`,"][":`][`,")(":`][`,"](":`][`,")[":`][`}}}),ts=l((e,t)=>{var n=mo(),r=gr(),i=xt(),a=i.axisHoverFormat,o=i.descriptionOnlyNumbers,s=wt(),c=De().dash,l=A(),u=k().extendFlat,d=es(),f=d.COMPARISON_OPS2,p=d.INTERVAL_OPS,m=r.line;t.exports=u({z:n.z,x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,text:n.text,hovertext:n.hovertext,transpose:n.transpose,xtype:n.xtype,ytype:n.ytype,xhoverformat:a(`x`),yhoverformat:a(`y`),zhoverformat:a(`z`,1),hovertemplate:n.hovertemplate,hovertemplatefallback:n.hovertemplatefallback,texttemplate:u({},n.texttemplate,{}),texttemplatefallback:n.texttemplatefallback,textfont:u({},n.textfont,{}),hoverongaps:n.hoverongaps,connectgaps:u({},n.connectgaps,{}),fillcolor:{valType:`color`,editType:`calc`},autocontour:{valType:`boolean`,dflt:!0,editType:`calc`,impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:`integer`,dflt:15,min:1,editType:`calc`},contours:{type:{valType:`enumerated`,values:[`levels`,`constraint`],dflt:`levels`,editType:`calc`},start:{valType:`number`,dflt:null,editType:`plot`,impliedEdits:{"^autocontour":!1}},end:{valType:`number`,dflt:null,editType:`plot`,impliedEdits:{"^autocontour":!1}},size:{valType:`number`,dflt:null,min:0,editType:`plot`,impliedEdits:{"^autocontour":!1}},coloring:{valType:`enumerated`,values:[`fill`,`heatmap`,`lines`,`none`],dflt:`fill`,editType:`calc`},showlines:{valType:`boolean`,dflt:!0,editType:`plot`},showlabels:{valType:`boolean`,dflt:!1,editType:`plot`},labelfont:l({editType:`plot`,colorEditType:`style`}),labelformat:{valType:`string`,dflt:``,editType:`plot`,description:o(`contour label`)},operation:{valType:`enumerated`,values:[].concat(f,p),dflt:`=`,editType:`calc`},value:{valType:`any`,dflt:0,editType:`calc`},editType:`calc`,impliedEdits:{autocontour:!1}},line:{color:u({},m.color,{editType:`style+colorbars`}),width:{valType:`number`,min:0,editType:`style+colorbars`},dash:c,smoothing:u({},m.smoothing,{}),editType:`plot`},zorder:r.zorder},s(``,{cLetter:`z`,autoColorDflt:!1,editTypeOverride:`calc`}))}),ns=l((e,t)=>{var n=Jo(),r=ts(),i=wt(),a=xt().axisHoverFormat,o=k().extendFlat;t.exports=o({x:n.x,y:n.y,z:n.z,marker:n.marker,histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:n.xbins,nbinsy:n.nbinsy,ybins:n.ybins,autobinx:n.autobinx,autobiny:n.autobiny,bingroup:n.bingroup,xbingroup:n.xbingroup,ybingroup:n.ybingroup,autocontour:r.autocontour,ncontours:r.ncontours,contours:r.contours,line:{color:r.line.color,width:o({},r.line.width,{dflt:.5}),dash:r.line.dash,smoothing:r.line.smoothing,editType:`plot`},xhoverformat:a(`x`),yhoverformat:a(`y`),zhoverformat:a(`z`,1),hovertemplate:n.hovertemplate,hovertemplatefallback:n.hovertemplatefallback,texttemplate:r.texttemplate,texttemplatefallback:r.texttemplatefallback,textfont:r.textfont},i(``,{cLetter:`z`,editTypeOverride:`calc`}))}),rs=l((e,t)=>{t.exports=function(e,t,n,r){var i=r(`contours.start`),a=r(`contours.end`),o=i===!1||a===!1,s=n(`contours.size`);((o?t.autocontour=!0:n(`autocontour`,!1))||!s)&&n(`ncontours`)}}),is=l((e,t)=>{var n=$();t.exports=function(e,t,r,i){if(i||={},e(`contours.showlabels`)){var a=t.font;n.coerceFont(e,`contours.labelfont`,a,{overrideDflt:{color:r}}),e(`contours.labelformat`)}i.hasHover!==!1&&e(`zhoverformat`)}}),as=l((e,t)=>{var n=Ft(),r=is();t.exports=function(e,t,i,a,o){var s=i(`contours.coloring`),c,l=``;s===`fill`&&(c=i(`contours.showlines`)),c!==!1&&(s!==`lines`&&(l=i(`line.color`,`#000`)),i(`line.width`,.5),i(`line.dash`)),s!==`none`&&(e.showlegend!==!0&&(t.showlegend=!1),t._dfltShowLegend=!1,n(e,t,a,i,{prefix:``,cLetter:`z`})),i(`line.smoothing`),r(i,a,l,o)}}),os=l((e,t)=>{var n=$(),r=Yo(),i=rs(),a=as(),o=go(),s=ns();t.exports=function(e,t,c,l){function u(r,i){return n.coerce(e,t,s,r,i)}function d(r){return n.coerce2(e,t,s,r)}r(e,t,u,l),t.visible!==!1&&(i(e,t,u,d),a(e,t,u,l),u(`xhoverformat`),u(`yhoverformat`),u(`hovertemplate`),u(`hovertemplatefallback`),t.contours&&t.contours.coloring===`heatmap`&&o(u,l))}}),ss=l((e,t)=>{var n=Xt(),r=$();t.exports=function(e,t){var a=e.contours;if(e.autocontour){var o=e.zmin,s=e.zmax;(e.zauto||o===void 0)&&(o=r.aggNums(Math.min,null,t)),(e.zauto||s===void 0)&&(s=r.aggNums(Math.max,null,t));var c=i(o,s,e.ncontours);a.size=c.dtick,a.start=n.tickFirst(c),c.range.reverse(),a.end=n.tickFirst(c),a.start===o&&(a.start+=a.size),a.end===s&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),e._input.contours||(e._input.contours={}),r.extendFlat(e._input.contours,{start:a.start,end:a.end,size:a.size}),e._input.autocontour=!0}else if(a.type!==`constraint`){var l=a.start,u=a.end,d=e._input.contours;l>u&&(a.start=d.start=u,u=a.end=d.end=l,l=a.start),!(a.size>0)&&(d.size=a.size=l===u?1:i(l,u,e.ncontours).dtick)}};function i(e,t,r){var i={type:`linear`,range:[e,t]};return n.autoTicks(i,(t-e)/(r||15)),i}}),cs=l((e,t)=>{t.exports=function(e){return e.end+e.size/1e6}}),ls=l((e,t)=>{var n=zt(),r=Ao(),i=ss(),a=cs();t.exports=function(e,t){var o=r(e,t),s=o[0].z;i(t,s);var c=t.contours,l=n.extractOpts(t),u;if(c.coloring===`heatmap`&&l.auto&&t.autocontour===!1){var d=c.start,f=a(c),p=c.size||1,m=Math.floor((f-d)/p)+1;isFinite(p)||(p=1,m=1);var h=d-p/2;u=[h,h+m*p]}else u=s;return n.calc(e,t,{vals:u,cLetter:`z`}),o}}),us=l((e,t)=>{t.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}),ds=l((e,t)=>{var n=us();t.exports=function(e){for(var t=e[0].z,i=t.length,a=t[0].length,o=i===2||a===2,s,c=0,l,u,d,f,p,m,h;ce?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return n===5||n===10?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?n===5?713:1114:n===5?104:208:n===15?0:n}}),fs=l((e,t)=>{var n=$(),r=us();t.exports=function(e,t,r){var i,a,s,c,l;for(t||=.01,r||=.01,s=0;s20?(f=r.CHOOSESADDLE[f][(p[0]||p[1])<0?0:1],e.crossings[d]=r.SADDLEREMAINDER[f]):delete e.crossings[d],p=r.NEWDELTA[f],!p){n.log(`Found bad marching index:`,f,t,e.level);break}m.push(c(e,t,p)),t[0]+=p[0],t[1]+=p[1],d=t.join(`,`),i(m[m.length-1],m[m.length-2],l,u)&&m.pop();var b=p[0]&&(t[0]<0||t[0]>g-2)||p[1]&&(t[1]<0||t[1]>h-2);if(t[0]===_[0]&&t[1]===_[1]&&p[0]===v[0]&&p[1]===v[1]||o&&b)break;f=e.crossings[d]}y===1e4&&n.log(`Infinite loop in contour?`);var x=i(m[0],m[m.length-1],l,u),S=0,C=.2*e.smoothing,w=[],T=0,E,D,O,k,A,j,M,N,P,F,I;for(y=1;y=T;y--)if(E=w[y],E=T&&E+w[D]N&&P--,e.edgepaths[P]=I.concat(m,F));break}B||(e.edgepaths[N]=m.concat(F))}for(N=0;N20&&t?e===208||e===1114?i=n[0]===0?1:-1:a=n[1]===0?1:-1:r.BOTTOMSTART.indexOf(e)===-1?r.LEFTSTART.indexOf(e)===-1?r.TOPSTART.indexOf(e)===-1?i=-1:a=-1:i=1:a=1,[i,a]}function c(e,t,n){var r=t[0]+Math.max(n[0],0),i=t[1]+Math.max(n[1],0),a=e.z[i][r],o=e.xaxis,s=e.yaxis;if(n[1]){var c=(e.level-a)/(e.z[i][r+1]-a),l=(c===1?0:(1-c)*o.c2l(e.x[r]))+(c===0?0:c*o.c2l(e.x[r+1]));return[o.c2p(o.l2c(l),!0),s.c2p(e.y[i],!0),r+c,i]}var u=(e.level-a)/(e.z[i+1][r]-a),d=(u===1?0:(1-u)*s.c2l(e.y[i]))+(u===0?0:u*s.c2l(e.y[i+1]));return[o.c2p(e.x[r],!0),s.c2p(s.l2c(d),!0),r,i+u]}}),ps=l((e,t)=>{var n=es(),r=_();t.exports={"[]":a(`[]`),"][":a(`][`),">":o(`>`),"<":o(`<`),"=":o(`=`)};function i(e,t){var i=Array.isArray(t),a;function o(e){return r(e)?+e:null}return n.COMPARISON_OPS2.indexOf(e)===-1?n.INTERVAL_OPS.indexOf(e)===-1?n.SET_OPS.indexOf(e)!==-1&&(a=i?t.map(o):[o(t)]):a=i?[o(t[0]),o(t[1])]:[o(t),o(t)]:a=o(i?t[0]:t),a}function a(e){return function(t){t=i(e,t);var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:n,end:r,size:r-n}}}function o(e){return function(t){return t=i(e,t),{start:t,end:1/0,size:1/0}}}}),ms=l((e,t)=>{var n=$(),r=ps(),i=cs();t.exports=function(e,t,a){for(var o=e.type===`constraint`?r[e._operation](e.value):e,s=o.size,c=[],l=i(o),u=a.trace._carpetTrace,d=u?{xaxis:u.aaxis,yaxis:u.baxis,x:a.a,y:a.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:a.x,y:a.y},f=o.start;f1e3){n.warn(`Too many contours, clipping at 1000`,e);break}return c}}),hs=l((e,t)=>{var n=$();t.exports=function(e,t){var i,a,o,s=function(e){return e.reverse()},c=function(e){return e};switch(t){case`=`:case`<`:return e;case`>`:for(e.length!==1&&n.warn(`Contour data invalid for the specified inequality operation.`),a=e[0],i=0;i{t.exports=function(e,t){var n=e[0],r=n.z,i;switch(t.type){case`levels`:var a=Math.min(r[0][0],r[0][1]);for(i=0;io.level||o.starts.length&&a===o.level)}break;case`constraint`:if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,c=n.y.length,l=-1/0,u=1/0;for(i=0;i`:d>l&&(n.prefixBoundary=!0);break;case`<`:(dl||n.starts.length&&p===u)&&(n.prefixBoundary=!0);break;case`][`:f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1]),fl&&(n.prefixBoundary=!0)}}}}),_s=l(e=>{var t=f(),n=$(),r=Gt(),i=zt(),a=yt(),o=Xt(),s=qt(),c=No(),l=ds(),u=fs(),d=ms(),p=hs(),m=gs(),h=us(),g=h.LABELOPTIMIZER;e.plot=function(e,r,i,a){var o=r.xaxis,s=r.yaxis;n.makeTraceGroups(a,i,`contour`).each(function(i){var a=t.select(this),f=i[0],m=f.trace,h=f.x,g=f.y,y=m.contours,x=d(y,r,f),C=n.ensureSingle(a,`g`,`heatmapcoloring`),w=[];y.coloring===`heatmap`&&(w=[i]),c(e,r,w,C),l(x),u(x);var T=o.c2p(h[0],!0),E=o.c2p(h[h.length-1],!0),D=s.c2p(g[0],!0),O=s.c2p(g[g.length-1],!0),k=[[T,O],[E,O],[E,D],[T,D]],A=x;y.type===`constraint`&&(A=p(x,y._operation)),_(a,k,y),v(a,A,k,y),b(a,x,e,f,y),S(a,r,e,f,k)})};function _(e,t,r){var i=n.ensureSingle(e,`g`,`contourbg`).selectAll(`path`).data(r.coloring===`fill`?[0]:[]);i.enter().append(`path`),i.exit().remove(),i.attr(`d`,`M`+t.join(`L`)+`Z`).style(`stroke`,`none`)}function v(e,r,i,a){var o=a.coloring===`fill`||a.type===`constraint`&&a._operation!==`=`,s=`M`+i.join(`L`)+`Z`;o&&m(r,a);var c=n.ensureSingle(e,`g`,`contourfill`).selectAll(`path`).data(o?r:[]);c.enter().append(`path`),c.exit().remove(),c.each(function(e){var n=(e.prefixBoundary?s:``)+y(e,i);n?t.select(this).attr(`d`,n).style(`stroke`,`none`):t.select(this).remove()})}function y(e,t){var i=``,a=0,o=e.edgepaths.map(function(e,t){return t}),s=!0,c,l,u,d,f,p;function m(e){return Math.abs(e[1]-t[0][1])<.01}function h(e){return Math.abs(e[1]-t[2][1])<.01}function g(e){return Math.abs(e[0]-t[0][0])<.01}function _(e){return Math.abs(e[0]-t[2][0])<.01}for(;o.length;){for(p=r.smoothopen(e.edgepaths[a],e.smoothing),i+=s?p:p.replace(/^M/,`L`),o.splice(o.indexOf(a),1),c=e.edgepaths[a][e.edgepaths[a].length-1],d=-1,u=0;u<4;u++){if(!c){n.log(`Missing end?`,a,e);break}for(m(c)&&!_(c)?l=t[1]:g(c)?l=t[0]:h(c)?l=t[3]:_(c)&&(l=t[2]),f=0;f=0&&(l=v,d=f):Math.abs(c[1]-l[1])<.01?Math.abs(c[1]-v[1])<.01&&(v[0]-c[0])*(l[0]-v[0])>=0&&(l=v,d=f):n.log(`endpt to newendpt is not vert. or horz.`,c,l,v)}if(c=l,d>=0)break;i+=`L`+l}if(d===e.edgepaths.length){n.log(`unclosed perimeter path`);break}a=d,s=o.indexOf(a)===-1,s&&(a=o[0],i+=`Z`)}for(a=0;ag.MAXCOST*2)break;p&&(c/=2),s=u-c/2,l=s+c*1.5}if(f<=g.MAXCOST)return d};function x(e,t,r,i){var a=t.width/2,o=t.height/2,s=e.x,c=e.y,l=e.theta,u=Math.cos(l)*a,d=Math.sin(l)*a,f=(s>i.center?i.right-s:s-i.left)/(u+Math.abs(Math.sin(l)*o)),p=(c>i.middle?i.bottom-c:c-i.top)/(Math.abs(d)+Math.cos(l)*o);if(f<1||p<1)return 1/0;var m=g.EDGECOST*(1/(f-1)+1/(p-1));m+=g.ANGLECOST*l*l;for(var h=s-u,_=c-d,v=s+u,y=c+d,b=0;b{var n=f(),r=zt(),i=cs();t.exports=function(e){var t=e.contours,a=t.start,o=i(t),s=t.size||1,c=Math.floor((o-a)/s)+1,l=t.coloring===`lines`?0:1,u=r.extractOpts(e);isFinite(s)||(s=1,c=1);var d=u.reversescale?r.flipScale(u.colorscale):u.colorscale,f=d.length,p=Array(f),m=Array(f),h,g,_=u.min,v=u.max;if(t.coloring===`heatmap`){for(g=0;g=v)&&(a<=_&&(a=_),o>=v&&(o=v),c=Math.floor((o-a)/s)+1,l=0),g=0;g_&&(p.unshift(_),m.unshift(m[0])),p[p.length-1]{var n=f(),r=Gt(),i=Fo(),a=vs();t.exports=function(e){var t=n.select(e).selectAll(`g.contour`);t.style(`opacity`,function(e){return e[0].trace.opacity}),t.each(function(e){var t=n.select(this),i=e[0].trace,o=i.contours,s=i.line,c=o.size||1,l=o.start,u=o.type===`constraint`,d=!u&&o.coloring===`lines`,f=!u&&o.coloring===`fill`,p=d||f?a(i):null;t.selectAll(`g.contourlevel`).each(function(e){n.select(this).selectAll(`path`).call(r.lineGroupStyle,s.width,d?p(e.level):s.color,s.dash)});var m=o.labelfont;if(t.selectAll(`g.contourlabels text`).each(function(e){r.font(n.select(this),{weight:m.weight,style:m.style,variant:m.variant,textcase:m.textcase,lineposition:m.lineposition,shadow:m.shadow,family:m.family,size:m.size,color:m.color||(d?p(e.level):s.color)})}),u)t.selectAll(`g.contourfill path`).style(`fill`,i.fillcolor);else if(f){var h;t.selectAll(`g.contourfill path`).style(`fill`,function(e){return h===void 0&&(h=e.level),p(e.level+.5*c)}),h===void 0&&(h=l),t.selectAll(`g.contourbg path`).style(`fill`,p(h-.5*c))}}),i(e)}}),bs=l((e,t)=>{var n=zt(),r=vs(),i=cs();function a(e,t,a){var o=t.contours,s=t.line,c=o.size||1,l=o.coloring,u=r(t,{isColorbar:!0});if(l===`heatmap`){var d=n.extractOpts(t);a._fillgradient=d.reversescale?n.flipScale(d.colorscale):d.colorscale,a._zrange=[d.min,d.max]}else l===`fill`&&(a._fillcolor=u);a._line={color:l===`lines`?u:s.color,width:o.showlines===!1?0:s.width,dash:s.dash},a._levels={start:o.start,end:i(o),size:c}}t.exports={min:`zmin`,max:`zmax`,calc:a}}),xs=l((e,t)=>{var n=L(),r=Io();t.exports=function(e,t,i,a,o){o||={},o.isContour=!0;var s=r(e,t,i,a,o);return s&&s.forEach(function(e){var t=e.trace;t.contours.type===`constraint`&&(t.fillcolor&&n.opacity(t.fillcolor)?e.color=n.addOpacity(t.fillcolor,1):t.contours.showlines&&n.opacity(t.line.color)&&(e.color=n.addOpacity(t.line.color,1)))}),s}}),Ss=l((e,t)=>{t.exports={attributes:ns(),supplyDefaults:os(),crossTraceDefaults:Uo(),calc:ls(),plot:_s().plot,layerName:`contourlayer`,style:ys(),colorbar:bs(),hoverPoints:xs(),moduleType:`trace`,name:`histogram2dcontour`,basePlotModule:xi(),categories:[`cartesian`,`svg`,`2dMap`,`contour`,`histogram`,`showLegend`],meta:{}}}),Cs=l((e,t)=>{t.exports=Ss()}),ws=l((e,t)=>{var n=_(),r=is(),i=L(),a=i.addOpacity,o=i.opacity,s=es(),c=$().isArrayOrTypedArray,l=s.CONSTRAINT_REDUCTION,u=s.COMPARISON_OPS2;t.exports=function(e,t,n,i,s,c){var u=t.contours,f,p,m,h=n(`contours.operation`);u._operation=l[h],d(n,u),h===`=`?f=u.showlines=!0:(f=n(`contours.showlines`),m=n(`fillcolor`,a((e.line||{}).color||s,.5))),f&&(p=n(`line.color`,m&&o(m)?a(t.fillcolor,1):s),n(`line.width`,2),n(`line.dash`)),n(`line.smoothing`),r(n,i,p,c)};function d(e,t){var r;u.indexOf(t.operation)===-1?(e(`contours.value`,[0,1]),c(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:n(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e(`contours.value`,0),n(t.value)||(t.value=c(t.value)?parseFloat(t.value[0]):0))}}),Ts=l((e,t)=>{var n=$(),r=ho(),i=Rr(),a=ws(),o=rs(),s=as(),c=go(),l=ts();t.exports=function(e,t,u,d){function f(r,i){return n.coerce(e,t,l,r,i)}function p(r){return n.coerce2(e,t,l,r)}if(!r(e,t,f,d)){t.visible=!1;return}i(e,t,d,f),f(`xhoverformat`),f(`yhoverformat`),f(`text`),f(`hovertext`),f(`hoverongaps`),f(`hovertemplate`),f(`hovertemplatefallback`);var m=f(`contours.type`)===`constraint`;f(`connectgaps`,n.isArray1D(t.z)),m?a(e,t,f,d,u):(o(e,t,f,p),s(e,t,f,d)),t.contours&&t.contours.coloring===`heatmap`&&c(f,d),f(`zorder`)}}),Es=l((e,t)=>{t.exports={attributes:ts(),supplyDefaults:Ts(),calc:ls(),plot:_s().plot,style:ys(),colorbar:bs(),hoverPoints:xs(),moduleType:`trace`,name:`contour`,basePlotModule:xi(),categories:[`cartesian`,`svg`,`2dMap`,`contour`,`showLegend`],meta:{}}}),Ds=l((e,t)=>{t.exports=Es()}),Os=l((e,t)=>{var{hovertemplateAttrs:n,texttemplateAttrs:r,templatefallbackAttrs:i}=ke(),a=hr(),o=gr(),s=P(),c=wt(),l=De().dash,u=k().extendFlat,d=o.marker,f=o.line,p=d.line;t.exports={a:{valType:`data_array`,editType:`calc`},b:{valType:`data_array`,editType:`calc`},c:{valType:`data_array`,editType:`calc`},sum:{valType:`number`,dflt:0,min:0,editType:`calc`},mode:u({},o.mode,{dflt:`markers`}),text:u({},o.text,{}),texttemplate:r({editType:`plot`},{keys:[`a`,`b`,`c`,`text`]}),texttemplatefallback:i({editType:`plot`}),hovertext:u({},o.hovertext,{}),line:{color:f.color,width:f.width,dash:l,backoff:f.backoff,shape:u({},f.shape,{values:[`linear`,`spline`]}),smoothing:f.smoothing,editType:`calc`},connectgaps:o.connectgaps,cliponaxis:o.cliponaxis,fill:u({},o.fill,{values:[`none`,`toself`,`tonext`],dflt:`none`}),fillcolor:a(),marker:u({symbol:d.symbol,opacity:d.opacity,angle:d.angle,angleref:d.angleref,standoff:d.standoff,maxdisplayed:d.maxdisplayed,size:d.size,sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,line:u({width:p.width,dash:p.dash,editType:`calc`},c(`marker.line`)),gradient:d.gradient,editType:`calc`},c(`marker`)),textfont:o.textfont,textposition:o.textposition,selected:o.selected,unselected:o.unselected,hoverinfo:u({},s.hoverinfo,{flags:[`a`,`b`,`c`,`text`,`name`]}),hoveron:o.hoveron,hovertemplate:n(),hovertemplatefallback:i()}}),ks=l((e,t)=>{var n=$(),r=mr(),i=Bt(),a=Br(),o=Vr(),s=Hr(),c=Ur(),l=Wr(),u=Os();t.exports=function(e,t,d,f){function p(r,i){return n.coerce(e,t,u,r,i)}var m=p(`a`),h=p(`b`),g=p(`c`),_;if(m?(_=m.length,h?(_=Math.min(_,h.length),g&&(_=Math.min(_,g.length))):_=g?Math.min(_,g.length):0):h&&g&&(_=Math.min(h.length,g.length)),!_){t.visible=!1;return}t._length=_,p(`sum`),p(`text`),p(`hovertext`),t.hoveron!==`fills`&&(p(`hovertemplate`),p(`hovertemplatefallback`)),p(`mode`,_{var n=Xt();t.exports=function(e,t,r){var i={},a=r[t.subplot]._subplot;return i.aLabel=n.tickText(a.aaxis,e.a,!0).text,i.bLabel=n.tickText(a.baxis,e.b,!0).text,i.cLabel=n.tickText(a.caxis,e.c,!0).text,i}}),js=l((e,t)=>{var n=_(),r=Xr(),i=Zr(),a=Qr(),o=$r().calcMarkerSize,s=[`a`,`b`,`c`],c={a:[`b`,`c`],b:[`a`,`c`],c:[`a`,`b`]};t.exports=function(e,t){for(var l=e._fullLayout[t.subplot].sum,u=t.sum||l,d={a:t.a,b:t.b,c:t.c},f=t.ids,p=0,m,h,g,_,v;p{var n=oi();t.exports=function(e,t,r){var i=t.plotContainer;i.select(`.scatterlayer`).selectAll(`*`).remove();for(var a=t.xaxis,o=t.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},c=t.layers.frontplot.select(`g.scatterlayer`),l=0;l{var n=di();t.exports=function(e,t,r,i){var a=n(e,t,r,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/e.ya._length,c=e.xa._length,l=c*s/2,u=c-l;return o.x0=Math.max(Math.min(o.x0,u),l),o.x1=Math.max(Math.min(o.x1,u),l),a}var d=o.cd[o.index],f=o.trace,p=o.subplot;o.a=d.a,o.b=d.b,o.c=d.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var m={};m[f.subplot]={_subplot:p};var h=f._module.formatLabels(d,f,m);o.aLabel=h.aLabel,o.bLabel=h.bLabel,o.cLabel=h.cLabel;var g=d.hi||f.hoverinfo,_=[];function v(e,t){_.push(e._hovertitle+`: `+t)}if(!f.hovertemplate){var y=g.split(`+`);y.indexOf(`all`)!==-1&&(y=[`a`,`b`,`c`]),y.indexOf(`a`)!==-1&&v(p.aaxis,o.aLabel),y.indexOf(`b`)!==-1&&v(p.baxis,o.bLabel),y.indexOf(`c`)!==-1&&v(p.caxis,o.cLabel)}return o.extraText=_.join(`
`),o.hovertemplate=f.hovertemplate,a}}),Ps=l((e,t)=>{t.exports=function(e,t,n,r,i){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),r[i]){var a=r[i];e.a=a.a,e.b=a.b,e.c=a.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}}),Fs=l((e,t)=>{var n=f(),r=O(),i=Ie(),a=$(),o=a.strTranslate,s=a._,c=L(),l=Gt(),u=qt(),d=k().extendFlat,p=gt(),m=Xt(),h=an(),g=Dn(),_=On(),v=_.freeMode,y=_.rectMode,b=Kt(),x=xr().prepSelect,S=xr().selectOnClick,C=xr().clearOutline,w=xr().clearSelectionsCache,T=ut();function E(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=E;var D=E.prototype;D.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},D.plot=function(e,t){var n=this,r=t[n.id],i=t._size;n._hasClipOnAxisFalse=!1;for(var a=0;aA*m?(S=m,x=S*A):(x=p,S=x/A),C=s*x/p,w=f*S/m,y=t.l+t.w*i-x/2,b=t.t+t.h*(1-a)-S/2,n.x0=y,n.y0=b,n.w=x,n.h=S,n.sum=h,n.xaxis={type:`linear`,range:[g+2*v-h,h-g-2*_],domain:[i-C/2,i+C/2],_id:`x`},u(n.xaxis,n.graphDiv._fullLayout),n.xaxis.setScale(),n.xaxis.isPtWithinRange=function(e){return e.a>=n.aaxis.range[0]&&e.a<=n.aaxis.range[1]&&e.b>=n.baxis.range[1]&&e.b<=n.baxis.range[0]&&e.c>=n.caxis.range[1]&&e.c<=n.caxis.range[0]},n.yaxis={type:`linear`,range:[g,h-_-v],domain:[a-w/2,a+w/2],_id:`y`},u(n.yaxis,n.graphDiv._fullLayout),n.yaxis.setScale(),n.yaxis.isPtWithinRange=function(){return!0};var T=n.yaxis.domain[0],E=n.aaxis=d({},e.aaxis,{range:[g,h-_-v],side:`left`,tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+w*A],anchor:`free`,position:0,_id:`y`,_length:x});u(E,n.graphDiv._fullLayout),E.setScale();var D=n.baxis=d({},e.baxis,{range:[h-g-v,_],side:`bottom`,domain:n.xaxis.domain,anchor:`free`,position:0,_id:`x`,_length:x});u(D,n.graphDiv._fullLayout),D.setScale();var O=n.caxis=d({},e.caxis,{range:[h-g-_,v],side:`right`,tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+w*A],anchor:`free`,position:0,_id:`y`,_length:x});u(O,n.graphDiv._fullLayout),O.setScale();var k=`M`+y+`,`+(b+S)+`h`+x+`l-`+x/2+`,-`+S+`Z`;n.clipDef.select(`path`).attr(`d`,k),n.layers.plotbg.select(`path`).attr(`d`,k);var j=`M0,`+S+`h`+x+`l-`+x/2+`,-`+S+`Z`;n.clipDefRelative.select(`path`).attr(`d`,j);var M=o(y,b);n.plotContainer.selectAll(`.scatterlayer,.maplayer`).attr(`transform`,M),n.clipDefRelative.select(`path`).attr(`transform`,null);var N=o(y-D._offset,b+S);n.layers.baxis.attr(`transform`,N),n.layers.bgrid.attr(`transform`,N);var P=o(y+x/2,b)+`rotate(30)`+o(0,-E._offset);n.layers.aaxis.attr(`transform`,P),n.layers.agrid.attr(`transform`,P);var F=o(y+x/2,b)+`rotate(-30)`+o(0,-O._offset);n.layers.caxis.attr(`transform`,F),n.layers.cgrid.attr(`transform`,F),n.drawAxes(!0),n.layers.aline.select(`path`).attr(`d`,E.showline?`M`+y+`,`+(b+S)+`l`+x/2+`,-`+S:`M0,0`).call(c.stroke,E.linecolor||`#000`).style(`stroke-width`,(E.linewidth||0)+`px`),n.layers.bline.select(`path`).attr(`d`,D.showline?`M`+y+`,`+(b+S)+`h`+x:`M0,0`).call(c.stroke,D.linecolor||`#000`).style(`stroke-width`,(D.linewidth||0)+`px`),n.layers.cline.select(`path`).attr(`d`,O.showline?`M`+(y+x/2)+`,`+b+`l`+x/2+`,`+S:`M0,0`).call(c.stroke,O.linecolor||`#000`).style(`stroke-width`,(O.linewidth||0)+`px`),n.graphDiv._context.staticPlot||n.initInteractions(),l.setClipUrl(n.layers.frontplot,n._hasClipOnAxisFalse?null:n.clipId,n.graphDiv)},D.drawAxes=function(e){var t=this,n=t.graphDiv,r=t.id.slice(7)+`title`,i=t.layers,a=t.aaxis,o=t.baxis,c=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(c),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(c.showticklabels?c.tickfont.size*.75:0)+(c.ticks===`outside`?c.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks===`outside`?o.ticklen:0)+3;i[`a-title`]=b.draw(n,`a`+r,{propContainer:a,propName:t.id+`.aaxis.title.text`,placeholder:s(n,`Click to enter Component A title`),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,"text-anchor":`middle`}}),i[`b-title`]=b.draw(n,`b`+r,{propContainer:o,propName:t.id+`.baxis.title.text`,placeholder:s(n,`Click to enter Component B title`),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":`middle`}}),i[`c-title`]=b.draw(n,`c`+r,{propContainer:c,propName:t.id+`.caxis.title.text`,placeholder:s(n,`Click to enter Component C title`),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+c.title.font.size*.83+u,"text-anchor":`middle`}})}},D.drawAx=function(e){var t=this,n=t.graphDiv,r=e._name,i=r.charAt(0),o=e._id,s=t.layers[r],c=30,l=i+`tickLayout`,u=j(e);t[l]!==u&&(s.selectAll(`.`+o+`tick`).remove(),t[l]=u),e.setScale();var d=m.calcTicks(e),f=m.clipEnds(e,d),p=m.makeTransTickFn(e),h=m.getTickSigns(e)[2],g=a.deg2rad(c),_=h*(e.linewidth||1)/2,v=h*e.ticklen,y=t.w,b=t.h,x=i===`b`?`M0,`+_+`l`+Math.sin(g)*v+`,`+Math.cos(g)*v:`M`+_+`,0l`+Math.cos(g)*v+`,`+-Math.sin(g)*v,S={a:`M0,0l`+b+`,-`+y/2,b:`M0,0l-`+y/2+`,-`+b,c:`M0,0l-`+b+`,`+y/2}[i];m.drawTicks(n,e,{vals:e.ticks===`inside`?f:d,layer:s,path:x,transFn:p,crisp:!1}),m.drawGrid(n,e,{vals:f,layer:t.layers[i+`grid`],path:S,transFn:p,crisp:!1}),m.drawLabels(n,e,{vals:d,layer:s,transFn:p,labelFns:m.makeLabelFns(e,0,c)})};function j(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var M=T.MINZOOM/2+.87,N=`m-0.87,.5h`+M+`v3h-`+(M+5.2)+`l`+(M/2+2.6)+`,-`+(M*.87+4.5)+`l2.6,1.5l-`+M/2+`,`+M*.87+`Z`,P=`m0.87,.5h-`+M+`v3h`+(M+5.2)+`l-`+(M/2+2.6)+`,-`+(M*.87+4.5)+`l-2.6,1.5l`+M/2+`,`+M*.87+`Z`,F=`m0,1l`+M/2+`,`+M*.87+`l2.6,-1.5l-`+(M/2+2.6)+`,-`+(M*.87+4.5)+`l-`+(M/2+2.6)+`,`+(M*.87+4.5)+`l2.6,1.5l`+M/2+`,-`+M*.87+`Z`,I=`m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z`,R=!0;D.clearOutline=function(){w(this.dragOptions),C(this.dragOptions.gd)},D.initInteractions=function(){var e=this,t=e.layers.plotbg.select(`path`).node(),n=e.graphDiv,u=n._fullLayout._zoomlayer,d,f;this.dragOptions={element:t,gd:n,plotinfo:{id:e.id,domain:n._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(t,r,i){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],d=n._fullLayout._invScaleX,f=n._fullLayout._invScaleY;var a=e.dragOptions.dragmode=n._fullLayout.dragmode;v(a)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,a===`zoom`?(e.dragOptions.moveFn=U,e.dragOptions.clickFn=M,e.dragOptions.doneFn=W,L(t,r,i)):a===`pan`?(e.dragOptions.moveFn=K,e.dragOptions.clickFn=M,e.dragOptions.doneFn=q,G(),e.clearOutline(n)):(y(a)||v(a))&&x(t,r,i,e.dragOptions,a)}};var p,m,_,b,C,w,E,D,O,k;function j(t){var n={};return n[e.id+`.aaxis.min`]=t.a,n[e.id+`.baxis.min`]=t.b,n[e.id+`.caxis.min`]=t.c,n}function M(t,r){var a=n._fullLayout.clickmode;z(n),t===2&&(n.emit(`plotly_doubleclick`,null),i.call(`_guiRelayout`,n,j({a:0,b:0,c:0}))),a.indexOf(`select`)>-1&&t===1&&S(r,n,[e.xaxis],[e.yaxis],e.id,e.dragOptions),a.indexOf(`event`)>-1&&g.click(n,r,e.id)}function L(i,s,l){var d=t.getBoundingClientRect();p=s-d.left,m=l-d.top,n._fullLayout._calcInverseTransform(n);var f=n._fullLayout._invTransform,h=a.apply3DTransform(f)(p,m);p=h[0],m=h[1],_={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},C=_,b=e.aaxis.range[1]-_.a,w=r(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),E=`M0,`+e.h+`L`+e.w/2+`, 0L`+e.w+`,`+e.h+`Z`,D=!1,O=u.append(`path`).attr(`class`,`zoombox`).attr(`transform`,o(e.x0,e.y0)).style({fill:w>.2?`rgba(0,0,0,0)`:`rgba(255,255,255,0)`,"stroke-width":0}).attr(`d`,E),k=u.append(`path`).attr(`class`,`zoombox-corners`).attr(`transform`,o(e.x0,e.y0)).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr(`d`,`M0,0Z`),e.clearOutline(n)}function B(t,n){return 1-n/e.h}function V(t,n){return 1-(t+(e.h-n)/Math.sqrt(3))/e.w}function H(t,n){return(t-(e.h-n)/Math.sqrt(3))/e.w}function U(t,r){var i=p+t*d,a=m+r*f,o=Math.max(0,Math.min(1,B(p,m),B(i,a))),s=Math.max(0,Math.min(1,V(p,m),V(i,a))),c=Math.max(0,Math.min(1,H(p,m),H(i,a))),l=(o/2+c)*e.w,u=(1-o/2-s)*e.w,h=(l+u)/2,g=u-l,v=(1-o)*e.h,y=v-g/A;g.2?`rgba(0,0,0,0.4)`:`rgba(255,255,255,0.3)`).duration(200),k.transition().style(`opacity`,1).duration(200),!0),n.emit(`plotly_relayouting`,j(C))}function W(){z(n),C!==_&&(i.call(`_guiRelayout`,n,j(C)),R&&n.data&&n._context.showTips&&(a.notifier(s(n,`Double-click to zoom back out`),`long`,n),R=!1))}function G(){_={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},C=_}function K(t,r){var i=t/e.xaxis._m,s=r/e.yaxis._m;C={a:_.a-s,b:_.b+(i+s)/2,c:_.c-(i-s)/2};var c=[C.a,C.b,C.c].sort(a.sorterAsc),u={a:c.indexOf(C.a),b:c.indexOf(C.b),c:c.indexOf(C.c)};c[0]<0&&(c[1]+c[0]/2<0?(c[2]+=c[0]+c[1],c[0]=c[1]=0):(c[2]+=c[0]/2,c[1]+=c[0]/2,c[0]=0),C={a:c[u.a],b:c[u.b],c:c[u.c]},r=(_.a-C.a)*e.yaxis._m,t=(_.c-C.c-_.b+C.b)*e.xaxis._m);var d=o(e.x0+t,e.y0+r);e.plotContainer.selectAll(`.scatterlayer,.maplayer`).attr(`transform`,d);var f=o(-t,-r);e.clipDefRelative.select(`path`).attr(`transform`,f),e.aaxis.range=[C.a,e.sum-C.b-C.c],e.baxis.range=[e.sum-C.a-C.c,C.b],e.caxis.range=[e.sum-C.a-C.b,C.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(`.scatterlayer`).selectAll(`.trace`).call(l.hideOutsideRangePoints,e),n.emit(`plotly_relayouting`,j(C))}function q(){i.call(`_guiRelayout`,n,j(C))}t.onmousemove=function(r){g.hover(n,r,e.id),n._fullLayout._lasthover=t,n._fullLayout._hoversubplot=e.id},t.onmouseout=function(e){n._dragging||h.unhover(n,e)},h.init(this.dragOptions)};function z(e){n.select(e).selectAll(`.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners`).remove()}}),Is=l((e,t)=>{var n=I(),r=va().attributes,i=St(),a=Ee().overrideAll,o=k().extendFlat,s={title:{text:i.title.text,font:i.title.font},color:i.color,tickmode:i.minor.tickmode,nticks:o({},i.nticks,{dflt:6,min:1}),tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash,layer:i.layer,min:{valType:`number`,dflt:0,min:0}},c=t.exports=a({domain:r({name:`ternary`}),bgcolor:{valType:`color`,dflt:n.background},sum:{valType:`number`,dflt:1,min:0},aaxis:s,baxis:s,caxis:s},`plot`,`from-root`);c.uirevision={valType:`any`,editType:`none`},c.aaxis.uirevision=c.baxis.uirevision=c.caxis.uirevision={valType:`any`,editType:`none`}}),Ls=l((e,t)=>{var n=$(),r=lt(),i=va().defaults;t.exports=function(e,t,a,o){var s=o.type,c=o.attributes,l=o.handleDefaults,u=o.partition||`x`,d=t._subplots[s],f=d.length,p=f&&d[0].replace(/\d+$/,``),m,h;function g(e,t){return n.coerce(m,h,c,e,t)}for(var _=0;_{var n=L(),r=lt(),i=$(),a=Ls(),o=Mt(),s=Nt(),c=kt(),l=Ot(),u=gi(),d=Is(),f=[`aaxis`,`baxis`,`caxis`];t.exports=function(e,t,n){a(e,t,n,{type:`ternary`,attributes:d,handleDefaults:p,font:t.font,paper_bgcolor:t.paper_bgcolor})};function p(e,t,i,a){var o=i(`bgcolor`),s=i(`sum`);a.bgColor=n.combine(o,a.paper_bgcolor);for(var c,l,u,d=0;d=s&&(p.min=0,h.min=0,g.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function m(e,t,n,r){var a=d[t._name];function f(n,r){return i.coerce(e,t,a,n,r)}f(`uirevision`,r.uirevision),t.type=`linear`;var p=f(`color`),m=p===a.color.dflt?n.font.color:p,h=t._name.charAt(0).toUpperCase(),g=`Component `+h,_=f(`title.text`,g);t._hovertitle=_===g?_:h,i.coerceFont(f,`title.font`,n.font,{overrideDflt:{size:i.bigFont(n.font.size),color:m}}),f(`min`),l(e,t,f,`linear`),s(e,t,f,`linear`),o(e,t,f,`linear`,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),c(e,t,f,{outerTicks:!0}),f(`showticklabels`)&&(i.coerceFont(f,`tickfont`,n.font,{overrideDflt:{color:m}}),f(`tickangle`),f(`tickformat`)),u(e,t,f,{dfltColor:p,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),f(`hoverformat`),f(`layer`)}}),zs=l(e=>{var t=Fs(),n=mt().getSubplotCalcData,r=$().counterRegex,i=`ternary`;e.name=i;var a=e.attr=`subplot`;e.idRoot=i,e.idRegex=e.attrRegex=r(i);var o=e.attributes={};o[a]={valType:`subplotid`,dflt:`ternary`,editType:`calc`},e.layoutAttributes=Is(),e.supplyLayoutDefaults=Rs(),e.plot=function(e){for(var r=e._fullLayout,a=e.calcdata,o=r._subplots[i],s=0;s{t.exports={attributes:Os(),supplyDefaults:ks(),colorbar:si(),formatLabels:As(),calc:js(),plot:Ms(),style:li().style,styleOnSelect:li().styleOnSelect,hoverPoints:Ns(),selectPoints:fi(),eventData:Ps(),moduleType:`trace`,name:`scatterternary`,basePlotModule:zs(),categories:[`ternary`,`symbols`,`showLegend`,`scatter-like`],meta:{}}}),Vs=l((e,t)=>{t.exports=Bs()}),Hs=l((e,t)=>{var n=eo(),r=k().extendFlat,i=xt().axisHoverFormat;t.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,xhoverformat:i(`x`),yhoverformat:i(`y`),name:r({},n.name,{}),orientation:r({},n.orientation,{}),bandwidth:{valType:`number`,min:0,editType:`calc`},scalegroup:{valType:`string`,dflt:``,editType:`calc`},scalemode:{valType:`enumerated`,values:[`width`,`count`],dflt:`width`,editType:`calc`},spanmode:{valType:`enumerated`,values:[`soft`,`hard`,`manual`],dflt:`soft`,editType:`calc`},span:{valType:`info_array`,items:[{valType:`any`,editType:`calc`},{valType:`any`,editType:`calc`}],editType:`calc`},line:{color:{valType:`color`,editType:`style`},width:{valType:`number`,min:0,dflt:2,editType:`style`},editType:`plot`},fillcolor:n.fillcolor,points:r({},n.boxpoints,{}),jitter:r({},n.jitter,{}),pointpos:r({},n.pointpos,{}),width:r({},n.width,{}),marker:n.marker,text:n.text,hovertext:n.hovertext,hovertemplate:n.hovertemplate,hovertemplatefallback:n.hovertemplatefallback,quartilemethod:n.quartilemethod,box:{visible:{valType:`boolean`,dflt:!1,editType:`plot`},width:{valType:`number`,min:0,max:1,dflt:.25,editType:`plot`},fillcolor:{valType:`color`,editType:`style`},line:{color:{valType:`color`,editType:`style`},width:{valType:`number`,min:0,editType:`style`},editType:`style`},editType:`plot`},meanline:{visible:{valType:`boolean`,dflt:!1,editType:`plot`},color:{valType:`color`,editType:`style`},width:{valType:`number`,min:0,editType:`style`},editType:`plot`},side:{valType:`enumerated`,values:[`both`,`positive`,`negative`],dflt:`both`,editType:`calc`},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:n.selected,unselected:n.unselected,hoveron:{valType:`flaglist`,flags:[`violins`,`points`,`kde`],dflt:`violins+points+kde`,extras:[`all`],editType:`style`},zorder:n.zorder}}),Us=l((e,t)=>{var n=to(),r=$().extendFlat;t.exports={violinmode:r({},n.boxmode,{}),violingap:r({},n.boxgap,{}),violingroupgap:r({},n.boxgroupgap,{})}}),Ws=l((e,t)=>{var n=$(),r=L(),i=no(),a=Hs();t.exports=function(e,t,o,s){function c(r,i){return n.coerce(e,t,a,r,i)}function l(r,i){return n.coerce2(e,t,a,r,i)}if(i.handleSampleDefaults(e,t,c,s),t.visible!==!1){c(`bandwidth`),c(`side`),c(`width`)||(c(`scalegroup`,t.name),c(`scalemode`));var u=c(`span`),d;Array.isArray(u)&&(d=`manual`),c(`spanmode`,d);var f=c(`line.color`,(e.marker||{}).color||o),p=c(`line.width`),m=c(`fillcolor`,r.addOpacity(t.line.color,.5));i.handlePointsDefaults(e,t,c,{prefix:``});var h=l(`box.width`),g=l(`box.fillcolor`,m),_=l(`box.line.color`,f),v=l(`box.line.width`,p);c(`box.visible`,!!(h||g||_||v))||(t.box={visible:!1});var y=l(`meanline.color`,f),b=l(`meanline.width`,p);c(`meanline.visible`,!!(y||b))||(t.meanline={visible:!1}),c(`quartilemethod`),c(`zorder`)}}}),Gs=l((e,t)=>{var n=$(),r=Us(),i=ro();t.exports=function(e,t,a){function o(i,a){return n.coerce(e,t,r,i,a)}i._supply(e,t,a,o,`violin`)}}),Ks=l(e=>{var t=$(),n={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};e.makeKDE=function(e,t,r){var i=r.length,a=n.gaussian,o=e.bandwidth,s=1/(i*o);return function(e){for(var t=0,n=0;n{var n=$(),r=Xt(),i=io(),a=Ks(),o=v().BADNUM;t.exports=function(e,t){var o=i(e,t);if(o[0].t.empty)return o;for(var s=e._fullLayout,u=r.getFromId(e,t[t.orientation===`h`?`xaxis`:`yaxis`]),d=1/0,f=-1/0,p=0,m=0,h=0;h{var n=ao().setPositionOffset,r=[`v`,`h`];t.exports=function(e,t){for(var i=e.calcdata,a=t.xaxis,o=t.yaxis,s=0;s{var n=f(),r=$(),i=Gt(),a=oo(),o=ii(),s=Ks();t.exports=function(e,t,c,l){var u=e._context.staticPlot,d=e._fullLayout,f=t.xaxis,p=t.yaxis;function m(e,t){var n=o(e,{xaxis:f,yaxis:p,trace:t,connectGaps:!0,baseTolerance:.75,shape:`spline`,simplify:!0,linearized:!0});return i.smoothopen(n[0],1)}r.makeTraceGroups(l,c,`trace violins`).each(function(e){var i=n.select(this),o=e[0],c=o.t,l=o.trace;if(l.visible!==!0||c.empty){i.remove();return}var h=c.bPos,g=c.bdPos,_=t[c.valLetter+`axis`],v=t[c.posLetter+`axis`],y=l.side===`both`,b=y||l.side===`positive`,x=y||l.side===`negative`,S=i.selectAll(`path.violin`).data(r.identity);S.enter().append(`path`).style(`vector-effect`,u?`none`:`non-scaling-stroke`).attr(`class`,`violin`),S.exit().remove(),S.each(function(e){var t=n.select(this),r=e.density,i=r.length,a=v.c2l(e.pos+h,!0),o=v.l2p(a),s;if(l.width)s=c.maxKDE/g;else{var u=d._violinScaleGroupStats[l.scalegroup];s=l.scalemode===`count`?u.maxKDE/g*(u.maxCount/e.pts.length):u.maxKDE/g}var f,p,S,C,w,T,E;if(b){for(T=Array(i),C=0;C{var n=f(),r=L(),i=li().stylePoints;t.exports=function(e){var t=n.select(e).selectAll(`g.trace.violins`);t.style(`opacity`,function(e){return e[0].trace.opacity}),t.each(function(t){var a=t[0].trace,o=n.select(this),s=a.box||{},c=s.line||{},l=a.meanline||{},u=l.width;o.selectAll(`path.violin`).style(`stroke-width`,a.line.width+`px`).call(r.stroke,a.line.color).call(r.fill,a.fillcolor),o.selectAll(`path.box`).style(`stroke-width`,c.width+`px`).call(r.stroke,c.color).call(r.fill,s.fillcolor);var d={"stroke-width":u+`px`,"stroke-dasharray":2*u+`px,`+u+`px`};o.selectAll(`path.mean`).style(d).call(r.stroke,l.color),o.selectAll(`path.meanline`).style(d).call(r.stroke,l.color),i(o,a,e)})}}),Zs=l((e,t)=>{var n=L(),r=$(),i=Xt(),a=co(),o=Ks();t.exports=function(e,t,s,c,l){l||={};var u=l.hoverLayer,d=e.cd,f=d[0].trace,p=f.hoveron,m=p.indexOf(`violins`)!==-1,h=p.indexOf(`kde`)!==-1,g=[],_,v;if(m||h){var y=a.hoverOnBoxes(e,t,s,c);if(h&&y.length>0){var b=e.xa,x=e.ya,S,C,w,T,E;f.orientation===`h`?(E=t,S=`y`,w=x,C=`x`,T=b):(E=s,S=`x`,w=b,C=`y`,T=x);var D=d[e.index];if(E>=D.span[0]&&E<=D.span[1]){var O=r.extendFlat({},e),k=T.c2p(E,!0),A=o.getKdeValue(D,f,E),j=o.getPositionOnKdePath(D,f,k),M=w._offset,N=w._length;O[S+`0`]=j[0],O[S+`1`]=j[1],O[C+`0`]=O[C+`1`]=k,O[C+`Label`]=C+`: `+i.hoverLabelText(T,E,f[C+`hoverformat`])+`, `+d[0].t.labels.kde+` `+A.toFixed(3);for(var P=0,F=0;F{t.exports={attributes:Hs(),layoutAttributes:Us(),supplyDefaults:Ws(),crossTraceDefaults:no().crossTraceDefaults,supplyLayoutDefaults:Gs(),calc:qs(),crossTraceCalc:Js(),plot:Ys(),style:Xs(),styleOnSelect:li().styleOnSelect,hoverPoints:Zs(),selectPoints:uo(),moduleType:`trace`,name:`violin`,basePlotModule:xi(),categories:[`cartesian`,`svg`,`symbols`,`oriented`,`box-violin`,`showLegend`,`violinLayout`,`zoomScale`],meta:{}}}),$s=l((e,t)=>{t.exports=Qs()}),ec=l((e,t)=>{t.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:[``,``,``]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:[``,``,``,``]},rgba256:{colormodel:`rgba`,zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:[``,``,``,``]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]+=`%`,t[2]+=`%`,t},suffix:[`°`,`%`,`%`]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]+=`%`,t[2]+=`%`,t},suffix:[`°`,`%`,`%`,``]}}}}),tc=l((e,t)=>{var n=P(),r=gr().zorder,{hovertemplateAttrs:i,templatefallbackAttrs:a}=ke(),o=k().extendFlat,s=ec().colormodel,c=[`rgb`,`rgba`,`rgba256`,`hsl`,`hsla`],l=[],u=[];for(f=0;f{var n=$(),r=tc(),i=ec(),a=Or().IMAGE_URL_PREFIX;t.exports=function(e,t){function o(i,a){return n.coerce(e,t,r,i,a)}o(`source`),t.source&&!t.source.match(a)&&delete t.source,t._hasSource=!!t.source;var s=o(`z`);if(t._hasZ=!(s===void 0||!s.length||!s[0]||!s[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}o(`x0`),o(`y0`),o(`dx`),o(`dy`);var c;t._hasZ?(o(`colormodel`,`rgb`),c=i.colormodel[t.colormodel],o(`zmin`,c.zminDflt||c.min),o(`zmax`,c.zmaxDflt||c.max)):t._hasSource&&(t.colormodel=`rgba256`,c=i.colormodel[t.colormodel],t.zmin=c.zminDflt,t.zmax=c.zmaxDflt),o(`zsmooth`),o(`text`),o(`hovertext`),o(`hovertemplate`),o(`hovertemplatefallback`),t._length=null,o(`zorder`)}}),rc=l((e,t)=>{t.exports=typeof Object.create==`function`?function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}}),ic=l((e,t)=>{t.exports=it().EventEmitter}),ac=l(e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;for(a=0,o=i.length;a0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){for(var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f=0;f>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;ac?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}}),oc=l(e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else{if(a===c)return o?NaN:1/0*(p?-1:1);o+=2**r,a-=l}return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}}),sc=l(e=>{var t=ac(),n=oc(),r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=s,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return d(e)}return c(e,t,n)}s.poolSize=8192;function c(e,t,n){if(typeof e==`string`)return f(e,t);if(ArrayBuffer.isView(e))return m(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(oe(e,ArrayBuffer)||e&&oe(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(oe(e,SharedArrayBuffer)||e&&oe(e.buffer,SharedArrayBuffer)))return h(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return s.from(r,t,n);let i=g(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return s.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function u(e,t,n){return l(e),e<=0||t===void 0?o(e):typeof n==`string`?o(e).fill(t,n):o(e).fill(t)}s.alloc=function(e,t,n){return u(e,t,n)};function d(e){return l(e),o(e<0?0:_(e)|0)}s.allocUnsafe=function(e){return d(e)},s.allocUnsafeSlow=function(e){return d(e)};function f(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!s.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=y(e,t)|0,r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function p(e){let t=e.length<0?0:_(e.length)|0,n=o(t);for(let r=0;r=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function v(e){return+e!=e&&(e=0),s.alloc(+e)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(oe(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),oe(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);ir.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(s.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||oe(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return te(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return ie(e).length;default:if(i)return r?-1:te(e).length;t=(``+t).toLowerCase(),i=!0}}s.byteLength=y;function b(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return F(this,t,n);case`utf8`:case`utf-8`:return A(this,t,n);case`ascii`:return N(this,t,n);case`latin1`:case`binary`:return P(this,t,n);case`base64`:return k(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return I(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}s.prototype._isBuffer=!0;function x(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;tn&&(t+=` ... `),``},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(oe(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,c=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n);for(let e=0;e2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,se(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)n=0;else return-1}if(typeof t==`string`&&(t=s.from(t,r)),s.isBuffer(t))return t.length===0?-1:C(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function C(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;lo&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;ri&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o=0;for(;o>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return w(this,e,t,n);case`utf8`:case`utf-8`:return T(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return E(this,e,t,n);case`base64`:return D(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return O(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function A(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return M(r)}var j=4096;function M(e){let t=e.length;if(t<=j)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;rr)&&(n=r);let i=``;for(let r=t;rn&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),tn)throw RangeError(`Trying to access beyond buffer length`)}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=Q(function(e){e>>>=0,Y(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&X(e,this.length-8);let r=t+this[++e]*256+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*256+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,Y(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&X(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*256+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*256+n;return(BigInt(r)<>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e],i=1,a=0;for(;++a=i&&(r-=2**(8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(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-=2**(8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=Q(function(e){e>>>=0,Y(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&X(e,this.length-8);let r=this[e+4]+this[e+5]*256+this[e+6]*2**16+(n<<24);return(BigInt(r)<>>=0,Y(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&X(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*256+this[++e];return(BigInt(r)<>>=0,t||L(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),n.read(this,e,!1,52,8)};function R(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||te.length)throw RangeError(`Index out of range`)}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;R(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a>>=0,n>>>=0,!r){let r=2**(8*n)-1;R(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function z(e,t,n,r,i){J(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 B(e,t,n,r,i){J(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}s.prototype.writeBigUInt64LE=Q(function(e,t=0){return z(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),s.prototype.writeBigUInt64BE=Q(function(e,t=0){return B(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);R(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i>0)-o&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);R(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(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]=e&255,t+4},s.prototype.writeBigInt64LE=Q(function(e,t=0){return z(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),s.prototype.writeBigInt64BE=Q(function(e,t=0){return B(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function V(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function H(e,t,r,i,a){return t=+t,r>>>=0,a||V(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}s.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)};function U(e,t,r,i,a){return t=+t,r>>>=0,a||V(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}s.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i2**32?i=K(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=K(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function K(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function q(e,t,n){Y(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&X(t,e.length-(n+1))}function J(e,t,n,r,i,a){if(e>n||e3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new W.ERR_OUT_OF_RANGE(`value`,i,e)}q(r,i,a)}function Y(e,t){if(typeof e!=`number`)throw new W.ERR_INVALID_ARG_TYPE(t,`number`,e)}function X(e,t,n){throw Math.floor(e)===e?t<0?new W.ERR_BUFFER_OUT_OF_BOUNDS:new W.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(Y(e,n),new W.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}var ee=/[^+/0-9A-Za-z-_]/g;function Z(e){if(e=e.split(`=`)[0],e=e.trim().replace(ee,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function te(e,t){t||=1/0;let n,r=e.length,i=null,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=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function ne(e){let t=[];for(let n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function ie(e){return t.toByteArray(Z(e))}function ae(e,t,n,r){let i=0;for(;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function oe(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function se(e){return e!==e}var ce=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function Q(e){return typeof BigInt>`u`?le:e}function le(){throw Error(`BigInt not supported`)}}),cc=l((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}}),lc=l((e,t)=>{var n=cc();t.exports=function(){return n()&&!!Symbol.toStringTag}}),uc=l((e,t)=>{t.exports=Object}),dc=l((e,t)=>{t.exports=Error}),fc=l((e,t)=>{t.exports=EvalError}),pc=l((e,t)=>{t.exports=RangeError}),mc=l((e,t)=>{t.exports=ReferenceError}),hc=l((e,t)=>{t.exports=SyntaxError}),gc=l((e,t)=>{t.exports=TypeError}),_c=l((e,t)=>{t.exports=URIError}),vc=l((e,t)=>{t.exports=Math.abs}),yc=l((e,t)=>{t.exports=Math.floor}),bc=l((e,t)=>{t.exports=Math.max}),xc=l((e,t)=>{t.exports=Math.min}),Sc=l((e,t)=>{t.exports=Math.pow}),Cc=l((e,t)=>{t.exports=Math.round}),wc=l((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}}),Tc=l((e,t)=>{var n=wc();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}}),Ec=l((e,t)=>{t.exports=Object.getOwnPropertyDescriptor}),Dc=l((e,t)=>{var n=Ec();if(n)try{n([],`length`)}catch{n=null}t.exports=n}),Oc=l((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n}),kc=l((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=cc();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}}),Ac=l((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null}),jc=l((e,t)=>{t.exports=uc().getPrototypeOf||null}),Mc=l((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r{var n=Mc();t.exports=Function.prototype.bind||n}),Pc=l((e,t)=>{t.exports=Function.prototype.call}),Fc=l((e,t)=>{t.exports=Function.prototype.apply}),Ic=l((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply}),Lc=l((e,t)=>{var n=Nc(),r=Fc(),i=Pc();t.exports=Ic()||n.call(i,r)}),Rc=l((e,t)=>{var n=Nc(),r=gc(),i=Pc(),a=Lc();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}}),zc=l((e,t)=>{var n=Rc(),r=Dc(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`&&function(e){return s(e==null?e:o(e))}}),Bc=l((e,t)=>{var n=Ac(),r=jc(),i=zc();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null}),Vc=l((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=Nc().call(n,r)}),Hc=l((e,t)=>{var n,r=uc(),i=dc(),a=fc(),o=pc(),s=mc(),c=hc(),l=gc(),u=_c(),d=vc(),f=yc(),p=bc(),m=xc(),h=Sc(),g=Cc(),_=Tc(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Dc(),x=Oc(),S=function(){throw new l},C=b?(function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}})():S,w=kc()(),T=Bc(),E=jc(),D=Ac(),O=Fc(),k=Pc(),A={},j=typeof Uint8Array>`u`||!T?n:T(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":j,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){N=T(T(e)),M[`%Error.prototype%`]=N}var N,P=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return M[t]=n,n},F={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},I=Nc(),L=Vc(),R=I.call(k,Array.prototype.concat),z=I.call(O,Array.prototype.splice),B=I.call(k,String.prototype.replace),V=I.call(k,String.prototype.slice),H=I.call(k,RegExp.prototype.exec),U=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,G=function(e){var t=V(e,0,1),n=V(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,U,function(e,t,n,i){r[r.length]=n?B(i,W,`$1`):t||e}),r},K=function(e,t){var n=e,r;if(L(F,n)&&(r=F[n],n=`%`+r[0]+`%`),L(M,n)){var i=M[n];if(i===A&&(i=P(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(H(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=G(e),r=n.length>0?n[0]:``,i=K(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],z(n,R([0,1],u)));for(var d=1,f=!0;d=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=L(o,p),o=o[p];f&&!s&&(M[a]=o)}}return o}}),Uc=l((e,t)=>{var n=Oc(),r=hc(),i=gc(),a=Dc();t.exports=function(e,t,o){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`obj` must be an object or a function`");if(typeof t!=`string`&&typeof t!=`symbol`)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=`boolean`&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=`boolean`&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=`boolean`&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=`boolean`)throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(n)n(e,t,{configurable:l===null&&d?d.configurable:!l,enumerable:s===null&&d?d.enumerable:!s,value:o,writable:c===null&&d?d.writable:!c});else if(u||!s&&!c&&!l)e[t]=o;else throw new r(`This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.`)}}),Wc=l((e,t)=>{var n=Oc(),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],`length`,{value:1}).length!==1}catch{return!0}},t.exports=r}),Gc=l((e,t)=>{var n=Hc(),r=Uc(),i=Wc()(),a=Dc(),o=gc(),s=n(`%Math.floor%`);t.exports=function(e,t){if(typeof e!=`function`)throw new o("`fn` is not a function");if(typeof t!=`number`||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],c=!0,l=!0;if(`length`in e&&a){var u=a(e,`length`);u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!n)&&(i?r(e,`length`,t,!0,!0):r(e,`length`,t)),e}}),Kc=l((e,t)=>{var n=Nc(),r=Hc(),i=Gc(),a=gc(),o=r(`%Function.prototype.apply%`),s=r(`%Function.prototype.call%`),c=r(`%Reflect.apply%`,!0)||n.call(s,o),l=Oc(),u=r(`%Math.max%`);t.exports=function(e){if(typeof e!=`function`)throw new a(`a function is required`);return i(c(n,s,arguments),1+u(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(n,o,arguments)};l?l(t.exports,`apply`,{value:d}):t.exports.apply=d}),qc=l((e,t)=>{var n=Hc(),r=Kc(),i=r(n(`String.prototype.indexOf`));t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r(a):a}}),Jc=l((e,t)=>{var n=lc()(),r=qc()(`Object.prototype.toString`),i=function(e){return n&&e&&typeof e==`object`&&Symbol.toStringTag in e?!1:r(e)===`[object Arguments]`},a=function(e){return i(e)?!0:typeof e==`object`&&!!e&&typeof e.length==`number`&&e.length>=0&&r(e)!==`[object Array]`&&r(e.callee)===`[object Function]`},o=(function(){return i(arguments)})();i.isLegacyArguments=a,t.exports=o?i:a}),Yc=l((e,t)=>{var n=Object.prototype.toString,r=Function.prototype.toString,i=/^\s*(?:function)?\*/,a=lc()(),o=Object.getPrototypeOf,s=function(){if(!a)return!1;try{return Function(`return function*() {}`)()}catch{}},c;t.exports=function(e){if(typeof e!=`function`)return!1;if(i.test(r.call(e)))return!0;if(!a)return n.call(e)===`[object GeneratorFunction]`;if(!o)return!1;if(c===void 0){var t=s();c=t?o(t):!1}return o(e)===c}}),Xc=l((e,t)=>{var n=Function.prototype.toString,r=typeof Reflect==`object`&&Reflect!==null&&Reflect.apply,i,a;if(typeof r==`function`&&typeof Object.defineProperty==`function`)try{i=Object.defineProperty({},"length",{get:function(){throw a}}),a={},r(function(){throw 42},null,i)}catch(e){e!==a&&(r=null)}else r=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch{return!1}},c=function(e){try{return!s(e)&&(n.call(e),!0)}catch{return!1}},l=Object.prototype.toString,u=`[object Object]`,d=`[object Function]`,f=`[object GeneratorFunction]`,p=`[object HTMLAllCollection]`,m=`[object HTML document.all class]`,h=`[object HTMLCollection]`,g=typeof Symbol==`function`&&!!Symbol.toStringTag,_=!(0 in[,]),v=function(){return!1};typeof document==`object`&&(y=document.all,l.call(y)===l.call(document.all)&&(v=function(e){if((_||!e)&&(e===void 0||typeof e==`object`))try{var t=l.call(e);return(t===p||t===m||t===h||t===u)&&e(``)==null}catch{}return!1}));var y;t.exports=r?function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;try{r(e,null,i)}catch(e){if(e!==a)return!1}return!s(e)&&c(e)}:function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;if(g)return c(e);if(s(e))return!1;var t=l.call(e);return t!==d&&t!==f&&!/^\[object HTML/.test(t)?!1:c(e)}}),Zc=l((e,t)=>{var n=Xc(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,a=e.length;r=3&&(c=i),r.call(e)===`[object Array]`?a(e,t,c):typeof e==`string`?o(e,t,c):s(e,t,c)}}),Qc=l((e,t)=>{var n=[`BigInt64Array`,`BigUint64Array`,`Float32Array`,`Float64Array`,`Int16Array`,`Int32Array`,`Int8Array`,`Uint16Array`,`Uint32Array`,`Uint8Array`,`Uint8ClampedArray`],r=typeof globalThis>`u`?window:globalThis;t.exports=function(){for(var e=[],t=0;t{var n=Zc(),r=Qc(),i=Kc(),a=qc(),o=Dc(),s=a(`Object.prototype.toString`),c=lc()(),l=typeof globalThis>`u`?window:globalThis,u=r(),d=a(`String.prototype.slice`),f=Object.getPrototypeOf,p=a(`Array.prototype.indexOf`,!0)||function(e,t){for(var n=0;n-1?t:t===`Object`&&g(e)}return o?h(e):null}}),el=l((e,t)=>{var n=Zc(),r=Qc(),i=qc(),a=i(`Object.prototype.toString`),o=lc()(),s=Dc(),c=typeof globalThis>`u`?window:globalThis,l=r(),u=i(`Array.prototype.indexOf`,!0)||function(e,t){for(var n=0;n-1:s?m(e):!1}}),tl=l(e=>{var t=Jc(),n=Yc(),r=$c(),i=el();function a(e){return e.call.bind(e)}var o=typeof BigInt<`u`,s=typeof Symbol<`u`,c=a(Object.prototype.toString),l=a(Number.prototype.valueOf),u=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);o&&(f=a(BigInt.prototype.valueOf));var f;s&&(p=a(Symbol.prototype.valueOf));var p;function m(e,t){if(typeof e!=`object`)return!1;try{return t(e),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=i;function h(e){return typeof Promise<`u`&&e instanceof Promise||typeof e==`object`&&!!e&&typeof e.then==`function`&&typeof e.catch==`function`}e.isPromise=h;function g(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||z(e)}e.isArrayBufferView=g;function _(e){return r(e)===`Uint8Array`}e.isUint8Array=_;function v(e){return r(e)===`Uint8ClampedArray`}e.isUint8ClampedArray=v;function y(e){return r(e)===`Uint16Array`}e.isUint16Array=y;function b(e){return r(e)===`Uint32Array`}e.isUint32Array=b;function x(e){return r(e)===`Int8Array`}e.isInt8Array=x;function S(e){return r(e)===`Int16Array`}e.isInt16Array=S;function C(e){return r(e)===`Int32Array`}e.isInt32Array=C;function w(e){return r(e)===`Float32Array`}e.isFloat32Array=w;function T(e){return r(e)===`Float64Array`}e.isFloat64Array=T;function E(e){return r(e)===`BigInt64Array`}e.isBigInt64Array=E;function D(e){return r(e)===`BigUint64Array`}e.isBigUint64Array=D;function O(e){return c(e)===`[object Map]`}O.working=typeof Map<`u`&&O(new Map);function k(e){return typeof Map>`u`?!1:O.working?O(e):e instanceof Map}e.isMap=k;function A(e){return c(e)===`[object Set]`}A.working=typeof Set<`u`&&A(new Set);function j(e){return typeof Set>`u`?!1:A.working?A(e):e instanceof Set}e.isSet=j;function M(e){return c(e)===`[object WeakMap]`}M.working=typeof WeakMap<`u`&&M(new WeakMap);function N(e){return typeof WeakMap>`u`?!1:M.working?M(e):e instanceof WeakMap}e.isWeakMap=N;function P(e){return c(e)===`[object WeakSet]`}P.working=typeof WeakSet<`u`&&P(new WeakSet);function F(e){return P(e)}e.isWeakSet=F;function I(e){return c(e)===`[object ArrayBuffer]`}I.working=typeof ArrayBuffer<`u`&&I(new ArrayBuffer);function L(e){return typeof ArrayBuffer>`u`?!1:I.working?I(e):e instanceof ArrayBuffer}e.isArrayBuffer=L;function R(e){return c(e)===`[object DataView]`}R.working=typeof ArrayBuffer<`u`&&typeof DataView<`u`&&R(new DataView(new ArrayBuffer(1),0,1));function z(e){return typeof DataView>`u`?!1:R.working?R(e):e instanceof DataView}e.isDataView=z;var B=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:void 0;function V(e){return c(e)===`[object SharedArrayBuffer]`}function H(e){return B!==void 0&&(V.working===void 0&&(V.working=V(new B)),V.working?V(e):e instanceof B)}e.isSharedArrayBuffer=H;function U(e){return c(e)===`[object AsyncFunction]`}e.isAsyncFunction=U;function W(e){return c(e)===`[object Map Iterator]`}e.isMapIterator=W;function G(e){return c(e)===`[object Set Iterator]`}e.isSetIterator=G;function K(e){return c(e)===`[object Generator]`}e.isGeneratorObject=K;function q(e){return c(e)===`[object WebAssembly.Module]`}e.isWebAssemblyCompiledModule=q;function J(e){return m(e,l)}e.isNumberObject=J;function Y(e){return m(e,u)}e.isStringObject=Y;function X(e){return m(e,d)}e.isBooleanObject=X;function ee(e){return o&&m(e,f)}e.isBigIntObject=ee;function Z(e){return s&&m(e,p)}e.isSymbolObject=Z;function te(e){return J(e)||Y(e)||X(e)||ee(e)||Z(e)}e.isBoxedPrimitive=te;function ne(e){return typeof Uint8Array<`u`&&(L(e)||H(e))}e.isAnyArrayBuffer=ne,[`isProxy`,`isExternal`,`isModuleNamespaceObject`].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw Error(t+` is not supported in userland`)}})})}),nl=l((e,t)=>{t.exports=function(e){return e&&typeof e==`object`&&typeof e.copy==`function`&&typeof e.fill==`function`&&typeof e.readUInt8==`function`}}),rl=l(e=>{var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r=a)return e;switch(e){case`%s`:return String(i[r++]);case`%d`:return Number(i[r++]);case`%j`:try{return JSON.stringify(i[r++])}catch{return`[Circular]`}default:return e}}),c=i[r];r`u`)return function(){return e.deprecate(t,n).apply(this,arguments)};var r=!1;function i(){if(!r){if(process.throwDeprecation)throw Error(n);process.traceDeprecation?console.trace(n):console.error(n),r=!0}return t.apply(this,arguments)}return i};var r={},i=/^$/;a=`false`,a=a.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`).replace(/\*/g,`.*`).replace(/,/g,`$|^`).toUpperCase(),i=RegExp(`^`+a+`$`,`i`);var a;e.debuglog=function(t){if(t=t.toUpperCase(),!r[t]){if(i.test(t)){var n=process.pid;r[t]=function(){var r=e.format.apply(e,arguments);console.error(`%s %d: %s`,t,n,r)}}else r[t]=function(){}}return r[t]};function o(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),_(n)?r.showHidden=n:n&&e._extend(r,n),C(r.showHidden)&&(r.showHidden=!1),C(r.depth)&&(r.depth=2),C(r.colors)&&(r.colors=!1),C(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),u(r,t,r.depth)}e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:`cyan`,number:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,date:`magenta`,regexp:`red`};function s(e,t){var n=o.styles[t];return n?`\x1B[`+o.colors[n][0]+`m`+e+`\x1B[`+o.colors[n][1]+`m`:e}function c(e,t){return e}function l(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(t,n,r){if(t.customInspect&&n&&O(n.inspect)&&n.inspect!==e.inspect&&!(n.constructor&&n.constructor.prototype===n)){var i=n.inspect(r,t);return x(i)||(i=u(t,i,r)),i}var a=d(t,n);if(a)return a;var o=Object.keys(n),s=l(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),D(n)&&(o.indexOf(`message`)>=0||o.indexOf(`description`)>=0))return f(n);if(o.length===0){if(O(n)){var c=n.name?`: `+n.name:``;return t.stylize(`[Function`+c+`]`,`special`)}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),`regexp`);if(E(n))return t.stylize(Date.prototype.toString.call(n),`date`);if(D(n))return f(n)}var _=``,v=!1,y=[`{`,`}`];if(g(n)&&(v=!0,y=[`[`,`]`]),O(n)&&(_=` [Function`+(n.name?`: `+n.name:``)+`]`),w(n)&&(_=` `+RegExp.prototype.toString.call(n)),E(n)&&(_=` `+Date.prototype.toUTCString.call(n)),D(n)&&(_=` `+f(n)),o.length===0&&(!v||n.length==0))return y[0]+_+y[1];if(r<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),`regexp`):t.stylize(`[Object]`,`special`);t.seen.push(n);var b=v?p(t,n,r,s,o):o.map(function(e){return m(t,n,r,s,e,v)});return t.seen.pop(),h(b,_,y)}function d(e,t){if(C(t))return e.stylize(`undefined`,`undefined`);if(x(t)){var n=`'`+JSON.stringify(t).replace(/^"|"$/g,``).replace(/'/g,`\\'`).replace(/\\"/g,`"`)+`'`;return e.stylize(n,`string`)}if(b(t))return e.stylize(``+t,`number`);if(_(t))return e.stylize(``+t,`boolean`);if(v(t))return e.stylize(`null`,`null`)}function f(e){return`[`+Error.prototype.toString.call(e)+`]`}function p(e,t,n,r,i){for(var a=[],o=0,s=t.length;o-1&&(s=a?s.split(` +`).map(function(e){return` `+e}).join(` +`).slice(2):` +`+s.split(` +`).map(function(e){return` `+e}).join(` +`))):s=e.stylize(`[Circular]`,`special`)),C(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(``+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,`name`)):(o=o.replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`),o=e.stylize(o,`string`))}return o+`: `+s}function h(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf(` +`)>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,``).length+1},0)>60?n[0]+(t===``?``:t+` + `)+` `+e.join(`, + `)+` `+n[1]:n[0]+t+` `+e.join(`, `)+` `+n[1]}e.types=tl();function g(e){return Array.isArray(e)}e.isArray=g;function _(e){return typeof e==`boolean`}e.isBoolean=_;function v(e){return e===null}e.isNull=v;function y(e){return e==null}e.isNullOrUndefined=y;function b(e){return typeof e==`number`}e.isNumber=b;function x(e){return typeof e==`string`}e.isString=x;function S(e){return typeof e==`symbol`}e.isSymbol=S;function C(e){return e===void 0}e.isUndefined=C;function w(e){return T(e)&&A(e)===`[object RegExp]`}e.isRegExp=w,e.types.isRegExp=w;function T(e){return typeof e==`object`&&!!e}e.isObject=T;function E(e){return T(e)&&A(e)===`[object Date]`}e.isDate=E,e.types.isDate=E;function D(e){return T(e)&&(A(e)===`[object Error]`||e instanceof Error)}e.isError=D,e.types.isNativeError=D;function O(e){return typeof e==`function`}e.isFunction=O;function k(e){return e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`||typeof e==`symbol`||e===void 0}e.isPrimitive=k,e.isBuffer=nl();function A(e){return Object.prototype.toString.call(e)}function j(e){return e<10?`0`+e.toString(10):e.toString(10)}var M=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function N(){var e=new Date,t=[j(e.getHours()),j(e.getMinutes()),j(e.getSeconds())].join(`:`);return[e.getDate(),M[e.getMonth()],t].join(` `)}e.log=function(){console.log(`%s - %s`,N(),e.format.apply(e,arguments))},e.inherits=rc(),e._extend=function(e,t){if(!t||!T(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var F=typeof Symbol<`u`?Symbol(`util.promisify.custom`):void 0;e.promisify=function(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type Function`);if(F&&e[F]){var n=e[F];if(typeof n!=`function`)throw TypeError(`The "util.promisify.custom" argument must be of type Function`);return Object.defineProperty(n,F,{value:n,enumerable:!1,writable:!1,configurable:!0}),n}function n(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),i=[],a=0;a{function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function r(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:`unshift`,value:function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length}},{key:`shift`,value:function(){if(this.length!==0){var e=this.head.data;return this.head=this.length===1?this.tail=null:this.head.next,--this.length,e}}},{key:`clear`,value:function(){this.head=this.tail=null,this.length=0}},{key:`join`,value:function(e){if(this.length===0)return``;for(var t=this.head,n=``+t.data;t=t.next;)n+=e+t.data;return n}},{key:`concat`,value:function(e){if(this.length===0)return c.alloc(0);for(var t=c.allocUnsafe(e>>>0),n=this.head,r=0;n;)d(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:`consume`,value:function(e,t){var n;return ei.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),e-=a,e===0){a===i.length?(++n,this.head=t.next?t.next:this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:`_getBuffer`,value:function(e){var t=c.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),e-=a,e===0){a===i.length?(++r,this.head=n.next?n.next:this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:u,value:function(e,t){return l(this,r({},t,{depth:0,customInspect:!1}))}}]),e})()}),al=l((e,t)=>{function n(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(o,this,e)):process.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted?process.nextTick(i,n):(n._writableState.errorEmitted=!0,process.nextTick(r,n,e)):process.nextTick(r,n,e):t?(process.nextTick(i,n),t(e)):process.nextTick(i,n)}),this)}function r(e,t){o(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit(`close`)}function a(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(e,t){e.emit(`error`,t)}function s(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit(`error`,t)}t.exports={destroy:n,undestroy:a,errorOrDestroy:s}}),ol=l((e,t)=>{function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r={};function i(e,t,i){i||=Error;function a(e,n,r){return typeof t==`string`?t:t(e,n,r)}var o=(function(e){n(t,e);function t(t,n,r){return e.call(this,a(t,n,r))||this}return t})(i);o.prototype.name=i.name,o.prototype.code=e,r[e]=o}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?`one of ${t} ${e.slice(0,n-1).join(`, `)}, or `+e[n-1]:n===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}function o(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}function s(e,t,n){return(n===void 0||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function c(e,t,n){return typeof n!=`number`&&(n=0),n+t.length>e.length?!1:e.indexOf(t,n)!==-1}i(`ERR_INVALID_OPT_VALUE`,function(e,t){return`The value "`+t+`" is invalid for option "`+e+`"`},TypeError),i(`ERR_INVALID_ARG_TYPE`,function(e,t,n){var r;typeof t==`string`&&o(t,`not `)?(r=`must not be`,t=t.replace(/^not /,``)):r=`must be`;var i=s(e,` argument`)?`The ${e} ${r} ${a(t,`type`)}`:`The "${e}" ${c(e,`.`)?`property`:`argument`} ${r} ${a(t,`type`)}`;return i+=`. Received type ${typeof n}`,i},TypeError),i(`ERR_STREAM_PUSH_AFTER_EOF`,`stream.push() after EOF`),i(`ERR_METHOD_NOT_IMPLEMENTED`,function(e){return`The `+e+` method is not implemented`}),i(`ERR_STREAM_PREMATURE_CLOSE`,`Premature close`),i(`ERR_STREAM_DESTROYED`,function(e){return`Cannot call `+e+` after a stream was destroyed`}),i(`ERR_MULTIPLE_CALLBACK`,`Callback called multiple times`),i(`ERR_STREAM_CANNOT_PIPE`,`Cannot pipe, not readable`),i(`ERR_STREAM_WRITE_AFTER_END`,`write after end`),i(`ERR_STREAM_NULL_VALUES`,`May not write null values to stream`,TypeError),i(`ERR_UNKNOWN_ENCODING`,function(e){return`Unknown encoding: `+e},TypeError),i(`ERR_STREAM_UNSHIFT_AFTER_END_EVENT`,`stream.unshift() after end event`),t.exports.codes=r}),sl=l((e,t)=>{var n=ol().codes.ERR_INVALID_OPT_VALUE;function r(e,t,n){return e.highWaterMark==null?t?e[n]:null:e.highWaterMark}function i(e,t,i,a){var o=r(t,a,i);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new n(a?i:`highWaterMark`,o);return Math.floor(o)}return e.objectMode?16:16384}t.exports={getHighWaterMark:i}}),cl=l((e,t)=>{t.exports=n;function n(e,t){if(r(`noDeprecation`))return e;var n=!1;function i(){if(!n){if(r(`throwDeprecation`))throw Error(t);r(`traceDeprecation`)?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return i}function r(e){try{if(!window.localStorage)return!1}catch{return!1}var t=window.localStorage[e];return t!=null&&String(t).toLowerCase()===`true`}}),ll=l((e,t)=>{t.exports=T;function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){H(t,e)}}var r;T.WritableState=C;var i={deprecate:cl()},a=ic(),o=sc().Buffer,s=window.Uint8Array||function(){};function c(e){return o.from(e)}function l(e){return o.isBuffer(e)||e instanceof s}var u=al(),d=sl().getHighWaterMark,f=ol().codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,h=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,_=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,y=f.ERR_STREAM_WRITE_AFTER_END,b=f.ERR_UNKNOWN_ENCODING,x=u.errorOrDestroy;rc()(T,a);function S(){}function C(e,t,i){r||=ul(),e||={},typeof i!=`boolean`&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,`writableHighWaterMark`,i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){N(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},`_writableState.buffer is deprecated. Use _writableState.getBuffer instead.`,`DEP0003`)})}catch{}})();var w;typeof Symbol==`function`&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==`function`?(w=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return w.call(this,e)?!0:this===T&&e&&e._writableState instanceof C}})):w=function(e){return e instanceof this};function T(e){r||=ul();var t=this instanceof r;if(!t&&!w.call(T,this))return new T(e);this._writableState=new C(e,this,t),this.writable=!0,e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final)),a.call(this)}T.prototype.pipe=function(){x(this,new g)};function E(e,t){var n=new y;x(e,n),process.nextTick(t,n)}function D(e,t,n,r){var i;return n===null?i=new v:typeof n!=`string`&&!t.objectMode&&(i=new p(`chunk`,[`string`,`Buffer`],n)),!i||(x(e,i),process.nextTick(r,i),!1)}T.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&l(e);return a&&!o.isBuffer(e)&&(e=c(e)),typeof t==`function`&&(n=t,t=null),a?t=`buffer`:t||=r.defaultEncoding,typeof n!=`function`&&(n=S),r.ending?E(this,n):(a||D(this,r,e,n))&&(r.pendingcb++,i=k(this,r,a,e,t,n)),i},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&I(this,e))},T.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=e.toLowerCase()),!([`hex`,`utf8`,`utf-8`,`ascii`,`binary`,`base64`,`ucs2`,`ucs-2`,`utf16le`,`utf-16le`,`raw`].indexOf((e+``).toLowerCase())>-1))throw new b(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==`string`&&(t=o.from(t,n)),t}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function k(e,t,n,r,i,a){if(!n){var o=O(t,r,i);r!==o&&(n=!0,i=`buffer`,r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length{var n=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=c;var r=gl(),i=ll();for(rc()(c,r),a=n(i.prototype),s=0;s{var n=sc(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a);function a(e,t,n){return r(e,t,n)}a.prototype=Object.create(r.prototype),i(r,a),a.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},a.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},a.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},a.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}}),fl=l(e=>{var t=dl().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function _(e){return e&&e.length?this.write(e):``}}),pl=l((e,t)=>{var n=ol().codes.ERR_STREAM_PREMATURE_CLOSE;function r(e){var t=!1;return function(){if(!t){t=!0;var n=[...arguments];e.apply(this,n)}}}function i(){}function a(e){return e.setHeader&&typeof e.abort==`function`}function o(e,t,s){if(typeof t==`function`)return o(e,null,t);t||={},s=r(s||i);var c=t.readable||t.readable!==!1&&e.readable,l=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||f()},d=e._writableState&&e._writableState.finished,f=function(){l=!1,d=!0,c||s.call(e)},p=e._readableState&&e._readableState.endEmitted,m=function(){c=!1,p=!0,l||s.call(e)},h=function(t){s.call(e,t)},g=function(){var t;if(c&&!p)return(!e._readableState||!e._readableState.ended)&&(t=new n),s.call(e,t);if(l&&!d)return(!e._writableState||!e._writableState.ended)&&(t=new n),s.call(e,t)},_=function(){e.req.on(`finish`,f)};return a(e)?(e.on(`complete`,f),e.on(`abort`,g),e.req?_():e.on(`request`,_)):l&&!e._writableState&&(e.on(`end`,u),e.on(`close`,u)),e.on(`end`,m),e.on(`finish`,f),t.error!==!1&&e.on(`error`,h),e.on(`close`,g),function(){e.removeListener(`complete`,f),e.removeListener(`abort`,g),e.removeListener(`request`,_),e.req&&e.req.removeListener(`finish`,f),e.removeListener(`end`,u),e.removeListener(`close`,u),e.removeListener(`finish`,f),e.removeListener(`end`,m),e.removeListener(`error`,h),e.removeListener(`close`,g)}}t.exports=o}),ml=l((e,t)=>{var n;function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=pl(),a=Symbol(`lastResolve`),o=Symbol(`lastReject`),s=Symbol(`error`),c=Symbol(`ended`),l=Symbol(`lastPromise`),u=Symbol(`handlePromise`),d=Symbol(`stream`);function f(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(t!==null){var n=e[d].read();n!==null&&(e[l]=null,e[a]=null,e[o]=null,t(f(n,!1)))}}function m(e){process.nextTick(p,e)}function h(e,t){return function(n,r){e.then(function(){if(t[c]){n(f(void 0,!0));return}t[u](n,r)},r)}}var g=Object.getPrototypeOf(function(){}),_=Object.setPrototypeOf((n={get stream(){return this[d]},next:function(){var e=this,t=this[s];if(t!==null)return Promise.reject(t);if(this[c])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise(function(t,n){process.nextTick(function(){e[s]?n(e[s]):t(f(void 0,!0))})});var n=this[l],r;if(n)r=new Promise(h(n,this));else{var i=this[d].read();if(i!==null)return Promise.resolve(f(i,!1));r=new Promise(this[u])}return this[l]=r,r}},r(n,Symbol.asyncIterator,function(){return this}),r(n,`return`,function(){var e=this;return new Promise(function(t,n){e[d].destroy(null,function(e){if(e){n(e);return}t(f(void 0,!0))})})}),n),g);t.exports=function(e){var t,n=Object.create(_,(t={},r(t,d,{value:e,writable:!0}),r(t,a,{value:null,writable:!0}),r(t,o,{value:null,writable:!0}),r(t,s,{value:null,writable:!0}),r(t,c,{value:e._readableState.endEmitted,writable:!0}),r(t,u,{value:function(e,t){var r=n[d].read();r?(n[l]=null,n[a]=null,n[o]=null,e(f(r,!1))):(n[a]=e,n[o]=t)},writable:!0}),t));return n[l]=null,i(e,function(e){if(e&&e.code!==`ERR_STREAM_PREMATURE_CLOSE`){var t=n[o];t!==null&&(n[l]=null,n[a]=null,n[o]=null,t(e)),n[s]=e;return}var r=n[a];r!==null&&(n[l]=null,n[a]=null,n[o]=null,r(f(void 0,!0))),n[c]=!0}),e.on(`readable`,m.bind(null,n)),n}}),hl=l((e,t)=>{t.exports=function(){throw Error(`Readable.from is not available in the browser`)}}),gl=l((e,t)=>{t.exports=E;var n;E.ReadableState=T,it().EventEmitter;var r=function(e,t){return e.listeners(t).length},i=ic(),a=sc().Buffer,o=window.Uint8Array||function(){};function s(e){return a.from(e)}function c(e){return a.isBuffer(e)||e instanceof o}var l=rl(),u=l&&l.debuglog?l.debuglog(`stream`):function(){},d=il(),f=al(),p=sl().getHighWaterMark,m=ol().codes,h=m.ERR_INVALID_ARG_TYPE,g=m.ERR_STREAM_PUSH_AFTER_EOF,_=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,y,b,x;rc()(E,i);var S=f.errorOrDestroy,C=[`error`,`close`,`destroy`,`pause`,`resume`];function w(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function T(e,t,r){n||=ul(),e||={},typeof r!=`boolean`&&(r=t instanceof n),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,`readableHighWaterMark`,r),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||`utf8`,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(y||=fl().StringDecoder,this.decoder=new y(e.encoding),this.encoding=e.encoding)}function E(e){if(n||=ul(),!(this instanceof E))return new E(e);var t=this instanceof n;this._readableState=new T(e,this,t),this.readable=!0,e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy)),i.call(this)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:typeof e==`string`&&(t||=n.defaultEncoding,t!==n.encoding&&(e=a.from(e,t),t=``),r=!0),D(this,e,t,!1,r)},E.prototype.unshift=function(e){return D(this,e,null,!0,!1)};function D(e,t,n,r,i){u(`readableAddChunk`,t);var o=e._readableState;if(t===null)o.reading=!1,N(e,o);else{var c;if(i||(c=k(o,t)),c)S(e,c);else if(o.objectMode||t&&t.length>0){if(typeof t!=`string`&&!o.objectMode&&Object.getPrototypeOf(t)!==a.prototype&&(t=s(t)),r)o.endEmitted?S(e,new v):O(e,o,t,!0);else if(o.ended)S(e,new g);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||t.length!==0?O(e,o,t,!1):I(e,o)):O(e,o,t,!1)}}else r||(o.reading=!1,I(e,o))}return!o.ended&&(o.length=A?e=A:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function M(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=j(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}E.prototype.read=function(e){u(`read`,e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark===0?t.length>0:t.length>=t.highWaterMark)||t.ended))return u(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?G(this):P(this),null;if(e=M(e,t),e===0&&t.ended)return t.length===0&&G(this),null;var r=t.needReadable;u(`need readable`,r),(t.length===0||t.length-e0?W(e,t):null;return i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&G(this)),i!==null&&this.emit(`data`,i),i};function N(e,t){if(u(`onEofChunk`),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?P(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,F(e)))}}function P(e){var t=e._readableState;u(`emitReadable`,t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u(`emitReadable`,t.flowing),t.emittedReadable=!0,process.nextTick(F,e))}function F(e){var t=e._readableState;u(`emitReadable_`,t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit(`readable`),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function I(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length1&&q(i.pipes,e)!==-1)&&!l&&(u(`false write response, pause`,i.awaitDrain),i.awaitDrain++),n.pause())}function p(t){u(`onerror`,t),g(),e.removeListener(`error`,p),r(e,`error`)===0&&S(e,t)}w(e,`error`,p);function m(){e.removeListener(`finish`,h),g()}e.once(`close`,m);function h(){u(`onfinish`),e.removeListener(`close`,m),g()}e.once(`finish`,h);function g(){u(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),i.flowing||(u(`pipe resume`),n.resume()),e};function R(e){return function(){var t=e._readableState;u(`pipeOnDrain`,t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&r(e,`data`)&&(t.flowing=!0,U(e))}}E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||=t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(`unpipe`,this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,r.flowing!==!1&&this.resume()):e===`readable`&&!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,u(`on readable`,r.length,r.reading),r.length?P(this):r.reading||process.nextTick(B,this)),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=i.prototype.removeListener.call(this,e,t);return e===`readable`&&process.nextTick(z,this),n},E.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return(e===`readable`||e===void 0)&&process.nextTick(z,this),t};function z(e){var t=e._readableState;t.readableListening=e.listenerCount(`readable`)>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount(`data`)>0&&e.resume()}function B(e){u(`readable nexttick read 0`),e.read(0)}E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u(`resume`),e.flowing=!e.readableListening,V(this,e)),e.paused=!1,this};function V(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(H,e,t))}function H(e,t){u(`resume`,t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(`resume`),U(e),t.flowing&&!t.reading&&e.read(0)}E.prototype.pause=function(){return u(`call pause flowing=%j`,this._readableState.flowing),this._readableState.flowing!==!1&&(u(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this._readableState.paused=!0,this};function U(e){var t=e._readableState;for(u(`flow`,t.flowing);t.flowing&&e.read()!==null;);}E.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on(`end`,function(){if(u(`wrapped end`),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on(`data`,function(i){u(`wrapped data`),n.decoder&&(i=n.decoder.write(i)),!(n.objectMode&&i==null)&&(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))}),e)this[i]===void 0&&typeof e[i]==`function`&&(this[i]=(function(t){return function(){return e[t].apply(e,arguments)}})(i));for(var a=0;a=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function G(e){var t=e._readableState;u(`endReadable`,t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(K,t,e))}function K(e,t){if(u(`endReadableNT`,e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(`end`),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}typeof Symbol==`function`&&(E.from=function(e,t){return x===void 0&&(x=hl()),x(E,e,t)});function q(e,t){for(var n=0,r=e.length;n{t.exports=l;var n=ol().codes,r=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,s=ul();rc()(l,s);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(r===null)return this.emit(`error`,new i);n.writechunk=null,n.writecb=null,t!=null&&this.push(t),r(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{t.exports=r;var n=_l();rc()(r,n);function r(e){if(!(this instanceof r))return new r(e);n.call(this,e)}r.prototype._transform=function(e,t,n){n(null,e)}}),yl=l((e,t)=>{var n;function r(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var i=ol().codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e){return e.setHeader&&typeof e.abort==`function`}function l(e,t,i,a){a=r(a);var s=!1;e.on(`close`,function(){s=!0}),n===void 0&&(n=pl()),n(e,{readable:t,writable:i},function(e){if(e)return a(e);s=!0,a()});var l=!1;return function(t){if(!s&&!l){if(l=!0,c(e))return e.abort();if(typeof e.destroy==`function`)return e.destroy();a(t||new o(`pipe`))}}}function u(e){e()}function d(e,t){return e.pipe(t)}function f(e){return!e.length||typeof e[e.length-1]!=`function`?s:e.pop()}function p(){var e=[...arguments],t=f(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new a(`streams`);var n,r=e.map(function(i,a){var o=a0,function(e){n||=e,e&&r.forEach(u),!o&&(r.forEach(u),t(n))})});return e.reduce(d)}t.exports=p}),bl=l((e,t)=>{t.exports=r;var n=it().EventEmitter;rc()(r,n),r.Readable=gl(),r.Writable=ll(),r.Duplex=ul(),r.Transform=_l(),r.PassThrough=vl(),r.finished=pl(),r.pipeline=yl(),r.Stream=r;function r(){n.call(this)}r.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&e.write(t)===!1&&r.pause&&r.pause()}r.on(`data`,i);function a(){r.readable&&r.resume&&r.resume()}e.on(`drain`,a),!e._isStdio&&(!t||t.end!==!1)&&(r.on(`end`,s),r.on(`close`,c));var o=!1;function s(){o||(o=!0,e.end())}function c(){o||(o=!0,typeof e.destroy==`function`&&e.destroy())}function l(e){if(u(),n.listenerCount(this,`error`)===0)throw e}r.on(`error`,l),e.on(`error`,l);function u(){r.removeListener(`data`,i),e.removeListener(`drain`,a),r.removeListener(`end`,s),r.removeListener(`close`,c),r.removeListener(`error`,l),e.removeListener(`error`,l),r.removeListener(`end`,u),r.removeListener(`close`,u),e.removeListener(`close`,u)}return r.on(`end`,u),r.on(`close`,u),e.on(`close`,u),e.emit(`pipe`,r),e}}),xl=l(e=>{var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r=a)return e;switch(e){case`%s`:return String(i[r++]);case`%d`:return Number(i[r++]);case`%j`:try{return JSON.stringify(i[r++])}catch{return`[Circular]`}default:return e}}),c=i[r];r`u`)return function(){return e.deprecate(t,n).apply(this,arguments)};var r=!1;function i(){if(!r){if(process.throwDeprecation)throw Error(n);process.traceDeprecation?console.trace(n):console.error(n),r=!0}return t.apply(this,arguments)}return i};var r={},i=/^$/;a=`false`,a=a.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`).replace(/\*/g,`.*`).replace(/,/g,`$|^`).toUpperCase(),i=RegExp(`^`+a+`$`,`i`);var a;e.debuglog=function(t){if(t=t.toUpperCase(),!r[t]){if(i.test(t)){var n=process.pid;r[t]=function(){var r=e.format.apply(e,arguments);console.error(`%s %d: %s`,t,n,r)}}else r[t]=function(){}}return r[t]};function o(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),_(n)?r.showHidden=n:n&&e._extend(r,n),C(r.showHidden)&&(r.showHidden=!1),C(r.depth)&&(r.depth=2),C(r.colors)&&(r.colors=!1),C(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),u(r,t,r.depth)}e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:`cyan`,number:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,date:`magenta`,regexp:`red`};function s(e,t){var n=o.styles[t];return n?`\x1B[`+o.colors[n][0]+`m`+e+`\x1B[`+o.colors[n][1]+`m`:e}function c(e,t){return e}function l(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(t,n,r){if(t.customInspect&&n&&O(n.inspect)&&n.inspect!==e.inspect&&!(n.constructor&&n.constructor.prototype===n)){var i=n.inspect(r,t);return x(i)||(i=u(t,i,r)),i}var a=d(t,n);if(a)return a;var o=Object.keys(n),s=l(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),D(n)&&(o.indexOf(`message`)>=0||o.indexOf(`description`)>=0))return f(n);if(o.length===0){if(O(n)){var c=n.name?`: `+n.name:``;return t.stylize(`[Function`+c+`]`,`special`)}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),`regexp`);if(E(n))return t.stylize(Date.prototype.toString.call(n),`date`);if(D(n))return f(n)}var _=``,v=!1,y=[`{`,`}`];if(g(n)&&(v=!0,y=[`[`,`]`]),O(n)&&(_=` [Function`+(n.name?`: `+n.name:``)+`]`),w(n)&&(_=` `+RegExp.prototype.toString.call(n)),E(n)&&(_=` `+Date.prototype.toUTCString.call(n)),D(n)&&(_=` `+f(n)),o.length===0&&(!v||n.length==0))return y[0]+_+y[1];if(r<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),`regexp`):t.stylize(`[Object]`,`special`);t.seen.push(n);var b=v?p(t,n,r,s,o):o.map(function(e){return m(t,n,r,s,e,v)});return t.seen.pop(),h(b,_,y)}function d(e,t){if(C(t))return e.stylize(`undefined`,`undefined`);if(x(t)){var n=`'`+JSON.stringify(t).replace(/^"|"$/g,``).replace(/'/g,`\\'`).replace(/\\"/g,`"`)+`'`;return e.stylize(n,`string`)}if(b(t))return e.stylize(``+t,`number`);if(_(t))return e.stylize(``+t,`boolean`);if(v(t))return e.stylize(`null`,`null`)}function f(e){return`[`+Error.prototype.toString.call(e)+`]`}function p(e,t,n,r,i){for(var a=[],o=0,s=t.length;o-1&&(s=a?s.split(` +`).map(function(e){return` `+e}).join(` +`).slice(2):` +`+s.split(` +`).map(function(e){return` `+e}).join(` +`))):s=e.stylize(`[Circular]`,`special`)),C(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(``+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,`name`)):(o=o.replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`),o=e.stylize(o,`string`))}return o+`: `+s}function h(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf(` +`)>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,``).length+1},0)>60?n[0]+(t===``?``:t+` + `)+` `+e.join(`, + `)+` `+n[1]:n[0]+t+` `+e.join(`, `)+` `+n[1]}e.types=tl();function g(e){return Array.isArray(e)}e.isArray=g;function _(e){return typeof e==`boolean`}e.isBoolean=_;function v(e){return e===null}e.isNull=v;function y(e){return e==null}e.isNullOrUndefined=y;function b(e){return typeof e==`number`}e.isNumber=b;function x(e){return typeof e==`string`}e.isString=x;function S(e){return typeof e==`symbol`}e.isSymbol=S;function C(e){return e===void 0}e.isUndefined=C;function w(e){return T(e)&&A(e)===`[object RegExp]`}e.isRegExp=w,e.types.isRegExp=w;function T(e){return typeof e==`object`&&!!e}e.isObject=T;function E(e){return T(e)&&A(e)===`[object Date]`}e.isDate=E,e.types.isDate=E;function D(e){return T(e)&&(A(e)===`[object Error]`||e instanceof Error)}e.isError=D,e.types.isNativeError=D;function O(e){return typeof e==`function`}e.isFunction=O;function k(e){return e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`||typeof e==`symbol`||e===void 0}e.isPrimitive=k,e.isBuffer=nl();function A(e){return Object.prototype.toString.call(e)}function j(e){return e<10?`0`+e.toString(10):e.toString(10)}var M=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function N(){var e=new Date,t=[j(e.getHours()),j(e.getMinutes()),j(e.getSeconds())].join(`:`);return[e.getDate(),M[e.getMonth()],t].join(` `)}e.log=function(){console.log(`%s - %s`,N(),e.format.apply(e,arguments))},e.inherits=rc(),e._extend=function(e,t){if(!t||!T(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var F=typeof Symbol<`u`?Symbol(`util.promisify.custom`):void 0;e.promisify=function(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type Function`);if(F&&e[F]){var n=e[F];if(typeof n!=`function`)throw TypeError(`The "util.promisify.custom" argument must be of type Function`);return Object.defineProperty(n,F,{value:n,enumerable:!1,writable:!1,configurable:!0}),n}function n(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),i=[],a=0;a{function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){for(var n=0;n`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var h={},g,_;function v(e,t,n){n||=Error;function r(e,n,r){return typeof t==`string`?t:t(e,n,r)}h[e]=(function(t){c(a,t);var n=u(a);function a(t,i,o){var c;return s(this,a),c=n.call(this,r(t,i,o)),c.code=e,c}return i(a)})(n)}function y(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?`one of ${t} ${e.slice(0,n-1).join(`, `)}, or `+e[n-1]:n===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}function b(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}function x(e,t,n){return(n===void 0||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function S(e,t,n){return typeof n!=`number`&&(n=0),n+t.length>e.length?!1:e.indexOf(t,n)!==-1}v(`ERR_AMBIGUOUS_ARGUMENT`,`The "%s" argument is ambiguous. %s`,TypeError),v(`ERR_INVALID_ARG_TYPE`,function(e,t,r){g===void 0&&(g=zl()),g(typeof e==`string`,`'name' must be a string`);var i;typeof t==`string`&&b(t,`not `)?(i=`must not be`,t=t.replace(/^not /,``)):i=`must be`;var a=x(e,` argument`)?`The ${e} ${i} ${y(t,`type`)}`:`The "${e}" ${S(e,`.`)?`property`:`argument`} ${i} ${y(t,`type`)}`;return a+=`. Received type ${n(r)}`,a},TypeError),v(`ERR_INVALID_ARG_VALUE`,function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`is invalid`;_===void 0&&(_=xl());var r=_.inspect(t);return r.length>128&&(r=`${r.slice(0,128)}...`),`The argument '${e}' ${n}. Received ${r}`},TypeError,RangeError),v(`ERR_INVALID_RETURN_VALUE`,function(e,t,r){return`Expected ${e} to be returned from the "${t}" function but got ${r&&r.constructor&&r.constructor.name?`instance of ${r.constructor.name}`:`type ${n(r)}`}.`},TypeError),v(`ERR_MISSING_ARGS`,function(){var e=[...arguments];g===void 0&&(g=zl()),g(e.length>0,`At least one arg needs to be specified`);var t=`The `,n=e.length;switch(e=e.map(function(e){return`"${e}"`}),n){case 1:t+=`${e[0]} argument`;break;case 2:t+=`${e[0]} and ${e[1]} arguments`;break;default:t+=e.slice(0,n-1).join(`, `),t+=`, and ${e[n-1]} arguments`}return`${t} must be specified`},TypeError),t.exports.codes=h}),Cl=l((e,t)=>{function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function r(e){for(var t=1;t`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _(e){return Function.toString.call(e).indexOf(`[native code]`)!==-1}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e){"@babel/helpers - typeof";return b=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},b(e)}var x=xl().inspect,S=Sl().codes.ERR_INVALID_ARG_TYPE;function C(e,t,n){return(n===void 0||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function w(e,t){if(t=Math.floor(t),e.length==0||t==0)return``;var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,n-e.length),e}var T=``,E=``,D=``,O=``,k={deepStrictEqual:`Expected values to be strictly deep-equal:`,strictEqual:`Expected values to be strictly equal:`,strictEqualObject:`Expected "actual" to be reference-equal to "expected":`,deepEqual:`Expected values to be loosely deep-equal:`,equal:`Expected values to be loosely equal:`,notDeepStrictEqual:`Expected "actual" not to be strictly deep-equal to:`,notStrictEqual:`Expected "actual" to be strictly unequal to:`,notStrictEqualObject:`Expected "actual" not to be reference-equal to "expected":`,notDeepEqual:`Expected "actual" not to be loosely deep-equal to:`,notEqual:`Expected "actual" to be loosely unequal to:`,notIdentical:`Values identical but not reference-equal:`},A=10;function j(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach(function(t){n[t]=e[t]}),Object.defineProperty(n,"message",{value:e.message}),n}function M(e){return x(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(e,t,n){var r=``,i=``,a=0,o=``,s=!1,c=M(e),l=c.split(` +`),u=M(t).split(` +`),d=0,f=``;if(n===`strictEqual`&&b(e)===`object`&&b(t)===`object`&&e!==null&&t!==null&&(n=`strictEqualObject`),l.length===1&&u.length===1&&l[0]!==u[0]){var p=l[0].length+u[0].length;if(p<=A){if((b(e)!==`object`||e===null)&&(b(t)!==`object`||t===null)&&(e!==0||t!==0))return`${k[n]} + +${l[0]} !== ${u[0]} +`}else if(n!==`strictEqualObject`&&p<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;l[0][d]===u[0][d];)d++;d>2&&(f=` + ${w(` `,d)}^`,d=0)}}for(var m=l[l.length-1],h=u[u.length-1];m===h&&(d++<2?o=` + ${m}${o}`:r=m,l.pop(),u.pop(),l.length!==0&&u.length!==0);)m=l[l.length-1],h=u[u.length-1];var g=Math.max(l.length,u.length);if(g===0){var _=c.split(` +`);if(_.length>30)for(_[26]=`${T}...${O}`;_.length>27;)_.pop();return`${k.notIdentical} + +${_.join(` +`)} +`}d>3&&(o=` +${T}...${O}${o}`,s=!0),r!==``&&(o=` + ${r}${o}`,r=``);var v=0,y=k[n]+` +${E}+ actual${O} ${D}- expected${O}`,x=` ${T}...${O} Lines skipped`;for(d=0;d1&&d>2&&(S>4?(i+=` +${T}...${O}`,s=!0):S>3&&(i+=` + ${u[d-2]}`,v++),i+=` + ${u[d-1]}`,v++),a=d,r+=` +${D}-${O} ${u[d]}`,v++;else if(u.length1&&d>2&&(S>4?(i+=` +${T}...${O}`,s=!0):S>3&&(i+=` + ${l[d-2]}`,v++),i+=` + ${l[d-1]}`,v++),a=d,i+=` +${E}+${O} ${l[d]}`,v++;else{var j=u[d],N=l[d],P=N!==j&&(!C(N,`,`)||N.slice(0,-1)!==j);P&&C(j,`,`)&&j.slice(0,-1)===N&&(P=!1,N+=`,`),P?(S>1&&d>2&&(S>4?(i+=` +${T}...${O}`,s=!0):S>3&&(i+=` + ${l[d-2]}`,v++),i+=` + ${l[d-1]}`,v++),a=d,i+=` +${E}+${O} ${N}`,r+=` +${D}-${O} ${j}`,v+=2):(i+=r,r=``,(S===1||d===0)&&(i+=` + ${N}`,v++))}if(v>20&&d30)for(m[26]=`${T}...${O}`;m.length>27;)m.pop();t=m.length===1?n.call(this,`${d} ${m[0]}`):n.call(this,`${d} + +${m.join(` +`)} +`)}else{var h=M(c),g=``,_=k[o];o===`notDeepEqual`||o===`notEqual`?(h=`${k[o]} + +${h}`,h.length>1024&&(h=`${h.slice(0,1021)}...`)):(g=`${M(l)}`,h.length>512&&(h=`${h.slice(0,509)}...`),g.length>512&&(g=`${g.slice(0,509)}...`),o===`deepEqual`||o===`equal`?h=`${_} + +${h} + +should equal + +`:g=` ${o} ${g}`),t=n.call(this,`${h}${g}`)}return Error.stackTraceLimit=u,t.generatedMessage=!r,Object.defineProperty(p(t),"name",{value:`AssertionError [ERR_ASSERTION]`,enumerable:!1,writable:!0,configurable:!0}),t.code=`ERR_ASSERTION`,t.actual=c,t.expected=l,t.operator=o,Error.captureStackTrace&&Error.captureStackTrace(p(t),s),t.stack,t.name=`AssertionError`,f(t)}return s(i,[{key:`toString`,value:function(){return`${this.name} [${this.code}]: ${this.message}`}},{key:t,value:function(e,t){return x(this,r(r({},t),{},{customInspect:!1,depth:0}))}}]),i})(m(Error),x.custom)}),wl=l((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){var t=n.call(e),r=t===`[object Arguments]`;return r||=t!==`[object Array]`&&typeof e==`object`&&!!e&&typeof e.length==`number`&&e.length>=0&&n.call(e.callee)===`[object Function]`,r}}),Tl=l((e,t)=>{var n;Object.keys||(r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=wl(),o=Object.prototype.propertyIsEnumerable,s=!o.call({toString:null},`toString`),c=o.call(function(){},`prototype`),l=[`toString`,`toLocaleString`,`valueOf`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`constructor`],u=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=(function(){if(typeof window>`u`)return!1;for(var e in window)try{if(!d[`$`+e]&&r.call(window,e)&&window[e]!==null&&typeof window[e]==`object`)try{u(window[e])}catch{return!0}}catch{return!0}return!1})(),p=function(e){if(typeof window>`u`||!f)return u(e);try{return u(e)}catch{return!1}},n=function(e){var t=typeof e==`object`&&!!e,n=i.call(e)===`[object Function]`,o=a(e),u=t&&i.call(e)===`[object String]`,d=[];if(!t&&!n&&!o)throw TypeError(`Object.keys called on a non-object`);var f=c&&n;if(u&&e.length>0&&!r.call(e,0))for(var m=0;m0)for(var h=0;h{var n=Array.prototype.slice,r=wl(),i=Object.keys,a=i?function(e){return i(e)}:Tl(),o=Object.keys;a.shim=function(){return Object.keys?(function(){var e=Object.keys(arguments);return e&&e.length===arguments.length})(1,2)||(Object.keys=function(e){return r(e)?o(n.call(e)):o(e)}):Object.keys=a,Object.keys||a},t.exports=a}),Dl=l((e,t)=>{var n=El(),r=cc()(),i=qc(),a=Object,o=i(`Array.prototype.push`),s=i(`Object.prototype.propertyIsEnumerable`),c=r?Object.getOwnPropertySymbols:null;t.exports=function(e,t){if(e==null)throw TypeError(`target must be an object`);var i=a(e);if(arguments.length===1)return i;for(var l=1;l{var n=Dl(),r=function(){if(!Object.assign)return!1;for(var e=`abcdefghijklmnopqrst`,t=e.split(``),n={},r=0;r{var n=function(e){return e!==e};t.exports=function(e,t){return e===0&&t===0?1/e==1/t:!!(e===t||n(e)&&n(t))}}),Al=l((e,t)=>{var n=kl();t.exports=function(){return typeof Object.is==`function`?Object.is:n}}),jl=l((e,t)=>{var n=El(),r=typeof Symbol==`function`&&typeof Symbol(`foo`)==`symbol`,i=Object.prototype.toString,a=Array.prototype.concat,o=Object.defineProperty,s=function(e){return typeof e==`function`&&i.call(e)===`[object Function]`},c=Wc()(),l=o&&c,u=function(e,t,n,r){if(t in e){if(r===!0){if(e[t]===n)return}else if(!s(r)||!r())return}l?o(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},d=function(e,t){var i=arguments.length>2?arguments[2]:{},o=n(t);r&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s{var n=Al(),r=jl();t.exports=function(){var e=n();return r(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),Nl=l((e,t)=>{var n=jl(),r=Kc(),i=kl(),a=Al(),o=Ml(),s=r(a(),Object);n(s,{getPolyfill:a,implementation:i,shim:o}),t.exports=s}),Pl=l((e,t)=>{t.exports=function(e){return e!==e}}),Fl=l((e,t)=>{var n=Pl();t.exports=function(){return Number.isNaN&&!Number.isNaN(`a`)?Number.isNaN:n}}),Il=l((e,t)=>{var n=jl(),r=Fl();t.exports=function(){var e=r();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}}),Ll=l((e,t)=>{var n=Kc(),r=jl(),i=Pl(),a=Fl(),o=Il(),s=n(a(),Number);r(s,{getPolyfill:a,implementation:i,shim:o}),t.exports=s}),Rl=l((e,t)=>{function n(e,t){return s(e)||o(e,t)||i(e,t)||r()}function r(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(e,t){if(e){if(typeof e==`string`)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}}function a(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=2**32}function I(e){return Object.keys(e).filter(F).concat(p(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function L(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i{function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){for(var n=0;n{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return s(e);if(n===`number`&&isNaN(e)===!1)return t.long?l(e):c(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function s(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var s=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return s*o;case`days`:case`day`:case`d`:return s*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return s*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return s*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return s*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return s;default:return}}}}function c(e){return e>=a?Math.round(e/a)+`d`:e>=i?Math.round(e/i)+`h`:e>=r?Math.round(e/r)+`m`:e>=n?Math.round(e/n)+`s`:e+`ms`}function l(e){return u(e,a,`day`)||u(e,i,`hour`)||u(e,r,`minute`)||u(e,n,`second`)||e+` ms`}function u(e,t,n){if(!(e{e=t.exports=i.debug=i.default=i,e.coerce=c,e.disable=o,e.enable=a,e.enabled=s,e.humanize=Bl(),e.names=[],e.skips=[],e.formatters={};var n;function r(t){var n=0,r;for(r in t)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e.colors[Math.abs(n)%e.colors.length]}function i(t){function i(){if(i.enabled){var t=i,r=+new Date;t.diff=r-(n||r),t.prev=n,t.curr=r,n=r;for(var a=Array(arguments.length),o=0;o{e=t.exports=Vl(),e.log=i,e.formatArgs=r,e.save=a,e.load=o,e.useColors=n,e.storage=typeof chrome<`u`&&chrome.storage!==void 0?chrome.storage.local:s(),e.colors=[`lightseagreen`,`forestgreen`,`goldenrod`,`dodgerblue`,`darkorchid`,`crimson`];function n(){return typeof window<`u`&&window.process&&window.process.type===`renderer`?!0:typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}e.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}};function r(t){var n=this.useColors;if(t[0]=(n?`%c`:``)+this.namespace+(n?` %c`:` `)+t[0]+(n?`%c `:` `)+`+`+e.humanize(this.diff),n){var r=`color: `+this.color;t.splice(1,0,r,`color: inherit`);var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,function(e){e!==`%%`&&(i++,e===`%c`&&(a=i))}),t.splice(a,0,r)}}function i(){return typeof console==`object`&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{t==null?e.storage.removeItem(`debug`):e.storage.debug=t}catch{}}function o(){var t;try{t=e.storage.debug}catch{}return!t&&typeof process<`u`&&`env`in process&&(t={}.DEBUG),t}e.enable(o());function s(){try{return window.localStorage}catch{}}}),Ul=l((e,t)=>{var n=zl(),r=Hl()(`stream-parser`);t.exports=c;var i=-1,a=0,o=1,s=2;function c(e){var t=e&&typeof e._transform==`function`,n=e&&typeof e._write==`function`;if(!t&&!n)throw Error(`must pass a Writable or Transform stream in`);r(`extending Parser into stream`),e._bytes=u,e._skipBytes=d,t&&(e._passthrough=f),t?e._transform=m:e._write=p}function l(e){r(`initializing parser stream`),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=i,e._parserCallback=null,typeof e.push==`function`&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function u(e,t){n(!this._parserCallback,`there is already a "callback" set!`),n(isFinite(e)&&e>0,`can only buffer a finite number of bytes > 0, got "`+e+`"`),this._parserInit||l(this),r(`buffering %o bytes`,e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=a}function d(e,t){n(!this._parserCallback,`there is already a "callback" set!`),n(e>0,`can only skip > 0 bytes, got "`+e+`"`),this._parserInit||l(this),r(`skipping %o bytes`,e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=o}function f(e,t){n(!this._parserCallback,`There is already a "callback" set!`),n(e>0,`can only pass through > 0 bytes, got "`+e+`"`),this._parserInit||l(this),r(`passing through %o bytes`,e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=s}function p(e,t,n){this._parserInit||l(this),r(`write(%o bytes)`,e.length),typeof t==`function`&&(n=t),_(this,e,null,n)}function m(e,t,n){this._parserInit||l(this),r(`transform(%o bytes)`,e.length),typeof t!=`function`&&(t=this._parserOutput),_(this,e,t,n)}function h(e,t,n,r){return e._parserBytesLeft<=0?r(Error(`got data but not currently parsing anything`)):t.length<=e._parserBytesLeft?function(){return g(e,t,n,r)}:function(){var i=t.slice(0,e._parserBytesLeft);return g(e,i,n,function(a){if(a)return r(a);if(t.length>i.length)return function(){return h(e,t.slice(i.length),n,r)}})}}function g(e,t,n,o){if(e._parserBytesLeft-=t.length,r(`%o bytes left for stream piece`,e._parserBytesLeft),e._parserState===a?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===s&&n(t),e._parserBytesLeft===0){var c=e._parserCallback;if(c&&e._parserState===a&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==a&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=i,e._parserBuffers.splice(0),c){var l=[];t&&l.push(t),n&&l.push(n);var u=c.length>l.length;u&&l.push(v(o));var d=c.apply(e,l);if(!u||o===d)return o}}else return o}var _=v(h);function v(e){return function(){for(var t=e.apply(this,arguments);typeof t==`function`;)t=t();return t}}}),Wl=l(e=>{var t=bl().Transform,n=Ul();function r(){t.call(this,{readableObjectMode:!0})}r.prototype=Object.create(t.prototype),r.prototype.constructor=r,n(r.prototype),e.ParserStream=r,e.sliceEq=function(e,t,n){for(var r=t,i=0;i{var n=Wl().readUInt16BE,r=Wl().readUInt32BE;function i(e,t){if(e.length<4+t)return null;var n=r(e,t);return e.length>4&15,i=e[4]&15,a=e[5]>>4&15,s=n(e,6),c=8,l=0;lt.width||e.width===t.width&&e.height>t.height?e:t}),n=e.reduce(function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t});return t.width>n.height||t.width===n.height&&t.height>n.width?t:n}t.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(u(e,t),t.sizes.length){var n=d(t.sizes),r=1;t.transforms.forEach(function(e){var t={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},n={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(e.type===`imir`&&(e.value===0?r=n[r]:(r=n[r],r=t[r],r=t[r])),e.type===`irot`)for(var i=0;i{function n(e,t){var n=Error(e);return n.code=t,n}function r(e){try{return decodeURIComponent(escape(e))}catch{return e}}function i(e,t,r){this.input=e.subarray(t,r),this.start=t;var i=String.fromCharCode.apply(null,this.input.subarray(0,4));if(i!==`II*\0`&&i!==`MM\0*`)throw n(`invalid TIFF signature`,`EBADDATA`);this.big_endian=i[0]===`M`}i.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var n=this.ifds_to_read.shift();n.offset&&this.scan_ifd(n.id,n.offset,e)}},i.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw n(`unexpected EOF`,`EBADDATA`);return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256},i.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw n(`unexpected EOF`,`EBADDATA`);return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216},i.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965},i.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},i.prototype.exif_format_read=function(e,t){var n;switch(e){case 1:case 2:return n=this.input[t],n;case 6:return n=this.input[t],n|(n&128)*33554430;case 3:return n=this.read_uint16(t),n;case 8:return n=this.read_uint16(t),n|(n&32768)*131070;case 4:return n=this.read_uint32(t),n;case 9:return n=this.read_uint32(t),n|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},i.prototype.scan_ifd=function(e,t,i){var a=this.read_uint16(t);t+=2;for(var o=0;othis.input.length)throw n(`unexpected EOF`,`EBADDATA`);for(var m=[],h=f,g=0;g0&&(this.ifds_to_read.push({id:s,offset:m[0]}),p=!0),i({is_big_endian:this.big_endian,ifd:e,tag:s,format:c,count:l,entry_offset:t+this.start,data_length:d,data_offset:f+this.start,value:m,is_subifd_link:p})===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},t.exports.ExifParser=i,t.exports.get_orientation=function(e){var t=0;try{return new i(e,0,e.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return t=e.value[0],!1}),t}catch{return-1}}}),ql=l((e,t)=>{var n=Wl().str2arr,r=Wl().sliceEq,i=Wl().readUInt32BE,a=Gl(),o=Kl(),s=n(`ftyp`);t.exports=function(e){if(r(e,4,s)){var t=a.unbox(e,0);if(t){var n=a.getMimeType(t.data);if(n){for(var c,l=t.end;;){var u=a.unbox(e,l);if(!u)break;if(l=u.end,u.boxtype===`mdat`)return;if(u.boxtype===`meta`){c=u.data;break}}if(c){var d=a.readSizeFromMeta(c);if(d){var f={width:d.width,height:d.height,type:n.type,mime:n.mime,wUnits:`px`,hUnits:`px`};if(d.variants.length>1&&(f.variants=d.variants),d.orientation&&(f.orientation=d.orientation),d.exif_location&&d.exif_location.offset+d.exif_location.length<=e.length){var p=i(e,d.exif_location.offset),m=e.slice(d.exif_location.offset+p+4,d.exif_location.offset+d.exif_location.length),h=o.get_orientation(m);h>0&&(f.orientation=h)}return f}}}}}}}),Jl=l((e,t)=>{var n=Wl().str2arr,r=Wl().sliceEq,i=Wl().readUInt16LE,a=n(`BM`);t.exports=function(e){if(!(e.length<26)&&r(e,0,a))return{width:i(e,18),height:i(e,22),type:`bmp`,mime:`image/bmp`,wUnits:`px`,hUnits:`px`}}}),Yl=l((e,t)=>{var n=Wl().str2arr,r=Wl().sliceEq,i=Wl().readUInt16LE,a=n(`GIF87a`),o=n(`GIF89a`);t.exports=function(e){if(!(e.length<10)&&(r(e,0,a)||r(e,0,o)))return{width:i(e,6),height:i(e,8),type:`gif`,mime:`image/gif`,wUnits:`px`,hUnits:`px`}}}),Xl=l((e,t)=>{var n=Wl().readUInt16LE,r=0,i=1,a=16;t.exports=function(e){var t=n(e,0),o=n(e,2),s=n(e,4);if(t===r&&o===i&&s){for(var c=[],l={width:0,height:0},u=0;ul.width||f>l.height)&&(l=p)}return{width:l.width,height:l.height,variants:c,type:`ico`,mime:`image/x-icon`,wUnits:`px`,hUnits:`px`}}}}),Zl=l((e,t)=>{var n=Wl().readUInt16BE,r=Wl().str2arr,i=Wl().sliceEq,a=Kl(),o=r(`Exif\0\0`);t.exports=function(e){if(!(e.length<2)&&e[0]===255&&e[1]===216&&e[2]===255)for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],s;r===255;)r=e[t++];if(208<=r&&r<=217||r===1)s=0;else if(192<=r&&r<=254){if(e.length-t<2)return;s=n(e,t)-2,t+=2}else return;if(r===217||r===218)return;var c;if(r===225&&s>=10&&i(e,t,o)&&(c=a.get_orientation(e.slice(t+6,t+s))),s>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(l.orientation=c),l}t+=s}}}),Ql=l((e,t)=>{var n=Wl().str2arr,r=Wl().sliceEq,i=Wl().readUInt32BE,a=n(`‰PNG\r + +`),o=n(`IHDR`);t.exports=function(e){if(!(e.length<24)&&r(e,0,a)&&r(e,12,o))return{width:i(e,16),height:i(e,20),type:`png`,mime:`image/png`,wUnits:`px`,hUnits:`px`}}}),$l=l((e,t)=>{var n=Wl().str2arr,r=Wl().sliceEq,i=Wl().readUInt32BE,a=n(`8BPS\0`);t.exports=function(e){if(!(e.length<22)&&r(e,0,a))return{width:i(e,18),height:i(e,14),type:`psd`,mime:`image/vnd.adobe.photoshop`,wUnits:`px`,hUnits:`px`}}}),eu=l((e,t)=>{function n(e){return e===32||e===9||e===13||e===10}function r(e){return typeof e==`number`&&isFinite(e)&&e>0}function i(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,o=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,s=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,c=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,l=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,u=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function d(e){var t=e.match(s),n=e.match(c),r=e.match(l);return{width:t&&(t[1]||t[2]),height:n&&(n[1]||n[2]),viewbox:r&&(r[1]||r[2])}}function f(e){return u.test(e)?e.match(u)[0]:`px`}t.exports=function(e){if(i(e)){for(var t=``,n=0;n{var n=Wl().str2arr,r=Wl().sliceEq,i=Wl().readUInt16LE,a=Wl().readUInt16BE,o=Wl().readUInt32LE,s=Wl().readUInt32BE,c=n(`II*\0`),l=n(`MM\0*`);function u(e,t,n){return n?a(e,t):i(e,t)}function d(e,t,n){return n?s(e,t):o(e,t)}function f(e,t,n){var r=u(e,t+2,n);return d(e,t+4,n)!==1||r!==3&&r!==4?null:r===3?u(e,t+8,n):d(e,t+8,n)}t.exports=function(e){if(!(e.length<8)&&(r(e,0,c)||r(e,0,l))){var t=e[0]===77,n=d(e,4,t)-8;if(!(n<0)){var i=n+8;if(!(e.length-i<2)){var a=u(e,i+0,t)*12;if(!(a<=0)&&(i+=2,!(e.length-i{var n=Wl().str2arr,r=Wl().sliceEq,i=Wl().readUInt16LE,a=Wl().readUInt32LE,o=Kl(),s=n(`RIFF`),c=n(`WEBP`);function l(e,t){if(e[t+3]===157&&e[t+4]===1&&e[t+5]===42)return{width:i(e,t+6)&16383,height:i(e,t+8)&16383,type:`webp`,mime:`image/webp`,wUnits:`px`,hUnits:`px`}}function u(e,t){if(e[t]===47){var n=a(e,t+1);return{width:(n&16383)+1,height:(n>>14&16383)+1,type:`webp`,mime:`image/webp`,wUnits:`px`,hUnits:`px`}}}function d(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<e.length)){for(;t+8=10?n||=l(e,t+8):p===`VP8L`&&m>=9?n||=u(e,t+8):p===`VP8X`&&m>=10?n||=d(e,t+8):p===`EXIF`&&(i=o.get_orientation(e.slice(t+8,t+8+m)),t=1/0),t+=8+m}if(n)return i>0&&(n.orientation=i),n}}}}),ru=l((e,t)=>{t.exports={avif:ql(),bmp:Jl(),gif:Yl(),ico:Xl(),jpeg:Zl(),png:Ql(),psd:$l(),svg:eu(),tiff:tu(),webp:nu()}}),iu=l((e,t)=>{var n=ru();function r(e){for(var t=Object.keys(n),r=0;r{var t=iu(),n=Or().IMAGE_URL_PREFIX,r=sc().Buffer;e.getImageSize=function(e){return t(new r(e.replace(n,``),`base64`))}}),ou=l((e,t)=>{var n=$(),r=ec(),i=_(),a=Xt(),o=$().maxRowLength,s=au().getImageSize;t.exports=function(e,t){var n,r;if(t._hasZ)n=t.z.length,r=o(t.z);else if(t._hasSource){var i=s(t.source);n=i.height,r=i.width}var c=a.getFromId(e,t.xaxis||`x`),l=a.getFromId(e,t.yaxis||`y`),d=c.d2c(t.x0)-t.dx/2,f=l.d2c(t.y0)-t.dy/2,p,m=[d,d+r*t.dx],h=[f,f+n*t.dy];if(c&&c.type===`log`)for(p=0;p{var n=f(),r=$(),i=r.strTranslate,a=_t(),o=ec(),s=Mo(),c=jo().STYLE;t.exports=function(e,t,l,u){var d=t.xaxis,f=t.yaxis,p=!e._context._exportedPlot&&s();r.makeTraceGroups(u,l,`im`).each(function(t){var s=n.select(this),l=t[0],u=l.trace,m=(u.zsmooth===`fast`||u.zsmooth===!1&&p)&&!u._hasZ&&u._hasSource&&d.type===`linear`&&f.type===`linear`;u._realImage=m;for(var h=l.z,g=l.x0,_=l.y0,v=l.w,y=l.h,b=u.dx,x=u.dy,S,C,w,T,E,D=0;S===void 0&&D0;)C=d.c2p(g+D*b),D--;for(D=0;T===void 0&&D0;)E=f.c2p(_+D*x),D--;if(CF[0];if(I||L){var R=S+k/2,z=T+A/2;N+=`transform:`+i(R+`px`,z+`px`)+`scale(`+(I?-1:1)+`,`+(L?-1:1)+`)`+i(-R+`px`,-z+`px`)+`;`}}M.attr(`style`,N);var B=new Promise(function(e){if(u._hasZ)e();else if(u._hasSource){if(u._canvas&&u._canvas.el.width===v&&u._canvas.el.height===y&&u._canvas.source===u.source)e();else{var t=document.createElement(`canvas`);t.width=v,t.height=y;var n=t.getContext(`2d`,{willReadFrequently:!0});u._image=u._image||new Image;var r=u._image;r.onload=function(){n.drawImage(r,0,0),u._canvas={el:t,source:u.source},e()},r.setAttribute(`src`,u.source)}}}).then(function(){var e,t;if(u._hasZ)t=j(function(e,t){var n=h[t][e];return r.isTypedArray(n)&&(n=Array.from(n)),n}),e=t.toDataURL(`image/png`);else if(u._hasSource){if(m)e=u.source;else{var n=u._canvas.el.getContext(`2d`,{willReadFrequently:!0}).getImageData(0,0,v,y).data;t=j(function(e,t){var r=4*(t*v+e);return[n[r],n[r+1],n[r+2],n[r+3]]}),e=t.toDataURL(`image/png`)}}M.attr({"xlink:href":e,height:A,width:k,x:S,y:T})});e._promises.push(B)})}}),cu=l((e,t)=>{var n=f();t.exports=function(e){n.select(e).selectAll(`.im image`).style(`opacity`,function(e){return e[0].trace.opacity})}}),lu=l((e,t)=>{var n=Dn(),r=$(),i=r.isArrayOrTypedArray,a=ec();t.exports=function(e,t,o){var s=e.cd[0],c=s.trace,l=e.xa,u=e.ya;if(!(n.inbox(t-s.x0,t-(s.x0+s.w*c.dx),0)>0||n.inbox(o-s.y0,o-(s.y0+s.h*c.dy),0)>0)){var d=Math.floor((t-s.x0)/c.dx),f=Math.floor(Math.abs(o-s.y0)/c.dy),p;if(c._hasZ?p=s.z[f][d]:c._hasSource&&(p=c._canvas.el.getContext(`2d`,{willReadFrequently:!0}).getImageData(d,f,1,1).data),p){var m=s.hi||c.hoverinfo,h;if(m){var g=m.split(`+`);g.indexOf(`all`)!==-1&&(g=[`color`]),g.indexOf(`color`)!==-1&&(h=!0)}var _=a.colormodel[c.colormodel],v=_.colormodel||c.colormodel,y=v.length,b=c._scaler(p),x=_.suffix,S=[];(c.hovertemplate||h)&&(S.push(`[`+[b[0]+x[0],b[1]+x[1],b[2]+x[2]].join(`, `)),y===4&&S.push(`, `+b[3]+x[3]),S.push(`]`),S=S.join(``),e.extraText=v.toUpperCase()+`: `+S);var C;i(c.hovertext)&&i(c.hovertext[f])?C=c.hovertext[f][d]:i(c.text)&&i(c.text[f])&&(C=c.text[f][d]);var w=u.c2p(s.y0+(f+.5)*c.dy),T=s.x0+(d+.5)*c.dx,E=s.y0+(f+.5)*c.dy,D=`[`+p.slice(0,c.colormodel.length).join(`, `)+`]`;return[r.extendFlat(e,{index:[f,d],x0:l.c2p(s.x0+d*c.dx),x1:l.c2p(s.x0+(d+1)*c.dx),y0:w,y1:w,color:b,xVal:T,xLabelVal:T,yVal:E,yLabelVal:E,zLabelVal:D,text:C,hovertemplateLabels:{zLabel:D,colorLabel:S,"color[0]Label":b[0]+x[0],"color[1]Label":b[1]+x[1],"color[2]Label":b[2]+x[2],"color[3]Label":b[3]+x[3]}})]}}}}),uu=l((e,t)=>{t.exports=function(e,t){return`xVal`in t&&(e.x=t.xVal),`yVal`in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||=t.color,e}}),du=l((e,t)=>{t.exports={attributes:tc(),supplyDefaults:nc(),calc:ou(),plot:su(),style:cu(),hoverPoints:lu(),eventData:uu(),moduleType:`trace`,name:`image`,basePlotModule:xi(),categories:[`cartesian`,`svg`,`2dMap`,`noSortingByValue`],animatable:!1,meta:{}}}),fu=l((e,t)=>{t.exports=du()}),pu=l((e,t)=>{var n=P(),r=va().attributes,i=A(),a=I(),{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:c}=ke(),l=k().extendFlat,u=De().pattern,d=i({editType:`plot`,arrayOk:!0,colorEditType:`plot`});t.exports={labels:{valType:`data_array`,editType:`calc`},label0:{valType:`number`,dflt:0,editType:`calc`},dlabel:{valType:`number`,dflt:1,editType:`calc`},values:{valType:`data_array`,editType:`calc`},marker:{colors:{valType:`data_array`,editType:`calc`},line:{color:{valType:`color`,dflt:a.defaultLine,arrayOk:!0,editType:`style`},width:{valType:`number`,min:0,dflt:0,arrayOk:!0,editType:`style`},editType:`calc`},pattern:u,editType:`calc`},text:{valType:`data_array`,editType:`plot`},hovertext:{valType:`string`,dflt:``,arrayOk:!0,editType:`style`},scalegroup:{valType:`string`,dflt:``,editType:`calc`},textinfo:{valType:`flaglist`,flags:[`label`,`text`,`value`,`percent`],extras:[`none`],editType:`calc`},hoverinfo:l({},n.hoverinfo,{flags:[`label`,`text`,`value`,`percent`,`name`]}),hovertemplate:o({},{keys:[`label`,`color`,`value`,`percent`,`text`]}),hovertemplatefallback:c(),texttemplate:s({editType:`plot`},{keys:[`label`,`color`,`value`,`percent`,`text`]}),texttemplatefallback:c({editType:`plot`}),textposition:{valType:`enumerated`,values:[`inside`,`outside`,`auto`,`none`],dflt:`auto`,arrayOk:!0,editType:`plot`},textfont:l({},d,{}),insidetextorientation:{valType:`enumerated`,values:[`horizontal`,`radial`,`tangential`,`auto`],dflt:`auto`,editType:`plot`},insidetextfont:l({},d,{}),outsidetextfont:l({},d,{}),automargin:{valType:`boolean`,dflt:!1,editType:`plot`},showlegend:l({},n.showlegend,{arrayOk:!0}),legend:l({},n.legend,{arrayOk:!0}),legendrank:l({},n.legendrank,{arrayOk:!0}),title:{text:{valType:`string`,dflt:``,editType:`plot`},font:l({},d,{}),position:{valType:`enumerated`,values:[`top left`,`top center`,`top right`,`middle center`,`bottom left`,`bottom center`,`bottom right`],editType:`plot`},editType:`plot`},domain:r({name:`pie`,trace:!0,editType:`calc`}),hole:{valType:`number`,min:0,max:1,dflt:0,editType:`calc`},sort:{valType:`boolean`,dflt:!0,editType:`calc`},direction:{valType:`enumerated`,values:[`clockwise`,`counterclockwise`],dflt:`counterclockwise`,editType:`calc`},rotation:{valType:`angle`,dflt:0,editType:`calc`},pull:{valType:`number`,min:0,max:1,dflt:0,arrayOk:!0,editType:`calc`}}}),mu=l((e,t)=>{var n=_(),r=$(),i=pu(),a=va().defaults,o=Va().handleText,s=$().coercePattern;function c(e,t){var i=r.isArrayOrTypedArray(e),a=r.isArrayOrTypedArray(t),o=Math.min(i?e.length:1/0,a?t.length:1/0);if(isFinite(o)||(o=0),o&&a){for(var s,c=0;c0){s=!0;break}}s||(o=0)}return{hasLabels:i,hasValues:a,len:o}}function l(e,t,n,r,i){r(`marker.line.width`)&&r(`marker.line.color`,i?void 0:n.paper_bgcolor),s(r,`marker.pattern`,r(`marker.colors`)),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=n.paper_bgcolor)}function u(e,t,n,s){function u(n,a){return r.coerce(e,t,i,n,a)}var d=c(u(`labels`),u(`values`)),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(u(`label0`),u(`dlabel`)),!f){t.visible=!1;return}t._length=f,l(e,t,s,u,!0),u(`scalegroup`);var p=u(`text`),m=u(`texttemplate`);u(`texttemplatefallback`);var h;if(m||(h=u(`textinfo`,r.isArrayOrTypedArray(p)?`text+percent`:`percent`)),u(`hovertext`),u(`hovertemplate`),u(`hovertemplatefallback`),m||h&&h!==`none`){var g=u(`textposition`);o(e,t,s,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||g===`auto`||g===`outside`)&&u(`automargin`),(g===`inside`||g===`auto`||Array.isArray(g))&&u(`insidetextorientation`)}else h===`none`&&u(`textposition`,`none`);a(t,s,u);var _=u(`hole`);if(u(`title.text`)){var v=u(`title.position`,_?`middle center`:`top center`);!_&&v===`middle center`&&(t.title.position=`top center`),r.coerceFont(u,`title.font`,s.font)}u(`sort`),u(`direction`),u(`rotation`),u(`pull`)}t.exports={handleLabelsAndValues:c,handleMarkerDefaults:l,supplyDefaults:u}}),hu=l((e,t)=>{t.exports={hiddenlabels:{valType:`data_array`,editType:`calc`},piecolorway:{valType:`colorlist`,editType:`calc`},extendpiecolors:{valType:`boolean`,dflt:!0,editType:`calc`}}}),gu=l((e,t)=>{var n=$(),r=hu();t.exports=function(e,t){function i(i,a){return n.coerce(e,t,r,i,a)}i(`hiddenlabels`),i(`piecolorway`,t.colorway),i(`extendpiecolors`)}}),_u=l((e,t)=>{var n=_(),r=O(),i=L(),a={};function o(e,t){var r=[],i=e._fullLayout,a=i.hiddenlabels||[],o=t.labels,c=t.marker.colors||[],l=t.values,u=t._length,d=t._hasValues&&u,f,p;if(t.dlabel)for(o=Array(u),f=0;f=0}),(t.type===`funnelarea`?_:t.sort)&&r.sort(function(e,t){return t.v-e.v}),r[0]&&(r[0].vTotal=g),r}function s(e){return function(t,n){return!t||(t=r(t),!t.isValid())?!1:(t=i.addOpacity(t,t.getAlpha()),e[n]||(e[n]=t),t)}}function c(e,t){var n=(t||{}).type;n||=`pie`;var r=e._fullLayout,i=e.calcdata,o=r[n+`colorway`],s=r[`_`+n+`colormap`];r[`extend`+n+`colors`]&&(o=l(o,a));for(var c=0,u=0;u{var n=Ht().appendArrayMultiPointValues;t.exports=function(e,t){var r={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return e.pts.length===1&&(r.pointNumber=r.i=e.pts[0]),n(r,t,e.pts),t.type===`funnelarea`&&(delete r.v,delete r.i),r}}),yu=l((e,t)=>{var n=f(),r=gt(),i=Dn(),a=L(),o=Gt(),s=$(),c=s.strScale,l=s.strTranslate,u=yt(),d=Ga(),p=d.recordMinTextSize,m=d.clearMinTextSize,h=ti().TEXTPAD,g=mn(),_=vu(),v=$().isValidTextValue;function y(e,t){var i=e._context.staticPlot,a=e._fullLayout,d=a._size;m(`pie`,a),w(t,e),V(t,d);var f=s.makeTraceGroups(a._pielayer,t,`trace`).each(function(t){var f=n.select(this),m=t[0],h=m.trace;U(t),f.attr(`stroke-linejoin`,`round`),f.each(function(){var _=n.select(this).selectAll(`g.slice`).data(t);_.enter().append(`g`).classed(`slice`,!0),_.exit().remove();var v=[[[],[]],[[],[]]],y=!1;_.each(function(r,c){if(r.hidden){n.select(this).selectAll(`path,g`).remove();return}r.pointNumber=r.i,r.curveNumber=h.index,v[r.pxmid[1]<0?0:1][r.pxmid[0]<0?0:1].push(r);var l=m.cx,d=m.cy,f=n.select(this),_=f.selectAll(`path.surface`).data([r]);if(_.enter().append(`path`).classed(`surface`,!0).style({"pointer-events":i?`none`:`all`}),f.call(x,e,t),h.pull){var b=+g.castOption(h.pull,r.pts)||0;b>0&&(l+=b*r.pxmid[0],d+=b*r.pxmid[1])}r.cxFinal=l,r.cyFinal=d;function w(e,t,n,i){var a=i*(t[0]-e[0]),o=i*(t[1]-e[1]);return`a`+i*m.r+`,`+i*m.r+` 0 `+r.largeArc+(n?` 1 `:` 0 `)+a+`,`+o}var E=h.hole;if(r.v===m.vTotal){var D=`M`+(l+r.px0[0])+`,`+(d+r.px0[1])+w(r.px0,r.pxmid,!0,1)+w(r.pxmid,r.px0,!0,1)+`Z`;E?_.attr(`d`,`M`+(l+E*r.px0[0])+`,`+(d+E*r.px0[1])+w(r.px0,r.pxmid,!1,E)+w(r.pxmid,r.px0,!1,E)+`Z`+D):_.attr(`d`,D)}else{var O=w(r.px0,r.px1,!0,1);if(E){var k=1-E;_.attr(`d`,`M`+(l+E*r.px1[0])+`,`+(d+E*r.px1[1])+w(r.px1,r.px0,!1,E)+`l`+k*r.px0[0]+`,`+k*r.px0[1]+O+`Z`)}else _.attr(`d`,`M`+l+`,`+d+`l`+r.px0[0]+`,`+r.px0[1]+O+`Z`)}G(e,r,m);var A=g.castOption(h.textposition,r.pts),j=f.selectAll(`g.slicetext`).data(r.text&&A!==`none`?[0]:[]);j.enter().append(`g`).classed(`slicetext`,!0),j.exit().remove(),j.each(function(){var i=s.ensureSingle(n.select(this),`text`,``,function(e){e.attr(`data-notex`,1)}),f=s.ensureUniformFontSize(e,A===`outside`?S(h,r,a.font):C(h,r,a.font));i.text(r.text).attr({class:`slicetext`,transform:``,"text-anchor":`middle`}).call(o.font,f).call(u.convertToTspans,e);var g=o.bBox(i.node()),_;if(A===`outside`)_=N(g,r);else if(_=T(g,r,m),A===`auto`&&_.scale<1){var v=s.ensureUniformFontSize(e,h.outsidetextfont);i.call(o.font,v),g=o.bBox(i.node()),_=N(g,r)}var b=_.textPosAngle,x=b===void 0?r.pxmid:W(m.r,b);if(_.targetX=l+x[0]*_.rCenter+(_.x||0),_.targetY=d+x[1]*_.rCenter+(_.y||0),K(_,g),_.outside){var w=_.targetY;r.yLabelMin=w-g.height/2,r.yLabelMid=w,r.yLabelMax=w+g.height/2,r.labelExtraX=0,r.labelExtraY=0,y=!0}_.fontSize=f.size,p(h.type,_,a),t[c].transform=_,s.setTransormAndDisplay(i,_)})});var w=n.select(this).selectAll(`g.titletext`).data(h.title.text?[0]:[]);if(w.enter().append(`g`).classed(`titletext`,!0),w.exit().remove(),w.each(function(){var t=s.ensureSingle(n.select(this),`text`,``,function(e){e.attr(`data-notex`,1)}),r=h.title.text;h._meta&&(r=s.templateString(r,h._meta)),t.text(r).attr({class:`titletext`,transform:``,"text-anchor":`middle`}).call(o.font,h.title.font).call(u.convertToTspans,e);var i=h.title.position===`middle center`?P(m):F(m,d);t.attr(`transform`,l(i.x,i.y)+c(Math.min(1,i.scale))+l(i.tx,i.ty))}),y&&B(v,h),b(_,h),y&&h.automargin){var E=o.bBox(f.node()),D=h.domain,O=d.w*(D.x[1]-D.x[0]),k=d.h*(D.y[1]-D.y[0]),A=(.5*O-m.r)/d.w,j=(.5*k-m.r)/d.h;r.autoMargin(e,`pie.`+h.uid+`.automargin`,{xl:D.x[0]-A,xr:D.x[1]+A,yb:D.y[0]-j,yt:D.y[1]+j,l:Math.max(m.cx-m.r-E.left,0),r:Math.max(E.right-(m.cx+m.r),0),b:Math.max(E.bottom-(m.cy+m.r),0),t:Math.max(m.cy-m.r-E.top,0),pad:5})}})});setTimeout(function(){f.selectAll(`tspan`).each(function(){var e=n.select(this);e.attr(`dy`)&&e.attr(`dy`,e.attr(`dy`))})},0)}function b(e,t){e.each(function(e){var r=n.select(this);if(!e.labelExtraX&&!e.labelExtraY){r.select(`path.textline`).remove();return}var i=r.select(`g.slicetext text`);e.transform.targetX+=e.labelExtraX,e.transform.targetY+=e.labelExtraY,s.setTransormAndDisplay(i,e.transform);var o=e.cxFinal+e.pxmid[0],c=e.cyFinal+e.pxmid[1],l=`M`+o+`,`+c,u=(e.yLabelMax-e.yLabelMin)*(e.pxmid[0]<0?-1:1)/4;if(e.labelExtraX){var d=e.labelExtraX*e.pxmid[1]/e.pxmid[0],f=e.yLabelMid+e.labelExtraY-(e.cyFinal+e.pxmid[1]);l+=Math.abs(d)>Math.abs(f)?`l`+f*e.pxmid[0]/e.pxmid[1]+`,`+f+`H`+(o+e.labelExtraX+u):`l`+e.labelExtraX+`,`+d+`v`+(f-d)+`h`+u}else l+=`V`+(e.yLabelMid+e.labelExtraY)+`h`+u;s.ensureSingle(r,`path`,`textline`).call(a.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:l,fill:`none`})})}function x(e,t,r){var a=r[0],o=a.cx,c=a.cy,l=a.trace,u=l.type===`funnelarea`;`_hasHoverLabel`in l||(l._hasHoverLabel=!1),`_hasHoverEvent`in l||(l._hasHoverEvent=!1),e.on(`mouseover`,function(e){var r=t._fullLayout,d=t._fullData[l.index];if(!(t._dragging||r.hovermode===!1)){var f=d.hoverinfo;if(Array.isArray(f)&&(f=i.castHoverinfo({hoverinfo:[g.castOption(f,e.pts)],_module:l._module},r,0)),f===`all`&&(f=`label+text+value+percent+name`),d.hovertemplate||f!==`none`&&f!==`skip`&&f){var p=e.rInscribed||0,m=o+e.pxmid[0]*(1-p),h=c+e.pxmid[1]*(1-p),v=r.separators,y=[];if(f&&f.indexOf(`label`)!==-1&&y.push(e.label),e.text=g.castOption(d.hovertext||d.text,e.pts),f&&f.indexOf(`text`)!==-1){var b=e.text;s.isValidTextValue(b)&&y.push(b)}e.value=e.v,e.valueLabel=g.formatPieValue(e.v,v),f&&f.indexOf(`value`)!==-1&&y.push(e.valueLabel),e.percent=e.v/a.vTotal,e.percentLabel=g.formatPiePercent(e.percent,v),f&&f.indexOf(`percent`)!==-1&&y.push(e.percentLabel);var x=d.hoverlabel,S=x.font,C=[];i.loneHover({trace:l,x0:m-p*a.r,x1:m+p*a.r,y:h,_x0:u?o+e.TL[0]:m-p*a.r,_x1:u?o+e.TR[0]:m+p*a.r,_y0:u?c+e.TL[1]:h-p*a.r,_y1:u?c+e.BL[1]:h+p*a.r,text:y.join(`
`),name:d.hovertemplate||f.indexOf(`name`)!==-1?d.name:void 0,idealAlign:e.pxmid[0]<0?`left`:`right`,color:g.castOption(x.bgcolor,e.pts)||e.color,borderColor:g.castOption(x.bordercolor,e.pts),fontFamily:g.castOption(S.family,e.pts),fontSize:g.castOption(S.size,e.pts),fontColor:g.castOption(S.color,e.pts),nameLength:g.castOption(x.namelength,e.pts),textAlign:g.castOption(x.align,e.pts),hovertemplate:g.castOption(d.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[_(e,d)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t,inOut_bbox:C}),e.bbox=C[0],l._hasHoverLabel=!0}l._hasHoverEvent=!0,t.emit(`plotly_hover`,{points:[_(e,d)],event:n.event})}}),e.on(`mouseout`,function(e){var r=t._fullLayout,a=t._fullData[l.index],o=n.select(this).datum();l._hasHoverEvent&&=(e.originalEvent=n.event,t.emit(`plotly_unhover`,{points:[_(o,a)],event:n.event}),!1),l._hasHoverLabel&&=(i.loneUnhover(r._hoverlayer.node()),!1)}),e.on(`click`,function(e){var r=t._fullLayout,a=t._fullData[l.index];t._dragging||r.hovermode===!1||(t._hoverdata=[_(e,a)],i.click(t,n.event))})}function S(e,t,n){return{color:g.castOption(e.outsidetextfont.color,t.pts)||g.castOption(e.textfont.color,t.pts)||n.color,family:g.castOption(e.outsidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||n.family,size:g.castOption(e.outsidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||n.size,weight:g.castOption(e.outsidetextfont.weight,t.pts)||g.castOption(e.textfont.weight,t.pts)||n.weight,style:g.castOption(e.outsidetextfont.style,t.pts)||g.castOption(e.textfont.style,t.pts)||n.style,variant:g.castOption(e.outsidetextfont.variant,t.pts)||g.castOption(e.textfont.variant,t.pts)||n.variant,textcase:g.castOption(e.outsidetextfont.textcase,t.pts)||g.castOption(e.textfont.textcase,t.pts)||n.textcase,lineposition:g.castOption(e.outsidetextfont.lineposition,t.pts)||g.castOption(e.textfont.lineposition,t.pts)||n.lineposition,shadow:g.castOption(e.outsidetextfont.shadow,t.pts)||g.castOption(e.textfont.shadow,t.pts)||n.shadow}}function C(e,t,n){var r=g.castOption(e.insidetextfont.color,t.pts);!r&&e._input.textfont&&(r=g.castOption(e._input.textfont.color,t.pts));var i=g.castOption(e.insidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||n.family,o=g.castOption(e.insidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||n.size,s=g.castOption(e.insidetextfont.weight,t.pts)||g.castOption(e.textfont.weight,t.pts)||n.weight,c=g.castOption(e.insidetextfont.style,t.pts)||g.castOption(e.textfont.style,t.pts)||n.style,l=g.castOption(e.insidetextfont.variant,t.pts)||g.castOption(e.textfont.variant,t.pts)||n.variant,u=g.castOption(e.insidetextfont.textcase,t.pts)||g.castOption(e.textfont.textcase,t.pts)||n.textcase,d=g.castOption(e.insidetextfont.lineposition,t.pts)||g.castOption(e.textfont.lineposition,t.pts)||n.lineposition,f=g.castOption(e.insidetextfont.shadow,t.pts)||g.castOption(e.textfont.shadow,t.pts)||n.shadow;return{color:r||a.contrast(t.color),family:i,size:o,weight:s,style:c,variant:l,textcase:u,lineposition:d,shadow:f}}function w(e,t){for(var n,r,i=0;i=-4;_-=2)g(Math.PI*_,`tan`);for(_=4;_>=-4;_-=2)g(Math.PI*(_+1),`tan`)}if(u||f){for(_=4;_>=-4;_-=2)g(Math.PI*(_+1.5),`rad`);for(_=4;_>=-4;_-=2)g(Math.PI*(_+.5),`rad`)}}if(o||p||u){var v=Math.sqrt(e.width*e.width+e.height*e.height);if(h={scale:i*r*2/v,rCenter:1-i,rotate:0},h.textPosAngle=(t.startangle+t.stopangle)/2,h.scale>=1)return h;m.push(h)}(p||f)&&(h=D(e,r,a,s,c),h.textPosAngle=(t.startangle+t.stopangle)/2,m.push(h)),(p||d)&&(h=O(e,r,a,s,c),h.textPosAngle=(t.startangle+t.stopangle)/2,m.push(h));for(var y=0,b=0,x=0;x=1)break}return m[y]}function E(e,t){var n=e.startangle,r=e.stopangle;return n>t&&t>r||n0?1:-1)/2,y:a/(1+n*n/(r*r)),outside:!0}}function P(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function F(e,t){var n=1,r=1,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=z(a),a.title.position.indexOf(`top`)===-1?a.title.position.indexOf(`bottom`)!==-1&&(o.y+=(1+i)*e.r):(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height);var c=I(e.r,e.trace.aspectratio),l=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf(`left`)===-1?a.title.position.indexOf(`center`)===-1?a.title.position.indexOf(`right`)!==-1&&(l+=c,o.x+=(1+i)*c,s.tx-=e.titleBox.width/2):l*=2:(l+=c,o.x-=(1+i)*c,s.tx+=e.titleBox.width/2),n=l/e.titleBox.width,r=R(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(n,r),tx:s.tx,ty:s.ty}}function I(e,t){return e/(t===void 0?1:t)}function R(e,t){var n=e.trace,r=t.h*(n.domain.y[1]-n.domain.y[0]);return Math.min(e.titleBox.height,r/2)}function z(e){var t=e.pull;if(!t)return 0;var n;if(s.isArrayOrTypedArray(t))for(t=0,n=0;nt&&(t=e.pull[n]);return t}function B(e,t){var n,r,i,a,o,c,l,u,d,f,p,m,h;function _(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}function y(e,n){n||={};var i=n.labelExtraY+(r?n.yLabelMax:n.yLabelMin),u=r?e.yLabelMin:e.yLabelMax,d=r?e.yLabelMax:e.yLabelMin,p=e.cyFinal+o(e.px0[1],e.px1[1]),m=i-u,h,_,v,y,b,x;if(m*l>0&&(e.labelExtraY=m),s.isArrayOrTypedArray(t.pull))for(_=0;_=(g.castOption(t.pull,v.pts)||0))&&((e.pxmid[1]-v.pxmid[1])*l>0?(y=v.cyFinal+o(v.px0[1],v.px1[1]),m=y-u-e.labelExtraY,m*l>0&&(e.labelExtraY+=m)):(d+e.labelExtraY-p)*l>0&&(h=3*c*Math.abs(_-f.indexOf(e)),b=v.cxFinal+a(v.px0[0],v.px1[0]),x=b+h-(e.cxFinal+e.pxmid[0])-e.labelExtraX,x*c>0&&(e.labelExtraX+=x)))}for(r=0;r<2;r++)for(i=r?_:v,o=r?Math.max:Math.min,l=r?1:-1,n=0;n<2;n++){for(a=n?Math.max:Math.min,c=n?1:-1,u=e[r][n],u.sort(i),d=e[1-r][n],f=d.concat(u),m=[],p=0;p1?(l=n.r,u=l/i.aspectratio):(u=n.r,l=u*i.aspectratio),l*=(1+i.baseratio)/2,c=l*u}o=Math.min(o,c/n.vTotal)}for(r=0;rt.vTotal/2),l.halfangle=Math.PI*Math.min(l.v/t.vTotal,.5),l.ring=1-r.hole,l.rInscribed=M(l,t))}function W(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function G(e,t,n){var r=e._fullLayout,i=n.trace,a=i.texttemplate,o=i.textinfo;if(!a&&o&&o!==`none`){var c=o.split(`+`),l=function(e){return c.indexOf(e)!==-1},u=l(`label`),d=l(`text`),f=l(`value`),p=l(`percent`),m=r.separators,h=u?[t.label]:[];if(d){var _=g.getFirstFilled(i.text,t.pts);v(_)&&h.push(_)}f&&h.push(g.formatPieValue(t.v,m)),p&&h.push(g.formatPiePercent(t.v/n.vTotal,m)),t.text=h.join(`
`)}function y(e){return{label:e.label,value:e.v,valueLabel:g.formatPieValue(e.v,r.separators),percent:e.v/n.vTotal,percentLabel:g.formatPiePercent(e.v/n.vTotal,r.separators),color:e.color,text:e.text,customdata:s.castOption(i,e.i,`customdata`)}}if(a){var b=s.castOption(i,t.i,`texttemplate`);if(!b)t.text=``;else{var x=y(t),S=g.getFirstFilled(i.text,t.pts);(v(S)||S===``)&&(x.text=S),t.text=s.texttemplateString({data:[x,i._meta],fallback:i.texttemplatefallback,labels:x,locale:e._fullLayout._d3locale,template:b})}}}function K(e,t){var n=e.rotate*Math.PI/180,r=Math.cos(n),i=Math.sin(n),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*r-o*i,e.textY=a*i+o*r,e.noCenter=!0}t.exports={plot:y,formatSliceLabel:G,transformInsideText:T,determineInsideTextFont:C,positionTitleOutside:F,prerenderTitles:w,layoutAreas:V,attachFxHandlers:x,computeTransform:K}}),bu=l((e,t)=>{var n=f(),r=gn(),i=Ga().resizeText;t.exports=function(e){var t=e._fullLayout._pielayer.selectAll(`.trace`);i(e,t,`pie`),t.each(function(t){var i=t[0].trace,a=n.select(this);a.style({opacity:i.opacity}),a.selectAll(`path.surface`).each(function(t){n.select(this).call(r,t,i,e)})})}}),xu=l(e=>{var t=gt();e.name=`pie`,e.plot=function(n,r,i,a){t.plotBasePlot(e.name,n,r,i,a)},e.clean=function(n,r,i,a){t.cleanBasePlot(e.name,n,r,i,a)}}),Su=l((e,t)=>{t.exports={attributes:pu(),supplyDefaults:mu().supplyDefaults,supplyLayoutDefaults:gu(),layoutAttributes:hu(),calc:_u().calc,crossTraceCalc:_u().crossTraceCalc,plot:yu().plot,style:bu(),styleOne:gn(),moduleType:`trace`,name:`pie`,basePlotModule:xu(),categories:[`pie-like`,`pie`,`showLegend`],meta:{}}}),Cu=l((e,t)=>{t.exports=Su()}),wu=l((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l{var n=wu();function r(){this.regionalOptions=[],this.regionalOptions[``]={invalidCalendar:`Calendar {0} not found`,invalidDate:`Invalid {0} date`,invalidMonth:`Invalid {0} month`,invalidYear:`Invalid {0} year`,differentCalendars:`Cannot mix {0} and {1} dates`},this.local=this.regionalOptions[``],this.calendars={},this._localCals={}}n(r.prototype,{instance:function(e,t){e=(e||`gregorian`).toLowerCase(),t||=``;var n=this._localCals[e+`-`+t];if(!n&&this.calendars[e]&&(n=new this.calendars[e](t),this._localCals[e+`-`+t]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[``].invalidCalendar).replace(/\{0\}/,e);return n},newDate:function(e,t,n,r,i){return r=(e!=null&&e.year?e.calendar():typeof r==`string`?this.instance(r,i):r)||this.instance(),r.newDate(e,t,n)},substituteDigits:function(e){return function(t){return(t+``).replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,t){return function(n){for(var r=``,i=0;n>0;){var a=n%10;r=(a===0?``:e[a]+t[i])+r,i++,n=Math.floor(n/10)}return r.indexOf(e[1]+t[1])===0&&(r=r.substr(1)),r||e[0]}}});function i(e,t,n,r){if(this._calendar=e,this._year=t,this._month=n,this._day=r,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[``].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(e,t){return e=``+e,`000000`.substring(0,t-e.length)+e}n(i.prototype,{newDate:function(e,t,n){return this._calendar.newDate(e??this,t,n)},year:function(e){return arguments.length===0?this._year:this.set(e,`y`)},month:function(e){return arguments.length===0?this._month:this.set(e,`m`)},day:function(e){return arguments.length===0?this._day:this.set(e,`d`)},date:function(e,t,n){if(!this._calendar.isValid(e,t,n))throw(c.local.invalidDate||c.regionalOptions[``].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=n,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[``].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year===e._year?this._month===e._month?this._day-e._day:this.monthOfYear()-e.monthOfYear():this._year-e._year;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?`-`:``)+a(Math.abs(this.year()),4)+`-`+a(this.month(),2)+`-`+a(this.day(),2)}});function o(){this.shortYearCutoff=`+10`}n(o.prototype,{_validateLevel:0,newDate:function(e,t,n){return e==null?this.today():(e.year&&(this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[``].invalidDate),n=e.day(),t=e.month(),e=e.year()),new i(this,e,t,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[``].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[``].invalidYear);return(t.year()<0?`-`:``)+a(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[``].invalidYear),12},monthOfYear:function(e,t){var n=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[``].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(e,t){var n=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,n,this.minDay,c.local.invalidMonth||c.regionalOptions[``].invalidMonth),n},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[``].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[``].invalidDate);return r.toJD()-this.newDate(r.year(),this.fromMonthOfYear(r.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[``].invalidDate);return(Math.floor(this.toJD(r))+2)%this.daysInWeek()},extraInfo:function(e,t,n){return this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[``].invalidDate),{}},add:function(e,t,n){return this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[``].invalidDate),this._correctAdd(e,this._add(e,t,n),t,n)},_add:function(e,t,n){if(this._validateLevel++,n===`d`||n===`w`){var r=e.toJD()+t*(n===`w`?this.daysInWeek():1),i=e.calendar().fromJD(r);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+(n===`y`?t:0),o=e.monthOfYear()+(n===`m`?t:0),i=e.day();n===`y`?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):n===`m`&&(function(e){for(;ot-1+e.minMonth;)a++,o-=t,t=e.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,n,r){if(!this.hasYearZero&&(r===`y`||r===`m`)&&(t[0]===0||e.year()>0!=t[0]>0)){var i={y:[1,1,`y`],m:[1,this.monthsInYear(-1),`m`],w:[this.daysInWeek(),this.daysInYear(-1),`d`],d:[1,this.daysInYear(-1),`d`]}[r],a=n<0?-1:1;t=this._add(e,n*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,n){this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[``].invalidDate);var r=n===`y`?t:e.year(),i=n===`m`?t:e.month(),a=n===`d`?t:e.day();return(n===`y`||n===`m`)&&(a=Math.min(a,this.daysInMonth(r,i))),e.date(r,i,a)},isValid:function(e,t,n){this._validateLevel++;var r=this.hasYearZero||e!==0;if(r){var i=this.newDate(e,t,this.minDay);r=t>=this.minMonth&&t-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),l=i-(c>2.5?4716:4715);return l<=0&&l--,this.newDate(l,c,s)},toJSDate:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[``].invalidDate),i=new Date(r.year(),r.month()-1,r.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var c=t.exports=new r;c.cdate=i,c.baseCalendar=o,c.calendars.gregorian=s}),Eu=l(()=>{var e=wu(),t=Tu();e(t.regionalOptions[``],{invalidArguments:`Invalid arguments`,invalidFormat:`Cannot format a date from another calendar`,missingNumberAt:`Missing number at position {0}`,unknownNameAt:`Unknown name at position {0}`,unexpectedLiteralAt:`Unexpected literal at position {0}`,unexpectedText:`Additional text found at end`}),t.local=t.regionalOptions[``],e(t.cdate.prototype,{formatDate:function(e,t){return typeof e!=`string`&&(t=e,e=``),this._calendar.formatDate(e||``,this,t)}}),e(t.baseCalendar.prototype,{UNIX_EPOCH:t.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:t.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:`yyyy-mm-dd`,COOKIE:`D, dd M yyyy`,FULL:`DD, MM d, yyyy`,ISO_8601:`yyyy-mm-dd`,JULIAN:`J`,RFC_822:`D, d M yy`,RFC_850:`DD, dd-M-yy`,RFC_1036:`D, d M yy`,RFC_1123:`D, d M yyyy`,RFC_2822:`D, d M yyyy`,RSS:`D, d M yy`,TICKS:`!`,TIMESTAMP:`@`,W3C:`yyyy-mm-dd`,formatDate:function(e,n,r){if(typeof e!=`string`&&(r=n,n=e,e=``),!n)return``;if(n.calendar()!==this)throw t.local.invalidFormat||t.regionalOptions[``].invalidFormat;e||=this.local.dateFormat,r||={};for(var i=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.monthNumbers||this.local.monthNumbers,s=r.monthNamesShort||this.local.monthNamesShort,c=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(t,n){for(var r=1;b+r1},d=function(e,t,n,r){var i=``+t;if(u(e,r))for(;i.length1},y=function(e,r){var i=v(e,r),a=[2,3,i?4:2,i?4:2,10,11,20][`oyYJ@!`.indexOf(e)+1],o=RegExp(`^-?\\d{1,`+a+`}`),s=n.substring(T).match(o);if(!s)throw(t.local.missingNumberAt||t.regionalOptions[``].missingNumberAt).replace(/\{0\}/,T);return T+=s[0].length,parseInt(s[0],10)},b=this,x=function(){if(typeof c==`function`){v(`m`);var e=c.call(b,n.substring(T));return T+=e.length,e}return y(`m`)},S=function(e,r,i,a){for(var o=v(e,a)?i:r,s=0;s-1){p=1,m=h;for(var O=this.daysInMonth(f,p);m>O;O=this.daysInMonth(f,p))p++,m-=O}return d>-1?this.fromJD(d):this.newDate(f,p,m)},determineDate:function(e,t,n,r,i){n&&typeof n!=`object`&&(i=r,r=n,n=null),typeof r!=`string`&&(i=r,r=``);var a=this;return t=t?t.newDate():null,e=e==null?t:typeof e==`string`?function(e){try{return a.parseDate(r,e,i)}catch{}e=e.toLowerCase();for(var t=(e.match(/^c/)&&n?n.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||`d`),s=o.exec(e);return t}(e):typeof e==`number`?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,`d`):a.newDate(e),e}})}),Du=l(()=>{var e=Tu(),t=wu(),n=e.instance();function r(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}r.prototype=new e.baseCalendar,t(r.prototype,{name:`Chinese`,jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:`Chinese`,epochs:[`BEC`,`EC`],monthNumbers:function(e,t){if(typeof e==`string`){var n=e.match(a);return n?n[0]:``}var r=this._validateYear(e),i=e.month(),o=``+this.toChineseMonth(r,i);return t&&o.length<2&&(o=`0`+o),this.isIntercalaryMonth(r,i)&&(o+=`i`),o},monthNames:function(e){if(typeof e==`string`){var t=e.match(o);return t?t[0]:``}var n=this._validateYear(e),r=e.month(),i=[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`][this.toChineseMonth(n,r)-1];return this.isIntercalaryMonth(n,r)&&(i=`闰`+i),i},monthNamesShort:function(e){if(typeof e==`string`){var t=e.match(s);return t?t[0]:``}var n=this._validateYear(e),r=e.month(),i=[`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`,`十`,`十一`,`十二`][this.toChineseMonth(n,r)-1];return this.isIntercalaryMonth(n,r)&&(i=`闰`+i),i},parseMonth:function(e,t){e=this._validateYear(e);var n=parseInt(t),r;if(isNaN(n))t[0]===`闰`&&(r=!0,t=t.substring(1)),t[t.length-1]===`月`&&(t=t.substring(0,t.length-1)),n=1+[`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`,`十`,`十一`,`十二`].indexOf(t);else{var i=t[t.length-1];r=i===`i`||i===`I`}return this.toMonthIndex(e,n,r)},dayNames:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayNamesShort:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],dayNamesMin:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],digits:null,dateFormat:`yyyy/mm/dd`,firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!=`number`||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(t,n,r){var i=this.intercalaryMonth(t);if(r&&n!==i||n<1||n>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&&n<=i?n-1:n:n-1},toChineseMonth:function(t,n){t.year&&(t=t.year(),n=t.month());var r=this.intercalaryMonth(t);if(n<0||n>(r?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?n>13},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var n=this.intercalaryMonth(e);return!!n&&n===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(t,r,i){var a=l[this._validateYear(t,e.local.invalidyear)-l[0]],o=a>>9&4095,s=a>>5&15,c=a&31,u=n.newDate(o,s,c);u.add(4-(u.dayOfWeek()||7),`d`);var d=this.toJD(t,r,i)-u.toJD();return 1+Math.floor(d/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(t,n){t.year&&(n=t.month(),t=t.year()),t=this._validateYear(t);var r=c[t-c[0]],i=r>>13?12:11;if(n>i)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-n?30:29},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(t,r,i){var a=this._validate(t,s,i,e.local.invalidDate);t=this._validateYear(a.year()),r=a.month(),i=a.day();var o=this.isIntercalaryMonth(t,r),s=this.toChineseMonth(t,r),c=d(t,s,i,o);return n.toJD(c.year,c.month,c.day)},fromJD:function(e){var t=n.fromJD(e),r=u(t.year(),t.month(),t.day()),i=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,i,r.day)},fromString:function(e){var t=e.match(i),n=this._validateYear(+t[1]),r=+t[2],a=!!t[3],o=this.toMonthIndex(n,r,a),s=+t[4];return this.newDate(n,o,s)},add:function(e,t,n){var i=e.year(),a=e.month(),o=this.isIntercalaryMonth(i,a),s=this.toChineseMonth(i,a),c=Object.getPrototypeOf(r.prototype).add.call(this,e,t,n);if(n===`y`){var l=c.year(),u=c.month(),d=this.isIntercalaryMonth(l,s),f=o&&d?this.toMonthIndex(l,s,!0):this.toMonthIndex(l,s,!1);f!==u&&c.month(f)}return c}});var i=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,a=/^\d?\d[iI]?/m,o=/^闰?十?[一二三四五六七八九]?月/m,s=/^闰?十?[一二三四五六七八九]?/m;e.calendars.chinese=r;var c=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],l=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function u(e,t,n,r){var i,a;if(typeof e==`object`)i=e,a=t||{};else{if(!(typeof e==`number`&&e>=1888&&e<=2111))throw Error(`Solar year outside range 1888-2111`);if(!(typeof t==`number`&&t>=1&&t<=12))throw Error(`Solar month outside range 1 - 12`);if(!(typeof n==`number`&&n>=1&&n<=31))throw Error(`Solar day outside range 1 - 31`);i={year:e,month:t,day:n},a=r||{}}var o=l[i.year-l[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=l[a.year-l[0]];var u=o>>9&4095,d=o>>5&15,f=o&31,p,m=new Date(u,d-1,f),h=new Date(i.year,i.month-1,i.day);p=Math.round((h-m)/864e5);for(var g=c[a.year-c[0]],_=0;_<13;_++){var v=g&1<<12-_?30:29;if(p>13;return!y||_=1888&&e<=2111))throw Error(`Lunar year outside range 1888-2111`);if(!(typeof t==`number`&&t>=1&&t<=12))throw Error(`Lunar month outside range 1 - 12`);if(!(typeof n==`number`&&n>=1&&n<=30))throw Error(`Lunar day outside range 1 - 30`);var s;typeof r==`object`?(s=!1,a=r):(s=!!r,a=i||{}),o={year:e,month:t,day:n,isIntercalary:s}}for(var u=o.day-1,d=c[o.year-c[0]],f=d>>13,p=f&&(o.month>f||o.isIntercalary)?o.month:o.month-1,m=0;m>9&4095,v=g>>5&15,y=g&31,b=new Date(_,v-1,y+u);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}}),Ou=l(()=>{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}n.prototype=new e.baseCalendar,t(n.prototype,{name:`Coptic`,jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:`Coptic`,epochs:[`BAM`,`AM`],monthNames:[`Thout`,`Paopi`,`Hathor`,`Koiak`,`Tobi`,`Meshir`,`Paremhat`,`Paremoude`,`Pashons`,`Paoni`,`Epip`,`Mesori`,`Pi Kogi Enavot`],monthNamesShort:[`Tho`,`Pao`,`Hath`,`Koi`,`Tob`,`Mesh`,`Pat`,`Pad`,`Pash`,`Pao`,`Epi`,`Meso`,`PiK`],dayNames:[`Tkyriaka`,`Pesnau`,`Pshoment`,`Peftoou`,`Ptiou`,`Psoou`,`Psabbaton`],dayNamesShort:[`Tky`,`Pes`,`Psh`,`Pef`,`Pti`,`Pso`,`Psa`],dayNamesMin:[`Tk`,`Pes`,`Psh`,`Pef`,`Pt`,`Pso`,`Psa`],digits:null,dateFormat:`dd/mm/yyyy`,firstDay:0,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=n.year()+ +(n.year()<0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[``].invalidYear),13},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),`d`),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(t,n){var r=this._validate(t,n,this.minDay,e.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(t,n,r){var i=this._validate(t,n,r,e.local.invalidDate);return t=i.year(),t<0&&t++,i.day()+(i.month()-1)*30+(t-1)*365+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,n=Math.floor((t-Math.floor((t+366)/1461))/365)+1;n<=0&&n--,t=Math.floor(e)+.5-this.newDate(n,1,1).toJD();var r=Math.floor(t/30)+1,i=t-(r-1)*30+1;return this.newDate(n,r,i)}}),e.calendars.coptic=n}),ku=l(()=>{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}n.prototype=new e.baseCalendar,t(n.prototype,{name:`Discworld`,jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:`Discworld`,epochs:[`BUC`,`UC`],monthNames:[`Ick`,`Offle`,`February`,`March`,`April`,`May`,`June`,`Grune`,`August`,`Spune`,`Sektober`,`Ember`,`December`],monthNamesShort:[`Ick`,`Off`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Gru`,`Aug`,`Spu`,`Sek`,`Emb`,`Dec`],dayNames:[`Sunday`,`Octeday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayNamesShort:[`Sun`,`Oct`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],dayNamesMin:[`Su`,`Oc`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],digits:null,dateFormat:`yyyy/mm/dd`,firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),400},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),`d`),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(t,n){var r=this._validate(t,n,this.minDay,e.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,n,r){return(this._validate(t,n,r,e.local.invalidDate).day()+1)%8},weekDay:function(e,t,n){var r=this.dayOfWeek(e,t,n);return r>=2&&r<=6},extraInfo:function(t,n,i){var a=this._validate(t,n,i,e.local.invalidDate);return{century:r[Math.floor((a.year()-1)/100)+1]||``}},toJD:function(t,n,r){var i=this._validate(t,n,r,e.local.invalidDate);return t=i.year()+ +(i.year()<0),n=i.month(),r=i.day(),r+(n>1?16:0)+(n>2?(n-2)*32:0)+(t-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var n=Math.floor(e/32)+1,r=e-(n-1)*32+1;return this.newDate(t<=0?t-1:t,n,r)}});var r={20:`Fruitbat`,21:`Anchovy`};e.calendars.discworld=n}),Au=l(()=>{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}n.prototype=new e.baseCalendar,t(n.prototype,{name:`Ethiopian`,jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:`Ethiopian`,epochs:[`BEE`,`EE`],monthNames:[`Meskerem`,`Tikemet`,`Hidar`,`Tahesas`,`Tir`,`Yekatit`,`Megabit`,`Miazia`,`Genbot`,`Sene`,`Hamle`,`Nehase`,`Pagume`],monthNamesShort:[`Mes`,`Tik`,`Hid`,`Tah`,`Tir`,`Yek`,`Meg`,`Mia`,`Gen`,`Sen`,`Ham`,`Neh`,`Pag`],dayNames:[`Ehud`,`Segno`,`Maksegno`,`Irob`,`Hamus`,`Arb`,`Kidame`],dayNamesShort:[`Ehu`,`Seg`,`Mak`,`Iro`,`Ham`,`Arb`,`Kid`],dayNamesMin:[`Eh`,`Se`,`Ma`,`Ir`,`Ha`,`Ar`,`Ki`],digits:null,dateFormat:`dd/mm/yyyy`,firstDay:0,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=n.year()+ +(n.year()<0);return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[``].invalidYear),13},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),`d`),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(t,n){var r=this._validate(t,n,this.minDay,e.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(t,n,r){var i=this._validate(t,n,r,e.local.invalidDate);return t=i.year(),t<0&&t++,i.day()+(i.month()-1)*30+(t-1)*365+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,n=Math.floor((t-Math.floor((t+366)/1461))/365)+1;n<=0&&n--,t=Math.floor(e)+.5-this.newDate(n,1,1).toJD();var r=Math.floor(t/30)+1,i=t-(r-1)*30+1;return this.newDate(n,r,i)}}),e.calendars.ethiopian=n}),ju=l(()=>{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}n.prototype=new e.baseCalendar,t(n.prototype,{name:`Hebrew`,jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:`Hebrew`,epochs:[`BAM`,`AM`],monthNames:[`Nisan`,`Iyar`,`Sivan`,`Tammuz`,`Av`,`Elul`,`Tishrei`,`Cheshvan`,`Kislev`,`Tevet`,`Shevat`,`Adar`,`Adar II`],monthNamesShort:[`Nis`,`Iya`,`Siv`,`Tam`,`Av`,`Elu`,`Tis`,`Che`,`Kis`,`Tev`,`She`,`Ada`,`Ad2`],dayNames:[`Yom Rishon`,`Yom Sheni`,`Yom Shlishi`,`Yom Revi'i`,`Yom Chamishi`,`Yom Shishi`,`Yom Shabbat`],dayNamesShort:[`Ris`,`She`,`Shl`,`Rev`,`Cha`,`Shi`,`Sha`],dayNamesMin:[`Ri`,`She`,`Shl`,`Re`,`Ch`,`Shi`,`Sha`],digits:null,dateFormat:`dd/mm/yyyy`,firstDay:0,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(n.year())},_leapYear:function(e){return e=e<0?e+1:e,r(e*7+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),`d`),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),this.toJD(t===-1?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,n){return t.year&&(n=t.month(),t=t.year()),this._validate(t,n,this.minDay,e.local.invalidMonth),n===12&&this.leapYear(t)||n===8&&r(this.daysInYear(t),10)===5?30:n===9&&r(this.daysInYear(t),10)===3?29:this.daysPerMonth[n-1]},weekDay:function(e,t,n){return this.dayOfWeek(e,t,n)!==6},extraInfo:function(t,n,r){var i=this._validate(t,n,r,e.local.invalidDate);return{yearType:(this.leapYear(i)?`embolismic`:`common`)+` `+[`deficient`,`regular`,`complete`][this.daysInYear(i)%10-3]}},toJD:function(t,n,r){var i=this._validate(t,n,r,e.local.invalidDate);t=i.year(),n=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(n<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;s=this.toJD(t===-1?1:t+1,7,1);)t++;for(var n=ethis.toJD(t,n,this.daysInMonth(t,n));)n++;var r=e-this.toJD(t,n,1)+1;return this.newDate(t,n,r)}});function r(e,t){return e-t*Math.floor(e/t)}e.calendars.hebrew=n}),Mu=l(()=>{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}n.prototype=new e.baseCalendar,t(n.prototype,{name:`Islamic`,jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:`Islamic`,epochs:[`BH`,`AH`],monthNames:[`Muharram`,`Safar`,`Rabi' al-awwal`,`Rabi' al-thani`,`Jumada al-awwal`,`Jumada al-thani`,`Rajab`,`Sha'aban`,`Ramadan`,`Shawwal`,`Dhu al-Qi'dah`,`Dhu al-Hijjah`],monthNamesShort:[`Muh`,`Saf`,`Rab1`,`Rab2`,`Jum1`,`Jum2`,`Raj`,`Sha'`,`Ram`,`Shaw`,`DhuQ`,`DhuH`],dayNames:[`Yawm al-ahad`,`Yawm al-ithnayn`,`Yawm ath-thulaathaa'`,`Yawm al-arbi'aa'`,`Yawm al-khamīs`,`Yawm al-jum'a`,`Yawm as-sabt`],dayNamesShort:[`Aha`,`Ith`,`Thu`,`Arb`,`Kha`,`Jum`,`Sab`],dayNamesMin:[`Ah`,`It`,`Th`,`Ar`,`Kh`,`Ju`,`Sa`],digits:null,dateFormat:`yyyy/mm/dd`,firstDay:6,isRTL:!1}},leapYear:function(t){return(this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year()*11+14)%30<11},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),`d`),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(t,n){var r=this._validate(t,n,this.minDay,e.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,n){return this.dayOfWeek(e,t,n)!==5},toJD:function(t,n,r){var i=this._validate(t,n,r,e.local.invalidDate);return t=i.year(),n=i.month(),r=i.day(),t=t<=0?t+1:t,r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var n=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),r=e-this.toJD(t,n,1)+1;return this.newDate(t,n,r)}}),e.calendars.islamic=n}),Nu=l(()=>{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}n.prototype=new e.baseCalendar,t(n.prototype,{name:`Julian`,jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:`Julian`,epochs:[`BC`,`AD`],monthNames:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthNamesShort:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayNames:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayNamesShort:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],dayNamesMin:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],digits:null,dateFormat:`mm/dd/yyyy`,firstDay:0,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=n.year()<0?n.year()+1:n.year();return t%4==0},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(4-(r.dayOfWeek()||7),`d`),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(t,n){var r=this._validate(t,n,this.minDay,e.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(t,n,r){var i=this._validate(t,n,r,e.local.invalidDate);return t=i.year(),n=i.month(),r=i.day(),t<0&&t++,n<=2&&(t--,n+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(n+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,n=Math.floor((t-122.1)/365.25),r=Math.floor(365.25*n),i=Math.floor((t-r)/30.6001),a=i-Math.floor(i<14?1:13),o=n-Math.floor(a>2?4716:4715),s=t-r-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),e.calendars.julian=n}),Pu=l(()=>{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}n.prototype=new e.baseCalendar,t(n.prototype,{name:`Mayan`,jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:`Mayan`,epochs:[``,``],monthNames:[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`,`13`,`14`,`15`,`16`,`17`],monthNamesShort:[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`,`13`,`14`,`15`,`16`,`17`],dayNames:[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`,`13`,`14`,`15`,`16`,`17`,`18`,`19`],dayNamesShort:[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`,`13`,`14`,`15`,`16`,`17`,`18`,`19`],dayNamesMin:[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`,`13`,`14`,`15`,`16`,`17`,`18`,`19`],digits:null,dateFormat:`YYYY.m.d`,firstDay:0,isRTL:!1,haabMonths:[`Pop`,`Uo`,`Zip`,`Zotz`,`Tzec`,`Xul`,`Yaxkin`,`Mol`,`Chen`,`Yax`,`Zac`,`Ceh`,`Mac`,`Kankin`,`Muan`,`Pax`,`Kayab`,`Cumku`,`Uayeb`],tzolkinMonths:[`Imix`,`Ik`,`Akbal`,`Kan`,`Chicchan`,`Cimi`,`Manik`,`Lamat`,`Muluc`,`Oc`,`Chuen`,`Eb`,`Ben`,`Ix`,`Men`,`Cib`,`Caban`,`Etznab`,`Cauac`,`Ahau`]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year();var n=Math.floor(t/400);t%=400,t+=t<0?400:0;var r=Math.floor(t/20);return n+`.`+r+`.`+t%20},forYear:function(e){if(e=e.split(`.`),e.length<3)throw`Invalid Mayan year`;for(var t=0,n=0;n19||n>0&&r<0)throw`Invalid Mayan year`;t=t*20+r}return t},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(t,n,r){return this._validate(t,n,r,e.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(t,n){return this._validate(t,n,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,n,r){return this._validate(t,n,r,e.local.invalidDate).day()},weekDay:function(t,n,r){return this._validate(t,n,r,e.local.invalidDate),!0},extraInfo:function(t,n,r){var i=this._validate(t,n,r,e.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=r(e+8+340,365);return[Math.floor(t/20)+1,r(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[i(e+20,20),i(e+4,13)]},toJD:function(t,n,r){var i=this._validate(t,n,r,e.local.invalidDate);return i.day()+i.month()*20+i.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var n=Math.floor(e/20),r=e%20;return this.newDate(t,n,r)}});function r(e,t){return e-t*Math.floor(e/t)}function i(e,t){return r(e-1,t)+1}e.calendars.mayan=n}),Fu=l(()=>{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}n.prototype=new e.baseCalendar;var r=e.instance(`gregorian`);t(n.prototype,{name:`Nanakshahi`,jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:`Nanakshahi`,epochs:[`BN`,`AN`],monthNames:[`Chet`,`Vaisakh`,`Jeth`,`Harh`,`Sawan`,`Bhadon`,`Assu`,`Katak`,`Maghar`,`Poh`,`Magh`,`Phagun`],monthNamesShort:[`Che`,`Vai`,`Jet`,`Har`,`Saw`,`Bha`,`Ass`,`Kat`,`Mgr`,`Poh`,`Mgh`,`Pha`],dayNames:[`Somvaar`,`Mangalvar`,`Budhvaar`,`Veervaar`,`Shukarvaar`,`Sanicharvaar`,`Etvaar`],dayNamesShort:[`Som`,`Mangal`,`Budh`,`Veer`,`Shukar`,`Sanichar`,`Et`],dayNamesMin:[`So`,`Ma`,`Bu`,`Ve`,`Sh`,`Sa`,`Et`],digits:null,dateFormat:`dd-mm-yyyy`,firstDay:0,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[``].invalidYear);return r.leapYear(n.year()+ +(n.year()<1)+1469)},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(1-(r.dayOfWeek()||7),`d`),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(t,n){var r=this._validate(t,n,this.minDay,e.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(t,n,i){var a=this._validate(t,n,i,e.local.invalidMonth),t=a.year();t<0&&t++;for(var o=a.day(),s=1;s=this.toJD(t+1,1,1);)t++;for(var n=e-Math.floor(this.toJD(t,1,1)+.5)+1,r=1;n>this.daysInMonth(t,r);)n-=this.daysInMonth(t,r),r++;return this.newDate(t,r,n)}}),e.calendars.nanakshahi=n}),Iu=l(()=>{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}n.prototype=new e.baseCalendar,t(n.prototype,{name:`Nepali`,jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:`Nepali`,epochs:[`BBS`,`ABS`],monthNames:[`Baisakh`,`Jestha`,`Ashadh`,`Shrawan`,`Bhadra`,`Ashwin`,`Kartik`,`Mangsir`,`Paush`,`Mangh`,`Falgun`,`Chaitra`],monthNamesShort:[`Bai`,`Je`,`As`,`Shra`,`Bha`,`Ash`,`Kar`,`Mang`,`Pau`,`Ma`,`Fal`,`Chai`],dayNames:[`Aaitabaar`,`Sombaar`,`Manglbaar`,`Budhabaar`,`Bihibaar`,`Shukrabaar`,`Shanibaar`],dayNamesShort:[`Aaita`,`Som`,`Mangl`,`Budha`,`Bihi`,`Shukra`,`Shani`],dayNamesMin:[`Aai`,`So`,`Man`,`Bu`,`Bi`,`Shu`,`Sha`],digits:null,dateFormat:`dd/mm/yyyy`,firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),`d`),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[t]===void 0)return this.daysPerYear;for(var n=0,r=this.minMonth;r<=12;r++)n+=this.NEPALI_CALENDAR_DATA[t][r];return n},daysInMonth:function(t,n){return t.year&&(n=t.month(),t=t.year()),this._validate(t,n,this.minDay,e.local.invalidMonth),this.NEPALI_CALENDAR_DATA[t]===void 0?this.daysPerMonth[n-1]:this.NEPALI_CALENDAR_DATA[t][n]},weekDay:function(e,t,n){return this.dayOfWeek(e,t,n)!==6},toJD:function(t,n,r){var i=this._validate(t,n,r,e.local.invalidDate);t=i.year(),n=i.month(),r=i.day();var a=e.instance(),o=0,s=n,c=t;this._createMissingCalendarData(t);var l=t-(s>9||s===9&&r>=this.NEPALI_CALENDAR_DATA[c][0]?56:57);for(n!==9&&(o=r,s--);s!==9;)s<=0&&(s=12,c--),o+=this.NEPALI_CALENDAR_DATA[c][s],s--;return n===9?(o+=r-this.NEPALI_CALENDAR_DATA[c][0],o<0&&(o+=a.daysInYear(l))):o+=this.NEPALI_CALENDAR_DATA[c][9]-this.NEPALI_CALENDAR_DATA[c][0],a.newDate(l,1,1).add(o,`d`).toJD()},fromJD:function(t){var n=e.instance().fromJD(t),r=n.year(),i=n.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],c=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>c;)o++,o>12&&(o=1,a++),c+=this.NEPALI_CALENDAR_DATA[a][o];var l=this.NEPALI_CALENDAR_DATA[a][o]-(c-i);return this.newDate(a,o,l)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var n=e-1;n{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}function r(e){var t=e-475;e<0&&t++;var n=.242197,r=n*t,i=n*(t+1);return r-Math.floor(r)>i-Math.floor(i)}n.prototype=new e.baseCalendar,t(n.prototype,{name:`Persian`,jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:`Persian`,epochs:[`BP`,`AP`],monthNames:[`Farvardin`,`Ordibehesht`,`Khordad`,`Tir`,`Mordad`,`Shahrivar`,`Mehr`,`Aban`,`Azar`,`Dey`,`Bahman`,`Esfand`],monthNamesShort:[`Far`,`Ord`,`Kho`,`Tir`,`Mor`,`Sha`,`Meh`,`Aba`,`Aza`,`Dey`,`Bah`,`Esf`],dayNames:[`Yekshanbeh`,`Doshanbeh`,`Seshanbeh`,`Chahārshanbeh`,`Panjshanbeh`,`Jom'eh`,`Shanbeh`],dayNamesShort:[`Yek`,`Do`,`Se`,`Cha`,`Panj`,`Jom`,`Sha`],dayNamesMin:[`Ye`,`Do`,`Se`,`Ch`,`Pa`,`Jo`,`Sh`],digits:null,dateFormat:`yyyy/mm/dd`,firstDay:6,isRTL:!1}},leapYear:function(t){return r(this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-((r.dayOfWeek()+1)%7),`d`),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(t,n){var r=this._validate(t,n,this.minDay,e.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,n){return this.dayOfWeek(e,t,n)!==5},toJD:function(t,n,i){var a=this._validate(t,n,i,e.local.invalidDate);t=a.year(),n=a.month(),i=a.day();var o=0;if(t>0)for(var s=1;s0?t-1:t)*365+o+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,n=Math.floor(t);n<=0&&n--,e>this.toJD(n,12,r(n)?30:29)&&(n++,n===0&&n++);var i=e-this.toJD(n,1,1)+1,a=Math.ceil(i<=186?i/31:(i-6)/30),o=e-this.toJD(n,a,1)+1;return this.newDate(n,a,o)}}),e.calendars.persian=n,e.calendars.jalali=n}),Ru=l(()=>{var e=Tu(),t=wu(),n=e.instance();function r(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}r.prototype=new e.baseCalendar,t(r.prototype,{name:`Taiwan`,jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:`Taiwan`,epochs:[`BROC`,`ROC`],monthNames:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthNamesShort:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayNames:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayNamesShort:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],dayNamesMin:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],digits:null,dateFormat:`yyyy/mm/dd`,firstDay:1,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(r.year());return n.leapYear(t)},weekOfYear:function(t,r,i){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(a.year());return n.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,n){var r=this._validate(t,n,this.minDay,e.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidDate),t=this._t2gYear(a.year());return n.toJD(t,a.month(),a.day())},fromJD:function(e){var t=n.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+ +(e>=-this.yearsOffset&&e<=-1)},_g2tYear:function(e){return e-this.yearsOffset-+(e>=1&&e<=this.yearsOffset)}}),e.calendars.taiwan=r}),zu=l(()=>{var e=Tu(),t=wu(),n=e.instance();function r(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}r.prototype=new e.baseCalendar,t(r.prototype,{name:`Thai`,jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:`Thai`,epochs:[`BBE`,`BE`],monthNames:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthNamesShort:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayNames:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayNamesShort:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],dayNamesMin:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],digits:null,dateFormat:`dd/mm/yyyy`,firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(r.year());return n.leapYear(t)},weekOfYear:function(t,r,i){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(a.year());return n.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,n){var r=this._validate(t,n,this.minDay,e.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidDate),t=this._t2gYear(a.year());return n.toJD(t,a.month(),a.day())},fromJD:function(e){var t=n.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-+(e>=1&&e<=this.yearsOffset)},_g2tYear:function(e){return e+this.yearsOffset+ +(e>=-this.yearsOffset&&e<=-1)}}),e.calendars.thai=r}),Bu=l(()=>{var e=Tu(),t=wu();function n(e){this.local=this.regionalOptions[e||``]||this.regionalOptions[``]}n.prototype=new e.baseCalendar,t(n.prototype,{name:`UmmAlQura`,hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:`Umm al-Qura`,epochs:[`BH`,`AH`],monthNames:[`Al-Muharram`,`Safar`,`Rabi' al-awwal`,`Rabi' Al-Thani`,`Jumada Al-Awwal`,`Jumada Al-Thani`,`Rajab`,`Sha'aban`,`Ramadan`,`Shawwal`,`Dhu al-Qi'dah`,`Dhu al-Hijjah`],monthNamesShort:[`Muh`,`Saf`,`Rab1`,`Rab2`,`Jum1`,`Jum2`,`Raj`,`Sha'`,`Ram`,`Shaw`,`DhuQ`,`DhuH`],dayNames:[`Yawm al-Ahad`,`Yawm al-Ithnain`,`Yawm al-Thalāthā’`,`Yawm al-Arba‘ā’`,`Yawm al-Khamīs`,`Yawm al-Jum‘a`,`Yawm al-Sabt`],dayNamesMin:[`Ah`,`Ith`,`Th`,`Ar`,`Kh`,`Ju`,`Sa`],digits:null,dateFormat:`yyyy/mm/dd`,firstDay:6,isRTL:!0}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return this.daysInYear(n.year())===355},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),`d`),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,n=1;n<=12;n++)t+=this.daysInMonth(e,n);return t},daysInMonth:function(t,n){for(var i=this._validate(t,n,this.minDay,e.local.invalidMonth).toJD()-24e5+.5,a=0,o=0;oi)return r[a]-r[a-1];a++}return 30},weekDay:function(e,t,n){return this.dayOfWeek(e,t,n)!==5},toJD:function(t,n,i){var a=this._validate(t,n,i,e.local.invalidDate),o=12*(a.year()-1)+a.month()-15292;return a.day()+r[o-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,n=0,i=0;it);i++)n++;var a=n+15292,o=Math.floor((a-1)/12),s=o+1,c=a-12*o,l=t-r[n-1]+1;return this.newDate(s,c,l)},isValid:function(t,n,r){var i=e.baseCalendar.prototype.isValid.apply(this,arguments);return i&&=(t=t.year==null?t:t.year,t>=1276&&t<=1500),i},_validate:function(t,n,r,i){var a=e.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),e.calendars.ummalqura=n;var r=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}),Vu=l((e,t)=>{t.exports=Tu(),Eu(),Du(),Ou(),ku(),Au(),ju(),Mu(),Nu(),Pu(),Fu(),Iu(),Lu(),Ru(),zu(),Bu()}),Hu=l((e,t)=>{var n=Vu(),r=$(),i=v(),a=i.EPOCHJD,o=i.ONEDAY,s={valType:`enumerated`,values:r.sortObjectKeys(n.calendars),editType:`calc`,dflt:`gregorian`},c=function(e,t,n,i){var a={};return a[n]=s,r.coerce(e,t,a,n,i)},l=function(e,t,n,r){for(var i=0;i{t.exports=Hu()});return l((e,t)=>{var n=La();n.register([$a(),po(),Ro(),qo(),$o(),Cs(),Ds(),Vs(),$s(),fu(),Cu(),Uu()]),t.exports=n})()})();return window.Plotly=e,e})}));export default t(); \ No newline at end of file diff --git a/apps/adhoc-reporting/frontend/dist/index.html b/apps/adhoc-reporting/frontend/dist/index.html new file mode 100644 index 00000000..02d60ac1 --- /dev/null +++ b/apps/adhoc-reporting/frontend/dist/index.html @@ -0,0 +1,15 @@ + + + + + + + + Impulse + + + + +
+ + diff --git a/apps/adhoc-reporting/frontend/src/api.ts b/apps/adhoc-reporting/frontend/src/api.ts index 15cea99c..344607e5 100644 --- a/apps/adhoc-reporting/frontend/src/api.ts +++ b/apps/adhoc-reporting/frontend/src/api.ts @@ -48,6 +48,7 @@ export const api = { channels: (catalog: string, schema: string, uuts: string[], window: Window) => request<{ channels: Channel[]; issues: string[] }>("POST", "/api/data/channels", { catalog, schema, uuts, window }), preflight: (name: string) => request("POST", `${reportPath(name)}/preflight`), + grant: (name: string) => request<{ granted: string }>("POST", `${reportPath(name)}/grants`), run: (name: string) => request<{ preflight: Preflight; run: { job_id: number; run_id: number } | null }>("POST", `${reportPath(name)}/runs`), runs: (name: string) => request<{ runs: RunSummary[] }>("GET", `${reportPath(name)}/runs`).then((r) => r.runs), runDetail: (name: string, runId: number) => request("GET", `${reportPath(name)}/runs/${runId}`), diff --git a/apps/adhoc-reporting/frontend/src/components/steps/ReviewStep.tsx b/apps/adhoc-reporting/frontend/src/components/steps/ReviewStep.tsx index 5ebdb653..6fc96174 100644 --- a/apps/adhoc-reporting/frontend/src/components/steps/ReviewStep.tsx +++ b/apps/adhoc-reporting/frontend/src/components/steps/ReviewStep.tsx @@ -1,4 +1,4 @@ -import { CheckCircle2, CircleX, Copy, ExternalLink, Play, Square } from "lucide-react"; +import { CheckCircle2, CircleX, Copy, ExternalLink, Play, ShieldCheck, Square } from "lucide-react"; import { useCallback, useEffect, useState } from "react"; import { api } from "../../api"; import { reportHref, useAsync } from "../../hooks"; @@ -57,7 +57,7 @@ function badge(run: RunSummary): string { return run.result === "SUCCESS" ? "badge ok" : "badge bad"; } -function PreflightProblems({ preflight }: { preflight: Preflight }) { +function PreflightProblems({ preflight, busy, onGrant }: { preflight: Preflight; busy?: string; onGrant: () => void }) { return (
{preflight.user.length > 0 && ( @@ -80,9 +80,7 @@ function PreflightProblems({ preflight }: { preflight: Preflight }) { {preflight.app.length > 0 && (

The app's service principal

-

- Report jobs run as {preflight.app_principal.name}. A workspace or catalog admin grants it access once per catalog and schema: -

+

Report jobs run as {preflight.app_principal.name}, which needs access once per catalog and schema:

    {preflight.app.map((p) => (
  • @@ -92,10 +90,24 @@ function PreflightProblems({ preflight }: { preflight: Preflight }) { ))}
{preflight.grants && ( -
-
{preflight.grants}
- -
+ <> +
+
{preflight.grants}
+ +
+ {preflight.user.length === 0 && ( +
+ + + Runs these statements as you, so it works only if you may grant access to these catalogs and schemas. Otherwise copy the + SQL for someone who can. + +
+ )} + )}
)} @@ -108,7 +120,7 @@ function RunPanel({ onSuccess }: { onSuccess: () => void }) { const [history, setHistory] = useState(); const [current, setCurrent] = useState(); const [preflight, setPreflight] = useState(); - const [busy, setBusy] = useState<"run" | "cancel">(); + const [busy, setBusy] = useState<"run" | "cancel" | "grant">(); const [error, setError] = useState(); const now = useNow(!!current?.active); @@ -174,6 +186,20 @@ function RunPanel({ onSuccess }: { onSuccess: () => void }) { } }; + const grantAndRun = async () => { + setBusy("grant"); + setError(undefined); + try { + if (!(await flushNow())) throw new Error("The report could not be saved. Fix the save error first."); + await api.grant(spec.name); + } catch (e) { + setError((e as Error).message); + setBusy(undefined); + return; + } + await start(); + }; + const cancel = async () => { if (!current) return; setBusy("cancel"); @@ -213,7 +239,7 @@ function RunPanel({ onSuccess }: { onSuccess: () => void }) { {error}
)} - {preflight && !preflight.ok && } + {preflight && !preflight.ok && void grantAndRun()} />} {current && (
diff --git a/apps/adhoc-reporting/frontend/src/styles/app.css b/apps/adhoc-reporting/frontend/src/styles/app.css index bada6b26..f1714055 100644 --- a/apps/adhoc-reporting/frontend/src/styles/app.css +++ b/apps/adhoc-reporting/frontend/src/styles/app.css @@ -1210,6 +1210,14 @@ kbd { right: 8px; } +.grant-row { + margin-top: 10px; +} + +.grant-row .btn { + flex-shrink: 0; +} + .run-error { padding: 12px 14px; border: 1px solid rgba(248, 113, 113, 0.35); diff --git a/apps/adhoc-reporting/server/routes/runs.py b/apps/adhoc-reporting/server/routes/runs.py index b8e08a53..32be287f 100644 --- a/apps/adhoc-reporting/server/routes/runs.py +++ b/apps/adhoc-reporting/server/routes/runs.py @@ -20,6 +20,13 @@ def preflight(name: ReportName, user: User = Depends(current_user)) -> dict: return runs.preflight(user, generated.config) +@router.post("/grants") +def grant(name: ReportName, user: User = Depends(current_user)) -> dict: + _, generated = _generated(user, name) + runs.grant(user, generated.config) + return {"granted": name} + + @router.post("/runs") def start(name: ReportName, user: User = Depends(current_user)) -> dict: _, generated = _generated(user, name) diff --git a/apps/adhoc-reporting/server/runs.py b/apps/adhoc-reporting/server/runs.py index 5a615a87..97412593 100644 --- a/apps/adhoc-reporting/server/runs.py +++ b/apps/adhoc-reporting/server/runs.py @@ -108,6 +108,20 @@ def preflight(user: User, config: dict) -> dict: } +def grant(user: User, config: dict) -> None: + tables = list(config["source"].values()) + sink = config["unity_sink"] + app_id, _ = runner_identity() + failures = [] + for statement in grant_script(app_id, tables, sink).splitlines(): + try: + sql.query(user, statement) + except ApiError as e: + failures.append(e) + if failures and _checks(User(app_id, runner()), tables, sink): + raise failures[0] + + def _job_name(email: str, report: str) -> str: return f"Impulse {report} ({email})" diff --git a/apps/adhoc-reporting/skills/app/impulse-app-run/SKILL.md b/apps/adhoc-reporting/skills/app/impulse-app-run/SKILL.md index d73d338e..3b187124 100644 --- a/apps/adhoc-reporting/skills/app/impulse-app-run/SKILL.md +++ b/apps/adhoc-reporting/skills/app/impulse-app-run/SKILL.md @@ -21,7 +21,8 @@ Call `run_report` only when the user asks. It first checks access: - The user needs SELECT on every source table and CREATE TABLE in the output schema. Missing privileges are listed under `preflight.user`; the user asks a data owner for them. - Report jobs run as the app's service principal. Missing privileges are listed under `preflight.app`, and - `preflight.grants` holds the GRANT statements an admin runs once. Show them unchanged. + `preflight.grants` holds the GRANT statements an admin runs once. Show them unchanged, and tell the user + that someone who may grant them can also click **Grant and run** on the Review & run step. When it starts, the run takes one to three minutes on serverless compute. Tell the user the app shows progress on the Review & run step; call `get_run_status` when the user asks how it is going. diff --git a/apps/adhoc-reporting/tests/unit/test_api.py b/apps/adhoc-reporting/tests/unit/test_api.py index 0d157c18..881a5944 100644 --- a/apps/adhoc-reporting/tests/unit/test_api.py +++ b/apps/adhoc-reporting/tests/unit/test_api.py @@ -16,6 +16,7 @@ ("DELETE", ""), ("POST", "/check"), ("POST", "/preflight"), + ("POST", "/grants"), ("POST", "/runs"), ("GET", "/runs"), ("GET", "/runs/1"), diff --git a/apps/adhoc-reporting/tests/unit/test_runs.py b/apps/adhoc-reporting/tests/unit/test_runs.py index dcf8677a..c6c9e772 100644 --- a/apps/adhoc-reporting/tests/unit/test_runs.py +++ b/apps/adhoc-reporting/tests/unit/test_runs.py @@ -1,5 +1,31 @@ +import pytest + +from server import runs +from server.errors import ApiError from server.runs import grant_script +CONFIG = {"source": {"containers": "c.silver.container_metrics"}, "unity_sink": {"catalog": "c", "schema": "gold"}} +GRANTS = [ + "GRANT USE CATALOG ON CATALOG `c` TO `app-sp`;", + "GRANT USE SCHEMA, SELECT ON SCHEMA `c`.`silver` TO `app-sp`;", + "GRANT USE SCHEMA, SELECT, MODIFY, CREATE TABLE ON SCHEMA `c`.`gold` TO `app-sp`;", +] + + +@pytest.fixture +def app_principal(monkeypatch): + monkeypatch.setattr(runs, "runner_identity", lambda: ("app-sp", "Impulse App")) + monkeypatch.setattr(runs, "runner", lambda: None) + + +def deny_catalog_grant(monkeypatch, executed): + def query(user, statement): + executed.append(statement) + if statement == GRANTS[0]: + raise ApiError(403, "missing_privilege", "User does not have MANAGE on Catalog 'c'") + + monkeypatch.setattr(runs.sql, "query", query) + def test_grant_script_covers_source_and_sink(): tables = ["c1.silver.container_metrics", "c1.silver.channels", "c2.raw.channel_tags"] @@ -19,3 +45,34 @@ def test_grant_script_merges_shared_schema(): "GRANT USE CATALOG ON CATALOG `c` TO `sp`;", "GRANT USE SCHEMA, SELECT, MODIFY, CREATE TABLE ON SCHEMA `c`.`s` TO `sp`;", ] + + +def test_grant_runs_the_generated_statements_as_the_user(monkeypatch, app_principal): + executed = [] + user = object() + monkeypatch.setattr(runs.sql, "query", lambda principal, statement: executed.append((principal, statement))) + + runs.grant(user, CONFIG) + + assert executed == [(user, statement) for statement in GRANTS] + + +def test_grant_continues_when_the_app_already_has_the_denied_privilege(monkeypatch, app_principal): + executed = [] + deny_catalog_grant(monkeypatch, executed) + monkeypatch.setattr(runs, "_checks", lambda principal, tables, sink: []) + + runs.grant(object(), CONFIG) + + assert executed == GRANTS + + +def test_grant_reports_the_denial_when_the_app_still_lacks_access(monkeypatch, app_principal): + executed = [] + deny_catalog_grant(monkeypatch, executed) + missing = [{"object": "c.gold", "privilege": "CREATE TABLE", "message": "PERMISSION_DENIED"}] + monkeypatch.setattr(runs, "_checks", lambda principal, tables, sink: missing) + + with pytest.raises(ApiError, match="MANAGE on Catalog"): + runs.grant(object(), CONFIG) + assert executed == GRANTS diff --git a/docs/impulse/app/architecture.md b/docs/impulse/app/architecture.md index b0345446..38587aa8 100644 --- a/docs/impulse/app/architecture.md +++ b/docs/impulse/app/architecture.md @@ -46,8 +46,9 @@ flowchart LR read. - **The app's service principal.** Report jobs run as the service principal, which needs access to the silver and gold schemas. Before each run the app checks that both the user and the service - principal can read the source tables and create tables in the output schema, and it shows the - missing `GRANT` statements otherwise. The user gets `CAN_MANAGE_RUN` on their report's job. + principal can read the source tables and create tables in the output schema. Otherwise it shows + the missing `GRANT` statements, which **Grant and run** executes as the signed-in user if that + user may grant them. The user gets `CAN_MANAGE_RUN` on their report's job. ## How a report runs diff --git a/docs/impulse/app/index.md b/docs/impulse/app/index.md index 4913bf00..56f53520 100644 --- a/docs/impulse/app/index.md +++ b/docs/impulse/app/index.md @@ -54,5 +54,5 @@ the [query engine](/docs/references/query_engine) isn't part of the app. ## Next steps - [Requirements](requirements.md): workspace features, data and permissions. -- [Install](install.md): build, deploy and grant access. +- [Install](install.md): deploy and grant access. - [Architecture](architecture.md): components, identities and where data is stored. diff --git a/docs/impulse/app/install.md b/docs/impulse/app/install.md index b135788b..100301cb 100644 --- a/docs/impulse/app/install.md +++ b/docs/impulse/app/install.md @@ -6,7 +6,8 @@ title: Install # Install Check the [requirements](requirements.md) first. The commands run on your machine with the -Databricks CLI authenticated against the workspace; `-p ` selects the CLI profile. +Databricks CLI authenticated against the workspace; `-p ` selects the CLI profile. To +install without the CLI, see [Install from the Databricks UI](#install-from-the-databricks-ui). ## 1. Get the code @@ -18,21 +19,16 @@ cd impulse/apps/adhoc-reporting Use `main` or check out a release tag (`git checkout vX.Y.Z`). Either way, `impulse.lock` pins the Impulse release that report jobs install. -## 2. Build the frontend +## 2. Deploy ```bash -cd frontend && npm ci && npm run build && cd .. +databricks apps deploy --var warehouse_id= -p ``` -## 3. Deploy - -```bash -databricks bundle deploy --var warehouse_id= -p -databricks bundle run impulse_app --var warehouse_id= -p -``` - -`bundle run` starts the app and prints its URL. Pass the same `--var` values to both commands. The -bundle has these variables: +The command creates the app with its SQL warehouse, user authorization scopes and permissions, +uploads the code, starts the app and prints its URL. Run it again to update the app. The warehouse +id is shown on the warehouse's page in the workspace and by `databricks warehouses list -p `. +The bundle has these variables: | Variable | Default | Meaning | |---|---|---| @@ -40,7 +36,13 @@ bundle has these variables: | `app_name` | `impulse-app` | Name of the app, part of its URL | | `end_user_group` | `users` | Group that gets `CAN_USE` on the app | -## 4. Grant the service principal access +If the workspace only allows app deployments from Git, add `-t github` to the command, also for +later updates. The app then deploys the checked-out commit from GitHub instead of the uploaded +folder, so that commit must be in github.com/databrickslabs/impulse, for example a release tag. To +switch an app that was deployed without `-t github`, first run +`databricks bundle deployment bind impulse_app -t github --var warehouse_id= -p `. + +## 3. Grant the service principal access Report jobs run as the app's service principal. A catalog or schema owner grants it access once per silver and gold schema: @@ -52,9 +54,28 @@ GRANT USE SCHEMA, SELECT, MODIFY, CREATE TABLE ON SCHEMA . ``` The application id is the `service_principal_client_id` in the output of -`databricks apps get impulse-app -p `. Before each run, the Review & run step -checks the access of both the user and the service principal and shows the exact statements when -something is missing. +`databricks apps get impulse-app -p `. You can also skip this step and grant from the app: +before each run, the Review & run step checks the access of both the user and the service +principal. When the service principal lacks access, the step shows the exact statements to copy, +and **Grant and run** runs them as the signed-in user, if that user may grant them. + +## Install from the Databricks UI + +Without Git and the CLI, create the app from GitHub in the workspace: + +1. Open **Databricks Apps** from the app switcher, click **Create app** and **Create a custom app**, + and enter a name, for example `impulse-app`. +2. Under **Configure Git repository**, enter `https://github.com/databrickslabs/impulse` with the + provider **GitHub**, a release tag with the reference type **Tag**, and the source code path + `apps/adhoc-reporting`. Click **Next: Configure**; **Create app** on this page skips the next step. +3. Under **Configure**, add the resource **SQL warehouse** with the permission **Can use** and keep + its resource key `sql-warehouse`. Add the user authorization scopes `sql`, `workspace.workspace`, + `model-serving`, `catalog.catalogs:read`, `catalog.schemas:read` and `catalog.tables:read`. +4. Click **Create app**. The app deploys as soon as its compute is running. +5. Click **Share** and give the group `users` **Can use**. + +Then grant the service principal access as in [step 3](#3-grant-the-service-principal-access). +Keep managing an app installed this way in the UI; the deploy command manages only apps it created. ## Serverless without GitHub access @@ -68,7 +89,8 @@ wheel_override = "/Volumes////databricks_impulse-