@shelf/global-renderer 2.1.4 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see renderStaticDTDiagram.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={2:(e,t,n)=>{var r=n(2199),i=n(4664),o=n(5950);e.exports=function(e){return r(e,o,i)}},79:(e,t,n)=>{var r=n(3702),i=n(80),o=n(4739),a=n(8655),s=n(1175);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},80:(e,t,n)=>{var r=n(6025),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},104:(e,t,n)=>{var r=n(3661);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},117:(e,t,n)=>{var r;try{r={clone:n(2629),constant:n(7334),each:n(6135),filter:n(7612),has:n(1448),isArray:n(6449),isEmpty:n(2193),isFunction:n(1882),isUndefined:n(2216),keys:n(5950),map:n(5378),reduce:n(860),size:n(7091),transform:n(9752),union:n(299),values:n(5880)}}catch(e){}r||(r=window._),e.exports=r},124:(e,t,n)=>{var r=n(9325);e.exports=function(){return r.Date.now()}},135:(e,t,n)=>{var r=n(6857),i=n(3988);function o(e,t,n,r,o,a){var s={width:0,height:0,rank:a,borderType:t},u=o[t][a-1],l=i.addDummyNode(e,"border",s,n);o[t][a]=l,e.setParent(l,r),u&&e.setEdge(u,l,{weight:1})}e.exports=function(e){r.forEach(e.children(),(function t(n){var i=e.children(n),a=e.node(n);if(i.length&&r.forEach(i,t),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,u=a.maxRank+1;s<u;++s)o(e,"borderLeft","_bl",n,a,s),o(e,"borderRight","_br",n,a,s)}}))}},181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},270:(e,t,n)=>{var r=n(7068),i=n(346);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},289:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},299:(e,t,n)=>{var r=n(3120),i=n(9302),o=n(5765),a=n(3693),s=i((function(e){return o(r(e,1,a,!0))}));e.exports=s},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},426:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},494:function(e,t,n){e.exports=function(e){"use strict";var t=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(e),n={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function r(e,t,r){var i=n[r];return Array.isArray(i)&&(i=i[t?0:1]),i.replace("%d",e)}var i={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r}};return t.default.locale(i,null,!0),i}(n(4353))},498:(e,t,n)=>{var r=n(9888);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},514:(e,t,n)=>{var r=n(4932);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},583:(e,t,n)=>{var r=n(7237),i=n(7255),o=n(8586),a=n(7797);e.exports=function(e){return o(e)?r(a(e)):i(e)}},631:(e,t,n)=>{var r=n(8077),i=n(9326);e.exports=function(e,t){return null!=e&&i(e,t,r)}},641:(e,t,n)=>{var r=n(6649),i=n(5950);e.exports=function(e,t){return e&&r(e,t,i)}},659:(e,t,n)=>{var r=n(1873),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},689:(e,t,n)=>{var r=n(2),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var u=1&n,l=r(e),c=l.length;if(c!=r(t).length&&!u)return!1;for(var f=c;f--;){var h=l[f];if(!(u?h in t:i.call(t,h)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<c;){var m=e[h=l[f]],y=t[h];if(o)var b=u?o(y,m,h,t,e,s):o(m,y,h,e,t,s);if(!(void 0===b?m===y||a(m,y,n,o,s):b)){g=!1;break}v||(v="constructor"==h)}if(g&&!v){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(e),s.delete(t),g}},695:(e,t,n)=>{var r=n(8096),i=n(2428),o=n(6449),a=n(3656),s=n(361),u=n(7167),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&i(e),f=!n&&!c&&a(e),h=!n&&!c&&!f&&u(e),d=n||c||f||h,p=d?r(e.length,String):[],g=p.length;for(var v in e)!t&&!l.call(e,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,g))||p.push(v);return p}},756:(e,t,n)=>{var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},776:(e,t,n)=>{var r=n(756),i=n(5950);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},860:(e,t,n)=>{var r=n(882),i=n(909),o=n(5389),a=n(5558),s=n(6449);e.exports=function(e,t,n){var u=s(e)?r:a,l=arguments.length<3;return u(e,o(t,4),n,l,i)}},882:e=>{e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}},909:(e,t,n)=>{var r=n(641),i=n(8329)(r);e.exports=i},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},945:(e,t,n)=>{var r=n(79),i=n(8223),o=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(6221)},999:(e,t,n)=>{var r=n(9302),i=n(6800);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}},1033:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},1042:(e,t,n)=>{var r=n(6110)(Object,"create");e.exports=r},1045:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"post")}},1166:(e,t,n)=>{e.exports={Graph:n(6454),version:n(4458)}},1175:(e,t,n)=>{var r=n(6025);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},1234:e=>{e.exports=function(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;){var s=r<o?t[r]:void 0;n(a,e[r],s)}return a}},1247:(e,t,n)=>{"use strict";var r=n(9982),i=n(6540),o=n(961);function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function u(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function l(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function c(e){if(u(e)!==e)throw Error(a(188))}function f(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=f(e)))return t;e=e.sibling}return null}var h=Object.assign,d=Symbol.for("react.element"),p=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),w=Symbol.for("react.consumer"),x=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),C=Symbol.for("react.lazy");Symbol.for("react.scope");var A=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var P=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var L=Symbol.iterator;function T(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var N=Symbol.for("react.client.reference");function O(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===N?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case v:return"Fragment";case y:return"Profiler";case m:return"StrictMode";case S:return"Suspense";case _:return"SuspenseList";case A:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case g:return"Portal";case x:return(e.displayName||"Context")+".Provider";case w:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case E:return null!==(t=e.displayName||null)?t:O(e.type)||"Memo";case C:t=e._payload,e=e._init;try{return O(e(t))}catch(e){}}return null}var M=Array.isArray,R=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j={pending:!1,data:null,method:null,action:null},I=[],F=-1;function z(e){return{current:e}}function V(e){0>F||(e.current=I[F],I[F]=null,F--)}function B(e,t){F++,I[F]=e.current,e.current=t}var $=z(null),U=z(null),H=z(null),q=z(null);function W(e,t){switch(B(H,t),B(U,e),B($,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?of(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=af(t=of(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V($),B($,e)}function G(){V($),V(U),V(H)}function Y(e){null!==e.memoizedState&&B(q,e);var t=$.current,n=af(t,e.type);t!==n&&(B(U,e),B($,n))}function X(e){U.current===e&&(V($),V(U)),q.current===e&&(V(q),Xf._currentValue=j)}var K=Object.prototype.hasOwnProperty,J=r.unstable_scheduleCallback,Q=r.unstable_cancelCallback,Z=r.unstable_shouldYield,ee=r.unstable_requestPaint,te=r.unstable_now,ne=r.unstable_getCurrentPriorityLevel,re=r.unstable_ImmediatePriority,ie=r.unstable_UserBlockingPriority,oe=r.unstable_NormalPriority,ae=r.unstable_LowPriority,se=r.unstable_IdlePriority,ue=r.log,le=r.unstable_setDisableYieldValue,ce=null,fe=null;function he(e){if("function"==typeof ue&&le(e),fe&&"function"==typeof fe.setStrictMode)try{fe.setStrictMode(ce,e)}catch(e){}}var de=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(pe(e)/ge|0)|0},pe=Math.log,ge=Math.LN2,ve=256,me=4194304;function ye(e){var t=42&e;if(0!==t)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:case 262144:case 524288:case 1048576:case 2097152:return 4194048&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function be(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var i=0,o=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~o)?i=ye(r):0!==(a&=s)?i=ye(a):n||0!==(n=s&~e)&&(i=ye(n)):0!==(s=r&~o)?i=ye(s):0!==a?i=ye(a):n||0!==(n=r&~e)&&(i=ye(n)),0===i?0:0!==t&&t!==i&&0===(t&o)&&((o=i&-i)>=(n=t&-t)||32===o&&4194048&n)?t:i}function we(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function xe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ke(){var e=ve;return!(4194048&(ve<<=1))&&(ve=256),e}function Se(){var e=me;return!(62914560&(me<<=1))&&(me=4194304),e}function _e(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ee(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ce(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-de(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194090&n}function Ae(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-de(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Pe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Le(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Te(){var e=D.p;return 0!==e?e:void 0===(e=window.event)?32:ch(e.type)}var Ne=Math.random().toString(36).slice(2),Oe="__reactFiber$"+Ne,Me="__reactProps$"+Ne,Re="__reactContainer$"+Ne,De="__reactEvents$"+Ne,je="__reactListeners$"+Ne,Ie="__reactHandles$"+Ne,Fe="__reactResources$"+Ne,ze="__reactMarker$"+Ne;function Ve(e){delete e[Oe],delete e[Me],delete e[De],delete e[je],delete e[Ie]}function Be(e){var t=e[Oe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Re]||n[Oe]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=wf(e);null!==e;){if(n=e[Oe])return n;e=wf(e)}return t}n=(e=n).parentNode}return null}function $e(e){if(e=e[Oe]||e[Re]){var t=e.tag;if(5===t||6===t||13===t||26===t||27===t||3===t)return e}return null}function Ue(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(a(33))}function He(e){var t=e[Fe];return t||(t=e[Fe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function qe(e){e[ze]=!0}var We=new Set,Ge={};function Ye(e,t){Xe(e,t),Xe(e+"Capture",t)}function Xe(e,t){for(Ge[e]=t,e=0;e<t.length;e++)We.add(t[e])}var Ke,Je,Qe=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ze={},et={};function tt(e,t,n){if(i=t,K.call(et,i)||!K.call(Ze,i)&&(Qe.test(i)?et[i]=!0:(Ze[i]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var i}function nt(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function rt(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function it(e){if(void 0===Ke)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ke=t&&t[1]||"",Je=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+Ke+e+Je}var ot=!1;function at(e,t){if(!e||ot)return"";ot=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch((function(){}))}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=r.DetermineComponentFrameRoot(),a=o[0],s=o[1];if(a&&s){var u=a.split("\n"),l=s.split("\n");for(i=r=0;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;for(;i<l.length&&!l[i].includes("DetermineComponentFrameRoot");)i++;if(r===u.length||i===l.length)for(r=u.length-1,i=l.length-1;1<=r&&0<=i&&u[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(u[r]!==l[i]){if(1!==r||1!==i)do{if(r--,0>--i||u[r]!==l[i]){var c="\n"+u[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=r&&0<=i);break}}}finally{ot=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?it(n):""}function st(e){switch(e.tag){case 26:case 27:case 5:return it(e.type);case 16:return it("Lazy");case 13:return it("Suspense");case 19:return it("SuspenseList");case 0:case 15:return at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return it("Activity");default:return""}}function ut(e){try{var t="";do{t+=st(e),e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function lt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ct(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ft(e){e._valueTracker||(e._valueTracker=function(e){var t=ct(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ht(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ct(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function dt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var pt=/[\n"\\]/g;function gt(e){return e.replace(pt,(function(e){return"\\"+e.charCodeAt(0).toString(16)+" "}))}function vt(e,t,n,r,i,o,a,s){e.name="",null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a?e.type=a:e.removeAttribute("type"),null!=t?"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+lt(t)):e.value!==""+lt(t)&&(e.value=""+lt(t)):"submit"!==a&&"reset"!==a||e.removeAttribute("value"),null!=t?yt(e,a,lt(t)):null!=n?yt(e,a,lt(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=o&&(e.defaultChecked=!!o),null!=i&&(e.checked=i&&"function"!=typeof i&&"symbol"!=typeof i),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+lt(s):e.removeAttribute("name")}function mt(e,t,n,r,i,o,a,s){if(null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.type=o),null!=t||null!=n){if(("submit"===o||"reset"===o)&&null==t)return;n=null!=n?""+lt(n):"",t=null!=t?""+lt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:i)&&"symbol"!=typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.name=a)}function yt(e,t,n){"number"===t&&dt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function bt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+lt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function wt(e,t,n){null==t||((t=""+lt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+lt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function xt(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(a(92));if(M(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=lt(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r)}function kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var St=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function _t(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||St.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Et(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(a(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&_t(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&_t(e,o,t[o])}function Ct(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var At=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Pt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Lt(e){return Pt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Tt=null;function Nt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ot=null,Mt=null;function Rt(e){var t=$e(e);if(t&&(e=t.stateNode)){var n=e[Me]||null;e:switch(e=t.stateNode,t.type){case"input":if(vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+gt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Me]||null;if(!i)throw Error(a(90));vt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&ht(r)}break e;case"textarea":wt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&bt(e,!!n.multiple,t,!1)}}}var Dt=!1;function jt(e,t,n){if(Dt)return e(t,n);Dt=!0;try{return e(t)}finally{if(Dt=!1,(null!==Ot||null!==Mt)&&(Bl(),Ot&&(t=Ot,e=Mt,Mt=Ot=null,Rt(t),e)))for(t=0;t<e.length;t++)Rt(e[t])}}function It(e,t){var n=e.stateNode;if(null===n)return null;var r=n[Me]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Ft=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),zt=!1;if(Ft)try{var Vt={};Object.defineProperty(Vt,"passive",{get:function(){zt=!0}}),window.addEventListener("test",Vt,Vt),window.removeEventListener("test",Vt,Vt)}catch(e){zt=!1}var Bt=null,$t=null,Ut=null;function Ht(){if(Ut)return Ut;var e,t,n=$t,r=n.length,i="value"in Bt?Bt.value:Bt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Ut=i.slice(e,1<t?1-t:void 0)}function qt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Wt(){return!0}function Gt(){return!1}function Yt(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Wt:Gt,this.isPropagationStopped=Gt,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Wt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Wt)},persist:function(){},isPersistent:Wt}),t}var Xt,Kt,Jt,Qt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zt=Yt(Qt),en=h({},Qt,{view:0,detail:0}),tn=Yt(en),nn=h({},en,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Jt&&(Jt&&"mousemove"===e.type?(Xt=e.screenX-Jt.screenX,Kt=e.screenY-Jt.screenY):Kt=Xt=0,Jt=e),Xt)},movementY:function(e){return"movementY"in e?e.movementY:Kt}}),rn=Yt(nn),on=Yt(h({},nn,{dataTransfer:0})),an=Yt(h({},en,{relatedTarget:0})),sn=Yt(h({},Qt,{animationName:0,elapsedTime:0,pseudoElement:0})),un=Yt(h({},Qt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),ln=Yt(h({},Qt,{data:0})),cn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},hn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=hn[e])&&!!t[e]}function pn(){return dn}var gn=Yt(h({},en,{key:function(e){if(e.key){var t=cn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=qt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?fn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pn,charCode:function(e){return"keypress"===e.type?qt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?qt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),vn=Yt(h({},nn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),mn=Yt(h({},en,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pn})),yn=Yt(h({},Qt,{propertyName:0,elapsedTime:0,pseudoElement:0})),bn=Yt(h({},nn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),wn=Yt(h({},Qt,{newState:0,oldState:0})),xn=[9,13,27,32],kn=Ft&&"CompositionEvent"in window,Sn=null;Ft&&"documentMode"in document&&(Sn=document.documentMode);var _n=Ft&&"TextEvent"in window&&!Sn,En=Ft&&(!kn||Sn&&8<Sn&&11>=Sn),Cn=String.fromCharCode(32),An=!1;function Pn(e,t){switch(e){case"keyup":return-1!==xn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ln(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Tn=!1,Nn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function On(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Nn[e.type]:"textarea"===t}function Mn(e,t,n,r){Ot?Mt?Mt.push(r):Mt=[r]:Ot=r,0<(t=Hc(t,"onChange")).length&&(n=new Zt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Rn=null,Dn=null;function jn(e){jc(e,0)}function In(e){if(ht(Ue(e)))return e}function Fn(e,t){if("change"===e)return t}var zn=!1;if(Ft){var Vn;if(Ft){var Bn="oninput"in document;if(!Bn){var $n=document.createElement("div");$n.setAttribute("oninput","return;"),Bn="function"==typeof $n.oninput}Vn=Bn}else Vn=!1;zn=Vn&&(!document.documentMode||9<document.documentMode)}function Un(){Rn&&(Rn.detachEvent("onpropertychange",Hn),Dn=Rn=null)}function Hn(e){if("value"===e.propertyName&&In(Dn)){var t=[];Mn(t,Dn,e,Nt(e)),jt(jn,t)}}function qn(e,t,n){"focusin"===e?(Un(),Dn=n,(Rn=t).attachEvent("onpropertychange",Hn)):"focusout"===e&&Un()}function Wn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return In(Dn)}function Gn(e,t){if("click"===e)return In(t)}function Yn(e,t){if("input"===e||"change"===e)return In(t)}var Xn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Kn(e,t){if(Xn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!K.call(t,i)||!Xn(e[i],t[i]))return!1}return!0}function Jn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qn(e,t){var n,r=Jn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Jn(r)}}function Zn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Zn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function er(e){for(var t=dt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=dt((e=t.contentWindow).document)}return t}function tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var nr=Ft&&"documentMode"in document&&11>=document.documentMode,rr=null,ir=null,or=null,ar=!1;function sr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ar||null==rr||rr!==dt(r)||(r="selectionStart"in(r=rr)&&tr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},or&&Kn(or,r)||(or=r,0<(r=Hc(ir,"onSelect")).length&&(t=new Zt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=rr)))}function ur(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var lr={animationend:ur("Animation","AnimationEnd"),animationiteration:ur("Animation","AnimationIteration"),animationstart:ur("Animation","AnimationStart"),transitionrun:ur("Transition","TransitionRun"),transitionstart:ur("Transition","TransitionStart"),transitioncancel:ur("Transition","TransitionCancel"),transitionend:ur("Transition","TransitionEnd")},cr={},fr={};function hr(e){if(cr[e])return cr[e];if(!lr[e])return e;var t,n=lr[e];for(t in n)if(n.hasOwnProperty(t)&&t in fr)return cr[e]=n[t];return e}Ft&&(fr=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);var dr=hr("animationend"),pr=hr("animationiteration"),gr=hr("animationstart"),vr=hr("transitionrun"),mr=hr("transitionstart"),yr=hr("transitioncancel"),br=hr("transitionend"),wr=new Map,xr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function kr(e,t){wr.set(e,t),Ye(t,[e])}xr.push("scrollEnd");var Sr=new WeakMap;function _r(e,t){if("object"==typeof e&&null!==e){var n=Sr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ut(t)},Sr.set(e,t),t)}return{value:e,source:t,stack:ut(t)}}var Er=[],Cr=0,Ar=0;function Pr(){for(var e=Cr,t=Ar=Cr=0;t<e;){var n=Er[t];Er[t++]=null;var r=Er[t];Er[t++]=null;var i=Er[t];Er[t++]=null;var o=Er[t];if(Er[t++]=null,null!==r&&null!==i){var a=r.pending;null===a?i.next=i:(i.next=a.next,a.next=i),r.pending=i}0!==o&&Or(n,i,o)}}function Lr(e,t,n,r){Er[Cr++]=e,Er[Cr++]=t,Er[Cr++]=n,Er[Cr++]=r,Ar|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Tr(e,t,n,r){return Lr(e,t,n,r),Mr(e)}function Nr(e,t){return Lr(e,null,null,t),Mr(e)}function Or(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,o=e.return;null!==o;)o.childLanes|=n,null!==(r=o.alternate)&&(r.childLanes|=n),22===o.tag&&(null===(e=o.stateNode)||1&e._visibility||(i=!0)),e=o,o=o.return;return 3===e.tag?(o=e.stateNode,i&&null!==t&&(i=31-de(n),null===(r=(e=o.hiddenUpdates)[i])?e[i]=[t]:r.push(t),t.lane=536870912|n),o):null}function Mr(e){if(50<Ol)throw Ol=0,Ml=null,Error(a(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Rr={};function Dr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jr(e,t,n,r){return new Dr(e,t,n,r)}function Ir(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Fr(e,t){var n=e.alternate;return null===n?((n=jr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function zr(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Vr(e,t,n,r,i,o){var s=0;if(r=e,"function"==typeof e)Ir(e)&&(s=1);else if("string"==typeof e)s=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,$.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case A:return(e=jr(31,n,t,i)).elementType=A,e.lanes=o,e;case v:return Br(n.children,i,o,t);case m:s=8,i|=24;break;case y:return(e=jr(12,n,t,2|i)).elementType=y,e.lanes=o,e;case S:return(e=jr(13,n,t,i)).elementType=S,e.lanes=o,e;case _:return(e=jr(19,n,t,i)).elementType=_,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case b:case x:s=10;break e;case w:s=9;break e;case k:s=11;break e;case E:s=14;break e;case C:s=16,r=null;break e}s=29,n=Error(a(130,null===e?"null":typeof e,"")),r=null}return(t=jr(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Br(e,t,n,r){return(e=jr(7,e,r,t)).lanes=n,e}function $r(e,t,n){return(e=jr(6,e,null,t)).lanes=n,e}function Ur(e,t,n){return(t=jr(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hr=[],qr=0,Wr=null,Gr=0,Yr=[],Xr=0,Kr=null,Jr=1,Qr="";function Zr(e,t){Hr[qr++]=Gr,Hr[qr++]=Wr,Wr=e,Gr=t}function ei(e,t,n){Yr[Xr++]=Jr,Yr[Xr++]=Qr,Yr[Xr++]=Kr,Kr=e;var r=Jr;e=Qr;var i=32-de(r)-1;r&=~(1<<i),n+=1;var o=32-de(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Jr=1<<32-de(t)+i|n<<i|r,Qr=o+e}else Jr=1<<o|n<<i|r,Qr=e}function ti(e){null!==e.return&&(Zr(e,1),ei(e,1,0))}function ni(e){for(;e===Wr;)Wr=Hr[--qr],Hr[qr]=null,Gr=Hr[--qr],Hr[qr]=null;for(;e===Kr;)Kr=Yr[--Xr],Yr[Xr]=null,Qr=Yr[--Xr],Yr[Xr]=null,Jr=Yr[--Xr],Yr[Xr]=null}var ri=null,ii=null,oi=!1,ai=null,si=!1,ui=Error(a(519));function li(e){throw gi(_r(Error(a(418,"")),e)),ui}function ci(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Oe]=e,t[Me]=r,n){case"dialog":Ic("cancel",t),Ic("close",t);break;case"iframe":case"object":case"embed":Ic("load",t);break;case"video":case"audio":for(n=0;n<Rc.length;n++)Ic(Rc[n],t);break;case"source":Ic("error",t);break;case"img":case"image":case"link":Ic("error",t),Ic("load",t);break;case"details":Ic("toggle",t);break;case"input":Ic("invalid",t),mt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),ft(t);break;case"select":Ic("invalid",t);break;case"textarea":Ic("invalid",t),xt(t,r.value,r.defaultValue,r.children),ft(t)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||Kc(t.textContent,n)?(null!=r.popover&&(Ic("beforetoggle",t),Ic("toggle",t)),null!=r.onScroll&&Ic("scroll",t),null!=r.onScrollEnd&&Ic("scrollend",t),null!=r.onClick&&(t.onclick=Jc),t=!0):t=!1,t||li(e)}function fi(e){for(ri=e.return;ri;)switch(ri.tag){case 5:case 13:return void(si=!1);case 27:case 3:return void(si=!0);default:ri=ri.return}}function hi(e){if(e!==ri)return!1;if(!oi)return fi(e),oi=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||sf(e.type,e.memoizedProps)),t=!t),t&&ii&&li(e),fi(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,n=0;e;){if(8===e.nodeType)if("/$"===(t=e.data)){if(0===n){ii=yf(e.nextSibling);break e}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++;e=e.nextSibling}ii=null}}else 27===n?(n=ii,pf(e.type)?(e=bf,bf=null,ii=e):ii=n):ii=ri?yf(e.stateNode.nextSibling):null;return!0}function di(){ii=ri=null,oi=!1}function pi(){var e=ai;return null!==e&&(null===bl?bl=e:bl.push.apply(bl,e),ai=null),e}function gi(e){null===ai?ai=[e]:ai.push(e)}var vi=z(null),mi=null,yi=null;function bi(e,t,n){B(vi,t._currentValue),t._currentValue=n}function wi(e){e._currentValue=vi.current,V(vi)}function xi(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ki(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var o=i.dependencies;if(null!==o){var s=i.child;o=o.firstContext;e:for(;null!==o;){var u=o;o=i;for(var l=0;l<t.length;l++)if(u.context===t[l]){o.lanes|=n,null!==(u=o.alternate)&&(u.lanes|=n),xi(o.return,n,e),r||(s=null);break e}o=u.next}}else if(18===i.tag){if(null===(s=i.return))throw Error(a(341));s.lanes|=n,null!==(o=s.alternate)&&(o.lanes|=n),xi(s,n,e),s=null}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===e){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}}function Si(e,t,n,r){e=null;for(var i=t,o=!1;null!==i;){if(!o)if(524288&i.flags)o=!0;else if(262144&i.flags)break;if(10===i.tag){var s=i.alternate;if(null===s)throw Error(a(387));if(null!==(s=s.memoizedProps)){var u=i.type;Xn(i.pendingProps.value,s.value)||(null!==e?e.push(u):e=[u])}}else if(i===q.current){if(null===(s=i.alternate))throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(Xf):e=[Xf])}i=i.return}null!==e&&ki(t,e,n,r),t.flags|=262144}function _i(e){for(e=e.firstContext;null!==e;){if(!Xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ei(e){mi=e,yi=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Ci(e){return Pi(mi,e)}function Ai(e,t){return null===mi&&Ei(e),Pi(e,t)}function Pi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===yi){if(null===e)throw Error(a(308));yi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else yi=yi.next=t;return n}var Li="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach((function(e){return e()}))}},Ti=r.unstable_scheduleCallback,Ni=r.unstable_NormalPriority,Oi={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Mi(){return{controller:new Li,data:new Map,refCount:0}}function Ri(e){e.refCount--,0===e.refCount&&Ti(Ni,(function(){e.controller.abort()}))}var Di=null,ji=0,Ii=0,Fi=null;function zi(){if(0===--ji&&null!==Di){null!==Fi&&(Fi.status="fulfilled");var e=Di;Di=null,Ii=0,Fi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Vi=R.S;R.S=function(e,t){"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Di){var n=Di=[];ji=0,Ii=Lc(),Fi={status:"pending",value:void 0,then:function(e){n.push(e)}}}ji++,t.then(zi,zi)}(0,t),null!==Vi&&Vi(e,t)};var Bi=z(null);function $i(){var e=Bi.current;return null!==e?e:rl.pooledCache}function Ui(e,t){B(Bi,null===t?Bi.current:t.pool)}function Hi(){var e=$i();return null===e?null:{parent:Oi._currentValue,pool:e}}var qi=Error(a(460)),Wi=Error(a(474)),Gi=Error(a(542)),Yi={then:function(){}};function Xi(e){return"fulfilled"===(e=e.status)||"rejected"===e}function Ki(){}function Ji(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Ki,Ki),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw eo(e=t.reason),e;default:if("string"==typeof t.status)t.then(Ki,Ki);else{if(null!==(e=rl)&&100<e.shellSuspendCounter)throw Error(a(482));(e=t).status="pending",e.then((function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}}),(function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}}))}switch(t.status){case"fulfilled":return t.value;case"rejected":throw eo(e=t.reason),e}throw Qi=t,qi}}var Qi=null;function Zi(){if(null===Qi)throw Error(a(459));var e=Qi;return Qi=null,e}function eo(e){if(e===qi||e===Gi)throw Error(a(483))}var to=!1;function no(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ro(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 io(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function oo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&nl){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Mr(e),Or(e,null,n),t}return Lr(e,r,t,n),Mr(e)}function ao(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ae(e,n)}}function so(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var uo=!1;function lo(){if(uo&&null!==Fi)throw Fi}function co(e,t,n,r){uo=!1;var i=e.updateQueue;to=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var u=s,l=u.next;u.next=null,null===a?o=l:a.next=l,a=u;var c=e.alternate;null!==c&&(s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u)}if(null!==o){var f=i.baseState;for(a=0,c=l=u=null,s=o;;){var d=-536870913&s.lane,p=d!==s.lane;if(p?(ol&d)===d:(r&d)===d){0!==d&&d===Ii&&(uo=!0),null!==c&&(c=c.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var g=e,v=s;d=t;var m=n;switch(v.tag){case 1:if("function"==typeof(g=v.payload)){f=g.call(m,f,d);break e}f=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(d="function"==typeof(g=v.payload)?g.call(m,f,d):g))break e;f=h({},f,d);break e;case 2:to=!0}}null!==(d=s.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=i.callbacks)?i.callbacks=[d]:p.push(d))}else p={lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(l=c=p,u=f):c=c.next=p,a|=d;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(p=s).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}null===c&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,null===o&&(i.shared.lanes=0),dl|=a,e.lanes=a,e.memoizedState=f}}function fo(e,t){if("function"!=typeof e)throw Error(a(191,e));e.call(t)}function ho(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)fo(n[e],t)}var po=z(null),go=z(0);function vo(e,t){B(go,e=fl),B(po,t),fl=e|t.baseLanes}function mo(){B(go,fl),B(po,po.current)}function yo(){fl=go.current,V(po),V(go)}var bo=0,wo=null,xo=null,ko=null,So=!1,_o=!1,Eo=!1,Co=0,Ao=0,Po=null,Lo=0;function To(){throw Error(a(321))}function No(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xn(e[n],t[n]))return!1;return!0}function Oo(e,t,n,r,i,o){return bo=o,wo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=null===e||null===e.memoizedState?Wa:Ga,Eo=!1,o=n(r,i),Eo=!1,_o&&(o=Ro(t,n,r,i)),Mo(e),o}function Mo(e){R.H=qa;var t=null!==xo&&null!==xo.next;if(bo=0,ko=xo=wo=null,So=!1,Ao=0,Po=null,t)throw Error(a(300));null===e||As||null!==(e=e.dependencies)&&_i(e)&&(As=!0)}function Ro(e,t,n,r){wo=e;var i=0;do{if(_o&&(Po=null),Ao=0,_o=!1,25<=i)throw Error(a(301));if(i+=1,ko=xo=null,null!=e.updateQueue){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,null!=o.memoCache&&(o.memoCache.index=0)}R.H=Ya,o=t(n,r)}while(_o);return o}function Do(){var e=R.H,t=e.useState()[0];return t="function"==typeof t.then?Bo(t):t,e=e.useState()[0],(null!==xo?xo.memoizedState:null)!==e&&(wo.flags|=1024),t}function jo(){var e=0!==Co;return Co=0,e}function Io(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Fo(e){if(So){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}So=!1}bo=0,ko=xo=wo=null,_o=!1,Ao=Co=0,Po=null}function zo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ko?wo.memoizedState=ko=e:ko=ko.next=e,ko}function Vo(){if(null===xo){var e=wo.alternate;e=null!==e?e.memoizedState:null}else e=xo.next;var t=null===ko?wo.memoizedState:ko.next;if(null!==t)ko=t,xo=e;else{if(null===e){if(null===wo.alternate)throw Error(a(467));throw Error(a(310))}e={memoizedState:(xo=e).memoizedState,baseState:xo.baseState,baseQueue:xo.baseQueue,queue:xo.queue,next:null},null===ko?wo.memoizedState=ko=e:ko=ko.next=e}return ko}function Bo(e){var t=Ao;return Ao+=1,null===Po&&(Po=[]),e=Ji(Po,e,t),t=wo,null===(null===ko?t.memoizedState:ko.next)&&(t=t.alternate,R.H=null===t||null===t.memoizedState?Wa:Ga),e}function $o(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return Bo(e);if(e.$$typeof===x)return Ci(e)}throw Error(a(438,String(e)))}function Uo(e){var t=null,n=wo.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=wo.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map((function(e){return e.slice()})),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},wo.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=P;return t.index++,n}function Ho(e,t){return"function"==typeof t?t(e):t}function qo(e){return Wo(Vo(),xo,e)}function Wo(e,t,n){var r=e.queue;if(null===r)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,null===i)e.memoizedState=o;else{var u=s=null,l=null,c=t=i.next,f=!1;do{var h=-536870913&c.lane;if(h!==c.lane?(ol&h)===h:(bo&h)===h){var d=c.revertLane;if(0===d)null!==l&&(l=l.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===Ii&&(f=!0);else{if((bo&d)===d){c=c.next,d===Ii&&(f=!0);continue}h={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===l?(u=l=h,s=o):l=l.next=h,wo.lanes|=d,dl|=d}h=c.action,Eo&&n(o,h),o=c.hasEagerState?c.eagerState:n(o,h)}else d={lane:h,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===l?(u=l=d,s=o):l=l.next=d,wo.lanes|=h,dl|=h;c=c.next}while(null!==c&&c!==t);if(null===l?s=o:l.next=u,!Xn(o,e.memoizedState)&&(As=!0,f&&null!==(n=Fi)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return null===i&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Go(e){var t=Vo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Xn(o,t.memoizedState)||(As=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Yo(e,t,n){var r=wo,i=Vo(),o=oi;if(o){if(void 0===n)throw Error(a(407));n=n()}else n=t();var s=!Xn((xo||i).memoizedState,n);if(s&&(i.memoizedState=n,As=!0),i=i.queue,ma(2048,8,Jo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||null!==ko&&1&ko.memoizedState.tag){if(r.flags|=2048,pa(9,{destroy:void 0,resource:void 0},Ko.bind(null,r,i,n,t),null),null===rl)throw Error(a(349));o||124&bo||Xo(r,t,n)}return n}function Xo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=wo.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},wo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Qo(t)&&Zo(e)}function Jo(e,t,n){return n((function(){Qo(t)&&Zo(e)}))}function Qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xn(e,n)}catch(e){return!0}}function Zo(e){var t=Nr(e,2);null!==t&&jl(t,0,2)}function ea(e){var t=zo();if("function"==typeof e){var n=e;if(e=n(),Eo){he(!0);try{n()}finally{he(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:e},t}function ta(e,t,n,r){return e.baseState=n,Wo(e,xo,"function"==typeof r?r:Ho)}function na(e,t,n,r,i){if($a(e))throw Error(a(485));if(null!==(e=t.action)){var o={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};null!==R.T?n(!0):o.isTransition=!1,r(o),null===(n=t.pending)?(o.next=t.pending=o,ra(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ra(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var o=R.T,a={};R.T=a;try{var s=n(i,r),u=R.S;null!==u&&u(a,s),ia(e,t,s)}catch(n){aa(e,t,n)}finally{R.T=o}}else try{ia(e,t,o=n(i,r))}catch(n){aa(e,t,n)}}function ia(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then((function(n){oa(e,t,n)}),(function(n){return aa(e,t,n)})):oa(e,t,n)}function oa(e,t,n){t.status="fulfilled",t.value=n,sa(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,ra(e,n)))}function aa(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,sa(t),t=t.next}while(t!==r)}e.action=null}function sa(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ua(e,t){return t}function la(e,t){if(oi){var n=rl.formState;if(null!==n){e:{var r=wo;if(oi){if(ii){t:{for(var i=ii,o=si;8!==i.nodeType;){if(!o){i=null;break t}if(null===(i=yf(i.nextSibling))){i=null;break t}}i="F!"===(o=i.data)||"F"===o?i:null}if(i){ii=yf(i.nextSibling),r="F!"===i.data;break e}}li(r)}r=!1}r&&(t=n[0])}}return(n=zo()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:t},n.queue=r,n=za.bind(null,wo,r),r.dispatch=n,r=ea(!1),o=Ba.bind(null,wo,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=zo()).queue=i,n=na.bind(null,wo,i,o,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ca(e){return fa(Vo(),xo,e)}function fa(e,t,n){if(t=Wo(e,t,ua)[0],e=qo(Ho)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=Bo(t)}catch(e){if(e===qi)throw Gi;throw e}else r=t;var i=(t=Vo()).queue,o=i.dispatch;return n!==t.memoizedState&&(wo.flags|=2048,pa(9,{destroy:void 0,resource:void 0},ha.bind(null,i,n),null)),[r,o,e]}function ha(e,t){e.action=t}function da(e){var t=Vo(),n=xo;if(null!==n)return fa(t,n,e);Vo(),t=t.memoizedState;var r=(n=Vo()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function pa(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=wo.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},wo.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ga(){return Vo().memoizedState}function va(e,t,n,r){var i=zo();r=void 0===r?null:r,wo.flags|=e,i.memoizedState=pa(1|t,{destroy:void 0,resource:void 0},n,r)}function ma(e,t,n,r){var i=Vo();r=void 0===r?null:r;var o=i.memoizedState.inst;null!==xo&&null!==r&&No(r,xo.memoizedState.deps)?i.memoizedState=pa(t,o,n,r):(wo.flags|=e,i.memoizedState=pa(1|t,o,n,r))}function ya(e,t){va(8390656,8,e,t)}function ba(e,t){ma(2048,8,e,t)}function wa(e,t){return ma(4,2,e,t)}function xa(e,t){return ma(4,4,e,t)}function ka(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function Sa(e,t,n){n=null!=n?n.concat([e]):null,ma(4,4,ka.bind(null,t,e),n)}function _a(){}function Ea(e,t){var n=Vo();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&No(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ca(e,t){var n=Vo();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&No(t,r[1]))return r[0];if(r=e(),Eo){he(!0);try{e()}finally{he(!1)}}return n.memoizedState=[r,t],r}function Aa(e,t,n){return void 0===n||1073741824&bo?e.memoizedState=t:(e.memoizedState=n,e=Dl(),wo.lanes|=e,dl|=e,n)}function Pa(e,t,n,r){return Xn(n,t)?n:null!==po.current?(e=Aa(e,n,r),Xn(e,t)||(As=!0),e):42&bo?(e=Dl(),wo.lanes|=e,dl|=e,t):(As=!0,e.memoizedState=n)}function La(e,t,n,r,i){var o=D.p;D.p=0!==o&&8>o?o:8;var a,s,u,l=R.T,c={};R.T=c,Ba(e,!1,t,n);try{var f=i(),h=R.S;null!==h&&h(c,f),null!==f&&"object"==typeof f&&"function"==typeof f.then?Va(e,t,(a=r,s=[],u={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},f.then((function(){u.status="fulfilled",u.value=a;for(var e=0;e<s.length;e++)(0,s[e])(a)}),(function(e){for(u.status="rejected",u.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)})),u),Rl()):Va(e,t,r,Rl())}catch(n){Va(e,t,{then:function(){},status:"rejected",reason:n},Rl())}finally{D.p=o,R.T=l}}function Ta(){}function Na(e,t,n,r){if(5!==e.tag)throw Error(a(476));var i=Oa(e).queue;La(e,i,t,j,null===n?Ta:function(){return Ma(e),n(r)})}function Oa(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:j,baseState:j,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:j},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function Ma(e){Va(e,Oa(e).next.queue,{},Rl())}function Ra(){return Ci(Xf)}function Da(){return Vo().memoizedState}function ja(){return Vo().memoizedState}function Ia(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Rl(),r=oo(t,e=io(n),n);return null!==r&&(jl(r,0,n),ao(r,t,n)),t={cache:Mi()},void(e.payload=t)}t=t.return}}function Fa(e,t,n){var r=Rl();n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},$a(e)?Ua(t,n):null!==(n=Tr(e,t,n,r))&&(jl(n,0,r),Ha(n,t,r))}function za(e,t,n){Va(e,t,n,Rl())}function Va(e,t,n,r){var i={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if($a(e))Ua(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Xn(s,a))return Lr(e,t,i,0),null===rl&&Pr(),!1}catch(e){}if(null!==(n=Tr(e,t,i,r)))return jl(n,0,r),Ha(n,t,r),!0}return!1}function Ba(e,t,n,r){if(r={lane:2,revertLane:Lc(),action:r,hasEagerState:!1,eagerState:null,next:null},$a(e)){if(t)throw Error(a(479))}else null!==(t=Tr(e,n,r,2))&&jl(t,0,2)}function $a(e){var t=e.alternate;return e===wo||null!==t&&t===wo}function Ua(e,t){_o=So=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ha(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ae(e,n)}}var qa={readContext:Ci,use:$o,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useLayoutEffect:To,useInsertionEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useSyncExternalStore:To,useId:To,useHostTransitionStatus:To,useFormState:To,useActionState:To,useOptimistic:To,useMemoCache:To,useCacheRefresh:To},Wa={readContext:Ci,use:$o,useCallback:function(e,t){return zo().memoizedState=[e,void 0===t?null:t],e},useContext:Ci,useEffect:ya,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,va(4194308,4,ka.bind(null,t,e),n)},useLayoutEffect:function(e,t){return va(4194308,4,e,t)},useInsertionEffect:function(e,t){va(4,2,e,t)},useMemo:function(e,t){var n=zo();t=void 0===t?null:t;var r=e();if(Eo){he(!0);try{e()}finally{he(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=zo();if(void 0!==n){var i=n(t);if(Eo){he(!0);try{n(t)}finally{he(!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=Fa.bind(null,wo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},zo().memoizedState=e},useState:function(e){var t=(e=ea(e)).queue,n=za.bind(null,wo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_a,useDeferredValue:function(e,t){return Aa(zo(),e,t)},useTransition:function(){var e=ea(!1);return e=La.bind(null,wo,e.queue,!0,!1),zo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=wo,i=zo();if(oi){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===rl)throw Error(a(349));124&ol||Xo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ya(Jo.bind(null,r,o,e),[e]),r.flags|=2048,pa(9,{destroy:void 0,resource:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=zo(),t=rl.identifierPrefix;if(oi){var n=Qr;t="«"+t+"R"+(n=(Jr&~(1<<32-de(Jr)-1)).toString(32)+n),0<(n=Co++)&&(t+="H"+n.toString(32)),t+="»"}else t="«"+t+"r"+(n=Lo++).toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Ra,useFormState:la,useActionState:la,useOptimistic:function(e){var t=zo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ba.bind(null,wo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Uo,useCacheRefresh:function(){return zo().memoizedState=Ia.bind(null,wo)}},Ga={readContext:Ci,use:$o,useCallback:Ea,useContext:Ci,useEffect:ba,useImperativeHandle:Sa,useInsertionEffect:wa,useLayoutEffect:xa,useMemo:Ca,useReducer:qo,useRef:ga,useState:function(){return qo(Ho)},useDebugValue:_a,useDeferredValue:function(e,t){return Pa(Vo(),xo.memoizedState,e,t)},useTransition:function(){var e=qo(Ho)[0],t=Vo().memoizedState;return["boolean"==typeof e?e:Bo(e),t]},useSyncExternalStore:Yo,useId:Da,useHostTransitionStatus:Ra,useFormState:ca,useActionState:ca,useOptimistic:function(e,t){return ta(Vo(),0,e,t)},useMemoCache:Uo,useCacheRefresh:ja},Ya={readContext:Ci,use:$o,useCallback:Ea,useContext:Ci,useEffect:ba,useImperativeHandle:Sa,useInsertionEffect:wa,useLayoutEffect:xa,useMemo:Ca,useReducer:Go,useRef:ga,useState:function(){return Go(Ho)},useDebugValue:_a,useDeferredValue:function(e,t){var n=Vo();return null===xo?Aa(n,e,t):Pa(n,xo.memoizedState,e,t)},useTransition:function(){var e=Go(Ho)[0],t=Vo().memoizedState;return["boolean"==typeof e?e:Bo(e),t]},useSyncExternalStore:Yo,useId:Da,useHostTransitionStatus:Ra,useFormState:da,useActionState:da,useOptimistic:function(e,t){var n=Vo();return null!==xo?ta(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Uo,useCacheRefresh:ja},Xa=null,Ka=0;function Ja(e){var t=Ka;return Ka+=1,null===Xa&&(Xa=[]),Ji(Xa,e,t)}function Qa(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function Za(e,t){if(t.$$typeof===d)throw Error(a(525));throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function es(e){return(0,e._init)(e._payload)}function ts(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=Fr(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=$r(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===v?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===C&&es(o)===t.type)?(Qa(t=i(t,n.props),n),t.return=e,t):(Qa(t=Vr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ur(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Br(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=$r(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case p:return Qa(n=Vr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case g:return(t=Ur(t,e.mode,n)).return=e,t;case C:return h(e,t=(0,t._init)(t._payload),n)}if(M(t)||T(t))return(t=Br(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return h(e,Ja(t),n);if(t.$$typeof===x)return h(e,Ai(e,t),n);Za(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==i?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case p:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?c(e,t,n,r):null;case C:return d(e,t,n=(i=n._init)(n._payload),r)}if(M(n)||T(n))return null!==i?null:f(e,t,n,r,null);if("function"==typeof n.then)return d(e,t,Ja(n),r);if(n.$$typeof===x)return d(e,t,Ai(e,n),r);Za(e,n)}return null}function m(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case p:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case g:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case C:return m(e,t,n,r=(0,r._init)(r._payload),i)}if(M(r)||T(r))return f(t,e=e.get(n)||null,r,i,null);if("function"==typeof r.then)return m(e,t,n,Ja(r),i);if(r.$$typeof===x)return m(e,t,n,Ai(t,r),i);Za(t,r)}return null}function y(u,l,c,f){if("object"==typeof c&&null!==c&&c.type===v&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case p:e:{for(var b=c.key;null!==l;){if(l.key===b){if((b=c.type)===v){if(7===l.tag){n(u,l.sibling),(f=i(l,c.props.children)).return=u,u=f;break e}}else if(l.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===C&&es(b)===l.type){n(u,l.sibling),Qa(f=i(l,c.props),c),f.return=u,u=f;break e}n(u,l);break}t(u,l),l=l.sibling}c.type===v?((f=Br(c.props.children,u.mode,f,c.key)).return=u,u=f):(Qa(f=Vr(c.type,c.key,c.props,null,u.mode,f),c),f.return=u,u=f)}return s(u);case g:e:{for(b=c.key;null!==l;){if(l.key===b){if(4===l.tag&&l.stateNode.containerInfo===c.containerInfo&&l.stateNode.implementation===c.implementation){n(u,l.sibling),(f=i(l,c.children||[])).return=u,u=f;break e}n(u,l);break}t(u,l),l=l.sibling}(f=Ur(c,u.mode,f)).return=u,u=f}return s(u);case C:return y(u,l,c=(b=c._init)(c._payload),f)}if(M(c))return function(i,a,s,u){for(var l=null,c=null,f=a,p=a=0,g=null;null!==f&&p<s.length;p++){f.index>p?(g=f,f=null):g=f.sibling;var v=d(i,f,s[p],u);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&t(i,f),a=o(v,a,p),null===c?l=v:c.sibling=v,c=v,f=g}if(p===s.length)return n(i,f),oi&&Zr(i,p),l;if(null===f){for(;p<s.length;p++)null!==(f=h(i,s[p],u))&&(a=o(f,a,p),null===c?l=f:c.sibling=f,c=f);return oi&&Zr(i,p),l}for(f=r(f);p<s.length;p++)null!==(g=m(f,i,p,s[p],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?p:g.key),a=o(g,a,p),null===c?l=g:c.sibling=g,c=g);return e&&f.forEach((function(e){return t(i,e)})),oi&&Zr(i,p),l}(u,l,c,f);if(T(c)){if("function"!=typeof(b=T(c)))throw Error(a(150));return function(i,s,u,l){if(null==u)throw Error(a(151));for(var c=null,f=null,p=s,g=s=0,v=null,y=u.next();null!==p&&!y.done;g++,y=u.next()){p.index>g?(v=p,p=null):v=p.sibling;var b=d(i,p,y.value,l);if(null===b){null===p&&(p=v);break}e&&p&&null===b.alternate&&t(i,p),s=o(b,s,g),null===f?c=b:f.sibling=b,f=b,p=v}if(y.done)return n(i,p),oi&&Zr(i,g),c;if(null===p){for(;!y.done;g++,y=u.next())null!==(y=h(i,y.value,l))&&(s=o(y,s,g),null===f?c=y:f.sibling=y,f=y);return oi&&Zr(i,g),c}for(p=r(p);!y.done;g++,y=u.next())null!==(y=m(p,i,g,y.value,l))&&(e&&null!==y.alternate&&p.delete(null===y.key?g:y.key),s=o(y,s,g),null===f?c=y:f.sibling=y,f=y);return e&&p.forEach((function(e){return t(i,e)})),oi&&Zr(i,g),c}(u,l,c=b.call(c),f)}if("function"==typeof c.then)return y(u,l,Ja(c),f);if(c.$$typeof===x)return y(u,l,Ai(u,c),f);Za(u,c)}return"string"==typeof c&&""!==c||"number"==typeof c||"bigint"==typeof c?(c=""+c,null!==l&&6===l.tag?(n(u,l.sibling),(f=i(l,c)).return=u,u=f):(n(u,l),(f=$r(c,u.mode,f)).return=u,u=f),s(u)):n(u,l)}return function(e,t,n,r){try{Ka=0;var i=y(e,t,n,r);return Xa=null,i}catch(t){if(t===qi||t===Gi)throw t;var o=jr(29,t,null,e.mode);return o.lanes=r,o.return=e,o}}}var ns=ts(!0),rs=ts(!1),is=z(null),os=null;function as(e){var t=e.alternate;B(cs,1&cs.current),B(is,e),null===os&&(null===t||null!==po.current||null!==t.memoizedState)&&(os=e)}function ss(e){if(22===e.tag){if(B(cs,cs.current),B(is,e),null===os){var t=e.alternate;null!==t&&null!==t.memoizedState&&(os=e)}}else us()}function us(){B(cs,cs.current),B(is,is.current)}function ls(e){V(is),os===e&&(os=null),V(cs)}var cs=z(0);function fs(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||mf(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function hs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:h({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ds={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rl(),i=io(r);i.payload=t,null!=n&&(i.callback=n),null!==(t=oo(e,i,r))&&(jl(t,0,r),ao(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rl(),i=io(r);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=oo(e,i,r))&&(jl(t,0,r),ao(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rl(),r=io(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=oo(e,r,n))&&(jl(t,0,n),ao(t,e,n))}};function ps(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&Kn(n,r)&&Kn(i,o))}function gs(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ds.enqueueReplaceState(t,t.state,null)}function vs(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}var ms="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function ys(e){ms(e)}function bs(e){console.error(e)}function ws(e){ms(e)}function xs(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout((function(){throw e}))}}function ks(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout((function(){throw e}))}}function Ss(e,t,n){return(n=io(n)).tag=3,n.payload={element:null},n.callback=function(){xs(e,t)},n}function _s(e){return(e=io(e)).tag=3,e}function Es(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"==typeof i){var o=r.value;e.payload=function(){return i(o)},e.callback=function(){ks(t,n,r)}}var a=n.stateNode;null!==a&&"function"==typeof a.componentDidCatch&&(e.callback=function(){ks(t,n,r),"function"!=typeof i&&(null===_l?_l=new Set([this]):_l.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Cs=Error(a(461)),As=!1;function Ps(e,t,n,r){t.child=null===e?rs(t,null,n,r):ns(t,e.child,n,r)}function Ls(e,t,n,r,i){n=n.render;var o=t.ref;if("ref"in r){var a={};for(var s in r)"ref"!==s&&(a[s]=r[s])}else a=r;return Ei(t),r=Oo(e,t,n,a,o,i),s=jo(),null===e||As?(oi&&s&&ti(t),t.flags|=1,Ps(e,t,r,i),t.child):(Io(e,t,i),Xs(e,t,i))}function Ts(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Ir(o)||void 0!==o.defaultProps||null!==n.compare?((e=Vr(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ns(e,t,o,r,i))}if(o=e.child,!Ks(e,i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:Kn)(a,r)&&e.ref===t.ref)return Xs(e,t,i)}return t.flags|=1,(e=Fr(o,r)).ref=t.ref,e.return=t,t.child=e}function Ns(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Kn(o,r)&&e.ref===t.ref){if(As=!1,t.pendingProps=r=o,!Ks(e,i))return t.lanes=e.lanes,Xs(e,t,i);131072&e.flags&&(As=!0)}}return Ds(e,t,n,r,i)}function Os(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode){if(128&t.flags){if(r=null!==o?o.baseLanes|n:n,null!==e){for(i=t.child=e.child,o=0;null!==i;)o=o|i.lanes|i.childLanes,i=i.sibling;t.childLanes=o&~r}else t.childLanes=0,t.child=null;return Ms(e,t,r,n)}if(!(536870912&n))return t.lanes=t.childLanes=536870912,Ms(e,t,null!==o?o.baseLanes|n:n,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Ui(0,null!==o?o.cachePool:null),null!==o?vo(t,o):mo(),ss(t)}else null!==o?(Ui(0,o.cachePool),vo(t,o),us(),t.memoizedState=null):(null!==e&&Ui(0,null),mo(),us());return Ps(e,t,i,n),t.child}function Ms(e,t,n,r){var i=$i();return i=null===i?null:{parent:Oi._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&Ui(0,null),mo(),ss(t),null!==e&&Si(e,t,r,!0),null}function Rs(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(a(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Ds(e,t,n,r,i){return Ei(t),n=Oo(e,t,n,r,void 0,i),r=jo(),null===e||As?(oi&&r&&ti(t),t.flags|=1,Ps(e,t,n,i),t.child):(Io(e,t,i),Xs(e,t,i))}function js(e,t,n,r,i,o){return Ei(t),t.updateQueue=null,n=Ro(t,r,n,i),Mo(e),r=jo(),null===e||As?(oi&&r&&ti(t),t.flags|=1,Ps(e,t,n,o),t.child):(Io(e,t,o),Xs(e,t,o))}function Is(e,t,n,r,i){if(Ei(t),null===t.stateNode){var o=Rr,a=n.contextType;"object"==typeof a&&null!==a&&(o=Ci(a)),o=new n(r,o),t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=ds,t.stateNode=o,o._reactInternals=t,(o=t.stateNode).props=r,o.state=t.memoizedState,o.refs={},no(t),a=n.contextType,o.context="object"==typeof a&&null!==a?Ci(a):Rr,o.state=t.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(hs(t,n,a,r),o.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(a=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),a!==o.state&&ds.enqueueReplaceState(o,o.state,null),co(t,r,o,i),lo(),o.state=t.memoizedState),"function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){o=t.stateNode;var s=t.memoizedProps,u=vs(n,s);o.props=u;var l=o.context,c=n.contextType;a=Rr,"object"==typeof c&&null!==c&&(a=Ci(c));var f=n.getDerivedStateFromProps;c="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate,s=t.pendingProps!==s,c||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s||l!==a)&&gs(t,o,r,a),to=!1;var h=t.memoizedState;o.state=h,co(t,r,o,i),lo(),l=t.memoizedState,s||h!==l||to?("function"==typeof f&&(hs(t,n,f,r),l=t.memoizedState),(u=to||ps(t,n,u,r,h,l,a))?(c||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=a,r=u):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ro(e,t),c=vs(n,a=t.memoizedProps),o.props=c,f=t.pendingProps,h=o.context,l=n.contextType,u=Rr,"object"==typeof l&&null!==l&&(u=Ci(l)),(l="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==f||h!==u)&&gs(t,o,r,u),to=!1,h=t.memoizedState,o.state=h,co(t,r,o,i),lo();var d=t.memoizedState;a!==f||h!==d||to||null!==e&&null!==e.dependencies&&_i(e.dependencies)?("function"==typeof s&&(hs(t,n,s,r),d=t.memoizedState),(c=to||ps(t,n,c,r,h,d,u)||null!==e&&null!==e.dependencies&&_i(e.dependencies))?(l||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,d,u),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,d,u)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=d),o.props=r,o.state=d,o.context=u,r=c):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return o=r,Rs(e,t),r=!!(128&t.flags),o||r?(o=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:o.render(),t.flags|=1,null!==e&&r?(t.child=ns(t,e.child,null,i),t.child=ns(t,null,n,i)):Ps(e,t,n,i),t.memoizedState=o.state,e=t.child):e=Xs(e,t,i),e}function Fs(e,t,n,r){return di(),t.flags|=256,Ps(e,t,n,r),t.child}var zs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vs(e){return{baseLanes:e,cachePool:Hi()}}function Bs(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=vl),e}function $s(e,t,n){var r,i=t.pendingProps,o=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&cs.current)),r&&(o=!0,t.flags&=-129),r=!!(32&t.flags),t.flags&=-33,null===e){if(oi){if(o?as(t):us(),oi){var u,l=ii;if(u=l){e:{for(u=l,l=si;8!==u.nodeType;){if(!l){l=null;break e}if(null===(u=yf(u.nextSibling))){l=null;break e}}l=u}null!==l?(t.memoizedState={dehydrated:l,treeContext:null!==Kr?{id:Jr,overflow:Qr}:null,retryLane:536870912,hydrationErrors:null},(u=jr(18,null,null,0)).stateNode=l,u.return=t,t.child=u,ri=t,ii=null,u=!0):u=!1}u||li(t)}if(null!==(l=t.memoizedState)&&null!==(l=l.dehydrated))return mf(l)?t.lanes=32:t.lanes=536870912,null;ls(t)}return l=i.children,i=i.fallback,o?(us(),l=Hs({mode:"hidden",children:l},o=t.mode),i=Br(i,o,n,null),l.return=t,i.return=t,l.sibling=i,t.child=l,(o=t.child).memoizedState=Vs(n),o.childLanes=Bs(e,r,n),t.memoizedState=zs,i):(as(t),Us(t,l))}if(null!==(u=e.memoizedState)&&null!==(l=u.dehydrated)){if(s)256&t.flags?(as(t),t.flags&=-257,t=qs(e,t,n)):null!==t.memoizedState?(us(),t.child=e.child,t.flags|=128,t=null):(us(),o=i.fallback,l=t.mode,i=Hs({mode:"visible",children:i.children},l),(o=Br(o,l,n,null)).flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,ns(t,e.child,null,n),(i=t.child).memoizedState=Vs(n),i.childLanes=Bs(e,r,n),t.memoizedState=zs,t=o);else if(as(t),mf(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var c=r.dgst;r=c,(i=Error(a(419))).stack="",i.digest=r,gi({value:i,source:null,stack:null}),t=qs(e,t,n)}else if(As||Si(e,t,n,!1),r=0!==(n&e.childLanes),As||r){if(null!==(r=rl)&&0!==(i=0!==((i=42&(i=n&-n)?1:Pe(i))&(r.suspendedLanes|n))?0:i)&&i!==u.retryLane)throw u.retryLane=i,Nr(e,i),jl(r,0,i),Cs;"$?"===l.data||Gl(),t=qs(e,t,n)}else"$?"===l.data?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,ii=yf(l.nextSibling),ri=t,oi=!0,ai=null,si=!1,null!==e&&(Yr[Xr++]=Jr,Yr[Xr++]=Qr,Yr[Xr++]=Kr,Jr=e.id,Qr=e.overflow,Kr=t),(t=Us(t,i.children)).flags|=4096);return t}return o?(us(),o=i.fallback,l=t.mode,c=(u=e.child).sibling,(i=Fr(u,{mode:"hidden",children:i.children})).subtreeFlags=65011712&u.subtreeFlags,null!==c?o=Fr(c,o):(o=Br(o,l,n,null)).flags|=2,o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,null===(l=e.child.memoizedState)?l=Vs(n):(null!==(u=l.cachePool)?(c=Oi._currentValue,u=u.parent!==c?{parent:c,pool:c}:u):u=Hi(),l={baseLanes:l.baseLanes|n,cachePool:u}),o.memoizedState=l,o.childLanes=Bs(e,r,n),t.memoizedState=zs,i):(as(t),e=(n=e.child).sibling,(n=Fr(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Us(e,t){return(t=Hs({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Hs(e,t){return(e=jr(22,e,null,t)).lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function qs(e,t,n){return ns(t,e.child,null,n),(e=Us(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ws(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),xi(e.return,t,n)}function Gs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ys(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ps(e,t,r.children,n),2&(r=cs.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ws(e,n,t);else if(19===e.tag)Ws(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}switch(B(cs,r),i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===fs(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Gs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===fs(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Gs(t,!0,n,null,o);break;case"together":Gs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Xs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),dl|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Si(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Fr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Fr(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ks(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!_i(e))}function Js(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)As=!0;else{if(!(Ks(e,n)||128&t.flags))return As=!1,function(e,t,n){switch(t.tag){case 3:W(t,t.stateNode.containerInfo),bi(0,Oi,e.memoizedState.cache),di();break;case 27:case 5:Y(t);break;case 4:W(t,t.stateNode.containerInfo);break;case 10:bi(0,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(as(t),t.flags|=128,null):0!==(n&t.child.childLanes)?$s(e,t,n):(as(t),null!==(e=Xs(e,t,n))?e.sibling:null);as(t);break;case 19:var i=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(Si(e,t,n,!1),r=0!==(n&t.childLanes)),i){if(r)return Ys(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(cs,cs.current),r)break;return null;case 22:case 23:return t.lanes=0,Os(e,t,n);case 24:bi(0,Oi,e.memoizedState.cache)}return Xs(e,t,n)}(e,t,n);As=!!(131072&e.flags)}else As=!1,oi&&1048576&t.flags&&ei(t,Gr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var r=t.elementType,i=r._init;if(r=i(r._payload),t.type=r,"function"!=typeof r){if(null!=r){if((i=r.$$typeof)===k){t.tag=11,t=Ls(null,t,r,e,n);break e}if(i===E){t.tag=14,t=Ts(null,t,r,e,n);break e}}throw t=O(r)||r,Error(a(306,t,""))}Ir(r)?(e=vs(r,e),t.tag=1,t=Is(null,t,r,e,n)):(t.tag=0,t=Ds(null,t,r,e,n))}return t;case 0:return Ds(e,t,t.type,t.pendingProps,n);case 1:return Is(e,t,r=t.type,i=vs(r,t.pendingProps),n);case 3:e:{if(W(t,t.stateNode.containerInfo),null===e)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,ro(e,t),co(t,r,null,n);var s=t.memoizedState;if(r=s.cache,bi(0,Oi,r),r!==o.cache&&ki(t,[Oi],n,!0),lo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Fs(e,t,r,n);break e}if(r!==i){gi(i=_r(Error(a(424)),t)),t=Fs(e,t,r,n);break e}for(e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,ii=yf(e.firstChild),ri=t,oi=!0,ai=null,si=!0,n=rs(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(di(),r===i){t=Xs(e,t,n);break e}Ps(e,t,r,n)}t=t.child}return t;case 26:return Rs(e,t),null===e?(n=Lf(t.type,null,t.pendingProps,null))?t.memoizedState=n:oi||(n=t.type,e=t.pendingProps,(r=rf(H.current).createElement(n))[Oe]=t,r[Me]=e,ef(r,n,e),qe(r),t.stateNode=r):t.memoizedState=Lf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Y(t),null===e&&oi&&(r=t.stateNode=xf(t.type,t.pendingProps,H.current),ri=t,si=!0,i=ii,pf(t.type)?(bf=i,ii=yf(r.firstChild)):ii=i),Ps(e,t,t.pendingProps.children,n),Rs(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&oi&&((i=r=ii)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[ze])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(o=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(o!==i.rel||e.getAttribute("href")!==(null==i.href||""===i.href?null:i.href)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin)||e.getAttribute("title")!==(null==i.title?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((o=e.getAttribute("src"))!==(null==i.src?null:i.src)||e.getAttribute("type")!==(null==i.type?null:i.type)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var o=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===o)return e}if(null===(e=yf(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,si))?(t.stateNode=r,ri=t,ii=yf(r.firstChild),si=!1,i=!0):i=!1),i||li(t)),Y(t),i=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,r=o.children,sf(i,o)?r=null:null!==s&&sf(i,s)&&(t.flags|=32),null!==t.memoizedState&&(i=Oo(e,t,Do,null,null,n),Xf._currentValue=i),Rs(e,t),Ps(e,t,r,n),t.child;case 6:return null===e&&oi&&((e=n=ii)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=yf(e.nextSibling)))return null}return e}(n,t.pendingProps,si))?(t.stateNode=n,ri=t,ii=null,e=!0):e=!1),e||li(t)),null;case 13:return $s(e,t,n);case 4:return W(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ns(t,null,r,n):Ps(e,t,r,n),t.child;case 11:return Ls(e,t,t.type,t.pendingProps,n);case 7:return Ps(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ps(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,bi(0,t.type,r.value),Ps(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Ei(t),r=r(i=Ci(i)),t.flags|=1,Ps(e,t,r,n),t.child;case 14:return Ts(e,t,t.type,t.pendingProps,n);case 15:return Ns(e,t,t.type,t.pendingProps,n);case 19:return Ys(e,t,n);case 31:return r=t.pendingProps,n=t.mode,r={mode:r.mode,children:r.children},null===e?((n=Hs(r,n)).ref=t.ref,t.child=n,n.return=t,t=n):((n=Fr(e.child,r)).ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Os(e,t,n);case 24:return Ei(t),r=Ci(Oi),null===e?(null===(i=$i())&&(i=rl,o=Mi(),i.pooledCache=o,o.refCount++,null!==o&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},no(t),bi(0,Oi,i)):(0!==(e.lanes&n)&&(ro(e,t),co(t,null,null,n),lo()),i=e.memoizedState,o=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),bi(0,Oi,r)):(r=o.cache,bi(0,Oi,r),r!==i.cache&&ki(t,[Oi],n,!0))),Ps(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Qs(e){e.flags|=4}function Zs(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!$f(t)){if(null!==(t=is.current)&&((4194048&ol)===ol?null!==os:(62914560&ol)!==ol&&!(536870912&ol)||t!==os))throw Qi=Yi,Wi;e.flags|=8192}}function eu(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Se():536870912,e.lanes|=t,ml|=t)}function tu(e,t){if(!oi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function nu(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=65011712&i.subtreeFlags,r|=65011712&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ru(e,t,n){var r=t.pendingProps;switch(ni(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return nu(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),wi(Oi),G(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(hi(t)?Qs(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,pi())),nu(t),null;case 26:return n=t.memoizedState,null===e?(Qs(t),null!==n?(nu(t),Zs(t,n)):(nu(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Qs(t),nu(t),Zs(t,n)):(nu(t),t.flags&=-16777217):(e.memoizedProps!==r&&Qs(t),nu(t),t.flags&=-16777217),null;case 27:X(t),n=H.current;var i=t.type;if(null!==e&&null!=t.stateNode)e.memoizedProps!==r&&Qs(t);else{if(!r){if(null===t.stateNode)throw Error(a(166));return nu(t),null}e=$.current,hi(t)?ci(t):(e=xf(i,r,n),t.stateNode=e,Qs(t))}return nu(t),null;case 5:if(X(t),n=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&Qs(t);else{if(!r){if(null===t.stateNode)throw Error(a(166));return nu(t),null}if(e=$.current,hi(t))ci(t);else{switch(i=rf(H.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":(e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?i.createElement(n,{is:r.is}):i.createElement(n)}}e[Oe]=t,e[Me]=r;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(ef(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Qs(t)}}return nu(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&Qs(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(e=H.current,hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=ri))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Oe]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||Kc(e.nodeValue,n)))||li(t)}else(e=rf(e).createTextNode(r))[Oe]=t,t.stateNode=e}return nu(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=hi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(a(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(a(317));i[Oe]=t}else di(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;nu(t),i=!1}else i=pi(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return 256&t.flags?(ls(t),t):(ls(t),null)}if(ls(t),128&t.flags)return t.lanes=n,t;if(n=null!==r,e=null!==e&&null!==e.memoizedState,n){i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool);var o=null;null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),eu(t,t.updateQueue),nu(t),null;case 4:return G(),null===e&&Vc(t.stateNode.containerInfo),nu(t),null;case 10:return wi(t.type),nu(t),null;case 19:if(V(cs),null===(i=t.memoizedState))return nu(t),null;if(r=!!(128&t.flags),null===(o=i.rendering))if(r)tu(i,!1);else{if(0!==hl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=fs(e))){for(t.flags|=128,tu(i,!1),e=o.updateQueue,t.updateQueue=e,eu(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)zr(n,e),n=n.sibling;return B(cs,1&cs.current|2),t.child}e=e.sibling}null!==i.tail&&te()>kl&&(t.flags|=128,r=!0,tu(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=fs(o))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,eu(t,e),tu(i,!0),null===i.tail&&"hidden"===i.tailMode&&!o.alternate&&!oi)return nu(t),null}else 2*te()-i.renderingStartTime>kl&&536870912!==n&&(t.flags|=128,r=!0,tu(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=i.last)?e.sibling=o:t.child=o,i.last=o)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=te(),t.sibling=null,e=cs.current,B(cs,r?1&e|2:1&e),t):(nu(t),null);case 22:case 23:return ls(t),yo(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(nu(t),6&t.subtreeFlags&&(t.flags|=8192)):nu(t),null!==(n=t.updateQueue)&&eu(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&V(Bi),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),wi(Oi),nu(t),null;case 25:case 30:return null}throw Error(a(156,t.tag))}function iu(e,t){switch(ni(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return wi(Oi),G(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return X(t),null;case 13:if(ls(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));di()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return V(cs),null;case 4:return G(),null;case 10:return wi(t.type),null;case 22:case 23:return ls(t),yo(),null!==e&&V(Bi),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return wi(Oi),null;default:return null}}function ou(e,t){switch(ni(t),t.tag){case 3:wi(Oi),G();break;case 26:case 27:case 5:X(t);break;case 4:G();break;case 13:ls(t);break;case 19:V(cs);break;case 10:wi(t.type);break;case 22:case 23:ls(t),yo(),null!==e&&V(Bi);break;case 24:wi(Oi)}}function au(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var o=n.create,a=n.inst;r=o(),a.destroy=r}n=n.next}while(n!==i)}}catch(e){cc(t,t.return,e)}}function su(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var o=i.next;r=o;do{if((r.tag&e)===e){var a=r.inst,s=a.destroy;if(void 0!==s){a.destroy=void 0,i=t;var u=n,l=s;try{l()}catch(e){cc(i,u,e)}}}r=r.next}while(r!==o)}}catch(e){cc(t,t.return,e)}}function uu(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{ho(t,n)}catch(t){cc(e,e.return,t)}}}function lu(e,t,n){n.props=vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){cc(e,t,n)}}function cu(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(n){cc(e,t,n)}}function fu(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){cc(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){cc(e,t,n)}else n.current=null}function hu(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){cc(e,e.return,t)}}function du(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,o=null,s=null,u=null,l=null,c=null,f=null;for(p in n){var h=n[p];if(n.hasOwnProperty(p)&&null!=h)switch(p){case"checked":case"value":break;case"defaultValue":l=h;default:r.hasOwnProperty(p)||Qc(e,t,p,null,r,h)}}for(var d in r){var p=r[d];if(h=n[d],r.hasOwnProperty(d)&&(null!=p||null!=h))switch(d){case"type":o=p;break;case"name":i=p;break;case"checked":c=p;break;case"defaultChecked":f=p;break;case"value":s=p;break;case"defaultValue":u=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(a(137,t));break;default:p!==h&&Qc(e,t,d,p,r,h)}}return void vt(e,s,u,l,c,f,o,i);case"select":for(o in p=s=u=d=null,n)if(l=n[o],n.hasOwnProperty(o)&&null!=l)switch(o){case"value":break;case"multiple":p=l;default:r.hasOwnProperty(o)||Qc(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(null!=o||null!=l))switch(i){case"value":d=o;break;case"defaultValue":u=o;break;case"multiple":s=o;default:o!==l&&Qc(e,t,i,o,r,l)}return t=u,n=s,r=p,void(null!=d?bt(e,!!n,d,!1):!!r!=!!n&&(null!=t?bt(e,!!n,t,!0):bt(e,!!n,n?[]:"",!1)));case"textarea":for(u in p=d=null,n)if(i=n[u],n.hasOwnProperty(u)&&null!=i&&!r.hasOwnProperty(u))switch(u){case"value":case"children":break;default:Qc(e,t,u,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(null!=i||null!=o))switch(s){case"value":d=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(a(91));break;default:i!==o&&Qc(e,t,s,i,r,o)}return void wt(e,d,p);case"option":for(var g in n)d=n[g],n.hasOwnProperty(g)&&null!=d&&!r.hasOwnProperty(g)&&("selected"===g?e.selected=!1:Qc(e,t,g,null,r,d));for(l in r)d=r[l],p=n[l],!r.hasOwnProperty(l)||d===p||null==d&&null==p||("selected"===l?e.selected=d&&"function"!=typeof d&&"symbol"!=typeof d:Qc(e,t,l,d,r,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in n)d=n[v],n.hasOwnProperty(v)&&null!=d&&!r.hasOwnProperty(v)&&Qc(e,t,v,null,r,d);for(c in r)if(d=r[c],p=n[c],r.hasOwnProperty(c)&&d!==p&&(null!=d||null!=p))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(a(137,t));break;default:Qc(e,t,c,d,r,p)}return;default:if(Ct(t)){for(var m in n)d=n[m],n.hasOwnProperty(m)&&void 0!==d&&!r.hasOwnProperty(m)&&Zc(e,t,m,void 0,r,d);for(f in r)d=r[f],p=n[f],!r.hasOwnProperty(f)||d===p||void 0===d&&void 0===p||Zc(e,t,f,d,r,p);return}}for(var y in n)d=n[y],n.hasOwnProperty(y)&&null!=d&&!r.hasOwnProperty(y)&&Qc(e,t,y,null,r,d);for(h in r)d=r[h],p=n[h],!r.hasOwnProperty(h)||d===p||null==d&&null==p||Qc(e,t,h,d,r,p)}(r,e.type,n,t),r[Me]=t}catch(t){cc(e,e.return,t)}}function pu(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&pf(e.type)||4===e.tag}function gu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||pu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&pf(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function vu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jc));else if(4!==r&&(27===r&&pf(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(vu(e,t,n),e=e.sibling;null!==e;)vu(e,t,n),e=e.sibling}function mu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&pf(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(mu(e,t,n),e=e.sibling;null!==e;)mu(e,t,n),e=e.sibling}function yu(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ef(t,r,n),t[Oe]=e,t[Me]=n}catch(t){cc(e,e.return,t)}}var bu=!1,wu=!1,xu=!1,ku="function"==typeof WeakSet?WeakSet:Set,Su=null;function _u(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Iu(e,n),4&r&&au(5,n);break;case 1:if(Iu(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){cc(n,n.return,e)}else{var i=vs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){cc(n,n.return,e)}}64&r&&uu(n),512&r&&cu(n,n.return);break;case 3:if(Iu(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{ho(e,t)}catch(e){cc(n,n.return,e)}}break;case 27:null===t&&4&r&&yu(n);case 26:case 5:Iu(e,n),null===t&&4&r&&hu(n),512&r&&cu(n,n.return);break;case 12:Iu(e,n);break;case 13:Iu(e,n),4&r&&Tu(e,n),64&r&&null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$?"!==e.data||"complete"===n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=pc.bind(null,n));break;case 22:if(!(r=null!==n.memoizedState||bu)){t=null!==t&&null!==t.memoizedState||wu,i=bu;var o=wu;bu=r,(wu=t)&&!o?zu(e,n,!!(8772&n.subtreeFlags)):Iu(e,n),bu=i,wu=o}break;case 30:break;default:Iu(e,n)}}function Eu(e){var t=e.alternate;null!==t&&(e.alternate=null,Eu(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&Ve(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Cu=null,Au=!1;function Pu(e,t,n){for(n=n.child;null!==n;)Lu(e,t,n),n=n.sibling}function Lu(e,t,n){if(fe&&"function"==typeof fe.onCommitFiberUnmount)try{fe.onCommitFiberUnmount(ce,n)}catch(e){}switch(n.tag){case 26:wu||fu(n,t),Pu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:wu||fu(n,t);var r=Cu,i=Au;pf(n.type)&&(Cu=n.stateNode,Au=!1),Pu(e,t,n),kf(n.stateNode),Cu=r,Au=i;break;case 5:wu||fu(n,t);case 6:if(r=Cu,i=Au,Cu=null,Pu(e,t,n),Au=i,null!==(Cu=r))if(Au)try{(9===Cu.nodeType?Cu.body:"HTML"===Cu.nodeName?Cu.ownerDocument.body:Cu).removeChild(n.stateNode)}catch(e){cc(n,t,e)}else try{Cu.removeChild(n.stateNode)}catch(e){cc(n,t,e)}break;case 18:null!==Cu&&(Au?(gf(9===(e=Cu).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Ph(e)):gf(Cu,n.stateNode));break;case 4:r=Cu,i=Au,Cu=n.stateNode.containerInfo,Au=!0,Pu(e,t,n),Cu=r,Au=i;break;case 0:case 11:case 14:case 15:wu||su(2,n,t),wu||su(4,n,t),Pu(e,t,n);break;case 1:wu||(fu(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&lu(n,t,r)),Pu(e,t,n);break;case 21:Pu(e,t,n);break;case 22:wu=(r=wu)||null!==n.memoizedState,Pu(e,t,n),wu=r;break;default:Pu(e,t,n)}}function Tu(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{Ph(e)}catch(e){cc(t,t.return,e)}}function Nu(e,t){var n=function(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new ku),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new ku),t;default:throw Error(a(435,e.tag))}}(e);t.forEach((function(t){var r=gc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}function Ou(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,u=s;e:for(;null!==u;){switch(u.tag){case 27:if(pf(u.type)){Cu=u.stateNode,Au=!1;break e}break;case 5:Cu=u.stateNode,Au=!1;break e;case 3:case 4:Cu=u.stateNode.containerInfo,Au=!0;break e}u=u.return}if(null===Cu)throw Error(a(160));Lu(o,s,i),Cu=null,Au=!1,null!==(o=i.alternate)&&(o.return=null),i.return=null}if(13878&t.subtreeFlags)for(t=t.child;null!==t;)Ru(t,e),t=t.sibling}var Mu=null;function Ru(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ou(t,e),Du(e),4&r&&(su(3,e,e.return),au(3,e),su(5,e,e.return));break;case 1:Ou(t,e),Du(e),512&r&&(wu||null===n||fu(n,n.return)),64&r&&bu&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r));break;case 26:var i=Mu;if(Ou(t,e),Du(e),512&r&&(wu||null===n||fu(n,n.return)),4&r){var o=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":(!(o=i.getElementsByTagName("title")[0])||o[ze]||o[Oe]||"http://www.w3.org/2000/svg"===o.namespaceURI||o.hasAttribute("itemprop"))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector("head > title"))),ef(o,r,n),o[Oe]=e,qe(o),r=o;break e;case"link":var s=Vf("link","href",i).get(r+(n.href||""));if(s)for(var u=0;u<s.length;u++)if((o=s[u]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&o.getAttribute("rel")===(null==n.rel?null:n.rel)&&o.getAttribute("title")===(null==n.title?null:n.title)&&o.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(u,1);break t}ef(o=i.createElement(r),r,n),i.head.appendChild(o);break;case"meta":if(s=Vf("meta","content",i).get(r+(n.content||"")))for(u=0;u<s.length;u++)if((o=s[u]).getAttribute("content")===(null==n.content?null:""+n.content)&&o.getAttribute("name")===(null==n.name?null:n.name)&&o.getAttribute("property")===(null==n.property?null:n.property)&&o.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&o.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(u,1);break t}ef(o=i.createElement(r),r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[Oe]=e,qe(o),r=o}e.stateNode=r}else Bf(i,e.type,e.stateNode);else e.stateNode=Df(i,r,e.memoizedProps);else o!==r?(null===o?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):o.count--,null===r?Bf(i,e.type,e.stateNode):Df(i,r,e.memoizedProps)):null===r&&null!==e.stateNode&&du(e,e.memoizedProps,n.memoizedProps)}break;case 27:Ou(t,e),Du(e),512&r&&(wu||null===n||fu(n,n.return)),null!==n&&4&r&&du(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Ou(t,e),Du(e),512&r&&(wu||null===n||fu(n,n.return)),32&e.flags){i=e.stateNode;try{kt(i,"")}catch(t){cc(e,e.return,t)}}4&r&&null!=e.stateNode&&du(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&r&&(xu=!0);break;case 6:if(Ou(t,e),Du(e),4&r){if(null===e.stateNode)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){cc(e,e.return,t)}}break;case 3:if(zf=null,i=Mu,Mu=Ef(t.containerInfo),Ou(t,e),Mu=i,Du(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ph(t.containerInfo)}catch(t){cc(e,e.return,t)}xu&&(xu=!1,ju(e));break;case 4:r=Mu,Mu=Ef(e.stateNode.containerInfo),Ou(t,e),Du(e),Mu=r;break;case 12:default:Ou(t,e),Du(e);break;case 13:Ou(t,e),Du(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(xl=te()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,Nu(e,r));break;case 22:i=null!==e.memoizedState;var l=null!==n&&null!==n.memoizedState,c=bu,f=wu;if(bu=c||i,wu=f||l,Ou(t,e),wu=f,bu=c,Du(e),8192&r)e:for(t=e.stateNode,t._visibility=i?-2&t._visibility:1|t._visibility,i&&(null===n||l||bu||wu||Fu(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){l=n=t;try{if(o=l.stateNode,i)"function"==typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{u=l.stateNode;var h=l.memoizedProps.style,d=null!=h&&h.hasOwnProperty("display")?h.display:null;u.style.display=null==d||"boolean"==typeof d?"":(""+d).trim()}}catch(e){cc(l,l.return,e)}}}else if(6===t.tag){if(null===n){l=t;try{l.stateNode.nodeValue=i?"":l.memoizedProps}catch(e){cc(l,l.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&null!==(r=e.updateQueue)&&null!==(n=r.retryQueue)&&(r.retryQueue=null,Nu(e,n));break;case 19:Ou(t,e),Du(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,Nu(e,r));case 30:case 21:}}function Du(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(pu(r)){n=r;break}r=r.return}if(null==n)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;mu(e,gu(e),i);break;case 5:var o=n.stateNode;32&n.flags&&(kt(o,""),n.flags&=-33),mu(e,gu(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;vu(e,gu(e),s);break;default:throw Error(a(161))}}catch(t){cc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ju(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;ju(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Iu(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)_u(e,t.alternate,t),t=t.sibling}function Fu(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:su(4,t,t.return),Fu(t);break;case 1:fu(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&lu(t,t.return,n),Fu(t);break;case 27:kf(t.stateNode);case 26:case 5:fu(t,t.return),Fu(t);break;case 22:null===t.memoizedState&&Fu(t);break;default:Fu(t)}e=e.sibling}}function zu(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,o=t,a=o.flags;switch(o.tag){case 0:case 11:case 15:zu(i,o,n),au(4,o);break;case 1:if(zu(i,o,n),"function"==typeof(i=(r=o).stateNode).componentDidMount)try{i.componentDidMount()}catch(e){cc(r,r.return,e)}if(null!==(i=(r=o).updateQueue)){var s=r.stateNode;try{var u=i.shared.hiddenCallbacks;if(null!==u)for(i.shared.hiddenCallbacks=null,i=0;i<u.length;i++)fo(u[i],s)}catch(e){cc(r,r.return,e)}}n&&64&a&&uu(o),cu(o,o.return);break;case 27:yu(o);case 26:case 5:zu(i,o,n),n&&null===r&&4&a&&hu(o),cu(o,o.return);break;case 12:zu(i,o,n);break;case 13:zu(i,o,n),n&&4&a&&Tu(i,o);break;case 22:null===o.memoizedState&&zu(i,o,n),cu(o,o.return);break;case 30:break;default:zu(i,o,n)}t=t.sibling}}function Vu(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Ri(n))}function Bu(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ri(e))}function $u(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)Uu(e,t,n,r),t=t.sibling}function Uu(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:$u(e,t,n,r),2048&i&&au(9,t);break;case 1:case 13:default:$u(e,t,n,r);break;case 3:$u(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ri(e)));break;case 12:if(2048&i){$u(e,t,n,r),e=t.stateNode;try{var o=t.memoizedProps,a=o.id,s=o.onPostCommit;"function"==typeof s&&s(a,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){cc(t,t.return,e)}}else $u(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,a=t.alternate,null!==t.memoizedState?2&o._visibility?$u(e,t,n,r):qu(e,t):2&o._visibility?$u(e,t,n,r):(o._visibility|=2,Hu(e,t,n,r,!!(10256&t.subtreeFlags))),2048&i&&Vu(a,t);break;case 24:$u(e,t,n,r),2048&i&&Bu(t.alternate,t)}}function Hu(e,t,n,r,i){for(i=i&&!!(10256&t.subtreeFlags),t=t.child;null!==t;){var o=e,a=t,s=n,u=r,l=a.flags;switch(a.tag){case 0:case 11:case 15:Hu(o,a,s,u,i),au(8,a);break;case 23:break;case 22:var c=a.stateNode;null!==a.memoizedState?2&c._visibility?Hu(o,a,s,u,i):qu(o,a):(c._visibility|=2,Hu(o,a,s,u,i)),i&&2048&l&&Vu(a.alternate,a);break;case 24:Hu(o,a,s,u,i),i&&2048&l&&Bu(a.alternate,a);break;default:Hu(o,a,s,u,i)}t=t.sibling}}function qu(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:qu(n,r),2048&i&&Vu(r.alternate,r);break;case 24:qu(n,r),2048&i&&Bu(r.alternate,r);break;default:qu(n,r)}t=t.sibling}}var Wu=8192;function Gu(e){if(e.subtreeFlags&Wu)for(e=e.child;null!==e;)Yu(e),e=e.sibling}function Yu(e){switch(e.tag){case 26:Gu(e),e.flags&Wu&&null!==e.memoizedState&&function(e,t,n){if(null===Uf)throw Error(a(475));var r=Uf;if(!("stylesheet"!==t.type||"string"==typeof n.media&&!1===matchMedia(n.media).matches||4&t.state.loading)){if(null===t.instance){var i=Tf(n.href),o=e.querySelector(Nf(i));if(o)return null!==(e=o._p)&&"object"==typeof e&&"function"==typeof e.then&&(r.count++,r=qf.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=o,void qe(o);o=e.ownerDocument||e,n=Of(n),(i=Sf.get(i))&&If(n,i),qe(o=o.createElement("link"));var s=o;s._p=new Promise((function(e,t){s.onload=e,s.onerror=t})),ef(o,"link",n),t.instance=o}null===r.stylesheets&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&!(3&t.state.loading)&&(r.count++,t=qf.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}(Mu,e.memoizedState,e.memoizedProps);break;case 5:default:Gu(e);break;case 3:case 4:var t=Mu;Mu=Ef(e.stateNode.containerInfo),Gu(e),Mu=t;break;case 22:null===e.memoizedState&&(null!==(t=e.alternate)&&null!==t.memoizedState?(t=Wu,Wu=16777216,Gu(e),Wu=t):Gu(e))}}function Xu(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function Ku(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Su=r,Zu(r,e)}Xu(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)Ju(e),e=e.sibling}function Ju(e){switch(e.tag){case 0:case 11:case 15:Ku(e),2048&e.flags&&su(9,e,e.return);break;case 3:case 12:default:Ku(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,Qu(e)):Ku(e)}}function Qu(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Su=r,Zu(r,e)}Xu(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:su(8,t,t.return),Qu(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,Qu(t));break;default:Qu(t)}e=e.sibling}}function Zu(e,t){for(;null!==Su;){var n=Su;switch(n.tag){case 0:case 11:case 15:su(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Ri(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Su=r;else e:for(n=e;null!==Su;){var i=(r=Su).sibling,o=r.return;if(Eu(r),r===n){Su=null;break e}if(null!==i){i.return=o,Su=i;break e}Su=o}}}var el={getCacheForType:function(e){var t=Ci(Oi),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},tl="function"==typeof WeakMap?WeakMap:Map,nl=0,rl=null,il=null,ol=0,al=0,sl=null,ul=!1,ll=!1,cl=!1,fl=0,hl=0,dl=0,pl=0,gl=0,vl=0,ml=0,yl=null,bl=null,wl=!1,xl=0,kl=1/0,Sl=null,_l=null,El=0,Cl=null,Al=null,Pl=0,Ll=0,Tl=null,Nl=null,Ol=0,Ml=null;function Rl(){return 2&nl&&0!==ol?ol&-ol:null!==R.T?0!==Ii?Ii:Lc():Te()}function Dl(){0===vl&&(vl=536870912&ol&&!oi?536870912:ke());var e=is.current;return null!==e&&(e.flags|=32),vl}function jl(e,t,n){(e!==rl||2!==al&&9!==al)&&null===e.cancelPendingCommit||(Ul(e,0),Vl(e,ol,vl,!1)),Ee(e,n),2&nl&&e===rl||(e===rl&&(!(2&nl)&&(pl|=n),4===hl&&Vl(e,ol,vl,!1)),kc(e))}function Il(e,t,n){if(6&nl)throw Error(a(327));for(var r=!n&&!(124&t)&&0===(t&e.expiredLanes)||we(e,t),i=r?function(e,t){var n=nl;nl|=2;var r=ql(),i=Wl();rl!==e||ol!==t?(Sl=null,kl=te()+500,Ul(e,t)):ll=we(e,t);e:for(;;)try{if(0!==al&&null!==il){t=il;var o=sl;t:switch(al){case 1:al=0,sl=null,Zl(e,t,o,1);break;case 2:case 9:if(Xi(o)){al=0,sl=null,Ql(t);break}t=function(){2!==al&&9!==al||rl!==e||(al=7),kc(e)},o.then(t,t);break e;case 3:al=7;break e;case 4:al=5;break e;case 7:Xi(o)?(al=0,sl=null,Ql(t)):(al=0,sl=null,Zl(e,t,o,7));break;case 5:var s=null;switch(il.tag){case 26:s=il.memoizedState;case 5:case 27:var u=il;if(!s||$f(s)){al=0,sl=null;var l=u.sibling;if(null!==l)il=l;else{var c=u.return;null!==c?(il=c,ec(c)):il=null}break t}}al=0,sl=null,Zl(e,t,o,5);break;case 6:al=0,sl=null,Zl(e,t,o,6);break;case 8:$l(),hl=6;break e;default:throw Error(a(462))}}Kl();break}catch(t){Hl(e,t)}return yi=mi=null,R.H=r,R.A=i,nl=n,null!==il?0:(rl=null,ol=0,Pr(),hl)}(e,t):Yl(e,t,!0),o=r;;){if(0===i){ll&&!r&&Vl(e,t,0,!1);break}if(n=e.current.alternate,!o||zl(n)){if(2===i){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=0!=(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var u=e;i=yl;var l=u.current.memoizedState.isDehydrated;if(l&&(Ul(u,s).flags|=256),2!==(s=Yl(u,s,!1))){if(cl&&!l){u.errorRecoveryDisabledLanes|=o,pl|=o,i=4;break e}o=bl,bl=i,null!==o&&(null===bl?bl=o:bl.push.apply(bl,o))}i=s}if(o=!1,2!==i)continue}}if(1===i){Ul(e,0),Vl(e,t,0,!0);break}e:{switch(r=e,o=i){case 0:case 1:throw Error(a(345));case 4:if((4194048&t)!==t)break;case 6:Vl(r,t,vl,!ul);break e;case 2:bl=null;break;case 3:case 5:break;default:throw Error(a(329))}if((62914560&t)===t&&10<(i=xl+300-te())){if(Vl(r,t,vl,!ul),0!==be(r,0,!0))break e;r.timeoutHandle=lf(Fl.bind(null,r,n,bl,Sl,wl,t,vl,pl,ml,ul,o,2,-0,0),i)}else Fl(r,n,bl,Sl,wl,t,vl,pl,ml,ul,o,0,-0,0)}break}i=Yl(e,t,!1),o=!1}kc(e)}function Fl(e,t,n,r,i,o,s,u,l,c,f,h,d,p){if(e.timeoutHandle=-1,(8192&(h=t.subtreeFlags)||!(16785408&~h))&&(Uf={stylesheets:null,count:0,unsuspend:Hf},Yu(t),null!==(h=function(){if(null===Uf)throw Error(a(475));var e=Uf;return e.stylesheets&&0===e.count&&Gf(e,e.stylesheets),0<e.count?function(t){var n=setTimeout((function(){if(e.stylesheets&&Gf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}),6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}())))return e.cancelPendingCommit=h(nc.bind(null,e,t,o,n,r,i,s,u,l,f,1,d,p)),void Vl(e,o,s,!c);nc(e,t,o,n,r,i,s,u,l)}function zl(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Xn(o(),i))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vl(e,t,n,r){t&=~gl,t&=~pl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var o=31-de(i),a=1<<o;r[o]=-1,i&=~a}0!==n&&Ce(e,n,t)}function Bl(){return!!(6&nl)||(Sc(0,!1),!1)}function $l(){if(null!==il){if(0===al)var e=il.return;else yi=mi=null,Fo(e=il),Xa=null,Ka=0,e=il;for(;null!==e;)ou(e.alternate,e),e=e.return;il=null}}function Ul(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,cf(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),$l(),rl=e,il=n=Fr(e.current,null),ol=t,al=0,sl=null,ul=!1,ll=we(e,t),cl=!1,ml=vl=gl=pl=dl=hl=0,bl=yl=null,wl=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-de(r),o=1<<i;t|=e[i],r&=~o}return fl=t,Pr(),n}function Hl(e,t){wo=null,R.H=qa,t===qi||t===Gi?(t=Zi(),al=3):t===Wi?(t=Zi(),al=4):al=t===Cs?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,sl=t,null===il&&(hl=1,xs(e,_r(t,e.current)))}function ql(){var e=R.H;return R.H=qa,null===e?qa:e}function Wl(){var e=R.A;return R.A=el,e}function Gl(){hl=4,ul||(4194048&ol)!==ol&&null!==is.current||(ll=!0),!(134217727&dl)&&!(134217727&pl)||null===rl||Vl(rl,ol,vl,!1)}function Yl(e,t,n){var r=nl;nl|=2;var i=ql(),o=Wl();rl===e&&ol===t||(Sl=null,Ul(e,t)),t=!1;var a=hl;e:for(;;)try{if(0!==al&&null!==il){var s=il,u=sl;switch(al){case 8:$l(),a=6;break e;case 3:case 2:case 9:case 6:null===is.current&&(t=!0);var l=al;if(al=0,sl=null,Zl(e,s,u,l),n&&ll){a=0;break e}break;default:l=al,al=0,sl=null,Zl(e,s,u,l)}}Xl(),a=hl;break}catch(t){Hl(e,t)}return t&&e.shellSuspendCounter++,yi=mi=null,nl=r,R.H=i,R.A=o,null===il&&(rl=null,ol=0,Pr()),a}function Xl(){for(;null!==il;)Jl(il)}function Kl(){for(;null!==il&&!Z();)Jl(il)}function Jl(e){var t=Js(e.alternate,e,fl);e.memoizedProps=e.pendingProps,null===t?ec(e):il=t}function Ql(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=js(n,t,t.pendingProps,t.type,void 0,ol);break;case 11:t=js(n,t,t.pendingProps,t.type.render,t.ref,ol);break;case 5:Fo(t);default:ou(n,t),t=Js(n,t=il=zr(t,fl),fl)}e.memoizedProps=e.pendingProps,null===t?ec(e):il=t}function Zl(e,t,n,r){yi=mi=null,Fo(t),Xa=null,Ka=0;var i=t.return;try{if(function(e,t,n,r,i){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&Si(t,n,i,!0),null!==(n=is.current)){switch(n.tag){case 13:return null===os?Gl():null===n.alternate&&0===hl&&(hl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Yi?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),fc(e,r,i)),!1;case 22:return n.flags|=65536,r===Yi?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),fc(e,r,i)),!1}throw Error(a(435,n.tag))}return fc(e,r,i),Gl(),!1}if(oi)return null!==(t=is.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==ui&&gi(_r(e=Error(a(422),{cause:r}),n))):(r!==ui&&gi(_r(t=Error(a(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,r=_r(r,n),so(e,i=Ss(e.stateNode,r,i)),4!==hl&&(hl=2)),!1;var o=Error(a(520),{cause:r});if(o=_r(o,n),null===yl?yl=[o]:yl.push(o),4!==hl&&(hl=2),null===t)return!0;r=_r(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,so(n,e=Ss(n.stateNode,r,e)),!1;case 1:if(t=n.type,o=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===o||"function"!=typeof o.componentDidCatch||null!==_l&&_l.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,Es(i=_s(i),e,n,r),so(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,ol))return hl=1,xs(e,_r(n,e.current)),void(il=null)}catch(t){if(null!==i)throw il=i,t;return hl=1,xs(e,_r(n,e.current)),void(il=null)}32768&t.flags?(oi||1===r?e=!0:ll||536870912&ol?e=!1:(ul=e=!0,(2===r||9===r||3===r||6===r)&&null!==(r=is.current)&&13===r.tag&&(r.flags|=16384)),tc(t,e)):ec(t)}function ec(e){var t=e;do{if(32768&t.flags)return void tc(t,ul);e=t.return;var n=ru(t.alternate,t,fl);if(null!==n)return void(il=n);if(null!==(t=t.sibling))return void(il=t);il=t=e}while(null!==t);0===hl&&(hl=5)}function tc(e,t){do{var n=iu(e.alternate,e);if(null!==n)return n.flags&=32767,void(il=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(il=e);il=e=n}while(null!==e);hl=6,il=null}function nc(e,t,n,r,i,o,s,u,l){e.cancelPendingCommit=null;do{sc()}while(0!==El);if(6&nl)throw Error(a(327));if(null!==t){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,function(e,t,n,r,i,o){var a=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,u=e.expirationTimes,l=e.hiddenUpdates;for(n=a&~n;0<n;){var c=31-de(n),f=1<<c;s[c]=0,u[c]=-1;var h=l[c];if(null!==h)for(l[c]=null,c=0;c<h.length;c++){var d=h[c];null!==d&&(d.lane&=-536870913)}n&=~f}0!==r&&Ce(e,r,0),0!==o&&0===i&&0!==e.tag&&(e.suspendedLanes|=o&~(a&~t))}(e,n,o|=Ar,s,u,l),e===rl&&(il=rl=null,ol=0),Al=t,Cl=e,Pl=n,Ll=o,Tl=i,Nl=r,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,J(oe,(function(){return uc(),null}))):(e.callbackNode=null,e.callbackPriority=0),r=!!(13878&t.flags),13878&t.subtreeFlags||r){r=R.T,R.T=null,i=D.p,D.p=2,s=nl,nl|=4;try{!function(e,t){if(e=e.containerInfo,tf=rh,tr(e=er(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var s=0,u=-1,l=-1,c=0,f=0,h=e,d=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(u=s+i),h!==o||0!==r&&3!==h.nodeType||(l=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===e)break t;if(d===n&&++c===i&&(u=s),d===o&&++f===r&&(l=s),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}n=-1===u||-1===l?null:{start:u,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(nf={focusedElem:e,selectionRange:n},rh=!1,Su=t;null!==Su;)if(e=(t=Su).child,1024&t.subtreeFlags&&null!==e)e.return=t,Su=e;else for(;null!==Su;){switch(o=(t=Su).alternate,e=t.flags,t.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==o){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var g=vs(n.type,i,(n.elementType,n.type));e=r.getSnapshotBeforeUpdate(g,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){cc(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))vf(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":vf(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(a(163))}if(null!==(e=t.sibling)){e.return=t.return,Su=e;break}Su=t.return}}(e,t)}finally{nl=s,D.p=i,R.T=r}}El=1,rc(),ic(),oc()}}function rc(){if(1===El){El=0;var e=Cl,t=Al,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=R.T,R.T=null;var r=D.p;D.p=2;var i=nl;nl|=4;try{Ru(t,e);var o=nf,a=er(e.containerInfo),s=o.focusedElem,u=o.selectionRange;if(a!==s&&s&&s.ownerDocument&&Zn(s.ownerDocument.documentElement,s)){if(null!==u&&tr(s)){var l=u.start,c=u.end;if(void 0===c&&(c=l),"selectionStart"in s)s.selectionStart=l,s.selectionEnd=Math.min(c,s.value.length);else{var f=s.ownerDocument||document,h=f&&f.defaultView||window;if(h.getSelection){var d=h.getSelection(),p=s.textContent.length,g=Math.min(u.start,p),v=void 0===u.end?g:Math.min(u.end,p);!d.extend&&g>v&&(a=v,v=g,g=a);var m=Qn(s,g),y=Qn(s,v);if(m&&y&&(1!==d.rangeCount||d.anchorNode!==m.node||d.anchorOffset!==m.offset||d.focusNode!==y.node||d.focusOffset!==y.offset)){var b=f.createRange();b.setStart(m.node,m.offset),d.removeAllRanges(),g>v?(d.addRange(b),d.extend(y.node,y.offset)):(b.setEnd(y.node,y.offset),d.addRange(b))}}}}for(f=[],d=s;d=d.parentNode;)1===d.nodeType&&f.push({element:d,left:d.scrollLeft,top:d.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<f.length;s++){var w=f[s];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}rh=!!tf,nf=tf=null}finally{nl=i,D.p=r,R.T=n}}e.current=t,El=2}}function ic(){if(2===El){El=0;var e=Cl,t=Al,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=R.T,R.T=null;var r=D.p;D.p=2;var i=nl;nl|=4;try{_u(e,t.alternate,t)}finally{nl=i,D.p=r,R.T=n}}El=3}}function oc(){if(4===El||3===El){El=0,ee();var e=Cl,t=Al,n=Pl,r=Nl;10256&t.subtreeFlags||10256&t.flags?El=5:(El=0,Al=Cl=null,ac(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(_l=null),Le(n),t=t.stateNode,fe&&"function"==typeof fe.onCommitFiberRoot)try{fe.onCommitFiberRoot(ce,t,void 0,!(128&~t.current.flags))}catch(e){}if(null!==r){t=R.T,i=D.p,D.p=2,R.T=null;try{for(var o=e.onRecoverableError,a=0;a<r.length;a++){var s=r[a];o(s.value,{componentStack:s.stack})}}finally{R.T=t,D.p=i}}3&Pl&&sc(),kc(e),i=e.pendingLanes,4194090&n&&42&i?e===Ml?Ol++:(Ol=0,Ml=e):Ol=0,Sc(0,!1)}}function ac(e,t){0===(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,Ri(t))}function sc(e){return rc(),ic(),oc(),uc()}function uc(){if(5!==El)return!1;var e=Cl,t=Ll;Ll=0;var n=Le(Pl),r=R.T,i=D.p;try{D.p=32>n?32:n,R.T=null,n=Tl,Tl=null;var o=Cl,s=Pl;if(El=0,Al=Cl=null,Pl=0,6&nl)throw Error(a(331));var u=nl;if(nl|=4,Ju(o.current),Uu(o,o.current,s,n),nl=u,Sc(0,!1),fe&&"function"==typeof fe.onPostCommitFiberRoot)try{fe.onPostCommitFiberRoot(ce,o)}catch(e){}return!0}finally{D.p=i,R.T=r,ac(e,t)}}function lc(e,t,n){t=_r(n,t),null!==(e=oo(e,t=Ss(e.stateNode,t,2),2))&&(Ee(e,2),kc(e))}function cc(e,t,n){if(3===e.tag)lc(e,e,n);else for(;null!==t;){if(3===t.tag){lc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===_l||!_l.has(r))){e=_r(n,e),null!==(r=oo(t,n=_s(2),2))&&(Es(n,r,t,e),Ee(r,2),kc(r));break}}t=t.return}}function fc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new tl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(cl=!0,i.add(n),e=hc.bind(null,e,t,n),t.then(e,e))}function hc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,rl===e&&(ol&n)===n&&(4===hl||3===hl&&(62914560&ol)===ol&&300>te()-xl?!(2&nl)&&Ul(e,0):gl|=n,ml===ol&&(ml=0)),kc(e)}function dc(e,t){0===t&&(t=Se()),null!==(e=Nr(e,t))&&(Ee(e,t),kc(e))}function pc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),dc(e,n)}function gc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}null!==r&&r.delete(t),dc(e,n)}var vc=null,mc=null,yc=!1,bc=!1,wc=!1,xc=0;function kc(e){e!==mc&&null===e.next&&(null===mc?vc=mc=e:mc=mc.next=e),bc=!0,yc||(yc=!0,hf((function(){6&nl?J(re,_c):Ec()})))}function Sc(e,t){if(!wc&&bc){wc=!0;do{for(var n=!1,r=vc;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var o=0;else{var a=r.suspendedLanes,s=r.pingedLanes;o=(1<<31-de(42|e)+1)-1,o=201326741&(o&=i&~(a&~s))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,Pc(r,o))}else o=ol,!(3&(o=be(r,r===rl?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||we(r,o)||(n=!0,Pc(r,o));r=r.next}}while(n);wc=!1}}function _c(){Ec()}function Ec(){bc=yc=!1;var e,t=0;0!==xc&&(((e=window.event)&&"popstate"===e.type?e!==uf&&(uf=e,!0):(uf=null,!1))&&(t=xc),xc=0);for(var n=te(),r=null,i=vc;null!==i;){var o=i.next,a=Cc(i,n);0===a?(i.next=null,null===r?vc=o:r.next=o,null===o&&(mc=r)):(r=i,(0!==t||3&a)&&(bc=!0)),i=o}Sc(t,!1)}function Cc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=-62914561&e.pendingLanes;0<o;){var a=31-de(o),s=1<<a,u=i[a];-1===u?0!==(s&n)&&0===(s&r)||(i[a]=xe(s,t)):u<=t&&(e.expiredLanes|=s),o&=~s}if(n=ol,n=be(e,e===(t=rl)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===al||9===al)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&Q(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||we(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&Q(r),Le(n)){case 2:case 8:n=ie;break;case 32:default:n=oe;break;case 268435456:n=se}return r=Ac.bind(null,e),n=J(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&Q(r),e.callbackPriority=2,e.callbackNode=null,2}function Ac(e,t){if(0!==El&&5!==El)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(sc()&&e.callbackNode!==n)return null;var r=ol;return 0===(r=be(e,e===rl?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Il(e,r,t),Cc(e,te()),null!=e.callbackNode&&e.callbackNode===n?Ac.bind(null,e):null)}function Pc(e,t){if(sc())return null;Il(e,t,!0)}function Lc(){return 0===xc&&(xc=ke()),xc}function Tc(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Lt(""+e)}function Nc(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Oc=0;Oc<xr.length;Oc++){var Mc=xr[Oc];kr(Mc.toLowerCase(),"on"+(Mc[0].toUpperCase()+Mc.slice(1)))}kr(dr,"onAnimationEnd"),kr(pr,"onAnimationIteration"),kr(gr,"onAnimationStart"),kr("dblclick","onDoubleClick"),kr("focusin","onFocus"),kr("focusout","onBlur"),kr(vr,"onTransitionRun"),kr(mr,"onTransitionStart"),kr(yr,"onTransitionCancel"),kr(br,"onTransitionEnd"),Xe("onMouseEnter",["mouseout","mouseover"]),Xe("onMouseLeave",["mouseout","mouseover"]),Xe("onPointerEnter",["pointerout","pointerover"]),Xe("onPointerLeave",["pointerout","pointerover"]),Ye("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ye("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ye("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ye("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ye("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ye("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dc=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rc));function jc(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break e;o=s,i.currentTarget=l;try{o(i)}catch(e){ms(e)}i.currentTarget=null,o=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,l=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break e;o=s,i.currentTarget=l;try{o(i)}catch(e){ms(e)}i.currentTarget=null,o=u}}}}function Ic(e,t){var n=t[De];void 0===n&&(n=t[De]=new Set);var r=e+"__bubble";n.has(r)||(Bc(t,e,2,!1),n.add(r))}function Fc(e,t,n){var r=0;t&&(r|=4),Bc(n,e,r,t)}var zc="_reactListening"+Math.random().toString(36).slice(2);function Vc(e){if(!e[zc]){e[zc]=!0,We.forEach((function(t){"selectionchange"!==t&&(Dc.has(t)||Fc(t,!1,e),Fc(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zc]||(t[zc]=!0,Fc("selectionchange",!1,t))}}function Bc(e,t,n,r){switch(ch(t)){case 2:var i=ih;break;case 8:i=oh;break;default:i=ah}n=i.bind(null,t,n,e),i=void 0,!zt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function $c(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&a.stateNode.containerInfo===i)return;a=a.return}for(;null!==s;){if(null===(a=Be(s)))return;if(5===(l=a.tag)||6===l||26===l||27===l){r=o=a;continue e}s=s.parentNode}}r=r.return}jt((function(){var r=o,i=Nt(n),a=[];e:{var s=wr.get(e);if(void 0!==s){var l=Zt,c=e;switch(e){case"keypress":if(0===qt(n))break e;case"keydown":case"keyup":l=gn;break;case"focusin":c="focus",l=an;break;case"focusout":c="blur",l=an;break;case"beforeblur":case"afterblur":l=an;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=rn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=on;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=mn;break;case dr:case pr:case gr:l=sn;break;case br:l=yn;break;case"scroll":case"scrollend":l=tn;break;case"wheel":l=bn;break;case"copy":case"cut":case"paste":l=un;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=vn;break;case"toggle":case"beforetoggle":l=wn}var f=!!(4&t),h=!f&&("scroll"===e||"scrollend"===e),d=f?null!==s?s+"Capture":null:s;f=[];for(var p,g=r;null!==g;){var v=g;if(p=v.stateNode,5!==(v=v.tag)&&26!==v&&27!==v||null===p||null===d||null!=(v=It(g,d))&&f.push(Uc(g,v,p)),h)break;g=g.return}0<f.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:f}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Tt||!(c=n.relatedTarget||n.fromElement)||!Be(c)&&!c[Re])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Be(c):null)&&(h=u(c),f=c.tag,c!==h||5!==f&&27!==f&&6!==f)&&(c=null)):(l=null,c=r),l!==c)){if(f=rn,v="onMouseLeave",d="onMouseEnter",g="mouse","pointerout"!==e&&"pointerover"!==e||(f=vn,v="onPointerLeave",d="onPointerEnter",g="pointer"),h=null==l?s:Ue(l),p=null==c?s:Ue(c),(s=new f(v,g+"leave",l,n,i)).target=h,s.relatedTarget=p,v=null,Be(i)===r&&((f=new f(d,g+"enter",c,n,i)).target=p,f.relatedTarget=h,v=f),h=v,l&&c)e:{for(d=c,g=0,p=f=l;p;p=qc(p))g++;for(p=0,v=d;v;v=qc(v))p++;for(;0<g-p;)f=qc(f),g--;for(;0<p-g;)d=qc(d),p--;for(;g--;){if(f===d||null!==d&&f===d.alternate)break e;f=qc(f),d=qc(d)}f=null}else f=null;null!==l&&Wc(a,s,l,f,!1),null!==c&&null!==h&&Wc(a,h,c,f,!0)}if("select"===(l=(s=r?Ue(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=Fn;else if(On(s))if(zn)m=Yn;else{m=Wn;var y=qn}else!(l=s.nodeName)||"input"!==l.toLowerCase()||"checkbox"!==s.type&&"radio"!==s.type?r&&Ct(r.elementType)&&(m=Fn):m=Gn;switch(m&&(m=m(e,r))?Mn(a,m,n,i):(y&&y(e,s,r),"focusout"===e&&r&&"number"===s.type&&null!=r.memoizedProps.value&&yt(s,"number",s.value)),y=r?Ue(r):window,e){case"focusin":(On(y)||"true"===y.contentEditable)&&(rr=y,ir=r,or=null);break;case"focusout":or=ir=rr=null;break;case"mousedown":ar=!0;break;case"contextmenu":case"mouseup":case"dragend":ar=!1,sr(a,n,i);break;case"selectionchange":if(nr)break;case"keydown":case"keyup":sr(a,n,i)}var b;if(kn)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Tn?Pn(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(En&&"ko"!==n.locale&&(Tn||"onCompositionStart"!==w?"onCompositionEnd"===w&&Tn&&(b=Ht()):($t="value"in(Bt=i)?Bt.value:Bt.textContent,Tn=!0)),0<(y=Hc(r,w)).length&&(w=new ln(w,e,null,n,i),a.push({event:w,listeners:y}),(b||null!==(b=Ln(n)))&&(w.data=b))),(b=_n?function(e,t){switch(e){case"compositionend":return Ln(t);case"keypress":return 32!==t.which?null:(An=!0,Cn);case"textInput":return(e=t.data)===Cn&&An?null:e;default:return null}}(e,n):function(e,t){if(Tn)return"compositionend"===e||!kn&&Pn(e,t)?(e=Ht(),Ut=$t=Bt=null,Tn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return En&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(w=Hc(r,"onBeforeInput")).length&&(y=new ln("onBeforeInput","beforeinput",null,n,i),a.push({event:y,listeners:w}),y.data=b),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var o=Tc((i[Me]||null).action),a=r.submitter;a&&null!==(t=(t=a[Me]||null)?Tc(t.formAction):a.getAttribute("formAction"))&&(o=t,a=null);var s=new Zt("action","action",null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==xc){var e=a?Nc(i,a):new FormData(i);Na(n,{pending:!0,data:e,method:i.method,action:o},null,e)}}else"function"==typeof o&&(s.preventDefault(),e=a?Nc(i,a):new FormData(i),Na(n,{pending:!0,data:e,method:i.method,action:o},o,e))},currentTarget:i}]})}}(a,e,r,n,i)}jc(a,t)}))}function Uc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hc(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;if(5!==(i=i.tag)&&26!==i&&27!==i||null===o||(null!=(i=It(e,n))&&r.unshift(Uc(e,i,o)),null!=(i=It(e,t))&&r.push(Uc(e,i,o))),3===e.tag)return r;e=e.return}return[]}function qc(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function Wc(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(s=s.tag,null!==u&&u===r)break;5!==s&&26!==s&&27!==s||null===l||(u=l,i?null!=(l=It(n,o))&&a.unshift(Uc(n,l,u)):i||null!=(l=It(n,o))&&a.push(Uc(n,l,u))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Gc=/\r\n?/g,Yc=/\u0000|\uFFFD/g;function Xc(e){return("string"==typeof e?e:""+e).replace(Gc,"\n").replace(Yc,"")}function Kc(e,t){return t=Xc(t),Xc(e)===t}function Jc(){}function Qc(e,t,n,r,i,o){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||kt(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&kt(e,""+r);break;case"className":nt(e,"class",r);break;case"tabIndex":nt(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":nt(e,n,r);break;case"style":Et(e,r,o);break;case"data":if("object"!==t){nt(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Lt(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof o&&("formAction"===n?("input"!==t&&Qc(e,t,"name",i.name,i,null),Qc(e,t,"formEncType",i.formEncType,i,null),Qc(e,t,"formMethod",i.formMethod,i,null),Qc(e,t,"formTarget",i.formTarget,i,null)):(Qc(e,t,"encType",i.encType,i,null),Qc(e,t,"method",i.method,i,null),Qc(e,t,"target",i.target,i,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Lt(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Jc);break;case"onScroll":null!=r&&Ic("scroll",e);break;case"onScrollEnd":null!=r&&Ic("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(a(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(a(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=Lt(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Ic("beforetoggle",e),Ic("toggle",e),tt(e,"popover",r);break;case"xlinkActuate":rt(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":rt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":rt(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":rt(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":rt(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":rt(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":rt(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":rt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":rt(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":tt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&tt(e,n=At.get(n)||n,r)}}function Zc(e,t,n,r,i,o){switch(n){case"style":Et(e,r,o);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(a(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(a(60));e.innerHTML=n}}break;case"children":"string"==typeof r?kt(e,r):("number"==typeof r||"bigint"==typeof r)&&kt(e,""+r);break;case"onScroll":null!=r&&Ic("scroll",e);break;case"onScrollEnd":null!=r&&Ic("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Jc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:Ge.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"==typeof(o=null!=(o=e[Me]||null)?o[n]:null)&&e.removeEventListener(t,o,i),"function"!=typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):tt(e,n,r):("function"!=typeof o&&null!==o&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i)))}}function ef(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ic("error",e),Ic("load",e);var r,i=!1,o=!1;for(r in n)if(n.hasOwnProperty(r)){var s=n[r];if(null!=s)switch(r){case"src":i=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:Qc(e,t,r,s,n,null)}}return o&&Qc(e,t,"srcSet",n.srcSet,n,null),void(i&&Qc(e,t,"src",n.src,n,null));case"input":Ic("invalid",e);var u=r=s=o=null,l=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var f=n[i];if(null!=f)switch(i){case"name":o=f;break;case"type":s=f;break;case"checked":l=f;break;case"defaultChecked":c=f;break;case"value":r=f;break;case"defaultValue":u=f;break;case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(a(137,t));break;default:Qc(e,t,i,f,n,null)}}return mt(e,r,u,l,c,s,o,!1),void ft(e);case"select":for(o in Ic("invalid",e),i=s=r=null,n)if(n.hasOwnProperty(o)&&null!=(u=n[o]))switch(o){case"value":r=u;break;case"defaultValue":s=u;break;case"multiple":i=u;default:Qc(e,t,o,u,n,null)}return t=r,n=s,e.multiple=!!i,void(null!=t?bt(e,!!i,t,!1):null!=n&&bt(e,!!i,n,!0));case"textarea":for(s in Ic("invalid",e),r=o=i=null,n)if(n.hasOwnProperty(s)&&null!=(u=n[s]))switch(s){case"value":i=u;break;case"defaultValue":o=u;break;case"children":r=u;break;case"dangerouslySetInnerHTML":if(null!=u)throw Error(a(91));break;default:Qc(e,t,s,u,n,null)}return xt(e,i,o,r),void ft(e);case"option":for(l in n)n.hasOwnProperty(l)&&null!=(i=n[l])&&("selected"===l?e.selected=i&&"function"!=typeof i&&"symbol"!=typeof i:Qc(e,t,l,i,n,null));return;case"dialog":Ic("beforetoggle",e),Ic("toggle",e),Ic("cancel",e),Ic("close",e);break;case"iframe":case"object":Ic("load",e);break;case"video":case"audio":for(i=0;i<Rc.length;i++)Ic(Rc[i],e);break;case"image":Ic("error",e),Ic("load",e);break;case"details":Ic("toggle",e);break;case"embed":case"source":case"link":Ic("error",e),Ic("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:Qc(e,t,c,i,n,null)}return;default:if(Ct(t)){for(f in n)n.hasOwnProperty(f)&&void 0!==(i=n[f])&&Zc(e,t,f,i,n,void 0);return}}for(u in n)n.hasOwnProperty(u)&&null!=(i=n[u])&&Qc(e,t,u,i,n,null)}var tf=null,nf=null;function rf(e){return 9===e.nodeType?e:e.ownerDocument}function of(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function af(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function sf(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var uf=null,lf="function"==typeof setTimeout?setTimeout:void 0,cf="function"==typeof clearTimeout?clearTimeout:void 0,ff="function"==typeof Promise?Promise:void 0,hf="function"==typeof queueMicrotask?queueMicrotask:void 0!==ff?function(e){return ff.resolve(null).then(e).catch(df)}:lf;function df(e){setTimeout((function(){throw e}))}function pf(e){return"head"===e}function gf(e,t){var n=t,r=0,i=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0<r&&8>r){n=r;var a=e.ownerDocument;if(1&n&&kf(a.documentElement),2&n&&kf(a.body),4&n)for(kf(n=a.head),a=n.firstChild;a;){var s=a.nextSibling,u=a.nodeName;a[ze]||"SCRIPT"===u||"STYLE"===u||"LINK"===u&&"stylesheet"===a.rel.toLowerCase()||n.removeChild(a),a=s}}if(0===i)return e.removeChild(o),void Ph(t);i--}else"$"===n||"$?"===n||"$!"===n?i++:r=n.charCodeAt(0)-48;else r=0;n=o}while(n);Ph(t)}function vf(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":vf(n),Ve(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function mf(e){return"$!"===e.data||"$?"===e.data&&"complete"===e.ownerDocument.readyState}function yf(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}var bf=null;function wf(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}function xf(e,t,n){switch(t=rf(n),e){case"html":if(!(e=t.documentElement))throw Error(a(452));return e;case"head":if(!(e=t.head))throw Error(a(453));return e;case"body":if(!(e=t.body))throw Error(a(454));return e;default:throw Error(a(451))}}function kf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ve(e)}var Sf=new Map,_f=new Set;function Ef(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Cf=D.d;D.d={f:function(){var e=Cf.f(),t=Bl();return e||t},r:function(e){var t=$e(e);null!==t&&5===t.tag&&"form"===t.type?Ma(t):Cf.r(e)},D:function(e){Cf.D(e),Pf("dns-prefetch",e,null)},C:function(e,t){Cf.C(e,t),Pf("preconnect",e,t)},L:function(e,t,n){Cf.L(e,t,n);var r=Af;if(r&&e&&t){var i='link[rel="preload"][as="'+gt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+gt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(i+='[imagesizes="'+gt(n.imageSizes)+'"]')):i+='[href="'+gt(e)+'"]';var o=i;switch(t){case"style":o=Tf(e);break;case"script":o=Mf(e)}Sf.has(o)||(e=h({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Sf.set(o,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(Nf(o))||"script"===t&&r.querySelector(Rf(o))||(ef(t=r.createElement("link"),"link",e),qe(t),r.head.appendChild(t)))}},m:function(e,t){Cf.m(e,t);var n=Af;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+gt(r)+'"][href="'+gt(e)+'"]',o=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Mf(e)}if(!Sf.has(o)&&(e=h({rel:"modulepreload",href:e},t),Sf.set(o,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Rf(o)))return}ef(r=n.createElement("link"),"link",e),qe(r),n.head.appendChild(r)}}},X:function(e,t){Cf.X(e,t);var n=Af;if(n&&e){var r=He(n).hoistableScripts,i=Mf(e),o=r.get(i);o||((o=n.querySelector(Rf(i)))||(e=h({src:e,async:!0},t),(t=Sf.get(i))&&Ff(e,t),qe(o=n.createElement("script")),ef(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}},S:function(e,t,n){Cf.S(e,t,n);var r=Af;if(r&&e){var i=He(r).hoistableStyles,o=Tf(e);t=t||"default";var a=i.get(o);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(Nf(o)))s.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Sf.get(o))&&If(e,n);var u=a=r.createElement("link");qe(u),ef(u,"link",e),u._p=new Promise((function(e,t){u.onload=e,u.onerror=t})),u.addEventListener("load",(function(){s.loading|=1})),u.addEventListener("error",(function(){s.loading|=2})),s.loading|=4,jf(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:s},i.set(o,a)}}},M:function(e,t){Cf.M(e,t);var n=Af;if(n&&e){var r=He(n).hoistableScripts,i=Mf(e),o=r.get(i);o||((o=n.querySelector(Rf(i)))||(e=h({src:e,async:!0,type:"module"},t),(t=Sf.get(i))&&Ff(e,t),qe(o=n.createElement("script")),ef(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}};var Af="undefined"==typeof document?null:document;function Pf(e,t,n){var r=Af;if(r&&"string"==typeof t&&t){var i=gt(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"==typeof n&&(i+='[crossorigin="'+n+'"]'),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(ef(t=r.createElement("link"),"link",e),qe(t),r.head.appendChild(t)))}}function Lf(e,t,n,r){var i,o,s,u,l=(l=H.current)?Ef(l):null;if(!l)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Tf(n.href),(r=(n=He(l).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Tf(n.href);var c=He(l).hoistableStyles,f=c.get(e);if(f||(l=l.ownerDocument||l,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,f),(c=l.querySelector(Nf(e)))&&!c._p&&(f.instance=c,f.state.loading=5),Sf.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Sf.set(e,n),c||(i=l,o=e,s=n,u=f.state,i.querySelector('link[rel="preload"][as="style"]['+o+"]")?u.loading=1:(o=i.createElement("link"),u.preload=o,o.addEventListener("load",(function(){return u.loading|=1})),o.addEventListener("error",(function(){return u.loading|=2})),ef(o,"link",s),qe(o),i.head.appendChild(o))))),t&&null===r)throw Error(a(528,""));return f}if(t&&null!==r)throw Error(a(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Mf(n),(r=(n=He(l).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Tf(e){return'href="'+gt(e)+'"'}function Nf(e){return'link[rel="stylesheet"]['+e+"]"}function Of(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Mf(e){return'[src="'+gt(e)+'"]'}function Rf(e){return"script[async]"+e}function Df(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+gt(n.href)+'"]');if(r)return t.instance=r,qe(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return qe(r=(e.ownerDocument||e).createElement("style")),ef(r,"style",i),jf(r,n.precedence,e),t.instance=r;case"stylesheet":i=Tf(n.href);var o=e.querySelector(Nf(i));if(o)return t.state.loading|=4,t.instance=o,qe(o),o;r=Of(n),(i=Sf.get(i))&&If(r,i),qe(o=(e.ownerDocument||e).createElement("link"));var s=o;return s._p=new Promise((function(e,t){s.onload=e,s.onerror=t})),ef(o,"link",r),t.state.loading|=4,jf(o,n.precedence,e),t.instance=o;case"script":return o=Mf(n.src),(i=e.querySelector(Rf(o)))?(t.instance=i,qe(i),i):(r=n,(i=Sf.get(o))&&Ff(r=h({},n),i),qe(i=(e=e.ownerDocument||e).createElement("script")),ef(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(a(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,jf(r,n.precedence,e));return t.instance}function jf(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,o=i,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===t)o=s;else if(o!==i)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function If(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function Ff(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var zf=null;function Vf(e,t,n){if(null===zf){var r=new Map,i=zf=new Map;i.set(n,r)}else(r=(i=zf).get(n))||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var o=n[i];if(!(o[ze]||o[Oe]||"link"===e&&"stylesheet"===o.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==o.namespaceURI){var a=o.getAttribute(t)||"";a=e+a;var s=r.get(a);s?s.push(o):r.set(a,[o])}}return r}function Bf(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function $f(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var Uf=null;function Hf(){}function qf(){if(this.count--,0===this.count)if(this.stylesheets)Gf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Wf=null;function Gf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Wf=new Map,t.forEach(Yf,e),Wf=null,qf.call(e))}function Yf(e,t){if(!(4&t.state.loading)){var n=Wf.get(e);if(n)var r=n.get(null);else{n=new Map,Wf.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<i.length;o++){var a=i[o];"LINK"!==a.nodeName&&"not all"===a.getAttribute("media")||(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}a=(i=t.instance).getAttribute("data-precedence"),(o=n.get(a)||r)===r&&n.set(null,i),n.set(a,i),this.count++,r=qf.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),o?o.parentNode.insertBefore(i,o.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var Xf={$$typeof:x,Provider:null,Consumer:null,_currentValue:j,_currentValue2:j,_threadCount:0};function Kf(e,t,n,r,i,o,a,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=_e(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_e(0),this.hiddenUpdates=_e(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=o,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function Jf(e,t,n,r,i,o,a,s,u,l,c,f){return e=new Kf(e,t,n,a,s,u,l,f),t=1,!0===o&&(t|=24),o=jr(3,null,null,t),e.current=o,o.stateNode=e,(t=Mi()).refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:r,isDehydrated:n,cache:t},no(o),e}function Qf(e){return e?e=Rr:Rr}function Zf(e,t,n,r,i,o){i=Qf(i),null===r.context?r.context=i:r.pendingContext=i,(r=io(t)).payload={element:n},null!==(o=void 0===o?null:o)&&(r.callback=o),null!==(n=oo(e,r,t))&&(jl(n,0,t),ao(n,e,t))}function eh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function th(e,t){eh(e,t),(e=e.alternate)&&eh(e,t)}function nh(e){if(13===e.tag){var t=Nr(e,67108864);null!==t&&jl(t,0,67108864),th(e,67108864)}}var rh=!0;function ih(e,t,n,r){var i=R.T;R.T=null;var o=D.p;try{D.p=2,ah(e,t,n,r)}finally{D.p=o,R.T=i}}function oh(e,t,n,r){var i=R.T;R.T=null;var o=D.p;try{D.p=8,ah(e,t,n,r)}finally{D.p=o,R.T=i}}function ah(e,t,n,r){if(rh){var i=sh(r);if(null===i)$c(e,t,r,uh,n),bh(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return hh=wh(hh,e,t,n,r,i),!0;case"dragenter":return dh=wh(dh,e,t,n,r,i),!0;case"mouseover":return ph=wh(ph,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return gh.set(o,wh(gh.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,vh.set(o,wh(vh.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(bh(e,r),4&t&&-1<yh.indexOf(e)){for(;null!==i;){var o=$e(i);if(null!==o)switch(o.tag){case 3:if((o=o.stateNode).current.memoizedState.isDehydrated){var a=ye(o.pendingLanes);if(0!==a){var s=o;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var u=1<<31-de(a);s.entanglements[1]|=u,a&=~u}kc(o),!(6&nl)&&(kl=te()+500,Sc(0,!1))}}break;case 13:null!==(s=Nr(o,2))&&jl(s,0,2),Bl(),th(o,2)}if(null===(o=sh(r))&&$c(e,t,r,uh,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else $c(e,t,r,null,n)}}function sh(e){return lh(e=Nt(e))}var uh=null;function lh(e){if(uh=null,null!==(e=Be(e))){var t=u(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=l(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return uh=e,null}function ch(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ne()){case re:return 2;case ie:return 8;case oe:case ae:return 32;case se:return 268435456;default:return 32}default:return 32}}var fh=!1,hh=null,dh=null,ph=null,gh=new Map,vh=new Map,mh=[],yh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function bh(e,t){switch(e){case"focusin":case"focusout":hh=null;break;case"dragenter":case"dragleave":dh=null;break;case"mouseover":case"mouseout":ph=null;break;case"pointerover":case"pointerout":gh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vh.delete(t.pointerId)}}function wh(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=$e(t))&&nh(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function xh(e){var t=Be(e.target);if(null!==t){var n=u(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=l(n)))return e.blockedOn=t,void function(e){var t=D.p;try{return D.p=e,function(){if(13===n.tag){var e=Rl();e=Pe(e);var t=Nr(n,e);null!==t&&jl(t,0,e),th(n,e)}}()}finally{D.p=t}}(e.priority)}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function kh(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=sh(e.nativeEvent);if(null!==n)return null!==(t=$e(n))&&nh(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Tt=r,n.target.dispatchEvent(r),Tt=null,t.shift()}return!0}function Sh(e,t,n){kh(e)&&n.delete(t)}function _h(){fh=!1,null!==hh&&kh(hh)&&(hh=null),null!==dh&&kh(dh)&&(dh=null),null!==ph&&kh(ph)&&(ph=null),gh.forEach(Sh),vh.forEach(Sh)}function Eh(e,t){e.blockedOn===t&&(e.blockedOn=null,fh||(fh=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,_h)))}var Ch=null;function Ah(e){Ch!==e&&(Ch=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,(function(){Ch===e&&(Ch=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if("function"!=typeof r){if(null===lh(r||n))continue;break}var o=$e(n);null!==o&&(e.splice(t,3),t-=3,Na(o,{pending:!0,data:i,method:n.method,action:r},r,i))}})))}function Ph(e){function t(t){return Eh(t,e)}null!==hh&&Eh(hh,e),null!==dh&&Eh(dh,e),null!==ph&&Eh(ph,e),gh.forEach(t),vh.forEach(t);for(var n=0;n<mh.length;n++){var r=mh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<mh.length&&null===(n=mh[0]).blockedOn;)xh(n),null===n.blockedOn&&mh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],a=i[Me]||null;if("function"==typeof o)a||Ah(n);else if(a){var s=null;if(o&&o.hasAttribute("formAction")){if(i=o,a=o[Me]||null)s=a.formAction;else if(null!==lh(i))continue}else s=a.action;"function"==typeof s?n[r+1]=s:(n.splice(r,3),r-=3),Ah(n)}}}function Lh(e){this._internalRoot=e}function Th(e){this._internalRoot=e}Th.prototype.render=Lh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Zf(t.current,Rl(),e,t,null,null)},Th.prototype.unmount=Lh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Zf(e.current,2,null,e,null,null),Bl(),t[Re]=null}},Th.prototype.unstable_scheduleHydration=function(e){if(e){var t=Te();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mh.length&&0!==t&&t<mh[n].priority;n++);mh.splice(n,0,e),0===n&&xh(e)}};var Nh=i.version;if("19.1.0"!==Nh)throw Error(a(527,Nh,"19.1.0"));D.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=u(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return c(i),e;if(o===r)return c(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(t),null===(e=null!==e?f(e):null)?null:e.stateNode};var Oh={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.1.0"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Mh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mh.isDisabled&&Mh.supportsFiber)try{ce=Mh.inject(Oh),fe=Mh}catch(e){}}t.createRoot=function(e,t){if(!s(e))throw Error(a(299));var n=!1,r="",i=ys,o=bs,u=ws;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(o=t.onCaughtError),void 0!==t.onRecoverableError&&(u=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&t.unstable_transitionCallbacks),t=Jf(e,1,!1,null,0,n,r,i,o,u,0,null),e[Re]=t.current,Vc(e),new Lh(t)},t.hydrateRoot=function(e,t,n){if(!s(e))throw Error(a(299));var r=!1,i="",o=ys,u=bs,l=ws,c=null;return null!=n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onUncaughtError&&(o=n.onUncaughtError),void 0!==n.onCaughtError&&(u=n.onCaughtError),void 0!==n.onRecoverableError&&(l=n.onRecoverableError),void 0!==n.unstable_transitionCallbacks&&n.unstable_transitionCallbacks,void 0!==n.formState&&(c=n.formState)),(t=Jf(e,1,!0,t,0,r,i,o,u,l,0,c)).context=Qf(null),n=t.current,(i=io(r=Pe(r=Rl()))).callback=null,oo(n,i,r),n=r,t.current.lanes=n,Ee(t,n),kc(t),e[Re]=t.current,Vc(e),new Th(t)},t.version="19.1.0"},1331:(e,t,n)=>{var r=n(2552),i=n(8879),o=n(346),a=Function.prototype,s=Object.prototype,u=a.toString,l=s.hasOwnProperty,c=u.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1391:(e,t,n)=>{var r,i,o;o="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g,r=[n(4523),n(4692),t],i=function(e,t,n){o.Backbone=function(e,t,n,r){var i=e.Backbone,o=Array.prototype.slice;t.VERSION="1.4.1",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var a,s=t.Events={},u=/\s+/,l=function(e,t,r,i,o){var a,s=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);s<a.length;s++)t=l(e,t,a[s],r[a[s]],o)}else if(r&&u.test(r))for(a=r.split(u);s<a.length;s++)t=e(t,a[s],i,o);else t=e(t,r,i,o);return t};s.on=function(e,t,n){return this._events=l(c,this._events||{},e,t,{context:n,ctx:this,listening:a}),a&&((this._listeners||(this._listeners={}))[a.id]=a,a.interop=!1),this},s.listenTo=function(e,t,r){if(!e)return this;var i=e._listenId||(e._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),s=a=o[i];s||(this._listenId||(this._listenId=n.uniqueId("l")),s=a=o[i]=new v(this,e));var u=f(e,t,r,this);if(a=void 0,u)throw u;return s.interop&&s.on(t,r),this};var c=function(e,t,n,r){if(n){var i=e[t]||(e[t]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return e},f=function(e,t,n,r){try{e.on(t,n,r)}catch(e){return e}};s.off=function(e,t,n){return this._events?(this._events=l(h,this._events,e,t,{context:n,listeners:this._listeners}),this):this},s.stopListening=function(e,t,r){var i=this._listeningTo;if(!i)return this;for(var o=e?[e._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(t,r,this),s.interop&&s.off(t,r)}return n.isEmpty(i)&&(this._listeningTo=void 0),this};var h=function(e,t,r,i){if(e){var o,a=i.context,s=i.listeners,u=0;if(t||a||r){for(o=t?[t]:n.keys(e);u<o.length;u++){var l=e[t=o[u]];if(!l)break;for(var c=[],f=0;f<l.length;f++){var h=l[f];if(r&&r!==h.callback&&r!==h.callback._callback||a&&a!==h.context)c.push(h);else{var d=h.listening;d&&d.off(t,r)}}c.length?e[t]=c:delete e[t]}return e}for(o=n.keys(s);u<o.length;u++)s[o[u]].cleanup()}};s.once=function(e,t,n){var r=l(d,{},e,t,this.off.bind(this));return"string"==typeof e&&null==n&&(t=void 0),this.on(r,t,n)},s.listenToOnce=function(e,t,n){var r=l(d,{},t,n,this.stopListening.bind(this,e));return this.listenTo(e,r)};var d=function(e,t,r,i){if(r){var o=e[t]=n.once((function(){i(t,o),r.apply(this,arguments)}));o._callback=r}return e};s.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return l(p,this._events,e,void 0,n),this};var p=function(e,t,n,r){if(e){var i=e[t],o=e.all;i&&o&&(o=o.slice()),i&&g(i,r),o&&g(o,[t].concat(r))}return e},g=function(e,t){var n,r=-1,i=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}},v=function(e,t){this.id=e._listenId,this.listener=e,this.obj=t,this.interop=!0,this.count=0,this._events=void 0};v.prototype.on=s.on,v.prototype.off=function(e,t){var n;this.interop?(this._events=l(h,this._events,e,t,{context:void 0,listeners:void 0}),n=!this._events):(this.count--,n=0===this.count),n&&this.cleanup()},v.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},s.bind=s.on,s.unbind=s.off,n.extend(t,s);var m=t.Model=function(e,t){var r=e||{};t||(t={}),this.preinitialize.apply(this,arguments),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(m.prototype,s,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var i;if("object"==typeof e?(i=e,r=t):(i={})[e]=t,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,a=r.silent,s=[],u=this._changing;this._changing=!0,u||(this._previousAttributes=n.clone(this.attributes),this.changed={});var l=this.attributes,c=this.changed,f=this._previousAttributes;for(var h in i)t=i[h],n.isEqual(l[h],t)||s.push(h),n.isEqual(f[h],t)?delete c[h]:c[h]=t,o?delete l[h]:l[h]=t;if(this.idAttribute in i){var d=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,d,r)}if(!a){s.length&&(this._pending=r);for(var p=0;p<s.length;p++)this.trigger("change:"+s[p],this,l[s[p]],r)}if(u)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t,r=this._changing?this._previousAttributes:this.attributes,i={};for(var o in e){var a=e[o];n.isEqual(r[o],a)||(i[o]=a,t=!0)}return!!t&&i},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var i=e.parse?t.parse(n,e):n;if(!t.set(i,e))return!1;r&&r.call(e.context,t,n,e),t.trigger("sync",t,n,e)},H(this,e),this.sync("read",this,e)},save:function(e,t,r){var i;null==e||"object"==typeof e?(i=e,r=t):(i={})[e]=t;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var a=this,s=r.success,u=this.attributes;r.success=function(e){a.attributes=u;var t=r.parse?a.parse(e,r):e;if(o&&(t=n.extend({},i,t)),t&&!a.set(t,r))return!1;s&&s.call(r.context,a,e,r),a.trigger("sync",a,e,r)},H(this,r),i&&o&&(this.attributes=n.extend({},u,i));var l=this.isNew()?"create":r.patch?"patch":"update";"patch"!==l||r.attrs||(r.attrs=i);var c=this.sync(l,this,r);return this.attributes=u,c},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=e.wait,o=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(n){i&&o(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger("sync",t,n,e)};var a=!1;return this.isNew()?n.defer(e.success):(H(this,e),a=this.sync("delete",this,e)),i||o(),a},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||U();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1)}});var y=t.Collection=function(e,t){t||(t={}),this.preinitialize.apply(this,arguments),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},b={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},x=function(e,t,n){n=Math.min(Math.max(n,0),e.length);var r,i=Array(e.length-n),o=t.length;for(r=0;r<i.length;r++)i[r]=e[r+n];for(r=0;r<o;r++)e[r+n]=t[r];for(r=0;r<i.length;r++)e[r+o+n]=i[r]};n.extend(y.prototype,s,{model:m,preinitialize:function(){},initialize:function(){},toJSON:function(e){return this.map((function(t){return t.toJSON(e)}))},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,w))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:e.slice();var i=this._removeModels(e,t);return!t.silent&&i.length&&(t.changes={added:[],merged:[],removed:i},this.trigger("update",this,t)),r?i[0]:i},set:function(e,t){if(null!=e){(t=n.extend({},b,t)).parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var r=!n.isArray(e);e=r?[e]:e.slice();var i=t.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],u=[],l=[],c=[],f={},h=t.add,d=t.merge,p=t.remove,g=!1,v=this.comparator&&null==i&&!1!==t.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a<e.length;a++){o=e[a];var y=this.get(o);if(y){if(d&&o!==y){var w=this._isModel(o)?o.attributes:o;t.parse&&(w=y.parse(w,t)),y.set(w,t),l.push(y),v&&!g&&(g=y.hasChanged(m))}f[y.cid]||(f[y.cid]=!0,s.push(y)),e[a]=y}else h&&(o=e[a]=this._prepareModel(o,t))&&(u.push(o),this._addReference(o,t),f[o.cid]=!0,s.push(o))}if(p){for(a=0;a<this.length;a++)f[(o=this.models[a]).cid]||c.push(o);c.length&&this._removeModels(c,t)}var k=!1,S=!v&&h&&p;if(s.length&&S?(k=this.length!==s.length||n.some(this.models,(function(e,t){return e!==s[t]})),this.models.length=0,x(this.models,s,0),this.length=this.models.length):u.length&&(v&&(g=!0),x(this.models,u,null==i?this.length:i),this.length=this.models.length),g&&this.sort({silent:!0}),!t.silent){for(a=0;a<u.length;a++)null!=i&&(t.index=i+a),(o=u[a]).trigger("add",o,this,t);(g||k)&&this.trigger("sort",this,t),(u.length||c.length||l.length)&&(t.changes={added:u,removed:c,merged:l},this.trigger("update",this,t))}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return o.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(this._isModel(e)?e.attributes:e,e.idAttribute)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var r=t.length;return n.isFunction(t)&&(t=t.bind(this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){var t=(e=n.extend({parse:!0},e)).success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t.call(e.context,r,n,e),r.trigger("sync",r,n,e)},H(this,e),this.sync("read",this,e)},create:function(e,t){var r=(t=t?n.clone(t):{}).wait;if(!(e=this._prepareModel(e,t)))return!1;r||this.add(e,t);var i=this,o=t.success;return t.success=function(e,t,n){r&&i.add(e,n),o&&o.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e,t){return e[t||this.model.prototype.idAttribute||"id"]},values:function(){return new S(this,_)},keys:function(){return new S(this,E)},entries:function(){return new S(this,C)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){return this._isModel(e)?(e.collection||(e.collection=this),e):((t=t?n.clone(t):{}).collection=this,(r=this.model.prototype?new this.model(e,t):this.model(e,t)).validationError?(this.trigger("invalid",this,r.validationError,t),!1):r);var r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var i=this.get(e[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes,i.idAttribute);null!=a&&delete this._byId[a],t.silent||(t.index=o,i.trigger("remove",i,this,t)),n.push(i),this._removeReference(i,t)}}return n},_isModel:function(e){return e instanceof m},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes,e.idAttribute);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes,e.idAttribute);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"changeId"===e){var i=this.modelId(t.previousAttributes(),t.idAttribute),o=this.modelId(t.attributes,t.idAttribute);null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=t)}}this.trigger.apply(this,arguments)}});var k="function"==typeof Symbol&&Symbol.iterator;k&&(y.prototype[k]=y.prototype.values);var S=function(e,t){this._collection=e,this._kind=t,this._index=0},_=1,E=2,C=3;k&&(S.prototype[k]=function(){return this}),S.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var e,t=this._collection.at(this._index);if(this._index++,this._kind===_)e=t;else{var n=this._collection.modelId(t.attributes,t.idAttribute);e=this._kind===E?n:[n,t]}return{value:e,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var A=t.View=function(e){this.cid=n.uniqueId("view"),this.preinitialize.apply(this,arguments),n.extend(this,n.pick(e,L)),this._ensureElement(),this.initialize.apply(this,arguments)},P=/^(\S+)\s*(.*)$/,L=["model","collection","el","id","attributes","className","tagName","events"];n.extend(A.prototype,s,{tagName:"div",$:function(e){return this.$el.find(e)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,"events")),!e)return this;for(var t in this.undelegateEvents(),e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var i=t.match(P);this.delegate(i[1],i[2],r.bind(this))}}return this},delegate:function(e,t,n){return this.$el.on(e+".delegateEvents"+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+".delegateEvents"+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}});var T=function(e,t,r,i){n.each(r,(function(n,r){t[r]&&(e.prototype[r]=function(e,t,n,r){switch(t){case 1:return function(){return e[n](this[r])};case 2:return function(t){return e[n](this[r],t)};case 3:return function(t,i){return e[n](this[r],N(t,this),i)};case 4:return function(t,i,o){return e[n](this[r],N(t,this),i,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[r]),e[n].apply(e,t)}}}(t,n,r,i))}))},N=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?O(e):n.isString(e)?function(t){return t.get(e)}:e},O=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}};n.each([[y,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[m,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],(function(e){var t=e[0],r=e[1],i=e[2];t.mixin=function(e){var r=n.reduce(n.functions(e),(function(e,t){return e[t]=0,e}),{});T(t,e,r,i)},T(t,n,r,i)})),t.sync=function(e,r,i){var o=M[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||U()),null!=i.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(a.contentType="application/json",a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",o),s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1);var u=i.error;i.error=function(e,t,n){i.textStatus=t,i.errorThrown=n,u&&u.call(i.context,e,t,n)};var l=i.xhr=t.ajax(n.extend(a,i));return r.trigger("request",r,l,i),l};var M={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var R=t.Router=function(e){e||(e={}),this.preinitialize.apply(this,arguments),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},D=/\((.*?)\)/g,j=/(\(\?)?:\w+/g,I=/\*\w+/g,F=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(R.prototype,s,{preinitialize:function(){},initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return t.history.route(e,(function(n){var a=o._extractParameters(e,n);!1!==o.execute(i,a,r)&&(o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),t.history.trigger("route",o,r,a))})),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(F,"\\$&").replace(D,"(?:$1)?").replace(j,(function(e,t){return t?e:"([^/?]+)"})).replace(I,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,(function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null}))}});var z=t.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},V=/^[#\/]|\s+$/g,B=/^\/+|\/+$/g,$=/#.*$/;z.started=!1,n.extend(z.prototype,s,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(V,"")},start:function(e){if(z.started)throw new Error("Backbone.history has already been started");if(z.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(B,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),z.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,(function(t){if(t.route.test(e))return t.callback(e),!0})))},navigate:function(e,t){if(!z.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;e=e.replace($,"");var i=this.decodeFragment(e);if(this.fragment!==i){if(this.fragment=i,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var o=this.iframe.contentWindow;t.replace||(o.document.open(),o.document.close()),this._updateHash(o.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new z;m.extend=y.extend=R.extend=A.extend=z.extend=function(e,t){var r,i=this;return r=e&&n.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,t),r.prototype=n.create(i.prototype,e),r.prototype.constructor=r,r.__super__=i.prototype,r};var U=function(){throw new Error('A "url" property or function must be specified')},H=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t}(o,n,e,t)}.apply(t,r),void 0===i||(e.exports=i)},1420:(e,t,n)=>{var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},1448:(e,t,n)=>{var r=n(426),i=n(9326);e.exports=function(e,t){return null!=e&&i(e,t,r)}},1453:(e,t,n)=>{"use strict";var r=n(6857),i=n(8918),o=n(6639),a=n(4520),s=n(7860),u=n(4384),l=n(8191).Graph,c=n(3988);function f(e,t,n){return r.map(t,(function(t){return s(e,t,n)}))}function h(e,t){var n=new l;r.forEach(e,(function(e){var i=e.graph().root,o=a(e,i,n,t);r.forEach(o.vs,(function(t,n){e.node(t).order=n})),u(e,n,o.vs)}))}function d(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}e.exports=function(e){var t=c.maxRank(e),n=f(e,r.range(1,t+1),"inEdges"),a=f(e,r.range(t-1,-1,-1),"outEdges"),s=i(e);d(e,s);for(var u,l=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){h(p%2?n:a,p%4>=2),s=c.buildLayerMatrix(e);var v=o(e,s);v<l&&(g=0,u=r.cloneDeep(s),l=v)}d(e,u)}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},1489:(e,t,n)=>{var r=n(7400);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},1549:(e,t,n)=>{var r=n(2032),i=n(3862),o=n(6721),a=n(2749),s=n(5749);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},1667:(e,t,n)=>{e.exports={components:n(3619),dijkstra:n(8905),dijkstraAll:n(4919),findCycles:n(6678),floydWarshall:n(3590),isAcyclic:n(498),postorder:n(1045),preorder:n(6016),prim:n(4423),tarjan:n(6291),topsort:n(9888)}},1684:(e,t,n)=>{var r=n(3599),i=n(6176),o=n(3488);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},1737:(e,t,n)=>{var r=n(117);function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},i.prototype.has=function(e){return r.has(this._keyIndices,e)},i.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var i=this._arr,o=i.length;return n[e]=o,i.push({key:e,priority:t}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},i.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},i.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))},i.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},i.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,i=n[e],o=n[t];n[e]=o,n[t]=i,r[o.key]=e,r[i.key]=t}},1769:(e,t,n)=>{var r=n(6449),i=n(8586),o=n(1802),a=n(3222);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},1791:(e,t,n)=>{var r=n(6547),i=n(3360);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var l=t[s],c=o?o(n[l],e[l],l,n,e):void 0;void 0===c&&(c=e[l]),a?i(n,l,c):r(n,l,c)}return n}},1799:(e,t,n)=>{var r=n(7217),i=n(270);e.exports=function(e,t,n,o){var a=n.length,s=a,u=!o;if(null==e)return!s;for(e=Object(e);a--;){var l=n[a];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<s;){var c=(l=n[a])[0],f=e[c],h=l[1];if(u&&l[2]){if(void 0===f&&!(c in e))return!1}else{var d=new r;if(o)var p=o(f,h,c,e,t,d);if(!(void 0===p?i(h,f,3,o,d):p))return!1}}return!0}},1800:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},1802:(e,t,n)=>{var r=n(2224),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=a},1811:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},1873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},1882:(e,t,n)=>{var r=n(2552),i=n(3805);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:(e,t,n)=>{var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},1986:(e,t,n)=>{var r=n(1873),i=n(7828),o=n(5288),a=n(5911),s=n(317),u=n(4247),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,f,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=u),e.size!=t.size&&!p)return!1;var g=h.get(e);if(g)return g==t;r|=2,h.set(e,t);var v=a(d(e),d(t),r,l,f,h);return h.delete(e),v;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},1993:(e,t,n)=>{var r=n(9811),i=n(4460),o=n(7927);e.exports=function(e){return i(e)?o(e):r(e)}},2006:(e,t,n)=>{var r=n(5389),i=n(4894),o=n(5950);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!i(t)){var u=r(n,3);t=o(t),n=function(e){return u(s[e],e,s)}}var l=e(t,n,a);return l>-1?s[u?t[l]:l]:void 0}}},2031:(e,t,n)=>{var r=n(6857),i=n(8191).Graph,o=n(9859);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new i,a=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,i=t(e),o=r+i;n.setEdge(e.v,e.w,o),s=Math.max(s,n.node(e.v).out+=i),a=Math.max(a,n.node(e.w).in+=i)}));var l=r.range(s+a+3).map((function(){return new o})),c=a+1;return r.forEach(n.nodes(),(function(e){u(l,c,n.node(e))})),{graph:n,buckets:l,zeroIdx:c}}(e,t||a),l=function(e,t,n){for(var r,i=[],o=t[t.length-1],a=t[0];e.nodeCount();){for(;r=a.dequeue();)s(e,t,n,r);for(;r=o.dequeue();)s(e,t,n,r);if(e.nodeCount())for(var u=t.length-2;u>0;--u)if(r=t[u].dequeue()){i=i.concat(s(e,t,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(l,(function(t){return e.outEdges(t.v,t.w)})),!0)};var a=r.constant(1);function s(e,t,n,i,o){var a=o?[]:void 0;return r.forEach(e.inEdges(i.v),(function(r){var i=e.edge(r),s=e.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,u(t,n,s)})),r.forEach(e.outEdges(i.v),(function(r){var i=e.edge(r),o=r.w,a=e.node(o);a.in-=i,u(t,n,a)})),e.removeNode(i.v),a}function u(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},2032:(e,t,n)=>{var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2193:(e,t,n)=>{var r=n(8984),i=n(5861),o=n(2428),a=n(6449),s=n(4894),u=n(3656),l=n(5527),c=n(7167),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(l(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},2199:(e,t,n)=>{var r=n(4528),i=n(6449);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},2216:e=>{e.exports=function(e){return void 0===e}},2224:(e,t,n)=>{var r=n(104);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},2271:(e,t,n)=>{var r=n(1791),i=n(4664);e.exports=function(e,t){return r(e,i(e),t)}},2420:(e,t,n)=>{var r=n(6649),i=n(4066),o=n(7241);e.exports=function(e,t){return null==e?e:r(e,i(t),o)}},2428:(e,t,n)=>{var r=n(7534),i=n(346),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},2523:e=>{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},2543:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",v="[object Array]",m="[object Boolean]",y="[object Date]",b="[object Error]",w="[object Function]",x="[object GeneratorFunction]",k="[object Map]",S="[object Number]",_="[object Object]",E="[object Promise]",C="[object RegExp]",A="[object Set]",P="[object String]",L="[object Symbol]",T="[object WeakMap]",N="[object ArrayBuffer]",O="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",D="[object Int8Array]",j="[object Int16Array]",I="[object Int32Array]",F="[object Uint8Array]",z="[object Uint8ClampedArray]",V="[object Uint16Array]",B="[object Uint32Array]",$=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,G=RegExp(q.source),Y=RegExp(W.source),X=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="["+xe+"]",Le="["+Ae+"]",Te="["+ke+"]",Ne="\\d+",Oe="["+Se+"]",Me="["+_e+"]",Re="[^"+xe+Ae+Ne+Se+_e+Ee+"]",De="\\ud83c[\\udffb-\\udfff]",je="[^"+xe+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+Ee+"]",Ve="\\u200d",Be="(?:"+Me+"|"+Re+")",$e="(?:"+ze+"|"+Re+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Te+"|"+De+")?",We="["+Ce+"]?",Ge=We+qe+"(?:"+Ve+"(?:"+[je,Ie,Fe].join("|")+")"+We+qe+")*",Ye="(?:"+[Oe,Ie,Fe].join("|")+")"+Ge,Xe="(?:"+[je+Te+"?",Te,Ie,Fe,Pe].join("|")+")",Ke=RegExp("['’]","g"),Je=RegExp(Te,"g"),Qe=RegExp(De+"(?="+De+")|"+Xe+Ge,"g"),Ze=RegExp([ze+"?"+Me+"+"+Ue+"(?="+[Le,ze,"$"].join("|")+")",$e+"+"+He+"(?="+[Le,ze+Be,"$"].join("|")+")",ze+"?"+Be+"+"+Ue,ze+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Ye].join("|"),"g"),et=RegExp("["+Ve+xe+ke+Ce+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[M]=it[R]=it[D]=it[j]=it[I]=it[F]=it[z]=it[V]=it[B]=!0,it[g]=it[v]=it[N]=it[m]=it[O]=it[y]=it[b]=it[w]=it[k]=it[S]=it[_]=it[C]=it[A]=it[P]=it[T]=!1;var ot={};ot[g]=ot[v]=ot[N]=ot[O]=ot[m]=ot[y]=ot[M]=ot[R]=ot[D]=ot[j]=ot[I]=ot[k]=ot[S]=ot[_]=ot[C]=ot[A]=ot[P]=ot[L]=ot[F]=ot[z]=ot[V]=ot[B]=!0,ot[b]=ot[w]=ot[T]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=lt||ct||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ht,gt=pt&<.process,vt=function(){try{return dt&&dt.require&&dt.require("util").types||gt&>.binding&>.binding("util")}catch(e){}}(),mt=vt&&vt.isArrayBuffer,yt=vt&&vt.isDate,bt=vt&&vt.isMap,wt=vt&&vt.isRegExp,xt=vt&&vt.isSet,kt=vt&&vt.isTypedArray;function St(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function _t(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ct(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Lt(e,t){return!(null==e||!e.length)&&zt(e,t,0)>-1}function Tt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Ot(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Mt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Rt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var jt=Ut("length");function It(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ft(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function zt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ft(e,Bt,n)}function Vt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Bt(e){return e!=e}function $t(e,t){var n=null==e?0:e.length;return n?Wt(e,t)/n:h}function Ut(e){return function(t){return null==t?i:t[e]}}function Ht(e){return function(t){return null==e?i:e[t]}}function qt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Wt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Yt(e){return e?e.slice(0,hn(e)+1).replace(re,""):e}function Xt(e){return function(t){return e(t)}}function Kt(e,t){return Nt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&zt(t,e[n],0)>-1;);return n}function Zt(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}var en=Ht({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Ht({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function cn(e){return rn(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):jt(e)}function fn(e){return rn(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function hn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var dn=Ht({"&":"&","<":"<",">":">",""":'"',"'":"'"}),pn=function e(t){var n,r=(t=null==t?ft:pn.defaults(ft.Object(),t,pn.pick(ft,nt))).Array,ie=t.Date,xe=t.Error,ke=t.Function,Se=t.Math,_e=t.Object,Ee=t.RegExp,Ce=t.String,Ae=t.TypeError,Pe=r.prototype,Le=ke.prototype,Te=_e.prototype,Ne=t["__core-js_shared__"],Oe=Le.toString,Me=Te.hasOwnProperty,Re=0,De=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",je=Te.toString,Ie=Oe.call(_e),Fe=ft._,ze=Ee("^"+Oe.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=pt?t.Buffer:i,Be=t.Symbol,$e=t.Uint8Array,Ue=Ve?Ve.allocUnsafe:i,He=an(_e.getPrototypeOf,_e),qe=_e.create,We=Te.propertyIsEnumerable,Ge=Pe.splice,Ye=Be?Be.isConcatSpreadable:i,Xe=Be?Be.iterator:i,Qe=Be?Be.toStringTag:i,et=function(){try{var e=uo(_e,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,lt=ie&&ie.now!==ft.Date.now&&ie.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Se.ceil,dt=Se.floor,gt=_e.getOwnPropertySymbols,vt=Ve?Ve.isBuffer:i,jt=t.isFinite,Ht=Pe.join,gn=an(_e.keys,_e),vn=Se.max,mn=Se.min,yn=ie.now,bn=t.parseInt,wn=Se.random,xn=Pe.reverse,kn=uo(t,"DataView"),Sn=uo(t,"Map"),_n=uo(t,"Promise"),En=uo(t,"Set"),Cn=uo(t,"WeakMap"),An=uo(_e,"create"),Pn=Cn&&new Cn,Ln={},Tn=Io(kn),Nn=Io(Sn),On=Io(_n),Mn=Io(En),Rn=Io(Cn),Dn=Be?Be.prototype:i,jn=Dn?Dn.valueOf:i,In=Dn?Dn.toString:i;function Fn(e){if(es(e)&&!Ua(e)&&!(e instanceof $n)){if(e instanceof Bn)return e;if(Me.call(e,"__wrapped__"))return Fo(e)}return new Bn(e)}var zn=function(){function e(){}return function(t){if(!Za(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Vn(){}function Bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function $n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Gn(e){var t=this.__data__=new Hn(e);this.size=t.size}function Yn(e,t){var n=Ua(e),r=!n&&$a(e),i=!n&&!r&&Ga(e),o=!n&&!r&&!i&&us(e),a=n||r||i||o,s=a?Gt(e.length,Ce):[],u=s.length;for(var l in e)!t&&!Me.call(e,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||vo(l,u))||s.push(l);return s}function Xn(e){var t=e.length;return t?e[qr(0,t-1)]:i}function Kn(e,t){return Oo(Ci(e),or(t,0,e.length))}function Jn(e){return Oo(Ci(e))}function Qn(e,t,n){(n!==i&&!za(e[t],n)||n===i&&!(t in e))&&rr(e,t,n)}function Zn(e,t,n){var r=e[t];Me.call(e,t)&&za(r,n)&&(n!==i||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(za(e[n][0],t))return n;return-1}function tr(e,t,n,r){return cr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function nr(e,t){return e&&Ai(t,Ts(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,o=t.length,a=r(o),s=null==e;++n<o;)a[n]=s?i:Es(e,t[n]);return a}function or(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ar(e,t,n,r,o,a){var s,u=1&t,l=2&t,c=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!Za(e))return e;var f=Ua(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ci(e,s)}else{var h=fo(e),d=h==w||h==x;if(Ga(e))return wi(e,u);if(h==_||h==g||d&&!o){if(s=l||d?{}:po(e),!u)return l?function(e,t){return Ai(e,co(e),t)}(e,function(e,t){return e&&Ai(t,Ns(t),e)}(s,e)):function(e,t){return Ai(e,lo(e),t)}(e,nr(s,e))}else{if(!ot[h])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case N:return xi(e);case m:case y:return new i(+e);case O:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case R:case D:case j:case I:case F:case z:case V:case B:return ki(e,n);case k:return new i;case S:case P:return new i(e);case C:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new i;case L:return r=e,jn?_e(jn.call(r)):{}}}(e,h,u)}}a||(a=new Gn);var p=a.get(e);if(p)return p;a.set(e,s),os(e)?e.forEach((function(r){s.add(ar(r,t,n,r,e,a))})):ts(e)&&e.forEach((function(r,i){s.set(i,ar(r,t,n,i,e,a))}));var v=f?i:(c?l?to:eo:l?Ns:Ts)(e);return Et(v||e,(function(r,i){v&&(r=e[i=r]),Zn(s,i,ar(r,t,n,i,e,a))})),s}function sr(e,t,n){var r=n.length;if(null==e)return!r;for(e=_e(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Ae(o);return Po((function(){e.apply(i,n)}),t)}function lr(e,t,n,r){var i=-1,o=Lt,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=Nt(t,Xt(n))),r?(o=Tt,a=!1):t.length>=200&&(o=Jt,a=!1,t=new Wn(t));e:for(;++i<s;){var c=e[i],f=null==n?c:n(c);if(c=r||0!==c?c:0,a&&f==f){for(var h=l;h--;)if(t[h]===f)continue e;u.push(c)}else o(t,f,r)||u.push(c)}return u}Fn.templateSettings={escape:X,evaluate:K,interpolate:J,variable:"",imports:{_:Fn}},Fn.prototype=Vn.prototype,Fn.prototype.constructor=Fn,Bn.prototype=zn(Vn.prototype),Bn.prototype.constructor=Bn,$n.prototype=zn(Vn.prototype),$n.prototype.constructor=$n,Un.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(An){var n=t[e];return n===a?i:n}return Me.call(t,e)?t[e]:i},Un.prototype.has=function(e){var t=this.__data__;return An?t[e]!==i:Me.call(t,e)},Un.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&t===i?a:t,this},Hn.prototype.clear=function(){this.__data__=[],this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():Ge.call(t,n,1),--this.size,0))},Hn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?i:t[n][1]},Hn.prototype.has=function(e){return er(this.__data__,e)>-1},Hn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(Sn||Hn),string:new Un}},qn.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return ao(this,e).get(e)},qn.prototype.has=function(e){return ao(this,e).has(e)},qn.prototype.set=function(e,t){var n=ao(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Wn.prototype.add=Wn.prototype.push=function(e){return this.__data__.set(e,a),this},Wn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new Hn,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var cr=Ti(yr),fr=Ti(br,!0);function hr(e,t){var n=!0;return cr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function dr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s==s&&!ss(s):n(s,u)))var u=s,l=a}return l}function pr(e,t){var n=[];return cr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function gr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=go),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?gr(s,t-1,n,r,i):Ot(i,s):r||(i[i.length]=s)}return i}var vr=Ni(),mr=Ni(!0);function yr(e,t){return e&&vr(e,t,Ts)}function br(e,t){return e&&mr(e,t,Ts)}function wr(e,t){return Pt(t,(function(t){return Ka(e[t])}))}function xr(e,t){for(var n=0,r=(t=vi(t,e)).length;null!=e&&n<r;)e=e[jo(t[n++])];return n&&n==r?e:i}function kr(e,t,n){var r=t(e);return Ua(e)?r:Ot(r,n(e))}function Sr(e){return null==e?e===i?"[object Undefined]":"[object Null]":Qe&&Qe in _e(e)?function(e){var t=Me.call(e,Qe),n=e[Qe];try{e[Qe]=i;var r=!0}catch(e){}var o=je.call(e);return r&&(t?e[Qe]=n:delete e[Qe]),o}(e):function(e){return je.call(e)}(e)}function _r(e,t){return e>t}function Er(e,t){return null!=e&&Me.call(e,t)}function Cr(e,t){return null!=e&&t in _e(e)}function Ar(e,t,n){for(var o=n?Tt:Lt,a=e[0].length,s=e.length,u=s,l=r(s),c=1/0,f=[];u--;){var h=e[u];u&&t&&(h=Nt(h,Xt(t))),c=mn(h.length,c),l[u]=!n&&(t||a>=120&&h.length>=120)?new Wn(u&&h):i}h=e[0];var d=-1,p=l[0];e:for(;++d<a&&f.length<c;){var g=h[d],v=t?t(g):g;if(g=n||0!==g?g:0,!(p?Jt(p,v):o(f,v,n))){for(u=s;--u;){var m=l[u];if(!(m?Jt(m,v):o(e[u],v,n)))continue e}p&&p.push(v),f.push(g)}}return f}function Pr(e,t,n){var r=null==(e=Eo(e,t=vi(t,e)))?e:e[jo(Xo(t))];return null==r?i:St(r,e,n)}function Lr(e){return es(e)&&Sr(e)==g}function Tr(e,t,n,r,o){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,n,r,o,a){var s=Ua(e),u=Ua(t),l=s?v:fo(e),c=u?v:fo(t),f=(l=l==g?_:l)==_,h=(c=c==g?_:c)==_,d=l==c;if(d&&Ga(e)){if(!Ga(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Gn),s||us(e)?Qi(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case m:case y:case S:return za(+e,+t);case b:return e.name==t.name&&e.message==t.message;case C:case P:return e==t+"";case k:var s=on;case A:var u=1&r;if(s||(s=un),e.size!=t.size&&!u)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var c=Qi(s(e),s(t),r,i,o,a);return a.delete(e),c;case L:if(jn)return jn.call(e)==jn.call(t)}return!1}(e,t,l,n,r,o,a);if(!(1&n)){var p=f&&Me.call(e,"__wrapped__"),w=h&&Me.call(t,"__wrapped__");if(p||w){var x=p?e.value():e,E=w?t.value():t;return a||(a=new Gn),o(x,E,n,r,a)}}return!!d&&(a||(a=new Gn),function(e,t,n,r,o,a){var s=1&n,u=eo(e),l=u.length;if(l!=eo(t).length&&!s)return!1;for(var c=l;c--;){var f=u[c];if(!(s?f in t:Me.call(t,f)))return!1}var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var p=!0;a.set(e,t),a.set(t,e);for(var g=s;++c<l;){var v=e[f=u[c]],m=t[f];if(r)var y=s?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(!(y===i?v===m||o(v,m,n,r,a):y)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,r,o,a))}(e,t,n,r,Tr,o))}function Nr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=_e(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var l=(u=n[o])[0],c=e[l],f=u[1];if(s&&u[2]){if(c===i&&!(l in e))return!1}else{var h=new Gn;if(r)var d=r(c,f,l,e,t,h);if(!(d===i?Tr(f,c,3,r,h):d))return!1}}return!0}function Or(e){return!(!Za(e)||(t=e,De&&De in t))&&(Ka(e)?ze:ge).test(Io(e));var t}function Mr(e){return"function"==typeof e?e:null==e?nu:"object"==typeof e?Ua(e)?Fr(e[0],e[1]):Ir(e):fu(e)}function Rr(e){if(!xo(e))return gn(e);var t=[];for(var n in _e(e))Me.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Dr(e,t){return e<t}function jr(e,t){var n=-1,i=qa(e)?r(e.length):[];return cr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Ir(e){var t=so(e);return 1==t.length&&t[0][2]?So(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function Fr(e,t){return yo(e)&&ko(t)?So(jo(e),t):function(n){var r=Es(n,e);return r===i&&r===t?Cs(n,e):Tr(t,r,3)}}function zr(e,t,n,r,o){e!==t&&vr(t,(function(a,s){if(o||(o=new Gn),Za(a))!function(e,t,n,r,o,a,s){var u=Co(e,n),l=Co(t,n),c=s.get(l);if(c)Qn(e,n,c);else{var f=a?a(u,l,n+"",e,t,s):i,h=f===i;if(h){var d=Ua(l),p=!d&&Ga(l),g=!d&&!p&&us(l);f=l,d||p||g?Ua(u)?f=u:Wa(u)?f=Ci(u):p?(h=!1,f=wi(l,!0)):g?(h=!1,f=ki(l,!0)):f=[]:rs(l)||$a(l)?(f=u,$a(u)?f=vs(u):Za(u)&&!Ka(u)||(f=po(l))):h=!1}h&&(s.set(l,f),o(f,l,r,a,s),s.delete(l)),Qn(e,n,f)}}(e,t,s,n,zr,r,o);else{var u=r?r(Co(e,s),a,s+"",e,t,o):i;u===i&&(u=a),Qn(e,s,u)}}),Ns)}function Vr(e,t){var n=e.length;if(n)return vo(t+=t<0?n:0,n)?e[t]:i}function Br(e,t,n){t=t.length?Nt(t,(function(e){return Ua(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[nu];var r=-1;t=Nt(t,Xt(oo()));var i=jr(e,(function(e,n,i){var o=Nt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e){var t=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var u=Si(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));t--;)e[t]=e[t].value;return e}(i)}function $r(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=xr(e,a);n(s,a)&&Kr(o,vi(a,e),s)}return o}function Ur(e,t,n,r){var i=r?Vt:zt,o=-1,a=t.length,s=e;for(e===t&&(t=Ci(t)),n&&(s=Nt(e,Xt(n)));++o<a;)for(var u=0,l=t[o],c=n?n(l):l;(u=i(s,c,u,r))>-1;)s!==e&&Ge.call(s,u,1),Ge.call(e,u,1);return e}function Hr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;vo(i)?Ge.call(e,i,1):ui(e,i)}}return e}function qr(e,t){return e+dt(wn()*(t-e+1))}function Wr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function Gr(e,t){return Lo(_o(e,t,nu),e+"")}function Yr(e){return Xn(zs(e))}function Xr(e,t){var n=zs(e);return Oo(n,or(t,0,n.length))}function Kr(e,t,n,r){if(!Za(e))return e;for(var o=-1,a=(t=vi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var l=jo(t[o]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=s){var f=u[l];(c=r?r(f,l,u):i)===i&&(c=Za(f)?f:vo(t[o+1])?[]:{})}Zn(u,l,c),u=u[l]}return e}var Jr=Pn?function(e,t){return Pn.set(e,t),e}:nu,Qr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Zs(t),writable:!0})}:nu;function Zr(e){return Oo(zs(e))}function ei(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i<o;)a[i]=e[i+t];return a}function ti(e,t){var n;return cr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ni(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ri(e,t,nu,n)}function ri(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,l=ss(t),c=t===i;o<a;){var f=dt((o+a)/2),h=n(e[f]),d=h!==i,p=null===h,g=h==h,v=ss(h);if(s)var m=r||g;else m=c?g&&(r||d):u?g&&d&&(r||!p):l?g&&d&&!p&&(r||!v):!p&&!v&&(r?h<=t:h<t);m?o=f+1:a=f}return mn(a,4294967294)}function ii(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!za(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function oi(e){return"number"==typeof e?e:ss(e)?h:+e}function ai(e){if("string"==typeof e)return e;if(Ua(e))return Nt(e,ai)+"";if(ss(e))return In?In.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function si(e,t,n){var r=-1,i=Lt,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Tt;else if(o>=200){var l=t?null:Wi(e);if(l)return un(l);a=!1,i=Jt,u=new Wn}else u=t?[]:s;e:for(;++r<o;){var c=e[r],f=t?t(c):c;if(c=n||0!==c?c:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),s.push(c)}else i(u,f,n)||(u!==s&&u.push(f),s.push(c))}return s}function ui(e,t){return null==(e=Eo(e,t=vi(t,e)))||delete e[jo(Xo(t))]}function li(e,t,n,r){return Kr(e,t,n(xr(e,t)),r)}function ci(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ei(e,r?0:o,r?o+1:i):ei(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof $n&&(n=n.value()),Mt(t,(function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))}),n)}function hi(e,t,n){var i=e.length;if(i<2)return i?si(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=lr(a[o]||s,e[u],t,n));return si(gr(a,1),t,n)}function di(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function pi(e){return Wa(e)?e:[]}function gi(e){return"function"==typeof e?e:nu}function vi(e,t){return Ua(e)?e:yo(e,t)?[e]:Do(ms(e))}var mi=Gr;function yi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ei(e,t,n)}var bi=at||function(e){return ft.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function ki(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Si(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,a=ss(e),s=t!==i,u=null===t,l=t==t,c=ss(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!o)return 1;if(!r&&!a&&!c&&e<t||c&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!l)return-1}return 0}function _i(e,t,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,l=t.length,c=vn(a-s,0),f=r(l+c),h=!i;++u<l;)f[u]=t[u];for(;++o<s;)(h||o<a)&&(f[n[o]]=e[o]);for(;c--;)f[u++]=e[o++];return f}function Ei(e,t,n,i){for(var o=-1,a=e.length,s=-1,u=n.length,l=-1,c=t.length,f=vn(a-u,0),h=r(f+c),d=!i;++o<f;)h[o]=e[o];for(var p=o;++l<c;)h[p+l]=t[l];for(;++s<u;)(d||o<a)&&(h[p+n[s]]=e[o++]);return h}function Ci(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],l=r?r(n[u],e[u],u,n,e):i;l===i&&(l=e[u]),o?rr(n,u,l):Zn(n,u,l)}return n}function Pi(e,t){return function(n,r){var i=Ua(n)?_t:tr,o=t?t():{};return i(n,e,oo(r,2),o)}}function Li(e){return Gr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&mo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=_e(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Ti(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=_e(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ni(e){return function(t,n,r){for(var i=-1,o=_e(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Oi(e){return function(t){var n=rn(t=ms(t))?fn(t):i,r=n?n[0]:t.charAt(0),o=n?yi(n,1).join(""):t.slice(1);return r[e]()+o}}function Mi(e){return function(t){return Mt(Ks($s(t).replace(Ke,"")),e,"")}}function Ri(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=zn(e.prototype),r=e.apply(n,t);return Za(r)?r:n}}function Di(e){return function(t,n,r){var o=_e(t);if(!qa(t)){var a=oo(n,3);t=Ts(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function ji(e){return Zi((function(t){var n=t.length,r=n,a=Bn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ae(o);if(a&&!u&&"wrapper"==ro(s))var u=new Bn([],!0)}for(r=u?r:n;++r<n;){var l=ro(s=t[r]),c="wrapper"==l?no(s):i;u=c&&bo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[ro(c[0])].apply(u,c[3]):1==s.length&&bo(s)?u[l]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ua(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Ii(e,t,n,o,a,s,u,c,f,h){var d=t&l,p=1&t,g=2&t,v=24&t,m=512&t,y=g?i:Ri(e);return function l(){for(var b=arguments.length,w=r(b),x=b;x--;)w[x]=arguments[x];if(v)var k=io(l),S=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,k);if(o&&(w=_i(w,o,a,v)),s&&(w=Ei(w,s,u,v)),b-=S,v&&b<h){var _=sn(w,k);return Hi(e,t,Ii,l.placeholder,n,w,_,c,f,h-b)}var E=p?n:this,C=g?E[e]:e;return b=w.length,c?w=function(e,t){for(var n=e.length,r=mn(t.length,n),o=Ci(e);r--;){var a=t[r];e[r]=vo(a,n)?o[a]:i}return e}(w,c):m&&b>1&&w.reverse(),d&&f<b&&(w.length=f),this&&this!==ft&&this instanceof l&&(C=y||Ri(C)),C.apply(E,w)}}function Fi(e,t){return function(n,r){return function(e,t,n,r){return yr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function zi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ai(n),r=ai(r)):(n=oi(n),r=oi(r)),o=e(n,r)}return o}}function Vi(e){return Zi((function(t){return t=Nt(t,Xt(oo())),Gr((function(n){var r=this;return e(t,(function(e){return St(e,r,n)}))}))}))}function Bi(e,t){var n=(t=t===i?" ":ai(t)).length;if(n<2)return n?Wr(t,e):t;var r=Wr(t,ht(e/cn(t)));return rn(t)?yi(fn(r),0,e).join(""):r.slice(0,e)}function $i(e){return function(t,n,o){return o&&"number"!=typeof o&&mo(t,n,o)&&(n=o=i),t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n,i){for(var o=-1,a=vn(ht((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}(t,n,o=o===i?t<n?1:-1:hs(o),e)}}function Ui(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function Hi(e,t,n,r,o,a,s,l,c,f){var h=8&t;t|=h?u:64,4&(t&=~(h?64:u))||(t&=-4);var d=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,l,c,f],p=n.apply(i,d);return bo(e)&&Ao(p,d),p.placeholder=r,To(p,e,t)}function qi(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:mn(ds(n),292))&&jt(e)){var r=(ms(e)+"e").split("e");return+((r=(ms(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Wi=En&&1/un(new En([,-0]))[1]==c?function(e){return new En(e)}:su;function Gi(e){return function(t){var n=fo(t);return n==k?on(t):n==A?ln(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yi(e,t,n,a,c,f,h,d){var p=2&t;if(!p&&"function"!=typeof e)throw new Ae(o);var g=a?a.length:0;if(g||(t&=-97,a=c=i),h=h===i?h:vn(ds(h),0),d=d===i?d:ds(d),g-=c?c.length:0,64&t){var v=a,m=c;a=c=i}var y=p?i:no(e),b=[e,t,n,a,c,v,m,f,h,d];if(y&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==l&&8==n||r==l&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?_i(c,u,t[4]):u,e[4]=c?sn(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Ei(c,u,t[6]):u,e[6]=c?sn(e[5],s):t[6]),(u=t[7])&&(e[7]=u),r&l&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,y),e=b[0],t=b[1],n=b[2],a=b[3],c=b[4],!(d=b[9]=b[9]===i?p?0:e.length:vn(b[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var o=Ri(e);return function a(){for(var s=arguments.length,u=r(s),l=s,c=io(a);l--;)u[l]=arguments[l];var f=s<3&&u[0]!==c&&u[s-1]!==c?[]:sn(u,c);return(s-=f.length)<n?Hi(e,t,Ii,a.placeholder,i,u,f,i,i,n-s):St(this&&this!==ft&&this instanceof a?o:e,this,u)}}(e,t,d):t!=u&&33!=t||c.length?Ii.apply(i,b):function(e,t,n,i){var o=1&t,a=Ri(e);return function t(){for(var s=-1,u=arguments.length,l=-1,c=i.length,f=r(c+u),h=this&&this!==ft&&this instanceof t?a:e;++l<c;)f[l]=i[l];for(;u--;)f[l++]=arguments[++s];return St(h,o?n:this,f)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,i=Ri(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return To((y?Jr:Ao)(w,b),e,t)}function Xi(e,t,n,r){return e===i||za(e,Te[n])&&!Me.call(r,n)?t:e}function Ki(e,t,n,r,o,a){return Za(e)&&Za(t)&&(a.set(t,e),zr(e,t,i,Ki,a),a.delete(t)),e}function Ji(e){return rs(e)?i:e}function Qi(e,t,n,r,o,a){var s=1&n,u=e.length,l=t.length;if(u!=l&&!(s&&l>u))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var h=-1,d=!0,p=2&n?new Wn:i;for(a.set(e,t),a.set(t,e);++h<u;){var g=e[h],v=t[h];if(r)var m=s?r(v,g,h,t,e,a):r(g,v,h,e,t,a);if(m!==i){if(m)continue;d=!1;break}if(p){if(!Dt(t,(function(e,t){if(!Jt(p,t)&&(g===e||o(g,e,n,r,a)))return p.push(t)}))){d=!1;break}}else if(g!==v&&!o(g,v,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Zi(e){return Lo(_o(e,i,Ho),e+"")}function eo(e){return kr(e,Ts,lo)}function to(e){return kr(e,Ns,co)}var no=Pn?function(e){return Pn.get(e)}:su;function ro(e){for(var t=e.name+"",n=Ln[t],r=Me.call(Ln,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function io(e){return(Me.call(Fn,"placeholder")?Fn:e).placeholder}function oo(){var e=Fn.iteratee||ru;return e=e===ru?Mr:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function so(e){for(var t=Ts(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ko(i)]}return t}function uo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Or(n)?n:i}var lo=gt?function(e){return null==e?[]:(e=_e(e),Pt(gt(e),(function(t){return We.call(e,t)})))}:pu,co=gt?function(e){for(var t=[];e;)Ot(t,lo(e)),e=He(e);return t}:pu,fo=Sr;function ho(e,t,n){for(var r=-1,i=(t=vi(t,e)).length,o=!1;++r<i;){var a=jo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Qa(i)&&vo(a,i)&&(Ua(e)||$a(e))}function po(e){return"function"!=typeof e.constructor||xo(e)?{}:zn(He(e))}function go(e){return Ua(e)||$a(e)||!!(Ye&&e&&e[Ye])}function vo(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,n){if(!Za(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&vo(t,n.length):"string"==r&&t in n)&&za(n[t],e)}function yo(e,t){if(Ua(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||Z.test(e)||!Q.test(e)||null!=t&&e in _e(t)}function bo(e){var t=ro(e),n=Fn[t];if("function"!=typeof n||!(t in $n.prototype))return!1;if(e===n)return!0;var r=no(n);return!!r&&e===r[0]}(kn&&fo(new kn(new ArrayBuffer(1)))!=O||Sn&&fo(new Sn)!=k||_n&&fo(_n.resolve())!=E||En&&fo(new En)!=A||Cn&&fo(new Cn)!=T)&&(fo=function(e){var t=Sr(e),n=t==_?e.constructor:i,r=n?Io(n):"";if(r)switch(r){case Tn:return O;case Nn:return k;case On:return E;case Mn:return A;case Rn:return T}return t});var wo=Ne?Ka:gu;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Te)}function ko(e){return e==e&&!Za(e)}function So(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in _e(n))}}function _o(e,t,n){return t=vn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=vn(i.length-t,0),s=r(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(s),St(e,this,u)}}function Eo(e,t){return t.length<2?e:xr(e,ei(t,0,-1))}function Co(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ao=No(Jr),Po=ct||function(e,t){return ft.setTimeout(e,t)},Lo=No(Qr);function To(e,t,n){var r=t+"";return Lo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Et(p,(function(n){var r="_."+n[0];t&n[1]&&!Lt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function No(e){var t=0,n=0;return function(){var r=yn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Oo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=qr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Mo,Ro,Do=(Mo=Ma((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===Ro.size&&Ro.clear(),e})),Ro=Mo.cache,Mo);function jo(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Io(e){if(null!=e){try{return Oe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fo(e){if(e instanceof $n)return e.clone();var t=new Bn(e.__wrapped__,e.__chain__);return t.__actions__=Ci(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Gr((function(e,t){return Wa(e)?lr(e,gr(t,1,Wa,!0)):[]})),Vo=Gr((function(e,t){var n=Xo(t);return Wa(n)&&(n=i),Wa(e)?lr(e,gr(t,1,Wa,!0),oo(n,2)):[]})),Bo=Gr((function(e,t){var n=Xo(t);return Wa(n)&&(n=i),Wa(e)?lr(e,gr(t,1,Wa,!0),i,n):[]}));function $o(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ds(n);return i<0&&(i=vn(r+i,0)),Ft(e,oo(t,3),i)}function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ds(n),o=n<0?vn(r+o,0):mn(o,r-1)),Ft(e,oo(t,3),o,!0)}function Ho(e){return null!=e&&e.length?gr(e,1):[]}function qo(e){return e&&e.length?e[0]:i}var Wo=Gr((function(e){var t=Nt(e,pi);return t.length&&t[0]===e[0]?Ar(t):[]})),Go=Gr((function(e){var t=Xo(e),n=Nt(e,pi);return t===Xo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Ar(n,oo(t,2)):[]})),Yo=Gr((function(e){var t=Xo(e),n=Nt(e,pi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Ar(n,i,t):[]}));function Xo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Ko=Gr(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?Ur(e,t):e}var Qo=Zi((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Hr(e,Nt(t,(function(e){return vo(e,n)?+e:e})).sort(Si)),r}));function Zo(e){return null==e?e:xn.call(e)}var ea=Gr((function(e){return si(gr(e,1,Wa,!0))})),ta=Gr((function(e){var t=Xo(e);return Wa(t)&&(t=i),si(gr(e,1,Wa,!0),oo(t,2))})),na=Gr((function(e){var t=Xo(e);return t="function"==typeof t?t:i,si(gr(e,1,Wa,!0),i,t)}));function ra(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,(function(e){if(Wa(e))return t=vn(e.length,t),!0})),Gt(t,(function(t){return Nt(e,Ut(t))}))}function ia(e,t){if(!e||!e.length)return[];var n=ra(e);return null==t?n:Nt(n,(function(e){return St(t,i,e)}))}var oa=Gr((function(e,t){return Wa(e)?lr(e,t):[]})),aa=Gr((function(e){return hi(Pt(e,Wa))})),sa=Gr((function(e){var t=Xo(e);return Wa(t)&&(t=i),hi(Pt(e,Wa),oo(t,2))})),ua=Gr((function(e){var t=Xo(e);return t="function"==typeof t?t:i,hi(Pt(e,Wa),i,t)})),la=Gr(ra),ca=Gr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ia(e,n)}));function fa(e){var t=Fn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var da=Zi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof $n&&vo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Bn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),pa=Pi((function(e,t,n){Me.call(e,n)?++e[n]:rr(e,n,1)})),ga=Di($o),va=Di(Uo);function ma(e,t){return(Ua(e)?Et:cr)(e,oo(t,3))}function ya(e,t){return(Ua(e)?Ct:fr)(e,oo(t,3))}var ba=Pi((function(e,t,n){Me.call(e,n)?e[n].push(t):rr(e,n,[t])})),wa=Gr((function(e,t,n){var i=-1,o="function"==typeof t,a=qa(e)?r(e.length):[];return cr(e,(function(e){a[++i]=o?St(t,e,n):Pr(e,t,n)})),a})),xa=Pi((function(e,t,n){rr(e,n,t)}));function ka(e,t){return(Ua(e)?Nt:jr)(e,oo(t,3))}var Sa=Pi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),_a=Gr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&mo(e,t[0],t[1])?t=[]:n>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Br(e,gr(t,1),[])})),Ea=lt||function(){return ft.Date.now()};function Ca(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Yi(e,l,i,i,i,i,t)}function Aa(e,t){var n;if("function"!=typeof t)throw new Ae(o);return e=ds(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Pa=Gr((function(e,t,n){var r=1;if(n.length){var i=sn(n,io(Pa));r|=u}return Yi(e,r,t,n,i)})),La=Gr((function(e,t,n){var r=3;if(n.length){var i=sn(n,io(La));r|=u}return Yi(t,r,e,n,i)}));function Ta(e,t,n){var r,a,s,u,l,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Ae(o);function g(t){var n=r,o=a;return r=a=i,f=t,u=e.apply(o,n)}function v(e){var n=e-c;return c===i||n>=t||n<0||d&&e-f>=s}function m(){var e=Ea();if(v(e))return y(e);l=Po(m,function(e){var n=t-(e-c);return d?mn(n,s-(e-f)):n}(e))}function y(e){return l=i,p&&r?g(e):(r=a=i,u)}function b(){var e=Ea(),n=v(e);if(r=arguments,a=this,c=e,n){if(l===i)return function(e){return f=e,l=Po(m,t),h?g(e):u}(c);if(d)return bi(l),l=Po(m,t),g(c)}return l===i&&(l=Po(m,t)),u}return t=gs(t)||0,Za(n)&&(h=!!n.leading,s=(d="maxWait"in n)?vn(gs(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==i&&bi(l),f=0,r=c=a=l=i},b.flush=function(){return l===i?u:y(Ea())},b}var Na=Gr((function(e,t){return ur(e,1,t)})),Oa=Gr((function(e,t,n){return ur(e,gs(t)||0,n)}));function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ma.Cache||qn),n}function Ra(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=qn;var Da=mi((function(e,t){var n=(t=1==t.length&&Ua(t[0])?Nt(t[0],Xt(oo())):Nt(gr(t,1),Xt(oo()))).length;return Gr((function(r){for(var i=-1,o=mn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return St(e,this,r)}))})),ja=Gr((function(e,t){var n=sn(t,io(ja));return Yi(e,u,i,t,n)})),Ia=Gr((function(e,t){var n=sn(t,io(Ia));return Yi(e,64,i,t,n)})),Fa=Zi((function(e,t){return Yi(e,256,i,i,i,t)}));function za(e,t){return e===t||e!=e&&t!=t}var Va=Ui(_r),Ba=Ui((function(e,t){return e>=t})),$a=Lr(function(){return arguments}())?Lr:function(e){return es(e)&&Me.call(e,"callee")&&!We.call(e,"callee")},Ua=r.isArray,Ha=mt?Xt(mt):function(e){return es(e)&&Sr(e)==N};function qa(e){return null!=e&&Qa(e.length)&&!Ka(e)}function Wa(e){return es(e)&&qa(e)}var Ga=vt||gu,Ya=yt?Xt(yt):function(e){return es(e)&&Sr(e)==y};function Xa(e){if(!es(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Ka(e){if(!Za(e))return!1;var t=Sr(e);return t==w||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ds(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Za(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=bt?Xt(bt):function(e){return es(e)&&fo(e)==k};function ns(e){return"number"==typeof e||es(e)&&Sr(e)==S}function rs(e){if(!es(e)||Sr(e)!=_)return!1;var t=He(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Ie}var is=wt?Xt(wt):function(e){return es(e)&&Sr(e)==C},os=xt?Xt(xt):function(e){return es(e)&&fo(e)==A};function as(e){return"string"==typeof e||!Ua(e)&&es(e)&&Sr(e)==P}function ss(e){return"symbol"==typeof e||es(e)&&Sr(e)==L}var us=kt?Xt(kt):function(e){return es(e)&&Qa(e.length)&&!!it[Sr(e)]},ls=Ui(Dr),cs=Ui((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(qa(e))return as(e)?fn(e):Ci(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=fo(e);return(t==k?on:t==A?un:zs)(e)}function hs(e){return e?(e=gs(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ds(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?or(ds(e),0,d):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return h;if(Za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var n=pe.test(e);return n||ve.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function vs(e){return Ai(e,Ns(e))}function ms(e){return null==e?"":ai(e)}var ys=Li((function(e,t){if(xo(t)||qa(t))Ai(t,Ts(t),e);else for(var n in t)Me.call(t,n)&&Zn(e,n,t[n])})),bs=Li((function(e,t){Ai(t,Ns(t),e)})),ws=Li((function(e,t,n,r){Ai(t,Ns(t),e,r)})),xs=Li((function(e,t,n,r){Ai(t,Ts(t),e,r)})),ks=Zi(ir),Ss=Gr((function(e,t){e=_e(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&mo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Ns(a),u=-1,l=s.length;++u<l;){var c=s[u],f=e[c];(f===i||za(f,Te[c])&&!Me.call(e,c))&&(e[c]=a[c])}return e})),_s=Gr((function(e){return e.push(i,Ki),St(Ms,i,e)}));function Es(e,t,n){var r=null==e?i:xr(e,t);return r===i?n:r}function Cs(e,t){return null!=e&&ho(e,t,Cr)}var As=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n}),Zs(nu)),Ps=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),Me.call(e,t)?e[t].push(n):e[t]=[n]}),oo),Ls=Gr(Pr);function Ts(e){return qa(e)?Yn(e):Rr(e)}function Ns(e){return qa(e)?Yn(e,!0):function(e){if(!Za(e))return function(e){var t=[];if(null!=e)for(var n in _e(e))t.push(n);return t}(e);var t=xo(e),n=[];for(var r in e)("constructor"!=r||!t&&Me.call(e,r))&&n.push(r);return n}(e)}var Os=Li((function(e,t,n){zr(e,t,n)})),Ms=Li((function(e,t,n,r){zr(e,t,n,r)})),Rs=Zi((function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,(function(t){return t=vi(t,e),r||(r=t.length>1),t})),Ai(e,to(e),n),r&&(n=ar(n,7,Ji));for(var i=t.length;i--;)ui(n,t[i]);return n})),Ds=Zi((function(e,t){return null==e?{}:function(e,t){return $r(e,t,(function(t,n){return Cs(e,n)}))}(e,t)}));function js(e,t){if(null==e)return{};var n=Nt(to(e),(function(e){return[e]}));return t=oo(t),$r(e,n,(function(e,n){return t(e,n[0])}))}var Is=Gi(Ts),Fs=Gi(Ns);function zs(e){return null==e?[]:Kt(e,Ts(e))}var Vs=Mi((function(e,t,n){return t=t.toLowerCase(),e+(n?Bs(t):t)}));function Bs(e){return Xs(ms(e).toLowerCase())}function $s(e){return(e=ms(e))&&e.replace(ye,en).replace(Je,"")}var Us=Mi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Hs=Mi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qs=Oi("toLowerCase"),Ws=Mi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Gs=Mi((function(e,t,n){return e+(n?" ":"")+Xs(t)})),Ys=Mi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=Oi("toUpperCase");function Ks(e,t,n){return e=ms(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Js=Gr((function(e,t){try{return St(e,i,t)}catch(e){return Xa(e)?e:new xe(e)}})),Qs=Zi((function(e,t){return Et(t,(function(t){t=jo(t),rr(e,t,Pa(e[t],e))})),e}));function Zs(e){return function(){return e}}var eu=ji(),tu=ji(!0);function nu(e){return e}function ru(e){return Mr("function"==typeof e?e:ar(e,1))}var iu=Gr((function(e,t){return function(n){return Pr(n,e,t)}})),ou=Gr((function(e,t){return function(n){return Pr(e,n,t)}}));function au(e,t,n){var r=Ts(t),i=wr(t,r);null!=n||Za(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,Ts(t)));var o=!(Za(n)&&"chain"in n&&!n.chain),a=Ka(e);return Et(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ci(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ot([this.value()],arguments))})})),e}function su(){}var uu=Vi(Nt),lu=Vi(At),cu=Vi(Dt);function fu(e){return yo(e)?Ut(jo(e)):function(e){return function(t){return xr(t,e)}}(e)}var hu=$i(),du=$i(!0);function pu(){return[]}function gu(){return!1}var vu,mu=zi((function(e,t){return e+t}),0),yu=qi("ceil"),bu=zi((function(e,t){return e/t}),1),wu=qi("floor"),xu=zi((function(e,t){return e*t}),1),ku=qi("round"),Su=zi((function(e,t){return e-t}),0);return Fn.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=ds(e),function(){if(--e<1)return t.apply(this,arguments)}},Fn.ary=Ca,Fn.assign=ys,Fn.assignIn=bs,Fn.assignInWith=ws,Fn.assignWith=xs,Fn.at=ks,Fn.before=Aa,Fn.bind=Pa,Fn.bindAll=Qs,Fn.bindKey=La,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},Fn.chain=fa,Fn.chunk=function(e,t,n){t=(n?mo(e,t,n):t===i)?1:vn(ds(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=r(ht(o/t));a<o;)u[s++]=ei(e,a,a+=t);return u},Fn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Fn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Ot(Ua(n)?Ci(n):[n],gr(t,1))},Fn.cond=function(e){var t=null==e?0:e.length,n=oo();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Ae(o);return[n(e[0]),e[1]]})):[],Gr((function(n){for(var r=-1;++r<t;){var i=e[r];if(St(i[0],this,n))return St(i[1],this,n)}}))},Fn.conforms=function(e){return function(e){var t=Ts(e);return function(n){return sr(n,e,t)}}(ar(e,1))},Fn.constant=Zs,Fn.countBy=pa,Fn.create=function(e,t){var n=zn(e);return null==t?n:nr(n,t)},Fn.curry=function e(t,n,r){var o=Yi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Fn.curryRight=function e(t,n,r){var o=Yi(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Fn.debounce=Ta,Fn.defaults=Ss,Fn.defaultsDeep=_s,Fn.defer=Na,Fn.delay=Oa,Fn.difference=zo,Fn.differenceBy=Vo,Fn.differenceWith=Bo,Fn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=n||t===i?1:ds(t))<0?0:t,r):[]},Fn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,0,(t=r-(t=n||t===i?1:ds(t)))<0?0:t):[]},Fn.dropRightWhile=function(e,t){return e&&e.length?ci(e,oo(t,3),!0,!0):[]},Fn.dropWhile=function(e,t){return e&&e.length?ci(e,oo(t,3),!0):[]},Fn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&mo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ds(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ds(r))<0&&(r+=o),r=n>r?0:ps(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Fn.filter=function(e,t){return(Ua(e)?Pt:pr)(e,oo(t,3))},Fn.flatMap=function(e,t){return gr(ka(e,t),1)},Fn.flatMapDeep=function(e,t){return gr(ka(e,t),c)},Fn.flatMapDepth=function(e,t,n){return n=n===i?1:ds(n),gr(ka(e,t),n)},Fn.flatten=Ho,Fn.flattenDeep=function(e){return null!=e&&e.length?gr(e,c):[]},Fn.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===i?1:ds(t)):[]},Fn.flip=function(e){return Yi(e,512)},Fn.flow=eu,Fn.flowRight=tu,Fn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Fn.functions=function(e){return null==e?[]:wr(e,Ts(e))},Fn.functionsIn=function(e){return null==e?[]:wr(e,Ns(e))},Fn.groupBy=ba,Fn.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},Fn.intersection=Wo,Fn.intersectionBy=Go,Fn.intersectionWith=Yo,Fn.invert=As,Fn.invertBy=Ps,Fn.invokeMap=wa,Fn.iteratee=ru,Fn.keyBy=xa,Fn.keys=Ts,Fn.keysIn=Ns,Fn.map=ka,Fn.mapKeys=function(e,t){var n={};return t=oo(t,3),yr(e,(function(e,r,i){rr(n,t(e,r,i),e)})),n},Fn.mapValues=function(e,t){var n={};return t=oo(t,3),yr(e,(function(e,r,i){rr(n,r,t(e,r,i))})),n},Fn.matches=function(e){return Ir(ar(e,1))},Fn.matchesProperty=function(e,t){return Fr(e,ar(t,1))},Fn.memoize=Ma,Fn.merge=Os,Fn.mergeWith=Ms,Fn.method=iu,Fn.methodOf=ou,Fn.mixin=au,Fn.negate=Ra,Fn.nthArg=function(e){return e=ds(e),Gr((function(t){return Vr(t,e)}))},Fn.omit=Rs,Fn.omitBy=function(e,t){return js(e,Ra(oo(t)))},Fn.once=function(e){return Aa(2,e)},Fn.orderBy=function(e,t,n,r){return null==e?[]:(Ua(t)||(t=null==t?[]:[t]),Ua(n=r?i:n)||(n=null==n?[]:[n]),Br(e,t,n))},Fn.over=uu,Fn.overArgs=Da,Fn.overEvery=lu,Fn.overSome=cu,Fn.partial=ja,Fn.partialRight=Ia,Fn.partition=Sa,Fn.pick=Ds,Fn.pickBy=js,Fn.property=fu,Fn.propertyOf=function(e){return function(t){return null==e?i:xr(e,t)}},Fn.pull=Ko,Fn.pullAll=Jo,Fn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,oo(n,2)):e},Fn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,i,n):e},Fn.pullAt=Qo,Fn.range=hu,Fn.rangeRight=du,Fn.rearg=Fa,Fn.reject=function(e,t){return(Ua(e)?Pt:pr)(e,Ra(oo(t,3)))},Fn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=oo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Hr(e,i),n},Fn.rest=function(e,t){if("function"!=typeof e)throw new Ae(o);return Gr(e,t=t===i?t:ds(t))},Fn.reverse=Zo,Fn.sampleSize=function(e,t,n){return t=(n?mo(e,t,n):t===i)?1:ds(t),(Ua(e)?Kn:Xr)(e,t)},Fn.set=function(e,t,n){return null==e?e:Kr(e,t,n)},Fn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Kr(e,t,n,r)},Fn.shuffle=function(e){return(Ua(e)?Jn:Zr)(e)},Fn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mo(e,t,n)?(t=0,n=r):(t=null==t?0:ds(t),n=n===i?r:ds(n)),ei(e,t,n)):[]},Fn.sortBy=_a,Fn.sortedUniq=function(e){return e&&e.length?ii(e):[]},Fn.sortedUniqBy=function(e,t){return e&&e.length?ii(e,oo(t,2)):[]},Fn.split=function(e,t,n){return n&&"number"!=typeof n&&mo(e,t,n)&&(t=n=i),(n=n===i?d:n>>>0)?(e=ms(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=ai(t))&&rn(e)?yi(fn(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:vn(ds(t),0),Gr((function(n){var r=n[t],i=yi(n,0,t);return r&&Ot(i,r),St(e,this,i)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?ei(e,0,(t=n||t===i?1:ds(t))<0?0:t):[]},Fn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=r-(t=n||t===i?1:ds(t)))<0?0:t,r):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?ci(e,oo(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?ci(e,oo(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ae(o);return Za(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ta(e,t,{leading:r,maxWait:t,trailing:i})},Fn.thru=ha,Fn.toArray=fs,Fn.toPairs=Is,Fn.toPairsIn=Fs,Fn.toPath=function(e){return Ua(e)?Nt(e,jo):ss(e)?[e]:Ci(Do(ms(e)))},Fn.toPlainObject=vs,Fn.transform=function(e,t,n){var r=Ua(e),i=r||Ga(e)||us(e);if(t=oo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Za(e)&&Ka(o)?zn(He(e)):{}}return(i?Et:yr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Fn.unary=function(e){return Ca(e,1)},Fn.union=ea,Fn.unionBy=ta,Fn.unionWith=na,Fn.uniq=function(e){return e&&e.length?si(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?si(e,oo(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?si(e,i,t):[]},Fn.unset=function(e,t){return null==e||ui(e,t)},Fn.unzip=ra,Fn.unzipWith=ia,Fn.update=function(e,t,n){return null==e?e:li(e,t,gi(n))},Fn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,gi(n),r)},Fn.values=zs,Fn.valuesIn=function(e){return null==e?[]:Kt(e,Ns(e))},Fn.without=oa,Fn.words=Ks,Fn.wrap=function(e,t){return ja(gi(t),e)},Fn.xor=aa,Fn.xorBy=sa,Fn.xorWith=ua,Fn.zip=la,Fn.zipObject=function(e,t){return di(e||[],t||[],Zn)},Fn.zipObjectDeep=function(e,t){return di(e||[],t||[],Kr)},Fn.zipWith=ca,Fn.entries=Is,Fn.entriesIn=Fs,Fn.extend=bs,Fn.extendWith=ws,au(Fn,Fn),Fn.add=mu,Fn.attempt=Js,Fn.camelCase=Vs,Fn.capitalize=Bs,Fn.ceil=yu,Fn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=gs(n))==n?n:0),t!==i&&(t=(t=gs(t))==t?t:0),or(gs(e),t,n)},Fn.clone=function(e){return ar(e,4)},Fn.cloneDeep=function(e){return ar(e,5)},Fn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},Fn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},Fn.conformsTo=function(e,t){return null==t||sr(e,t,Ts(t))},Fn.deburr=$s,Fn.defaultTo=function(e,t){return null==e||e!=e?t:e},Fn.divide=bu,Fn.endsWith=function(e,t,n){e=ms(e),t=ai(t);var r=e.length,o=n=n===i?r:or(ds(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Fn.eq=za,Fn.escape=function(e){return(e=ms(e))&&Y.test(e)?e.replace(W,tn):e},Fn.escapeRegExp=function(e){return(e=ms(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Fn.every=function(e,t,n){var r=Ua(e)?At:hr;return n&&mo(e,t,n)&&(t=i),r(e,oo(t,3))},Fn.find=ga,Fn.findIndex=$o,Fn.findKey=function(e,t){return It(e,oo(t,3),yr)},Fn.findLast=va,Fn.findLastIndex=Uo,Fn.findLastKey=function(e,t){return It(e,oo(t,3),br)},Fn.floor=wu,Fn.forEach=ma,Fn.forEachRight=ya,Fn.forIn=function(e,t){return null==e?e:vr(e,oo(t,3),Ns)},Fn.forInRight=function(e,t){return null==e?e:mr(e,oo(t,3),Ns)},Fn.forOwn=function(e,t){return e&&yr(e,oo(t,3))},Fn.forOwnRight=function(e,t){return e&&br(e,oo(t,3))},Fn.get=Es,Fn.gt=Va,Fn.gte=Ba,Fn.has=function(e,t){return null!=e&&ho(e,t,Er)},Fn.hasIn=Cs,Fn.head=qo,Fn.identity=nu,Fn.includes=function(e,t,n,r){e=qa(e)?e:zs(e),n=n&&!r?ds(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),as(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&zt(e,t,n)>-1},Fn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ds(n);return i<0&&(i=vn(r+i,0)),zt(e,t,i)},Fn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=mn(t,n)&&e<vn(t,n)}(e=gs(e),t,n)},Fn.invoke=Ls,Fn.isArguments=$a,Fn.isArray=Ua,Fn.isArrayBuffer=Ha,Fn.isArrayLike=qa,Fn.isArrayLikeObject=Wa,Fn.isBoolean=function(e){return!0===e||!1===e||es(e)&&Sr(e)==m},Fn.isBuffer=Ga,Fn.isDate=Ya,Fn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},Fn.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ua(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||us(e)||$a(e)))return!e.length;var t=fo(e);if(t==k||t==A)return!e.size;if(xo(e))return!Rr(e).length;for(var n in e)if(Me.call(e,n))return!1;return!0},Fn.isEqual=function(e,t){return Tr(e,t)},Fn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Tr(e,t,i,n):!!r},Fn.isError=Xa,Fn.isFinite=function(e){return"number"==typeof e&&jt(e)},Fn.isFunction=Ka,Fn.isInteger=Ja,Fn.isLength=Qa,Fn.isMap=ts,Fn.isMatch=function(e,t){return e===t||Nr(e,t,so(t))},Fn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Nr(e,t,so(t),n)},Fn.isNaN=function(e){return ns(e)&&e!=+e},Fn.isNative=function(e){if(wo(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(e)},Fn.isNil=function(e){return null==e},Fn.isNull=function(e){return null===e},Fn.isNumber=ns,Fn.isObject=Za,Fn.isObjectLike=es,Fn.isPlainObject=rs,Fn.isRegExp=is,Fn.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=f},Fn.isSet=os,Fn.isString=as,Fn.isSymbol=ss,Fn.isTypedArray=us,Fn.isUndefined=function(e){return e===i},Fn.isWeakMap=function(e){return es(e)&&fo(e)==T},Fn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Sr(e)},Fn.join=function(e,t){return null==e?"":Ht.call(e,t)},Fn.kebabCase=Us,Fn.last=Xo,Fn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ds(n))<0?vn(r+o,0):mn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ft(e,Bt,o,!0)},Fn.lowerCase=Hs,Fn.lowerFirst=qs,Fn.lt=ls,Fn.lte=cs,Fn.max=function(e){return e&&e.length?dr(e,nu,_r):i},Fn.maxBy=function(e,t){return e&&e.length?dr(e,oo(t,2),_r):i},Fn.mean=function(e){return $t(e,nu)},Fn.meanBy=function(e,t){return $t(e,oo(t,2))},Fn.min=function(e){return e&&e.length?dr(e,nu,Dr):i},Fn.minBy=function(e,t){return e&&e.length?dr(e,oo(t,2),Dr):i},Fn.stubArray=pu,Fn.stubFalse=gu,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=xu,Fn.nth=function(e,t){return e&&e.length?Vr(e,ds(t)):i},Fn.noConflict=function(){return ft._===this&&(ft._=Fe),this},Fn.noop=su,Fn.now=Ea,Fn.pad=function(e,t,n){e=ms(e);var r=(t=ds(t))?cn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Bi(dt(i),n)+e+Bi(ht(i),n)},Fn.padEnd=function(e,t,n){e=ms(e);var r=(t=ds(t))?cn(e):0;return t&&r<t?e+Bi(t-r,n):e},Fn.padStart=function(e,t,n){e=ms(e);var r=(t=ds(t))?cn(e):0;return t&&r<t?Bi(t-r,n)+e:e},Fn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(ms(e).replace(re,""),t||0)},Fn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=wn();return mn(e+o*(t-e+st("1e-"+((o+"").length-1))),t)}return qr(e,t)},Fn.reduce=function(e,t,n){var r=Ua(e)?Mt:qt,i=arguments.length<3;return r(e,oo(t,4),n,i,cr)},Fn.reduceRight=function(e,t,n){var r=Ua(e)?Rt:qt,i=arguments.length<3;return r(e,oo(t,4),n,i,fr)},Fn.repeat=function(e,t,n){return t=(n?mo(e,t,n):t===i)?1:ds(t),Wr(ms(e),t)},Fn.replace=function(){var e=arguments,t=ms(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.result=function(e,t,n){var r=-1,o=(t=vi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[jo(t[r])];a===i&&(r=o,a=n),e=Ka(a)?a.call(e):a}return e},Fn.round=ku,Fn.runInContext=e,Fn.sample=function(e){return(Ua(e)?Xn:Yr)(e)},Fn.size=function(e){if(null==e)return 0;if(qa(e))return as(e)?cn(e):e.length;var t=fo(e);return t==k||t==A?e.size:Rr(e).length},Fn.snakeCase=Ws,Fn.some=function(e,t,n){var r=Ua(e)?Dt:ti;return n&&mo(e,t,n)&&(t=i),r(e,oo(t,3))},Fn.sortedIndex=function(e,t){return ni(e,t)},Fn.sortedIndexBy=function(e,t,n){return ri(e,t,oo(n,2))},Fn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ni(e,t);if(r<n&&za(e[r],t))return r}return-1},Fn.sortedLastIndex=function(e,t){return ni(e,t,!0)},Fn.sortedLastIndexBy=function(e,t,n){return ri(e,t,oo(n,2),!0)},Fn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ni(e,t,!0)-1;if(za(e[n],t))return n}return-1},Fn.startCase=Gs,Fn.startsWith=function(e,t,n){return e=ms(e),n=null==n?0:or(ds(n),0,e.length),t=ai(t),e.slice(n,n+t.length)==t},Fn.subtract=Su,Fn.sum=function(e){return e&&e.length?Wt(e,nu):0},Fn.sumBy=function(e,t){return e&&e.length?Wt(e,oo(t,2)):0},Fn.template=function(e,t,n){var r=Fn.templateSettings;n&&mo(e,t,n)&&(t=i),e=ms(e),t=ws({},t,r,Xi);var o,a,s=ws({},t.imports,r.imports,Xi),u=Ts(s),l=Kt(s,u),c=0,f=t.interpolate||be,h="__p += '",d=Ee((t.escape||be).source+"|"+f.source+"|"+(f===J?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(Me.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(d,(function(t,n,r,i,s,u){return r||(r=i),h+=e.slice(c,u).replace(we,nn),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),h+="';\n";var g=Me.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new xe("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace($,""):h).replace(U,"$1").replace(H,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=Js((function(){return ke(u,p+"return "+h).apply(i,l)}));if(v.source=h,Xa(v))throw v;return v},Fn.times=function(e,t){if((e=ds(e))<1||e>f)return[];var n=d,r=mn(e,d);t=oo(t),e-=d;for(var i=Gt(r,t);++n<e;)t(n);return i},Fn.toFinite=hs,Fn.toInteger=ds,Fn.toLength=ps,Fn.toLower=function(e){return ms(e).toLowerCase()},Fn.toNumber=gs,Fn.toSafeInteger=function(e){return e?or(ds(e),-9007199254740991,f):0===e?e:0},Fn.toString=ms,Fn.toUpper=function(e){return ms(e).toUpperCase()},Fn.trim=function(e,t,n){if((e=ms(e))&&(n||t===i))return Yt(e);if(!e||!(t=ai(t)))return e;var r=fn(e),o=fn(t);return yi(r,Qt(r,o),Zt(r,o)+1).join("")},Fn.trimEnd=function(e,t,n){if((e=ms(e))&&(n||t===i))return e.slice(0,hn(e)+1);if(!e||!(t=ai(t)))return e;var r=fn(e);return yi(r,0,Zt(r,fn(t))+1).join("")},Fn.trimStart=function(e,t,n){if((e=ms(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=ai(t)))return e;var r=fn(e);return yi(r,Qt(r,fn(t))).join("")},Fn.truncate=function(e,t){var n=30,r="...";if(Za(t)){var o="separator"in t?t.separator:o;n="length"in t?ds(t.length):n,r="omission"in t?ai(t.omission):r}var a=(e=ms(e)).length;if(rn(e)){var s=fn(e);a=s.length}if(n>=a)return e;var u=n-cn(r);if(u<1)return r;var l=s?yi(s,0,u).join(""):e.slice(0,u);if(o===i)return l+r;if(s&&(u+=l.length-u),is(o)){if(e.slice(u).search(o)){var c,f=l;for(o.global||(o=Ee(o.source,ms(he.exec(o))+"g")),o.lastIndex=0;c=o.exec(f);)var h=c.index;l=l.slice(0,h===i?u:h)}}else if(e.indexOf(ai(o),u)!=u){var d=l.lastIndexOf(o);d>-1&&(l=l.slice(0,d))}return l+r},Fn.unescape=function(e){return(e=ms(e))&&G.test(e)?e.replace(q,dn):e},Fn.uniqueId=function(e){var t=++Re;return ms(e)+t},Fn.upperCase=Ys,Fn.upperFirst=Xs,Fn.each=ma,Fn.eachRight=ya,Fn.first=qo,au(Fn,(vu={},yr(Fn,(function(e,t){Me.call(Fn.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),Fn.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),Et(["drop","take"],(function(e,t){$n.prototype[e]=function(n){n=n===i?1:vn(ds(n),0);var r=this.__filtered__&&!t?new $n(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},$n.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Et(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;$n.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Et(["head","last"],(function(e,t){var n="take"+(t?"Right":"");$n.prototype[e]=function(){return this[n](1).value()[0]}})),Et(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");$n.prototype[e]=function(){return this.__filtered__?new $n(this):this[n](1)}})),$n.prototype.compact=function(){return this.filter(nu)},$n.prototype.find=function(e){return this.filter(e).head()},$n.prototype.findLast=function(e){return this.reverse().find(e)},$n.prototype.invokeMap=Gr((function(e,t){return"function"==typeof e?new $n(this):this.map((function(n){return Pr(n,e,t)}))})),$n.prototype.reject=function(e){return this.filter(Ra(oo(e)))},$n.prototype.slice=function(e,t){e=ds(e);var n=this;return n.__filtered__&&(e>0||t<0)?new $n(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ds(t))<0?n.dropRight(-t):n.take(t-e)),n)},$n.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$n.prototype.toArray=function(){return this.take(d)},yr($n.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Fn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Fn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof $n,l=s[0],c=u||Ua(t),f=function(e){var t=o.apply(Fn,Ot([e],s));return r&&h?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,g=u&&!d;if(!a&&c){t=g?t:new $n(this);var v=e.apply(t,s);return v.__actions__.push({func:ha,args:[f],thisArg:i}),new Bn(v,h)}return p&&g?e.apply(this,s):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),Et(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Fn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ua(i)?i:[],e)}return this[n]((function(n){return t.apply(Ua(n)?n:[],e)}))}})),yr($n.prototype,(function(e,t){var n=Fn[t];if(n){var r=n.name+"";Me.call(Ln,r)||(Ln[r]=[]),Ln[r].push({name:t,func:n})}})),Ln[Ii(i,2).name]=[{name:"wrapper",func:i}],$n.prototype.clone=function(){var e=new $n(this.__wrapped__);return e.__actions__=Ci(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ci(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ci(this.__views__),e},$n.prototype.reverse=function(){if(this.__filtered__){var e=new $n(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$n.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=r?s:a-1,c=this.__iteratees__,f=c.length,h=0,d=mn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return fi(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var g=-1,v=e[l+=t];++g<f;){var m=c[g],y=m.iteratee,b=m.type,w=y(v);if(2==b)v=w;else if(!w){if(1==b)continue e;break e}}p[h++]=v}return p},Fn.prototype.at=da,Fn.prototype.chain=function(){return fa(this)},Fn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=Fo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Fn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $n){var t=e;return this.__actions__.length&&(t=new $n(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Zo],thisArg:i}),new Bn(t,this.__chain__)}return this.thru(Zo)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,Xe&&(Fn.prototype[Xe]=function(){return this}),Fn}();ft._=pn,(r=function(){return pn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2552:(e,t,n)=>{var r=n(1873),i=n(659),o=n(9350),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},2629:(e,t,n)=>{var r=n(9999);e.exports=function(e){return r(e,4)}},2651:(e,t,n)=>{var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},2749:(e,t,n)=>{var r=n(1042),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},2804:(e,t,n)=>{var r=n(6110)(n(9325),"Promise");e.exports=r},2824:(e,t,n)=>{var r=n(7805),i=n(3290),o=n(1961),a=n(3007),s=n(5529),u=n(2428),l=n(6449),c=n(3693),f=n(3656),h=n(1882),d=n(3805),p=n(1331),g=n(7167),v=n(4974),m=n(9884);e.exports=function(e,t,n,y,b,w,x){var k=v(e,n),S=v(t,n),_=x.get(S);if(_)r(e,n,_);else{var E=w?w(k,S,n+"",e,t,x):void 0,C=void 0===E;if(C){var A=l(S),P=!A&&f(S),L=!A&&!P&&g(S);E=S,A||P||L?l(k)?E=k:c(k)?E=a(k):P?(C=!1,E=i(S,!0)):L?(C=!1,E=o(S,!0)):E=[]:p(S)||u(S)?(E=k,u(k)?E=m(k):d(k)&&!h(k)||(E=s(S))):C=!1}C&&(x.set(S,E),b(E,S,y,w,x),x.delete(S)),r(e,n,E)}}},2865:(e,t,n)=>{var r=n(9570),i=n(1811)(r);e.exports=i},2903:(e,t,n)=>{var r=n(3805),i=n(5527),o=n(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},2948:(e,t,n)=>{var r=n(6857);e.exports=function(e){var t=function(e){var t={},n=0;return r.forEach(e.children(),(function i(o){var a=n;r.forEach(e.children(o),i),t[o]={low:a,lim:n++}})),t}(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),i=r.edgeObj,o=function(e,t,n,r){var i,o,a=[],s=[],u=Math.min(t[n].low,t[r].low),l=Math.max(t[n].lim,t[r].lim);i=n;do{i=e.parent(i),a.push(i)}while(i&&(t[i].low>u||l>t[i].lim));for(o=i,i=r;(i=e.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(e,t,i.v,i.w),a=o.path,s=o.lca,u=0,l=a[u],c=!0;n!==i.w;){if(r=e.node(n),c){for(;(l=a[u])!==s&&e.node(l).maxRank<r.rank;)u++;l===s&&(c=!1)}if(!c){for(;u<a.length-1&&e.node(l=a[u+1]).minRank<=r.rank;)u++;l=a[u]}e.setParent(n,l),n=e.successors(n)[0]}}))}},2949:(e,t,n)=>{var r=n(2651);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},3007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},3031:(e,t,n)=>{var r=n(3120),i=n(6155),o=n(9302),a=n(6800),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},3040:(e,t,n)=>{var r=n(1549),i=n(79),o=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},3120:(e,t,n)=>{var r=n(4528),i=n(5891);e.exports=function e(t,n,o,a,s){var u=-1,l=t.length;for(o||(o=i),s||(s=[]);++u<l;){var c=t[u];n>0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},3170:(e,t,n)=>{var r=n(6547),i=n(1769),o=n(361),a=n(3805),s=n(7797);e.exports=function(e,t,n,u){if(!a(e))return e;for(var l=-1,c=(t=i(t,e)).length,f=c-1,h=e;null!=h&&++l<c;){var d=s(t[l]),p=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return e;if(l!=f){var g=h[d];void 0===(p=u?u(g,d,h):void 0)&&(p=a(g)?g:o(t[l+1])?[]:{})}r(h,d,p),h=h[d]}return e}},3181:(e,t,n)=>{var r=n(5508)();e.exports=r},3201:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},3221:e=>{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}},3222:(e,t,n)=>{var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},3243:(e,t,n)=>{var r=n(6110),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},3290:(e,t,n)=>{e=n.nmd(e);var r=n(9325),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},3335:e=>{e.exports=function(e,t){return e>t}},3345:e=>{e.exports=function(){return[]}},3349:(e,t,n)=>{var r=n(2199),i=n(6375),o=n(7241);e.exports=function(e){return r(e,o,i)}},3360:(e,t,n)=>{var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3488:e=>{e.exports=function(e){return e}},3590:(e,t,n)=>{var r=n(117);e.exports=function(e,t,n){return function(e,t,n){var r={},i=e.nodes();return i.forEach((function(e){r[e]={},r[e][e]={distance:0},i.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var i=n.v===e?n.w:n.v,o=t(n);r[e][i]={distance:o,predecessor:e}}))})),i.forEach((function(e){var t=r[e];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[e],i=t[n],a=o[n],s=r.distance+i.distance;s<a.distance&&(a.distance=s,a.predecessor=i.predecessor)}))}))})),r}(e,t||i,n||function(t){return e.outEdges(t)})};var i=r.constant(1)},3599:(e,t,n)=>{var r=n(4394);e.exports=function(e,t,n){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,l=a}return l}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},3619:(e,t,n)=>{var r=n(117);e.exports=function(e){var t,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,t.push(i),r.each(e.successors(i),o),r.each(e.predecessors(i),o))}return r.each(e.nodes(),(function(e){t=[],o(e),t.length&&i.push(t)})),i}},3650:(e,t,n)=>{var r=n(4335)(Object.keys,Object);e.exports=r},3656:(e,t,n)=>{e=n.nmd(e);var r=n(9325),i=n(9935),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u},3661:(e,t,n)=>{var r=n(3040),i=n(7670),o=n(289),a=n(4509),s=n(2949);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},3663:(e,t,n)=>{var r=n(1799),i=n(776),o=n(7197);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},3693:(e,t,n)=>{var r=n(4894),i=n(346);e.exports=function(e){return i(e)&&r(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3714:(e,t,n)=>{var r=n(3730);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,u=n.length;++i<s;){var l=r(o[i],a[i]);if(l)return i>=u?l:l*("desc"==n[i]?-1:1)}return e.index-t.index}},3729:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},3730:(e,t,n)=>{var r=n(4394);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,u=null===t,l=t==t,c=r(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||i&&s&&l||!n&&l||!o)return 1;if(!i&&!a&&!c&&e<t||c&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!l)return-1}return 0}},3736:(e,t,n)=>{var r=n(1873),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},3776:(e,t,n)=>{"use strict";var r=n(6857),i=n(3988),o=n(9741).positionX;e.exports=function(e){(function(e){var t=i.buildLayerMatrix(e),n=e.graph().ranksep,o=0;r.forEach(t,(function(t){var i=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=o+i/2})),o+=i+n}))})(e=i.asNonCompoundGraph(e)),r.forEach(o(e),(function(t,n){e.node(n).x=t}))}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3838:(e,t,n)=>{var r=n(1791),i=n(7241);e.exports=function(e,t){return e&&r(t,i(t),e)}},3860:(e,t,n)=>{var r=n(6857);e.exports=function(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var i=r.reduce(n,(function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}}))}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},3916:(e,t,n)=>{var r=n(3360),i=n(641),o=n(5389);e.exports=function(e,t){var n={};return t=o(t,3),i(e,(function(e,i,o){r(n,i,t(e,i,o))})),n}},3937:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},3950:e=>{e.exports=function(){}},3988:(e,t,n)=>{"use strict";var r=n(6857),i=n(8191).Graph;function o(e,t,n,i){var o;do{o=r.uniqueId(i)}while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function a(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:o,simplify:function(e){var t=(new i).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),t},asNonCompoundGraph:function(e){var t=new i({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,i=e.x,o=e.y,a=t.x-i,s=t.y-o,u=e.width/2,l=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*l?(s<0&&(l=-l),n=l*a/s,r=l):(a<0&&(u=-u),n=u,r=u*s/a),{x:i+n,y:o+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var i=e.node(n),o=i.rank;r.isUndefined(o)||(t[o][i.order]=n)})),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var i=e.node(n);r.has(i,"rank")&&(i.rank-=t)}))},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%o!==0?--i:i&&r.forEach(t,(function(t){e.node(t).rank+=i}))}))},addBorderNode:function(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),o(e,"border",i,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},4066:(e,t,n)=>{var r=n(3488);e.exports=function(e){return"function"==typeof e?e:r}},4128:(e,t,n)=>{var r=n(1800),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},4173:function(e,t,n){e.exports=function(e){"use strict";var t=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(e),n="січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),r="січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),i=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function o(e,t,n){var r,i;return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(r=+e,i={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}var a=function(e,t){return i.test(t)?n[e.month()]:r[e.month()]};a.s=r,a.f=n;var s={name:"uk",weekdays:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),weekdaysShort:"ндл_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:a,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekStart:1,relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:o,mm:o,h:o,hh:o,d:"день",dd:o,M:"місяць",MM:o,y:"рік",yy:o},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"}};return t.default.locale(s,null,!0),s}(n(4353))},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},4248:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},4353:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",i="minute",o="hour",a="day",s="week",u="month",l="quarter",c="year",f="date",h="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,u),o=n-i<0,a=t.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:c,w:s,d:a,D:f,h:o,m:i,s:r,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",b={};b[y]=g;var w="$isDayjsObject",x=function(e){return e instanceof E||!(!e||!e[w])},k=function e(t,n,r){var i;if(!t)return y;if("string"==typeof t){var o=t.toLowerCase();b[o]&&(i=o),n&&(b[o]=n,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},S=function(e,t){if(x(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},_=m;_.l=k,_.i=x,_.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=k(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(_.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(d);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return _},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return S(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<S(e)},v.$g=function(e,t,n){return _.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,l=!!_.u(t)||t,h=_.p(e),d=function(e,t){var r=_.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return l?r:r.endOf(a)},p=function(e,t){return _.w(n.toDate()[e].apply(n.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,v=this.$M,m=this.$D,y="set"+(this.$u?"UTC":"");switch(h){case c:return l?d(1,0):d(31,11);case u:return l?d(1,v):d(0,v+1);case s:var b=this.$locale().weekStart||0,w=(g<b?g+7:g)-b;return d(l?m-w:m+(6-w),v);case a:case f:return p(y+"Hours",0);case o:return p(y+"Minutes",1);case i:return p(y+"Seconds",2);case r:return p(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var s,l=_.p(e),h="set"+(this.$u?"UTC":""),d=(s={},s[a]=h+"Date",s[f]=h+"Date",s[u]=h+"Month",s[c]=h+"FullYear",s[o]=h+"Hours",s[i]=h+"Minutes",s[r]=h+"Seconds",s[n]=h+"Milliseconds",s)[l],p=l===a?this.$D+(t-this.$W):t;if(l===u||l===c){var g=this.clone().set(f,1);g.$d[d](p),g.init(),this.$d=g.set(f,Math.min(this.$D,g.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[_.p(e)]()},v.add=function(n,l){var f,h=this;n=Number(n);var d=_.p(l),p=function(e){var t=S(h);return _.w(t.date(t.date()+Math.round(e*n)),h)};if(d===u)return this.set(u,this.$M+n);if(d===c)return this.set(c,this.$y+n);if(d===a)return p(1);if(d===s)return p(7);var g=(f={},f[i]=e,f[o]=t,f[r]=1e3,f)[d]||1,v=this.$d.getTime()+n*g;return _.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=_.z(this),o=this.$H,a=this.$m,s=this.$M,u=n.weekdays,l=n.months,c=n.meridiem,f=function(e,n,i,o){return e&&(e[n]||e(t,r))||i[n].slice(0,o)},d=function(e){return _.s(o%12||12,e,"0")},g=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return _.s(t.$y,4,"0");case"M":return s+1;case"MM":return _.s(s+1,2,"0");case"MMM":return f(n.monthsShort,s,l,3);case"MMMM":return f(l,s);case"D":return t.$D;case"DD":return _.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,u,2);case"ddd":return f(n.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(o);case"HH":return _.s(o,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return g(o,a,!0);case"A":return g(o,a,!1);case"m":return String(a);case"mm":return _.s(a,2,"0");case"s":return String(t.$s);case"ss":return _.s(t.$s,2,"0");case"SSS":return _.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,f,h){var d,p=this,g=_.p(f),v=S(n),m=(v.utcOffset()-this.utcOffset())*e,y=this-v,b=function(){return _.m(p,v)};switch(g){case c:d=b()/12;break;case u:d=b();break;case l:d=b()/3;break;case s:d=(y-m)/6048e5;break;case a:d=(y-m)/864e5;break;case o:d=y/t;break;case i:d=y/e;break;case r:d=y/1e3;break;default:d=y}return h?d:_.a(d)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return b[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=k(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return _.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),C=E.prototype;return S.prototype=C,[["$ms",n],["$s",r],["$m",i],["$H",o],["$W",a],["$M",u],["$y",c],["$D",f]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,E,S),e.$i=!0),S},S.locale=k,S.isDayjs=x,S.unix=function(e){return S(1e3*e)},S.en=b[y],S.Ls=b,S.p={},S}()},4383:(e,t,n)=>{var r=n(6001),i=n(8816)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},4384:(e,t,n)=>{var r=n(6857);e.exports=function(e,t,n){var i,o={};r.forEach(n,(function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void t.setEdge(a,s);s=r}}))}},4394:(e,t,n)=>{var r=n(2552),i=n(346);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},4423:(e,t,n)=>{var r=n(117),i=n(6454),o=n(1737);e.exports=function(e,t){var n,a=new i,s={},u=new o;function l(e){var r=e.v===n?e.w:e.v,i=u.priority(r);if(void 0!==i){var o=t(e);o<i&&(s[r]=n,u.decrease(r,o))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),u.decrease(e.nodes()[0],0);for(var c=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(n).forEach(l)}return a}},4458:e=>{e.exports="2.1.8"},4460:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},4477:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,u=e[s],l=s+1,c=e[l];if(0>o(u,n))l<i&&0>o(c,u)?(e[r]=c,e[l]=n,r=l):(e[r]=u,e[s]=n,r=s);else{if(!(l<i&&0>o(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var l=[],c=[],f=1,h=null,d=3,p=!1,g=!1,v=!1,m=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function x(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(l,t)}t=r(c)}}function k(e){if(v=!1,x(e),!g)if(null!==r(l))g=!0,_||(_=!0,S());else{var t=r(c);null!==t&&O(k,t.startTime-e)}}var S,_=!1,E=-1,C=5,A=-1;function P(){return!(!m&&t.unstable_now()-A<C)}function L(){if(m=!1,_){var e=t.unstable_now();A=e;var n=!0;try{e:{g=!1,v&&(v=!1,b(E),E=-1),p=!0;var o=d;try{t:{for(x(e),h=r(l);null!==h&&!(h.expirationTime>e&&P());){var a=h.callback;if("function"==typeof a){h.callback=null,d=h.priorityLevel;var s=a(h.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof s){h.callback=s,x(e),n=!0;break t}h===r(l)&&i(l),x(e)}else i(l);h=r(l)}if(null!==h)n=!0;else{var u=r(c);null!==u&&O(k,u.startTime-e),n=!1}}break e}finally{h=null,d=o,p=!1}n=void 0}}finally{n?S():_=!1}}}if("function"==typeof w)S=function(){w(L)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,N=T.port2;T.port1.onmessage=L,S=function(){N.postMessage(null)}}else S=function(){y(L,0)};function O(e,n){E=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var n=d;d=t;try{return e()}finally{d=n}},t.unstable_requestPaint=function(){m=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=d;d=e;try{return t()}finally{d=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(c,e),null===r(l)&&e===r(c)&&(v?(b(E),E=-1):v=!0,O(k,o-a))):(e.sortIndex=s,n(l,e),g||p||(g=!0,_||(_=!0,S()))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=d;return function(){var n=d;d=t;try{return e.apply(this,arguments)}finally{d=n}}}},4506:(e,t,n)=>{var r=n(3599),i=n(3335),o=n(3488);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},4509:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},4517:(e,t,n)=>{var r=n(6545),i=n(3950),o=n(4247),a=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=a},4520:(e,t,n)=>{var r=n(6857),i=n(3860),o=n(4959),a=n(5169);e.exports=function e(t,n,s,u){var l=t.children(n),c=t.node(n),f=c?c.borderLeft:void 0,h=c?c.borderRight:void 0,d={};f&&(l=r.filter(l,(function(e){return e!==f&&e!==h})));var p=i(t,l);r.forEach(p,(function(n){if(t.children(n.v).length){var i=e(t,n.v,s,u);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var g=o(p,s);!function(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(g,d);var v=a(g,u);if(f&&(v.vs=r.flatten([f,v.vs,h],!0),t.predecessors(f).length)){var m=t.node(t.predecessors(f)[0]),y=t.node(t.predecessors(h)[0]);r.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+m.order+y.order)/(v.weight+2),v.weight+=2}return v}},4523:(e,t,n)=>{"use strict";n.r(t),n.d(t,{VERSION:()=>i,after:()=>Rt,all:()=>en,allKeys:()=>ve,any:()=>tn,assign:()=>Re,before:()=>Dt,bind:()=>kt,bindAll:()=>Et,chain:()=>yt,chunk:()=>Fn,clone:()=>Fe,collect:()=>Yt,compact:()=>An,compose:()=>Mt,constant:()=>Q,contains:()=>nn,countBy:()=>mn,create:()=>Ie,debounce:()=>Tt,default:()=>Un,defaults:()=>De,defer:()=>Pt,delay:()=>At,detect:()=>qt,difference:()=>Ln,drop:()=>En,each:()=>Gt,escape:()=>at,every:()=>en,extend:()=>Me,extendOwn:()=>Re,filter:()=>Qt,find:()=>qt,findIndex:()=>zt,findKey:()=>It,findLastIndex:()=>Vt,findWhere:()=>Wt,first:()=>_n,flatten:()=>Pn,foldl:()=>Kt,foldr:()=>Jt,forEach:()=>Gt,functions:()=>Ne,get:()=>Ue,groupBy:()=>gn,has:()=>He,head:()=>_n,identity:()=>qe,include:()=>nn,includes:()=>nn,indexBy:()=>vn,indexOf:()=>Ut,initial:()=>Sn,inject:()=>Kt,intersection:()=>Mn,invert:()=>Te,invoke:()=>rn,isArguments:()=>X,isArray:()=>W,isArrayBuffer:()=>I,isBoolean:()=>P,isDataView:()=>q,isDate:()=>M,isElement:()=>L,isEmpty:()=>ue,isEqual:()=>ge,isError:()=>D,isFinite:()=>K,isFunction:()=>V,isMap:()=>_e,isMatch:()=>le,isNaN:()=>J,isNull:()=>C,isNumber:()=>O,isObject:()=>E,isRegExp:()=>R,isSet:()=>Ce,isString:()=>N,isSymbol:()=>j,isTypedArray:()=>ie,isUndefined:()=>A,isWeakMap:()=>Ee,isWeakSet:()=>Ae,iteratee:()=>Ke,keys:()=>se,last:()=>Cn,lastIndexOf:()=>Ht,map:()=>Yt,mapObject:()=>Qe,matcher:()=>We,matches:()=>We,max:()=>sn,memoize:()=>Ct,methods:()=>Ne,min:()=>un,mixin:()=>Vn,negate:()=>Ot,noop:()=>Ze,now:()=>rt,object:()=>jn,omit:()=>kn,once:()=>jt,pairs:()=>Le,partial:()=>xt,partition:()=>yn,pick:()=>xn,pluck:()=>on,property:()=>Ge,propertyOf:()=>et,random:()=>nt,range:()=>In,reduce:()=>Kt,reduceRight:()=>Jt,reject:()=>Zt,rest:()=>En,restArguments:()=>_,result:()=>gt,sample:()=>fn,select:()=>Qt,shuffle:()=>hn,size:()=>bn,some:()=>tn,sortBy:()=>dn,sortedIndex:()=>Bt,tail:()=>En,take:()=>_n,tap:()=>ze,template:()=>pt,templateSettings:()=>ut,throttle:()=>Lt,times:()=>tt,toArray:()=>cn,toPath:()=>Ve,transpose:()=>Rn,unescape:()=>st,union:()=>On,uniq:()=>Nn,unique:()=>Nn,uniqueId:()=>mt,unzip:()=>Rn,values:()=>Pe,where:()=>an,without:()=>Tn,wrap:()=>Nt,zip:()=>Dn});var r={};n.r(r),n.d(r,{VERSION:()=>i,after:()=>Rt,all:()=>en,allKeys:()=>ve,any:()=>tn,assign:()=>Re,before:()=>Dt,bind:()=>kt,bindAll:()=>Et,chain:()=>yt,chunk:()=>Fn,clone:()=>Fe,collect:()=>Yt,compact:()=>An,compose:()=>Mt,constant:()=>Q,contains:()=>nn,countBy:()=>mn,create:()=>Ie,debounce:()=>Tt,default:()=>Bn,defaults:()=>De,defer:()=>Pt,delay:()=>At,detect:()=>qt,difference:()=>Ln,drop:()=>En,each:()=>Gt,escape:()=>at,every:()=>en,extend:()=>Me,extendOwn:()=>Re,filter:()=>Qt,find:()=>qt,findIndex:()=>zt,findKey:()=>It,findLastIndex:()=>Vt,findWhere:()=>Wt,first:()=>_n,flatten:()=>Pn,foldl:()=>Kt,foldr:()=>Jt,forEach:()=>Gt,functions:()=>Ne,get:()=>Ue,groupBy:()=>gn,has:()=>He,head:()=>_n,identity:()=>qe,include:()=>nn,includes:()=>nn,indexBy:()=>vn,indexOf:()=>Ut,initial:()=>Sn,inject:()=>Kt,intersection:()=>Mn,invert:()=>Te,invoke:()=>rn,isArguments:()=>X,isArray:()=>W,isArrayBuffer:()=>I,isBoolean:()=>P,isDataView:()=>q,isDate:()=>M,isElement:()=>L,isEmpty:()=>ue,isEqual:()=>ge,isError:()=>D,isFinite:()=>K,isFunction:()=>V,isMap:()=>_e,isMatch:()=>le,isNaN:()=>J,isNull:()=>C,isNumber:()=>O,isObject:()=>E,isRegExp:()=>R,isSet:()=>Ce,isString:()=>N,isSymbol:()=>j,isTypedArray:()=>ie,isUndefined:()=>A,isWeakMap:()=>Ee,isWeakSet:()=>Ae,iteratee:()=>Ke,keys:()=>se,last:()=>Cn,lastIndexOf:()=>Ht,map:()=>Yt,mapObject:()=>Qe,matcher:()=>We,matches:()=>We,max:()=>sn,memoize:()=>Ct,methods:()=>Ne,min:()=>un,mixin:()=>Vn,negate:()=>Ot,noop:()=>Ze,now:()=>rt,object:()=>jn,omit:()=>kn,once:()=>jt,pairs:()=>Le,partial:()=>xt,partition:()=>yn,pick:()=>xn,pluck:()=>on,property:()=>Ge,propertyOf:()=>et,random:()=>nt,range:()=>In,reduce:()=>Kt,reduceRight:()=>Jt,reject:()=>Zt,rest:()=>En,restArguments:()=>_,result:()=>gt,sample:()=>fn,select:()=>Qt,shuffle:()=>hn,size:()=>bn,some:()=>tn,sortBy:()=>dn,sortedIndex:()=>Bt,tail:()=>En,take:()=>_n,tap:()=>ze,template:()=>pt,templateSettings:()=>ut,throttle:()=>Lt,times:()=>tt,toArray:()=>cn,toPath:()=>Ve,transpose:()=>Rn,unescape:()=>st,union:()=>On,uniq:()=>Nn,unique:()=>Nn,uniqueId:()=>mt,unzip:()=>Rn,values:()=>Pe,where:()=>an,without:()=>Tn,wrap:()=>Nt,zip:()=>Dn});var i="1.13.7",o="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},a=Array.prototype,s=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,l=a.push,c=a.slice,f=s.toString,h=s.hasOwnProperty,d="undefined"!=typeof ArrayBuffer,p="undefined"!=typeof DataView,g=Array.isArray,v=Object.keys,m=Object.create,y=d&&ArrayBuffer.isView,b=isNaN,w=isFinite,x=!{toString:null}.propertyIsEnumerable("toString"),k=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],S=Math.pow(2,53)-1;function _(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}}function E(e){var t=typeof e;return"function"===t||"object"===t&&!!e}function C(e){return null===e}function A(e){return void 0===e}function P(e){return!0===e||!1===e||"[object Boolean]"===f.call(e)}function L(e){return!(!e||1!==e.nodeType)}function T(e){var t="[object "+e+"]";return function(e){return f.call(e)===t}}const N=T("String"),O=T("Number"),M=T("Date"),R=T("RegExp"),D=T("Error"),j=T("Symbol"),I=T("ArrayBuffer");var F=T("Function"),z=o.document&&o.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof z&&(F=function(e){return"function"==typeof e||!1});const V=F,B=T("Object");var $=p&&(!/\[native code\]/.test(String(DataView))||B(new DataView(new ArrayBuffer(8)))),U="undefined"!=typeof Map&&B(new Map),H=T("DataView");const q=$?function(e){return null!=e&&V(e.getInt8)&&I(e.buffer)}:H,W=g||T("Array");function G(e,t){return null!=e&&h.call(e,t)}var Y=T("Arguments");!function(){Y(arguments)||(Y=function(e){return G(e,"callee")})}();const X=Y;function K(e){return!j(e)&&w(e)&&!isNaN(parseFloat(e))}function J(e){return O(e)&&b(e)}function Q(e){return function(){return e}}function Z(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=S}}function ee(e){return function(t){return null==t?void 0:t[e]}}const te=ee("byteLength"),ne=Z(te);var re=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const ie=d?function(e){return y?y(e)&&!q(e):ne(e)&&re.test(f.call(e))}:Q(!1),oe=ee("length");function ae(e,t){t=function(e){for(var t={},n=e.length,r=0;r<n;++r)t[e[r]]=!0;return{contains:function(e){return!0===t[e]},push:function(n){return t[n]=!0,e.push(n)}}}(t);var n=k.length,r=e.constructor,i=V(r)&&r.prototype||s,o="constructor";for(G(e,o)&&!t.contains(o)&&t.push(o);n--;)(o=k[n])in e&&e[o]!==i[o]&&!t.contains(o)&&t.push(o)}function se(e){if(!E(e))return[];if(v)return v(e);var t=[];for(var n in e)G(e,n)&&t.push(n);return x&&ae(e,t),t}function ue(e){if(null==e)return!0;var t=oe(e);return"number"==typeof t&&(W(e)||N(e)||X(e))?0===t:0===oe(se(e))}function le(e,t){var n=se(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0}function ce(e){return e instanceof ce?e:this instanceof ce?void(this._wrapped=e):new ce(e)}function fe(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,te(e))}ce.VERSION=i,ce.prototype.value=function(){return this._wrapped},ce.prototype.valueOf=ce.prototype.toJSON=ce.prototype.value,ce.prototype.toString=function(){return String(this._wrapped)};var he="[object DataView]";function de(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&pe(e,t,n,r)}function pe(e,t,n,r){e instanceof ce&&(e=e._wrapped),t instanceof ce&&(t=t._wrapped);var i=f.call(e);if(i!==f.call(t))return!1;if($&&"[object Object]"==i&&q(e)){if(!q(t))return!1;i=he}switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return u.valueOf.call(e)===u.valueOf.call(t);case"[object ArrayBuffer]":case he:return pe(fe(e),fe(t),n,r)}var o="[object Array]"===i;if(!o&&ie(e)){if(te(e)!==te(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;o=!0}if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(V(a)&&a instanceof a&&V(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var l=(n=n||[]).length;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),o){if((l=e.length)!==t.length)return!1;for(;l--;)if(!de(e[l],t[l],n,r))return!1}else{var c,h=se(e);if(l=h.length,se(t).length!==l)return!1;for(;l--;)if(!G(t,c=h[l])||!de(e[c],t[c],n,r))return!1}return n.pop(),r.pop(),!0}function ge(e,t){return de(e,t)}function ve(e){if(!E(e))return[];var t=[];for(var n in e)t.push(n);return x&&ae(e,t),t}function me(e){var t=oe(e);return function(n){if(null==n)return!1;var r=ve(n);if(oe(r))return!1;for(var i=0;i<t;i++)if(!V(n[e[i]]))return!1;return e!==ke||!V(n[ye])}}var ye="forEach",be=["clear","delete"],we=["get","has","set"],xe=be.concat(ye,we),ke=be.concat(we),Se=["add"].concat(be,ye,"has");const _e=U?me(xe):T("Map"),Ee=U?me(ke):T("WeakMap"),Ce=U?me(Se):T("Set"),Ae=T("WeakSet");function Pe(e){for(var t=se(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r}function Le(e){for(var t=se(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r}function Te(e){for(var t={},n=se(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t}function Ne(e){var t=[];for(var n in e)V(e[n])&&t.push(n);return t.sort()}function Oe(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=e(o),s=a.length,u=0;u<s;u++){var l=a[u];t&&void 0!==n[l]||(n[l]=o[l])}return n}}const Me=Oe(ve),Re=Oe(se),De=Oe(ve,!0);function je(e){if(!E(e))return{};if(m)return m(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}function Ie(e,t){var n=je(e);return t&&Re(n,t),n}function Fe(e){return E(e)?W(e)?e.slice():Me({},e):e}function ze(e,t){return t(e),e}function Ve(e){return W(e)?e:[e]}function Be(e){return ce.toPath(e)}function $e(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0}function Ue(e,t,n){var r=$e(e,Be(t));return A(r)?n:r}function He(e,t){for(var n=(t=Be(t)).length,r=0;r<n;r++){var i=t[r];if(!G(e,i))return!1;e=e[i]}return!!n}function qe(e){return e}function We(e){return e=Re({},e),function(t){return le(t,e)}}function Ge(e){return e=Be(e),function(t){return $e(t,e)}}function Ye(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}function Xe(e,t,n){return null==e?qe:V(e)?Ye(e,t,n):E(e)&&!W(e)?We(e):Ge(e)}function Ke(e,t){return Xe(e,t,1/0)}function Je(e,t,n){return ce.iteratee!==Ke?ce.iteratee(e,t):Xe(e,t,n)}function Qe(e,t,n){t=Je(t,n);for(var r=se(e),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=t(e[s],s,e)}return o}function Ze(){}function et(e){return null==e?Ze:function(t){return Ue(e,t)}}function tt(e,t,n){var r=Array(Math.max(0,e));t=Ye(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r}function nt(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}ce.toPath=Ve,ce.iteratee=Ke;const rt=Date.now||function(){return(new Date).getTime()};function it(e){var t=function(t){return e[t]},n="(?:"+se(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}}const ot={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},at=it(ot),st=it(Te(ot)),ut=ce.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var lt=/(.)^/,ct={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ft=/\\|'|\r|\n|\u2028|\u2029/g;function ht(e){return"\\"+ct[e]}var dt=/^\s*(\w|\$)+\s*$/;function pt(e,t,n){!t&&n&&(t=n),t=De({},t,ce.templateSettings);var r=RegExp([(t.escape||lt).source,(t.interpolate||lt).source,(t.evaluate||lt).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,(function(t,n,r,a,s){return o+=e.slice(i,s).replace(ft,ht),i=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t})),o+="';\n";var a,s=t.variable;if(s){if(!dt.test(s))throw new Error("variable is not a bare identifier: "+s)}else o="with(obj||{}){\n"+o+"}\n",s="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{a=new Function(s,"_",o)}catch(e){throw e.source=o,e}var u=function(e){return a.call(this,e,ce)};return u.source="function("+s+"){\n"+o+"}",u}function gt(e,t,n){var r=(t=Be(t)).length;if(!r)return V(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=V(o)?o.call(e):o}return e}var vt=0;function mt(e){var t=++vt+"";return e?e+t:t}function yt(e){var t=ce(e);return t._chain=!0,t}function bt(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=je(e.prototype),a=e.apply(o,i);return E(a)?a:o}var wt=_((function(e,t){var n=wt.placeholder,r=function(){for(var i=0,o=t.length,a=Array(o),s=0;s<o;s++)a[s]=t[s]===n?arguments[i++]:t[s];for(;i<arguments.length;)a.push(arguments[i++]);return bt(e,r,this,this,a)};return r}));wt.placeholder=ce;const xt=wt,kt=_((function(e,t,n){if(!V(e))throw new TypeError("Bind must be called on a function");var r=_((function(i){return bt(e,r,t,this,n.concat(i))}));return r})),St=Z(oe);function _t(e,t,n,r){if(r=r||[],t||0===t){if(t<=0)return r.concat(e)}else t=1/0;for(var i=r.length,o=0,a=oe(e);o<a;o++){var s=e[o];if(St(s)&&(W(s)||X(s)))if(t>1)_t(s,t-1,n,r),i=r.length;else for(var u=0,l=s.length;u<l;)r[i++]=s[u++];else n||(r[i++]=s)}return r}const Et=_((function(e,t){var n=(t=_t(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=kt(e[r],e)}return e}));function Ct(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return G(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n}const At=_((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})),Pt=xt(At,ce,1);function Lt(e,t,n){var r,i,o,a,s=0;n||(n={});var u=function(){s=!1===n.leading?0:rt(),r=null,a=e.apply(i,o),r||(i=o=null)},l=function(){var l=rt();s||!1!==n.leading||(s=l);var c=t-(l-s);return i=this,o=arguments,c<=0||c>t?(r&&(clearTimeout(r),r=null),s=l,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,c)),a};return l.cancel=function(){clearTimeout(r),s=0,r=i=o=null},l}function Tt(e,t,n){var r,i,o,a,s,u=function(){var l=rt()-i;t>l?r=setTimeout(u,t-l):(r=null,n||(a=e.apply(s,o)),r||(o=s=null))},l=_((function(l){return s=this,o=l,i=rt(),r||(r=setTimeout(u,t),n&&(a=e.apply(s,o))),a}));return l.cancel=function(){clearTimeout(r),r=o=s=null},l}function Nt(e,t){return xt(t,e)}function Ot(e){return function(){return!e.apply(this,arguments)}}function Mt(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}function Rt(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function Dt(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}const jt=xt(Dt,2);function It(e,t,n){t=Je(t,n);for(var r,i=se(e),o=0,a=i.length;o<a;o++)if(t(e[r=i[o]],r,e))return r}function Ft(e){return function(t,n,r){n=Je(n,r);for(var i=oe(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}}const zt=Ft(1),Vt=Ft(-1);function Bt(e,t,n,r){for(var i=(n=Je(n,r,1))(t),o=0,a=oe(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<i?o=s+1:a=s}return o}function $t(e,t,n){return function(r,i,o){var a=0,s=oe(r);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=t(c.call(r,a,s),J))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(r[o]===i)return o;return-1}}const Ut=$t(1,zt,Bt),Ht=$t(-1,Vt);function qt(e,t,n){var r=(St(e)?zt:It)(e,t,n);if(void 0!==r&&-1!==r)return e[r]}function Wt(e,t){return qt(e,We(t))}function Gt(e,t,n){var r,i;if(t=Ye(t,n),St(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=se(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e}function Yt(e,t,n){t=Je(t,n);for(var r=!St(e)&&se(e),i=(r||e).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o}function Xt(e){return function(t,n,r,i){var o=arguments.length>=3;return function(t,n,r,i){var o=!St(t)&&se(t),a=(o||t).length,s=e>0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s<a;s+=e){var u=o?o[s]:s;r=n(r,t[u],u,t)}return r}(t,Ye(n,i,4),r,o)}}const Kt=Xt(1),Jt=Xt(-1);function Qt(e,t,n){var r=[];return t=Je(t,n),Gt(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function Zt(e,t,n){return Qt(e,Ot(Je(t)),n)}function en(e,t,n){t=Je(t,n);for(var r=!St(e)&&se(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0}function tn(e,t,n){t=Je(t,n);for(var r=!St(e)&&se(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1}function nn(e,t,n,r){return St(e)||(e=Pe(e)),("number"!=typeof n||r)&&(n=0),Ut(e,t,n)>=0}const rn=_((function(e,t,n){var r,i;return V(t)?i=t:(t=Be(t),r=t.slice(0,-1),t=t[t.length-1]),Yt(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=$e(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))}));function on(e,t){return Yt(e,Ge(t))}function an(e,t){return Qt(e,We(t))}function sn(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=St(e)?e:Pe(e)).length;s<u;s++)null!=(r=e[s])&&r>o&&(o=r);else t=Je(t,n),Gt(e,(function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)}));return o}function un(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=St(e)?e:Pe(e)).length;s<u;s++)null!=(r=e[s])&&r<o&&(o=r);else t=Je(t,n),Gt(e,(function(e,n,r){((i=t(e,n,r))<a||i===1/0&&o===1/0)&&(o=e,a=i)}));return o}var ln=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function cn(e){return e?W(e)?c.call(e):N(e)?e.match(ln):St(e)?Yt(e,qe):Pe(e):[]}function fn(e,t,n){if(null==t||n)return St(e)||(e=Pe(e)),e[nt(e.length-1)];var r=cn(e),i=oe(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var s=nt(a,o),u=r[a];r[a]=r[s],r[s]=u}return r.slice(0,t)}function hn(e){return fn(e,1/0)}function dn(e,t,n){var r=0;return t=Je(t,n),on(Yt(e,(function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index})),"value")}function pn(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=Je(r,i),Gt(n,(function(t,i){var a=r(t,i,n);e(o,t,a)})),o}}const gn=pn((function(e,t,n){G(e,n)?e[n].push(t):e[n]=[t]})),vn=pn((function(e,t,n){e[n]=t})),mn=pn((function(e,t,n){G(e,n)?e[n]++:e[n]=1})),yn=pn((function(e,t,n){e[n?0:1].push(t)}),!0);function bn(e){return null==e?0:St(e)?e.length:se(e).length}function wn(e,t,n){return t in n}const xn=_((function(e,t){var n={},r=t[0];if(null==e)return n;V(r)?(t.length>1&&(r=Ye(r,t[1])),t=ve(e)):(r=wn,t=_t(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],s=e[a];r(s,a,e)&&(n[a]=s)}return n})),kn=_((function(e,t){var n,r=t[0];return V(r)?(r=Ot(r),t.length>1&&(n=t[1])):(t=Yt(_t(t,!1,!1),String),r=function(e,n){return!nn(t,n)}),xn(e,r,n)}));function Sn(e,t,n){return c.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function _n(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:Sn(e,e.length-t)}function En(e,t,n){return c.call(e,null==t||n?1:t)}function Cn(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:En(e,Math.max(0,e.length-t))}function An(e){return Qt(e,Boolean)}function Pn(e,t){return _t(e,t,!1)}const Ln=_((function(e,t){return t=_t(t,!0,!0),Qt(e,(function(e){return!nn(t,e)}))})),Tn=_((function(e,t){return Ln(e,t)}));function Nn(e,t,n,r){P(t)||(r=n,n=t,t=!1),null!=n&&(n=Je(n,r));for(var i=[],o=[],a=0,s=oe(e);a<s;a++){var u=e[a],l=n?n(u,a,e):u;t&&!n?(a&&o===l||i.push(u),o=l):n?nn(o,l)||(o.push(l),i.push(u)):nn(i,u)||i.push(u)}return i}const On=_((function(e){return Nn(_t(e,!0,!0))}));function Mn(e){for(var t=[],n=arguments.length,r=0,i=oe(e);r<i;r++){var o=e[r];if(!nn(t,o)){var a;for(a=1;a<n&&nn(arguments[a],o);a++);a===n&&t.push(o)}}return t}function Rn(e){for(var t=e&&sn(e,oe).length||0,n=Array(t),r=0;r<t;r++)n[r]=on(e,r);return n}const Dn=_(Rn);function jn(e,t){for(var n={},r=0,i=oe(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n}function In(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i}function Fn(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(c.call(e,r,r+=t));return n}function zn(e,t){return e._chain?ce(t).chain():t}function Vn(e){return Gt(Ne(e),(function(t){var n=ce[t]=e[t];ce.prototype[t]=function(){var e=[this._wrapped];return l.apply(e,arguments),zn(this,n.apply(ce,e))}})),ce}Gt(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=a[e];ce.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),zn(this,n)}})),Gt(["concat","join","slice"],(function(e){var t=a[e];ce.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),zn(this,e)}}));const Bn=ce;var $n=Vn(r);$n._=$n;const Un=$n},4528:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},4664:(e,t,n)=>{var r=n(9770),i=n(3345),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},4684:(e,t,n)=>{var r=n(9302),i=n(5288),o=n(6800),a=n(7241),s=Object.prototype,u=s.hasOwnProperty,l=r((function(e,t){e=Object(e);var n=-1,r=t.length,l=r>2?t[2]:void 0;for(l&&o(t[0],t[1],l)&&(r=1);++n<r;)for(var c=t[n],f=a(c),h=-1,d=f.length;++h<d;){var p=f[h],g=e[p];(void 0===g||i(g,s[p])&&!u.call(e,p))&&(e[p]=c[p])}return e}));e.exports=l},4692:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,u=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},l=o.push,c=o.indexOf,f={},h=f.toString,d=f.hasOwnProperty,p=d.toString,g=p.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in w)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function k(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[h.call(e)]||"object":typeof e}var S="3.6.4",_=function(e,t){return new _.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,n=k(e);return!m(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}_.fn=_.prototype={jquery:S,constructor:_,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=_.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return _.each(this,e)},map:function(e){return this.pushStack(_.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(_.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(_.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:o.sort,splice:o.splice},_.extend=_.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(_.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||_.isPlainObject(n)?n:{},i=!1,a[t]=_.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},_.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e)||(t=a(e))&&("function"!=typeof(n=d.call(t,"constructor")&&t.constructor)||p.call(n)!==g))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){x(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(E(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(E(Object(e))?_.merge(n,"string"==typeof e?[e]:e):l.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:c.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(E(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return u(a)},guid:1,support:v}),"function"==typeof Symbol&&(_.fn[Symbol.iterator]=o[Symbol.iterator]),_.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){f["[object "+t+"]"]=t.toLowerCase()}));var C=function(e){var t,n,r,i,o,a,s,u,l,c,f,h,d,p,g,v,m,y,b,w="sizzle"+1*new Date,x=e.document,k=0,S=0,_=ue(),E=ue(),C=ue(),A=ue(),P=function(e,t){return e===t&&(f=!0),0},L={}.hasOwnProperty,T=[],N=T.pop,O=T.push,M=T.push,R=T.slice,D=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",F="(?:\\\\[\\da-fA-F]{1,6}"+I+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",z="\\["+I+"*("+F+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+I+"*\\]",V=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+z+")*)|.*)\\)|)",B=new RegExp(I+"+","g"),$=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),U=new RegExp("^"+I+"*,"+I+"*"),H=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),q=new RegExp(I+"|>"),W=new RegExp(V),G=new RegExp("^"+F+"$"),Y={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+V),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+I+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},ae=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{M.apply(T=R.call(x.childNodes),x.childNodes),T[x.childNodes.length].nodeType}catch(e){M={apply:T.length?function(e,t){O.apply(e,R.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,c,f,p,m,y=t&&t.ownerDocument,x=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==x&&9!==x&&11!==x)return r;if(!i&&(h(t),t=t||d,g)){if(11!==x&&(f=Z.exec(e)))if(o=f[1]){if(9===x){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return M.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return M.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!A[e+" "]&&(!v||!v.test(e))&&(1!==x||"object"!==t.nodeName.toLowerCase())){if(m=e,y=t,1===x&&(q.test(e)||H.test(e))){for((y=ee.test(e)&&me(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=w)),s=(p=a(e)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+be(p[s]);m=p.join(",")}try{return M.apply(r,y.querySelectorAll(m)),r}catch(t){A(e,!0)}finally{c===w&&t.removeAttribute("id")}}}return u(e.replace($,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[w]=!0,e}function ce(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ve(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:x;return a!=d&&9===a.nodeType&&a.documentElement?(p=(d=a).documentElement,g=!o(d),x!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce((function(e){return p.appendChild(e).appendChild(d.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.cssHas=ce((function(){try{return d.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ce((function(e){return p.appendChild(e).id=w,!d.getElementsByName||!d.getElementsByName(w).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},m=[],v=[],(n.qsa=Q.test(d.querySelectorAll))&&(ce((function(e){var t;p.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(t=d.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+I+"*name"+I+"*="+I+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=Q.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),m.push("!=",V)})),n.cssHas||v.push(":has"),v=v.length&&new RegExp(v.join("|")),m=m.length&&new RegExp(m.join("|")),t=Q.test(p.compareDocumentPosition),b=t||Q.test(p.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},P=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==d||e.ownerDocument==x&&b(x,e)?-1:t==d||t.ownerDocument==x&&b(x,t)?1:c?D(c,e)-D(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==d?-1:t==d?1:i?-1:o?1:c?D(c,e)-D(c,t):0;if(i===o)return he(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?he(a[r],s[r]):a[r]==x?-1:s[r]==x?1:0},d):d},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&g&&!A[t+" "]&&(!m||!m.test(t))&&(!v||!v.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){A(t,!0)}return se(t,d,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=d&&h(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=d&&h(e);var i=r.attrHandle[t.toLowerCase()],o=i&&L.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(P),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},r=se.selectors={cacheLength:50,createPseudo:le,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&_(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,h,d,p,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(v){if(o){for(;g;){for(h=t;h=h[g];)if(s?h.nodeName.toLowerCase()===m:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?v.firstChild:v.lastChild],a&&y){for(b=(d=(l=(c=(f=(h=v)[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===k&&l[1])&&l[2],h=d&&v.childNodes[d];h=++d&&h&&h[g]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){c[e]=[k,d,b];break}}else if(y&&(b=d=(l=(c=(f=(h=t)[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===k&&l[1]),!1===b)for(;(h=++d&&h&&h[g]||(b=d=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==m:1!==h.nodeType)||!++b||(y&&((c=(f=h[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]=[k,b]),h!==t)););return(b-=i)===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=D(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace($,"$1"));return r[w]?le((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return G.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve((function(){return[0]})),last:ve((function(e,t){return[t-1]})),eq:ve((function(e,t,n){return[n<0?n+t:n]})),even:ve((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ve((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ve((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ve((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=de(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function we(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=S++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,h=[k,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(f=t[w]||(t[w]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===k&&l[1]===s)return h[2]=l[2];if(c[o]=h,h[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function ke(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Se(e,t,n,r,i,o){return r&&!r[w]&&(r=Se(r)),i&&!i[w]&&(i=Se(i,o)),le((function(o,a,s,u){var l,c,f,h=[],d=[],p=a.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),v=!e||!o&&t?g:ke(g,h,e,s,u),m=n?i||(o?e:p||r)?[]:a:v;if(n&&n(v,m,s,u),r)for(l=ke(m,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(m[d[c]]=!(v[d[c]]=f));if(o){if(i||e){if(i){for(l=[],c=m.length;c--;)(f=m[c])&&l.push(v[c]=f);i(null,m=[],l,u)}for(c=m.length;c--;)(f=m[c])&&(l=i?D(o,f):h[c])>-1&&(o[l]=!(a[l]=f))}}else m=ke(m===a?m.splice(p,m.length):m),i?i(null,a,m,u):M.apply(a,m)}))}function _e(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=we((function(e){return e===t}),s,!0),f=we((function(e){return D(t,e)>-1}),s,!0),h=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])h=[we(xe(h),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[w]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return Se(u>1&&xe(h),u>1&&be(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace($,"$1"),n,u<i&&_e(e.slice(u,i)),i<o&&_e(e=e.slice(i)),i<o&&be(e))}h.push(n)}return xe(h)}return ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=se.tokenize=function(e,t){var n,i,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(a in n&&!(i=U.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=H.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace($," ")}),s=s.slice(n.length)),r.filter)!(i=Y[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):E(e,u).slice(0)},s=se.compile=function(e,t){var n,i=[],o=[],s=C[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=_e(t[n]))[w]?i.push(s):o.push(s);s=C(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,p,v,m=0,y="0",b=o&&[],w=[],x=l,S=o||i&&r.find.TAG("*",c),_=k+=null==x?1:Math.random()||.1,E=S.length;for(c&&(l=a==d||a||c);y!==E&&null!=(f=S[y]);y++){if(i&&f){for(p=0,a||f.ownerDocument==d||(h(f),s=!g);v=e[p++];)if(v(f,a||d,s)){u.push(f);break}c&&(k=_)}n&&((f=!v&&f)&&m--,o&&b.push(f))}if(m+=y,n&&y!==m){for(p=0;v=t[p++];)v(b,w,a,s);if(o){if(m>0)for(;y--;)b[y]||w[y]||(w[y]=N.call(u));w=ke(w)}M.apply(u,w),c&&!o&&w.length>0&&m+t.length>1&&se.uniqueSort(u)}return c&&(k=_,l=x),b};return n?le(o):o}(o,i)),s.selector=e}return s},u=se.select=function(e,t,n,i){var o,u,l,c,f,h="function"==typeof e&&e,d=!i&&a(e=h.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=Y.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(te,ne),ee.test(u[0].type)&&me(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&be(u)))return M.apply(n,i),n;break}}return(h||s(e,d))(i,t,!g,n,!t||ee.test(e)&&me(t.parentNode)||t),n},n.sortStable=w.split("").sort(P).join("")===w,n.detectDuplicates=!!f,h(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||fe("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||fe("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||fe(j,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(r);_.find=C,_.expr=C.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=C.uniqueSort,_.text=C.getText,_.isXMLDoc=C.isXML,_.contains=C.contains,_.escapeSelector=C.escape;var A=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&_(e).is(n))break;r.push(e)}return r},P=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},L=_.expr.match.needsContext;function T(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(e,t,n){return m(t)?_.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?_.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?_.grep(e,(function(e){return c.call(t,e)>-1!==n})):_.filter(t,e,n)}_.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?_.find.matchesSelector(r,e)?[r]:[]:_.find.matches(e,_.grep(t,(function(e){return 1===e.nodeType})))},_.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(_(e).filter((function(){for(t=0;t<r;t++)if(_.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)_.find(e,i[t],n);return r>1?_.uniqueSort(n):n},filter:function(e){return this.pushStack(O(this,e||[],!1))},not:function(e){return this.pushStack(O(this,e||[],!0))},is:function(e){return!!O(this,"string"==typeof e&&L.test(e)?_(e):e||[],!1).length}});var M,R=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||M,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:R.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof _?t[0]:t,_.merge(this,_.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),N.test(r[1])&&_.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,M=_(b);var D=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(_.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&_(e);if(!L.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&_.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?_.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(_(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(_.uniqueSort(_.merge(this.get(),_(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),_.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return P((e.parentNode||{}).firstChild,e)},children:function(e){return P(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(T(e,"template")&&(e=e.content||e),_.merge([],e.childNodes))}},(function(e,t){_.fn[e]=function(n,r){var i=_.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=_.filter(r,i)),this.length>1&&(j[e]||_.uniqueSort(i),D.test(e)&&i.reverse()),this.pushStack(i)}}));var F=/[^\x20\t\r\n\f]+/g;function z(e){return e}function V(e){throw e}function B(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}_.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return _.each(e.match(F)||[],(function(e,n){t[n]=!0})),t}(e):_.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){_.each(n,(function(n,r){m(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==k(r)&&t(r)}))}(arguments),n&&!t&&u()),this},remove:function(){return _.each(arguments,(function(e,t){for(var n;(n=_.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?_.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},_.extend({Deferred:function(e){var t=[["notify","progress",_.Callbacks("memory"),_.Callbacks("memory"),2],["resolve","done",_.Callbacks("once memory"),_.Callbacks("once memory"),0,"resolved"],["reject","fail",_.Callbacks("once memory"),_.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return _.Deferred((function(n){_.each(t,(function(t,r){var i=m(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var o=0;function a(e,t,n,i){return function(){var s=this,u=arguments,l=function(){var r,l;if(!(e<o)){if((r=n.apply(s,u))===t.promise())throw new TypeError("Thenable self-resolution");l=r&&("object"==typeof r||"function"==typeof r)&&r.then,m(l)?i?l.call(r,a(o,t,z,i),a(o,t,V,i)):(o++,l.call(r,a(o,t,z,i),a(o,t,V,i),a(o,t,z,t.notifyWith))):(n!==z&&(s=void 0,u=[r]),(i||t.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(r){_.Deferred.exceptionHook&&_.Deferred.exceptionHook(r,c.stackTrace),e+1>=o&&(n!==V&&(s=void 0,u=[r]),t.rejectWith(s,u))}};e?c():(_.Deferred.getStackHook&&(c.stackTrace=_.Deferred.getStackHook()),r.setTimeout(c))}}return _.Deferred((function(r){t[0][3].add(a(0,r,m(i)?i:z,r.notifyWith)),t[1][3].add(a(0,r,m(e)?e:z)),t[2][3].add(a(0,r,m(n)?n:V))})).promise()},promise:function(e){return null!=e?_.extend(e,i):i}},o={};return _.each(t,(function(e,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=_.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(B(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||m(i[n]&&i[n].then)))return o.then();for(;n--;)B(i[n],a(n),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&$.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},_.readyException=function(e){r.setTimeout((function(){throw e}))};var U=_.Deferred();function H(){b.removeEventListener("DOMContentLoaded",H),r.removeEventListener("load",H),_.ready()}_.fn.ready=function(e){return U.then(e).catch((function(e){_.readyException(e)})),this},_.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==e&&--_.readyWait>0||U.resolveWith(b,[_]))}}),_.ready.then=U.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(_.ready):(b.addEventListener("DOMContentLoaded",H),r.addEventListener("load",H));var q=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===k(n))for(s in i=!0,n)q(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(_(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},W=/^-ms-/,G=/-([a-z])/g;function Y(e,t){return t.toUpperCase()}function X(e){return e.replace(W,"ms-").replace(G,Y)}var K=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function J(){this.expando=_.expando+J.uid++}J.uid=1,J.prototype={cache:function(e){var t=e[this.expando];return t||(t={},K(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(F)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||_.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!_.isEmptyObject(t)}};var Q=new J,Z=new J,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}Z.set(e,t,n)}else n=void 0;return n}_.extend({hasData:function(e){return Z.hasData(e)||Q.hasData(e)},data:function(e,t,n){return Z.access(e,t,n)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),_.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=Z.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=X(r.slice(5)),ne(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Z.set(this,e)})):q(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=Z.get(o,e))||void 0!==(n=ne(o,e))?n:void 0;this.each((function(){Z.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),_.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,_.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=_.queue(e,t),r=n.length,i=n.shift(),o=_._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){_.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:_.Callbacks("once memory").add((function(){Q.remove(e,[t+"queue",n])}))})}}),_.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?_.queue(this[0],e):void 0===t?this:this.each((function(){var n=_.queue(this,e,t);_._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&_.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){_.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=_.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Q.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=b.documentElement,se=function(e){return _.contains(e.ownerDocument,e)},ue={composed:!0};ae.getRootNode&&(se=function(e){return _.contains(e.ownerDocument,e)||e.getRootNode(ue)===e.ownerDocument});var le=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===_.css(e,"display")};function ce(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return _.css(e,t,"")},u=s(),l=n&&n[3]||(_.cssNumber[t]?"":"px"),c=e.nodeType&&(_.cssNumber[t]||"px"!==l&&+u)&&ie.exec(_.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)_.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,_.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var fe={};function he(e){var t,n=e.ownerDocument,r=e.nodeName,i=fe[r];return i||(t=n.body.appendChild(n.createElement(r)),i=_.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),fe[r]=i,i)}function de(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=Q.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&le(r)&&(i[o]=he(r))):"none"!==n&&(i[o]="none",Q.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}_.fn.extend({show:function(){return de(this,!0)},hide:function(){return de(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){le(this)?_(this).show():_(this).hide()}))}});var pe,ge,ve=/^(?:checkbox|radio)$/i,me=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;pe=b.createDocumentFragment().appendChild(b.createElement("div")),(ge=b.createElement("input")).setAttribute("type","radio"),ge.setAttribute("checked","checked"),ge.setAttribute("name","t"),pe.appendChild(ge),v.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="<option></option>",v.option=!!pe.lastChild;var be={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function we(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&T(e,t)?_.merge([e],n):n}function xe(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,v.option||(be.optgroup=be.option=[1,"<select multiple='multiple'>","</select>"]);var ke=/<|&#?\w+;/;function Se(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),h=[],d=0,p=e.length;d<p;d++)if((o=e[d])||0===o)if("object"===k(o))_.merge(h,o.nodeType?[o]:o);else if(ke.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(me.exec(o)||["",""])[1].toLowerCase(),u=be[s]||be._default,a.innerHTML=u[1]+_.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;_.merge(h,a.childNodes),(a=f.firstChild).textContent=""}else h.push(t.createTextNode(o));for(f.textContent="",d=0;o=h[d++];)if(r&&_.inArray(o,r)>-1)i&&i.push(o);else if(l=se(o),a=we(f.appendChild(o),"script"),l&&xe(a),n)for(c=0;o=a[c++];)ye.test(o.type||"")&&n.push(o);return f}var _e=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function Ce(){return!1}function Ae(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function Pe(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Pe(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ce;else if(!i)return e;return 1===o&&(a=i,i=function(e){return _().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=_.guid++)),e.each((function(){_.event.add(this,t,i,r,n)}))}function Le(e,t,n){n?(Q.set(e,t,!1),_.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(_.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),Q.set(this,t,o),r=n(this,t),this[t](),o!==(i=Q.get(this,t))||r?Q.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else o.length&&(Q.set(this,t,{value:_.event.trigger(_.extend(o[0],_.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&_.event.add(e,t,Ee)}_.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d,p,g,v=Q.get(e);if(K(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&_.find.matchesSelector(ae,i),n.guid||(n.guid=_.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==_&&_.event.triggered!==t.type?_.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(F)||[""]).length;l--;)d=g=(s=_e.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),d&&(f=_.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=_.event.special[d]||{},c=_.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&_.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[d])||((h=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),_.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d,p,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(F)||[""]).length;l--;)if(d=g=(s=_e.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),d){for(f=_.event.special[d]||{},h=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,f.remove&&f.remove.call(e,c));a&&!h.length&&(f.teardown&&!1!==f.teardown.call(e,p,v.handle)||_.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)_.event.remove(e,d+t[l],n,r,!0);_.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=_.event.fix(e),l=(Q.get(this,"events")||Object.create(null))[u.type]||[],c=_.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(a=_.event.handlers.call(this,u,l),t=0;(i=a[t++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((_.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?_(i,this).index(l)>-1:_.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(_.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[_.expando]?e:new _.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ve.test(t.type)&&t.click&&T(t,"input")&&Le(t,"click",Ee),!1},trigger:function(e){var t=this||e;return ve.test(t.type)&&t.click&&T(t,"input")&&Le(t,"click"),!0},_default:function(e){var t=e.target;return ve.test(t.type)&&t.click&&T(t,"input")&&Q.get(t,"click")||T(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},_.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},_.Event=function(e,t){if(!(this instanceof _.Event))return new _.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:Ce,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&_.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[_.expando]=!0},_.Event.prototype={constructor:_.Event,isDefaultPrevented:Ce,isPropagationStopped:Ce,isImmediatePropagationStopped:Ce,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},_.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},_.event.addProp),_.each({focus:"focusin",blur:"focusout"},(function(e,t){_.event.special[e]={setup:function(){return Le(this,e,Ae),!1},trigger:function(){return Le(this,e),!0},_default:function(t){return Q.get(t.target,e)},delegateType:t}})),_.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){_.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||_.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),_.fn.extend({on:function(e,t,n,r){return Pe(this,e,t,n,r)},one:function(e,t,n,r){return Pe(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,_(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ce),this.each((function(){_.event.remove(this,e,n,t)}))}});var Te=/<script|<style|<link/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,Oe=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Me(e,t){return T(e,"table")&&T(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function Re(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Q.hasData(e)&&(s=Q.get(e).events))for(i in Q.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)_.event.add(t,i,s[i][n]);Z.hasData(e)&&(o=Z.access(e),a=_.extend({},o),Z.set(t,a))}}function Ie(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ve.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Fe(e,t,n,r){t=u(t);var i,o,a,s,l,c,f=0,h=e.length,d=h-1,p=t[0],g=m(p);if(g||h>1&&"string"==typeof p&&!v.checkClone&&Ne.test(p))return e.each((function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),Fe(o,t,n,r)}));if(h&&(o=(i=Se(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=_.map(we(i,"script"),Re)).length;f<h;f++)l=i,f!==d&&(l=_.clone(l,!0,!0),s&&_.merge(a,we(l,"script"))),n.call(e[f],l,f);if(s)for(c=a[a.length-1].ownerDocument,_.map(a,De),f=0;f<s;f++)l=a[f],ye.test(l.type||"")&&!Q.access(l,"globalEval")&&_.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?_._evalUrl&&!l.noModule&&_._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):x(l.textContent.replace(Oe,""),l,c))}return e}function ze(e,t,n){for(var r,i=t?_.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||_.cleanData(we(r)),r.parentNode&&(n&&se(r)&&xe(we(r,"script")),r.parentNode.removeChild(r));return e}_.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=se(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||_.isXMLDoc(e)))for(a=we(s),r=0,i=(o=we(e)).length;r<i;r++)Ie(o[r],a[r]);if(t)if(n)for(o=o||we(e),a=a||we(s),r=0,i=o.length;r<i;r++)je(o[r],a[r]);else je(e,s);return(a=we(s,"script")).length>0&&xe(a,!u&&we(e,"script")),s},cleanData:function(e){for(var t,n,r,i=_.event.special,o=0;void 0!==(n=e[o]);o++)if(K(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?_.event.remove(n,r):_.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),_.fn.extend({detach:function(e){return ze(this,e,!0)},remove:function(e){return ze(this,e)},text:function(e){return q(this,(function(e){return void 0===e?_.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Fe(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Me(this,e).appendChild(e)}))},prepend:function(){return Fe(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Me(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Fe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Fe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(_.cleanData(we(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return _.clone(this,e,t)}))},html:function(e){return q(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Te.test(e)&&!be[(me.exec(e)||["",""])[1].toLowerCase()]){e=_.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(_.cleanData(we(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Fe(this,arguments,(function(t){var n=this.parentNode;_.inArray(this,e)<0&&(_.cleanData(we(this)),n&&n.replaceChild(t,this))}),e)}}),_.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){_.fn[e]=function(e){for(var n,r=[],i=_(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),_(i[a])[t](n),l.apply(r,n.get());return this.pushStack(r)}}));var Ve=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Be=/^--/,$e=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=r),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},He=new RegExp(oe.join("|"),"i"),qe="[\\x20\\t\\r\\n\\f]",We=new RegExp("^"+qe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+qe+"+$","g");function Ge(e,t,n){var r,i,o,a,s=Be.test(t),u=e.style;return(n=n||$e(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(We,"$1")||void 0),""!==a||se(e)||(a=_.style(e,t)),!v.pixelBoxStyles()&&Ve.test(a)&&He.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(l).appendChild(c);var e=r.getComputedStyle(c);n="1%"!==e.top,u=12===t(e.marginLeft),c.style.right="60%",a=36===t(e.right),i=36===t(e.width),c.style.position="absolute",o=12===t(c.offsetWidth/3),ae.removeChild(l),c=null}}function t(e){return Math.round(parseFloat(e))}var n,i,o,a,s,u,l=b.createElement("div"),c=b.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===c.style.backgroundClip,_.extend(v,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,n,i;return null==s&&(e=b.createElement("table"),t=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",ae.appendChild(e).appendChild(t).appendChild(n),i=r.getComputedStyle(t),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===t.offsetHeight,ae.removeChild(e)),s}}))}();var Xe=["Webkit","Moz","ms"],Ke=b.createElement("div").style,Je={};function Qe(e){return _.cssProps[e]||Je[e]||(e in Ke?e:Je[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Xe.length;n--;)if((e=Xe[n]+t)in Ke)return e}(e)||e)}var Ze=/^(none|table(?!-c[ea]).+)/,et={position:"absolute",visibility:"hidden",display:"block"},tt={letterSpacing:"0",fontWeight:"400"};function nt(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function rt(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=_.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=_.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=_.css(e,"border"+oe[a]+"Width",!0,i))):(u+=_.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=_.css(e,"border"+oe[a]+"Width",!0,i):s+=_.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function it(e,t,n){var r=$e(e),i=(!v.boxSizingReliable()||n)&&"border-box"===_.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ve.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&T(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===_.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===_.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+rt(e,t,n||(i?"border":"content"),o,r,a)+"px"}function ot(e,t,n,r,i){return new ot.prototype.init(e,t,n,r,i)}_.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Be.test(t),l=e.style;if(u||(t=Qe(s)),a=_.cssHooks[t]||_.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ce(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(_.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Be.test(t)||(t=Qe(s)),(a=_.cssHooks[t]||_.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in tt&&(i=tt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),_.each(["height","width"],(function(e,t){_.cssHooks[t]={get:function(e,n,r){if(n)return!Ze.test(_.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?it(e,t,r):Ue(e,et,(function(){return it(e,t,r)}))},set:function(e,n,r){var i,o=$e(e),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===_.css(e,"boxSizing",!1,o),u=r?rt(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-rt(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=_.css(e,t)),nt(0,n,u)}}})),_.cssHooks.marginLeft=Ye(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),_.each({margin:"",padding:"",border:"Width"},(function(e,t){_.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(_.cssHooks[e+t].set=nt)})),_.fn.extend({css:function(e,t){return q(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=_.css(e,t[a],!1,r);return o}return void 0!==n?_.style(e,t,n):_.css(e,t)}),e,t,arguments.length>1)}}),_.Tween=ot,ot.prototype={constructor:ot,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||_.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(_.cssNumber[n]?"":"px")},cur:function(){var e=ot.propHooks[this.prop];return e&&e.get?e.get(this):ot.propHooks._default.get(this)},run:function(e){var t,n=ot.propHooks[this.prop];return this.options.duration?this.pos=t=_.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ot.propHooks._default.set(this),this}},ot.prototype.init.prototype=ot.prototype,ot.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=_.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){_.fx.step[e.prop]?_.fx.step[e.prop](e):1!==e.elem.nodeType||!_.cssHooks[e.prop]&&null==e.elem.style[Qe(e.prop)]?e.elem[e.prop]=e.now:_.style(e.elem,e.prop,e.now+e.unit)}}},ot.propHooks.scrollTop=ot.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},_.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},_.fx=ot.prototype.init,_.fx.step={};var at,st,ut=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ct(){st&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ct):r.setTimeout(ct,_.fx.interval),_.fx.tick())}function ft(){return r.setTimeout((function(){at=void 0})),at=Date.now()}function ht(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function dt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=_.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=at||ft(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:_.extend({},t),opts:_.extend(!0,{specialEasing:{},easing:_.easing._default},n),originalProperties:t,originalOptions:n,startTime:at||ft(),duration:n.duration,tweens:[],createTween:function(t,n){var r=_.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=_.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return m(r.stop)&&(_._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return _.map(c,dt,l),m(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),_.fx.timer(_.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}_.Animation=_.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ce(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(F);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,h=this,d={},p=e.style,g=e.nodeType&&le(e),v=Q.get(e,"fxshow");for(r in n.queue||(null==(a=_._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,_.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],ut.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||_.style(e,r)}if((u=!_.isEmptyObject(t))||!_.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=v&&v.display)&&(l=Q.get(e,"display")),"none"===(c=_.css(e,"display"))&&(l?c=l:(de([e],!0),l=e.style.display||l,c=_.css(e,"display"),de([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===_.css(e,"float")&&(u||(h.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&de([e],!0),h.done((function(){for(r in g||de([e]),Q.remove(e,"fxshow"),d)_.style(e,r,d[r])}))),u=dt(g?v[r]:0,r,h),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),_.speed=function(e,t,n){var r=e&&"object"==typeof e?_.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return _.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in _.fx.speeds?r.duration=_.fx.speeds[r.duration]:r.duration=_.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&_.dequeue(this,r.queue)},r},_.fn.extend({fadeTo:function(e,t,n,r){return this.filter(le).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=_.isEmptyObject(e),o=_.speed(t,n,r),a=function(){var t=pt(this,_.extend({},e),o);(i||Q.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=_.timers,a=Q.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&<.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||_.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=Q.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=_.timers,a=r?r.length:0;for(n.finish=!0,_.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),_.each(["toggle","show","hide"],(function(e,t){var n=_.fn[t];_.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ht(t,!0),e,r,i)}})),_.each({slideDown:ht("show"),slideUp:ht("hide"),slideToggle:ht("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){_.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),_.timers=[],_.fx.tick=function(){var e,t=0,n=_.timers;for(at=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||_.fx.stop(),at=void 0},_.fx.timer=function(e){_.timers.push(e),_.fx.start()},_.fx.interval=13,_.fx.start=function(){st||(st=!0,ct())},_.fx.stop=function(){st=null},_.fx.speeds={slow:600,fast:200,_default:400},_.fn.delay=function(e,t){return e=_.fx&&_.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var i=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(i)}}))},function(){var e=b.createElement("input"),t=b.createElement("select").appendChild(b.createElement("option"));e.type="checkbox",v.checkOn=""!==e.value,v.optSelected=t.selected,(e=b.createElement("input")).value="t",e.type="radio",v.radioValue="t"===e.value}();var gt,vt=_.expr.attrHandle;_.fn.extend({attr:function(e,t){return q(this,_.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){_.removeAttr(this,e)}))}}),_.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?_.prop(e,t,n):(1===o&&_.isXMLDoc(e)||(i=_.attrHooks[t.toLowerCase()]||(_.expr.match.bool.test(t)?gt:void 0)),void 0!==n?null===n?void _.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=_.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&T(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(F);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),gt={set:function(e,t,n){return!1===t?_.removeAttr(e,n):e.setAttribute(n,n),n}},_.each(_.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=vt[t]||_.find.attr;vt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=vt[a],vt[a]=i,i=null!=n(e,t,r)?a:null,vt[a]=o),i}}));var mt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function bt(e){return(e.match(F)||[]).join(" ")}function wt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(F)||[]}_.fn.extend({prop:function(e,t){return q(this,_.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[_.propFix[e]||e]}))}}),_.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&_.isXMLDoc(e)||(t=_.propFix[t]||t,i=_.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=_.find.attr(e,"tabindex");return t?parseInt(t,10):mt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(_.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){_.propFix[this.toLowerCase()]=this})),_.fn.extend({addClass:function(e){var t,n,r,i,o,a;return m(e)?this.each((function(t){_(this).addClass(e.call(this,t,wt(this)))})):(t=xt(e)).length?this.each((function(){if(r=wt(this),n=1===this.nodeType&&" "+bt(r)+" "){for(o=0;o<t.length;o++)i=t[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=bt(n),r!==a&&this.setAttribute("class",a)}})):this},removeClass:function(e){var t,n,r,i,o,a;return m(e)?this.each((function(t){_(this).removeClass(e.call(this,t,wt(this)))})):arguments.length?(t=xt(e)).length?this.each((function(){if(r=wt(this),n=1===this.nodeType&&" "+bt(r)+" "){for(o=0;o<t.length;o++)for(i=t[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=bt(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return m(e)?this.each((function(n){_(this).toggleClass(e.call(this,n,wt(this),t),t)})):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=xt(e),this.each((function(){if(s)for(o=_(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==e&&"boolean"!==a||((r=wt(this))&&Q.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":Q.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+bt(wt(n))+" ").indexOf(t)>-1)return!0;return!1}});var kt=/\r/g;_.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,_(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=_.map(i,(function(e){return null==e?"":e+""}))),(t=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=_.valHooks[i.type]||_.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(kt,""):null==n?"":n:void 0}}),_.extend({valHooks:{option:{get:function(e){var t=_.find.attr(e,"value");return null!=t?t:bt(_.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!T(n.parentNode,"optgroup"))){if(t=_(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=_.makeArray(t),a=i.length;a--;)((r=i[a]).selected=_.inArray(_.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),_.each(["radio","checkbox"],(function(){_.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=_.inArray(_(e).val(),t)>-1}},v.checkOn||(_.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),v.focusin="onfocusin"in r;var St=/^(?:focusinfocus|focusoutblur)$/,_t=function(e){e.stopPropagation()};_.extend(_.event,{trigger:function(e,t,n,i){var o,a,s,u,l,c,f,h,p=[n||b],g=d.call(e,"type")?e.type:e,v=d.call(e,"namespace")?e.namespace.split("."):[];if(a=h=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!St.test(g+_.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),l=g.indexOf(":")<0&&"on"+g,(e=e[_.expando]?e:new _.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:_.makeArray(t,[e]),f=_.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(n,t))){if(!i&&!f.noBubble&&!y(n)){for(u=f.delegateType||g,St.test(u+g)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(n.ownerDocument||b)&&p.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=p[o++])&&!e.isPropagationStopped();)h=a,e.type=o>1?u:f.bindType||g,(c=(Q.get(a,"events")||Object.create(null))[e.type]&&Q.get(a,"handle"))&&c.apply(a,t),(c=l&&a[l])&&c.apply&&K(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(p.pop(),t)||!K(n)||l&&m(n[g])&&!y(n)&&((s=n[l])&&(n[l]=null),_.event.triggered=g,e.isPropagationStopped()&&h.addEventListener(g,_t),n[g](),e.isPropagationStopped()&&h.removeEventListener(g,_t),_.event.triggered=void 0,s&&(n[l]=s)),e.result}},simulate:function(e,t,n){var r=_.extend(new _.Event,n,{type:e,isSimulated:!0});_.event.trigger(r,null,t)}}),_.fn.extend({trigger:function(e,t){return this.each((function(){_.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return _.event.trigger(e,t,n,!0)}}),v.focusin||_.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){_.event.simulate(t,e.target,_.event.fix(e))};_.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,t);i||r.addEventListener(e,n,!0),Q.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,t)-1;i?Q.access(r,t,i):(r.removeEventListener(e,n,!0),Q.remove(r,t))}}}));var Et=r.location,Ct={guid:Date.now()},At=/\?/;_.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||_.error("Invalid XML: "+(n?_.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Pt=/\[\]$/,Lt=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Ot(e,t,n,r){var i;if(Array.isArray(t))_.each(t,(function(t,i){n||Pt.test(e)?r(e,i):Ot(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==k(t))r(e,t);else for(i in t)Ot(e+"["+i+"]",t[i],n,r)}_.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!_.isPlainObject(e))_.each(e,(function(){i(this.name,this.value)}));else for(n in e)Ot(n,e[n],t,i);return r.join("&")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=_.prop(this,"elements");return e?_.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!_(this).is(":disabled")&&Nt.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!ve.test(e))})).map((function(e,t){var n=_(this).val();return null==n?null:Array.isArray(n)?_.map(n,(function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}})):{name:t.name,value:n.replace(Lt,"\r\n")}})).get()}});var Mt=/%20/g,Rt=/#.*$/,Dt=/([?&])_=[^&]*/,jt=/^(.*?):[ \t]*([^\r\n]*)$/gm,It=/^(?:GET|HEAD)$/,Ft=/^\/\//,zt={},Vt={},Bt="*/".concat("*"),$t=b.createElement("a");function Ut(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(F)||[];if(m(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ht(e,t,n,r){var i={},o=e===Vt;function a(s){var u;return i[s]=!0,_.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function qt(e,t){var n,r,i=_.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&_.extend(!0,e,r),e}$t.href=Et.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,_.ajaxSettings),t):qt(_.ajaxSettings,e)},ajaxPrefilter:Ut(zt),ajaxTransport:Ut(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,o,a,s,u,l,c,f,h,d=_.ajaxSetup({},t),p=d.context||d,g=d.context&&(p.nodeType||p.jquery)?_(p):_.event,v=_.Deferred(),m=_.Callbacks("once memory"),y=d.statusCode||{},w={},x={},k="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=jt.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||k;return n&&n.abort(t),E(0,t),this}};if(v.promise(S),d.url=((e||d.url||Et.href)+"").replace(Ft,Et.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(F)||[""],null==d.crossDomain){u=b.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=$t.protocol+"//"+$t.host!=u.protocol+"//"+u.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=_.param(d.data,d.traditional)),Ht(zt,d,t,S),l)return S;for(f in(c=_.event&&d.global)&&0===_.active++&&_.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!It.test(d.type),i=d.url.replace(Rt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Mt,"+")):(h=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(At.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Dt,"$1"),h=(At.test(i)?"&":"?")+"_="+Ct.guid+++h),d.url=i+h),d.ifModified&&(_.lastModified[i]&&S.setRequestHeader("If-Modified-Since",_.lastModified[i]),_.etag[i]&&S.setRequestHeader("If-None-Match",_.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&S.setRequestHeader("Content-Type",d.contentType),S.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Bt+"; q=0.01":""):d.accepts["*"]),d.headers)S.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(p,S,d)||l))return S.abort();if(k="abort",m.add(d.complete),S.done(d.success),S.fail(d.error),n=Ht(Vt,d,t,S)){if(S.readyState=1,c&&g.trigger("ajaxSend",[S,d]),l)return S;d.async&&d.timeout>0&&(s=r.setTimeout((function(){S.abort("timeout")}),d.timeout));try{l=!1,n.send(w,E)}catch(e){if(l)throw e;E(-1,e)}}else E(-1,"No Transport");function E(e,t,a,u){var f,h,b,w,x,k=t;l||(l=!0,s&&r.clearTimeout(s),n=void 0,o=u||"",S.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(w=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,S,a)),!f&&_.inArray("script",d.dataTypes)>-1&&_.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),w=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(d,w,S,f),f?(d.ifModified&&((x=S.getResponseHeader("Last-Modified"))&&(_.lastModified[i]=x),(x=S.getResponseHeader("etag"))&&(_.etag[i]=x)),204===e||"HEAD"===d.type?k="nocontent":304===e?k="notmodified":(k=w.state,h=w.data,f=!(b=w.error))):(b=k,!e&&k||(k="error",e<0&&(e=0))),S.status=e,S.statusText=(t||k)+"",f?v.resolveWith(p,[h,k,S]):v.rejectWith(p,[S,k,b]),S.statusCode(y),y=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[S,d,f?h:b]),m.fireWith(p,[S,k]),c&&(g.trigger("ajaxComplete",[S,d]),--_.active||_.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return _.get(e,t,n,"json")},getScript:function(e,t){return _.get(e,void 0,t,"script")}}),_.each(["get","post"],(function(e,t){_[t]=function(e,n,r,i){return m(n)&&(i=i||r,r=n,n=void 0),_.ajax(_.extend({url:e,type:t,dataType:i,data:n,success:r},_.isPlainObject(e)&&e))}})),_.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),_._evalUrl=function(e,t,n){return _.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){_.globalEval(e,t,n)}})},_.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=_(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return m(e)?this.each((function(t){_(this).wrapInner(e.call(this,t))})):this.each((function(){var t=_(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=m(e);return this.each((function(n){_(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){_(this).replaceWith(this.childNodes)})),this}}),_.expr.pseudos.hidden=function(e){return!_.expr.pseudos.visible(e)},_.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},_.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},Gt=_.ajaxSettings.xhr();v.cors=!!Gt&&"withCredentials"in Gt,v.ajax=Gt=!!Gt,_.ajaxTransport((function(e){var t,n;if(v.cors||Gt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Wt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),_.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return _.globalEval(e),e}}}),_.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),_.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=_("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Yt,Xt=[],Kt=/(=)\?(?=&|$)|\?\?/;_.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||_.expando+"_"+Ct.guid++;return this[e]=!0,e}}),_.ajaxPrefilter("json jsonp",(function(e,t,n){var i,o,a,s=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Kt,"$1"+i):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||_.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always((function(){void 0===o?_(r).removeProp(i):r[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(i)),a&&m(o)&&o(a[0]),a=o=void 0})),"script"})),v.createHTMLDocument=((Yt=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Yt.childNodes.length),_.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=Se([e],t,o),o&&o.length&&_(o).remove(),_.merge([],i.childNodes)));var r,i,o},_.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=bt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&_.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?_("<div>").append(_.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},_.expr.pseudos.animated=function(e){return _.grep(_.timers,(function(t){return e===t.elem})).length},_.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=_.css(e,"position"),c=_(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=_.css(e,"top"),u=_.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,_.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},_.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){_.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===_.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===_.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=_(e).offset()).top+=_.css(e,"borderTopWidth",!0),i.left+=_.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-_.css(r,"marginTop",!0),left:t.left-i.left-_.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===_.css(e,"position");)e=e.offsetParent;return e||ae}))}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;_.fn[e]=function(r){return q(this,(function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),_.each(["top","left"],(function(e,t){_.cssHooks[t]=Ye(v.pixelPosition,(function(e,n){if(n)return n=Ge(e,t),Ve.test(n)?_(e).position()[t]+"px":n}))})),_.each({Height:"height",Width:"width"},(function(e,t){_.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){_.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return q(this,(function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?_.css(t,n,s):_.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){_.fn[t]=function(e){return this.on(t,e)}})),_.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),_.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){_.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var Jt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;_.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),i=function(){return e.apply(t||this,r.concat(s.call(arguments)))},i.guid=e.guid=e.guid||_.guid++,i},_.holdReady=function(e){e?_.readyWait++:_.ready(!0)},_.isArray=Array.isArray,_.parseJSON=JSON.parse,_.nodeName=T,_.isFunction=m,_.isWindow=y,_.camelCase=X,_.type=k,_.now=Date.now,_.isNumeric=function(e){var t=_.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},_.trim=function(e){return null==e?"":(e+"").replace(Jt,"$1")},void 0===(n=function(){return _}.apply(t,[]))||(e.exports=n);var Qt=r.jQuery,Zt=r.$;return _.noConflict=function(e){return r.$===_&&(r.$=Zt),e&&r.jQuery===_&&(r.jQuery=Qt),_},void 0===i&&(r.jQuery=r.$=_),_}))},4713:(e,t,n)=>{var r=n(2523),i=n(5389),o=n(1489),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var u=null==n?0:o(n);return u<0&&(u=a(s+u,0)),r(e,i(t,3),u)}},4733:(e,t,n)=>{var r=n(1791),i=n(5950);e.exports=function(e,t){return e&&r(t,i(t),e)}},4739:(e,t,n)=>{var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},4840:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4848:(e,t,n)=>{"use strict";e.exports=n(9698)},4850:(e,t,n)=>{"use strict";var r=n(6857);function i(e){r.forEach(e.nodes(),(function(t){o(e.node(t))})),r.forEach(e.edges(),(function(t){o(e.edge(t))}))}function o(e){var t=e.width;e.width=e.height,e.height=t}function a(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||i(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),(function(t){a(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(e),"lr"!==t&&"rl"!==t||(function(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(e),i(e))}}},4894:(e,t,n)=>{var r=n(1882),i=n(294);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},4901:(e,t,n)=>{var r=n(2552),i=n(294),o=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},4915:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},4919:(e,t,n)=>{var r=n(8905),i=n(117);e.exports=function(e,t,n){return i.transform(e.nodes(),(function(i,o){i[o]=r(e,o,t,n)}),{})}},4932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},4959:(e,t,n)=>{"use strict";var r=n(6857);e.exports=function(e,t){var n={};return r.forEach(e,(function(e,t){var i=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],i=n[e.w];r.isUndefined(t)||r.isUndefined(i)||(i.indegree++,t.out.push(n[e.w]))})),function(e){var t=[];function n(e){return function(t){var n,i,o,a;t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&(i=t,o=0,a=0,(n=e).weight&&(o+=n.barycenter*n.weight,a+=n.weight),i.weight&&(o+=i.barycenter*i.weight,a+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/a,n.weight=a,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(t){return function(n){n.in.push(t),0===--n.indegree&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(e){return!e.indegree})))}},4974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},5015:(e,t,n)=>{var r=n(2552),i=n(6449),o=n(346);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},5083:(e,t,n)=>{var r=n(1882),i=n(7296),o=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,h=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?h:s).test(a(e))}},5128:(e,t,n)=>{var r=n(909),i=n(4894);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},5169:(e,t,n)=>{var r=n(6857),i=n(3988);function o(e,t,n){for(var i;t.length&&(i=r.last(t)).i<=n;)t.pop(),e.push(i.vs),n++;return n}e.exports=function(e,t){var n,a=i.partition(e,(function(e){return r.has(e,"barycenter")})),s=a.lhs,u=r.sortBy(a.rhs,(function(e){return-e.i})),l=[],c=0,f=0,h=0;s.sort((n=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:n?t.i-e.i:e.i-t.i})),h=o(l,u,h),r.forEach(s,(function(e){h+=e.vs.length,l.push(e.vs),c+=e.barycenter*e.weight,f+=e.weight,h=o(l,u,h)}));var d={vs:r.flatten(l,!0)};return f&&(d.barycenter=c/f,d.weight=f),d}},5250:(e,t,n)=>{var r=n(7217),i=n(7805),o=n(6649),a=n(2824),s=n(3805),u=n(7241),l=n(4974);e.exports=function e(t,n,c,f,h){t!==n&&o(n,(function(o,u){if(h||(h=new r),s(o))a(t,n,u,c,e,f,h);else{var d=f?f(l(t,u),o,u+"",t,n,h):void 0;void 0===d&&(d=o),i(t,u,d)}}),u)}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5325:(e,t,n)=>{var r=n(6131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},5338:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(1247)},5364:(e,t,n)=>{var r=n(5250),i=n(999)((function(e,t,n){r(e,t,n)}));e.exports=i},5378:(e,t,n)=>{var r=n(4932),i=n(5389),o=n(5128),a=n(6449);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},5389:(e,t,n)=>{var r=n(3663),i=n(7978),o=n(3488),a=n(6449),s=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},5463:e=>{e.exports=function(e){return e!=e}},5481:(e,t,n)=>{var r=n(9325)["__core-js_shared__"];e.exports=r},5508:(e,t,n)=>{var r=n(6151),i=n(6800),o=n(7400);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&i(t,n,a)&&(n=a=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),a=void 0===a?t<n?1:-1:o(a),r(t,n,a,e)}}},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5529:(e,t,n)=>{var r=n(9344),i=n(8879),o=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},5558:e=>{e.exports=function(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}},5580:(e,t,n)=>{var r=n(6110)(n(9325),"DataView");e.exports=r},5749:(e,t,n)=>{var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5750:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var i=n.prototype,o=i.format;r.en.formats=e,i.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,i){var o=i&&i.toUpperCase();return r||n[i]||e[i]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,void 0===n?{}:n);return o.call(this,r)}}}()},5765:(e,t,n)=>{var r=n(8859),i=n(5325),o=n(9905),a=n(9219),s=n(4517),u=n(4247);e.exports=function(e,t,n){var l=-1,c=i,f=e.length,h=!0,d=[],p=d;if(n)h=!1,c=o;else if(f>=200){var g=t?null:s(e);if(g)return u(g);h=!1,c=a,p=new r}else p=t?[]:d;e:for(;++l<f;){var v=e[l],m=t?t(v):v;if(v=n||0!==v?v:0,h&&m==m){for(var y=p.length;y--;)if(p[y]===m)continue e;t&&p.push(m),d.push(v)}else c(p,m,n)||(p!==d&&p.push(m),d.push(v))}return d}},5861:(e,t,n)=>{var r=n(5580),i=n(8223),o=n(2804),a=n(6545),s=n(8303),u=n(2552),l=n(7473),c="[object Map]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",p="[object DataView]",g=l(r),v=l(i),m=l(o),y=l(a),b=l(s),w=u;(r&&w(new r(new ArrayBuffer(1)))!=p||i&&w(new i)!=c||o&&w(o.resolve())!=f||a&&w(new a)!=h||s&&w(new s)!=d)&&(w=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case g:return p;case v:return c;case m:return f;case y:return h;case b:return d}return t}),e.exports=w},5880:(e,t,n)=>{var r=n(514),i=n(5950);e.exports=function(e){return null==e?[]:r(e,i(e))}},5891:(e,t,n)=>{var r=n(1873),i=n(2428),o=n(6449),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},5911:(e,t,n)=>{var r=n(8859),i=n(4248),o=n(9219);e.exports=function(e,t,n,a,s,u){var l=1&n,c=e.length,f=t.length;if(c!=f&&!(l&&f>c))return!1;var h=u.get(e),d=u.get(t);if(h&&d)return h==t&&d==e;var p=-1,g=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++p<c;){var m=e[p],y=t[p];if(a)var b=l?a(y,m,p,t,e,u):a(m,y,p,e,t,u);if(void 0!==b){if(b)continue;g=!1;break}if(v){if(!i(t,(function(e,t){if(!o(v,t)&&(m===e||s(m,e,n,a,u)))return v.push(t)}))){g=!1;break}}else if(m!==y&&!s(m,y,n,a,u)){g=!1;break}}return u.delete(e),u.delete(t),g}},5950:(e,t,n)=>{var r=n(695),i=n(8984),o=n(4894);e.exports=function(e){return o(e)?r(e):i(e)}},5970:(e,t,n)=>{var r=n(3120);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},6001:(e,t,n)=>{var r=n(7420),i=n(631);e.exports=function(e,t){return r(e,t,(function(t,n){return i(e,n)}))}},6009:(e,t,n)=>{e=n.nmd(e);var r=n(4840),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},6016:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"pre")}},6025:(e,t,n)=>{var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},6038:(e,t,n)=>{var r=n(5861),i=n(346);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},6110:(e,t,n)=>{var r=n(5083),i=n(392);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},6131:(e,t,n)=>{var r=n(2523),i=n(5463),o=n(6959);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},6135:(e,t,n)=>{e.exports=n(9754)},6151:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,i,o){for(var a=-1,s=n(t((r-e)/(i||1)),0),u=Array(s);s--;)u[o?s:++a]=e,e+=i;return u}},6155:(e,t,n)=>{var r=n(4932),i=n(7422),o=n(5389),a=n(5128),s=n(3937),u=n(7301),l=n(3714),c=n(3488),f=n(6449);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return f(e)?function(t){return i(t,1===e.length?e[0]:e)}:e})):[c];var h=-1;t=r(t,u(o));var d=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++h,value:e}}));return s(d,(function(e,t){return l(e,t,n)}))}},6169:(e,t,n)=>{var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},6176:e=>{e.exports=function(e,t){return e<t}},6189:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},6221:(e,t,n)=>{"use strict";var r=n(6540);function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var a={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},s=Symbol.for("react.portal"),u=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(i(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},t.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,a.d.C(e,t))},t.prefetchDNS=function(e){"string"==typeof e&&a.d.D(e)},t.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,r=l(n,t.crossOrigin),i="string"==typeof t.integrity?t.integrity:void 0,o="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?a.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):"script"===n&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&a.d.M(e)},t.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else a.d.m(e)},t.requestFormReset=function(e){a.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},t.useFormStatus=function(){return u.H.useHostTransitionStatus()},t.version="19.1.0"},6246:(e,t,n)=>{e.exports={graphlib:n(8191),layout:n(8202),debug:n(8909),util:{time:n(3988).time,notime:n(3988).notime},version:n(7038)}},6291:(e,t,n)=>{var r=n(117);e.exports=function(e){var t=0,n=[],i={},o=[];function a(s){var u=i[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(i,e)?i[e].onStack&&(u.lowlink=Math.min(u.lowlink,i[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,i[e].lowlink))})),u.lowlink===u.index){var l,c=[];do{l=n.pop(),i[l].onStack=!1,c.push(l)}while(s!==l);o.push(c)}}return e.nodes().forEach((function(e){r.has(i,e)||a(e)})),o}},6353:(e,t,n)=>{var r=n(6857),i=n(3988);function o(e,t,n,a,s,u,l){var c=e.children(l);if(c.length){var f=i.addBorderNode(e,"_bt"),h=i.addBorderNode(e,"_bb"),d=e.node(l);e.setParent(f,l),d.borderTop=f,e.setParent(h,l),d.borderBottom=h,r.forEach(c,(function(r){o(e,t,n,a,s,u,r);var i=e.node(r),c=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,g=c!==d?1:s-u[l]+1;e.setEdge(f,c,{weight:p,minlen:g,nestingEdge:!0}),e.setEdge(d,h,{weight:p,minlen:g,nestingEdge:!0})})),e.parent(l)||e.setEdge(t,f,{weight:0,minlen:s+u[l]})}else l!==t&&e.setEdge(t,l,{weight:0,minlen:n})}e.exports={run:function(e){var t=i.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(i,o){var a=e.children(i);a&&a.length&&r.forEach(a,(function(e){n(e,o+1)})),t[i]=o}return r.forEach(e.children(),(function(e){n(e,1)})),t}(e),a=r.max(r.values(n))-1,s=2*a+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=s}));var u=function(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}(e)+1;r.forEach(e.children(),(function(r){o(e,t,s,u,a,n,r)})),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}}},6375:(e,t,n)=>{var r=n(4528),i=n(8879),o=n(4664),a=n(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},6449:e=>{var t=Array.isArray;e.exports=t},6454:(e,t,n)=>{"use strict";var r=n(117);e.exports=o;var i="\0";function o(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function u(e,t,n,i){var o=""+t,a=""+n;if(!e&&o>a){var s=o;o=a,a=s}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function l(e,t){return u(e,t.v,t.w,t.name)}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(e){return this._label=e,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return r.keys(this._nodes)},o.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},o.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},o.prototype.setNodes=function(e,t){var n=arguments,i=this;return r.each(e,(function(e){n.length>1?i.setNode(e,t):i.setNode(e)})),this},o.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},o.prototype.node=function(e){return this._nodes[e]},o.prototype.hasNode=function(e){return r.has(this._nodes,e)},o.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},o.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},o.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},o.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},o.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},o.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},o.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},o.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},o.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},o.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var i={};function o(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(i[e]=r,r):r in i?i[r]:o(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,o(e))})),t},o.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return r.values(this._edgeObjs)},o.prototype.setPath=function(e,t){var n=this,i=arguments;return r.reduce(e,(function(e,r){return i.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},o.prototype.setEdge=function(){var e,t,n,i,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(i=arguments[1],o=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var l=u(this._isDirected,e,t,n);if(r.has(this._edgeLabels,l))return o&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=o?i:this._defaultEdgeLabelFn(e,t,n);var c=function(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[l]=c,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][l]=c,this._out[e][l]=c,this._edgeCount++,this},o.prototype.edge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(e,t,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return r.has(this._edgeLabels,i)},o.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},o.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var i=r.values(n);return t?r.filter(i,(function(e){return e.v===t})):i}},o.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var i=r.values(n);return t?r.filter(i,(function(e){return e.w===t})):i}},o.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},6533:(e,t,n)=>{var r=n(3599),i=n(5389),o=n(6176);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},6540:(e,t,n)=>{"use strict";e.exports=n(9869)},6545:(e,t,n)=>{var r=n(6110)(n(9325),"Set");e.exports=r},6547:(e,t,n)=>{var r=n(3360),i=n(5288),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},6574:(e,t,n)=>{var r=n(909);e.exports=function(e,t){var n=[];return r(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}},6639:(e,t,n)=>{"use strict";var r=n(6857);function i(e,t,n){for(var i=r.zipObject(n,r.map(n,(function(e,t){return t}))),o=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:i[t.w],weight:e.edge(t).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var u=r.map(new Array(s),(function(){return 0})),l=0;return r.forEach(o.forEach((function(e){var t=e.pos+a;u[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=u[t+1]),u[t=t-1>>1]+=e.weight;l+=e.weight*n}))),l}e.exports=function(e,t){for(var n=0,r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}},6649:(e,t,n)=>{var r=n(3221)();e.exports=r},6678:(e,t,n)=>{var r=n(117),i=n(6291);e.exports=function(e){return r.filter(i(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},6721:(e,t,n)=>{var r=n(1042),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},6757:(e,t,n)=>{var r=n(1033),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),u=Array(s);++a<s;)u[a]=o[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=o[a];return l[t]=n(u),r(e,this,l)}}},6800:(e,t,n)=>{var r=n(5288),i=n(4894),o=n(361),a=n(3805);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},6822:(e,t,n)=>{"use strict";var r=n(6857),i=n(2031);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?i(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},i={};return r.forEach(e.nodes(),(function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),(function(e){r.has(n,e.w)?t.push(e):o(e.w)})),delete n[a])})),t}(e);r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))},undo:function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}}},6857:(e,t,n)=>{var r;try{r={cloneDeep:n(8055),constant:n(7334),defaults:n(4684),each:n(6135),filter:n(7612),find:n(7309),flatten:n(5970),forEach:n(9754),forIn:n(2420),has:n(1448),isUndefined:n(2216),last:n(8090),map:n(5378),mapValues:n(3916),max:n(4506),merge:n(5364),min:n(1684),minBy:n(6533),now:n(124),pick:n(4383),range:n(3181),reduce:n(860),sortBy:n(3031),uniqueId:n(7200),values:n(5880),zipObject:n(7248)}}catch(e){}r||(r=window._),e.exports=r},6860:(e,t,n)=>{"use strict";var r=n(6857),i=n(8481),o=n(8073).slack,a=n(8073).longestPath,s=n(8191).alg.preorder,u=n(8191).alg.postorder,l=n(3988).simplify;function c(e){e=l(e),a(e);var t,n=i(e);for(d(n),f(n,e);t=g(n);)m(n,e,t,v(n,e,t))}function f(e,t){var n=u(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=h(e,t,n)}(e,t,n)}))}function h(e,t,n){var i=e.node(n).parent,o=!0,a=t.edge(n,i),s=0;return a||(o=!1,a=t.edge(i,n)),s=a.weight,r.forEach(t.nodeEdges(n),(function(r){var a,u,l=r.v===n,c=l?r.w:r.v;if(c!==i){var f=l===o,h=t.edge(r).weight;if(s+=f?h:-h,a=n,u=c,e.hasEdge(a,u)){var d=e.edge(n,c).cutvalue;s+=f?-d:d}}})),s}function d(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,i,o){var a=n,s=e.node(i);return t[i]=!0,r.forEach(e.neighbors(i),(function(o){r.has(t,o)||(n=p(e,t,n,o,i))})),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function g(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function v(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var s=e.node(i),u=e.node(a),l=s,c=!1;s.lim>u.lim&&(l=u,c=!0);var f=r.filter(t.edges(),(function(t){return c===y(0,e.node(t.v),l)&&c!==y(0,e.node(t.w),l)}));return r.minBy(f,(function(e){return o(t,e)}))}function m(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),d(e),f(e,t),function(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),i=s(e,n);i=i.slice(1),r.forEach(i,(function(n){var r=e.node(n).parent,i=t.edge(n,r),o=!1;i||(i=t.edge(r,n),o=!0),t.node(n).rank=t.node(r).rank+(o?i.minlen:-i.minlen)}))}(e,t)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=c,c.initLowLimValues=d,c.initCutValues=f,c.calcCutValue=h,c.leaveEdge=g,c.enterEdge=v,c.exchangeEdges=m},6959:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},7038:e=>{e.exports="0.8.5"},7068:(e,t,n)=>{var r=n(7217),i=n(5911),o=n(1986),a=n(689),s=n(5861),u=n(6449),l=n(3656),c=n(7167),f="[object Arguments]",h="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,v,m){var y=u(e),b=u(t),w=y?h:s(e),x=b?h:s(t),k=(w=w==f?d:w)==d,S=(x=x==f?d:x)==d,_=w==x;if(_&&l(e)){if(!l(t))return!1;y=!0,k=!1}if(_&&!k)return m||(m=new r),y||c(e)?i(e,t,n,g,v,m):o(e,t,w,n,g,v,m);if(!(1&n)){var E=k&&p.call(e,"__wrapped__"),C=S&&p.call(t,"__wrapped__");if(E||C){var A=E?e.value():e,P=C?t.value():t;return m||(m=new r),v(A,P,n,g,m)}}return!!_&&(m||(m=new r),a(e,t,n,g,v,m))}},7091:(e,t,n)=>{var r=n(8984),i=n(5861),o=n(4894),a=n(5015),s=n(1993);e.exports=function(e){if(null==e)return 0;if(o(e))return a(e)?s(e):e.length;var t=i(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},7167:(e,t,n)=>{var r=n(4901),i=n(7301),o=n(6009),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},7199:(e,t,n)=>{var r=n(9653),i=n(6169),o=n(3201),a=n(3736),s=n(1961);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Symbol]":return a(e)}}},7200:(e,t,n)=>{var r=n(3222),i=0;e.exports=function(e){var t=++i;return r(e)+t}},7217:(e,t,n)=>{var r=n(79),i=n(1420),o=n(938),a=n(3605),s=n(9817),u=n(945);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=s,l.prototype.set=u,e.exports=l},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7241:(e,t,n)=>{var r=n(695),i=n(2903),o=n(4894);e.exports=function(e){return o(e)?r(e,!0):i(e)}},7248:(e,t,n)=>{var r=n(6547),i=n(1234);e.exports=function(e,t){return i(e||[],t||[],r)}},7255:(e,t,n)=>{var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},7296:(e,t,n)=>{var r,i=n(5481),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},7309:(e,t,n)=>{var r=n(2006)(n(4713));e.exports=r},7317:function(e,t,n){e.exports=function(e){"use strict";var t=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(e),n={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"}};return t.default.locale(n,null,!0),n}(n(4353))},7334:e=>{e.exports=function(e){return function(){return e}}},7375:function(e){e.exports=function(){"use strict";return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),o=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return n.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return n.ordinal(t.week(),"W");case"w":case"ww":return i.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return i.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return i.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return r.bind(this)(o)}}}()},7400:(e,t,n)=>{var r=n(9374),i=1/0;e.exports=function(e){return e?(e=r(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},7420:(e,t,n)=>{var r=n(7422),i=n(3170),o=n(1769);e.exports=function(e,t,n){for(var a=-1,s=t.length,u={};++a<s;){var l=t[a],c=r(e,l);n(c,l)&&i(u,o(l,e),c)}return u}},7422:(e,t,n)=>{var r=n(1769),i=n(7797);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7494:(e,t,n)=>{var r=n(117),i=n(6454);function o(e){return r.map(e.nodes(),(function(t){var n=e.node(t),i=e.parent(t),o={v:t};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(e){return r.map(e.edges(),(function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.isUndefined(t.name)||(i.name=t.name),r.isUndefined(n)||(i.value=n),i}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:a(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new i(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},7534:(e,t,n)=>{var r=n(2552),i=n(346);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},7556:(e,t,n)=>{var r=n(1873),i=n(4932),o=n(6449),a=n(4394),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7612:(e,t,n)=>{var r=n(9770),i=n(6574),o=n(5389),a=n(6449);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},7670:(e,t,n)=>{var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},7730:(e,t,n)=>{var r=n(9172),i=n(7301),o=n(6009),a=o&&o.isMap,s=a?i(a):r;e.exports=s},7797:(e,t,n)=>{var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7805:(e,t,n)=>{var r=n(3360),i=n(5288);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},7828:(e,t,n)=>{var r=n(9325).Uint8Array;e.exports=r},7860:(e,t,n)=>{var r=n(6857),i=n(8191).Graph;e.exports=function(e,t,n){var o=function(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}(e),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(i){var s=e.node(i),u=e.parent(i);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(a.setNode(i),a.setParent(i,u||o),r.forEach(e[n](i),(function(t){var n=t.v===i?t.w:t.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:e.edge(t).weight+s})})),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))})),a}},7927:e=>{var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")?",l="[\\ufe0e\\ufe0f]?",c=l+u+"(?:\\u200d(?:"+[o,a,s].join("|")+")"+l+u+")*",f="(?:"+[o+r+"?",r,a,s,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+f+c,"g");e.exports=function(e){for(var t=h.lastIndex=0;h.test(e);)++t;return t}},7978:(e,t,n)=>{var r=n(270),i=n(8156),o=n(631),a=n(8586),s=n(756),u=n(7197),l=n(7797);e.exports=function(e,t){return a(e)&&s(t)?u(l(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},8055:(e,t,n)=>{var r=n(9999);e.exports=function(e){return r(e,5)}},8073:(e,t,n)=>{"use strict";var r=n(6857);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),(function n(i){var o=e.node(i);if(r.has(t,i))return o.rank;t[i]=!0;var a=r.min(r.map(e.outEdges(i),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},8090:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},8096:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},8156:(e,t,n)=>{var r=n(7422);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},8191:(e,t,n)=>{var r;try{r=n(8362)}catch(e){}r||(r=window.graphlib),e.exports=r},8202:(e,t,n)=>{"use strict";var r=n(6857),i=n(6822),o=n(8209),a=n(9361),s=n(3988).normalizeRanks,u=n(2948),l=n(3988).removeEmptyRanks,c=n(6353),f=n(135),h=n(4850),d=n(1453),p=n(3776),g=n(3988),v=n(8191).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?g.time:g.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return function(e){var t=new v({multigraph:!0,compound:!0}),n=C(e.graph());return t.setGraph(r.merge({},y,E(n,m),r.pick(n,b))),r.forEach(e.nodes(),(function(n){var i=C(e.node(n));t.setNode(n,r.defaults(E(i,w),x)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var i=C(e.edge(n));t.setEdge(n,r.merge({},S,E(i,k),r.pick(i,_)))})),t}(e)}));n(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){i.run(e)})),t(" nestingGraph.run",(function(){c.run(e)})),t(" rank",(function(){a(g.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};g.addDummyNode(e,"edge-proxy",i,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){l(e)})),t(" nestingGraph.cleanup",(function(){c.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;r.forEach(e.nodes(),(function(n){var i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=r.max(t,i.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){o.run(e)})),t(" parentDummyChains",(function(){u(e)})),t(" addBorderSegments",(function(){f(e)})),t(" order",(function(){d(e)})),t(" insertSelfEdges",(function(){!function(e){var t=g.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,i){var o=e.node(t);o.order=i+n,r.forEach(o.selfEdges,(function(t){g.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:i+ ++n,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){h.adjust(e)})),t(" position",(function(){p(e)})),t(" positionSelfEdges",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),i=e.node(n.borderTop),o=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){o.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){h.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=e.graph(),s=a.marginx||0,u=a.marginy||0;function l(e){var r=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-u/2),o=Math.max(o,a+u/2)}r.forEach(e.nodes(),(function(t){l(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&l(n)})),t-=s,i-=u,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=i})),r.forEach(e.edges(),(function(n){var o=e.edge(n);r.forEach(o.points,(function(e){e.x-=t,e.y-=i})),r.has(o,"x")&&(o.x-=t),r.has(o,"y")&&(o.y-=i)})),a.width=n-t+s,a.height=o-i+u}(e)})),t(" assignNodeIntersects",(function(){!function(e){r.forEach(e.edges(),(function(t){var n,r,i=e.edge(t),o=e.node(t.v),a=e.node(t.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(g.intersectRect(o,n)),i.points.push(g.intersectRect(a,r))}))}(e)})),t(" reversePoints",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){i.undo(e)}))}(t,n)})),n(" updateInputGraph",(function(){!function(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(e.edges(),(function(n){var i=e.edge(n),o=t.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],w=["width","height"],x={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],S={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},_=["labelpos"];function E(e,t){return r.mapValues(r.pick(e,t),Number)}function C(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},8209:(e,t,n)=>{"use strict";var r=n(6857),i=n(3988);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){!function(e,t){var n,r,o,a=t.v,s=e.node(a).rank,u=t.w,l=e.node(u).rank,c=t.name,f=e.edge(t),h=f.labelRank;if(l!==s+1){for(e.removeEdge(t),o=0,++s;s<l;++o,++s)f.points=[],r={width:0,height:0,edgeLabel:f,edgeObj:t,rank:s},n=i.addDummyNode(e,"edge",r,"_d"),s===h&&(r.width=f.width,r.height=f.height,r.dummy="edge-label",r.labelpos=f.labelpos),e.setEdge(a,n,{weight:f.weight},c),0===o&&e.graph().dummyChains.push(n),a=n;e.setEdge(a,u,{weight:f.weight},c)}}(e,t)}))},undo:function(e){r.forEach(e.graph().dummyChains,(function(t){var n,r=e.node(t),i=r.edgeLabel;for(e.setEdge(r.edgeObj,i);r.dummy;)n=e.successors(t)[0],e.removeNode(t),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),t=n,r=e.node(t)}))}}},8223:(e,t,n)=>{var r=n(6110)(n(9325),"Map");e.exports=r},8303:(e,t,n)=>{var r=n(6110)(n(9325),"WeakMap");e.exports=r},8329:(e,t,n)=>{var r=n(4894);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},8362:(e,t,n)=>{var r=n(1166);e.exports={Graph:r.Graph,json:n(7494),alg:n(1667),version:r.version}},8440:(e,t,n)=>{var r=n(6038),i=n(7301),o=n(6009),a=o&&o.isSet,s=a?i(a):r;e.exports=s},8481:(e,t,n)=>{"use strict";var r=n(6857),i=n(8191).Graph,o=n(8073).slack;function a(e,t){return r.forEach(e.nodes(),(function n(i){r.forEach(t.nodeEdges(i),(function(r){var a=r.v,s=i===a?r.w:a;e.hasNode(s)||o(t,r)||(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))}))})),e.nodeCount()}function s(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return o(t,n)}))}function u(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}e.exports=function(e){var t,n,r=new i({directed:!1}),l=e.nodes()[0],c=e.nodeCount();for(r.setNode(l,{});a(r,e)<c;)t=s(r,e),n=r.hasNode(t.v)?o(e,t):-o(e,t),u(r,e,n);return r}},8586:(e,t,n)=>{var r=n(6449),i=n(4394),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},8655:(e,t,n)=>{var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},8816:(e,t,n)=>{var r=n(5970),i=n(6757),o=n(2865);e.exports=function(e){return o(i(e,void 0,r),e+"")}},8859:(e,t,n)=>{var r=n(3661),i=n(1380),o=n(1459);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},8879:(e,t,n)=>{var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},8905:(e,t,n)=>{var r=n(117),i=n(1737);e.exports=function(e,t,n,r){return function(e,t,n,r){var o,a,s={},u=new i,l=function(e){var t=e.v!==o?e.v:e.w,r=s[t],i=n(e),l=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);l<r.distance&&(r.distance=l,r.predecessor=o,u.decrease(t,l))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(o=u.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(l);return s}(e,String(t),n||o,r||function(t){return e.outEdges(t)})};var o=r.constant(1)},8909:(e,t,n)=>{var r=n(6857),i=n(3988),o=n(8191).Graph;e.exports={debugOrdering:function(e){var t=i.buildLayerMatrix(e),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var i="layer"+t;n.setNode(i,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}}},8918:(e,t,n)=>{"use strict";var r=n(6857);e.exports=function(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),i=r.max(r.map(n,(function(t){return e.node(t).rank}))),o=r.map(r.range(i+1),(function(){return[]})),a=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(a,(function n(i){if(!r.has(t,i)){t[i]=!0;var a=e.node(i);o[a.rank].push(i),r.forEach(e.successors(i),n)}})),o}},8948:(e,t,n)=>{var r=n(1791),i=n(6375);e.exports=function(e,t){return r(e,i(e),t)}},8984:(e,t,n)=>{var r=n(5527),i=n(3650),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9172:(e,t,n)=>{var r=n(5861),i=n(346);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},9219:e=>{e.exports=function(e,t){return e.has(t)}},9276:(e,t,n)=>{var r=n(117);function i(e,t,n,o,a,s){r.has(o,t)||(o[t]=!0,n||s.push(t),r.each(a(t),(function(t){i(e,t,n,o,a,s)})),n&&s.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);i(e,t,"post"===n,s,o,a)})),a}},9302:(e,t,n)=>{var r=n(3488),i=n(6757),o=n(2865);e.exports=function(e,t){return o(i(e,t,r),e+"")}},9325:(e,t,n)=>{var r=n(4840),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},9326:(e,t,n)=>{var r=n(1769),i=n(2428),o=n(6449),a=n(361),s=n(294),u=n(7797);e.exports=function(e,t,n){for(var l=-1,c=(t=r(t,e)).length,f=!1;++l<c;){var h=u(t[l]);if(!(f=null!=e&&n(e,h)))break;e=e[h]}return f||++l!=c?f:!!(c=null==e?0:e.length)&&s(c)&&a(h,c)&&(o(e)||i(e))}},9344:(e,t,n)=>{var r=n(3805),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9361:(e,t,n)=>{"use strict";var r=n(8073).longestPath,i=n(8481),o=n(6860);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:!function(e){o(e)}(e);break;case"tight-tree":!function(e){r(e),i(e)}(e);break;case"longest-path":a(e)}};var a=r},9374:(e,t,n)=>{var r=n(4128),i=n(3805),o=n(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9570:(e,t,n)=>{var r=n(7334),i=n(3243),o=n(3488),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},9653:(e,t,n)=>{var r=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},9698:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),t.jsx=function(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var o in r={},t)"key"!==o&&(r[o]=t[o]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:i,ref:void 0!==t?t:null,props:r}}},9741:(e,t,n)=>{"use strict";var r=n(6857),i=n(8191).Graph,o=n(3988);function a(e,t){var n={};return r.reduce(t,(function(t,i){var o=0,a=0,s=t.length,l=r.last(i);return r.forEach(i,(function(t,c){var f=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),h=f?e.node(f).order:s;(f||t===l)&&(r.forEach(i.slice(a,c+1),(function(t){r.forEach(e.predecessors(t),(function(r){var i=e.node(r),a=i.order;!(a<o||h<a)||i.dummy&&e.node(t).dummy||u(n,r,t)}))})),a=c+1,o=h)})),i})),n}function s(e,t){var n={};function i(t,i,o,a,s){var l;r.forEach(r.range(i,o),(function(i){l=t[i],e.node(l).dummy&&r.forEach(e.predecessors(l),(function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>s)&&u(n,t,l)}))}))}return r.reduce(t,(function(t,n){var o,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===e.node(r).dummy){var l=e.predecessors(r);l.length&&(o=e.node(l[0]).order,i(n,s,u,a,o),s=u,a=o)}i(n,s,n.length,o,t.length)})),n})),n}function u(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function l(e,t,n){if(t>n){var i=t;t=n,n=i}return r.has(e[t],n)}function c(e,t,n,i){var o={},a={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){o[e]=e,a[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var u=i(e);if(u.length){u=r.sortBy(u,(function(e){return s[e]}));for(var c=(u.length-1)/2,f=Math.floor(c),h=Math.ceil(c);f<=h;++f){var d=u[f];a[e]===e&&t<s[d]&&!l(n,e,d)&&(a[d]=e,a[e]=o[e]=o[d],t=s[d])}}}))})),{root:o,align:a}}function f(e,t,n,o,a){var s={},u=function(e,t,n,o){var a=new i,s=e.graph(),u=function(e,t,n){return function(i,o,a){var s,u=i.node(o),l=i.node(a),c=0;if(c+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(c+=n?s:-s),s=0,c+=(u.dummy?t:e)/2,c+=(l.dummy?t:e)/2,c+=l.width/2,r.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=l.width/2;break;case"r":s=-l.width/2}return s&&(c+=n?s:-s),s=0,c}}(s.nodesep,s.edgesep,o);return r.forEach(t,(function(t){var i;r.forEach(t,(function(t){var r=n[t];if(a.setNode(r),i){var o=n[i],s=a.edge(o,r);a.setEdge(o,r,Math.max(u(e,t,i),s||0))}i=t}))})),a}(e,t,n,a),l=a?"borderLeft":"borderRight";function c(e,t){for(var n=u.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return c((function(e){s[e]=u.inEdges(e).reduce((function(e,t){return Math.max(e,s[t.v]+u.edge(t))}),0)}),u.predecessors.bind(u)),c((function(t){var n=u.outEdges(t).reduce((function(e,t){return Math.min(e,s[t.w]-u.edge(t))}),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==l&&(s[t]=Math.max(s[t],n))}),u.successors.bind(u)),r.forEach(o,(function(e){s[e]=s[n[e]]})),s}function h(e,t){return r.minBy(r.values(t),(function(t){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(t,(function(t,r){var o=function(e,t){return e.node(t).width}(e,r)/2;n=Math.max(t+o,n),i=Math.min(t-o,i)})),n-i}))}function d(e,t){var n=r.values(t),i=r.min(n),o=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var s,u=n+a,l=e[u];if(l!==t){var c=r.values(l);(s="l"===a?i-r.min(c):o-r.max(c))&&(e[u]=r.mapValues(l,(function(e){return e+s})))}}))}))}function p(e,t){return r.mapValues(e.ul,(function(n,i){if(t)return e[t.toLowerCase()][i];var o=r.sortBy(r.map(e,i));return(o[1]+o[2])/2}))}e.exports={positionX:function(e){var t,n=o.buildLayerMatrix(e),i=r.merge(a(e,n),s(e,n)),u={};r.forEach(["u","d"],(function(o){t="u"===o?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(t=r.map(t,(function(e){return r.values(e).reverse()})));var a=("u"===o?e.predecessors:e.successors).bind(e),s=c(0,t,i,a),l=f(e,t,s.root,s.align,"r"===n);"r"===n&&(l=r.mapValues(l,(function(e){return-e}))),u[o+n]=l}))}));var l=h(e,u);return d(u,l),p(u,e.graph().align)},findType1Conflicts:a,findType2Conflicts:s,addConflict:u,hasConflict:l,verticalAlignment:c,horizontalCompaction:f,alignCoordinates:d,findSmallestWidthAlignment:h,balance:p}},9752:(e,t,n)=>{var r=n(3729),i=n(9344),o=n(641),a=n(5389),s=n(8879),u=n(6449),l=n(3656),c=n(1882),f=n(3805),h=n(7167);e.exports=function(e,t,n){var d=u(e),p=d||l(e)||h(e);if(t=a(t,4),null==n){var g=e&&e.constructor;n=p?d?new g:[]:f(e)&&c(g)?i(s(e)):{}}return(p?r:o)(e,(function(e,r,i){return t(n,e,r,i)})),n}},9754:(e,t,n)=>{var r=n(3729),i=n(909),o=n(4066),a=n(6449);e.exports=function(e,t){return(a(e)?r:i)(e,o(t))}},9770:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},9811:(e,t,n)=>{var r=n(7237)("length");e.exports=r},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},9859:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},9869:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,v={};function m(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var w=b.prototype=new y;w.constructor=b,g(w,m.prototype),w.isPureReactComponent=!0;var x=Array.isArray,k={H:null,A:null,T:null,S:null,V:null},S=Object.prototype.hasOwnProperty;function _(e,t,r,i,o,a){return r=a.ref,{$$typeof:n,type:e,key:t,ref:void 0!==r?r:null,props:a}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var C=/\/+/g;function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function P(){}function L(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u,l,c=!1;if(null===e)c=!0;else switch(s){case"bigint":case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0;break;case h:return L((c=e._init)(e._payload),t,i,o,a)}}if(c)return a=a(e),c=""===o?"."+A(e,0):o,x(a)?(i="",null!=c&&(i=c.replace(C,"$&/")+"/"),L(a,t,i,"",(function(e){return e}))):null!=a&&(E(a)&&(u=a,l=i+(null==a.key||e&&e.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+c,a=_(u.type,l,void 0,0,0,u.props)),t.push(a)),1;c=0;var f,p=""===o?".":o+":";if(x(e))for(var g=0;g<e.length;g++)c+=L(o=e[g],t,i,s=p+A(o,g),a);else if("function"==typeof(g=null===(f=e)||"object"!=typeof f?null:"function"==typeof(f=d&&f[d]||f["@@iterator"])?f:null))for(e=g.call(e),g=0;!(o=e.next()).done;)c+=L(o=o.value,t,i,s=p+A(o,g++),a);else if("object"===s){if("function"==typeof e.then)return L(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(P,P):(e.status="pending",e.then((function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)}),(function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)}))),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,i,o,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return c}function T(e,t,n){if(null==e)return e;var r=[],i=0;return L(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function N(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function M(){}t.Children={map:T,forEach:function(e,t,n){T(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=i,t.Profiler=a,t.PureComponent=b,t.StrictMode=o,t.Suspense=c,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return k.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=g({},e.props),i=e.key;if(null!=t)for(o in t.ref,void 0!==t.key&&(i=""+t.key),t)!S.call(t,o)||"key"===o||"__self"===o||"__source"===o||"ref"===o&&void 0===t.ref||(r[o]=t[o]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var a=Array(o),s=0;s<o;s++)a[s]=arguments[s+2];r.children=a}return _(e.type,i,void 0,0,0,r)},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:s,_context:e},e},t.createElement=function(e,t,n){var r,i={},o=null;if(null!=t)for(r in void 0!==t.key&&(o=""+t.key),t)S.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(i[r]=t[r]);var a=arguments.length-2;if(1===a)i.children=n;else if(1<a){for(var s=Array(a),u=0;u<a;u++)s[u]=arguments[u+2];i.children=s}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===i[r]&&(i[r]=a[r]);return _(e,o,void 0,0,0,i)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=k.T,n={};k.T=n;try{var r=e(),i=k.S;null!==i&&i(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(M,O)}catch(e){O(e)}finally{k.T=t}},t.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},t.use=function(e){return k.H.use(e)},t.useActionState=function(e,t,n){return k.H.useActionState(e,t,n)},t.useCallback=function(e,t){return k.H.useCallback(e,t)},t.useContext=function(e){return k.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return k.H.useDeferredValue(e,t)},t.useEffect=function(e,t,n){var r=k.H;if("function"==typeof n)throw Error("useEffect CRUD overload is not enabled in this build of React.");return r.useEffect(e,t)},t.useId=function(){return k.H.useId()},t.useImperativeHandle=function(e,t,n){return k.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return k.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return k.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return k.H.useMemo(e,t)},t.useOptimistic=function(e,t){return k.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return k.H.useReducer(e,t,n)},t.useRef=function(e){return k.H.useRef(e)},t.useState=function(e){return k.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return k.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return k.H.useTransition()},t.version="19.1.0"},9884:(e,t,n)=>{var r=n(1791),i=n(7241);e.exports=function(e){return r(e,i(e))}},9888:(e,t,n)=>{var r=n(117);function i(e){var t={},n={},i=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],i.push(s))})),r.size(t)!==e.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o,o.prototype=new Error},9905:e=>{e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},9935:e=>{e.exports=function(){return!1}},9982:(e,t,n)=>{"use strict";e.exports=n(4477)},9999:(e,t,n)=>{var r=n(7217),i=n(3729),o=n(6547),a=n(4733),s=n(3838),u=n(3290),l=n(3007),c=n(2271),f=n(8948),h=n(2),d=n(3349),p=n(5861),g=n(6189),v=n(7199),m=n(5529),y=n(6449),b=n(3656),w=n(7730),x=n(3805),k=n(8440),S=n(5950),_=n(7241),E="[object Arguments]",C="[object Function]",A="[object Object]",P={};P[E]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[A]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[C]=P["[object WeakMap]"]=!1,e.exports=function e(t,n,L,T,N,O){var M,R=1&n,D=2&n,j=4&n;if(L&&(M=N?L(t,T,N,O):L(t)),void 0!==M)return M;if(!x(t))return t;var I=y(t);if(I){if(M=g(t),!R)return l(t,M)}else{var F=p(t),z=F==C||"[object GeneratorFunction]"==F;if(b(t))return u(t,R);if(F==A||F==E||z&&!N){if(M=D||z?{}:m(t),!R)return D?f(t,s(M,t)):c(t,a(M,t))}else{if(!P[F])return N?t:{};M=v(t,F,R)}}O||(O=new r);var V=O.get(t);if(V)return V;O.set(t,M),k(t)?t.forEach((function(r){M.add(e(r,n,L,r,t,O))})):w(t)&&t.forEach((function(r,i){M.set(i,e(r,n,L,i,t,O))}));var B=I?void 0:(j?D?d:h:D?_:S)(t);return i(B||t,(function(r,i){B&&(r=t[i=r]),o(M,i,e(r,n,L,i,t,O))})),M}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};(()=>{"use strict";n.r(r),n.d(r,{renderStaticDTDiagram:()=>Nl});var e={};n.r(e),n.d(e,{ellipseWithEllipse:()=>Ge,ellipseWithLine:()=>We,exists:()=>He,lineWithLine:()=>qe,pathWithEllipse:()=>st,pathWithLine:()=>at,pathWithPath:()=>ft,pathWithPolygon:()=>ct,pathWithPolyline:()=>lt,pathWithRect:()=>ut,polygonWithEllipse:()=>nt,polygonWithLine:()=>tt,polygonWithPolygon:()=>ot,polygonWithPolyline:()=>it,polygonWithRect:()=>rt,polylineWithEllipse:()=>Qe,polylineWithLine:()=>Je,polylineWithPolyline:()=>et,polylineWithRect:()=>Ze,rectWithEllipse:()=>Xe,rectWithLine:()=>Ye,rectWithRect:()=>Ke});var t={};n.r(t),n.d(t,{Curve:()=>Pe,Ellipse:()=>ue,Line:()=>re,Path:()=>Te,Point:()=>Z,Polygon:()=>Ue,Polyline:()=>ke,Rect:()=>me,bezier:()=>$e,ellipse:()=>le,intersection:()=>wt,line:()=>ie,normalizeAngle:()=>N,point:()=>ee,random:()=>D,rect:()=>ye,scale:()=>T,snapToGrid:()=>O,toDeg:()=>M,toRad:()=>R,types:()=>$});var i={};n.r(i),n.d(i,{absolute:()=>Zn,bottom:()=>or,ellipse:()=>sr,ellipseSpread:()=>ar,fn:()=>er,left:()=>nr,line:()=>tr,right:()=>rr,top:()=>ir});var o={};n.r(o),n.d(o,{bottom:()=>mr,inside:()=>xr,insideOriented:()=>wr,left:()=>pr,manual:()=>dr,outside:()=>br,outsideOriented:()=>yr,radial:()=>kr,radialOriented:()=>Sr,right:()=>gr,top:()=>vr});var a={};n.r(a),n.d(a,{manhattan:()=>wi,metro:()=>ki,normal:()=>Vr,oneSide:()=>Br,orthogonal:()=>ni});var s={};n.r(s),n.d(s,{curve:()=>ji,jumpover:()=>Ti,normal:()=>Ni,rounded:()=>Oi,smooth:()=>Mi});var u={};n.r(u),n.d(u,{addClass:()=>to,mask:()=>Qi,opacity:()=>Zi,stroke:()=>Ki});var l={};n.r(l),n.d(l,{connectionClosest:()=>so,connectionLength:()=>ro,connectionPerpendicular:()=>ao,connectionRatio:()=>no,resolveRef:()=>io});var c={};n.r(c),n.d(c,{anchor:()=>po,bbox:()=>go,boundary:()=>mo,rectangle:()=>vo});var f={};n.r(f),n.d(f,{bottom:()=>xo,bottomLeft:()=>Co,bottomRight:()=>Ao,center:()=>bo,left:()=>ko,midSide:()=>Lo,modelCenter:()=>To,perpendicular:()=>Po,right:()=>So,top:()=>wo,topLeft:()=>_o,topRight:()=>Eo});var h={};n.r(h),n.d(h,{BorderedImage:()=>ua,Circle:()=>na,Cylinder:()=>ha,DoubleLink:()=>va,Ellipse:()=>ra,EmbeddedImage:()=>la,HeaderedRectangle:()=>fa,Image:()=>sa,InscribedImage:()=>ca,Link:()=>ga,Path:()=>ia,Polygon:()=>oa,Polyline:()=>aa,Rectangle:()=>ta,ShadowLink:()=>ma,TextBlock:()=>pa});var d=n(6540),p=n(5338);n(4915),Object.create(null);const g=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,v={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},m=e=>v[e];let y,b={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(g,m)};const w={type:"3rdParty",init(e){((e={})=>{b={...b,...e}})(e.options.react),(e=>{y=e})(e)}},x=(0,d.createContext)();function k({i18n:e,defaultNS:t,children:n}){const r=(0,d.useMemo)((()=>({i18n:e,defaultNS:t})),[e,t]);return(0,d.createElement)(x.Provider,{value:r},n)}var S=n(4848),_=n(1391),E=n(2543),C=n(4692);const{round:A,floor:P,PI:L}=Math,T={linear:function(e,t,n){var r=e[1]-e[0],i=t[1]-t[0];return(n-e[0])/r*i+t[0]||0}},N=function(e){return e%360+(e<0?360:0)},O=function(e,t){return t*A(e/t)},M=function(e){return 180*e/L%360},R=function(e,t){return(e=(t=t||!1)?e:e%360)*L/180},D=function(e,t){if(void 0===t)t=void 0===e?1:e,e=0;else if(t<e){const n=e;e=t,t=n}return P(Math.random()*(t-e+1)+e)},{cos:j,sin:I,atan2:F}=Math,z=function(e,t){var n=R(e.y),r=R(t.y),i=e.x,o=t.x,a=R(o-i),s=I(a)*j(r),u=j(n)*I(r)-I(n)*j(r)*j(a),l=M(F(s,u))-22.5;return l<0&&(l+=360),["NE","E","SE","S","SW","W","NW","N"][l=parseInt(l/45)]},V=function(e,t){var n=e.x,r=e.y;return(n-=t.x)*n+(r-=t.y)*r},B=function(e,t){return Math.sqrt(V(e,t))},$={Point:1,Line:2,Ellipse:3,Rect:4,Polyline:5,Polygon:6,Curve:7,Path:8},{abs:U,cos:H,sin:q,sqrt:W,min:G,max:Y,atan2:X,round:K,pow:J,PI:Q}=Math,Z=function(e,t){if(!(this instanceof Z))return new Z(e,t);if("string"==typeof e){var n=e.split(-1===e.indexOf("@")?" ":"@");e=parseFloat(n[0]),t=parseFloat(n[1])}else Object(e)===e&&(t=e.y,e=e.x);this.x=void 0===e?0:e,this.y=void 0===t?0:t};Z.fromPolar=function(e,t,n){n=new Z(n);var r=U(e*H(t)),i=U(e*q(t)),o=N(M(t));return o<90?i=-i:o<180?(r=-r,i=-i):o<270&&(r=-r),new Z(n.x+r,n.y+i)},Z.random=function(e,t,n,r){return new Z(D(e,t),D(n,r))},Z.prototype={type:$.Point,chooseClosest:function(e){var t=e.length;if(1===t)return new Z(e[0]);for(var n=null,r=1/0,i=0;i<t;i++){var o=new Z(e[i]),a=this.squaredDistance(o);a<r&&(n=o,r=a)}return n},adhereToRect:function(e){return e.containsPoint(this)||(this.x=G(Y(this.x,e.x),e.x+e.width),this.y=G(Y(this.y,e.y),e.y+e.height)),this},angleBetween:function(e,t){var n=this.equals(e)||this.equals(t)?NaN:this.theta(t)-this.theta(e);return n<0&&(n+=360),n},bearing:function(e){return z(this,e)},changeInAngle:function(e,t,n){return this.clone().offset(-e,-t).theta(n)-this.theta(n)},clone:function(){return new Z(this)},cross:function(e,t){return e&&t?(t.x-this.x)*(e.y-this.y)-(t.y-this.y)*(e.x-this.x):NaN},difference:function(e,t){return Object(e)===e&&(t=e.y,e=e.x),new Z(this.x-(e||0),this.y-(t||0))},distance:function(e){return B(this,e)},dot:function(e){return e?this.x*e.x+this.y*e.y:NaN},equals:function(e){return!!e&&this.x===e.x&&this.y===e.y},lerp:function(e,t){var n=this.x,r=this.y;return new Z((1-t)*n+t*e.x,(1-t)*r+t*e.y)},magnitude:function(){return W(this.x*this.x+this.y*this.y)||.01},manhattanDistance:function(e){return U(e.x-this.x)+U(e.y-this.y)},move:function(e,t){var n=R(new Z(e).theta(this));return this.offset(H(n)*t,-q(n)*t)},normalize:function(e){var t=(e||1)/this.magnitude();return this.scale(t,t)},offset:function(e,t){return Object(e)===e&&(t=e.y,e=e.x),this.x+=e||0,this.y+=t||0,this},reflection:function(e){return new Z(e).move(this,this.distance(e))},rotate:function(e,t){if(0===t)return this;e=e||new Z(0,0),t=R(N(-t));var n=H(t),r=q(t),i=n*(this.x-e.x)-r*(this.y-e.y)+e.x,o=r*(this.x-e.x)+n*(this.y-e.y)+e.y;return this.x=i,this.y=o,this},round:function(e){let t=1;if(e)switch(e){case 1:t=10;break;case 2:t=100;break;case 3:t=1e3;break;default:t=J(10,e)}return this.x=K(this.x*t)/t,this.y=K(this.y*t)/t,this},scale:function(e,t,n){return n=n&&new Z(n)||new Z(0,0),this.x=n.x+e*(this.x-n.x),this.y=n.y+t*(this.y-n.y),this},snapToGrid:function(e,t){return this.x=O(this.x,e),this.y=O(this.y,t||e),this},squaredDistance:function(e){return V(this,e)},theta:function(e){var t=-((e=new Z(e)).y-this.y),n=e.x-this.x,r=X(t,n);return r<0&&(r=2*Q+r),180*r/Q},toJSON:function(){return{x:this.x,y:this.y}},toPolar:function(e){e=e&&new Z(e)||new Z(0,0);var t=this.x,n=this.y;return this.x=W((t-e.x)*(t-e.x)+(n-e.y)*(n-e.y)),this.y=R(e.theta(new Z(t,n))),this},toString:function(){return this.x+"@"+this.y},serialize:function(){return this.x+","+this.y},update:function(e,t){return Object(e)===e&&(t=e.y,e=e.x),this.x=e||0,this.y=t||0,this},vectorAngle:function(e){return new Z(0,0).angleBetween(this,e)}},Z.prototype.translate=Z.prototype.offset;const ee=Z,{max:te,min:ne}=Math,re=function(e,t){return this instanceof re?e instanceof re?new re(e.start,e.end):(this.start=new Z(e),void(this.end=new Z(t))):new re(e,t)};re.prototype={type:$.Line,angle:function(){var e=new Z(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,e)},bbox:function(){var e=ne(this.start.x,this.end.x),t=ne(this.start.y,this.end.y),n=te(this.start.x,this.end.x),r=te(this.start.y,this.end.y);return new me(e,t,n-e,r-t)},bearing:function(){return z(this.start,this.end)},clone:function(){return new re(this.start,this.end)},closestPoint:function(e){return this.pointAt(this.closestPointNormalizedLength(e))},closestPointLength:function(e){return this.closestPointNormalizedLength(e)*this.length()},closestPointNormalizedLength:function(e){var t=this.vector().dot(new re(this.start,e).vector()),n=ne(1,te(0,t/this.squaredLength()));return n!=n?0:n},closestPointTangent:function(e){return this.tangentAt(this.closestPointNormalizedLength(e))},containsPoint:function(e){var t=this.start,n=this.end;if(0!==t.cross(e,n))return!1;var r=this.length();return!(new re(t,e).length()>r||new re(e,n).length()>r)},divideAt:function(e){var t=this.pointAt(e);return[new re(this.start,t),new re(t,this.end)]},divideAtLength:function(e){var t=this.pointAtLength(e);return[new re(this.start,t),new re(t,this.end)]},equals:function(e){return!!e&&this.start.x===e.start.x&&this.start.y===e.start.y&&this.end.x===e.end.x&&this.end.y===e.end.y},intersect:function(e,t){if(e&&e.intersectionWithLine){var n=e.intersectionWithLine(this,t);return n&&e instanceof re&&(n=n[0]),n}return null},intersectionWithLine:function(e){var t=new Z(this.end.x-this.start.x,this.end.y-this.start.y),n=new Z(e.end.x-e.start.x,e.end.y-e.start.y),r=t.x*n.y-t.y*n.x,i=new Z(e.start.x-this.start.x,e.start.y-this.start.y),o=i.x*n.y-i.y*n.x,a=i.x*t.y-i.y*t.x;if(0===r||o*r<0||a*r<0)return null;if(r>0){if(o>r||a>r)return null}else if(o<r||a<r)return null;return[new Z(this.start.x+o*t.x/r,this.start.y+o*t.y/r)]},isDifferentiable:function(){return!this.start.equals(this.end)},length:function(){return B(this.start,this.end)},midpoint:function(){return new Z((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)},parallel:function(e){const t=this.clone();if(!this.isDifferentiable())return t;const{start:n,end:r}=t,i=n.clone().rotate(r,270),o=r.clone().rotate(n,90);return n.move(o,e),r.move(i,e),t},pointAt:function(e){var t=this.start,n=this.end;return e<=0?t.clone():e>=1?n.clone():t.lerp(n,e)},pointAtLength:function(e){var t=this.start,n=this.end,r=!0;e<0&&(r=!1,e=-e);var i=this.length();return e>=i?r?n.clone():t.clone():this.pointAt((r?e:i-e)/i)},pointOffset:function(e){e=new Z(e);var t=this.start,n=this.end;return((n.x-t.x)*(e.y-t.y)-(n.y-t.y)*(e.x-t.x))/this.length()},rotate:function(e,t){return this.start.rotate(e,t),this.end.rotate(e,t),this},round:function(e){return this.start.round(e),this.end.round(e),this},scale:function(e,t,n){return this.start.scale(e,t,n),this.end.scale(e,t,n),this},setLength:function(e){var t=this.length();if(!t)return this;var n=e/t;return this.scale(n,n,this.start)},squaredLength:function(){return V(this.start,this.end)},tangentAt:function(e){if(!this.isDifferentiable())return null;var t=this.start,n=this.end,r=this.pointAt(e),i=new re(t,n);return i.translate(r.x-t.x,r.y-t.y),i},tangentAtLength:function(e){if(!this.isDifferentiable())return null;var t=this.start,n=this.end,r=this.pointAtLength(e),i=new re(t,n);return i.translate(r.x-t.x,r.y-t.y),i},toString:function(){return this.start.toString()+" "+this.end.toString()},serialize:function(){return this.start.serialize()+" "+this.end.serialize()},translate:function(e,t){return this.start.translate(e,t),this.end.translate(e,t),this},vector:function(){return new Z(this.end.x-this.start.x,this.end.y-this.start.y)}},re.prototype.intersection=re.prototype.intersect;const ie=re,{sqrt:oe,round:ae,pow:se}=Math,ue=function(e,t,n){return this instanceof ue?e instanceof ue?new ue(new Z(e.x,e.y),e.a,e.b):(e=new Z(e),this.x=e.x,this.y=e.y,this.a=t,void(this.b=n)):new ue(e,t,n)};ue.fromRect=function(e){return e=new me(e),new ue(e.center(),e.width/2,e.height/2)},ue.prototype={type:$.Ellipse,bbox:function(){return new me(this.x-this.a,this.y-this.b,2*this.a,2*this.b)},center:function(){return new Z(this.x,this.y)},clone:function(){return new ue(this)},containsPoint:function(e){return this.normalizedDistance(e)<=1},equals:function(e){return!!e&&e.x===this.x&&e.y===this.y&&e.a===this.a&&e.b===this.b},inflate:function(e,t){return void 0===e&&(e=0),void 0===t&&(t=e),this.a+=2*e,this.b+=2*t,this},intersectionWithLine:function(e){var t=[],n=e.start,r=e.end,i=this.a,o=this.b,a=e.vector(),s=n.difference(new Z(this)),u=new Z(a.x/(i*i),a.y/(o*o)),l=new Z(s.x/(i*i),s.y/(o*o)),c=a.dot(u),f=a.dot(l),h=f*f-c*(s.dot(l)-1);if(h<0)return null;if(h>0){var d=oe(h),p=(-f-d)/c,g=(-f+d)/c;if((p<0||1<p)&&(g<0||1<g))return null;0<=p&&p<=1&&t.push(n.lerp(r,p)),0<=g&&g<=1&&t.push(n.lerp(r,g))}else{var v=-f/c;if(!(0<=v&&v<=1))return null;t.push(n.lerp(r,v))}return t},intersectionWithLineFromCenterToPoint:function(e,t){e=new Z(e),t&&e.rotate(new Z(this.x,this.y),t);var n,r=e.x-this.x,i=e.y-this.y;if(0===r)return n=this.bbox().pointNearestToPoint(e),t?n.rotate(new Z(this.x,this.y),-t):n;var o=i/r,a=o*o,s=this.a*this.a,u=this.b*this.b,l=oe(1/(1/s+a/u)),c=o*(l=r<0?-l:l);return n=new Z(this.x+l,this.y+c),t?n.rotate(new Z(this.x,this.y),-t):n},normalizedDistance:function(e){var t=e.x,n=e.y,r=this.a,i=this.b,o=this.x,a=this.y;return(t-o)*(t-o)/(r*r)+(n-a)*(n-a)/(i*i)},round:function(e){let t=1;if(e)switch(e){case 1:t=10;break;case 2:t=100;break;case 3:t=1e3;break;default:t=se(10,e)}return this.x=ae(this.x*t)/t,this.y=ae(this.y*t)/t,this.a=ae(this.a*t)/t,this.b=ae(this.b*t)/t,this},tangentTheta:function(e){var t,n,r=e.x,i=e.y,o=this.a,a=this.b,s=this.bbox().center(),u=s.x,l=s.y,c=r>s.x+o/2,f=r<s.x-o/2;return c||f?n=o*o/(r-u)-o*o*(i-l)*((t=r>s.x?i-30:i+30)-l)/(a*a*(r-u))+u:t=a*a/(i-l)-a*a*(r-u)*((n=i>s.y?r+30:r-30)-u)/(o*o*(i-l))+l,new Z(n,t).theta(e)},toString:function(){return new Z(this.x,this.y).toString()+" "+this.a+" "+this.b}};const le=ue,{abs:ce,cos:fe,sin:he,min:de,max:pe,round:ge,pow:ve}=Math,me=function(e,t,n,r){if(!(this instanceof me))return new me(e,t,n,r);Object(e)===e&&(t=e.y,n=e.width,r=e.height,e=e.x),this.x=void 0===e?0:e,this.y=void 0===t?0:t,this.width=void 0===n?0:n,this.height=void 0===r?0:r};me.fromEllipse=function(e){return e=new ue(e),new me(e.x-e.a,e.y-e.b,2*e.a,2*e.b)},me.fromPointUnion=function(...e){if(0===e.length)return null;const t=new Z;let n,r,i,o;n=r=1/0,i=o=-1/0;for(let a=0;a<e.length;a++){t.update(e[a]);const s=t.x,u=t.y;s<n&&(n=s),s>i&&(i=s),u<r&&(r=u),u>o&&(o=u)}return new me(n,r,i-n,o-r)},me.fromRectUnion=function(...e){if(0===e.length)return null;const t=new me;let n,r,i,o;n=r=1/0,i=o=-1/0;for(let a=0;a<e.length;a++){t.update(e[a]);const s=t.x,u=t.y,l=s+t.width,c=u+t.height;s<n&&(n=s),l>i&&(i=l),u<r&&(r=u),c>o&&(o=c)}return new me(n,r,i-n,o-r)},me.prototype={type:$.Rect,bbox:function(e){return this.clone().rotateAroundCenter(e)},rotateAroundCenter:function(e){if(!e)return this;const{width:t,height:n}=this,r=R(e),i=ce(he(r)),o=ce(fe(r)),a=t*o+n*i,s=t*i+n*o;return this.x+=(t-a)/2,this.y+=(n-s)/2,this.width=a,this.height=s,this},bottomLeft:function(){return new Z(this.x,this.y+this.height)},bottomLine:function(){return new re(this.bottomLeft(),this.bottomRight())},bottomMiddle:function(){return new Z(this.x+this.width/2,this.y+this.height)},center:function(){return new Z(this.x+this.width/2,this.y+this.height/2)},clone:function(){return new me(this)},containsPoint:function(e){return(e=new Z(e)).x>=this.x&&e.x<=this.x+this.width&&e.y>=this.y&&e.y<=this.y+this.height},containsRect:function(e){var t=new me(this).normalize(),n=new me(e).normalize(),r=t.width,i=t.height,o=n.width,a=n.height;if(!(r&&i&&o&&a))return!1;var s=t.x,u=t.y,l=n.x,c=n.y;return o+=l,r+=s,a+=c,i+=u,s<=l&&o<=r&&u<=c&&a<=i},corner:function(){return new Z(this.x+this.width,this.y+this.height)},equals:function(e){var t=new me(this).normalize(),n=new me(e).normalize();return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height},inflate:function(e,t){return void 0===e&&(e=0),void 0===t&&(t=e),this.x-=e,this.y-=t,this.width+=2*e,this.height+=2*t,this},intersect:function(e){var t=this.origin(),n=this.corner(),r=e.origin(),i=e.corner();if(i.x<=t.x||i.y<=t.y||r.x>=n.x||r.y>=n.y)return null;var o=pe(t.x,r.x),a=pe(t.y,r.y);return new me(o,a,de(n.x,i.x)-o,de(n.y,i.y)-a)},intersectionWithLine:function(e){var t,n,r=this,i=[r.topLine(),r.rightLine(),r.bottomLine(),r.leftLine()],o=[],a=[],s=i.length;for(n=0;n<s;n++)null!==(t=e.intersect(i[n]))&&a.indexOf(t.toString())<0&&(o.push(t),a.push(t.toString()));return o.length>0?o:null},intersectionWithLineFromCenterToPoint:function(e,t){e=new Z(e);var n,r=new Z(this.x+this.width/2,this.y+this.height/2);t&&e.rotate(r,t);for(var i=[this.topLine(),this.rightLine(),this.bottomLine(),this.leftLine()],o=new re(r,e),a=i.length-1;a>=0;--a){var s=i[a].intersection(o);if(null!==s){n=s;break}}return n&&t&&n.rotate(r,-t),n},leftLine:function(){return new re(this.topLeft(),this.bottomLeft())},leftMiddle:function(){return new Z(this.x,this.y+this.height/2)},maxRectScaleToFit:function(e,t){var n,r,i,o,a,s,u,l;e=new me(e),t||(t=e.center());var c=t.x,f=t.y;n=r=i=o=a=s=u=l=1/0;var h=e.topLeft();h.x<c&&(n=(this.x-c)/(h.x-c)),h.y<f&&(a=(this.y-f)/(h.y-f));var d=e.bottomRight();d.x>c&&(r=(this.x+this.width-c)/(d.x-c)),d.y>f&&(s=(this.y+this.height-f)/(d.y-f));var p=e.topRight();p.x>c&&(i=(this.x+this.width-c)/(p.x-c)),p.y<f&&(u=(this.y-f)/(p.y-f));var g=e.bottomLeft();return g.x<c&&(o=(this.x-c)/(g.x-c)),g.y>f&&(l=(this.y+this.height-f)/(g.y-f)),{sx:de(n,r,i,o),sy:de(a,s,u,l)}},maxRectUniformScaleToFit:function(e,t){var n=this.maxRectScaleToFit(e,t);return de(n.sx,n.sy)},moveAndExpand:function(e){return this.x+=e.x||0,this.y+=e.y||0,this.width+=e.width||0,this.height+=e.height||0,this},normalize:function(){var e=this.x,t=this.y,n=this.width,r=this.height;return this.width<0&&(e=this.x+this.width,n=-this.width),this.height<0&&(t=this.y+this.height,r=-this.height),this.x=e,this.y=t,this.width=n,this.height=r,this},offset:function(e,t){return Z.prototype.offset.call(this,e,t)},origin:function(){return new Z(this.x,this.y)},pointNearestToPoint:function(e){if(e=new Z(e),this.containsPoint(e))switch(this.sideNearestToPoint(e)){case"right":return new Z(this.x+this.width,e.y);case"left":return new Z(this.x,e.y);case"bottom":return new Z(e.x,this.y+this.height);case"top":return new Z(e.x,this.y)}return e.adhereToRect(this)},rightLine:function(){return new re(this.topRight(),this.bottomRight())},rightMiddle:function(){return new Z(this.x+this.width,this.y+this.height/2)},round:function(e){let t=1;if(e)switch(e){case 1:t=10;break;case 2:t=100;break;case 3:t=1e3;break;default:t=ve(10,e)}return this.x=ge(this.x*t)/t,this.y=ge(this.y*t)/t,this.width=ge(this.width*t)/t,this.height=ge(this.height*t)/t,this},scale:function(e,t,n){return n=this.origin().scale(e,t,n),this.x=n.x,this.y=n.y,this.width*=e,this.height*=t,this},sideNearestToPoint:function(e){var t=(e=new Z(e)).x-this.x,n=this.x+this.width-e.x,r=e.y-this.y,i=t,o="left";return n<i&&(i=n,o="right"),r<i&&(i=r,o="top"),this.y+this.height-e.y<i&&(o="bottom"),o},snapToGrid:function(e,t){var n=this.origin().snapToGrid(e,t),r=this.corner().snapToGrid(e,t);return this.x=n.x,this.y=n.y,this.width=r.x-n.x,this.height=r.y-n.y,this},toJSON:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},topLine:function(){return new re(this.topLeft(),this.topRight())},topMiddle:function(){return new Z(this.x+this.width/2,this.y)},topRight:function(){return new Z(this.x+this.width,this.y)},toString:function(){return this.origin().toString()+" "+this.corner().toString()},union:function(e){return me.fromRectUnion(this,e)},update:function(e,t,n,r){return Object(e)===e&&(t=e.y,n=e.width,r=e.height,e=e.x),this.x=e||0,this.y=t||0,this.width=n||0,this.height=r||0,this}},me.prototype.bottomRight=me.prototype.corner,me.prototype.topLeft=me.prototype.origin,me.prototype.translate=me.prototype.offset;const ye=me;function be(e){if(""===(e=e.trim()))return[];const t=[],n=e.split(/\s*,\s*|\s+/),r=n.length;for(let e=0;e<r;e+=2)t.push({x:+n[e],y:+n[e+1]});return t}function we(e){const t=e.length;if(0===t)return[];const n=[];for(let r=0;r<t;r++){const t=e[r].clone();n.push(t)}return n}function xe(e){const{abs:t}=Math;var n,r,i,o=e.length;if(0===o)return[];for(n=0;n<o;n++)(void 0===i||e[n].y<i.y||e[n].y===i.y&&e[n].x>i.x)&&(i=e[n]);var a=[];for(n=0;n<o;n++){var s=i.theta(e[n]);0===s&&(s=360);var u=[e[n],n,s];a.push(u)}if(a.sort((function(e,t){var n=e[2]-t[2];return 0===n&&(n=t[1]-e[1]),n})),a.length>2){var l=a[a.length-1];a.unshift(l)}for(var c,f,h,d,p,g,v,m={},y=[];0!==a.length;)if(f=(c=a.pop())[0],!m.hasOwnProperty(c[0]+"@@"+c[1]))for(var b=!1;!b;)if(y.length<2)y.push(c),b=!0;else{d=(h=y.pop())[0];var w=(g=(p=y.pop())[0]).cross(d,f);if(w<0)y.push(p),y.push(h),y.push(c),b=!0;else if(0===w){var x=d.angleBetween(g,f);t(x-180)<1e-10||d.equals(f)||g.equals(d)?(m[h[0]+"@@"+h[1]]=d,y.push(p)):t((x+1)%360-1)<1e-10&&(y.push(p),a.push(h))}else m[h[0]+"@@"+h[1]]=d,y.push(p)}y.length>2&&y.pop();var k=-1;for(r=y.length,n=0;n<r;n++){var S=y[n][1];(void 0===v||S<v)&&(v=S,k=n)}var _=[];if(k>0){var E=y.slice(k),C=y.slice(0,k);_=E.concat(C)}else _=y;var A=[];for(r=_.length,n=0;n<r;n++)A.push(_[n][0]);return A}const ke=function(e){return this instanceof ke?"string"==typeof e?new ke.parse(e):void(this.points=Array.isArray(e)?e.map(Z):[]):new ke(e)};ke.parse=function(e){return new ke(be(e))},ke.fromRect=function(e){return new ke([e.topLeft(),e.topRight(),e.bottomRight(),e.bottomLeft(),e.topLeft()])},ke.prototype={type:$.Polyline,bbox:function(){var e=1/0,t=-1/0,n=1/0,r=-1/0,i=this.points,o=i.length;if(0===o)return null;for(var a=0;a<o;a++){var s=i[a],u=s.x,l=s.y;u<e&&(e=u),u>t&&(t=u),l<n&&(n=l),l>r&&(r=l)}return new me(e,n,t-e,r-n)},clone:function(){return new ke(we(this.points))},closestPoint:function(e){var t=this.closestPointLength(e);return this.pointAtLength(t)},closestPointLength:function(e){var t,n=this.lengthPoints(),r=n.length;if(0===r)return 0;if(1===r)return 0;for(var i=1/0,o=0,a=r-1,s=0;s<a;s++){var u=new re(n[s],n[s+1]),l=u.length(),c=u.closestPointNormalizedLength(e),f=u.pointAt(c).squaredDistance(e);f<i&&(i=f,t=o+c*l),o+=l}return t},closestPointNormalizedLength:function(e){var t=this.closestPointLength(e);if(0===t)return 0;var n=this.length();return 0===n?0:t/n},closestPointTangent:function(e){var t=this.closestPointLength(e);return this.tangentAtLength(t)},containsPoint:function(e){var t=this.points,n=t.length;if(0===n)return!1;for(var r=e.x,i=e.y,o=n-1,a=0,s=0,u=new re,l=new re,c=new Z;a<n;a++){var f=t[o],h=t[a];if(e.equals(f))return!0;if(u.start=f,u.end=h,u.containsPoint(e))return!0;if(i<=f.y&&i>h.y||i>f.y&&i<=h.y){var d=f.x-r>h.x-r?f.x-r:h.x-r;d>=0&&(c.x=r+d,c.y=i,l.start=e,l.end=c,u.intersect(l)&&s++)}o=a}return s%2==1},close:function(){const{start:e,end:t,points:n}=this;return e&&t&&!e.equals(t)&&n.push(e.clone()),this},lengthPoints:function(){return this.points},convexHull:function(){return new ke(xe(this.points))},equals:function(e){if(!e)return!1;var t=this.points,n=e.points,r=t.length;if(n.length!==r)return!1;for(var i=0;i<r;i++){var o=t[i],a=e.points[i];if(!o.equals(a))return!1}return!0},intersectionWithLine:function(e){for(var t=new re(e),n=[],r=this.lengthPoints(),i=new re,o=0,a=r.length-1;o<a;o++){i.start=r[o],i.end=r[o+1];var s=t.intersectionWithLine(i);s&&n.push(s[0])}return n.length>0?n:null},isDifferentiable:function(){var e=this.points,t=e.length;if(0===t)return!1;for(var n=new re,r=t-1,i=0;i<r;i++)if(n.start=e[i],n.end=e[i+1],n.isDifferentiable())return!0;return!1},length:function(){var e=this.lengthPoints(),t=e.length;if(0===t)return 0;for(var n=0,r=t-1,i=0;i<r;i++)n+=e[i].distance(e[i+1]);return n},pointAt:function(e){var t=this.lengthPoints(),n=t.length;if(0===n)return null;if(1===n)return t[0].clone();if(e<=0)return t[0].clone();if(e>=1)return t[n-1].clone();var r=this.length()*e;return this.pointAtLength(r)},pointAtLength:function(e){var t=this.lengthPoints(),n=t.length;if(0===n)return null;if(1===n)return t[0].clone();var r=!0;e<0&&(r=!1,e=-e);for(var i=0,o=n-1,a=0;a<o;a++){var s=r?a:o-1-a,u=t[s],l=t[s+1],c=new re(u,l),f=u.distance(l);if(e<=i+f)return c.pointAtLength((r?1:-1)*(e-i));i+=f}return(r?t[n-1]:t[0]).clone()},round:function(e){for(var t=this.points,n=t.length,r=0;r<n;r++)t[r].round(e);return this},scale:function(e,t,n){for(var r=this.points,i=r.length,o=0;o<i;o++)r[o].scale(e,t,n);return this},simplify:function(e={}){const t=this.points;if(t.length<3)return this;const n=e.threshold||0;let r=0;for(;t[r+2];){const e=r+1,i=r+2,o=t[r],a=t[e],s=t[i];new re(o,s).closestPoint(a).distance(a)<=n?t.splice(e,1):r+=1}return this},tangentAt:function(e){var t=this.lengthPoints().length;if(0===t)return null;if(1===t)return null;e<0&&(e=0),e>1&&(e=1);var n=this.length()*e;return this.tangentAtLength(n)},tangentAtLength:function(e){var t=this.lengthPoints(),n=t.length;if(0===n)return null;if(1===n)return null;var r,i=!0;e<0&&(i=!1,e=-e);for(var o=0,a=n-1,s=0;s<a;s++){var u=i?s:a-1-s,l=t[u],c=t[u+1],f=new re(l,c),h=l.distance(c);if(f.isDifferentiable()){if(e<=o+h)return f.tangentAtLength((i?1:-1)*(e-o));r=f}o+=h}if(r){var d=i?1:0;return r.tangentAt(d)}return null},toString:function(){return this.points+""},translate:function(e,t){for(var n=this.points,r=n.length,i=0;i<r;i++)n[i].translate(e,t);return this},serialize:function(){var e=this.points,t=e.length;if(0===t)return"";for(var n="",r=0;r<t;r++){var i=e[r];n+=i.x+","+i.y+" "}return n.trim()}},Object.defineProperty(ke.prototype,"start",{configurable:!0,enumerable:!0,get:function(){return 0===this.points.length?null:this.points[0]}}),Object.defineProperty(ke.prototype,"end",{configurable:!0,enumerable:!0,get:function(){var e=this.points.length;return 0===e?null:this.points[e-1]}});const{abs:Se,sqrt:_e,min:Ee,max:Ce,pow:Ae}=Math,Pe=function(e,t,n,r){return this instanceof Pe?e instanceof Pe?new Pe(e.start,e.controlPoint1,e.controlPoint2,e.end):(this.start=new Z(e),this.controlPoint1=new Z(t),this.controlPoint2=new Z(n),void(this.end=new Z(r))):new Pe(e,t,n,r)};function Le(e){var t,n,r=[];for(n=arguments.length,t=1;t<n;t++)r.push(arguments[t]);if(!e)throw new Error("Missing a parent object.");var i=Object.create(e);for(n=r.length,t=0;t<n;t++){var o,a,s=r[t];for(a in s)s.hasOwnProperty(a)&&(delete i[a],o=Object.getOwnPropertyDescriptor(s,a),Object.defineProperty(i,a,o))}return i}Pe.throughPoints=function(){function e(e){var t=e.length,n=[],r=[],i=2;n[0]=e[0]/i;for(var o=1;o<t;o++)r[o]=1/i,i=(o<t-1?4:3.5)-r[o],n[o]=(e[o]-n[o-1])/i;for(o=1;o<t;o++)n[t-o-1]-=r[t-o]*n[t-o];return n}return function(t){if(!t||Array.isArray(t)&&t.length<2)throw new Error("At least 2 points are required");for(var n=function(t){var n,r=[],i=[],o=t.length-1;if(1==o)return r[0]=new Z((2*t[0].x+t[1].x)/3,(2*t[0].y+t[1].y)/3),i[0]=new Z(2*r[0].x-t[0].x,2*r[0].y-t[0].y),[r,i];var a=[];for(n=1;n<o-1;n++)a[n]=4*t[n].x+2*t[n+1].x;a[0]=t[0].x+2*t[1].x,a[o-1]=(8*t[o-1].x+t[o].x)/2;var s=e(a);for(n=1;n<o-1;++n)a[n]=4*t[n].y+2*t[n+1].y;a[0]=t[0].y+2*t[1].y,a[o-1]=(8*t[o-1].y+t[o].y)/2;var u=e(a);for(n=0;n<o;n++)r.push(new Z(s[n],u[n])),n<o-1?i.push(new Z(2*t[n+1].x-s[n+1],2*t[n+1].y-u[n+1])):i.push(new Z((t[o].x+s[o-1])/2,(t[o].y+u[o-1])/2));return[r,i]}(t),r=[],i=n[0].length,o=0;o<i;o++){var a=new Z(n[0][o].x,n[0][o].y),s=new Z(n[1][o].x,n[1][o].y);r.push(new Pe(t[o],a,s,t[o+1]))}return r}}(),Pe.prototype={type:$.Curve,bbox:function(){for(var e,t,n,r,i,o,a,s,u=this.start,l=this.controlPoint1,c=this.controlPoint2,f=this.end,h=u.x,d=u.y,p=l.x,g=l.y,v=c.x,m=c.y,y=f.x,b=f.y,w=new Array,x=new Array,k=[new Array,new Array],S=0;S<2;++S)if(0===S?(t=6*h-12*p+6*v,e=-3*h+9*p-9*v+3*y,n=3*p-3*h):(t=6*d-12*g+6*m,e=-3*d+9*g-9*m+3*b,n=3*g-3*d),Se(e)<1e-12){if(Se(t)<1e-12)continue;0<(r=-n/t)&&r<1&&x.push(r)}else s=_e(a=t*t-4*n*e),a<0||(0<(i=(-t+s)/(2*e))&&i<1&&x.push(i),0<(o=(-t-s)/(2*e))&&o<1&&x.push(o));for(var _,E,C,A=x.length,P=A;A--;)E=(_=1-(r=x[A]))*_*_*h+3*_*_*r*p+3*_*r*r*v+r*r*r*y,k[0][A]=E,C=_*_*_*d+3*_*_*r*g+3*_*r*r*m+r*r*r*b,k[1][A]=C,w[A]={X:E,Y:C};x[P]=0,x[P+1]=1,w[P]={X:h,Y:d},w[P+1]={X:y,Y:b},k[0][P]=h,k[1][P]=d,k[0][P+1]=y,k[1][P+1]=b,x.length=P+2,k[0].length=P+2,k[1].length=P+2,w.length=P+2;var L=Ee.apply(null,k[0]),T=Ee.apply(null,k[1]),N=Ce.apply(null,k[0]),O=Ce.apply(null,k[1]);return new me(L,T,N-L,O-T)},clone:function(){return new Pe(this.start,this.controlPoint1,this.controlPoint2,this.end)},closestPoint:function(e,t){return this.pointAtT(this.closestPointT(e,t))},closestPointLength:function(e,t){var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,subdivisions:void 0===t.subdivisions?this.getSubdivisions({precision:n}):t.subdivisions};return this.lengthAtT(this.closestPointT(e,r),r)},closestPointNormalizedLength:function(e,t){var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,subdivisions:void 0===t.subdivisions?this.getSubdivisions({precision:n}):t.subdivisions},i=this.closestPointLength(e,r);if(!i)return 0;var o=this.length(r);return 0===o?0:i/o},closestPointT:function(e,t){for(var n,r,i,o,a,s,u,l=void 0===(t=t||{}).precision?this.PRECISION:t.precision,c=void 0===t.subdivisions?this.getSubdivisions({precision:l}):t.subdivisions,f=c.length,h=f?1/f:0,d=0;d<f;d++){var p=c[d],g=p.start.distance(e),v=p.end.distance(e),m=g+v;(!u||m<u)&&(n=p,r=d*h,i=(d+1)*h,o=g,a=v,s=p.start.distance(p.end),u=m)}for(var y=Ae(10,-l);;){var b=o?Se(o-a)/o:0,w=a?Se(o-a)/a:0;if(b<y||w<y||!o||o<s*y||!a||a<s*y)return o<=a?r:i;var x=n.divide(.5);h/=2;var k=x[0].start.distance(e),S=x[0].end.distance(e),_=k+S,E=x[1].start.distance(e),C=x[1].end.distance(e);_<=E+C?(n=x[0],i-=h,o=k,a=S):(n=x[1],r+=h,o=E,a=C)}},closestPointTangent:function(e,t){return this.tangentAtT(this.closestPointT(e,t))},containsPoint:function(e,t){return this.toPolyline(t).containsPoint(e)},divideAt:function(e,t){if(e<=0)return this.divideAtT(0);if(e>=1)return this.divideAtT(1);var n=this.tAt(e,t);return this.divideAtT(n)},divideAtLength:function(e,t){var n=this.tAtLength(e,t);return this.divideAtT(n)},divideAtT:function(e){var t=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(e<=0)return[new Pe(t,t,t,t),new Pe(t,n,r,i)];if(e>=1)return[new Pe(t,n,r,i),new Pe(i,i,i,i)];var o=this.getSkeletonPoints(e),a=o.startControlPoint1,s=o.startControlPoint2,u=o.divider,l=o.dividerControlPoint1,c=o.dividerControlPoint2;return[new Pe(t,a,s,u),new Pe(u,l,c,i)]},endpointDistance:function(){return this.start.distance(this.end)},equals:function(e){return!!e&&this.start.x===e.start.x&&this.start.y===e.start.y&&this.controlPoint1.x===e.controlPoint1.x&&this.controlPoint1.y===e.controlPoint1.y&&this.controlPoint2.x===e.controlPoint2.x&&this.controlPoint2.y===e.controlPoint2.y&&this.end.x===e.end.x&&this.end.y===e.end.y},getSkeletonPoints:function(e){var t=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(e<=0)return{startControlPoint1:t.clone(),startControlPoint2:t.clone(),divider:t.clone(),dividerControlPoint1:n.clone(),dividerControlPoint2:r.clone()};if(e>=1)return{startControlPoint1:n.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};var o=new re(t,n).pointAt(e),a=new re(n,r).pointAt(e),s=new re(r,i).pointAt(e),u=new re(o,a).pointAt(e),l=new re(a,s).pointAt(e);return{startControlPoint1:o,startControlPoint2:u,divider:new re(u,l).pointAt(e),dividerControlPoint1:l,dividerControlPoint2:s}},getSubdivisions:function(e){var t=void 0===(e=e||{}).precision?this.PRECISION:e.precision,n=[new Pe(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(0===t)return n;for(var r=this.endpointDistance(),i=Ae(10,-t),o=0;;){o+=1;for(var a=[],s=n.length,u=0;u<s;u++){var l=n[u].divide(.5);a.push(l[0],l[1])}for(var c=0,f=a.length,h=0;h<f;h++)c+=a[h].endpointDistance();if(o>1&&(0!==c?(c-r)/c:0)<i)return a;n=a,r=c}},isDifferentiable:function(){var e=this.start,t=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(e.equals(t)&&t.equals(n)&&n.equals(r))},length:function(e){for(var t=void 0===(e=e||{}).precision?this.PRECISION:e.precision,n=void 0===e.subdivisions?this.getSubdivisions({precision:t}):e.subdivisions,r=0,i=n.length,o=0;o<i;o++)r+=n[o].endpointDistance();return r},lengthAtT:function(e,t){if(e<=0)return 0;var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision;return this.divide(e)[0].length({precision:n})},pointAt:function(e,t){if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();var n=this.tAt(e,t);return this.pointAtT(n)},pointAtLength:function(e,t){var n=this.tAtLength(e,t);return this.pointAtT(n)},pointAtT:function(e){return e<=0?this.start.clone():e>=1?this.end.clone():this.getSkeletonPoints(e).divider},PRECISION:3,round:function(e){return this.start.round(e),this.controlPoint1.round(e),this.controlPoint2.round(e),this.end.round(e),this},scale:function(e,t,n){return this.start.scale(e,t,n),this.controlPoint1.scale(e,t,n),this.controlPoint2.scale(e,t,n),this.end.scale(e,t,n),this},tangentAt:function(e,t){if(!this.isDifferentiable())return null;e<0?e=0:e>1&&(e=1);var n=this.tAt(e,t);return this.tangentAtT(n)},tangentAtLength:function(e,t){if(!this.isDifferentiable())return null;var n=this.tAtLength(e,t);return this.tangentAtT(n)},tangentAtT:function(e){if(!this.isDifferentiable())return null;e<0?e=0:e>1&&(e=1);var t=this.getSkeletonPoints(e),n=t.startControlPoint2,r=t.dividerControlPoint1,i=t.divider,o=new re(n,r);return o.translate(i.x-n.x,i.y-n.y),o},tAt:function(e,t){if(e<=0)return 0;if(e>=1)return 1;var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,subdivisions:void 0===t.subdivisions?this.getSubdivisions({precision:n}):t.subdivisions},i=this.length(r)*e;return this.tAtLength(i,r)},tAtLength:function(e,t){var n=!0;e<0&&(n=!1,e=-e);for(var r,i,o,a,s,u=void 0===(t=t||{}).precision?this.PRECISION:t.precision,l=void 0===t.subdivisions?this.getSubdivisions({precision:u}):t.subdivisions,c={precision:u,subdivisions:l},f=0,h=l.length,d=1/h,p=0;p<h;p++){var g=n?p:h-1-p,v=l[p],m=v.endpointDistance();if(e<=f+m){r=v,i=g*d,o=(g+1)*d,a=n?e-f:m+f-e,s=n?m+f-e:e-f;break}f+=m}if(!r)return n?1:0;for(var y=this.length(c),b=Ae(10,-u);;){var w,x;if((0!==y?a/y:0)<b)return i;if((0!==y?s/y:0)<b)return o;var k=r.divide(.5);d/=2;var S=k[0].endpointDistance(),_=k[1].endpointDistance();a<=S?(r=k[0],o-=d,x=S-(w=a)):(r=k[1],i+=d,x=_-(w=a-S)),a=w,s=x}},toPoints:function(e){for(var t=void 0===(e=e||{}).precision?this.PRECISION:e.precision,n=void 0===e.subdivisions?this.getSubdivisions({precision:t}):e.subdivisions,r=[n[0].start.clone()],i=n.length,o=0;o<i;o++){var a=n[o];r.push(a.end.clone())}return r},toPolyline:function(e){return new ke(this.toPoints(e))},toString:function(){return this.start+" "+this.controlPoint1+" "+this.controlPoint2+" "+this.end},translate:function(e,t){return this.start.translate(e,t),this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t),this}},Pe.prototype.divide=Pe.prototype.divideAtT;const Te=function(e){if(!(this instanceof Te))return new Te(e);if("string"==typeof e)return new Te.parse(e);var t,n;if(this.segments=[],e)if(Array.isArray(e)&&0!==e.length)if(n=(e=e.reduce((function(e,t){return e.concat(t)}),[])).length,e[0].isSegment)for(t=0;t<n;t++){var r=e[t];this.appendSegment(r)}else{var i=null;for(t=0;t<n;t++){var o=e[t];if(!(o instanceof re||o instanceof Pe))throw new Error("Cannot construct a path segment from the provided object.");0===t&&this.appendSegment(Te.createSegment("M",o.start)),i&&!i.end.equals(o.start)&&this.appendSegment(Te.createSegment("M",o.start)),o instanceof re?this.appendSegment(Te.createSegment("L",o.end)):o instanceof Pe&&this.appendSegment(Te.createSegment("C",o.controlPoint1,o.controlPoint2,o.end)),i=o}}else if(e.isSegment)this.appendSegment(e);else if(e instanceof re)this.appendSegment(Te.createSegment("M",e.start)),this.appendSegment(Te.createSegment("L",e.end));else if(e instanceof Pe)this.appendSegment(Te.createSegment("M",e.start)),this.appendSegment(Te.createSegment("C",e.controlPoint1,e.controlPoint2,e.end));else{if(!(e instanceof ke))throw new Error("Cannot construct a path from the provided object.");if(!e.points||0===e.points.length)return;for(n=e.points.length,t=0;t<n;t++){var a=e.points[t];0===t?this.appendSegment(Te.createSegment("M",a)):this.appendSegment(Te.createSegment("L",a))}}};function Ne(e,t){return t.unshift(null),new(Function.prototype.bind.apply(e,t))}Te.parse=function(e){if(!e)return new Te;for(var t=new Te,n=e.match(/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g),r=n.length,i=0;i<r;i++){var o=n[i].match(/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g),a=Te.createSegment.apply(this,o);t.appendSegment(a)}return t},Te.createSegment=function(e){if(!e)throw new Error("Type must be provided.");var t=Te.segmentTypes[e];if(!t)throw new Error(e+" is not a recognized path segment type.");for(var n=[],r=arguments.length,i=1;i<r;i++)n.push(arguments[i]);return Ne(t,n)},Te.prototype={type:$.Path,appendSegment:function(e){var t,n=this.segments,r=n.length,i=0!==r?n[r-1]:null;if(Array.isArray(e)){if(!(e=e.reduce((function(e,t){return e.concat(t)}),[]))[0].isSegment)throw new Error("Segments required.");for(var o=e.length,a=0;a<o;a++){var s=e[a];t=this.prepareSegment(s,i,null),n.push(t),i=t}}else{if(!e||!e.isSegment)throw new Error("Segment required.");t=this.prepareSegment(e,i,null),n.push(t)}},bbox:function(){var e,t=this.segments,n=t.length;if(0===n)return null;for(var r=0;r<n;r++){var i=t[r];if(i.isVisible){var o=i.bbox();e=e?e.union(o):o}}if(e)return e;var a=t[n-1];return new me(a.end.x,a.end.y,0,0)},clone:function(){for(var e=this.segments,t=e.length,n=new Te,r=0;r<t;r++){var i=e[r].clone();n.appendSegment(i)}return n},closestPoint:function(e,t){var n=this.closestPointT(e,t);return n?this.pointAtT(n):null},closestPointLength:function(e,t){var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.closestPointT(e,r);return i?this.lengthAtT(i,r):0},closestPointNormalizedLength:function(e,t){var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.closestPointLength(e,r);if(0===i)return 0;var o=this.length(r);return 0===o?0:i/o},closestPointT:function(e,t){var n=this.segments,r=n.length;if(0===r)return null;for(var i,o=void 0===(t=t||{}).precision?this.PRECISION:t.precision,a=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):t.segmentSubdivisions,s=1/0,u=0;u<r;u++){var l=n[u],c=a[u];if(l.isVisible){var f=l.closestPointT(e,{precision:o,subdivisions:c}),h=l.pointAtT(f),d=new re(h,e).squaredLength();d<s&&(i={segmentIndex:u,value:f},s=d)}}return i||{segmentIndex:r-1,value:1}},closestPointTangent:function(e,t){var n=this.segments,r=n.length;if(0===r)return null;for(var i,o=void 0===(t=t||{}).precision?this.PRECISION:t.precision,a=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):t.segmentSubdivisions,s=1/0,u=0;u<r;u++){var l=n[u],c=a[u];if(l.isDifferentiable()){var f=l.closestPointT(e,{precision:o,subdivisions:c}),h=l.pointAtT(f),d=new re(h,e).squaredLength();d<s&&(i=l.tangentAtT(f),s=d)}}return i||null},containsPoint:function(e,t){var n=this.toPolylines(t);if(!n)return!1;for(var r=n.length,i=0,o=0;o<r;o++)n[o].containsPoint(e)&&i++;return i%2==1},divideAt:function(e,t){if(0===this.segments.length)return null;e<0&&(e=0),e>1&&(e=1);var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.length(r)*e;return this.divideAtLength(i,r)},divideAtLength:function(e,t){var n=this.segments.length;if(0===n)return null;var r=!0;e<0&&(r=!1,e=-e);var i,o,a,s,u,l,c,f=void 0===(t=t||{}).precision?this.PRECISION:t.precision,h=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:f}):t.segmentSubdivisions,d=0;for(i=0;i<n;i++){var p=r?i:n-1-i;o=this.getSegment(p);var g=h[p],v=o.length({precision:f,subdivisions:g});if(o.isDifferentiable()&&(u=o,l=p,e<=d+v)){s=p,a=o.divideAtLength((r?1:-1)*(e-d),{precision:f,subdivisions:g});break}d+=v}if(!u)return null;a||(s=l,c=r?1:0,a=u.divideAtT(c));var m=this.clone();m.replaceSegment(s,a);var y=s,b=s+1,w=s+2;a[0].isDifferentiable()||(m.removeSegment(y),b-=1,w-=1);var x=m.getSegment(b).start;m.insertSegment(b,Te.createSegment("M",x)),w+=1,a[1].isDifferentiable()||(m.removeSegment(w-1),w-=1);var k=w-y-1;for(i=w;i<m.segments.length;i++){var S=this.getSegment(i-k);if("Z"===(o=m.getSegment(i)).type&&!S.subpathStartSegment.end.equals(o.subpathStartSegment.end)){var _=Te.createSegment("L",S.end);m.replaceSegment(i,_)}}return[new Te(m.segments.slice(0,b)),new Te(m.segments.slice(b))]},equals:function(e){if(!e)return!1;var t=this.segments,n=e.segments,r=t.length;if(n.length!==r)return!1;for(var i=0;i<r;i++){var o=t[i],a=n[i];if(o.type!==a.type||!o.equals(a))return!1}return!0},getSegment:function(e){var t=this.segments,n=t.length;if(0===n)throw new Error("Path has no segments.");if(e<0&&(e=n+e),e>=n||e<0)throw new Error("Index out of range.");return t[e]},getSegmentSubdivisions:function(e){for(var t=this.segments,n=t.length,r=void 0===(e=e||{}).precision?this.PRECISION:e.precision,i=[],o=0;o<n;o++){var a=t[o].getSubdivisions({precision:r});i.push(a)}return i},getSubpaths:function(){const e=this.clone().validate().segments,t=e.length,n=[];for(let r=0;r<t;r++){const t=e[r];t.isSubpathStart?n.push(new Te(t)):n[n.length-1].appendSegment(t)}return n},insertSegment:function(e,t){var n,r=this.segments,i=r.length;if(e<0&&(e=i+e+1),e>i||e<0)throw new Error("Index out of range.");var o=null,a=null;if(0!==i&&(a=e>=1?(o=r[e-1]).nextSegment:r[0]),Array.isArray(t)){if(!(t=t.reduce((function(e,t){return e.concat(t)}),[]))[0].isSegment)throw new Error("Segments required.");for(var s=t.length,u=0;u<s;u++){var l=t[u];n=this.prepareSegment(l,o,a),r.splice(e+u,0,n),o=n}}else{if(!t||!t.isSegment)throw new Error("Segment required.");n=this.prepareSegment(t,o,a),r.splice(e,0,n)}},intersectionWithLine:function(e,t){var n=null,r=this.toPolylines(t);if(!r)return null;for(var i=0,o=r.length;i<o;i++){var a=r[i],s=e.intersect(a);s&&(n||(n=[]),Array.isArray(s)?Array.prototype.push.apply(n,s):n.push(s))}return n},isDifferentiable:function(){for(var e=this.segments,t=e.length,n=0;n<t;n++)if(e[n].isDifferentiable())return!0;return!1},isValid:function(){var e=this.segments;return 0===e.length||"M"===e[0].type},length:function(e){var t=this.segments,n=t.length;if(0===n)return 0;for(var r=void 0===(e=e||{}).precision?this.PRECISION:e.precision,i=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:r}):e.segmentSubdivisions,o=0,a=0;a<n;a++){var s=t[a],u=i[a];o+=s.length({subdivisions:u})}return o},lengthAtT:function(e,t){var n=this.segments,r=n.length;if(0===r)return 0;var i=e.segmentIndex;if(i<0)return 0;var o=e.value;i>=r?(i=r-1,o=1):o<0?o=0:o>1&&(o=1);for(var a,s=void 0===(t=t||{}).precision?this.PRECISION:t.precision,u=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:s}):t.segmentSubdivisions,l=0,c=0;c<i;c++){var f=n[c];a=u[c],l+=f.length({precisison:s,subdivisions:a})}return f=n[i],a=u[i],l+f.lengthAtT(o,{precisison:s,subdivisions:a})},pointAt:function(e,t){if(0===this.segments.length)return null;if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.length(r)*e;return this.pointAtLength(i,r)},pointAtLength:function(e,t){var n=this.segments,r=n.length;if(0===r)return null;if(0===e)return this.start.clone();var i=!0;e<0&&(i=!1,e=-e);for(var o,a=void 0===(t=t||{}).precision?this.PRECISION:t.precision,s=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:a}):t.segmentSubdivisions,u=0,l=0;l<r;l++){var c=i?l:r-1-l,f=n[c],h=s[c],d=f.length({precision:a,subdivisions:h});if(f.isVisible){if(e<=u+d)return f.pointAtLength((i?1:-1)*(e-u),{precision:a,subdivisions:h});o=f}u+=d}return o?i?o.end:o.start:n[r-1].end.clone()},pointAtT:function(e){var t=this.segments,n=t.length;if(0===n)return null;var r=e.segmentIndex;if(r<0)return t[0].pointAtT(0);if(r>=n)return t[n-1].pointAtT(1);var i=e.value;return i<0?i=0:i>1&&(i=1),t[r].pointAtT(i)},PRECISION:3,prepareSegment:function(e,t,n){e.previousSegment=t,e.nextSegment=n,t&&(t.nextSegment=e),n&&(n.previousSegment=e);var r=e;return e.isSubpathStart&&(e.subpathStartSegment=e,r=n),r&&this.updateSubpathStartSegment(r),e},removeSegment:function(e){var t=this.segments,n=t.length;if(0===n)throw new Error("Path has no segments.");if(e<0&&(e=n+e),e>=n||e<0)throw new Error("Index out of range.");var r=t.splice(e,1)[0],i=r.previousSegment,o=r.nextSegment;i&&(i.nextSegment=o),o&&(o.previousSegment=i),r.isSubpathStart&&o&&this.updateSubpathStartSegment(o)},replaceSegment:function(e,t){var n,r=this.segments,i=r.length;if(0===i)throw new Error("Path has no segments.");if(e<0&&(e=i+e),e>=i||e<0)throw new Error("Index out of range.");var o=r[e],a=o.previousSegment,s=o.nextSegment,u=o.isSubpathStart;if(Array.isArray(t)){if(!(t=t.reduce((function(e,t){return e.concat(t)}),[]))[0].isSegment)throw new Error("Segments required.");r.splice(e,1);for(var l=t.length,c=0;c<l;c++){var f=t[c];n=this.prepareSegment(f,a,s),r.splice(e+c,0,n),a=n,u&&n.isSubpathStart&&(u=!1)}}else{if(!t||!t.isSegment)throw new Error("Segment required.");n=this.prepareSegment(t,a,s),r.splice(e,1,n),u&&n.isSubpathStart&&(u=!1)}u&&s&&this.updateSubpathStartSegment(s)},round:function(e){for(var t=this.segments,n=t.length,r=0;r<n;r++)t[r].round(e);return this},scale:function(e,t,n){for(var r=this.segments,i=r.length,o=0;o<i;o++)r[o].scale(e,t,n);return this},segmentAt:function(e,t){var n=this.segmentIndexAt(e,t);return n?this.getSegment(n):null},segmentAtLength:function(e,t){var n=this.segmentIndexAtLength(e,t);return n?this.getSegment(n):null},segmentIndexAt:function(e,t){if(0===this.segments.length)return null;e<0&&(e=0),e>1&&(e=1);var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.length(r)*e;return this.segmentIndexAtLength(i,r)},segmentIndexAtLength:function(e,t){var n=this.segments,r=n.length;if(0===r)return null;var i=!0;e<0&&(i=!1,e=-e);for(var o=void 0===(t=t||{}).precision?this.PRECISION:t.precision,a=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):t.segmentSubdivisions,s=null,u=0,l=0;l<r;l++){var c=i?l:r-1-l,f=n[c],h=a[c],d=f.length({precision:o,subdivisions:h});if(f.isVisible){if(e<=u+d)return c;s=c}u+=d}return s},serialize:function(){if(!this.isValid())throw new Error("Invalid path segments.");return this.toString()},tangentAt:function(e,t){if(0===this.segments.length)return null;e<0&&(e=0),e>1&&(e=1);var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.length(r)*e;return this.tangentAtLength(i,r)},tangentAtLength:function(e,t){var n=this.segments,r=n.length;if(0===r)return null;var i=!0;e<0&&(i=!1,e=-e);for(var o,a=void 0===(t=t||{}).precision?this.PRECISION:t.precision,s=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:a}):t.segmentSubdivisions,u=0,l=0;l<r;l++){var c=i?l:r-1-l,f=n[c],h=s[c],d=f.length({precision:a,subdivisions:h});if(f.isDifferentiable()){if(e<=u+d)return f.tangentAtLength((i?1:-1)*(e-u),{precision:a,subdivisions:h});o=f}u+=d}if(o){var p=i?1:0;return o.tangentAtT(p)}return null},tangentAtT:function(e){var t=this.segments,n=t.length;if(0===n)return null;var r=e.segmentIndex;if(r<0)return t[0].tangentAtT(0);if(r>=n)return t[n-1].tangentAtT(1);var i=e.value;return i<0?i=0:i>1&&(i=1),t[r].tangentAtT(i)},toPoints:function(e){var t=this.segments,n=t.length;if(0===n)return null;for(var r=void 0===(e=e||{}).precision?this.PRECISION:e.precision,i=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:r}):e.segmentSubdivisions,o=[],a=[],s=0;s<n;s++){var u=t[s];if(u.isVisible){var l=i[s];if(l.length>0){var c=l.map((function(e){return e.start}));Array.prototype.push.apply(a,c)}else a.push(u.start)}else a.length>0&&(a.push(t[s-1].end),o.push(a),a=[])}return a.length>0&&(a.push(this.end),o.push(a)),o},toPolylines:function(e){var t=[],n=this.toPoints(e);if(!n)return null;for(var r=0,i=n.length;r<i;r++)t.push(new ke(n[r]));return t},toString:function(){for(var e=this.segments,t=e.length,n="",r=0;r<t;r++)n+=e[r].serialize()+" ";return n.trim()},translate:function(e,t){for(var n=this.segments,r=n.length,i=0;i<r;i++)n[i].translate(e,t);return this},updateSubpathStartSegment:function(e){for(var t=e.previousSegment;e&&!e.isSubpathStart;)e.subpathStartSegment=t?t.subpathStartSegment:null,t=e,e=e.nextSegment},validate:function(){return this.isValid()||this.insertSegment(0,Te.createSegment("M",0,0)),this}},Object.defineProperty(Te.prototype,"start",{configurable:!0,enumerable:!0,get:function(){var e=this.segments,t=e.length;if(0===t)return null;for(var n=0;n<t;n++){var r=e[n];if(r.isVisible)return r.start}return e[t-1].end}}),Object.defineProperty(Te.prototype,"end",{configurable:!0,enumerable:!0,get:function(){var e=this.segments,t=e.length;if(0===t)return null;for(var n=t-1;n>=0;n--){var r=e[n];if(r.isVisible)return r.end}return e[t-1].end}});var Oe={bbox:function(){throw new Error("Declaration missing for virtual function.")},clone:function(){throw new Error("Declaration missing for virtual function.")},closestPoint:function(){throw new Error("Declaration missing for virtual function.")},closestPointLength:function(){throw new Error("Declaration missing for virtual function.")},closestPointNormalizedLength:function(){throw new Error("Declaration missing for virtual function.")},closestPointT:function(e){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(e);throw new Error("Neither closestPointT() nor closestPointNormalizedLength() function is implemented.")},closestPointTangent:function(){throw new Error("Declaration missing for virtual function.")},divideAt:function(){throw new Error("Declaration missing for virtual function.")},divideAtLength:function(){throw new Error("Declaration missing for virtual function.")},divideAtT:function(e){if(this.divideAt)return this.divideAt(e);throw new Error("Neither divideAtT() nor divideAt() function is implemented.")},equals:function(){throw new Error("Declaration missing for virtual function.")},getSubdivisions:function(){throw new Error("Declaration missing for virtual function.")},isDifferentiable:function(){throw new Error("Declaration missing for virtual function.")},isSegment:!0,isSubpathStart:!1,isVisible:!0,length:function(){throw new Error("Declaration missing for virtual function.")},lengthAtT:function(e){if(e<=0)return 0;var t=this.length();return e>=1?t:t*e},nextSegment:null,pointAt:function(){throw new Error("Declaration missing for virtual function.")},pointAtLength:function(){throw new Error("Declaration missing for virtual function.")},pointAtT:function(e){if(this.pointAt)return this.pointAt(e);throw new Error("Neither pointAtT() nor pointAt() function is implemented.")},previousSegment:null,round:function(){throw new Error("Declaration missing for virtual function.")},subpathStartSegment:null,scale:function(){throw new Error("Declaration missing for virtual function.")},serialize:function(){throw new Error("Declaration missing for virtual function.")},tangentAt:function(){throw new Error("Declaration missing for virtual function.")},tangentAtLength:function(){throw new Error("Declaration missing for virtual function.")},tangentAtT:function(e){if(this.tangentAt)return this.tangentAt(e);throw new Error("Neither tangentAtT() nor tangentAt() function is implemented.")},toString:function(){throw new Error("Declaration missing for virtual function.")},translate:function(){throw new Error("Declaration missing for virtual function.")}};Object.defineProperty(Oe,"end",{configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(Oe,"start",{configurable:!0,enumerable:!0,get:function(){if(!this.previousSegment)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path; OR segment has not yet been added to a path.)");return this.previousSegment.end}}),Object.defineProperty(Oe,"type",{configurable:!0,enumerable:!0,get:function(){throw new Error("Bad segment declaration. No type specified.")}});var Me=function(){for(var e,t,n=[],r=arguments.length,i=0;i<r;i++)n.push(arguments[i]);if(!(this instanceof Me))return Ne(Me,n);if(0===r)throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates (none provided).");if(n[0]instanceof re){if(1===r)return this.end=n[0].end.clone(),this;throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates ("+r+" lines provided).")}if("string"==typeof n[0]||"number"==typeof n[0]){if(2===r)return this.end=new Z(+n[0],+n[1]),this;if(r<2)throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates ("+r+" coordinates provided).");var o;for(e=[],i=0;i<r;i+=2)o=n.slice(i,i+2),e.push(Ne(Me,o));return e}if(1===r)return this.end=new Z(n[0]),this;for(e=[],i=0;i<r;i+=1)t=n[i],e.push(new Me(t));return e},Re={clone:function(){return new Me(this.end)},divideAt:function(e){var t=new re(this.start,this.end).divideAt(e);return[new Me(t[0]),new Me(t[1])]},divideAtLength:function(e){var t=new re(this.start,this.end).divideAtLength(e);return[new Me(t[0]),new Me(t[1])]},getSubdivisions:function(){return[]},isDifferentiable:function(){return!!this.previousSegment&&!this.start.equals(this.end)},round:function(e){return this.end.round(e),this},scale:function(e,t,n){return this.end.scale(e,t,n),this},serialize:function(){var e=this.end;return this.type+" "+e.x+" "+e.y},toString:function(){return this.type+" "+this.start+" "+this.end},translate:function(e,t){return this.end.translate(e,t),this}};Object.defineProperty(Re,"type",{configurable:!0,enumerable:!0,value:"L"}),Me.prototype=Le(Oe,re.prototype,Re);var De=function(){for(var e,t,n=[],r=arguments.length,i=0;i<r;i++)n.push(arguments[i]);if(!(this instanceof De))return Ne(De,n);if(0===r)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates (none provided).");if(n[0]instanceof Pe){if(1===r)return this.controlPoint1=n[0].controlPoint1.clone(),this.controlPoint2=n[0].controlPoint2.clone(),this.end=n[0].end.clone(),this;throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+r+" curves provided).")}if("string"==typeof n[0]||"number"==typeof n[0]){if(6===r)return this.controlPoint1=new Z(+n[0],+n[1]),this.controlPoint2=new Z(+n[2],+n[3]),this.end=new Z(+n[4],+n[5]),this;if(r<6)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+r+" coordinates provided).");var o;for(e=[],i=0;i<r;i+=6)o=n.slice(i,i+6),e.push(Ne(De,o));return e}if(3===r)return this.controlPoint1=new Z(n[0]),this.controlPoint2=new Z(n[1]),this.end=new Z(n[2]),this;if(r<3)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+r+" points provided).");for(e=[],i=0;i<r;i+=3)t=n.slice(i,i+3),e.push(Ne(De,t));return e},je={clone:function(){return new De(this.controlPoint1,this.controlPoint2,this.end)},divideAt:function(e,t){var n=new Pe(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAt(e,t);return[new De(n[0]),new De(n[1])]},divideAtLength:function(e,t){var n=new Pe(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAtLength(e,t);return[new De(n[0]),new De(n[1])]},divideAtT:function(e){var t=new Pe(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAtT(e);return[new De(t[0]),new De(t[1])]},isDifferentiable:function(){if(!this.previousSegment)return!1;var e=this.start,t=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(e.equals(t)&&t.equals(n)&&n.equals(r))},round:function(e){return this.controlPoint1.round(e),this.controlPoint2.round(e),this.end.round(e),this},scale:function(e,t,n){return this.controlPoint1.scale(e,t,n),this.controlPoint2.scale(e,t,n),this.end.scale(e,t,n),this},serialize:function(){var e=this.controlPoint1,t=this.controlPoint2,n=this.end;return this.type+" "+e.x+" "+e.y+" "+t.x+" "+t.y+" "+n.x+" "+n.y},toString:function(){return this.type+" "+this.start+" "+this.controlPoint1+" "+this.controlPoint2+" "+this.end},translate:function(e,t){return this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t),this}};Object.defineProperty(je,"type",{configurable:!0,enumerable:!0,value:"C"}),De.prototype=Le(Oe,Pe.prototype,je);var Ie=function(){for(var e,t,n=[],r=arguments.length,i=0;i<r;i++)n.push(arguments[i]);if(!(this instanceof Ie))return Ne(Ie,n);if(0===r)throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates (none provided).");if(n[0]instanceof re){if(1===r)return this.end=n[0].end.clone(),this;throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+r+" lines provided).")}if(n[0]instanceof Pe){if(1===r)return this.end=n[0].end.clone(),this;throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+r+" curves provided).")}if("string"==typeof n[0]||"number"==typeof n[0]){if(2===r)return this.end=new Z(+n[0],+n[1]),this;if(r<2)throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+r+" coordinates provided).");var o;for(e=[],i=0;i<r;i+=2)o=n.slice(i,i+2),0===i?e.push(Ne(Ie,o)):e.push(Ne(Me,o));return e}if(1===r)return this.end=new Z(n[0]),this;for(e=[],i=0;i<r;i+=1)t=n[i],0===i?e.push(new Ie(t)):e.push(new Me(t));return e},Fe={bbox:function(){return null},clone:function(){return new Ie(this.end)},closestPoint:function(){return this.end.clone()},closestPointNormalizedLength:function(){return 0},closestPointLength:function(){return 0},closestPointT:function(){return 1},closestPointTangent:function(){return null},divideAt:function(){return[this.clone(),this.clone()]},divideAtLength:function(){return[this.clone(),this.clone()]},equals:function(e){return this.end.equals(e.end)},getSubdivisions:function(){return[]},isDifferentiable:function(){return!1},isSubpathStart:!0,isVisible:!1,length:function(){return 0},lengthAtT:function(){return 0},pointAt:function(){return this.end.clone()},pointAtLength:function(){return this.end.clone()},pointAtT:function(){return this.end.clone()},round:function(e){return this.end.round(e),this},scale:function(e,t,n){return this.end.scale(e,t,n),this},serialize:function(){var e=this.end;return this.type+" "+e.x+" "+e.y},tangentAt:function(){return null},tangentAtLength:function(){return null},tangentAtT:function(){return null},toString:function(){return this.type+" "+this.end},translate:function(e,t){return this.end.translate(e,t),this}};Object.defineProperty(Fe,"start",{configurable:!0,enumerable:!0,get:function(){throw new Error("Illegal access. Moveto segments should not need a start property.")}}),Object.defineProperty(Fe,"type",{configurable:!0,enumerable:!0,value:"M"}),Ie.prototype=Le(Oe,Fe);var ze=function(){for(var e=[],t=arguments.length,n=0;n<t;n++)e.push(arguments[n]);if(!(this instanceof ze))return Ne(ze,e);if(t>0)throw new Error("Closepath constructor expects no arguments.");return this},Ve={clone:function(){return new ze},divideAt:function(e){var t=new re(this.start,this.end).divideAt(e);return[t[1].isDifferentiable()?new Me(t[0]):this.clone(),new Me(t[1])]},divideAtLength:function(e){var t=new re(this.start,this.end).divideAtLength(e);return[t[1].isDifferentiable()?new Me(t[0]):this.clone(),new Me(t[1])]},getSubdivisions:function(){return[]},isDifferentiable:function(){return!(!this.previousSegment||!this.subpathStartSegment||this.start.equals(this.end))},round:function(){return this},scale:function(){return this},serialize:function(){return this.type},toString:function(){return this.type+" "+this.start+" "+this.end},translate:function(){return this}};Object.defineProperty(Ve,"end",{configurable:!0,enumerable:!0,get:function(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. Moveto); OR segment has not yet been added to a path.)");return this.subpathStartSegment.end}}),Object.defineProperty(Ve,"type",{configurable:!0,enumerable:!0,value:"Z"}),ze.prototype=Le(Oe,re.prototype,Ve);var Be=Te.segmentTypes={L:Me,C:De,M:Ie,Z:ze,z:ze};Te.regexSupportedData=new RegExp("^[\\s\\d"+Object.keys(Be).join("")+",.]*$"),Te.isDataSupported=function(e){return"string"==typeof e&&this.regexSupportedData.test(e)};const $e={curveThroughPoints:function(e){return console.warn("deprecated"),new Te(Pe.throughPoints(e)).serialize()},getCurveControlPoints:function(e){console.warn("deprecated");var t,n=[],r=[],i=e.length-1;if(1==i)return n[0]=new Z((2*e[0].x+e[1].x)/3,(2*e[0].y+e[1].y)/3),r[0]=new Z(2*n[0].x-e[0].x,2*n[0].y-e[0].y),[n,r];var o=[];for(t=1;t<i-1;t++)o[t]=4*e[t].x+2*e[t+1].x;o[0]=e[0].x+2*e[1].x,o[i-1]=(8*e[i-1].x+e[i].x)/2;var a=this.getFirstControlPoints(o);for(t=1;t<i-1;++t)o[t]=4*e[t].y+2*e[t+1].y;o[0]=e[0].y+2*e[1].y,o[i-1]=(8*e[i-1].y+e[i].y)/2;var s=this.getFirstControlPoints(o);for(t=0;t<i;t++)n.push(new Z(a[t],s[t])),t<i-1?r.push(new Z(2*e[t+1].x-a[t+1],2*e[t+1].y-s[t+1])):r.push(new Z((e[i].x+a[i-1])/2,(e[i].y+s[i-1])/2));return[n,r]},getCurveDivider:function(e,t,n,r){console.warn("deprecated");var i=new Pe(e,t,n,r);return function(e){var t=i.divide(e);return[{p0:t[0].start,p1:t[0].controlPoint1,p2:t[0].controlPoint2,p3:t[0].end},{p0:t[1].start,p1:t[1].controlPoint1,p2:t[1].controlPoint2,p3:t[1].end}]}},getFirstControlPoints:function(e){console.warn("deprecated");var t=e.length,n=[],r=[],i=2;n[0]=e[0]/i;for(var o=1;o<t;o++)r[o]=1/i,i=(o<t-1?4:3.5)-r[o],n[o]=(e[o]-n[o-1])/i;for(o=1;o<t;o++)n[t-o-1]-=r[t-o]*n[t-o];return n},getInversionSolver:function(e,t,n,r){console.warn("deprecated");var i=new Pe(e,t,n,r);return function(e){return i.closestPointT(e)}}},Ue=function(e){return this instanceof Ue?"string"==typeof e?new Ue.parse(e):void(this.points=Array.isArray(e)?e.map(Z):[]):new Ue(e)};function He(e,t,n,r){switch(e.type){case $.Line:if(t.type===$.Line)return qe(e,t);break;case $.Ellipse:switch(t.type){case $.Line:return We(e,t);case $.Ellipse:return Ge(e,t)}break;case $.Rect:switch(t.type){case $.Line:return Ye(e,t);case $.Ellipse:return Xe(e,t);case $.Rect:return Ke(e,t)}break;case $.Polyline:switch(t.type){case $.Line:return Je(e,t);case $.Ellipse:return Qe(e,t);case $.Rect:return Ze(e,t);case $.Polyline:return et(e,t)}break;case $.Polygon:switch(t.type){case $.Line:return tt(e,t);case $.Ellipse:return nt(e,t);case $.Rect:return rt(e,t);case $.Polyline:return it(e,t);case $.Polygon:return ot(e,t)}break;case $.Path:switch(t.type){case $.Line:return at(e,t,n);case $.Ellipse:return st(e,t,n);case $.Rect:return ut(e,t,n);case $.Polyline:return lt(e,t,n);case $.Polygon:return ct(e,t,n);case $.Path:return ft(e,t,n,r)}}switch(t.type){case $.Ellipse:case $.Rect:case $.Polyline:case $.Polygon:case $.Path:return He(t,e,r,n);default:throw Error(`The intersection for ${e} and ${t} could not be found.`)}}function qe(e,t){const n=e.start.x,r=e.start.y,i=e.end.x,o=e.end.y,a=t.start.x,s=t.start.y,u=i-n,l=o-r,c=t.end.x-a,f=t.end.y-s,h=n-a,d=r-s,p=u*f-c*l,g=(u*d-l*h)/p,v=(c*d-f*h)/p;return g>=0&&g<=1&&v>=0&&v<=1}function We(e,t){const n=e.a,r=e.b,i=e.x,o=e.y,a=t.start.x-i,s=t.end.x-i,u=t.start.y-o,l=n*n,c=r*r,f=s-a,h=t.end.y-o-u,d=f*f/l+h*h/c,p=2*a*f/l+2*u*h/c,g=p*p-4*d*(a*a/l+u*u/c-1);if(0===g){const e=-p/2/d;return e>=0&&e<=1}if(g>0){const e=Math.sqrt(g),t=(-p+e)/2/d,n=(-p-e)/2/d;return t>=0&&t<=1||n>=0&&n<=1}return!1}function Ge(e,t){return function(e,t,n){const{cos:r,sin:i}=Math,o=i(0),a=r(0),s=i(0),u=r(0),l=o*o,c=a*a,f=o*a,h=s*s,d=u*u,p=s*u,g=e.a*e.a,v=e.b*e.b,m=n.a*n.a,y=n.b*n.b,b=g*l+v*c,w=m*h+y*d,x=g*c+v*l,k=m*d+y*h;let S=2*(v-g)*f,_=2*(y-m)*p,E=-2*b*e.x-S*e.y,C=-2*w*n.x-_*n.y,A=-S*e.x-2*x*e.y,P=-_*n.x-2*k*n.y;const L=b*e.x*e.x+x*e.y*e.y+S*e.x*e.y-g*v,T=w*n.x*n.x+k*n.y*n.y+_*n.x*n.y-m*y;S/=2,_/=2,E/=2,C/=2,A/=2,P/=2;const N=bt([[b,S,E],[S,x,A],[E,A,L]]),O=bt([[w,_,C],[_,k,P],[C,P,T]]),M=.33333333*(bt([[w,S,E],[_,x,A],[C,A,L]])+bt([[b,_,E],[S,k,A],[E,P,L]])+bt([[b,S,C],[S,x,P],[E,A,T]])),R=.33333333*(bt([[b,_,C],[S,k,P],[E,P,T]])+bt([[w,S,C],[_,x,P],[C,A,T]])+bt([[w,_,E],[_,k,A],[C,P,L]])),D=yt([[N,M],[M,R]]),j=yt([[N,R],[M,O]]),I=yt([[M,R],[R,O]]);return!(yt([[2*D,j],[j,2*I]])>0&&(R>0||M>0))}(e,0,t)}function Ye(e,t){const{start:n,end:r}=t,{x:i,y:o,width:a,height:s}=e;return!(n.x>i+a&&r.x>i+a||n.x<i&&r.x<i||n.y>o+s&&r.y>o+s||n.y<o&&r.y<o)&&(!(!e.containsPoint(t.start)&&!e.containsPoint(t.end))||qe(e.topLine(),t)||qe(e.rightLine(),t)||qe(e.bottomLine(),t)||qe(e.leftLine(),t))}function Xe(e,t){return!!Ke(e,me.fromEllipse(t))&&nt(Ue.fromRect(e),t)}function Ke(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Je(e,t){return ht(e,t,{interior:!1})}function Qe(e,t){return dt(e,t,{interior:!1})}function Ze(e,t){return pt(e,t,{interior:!1})}function et(e,t){return vt(e,t,{interior:!1})}function tt(e,t){return ht(e,t,{interior:!0})}function nt(e,t){return dt(e,t,{interior:!0})}function rt(e,t){return pt(e,t,{interior:!0})}function it(e,t){return vt(e,t,{interior:!0})}function ot(e,t){return mt(e,t,{interior:!0})}function at(e,t,n){return e.getSubpaths().some((e=>{const[r]=e.toPolylines(n),{type:i}=e.getSegment(-1);return"Z"===i?tt(r,t):Je(r,t)}))}function st(e,t,n){return e.getSubpaths().some((e=>{const[r]=e.toPolylines(n),{type:i}=e.getSegment(-1);return"Z"===i?nt(r,t):Qe(r,t)}))}function ut(e,t,n){return ct(e,Ue.fromRect(t),n)}function lt(e,t,n){return gt(e,t,n,{interior:!1})}function ct(e,t,n){return gt(e,t,n,{interior:!0})}function ft(e,t,n,r){return e.getSubpaths().some((e=>{const[i]=e.toPolylines(n),{type:o}=e.getSegment(-1);return"Z"===o?ct(t,i,r):lt(t,i,r)}))}function ht(e,t,n={}){const{interior:r=!1}=n;let i;if(r){if(e.containsPoint(t.start))return!0;const{start:n,end:r,points:o}=e;i=r.equals(n)?o:[...o,n]}else i=e.points;const{length:o}=i,a=new re;for(let e=0;e<o-1;e++)if(a.start=i[e],a.end=i[e+1],qe(t,a))return!0;return!1}function dt(e,t,n={}){const{start:r,end:i,points:o}=e;if(t.containsPoint(r))return!0;let a;const{interior:s=!1}=n;if(s){if(e.containsPoint(t.center()))return!0;a=i.equals(r)?o:[...o,r]}else a=o;const{length:u}=a,l=new re;for(let e=0;e<u-1;e++)if(l.start=a[e],l.end=a[e+1],We(t,l))return!0;return!1}function pt(e,t,n){return mt(e,Ue.fromRect(t),n)}function gt(e,t,n,r){return e.getSubpaths().some((e=>{const[i]=e.toPolylines(n),{type:o}=e.getSegment(-1);return"Z"===o?mt(t,i,r):vt(t,i,r)}))}function vt(e,t,n={}){const{interior:r=!1}=n;let i;if(r){const{start:n}=t;if(e.containsPoint(n))return!0;i=e.clone().close()}else i=e;const o=t.points,{length:a}=o,s=new re;for(let e=0;e<a-1;e++)if(s.start=o[e],s.end=o[e+1],Je(i,s))return!0;return!1}function mt(e,t,n){return t.containsPoint(e.start)||vt(e,t.clone().close(),n)}function yt(e){return e[0][0]*e[1][1]-e[0][1]*e[1][0]}function bt(e){return e[0][0]*e[1][1]*e[2][2]-e[0][0]*e[1][2]*e[2][1]-e[0][1]*e[1][0]*e[2][2]+e[0][1]*e[1][2]*e[2][0]+e[0][2]*e[1][0]*e[2][1]-e[0][2]*e[1][1]*e[2][0]}Ue.parse=function(e){return new Ue(be(e))},Ue.fromRect=function(e){return new Ue([e.topLeft(),e.topRight(),e.bottomRight(),e.bottomLeft()])},Ue.prototype=Le(ke.prototype,{type:$.Polygon,clone:function(){return new Ue(we(this.points))},convexHull:function(){return new Ue(xe(this.points))},lengthPoints:function(){const{start:e,end:t,points:n}=this;return n.length<=1||e.equals(t)?n:[...n,e.clone()]}});const wt=e,xt=function(){if("object"!=typeof window||!window.SVGAngle&&!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"))return function(){throw new Error("SVG is required to use Vectorizer.")};var e={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},n=Math,r=n.PI,i=n.atan2,o=n.sqrt,a=n.min,s=n.max,u=n.cos,l=n.sin,c=function(t,n,r){if(!(this instanceof c))return c.apply(Object.create(c.prototype),arguments);if(t){if(c.isV(t)&&(t=t.node),n=n||{},c.isString(t)){if("svg"===(t=t.trim()).toLowerCase())t=c.createSvgDocument();else if("<"===t[0]){var i=c.createSvgDocument(t);if(i.childNodes.length>1){var o,a,s=[];for(o=0,a=i.childNodes.length;o<a;o++){var u=i.childNodes[o];s.push(new c(document.importNode(u,!0)))}return s}t=document.importNode(i.firstChild,!0)}else t=document.createElementNS(e.svg,t);c.ensureId(t)}return this.node=t,this.setAttributes(n),r&&this.append(r),this}},f=c.prototype;function h(e,t,n){n||(n={});for(var r=n.includeAnnotationIndices,i=n.eol,o=n.lineHeight,a=n.baseSize,s=0,u={},l=t.length-1,f=0;f<=l;f++){var h=t[f],d=null;if(c.isObject(h)){var p=h.attrs,g=c("tspan",p),v=g.node,m=h.t;i&&f===l&&(m+=i),v.textContent=m;var y=p.class;y&&g.addClass(y),r&&g.attr("annotations",h.annotations),d=parseFloat(p["font-size"]),isFinite(d)||(d=a),d&&d>s&&(s=d)}else i&&f===l&&(h+=i),v=document.createTextNode(h||" "),a&&a>s&&(s=a);e.appendChild(v)}return s&&(u.maxFontSize=s),o?u.lineHeight=o:s&&(u.lineHeight=1.2*s),u}Object.defineProperty(f,"id",{enumerable:!0,get:function(){return this.node.id},set:function(e){this.node.id=e}}),f.getTransformToElement=function(e){var t=this.node;if(c.isSVGGraphicsElement(e)&&c.isSVGGraphicsElement(t)){var n=c.toNode(e).getScreenCTM(),r=t.getScreenCTM();if(n&&r)return n.inverse().multiply(r)}return c.createSVGMatrix()},f.transform=function(e,t){var n=this.node;if(c.isUndefined(e))return c.transformStringToMatrix(this.attr("transform"));if(t&&t.absolute)return this.attr("transform",c.matrixToTransformString(e));var r=c.createSVGTransform(e);return n.transform.baseVal.appendItem(r),this},f.translate=function(e,t,n){n=n||{},t=t||0;var r=this.attr("transform")||"",i=c.parseTransformString(r);if(r=i.value,c.isUndefined(e))return i.translate;r=r.replace(/translate\([^)]*\)/g,"").trim();var o="translate("+(n.absolute?e:i.translate.tx+e)+","+(n.absolute?t:i.translate.ty+t)+")";return this.attr("transform",(o+" "+r).trim()),this},f.rotate=function(e,t,n,r){r=r||{};var i=this.attr("transform")||"",o=c.parseTransformString(i);if(i=o.value,c.isUndefined(e))return o.rotate;i=i.replace(/rotate\([^)]*\)/g,"").trim(),e%=360;var a="rotate("+(r.absolute?e:o.rotate.angle+e)+(void 0!==t&&void 0!==n?","+t+","+n:"")+")";return this.attr("transform",(i+" "+a).trim()),this},f.scale=function(e,t){t=c.isUndefined(t)?e:t;var n=this.attr("transform")||"",r=c.parseTransformString(n);if(n=r.value,c.isUndefined(e))return r.scale;n=n.replace(/scale\([^)]*\)/g,"").trim();var i="scale("+e+","+t+")";return this.attr("transform",(n+" "+i).trim()),this},f.bbox=function(e,t){var n,r=this.node,i=r.ownerSVGElement;if(!i)return new me(0,0,0,0);try{n=r.getBBox()}catch(e){n={x:r.clientLeft,y:r.clientTop,width:r.clientWidth,height:r.clientHeight}}if(e)return new me(n);var o=this.getTransformToElement(t||i);return c.transformRect(n,o)},f.getBBox=function(e){var t,n={},r=this.node;if(!r.ownerSVGElement||!c.isSVGGraphicsElement(r))return new me(0,0,0,0);if(e&&(e.target&&(n.target=c.toNode(e.target)),e.recursive&&(n.recursive=e.recursive)),n.recursive){var i=this.children(),o=i.length;if(0===o)return this.getBBox({target:n.target,recursive:!1});n.target||(n.target=this);for(var a=0;a<o;a++){var s,u=i[a];s=0===u.children().length?u.getBBox({target:n.target,recursive:!1}):u.getBBox({target:n.target,recursive:!0}),t=t?t.union(s):s}return t}try{t=r.getBBox()}catch(e){t={x:r.clientLeft,y:r.clientTop,width:r.clientWidth,height:r.clientHeight}}if(n.target){var l=this.getTransformToElement(n.target);return c.transformRect(t,l)}return new me(t)};var d=/em$/;function p(e,t){var n=parseFloat(e);return d.test(e)?n*t:n}f.text=function(t,n){if(t&&"string"!=typeof t)throw new Error("Vectorizer: text() expects the first argument to be a string.");t=c.sanitizeText(t),n||(n={});var r=n.displayEmpty,i=n.eol,o=n.textPath,a=n.textVerticalAnchor,s="middle"===a||"bottom"===a||"top"===a,u=n.x;void 0===u&&(u=this.attr("x")||0);var l=n.includeAnnotationIndices,f=n.annotations;f&&!c.isArray(f)&&(f=[f]);var g=n.lineHeight,v="auto"===g,m=v?"1.5em":g||"1em";this.empty(),this.attr({"xml:space":"preserve",display:t||r?null:"none"});var y=parseFloat(this.attr("font-size"));y||(y=16,(s||f)&&this.attr("font-size",y));var b,w=document;o?("string"==typeof o&&(o={d:o}),b=function(e,t){e||(e={});var n=c("textPath"),r=e.d;if(r&&void 0===e["xlink:href"]){var i=c("path").attr("d",r).appendTo(t.defs());n.attr("xlink:href","#"+i.id)}return c.isObject(e)&&n.attr(e),n.node}(o,this)):b=w.createDocumentFragment();for(var x,k=0,S=t.split("\n"),_=[],E=0,C=S.length-1;E<=C;E++){var A,P=m,L="v-line",T=w.createElementNS(e.svg,"tspan"),N=S[E];if(N)if(f){var O=(A=h(T,c.annotateString(N,f,{offset:-k,includeAnnotationIndices:l}),{includeAnnotationIndices:l,eol:E!==C&&i,lineHeight:v?null:m,baseSize:y})).lineHeight;O&&v&&0!==E&&(P=O),0===E&&(x=.8*A.maxFontSize)}else i&&E!==C&&(N+=i),T.textContent=N;else{T.textContent="-",L+=" v-empty-line";var M=T.style;M.fillOpacity=0,M.strokeOpacity=0,f&&(A={})}A&&_.push(A),E>0&&T.setAttribute("dy",P),(E>0||o)&&T.setAttribute("x",u),T.className.baseVal=L,b.appendChild(T),k+=N.length+1}if(s)if(f)P=function(e,t,n,r){if(!Array.isArray(t))return 0;var i=t.length;if(!i)return 0;for(var o=t[0],a=p(o.maxFontSize,n)||n,s=0,u=p(r,n),l=1;l<i;l++)s+=p((o=t[l]).lineHeight,n)||u;var c,f=p(o.maxFontSize,n)||n;switch(e){case"middle":c=a/2-.15*f-s/2;break;case"bottom":c=-.25*f-s;break;default:c=.8*a}return c}(a,_,y,m);else if("top"===a)P="0.8em";else{var R;switch(C>0?(R=parseFloat(m)||1,R*=C,d.test(m)||(R/=y)):R=0,a){case"middle":P=.3-R/2+"em";break;case"bottom":P=-R-.3+"em"}}else 0===a?P="0em":a?P=a:(P=0,null===this.attr("y")&&this.attr("y",x||"0.8em"));return b.firstChild.setAttribute("dy",P),this.append(b),this},f.removeAttr=function(e){var t=c.qualifyAttr(e),n=this.node;return t.ns?n.hasAttributeNS(t.ns,t.local)&&n.removeAttributeNS(t.ns,t.local):n.hasAttribute(e)&&n.removeAttribute(e),this},f.attr=function(e,t){if(c.isUndefined(e)){for(var n=this.node.attributes,r={},i=0;i<n.length;i++)r[n[i].name]=n[i].value;return r}if(c.isString(e)&&c.isUndefined(t))return this.node.getAttribute(e);if("object"==typeof e)for(var o in e)e.hasOwnProperty(o)&&this.setAttribute(o,e[o]);else this.setAttribute(e,t);return this},f.normalizePath=function(){return"PATH"===this.tagName()&&this.attr("d",c.normalizePathData(this.attr("d"))),this},f.remove=function(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this},f.empty=function(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this},f.setAttributes=function(e){for(var t in e)e.hasOwnProperty(t)&&this.setAttribute(t,e[t]);return this},f.append=function(e){c.isArray(e)||(e=[e]);for(var t=0,n=e.length;t<n;t++)this.node.appendChild(c.toNode(e[t]));return this},f.prepend=function(e){var t=this.node.firstChild;return t?c(t).before(e):this.append(e)},f.before=function(e){var t=this.node,n=t.parentNode;if(n){c.isArray(e)||(e=[e]);for(var r=0,i=e.length;r<i;r++)n.insertBefore(c.toNode(e[r]),t)}return this},f.appendTo=function(e){return c.toNode(e).appendChild(this.node),this},f.svg=function(){return this.node instanceof window.SVGSVGElement?this:c(this.node.ownerSVGElement)},f.tagName=function(){return this.node.tagName.toUpperCase()},f.defs=function(){var e=this.svg()||this,t=e.node.getElementsByTagName("defs")[0];return t?c(t):c("defs").appendTo(e)},f.clone=function(){var e=c(this.node.cloneNode(!0));return e.node.id=c.uniqueId(),e},f.findOne=function(e){var t=this.node.querySelector(e);return t?c(t):void 0},f.find=function(e){var t=[],n=this.node.querySelectorAll(e);if(n)for(var r=0;r<n.length;r++)t.push(c(n[r]));return t},f.children=function(){for(var e=this.node.childNodes,t=[],n=0;n<e.length;n++)1===e[n].nodeType&&t.push(c(e[n]));return t},f.parent=function(){return c(this.node.parentNode)||null},f.index=function(){for(var e=0,t=this.node.previousSibling;t;)1===t.nodeType&&e++,t=t.previousSibling;return e},f.findParentByClass=function(e,t){for(var n=this.node.ownerSVGElement,r=this.node.parentNode;r&&r!==t&&r!==n;){var i=c(r);if(i.hasClass(e))return i;r=r.parentNode}return null},f.contains=function(e){var t=this.node,n=c.toNode(e),r=n&&n.parentNode;return t===r||!!(r&&1===r.nodeType&&16&t.compareDocumentPosition(r))},f.toLocalPoint=function(e,t){var n=this.svg().node,r=n.createSVGPoint();r.x=e,r.y=t;try{var i=r.matrixTransform(n.getScreenCTM().inverse()),o=this.getTransformToElement(n).inverse()}catch(e){return r}return i.matrixTransform(o)},f.translateCenterToPoint=function(e){var t=this.getBBox({target:this.svg()}).center();return this.translate(e.x-t.x,e.y-t.y),this},f.translateAndAutoOrient=function(e,t,n){e=new Z(e),t=new Z(t),n||(n=this.svg());var r=this.scale();this.attr("transform","");var i=this.getBBox({target:n}).scale(r.sx,r.sy),o=c.createSVGTransform();o.setTranslate(-i.x-i.width/2,-i.y-i.height/2);var a=c.createSVGTransform(),s=e.angleBetween(t,e.clone().offset(1,0));s&&a.setRotate(s,0,0);var u=c.createSVGTransform(),l=e.clone().move(t,i.width/2);u.setTranslate(2*e.x-l.x,2*e.y-l.y);var f=this.getTransformToElement(n),h=c.createSVGTransform();return h.setMatrix(u.matrix.multiply(a.matrix.multiply(o.matrix.multiply(f.scale(r.sx,r.sy))))),this.attr("transform",c.matrixToTransformString(h.matrix)),this},f.animateAlongPath=function(e,t){t=c.toNode(t);var n=c.ensureId(t),r=c("animateMotion",e),i=c("mpath",{"xlink:href":"#"+n});r.append(i),this.append(r);try{r.node.beginElement()}catch(e){if("fake"===document.documentElement.getAttribute("smiling")){var o=r.node;o.animators=[];var a=o.getAttribute("id");a&&(id2anim[a]=o);for(var s=getTargets(o),u=0,l=s.length;u<l;u++){var f=s[u],h=new Animator(o,f,u);animators.push(h),o.animators[u]=h,h.register()}}}return this},f.hasClass=function(e){return new RegExp("(\\s|^)"+e+"(\\s|$)").test(this.node.getAttribute("class"))},f.addClass=function(e){if(e&&!this.hasClass(e)){var t=this.node.getAttribute("class")||"";this.node.setAttribute("class",(t+" "+e).trim())}return this},f.removeClass=function(e){if(e&&this.hasClass(e)){var t=this.node.getAttribute("class").replace(new RegExp("(\\s|^)"+e+"(\\s|$)","g"),"$2");this.node.setAttribute("class",t)}return this},f.toggleClass=function(e,t){return(c.isUndefined(t)?this.hasClass(e):!t)?this.removeClass(e):this.addClass(e),this},f.sample=function(e){e=e||1;for(var t,n=this.node,r=n.getTotalLength(),i=[],o=0;o<r;)t=n.getPointAtLength(o),i.push({x:t.x,y:t.y,distance:o}),o+=e;return i},f.convertToPath=function(){var e=c("path");e.attr(this.attr());var t=this.convertToPathData();return t&&e.attr("d",t),e},f.convertToPathData=function(){var e=this.tagName();switch(e){case"PATH":return this.attr("d");case"LINE":return c.convertLineToPathData(this.node);case"POLYGON":return c.convertPolygonToPathData(this.node);case"POLYLINE":return c.convertPolylineToPathData(this.node);case"ELLIPSE":return c.convertEllipseToPathData(this.node);case"CIRCLE":return c.convertCircleToPathData(this.node);case"RECT":return c.convertRectToPathData(this.node)}throw new Error(e+" cannot be converted to PATH.")},c.prototype.toGeometryShape=function(){var e,t,n,r,i,o,a,s,u,l,f,h,d,p,g;switch(this.tagName()){case"RECT":return e=parseFloat(this.attr("x"))||0,t=parseFloat(this.attr("y"))||0,n=parseFloat(this.attr("width"))||0,r=parseFloat(this.attr("height"))||0,new me(e,t,n,r);case"CIRCLE":return i=parseFloat(this.attr("cx"))||0,o=parseFloat(this.attr("cy"))||0,a=parseFloat(this.attr("r"))||0,new ue({x:i,y:o},a,a);case"ELLIPSE":return i=parseFloat(this.attr("cx"))||0,o=parseFloat(this.attr("cy"))||0,s=parseFloat(this.attr("rx"))||0,u=parseFloat(this.attr("ry"))||0,new ue({x:i,y:o},s,u);case"POLYLINE":return l=c.getPointsFromSvgNode(this),new ke(l);case"POLYGON":return(l=c.getPointsFromSvgNode(this)).length>1&&l.push(l[0]),new ke(l);case"PATH":return f=this.attr("d"),Te.isDataSupported(f)||(f=c.normalizePathData(f)),new Te(f);case"LINE":return h=parseFloat(this.attr("x1"))||0,p=parseFloat(this.attr("y1"))||0,d=parseFloat(this.attr("x2"))||0,g=parseFloat(this.attr("y2"))||0,new re({x:h,y:p},{x:d,y:g})}return this.getBBox()},f.findIntersection=function(e,t){var n=this.svg().node;t=t||n;var r=this.getBBox({target:t}),i=r.center();if(r.intersectionWithLineFromCenterToPoint(e)){var o,a=this.tagName();if("RECT"===a){var s=new me(parseFloat(this.attr("x")||0),parseFloat(this.attr("y")||0),parseFloat(this.attr("width")),parseFloat(this.attr("height"))),u=this.getTransformToElement(t),l=c.decomposeMatrix(u),f=n.createSVGTransform();f.setRotate(-l.rotation,i.x,i.y);var h=c.transformRect(s,f.matrix.multiply(u));o=new me(h).intersectionWithLineFromCenterToPoint(e,l.rotation)}else if("PATH"===a||"POLYGON"===a||"POLYLINE"===a||"CIRCLE"===a||"ELLIPSE"===a){var d,p,g,v,m,y=("PATH"===a?this:this.convertToPath()).sample(),b=1/0,w=[];for(d=0;d<y.length;d++)p=y[d],g=(g=c.createSVGPoint(p.x,p.y)).matrixTransform(this.getTransformToElement(t)),(m=(p=new Z(g)).distance(i)+(v=1.1*p.distance(e)))<b?(b=m,w=[{sample:p,refDistance:v}]):m<b+1&&w.push({sample:p,refDistance:v});w.sort((function(e,t){return e.refDistance-t.refDistance})),w[0]&&(o=w[0].sample)}return o}},f.setAttribute=function(e,t){var n=this.node;if(null===t)return this.removeAttr(e),this;var r=c.qualifyAttr(e);return r.ns?n.setAttributeNS(r.ns,e,t):"id"===e?n.id=t:n.setAttribute(e,t),this},c.createSvgDocument=function(t){if(t){const n=`<svg xmlns="${e.svg}" xmlns:xlink="${e.xlink}" version="1.1">${t}</svg>`,{documentElement:r}=c.parseXML(n,{async:!1});return r}const n=document.createElementNS(e.svg,"svg");return n.setAttributeNS(e.xmlns,"xmlns:xlink",e.xlink),n.setAttribute("version","1.1"),n},c.createSVGStyle=function(e){const{node:t}=c("style",{type:"text/css"},[c.createCDATASection(e)]);return t},c.createCDATASection=function(e=""){return document.implementation.createDocument(null,"xml",null).createCDATASection(e)},c.idCounter=0,c.uniqueId=function(){return"v-"+ ++c.idCounter},c.toNode=function(e){return c.isV(e)?e.node:e.nodeName&&e||e[0]},c.ensureId=function(e){return(e=c.toNode(e)).id||(e.id=c.uniqueId())},c.sanitizeText=function(e){return(e||"").replace(/ /g," ")},c.isUndefined=function(e){return void 0===e},c.isString=function(e){return"string"==typeof e},c.isObject=function(e){return e&&"object"==typeof e},c.isArray=Array.isArray,c.parseXML=function(e,t){var n;t=t||{};try{var r=new DOMParser;c.isUndefined(t.async)||(r.async=t.async),n=r.parseFromString(e,"text/xml")}catch(e){n=void 0}if(!n||n.getElementsByTagName("parsererror").length)throw new Error("Invalid XML: "+e);return n},c.qualifyAttr=function(t){if(-1!==t.indexOf(":")){var n=t.split(":");return{ns:e[n[0]],local:n[1]}}return{ns:null,local:t}},c.transformRegex=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,c.transformSeparatorRegex=/[ ,]+/,c.transformationListRegex=/^(\w+)\((.*)\)/,c.transformStringToMatrix=function(e){var t=c.createSVGMatrix(),n=e&&e.match(c.transformRegex);if(!n)return t;for(var r=0,i=n.length;r<i;r++){var o=n[r].match(c.transformationListRegex);if(o){var a,s,u,l,f,h=c.createSVGMatrix(),d=o[2].split(c.transformSeparatorRegex);switch(o[1].toLowerCase()){case"scale":a=parseFloat(d[0]),s=void 0===d[1]?a:parseFloat(d[1]),h=h.scaleNonUniform(a,s);break;case"translate":u=parseFloat(d[0]),l=parseFloat(d[1]),h=h.translate(u,l);break;case"rotate":f=parseFloat(d[0]),u=parseFloat(d[1])||0,l=parseFloat(d[2])||0,h=0!==u||0!==l?h.translate(u,l).rotate(f).translate(-u,-l):h.rotate(f);break;case"skewx":f=parseFloat(d[0]),h=h.skewX(f);break;case"skewy":f=parseFloat(d[0]),h=h.skewY(f);break;case"matrix":h.a=parseFloat(d[0]),h.b=parseFloat(d[1]),h.c=parseFloat(d[2]),h.d=parseFloat(d[3]),h.e=parseFloat(d[4]),h.f=parseFloat(d[5]);break;default:continue}t=t.multiply(h)}}return t},c.matrixToTransformString=function(e){return e||(e=!0),"matrix("+(void 0!==e.a?e.a:1)+","+(void 0!==e.b?e.b:0)+","+(void 0!==e.c?e.c:0)+","+(void 0!==e.d?e.d:1)+","+(void 0!==e.e?e.e:0)+","+(void 0!==e.f?e.f:0)+")"},c.parseTransformString=function(e){var t,n,r;if(e){var i=c.transformSeparatorRegex;if(e.trim().indexOf("matrix")>=0){var o=c.transformStringToMatrix(e),a=c.decomposeMatrix(o);t=[a.translateX,a.translateY],r=[a.scaleX,a.scaleY],n=[a.rotation];var s=[];0===t[0]&&0===t[1]||s.push("translate("+t+")"),1===r[0]&&1===r[1]||s.push("scale("+r+")"),0!==n[0]&&s.push("rotate("+n+")"),e=s.join(" ")}else{var u=e.match(/translate\((.*?)\)/);u&&(t=u[1].split(i));var l=e.match(/rotate\((.*?)\)/);l&&(n=l[1].split(i));var f=e.match(/scale\((.*?)\)/);f&&(r=f[1].split(i))}}var h=r&&r[0]?parseFloat(r[0]):1;return{value:e,translate:{tx:t&&t[0]?parseInt(t[0],10):0,ty:t&&t[1]?parseInt(t[1],10):0},rotate:{angle:n&&n[0]?parseInt(n[0],10):0,cx:n&&n[1]?parseInt(n[1],10):void 0,cy:n&&n[2]?parseInt(n[2],10):void 0},scale:{sx:h,sy:r&&r[1]?parseFloat(r[1]):h}}},c.deltaTransformPoint=function(e,t){return{x:t.x*e.a+t.y*e.c+0,y:t.x*e.b+t.y*e.d+0}},c.decomposeMatrix=function(e){var t=c.deltaTransformPoint(e,{x:0,y:1}),n=c.deltaTransformPoint(e,{x:1,y:0}),a=180/r*i(t.y,t.x)-90,s=180/r*i(n.y,n.x);return{translateX:e.e,translateY:e.f,scaleX:o(e.a*e.a+e.b*e.b),scaleY:o(e.c*e.c+e.d*e.d),skewX:a,skewY:s,rotation:a}},c.matrixToScale=function(e){var t,n,r,i;return e?(t=c.isUndefined(e.a)?1:e.a,i=c.isUndefined(e.d)?1:e.d,n=e.b,r=e.c):t=i=1,{sx:n?o(t*t+n*n):t,sy:r?o(r*r+i*i):i}},c.matrixToRotate=function(e){var t={x:0,y:1};return e&&(t=c.deltaTransformPoint(e,t)),{angle:N(M(i(t.y,t.x))-90)}},c.matrixToTranslate=function(e){return{tx:e&&e.e||0,ty:e&&e.f||0}},c.isV=function(e){return e instanceof c},c.isVElement=c.isV,c.isSVGGraphicsElement=function(e){return!!e&&(e=c.toNode(e))instanceof SVGElement&&"function"==typeof e.getScreenCTM};var g=c("svg").node;return c.createSVGMatrix=function(e){var t=g.createSVGMatrix();for(var n in e)t[n]=e[n];return t},c.createSVGTransform=function(e){return c.isUndefined(e)?g.createSVGTransform():(e instanceof SVGMatrix||(e=c.createSVGMatrix(e)),g.createSVGTransformFromMatrix(e))},c.createSVGPoint=function(e,t){var n=g.createSVGPoint();return n.x=e,n.y=t,n},c.transformRect=function(e,t){var n=g.createSVGPoint();n.x=e.x,n.y=e.y;var r=n.matrixTransform(t);n.x=e.x+e.width,n.y=e.y;var i=n.matrixTransform(t);n.x=e.x+e.width,n.y=e.y+e.height;var o=n.matrixTransform(t);n.x=e.x,n.y=e.y+e.height;var u=n.matrixTransform(t),l=a(r.x,i.x,o.x,u.x),c=s(r.x,i.x,o.x,u.x),f=a(r.y,i.y,o.y,u.y),h=s(r.y,i.y,o.y,u.y);return new me(l,f,c-l,h-f)},c.transformPoint=function(e,t){return new Z(c.createSVGPoint(e.x,e.y).matrixTransform(t))},c.transformLine=function(e,t){return new re(c.transformPoint(e.start,t),c.transformPoint(e.end,t))},c.transformPolyline=function(e,t){var n=e instanceof ke?e.points:e;c.isArray(n)||(n=[]);for(var r=[],i=0,o=n.length;i<o;i++)r[i]=c.transformPoint(n[i],t);return new ke(r)},c.styleToObject=function(e){for(var t={},n=e.split(";"),r=0;r<n.length;r++){var i=n[r].split("=");t[i[0].trim()]=i[1].trim()}return t},c.createSlicePathData=function(e,t,n,i){var o=2*r-1e-6,a=e,s=t,c=n,f=i,h=(f<c&&(h=c,c=f,f=h),f-c),d=h<r?"0":"1",p=u(c),g=l(c),v=u(f),m=l(f);return h>=o?a?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+-s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+a+"A"+a+","+a+" 0 1,0 0,"+-a+"A"+a+","+a+" 0 1,0 0,"+a+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+-s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":a?"M"+s*p+","+s*g+"A"+s+","+s+" 0 "+d+",1 "+s*v+","+s*m+"L"+a*v+","+a*m+"A"+a+","+a+" 0 "+d+",0 "+a*p+","+a*g+"Z":"M"+s*p+","+s*g+"A"+s+","+s+" 0 "+d+",1 "+s*v+","+s*m+"L0,0Z"},c.mergeAttrs=function(e,t){for(var n in t)"class"===n?e[n]=e[n]?e[n]+" "+t[n]:t[n]:"style"===n?c.isObject(e[n])&&c.isObject(t[n])?e[n]=c.mergeAttrs(e[n],t[n]):c.isObject(e[n])?e[n]=c.mergeAttrs(e[n],c.styleToObject(t[n])):c.isObject(t[n])?e[n]=c.mergeAttrs(c.styleToObject(e[n]),t[n]):e[n]=c.mergeAttrs(c.styleToObject(e[n]),c.styleToObject(t[n])):e[n]=t[n];return e},c.annotateString=function(e,t,n){t=t||[];for(var r,i,o,a=(n=n||{}).offset||0,s=[],u=[],l=0;l<e.length;l++){i=u[l]=e[l];for(var f=0;f<t.length;f++){var h=t[f],d=h.start+a,p=h.end+a;l>=d&&l<p&&(c.isObject(i)?i.attrs=c.mergeAttrs(c.mergeAttrs({},i.attrs),h.attrs):i=u[l]={t:e[l],attrs:h.attrs},n.includeAnnotationIndices&&(i.annotations||(i.annotations=[])).push(f))}(o=u[l-1])?c.isObject(i)&&c.isObject(o)?JSON.stringify(i.attrs)===JSON.stringify(o.attrs)?r.t+=i.t:(s.push(r),r=i):c.isObject(i)||c.isObject(o)?(s.push(r),r=i):r=(r||"")+i:r=i}return r&&s.push(r),s},c.findAnnotationsAtIndex=function(e,t){var n=[];return e&&e.forEach((function(e){e.start<t&&t<=e.end&&n.push(e)})),n},c.findAnnotationsBetweenIndexes=function(e,t,n){var r=[];return e&&e.forEach((function(e){(t>=e.start&&t<e.end||n>e.start&&n<=e.end||e.start>=t&&e.end<n)&&r.push(e)})),r},c.shiftAnnotations=function(e,t,n){return e&&e.forEach((function(e){e.start<t&&e.end>=t?e.end+=n:e.start>=t&&(e.start+=n,e.end+=n)})),e},c.convertLineToPathData=function(e){return["M",(e=c(e)).attr("x1"),e.attr("y1"),"L",e.attr("x2"),e.attr("y2")].join(" ")},c.convertPolygonToPathData=function(e){var t=c.getPointsFromSvgNode(e);return 0===t.length?null:c.svgPointsToPath(t)+" Z"},c.convertPolylineToPathData=function(e){var t=c.getPointsFromSvgNode(e);return 0===t.length?null:c.svgPointsToPath(t)},c.svgPointsToPath=function(e){for(var t=0,n=e.length;t<n;t++)e[t]=e[t].x+" "+e[t].y;return"M "+e.join(" L")},c.getPointsFromSvgNode=function(e){var t=[],n=(e=c.toNode(e)).points;if(n)for(var r=0,i=n.numberOfItems;r<i;r++)t.push(n.getItem(r));return t},c.KAPPA=.551784,c.convertCircleToPathData=function(e){e=c(e);var t=parseFloat(e.attr("cx"))||0,n=parseFloat(e.attr("cy"))||0,r=parseFloat(e.attr("r")),i=r*c.KAPPA;return["M",t,n-r,"C",t+i,n-r,t+r,n-i,t+r,n,"C",t+r,n+i,t+i,n+r,t,n+r,"C",t-i,n+r,t-r,n+i,t-r,n,"C",t-r,n-i,t-i,n-r,t,n-r,"Z"].join(" ")},c.convertEllipseToPathData=function(e){e=c(e);var t=parseFloat(e.attr("cx"))||0,n=parseFloat(e.attr("cy"))||0,r=parseFloat(e.attr("rx")),i=parseFloat(e.attr("ry"))||r,o=r*c.KAPPA,a=i*c.KAPPA;return["M",t,n-i,"C",t+o,n-i,t+r,n-a,t+r,n,"C",t+r,n+a,t+o,n+i,t,n+i,"C",t-o,n+i,t-r,n+a,t-r,n,"C",t-r,n-a,t-o,n-i,t,n-i,"Z"].join(" ")},c.convertRectToPathData=function(e){return e=c(e),c.rectToPath({x:parseFloat(e.attr("x"))||0,y:parseFloat(e.attr("y"))||0,width:parseFloat(e.attr("width"))||0,height:parseFloat(e.attr("height"))||0,rx:parseFloat(e.attr("rx"))||0,ry:parseFloat(e.attr("ry"))||0})},c.rectToPath=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=a(e.rx||e["top-rx"]||0,r/2),s=a(e.rx||e["bottom-rx"]||0,r/2),u=a(e.ry||e["top-ry"]||0,i/2),l=a(e.ry||e["bottom-ry"]||0,i/2);return(o||s||u||l?["M",t,n+u,"v",i-u-l,"a",s,l,0,0,0,s,l,"h",r-2*s,"a",s,l,0,0,0,s,-l,"v",-(i-l-u),"a",o,u,0,0,0,-o,-u,"h",-(r-2*o),"a",o,u,0,0,0,-o,u,"Z"]:["M",t,n,"H",t+r,"V",n+i,"H",t,"V",n,"Z"]).join(" ")},c.normalizePathData=function(){var e="\t\n\v\f\r \u2028\u2029",t=new RegExp("([a-z])["+e+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+e+"]*,?["+e+"]*)+)","ig"),n=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+e+"]*,?["+e+"]*","ig"),r=Math,i=r.PI,o=r.sin,a=r.cos,s=r.tan,u=r.asin,l=r.sqrt,c=r.abs;function f(e,t,n,r,i,o){var a=1/3,s=2/3;return[a*e+s*n,a*t+s*r,a*i+s*n,a*o+s*r,i,o]}function h(e,t,n){return{x:e*a(n)-t*o(n),y:e*o(n)+t*a(n)}}function d(e,t,n,r,f,p,g,v,m,y){var b,w=120*i/180,x=i/180*(+f||0),k=[];if(y)N=y[0],O=y[1],L=y[2],T=y[3];else{e=(b=h(e,t,-x)).x,t=b.y;var S=(e-(v=(b=h(v,m,-x)).x))/2,_=(t-(m=b.y))/2,E=S*S/(n*n)+_*_/(r*r);E>1&&(n*=E=l(E),r*=E);var C=n*n,A=r*r,P=(p==g?-1:1)*l(c((C*A-C*_*_-A*S*S)/(C*_*_+A*S*S))),L=P*n*_/r+(e+v)/2,T=P*-r*S/n+(t+m)/2,N=u(((t-T)/r).toFixed(9)),O=u(((m-T)/r).toFixed(9));(N=e<L?i-N:N)<0&&(N=2*i+N),(O=v<L?i-O:O)<0&&(O=2*i+O),g&&N>O&&(N-=2*i),!g&&O>N&&(O-=2*i)}var M=O-N;if(c(M)>w){var R=O,D=v,j=m;k=d(v=L+n*a(O=N+w*(g&&O>N?1:-1)),m=T+r*o(O),n,r,f,0,g,D,j,[O,R,L,T])}M=O-N;var I=a(N),F=o(N),z=a(O),V=o(O),B=s(M/4),$=4/3*(n*B),U=4/3*(r*B),H=[e,t],q=[e+$*F,t-U*I],W=[v+$*V,m-U*z],G=[v,m];if(q[0]=2*H[0]-q[0],q[1]=2*H[1]-q[1],y)return[q,W,G].concat(k);for(var Y=[],X=(k=[q,W,G].concat(k).join().split(",")).length,K=0;K<X;K++)Y[K]=K%2?h(k[K-1],k[K],x).y:h(k[K],k[K+1],x).x;return Y}function p(e){var r=function(e){if(Array.isArray(e)&&Array.isArray(e&&e[0])||(e=function(e){if(!e)return null;var r={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return String(e).replace(t,(function(e,t,o){var a=[],s=t.toLowerCase();for(o.replace(n,(function(e,t){t&&a.push(+t)})),"m"===s&&a.length>2&&(i.push([t].concat(a.splice(0,2))),s="l",t="m"===t?"l":"L");a.length>=r[s]&&(i.push([t].concat(a.splice(0,r[s]))),r[s]););})),i}(e)),!e||!e.length)return[["M",0,0]];for(var r,i=[],o=0,a=0,s=0,u=0,l=e.length,c=0;c<l;c++){var f=[];i.push(f);var h,d,p=e[c];if((r=p[0])!=r.toUpperCase())switch(f[0]=r.toUpperCase(),f[0]){case"A":f[1]=p[1],f[2]=p[2],f[3]=p[3],f[4]=p[4],f[5]=p[5],f[6]=+p[6]+o,f[7]=+p[7]+a;break;case"V":f[1]=+p[1]+a;break;case"H":f[1]=+p[1]+o;break;case"M":for(s=+p[1]+o,u=+p[2]+a,h=p.length,d=1;d<h;d++)f[d]=+p[d]+(d%2?o:a);break;default:for(h=p.length,d=1;d<h;d++)f[d]=+p[d]+(d%2?o:a)}else for(var g=p.length,v=0;v<g;v++)f[v]=p[v];switch(f[0]){case"Z":o=+s,a=+u;break;case"H":o=f[1];break;case"V":a=f[1];break;case"M":s=f[f.length-2],u=f[f.length-1],o=f[f.length-2],a=f[f.length-1];break;default:o=f[f.length-2],a=f[f.length-1]}}return i}(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function o(e,t,n){var r,i;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(e[0]in{T:1,Q:1}||(t.qx=null,t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=0===parseFloat(e[1])||0===parseFloat(e[2])?["L",e[6],e[7]]:["C"].concat(d.apply(0,[t.x,t.y].concat(e.slice(1))));break;case"S":"C"===n||"S"===n?(r=2*t.x-t.bx,i=2*t.y-t.by):(r=t.x,i=t.y),e=["C",r,i].concat(e.slice(1));break;case"T":"Q"===n||"T"===n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C"].concat(f(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"].concat(f(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"H":e=["L"].concat(e[1],t.y);break;case"V":e=["L"].concat(t.x,e[1])}return e}function a(e,t){if(e[t].length>7){e[t].shift();for(var n=e[t];n.length;)s[t]="A",e.splice(t++,0,["C"].concat(n.splice(0,6)));e.splice(t,1),c=r.length}}for(var s=[],u="",l="",c=r.length,h=0;h<c;h++){r[h]&&(u=r[h][0]),"C"!==u&&(s[h]=u,h>0&&(l=s[h-1])),r[h]=o(r[h],i,l),"A"!==s[h]&&"C"===u&&(s[h]="C"),a(r,h);var p=r[h],g=p.length;i.x=p[g-2],i.y=p[g-1],i.bx=parseFloat(p[g-4])||i.x,i.by=parseFloat(p[g-3])||i.y}return r[0][0]&&"M"===r[0][0]||r.unshift(["M",0,0]),r}return function(e){return p(e).join(",").split(",").join(" ")}}(),c.namespace=e,c.g=t,c}(),kt=xt,St={useCSSSelectors:!0,classNamePrefix:"joint-",defaultTheme:"default",doubleTapInterval:300},_t=function(e){return e?e.toString().split(" ").map((function(e){return e.substr(0,St.classNamePrefix.length)!==St.classNamePrefix&&(e=St.classNamePrefix+e),e})).join(" "):e},Et=function(e){return e?e.toString().split(" ").map((function(e){return e.substr(0,St.classNamePrefix.length)===St.classNamePrefix&&(e=e.substr(St.classNamePrefix.length)),e})).join(" "):e},Ct=function(e,t){for(var n={},r={},i=kt.namespace.svg,o=t||i,a=document.createDocumentFragment(),s=[e,a,o];s.length>0;){o=s.pop();for(var u=s.pop(),l=s.pop(),c=0,f=l.length;c<f;c++){var h=l[c];if(!h.hasOwnProperty("tagName"))throw new Error("json-dom-parser: missing tagName");var d=h.tagName;h.hasOwnProperty("namespaceURI")&&(o=h.namespaceURI);var p=document.createElementNS(o,d),g=o===i,v=g?kt:C,m=h.attributes;m&&v(p).attr(m);var y=h.style;if(y&&C(p).css(y),h.hasOwnProperty("className")){var b=h.className;g?p.className.baseVal=b:p.className=b}if(h.hasOwnProperty("textContent")&&(p.textContent=h.textContent),h.hasOwnProperty("selector")){var w=h.selector;if(n[w])throw new Error("json-dom-parser: selector must be unique");n[w]=p,v(p).attr("joint-selector",w)}if(h.hasOwnProperty("groupSelector")){var x=h.groupSelector;Array.isArray(x)||(x=[x]);for(var k=0,S=x.length;k<S;k++){var _=x[k],E=r[_];E||(E=r[_]=[]),E.push(p)}}u.appendChild(p);var A=h.children;Array.isArray(A)&&s.push(A,p,o)}}return{fragment:a,selectors:n,groupSelectors:r}},At=function(e){let t=0;if(0===e.length)return t;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t},Pt=function(e,t,n){for(var r,i=Array.isArray(t)?t:t.split(n||"/"),o=0,a=i.length;o<a;){if(r=i[o++],Object(e)!==e||!(r in e))return;e=e[r]}return e},Lt=function(e,t){return"string"!=typeof t&&"number"!=typeof t&&(t=String(t)),("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!==t},Tt=function(e,t,n,r){const i=Array.isArray(t)?t:t.split(r||"/"),o=i.length-1;let a=e,s=0;for(;s<o;s++){const t=i[s];if(!Lt(a,t))return e;a=a[t]||(a[t]={})}return a[i[o]]=n,e},Nt=function(e,t,n){const r=Array.isArray(t)?t:t.split(n||"/"),i=r.length-1;let o=e,a=0;for(;a<i;a++){const t=r[a];if(!Lt(o,t))return e;const n=o[t];if(!n)return e;o=n}return delete o[r[i]],e},Ot=function(e){return Ot.id=Ot.id||1,e.id=void 0===e.id?"j_"+Ot.id++:e.id,e.id},Mt=function(e){var t=e,n=e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0];if(n){for(var r in e)void 0===n[r]&&(n[r]=e[r]);t=n}var i=t.target;if(i){var o=i.correspondingUseElement;o&&(t.target=o)}return t},Rt=function(){var e;if("undefined"!=typeof window&&(e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame),!e){var t=0;e=function(e){var n=(new Date).getTime(),r=Math.max(0,16-(n-t)),i=setTimeout((function(){e(n+r)}),r);return t=n+r,i}}return function(t,n,...r){return e(void 0!==n?t.bind(n,...r):t)}}(),Dt=function(){var e,t="undefined"!=typeof window;return t&&(e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.msCancelRequestAnimationFrame||window.oCancelAnimationFrame||window.oCancelRequestAnimationFrame||window.mozCancelAnimationFrame||window.mozCancelRequestAnimationFrame),e=e||clearTimeout,t?e.bind(window):e}(),jt=function(e){return bn(e)&&"%"===e.slice(-1)},It=function(e,t){var n=parseFloat(e);if(Number.isNaN(n))return null;var r,i={};if(i.value=n,null==t)r="[A-Za-z]*";else if(Array.isArray(t)){if(0===t.length)return null;r=t.join("|")}else bn(t)&&(r=t);var o=function(t){var n=new RegExp("(?:\\d+(?:\\.\\d+)*)("+t+")$").exec(e);return n?n[1]:null}(r);return null===o?null:(i.unit=o,i)},Ft=function(e,t,n={},r={}){var i=t.width,o=t.height,a=r.svgDocument||kt("svg").node,s=kt("tspan").node,u=kt("text").attr(n).append(s).node,l=document.createTextNode("");u.style.opacity=0,u.style.display="block",s.style.display="block",s.appendChild(l),a.appendChild(u),r.svgDocument||document.body.appendChild(a);var c=r.separator||" ",f=r.eol||"\n",h=r.hyphen?new RegExp(r.hyphen):/[^\w\d]/,d=r.maxLineCount;yn(d)||(d=1/0);for(var p,g,v,m=e.split(c),y=[],b=[],w=0,x=0,k=m.length;w<k;w++){var S=m[w];if(S){var _=!1;if(f&&S.indexOf(f)>=0){if(S.length>1){for(var E=S.split(f),C=0,A=E.length-1;C<A;C++)E.splice(2*C+1,0,f);m.splice(w,1,...E.filter((e=>""!==e))),w--,k=m.length;continue}b[++x]="",_=!0}if(!_)if(l.data=b[x]?b[x]+" "+S:S,s.getComputedTextLength()<=i)b[x]=l.data,(p||g)&&(y[x++]=!0,p=0,g=0);else{if(!b[x]||p){var P=!!p;if(p=S.length-1,P||!p){if(!p){if(!b[x]){b=[];break}m.splice(w,2,S+m[w+1]),k--,y[x++]=!0,w--;continue}m[w]=S.substring(0,p),m[w+1]=S.substring(p)+(void 0===m[w+1]?"":m[w+1])}else{if(g)m.splice(w,2,m[w]+m[w+1]),g=0;else{var L=S.search(h);L>-1&&L!==S.length-1&&0!==L&&(g=L+1,p=0),m.splice(w,1,S.substring(0,g||p),S.substring(g||p)),k++}x&&!y[x-1]&&x--}w--;continue}x++,w--}var T=null;if(b.length>d)T=d-1;else if(void 0!==o){var N;void 0===v&&(v=(N="auto"===n.lineHeight?{value:1.5,unit:"em"}:It(n.lineHeight,["em"])||{value:1,unit:"em"}).value,"em"===N.unit&&(v*=u.getBBox().height)),v*b.length>o&&(T=Math.floor(o/v)-1)}if(null!==T){b.splice(T+1);var O=r.ellipsis;if(!O||T<0)break;"string"!=typeof O&&(O="…");var M=b[T];if(!M&&!_)break;var R,D,j=M.length;do{if(D=M[j],R=M.substring(0,j),D?D.match(c)&&(R+=D):R+="string"==typeof c?c:" ",R+=O,l.data=R,s.getComputedTextLength()<=i){b[T]=R;break}j--}while(j>=0);break}}}return r.svgDocument?a.removeChild(u):document.body.removeChild(a),b.join(f)},zt=function(e){if(Object(e)!==e){var t=0;return isFinite(e)&&(t=+e),{top:t,right:t,bottom:t,left:t}}var n,r,i,o;return n=r=i=o=0,isFinite(e.vertical)&&(n=i=+e.vertical),isFinite(e.horizontal)&&(r=o=+e.horizontal),isFinite(e.top)&&(n=+e.top),isFinite(e.right)&&(r=+e.right),isFinite(e.bottom)&&(i=+e.bottom),isFinite(e.left)&&(o=+e.left),{top:n,right:r,bottom:i,left:o}},Vt={linear:function(e){return e},quad:function(e){return e*e},cubic:function(e){return e*e*e},inout:function(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)},exponential:function(e){return Math.pow(2,10*(e-1))},bounce:function(e){for(var t=0,n=1;;t+=n,n/=2)if(e>=(7-4*t)/11){var r=(11-6*t-11*e)/4;return-r*r+n*n}},reverse:function(e){return function(t){return 1-e(1-t)}},reflect:function(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}},clamp:function(e,t,n){return t=t||0,n=n||1,function(r){var i=e(r);return i<t?t:i>n?n:i}},back:function(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}},elastic:function(e){return e||(e=1.5),function(t){return Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*e/3*t)}}},Bt={number:function(e,t){var n=t-e;return function(t){return e+n*t}},object:function(e,t){var n=Object.keys(e);return function(r){var i,o,a={};for(i=n.length-1;-1!=i;i--)a[o=n[i]]=e[o]+(t[o]-e[o])*r;return a}},hexColor:function(e,t){var n=parseInt(e.slice(1),16),r=parseInt(t.slice(1),16),i=255&n,o=(255&r)-i,a=65280&n,s=(65280&r)-a,u=16711680&n,l=(16711680&r)-u;return function(e){return"#"+(1<<24|i+o*e&255|a+s*e&65280|u+l*e&16711680).toString(16).slice(1)}},unit:function(e,t){var n=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=n.exec(e),i=n.exec(t),o=i[1].indexOf("."),a=o>0?i[1].length-o-1:0;e=+r[1];var s=+i[1]-e,u=r[2];return function(t){return(e+s*t).toFixed(a)+u}}},$t={outline:function(e){var t=Number.isFinite(e.margin)?e.margin:2,n=Number.isFinite(e.width)?e.width:1;return Ut('<filter><feFlood flood-color="${color}" flood-opacity="${opacity}" result="colored"/><feMorphology in="SourceAlpha" result="morphedOuter" operator="dilate" radius="${outerRadius}" /><feMorphology in="SourceAlpha" result="morphedInner" operator="dilate" radius="${innerRadius}" /><feComposite result="morphedOuterColored" in="colored" in2="morphedOuter" operator="in"/><feComposite operator="xor" in="morphedOuterColored" in2="morphedInner" result="outline"/><feMerge><feMergeNode in="outline"/><feMergeNode in="SourceGraphic"/></feMerge></filter>')({color:e.color||"blue",opacity:Number.isFinite(e.opacity)?e.opacity:1,outerRadius:t+n,innerRadius:t})},highlight:function(e){return Ut('<filter><feFlood flood-color="${color}" flood-opacity="${opacity}" result="colored"/><feMorphology result="morphed" in="SourceGraphic" operator="dilate" radius="${width}"/><feComposite result="composed" in="colored" in2="morphed" operator="in"/><feGaussianBlur result="blured" in="composed" stdDeviation="${blur}"/><feBlend in="SourceGraphic" in2="blured" mode="normal"/></filter>')({color:e.color||"red",width:Number.isFinite(e.width)?e.width:1,blur:Number.isFinite(e.blur)?e.blur:0,opacity:Number.isFinite(e.opacity)?e.opacity:1})},blur:function(e){var t=Number.isFinite(e.x)?e.x:2;return Ut('<filter><feGaussianBlur stdDeviation="${stdDeviation}"/></filter>')({stdDeviation:Number.isFinite(e.y)?[t,e.y]:t})},dropShadow:function(e){var t="SVGFEDropShadowElement"in window?'<filter><feDropShadow stdDeviation="${blur}" dx="${dx}" dy="${dy}" flood-color="${color}" flood-opacity="${opacity}"/></filter>':'<filter><feGaussianBlur in="SourceAlpha" stdDeviation="${blur}"/><feOffset dx="${dx}" dy="${dy}" result="offsetblur"/><feFlood flood-color="${color}"/><feComposite in2="offsetblur" operator="in"/><feComponentTransfer><feFuncA type="linear" slope="${opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';return Ut(t)({dx:e.dx||0,dy:e.dy||0,opacity:Number.isFinite(e.opacity)?e.opacity:1,color:e.color||"black",blur:Number.isFinite(e.blur)?e.blur:4})},grayscale:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return Ut('<filter><feColorMatrix type="matrix" values="${a} ${b} ${c} 0 0 ${d} ${e} ${f} 0 0 ${g} ${b} ${h} 0 0 0 0 0 1 0"/></filter>')({a:.2126+.7874*(1-t),b:.7152-.7152*(1-t),c:.0722-.0722*(1-t),d:.2126-.2126*(1-t),e:.7152+.2848*(1-t),f:.0722-.0722*(1-t),g:.2126-.2126*(1-t),h:.0722+.9278*(1-t)})},sepia:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return Ut('<filter><feColorMatrix type="matrix" values="${a} ${b} ${c} 0 0 ${d} ${e} ${f} 0 0 ${g} ${h} ${i} 0 0 0 0 0 1 0"/></filter>')({a:.393+.607*(1-t),b:.769-.769*(1-t),c:.189-.189*(1-t),d:.349-.349*(1-t),e:.686+.314*(1-t),f:.168-.168*(1-t),g:.272-.272*(1-t),h:.534-.534*(1-t),i:.131+.869*(1-t)})},saturate:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return Ut('<filter><feColorMatrix type="saturate" values="${amount}"/></filter>')({amount:1-t})},hueRotate:function(e){return Ut('<filter><feColorMatrix type="hueRotate" values="${angle}"/></filter>')({angle:e.angle||0})},invert:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return Ut('<filter><feComponentTransfer><feFuncR type="table" tableValues="${amount} ${amount2}"/><feFuncG type="table" tableValues="${amount} ${amount2}"/><feFuncB type="table" tableValues="${amount} ${amount2}"/></feComponentTransfer></filter>')({amount:t,amount2:1-t})},brightness:function(e){return Ut('<filter><feComponentTransfer><feFuncR type="linear" slope="${amount}"/><feFuncG type="linear" slope="${amount}"/><feFuncB type="linear" slope="${amount}"/></feComponentTransfer></filter>')({amount:Number.isFinite(e.amount)?e.amount:1})},contrast:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return Ut('<filter><feComponentTransfer><feFuncR type="linear" slope="${amount}" intercept="${amount2}"/><feFuncG type="linear" slope="${amount}" intercept="${amount2}"/><feFuncB type="linear" slope="${amount}" intercept="${amount2}"/></feComponentTransfer></filter>')({amount:t,amount2:.5-t/2})}},Ut=function(e){var t=/<%= ([^ ]+) %>|\$\{ ?([^{} ]+) ?\}|\{\{([^{} ]+)\}\}/g;return function(n){return n=n||{},e.replace(t,(function(e){for(var t=Array.from(arguments).slice(1,4).find((function(e){return!!e})).split("."),r=n[t.shift()];void 0!==r&&t.length;)r=r[t.shift()];return void 0!==r?r:""}))}},Ht=(E.assign,E.defaults,E.defaultsDeep,E.assign),qt=E.defaults,Wt=E.defaultsDeep,Gt=E.invokeMap||E.invoke,Yt=E.sortedIndexBy||E.sortedIndex,Xt=E.uniqBy||E.uniq,Kt=E.clone,Jt=E.cloneDeep,Qt=E.isEmpty,Zt=E.isEqual,en=E.isFunction,tn=E.isPlainObject,nn=E.toArray,rn=(E.debounce,E.groupBy),on=(E.sortBy,E.flattenDeep),an=E.without,sn=E.difference,un=(E.intersection,E.union),ln=E.has,cn=E.result,fn=E.omit,hn=E.pick,dn=(E.bindAll,E.forIn),pn=E.camelCase,gn=E.uniqueId,vn=function(){if(E.mergeWith){var e=Array.from(arguments),t=e[e.length-1],n=en(t)?t:wn;return e.push((function(e,t){var r=n(e,t);return void 0!==r?r:Array.isArray(e)&&!Array.isArray(t)?t:void 0})),E.mergeWith.apply(this,e)}return E.merge.apply(this,arguments)},mn=function(e){return!!e&&("object"==typeof e||"function"==typeof e)},yn=function(e){var t=Object.prototype.toString;return"number"==typeof e||!!e&&"object"==typeof e&&"[object Number]"===t.call(e)},bn=function(e){var t=Object.prototype.toString;return"string"==typeof e||!!e&&"object"==typeof e&&"[object String]"===t.call(e)},wn=function(){};function xn(e){e=Xt(e);const t=nn(e).reduce((function(e,t){return e[t.id]=t.clone(),e}),{});return nn(e).forEach((function(e){const n=t[e.id];if(n.isLink()){const e=n.source(),r=n.target();e.id&&t[e.id]&&n.prop("source/id",t[e.id].id),r.id&&t[r.id]&&n.prop("target/id",t[r.id].id)}const r=e.get("parent");r&&t[r]&&n.set("parent",t[r].id);const i=nn(e.get("embeds")).reduce((function(e,n){return t[n]&&e.push(t[n].id),e}),[]);Qt(i)||n.set("embeds",i)})),t}const kn={x:"x",y:"y",width:"w",height:"h",minimum:"s",maximum:"l",diagonal:"d"},Sn=Object.keys(kn).map((e=>kn[e])).join(""),_n="[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?",En=/\s/g,Cn=new RegExp(`^(${_n}\\*)?([${Sn}])([-+]{1,2}${_n})?$`,"g");function An(e){throw new Error(`Invalid calc() expression: ${e}`)}function Pn(e,t){const n=Cn.exec(e.replace(En,""));n||An(e),Cn.lastIndex=0;const[,r=1,i,o=0]=n,{x:a,y:s,width:u,height:l}=t;let c=0;switch(i){case kn.width:c=u;break;case kn.height:c=l;break;case kn.x:c=a;break;case kn.y:c=s;break;case kn.minimum:c=Math.min(l,u);break;case kn.maximum:c=Math.max(l,u);break;case kn.diagonal:c=Math.sqrt(l*l+u*u)}return parseFloat(r)*c+function(e){if(!e)return 0;const[t]=e;switch(t){case"+":return parseFloat(e.substr(1));case"-":return-parseFloat(e.substr(1))}return parseFloat(e)}(o)}function Ln(e){return"string"==typeof e&&e.includes("calc")}function Tn(e,t){let n=e,r=0;for(;;){let e=n.indexOf("calc(",r);if(-1===e)return n;let i=e+5,o=1;e:for(;;){switch(n[i]){case"(":o++;break;case")":if(o--,0===o)break e;break;case void 0:An(n)}i++}let a=n.slice(e+5,i);Ln(a)&&(a=Tn(a,t));const s=String(Pn(a,t));n=n.slice(0,e)+s+n.slice(i+1),r=e+s.length}}function Nn(e,t){return function(n,r){var i=jt(n);n=parseFloat(n),i&&(n/=100);var o={};if(isFinite(n)){var a=i||n>=0&&n<=1?n*r[t]:Math.max(n+r[t],0);o[e]=a}return o}}function On(e,t,n){return function(r,i){var o,a=jt(r);if(r=parseFloat(r),a&&(r/=100),isFinite(r)){var s=i[n]();o=a||r>0&&r<1?s[e]+i[t]*r:s[e]+r}var u=Z();return u[e]=o||0,u}}function Mn(e,t,n){return function(r,i){var o;o="middle"===r?i[t]/2:r===n?i[t]:isFinite(r)?r>-1&&r<1?-i[t]*r:-r:jt(r)?i[t]*parseFloat(r)/100:0;var a=Z();return a[e]=-(i[e]+o),a}}function Rn(e,t){var n="joint-shape",r=t&&t.resetOffset;return function(t,i,o){var a=C(o),s=a.data(n);if(!s||s.value!==t){var u=e(t);s={value:t,shape:u,shapeBBox:u.bbox()},a.data(n,s)}var l=s.shape.clone(),c=s.shapeBBox.clone(),f=c.origin(),h=i.origin();c.x=h.x,c.y=h.y;var d=i.maxRectScaleToFit(c,h),p=0===c.width||0===i.width?1:d.sx,g=0===c.height||0===i.height?1:d.sy;return l.scale(p,g,f),r&&l.translate(-f.x,-f.y),l}}function Dn(e){var t=Rn((function(e){return new Te(kt.normalizePathData(e))}),e);return function(e,n,r){return{d:t(e,n,r).serialize()}}}function jn(e){var t=Rn(ke,e);return function(e,n,r){return{points:t(e,n,r).serialize()}}}function In(e,t){var n=new Z(1,0);return function(r){var i,o,a=this[e](r);return a?(o=t.rotate?a.vector().vectorAngle(n):0,i=a.start):(i=this.path.start,o=0),0===o?{transform:"translate("+i.x+","+i.y+")"}:{transform:"translate("+i.x+","+i.y+") rotate("+o+")"}}}function Fn(e){return function(t,n,r){const i=kt(r);i.attr(e)!==t&&i.attr(e,t)}}function zn(e,t,n){return void 0!==n.text}function Vn(){return this.model.isLink()}function Bn(e){var t={},n=e.stroke;"string"==typeof n&&(t.stroke=n,t.fill=n);var r=e.strokeOpacity;return void 0===r&&(r=e["stroke-opacity"]),void 0===r&&(r=e.opacity),void 0!==r&&(t["stroke-opacity"]=r,t["fill-opacity"]=r),t}function $n(e){const{paper:t}=this;return`url(#${"pattern"===e.type?t.definePattern(e):t.defineGradient(e)})`}const Un={xlinkShow:{set:"xlink:show"},xlinkRole:{set:"xlink:role"},xlinkType:{set:"xlink:type"},xlinkArcrole:{set:"xlink:arcrole"},xlinkTitle:{set:"xlink:title"},xlinkActuate:{set:"xlink:actuate"},xmlSpace:{set:"xml:space"},xmlBase:{set:"xml:base"},xmlLang:{set:"xml:lang"},preserveAspectRatio:{set:"preserveAspectRatio"},requiredExtension:{set:"requiredExtension"},requiredFeatures:{set:"requiredFeatures"},systemLanguage:{set:"systemLanguage"},externalResourcesRequired:{set:"externalResourceRequired"},href:{set:Fn("href")},xlinkHref:{set:Fn("xlink:href")},filter:{qualify:tn,set:function(e){return"url(#"+this.paper.defineFilter(e)+")"}},fill:{qualify:tn,set:$n},stroke:{qualify:tn,set:$n},sourceMarker:{qualify:tn,set:function(e,t,n,r){return e=Ht(Bn(r),e),{"marker-start":"url(#"+this.paper.defineMarker(e)+")"}}},targetMarker:{qualify:tn,set:function(e,t,n,r){return e=Ht(Bn(r),{transform:"rotate(180)"},e),{"marker-end":"url(#"+this.paper.defineMarker(e)+")"}}},vertexMarker:{qualify:tn,set:function(e,t,n,r){return e=Ht(Bn(r),e),{"marker-mid":"url(#"+this.paper.defineMarker(e)+")"}}},text:{qualify:function(e,t,n){return!n.textWrap||!tn(n.textWrap)},set:function(e,t,n,r){var i=C(n),o="joint-text",a=i.data(o),s=hn(r,"lineHeight","annotations","textPath","x","textVerticalAnchor","eol","displayEmpty");const{x:u}=s;Ln(u)&&(s.x=Tn(u,t));var l=s.fontSize=r["font-size"]||r.fontSize,c=JSON.stringify([e,s]);if(void 0===a||a!==c){l&&n.setAttribute("font-size",l);var f=s.textPath;if(mn(f)){var h=f.selector;if("string"==typeof h){var d=this.findBySelector(h)[0];d instanceof SVGPathElement&&(s.textPath=Ht({"xlink:href":"#"+d.id},f))}}kt(n).text(""+e,s),i.data(o,c)}}},textWrap:{qualify:tn,set:function(e,t,n,r){var i=e.width||0,o={};jt(i)?o.width=t.width*parseFloat(i)/100:o.width=i<=0?t.width+i:i;var a,s=e.height||0;jt(s)?o.height=t.height*parseFloat(s)/100:o.height=s<=0?t.height+s:s;var u=e.text;void 0===u&&(u=r.text),a=void 0!==u?Ft(""+u,o,{"font-weight":r["font-weight"]||r.fontWeight,"font-size":r["font-size"]||r.fontSize,"font-family":r["font-family"]||r.fontFamily,lineHeight:r.lineHeight,"letter-spacing":"letter-spacing"in r?r["letter-spacing"]:r.letterSpacing},{svgDocument:this.paper.svg,ellipsis:e.ellipsis,hyphen:e.hyphen,maxLineCount:e.maxLineCount}):"",Un.text.set.call(this,a,t,n,r)}},title:{qualify:function(e,t){return t instanceof SVGElement},set:function(e,t,n){var r=C(n),i="joint-title",o=r.data(i);if(void 0===o||o!==e){r.data(i,e);var a=n.firstChild;if(a&&"TITLE"===a.tagName.toUpperCase())a.textContent=e;else{var s=document.createElementNS(n.namespaceURI,"title");s.textContent=e,n.insertBefore(s,a)}}}},lineHeight:{qualify:zn},textVerticalAnchor:{qualify:zn},textPath:{qualify:zn},annotations:{qualify:zn},eol:{qualify:zn},displayEmpty:{qualify:zn},port:{set:function(e){return null===e||void 0===e.id?e:e.id}},style:{qualify:tn,set:function(e,t,n){C(n).css(e)}},html:{set:function(e,t,n){C(n).html(e+"")}},ref:{},refX:{position:On("x","width","origin")},refY:{position:On("y","height","origin")},refDx:{position:On("x","width","corner")},refDy:{position:On("y","height","corner")},refWidth:{set:Nn("width","width")},refHeight:{set:Nn("height","height")},refRx:{set:Nn("rx","width")},refRy:{set:Nn("ry","height")},refRInscribed:{set:(Hn=Nn("r","width"),qn=Nn("r","height"),function(e,t){return(t.height>t.width?Hn:qn)(e,t)})},refRCircumscribed:{set:function(e,t){var n=jt(e);e=parseFloat(e),n&&(e/=100);var r,i=Math.sqrt(t.height*t.height+t.width*t.width);return isFinite(e)&&(r=n||e>=0&&e<=1?e*i:Math.max(e+i,0)),{r}}},refCx:{set:Nn("cx","width")},refCy:{set:Nn("cy","height")},xAlignment:{offset:Mn("x","width","right")},yAlignment:{offset:Mn("y","height","bottom")},resetOffset:{offset:function(e,t){return e?{x:-t.x,y:-t.y}:{x:0,y:0}}},refDResetOffset:{set:Dn({resetOffset:!0})},refDKeepOffset:{set:Dn({resetOffset:!1})},refPointsResetOffset:{set:jn({resetOffset:!0})},refPointsKeepOffset:{set:jn({resetOffset:!1})},connection:{qualify:Vn,set:function({stubs:e=0}){let t;if(isFinite(e)&&0!==e){let n;n=e<0?(this.getConnectionLength()+e)/2:e;const r=this.getConnection(),i=r.divideAtLength(n),o=r.divideAtLength(-n);i&&o&&(t=`${i[0].serialize()} ${o[1].serialize()}`)}return{d:t||this.getSerializedConnection()}}},atConnectionLengthKeepGradient:{qualify:Vn,set:In("getTangentAtLength",{rotate:!0})},atConnectionLengthIgnoreGradient:{qualify:Vn,set:In("getTangentAtLength",{rotate:!1})},atConnectionRatioKeepGradient:{qualify:Vn,set:In("getTangentAtRatio",{rotate:!0})},atConnectionRatioIgnoreGradient:{qualify:Vn,set:In("getTangentAtRatio",{rotate:!1})}};var Hn,qn;Un["xlink:href"]=Un.xlinkHref,["transform","d","points","width","height","cx","cy","r","rx","ry","x1","x2","y1","y2","x","y","dx","dy"].forEach((e=>{Un[e]={qualify:Ln,set:function(t,n){return{[e]:Tn(t,n)}}}})),Un.refR=Un.refRInscribed,Un.refD=Un.refDResetOffset,Un.refPoints=Un.refPointsResetOffset,Un.atConnectionLength=Un.atConnectionLengthKeepGradient,Un.atConnectionRatio=Un.atConnectionRatioKeepGradient,Un.refX2=Un.refX,Un.refY2=Un.refY,Un.refWidth2=Un.refWidth,Un.refHeight2=Un.refHeight,Un["ref-x"]=Un.refX,Un["ref-y"]=Un.refY,Un["ref-dy"]=Un.refDy,Un["ref-dx"]=Un.refDx,Un["ref-width"]=Un.refWidth,Un["ref-height"]=Un.refHeight,Un["x-alignment"]=Un.xAlignment,Un["y-alignment"]=Un.yAlignment;const Wn=Un,Gn=_.Model.extend({constructor:function(e,t){var n,r=e||{};"function"==typeof this.preinitialize&&this.preinitialize.apply(this,arguments),this.cid=gn("c"),this.attributes={},t&&t.collection&&(this.collection=t.collection),t&&t.parse&&(r=this.parse(r,t)||{}),(n=cn(this,"defaults"))&&(r=vn({},n,r)),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)},translate:function(e,t,n){throw new Error("Must define a translate() method.")},toJSON:function(){const e=cn(this.constructor.prototype,"defaults").attrs||{},t=this.attributes.attrs,n={};dn(t,(function(t,r){const i=e[r];dn(t,(function(e,t){mn(e)&&!Array.isArray(e)?dn(e,(function(e,o){i&&i[t]&&Zt(i[t][o],e)||(n[r]=n[r]||{},(n[r][t]||(n[r][t]={}))[o]=e)})):i&&Zt(i[t],e)||(n[r]=n[r]||{},n[r][t]=e)}))}));const r=Jt(fn(this.attributes,"attrs"));return r.attrs=n,r},initialize:function(e){const t=this.getIdAttribute();e&&t in e||this.set(t,this.generateId(),{silent:!0}),this._transitionIds={},this._scheduledTransitionIds={},this.processPorts(),this.on("change:attrs",this.processPorts,this)},getIdAttribute:function(){return this.idAttribute||"id"},generateId:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},processPorts:function(){var e=this.ports,t={};dn(this.get("attrs"),(function(e,n){e&&e.port&&(void 0!==e.port.id?t[e.port.id]=e.port:t[e.port]={id:e.port})}));var n={};dn(e,(function(e,r){t[r]||(n[r]=!0)})),this.graph&&!Qt(n)&&(this.graph.getConnectedLinks(this,{inbound:!0}).forEach((function(e){n[e.get("target").port]&&e.remove()})),this.graph.getConnectedLinks(this,{outbound:!0}).forEach((function(e){n[e.get("source").port]&&e.remove()}))),this.ports=t},remove:function(e={}){const{graph:t,collection:n}=this;if(!t)return n&&n.remove(this,e),this;t.startBatch("remove");const r=this.getParentCell();r&&r.unembed(this,e);const i=this.getEmbeddedCells();for(let t=0,n=i.length;t<n;t++){const n=i[t];n&&n.remove(e)}return this.trigger("remove",this,t.attributes.cells,e),t.stopBatch("remove"),this},toFront:function(e){var t=this.graph;if(t){e=e||{};var n,r=t.maxZIndex();e.deep?(n=this.getEmbeddedCells({deep:!0,breadthFirst:!1!==e.breadthFirst})).unshift(this):n=[this],r=r-n.length+1;var i=t.get("cells"),o=i.indexOf(this)!==i.length-n.length;o||(o=n.some((function(e,t){return e.get("z")!==r+t}))),o&&(this.startBatch("to-front"),r+=n.length,n.forEach((function(t,n){t.set("z",r+n,e)})),this.stopBatch("to-front"))}return this},toBack:function(e){var t=this.graph;if(t){e=e||{};var n,r=t.minZIndex();e.deep?(n=this.getEmbeddedCells({deep:!0,breadthFirst:!1!==e.breadthFirst})).unshift(this):n=[this];var i=0!==t.get("cells").indexOf(this);i||(i=n.some((function(e,t){return e.get("z")!==r+t}))),i&&(this.startBatch("to-back"),r-=n.length,n.forEach((function(t,n){t.set("z",r+n,e)})),this.stopBatch("to-back"))}return this},parent:function(e,t){return void 0===e?this.get("parent"):this.set("parent",e,t)},embed:function(e,t){const n=Array.isArray(e)?e:[e];if(!this.canEmbed(n))throw new Error("Recursive embedding not allowed.");return this._embedCells(n,t),this},unembed:function(e,t){const n=Array.isArray(e)?e:[e];return this._unembedCells(n,t),this},canEmbed:function(e){return(Array.isArray(e)?e:[e]).every((e=>this!==e&&!this.isEmbeddedIn(e)))},_embedCells:function(e,t){const n="embed";this.startBatch(n);const r=Ht([],this.get("embeds"));e.forEach((e=>{r[e.isLink()?"unshift":"push"](e.id),e.parent(this.id,t)})),this.set("embeds",Xt(r),t),this.stopBatch(n)},_unembedCells:function(e,t){const n="unembed";this.startBatch(n),e.forEach((e=>e.unset("parent",t))),this.set("embeds",an(this.get("embeds"),...e.map((e=>e.id))),t),this.stopBatch(n)},getParentCell:function(){var e=this.parent(),t=this.graph;return e&&t&&t.getCell(e)||null},getAncestors:function(){var e=[];if(!this.graph)return e;for(var t=this.getParentCell();t;)e.push(t),t=t.getParentCell();return e},getEmbeddedCells:function(e){if(e=e||{},this.graph){var t;if(e.deep)if(e.breadthFirst){t=[];for(var n=this.getEmbeddedCells();n.length>0;){var r=n.shift();t.push(r),n.push.apply(n,r.getEmbeddedCells())}}else(t=this.getEmbeddedCells()).forEach((function(n){t.push.apply(t,n.getEmbeddedCells(e))}));else t=nn(this.get("embeds")).map(this.graph.getCell,this.graph);return t}return[]},isEmbeddedIn:function(e,t){var n=bn(e)?e:e.id,r=this.parent();if(t=qt({deep:!0},t),this.graph&&t.deep){for(;r;){if(r===n)return!0;r=this.graph.getCell(r).parent()}return!1}return r===n},isEmbedded:function(){return!!this.parent()},clone:function(e){if((e=e||{}).deep)return nn(xn([this].concat(this.getEmbeddedCells({deep:!0}))));var t=_.Model.prototype.clone.apply(this,arguments);return t.set(this.getIdAttribute(),this.generateId()),t.unset("embeds"),t.unset("parent"),t},prop:function(e,t,n){var r=bn(e);if(r||Array.isArray(e)){if(arguments.length>1){var i,o;r?o=(i=e).split("/"):(i=e.join("/"),o=e.slice());var a=o[0],s=o.length;if((n=n||{}).propertyPath=i,n.propertyValue=t,n.propertyPathArray=o,1===s)return this.set(a,t,n);for(var u={},l=u,c=a,f=1;f<s;f++){var h=o[f],d=Number.isFinite(r?Number(h):h);l=l[c]=d?[]:{},c=h}u=Tt(u,o,t,"/");var p=vn({},this.attributes);n.rewrite&&Nt(p,i,"/");var g=vn(p,u);return this.set(a,g[a],n)}return Pt(this.attributes,e,"/")}return this.set(vn({},this.attributes,e),t)},removeProp:function(e,t){t=t||{};var n=Array.isArray(e)?e:e.split("/"),r=n[0];if("attrs"===r&&(t.dirty=!0),1===n.length)return this.unset(e,t);var i=n.slice(1),o=Jt(this.get(r));return Nt(o,i,"/"),this.set(r,o,t)},attr:function(e,t,n){var r=Array.from(arguments);return 0===r.length?this.get("attrs"):(Array.isArray(e)?r[0]=["attrs"].concat(e):bn(e)?r[0]="attrs/"+e:r[0]={attrs:e},this.prop.apply(this,r))},removeAttr:function(e,t){return Array.isArray(e)?this.removeProp(["attrs"].concat(e)):this.removeProp("attrs/"+e,t)},transition:function(e,t,n,r){r=r||"/",n=Ht({duration:100,delay:10,timingFunction:Vt.linear,valueFunction:Bt.number},n);var i,o=0,a=function(t){var r,s,u;(s=(t-=o=o||t)/n.duration)<1?this._transitionIds[e]=r=Rt(a):(s=1,delete this._transitionIds[e]),u=i(n.timingFunction(s)),n.transitionId=r,this.prop(e,u,n),r||this.trigger("transition:end",this,e)}.bind(this);const{_scheduledTransitionIds:s}=this;let u;return u=setTimeout((o=>{s[e]&&(s[e]=an(s[e],u),0===s[e].length&&delete s[e]),this.stopPendingTransitions(e,r),i=n.valueFunction(Pt(this.attributes,e,r),t),this._transitionIds[e]=Rt(o),this.trigger("transition:start",this,e)}),n.delay,a),s[e]||(s[e]=[]),s[e].push(u),u},getTransitions:function(){return un(Object.keys(this._transitionIds),Object.keys(this._scheduledTransitionIds))},stopScheduledTransitions:function(e,t="/"){const{_scheduledTransitionIds:n={}}=this;let r=Object.keys(n);if(e){const n=e.split(t);r=r.filter((e=>Zt(n,e.split(t).slice(0,n.length))))}return r.forEach((e=>{n[e].forEach((e=>clearTimeout(e))),delete n[e]})),this},stopPendingTransitions(e,t="/"){const{_transitionIds:n={}}=this;let r=Object.keys(n);if(e){const n=e.split(t);r=r.filter((e=>Zt(n,e.split(t).slice(0,n.length))))}r.forEach((e=>{const t=n[e];Dt(t),delete n[e],this.trigger("transition:end",this,e)}))},stopTransitions:function(e,t="/"){return this.stopScheduledTransitions(e,t),this.stopPendingTransitions(e,t),this},addTo:function(e,t){return e.addCell(this,t),this},findView:function(e){return e.findViewByModel(this)},isElement:function(){return!1},isLink:function(){return!1},startBatch:function(e,t){return this.graph&&this.graph.startBatch(e,Ht({},t,{cell:this})),this},stopBatch:function(e,t){return this.graph&&this.graph.stopBatch(e,Ht({},t,{cell:this})),this},getChangeFlag:function(e){var t=0;if(!e)return t;for(var n in e)e.hasOwnProperty(n)&&this.hasChanged(n)&&(t|=e[n]);return t},angle:function(){return 0},position:function(){return new Z(0,0)},getPointFromConnectedLink:function(){return new Z},getBBox:function(){return new me(0,0,0,0)},getPointRotatedAroundCenter(e,t,n){const r=new Z(t,n);return e&&r.rotate(this.getBBox().center(),e),r},getAbsolutePointFromRelative(e,t){return this.getPointRotatedAroundCenter(-this.angle(),this.position().offset(e,t))},getRelativePointFromAbsolute(e,t){return this.getPointRotatedAroundCenter(this.angle(),e,t).difference(this.position())}},{getAttributeDefinition:function(e){var t=this.attributes,n=Wn;return t&&t[e]||n[e]},define:function(e,t,n,r){n=Ht({defaults:Wt({type:e},t,this.prototype.defaults)},n);var i=this.extend(n,r);return"undefined"!=typeof joint&&ln(joint,"shapes")&&Tt(joint.shapes,e,i,"."),i}}),Yn=Gn.extend({markup:['<path class="connection" stroke="black" d="M 0 0 0 0"/>','<path class="marker-source" fill="black" stroke="black" d="M 0 0 0 0"/>','<path class="marker-target" fill="black" stroke="black" d="M 0 0 0 0"/>','<path class="connection-wrap" d="M 0 0 0 0"/>','<g class="labels"/>','<g class="marker-vertices"/>','<g class="marker-arrowheads"/>','<g class="link-tools"/>'].join(""),toolMarkup:['<g class="link-tool">','<g class="tool-remove" event="remove">','<circle r="11" />','<path transform="scale(.8) translate(-16, -16)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z" />',"<title>Remove link.</title>","</g>",'<g class="tool-options" event="link:options">','<circle r="11" transform="translate(25)"/>','<path fill="white" transform="scale(.55) translate(29, -16)" d="M31.229,17.736c0.064-0.571,0.104-1.148,0.104-1.736s-0.04-1.166-0.104-1.737l-4.377-1.557c-0.218-0.716-0.504-1.401-0.851-2.05l1.993-4.192c-0.725-0.91-1.549-1.734-2.458-2.459l-4.193,1.994c-0.647-0.347-1.334-0.632-2.049-0.849l-1.558-4.378C17.165,0.708,16.588,0.667,16,0.667s-1.166,0.041-1.737,0.105L12.707,5.15c-0.716,0.217-1.401,0.502-2.05,0.849L6.464,4.005C5.554,4.73,4.73,5.554,4.005,6.464l1.994,4.192c-0.347,0.648-0.632,1.334-0.849,2.05l-4.378,1.557C0.708,14.834,0.667,15.412,0.667,16s0.041,1.165,0.105,1.736l4.378,1.558c0.217,0.715,0.502,1.401,0.849,2.049l-1.994,4.193c0.725,0.909,1.549,1.733,2.459,2.458l4.192-1.993c0.648,0.347,1.334,0.633,2.05,0.851l1.557,4.377c0.571,0.064,1.148,0.104,1.737,0.104c0.588,0,1.165-0.04,1.736-0.104l1.558-4.377c0.715-0.218,1.399-0.504,2.049-0.851l4.193,1.993c0.909-0.725,1.733-1.549,2.458-2.458l-1.993-4.193c0.347-0.647,0.633-1.334,0.851-2.049L31.229,17.736zM16,20.871c-2.69,0-4.872-2.182-4.872-4.871c0-2.69,2.182-4.872,4.872-4.872c2.689,0,4.871,2.182,4.871,4.872C20.871,18.689,18.689,20.871,16,20.871z"/>',"<title>Link options.</title>","</g>","</g>"].join(""),doubleToolMarkup:void 0,vertexMarkup:['<g class="marker-vertex-group" transform="translate(<%= x %>, <%= y %>)">','<circle class="marker-vertex" idx="<%= idx %>" r="10" />','<path class="marker-vertex-remove-area" idx="<%= idx %>" d="M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z" transform="translate(5, -33)"/>','<path class="marker-vertex-remove" idx="<%= idx %>" transform="scale(.8) translate(9.5, -37)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z">',"<title>Remove vertex.</title>","</path>","</g>"].join(""),arrowheadMarkup:['<g class="marker-arrowhead-group marker-arrowhead-group-<%= end %>">','<path class="marker-arrowhead" end="<%= end %>" d="M 26 0 L 0 13 L 26 26 z" />',"</g>"].join(""),defaultLabel:void 0,labelMarkup:void 0,_builtins:{defaultLabel:{markup:[{tagName:"rect",selector:"rect"},{tagName:"text",selector:"text"}],attrs:{text:{fill:"#000000",fontSize:14,textAnchor:"middle",yAlignment:"middle",pointerEvents:"none"},rect:{ref:"text",fill:"#ffffff",rx:3,ry:3,refWidth:1,refHeight:1,refX:0,refY:0}},position:{distance:.5}}},defaults:{type:"link",source:{},target:{}},isLink:function(){return!0},disconnect:function(e){return this.set({source:{x:0,y:0},target:{x:0,y:0}},e)},source:function(e,t,n){return void 0===e?Kt(this.get("source")):e instanceof Gn?((r=Kt(t)||{}).id=e.id,i=n,this.set("source",r,i)):tn(e)?(r=e,i=t,this.set("source",r,i)):((r=Kt(t)||{}).x=e.x,r.y=e.y,i=n,this.set("source",r,i));var r,i},target:function(e,t,n){return void 0===e?Kt(this.get("target")):e instanceof Gn?((r=Kt(t)||{}).id=e.id,i=n,this.set("target",r,i)):tn(e)?(r=e,i=t,this.set("target",r,i)):((r=Kt(t)||{}).x=e.x,r.y=e.y,i=n,this.set("target",r,i));var r,i},router:function(e,t,n){if(void 0===e){var r=this.get("router");return r?"object"==typeof r?Kt(r):r:this.get("manhattan")?{name:"orthogonal"}:null}var i="object"==typeof e||"function"==typeof e,o=i?e:{name:e,args:t},a=i?t:n;return this.set("router",o,a)},connector:function(e,t,n){if(void 0===e){var r=this.get("connector");return r?"object"==typeof r?Kt(r):r:this.get("smooth")?{name:"smooth"}:null}var i="object"==typeof e||"function"==typeof e,o=i?e:{name:e,args:t},a=i?t:n;return this.set("connector",o,a)},label:function(e,t,n){var r=this.labels();return(e=isFinite(e)&&null!==e?0|e:0)<0&&(e=r.length+e),arguments.length<=1?this.prop(["labels",e]):this.prop(["labels",e],t,n)},labels:function(e,t){return 0===arguments.length?(e=this.get("labels"),Array.isArray(e)?e.slice():[]):(Array.isArray(e)||(e=[]),this.set("labels",e,t))},hasLabels:function(){const{labels:e}=this.attributes;return Array.isArray(e)&&e.length>0},insertLabel:function(e,t,n){if(!t)throw new Error("dia.Link: no label provided");var r=this.labels(),i=r.length;return(e=isFinite(e)&&null!==e?0|e:i)<0&&(e=i+e+1),r.splice(e,0,t),this.labels(r,n)},appendLabel:function(e,t){return this.insertLabel(-1,e,t)},removeLabel:function(e,t){var n=this.labels();return e=isFinite(e)&&null!==e?0|e:-1,n.splice(e,1),this.labels(n,t)},vertex:function(e,t,n){var r=this.vertices();if((e=isFinite(e)&&null!==e?0|e:0)<0&&(e=r.length+e),arguments.length<=1)return this.prop(["vertices",e]);var i=this._normalizeVertex(t);return this.prop(["vertices",e],i,n)},vertices:function(e,t){if(0===arguments.length)return e=this.get("vertices"),Array.isArray(e)?e.slice():[];Array.isArray(e)||(e=[]);for(var n=[],r=0;r<e.length;r++){var i=e[r],o=this._normalizeVertex(i);n.push(o)}return this.set("vertices",n,t)},insertVertex:function(e,t,n){if(!t)throw new Error("dia.Link: no vertex provided");var r=this.vertices(),i=r.length;(e=isFinite(e)&&null!==e?0|e:i)<0&&(e=i+e+1);var o=this._normalizeVertex(t);return r.splice(e,0,o),this.vertices(r,n)},removeVertex:function(e,t){var n=this.vertices();return e=isFinite(e)&&null!==e?0|e:-1,n.splice(e,1),this.vertices(n,t)},_normalizeVertex:function(e){return tn(e)?e:{x:e.x,y:e.y}},translate:function(e,t,n){return(n=n||{}).translateBy=n.translateBy||this.id,n.tx=e,n.ty=t,this.applyToPoints((function(n){return{x:(n.x||0)+e,y:(n.y||0)+t}}),n)},scale:function(e,t,n,r){return this.applyToPoints((function(r){return Z(r).scale(e,t,n).toJSON()}),r)},applyToPoints:function(e,t){if(!en(e))throw new TypeError("dia.Link: applyToPoints expects its first parameter to be a function.");var n={},{source:r,target:i}=this.attributes;r.id||(n.source=e(r)),i.id||(n.target=e(i));var o=this.vertices();return o.length>0&&(n.vertices=o.map(e)),this.set(n,t)},getSourcePoint:function(){var e=this.getSourceCell();return e?e.getPointFromConnectedLink(this,"source"):new Z(this.source())},getTargetPoint:function(){var e=this.getTargetCell();return e?e.getPointFromConnectedLink(this,"target"):new Z(this.target())},getPointFromConnectedLink:function(){return this.getPolyline().pointAt(.5)},getPolyline:function(){const e=[this.getSourcePoint(),...this.vertices().map(Z),this.getTargetPoint()];return new ke(e)},getBBox:function(){return this.getPolyline().bbox()},reparent:function(e){var t;if(this.graph){var n=this.getSourceElement(),r=this.getTargetElement(),i=this.getParentCell();n&&r&&(t=n===r||n.isEmbeddedIn(r)?r:r.isEmbeddedIn(n)?n:this.graph.getCommonAncestor(n,r)),!i||t&&t.id===i.id||i.unembed(this,e),t&&t.embed(this,e)}return t},hasLoop:function(e){e=e||{};var{source:t,target:n}=this.attributes,r=t.id,i=n.id;if(!r||!i)return!1;var o=r===i;if(!o&&e.deep&&this.graph){var a=this.getSourceCell(),s=this.getTargetCell();o=a.isEmbeddedIn(s)||s.isEmbeddedIn(a)}return o},getSourceCell:function(){const{graph:e,attributes:t}=this;var n=t.source;return n&&n.id&&e&&e.getCell(n.id)||null},getSourceElement:function(){var e=this,t={};do{if(t[e.id])return null;t[e.id]=!0,e=e.getSourceCell()}while(e&&e.isLink());return e},getTargetCell:function(){const{graph:e,attributes:t}=this;var n=t.target;return n&&n.id&&e&&e.getCell(n.id)||null},getTargetElement:function(){var e=this,t={};do{if(t[e.id])return null;t[e.id]=!0,e=e.getTargetCell()}while(e&&e.isLink());return e},getRelationshipAncestor:function(){var e;if(this.graph){var t=[this,this.getSourceElement(),this.getTargetElement()].filter((function(e){return!!e}));e=this.graph.getCommonAncestor.apply(this.graph,t)}return e||null},isRelationshipEmbeddedIn:function(e){var t=bn(e)||yn(e)?e:e.id,n=this.getRelationshipAncestor();return!!n&&(n.id===t||n.isEmbeddedIn(t))},_getDefaultLabel:function(){var e=this.get("defaultLabel")||this.defaultLabel||{},t={};return t.markup=e.markup||this.get("labelMarkup")||this.labelMarkup,t.position=e.position,t.attrs=e.attrs,t.size=e.size,t}},{endsEqual:function(e,t){var n=e.port===t.port||!e.port&&!t.port;return e.id===t.id&&n}});function Xn(e,t,n){var r=e.toJSON();return r.angle=t||0,qt({},n,r)}function Kn(e,t,n){return e.map((function(e,t,n){var r=this.pointAt((t+.5)/n.length);return(e.dx||e.dy)&&r.offset(e.dx||0,e.dy||0),Xn(r.round(),0,e)}),ie(t,n))}function Jn(e,t,n,r){var i=t.center(),o=t.width/t.height,a=t.topMiddle(),s=ue.fromRect(t);return e.map((function(e,t,u){var l=n+r(t,u.length),c=a.clone().rotate(i,-l).scale(o,1,i),f=e.compensateRotation?-s.tangentTheta(c):0;return(e.dx||e.dy)&&c.offset(e.dx||0,e.dy||0),e.dr&&c.move(i,e.dr),Xn(c.round(),f,e)}))}function Qn(e,t){var n=t.x;bn(n)&&(n=parseFloat(n)/100*e.width);var r=t.y;return bn(r)&&(r=parseFloat(r)/100*e.height),ee(n||0,r||0)}const Zn=function(e,t,n){return e.map(Qn.bind(null,t))},er=function(e,t,n){return n.fn(e,t,n)},tr=function(e,t,n){return Kn(e,Qn(t,n.start||t.origin()),Qn(t,n.end||t.corner()))},nr=function(e,t,n){return Kn(e,t.origin(),t.bottomLeft())},rr=function(e,t,n){return Kn(e,t.topRight(),t.corner())},ir=function(e,t,n){return Kn(e,t.origin(),t.topRight())},or=function(e,t,n){return Kn(e,t.bottomLeft(),t.corner())},ar=function(e,t,n){var r=n.startAngle||0,i=n.step||360/e.length;return Jn(e,t,r,(function(e){return e*i}))},sr=function(e,t,n){var r=n.startAngle||0,i=n.step||20;return Jn(e,t,r,(function(e,t){return(e+.5-t/2)*i}))};function ur(e,t){return Wt({},e,t,{x:0,y:0,angle:0,attrs:{".":{y:"0","text-anchor":"start"}}})}function lr(e,t,n,r){r=qt({},r,{offset:15});var i,o,a,s,u=t.center().theta(e),l=cr(t),c=r.offset,f=0;u<l[1]||u>l[2]?(a=".3em",i=c,o=0,s="start"):u<l[0]?(a="0",i=0,o=-c,n?(f=-90,s="start"):s="middle"):u<l[3]?(a=".3em",i=-c,o=0,s="end"):(a=".6em",i=0,o=c,n?(f=90,s="start"):s="middle");var h=Math.round;return ur({x:h(i),y:h(o),angle:f,attrs:{".":{y:a,"text-anchor":s}}})}function cr(e){var t=e.center(),n=t.theta(e.origin()),r=t.theta(e.bottomLeft()),i=t.theta(e.corner());return[n,t.theta(e.topRight()),i,r]}function fr(e,t,n,r){var i,o,a,s,u=t.center().theta(e),l=(r=qt({},r,{offset:15})).offset,c=0,f=cr(t);u<f[1]||u>f[2]?(a=".3em",i=-l,o=0,s="end"):u<f[0]?(a=".6em",i=0,o=l,n?(c=90,s="start"):s="middle"):u<f[3]?(a=".3em",i=l,o=0,s="start"):(a="0em",i=0,o=-l,n?(c=-90,s="start"):s="middle");var h=Math.round;return ur({x:h(i),y:h(o),angle:c,attrs:{".":{y:a,"text-anchor":s}}})}function hr(e,t,n){n=qt({},n,{offset:20});var r,i=ee(0,0),o=-e.theta(i),a=o,s=e.clone().move(i,n.offset).difference(e).round(),u=".3em";(o+90)%180==0?(r=t?"end":"middle",t||-270!==o||(u="0em")):o>-270&&o<-90?(r="start",a=o-180):r="end";var l=Math.round;return ur({x:l(s.x),y:l(s.y),angle:t?a:0,attrs:{".":{y:u,"text-anchor":r}}})}const dr=function(e,t,n){return ur(n,t)},pr=function(e,t,n){return ur(n,{x:-15,attrs:{".":{y:".3em","text-anchor":"end"}}})},gr=function(e,t,n){return ur(n,{x:15,attrs:{".":{y:".3em","text-anchor":"start"}}})},vr=function(e,t,n){return ur(n,{y:-15,attrs:{".":{"text-anchor":"middle"}}})},mr=function(e,t,n){return ur(n,{y:15,attrs:{".":{y:".6em","text-anchor":"middle"}}})},yr=function(e,t,n){return lr(e,t,!0,n)},br=function(e,t,n){return lr(e,t,!1,n)},wr=function(e,t,n){return fr(e,t,!0,n)},xr=function(e,t,n){return fr(e,t,!1,n)},kr=function(e,t,n){return hr(e.difference(t.center()),!1,n)},Sr=function(e,t,n){return hr(e.difference(t.center()),!0,n)};var _r=function(e){var t=Jt(e)||{};this.ports=[],this.groups={},this.portLayoutNamespace=i,this.portLabelLayoutNamespace=o,this._init(t)};_r.prototype={getPorts:function(){return this.ports},getGroup:function(e){return this.groups[e]||{}},getPortsByGroup:function(e){return this.ports.filter((function(t){return t.group===e}))},getGroupPortsMetrics:function(e,t){var n=this.getGroup(e),r=this.getPortsByGroup(e),i=n.position||{},o=i.name,a=this.portLayoutNamespace;a[o]||(o="left");var s=i.args||{},u=r.map((function(e){return e&&e.position&&e.position.args})),l=a[o](u,t,s),c={ports:r,result:[]};return nn(l).reduce(function(e,n,r){var i=e.ports[r];return e.result.push({portId:i.id,portTransformation:n,labelTransformation:this._getPortLabelLayout(i,Z(n),t),portAttrs:i.attrs,portSize:i.size,labelSize:i.label.size}),e}.bind(this),c),c.result},_getPortLabelLayout:function(e,t,n){var r=this.portLabelLayoutNamespace,i=e.label.position.name||"left";return r[i]?r[i](t,n,e.label.position.args):null},_init:function(e){if(mn(e.groups))for(var t=Object.keys(e.groups),n=0,r=t.length;n<r;n++){var i=t[n];this.groups[i]=this._evaluateGroup(e.groups[i])}for(var o=nn(e.items),a=0,s=o.length;a<s;a++)this.ports.push(this._evaluatePort(o[a]))},_evaluateGroup:function(e){return vn(e,{position:this._getPosition(e.position,!0),label:this._getLabel(e,!0)})},_evaluatePort:function(e){var t=Ht({},e),n=this.getGroup(e.group);return t.markup=t.markup||n.markup,t.attrs=vn({},n.attrs,t.attrs),t.position=this._createPositionNode(n,t),t.label=vn({},n.label,this._getLabel(t)),t.z=this._getZIndex(n,t),t.size=Ht({},n.size,t.size),t},_getZIndex:function(e,t){return yn(t.z)?t.z:yn(e.z)||"auto"===e.z?e.z:"auto"},_createPositionNode:function(e,t){return vn({name:"left",args:{}},e.position,{args:t.args})},_getPosition:function(e,t){var n,r={};en(e)?(n="fn",r.fn=e):bn(e)?n=e:void 0===e?n=t?"left":null:Array.isArray(e)?(n="absolute",r.x=e[0],r.y=e[1]):mn(e)&&(n=e.name,Ht(r,e.args));var i={args:r};return n&&(i.name=n),i},_getLabel:function(e,t){var n=e.label||{},r=n;return r.position=this._getPosition(n.position,t),r}};const Er={_initializePorts:function(){this._createPortData(),this.on("change:ports",(function(){this._processRemovedPort(),this._createPortData()}),this)},_processRemovedPort:function(){var e=this.get("ports")||{},t={};nn(e.items).forEach((function(e){t[e.id]=!0}));var n=this.previous("ports")||{},r={};nn(n.items).forEach((function(e){t[e.id]||(r[e.id]=!0)}));var i=this.graph;i&&!Qt(r)&&(i.getConnectedLinks(this,{inbound:!0}).forEach((function(e){r[e.get("target").port]&&e.remove()})),i.getConnectedLinks(this,{outbound:!0}).forEach((function(e){r[e.get("source").port]&&e.remove()})))},hasPorts:function(){var e=this.prop("ports/items");return Array.isArray(e)&&e.length>0},hasPort:function(e){return-1!==this.getPortIndex(e)},getPorts:function(){return Jt(this.prop("ports/items"))||[]},getGroupPorts:function(e){const t=nn(this.prop(["ports","items"])).filter((t=>t.group===e));return Jt(t)},getPort:function(e){return Jt(nn(this.prop("ports/items")).find((function(t){return t.id&&t.id===e})))},getPortsPositions:function(e){return this._portSettingsData.getGroupPortsMetrics(e,me(this.size())).reduce((function(e,t){var n=t.portTransformation;return e[t.portId]={x:n.x,y:n.y,angle:n.angle},e}),{})},getPortIndex:function(e){var t=mn(e)?e.id:e;return this._isValidPortId(t)?nn(this.prop("ports/items")).findIndex((function(e){return e.id===t})):-1},addPort:function(e,t){if(!mn(e)||Array.isArray(e))throw new Error("Element: addPort requires an object.");var n=Ht([],this.prop("ports/items"));return n.push(e),this.prop("ports/items",n,t),this},insertPort:function(e,t,n){const r="number"==typeof e?e:this.getPortIndex(e);if(!mn(t)||Array.isArray(t))throw new Error("dia.Element: insertPort requires an object.");const i=Ht([],this.prop("ports/items"));return i.splice(r,0,t),this.prop("ports/items",i,n),this},portProp:function(e,t,n,r){var i=this.getPortIndex(e);if(-1===i)throw new Error("Element: unable to find port with id "+e);var o=Array.prototype.slice.call(arguments,1);return Array.isArray(t)?o[0]=["ports","items",i].concat(t):bn(t)?o[0]=["ports/items/",i,"/",t].join(""):(o=["ports/items/"+i],tn(t)&&(o.push(t),o.push(n))),this.prop.apply(this,o)},_validatePorts:function(){var e=this.get("ports")||{},t=[],n=nn((e=e||{}).items);return n.forEach((function(e){"object"!=typeof e&&t.push("Element: invalid port ",e),this._isValidPortId(e.id)||(e.id=this.generatePortId())}),this),Xt(n,"id").length!==n.length&&t.push("Element: found id duplicities in ports."),t},generatePortId:function(){return this.generateId()},_isValidPortId:function(e){return null!=e&&!mn(e)},addPorts:function(e,t){return e.length&&this.prop("ports/items",Ht([],this.prop("ports/items")).concat(e),t),this},removePort:function(e,t){const n=t||{},r=this.getPortIndex(e);if(-1!==r){const e=Ht([],this.prop(["ports","items"]));e.splice(r,1),n.rewrite=!0,this.startBatch("port-remove"),this.prop(["ports","items"],e,n),this.stopBatch("port-remove")}return this},removePorts:function(e,t){let n,r;if(Array.isArray(e)){if(n=t||{},0===e.length)return this.this;r=Ht([],this.prop(["ports","items"])).filter((function(t){return!e.some((function(e){const n=mn(e)?e.id:e;return t.id===n}))}))}else n=e||{},r=[];return this.startBatch("port-remove"),n.rewrite=!0,this.prop(["ports","items"],r,n),this.stopBatch("port-remove"),this},_createPortData:function(){var e,t=this._validatePorts();if(t.length>0)throw this.set("ports",this.previous("ports")),new Error(t.join(" "));this._portSettingsData&&(e=this._portSettingsData.getPorts()),this._portSettingsData=new _r(this.get("ports"));var n=this._portSettingsData.getPorts();if(e){var r=n.filter((function(t){if(!e.find((function(e){return e.id===t.id})))return t})),i=e.filter((function(e){if(!n.find((function(t){return t.id===e.id})))return e}));i.length>0&&this.trigger("ports:remove",this,i),r.length>0&&this.trigger("ports:add",this,r)}}},Cr={portContainerMarkup:"g",portMarkup:[{tagName:"circle",selector:"circle",attributes:{r:10,fill:"#FFFFFF",stroke:"#000000"}}],portLabelMarkup:[{tagName:"text",selector:"text",attributes:{fill:"#000000"}}],_portElementsCache:null,_initializePorts:function(){this._cleanPortsCache()},_refreshPorts:function(){this._removePorts(),this._cleanPortsCache(),this._renderPorts()},_cleanPortsCache:function(){this._portElementsCache={}},_renderPorts:function(){for(var e=[],t=this._getContainerElement(),n=0,r=t.node.childNodes.length;n<r;n++)e.push(t.node.childNodes[n]);var i=rn(this.model._portSettingsData.getPorts(),"z"),o="auto";nn(i[o]).forEach((function(n){var r=this._getPortElement(n);t.append(r),e.push(r)}),this);for(var a=Object.keys(i),s=0;s<a.length;s++){var u=a[s];if(u!==o){var l=parseInt(u,10);this._appendPorts(i[u],l,e)}}this._updatePorts()},_getContainerElement:function(){return this.rotatableNode||this.vel},_appendPorts:function(e,t,n){var r=this._getContainerElement(),i=nn(e).map(this._getPortElement,this);n[t]||t<0?kt(n[Math.max(t,0)]).before(i):r.append(i)},_getPortElement:function(e){return this._portElementsCache[e.id]?this._portElementsCache[e.id].portElement:this._createPortElement(e)},findPortNode:function(e,t){const n=this._portElementsCache[e];if(!n)return null;const r=n.portContentElement.node,i=n.portContentSelectors,[o=null]=this.findBySelector(t,r,i);return o},_updatePorts:function(){this._updatePortGroup(void 0),Object.keys(this.model._portSettingsData.groups).forEach(this._updatePortGroup,this)},_removePorts:function(){Gt(this._portElementsCache,"portElement.remove")},_createPortElement:function(e){let t,n,r,i;var o=kt(this.portContainerMarkup).addClass("joint-port"),a=this._getPortMarkup(e);if(Array.isArray(a)){var s=this.parseDOMJSON(a,o.node),u=s.fragment;t=u.childNodes.length>1?kt("g").append(u):kt(u.firstChild),i=s.selectors}else t=kt(a),Array.isArray(t)&&(t=kt("g").append(t));if(!t)throw new Error("ElementView: Invalid port markup.");t.attr({port:e.id,"port-group":e.group});const l=this._getPortLabelMarkup(e.label);if(Array.isArray(l)){const{fragment:e,selectors:t}=this.parseDOMJSON(l,o.node),i=e.childNodes.length;i>0&&(r=t,n=1===i?kt(e.firstChild):kt("g").append(e))}else n=kt(l),Array.isArray(n)&&(n=kt("g").append(n));var c;if(i&&r){for(var f in r)if(i[f]&&f!==this.selector)throw new Error("ElementView: selectors within port must be unique.");c=Ht({},i,r)}else c=i||r;return o.append(t.addClass("joint-port-body")),n&&o.append(n.addClass("joint-port-label")),this._portElementsCache[e.id]={portElement:o,portLabelElement:n,portSelectors:c,portLabelSelectors:r,portContentElement:t,portContentSelectors:i},o},_updatePortGroup:function(e){for(var t=me(this.model.size()),n=this.model._portSettingsData.getGroupPortsMetrics(e,t),r=0,i=n.length;r<i;r++){var o=n[r],a=o.portId,s=this._portElementsCache[a]||{},u=o.portTransformation;this.applyPortTransform(s.portElement,u),this.updateDOMSubtreeAttributes(s.portElement.node,o.portAttrs,{rootBBox:new me(o.portSize),selectors:s.portSelectors});var l=o.labelTransformation;l&&s.portLabelElement&&(this.applyPortTransform(s.portLabelElement,l,-u.angle||0),this.updateDOMSubtreeAttributes(s.portLabelElement.node,l.attrs,{rootBBox:new me(o.labelSize),selectors:s.portLabelSelectors}))}},applyPortTransform:function(e,t,n){var r=kt.createSVGMatrix().rotate(n||0).translate(t.x||0,t.y||0).rotate(t.angle||0);e.transform(r,{absolute:!0})},_getPortMarkup:function(e){return e.markup||this.model.get("portMarkup")||this.model.portMarkup||this.portMarkup},_getPortLabelMarkup:function(e){return e.markup||this.model.get("portLabelMarkup")||this.model.portLabelMarkup||this.portLabelMarkup}},Ar=Gn.extend({defaults:{position:{x:0,y:0},size:{width:1,height:1},angle:0},initialize:function(){this._initializePorts(),Gn.prototype.initialize.apply(this,arguments)},_initializePorts:function(){},_refreshPorts:function(){},isElement:function(){return!0},position:function(e,t,n){const r=yn(t);n=(r?n:e)||{};const{parentRelative:i,deep:o,restrictedArea:a}=n;let s;if(i){if(!this.graph)throw new Error("Element must be part of a graph.");const e=this.getParentCell();e&&!e.isLink()&&(s=e.get("position"))}if(r){if(s&&(e+=s.x,t+=s.y),o||a){const{x:r,y:i}=this.get("position");this.translate(e-r,t-i,n)}else this.set("position",{x:e,y:t},n);return this}{const e=Z(this.get("position"));return i?e.difference(s):e}},translate:function(e,t,n){if(t=t||0,0===(e=e||0)&&0===t)return this;(n=n||{}).translateBy=n.translateBy||this.id;var r=this.get("position")||{x:0,y:0},i=n.restrictedArea;if(i&&n.translateBy===this.id)if("function"==typeof i){var o=i.call(this,r.x+e,r.y+t,n);e=o.x-r.x,t=o.y-r.y}else{var a=this.getBBox({deep:!0}),s=r.x-a.x,u=r.y-a.y,l=Math.max(i.x+s,Math.min(i.x+i.width+s-a.width,r.x+e)),c=Math.max(i.y+u,Math.min(i.y+i.height+u-a.height,r.y+t));e=l-r.x,t=c-r.y}var f={x:r.x+e,y:r.y+t};return n.tx=e,n.ty=t,n.transition?(mn(n.transition)||(n.transition={}),this.transition("position",f,Ht({},n.transition,{valueFunction:Bt.object})),Gt(this.getEmbeddedCells(),"translate",e,t,n)):(this.startBatch("translate",n),this.set("position",f,n),Gt(this.getEmbeddedCells(),"translate",e,t,n),this.stopBatch("translate",n)),this},size:function(e,t,n){var r=this.get("size");return void 0===e?{width:r.width,height:r.height}:(mn(e)&&(n=t,t=yn(e.height)?e.height:r.height,e=yn(e.width)?e.width:r.width),this.resize(e,t,n))},resize:function(e,t,n){if(n=n||{},this.startBatch("resize",n),n.direction){var r=this.get("size");switch(n.direction){case"left":case"right":t=r.height;break;case"top":case"bottom":e=r.width}var i,o=N(this.get("angle")||0),a=this.getBBox();if(o){var s={"top-right":0,right:0,"top-left":1,top:1,"bottom-left":2,left:2,"bottom-right":3,bottom:3}[n.direction];n.absolute&&(s+=Math.floor((o+45)/90),s%=4);var u=a[["bottomLeft","corner","topRight","origin"][s]](),l=Z(u).rotate(a.center(),-o),c=Math.sqrt(e*e+t*t)/2,f=s*Math.PI/2;f+=Math.atan(s%2==0?t/e:e/t),f-=R(o);var h=Z.fromPolar(c,f,l);i=Z(h).offset(e/-2,t/-2)}else switch(i=a.topLeft(),n.direction){case"top":case"top-right":i.offset(0,a.height-t);break;case"left":case"bottom-left":i.offset(a.width-e,0);break;case"top-left":i.offset(a.width-e,a.height-t)}this.set("size",{width:e,height:t},n),this.position(i.x,i.y,n)}else this.set("size",{width:e,height:t},n);return this.stopBatch("resize",n),this},scale:function(e,t,n,r){var i=this.getBBox().scale(e,t,n);return this.startBatch("scale",r),this.position(i.x,i.y,r),this.resize(i.width,i.height,r),this.stopBatch("scale"),this},fitEmbeds:function(e={}){const{graph:t}=this;if(!t)throw new Error("Element must be part of a graph.");const n=this.getEmbeddedCells().filter((e=>e.isElement()));if(0===n.length)return this;this.startBatch("fit-embeds",e),e.deep&&Gt(n,"fitEmbeds",e);const{left:r,right:i,top:o,bottom:a}=zt(e.padding);let{x:s,y:u,width:l,height:c}=t.getCellsBBox(n);return s-=r,u-=o,l+=r+i,c+=a+o,this.set({position:{x:s,y:u},size:{width:l,height:c}},e),this.stopBatch("fit-embeds"),this},rotate:function(e,t,n,r){if(n){var i=this.getBBox().center(),o=this.get("size"),a=this.get("position");i.rotate(n,this.get("angle")-e);var s=i.x-o.width/2-a.x,u=i.y-o.height/2-a.y;this.startBatch("rotate",{angle:e,absolute:t,origin:n}),this.position(a.x+s,a.y+u,r),this.rotate(e,t,null,r),this.stopBatch("rotate")}else this.set("angle",t?e:(this.get("angle")+e)%360,r);return this},angle:function(){return N(this.get("angle")||0)},getBBox:function(e={}){const{graph:t,attributes:n}=this,{deep:r,rotate:i}=e;if(r&&t){const n=this.getEmbeddedCells({deep:!0,breadthFirst:!0});return n.push(this),t.getCellsBBox(n,e)}const{angle:o=0,position:{x:a,y:s},size:{width:u,height:l}}=n,c=new me(a,s,u,l);return i&&c.rotateAroundCenter(o),c},getPointFromConnectedLink:function(e,t){var n=this.getBBox(),r=n.center(),i=e.get(t);if(!i)return r;var o=i.port;if(!o||!this.hasPort(o))return r;var a=this.portProp(o,["group"]),s=this.getPortsPositions(a),u=new Z(s[o]).offset(n.origin()),l=this.angle();return l&&u.rotate(r,-l),u}});Ht(Ar.prototype,Er);const Pr={cells:function(e){return function(){var t=Array.from(arguments),n=t.length,r=n>0&&t[0]||[],i=n>1&&t[n-1]||{};return Array.isArray(r)||(i instanceof Gn?r=t:r instanceof Gn&&(t.length>1&&t.pop(),r=t)),i instanceof Gn&&(i={}),e.call(this,r,i)}}},Lr=_.Collection.extend({initialize:function(e,t){t.cellNamespace?this.cellNamespace=t.cellNamespace:this.cellNamespace="undefined"!=typeof joint&&ln(joint,"shapes")?joint.shapes:null,this.graph=t.graph},model:function(e,t){var n=t.collection,r=n.cellNamespace,i=new("link"===e.type?Yn:Pt(r,e.type,".")||Ar)(e,t);return t.dry||(i.graph=n.graph),i},comparator:function(e){return e.get("z")||0}}),Tr=_.Model.extend({initialize:function(e,t){var n=new Lr([],{model:(t=t||{}).cellModel,cellNamespace:t.cellNamespace,graph:this});_.Model.prototype.set.call(this,"cells",n),n.on("all",this.trigger,this),this.on("change:z",this._sortOnChangeZ,this),this._out={},this._in={},this._nodes={},this._edges={},this._batches={},n.on("add",this._restructureOnAdd,this),n.on("remove",this._restructureOnRemove,this),n.on("reset",this._restructureOnReset,this),n.on("change:source",this._restructureOnChangeSource,this),n.on("change:target",this._restructureOnChangeTarget,this),n.on("remove",this._removeCell,this)},_sortOnChangeZ:function(){this.get("cells").sort()},_restructureOnAdd:function(e){if(e.isLink()){this._edges[e.id]=!0;var{source:t,target:n}=e.attributes;t.id&&((this._out[t.id]||(this._out[t.id]={}))[e.id]=!0),n.id&&((this._in[n.id]||(this._in[n.id]={}))[e.id]=!0)}else this._nodes[e.id]=!0},_restructureOnRemove:function(e){if(e.isLink()){delete this._edges[e.id];var{source:t,target:n}=e.attributes;t.id&&this._out[t.id]&&this._out[t.id][e.id]&&delete this._out[t.id][e.id],n.id&&this._in[n.id]&&this._in[n.id][e.id]&&delete this._in[n.id][e.id]}else delete this._nodes[e.id]},_restructureOnReset:function(e){e=e.models,this._out={},this._in={},this._nodes={},this._edges={},e.forEach(this._restructureOnAdd,this)},_restructureOnChangeSource:function(e){var t=e.previous("source");t.id&&this._out[t.id]&&delete this._out[t.id][e.id];var n=e.attributes.source;n.id&&((this._out[n.id]||(this._out[n.id]={}))[e.id]=!0)},_restructureOnChangeTarget:function(e){var t=e.previous("target");t.id&&this._in[t.id]&&delete this._in[t.id][e.id];var n=e.get("target");n.id&&((this._in[n.id]||(this._in[n.id]={}))[e.id]=!0)},getOutboundEdges:function(e){return this._out&&this._out[e]||{}},getInboundEdges:function(e){return this._in&&this._in[e]||{}},toJSON:function(){var e=_.Model.prototype.toJSON.apply(this,arguments);return e.cells=this.get("cells").toJSON(),e},fromJSON:function(e,t){if(!e.cells)throw new Error("Graph JSON must contain cells array.");return this.set(e,t)},set:function(e,t,n){var r;return"object"==typeof e?(r=e,n=t):(r={})[e]=t,r.hasOwnProperty("cells")&&(this.resetCells(r.cells,n),r=fn(r,"cells")),_.Model.prototype.set.call(this,r,n)},clear:function(e){e=Ht({},e,{clear:!0});var t=this.get("cells");if(0===t.length)return this;this.startBatch("clear",e);var n=t.sortBy((function(e){return e.isLink()?1:2}));do{n.shift().remove(e)}while(n.length>0);return this.stopBatch("clear"),this},_prepareCell:function(e,t){var n;if(e instanceof _.Model?(n=e.attributes,e.graph||t&&t.dry||(e.graph=this)):n=e,!bn(n.type))throw new TypeError("dia.Graph: cell type must be a string.");return e},minZIndex:function(){var e=this.get("cells").first();return e&&e.get("z")||0},maxZIndex:function(){var e=this.get("cells").last();return e&&e.get("z")||0},addCell:function(e,t){return Array.isArray(e)?this.addCells(e,t):(e instanceof _.Model?e.has("z")||e.set("z",this.maxZIndex()+1):void 0===e.z&&(e.z=this.maxZIndex()+1),this.get("cells").add(this._prepareCell(e,t),t||{}),this)},addCells:function(e,t){return 0===e.length||(e=on(e),t.maxPosition=t.position=e.length-1,this.startBatch("add",t),e.forEach((function(e){this.addCell(e,t),t.position--}),this),this.stopBatch("add",t)),this},resetCells:function(e,t){var n=nn(e).map((function(e){return this._prepareCell(e,t)}),this);return this.get("cells").reset(n,t),this},removeCells:function(e,t){return e.length&&(this.startBatch("remove"),Gt(e,"remove",t),this.stopBatch("remove")),this},_removeCell:function(e,t,n){(n=n||{}).clear||(n.disconnectLinks?this.disconnectLinks(e,n):this.removeLinks(e,n)),this.get("cells").remove(e,{silent:!0}),e.graph===this&&(e.graph=null)},getCell:function(e){return this.get("cells").get(e)},getCells:function(){return this.get("cells").toArray()},getElements:function(){return this.get("cells").filter((e=>e.isElement()))},getLinks:function(){return this.get("cells").filter((e=>e.isLink()))},getFirstCell:function(){return this.get("cells").first()},getLastCell:function(){return this.get("cells").last()},getConnectedLinks:function(e,t){var n=(t=t||{}).indirect,r=t.inbound,i=t.outbound;void 0===r&&void 0===i&&(r=i=!0);var o=[],a={};function s(e,t){if(dn(e.getOutboundEdges(t.id),function(t,l){if(!a[l]){var c=e.getCell(l);o.push(c),a[l]=!0,n&&(r&&u(e,c),i&&s(e,c))}}.bind(e)),n&&t.isLink()){var l=t.getTargetCell();l&&l.isLink()&&(a[l.id]||(o.push(l),s(e,l)))}}function u(e,t){if(dn(e.getInboundEdges(t.id),function(t,l){if(!a[l]){var c=e.getCell(l);o.push(c),a[l]=!0,n&&(r&&u(e,c),i&&s(e,c))}}.bind(e)),n&&t.isLink()){var l=t.getSourceCell();l&&l.isLink()&&(a[l.id]||(o.push(l),u(e,l)))}}if(i&&s(this,e),r&&u(this,e),t.deep){var l=e.getEmbeddedCells({deep:!0}),c={};l.forEach((function(e){e.isElement()&&(c[e.id]=!0)})),l.forEach((function(e){e.isLink()||(i&&dn(this.getOutboundEdges(e.id),function(e,n){if(!a[n]){var r=this.getCell(n),{source:i,target:s}=r.attributes,u=i.id,l=s.id;if(!t.includeEnclosed&&u&&c[u]&&l&&c[l])return;o.push(this.getCell(n)),a[n]=!0}}.bind(this)),r&&dn(this.getInboundEdges(e.id),function(e,n){if(!a[n]){var r=this.getCell(n),{source:i,target:s}=r.attributes,u=i.id,l=s.id;if(!t.includeEnclosed&&u&&c[u]&&l&&c[l])return;o.push(this.getCell(n)),a[n]=!0}}.bind(this)))}),this)}return o},getNeighbors:function(e,t){t||(t={});var n=t.inbound,r=t.outbound;void 0===n&&void 0===r&&(n=r=!0);var i=this.getConnectedLinks(e,t).reduce(function(i,o){var{source:a,target:s}=o.attributes,u=o.hasLoop(t);if(n&&ln(a,"id")&&!i[a.id]){var l=this.getCell(a.id);l.isElement()&&(!u&&(!l||l===e||t.deep&&l.isEmbeddedIn(e))||(i[a.id]=l))}if(r&&ln(s,"id")&&!i[s.id]){var c=this.getCell(s.id);c.isElement()&&(!u&&(!c||c===e||t.deep&&c.isEmbeddedIn(e))||(i[s.id]=c))}return i}.bind(this),{});if(e.isLink()){if(n){var o=e.getSourceCell();o&&o.isElement()&&!i[o.id]&&(i[o.id]=o)}if(r){var a=e.getTargetCell();a&&a.isElement()&&!i[a.id]&&(i[a.id]=a)}}return nn(i)},getCommonAncestor:function(){var e=Array.from(arguments).map((function(e){for(var t=[],n=e.get("parent");n;)t.push(n),n=this.getCell(n).get("parent");return t}),this);e=e.sort((function(e,t){return e.length-t.length}));var t=nn(e.shift()).find((function(t){return e.every((function(e){return e.includes(t)}))}));return this.getCell(t)},getSuccessors:function(e,t){t=t||{};var n=[];return this.search(e,(function(t){t!==e&&n.push(t)}),Ht({},t,{outbound:!0})),n},cloneCells:xn,cloneSubgraph:function(e,t){var n=this.getSubgraph(e,t);return this.cloneCells(n)},getSubgraph:function(e,t){t=t||{};var n=[],r={},i=[],o=[];return nn(e).forEach((function(e){r[e.id]||(n.push(e),r[e.id]=e,e.isLink()?o.push(e):i.push(e)),t.deep&&e.getEmbeddedCells({deep:!0}).forEach((function(e){r[e.id]||(n.push(e),r[e.id]=e,e.isLink()?o.push(e):i.push(e))}))})),o.forEach((function(e){var{source:t,target:o}=e.attributes;if(t.id&&!r[t.id]){var a=this.getCell(t.id);n.push(a),r[a.id]=a,i.push(a)}if(o.id&&!r[o.id]){var s=this.getCell(o.id);n.push(this.getCell(o.id)),r[s.id]=s,i.push(s)}}),this),i.forEach((function(e){this.getConnectedLinks(e,t).forEach((function(e){var{source:t,target:i}=e.attributes;!r[e.id]&&t.id&&r[t.id]&&i.id&&r[i.id]&&(n.push(e),r[e.id]=e)}))}),this),n},getPredecessors:function(e,t){t=t||{};var n=[];return this.search(e,(function(t){t!==e&&n.push(t)}),Ht({},t,{inbound:!0})),n},search:function(e,t,n){(n=n||{}).breadthFirst?this.bfs(e,t,n):this.dfs(e,t,n)},bfs:function(e,t,n={}){const r={},i={},o=[];for(o.push(e),i[e.id]=0;o.length>0;){var a=o.shift();if(r[a.id])continue;if(r[a.id]=!0,!1===t.call(this,a,i[a.id]))continue;const e=this.getNeighbors(a,n);for(let t=0,n=e.length;t<n;t++){const n=e[t];i[n.id]=i[a.id]+1,o.push(n)}}},dfs:function(e,t,n={}){const r={},i={},o=[];for(o.push(e),i[e.id]=0;o.length>0;){const e=o.pop();if(r[e.id])continue;if(r[e.id]=!0,!1===t.call(this,e,i[e.id]))continue;const a=this.getNeighbors(e,n),s=o.length;for(let t=0,n=a.length;t<n;t++){const n=a[t];i[n.id]=i[e.id]+1,o.splice(s,0,n)}}},getSources:function(){var e=[];return dn(this._nodes,function(t,n){this._in[n]&&!Qt(this._in[n])||e.push(this.getCell(n))}.bind(this)),e},getSinks:function(){var e=[];return dn(this._nodes,function(t,n){this._out[n]&&!Qt(this._out[n])||e.push(this.getCell(n))}.bind(this)),e},isSource:function(e){return!this._in[e.id]||Qt(this._in[e.id])},isSink:function(e){return!this._out[e.id]||Qt(this._out[e.id])},isSuccessor:function(e,t){var n=!1;return this.search(e,(function(r){if(r===t&&r!==e)return n=!0,!1}),{outbound:!0}),n},isPredecessor:function(e,t){var n=!1;return this.search(e,(function(r){if(r===t&&r!==e)return n=!0,!1}),{inbound:!0}),n},isNeighbor:function(e,t,n){var r=(n=n||{}).inbound,i=n.outbound;void 0===r&&void 0===i&&(r=i=!0);var o=!1;return this.getConnectedLinks(e,n).forEach((function(e){var{source:n,target:a}=e.attributes;return r&&ln(n,"id")&&n.id===t.id||i&&ln(a,"id")&&a.id===t.id?(o=!0,!1):void 0})),o},disconnectLinks:function(e,t){this.getConnectedLinks(e).forEach((function(n){n.set(n.attributes.source.id===e.id?"source":"target",{x:0,y:0},t)}))},removeLinks:function(e,t){Gt(this.getConnectedLinks(e),"remove",t)},findModelsFromPoint:function(e){return this.getElements().filter((t=>t.getBBox({rotate:!0}).containsPoint(e)))},findModelsInArea:function(e,t={}){const n=new me(e),{strict:r=!1}=t,i=r?"containsRect":"intersect";return this.getElements().filter((e=>n[i](e.getBBox({rotate:!0}))))},findModelsUnderElement:function(e,t={}){const{searchBy:n="bbox"}=t,r=e.getBBox().rotateAroundCenter(e.angle());return("bbox"===n?this.findModelsInArea(r):this.findModelsFromPoint(r[n]())).filter((t=>e.id!==t.id&&!t.isEmbeddedIn(e)))},getBBox:function(){return this.getCellsBBox(this.getCells())},getCellsBBox:function(e,t={}){const{rotate:n=!0}=t;return nn(e).reduce((function(e,t){const r=t.getBBox({rotate:n});return r?e?e.union(r):r:e}),null)},translate:function(e,t,n){var r=this.getCells().filter((function(e){return!e.isEmbedded()}));return Gt(r,"translate",e,t,n),this},resize:function(e,t,n){return this.resizeCells(e,t,this.getCells(),n)},resizeCells:function(e,t,n,r){var i=this.getCellsBBox(n);if(i){var o=Math.max(e/i.width,0),a=Math.max(t/i.height,0);Gt(n,"scale",o,a,i.origin(),r)}return this},startBatch:function(e,t){return t=t||{},this._batches[e]=(this._batches[e]||0)+1,this.trigger("batch:start",Ht({},t,{batchName:e}))},stopBatch:function(e,t){return t=t||{},this._batches[e]=(this._batches[e]||0)-1,this.trigger("batch:stop",Ht({},t,{batchName:e}))},hasActiveBatch:function(e){const t=this._batches;let n;return n=0===arguments.length?Object.keys(t):Array.isArray(e)?e:[e],n.some((e=>t[e]>0))}},{validations:{multiLinks:function(e,t){var{source:n,target:r}=t.attributes;if(n.id&&r.id){var i=t.getSourceCell();if(i&&e.getConnectedLinks(i,{outbound:!0}).filter((function(e){var{source:t,target:i}=e.attributes;return t&&t.id===n.id&&(!t.port||t.port===n.port)&&i&&i.id===r.id&&(!i.port||i.port===r.port)})).length>1)return!1}return!0},linkPinning:function(e,t){var{source:n,target:r}=t.attributes;return n.id&&r.id}}});!function(e,t,n){if(bn(n)){if(!Pr[n])throw new Error('Unknown wrapper: "'+n+'"');n=Pr[n]}if(!en(n))throw new Error("Wrapper must be a function.");nn(["resetCells","addCells","removeCells"]).forEach((function(t){e[t]=n(e[t])}))}(Tr.prototype,0,Pr.cells);const Nr={},Or=_.View.extend({options:{},theme:null,themeClassNamePrefix:_t("theme-"),requireSetThemeOverride:!1,defaultTheme:St.defaultTheme,children:null,childNodes:null,DETACHABLE:!0,UPDATE_PRIORITY:2,FLAG_INSERT:1<<30,FLAG_REMOVE:1<<29,constructor:function(e){this.requireSetThemeOverride=e&&!!e.theme,this.options=Ht({},this.options,e),_.View.call(this,e)},initialize:function(){Nr[this.cid]=this,this.setTheme(this.options.theme||this.defaultTheme),this.init()},unmount:function(){this.svgElement?this.vel.remove():this.$el.remove()},renderChildren:function(e){if(e||(e=cn(this,"children")),e){var t=this.svgElement,n=kt.namespace[t?"svg":"xhtml"],r=Ct(e,n);(t?this.vel:this.$el).empty().append(r.fragment),this.childNodes=r.selectors}return this},findAttribute:function(e,t){for(var n=t;n&&1===n.nodeType;){var r=n.getAttribute(e);if(r)return r;if(n===this.el)return null;n=n.parentNode}return null},_ensureElement:function(){if(this.el)this.setElement(cn(this,"el"));else{var e=cn(this,"tagName"),t=Ht({},cn(this,"attributes")),n=Ht({},cn(this,"style"));this.id&&(t.id=cn(this,"id")),this.setElement(this._createElement(e)),this._setAttributes(t),this._setStyle(n)}this._ensureElClassName()},_setAttributes:function(e){this.svgElement?this.vel.attr(e):this.$el.attr(e)},_setStyle:function(e){this.$el.css(e)},_createElement:function(e){return this.svgElement?document.createElementNS(kt.namespace.svg,e):document.createElement(e)},_setElement:function(e){this.$el=e instanceof _.$?e:_.$(e),this.el=this.$el[0],this.svgElement&&(this.vel=kt(this.el))},_ensureElClassName:function(){var e=cn(this,"className");if(e){var t=_t(e);this.svgElement?this.vel.removeClass(e).addClass(t):this.$el.removeClass(e).addClass(t)}},init:function(){},onRender:function(){},confirmUpdate:function(){return 0},setTheme:function(e,t){return t=t||{},this.theme&&this.requireSetThemeOverride&&!t.override||(this.removeThemeClassName(),this.addThemeClassName(e),this.onSetTheme(this.theme,e),this.theme=e),this},addThemeClassName:function(e){if(!(e=e||this.theme))return this;var t=this.themeClassNamePrefix+e;return this.svgElement?this.vel.addClass(t):this.$el.addClass(t),this},removeThemeClassName:function(e){e=e||this.theme;var t=this.themeClassNamePrefix+e;return this.svgElement?this.vel.removeClass(t):this.$el.removeClass(t),this},onSetTheme:function(e,t){},remove:function(){return this.onRemove(),this.undelegateDocumentEvents(),Nr[this.cid]=null,_.View.prototype.remove.apply(this,arguments),this},onRemove:function(){},getEventNamespace:function(){return".joint-event-ns-"+this.cid},delegateElementEvents:function(e,t,n){if(!t)return this;n||(n={});var r=this.getEventNamespace();for(var i in t){var o=t[i];"function"!=typeof o&&(o=this[o]),o&&C(e).on(i+r,n,o.bind(this))}return this},undelegateElementEvents:function(e){return C(e).off(this.getEventNamespace()),this},delegateDocumentEvents:function(e,t){return e||(e=cn(this,"documentEvents")),this.delegateElementEvents(document,e,t)},undelegateDocumentEvents:function(){return this.undelegateElementEvents(document)},eventData:function(e,t){if(!e)throw new Error("eventData(): event object required.");var n=e.data,r="__"+this.cid+"__";return void 0===t?n&&n[r]||{}:(n||(n=e.data={}),n[r]||(n[r]={}),Ht(n[r],t),this)},stopPropagation:function(e){return this.eventData(e,{propagationStopped:!0}),this},isPropagationStopped:function(e){return!!this.eventData(e).propagationStopped}},{extend:function(){var e=Array.from(arguments),t=e[0]&&Ht({},e[0])||{},n=e[1]&&Ht({},e[1])||{},r=t.render||this.prototype&&this.prototype.render||null;return t.render=function(){return"function"==typeof r&&r.apply(this,arguments),this.render.__render__===r&&this.onRender(),this},t.render.__render__=r,_.View.extend.call(this,t,n)}}),Mr="dbltap";if(C.event&&!(Mr in C.event.special)){const e=St.doubleTapInterval,t=30;C.event.special[Mr]={bindType:"touchend",delegateType:"touchend",handle:function(n,...r){const{handleObj:i,target:o}=n,a=C.data(o),s=(new Date).getTime(),u="lastTouch"in a?s-a.lastTouch:0;u<e&&u>t?(a.lastTouch=null,n.type=i.origType,i.handler.call(this,n,...r)):a.lastTouch=s}}}function Rr(e){return e?Array.isArray(e)?e:[e]:[]}const Dr=Or.extend({tagName:"g",svgElement:!0,className:"highlight",HIGHLIGHT_FLAG:1,UPDATE_PRIORITY:3,DETACHABLE:!1,UPDATABLE:!0,MOUNTABLE:!0,cellView:null,nodeSelector:null,node:null,updateRequested:!1,transformGroup:null,requestUpdate(e,t){const{paper:n}=e;this.cellView=e,this.nodeSelector=t,n&&(this.updateRequested=!0,n.requestViewUpdate(this,this.HIGHLIGHT_FLAG,this.UPDATE_PRIORITY))},confirmUpdate(){this.updateRequested=!1;const{cellView:e,nodeSelector:t}=this;return this.update(e,t),this.mount(),this.transform(),0},findNode(e,t=null){let n;if("string"==typeof t)[n]=e.findBySelector(t);else if(tn(t)){const r=e.model.isLink(),{label:i=null,port:o,selector:a}=t;r&&null!==i?n=e.findLabelNode(i,a):!r&&o?n=e.findPortNode(o,a):[n]=e.findBySelector(a)}else t&&(n=kt.toNode(t),n instanceof SVGElement||(n=null));return n||null},mount(){const{MOUNTABLE:e,cellView:t,el:n,options:r,transformGroup:i}=this;if(!e||i)return;const{vel:o,paper:a}=t,{layer:s}=r;if(s){const e=this.transformGroup=kt("g").addClass("highlight-transform").append(n);a.getLayerView(s).insertSortedNode(e.node,r.z)}else n.parentNode&&!n.nextSibling||o.append(n)},unmount(){const{MOUNTABLE:e,transformGroup:t,vel:n}=this;e&&(t?(this.transformGroup=null,t.remove()):n.remove())},transform(){const{transformGroup:e,cellView:t,updateRequested:n}=this;if(!e||t.model.isLink()||n)return;const r=t.getRootTranslateMatrix(),i=t.getRootRotateMatrix(),o=r.multiply(i);e.attr("transform",kt.matrixToTransformString(o))},update(){const{node:e,cellView:t,nodeSelector:n,updateRequested:r,id:i}=this;if(r)return;const o=this.node=this.findNode(t,n);e&&this.unhighlight(t,e),o?(this.highlight(t,o),this.mount()):(this.unmount(),t.notify("cell:highlight:invalid",i,this))},onRemove(){const{node:e,cellView:t,id:n,constructor:r}=this;e&&this.unhighlight(t,e),this.unmount(),r._removeRef(t,n)},highlight(e,t){},unhighlight(e,t){}},{_views:{},highlight:function(e,t,n){const r=this.uniqueId(t,n);this.add(e,t,r,n)},unhighlight:function(e,t,n){const r=this.uniqueId(t,n);this.remove(e,r)},get(e,t=null){const{cid:n}=e,{_views:r}=this,i=r[n];if(null===t){const e=[];if(!i)return e;for(let t in i){const n=i[t];n instanceof this&&e.push(n)}return e}if(!i)return null;if(t in i){const e=i[t];if(e instanceof this)return e}return null},add(e,t,n,r={}){if(!n)throw new Error("dia.HighlighterView: An ID required.");const i=Dr.get(e,n);i&&i.remove();const o=new this(r);return o.id=n,this._addRef(e,n,o),o.requestUpdate(e,t),o},_addRef(e,t,n){const{cid:r}=e,{_views:i}=this;let o=i[r];o||(o=i[r]={}),o[t]=n},_removeRef(e,t){const{cid:n}=e,{_views:r}=this,i=r[n];if(i){t&&delete i[t];for(let e in i)return;delete r[n]}},remove(e,t=null){Rr(this.get(e,t)).forEach((e=>{e.remove()}))},update(e,t=null,n=!1){Rr(this.get(e,t)).forEach((e=>{(n||e.UPDATABLE)&&e.update()}))},transform(e,t=null){Rr(this.get(e,t)).forEach((e=>{e.UPDATABLE&&e.transform()}))},uniqueId:(e,t="")=>kt.ensureId(e)+JSON.stringify(t)}),jr={DEFAULT:"default",EMBEDDING:"embedding",CONNECTING:"connecting",MAGNET_AVAILABILITY:"magnetAvailability",ELEMENT_AVAILABILITY:"elementAvailability"},Ir=Or.extend({tagName:"g",svgElement:!0,selector:"root",metrics:null,className:function(){var e=["cell"],t=this.model.get("type");return t&&t.toLowerCase().split(".").forEach((function(t,n,r){e.push("type-"+r.slice(0,n+1).join("-"))})),e.join(" ")},_presentationAttributes:null,_flags:null,setFlags:function(){var e,t,n,r={},i={},o=0,a=cn(this,"presentationAttributes");for(var s in a)if(a.hasOwnProperty(s)){var u=a[s];for(Array.isArray(u)||(u=[u]),e=0,t=u.length;e<t;e++){var l=r[n=u[e]];l||(l=r[n]=1<<o++),i[s]|=l}}var c=cn(this,"initFlag");for(Array.isArray(c)||(c=[c]),e=0,t=c.length;e<t;e++)r[n=c[e]]||(r[n]=1<<o++);if(o>25)throw new Error("dia.CellView: Maximum number of flags exceeded.");this._flags=r,this._presentationAttributes=i},hasFlag:function(e,t){return e&this.getFlag(t)},removeFlag:function(e,t){return e^e&this.getFlag(t)},getFlag:function(e){var t=this._flags;if(!t)return 0;var n=0;if(Array.isArray(e))for(var r=0,i=e.length;r<i;r++)n|=t[e[r]];else n|=t[e];return n},attributes:function(){var e=this.model;return{"model-id":e.id,"data-type":e.attributes.type}},constructor:function(e){e.id=e.id||Ot(this),Or.call(this,e)},initialize:function(){this.setFlags(),Or.prototype.initialize.apply(this,arguments),this.cleanNodesCache(),this.$el.data("view",this),this.startListening()},onMount(){},startListening:function(){this.listenTo(this.model,"change",this.onAttributesChange)},onAttributesChange:function(e,t){var n=e.getChangeFlag(this._presentationAttributes);!t.updateHandled&&n&&(t.dirty&&this.hasFlag(n,"UPDATE")&&(n|=this.getFlag("RENDER")),t.tool&&(t.async=!1),this.requestUpdate(n,t))},requestUpdate:function(e,t){const{paper:n}=this;n&&e>0&&n.requestViewUpdate(this,e,this.UPDATE_PRIORITY,t)},parseDOMJSON:function(e,t){var n=Ct(e),r=n.selectors,i=n.groupSelectors;for(var o in i){if(r[o])throw new Error("dia.CellView: ambiguous group selector");r[o]=i[o]}if(t){var a=this.selector;if(r[a])throw new Error("dia.CellView: ambiguous root selector.");r[a]=t}return{fragment:n.fragment,selectors:r}},can:function(e){var t,n,r=en(this.options.interactive)?this.options.interactive(this):this.options.interactive;return mn(r)&&!1!==r[e]||(t=r,n=Object.prototype.toString,(!0===t||!1===t||!!t&&"object"==typeof t&&"[object Boolean]"===n.call(t))&&!1!==r)},findBySelector:function(e,t,n){if(t||(t=this.el),n||(n=this.selectors),!e||"."===e)return[t];if(n){var r=n[e];if(r)return Array.isArray(r)?r:[r]}return St.useCSSSelectors?C(t).find(e).toArray():[]},notify:function(e){if(this.paper){var t=Array.prototype.slice.call(arguments,1);this.trigger.apply(this,[e].concat(t)),this.paper.trigger.apply(this.paper,[e,this].concat(t))}},getBBox:function(e){var t;if(e&&e.useModelGeometry){var n=this.model;t=n.getBBox().bbox(n.angle())}else t=this.getNodeBBox(this.el);return this.paper.localToPaperRect(t)},getNodeBBox:function(e){var t=this.getNodeBoundingRect(e),n=this.getNodeMatrix(e),r=this.getRootTranslateMatrix(),i=this.getRootRotateMatrix();return kt.transformRect(t,r.multiply(i).multiply(n))},getNodeUnrotatedBBox:function(e){var t=this.getNodeBoundingRect(e),n=this.getNodeMatrix(e),r=this.getRootTranslateMatrix();return kt.transformRect(t,r.multiply(n))},getRootTranslateMatrix:function(){var e=this.model.position();return kt.createSVGMatrix().translate(e.x,e.y)},getRootRotateMatrix:function(){var e=kt.createSVGMatrix(),t=this.model,n=t.angle();if(n){var r=t.getBBox(),i=r.width/2,o=r.height/2;e=e.translate(i,o).rotate(n).translate(-i,-o)}return e},_notifyHighlight:function(e,t,n={}){const{el:r}=this;let i;if([i=r]="string"==typeof t?this.findBySelector(t):this.$(t),n.partial=i!==r,void 0===n.type){let e;switch(!0){case n.embedding:e=jr.EMBEDDING;break;case n.connecting:e=jr.CONNECTING;break;case n.magnetAvailability:e=jr.MAGNET_AVAILABILITY;break;case n.elementAvailability:e=jr.ELEMENT_AVAILABILITY;break;default:e=jr.DEFAULT}n.type=e}return this.notify(e,i,n),this},highlight:function(e,t){return this._notifyHighlight("cell:highlight",e,t)},unhighlight:function(e,t={}){return this._notifyHighlight("cell:unhighlight",e,t)},findMagnet:function(e){const t=this.el;let n=this.$(e)[0];n||(n=t);do{const e=n.getAttribute("magnet"),r=n===t;if((e||r)&&"false"!==e)return n;if(r)return;n=n.parentNode}while(n)},findProxyNode:function(e,t){e||(e=this.el);const n=e.getAttribute(`${t}-selector`);if(n){const[e]=this.findBySelector(n);if(e)return e}return e},getSelector:function(e,t){var n;if(e===this.el)return"string"==typeof t&&(n="> "+t),n;if(e){var r=kt(e).index()+1;n=e.tagName+":nth-child("+r+")",t&&(n+=" > "+t),n=this.getSelector(e.parentNode,n)}return n},addLinkFromMagnet:function(e,t,n){var r=this.paper,i=r.model,o=r.getDefaultLink(this,e);return o.set({source:this.getLinkEnd(e,t,n,o,"source"),target:{x:t,y:n}}).addTo(i,{async:!1,ui:!0}),o.findView(r)},getLinkEnd:function(e,...t){var n=this.model,r=n.id,i=this.findAttribute("port",e),o=e.getAttribute("joint-selector"),a={id:r};return null!=o&&(a.magnet=o),null!=i?(a.port=i,n.hasPort(i)||o||(a.selector=this.getSelector(e))):null==o&&this.el!==e&&(a.selector=this.getSelector(e)),this.customizeLinkEnd(a,e,...t)},customizeLinkEnd:function(e,t,n,r,i,o){const{paper:a}=this,{connectionStrategy:s}=a.options;if("function"==typeof s){var u=s.call(a,e,this,t,new Z(n,r),i,o,a);if(u)return u}return e},getMagnetFromLinkEnd:function(e){var t,n=this.el,r=e.port,i=e.magnet,o=this.model;return null!=r&&o.isElement()&&o.hasPort(r)?t=this.findPortNode(r,i)||n:(i||(i=e.selector),i||null==r||(i='[port="'+r+'"]'),t=this.findBySelector(i,n,this.selectors)[0]),this.findProxyNode(t,"magnet")},dragLinkStart:function(e,t,n,r){this.model.startBatch("add-link");const i=this.addLinkFromMagnet(t,n,r);i.notifyPointerdown(e,n,r),i.eventData(e,i.startArrowheadMove("target",{whenNotAllowed:"remove"})),this.eventData(e,{linkView:i})},dragLink:function(e,t,n){var r=this.eventData(e),i=r.linkView;if(i)i.pointermove(e,t,n);else{var o=this.paper,a=o.options.magnetThreshold,s=this.getEventTarget(e),u=r.targetMagnet;if("onleave"===a){if(u===s||kt(u).contains(s))return}else if(o.eventData(e).mousemoved<=a)return;this.dragLinkStart(e,u,t,n)}},dragLinkEnd:function(e,t,n){var r=this.eventData(e).linkView;r&&(r.pointerup(e,t,n),this.model.stopBatch("add-link"))},getAttributeDefinition:function(e){return this.model.constructor.getAttributeDefinition(e)},setNodeAttributes:function(e,t){Qt(t)||(e instanceof SVGElement?kt(e).attr(t):C(e).attr(t))},processNodeAttributes:function(e,t){var n,r,i,o,a,s,u,l,c,f,h=[];for(n in t)t.hasOwnProperty(n)&&(r=t[n],!(i=this.getAttributeDefinition(n))||en(i.qualify)&&!i.qualify.call(this,r,e,t)?(s||(s={}),s[(f=n,f.replace(/[A-Z]/g,"-$&").toLowerCase())]=r):(bn(i.set)&&(s||(s={}),s[i.set]=r),null!==r&&h.push(n,i)));for(o=0,a=h.length;o<a;o+=2)n=h[o],i=h[o+1],r=t[n],en(i.set)&&(u||(u={}),u[n]=r),en(i.position)&&(l||(l={}),l[n]=r),en(i.offset)&&(c||(c={}),c[n]=r);return{raw:t,normal:s,set:u,position:l,offset:c}},updateRelativeAttributes:function(e,t,n,r){var i,o;r||(r={});var a=t.raw||{},s=t.normal||{},u=t.set,l=t.position,c=t.offset;for(i in u){o=u[i];var f=this.getAttributeDefinition(i).set.call(this,o,n.clone(),e,a);mn(f)?Ht(s,f):void 0!==f&&(s[i]=f)}if(e instanceof HTMLElement)this.setNodeAttributes(e,s);else{var h,d,p,g=s.transform,v=kt.transformStringToMatrix(g),m=Z(v.e,v.f);if(g&&(s=fn(s,"transform"),v.e=v.f=0),l||c){var y=this.getNodeScale(e,r.scalableNode);h=y.sx,d=y.sy}var b=!1;for(i in l)o=l[i],(p=this.getAttributeDefinition(i).position.call(this,o,n.clone(),e,a))&&(m.offset(Z(p).scale(h,d)),b||(b=!0));this.setNodeAttributes(e,s);var w=!1;if(c){var x=this.getNodeBoundingRect(e);if(x.width>0&&x.height>0){var k=kt.transformRect(x,v).scale(1/h,1/d);for(i in c)o=c[i],(p=this.getAttributeDefinition(i).offset.call(this,o,k,e,a))&&(m.offset(Z(p).scale(h,d)),w||(w=!0))}}(void 0!==g||b||w)&&(m.round(1),v.e=m.x,v.f=m.y,e.setAttribute("transform",kt.matrixToTransformString(v)))}},getNodeScale:function(e,t){var n,r;if(t&&t.contains(e)){var i=t.scale();n=1/i.sx,r=1/i.sy}else n=1,r=1;return{sx:n,sy:r}},cleanNodesCache:function(){this.metrics={}},nodeCache:function(e){var t=this.metrics;if(!t)return{};var n=kt.ensureId(e),r=t[n];return r||(r=t[n]={}),r},getNodeData:function(e){var t=this.nodeCache(e);return t.data||(t.data={}),t.data},getNodeBoundingRect:function(e){var t=this.nodeCache(e);return void 0===t.boundingRect&&(t.boundingRect=kt(e).getBBox()),new me(t.boundingRect)},getNodeMatrix:function(e){var t=this.nodeCache(e);if(void 0===t.magnetMatrix){var n=this.rotatableNode||this.el;t.magnetMatrix=kt(e).getTransformToElement(n)}return kt.createSVGMatrix(t.magnetMatrix)},getNodeShape:function(e){var t=this.nodeCache(e);return void 0===t.geometryShape&&(t.geometryShape=kt(e).toGeometryShape()),t.geometryShape.clone()},isNodeConnection:function(e){return this.model.isLink()&&(!e||e===this.el)},findNodesAttributes:function(e,t,n,r){var i,o,a,s,u={},l=[];for(var c in e)if(e.hasOwnProperty(c)&&(a=e[c],tn(a))){var f=n[c]=this.findBySelector(c,t,r);for(i=0,o=f.length;i<o;i++){var h=f[i];s=kt.ensureId(h);var d=r&&r[c]===h,p=u[s];if(p){p.array||(l.push(s),p.array=!0,p.attributes=[p.attributes],p.selectedLength=[p.selectedLength]);var g=p.attributes,v=p.selectedLength;if(d)g.unshift(a),v.unshift(-1);else{var m=Yt(v,o);g.splice(m,0,a),v.splice(m,0,o)}}else u[s]={attributes:a,selectedLength:d?-1:o,node:h,array:!1}}}for(i=0,o=l.length;i<o;i++)(a=u[s=l[i]]).attributes=vn({},...a.attributes.reverse());return u},getEventTarget:function(e,t={}){const{target:n,type:r,clientX:i=0,clientY:o=0}=e;return t.fromPoint||"touchmove"===r||"touchend"===r?document.elementFromPoint(i,o):n},updateDOMSubtreeAttributes:function(e,t,n){n||(n={}),n.rootBBox||(n.rootBBox=me()),n.selectors||(n.selectors=this.selectors);var r,i,o,a,s,u,l={},c={},f=[],h=[],d=n.roAttributes,p=this.findNodesAttributes(d||t,e,l,n.selectors),g=d?this.findNodesAttributes(t,e,l,n.selectors):p;for(var v in p)if(o=(a=p[v]).attributes,i=a.node,(s=this.processNodeAttributes(i,o)).set||s.position||s.offset){var m,y=g[v]&&g[v].attributes,b=y&&void 0===o.ref?y.ref:o.ref;if(b){if(!(m=(l[b]||this.findBySelector(b,e,n.selectors))[0]))throw new Error('dia.CellView: "'+b+'" reference does not exist.')}else m=null;if(r={node:i,refNode:m,processedAttributes:s,allAttributes:y},m){var w=h.findIndex((function(e){return e.refNode===i}));w>-1?h.splice(w,0,r):h.push(r)}else f.push(r)}else this.setNodeAttributes(i,s.normal);f.push(...h);for(var x=0,k=f.length;x<k;x++){r=f[x],i=r.node,m=r.refNode;var S=kt(n.rotatableNode),_=m?kt.ensureId(m):"",E=!!S&&!!m&&S.contains(m),C=c[_];if(!C){var A=E?S:e;C=c[_]=m?kt(m).getBBox({target:A}):n.rootBBox}d?(s=this.processNodeAttributes(i,r.allAttributes),this.mergeProcessedAttributes(s,r.processedAttributes)):s=r.processedAttributes;var P=C;E&&!S.contains(i)&&(u||(u=kt.transformStringToMatrix(S.attr("transform"))),P=kt.transformRect(C,u)),this.updateRelativeAttributes(i,s,P,n)}},mergeProcessedAttributes:function(e,t){e.set||(e.set={}),e.position||(e.position={}),e.offset||(e.offset={}),Ht(e.set,t.set),Ht(e.position,t.position),Ht(e.offset,t.offset);var n=e.normal&&e.normal.transform;void 0!==n&&t.normal&&(t.normal.transform=n),e.normal=t.normal},onRemove:function(){this.removeTools(),this.removeHighlighters()},_toolsView:null,hasTools:function(e){var t=this._toolsView;return!(!t||e&&t.getName()!==e)},addTools:function(e){return this.removeTools(),e&&(this._toolsView=e,e.configure({relatedView:this}),e.listenTo(this.paper,"tools:event",this.onToolEvent.bind(this))),this},updateTools:function(e){var t=this._toolsView;return t&&t.update(e),this},removeTools:function(){var e=this._toolsView;return e&&(e.remove(),this._toolsView=null),this},hideTools:function(){var e=this._toolsView;return e&&e.hide(),this},showTools:function(){var e=this._toolsView;return e&&e.show(),this},onToolEvent:function(e){switch(e){case"remove":this.removeTools();break;case"hide":this.hideTools();break;case"show":this.showTools()}},removeHighlighters:function(){Dr.remove(this)},updateHighlighters:function(e=!1){Dr.update(this,null,e)},transformHighlighters:function(){Dr.transform(this)},pointerdblclick:function(e,t,n){this.notify("cell:pointerdblclick",e,t,n)},pointerclick:function(e,t,n){this.notify("cell:pointerclick",e,t,n)},contextmenu:function(e,t,n){this.notify("cell:contextmenu",e,t,n)},pointerdown:function(e,t,n){const{model:r}=this,{graph:i}=r;i&&(r.startBatch("pointer"),this.eventData(e,{graph:i})),this.notify("cell:pointerdown",e,t,n)},pointermove:function(e,t,n){this.notify("cell:pointermove",e,t,n)},pointerup:function(e,t,n){const{graph:r}=this.eventData(e);this.notify("cell:pointerup",e,t,n),r&&r.stopBatch("pointer",{cell:this.model})},mouseover:function(e){this.notify("cell:mouseover",e)},mouseout:function(e){this.notify("cell:mouseout",e)},mouseenter:function(e){this.notify("cell:mouseenter",e)},mouseleave:function(e){this.notify("cell:mouseleave",e)},mousewheel:function(e,t,n,r){this.notify("cell:mousewheel",e,t,n,r)},onevent:function(e,t,n,r){this.notify(t,e,n,r)},onmagnet:function(){},magnetpointerdblclick:function(){},magnetcontextmenu:function(){},checkMouseleave(e){const{paper:t}=this;t.isAsync()&&t.dumpView(this);const n=this.getEventTarget(e,{fromPoint:!0}),r=t.findView(n);r!==this&&(this.mouseleave(e),r&&r.mouseenter(e))},setInteractivity:function(e){this.options.interactive=e}},{Highlighting:jr,addPresentationAttributes:function(e){return vn({},cn(this.prototype,"presentationAttributes"),e,(function(e,t){if(e&&t)return"string"==typeof e&&(e=[e]),"string"==typeof t&&(t=[t]),Array.isArray(e)&&Array.isArray(t)?Xt(e.concat(t)):void 0}))}}),Fr={UPDATE:"UPDATE",TRANSLATE:"TRANSLATE",TOOLS:"TOOLS",RESIZE:"RESIZE",PORTS:"PORTS",ROTATE:"ROTATE",RENDER:"RENDER"},zr=Ir.extend({_removePorts:function(){},_renderPorts:function(){},className:function(){var e=Ir.prototype.className.apply(this).split(" ");return e.push("element"),e.join(" ")},initialize:function(){Ir.prototype.initialize.apply(this,arguments),this._initializePorts()},presentationAttributes:{attrs:[Fr.UPDATE],position:[Fr.TRANSLATE,Fr.TOOLS],size:[Fr.RESIZE,Fr.PORTS,Fr.TOOLS],angle:[Fr.ROTATE,Fr.TOOLS],markup:[Fr.RENDER],ports:[Fr.PORTS]},initFlag:[Fr.RENDER],UPDATE_PRIORITY:0,confirmUpdate:function(e,t){const{useCSSSelectors:n}=St;this.hasFlag(e,Fr.PORTS)&&(this._removePorts(),this._cleanPortsCache());let r=!1;if(this.hasFlag(e,Fr.RENDER))this.render(),this.updateTools(t),this.updateHighlighters(!0),r=!0,e=this.removeFlag(e,[Fr.RENDER,Fr.UPDATE,Fr.RESIZE,Fr.TRANSLATE,Fr.ROTATE,Fr.PORTS,Fr.TOOLS]);else{let i=!1;this.hasFlag(e,Fr.RESIZE)&&(this.resize(t),i=!0,e=this.removeFlag(e,[Fr.RESIZE,Fr.UPDATE])),this.hasFlag(e,Fr.UPDATE)&&(this.update(this.model,null,t),e=this.removeFlag(e,Fr.UPDATE),i=!0,n&&(e=this.removeFlag(e,Fr.PORTS))),this.hasFlag(e,Fr.TRANSLATE)&&(this.translate(),e=this.removeFlag(e,Fr.TRANSLATE),r=!0),this.hasFlag(e,Fr.ROTATE)&&(this.rotate(),e=this.removeFlag(e,Fr.ROTATE),r=!0),this.hasFlag(e,Fr.PORTS)&&(this._renderPorts(),i=!0,e=this.removeFlag(e,Fr.PORTS)),i&&this.updateHighlighters(!1)}return r&&this.transformHighlighters(),this.hasFlag(e,Fr.TOOLS)&&(this.updateTools(t),e=this.removeFlag(e,Fr.TOOLS)),e},_initializePorts:function(){},update:function(e,t){this.cleanNodesCache();const{useCSSSelectors:n}=St;n&&this._removePorts();var r=this.model,i=r.attr();this.updateDOMSubtreeAttributes(this.el,i,{rootBBox:new me(r.size()),selectors:this.selectors,scalableNode:this.scalableNode,rotatableNode:this.rotatableNode,roAttributes:t===i?null:t}),n&&this._renderPorts()},rotatableSelector:"rotatable",scalableSelector:"scalable",scalableNode:null,rotatableNode:null,renderMarkup:function(){var e=this.model,t=e.get("markup")||e.markup;if(!t)throw new Error("dia.ElementView: markup required");if(Array.isArray(t))return this.renderJSONMarkup(t);if("string"==typeof t)return this.renderStringMarkup(t);throw new Error("dia.ElementView: invalid markup")},renderJSONMarkup:function(e){var t=this.parseDOMJSON(e,this.el),n=this.selectors=t.selectors;this.rotatableNode=kt(n[this.rotatableSelector])||null,this.scalableNode=kt(n[this.scalableSelector])||null,this.vel.append(t.fragment)},renderStringMarkup:function(e){var t=this.vel;t.append(kt(e)),this.rotatableNode=t.findOne(".rotatable"),this.scalableNode=t.findOne(".scalable"),(this.selectors={})[this.selector]=this.el},render:function(){return this.vel.empty(),this.renderMarkup(),this.scalableNode&&this.update(),this.resize(),this.rotatableNode?(this.rotate(),this.translate()):this.updateTransformation(),St.useCSSSelectors||this._renderPorts(),this},resize:function(e){if(this.scalableNode)return this.sgResize(e);this.model.attributes.angle&&this.rotate(),this.update()},translate:function(){if(this.rotatableNode)return this.rgTranslate();this.updateTransformation()},rotate:function(){if(this.rotatableNode)return this.rgRotate(),void this.update();this.updateTransformation()},updateTransformation:function(){var e=this.getTranslateString(),t=this.getRotateString();t&&(e+=" "+t),this.vel.attr("transform",e)},getTranslateString:function(){var e=this.model.attributes.position;return"translate("+e.x+","+e.y+")"},getRotateString:function(){var e=this.model.attributes,t=e.angle;if(!t)return null;var n=e.size;return"rotate("+t+","+n.width/2+","+n.height/2+")"},rgRotate:function(){this.rotatableNode.attr("transform",this.getRotateString())},rgTranslate:function(){this.vel.attr("transform",this.getTranslateString())},sgResize:function(e){var t=this.model,n=t.angle(),r=t.size(),i=this.scalableNode,o=!1;i.node.getElementsByTagName("path").length>0&&(o=!0);var a=i.getBBox({recursive:o}),s=r.width/(a.width||1),u=r.height/(a.height||1);i.attr("transform","scale("+s+","+u+")");var l=this.rotatableNode,c=l&&l.attr("transform");if(c){l.attr("transform",c+" rotate("+-n+","+r.width/2+","+r.height/2+")");var f=i.getBBox({target:this.paper.cells});t.set("position",{x:f.x,y:f.y},Ht({updateHandled:!0},e)),this.translate(),this.rotate()}this.update()},prepareEmbedding:function(e={}){const t=e.model||this.model,n=(e.paper||this.paper).model,r=e.initialZIndices={},i=t.getEmbeddedCells({deep:!0}),o=n.getConnectedLinks(t,{deep:!0,includeEnclosed:!0});[t,...i,...o].forEach((e=>r[e.id]=e.attributes.z)),t.startBatch("to-front"),t.toFront({deep:!0,ui:!0});const a=n.getElements().reduce(((e,t)=>Math.max(e,t.attributes.z||0)),0);o.forEach((e=>{e.attributes.z<=a&&e.set("z",a+1,{ui:!0})})),t.stopBatch("to-front");const s=t.parent();s?(n.getCell(s).unembed(t,{ui:!0}),e.initialParentId=s):e.initialParentId=null},processEmbedding:function(e={},t,n,r){const i=e.model||this.model,o=e.paper||this.paper,a=o.model,{findParentBy:s,frontParentOnly:u,validateEmbedding:l}=o.options;let c;c=en(s)?nn(s.call(a,this,t,n,r)):"pointer"===s?nn(a.findModelsFromPoint({x:n,y:r})):a.findModelsUnderElement(i,{searchBy:s}),c=c.filter((e=>e instanceof Gn&&i.id!==e.id&&!e.isEmbeddedIn(i))),u&&(c=c.slice(-1));let f=null;const h=e.candidateEmbedView;for(let e=c.length-1;e>=0;e--){const t=c[e];if(h&&h.model.id==t.id){f=h;break}{const e=t.findView(o);if(!en(l)||l.call(o,this,e)){f=e;break}}}f&&f!=h&&(this.clearEmbedding(e),e.candidateEmbedView=f.highlight(f.findProxyNode(null,"container"),{embedding:!0})),!f&&h&&this.clearEmbedding(e)},clearEmbedding:function(e){e||(e={});var t=e.candidateEmbedView;t&&(t.unhighlight(t.findProxyNode(null,"container"),{embedding:!0}),e.candidateEmbedView=null)},finalizeEmbedding:function(e={}){const t=e.candidateEmbedView,n=e.model||this.model,r=e.paper||this.paper;if(t)t.model.embed(n,{ui:!0}),t.unhighlight(t.findProxyNode(null,"container"),{embedding:!0}),e.candidateEmbedView=null;else{const{validateUnembedding:t}=r.options,{initialParentId:n}=e;if(n&&"function"==typeof t&&!t.call(r,this))return void this._disallowUnembed(e)}r.model.getConnectedLinks(n,{deep:!0}).forEach((e=>{e.reparent({ui:!0})}))},_disallowUnembed:function(e){const{model:t,whenNotAllowed:n="revert"}=e,r=t||this.model,i=(e.paper||this.paper).model;switch(n){case"remove":r.remove({ui:!0});break;case"revert":{const{initialParentId:t,initialPosition:n,initialZIndices:o}=e;if(n){const{x:e,y:t}=n;r.position(e,t,{deep:!0,ui:!0})}o&&Object.keys(o).forEach((e=>{const t=i.getCell(e);t&&t.set("z",o[e],{ui:!0})}));const a=i.getCell(t);a&&a.embed(r,{ui:!0});break}}},getDelegatedView:function(){for(var e=this,t=e.model,n=e.paper;e&&!t.isLink();){if(!t.isEmbedded()||e.can("stopDelegation"))return e;t=t.getParentCell(),e=n.findViewByModel(t)}return null},findProxyNode:function(e,t){e||(e=this.el);const n=e.getAttribute(`${t}-selector`);if(n){const t=this.findAttribute("port",e);if(t){const e=this.findPortNode(t,n);if(e)return e}else{const[e]=this.findBySelector(n);if(e)return e}}return e},notifyPointerdown(e,t,n){Ir.prototype.pointerdown.call(this,e,t,n),this.notify("element:pointerdown",e,t,n)},notifyPointermove(e,t,n){Ir.prototype.pointermove.call(this,e,t,n),this.notify("element:pointermove",e,t,n)},notifyPointerup(e,t,n){this.notify("element:pointerup",e,t,n),Ir.prototype.pointerup.call(this,e,t,n)},pointerdblclick:function(e,t,n){Ir.prototype.pointerdblclick.apply(this,arguments),this.notify("element:pointerdblclick",e,t,n)},pointerclick:function(e,t,n){Ir.prototype.pointerclick.apply(this,arguments),this.notify("element:pointerclick",e,t,n)},contextmenu:function(e,t,n){Ir.prototype.contextmenu.apply(this,arguments),this.notify("element:contextmenu",e,t,n)},pointerdown:function(e,t,n){this.isPropagationStopped(e)||(this.notifyPointerdown(e,t,n),this.dragStart(e,t,n))},pointermove:function(e,t,n){var r=this.eventData(e);switch(r.action){case"magnet":this.dragMagnet(e,t,n);break;case"move":(r.delegatedView||this).drag(e,t,n);default:this.notifyPointermove(e,t,n)}this.eventData(e,r)},pointerup:function(e,t,n){var r=this.eventData(e);switch(r.action){case"magnet":this.dragMagnetEnd(e,t,n);break;case"move":(r.delegatedView||this).dragEnd(e,t,n);default:this.notifyPointerup(e,t,n)}var i=r.targetMagnet;i&&this.magnetpointerclick(e,i,t,n),this.checkMouseleave(e)},mouseover:function(e){Ir.prototype.mouseover.apply(this,arguments),this.notify("element:mouseover",e)},mouseout:function(e){Ir.prototype.mouseout.apply(this,arguments),this.notify("element:mouseout",e)},mouseenter:function(e){Ir.prototype.mouseenter.apply(this,arguments),this.notify("element:mouseenter",e)},mouseleave:function(e){Ir.prototype.mouseleave.apply(this,arguments),this.notify("element:mouseleave",e)},mousewheel:function(e,t,n,r){Ir.prototype.mousewheel.apply(this,arguments),this.notify("element:mousewheel",e,t,n,r)},onmagnet:function(e,t,n){this.dragMagnetStart(e,t,n)},magnetpointerdblclick:function(e,t,n,r){this.notify("element:magnet:pointerdblclick",e,t,n,r)},magnetcontextmenu:function(e,t,n,r){this.notify("element:magnet:contextmenu",e,t,n,r)},dragStart:function(e,t,n){var r=this.getDelegatedView();if(!r||!r.can("elementMove"))return;this.eventData(e,{action:"move",delegatedView:r});const i=r.model.position();r.eventData(e,{initialPosition:i,pointerOffset:i.difference(t,n),restrictedArea:this.paper.getRestrictedArea(r,t,n)})},dragMagnetStart:function(e,t,n){if(this.can("addLinkFromMagnet")){var r=e.currentTarget,i=this.paper;this.eventData(e,{targetMagnet:r}),e.stopPropagation(),i.options.validateMagnet(this,r,e)?(i.options.magnetThreshold<=0&&this.dragLinkStart(e,r,t,n),this.eventData(e,{action:"magnet"}),this.stopPropagation(e)):this.pointerdown(e,t,n),i.delegateDragEvents(this,e.data)}},drag:function(e,t,n){var r=this.paper,i=r.options.gridSize,o=this.model,a=this.eventData(e),{pointerOffset:s,restrictedArea:u,embedding:l}=a,c=O(t+s.x,i),f=O(n+s.y,i);o.position(c,f,{restrictedArea:u,deep:!0,ui:!0}),r.options.embeddingMode&&(l||(this.prepareEmbedding(a),l=!0),this.processEmbedding(a,e,t,n)),this.eventData(e,{embedding:l})},dragMagnet:function(e,t,n){this.dragLink(e,t,n)},dragEnd:function(e,t,n){var r=this.eventData(e);r.embedding&&this.finalizeEmbedding(r)},dragMagnetEnd:function(e,t,n){this.dragLinkEnd(e,t,n)},magnetpointerclick:function(e,t,n,r){var i=this.paper;i.eventData(e).mousemoved>i.options.clickThreshold||this.notify("element:magnet:pointerclick",e,t,n,r)}},{Flags:Fr});Ht(zr.prototype,Cr);const Vr=function(e,t,n){return e},Br=function(e,t,n){var r,i,o,a=t.side||"bottom",s=zt(t.padding||40),u=n.sourceBBox,l=n.targetBBox,c=u.center(),f=l.center();switch(a){case"bottom":o=1,r="y",i="height";break;case"top":o=-1,r="y",i="height";break;case"left":o=-1,r="x",i="width";break;case"right":o=1,r="x",i="width";break;default:throw new Error("Router: invalid side")}return c[r]+=o*(u[i]/2+s[a]),f[r]+=o*(l[i]/2+s[a]),o*(c[r]-f[r])>0?f[r]=c[r]:c[r]=f[r],[c].concat(e,f)};var $r={N:"S",S:"N",E:"W",W:"E"},Ur={N:-Math.PI/2*3,S:-Math.PI/2,E:0,W:Math.PI};function Hr(e,t,n){var r=new Z(e.x,t.y);return n.containsPoint(r)&&(r=new Z(t.x,e.y)),r}function qr(e,t){return e["W"===t||"E"===t?"width":"height"]}function Wr(e,t){return e.x===t.x?e.y>t.y?"N":"S":e.y===t.y?e.x>t.x?"W":"E":null}function Gr(e){return new me(e.x,e.y,0,0)}function Yr(e){var t=zt(e.padding||e.elementPadding||20);return{x:-t.left,y:-t.top,width:t.left+t.right,height:t.top+t.bottom}}function Xr(e,t){return e.sourceBBox.clone().moveAndExpand(Yr(t))}function Kr(e,t){return e.targetBBox.clone().moveAndExpand(Yr(t))}function Jr(e,t,n){var r=new Z(e.x,t.y),i=new Z(t.x,e.y),o=Wr(e,r),a=Wr(e,i),s=$r[n],u=o===n||o!==s&&(a===s||a!==n)?r:i;return{points:[u],direction:Wr(u,t)}}function Qr(e,t,n){var r=Hr(e,t,n);return{points:[r],direction:Wr(r,t)}}function Zr(e,t,n,r){var i,o={},a=[new Z(e.x,t.y),new Z(t.x,e.y)],s=a.filter((function(e){return!n.containsPoint(e)})),u=s.filter((function(t){return Wr(t,e)!==r}));if(u.length>0)i=(i=u.filter((function(t){return Wr(e,t)===r})).pop())||u[0],o.points=[i],o.direction=Wr(i,t);else{i=sn(a,s)[0];var l=new Z(t).move(i,-qr(n,r)/2),c=Hr(l,e,n);o.points=[c,l],o.direction=Wr(l,t)}return o}function ei(e,t,n,r){var i=Qr(t,e,r),o=i.points[0];if(n.containsPoint(o)){var a=(i=Qr(e,t,n)).points[0];if(r.containsPoint(a)){var s=new Z(e).move(a,-qr(n,Wr(e,a))/2),u=new Z(t).move(o,-qr(r,Wr(t,o))/2),l=new re(s,u).midpoint(),c=Qr(e,l,n),f=Jr(l,t,c.direction);i.points=[c.points[0],f.points[0]],i.direction=f.direction}}return i}function ti(e,t,n,r,i){var o,a,s,u={},l=n.union(r).inflate(1),c=l.center().distance(t)>l.center().distance(e),f=c?t:e,h=c?e:t;return i?(o=Z.fromPolar(l.width+l.height,Ur[i],f),o=l.pointNearestToPoint(o).move(o,-1)):o=l.pointNearestToPoint(f).move(f,1),a=Hr(o,h,l),o.round().equals(a.round())?(a=Z.fromPolar(l.width+l.height,R(o.theta(f))+Math.PI/2,h),s=Hr(o,a=l.pointNearestToPoint(a).move(h,1).round(),l),u.points=c?[a,s,o]:[o,s,a]):u.points=c?[a,o]:[o,a],u.direction=Wr(c?o:a,t),u}function ni(e,t,n){var r,i=Xr(n,t),o=Kr(n,t),a=function(e,t){return e.sourceAnchor?e.sourceAnchor:Xr(e,t).center()}(n,t),s=function(e,t){return e.targetAnchor?e.targetAnchor:Kr(e,t).center()}(n,t);i=i.union(Gr(a)),o=o.union(Gr(s)),(e=nn(e).map(Z)).unshift(a),e.push(s);for(var u=[],l=0,c=e.length-1;l<c;l++){var f=null,h=e[l],d=e[l+1],p=!!Wr(h,d);if(0===l)l+1===c?i.intersect(o.clone().inflate(1))?f=ti(h,d,i,o):p||(f=ei(h,d,i,o)):i.containsPoint(d)?f=ti(h,d,i,Gr(d).moveAndExpand(Yr(t))):p||(f=Qr(h,d,i));else if(l+1===c){var g=p&&Wr(d,h)===r;o.containsPoint(h)||g?f=ti(h,d,Gr(h).moveAndExpand(Yr(t)),o,r):p||(f=Zr(h,d,o,r))}else p||(f=Jr(h,d,r));f?(Array.prototype.push.apply(u,f.points),r=f.direction):r=Wr(h,d),l+1<c&&u.push(d)}return u}var ri={step:10,maximumLoops:2e3,precision:1,maxAllowedDirectionChange:90,perpendicular:!0,excludeEnds:[],excludeTypes:["basic.Text"],startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},cost:function(){return this.step},directions:function(){var e=this.step,t=this.cost();return[{offsetX:e,offsetY:0,cost:t},{offsetX:-e,offsetY:0,cost:t},{offsetX:0,offsetY:e,cost:t},{offsetX:0,offsetY:-e,cost:t}]},penalties:function(){return{0:0,45:this.step/2,90:this.step/2}},paddingBox:function(){var e=this.step;return{x:-e,y:-e,width:2*e,height:2*e}},isPointObstacle:null,fallbackRouter:function(e,t,n){if(!en(ni))throw new Error("Manhattan requires the orthogonal router as default fallback.");return ni(e,Ht({},ri,t),n)},fallbackRoute:function(e,t,n){return null},draggingRoute:null};function ii(e){this.map={},this.options=e,this.mapGridSize=100}function oi(){this.items=[],this.hash={},this.values={},this.OPEN=1,this.CLOSE=2}function ai(e,t){return t&&t.paddingBox?e.sourceBBox.clone().moveAndExpand(t.paddingBox):e.sourceBBox.clone()}function si(e,t){return t&&t.paddingBox?e.targetBBox.clone().moveAndExpand(t.paddingBox):e.targetBBox.clone()}function ui(e,t){return e.sourceAnchor?e.sourceAnchor:ai(e,t).center()}function li(e,t,n,r,i){var o=360/n,a=e.theta(function(e,t,n,r){var i=r.step,o=t.x-e.x,a=t.y-e.y,s=o/n.x*i,u=a/n.y*i;return new Z(e.x+s,e.y+u)}(e,t,r,i)),s=N(a+o/2);return o*Math.floor(s/o)}function ci(e,t){var n=Math.abs(e-t);return n>180?360-n:n}function fi(e,t){if(!e)return t;var n=Math.abs(e),r=Math.round(n/t);return r?t+(n-r*t)/r:n}function hi(e,t){return e.round(t)}function di(e,t,n){return hi(function(e,t){var n=t.source,r=O(e.x-n.x,t.x)+n.x,i=O(e.y-n.y,t.y)+n.y;return new Z(r,i)}(e.clone(),t),n)}function pi(e){return e.clone().toString()}function gi(e){return new Z(0===e.x?0:Math.abs(e.x)/e.x,0===e.y?0:Math.abs(e.y)/e.y)}function vi(e,t,n,r,i,o,a){for(var s,u=[],l=gi(i.difference(n)),c=pi(n),f=e[c];f;){var h=gi((s=t[c]).difference(f));h.equals(l)||(u.unshift(s),l=h),f=e[c=pi(f)]}var d=t[c];return gi(d.difference(r)).equals(l)||u.unshift(d),u}function mi(e,t){for(var n=1/0,r=0,i=t.length;r<i;r++){var o=e.manhattanDistance(t[r]);o<n&&(n=o)}return n}function yi(e,t,n,r,i){var o=i.precision,a=i.directionMap,s=e.difference(t.center()),u=mn(a)?Object.keys(a):[],l=nn(n),c=u.reduce((function(n,i){if(l.includes(i)){for(var u,c=a[i],f=new Z(e.x+c.x*(Math.abs(s.x)+t.width),e.y+c.y*(Math.abs(s.y)+t.height)),h=new re(e,f).intersect(t)||[],d=h.length,p=null,g=0;g<d;g++){var v=h[g],m=e.squaredDistance(v);(void 0===u||m>u)&&(u=m,p=v)}if(p){var y=di(p,r,o);t.containsPoint(y)&&(y=di(y.offset(c.x*r.x,c.y*r.y),r,o)),n.push(y)}}return n}),[]);return t.containsPoint(e)||c.push(di(e,r,o)),c}function bi(e,t,n,r){var i,o,a=r.precision;i=hi(e instanceof me?ui(this,r).clone():e.clone(),a),o=hi(t instanceof me?function(e,t){return e.targetAnchor?e.targetAnchor:si(e,t).center()}(this,r).clone():t.clone(),a);var s,u,l,c,f,h,d,p=(s=r.step,l=o,{source:(u=i).clone(),x:fi(l.x-u.x,s),y:fi(l.y-u.y,s)});if(h=e instanceof me?yi(c=i,e,r.startDirections,p,r):[c=i],t instanceof me?(f=o,d=yi(o,t,r.endDirections,p,r)):d=[f=o],h=h.filter((e=>!n(e))),d=d.filter((e=>!n(e))),h.length>0&&d.length>0){for(var g=new oi,v={},m={},y={},b=0,w=h.length;b<w;b++){var x=h[b],k=pi(x);g.add(k,mi(x,d)),v[k]=x,y[k]=0}var S,_,E=r.previousDirectionAngle,C=void 0===E,A=r.directions;!function(e,t,n){var r=n.step;nn(n.directions).forEach((function(e){e.gridOffsetX=e.offsetX/r*t.x,e.gridOffsetY=e.offsetY/r*t.y}))}(0,p,r);for(var P=A.length,L=nn(d).reduce((function(e,t){var n=pi(t);return e.push(n),e}),[]),T=r.maximumLoops;!g.isEmpty()&&T>0;){var N,O=g.pop(),M=v[O],R=m[O],D=y[O],j=void 0===R,I=M.equals(c);N=j?C?I?null:li(c,M,P,p,r):E:li(R,M,P,p,r);var F=h.length===d.length;if(F)for(var z=0;z<h.length;z++)if(!h[z].equals(d[z])){F=!1;break}if((!j||!F)&&L.indexOf(O)>=0)return r.previousDirectionAngle=N,vi(m,v,M,c,f);for(b=0;b<P;b++){var V=(S=A[b]).angle;if(_=ci(N,V),C&&I||!(_>r.maxAllowedDirectionChange)){var B=di(M.clone().offset(S.gridOffsetX,S.gridOffsetY),p,a),$=pi(B);if(!g.isClose($)&&!n(B)){if(L.indexOf($)>=0&&!B.equals(f)&&ci(V,li(B,f,P,p,r))>r.maxAllowedDirectionChange)continue;var U=D+S.cost+(I?0:r.penalties[_]);(!g.isOpen($)||U<y[$])&&(v[$]=B,m[$]=M,y[$]=U,g.add($,U+mi(B,d)))}}}T--}}return r.fallbackRoute.call(this,c,f,r)}ii.prototype.build=function(e,t){var n=this.options,r=nn(n.excludeEnds).reduce((function(n,r){var i=t.get(r);if(i){var o=e.getCell(i.id);o&&n.push(o)}return n}),[]),i=[],o=e.getCell(t.get("source").id);o&&(i=un(i,o.getAncestors().map((function(e){return e.id}))));var a=e.getCell(t.get("target").id);a&&(i=un(i,a.getAncestors().map((function(e){return e.id}))));var s=this.mapGridSize;return e.getElements().reduce((function(e,t){var o=nn(n.excludeTypes).includes(t.get("type")),a=r.find((function(e){return e.id===t.id})),u=i.includes(t.id);if(!(o||a||u))for(var l=t.getBBox().moveAndExpand(n.paddingBox),c=l.origin().snapToGrid(s),f=l.corner().snapToGrid(s),h=c.x;h<=f.x;h+=s)for(var d=c.y;d<=f.y;d+=s){var p=h+"@"+d;e[p]=e[p]||[],e[p].push(l)}return e}),this.map),this},ii.prototype.isPointAccessible=function(e){var t=e.clone().snapToGrid(this.mapGridSize).toString();return nn(this.map[t]).every((function(t){return!t.containsPoint(e)}))},oi.prototype.add=function(e,t){this.hash[e]?this.items.splice(this.items.indexOf(e),1):this.hash[e]=this.OPEN,this.values[e]=t;var n=Yt(this.items,e,function(e){return this.values[e]}.bind(this));this.items.splice(n,0,e)},oi.prototype.remove=function(e){this.hash[e]=this.CLOSE},oi.prototype.isOpen=function(e){return this.hash[e]===this.OPEN},oi.prototype.isClose=function(e){return this.hash[e]===this.CLOSE},oi.prototype.isEmpty=function(){return 0===this.items.length},oi.prototype.pop=function(){var e=this.items.shift();return this.remove(e),e};const wi=function(e,t,n){return function(e,t,n){!function(e){if(e.directions=cn(e,"directions"),e.penalties=cn(e,"penalties"),e.paddingBox=cn(e,"paddingBox"),e.padding=cn(e,"padding"),e.padding){var t=zt(e.padding);e.paddingBox={x:-t.left,y:-t.top,width:t.left+t.right,height:t.top+t.bottom}}nn(e.directions).forEach((function(e){var t=new Z(0,0),n=new Z(e.offsetX,e.offsetY);e.angle=N(t.theta(n))}))}(t),n.options.perpendicular=!!t.perpendicular;var r=ai(n,t),i=si(n,t),o=ui(n,t);let a;if("function"==typeof t.isPointObstacle)a=t.isPointObstacle;else{const e=new ii(t);e.build(n.paper.model,n.model),a=t=>!e.isPointAccessible(t)}for(var s,u,l=nn(e).map(Z),c=[],f=o,h=0,d=l.length;h<=d;h++){var p=null;if(u=s||r,!(s=l[h])&&(s=i,(!n.model.get("source").id||!n.model.get("target").id)&&en(t.draggingRoute))){var g=u===r?o:u,v=s.origin();p=t.draggingRoute.call(n,g,v,t)}if(null===(p=p||bi.call(n,u,s,a,t)))return t.fallbackRouter(e,t,n);var m=p[0];m&&m.equals(f)&&p.shift(),f=p[p.length-1]||f,Array.prototype.push.apply(c,p)}return c}(e,Ht({},ri,t),n)};var xi={maxAllowedDirectionChange:45,diagonalCost:function(){var e=this.step;return Math.ceil(Math.sqrt(e*e<<1))},directions:function(){var e=this.step,t=this.cost(),n=this.diagonalCost();return[{offsetX:e,offsetY:0,cost:t},{offsetX:e,offsetY:e,cost:n},{offsetX:0,offsetY:e,cost:t},{offsetX:-e,offsetY:e,cost:n},{offsetX:-e,offsetY:0,cost:t},{offsetX:-e,offsetY:-e,cost:n},{offsetX:0,offsetY:-e,cost:t},{offsetX:e,offsetY:-e,cost:n}]},fallbackRoute:function(e,t,n){var r=e.theta(t),i=[],o={x:t.x,y:e.y},a={x:e.x,y:t.y};if(r%180>90){var s=o;o=a,a=s}var u=r%90<45?o:a,l=new re(e,u),c=90*Math.ceil(r/90),f=Z.fromPolar(l.squaredLength(),R(c+135),u),h=new re(t,f),d=l.intersection(h),p=d||t,g=d?p:e,v=360/n.directions.length,m=g.theta(t),y=N(m+v/2),b=v*Math.floor(y/v);return n.previousDirectionAngle=b,p&&i.push(p.round()),i.push(t),i}};const ki=function(e,t,n){if(!en(wi))throw new Error("Metro requires the manhattan router.");return wi(e,Ht({},xi,t),n)};var Si=["arc","gap","cubic"],_i=["smooth"],Ei=1/3,Ci=2/3;function Ai(e,t,n){var r=[].concat(e,n,t);return r.reduce((function(e,t,n){var i=r[n+1];return null!=i&&(e[n]=ie(t,i)),e}),[])}function Pi(e,t){return ie(e,t).squaredLength()}function Li(e,t,n,r){var i,o=new Te;return i=Te.createSegment("M",e[0].start),o.appendSegment(i),nn(e).forEach((function(a,s){if(a.isJump){var u,l,c,f;if("arc"===n){u=-90,l=a.start.difference(a.end);var h=Number(l.x<0||0===l.x&&l.y<0);h&&(u+=180);var d,p=a.midpoint(),g=new re(p,a.end).rotate(p,u);c=(d=new re(a.start,p)).pointAt(2/3).rotate(a.start,u),f=g.pointAt(1/3).rotate(g.end,-u),i=Te.createSegment("C",c,f,g.end),o.appendSegment(i),d=new re(p,a.end),c=g.pointAt(1/3).rotate(g.end,u),f=d.pointAt(1/3).rotate(a.end,-u),i=Te.createSegment("C",c,f,a.end),o.appendSegment(i)}else if("gap"===n)i=Te.createSegment("M",a.end),o.appendSegment(i);else if("cubic"===n){u=a.start.theta(a.end);var v=.6*t,m=1.35*t;l=a.start.difference(a.end),(h=Number(l.x<0||0===l.x&&l.y<0))&&(m*=-1),c=Z(a.start.x+v,a.start.y+m).rotate(a.start,u),f=Z(a.end.x-v,a.end.y+m).rotate(a.end,u),i=Te.createSegment("C",c,f,a.end),o.appendSegment(i)}}else{var y=e[s+1];0==r||!y||y.isJump?(i=Te.createSegment("L",a.end),o.appendSegment(i)):function(e,t,n,r,i){var o,a=n.distance(r)/2,s=n.distance(i)/2,u=-Math.min(e,a),l=-Math.min(e,s),c=n.clone().move(r,u).round(),f=n.clone().move(i,l).round(),h=new Z(Ei*c.x+Ci*n.x,Ci*n.y+Ei*c.y),d=new Z(Ei*f.x+Ci*n.x,Ci*n.y+Ei*f.y);o=Te.createSegment("L",c),t.appendSegment(o),o=Te.createSegment("C",h,d,f),t.appendSegment(o)}(r,o,a.end,a.start,y.end)}})),o}const Ti=function(e,t,n,r){!function(e){var t=e.paper,n=t._jumpOverUpdateList;if(null==n){n=t._jumpOverUpdateList=[];var r=t.model;r.on("batch:stop",(function(){this.hasActiveBatch()||function(e){for(var t=e._jumpOverUpdateList,n=0;n<t.length;n++){const e=t[n],r=e.getFlag(e.constructor.Flags.CONNECTOR);e.requestUpdate(r)}}(t)})),r.on("reset",(function(){n=t._jumpOverUpdateList=[]}))}n.indexOf(e)<0&&(n.push(e),e.listenToOnce(e.model,"change:connector remove",(function(){n.splice(n.indexOf(e),1)})))}(this);var i=r.raw,o=r.size||5,a=r.jump&&(""+r.jump).toLowerCase(),s=r.radius||0,u=r.ignoreConnectors||_i;-1===Si.indexOf(a)&&(a=Si[0]);var l=this.paper,c=l.model.getLinks();if(1===c.length)return Li(Ai(e,t,n),o,a,s);var f=this.model,h=c.indexOf(f),d=l.options.defaultConnector||{},p=c.filter((function(e,t){var n=e.get("connector")||d;return!(nn(u).includes(n.name)||t>h&&"jumpover"===n.name)})),g=p.map((function(e){return l.findViewByModel(e)})),v=Ai(e,t,n),m=g.map((function(e){return null==e?[]:e===this?v:Ai(e.sourcePoint,e.targetPoint,e.route)}),this),y=v.reduce((function(e,t){var n=p.reduce((function(e,n,r){if(n!==f){var i=function(e,t){return nn(t).reduce((function(t,n){var r=e.intersection(n);return r&&t.push(r),t}),[])}(t,m[r]);e.push.apply(e,i)}return e}),[]).sort((function(e,n){return Pi(t.start,e)-Pi(t.start,n)}));return n.length>0?e.push.apply(e,function(e,t,n){return t.reduce((function(r,i,o){if(!0===i.skip)return r;var a=r.pop()||e,s=ee(i).move(a.start,-n),u=ee(i).move(a.start,+n),l=t[o+1];if(null!=l){var c=u.distance(l);c<=n&&(u=l.move(a.start,c),l.skip=!0)}else if(s.distance(a.end)<2*n+1)return r.push(a),r;if(u.distance(a.start)<2*n+1)return r.push(a),r;var f=ie(s,u);return f.isJump=!0,r.push(ie(a.start,s),f,ie(u,a.end)),r}),[])}(t,n,o)):e.push(t),e}),[]),b=Li(y,o,a,s);return i?b:b.serialize()},Ni=function(e,t,n,r){var i=r&&r.raw,o=[e].concat(n).concat([t]),a=new ke(o),s=new Te(a);return i?s:s.serialize()},Oi=function(e,t,n,r){r||(r={});var i,o=r.radius||10,a=r.raw,s=new Te;i=Te.createSegment("M",e),s.appendSegment(i);for(var u,l,c,f,h,d,p,g,v,m,y,b=1/3,w=2/3,x=0,k=n.length;x<k;x++)u=new Z(n[x]),l=n[x-1]||e,c=n[x+1]||t,f=h||u.distance(l)/2,h=u.distance(c)/2,d=-Math.min(o,f),p=-Math.min(o,h),g=u.clone().move(l,d).round(),v=u.clone().move(c,p).round(),m=new Z(b*g.x+w*u.x,w*u.y+b*g.y),y=new Z(b*v.x+w*u.x,w*u.y+b*v.y),i=Te.createSegment("L",g),s.appendSegment(i),i=Te.createSegment("C",m,y,v),s.appendSegment(i);return i=Te.createSegment("L",t),s.appendSegment(i),a?s:s.serialize()},Mi=function(e,t,n,r){var i,o=r&&r.raw;if(n&&0!==n.length){var a=[e].concat(n).concat([t]),s=Pe.throughPoints(a);i=new Te(s)}else{var u;if(i=new Te,u=Te.createSegment("M",e),i.appendSegment(u),Math.abs(e.x-t.x)>=Math.abs(e.y-t.y)){var l=(e.x+t.x)/2;u=Te.createSegment("C",l,e.y,l,t.y,t.x,t.y),i.appendSegment(u)}else{var c=(e.y+t.y)/2;u=Te.createSegment("C",e.x,c,t.x,c,t.x,t.y),i.appendSegment(u)}}return o?i:i.serialize()},Ri={AUTO:"auto",HORIZONTAL:"horizontal",VERTICAL:"vertical",CLOSEST_POINT:"closest-point",OUTWARDS:"outwards"},Di={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",AUTO:"auto",CLOSEST_POINT:"closest-point",OUTWARDS:"outwards"},ji=function(e,t,n=[],r={},i){const o=Boolean(r.raw),{direction:a=Ri.AUTO,precision:s=3}=r,u={coeff:r.distanceCoefficient||.6,angleTangentCoefficient:r.angleTangentCoefficient||80,tau:r.tension||.5,sourceTangent:r.sourceTangent?new Z(r.sourceTangent):null,targetTangent:r.targetTangent?new Z(r.targetTangent):null};"string"==typeof r.sourceDirection?u.sourceDirection=r.sourceDirection:"number"==typeof r.sourceDirection?u.sourceDirection=new Z(1,0).rotate(null,r.sourceDirection):u.sourceDirection=r.sourceDirection?new Z(r.sourceDirection).normalize():null,"string"==typeof r.targetDirection?u.targetDirection=r.targetDirection:"number"==typeof r.targetDirection?u.targetDirection=new Z(1,0).rotate(null,r.targetDirection):u.targetDirection=r.targetDirection?new Z(r.targetDirection).normalize():null;const l=[e,...n.map((e=>new Z(e))),t];let c,f;if(u.sourceTangent)c=u.sourceTangent;else{const e=function(e,t,n,r){if(r.sourceDirection)switch(r.sourceDirection){case Di.UP:return new Z(0,-1);case Di.DOWN:return new Z(0,1);case Di.LEFT:return new Z(-1,0);case Di.RIGHT:return new Z(1,0);case Di.AUTO:return Ii(e,t);case Di.CLOSEST_POINT:return zi(0,t);case Di.OUTWARDS:return Bi(e,t);default:return r.sourceDirection}switch(n){case Ri.HORIZONTAL:return function(e,t){const{sourceBBox:n}=e;let r;return r=n.width&&n.height?n.sideNearestToPoint(t[0]):n.x>t[1].x?"right":"left",new Z("left"===r?-1:1,0)}(e,t);case Ri.VERTICAL:return function(e,t){const{sourceBBox:n}=e;let r;return r=n.width&&n.height?n.sideNearestToPoint(t[0]):n.y>t[1].y?"bottom":"top",new Z(0,"top"===r?-1:1)}(e,t);case Ri.CLOSEST_POINT:return zi(0,t);case Ri.OUTWARDS:return Bi(e,t);case Ri.AUTO:default:return Ii(e,t)}}(i,l,a,u),t=l[0].distance(l[1])*u.coeff,n=Hi(e,l[1].difference(l[0]).normalize());if(n>Math.PI/4){const r=t+(n-Math.PI/4)*u.angleTangentCoefficient;c=e.clone().scale(r,r)}else c=e.clone().scale(t,t)}if(u.targetTangent)f=u.targetTangent;else{const e=function(e,t,n,r){if(r.targetDirection)switch(r.targetDirection){case Di.UP:return new Z(0,-1);case Di.DOWN:return new Z(0,1);case Di.LEFT:return new Z(-1,0);case Di.RIGHT:return new Z(0,1);case Di.AUTO:return Fi(e,t);case Di.CLOSEST_POINT:return Vi(0,t);case Di.OUTWARDS:return $i(e,t);default:return r.targetDirection}switch(n){case Ri.HORIZONTAL:return function(e,t){const{targetBBox:n}=e;let r;return r=n.width&&n.height?n.sideNearestToPoint(t[t.length-1]):n.x>t[t.length-2].x?"left":"right",new Z("left"===r?-1:1,0)}(e,t);case Ri.VERTICAL:return function(e,t){const{targetBBox:n}=e;let r;return r=n.width&&n.height?n.sideNearestToPoint(t[t.length-1]):n.y>t[t.length-2].y?"top":"bottom",new Z(0,"top"===r?-1:1)}(e,t);case Ri.CLOSEST_POINT:return Vi(0,t);case Ri.OUTWARDS:return $i(e,t);case Ri.AUTO:default:return Fi(e,t)}}(i,l,a,u),t=l.length-1,n=l[t-1].distance(l[t])*u.coeff,r=Hi(e,l[t-1].difference(l[t]).normalize());if(r>Math.PI/4){const t=n+(r-Math.PI/4)*u.angleTangentCoefficient;f=e.clone().scale(t,t)}else f=e.clone().scale(n,n)}const h=function(e,t,n,r){const{tau:i,coeff:o}=r,a=[],s=[],u=[],l=e.length-1;for(let t=0;t<l;t++)a[t]=e[t].distance(e[t+1]);s[0]=t,s[l]=n;for(let t=1;t<l;t++){let n,r;n=1===t?e[t-1].clone().offset(s[t-1].x,s[t-1].y):e[t-1].clone(),r=t===l-1?e[t+1].clone().offset(s[t+1].x,s[t+1].y):e[t+1].clone();const i=n.difference(e[t]).normalize(),u=r.difference(e[t]).normalize(),c=Hi(i,u);let f,h=(Math.PI-c)/2;const d=qi(i,u);let p;p=qi(e[t].difference(e[t+1]),e[t].difference(e[t-1])),d<0&&(h=-h),c<Math.PI/2&&(h<0&&p<0||h>0&&p>0)&&(h-=Math.PI),f=u.clone(),Ui(f,h);const g=f.clone(),v=f.clone(),m=a[t-1]*o,y=a[t]*o;g.scale(m,m),v.scale(y,y),s[t]=[g,v]}for(let t=0;t<l;t++){let n,r;n=0===t?e[t+1].difference(s[t].x/i,s[t].y/i):e[t+1].difference(s[t][1].x/i,s[t][1].y/i),r=t===l-1?e[t].clone().offset(s[t+1].x/i,s[t+1].y/i):e[t].difference(s[t+1][0].x/i,s[t+1][0].y/i),u[t]=[n,e[t],e[t+1],r]}return u}(l,c,f,u),d=h.map((e=>function(e,t){const{tau:n}=t,r=new Z;r.x=e[1].x+(e[2].x-e[0].x)/(6*n),r.y=e[1].y+(e[2].y-e[0].y)/(6*n);const i=new Z;return i.x=e[2].x+(e[3].x-e[1].x)/(6*n),i.y=e[2].y+(e[3].y-e[1].y)/(6*n),new Pe(e[1],r,i,e[2])}(e,u))),p=new Te(d).round(s);return o?p:p.serialize()};function Ii(e,t,n){const{sourceBBox:r}=e;let i;switch(i=r.width&&r.height?r.sideNearestToPoint(t[0]):r.sideNearestToPoint(t[1]),i){case"top":return new Z(0,-1);case"bottom":return new Z(0,1);case"right":return new Z(1,0);case"left":return new Z(-1,0)}}function Fi(e,t,n){const{targetBBox:r}=e;let i;switch(i=r.width&&r.height?r.sideNearestToPoint(t[t.length-1]):r.sideNearestToPoint(t[t.length-2]),i){case"top":return new Z(0,-1);case"bottom":return new Z(0,1);case"right":return new Z(1,0);case"left":return new Z(-1,0)}}function zi(e,t,n){return t[1].difference(t[0]).normalize()}function Vi(e,t,n){const r=t.length-1;return t[r-1].difference(t[r]).normalize()}function Bi(e,t,n){const{sourceBBox:r}=e,i=r.center();return t[0].difference(i).normalize()}function $i(e,t,n){const{targetBBox:r}=e,i=r.center();return t[t.length-1].difference(i).normalize()}function Ui(e,t){const n=Math.cos(t),r=Math.sin(t),i=n*e.x-r*e.y,o=r*e.x+n*e.y;e.x=i,e.y=o}function Hi(e,t){let n=e.dot(t)/(e.magnitude()*t.magnitude());return n<-1&&(n=-1),n>1&&(n=1),Math.acos(n)}function qi(e,t){return e.x*t.y-e.y*t.x}ji.Directions=Ri,ji.TangentDirections=Di;const Wi={RENDER:"RENDER",UPDATE:"UPDATE",TOOLS:"TOOLS",LEGACY_TOOLS:"LEGACY_TOOLS",LABELS:"LABELS",VERTICES:"VERTICES",SOURCE:"SOURCE",TARGET:"TARGET",CONNECTOR:"CONNECTOR"},Gi=Ir.extend({className:function(){var e=Ir.prototype.className.apply(this).split(" ");return e.push("link"),e.join(" ")},options:{shortLinkLength:105,doubleLinkTools:!1,longLinkLength:155,linkToolsOffset:40,doubleLinkToolsOffset:65,sampleInterval:50},_labelCache:null,_labelSelectors:null,_markerCache:null,_V:null,_dragData:null,metrics:null,decimalsRounding:2,initialize:function(){Ir.prototype.initialize.apply(this,arguments),this._labelCache={},this._labelSelectors={},this._markerCache={},this._V={},this.cleanNodesCache()},presentationAttributes:{markup:[Wi.RENDER],attrs:[Wi.UPDATE],router:[Wi.UPDATE],connector:[Wi.CONNECTOR],smooth:[Wi.UPDATE],manhattan:[Wi.UPDATE],toolMarkup:[Wi.LEGACY_TOOLS],labels:[Wi.LABELS],labelMarkup:[Wi.LABELS],vertices:[Wi.VERTICES,Wi.UPDATE],vertexMarkup:[Wi.VERTICES],source:[Wi.SOURCE,Wi.UPDATE],target:[Wi.TARGET,Wi.UPDATE]},initFlag:[Wi.RENDER,Wi.SOURCE,Wi.TARGET,Wi.TOOLS],UPDATE_PRIORITY:1,confirmUpdate:function(e,t){if(t||(t={}),this.hasFlag(e,Wi.SOURCE)){if(!this.updateEndProperties("source"))return e;e=this.removeFlag(e,Wi.SOURCE)}if(this.hasFlag(e,Wi.TARGET)){if(!this.updateEndProperties("target"))return e;e=this.removeFlag(e,Wi.TARGET)}const{paper:n,sourceView:r,targetView:i}=this;if(n&&(r&&!n.isViewMounted(r)||i&&!n.isViewMounted(i)))return e;if(this.hasFlag(e,Wi.RENDER))return this.render(),this.updateHighlighters(!0),this.updateTools(t),this.removeFlag(e,[Wi.RENDER,Wi.UPDATE,Wi.VERTICES,Wi.LABELS,Wi.TOOLS,Wi.LEGACY_TOOLS,Wi.CONNECTOR]);let o=!1;this.hasFlag(e,Wi.VERTICES)&&(this.renderVertexMarkers(),e=this.removeFlag(e,Wi.VERTICES));const{model:a}=this,{attributes:s}=a;let u=this.hasFlag(e,Wi.LABELS),l=this.hasFlag(e,Wi.LEGACY_TOOLS);u&&(this.onLabelsChange(a,s.labels,t),e=this.removeFlag(e,Wi.LABELS),o=!0),l&&(this.renderTools(),e=this.removeFlag(e,Wi.LEGACY_TOOLS));const c=this.hasFlag(e,Wi.UPDATE),f=this.hasFlag(e,Wi.CONNECTOR);return(c||f)&&(c?t.translateBy&&a.isRelationshipEmbeddedIn(t.translateBy)?this.translate(t.tx,t.ty):this.update():(this.updatePath(),this.updateDOM()),this.updateTools(t),e=this.removeFlag(e,[Wi.UPDATE,Wi.TOOLS,Wi.CONNECTOR]),u=!1,l=!1,o=!0),u&&this.updateLabelPositions(),l&&this.updateToolsPosition(),o&&this.updateHighlighters(),this.hasFlag(e,Wi.TOOLS)&&(this.updateTools(t),e=this.removeFlag(e,Wi.TOOLS)),e},requestConnectionUpdate:function(e){this.requestUpdate(this.getFlag(Wi.UPDATE),e)},isLabelsRenderRequired:function(e={}){const t=this.model.previous("labels");if(!t)return!0;if("propertyPathArray"in e&&"propertyValue"in e){var n=e.propertyPathArray||[],r=n.length;if(r>1&&t[n[1]]){if(2===r)return"markup"in Object(e.propertyValue);if("markup"!==n[2])return!1}}return!0},onLabelsChange:function(e,t,n){this.isLabelsRenderRequired(n)?this.renderLabels():this.updateLabels()},render:function(){return this.vel.empty(),this.unmountLabels(),this._V={},this.renderMarkup(),this.renderLabels(),this.update(),this},renderMarkup:function(){var e=this.model,t=e.get("markup")||e.markup;if(!t)throw new Error("dia.LinkView: markup required");if(Array.isArray(t))return this.renderJSONMarkup(t);if("string"==typeof t)return this.renderStringMarkup(t);throw new Error("dia.LinkView: invalid markup")},renderJSONMarkup:function(e){var t=this.parseDOMJSON(e,this.el);this.selectors=t.selectors,this.vel.append(t.fragment)},renderStringMarkup:function(e){var t=kt(e);Array.isArray(t)||(t=[t]);for(var n=this._V,r=0,i=t.length;r<i;r++){var o=t[r],a=o.attr("class");a&&(a=Et(a),n[C.camelCase(a)]=o)}this.renderTools(),this.renderVertexMarkers(),this.renderArrowheadMarkers(),this.vel.append(t)},_getLabelMarkup:function(e){if(e){if(Array.isArray(e))return this.parseDOMJSON(e,null);if("string"==typeof e)return this._getLabelStringMarkup(e);throw new Error("dia.linkView: invalid label markup")}},_getLabelStringMarkup:function(e){var t=kt(e),n=document.createDocumentFragment();if(Array.isArray(t))for(var r=0,i=t.length;r<i;r++){var o=t[r].node;n.appendChild(o)}else n.appendChild(t.node);return{fragment:n,selectors:{}}},_normalizeLabelMarkup:function(e){if(e){var t,n=e.fragment;if(!(e.fragment instanceof DocumentFragment&&e.fragment.hasChildNodes()))throw new Error("dia.LinkView: invalid label markup.");var r=n.childNodes;return(t=r.length>1||"G"!==r[0].nodeName.toUpperCase()?kt("g").append(n):kt(r[0])).addClass("label"),{node:t.node,selectors:e.selectors}}},renderLabels:function(){var e=this._V,t=e.labels,n=this._labelCache={},r=this._labelSelectors={},i=this.model,o=i.attributes.labels||[],a=o.length;if(0===a)return t&&t.remove(),this;t?t.empty():(t=e.labels=kt("g").addClass("labels"),this.options.labelsLayer&&(t.addClass(_t(cn(this,"className"))),t.attr("model-id",i.id)));for(var s=0;s<a;s++){var u,l,c=o[s],f=this._normalizeLabelMarkup(this._getLabelMarkup(c.markup));if(f)u=f.node,l=f.selectors;else{var h=i._builtins.defaultLabel,d=this._normalizeLabelMarkup(this._getLabelMarkup(h.markup)),p=i._getDefaultLabel(),g=this._normalizeLabelMarkup(this._getLabelMarkup(p.markup))||d;u=g.node,l=g.selectors}u.setAttribute("label-idx",s),t.append(u),n[s]=u;var v=this.selector;if(l[v])throw new Error("dia.LinkView: ambiguous label root selector.");l[v]=u,r[s]=l}return t.parent()||this.mountLabels(),this.updateLabels(),this},mountLabels:function(){const{el:e,paper:t,model:n,_V:r,options:i}=this,{labels:o}=r;if(!o||!n.hasLabels())return;const{node:a}=o;i.labelsLayer?t.getLayerView(i.labelsLayer).insertSortedNode(a,n.get("z")):a.parentNode!==e&&e.appendChild(a)},unmountLabels:function(){const{options:e,_V:t}=this;if(!t)return;const{labels:n}=t;n&&e.labelsLayer&&n.remove()},onMount:function(){this.mountLabels()},unmount:function(){Ir.prototype.unmount.apply(this,arguments),this.unmountLabels()},findLabelNode:function(e,t){const n=this._labelCache[e];if(!n)return null;const r=this._labelSelectors[e],[i=null]=this.findBySelector(t,n,r);return i},_mergeLabelAttrs:function(e,t,n,r){if(null===t)return null;if(void 0===t){if(null===n)return null;if(void 0===n){if(e)return;return r}return e?n:vn({},r,n)}return e?vn({},n,t):vn({},r,n,t)},updateLabels:function(){if(!this._V.labels)return this;for(var e=this.model,t=e.get("labels")||[],n=this.can("labelMove"),r=e._builtins.defaultLabel.attrs,i=e._getDefaultLabel(),o=i.markup,a=i.attrs,s=0,u=t.length;s<u;s++){var l=this._labelCache[s];l.setAttribute("cursor",n?"move":"default");var c=this._labelSelectors[s],f=t[s],h=f.markup,d=f.attrs,p=this._mergeLabelAttrs(h||o,d,a,r);this.updateDOMSubtreeAttributes(l,p,{rootBBox:new me(f.size),selectors:c})}return this},renderTools:function(){if(!this._V.linkTools)return this;var e,t=C(this._V.linkTools.node).empty(),n=Ut(this.model.get("toolMarkup")||this.model.toolMarkup),r=kt(n());return t.append(r.node),this._toolCache=r,this.options.doubleLinkTools&&(this.model.get("doubleToolMarkup")||this.model.doubleToolMarkup?(n=Ut(this.model.get("doubleToolMarkup")||this.model.doubleToolMarkup),e=kt(n())):e=r.clone(),t.append(e.node),this._tool2Cache=e),this},renderVertexMarkers:function(){if(!this._V.markerVertices)return this;var e=C(this._V.markerVertices.node).empty(),t=Ut(this.model.get("vertexMarkup")||this.model.vertexMarkup);return this.model.vertices().forEach((function(n,r){e.append(kt(t(Ht({idx:r},n))).node)})),this},renderArrowheadMarkers:function(){if(!this._V.markerArrowheads)return this;var e=C(this._V.markerArrowheads.node);e.empty();var t=Ut(this.model.get("arrowheadMarkup")||this.model.arrowheadMarkup);return this._V.sourceArrowhead=kt(t({end:"source"})),this._V.targetArrowhead=kt(t({end:"target"})),e.append(this._V.sourceArrowhead.node,this._V.targetArrowhead.node),this},removeRedundantLinearVertices:function(e){const t=this.model,n=t.vertices(),r=[this.sourceAnchor,...n,this.targetAnchor],i=r.length,o=new ke(r);o.simplify({threshold:.001});const a=o.points.map((e=>e.toJSON())),s=a.length;return i===s?0:(t.vertices(a.slice(1,s-1),e),i-s)},updateDefaultConnectionPath:function(){var e=this._V;e.connection&&e.connection.attr("d",this.getSerializedConnection()),e.connectionWrap&&e.connectionWrap.attr("d",this.getSerializedConnection()),e.markerSource&&e.markerTarget&&this._translateAndAutoOrientArrows(e.markerSource,e.markerTarget)},getEndView:function(e){switch(e){case"source":return this.sourceView||null;case"target":return this.targetView||null;default:throw new Error("dia.LinkView: type parameter required.")}},getEndAnchor:function(e){switch(e){case"source":return new Z(this.sourceAnchor);case"target":return new Z(this.targetAnchor);default:throw new Error("dia.LinkView: type parameter required.")}},getEndConnectionPoint:function(e){switch(e){case"source":return new Z(this.sourcePoint);case"target":return new Z(this.targetPoint);default:throw new Error("dia.LinkView: type parameter required.")}},getEndMagnet:function(e){switch(e){case"source":var t=this.sourceView;if(!t)break;return this.sourceMagnet||t.el;case"target":var n=this.targetView;if(!n)break;return this.targetMagnet||n.el;default:throw new Error("dia.LinkView: type parameter required.")}return null},update:function(){return this.updateRoute(),this.updatePath(),this.updateDOM(),this},translate:function(e=0,t=0){const{route:n,path:r}=this;if(!n||!r)return;const i=new ke(n);i.translate(e,t),this.route=i.points,this._translateConnectionPoints(e,t),r.translate(e,t),this.updateDOM()},updateDOM(){const{el:e,model:t,selectors:n}=this;this.cleanNodesCache(),this.updateDOMSubtreeAttributes(e,t.attr(),{selectors:n}),this.updateDefaultConnectionPath(),this.updateLabelPositions(),this.updateToolsPosition(),this.updateArrowheadMarkers(),this.options.perpendicular=null},updateRoute:function(){const{model:e}=this,t=e.vertices(),n=this.findAnchors(t),r=this.sourceAnchor=n.source,i=this.targetAnchor=n.target,o=this.findRoute(t);this.route=o;var a=this.findConnectionPoints(o,r,i);this.sourcePoint=a.source,this.targetPoint=a.target},updatePath:function(){const{route:e,sourcePoint:t,targetPoint:n}=this,r=this.findMarkerPoints(e,t,n),i=this.findPath(e,r.source||t,r.target||n);this.path=i},findMarkerPoints:function(e,t,n){var r,i,o=e[0],a=e[e.length-1],s=this._markerCache;return this._V.markerSource&&(s.sourceBBox=s.sourceBBox||this._V.markerSource.getBBox(),r=Z(t).move(o||n,s.sourceBBox.width*this._V.markerSource.scale().sx*-1).round()),this._V.markerTarget&&(s.targetBBox=s.targetBBox||this._V.markerTarget.getBBox(),i=Z(n).move(a||t,s.targetBBox.width*this._V.markerTarget.scale().sx*-1).round()),s.sourcePoint=r||t.clone(),s.targetPoint=i||n.clone(),{source:r,target:i}},findAnchorsOrdered:function(e,t,n,r){var i,o,a,s,u=this.model,l=u.get(e),c=u.get(n),f=this.getEndView(e),h=this.getEndView(n),d=this.getEndMagnet(e),p=this.getEndMagnet(n);f?(a=t?new Z(t):h?p:new Z(c),i=this.getAnchor(l.anchor,f,d,a,e)):i=new Z(l),h?(s=new Z(r||i),o=this.getAnchor(c.anchor,h,p,s,n)):o=new Z(c);var g={};return g[e]=i,g[n]=o,g},findAnchors:function(e){var t=this.model,n=e[0],r=e[e.length-1];return t.target().priority&&!t.source().priority?this.findAnchorsOrdered("target",r,"source",n):this.findAnchorsOrdered("source",n,"target",r)},findConnectionPoints:function(e,t,n){var r,i,o,a,s=e[0],u=e[e.length-1],l=this.model,c=l.get("source"),f=l.get("target"),h=this.sourceView,d=this.targetView,p=this.paper.options;if(h&&!h.isNodeConnection(this.sourceMagnet)){r=this.sourceMagnet||h.el;var g=c.connectionPoint||p.defaultConnectionPoint,v=new re(s||n,t);o=this.getConnectionPoint(g,h,r,v,"source")}else o=t;if(d&&!d.isNodeConnection(this.targetMagnet)){i=this.targetMagnet||d.el;var m=f.connectionPoint||p.defaultConnectionPoint,y=new re(u||t,n);a=this.getConnectionPoint(m,d,i,y,"target")}else a=n;return{source:o,target:a}},getAnchor:function(e,t,n,r,i){var o,a=t.isNodeConnection(n),s=this.paper.options;if(e||(e=a?s.defaultLinkAnchor:s.perpendicularLinks||this.options.perpendicular?{name:"perpendicular"}:s.defaultAnchor),!e)throw new Error("Anchor required.");if("function"==typeof e)o=e;else{var u=e.name;if("function"!=typeof(o=s[a?"linkAnchorNamespace":"anchorNamespace"][u]))throw new Error("Unknown anchor: "+u)}var l=o.call(this,t,n,r,e.args||{},i,this);return l?l.round(this.decimalsRounding):new Z},getConnectionPoint:function(e,t,n,r,i){var o,a,s=r.end,u=this.paper.options;if("function"==typeof u.linkConnectionPoint){var l=n===t.el?void 0:n;if(o=u.linkConnectionPoint(this,t,l,r.start,i))return o}if(!e)return s;if("function"==typeof e)a=e;else{var c=e.name;if("function"!=typeof(a=u.connectionPointNamespace[c]))throw new Error("Unknown connection point: "+c)}return(o=a.call(this,r,t,n,e.args||{},i,this))?o.round(this.decimalsRounding):s},_translateConnectionPoints:function(e,t){var n=this._markerCache;n.sourcePoint.offset(e,t),n.targetPoint.offset(e,t),this.sourcePoint.offset(e,t),this.targetPoint.offset(e,t),this.sourceAnchor.offset(e,t),this.targetAnchor.offset(e,t)},_normalizeLabelPosition:function(e){return"number"==typeof e?{distance:e,offset:null,angle:0,args:null}:e},updateLabelPositions:function(){if(!this._V.labels)return this;if(!this.path)return this;var e=this.model,t=e.get("labels")||[];if(!t.length)return this;for(var n=e._builtins.defaultLabel.position,r=e._getDefaultLabel(),i=this._normalizeLabelPosition(r.position),o=vn({},n,i),a=0,s=t.length;a<s;a++){var u=this._labelCache[a];if(u){var l=t[a],c=this._normalizeLabelPosition(l.position),f=vn({},o,c),h=this._getLabelTransformationMatrix(f);u.setAttribute("transform",kt.matrixToTransformString(h)),this._cleanLabelMatrices(a)}}return this},_cleanLabelMatrices:function(e){const{metrics:t,_labelSelectors:n}=this,r=n[e];if(r)for(let e in r){const{id:n}=r[e];n&&n in t&&delete t[n].magnetMatrix}},updateToolsPosition:function(){if(!this._V.linkTools)return this;var e="",t=this.options.linkToolsOffset,n=this.getConnectionLength();if(!Number.isNaN(n)){n<this.options.shortLinkLength&&(e="scale(.5)",t/=2);var r=this.getPointAtLength(t);if(this._toolCache.attr("transform","translate("+r.x+", "+r.y+") "+e),this.options.doubleLinkTools&&n>=this.options.longLinkLength){var i=this.options.doubleLinkToolsOffset||t;r=this.getPointAtLength(n-i),this._tool2Cache.attr("transform","translate("+r.x+", "+r.y+") "+e),this._tool2Cache.attr("visibility","visible")}else this.options.doubleLinkTools&&this._tool2Cache.attr("visibility","hidden")}return this},updateArrowheadMarkers:function(){if(!this._V.markerArrowheads)return this;if("none"===C.css(this._V.markerArrowheads.node,"display"))return this;var e=this.getConnectionLength()<this.options.shortLinkLength?.5:1;return this._V.sourceArrowhead.scale(e),this._V.targetArrowhead.scale(e),this._translateAndAutoOrientArrows(this._V.sourceArrowhead,this._V.targetArrowhead),this},updateEndProperties:function(e){const{model:t,paper:n}=this,r=`${e}View`,i=t.get(e),o=i&&i.id;if(!o)return this[r]=null,this.updateEndMagnet(e),!0;const a=n.getModelById(o);if(!a)throw new Error("LinkView: invalid "+e+" cell.");const s=a.findView(n);return!!s&&(this[r]=s,this.updateEndMagnet(e),!0)},updateEndMagnet:function(e){const t=`${e}Magnet`,n=this.getEndView(e);if(n){let r=n.getMagnetFromLinkEnd(this.model.get(e));r===n.el&&(r=null),this[t]=r}else this[t]=null},_translateAndAutoOrientArrows:function(e,t){var n=nn(this.route);e&&e.translateAndAutoOrient(this.sourcePoint,n[0]||this.targetPoint,this.paper.cells),t&&t.translateAndAutoOrient(this.targetPoint,n[n.length-1]||this.sourcePoint,this.paper.cells)},_getLabelPositionAngle:function(e){return(this.model.label(e).position||{}).angle||0},_getLabelPositionArgs:function(e){return(this.model.label(e).position||{}).args},_getDefaultLabelPositionArgs:function(){return(this.model._getDefaultLabel().position||{}).args},_mergeLabelPositionArgs:function(e,t){return null===e?null:void 0===e?null===t?null:t:vn({},t,e)},addLabel:function(e,t,n,r){var i,o,a,s=0;"number"!=typeof e?(i=e.x,o=e.y,"number"==typeof t?(s=t,a=n):a=t):(i=e,o=t,"number"==typeof n?(s=n,a=r):a=n);var u=this._getDefaultLabelPositionArgs(),l=a,c=this._mergeLabelPositionArgs(l,u),f={position:this.getLabelPosition(i,o,s,c)};return this.model.insertLabel(-1,f,a),-1},addVertex:function(e,t,n){var r="number"!=typeof e,i=r?e.x:e,o=r?e.y:t,a=r?t:n,s={x:i,y:o},u=this.getVertexIndex(i,o);return this.model.insertVertex(u,s,a),u},sendToken:function(e,t,n){var r,i,o;mn(t)?(r=t.duration,i="reverse"===t.direction,o=t.connection):(r=t,i=!1,o=null);var a={dur:(r=r||1e3)+"ms",repeatCount:1,calcMode:"linear",fill:"freeze"};i&&(a.keyPoints="1;0",a.keyTimes="0;1");var s,u=kt(e);if("string"==typeof o)s=this.findBySelector(o,this.el,this.selectors)[0];else{var l=this._V;s=l.connection?l.connection.node:this.el.querySelector("path")}if(!(s instanceof SVGPathElement))throw new Error("dia.LinkView: token animation requires a valid connection path.");u.appendTo(this.paper.cells).animateAlongPath(a,s),setTimeout(function(e,t){return function(){e.remove(),"function"==typeof t&&t()}}(u,n),r)},findRoute:function(e){e||(e=[]);var t=this.paper.options.routerNamespace||a,n=this.model.router(),r=this.paper.options.defaultRouter;if(!n){if(!r)return e.map(Z);n=r}var i=en(n)?n:t[n.name];if(!en(i))throw new Error('dia.LinkView: unknown router: "'+n.name+'".');var o=n.args||{};return i.call(this,e,o,this)||e.map(Z)},findPath:function(e,t,n){var r=this.paper.options.connectorNamespace||s,i=this.model.connector(),o=this.paper.options.defaultConnector;i||(i=o||{});var a=en(i)?i:r[i.name];if(!en(a))throw new Error('dia.LinkView: unknown connector: "'+i.name+'".');var u=Kt(i.args||{});u.raw=!0;var l=a.call(this,t,n,e,u,this);return"string"==typeof l&&(l=new Te(kt.normalizePathData(l))),l},getConnection:function(){var e=this.path;return e?e.clone():null},getSerializedConnection:function(){var e=this.path;if(!e)return null;var t=this.metrics;if(t.hasOwnProperty("data"))return t.data;var n=e.serialize();return t.data=n,n},getConnectionSubdivisions:function(){var e=this.path;if(!e)return null;var t=this.metrics;if(t.hasOwnProperty("segmentSubdivisions"))return t.segmentSubdivisions;var n=e.getSegmentSubdivisions();return t.segmentSubdivisions=n,n},getConnectionLength:function(){var e=this.path;if(!e)return 0;var t=this.metrics;if(t.hasOwnProperty("length"))return t.length;var n=e.length({segmentSubdivisions:this.getConnectionSubdivisions()});return t.length=n,n},getPointAtLength:function(e){var t=this.path;return t?t.pointAtLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getPointAtRatio:function(e){var t=this.path;return t?(jt(e)&&(e=parseFloat(e)/100),t.pointAt(e,{segmentSubdivisions:this.getConnectionSubdivisions()})):null},getTangentAtLength:function(e){var t=this.path;return t?t.tangentAtLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getTangentAtRatio:function(e){var t=this.path;return t?t.tangentAt(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPoint:function(e){var t=this.path;return t?t.closestPoint(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPointLength:function(e){var t=this.path;return t?t.closestPointLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPointRatio:function(e){var t=this.path;return t?t.closestPointNormalizedLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getLabelPosition:function(e,t,n,r){var i,o={},a=0;"number"==typeof n?(a=n,i=r):i=n,i&&(o.args=i);var s,u,l=!(i&&i.absoluteDistance),c=i&&i.absoluteDistance&&i.reverseDistance,f=i&&i.absoluteOffset,h=this.path,d={segmentSubdivisions:this.getConnectionSubdivisions()},p=new Z(e,t),g=h.closestPointT(p,d),v=h.lengthAtT(g,d);if(l&&(v=v/this.getConnectionLength()||0),c&&(v=-1*(this.getConnectionLength()-v)||1),o.distance=v,f||(s=h.tangentAtT(g)),s)u=s.pointOffset(p);else{var m=h.pointAtT(g),y=p.difference(m);u={x:y.x,y:y.y}}return o.offset=u,o.angle=a,o},_getLabelTransformationMatrix:function(e){var t,n=0,r={};if("number"==typeof e)t=e;else{if("number"!=typeof e.distance)throw new Error("dia.LinkView: invalid label position distance.");r=e.args||{},t=e.distance,n=e.angle||0}var i=t>0&&t<=1,o=0,a={x:0,y:0};if(e.offset){var s=e.offset;"number"==typeof s&&(o=s),s.x&&(a.x=s.x),s.y&&(a.y=s.y)}var u,l=0!==a.x||0!==a.y||0===o,c=r.keepGradient,f=r.ensureLegibility,h=this.path,d={segmentSubdivisions:this.getConnectionSubdivisions()},p=i?t*this.getConnectionLength():t,g=h.tangentAtLength(p,d),v=n;if(g){if(l)(u=g.start).offset(a);else{var m=g.clone();m.rotate(g.start,-90),m.setLength(o),u=m.end}c&&(v=g.angle()+n,f&&(v=N((v+90)%180-90)))}else u=h.start,l&&u.offset(a);return kt.createSVGMatrix().translate(u.x,u.y).rotate(v)},getLabelCoordinates:function(e){var t=this._getLabelTransformationMatrix(e);return new Z(t.e,t.f)},getVertexIndex:function(e,t){for(var n=this.model.vertices(),r=this.getClosestPointLength(new Z(e,t)),i=0,o=n.length;i<o;i++){var a=n[i];if(r<this.getClosestPointLength(a))break}return i},notifyPointerdown(e,t,n){Ir.prototype.pointerdown.call(this,e,t,n),this.notify("link:pointerdown",e,t,n)},notifyPointermove(e,t,n){Ir.prototype.pointermove.call(this,e,t,n),this.notify("link:pointermove",e,t,n)},notifyPointerup(e,t,n){this.notify("link:pointerup",e,t,n),Ir.prototype.pointerup.call(this,e,t,n)},pointerdblclick:function(e,t,n){Ir.prototype.pointerdblclick.apply(this,arguments),this.notify("link:pointerdblclick",e,t,n)},pointerclick:function(e,t,n){Ir.prototype.pointerclick.apply(this,arguments),this.notify("link:pointerclick",e,t,n)},contextmenu:function(e,t,n){Ir.prototype.contextmenu.apply(this,arguments),this.notify("link:contextmenu",e,t,n)},pointerdown:function(e,t,n){switch(this.notifyPointerdown(e,t,n),e.target.getAttribute("class")){case"marker-vertex":return void this.dragVertexStart(e,t,n);case"marker-vertex-remove":case"marker-vertex-remove-area":return void this.dragVertexRemoveStart(e,t,n);case"marker-arrowhead":return void this.dragArrowheadStart(e,t,n);case"connection":case"connection-wrap":return void this.dragConnectionStart(e,t,n);case"marker-source":case"marker-target":return}this.dragStart(e,t,n)},pointermove:function(e,t,n){var r=this._dragData;switch(r&&this.eventData(e,r),this.eventData(e).action){case"vertex-move":this.dragVertex(e,t,n);break;case"label-move":this.dragLabel(e,t,n);break;case"arrowhead-move":this.dragArrowhead(e,t,n);break;case"move":this.drag(e,t,n)}r&&Ht(r,this.eventData(e)),this.notifyPointermove(e,t,n)},pointerup:function(e,t,n){var r=this._dragData;switch(r&&(this.eventData(e,r),this._dragData=null),this.eventData(e).action){case"vertex-move":this.dragVertexEnd(e,t,n);break;case"label-move":this.dragLabelEnd(e,t,n);break;case"arrowhead-move":this.dragArrowheadEnd(e,t,n);break;case"move":this.dragEnd(e,t,n)}this.notifyPointerup(e,t,n),this.checkMouseleave(e)},mouseover:function(e){Ir.prototype.mouseover.apply(this,arguments),this.notify("link:mouseover",e)},mouseout:function(e){Ir.prototype.mouseout.apply(this,arguments),this.notify("link:mouseout",e)},mouseenter:function(e){Ir.prototype.mouseenter.apply(this,arguments),this.notify("link:mouseenter",e)},mouseleave:function(e){Ir.prototype.mouseleave.apply(this,arguments),this.notify("link:mouseleave",e)},mousewheel:function(e,t,n,r){Ir.prototype.mousewheel.apply(this,arguments),this.notify("link:mousewheel",e,t,n,r)},onevent:function(e,t,n,r){if(kt(e.target).findParentByClass("link-tool",this.el)){if(e.stopPropagation(),this.can("useLinkTools")){if("remove"===t)return void this.model.remove({ui:!0});this.notify(t,e,n,r)}this.notifyPointerdown(e,n,r),this.paper.delegateDragEvents(this,e.data)}else Ir.prototype.onevent.apply(this,arguments)},onlabel:function(e,t,n){this.notifyPointerdown(e,t,n),this.dragLabelStart(e,t,n),this.eventData(e).stopPropagation&&e.stopPropagation()},dragConnectionStart:function(e,t,n){if(this.can("vertexAdd")){var r=this.addVertex({x:t,y:n},{ui:!0});this.eventData(e,{action:"vertex-move",vertexIdx:r})}},dragLabelStart:function(e,t,n){if(this.can("labelMove")){var r=e.currentTarget,i=parseInt(r.getAttribute("label-idx"),10),o=this._getLabelPositionAngle(i),a=this._getLabelPositionArgs(i),s=this._getDefaultLabelPositionArgs(),u=this._mergeLabelPositionArgs(a,s);this.eventData(e,{action:"label-move",labelIdx:i,positionAngle:o,positionArgs:u,stopPropagation:!0})}else this.eventData(e,{stopPropagation:!0});this.paper.delegateDragEvents(this,e.data)},dragVertexStart:function(e,t,n){if(this.can("vertexMove")){var r=e.target,i=parseInt(r.getAttribute("idx"),10);this.eventData(e,{action:"vertex-move",vertexIdx:i})}},dragVertexRemoveStart:function(e,t,n){if(this.can("vertexRemove")){var r=e.target,i=parseInt(r.getAttribute("idx"),10);this.model.removeVertex(i)}},dragArrowheadStart:function(e,t,n){if(this.can("arrowheadMove")){var r=e.target.getAttribute("end"),i=this.startArrowheadMove(r,{ignoreBackwardsCompatibility:!0});this.eventData(e,i)}},dragStart:function(e,t,n){this.can("linkMove")&&this.eventData(e,{action:"move",dx:t,dy:n})},dragLabel:function(e,t,n){var r=this.eventData(e),i={position:this.getLabelPosition(t,n,r.positionAngle,r.positionArgs)};this.paper.options.snapLabels&&delete i.position.offset,this.model.label(r.labelIdx,i)},dragVertex:function(e,t,n){var r=this.eventData(e);this.model.vertex(r.vertexIdx,{x:t,y:n},{ui:!0})},dragArrowhead:function(e,t,n){this.paper.options.snapLinks?this._snapArrowhead(e,t,n):this._connectArrowhead(this.getEventTarget(e),t,n,this.eventData(e))},drag:function(e,t,n){var r=this.eventData(e);this.model.translate(t-r.dx,n-r.dy,{ui:!0}),this.eventData(e,{dx:t,dy:n})},dragLabelEnd:function(){},dragVertexEnd:function(){},dragArrowheadEnd:function(e,t,n){var r=this.eventData(e),i=this.paper;i.options.snapLinks?this._snapArrowheadEnd(r):this._connectArrowheadEnd(r,t,n),i.linkAllowed(this)?(this._finishEmbedding(r),this._notifyConnectEvent(r,e)):this._disallow(r),this._afterArrowheadMove(r)},dragEnd:function(){},_disallow:function(e){"remove"===e.whenNotAllowed?this.model.remove({ui:!0}):this.model.set(e.arrowhead,e.initialEnd,{ui:!0})},_finishEmbedding:function(e){this.paper.options.embeddingMode&&this.model.reparent()&&(e.z=null)},_notifyConnectEvent:function(e,t){var n=e.arrowhead,r=e.initialEnd,i=this.model.prop(n);if(i&&!Yn.endsEqual(r,i)){var o=this.paper;r.id&&this.notify("link:disconnect",t,o.findViewByModel(r.id),e.initialMagnet,n),i.id&&this.notify("link:connect",t,o.findViewByModel(i.id),e.magnetUnderPointer,n)}},_snapArrowhead:function(e,t,n){const{paper:r}=this,{snapLinks:i,connectionStrategy:o}=r.options,a=this.eventData(e);var s=i.radius||50,u=r.findViewsInArea({x:t-s,y:n-s,width:2*s,height:2*s}),l=a.closestView||null,c=a.closestMagnet||null,f=a.magnetProxy||null;a.closestView=a.closestMagnet=a.magnetProxy=null;var h,d=Number.MAX_VALUE,p=new Z(t,n);u.forEach((function(e){const t=[];"false"!==e.el.getAttribute("magnet")&&t.push({bbox:e.model.getBBox(),magnet:e.el}),e.$("[magnet]").toArray().forEach((n=>{t.push({bbox:e.getNodeBBox(n),magnet:n})})),t.forEach((t=>{const{magnet:n,bbox:i}=t,o=i.center().squaredDistance(p);o<d&&(c===n||r.options.validateConnection.apply(r,a.validateConnectionArgs(e,e.el===n?null:n)))&&(d=o,a.closestView=e,a.closestMagnet=n)}))}),this);var g=null,v=a.closestView,m=a.closestMagnet;m&&(g=a.magnetProxy=v.findProxyNode(m,"highlighter"));var y=a.arrowhead,b=c!==m;if(l&&b&&l.unhighlight(f,{connecting:!0,snapping:!0}),v){const{prevEnd:e,prevX:r,prevY:i}=a;if(a.prevX=t,a.prevY=n,!b&&("function"!=typeof o||r===t&&i===n))return;if(h=v.getLinkEnd(m,t,n,this.model,y),!b&&Zt(e,h))return;a.prevEnd=h,b&&v.highlight(g,{connecting:!0,snapping:!0})}else h={x:t,y:n};this.model.set(y,h||{x:t,y:n},{ui:!0}),l&&this.notify("link:snap:disconnect",e,l,c,y),v&&this.notify("link:snap:connect",e,v,m,y)},_snapArrowheadEnd:function(e){var t=e.closestView,n=e.closestMagnet;t&&n&&(t.unhighlight(e.magnetProxy,{connecting:!0,snapping:!0}),e.magnetUnderPointer=t.findMagnet(n)),e.closestView=e.closestMagnet=null},_connectArrowhead:function(e,t,n,r){const{paper:i,model:o}=this;if(r.eventTarget!==e){r.magnetProxy&&r.viewUnderPointer.unhighlight(r.magnetProxy,{connecting:!0});const t=r.viewUnderPointer=i.findView(e);if(t){const n=r.magnetUnderPointer=t.findMagnet(e),o=r.magnetProxy=t.findProxyNode(n,"highlighter");n&&this.paper.options.validateConnection.apply(i,r.validateConnectionArgs(t,n))?o&&t.highlight(o,{connecting:!0}):(r.magnetUnderPointer=null,r.magnetProxy=null)}else r.magnetUnderPointer=null,r.magnetProxy=null}r.eventTarget=e,o.set(r.arrowhead,{x:t,y:n},{ui:!0})},_connectArrowheadEnd:function(e={},t,n){const{model:r}=this,{viewUnderPointer:i,magnetUnderPointer:o,magnetProxy:a,arrowhead:s}=e;if(!o||!a||!i)return;i.unhighlight(a,{connecting:!0});const u=i.getLinkEnd(o,t,n,r,s);r.set(s,u,{ui:!0})},_beforeArrowheadMove:function(e){e.z=this.model.get("z"),this.model.toFront();var t=this.el.style;e.pointerEvents=t.pointerEvents,t.pointerEvents="none",this.paper.options.markAvailable&&this._markAvailableMagnets(e)},_afterArrowheadMove:function(e){null!==e.z&&(this.model.set("z",e.z,{ui:!0}),e.z=null),this.el.style.pointerEvents=e.pointerEvents,this.paper.options.markAvailable&&this._unmarkAvailableMagnets(e)},_createValidateConnectionArgs:function(e){var t,n=[];n[4]=e,n[5]=this;var r=0,i=0;"source"===e?(r=2,t="target"):(i=2,t="source");var o=this.model.get(t);if(o.id){var a=n[r]=this.paper.findViewByModel(o.id),s=a.getMagnetFromLinkEnd(o);s===a.el&&(s=void 0),n[r+1]=s}return function(e,t){return n[i]=e,n[i+1]=e.el===t?void 0:t,n}},_markAvailableMagnets:function(e){function t(e,t){var n=e.paper;return n.options.validateConnection.apply(n,this.validateConnectionArgs(e,t))}var n=this.paper,r=n.model.getCells();e.marked={};for(var i=0,o=r.length;i<o;i++){var a=r[i].findView(n);if(a){var s=Array.prototype.slice.call(a.el.querySelectorAll("[magnet]"));"false"!==a.el.getAttribute("magnet")&&s.push(a.el);var u=s.filter(t.bind(e,a));if(u.length>0){for(var l=0,c=u.length;l<c;l++)a.highlight(u[l],{magnetAvailability:!0});a.highlight(null,{elementAvailability:!0}),e.marked[a.model.id]=u}}}},_unmarkAvailableMagnets:function(e){for(var t,n,r=Object.keys(e.marked),i=0,o=r.length;i<o;i++){t=r[i],n=e.marked[t];var a=this.paper.findViewByModel(t);if(a){for(var s=0,u=n.length;s<u;s++)a.unhighlight(n[s],{magnetAvailability:!0});a.unhighlight(null,{elementAvailability:!0})}}e.marked=null},startArrowheadMove:function(e,t){t||(t={});var n={action:"arrowhead-move",arrowhead:e,whenNotAllowed:t.whenNotAllowed||"revert",initialMagnet:this[e+"Magnet"]||(this[e+"View"]?this[e+"View"].el:null),initialEnd:Kt(this.model.get(e)),validateConnectionArgs:this._createValidateConnectionArgs(e)};return this._beforeArrowheadMove(n),!0!==t.ignoreBackwardsCompatibility&&(this._dragData=n),n},onRemove:function(){Ir.prototype.onRemove.apply(this,arguments),this.unmountLabels()}},{Flags:Wi});Object.defineProperty(Gi.prototype,"sourceBBox",{enumerable:!0,get:function(){var e=this.sourceView;if(!e){var t=this.model.source();return new me(t.x,t.y)}var n=this.sourceMagnet;return e.isNodeConnection(n)?new me(this.sourceAnchor):e.getNodeBBox(n||e.el)}}),Object.defineProperty(Gi.prototype,"targetBBox",{enumerable:!0,get:function(){var e=this.targetView;if(!e){var t=this.model.target();return new me(t.x,t.y)}var n=this.targetMagnet;return e.isNodeConnection(n)?new me(this.targetAnchor):e.getNodeBBox(n||e.el)}});const Yi={CELLS:"cells",BACK:"back",FRONT:"front",TOOLS:"tools",LABELS:"labels"},Xi=Or.extend({tagName:"g",svgElement:!0,pivotNodes:null,defaultTheme:null,options:{name:""},className:function(){return _t(`${this.options.name}-layer`)},init:function(){this.pivotNodes={}},insertSortedNode:function(e,t){this.el.insertBefore(e,this.insertPivot(t))},insertNode:function(e){const{el:t}=this;e.parentNode!==t&&t.appendChild(e)},insertPivot:function(e){const{el:t,pivotNodes:n}=this;(e=+e)||(e=0);let r=n[e];if(r)return r;r=n[e]=document.createComment("z-index:"+(e+1));let i=-1/0;for(let t in n)t=+t,t<e&&t>i&&(i=t);if(i!==-1/0){const e=n[i];t.insertBefore(r,e.nextSibling)}else t.insertBefore(r,t.firstChild);return r},removePivots:function(){const{el:e,pivotNodes:t}=this;for(let n in t)e.removeChild(t[n]);this.pivotNodes={}}}),Ki=Dr.extend({tagName:"path",className:"highlight-stroke",attributes:{"pointer-events":"none","vector-effect":"non-scaling-stroke",fill:"none"},options:{padding:3,rx:0,ry:0,useFirstSubpath:!1,attrs:{"stroke-width":3,stroke:"#FEB663"}},getPathData(e,t){const{options:n}=this,{useFirstSubpath:r}=n;let i;try{const e=kt(t);if(i=e.convertToPathData().trim(),"PATH"===e.tagName()&&r){const e=i.search(/.M/i)+1;e>0&&(i=i.substr(0,e))}}catch(r){const o=e.getNodeBoundingRect(t);i=kt.rectToPath(Ht({},n,o.toJSON()))}return i},highlightConnection(e){this.vel.attr("d",e.getSerializedConnection())},highlightNode(e,t){const{vel:n,options:r}=this,{padding:i,layer:o}=r;let a=e.getNodeMatrix(t);if(i){o||t!==e.el||n.remove();let r=e.getNodeBoundingRect(t);const s=r.x+r.width/2,u=r.y+r.height/2;r=kt.transformRect(r,a);const l=Math.max(r.width,1),c=Math.max(r.height,1),f=(l+i)/l,h=(c+i)/c,d=kt.createSVGMatrix({a:f,b:0,c:0,d:h,e:s-f*s,f:u-h*u});a=a.multiply(d)}n.attr({d:this.getPathData(e,t),transform:kt.matrixToTransformString(a)})},highlight(e,t){const{vel:n,options:r}=this;n.attr(r.attrs),e.isNodeConnection(t)?this.highlightConnection(e):this.highlightNode(e,t)}}),Ji=20,Qi=Dr.extend({tagName:"rect",className:"highlight-mask",attributes:{"pointer-events":"none"},options:{padding:3,maskClip:Ji,deep:!1,attrs:{stroke:"#FEB663","stroke-width":3,"stroke-linecap":"butt","stroke-linejoin":"miter"}},VISIBLE:"white",INVISIBLE:"black",MASK_ROOT_ATTRIBUTE_BLACKLIST:["marker-start","marker-end","marker-mid","transform","stroke-dasharray"],MASK_CHILD_ATTRIBUTE_BLACKLIST:["stroke","fill","stroke-width","stroke-opacity","stroke-dasharray","fill-opacity","marker-start","marker-end","marker-mid"],MASK_REPLACE_TAGS:["FOREIGNOBJECT","IMAGE","USE","TEXT","TSPAN","TEXTPATH"],MASK_REMOVE_TAGS:["TEXT","TSPAN","TEXTPATH"],transformMaskChild(e,t){const{MASK_CHILD_ATTRIBUTE_BLACKLIST:n,MASK_REPLACE_TAGS:r,MASK_REMOVE_TAGS:i}=this,o=t.tagName();if(!kt.isSVGGraphicsElement(t)||i.includes(o))return t.remove(),!1;if(r.includes(o)){const n=e.vel.findOne(`#${t.id}`);if(n){const{node:r}=n;let i=e.getNodeBoundingRect(r);e.model.isElement()&&(i=kt.transformRect(i,e.getNodeMatrix(r)));const o=kt("rect",i.toJSON()),{x:a,y:s}=i.center(),{angle:u,cx:l=a,cy:c=s}=n.rotate();u&&o.rotate(u,l,c),t.parent().append(o)}return t.remove(),!1}return n.forEach((e=>{"fill"===e&&"none"===t.attr("fill")||t.removeAttr(e)})),!0},transformMaskRoot(e,t){const{MASK_ROOT_ATTRIBUTE_BLACKLIST:n}=this;n.forEach((e=>{t.removeAttr(e)}))},getMaskShape(e,t){const{options:n,MASK_REPLACE_TAGS:r}=this,{deep:i}=n,o=t.tagName();let a;if("G"===o){if(!i)return null;a=t.clone(),function(e,t){const n=e.children();for(;n.length>0;){const e=n.shift();t(e)&&n.push(...e.children())}}(a,(t=>this.transformMaskChild(e,t)))}else{if(r.includes(o))return null;a=t.clone()}return this.transformMaskRoot(e,a),a},getMaskId(){return`highlight-mask-${this.cid}`},getMask(e,t){const{VISIBLE:n,INVISIBLE:r,options:i}=this,{padding:o,attrs:a}=i,s="stroke-width"in a?a["stroke-width"]:1,u="none"!==t.attr("fill");let l=parseFloat(t.attr("stroke-width"));isNaN(l)&&(l=1);const c=l+2*o,f=c+2*s;let h=this.getMaskShape(e,t);if(!h){const n=e.getNodeBoundingRect(t.node);n.inflate(n.width?0:.5,n.height?0:.5),h=kt("rect",n.toJSON())}return h.attr(a),kt("mask",{id:this.getMaskId()}).append([h.clone().attr({fill:u?n:"none",stroke:n,"stroke-width":f}),h.clone().attr({fill:u?r:"none",stroke:r,"stroke-width":c})])},removeMask(e){const t=e.svg.getElementById(this.getMaskId());t&&e.defs.removeChild(t)},addMask(e,t){e.defs.appendChild(t.node)},highlight(e,t){const{options:n,vel:r}=this,{padding:i,attrs:o,maskClip:a=Ji,layer:s}=n,u="stroke"in o?o.stroke:"#000000";s||t!==e.el||r.remove();const l=e.getNodeBoundingRect(t).inflate(i+a),c=this.getMask(e,kt(t));this.addMask(e.paper,c),r.attr(l.toJSON()),r.attr({transform:kt.matrixToTransformString(e.getNodeMatrix(t)),mask:`url(#${c.id})`,fill:u})},unhighlight(e){this.removeMask(e.paper)}}),Zi=Dr.extend({UPDATABLE:!1,MOUNTABLE:!1,opacityClassName:_t("highlight-opacity"),highlight:function(e,t){kt(t).addClass(this.opacityClassName)},unhighlight:function(e,t){kt(t).removeClass(this.opacityClassName)}}),eo=_t("highlighted"),to=Dr.extend({UPDATABLE:!1,MOUNTABLE:!1,options:{className:eo},highlight:function(e,t){kt(t).addClass(this.options.className)},unhighlight:function(e,t){kt(t).removeClass(this.options.className)}},{className:eo});function no(e,t,n,r){var i="ratio"in r?r.ratio:.5;return e.getPointAtRatio(i)}function ro(e,t,n,r){var i="length"in r?r.length:20;return e.getPointAtLength(i)}function io(e){return function(t,n,r,i){if(r instanceof Element){var o,a=this.paper.findView(r);return o=a?a.isNodeConnection(r)?oo(a,"fixedAt"in i?i.fixedAt:"50%"):a.getNodeBBox(r).center():new Z,e.call(this,t,n,o,i)}return e.apply(this,arguments)}}function oo(e,t){var n=parseFloat(t);return jt(t)?e.getPointAtRatio(n/100):e.getPointAtLength(n)}const ao=io((function(e,t,n,r){var i=1e6,o=e.getConnection(),a=e.getConnectionSubdivisions(),s=new re(n.clone().offset(0,i),n.clone().offset(0,-i)),u=new re(n.clone().offset(i,0),n.clone().offset(-i,0)),l=s.intersect(o,{segmentSubdivisions:a}),c=u.intersect(o,{segmentSubdivisions:a}),f=[];return l&&Array.prototype.push.apply(f,l),c&&Array.prototype.push.apply(f,c),f.length>0?n.chooseClosest(f):"fallbackAt"in r?oo(e,r.fallbackAt):so(e,t,n,r)})),so=io((function(e,t,n,r){return e.getClosestPoint(n)||new Z}));function uo(e,t,n){if(tn(n)){const{x:r,y:i}=n;if(isFinite(i)){const n=new re(t,e),{start:r,end:o}=n.parallel(i);t=r,e=o}n=r}if(!isFinite(n))return e;var r=e.distance(t);return 0===n&&r>0?e:e.move(t,-Math.min(n,r-1))}function lo(e){var t=e.getAttribute("stroke-width");return null===t?0:parseFloat(t)||0}function co(e,t,n,r){var i=t.getNodeBBox(n);r.stroke&&i.inflate(lo(n)/2);var o=e.intersect(i);return uo(o?e.start.chooseClosest(o):e.end,e.start,r.offset)}var fo="segmentSubdivisons",ho="shapeBBox";const po=function(e,t,n,r){let{offset:i,alignOffset:o,align:a}=r;return a&&function(e,t,n=0){let r,i,o,a;const{start:s,end:u}=e;switch(t){case"left":r="x",i=u,o=s,a=-1;break;case"right":r="x",i=s,o=u,a=1;break;case"top":r="y",i=u,o=s,a=-1;break;case"bottom":r="y",i=s,o=u,a=1;break;default:return}s[r]<u[r]?i[r]=o[r]:o[r]=i[r],isFinite(n)&&(i[r]+=a*n,o[r]+=a*n)}(e,a,o),uo(e.end,e.start,i)},go=co,vo=function(e,t,n,r){var i=t.model.angle();if(0===i)return co(e,t,n,r);var o=t.getNodeUnrotatedBBox(n);r.stroke&&o.inflate(lo(n)/2);var a=o.center(),s=e.clone().rotate(a,i),u=s.setLength(1e6).intersect(o);return uo(u?s.start.chooseClosest(u).rotate(a,-i):e.end,e.start,r.offset)},mo=function(e,t,n,r){var i,o,a=r.selector,s=e.end;if(i="string"==typeof a?t.findBySelector(a)[0]:Array.isArray(a)?Pt(n,a):function(e){if(!e)return null;var t=e;do{var n=t.tagName;if("string"!=typeof n)return null;if("G"===(n=n.toUpperCase()))t=t.firstElementChild;else{if("TITLE"!==n)break;t=t.nextElementSibling}}while(t);return t}(n),!kt.isSVGGraphicsElement(i)){if(i===n||!kt.isSVGGraphicsElement(n))return s;i=n}var u,l=t.getNodeShape(i),c=t.getNodeMatrix(i),f=t.getRootTranslateMatrix(),h=t.getRootRotateMatrix(),d=f.multiply(h).multiply(c),p=d.inverse(),g=kt.transformLine(e,p),v=g.start.clone(),m=t.getNodeData(i);if(!1===r.insideout&&(m[ho]||(m[ho]=l.bbox()),m[ho].containsPoint(v)))return s;if(l instanceof Te){var y=r.precision||2;m[fo]||(m[fo]=l.getSegmentSubdivisions({precision:y})),u={precision:y,segmentSubdivisions:m[fo]}}!0===r.extrapolate&&g.setLength(1e6),(o=g.intersect(l,u))?kt.isArray(o)&&(o=v.chooseClosest(o)):!0===r.sticky&&(o=l instanceof me?l.pointNearestToPoint(v):l instanceof ue?l.intersectionWithLineFromCenterToPoint(v):l.closestPoint(v,u));var b=o?kt.transformPoint(o,d):s,w=r.offset||0;return r.stroke&&(w+=lo(i)/2),uo(b,e.start,w)};function yo(e){return function(t,n,r,i){var o=!!i.rotate,a=o?t.getNodeUnrotatedBBox(n):t.getNodeBBox(n),s=a[e](),u=i.dx;if(u){var l=jt(u);u=parseFloat(u),isFinite(u)&&(l&&(u/=100,u*=a.width),s.x+=u)}var c=i.dy;if(c){var f=jt(c);c=parseFloat(c),isFinite(c)&&(f&&(c/=100,c*=a.height),s.y+=c)}return o?s.rotate(t.model.getBBox().center(),-t.model.angle()):s}}const bo=yo("center"),wo=yo("topMiddle"),xo=yo("bottomMiddle"),ko=yo("leftMiddle"),So=yo("rightMiddle"),_o=yo("origin"),Eo=yo("topRight"),Co=yo("bottomLeft"),Ao=yo("corner"),Po=io((function(e,t,n,r){var i=e.model.angle(),o=e.getNodeBBox(t),a=o.center(),s=o.origin(),u=o.corner(),l=r.padding;if(isFinite(l)||(l=0),s.y+l<=n.y&&n.y<=u.y-l){var c=n.y-a.y;a.x+=0===i||180===i?0:1*c/Math.tan(R(i)),a.y+=c}else if(s.x+l<=n.x&&n.x<=u.x-l){var f=n.x-a.x;a.y+=90===i||270===i?0:f*Math.tan(R(i)),a.x+=f}return a})),Lo=io((function(e,t,n,r){var i,o,a,s=!!r.rotate;s?(i=e.getNodeUnrotatedBBox(t),a=e.model.getBBox().center(),o=e.model.angle()):i=e.getNodeBBox(t);var u,l=r.padding;switch(isFinite(l)&&i.inflate(l),s&&n.rotate(a,o),i.sideNearestToPoint(n)){case"left":u=i.leftMiddle();break;case"right":u=i.rightMiddle();break;case"top":u=i.topMiddle();break;case"bottom":u=i.bottomMiddle()}return s?u.rotate(a,-o):u})),To=function(e,t,n,r,i){return e.model.getPointFromConnectedLink(this.model,i).offset(r.dx,r.dy)},No={NONE:"sorting-none",APPROX:"sorting-approximate",EXACT:"sorting-exact"},Oo=1/0,Mo=9007199254740991,Ro=Ir.Highlighting,Do={[Ro.DEFAULT]:{name:"stroke",options:{padding:3}},[Ro.MAGNET_AVAILABILITY]:{name:"addClass",options:{className:"available-magnet"}},[Ro.ELEMENT_AVAILABILITY]:{name:"addClass",options:{className:"available-cell"}}},jo=[{name:Yi.BACK},{name:Yi.CELLS},{name:Yi.LABELS},{name:Yi.FRONT},{name:Yi.TOOLS}],Io=Or.extend({className:"paper",options:{width:800,height:600,origin:{x:0,y:0},gridSize:1,drawGrid:!1,background:!1,perpendicularLinks:!1,elementView:zr,linkView:Gi,snapLabels:!1,snapLinks:!1,labelsLayer:!1,multiLinks:!0,guard:function(e,t){return!1},highlighting:Do,preventContextMenu:!0,preventDefaultBlankAction:!0,restrictTranslate:!1,markAvailable:!1,defaultLink:new Yn,defaultConnector:{name:"normal"},defaultRouter:{name:"normal"},defaultAnchor:{name:"center"},defaultLinkAnchor:{name:"connectionRatio"},defaultConnectionPoint:{name:"bbox"},connectionStrategy:null,validateMagnet:function(e,t,n){return"passive"!==t.getAttribute("magnet")},validateConnection:function(e,t,n,r,i,o){return("target"===i?n:e)instanceof zr},embeddingMode:!1,validateEmbedding:function(e,t){return!0},validateUnembedding:function(e){return!0},findParentBy:"bbox",frontParentOnly:!0,interactive:{labelMove:!1},linkPinning:!0,allowLink:null,clickThreshold:0,moveThreshold:0,magnetThreshold:0,sorting:No.EXACT,frozen:!1,onViewUpdate:function(e,t,n,r,i){t&(e.FLAG_INSERT|e.FLAG_REMOVE)||r.mounting||r.isolate||i.requestConnectedLinksUpdate(e,n,r)},onViewPostponed:function(e,t,n){return n.forcePostponedViewUpdate(e,t)},beforeRender:null,afterRender:null,viewport:null,cellViewNamespace:null,routerNamespace:null,connectorNamespace:null,highlighterNamespace:u,anchorNamespace:f,linkAnchorNamespace:l,connectionPointNamespace:c},events:{dblclick:"pointerdblclick",contextmenu:"contextmenu",mousedown:"pointerdown",touchstart:"pointerdown",mouseover:"mouseover",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",wheel:"mousewheel","mouseenter .joint-cell":"mouseenter","mouseleave .joint-cell":"mouseleave","mouseenter .joint-tools":"mouseenter","mouseleave .joint-tools":"mouseleave","mousedown .joint-cell [event]":"onevent","touchstart .joint-cell [event]":"onevent","mousedown .joint-cell [magnet]":"onmagnet","touchstart .joint-cell [magnet]":"onmagnet","dblclick .joint-cell [magnet]":"magnetpointerdblclick","contextmenu .joint-cell [magnet]":"magnetcontextmenu","mousedown .joint-link .label":"onlabel","touchstart .joint-link .label":"onlabel","dragstart .joint-cell image":"onImageDragStart"},documentEvents:{mousemove:"pointermove",touchmove:"pointermove",mouseup:"pointerup",touchend:"pointerup",touchcancel:"pointerup"},svg:null,viewport:null,defs:null,tools:null,$background:null,layers:null,$grid:null,$document:null,_viewportMatrix:null,_viewportTransformString:null,_updates:null,_layers:null,SORT_DELAYING_BATCHES:["add","to-front","to-back"],UPDATE_DELAYING_BATCHES:["translate"],MIN_SCALE:1e-6,init:function(){const{options:e,el:t}=this;e.cellViewNamespace||(e.cellViewNamespace="undefined"!=typeof joint&&ln(joint,"shapes")?joint.shapes:null);const n=this.model=e.model||new Tr;this._layers={},this.setGrid(e.drawGrid),this.cloneOptions(),this.render(),this._setDimensions(),this.startListening(),this._views={},this.$document=C(t.ownerDocument),this.resetViews(n.attributes.cells.models),!this.isFrozen()&&this.isAsync()&&this.updateViewsAsync()},_resetUpdates:function(){return this._updates={id:null,priorities:[{},{},{}],unmountedCids:[],mountedCids:[],unmounted:{},mounted:{},count:0,keyFrozen:!1,freezeKey:null,sort:!1}},startListening:function(){var e=this.model;this.listenTo(e,"add",this.onCellAdded).listenTo(e,"remove",this.onCellRemoved).listenTo(e,"change",this.onCellChange).listenTo(e,"reset",this.onGraphReset).listenTo(e,"sort",this.onGraphSort).listenTo(e,"batch:stop",this.onGraphBatchStop),this.on("cell:highlight",this.onCellHighlight).on("cell:unhighlight",this.onCellUnhighlight).on("scale translate",this.update)},onCellAdded:function(e,t,n){var r=n.position;this.isAsync()||!yn(r)?this.renderView(e,n):(n.maxPosition===r&&this.freeze({key:"addCells"}),this.renderView(e,n),0===r&&this.unfreeze({key:"addCells"}))},onCellRemoved:function(e,t,n){const r=this.findViewByModel(e);r&&this.requestViewUpdate(r,r.FLAG_REMOVE,r.UPDATE_PRIORITY,n)},onCellChange:function(e,t){if(e!==this.model.attributes.cells&&e.hasChanged("z")&&this.options.sorting===No.APPROX){const n=this.findViewByModel(e);n&&this.requestViewUpdate(n,n.FLAG_INSERT,n.UPDATE_PRIORITY,t)}},onGraphReset:function(e,t){this.resetLayers(),this.resetViews(e.models,t)},onGraphSort:function(){this.model.hasActiveBatch(this.SORT_DELAYING_BATCHES)||this.sortViews()},onGraphBatchStop:function(e){if(!this.isFrozen()){var t=e&&e.batchName,n=this.model;if(!this.isAsync()){var r=this.UPDATE_DELAYING_BATCHES;r.includes(t)&&!n.hasActiveBatch(r)&&this.updateViews(e)}var i=this.SORT_DELAYING_BATCHES;i.includes(t)&&!n.hasActiveBatch(i)&&this.sortViews()}},cloneOptions:function(){const{options:e}=this,{defaultConnector:t,defaultRouter:n,defaultConnectionPoint:r,defaultAnchor:i,defaultLinkAnchor:o,origin:a,highlighting:s,cellViewNamespace:u,interactive:l}=e;!u&&"undefined"!=typeof joint&&ln(joint,"shapes")&&(e.cellViewNamespace=joint.shapes),en(t)||(e.defaultConnector=Jt(t)),en(n)||(e.defaultRouter=Jt(n)),en(r)||(e.defaultConnectionPoint=Jt(r)),en(i)||(e.defaultAnchor=Jt(i)),en(o)||(e.defaultLinkAnchor=Jt(o)),tn(l)&&(e.interactive=Ht({},l)),tn(s)&&(e.highlighting=Wt({},s,Do)),e.origin=Ht({},a)},children:function(){var e=kt.namespace;return[{namespaceURI:e.xhtml,tagName:"div",className:_t("paper-background"),selector:"background"},{namespaceURI:e.xhtml,tagName:"div",className:_t("paper-grid"),selector:"grid"},{namespaceURI:e.svg,tagName:"svg",attributes:{width:"100%",height:"100%","xmlns:xlink":e.xlink},selector:"svg",children:[{tagName:"defs",selector:"defs"},{tagName:"g",className:_t("layers"),selector:"layers"}]}]},hasLayerView(e){return e in this._layers},getLayerView(e){const{_layers:t}=this;if(e in t)return t[e];throw new Error(`dia.Paper: Unknown layer "${e}"`)},getLayerNode(e){return this.getLayerView(e).el},render:function(){this.renderChildren();const{childNodes:e,options:t}=this,{svg:n,defs:r,layers:i,background:o,grid:a}=e;return this.svg=n,this.defs=r,this.layers=i,this.$background=C(o),this.$grid=C(a),this.renderLayers(),kt.ensureId(n),t.background&&this.drawBackground(t.background),t.drawGrid&&this.drawGrid(),this},renderLayers:function(e=jo){this.removeLayers(),e.forEach((({name:e,sorted:t})=>{const n=new Xi({name:e});this.layers.appendChild(n.el),this._layers[e]=n}));const t=this.getLayerView(Yi.CELLS),n=this.getLayerView(Yi.TOOLS),r=this.getLayerView(Yi.LABELS);this.tools=n.el,this.cells=this.viewport=t.el,t.vel.addClass(_t("viewport")),r.vel.addClass(_t("viewport"))},removeLayers:function(){const{_layers:e}=this;Object.keys(e,(t=>{e[t].remove(),delete e[t]}))},resetLayers:function(){const{_layers:e}=this;Object.keys(e,(t=>{e[t].removePivots()}))},update:function(){return this.options.drawGrid&&this.drawGrid(),this._background&&this.updateBackgroundImage(this._background),this},matrix:function(e){var t=this.layers;if(void 0===e){var n=t.getAttribute("transform");return(this._viewportTransformString||null)===n?e=this._viewportMatrix:(e=t.getCTM(),this._viewportMatrix=e,this._viewportTransformString=n),kt.createSVGMatrix(e)}e=kt.createSVGMatrix(e);var r=kt.matrixToTransformString(e);return t.setAttribute("transform",r),this._viewportMatrix=e,this._viewportTransformString=t.getAttribute("transform"),this},clientMatrix:function(){return kt.createSVGMatrix(this.cells.getScreenCTM())},requestConnectedLinksUpdate:function(e,t,n){if(e instanceof Ir)for(var r=e.model,i=this.model.getConnectedLinks(r),o=0,a=i.length;o<a;o++){var s=i[o],u=this.findViewByModel(s);if(u){var l=["UPDATE"];s.getTargetCell()===r&&l.push("TARGET"),s.getSourceCell()===r&&l.push("SOURCE");var c=Math.max(t+1,u.UPDATE_PRIORITY);this.scheduleViewUpdate(u,u.getFlag(l),c,n)}}},forcePostponedViewUpdate:function(e,t){if(!(e&&e instanceof Ir))return!1;var n=e.model;if(n.isElement())return!1;if(0===(t&e.getFlag(["SOURCE","TARGET"]))){var r=0,i=this.findViewByModel(n.getSourceCell());i&&!this.isViewMounted(i)&&(r=this.dumpView(i),e.updateEndMagnet("source"));var o=0,a=this.findViewByModel(n.getTargetCell());if(a&&!this.isViewMounted(a)&&(o=this.dumpView(a),e.updateEndMagnet("target")),0===r&&0===o)return!this.dumpView(e)}return!1},requestViewUpdate:function(e,t,n,r){r||(r={}),this.scheduleViewUpdate(e,t,n,r);var i=this.isAsync();if(!(this.isFrozen()||i&&!1!==r.async||this.model.hasActiveBatch(this.UPDATE_DELAYING_BATCHES))){var o=this.updateViews(r);i&&this.notifyAfterRender(o,r)}},scheduleViewUpdate:function(e,t,n,r){const{_updates:i,options:o}=this,{FLAG_REMOVE:a,FLAG_INSERT:s,UPDATE_PRIORITY:u,cid:l}=e;let c=i.priorities[n];if(c||(c=i.priorities[n]={}),n>u)for(let e=n-1;e>=u;e--){const t=i.priorities[e];t&&l in t&&(c[l]|=t[l],delete t[l])}let f=c[l]||0;if((f&t)===t)return;f||i.count++,t&a&&f&s?c[l]^=s:t&s&&f&a&&(c[l]^=a),c[l]|=t;const h=o.onViewUpdate;"function"==typeof h&&h.call(this,e,t,n,r||{},this)},dumpViewUpdate:function(e){if(!e)return 0;var t=this._updates,n=e.cid,r=t.priorities[e.UPDATE_PRIORITY],i=this.registerMountedView(e)|r[n];return delete r[n],i},dumpView:function(e,t){var n=this.dumpViewUpdate(e);return n?this.updateView(e,n,t):0},updateView:function(e,t,n){if(!e)return 0;const{FLAG_REMOVE:r,FLAG_INSERT:i,model:o}=e;if(e instanceof Ir){if(t&r)return this.removeView(o),0;t&i&&(this.insertView(e),t^=i)}return t?e.confirmUpdate(t,n||{}):0},requireView:function(e,t){var n=this.findViewByModel(e);return n?(this.dumpView(n,t),n):null},registerUnmountedView:function(e){var t=e.cid,n=this._updates;if(t in n.unmounted)return 0;var r=n.unmounted[t]|=e.FLAG_INSERT;return n.unmountedCids.push(t),delete n.mounted[t],r},registerMountedView:function(e){var t=e.cid,n=this._updates;if(t in n.mounted)return 0;n.mounted[t]=!0,n.mountedCids.push(t);var r=n.unmounted[t]||0;return delete n.unmounted[t],r},isViewMounted:function(e){return!!e&&e.cid in this._updates.mounted},dumpViews:function(e){var t=qt({},e,{viewport:null});this.checkViewport(t),this.updateViews(t)},updateViews:function(e){let t;this.notifyBeforeRender(e);let n=0,r=0,i=Mo;do{r++,t=this.updateViewsBatch(e),n+=t.updated,i=Math.min(t.priority,i)}while(!t.empty);const o={updated:n,batches:r,priority:i};return this.notifyAfterRender(o,e),o},hasScheduledUpdates:function(){const e=this._updates.priorities,t=Object.keys(e);let n=t.length;for(;n>0&&n--;)for(let r in e[t[n]])return!0;return!1},updateViewsAsync:function(e,t){e||(e={}),t||(t={processed:0,priority:Mo});var n=this._updates,r=n.id;if(r){Dt(r),0===t.processed&&this.hasScheduledUpdates()&&this.notifyBeforeRender(e);var i=this.updateViewsBatch(e),o=qt({},e,{mountBatchSize:1e3-i.mounted,unmountBatchSize:1e3-i.unmounted}),a=this.checkViewport(o),s=a.unmounted,u=a.mounted,l=t.processed,c=n.count;i.updated>0&&(l+=i.updated+i.unmounted,i.processed=l,t.priority=Math.min(i.priority,t.priority),i.empty&&0===u?(i.unmounted+=s,i.mounted+=u,i.priority=t.priority,this.notifyAfterRender(i,e),t.processed=0,t.priority=Mo,n.count=0):t.processed=l);var f=e.progress;if(c&&"function"==typeof f&&f.call(this,i.empty,l,c,i,this),n.id!==r)return}n.id=Rt(this.updateViewsAsync,this,e,t)},notifyBeforeRender:function(e={}){let t=e.beforeRender;"function"!=typeof t&&(t=this.options.beforeRender,"function"!=typeof t)||t.call(this,e,this)},notifyAfterRender:function(e,t={}){let n=t.afterRender;"function"!=typeof n&&(n=this.options.afterRender),"function"==typeof n&&n.call(this,e,t,this),this.trigger("render:done",e,t)},updateViewsBatch:function(e){e||(e={});var t=e.batchSize||Oo,n=this._updates,r=0,i=0,o=0,a=0,s=Mo,u=!0,l=this.options,c=n.priorities,f="viewport"in e?e.viewport:l.viewport;"function"!=typeof f&&(f=null);var h=l.onViewPostponed;"function"!=typeof h&&(h=null);var d=Object.keys(c);e:for(var p=0,g=d.length;p<g;p++){var v=+d[p],m=c[v];for(var y in m){if(r>=t){u=!1;break e}var b=Nr[y];if(b){var w=m[y];if(0===(w&b.FLAG_REMOVE)){var x=y in n.unmounted;if(b.DETACHABLE&&f&&!f.call(this,b,!x,this)){x||(this.registerUnmountedView(b),b.unmount()),n.unmounted[y]|=w,delete m[y],o++;continue}x&&(w|=b.FLAG_INSERT,a++),w|=this.registerMountedView(b)}var k=this.updateView(b,w,e);k>0&&(m[y]=k,!h||!h.call(this,b,k,this)||m[y])?(i++,u=!1):(s>v&&(s=v),r++,delete m[y])}else delete m[y]}}return{priority:s,updated:r,postponed:i,unmounted:o,mounted:a,empty:u}},getUnmountedViews:function(){const e=this._updates,t=Object.keys(e.unmounted),n=t.length,r=new Array(n);for(var i=0;i<n;i++)r[i]=Nr[t[i]];return r},getMountedViews:function(){const e=this._updates,t=Object.keys(e.mounted),n=t.length,r=new Array(n);for(var i=0;i<n;i++)r[i]=Nr[t[i]];return r},checkUnmountedViews:function(e,t){t||(t={});var n=0;"function"!=typeof e&&(e=null);for(var r=("mountBatchSize"in t?t.mountBatchSize:1/0),i=this._updates,o=i.unmountedCids,a=i.unmounted,s=0,u=Math.min(o.length,r);s<u;s++){var l=o[s];if(l in a){var c=Nr[l];if(c)if(c.DETACHABLE&&e&&!e.call(this,c,!1,this))o.push(l);else{n++;var f=this.registerMountedView(c);f&&this.scheduleViewUpdate(c,f,c.UPDATE_PRIORITY,{mounting:!0})}}}return o.splice(0,s),n},checkMountedViews:function(e,t){t||(t={});var n=0;if("function"!=typeof e)return n;for(var r=("unmountBatchSize"in t?t.unmountBatchSize:1/0),i=this._updates,o=i.mountedCids,a=i.mounted,s=0,u=Math.min(o.length,r);s<u;s++){var l=o[s];if(l in a){var c=Nr[l];c&&(c.DETACHABLE&&!e.call(this,c,!0,this)?(n++,this.registerUnmountedView(c)&&c.unmount()):o.push(l))}}return o.splice(0,s),n},checkViewport:function(e){var t=qt({},e,{mountBatchSize:1/0,unmountBatchSize:1/0}),n="viewport"in t?t.viewport:this.options.viewport,r=this.checkMountedViews(n,t);if(r>0){var i=this._updates.unmountedCids;t.mountBatchSize=Math.min(i.length-r,t.mountBatchSize)}return{mounted:this.checkUnmountedViews(n,t),unmounted:r}},freeze:function(e){e||(e={});var t=this._updates,n=e.key,r=this.options.frozen,i=t.freezeKey;if(n&&n!==i){if(r&&i)return;t.freezeKey=n,t.keyFrozen=r}this.options.frozen=!0;var o=t.id;t.id=null,this.isAsync()&&o&&Dt(o)},unfreeze:function(e){e||(e={});var t=this._updates,n=e.key,r=t.freezeKey;n&&r&&n!==r||(t.freezeKey=null,n&&n===r&&t.keyFrozen||(this.isAsync()?(this.freeze(),this.updateViewsAsync(e)):this.updateViews(e),this.options.frozen=t.keyFrozen=!1,t.sort&&(this.sortViews(),t.sort=!1)))},isAsync:function(){return!!this.options.async},isFrozen:function(){return!!this.options.frozen},isExactSorting:function(){return this.options.sorting===No.EXACT},onRemove:function(){this.freeze(),this.removeLayers(),this.removeViews()},getComputedSize:function(){var e=this.options,t=e.width,n=e.height;return yn(t)||(t=this.el.clientWidth),yn(n)||(n=this.el.clientHeight),{width:t,height:n}},setDimensions:function(e,t){const{options:n}=this,{width:r,height:i}=n;let o=void 0===e?r:e,a=void 0===t?i:t;if(r===o&&i===a)return;n.width=o,n.height=a,this._setDimensions();const s=this.getComputedSize();this.trigger("resize",s.width,s.height)},_setDimensions:function(){const{options:e}=this;let t=e.width,n=e.height;yn(t)&&(t=Math.round(t)),yn(n)&&(n=Math.round(n)),this.$el.css({width:null===t?"":t,height:null===n?"":n})},setOrigin:function(e,t){return this.translate(e||0,t||0)},fitToContent:function(e,t,n,r){r=mn(e)?e:Ht({gridWidth:e,gridHeight:t,padding:n},r);const{x:i,y:o,width:a,height:s}=this.getFitToContentArea(r),{sx:u,sy:l}=this.scale();return this.setOrigin(-i*u,-o*l),this.setDimensions(a*u,s*l),new me(i,o,a,s)},getFitToContentArea:function(e={}){const t=e.gridWidth||1,n=e.gridHeight||1,r=zt(e.padding||0),i=Math.max(e.minWidth||0,t),o=Math.max(e.minHeight||0,n),a=e.maxWidth||Number.MAX_VALUE,s=e.maxHeight||Number.MAX_VALUE,u=e.allowNewOrigin,l="contentArea"in e?new me(e.contentArea):this.getContentArea(e),{sx:c,sy:f}=this.scale();l.x*=c,l.y*=f,l.width*=c,l.height*=f;let h=Math.ceil((l.width+l.x)/t),d=Math.ceil((l.height+l.y)/n);e.allowNegativeBottomRight||(h=Math.max(h,1),d=Math.max(d,1)),h*=t,d*=n;let p=0;("negative"===u&&l.x<0||"positive"===u&&l.x>=0||"any"===u)&&(p=Math.ceil(-l.x/t)*t,p+=r.left,h+=p);let g=0;return("negative"===u&&l.y<0||"positive"===u&&l.y>=0||"any"===u)&&(g=Math.ceil(-l.y/n)*n,g+=r.top,d+=g),h+=r.right,d+=r.bottom,h=Math.max(h,i),d=Math.max(d,o),h=Math.min(h,a),d=Math.min(d,s),new me(-p/c,-g/f,h/c,d/f)},scaleContentToFit:function(e){var t,n;if(e||(e={}),"contentArea"in e){var r=e.contentArea;t=this.localToPaperRect(r),n=new Z(r)}else t=this.getContentBBox(e),n=this.paperToLocalPoint(t);if(t.width&&t.height){qt(e,{padding:0,preserveAspectRatio:!0,scaleGrid:null,minScale:0,maxScale:Number.MAX_VALUE});var i,o=zt(e.padding),a=e.minScaleX||e.minScale,s=e.maxScaleX||e.maxScale,u=e.minScaleY||e.minScale,l=e.maxScaleY||e.maxScale;if(e.fittingBBox)i=e.fittingBBox;else{var c=this.translate(),f=this.getComputedSize();i={x:c.tx,y:c.ty,width:f.width,height:f.height}}i=new me(i).moveAndExpand({x:o.left,y:o.top,width:-o.left-o.right,height:-o.top-o.bottom});var h=this.scale(),d=i.width/t.width*h.sx,p=i.height/t.height*h.sy;if(e.preserveAspectRatio&&(d=p=Math.min(d,p)),e.scaleGrid){var g=e.scaleGrid;d=g*Math.floor(d/g),p=g*Math.floor(p/g)}d=Math.min(s,Math.max(a,d)),p=Math.min(l,Math.max(u,p));var v=this.options.origin,m=i.x-n.x*d-v.x,y=i.y-n.y*p-v.y;this.scale(d,p),this.translate(m,y)}},getContentArea:function(e){return e&&e.useModelGeometry?this.model.getBBox()||new me:kt(this.cells).getBBox()},getContentBBox:function(e){return this.localToPaperRect(this.getContentArea(e))},getArea:function(){return this.paperToLocalRect(this.getComputedSize())},getRestrictedArea:function(...e){const{restrictTranslate:t}=this.options;let n;return n=en(t)?t.apply(this,e):!0===t?this.getArea():t?new me(t):null,n},createViewForModel:function(e){const{options:t}=this;var n,r,i=t.cellViewNamespace,o=e.get("type")+"View",a=Pt(i,o,".");return e.isLink()?(n=t.linkView,r=Gi):(n=t.elementView,r=zr),new(n.prototype instanceof _.View?a||n:n.call(this,e)||a||r)({model:e,interactive:t.interactive,labelsLayer:!0===t.labelsLayer?Yi.LABELS:t.labelsLayer})},removeView:function(e){const{id:t}=e,{_views:n,_updates:r}=this,i=n[t];if(i){var{cid:o}=i;const{mounted:e,unmounted:a}=r;i.remove(),delete n[t],delete e[o],delete a[o]}return i},renderView:function(e,t){const{id:n}=e,r=this._views;let i,o,a=!0;return n in r&&(i=r[n],i.model===e?(o=i.FLAG_INSERT,a=!1):this.removeView(e)),a&&(i=r[n]=this.createViewForModel(e),i.paper=this,o=this.registerUnmountedView(i)|i.getFlag(cn(i,"initFlag"))),this.requestViewUpdate(i,o,i.UPDATE_PRIORITY,t),i},onImageDragStart:function(){return!1},resetViews:function(e,t){t||(t={}),e||(e=[]),this._resetUpdates(),this.removeViews(),this.freeze({key:"reset"});for(var n=0,r=e.length;n<r;n++)this.renderView(e[n],t);this.unfreeze({key:"reset"}),this.sortViews()},removeViews:function(){Gt(this._views,"remove"),this._views={}},sortViews:function(){this.isExactSorting()&&(this.isFrozen()?this._updates.sort=!0:this.sortViewsExact())},sortViewsExact:function(){var e,t,n,r=C(this.cells).children("[model-id]"),i=this.model.get("cells");e=function(e,t){var n=i.get(e.getAttribute("model-id")),r=i.get(t.getAttribute("model-id")),o=n.attributes.z||0,a=r.attributes.z||0;return o===a?0:o<a?-1:1},t=C(r),n=t.map((function(){var e=this.parentNode,t=e.insertBefore(document.createTextNode(""),this.nextSibling);return function(){if(e===this)throw new Error("You can't sort elements if any one is a descendant of another.");e.insertBefore(this,t),e.removeChild(t)}})),Array.prototype.sort.call(t,e).each((function(e){n[e].call(this)}))},insertView:function(e){const t=this.getLayerView(Yi.CELLS),{el:n,model:r}=e;this.options.sorting===No.APPROX?t.insertSortedNode(n,r.get("z")):t.insertNode(n),e.onMount()},scale:function(e,t,n,r){if(void 0===e)return kt.matrixToScale(this.matrix());void 0===t&&(t=e),void 0===n&&(n=0,r=0);var i=this.translate();if(n||r||i.tx||i.ty){var o=i.tx-n*(e-1),a=i.ty-r*(t-1);this.translate(o,a)}e=Math.max(e||0,this.MIN_SCALE),t=Math.max(t||0,this.MIN_SCALE);var s=this.matrix();return s.a=e,s.d=t,this.matrix(s),this.trigger("scale",e,t,n,r),this},rotate:function(e,t,n){if(void 0===e)return kt.matrixToRotate(this.matrix());if(void 0===t){var r=this.cells.getBBox();t=r.width/2,n=r.height/2}var i=this.matrix().translate(t,n).rotate(e).translate(-t,-n);return this.matrix(i),this},translate:function(e,t){if(void 0===e)return kt.matrixToTranslate(this.matrix());const{options:n}=this,{origin:r,drawGrid:i}=n;e||(e=0),t||(t=0);const o=this.matrix();if(o.e===e&&o.f===t)return this;o.e=e,o.f=t,this.matrix(o);const{tx:a,ty:s}=this.translate();return r.x=a,r.y=s,this.trigger("translate",a,s),i&&this.drawGrid(),this},findView:function(e){var t=bn(e)?this.cells.querySelector(e):e instanceof C?e[0]:e,n=this.findAttribute("model-id",t);if(n)return this._views[n]},findViewByModel:function(e){var t=bn(e)||yn(e)?e:e&&e.id;return this._views[t]},findViewsFromPoint:function(e){return e=new Z(e),this.model.getElements().map(this.findViewByModel,this).filter((function(t){return t&&t.vel.getBBox({target:this.cells}).containsPoint(e)}),this)},findViewsInArea:function(e,t){t=qt(t||{},{strict:!1}),e=new me(e);var n=this.model.getElements().map(this.findViewByModel,this),r=t.strict?"containsRect":"intersect";return n.filter((function(t){return t&&e[r](t.vel.getBBox({target:this.cells}))}),this)},removeTools:function(){return this.dispatchToolsEvent("remove"),this},hideTools:function(){return this.dispatchToolsEvent("hide"),this},showTools:function(){return this.dispatchToolsEvent("show"),this},dispatchToolsEvent:function(e,...t){"string"==typeof e&&this.trigger("tools:event",e,...t)},getModelById:function(e){return this.model.getCell(e)},snapToGrid:function(e,t){return this.clientToLocalPoint(e,t).snapToGrid(this.options.gridSize)},localToPaperPoint:function(e,t){var n=new Z(e,t);return kt.transformPoint(n,this.matrix())},localToPaperRect:function(e,t,n,r){var i=new me(e,t,n,r);return kt.transformRect(i,this.matrix())},paperToLocalPoint:function(e,t){var n=new Z(e,t);return kt.transformPoint(n,this.matrix().inverse())},paperToLocalRect:function(e,t,n,r){var i=new me(e,t,n,r);return kt.transformRect(i,this.matrix().inverse())},localToClientPoint:function(e,t){var n=new Z(e,t);return kt.transformPoint(n,this.clientMatrix())},localToClientRect:function(e,t,n,r){var i=new me(e,t,n,r);return kt.transformRect(i,this.clientMatrix())},clientToLocalPoint:function(e,t){var n=new Z(e,t);return kt.transformPoint(n,this.clientMatrix().inverse())},clientToLocalRect:function(e,t,n,r){var i=new me(e,t,n,r);return kt.transformRect(i,this.clientMatrix().inverse())},localToPagePoint:function(e,t){return this.localToPaperPoint(e,t).offset(this.pageOffset())},localToPageRect:function(e,t,n,r){return this.localToPaperRect(e,t,n,r).offset(this.pageOffset())},pageToLocalPoint:function(e,t){var n=new Z(e,t).difference(this.pageOffset());return this.paperToLocalPoint(n)},pageToLocalRect:function(e,t,n,r){var i=this.pageOffset(),o=new me(e,t,n,r);return o.x-=i.x,o.y-=i.y,this.paperToLocalRect(o)},clientOffset:function(){var e=this.svg.getBoundingClientRect();return new Z(e.left,e.top)},pageOffset:function(){return this.clientOffset().offset(window.scrollX,window.scrollY)},linkAllowed:function(e){if(!(e instanceof Gi))throw new Error("Must provide a linkView.");var t=e.model,n=this.options,r=this.model,i=r.constructor.validations;return!(!n.multiLinks&&!i.multiLinks.call(this,r,t)||!n.linkPinning&&!i.linkPinning.call(this,r,t)||"function"==typeof n.allowLink&&!n.allowLink.call(this,e,this))},getDefaultLink:function(e,t){return en(this.options.defaultLink)?this.options.defaultLink.call(this,e,t):this.options.defaultLink.clone()},resolveHighlighter:function(e={}){let{highlighter:t,type:n}=e;const{highlighting:r,highlighterNamespace:i}=this.options;if(void 0===t){if(!r)return!1;if(n&&(t=r[n],!1===t))return!1;t||(t=r.default)}if(!t)return!1;bn(t)&&(t={name:t});const o=t.name,a=i[o];if(!a)throw new Error('Unknown highlighter ("'+o+'")');if("function"!=typeof a.highlight)throw new Error('Highlighter ("'+o+'") is missing required highlight() method');if("function"!=typeof a.unhighlight)throw new Error('Highlighter ("'+o+'") is missing required unhighlight() method');return{highlighter:a,options:t.options||{},name:o}},onCellHighlight:function(e,t,n){const r=this.resolveHighlighter(n);if(!r)return;const{highlighter:i,options:o}=r;i.highlight(e,t,o)},onCellUnhighlight:function(e,t,n){const r=this.resolveHighlighter(n);if(!r)return;const{highlighter:i,options:o}=r;i.unhighlight(e,t,o)},pointerdblclick:function(e){e.preventDefault(),e=Mt(e);var t=this.findView(e.target);if(!this.guard(e,t)){var n=this.snapToGrid(e.clientX,e.clientY);t?t.pointerdblclick(e,n.x,n.y):this.trigger("blank:pointerdblclick",e,n.x,n.y)}},pointerclick:function(e){if(this.eventData(e).mousemoved<=this.options.clickThreshold){e=Mt(e);var t=this.findView(e.target);if(this.guard(e,t))return;var n=this.snapToGrid(e.clientX,e.clientY);t?t.pointerclick(e,n.x,n.y):this.trigger("blank:pointerclick",e,n.x,n.y)}},contextmenu:function(e){this.options.preventContextMenu&&e.preventDefault(),e=Mt(e);var t=this.findView(e.target);if(!this.guard(e,t)){var n=this.snapToGrid(e.clientX,e.clientY);t?t.contextmenu(e,n.x,n.y):this.trigger("blank:contextmenu",e,n.x,n.y)}},pointerdown:function(e){e=Mt(e);var t=this.findView(e.target);if(!this.guard(e,t)){var n=this.snapToGrid(e.clientX,e.clientY);t?(e.preventDefault(),t.pointerdown(e,n.x,n.y)):(this.options.preventDefaultBlankAction&&e.preventDefault(),this.trigger("blank:pointerdown",e,n.x,n.y)),this.delegateDragEvents(t,e.data)}},pointermove:function(e){var t=this.eventData(e);if(t.mousemoved||(t.mousemoved=0),!(++t.mousemoved<=this.options.moveThreshold)){e=Mt(e);var n=this.snapToGrid(e.clientX,e.clientY),r=t.sourceView;r?r.pointermove(e,n.x,n.y):this.trigger("blank:pointermove",e,n.x,n.y),this.eventData(e,t)}},pointerup:function(e){this.undelegateDocumentEvents();var t=Mt(e),n=this.snapToGrid(t.clientX,t.clientY),r=this.eventData(e).sourceView;r?r.pointerup(t,n.x,n.y):this.trigger("blank:pointerup",t,n.x,n.y),t.isPropagationStopped()||this.pointerclick(C.Event(e,{type:"click",data:e.data})),e.stopImmediatePropagation(),this.delegateEvents()},mouseover:function(e){e=Mt(e);var t=this.findView(e.target);if(!this.guard(e,t))if(t)t.mouseover(e);else{if(this.el===e.target)return;this.trigger("blank:mouseover",e)}},mouseout:function(e){e=Mt(e);var t=this.findView(e.target);if(!this.guard(e,t))if(t)t.mouseout(e);else{if(this.el===e.target)return;this.trigger("blank:mouseout",e)}},mouseenter:function(e){e=Mt(e);const{target:t,relatedTarget:n,currentTarget:r}=e,i=this.findView(t);if(this.guard(e,i))return;const o=this.findView(n);if(i){if(o===i)return;if(i.mouseenter(e),this.el.contains(n))return}o||r===this.el&&this.trigger("paper:mouseenter",e)},mouseleave:function(e){e=Mt(e);const{target:t,relatedTarget:n,currentTarget:r}=e,i=this.findView(t);if(this.guard(e,i))return;const o=this.findView(n);if(i){if(o===i)return;if(i.mouseleave(e),this.el.contains(n))return}o||r===this.el&&this.trigger("paper:mouseleave",e)},mousewheel:function(e){e=Mt(e);var t=this.findView(e.target);if(!this.guard(e,t)){var n=e.originalEvent,r=this.snapToGrid(n.clientX,n.clientY),i=Math.max(-1,Math.min(1,n.wheelDelta));t?t.mousewheel(e,r.x,r.y,i):this.trigger("blank:mousewheel",e,r.x,r.y,i)}},onevent:function(e){var t=e.currentTarget,n=t.getAttribute("event");if(n){var r=this.findView(t);if(r){if(e=Mt(e),this.guard(e,r))return;var i=this.snapToGrid(e.clientX,e.clientY);r.onevent(e,n,i.x,i.y)}}},magnetEvent:function(e,t){var n=e.currentTarget;if(n.getAttribute("magnet")){var r=this.findView(n);if(r){if(e=Mt(e),this.guard(e,r))return;var i=this.snapToGrid(e.clientX,e.clientY);t.call(this,r,e,n,i.x,i.y)}}},onmagnet:function(e){this.magnetEvent(e,(function(e,t,n,r,i){e.onmagnet(t,r,i)}))},magnetpointerdblclick:function(e){this.magnetEvent(e,(function(e,t,n,r,i){e.magnetpointerdblclick(t,n,r,i)}))},magnetcontextmenu:function(e){this.options.preventContextMenu&&e.preventDefault(),this.magnetEvent(e,(function(e,t,n,r,i){e.magnetcontextmenu(t,n,r,i)}))},onlabel:function(e){var t=e.currentTarget,n=this.findView(t);if(n){if(e=Mt(e),this.guard(e,n))return;var r=this.snapToGrid(e.clientX,e.clientY);n.onlabel(e,r.x,r.y)}},getPointerArgs(e){const t=Mt(e),{x:n,y:r}=this.snapToGrid(t.clientX,t.clientY);return[t,n,r]},delegateDragEvents:function(e,t){t||(t={}),this.eventData({data:t},{sourceView:e||null,mousemoved:0}),this.delegateDocumentEvents(null,t),this.undelegateEvents()},guard:function(e,t){return"mousedown"===e.type&&2===e.button||!(!this.options.guard||!this.options.guard(e,t))||(e.data&&void 0!==e.data.guarded?e.data.guarded:!(t&&t.model&&t.model instanceof Gn||this.svg===e.target||this.el===e.target||C.contains(this.svg,e.target)))},setGridSize:function(e){return this.options.gridSize=e,this.options.drawGrid&&this.drawGrid(),this},clearGrid:function(){return this.$grid&&this.$grid.css("backgroundImage","none"),this},_getGridRefs:function(){return this._gridCache||(this._gridCache={root:kt("svg",{width:"100%",height:"100%"},kt("defs")),patterns:{},add:function(e,t){kt(this.root.node.childNodes[0]).append(t),this.patterns[e]=t,this.root.append(kt("rect",{width:"100%",height:"100%",fill:"url(#"+e+")"}))},get:function(e){return this.patterns[e]},exist:function(e){return void 0!==this.patterns[e]}}),this._gridCache},setGrid:function(e){return this.clearGrid(),this._gridCache=null,this._gridSettings=[],(Array.isArray(e)?e:[e||{}]).forEach((function(e){this._gridSettings.push.apply(this._gridSettings,this._resolveDrawGridOption(e))}),this),this},_resolveDrawGridOption:function(e){var t=this.constructor.gridPatterns;if(bn(e)&&Array.isArray(t[e]))return t[e].map((function(e){return Ht({},e)}));var n=e||{args:[{}]},r=Array.isArray(n),i=n.name;if(r||i||n.markup||(i="dot"),i&&Array.isArray(t[i])){var o=t[i].map((function(e){return Ht({},e)})),a=Array.isArray(n.args)?n.args:[n.args||{}];qt(a[0],fn(e,"args"));for(var s=0;s<a.length;s++)o[s]&&Ht(o[s],a[s]);return o}return r?n:[n]},drawGrid:function(e){var t=this.options.gridSize;if(t<=1)return this.clearGrid();var n=Array.isArray(e)?e:[e],r=this.matrix(),i=this._getGridRefs();this._gridSettings.forEach((function(e,o){var a="pattern_"+o,s=vn(e,n[o],{sx:r.a||1,sy:r.d||1,ox:r.e||0,oy:r.f||0});s.width=t*(r.a||1)*(s.scaleFactor||1),s.height=t*(r.d||1)*(s.scaleFactor||1),i.exist(a)||i.add(a,kt("pattern",{id:a,patternUnits:"userSpaceOnUse"},kt(s.markup)));var u=i.get(a);en(s.update)&&s.update(u.node.childNodes[0],s);var l=s.ox%s.width;l<0&&(l+=s.width);var c=s.oy%s.height;c<0&&(c+=s.height),u.attr({x:l,y:c,width:s.width,height:s.height})}));var o=(new XMLSerializer).serializeToString(i.root.node);return o="url(data:image/svg+xml;base64,"+btoa(o)+")",this.$grid.css("backgroundImage",o),this},updateBackgroundImage:function(e){var t=(e=e||{}).position||"center",n=e.size||"auto auto",r=this.scale(),i=this.translate();mn(t)&&(t=i.tx+r.sx*(t.x||0)+"px "+(i.ty+r.sy*(t.y||0))+"px"),mn(n)&&(n=(n=new me(n).scale(r.sx,r.sy)).width+"px "+n.height+"px"),this.$background.css({backgroundSize:n,backgroundPosition:t})},drawBackgroundImage:function(e,t){if(e instanceof HTMLImageElement){if(this._background&&this._background.id===t.id){var n,r=(t=t||{}).size,i=t.repeat||"no-repeat",o=t.opacity||1,a=Math.abs(t.quality)||1,s=this.constructor.backgroundPatterns[pn(i)];if(en(s)){e.width*=a,e.height*=a;var u=s(e,t);if(!(u instanceof HTMLCanvasElement))throw new Error("dia.Paper: background pattern must return an HTML Canvas instance");n=u.toDataURL("image/png"),i="repeat",mn(r)?(r.width*=u.width/e.width,r.height*=u.height/e.height):void 0===r&&(t.size={width:u.width/a,height:u.height/a})}else n=e.src,void 0===r&&(t.size={width:e.width,height:e.height});this.$background.css({opacity:o,backgroundRepeat:i,backgroundImage:"url("+n+")"}),this.updateBackgroundImage(t)}}else this.$background.css("backgroundImage","")},updateBackgroundColor:function(e){this.$el.css("backgroundColor",e||"")},drawBackground:function(e){if(e=e||{},this.updateBackgroundColor(e.color),e.image){e=this._background=Jt(e),Ot(e);var t=document.createElement("img");t.onload=this.drawBackgroundImage.bind(this,t,e),t.src=e.image}else this.drawBackgroundImage(null),this._background=null;return this},setInteractivity:function(e){this.options.interactive=e,Gt(this._views,"setInteractivity",e)},isDefined:function(e){return!!this.svg.getElementById(e)},defineFilter:function(e){if(!mn(e))throw new TypeError("dia.Paper: defineFilter() requires 1. argument to be an object.");var t=e.id,n=e.name;if(t||(t=n+this.svg.id+At(JSON.stringify(e))),!this.isDefined(t)){var r=$t,i=r[n]&&r[n](e.args||{});if(!i)throw new Error("Non-existing filter "+n);var o=Ht({filterUnits:"objectBoundingBox",x:-1,y:-1,width:3,height:3},e.attrs,{id:t});kt(i,o).appendTo(this.defs)}return t},defineGradient:function(e){if(!mn(e))throw new TypeError("dia.Paper: defineGradient() requires 1. argument to be an object.");const{svg:t,defs:n}=this,{type:r,id:i=r+t.id+At(JSON.stringify(e)),stops:o,attrs:a={}}=e;if(this.isDefined(i))return i;const s=nn(o).map((({offset:e,color:t,opacity:n})=>kt("stop").attr({offset:e,"stop-color":t,"stop-opacity":Number.isFinite(n)?n:1}))),u=kt(r,a,s);return u.id=i,u.appendTo(n),i},definePattern:function(e){if(!mn(e))throw new TypeError("dia.Paper: definePattern() requires 1. argument to be an object.");const{svg:t,defs:n}=this,{id:r=t.id+At(JSON.stringify(e)),markup:i,attrs:o={}}=e;if(!i)throw new TypeError("dia.Paper: definePattern() requires markup.");if(this.isDefined(r))return r;const a=kt("pattern",{patternUnits:"userSpaceOnUse"});if(a.id=r,a.attr(o),"string"==typeof i)a.append(kt(i));else{const{fragment:e}=Ct(i);a.append(e)}return a.appendTo(n),r},defineMarker:function(e){if(!mn(e))throw new TypeError("dia.Paper: defineMarker() requires 1. argument to be an object.");const{svg:t,defs:n}=this,{id:r=t.id+At(JSON.stringify(e)),markup:i,attrs:o={},markerUnits:a="userSpaceOnUse"}=e;if(this.isDefined(r))return r;const s=kt("marker",{orient:"auto",overflow:"visible",markerUnits:a});if(s.id=r,s.attr(o),i)if("string"==typeof i)s.append(kt(i));else{const{fragment:e}=Ct(i);s.append(e)}else{const{type:t="path"}=e,n=kt(t,fn(e,"type","id","markup","attrs","markerUnits"));s.append(n)}return s.appendTo(n),r}},{sorting:No,Layers:Yi,backgroundPatterns:{flipXy:function(e){var t=document.createElement("canvas"),n=e.width,r=e.height;t.width=2*n,t.height=2*r;var i=t.getContext("2d");return i.drawImage(e,0,0,n,r),i.setTransform(-1,0,0,-1,t.width,t.height),i.drawImage(e,0,0,n,r),i.setTransform(-1,0,0,1,t.width,0),i.drawImage(e,0,0,n,r),i.setTransform(1,0,0,-1,0,t.height),i.drawImage(e,0,0,n,r),t},flipX:function(e){var t=document.createElement("canvas"),n=e.width,r=e.height;t.width=2*n,t.height=r;var i=t.getContext("2d");return i.drawImage(e,0,0,n,r),i.translate(2*n,0),i.scale(-1,1),i.drawImage(e,0,0,n,r),t},flipY:function(e){var t=document.createElement("canvas"),n=e.width,r=e.height;t.width=n,t.height=2*r;var i=t.getContext("2d");return i.drawImage(e,0,0,n,r),i.translate(0,2*r),i.scale(1,-1),i.drawImage(e,0,0,n,r),t},watermark:function(e,t){t=t||{};var n=e.width,r=e.height,i=document.createElement("canvas");i.width=3*n,i.height=3*r;for(var o=i.getContext("2d"),a=yn(t.watermarkAngle)?-t.watermarkAngle:-20,s=R(a),u=i.width/4,l=i.height/4,c=0;c<4;c++)for(var f=0;f<4;f++)(c+f)%2>0&&(o.setTransform(1,0,0,1,(2*c-1)*u,(2*f-1)*l),o.rotate(s),o.drawImage(e,-n/2,-r/2,n,r));return i}},gridPatterns:{dot:[{color:"#AAAAAA",thickness:1,markup:"rect",update:function(e,t){kt(e).attr({width:t.thickness*t.sx,height:t.thickness*t.sy,fill:t.color})}}],fixedDot:[{color:"#AAAAAA",thickness:1,markup:"rect",update:function(e,t){var n=t.sx<=1?t.thickness*t.sx:t.thickness;kt(e).attr({width:n,height:n,fill:t.color})}}],mesh:[{color:"#AAAAAA",thickness:1,markup:"path",update:function(e,t){var n,r=t.width,i=t.height,o=t.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",kt(e).attr({d:n,stroke:t.color,"stroke-width":t.thickness})}}],doubleMesh:[{color:"#AAAAAA",thickness:1,markup:"path",update:function(e,t){var n,r=t.width,i=t.height,o=t.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",kt(e).attr({d:n,stroke:t.color,"stroke-width":t.thickness})}},{color:"#000000",thickness:3,scaleFactor:4,markup:"path",update:function(e,t){var n,r=t.width,i=t.height,o=t.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",kt(e).attr({d:n,stroke:t.color,"stroke-width":t.thickness})}}]}}),Fo={exportElement:function(e){return e.size()},exportLink:function(e){var t=e.get("labelSize")||{};return{minLen:e.get("minLen")||1,weight:e.get("weight")||1,labelpos:e.get("labelPosition")||"c",labeloffset:e.get("labelOffset")||0,width:t.width||0,height:t.height||0}},importElement:function(e,t,n){var r=this.getCell(t),i=n.node(t);e.setPosition?e.setPosition(r,i):r.set("position",{x:i.x-i.width/2,y:i.y-i.height/2})},importLink:function(e,t,n){const r=this.getCell(t.name),i=n.edge(t),o=i.points||[],a=new ke(o);if(e.setVertices||e.setLinkVertices)if(en(e.setVertices))e.setVertices(r,o);else{a.simplify({threshold:.001});const e=a.points.map((e=>e.toJSON())),t=e.length;r.set("vertices",e.slice(1,t-1))}if(e.setLabels&&"x"in i&&"y"in i){const t={x:i.x,y:i.y};if(en(e.setLabels))e.setLabels(r,t,o);else{const e=a.closestPointLength(t),n=a.pointAtLength(e),i=e/a.length(),o=new Z(t).difference(n).toJSON();r.label(0,{position:{distance:i,offset:o}})}}},layout:function(e,t){var n;n=e instanceof Tr?e:(new Tr).resetCells(e,{dry:!0,sort:!1}),e=null;const r=(t=qt(t||{},{resizeClusters:!0,clusterPadding:10,exportElement:this.exportElement,exportLink:this.exportLink})).dagre||("undefined"!=typeof dagre?dagre:void 0);if(void 0===r)throw new Error('The the "dagre" utility is a mandatory dependency.');var i=Fo.toGraphLib(n,{graphlib:t.graphlib,directed:!0,multigraph:!0,compound:!0,setNodeLabel:t.exportElement,setEdgeLabel:t.exportLink,setEdgeName:function(e){return e.id}}),o={},a=t.marginX||0,s=t.marginY||0;if(t.rankDir&&(o.rankdir=t.rankDir),t.align&&(o.align=t.align),t.nodeSep&&(o.nodesep=t.nodeSep),t.edgeSep&&(o.edgesep=t.edgeSep),t.rankSep&&(o.ranksep=t.rankSep),t.ranker&&(o.ranker=t.ranker),a&&(o.marginx=a),s&&(o.marginy=s),i.setGraph(o),r.layout(i,{debugTiming:!!t.debugTiming}),n.startBatch("layout"),Fo.fromGraphLib(i,{importNode:this.importElement.bind(n,t),importEdge:this.importLink.bind(n,t)}),t.resizeClusters){var u=i.nodes().filter((function(e){return i.children(e).length>0})).map(n.getCell.bind(n)).sort((function(e,t){return t.getAncestors().length-e.getAncestors().length}));Gt(u,"fitEmbeds",{padding:t.clusterPadding})}n.stopBatch("layout");var l=i.graph();return new me(a,s,Math.abs(l.width-2*a),Math.abs(l.height-2*s))},fromGraphLib:function(e,t){var n=(t=t||{}).importNode||wn,r=t.importEdge||wn,i=this instanceof Tr?this:new Tr;return e.nodes().forEach((function(r){n.call(i,r,e,i,t)})),e.edges().forEach((function(n){r.call(i,n,e,i,t)})),i},toGraphLib:function(e,t){const n=(t=t||{}).graphlib||("undefined"!=typeof graphlib?graphlib:void 0);if(void 0===n)throw new Error('The the "graphlib" utility is a mandatory dependency.');for(var r=hn(t,"directed","compound","multigraph"),i=new n.Graph(r),o=t.setNodeLabel||wn,a=t.setEdgeLabel||wn,s=t.setEdgeName||wn,u=e.get("cells"),l=0,c=u.length;l<c;l++){var f=u.at(l);if(f.isLink()){var h=f.get("source"),d=f.get("target");if(!h.id||!d.id)break;i.setEdge(h.id,d.id,a(f),s(f))}else if(i.setNode(f.id,o(f)),i.isCompound()&&f.has("parent")){var p=f.get("parent");u.has(p)&&i.setParent(f.id,p)}}return i}};function zo(e,t){return 0===t?"0%":Math.round(e/t*100*1e3)/1e3+"%"}function Vo(e){return function(t,n,r,i){return(n.isNodeConnection(r)?$o:Bo)(e,t,n,r,i)}}function Bo(e,t,n,r,i){var o=n.model.angle(),a=n.getNodeUnrotatedBBox(r),s=n.model.getBBox().center();i.rotate(s,o);var u=i.x-a.x,l=i.y-a.y;return e&&(u=zo(u,a.width),l=zo(l,a.height)),t.anchor={name:"topLeft",args:{dx:u,dy:l,rotate:!0}},t}function $o(e,t,n,r,i){var o=n.getConnection();if(!o)return t;var a=o.closestPointLength(i);if(e){var s=o.length();t.anchor={name:"connectionRatio",args:{ratio:a/s}}}else t.anchor={name:"connectionLength",args:{length:a}};return t}Tr.prototype.toGraphLib=function(e){return Fo.toGraphLib(this,e)},Tr.prototype.fromGraphLib=function(e,t){return Fo.fromGraphLib.call(this,e,t)},Vo(!1);const Uo=Vo(!0),Ho=Or.extend({name:null,tagName:"g",className:"tool",svgElement:!0,_visible:!0,init:function(){var e=this.name;e&&this.vel.attr("data-tool-name",e)},configure:function(e,t){return this.relatedView=e,this.paper=e.paper,this.parentView=t,this.simulateRelatedView(this.el),this.delegateEvents(),this},simulateRelatedView:function(e){e&&e.setAttribute("model-id",this.relatedView.model.id)},getName:function(){return this.name},show:function(){this.el.style.display="",this._visible=!0},hide:function(){this.el.style.display="none",this._visible=!1},isVisible:function(){return!!this._visible},focus:function(){var e=this.options.focusOpacity;isFinite(e)&&(this.el.style.opacity=e),this.parentView.focusTool(this)},blur:function(){this.el.style.opacity="",this.parentView.blurTool(this)},update:function(){},guard:function(e){const{paper:t,relatedView:n}=this;return!t||!n||t.guard(e,n)}});function qo(e,t,n){return Uo.call(this.paper,{},t,n,e,this.model).anchor}function Wo(e,t){const{model:n}=e;return t?n.getBBox():n.isLink()?e.getConnection().bbox():e.getNodeUnrotatedBBox(e.el)}var Go=Or.extend({tagName:"circle",svgElement:!0,className:"marker-vertex",events:{mousedown:"onPointerDown",touchstart:"onPointerDown",dblclick:"onDoubleClick",dbltap:"onDoubleClick"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},attributes:{r:6,fill:"#33334F",stroke:"#FFFFFF","stroke-width":2,cursor:"move"},position:function(e,t){this.vel.attr({cx:e,cy:t})},onPointerDown:function(e){this.options.guard(e)||(e.stopPropagation(),e.preventDefault(),this.options.paper.undelegateEvents(),this.delegateDocumentEvents(null,e.data),this.trigger("will-change",this,e))},onPointerMove:function(e){this.trigger("changing",this,e)},onDoubleClick:function(e){this.trigger("remove",this,e)},onPointerUp:function(e){this.trigger("changed",this,e),this.undelegateDocumentEvents(),this.options.paper.delegateEvents()}}),Yo=(Ho.extend({name:"vertices",options:{handleClass:Go,snapRadius:20,redundancyRemoval:!0,vertexAdding:!0,stopPropagation:!0},children:[{tagName:"path",selector:"connection",className:"joint-vertices-path",attributes:{fill:"none",stroke:"transparent","stroke-width":10,cursor:"cell"}}],handles:null,events:{"mousedown .joint-vertices-path":"onPathPointerDown","touchstart .joint-vertices-path":"onPathPointerDown"},onRender:function(){return this.options.vertexAdding&&(this.renderChildren(),this.updatePath()),this.resetHandles(),this.renderHandles(),this},update:function(){return this.relatedView.model.vertices().length===this.handles.length?this.updateHandles():(this.resetHandles(),this.renderHandles()),this.options.vertexAdding&&this.updatePath(),this},resetHandles:function(){var e=this.handles;if(this.handles=[],this.stopListening(),Array.isArray(e))for(var t=0,n=e.length;t<n;t++)e[t].remove()},renderHandles:function(){for(var e=this.relatedView.model.vertices(),t=0,n=e.length;t<n;t++){var r=e[t],i=new this.options.handleClass({index:t,paper:this.paper,guard:e=>this.guard(e)});i.render(),i.position(r.x,r.y),this.simulateRelatedView(i.el),i.vel.appendTo(this.el),this.handles.push(i),this.startHandleListening(i)}},updateHandles:function(){for(var e=this.relatedView.model.vertices(),t=0,n=e.length;t<n;t++){var r=e[t],i=this.handles[t];if(!i)return;i.position(r.x,r.y)}},updatePath:function(){var e=this.childNodes.connection;e&&e.setAttribute("d",this.relatedView.getSerializedConnection())},startHandleListening:function(e){var t=this.relatedView;t.can("vertexMove")&&(this.listenTo(e,"will-change",this.onHandleWillChange),this.listenTo(e,"changing",this.onHandleChanging),this.listenTo(e,"changed",this.onHandleChanged)),t.can("vertexRemove")&&this.listenTo(e,"remove",this.onHandleRemove)},getNeighborPoints:function(e){var t=this.relatedView,n=t.model.vertices(),r=e>0?n[e-1]:t.sourceAnchor,i=e<n.length-1?n[e+1]:t.targetAnchor;return{prev:new Z(r),next:new Z(i)}},onHandleWillChange:function(e,t){this.focus();const{relatedView:n,options:r}=this;n.model.startBatch("vertex-move",{ui:!0,tool:this.cid}),r.stopPropagation||n.notifyPointerdown(...n.paper.getPointerArgs(t))},onHandleChanging:function(e,t){const{options:n,relatedView:r}=this;var i=e.options.index,[o,a,s]=r.paper.getPointerArgs(t),u={x:a,y:s};this.snapVertex(u,i),r.model.vertex(i,u,{ui:!0,tool:this.cid}),e.position(u.x,u.y),n.stopPropagation||r.notifyPointermove(o,a,s)},onHandleChanged:function(e,t){const{options:n,relatedView:r}=this;if(n.vertexAdding&&this.updatePath(),n.redundancyRemoval){r.removeRedundantLinearVertices({ui:!0,tool:this.cid})&&this.render(),this.blur(),r.model.stopBatch("vertex-move",{ui:!0,tool:this.cid}),this.eventData(t).vertexAdded&&r.model.stopBatch("vertex-add",{ui:!0,tool:this.cid});var[i,o,a]=r.paper.getPointerArgs(t);n.stopPropagation||r.notifyPointerup(i,o,a),r.checkMouseleave(i)}},snapVertex:function(e,t){var n=this.options.snapRadius;if(n>0){var r=this.getNeighborPoints(t),i=r.prev,o=r.next;Math.abs(e.x-i.x)<n?e.x=i.x:Math.abs(e.x-o.x)<n&&(e.x=o.x),Math.abs(e.y-i.y)<n?e.y=r.prev.y:Math.abs(e.y-o.y)<n&&(e.y=o.y)}},onHandleRemove:function(e,t){var n=e.options.index,r=this.relatedView;r.model.removeVertex(n,{ui:!0}),this.options.vertexAdding&&this.updatePath(),r.checkMouseleave(Mt(t))},onPathPointerDown:function(e){if(!this.guard(e)){e.stopPropagation(),e.preventDefault();var t=Mt(e),n=this.paper.snapToGrid(t.clientX,t.clientY).toJSON(),r=this.relatedView;r.model.startBatch("vertex-add",{ui:!0,tool:this.cid});var i=r.getVertexIndex(n.x,n.y);this.snapVertex(n,i),r.model.insertVertex(i,n,{ui:!0,tool:this.cid}),this.update();var o=this.handles[i];this.eventData(t,{vertexAdded:!0}),o.onPointerDown(t)}},onRemove:function(){this.resetHandles()}},{VertexHandle:Go}),Or.extend({tagName:"g",svgElement:!0,className:"marker-segment",events:{mousedown:"onPointerDown",touchstart:"onPointerDown"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},children:[{tagName:"line",selector:"line",attributes:{stroke:"#33334F","stroke-width":2,fill:"none","pointer-events":"none"}},{tagName:"rect",selector:"handle",attributes:{width:20,height:8,x:-10,y:-4,rx:4,ry:4,fill:"#33334F",stroke:"#FFFFFF","stroke-width":2}}],onRender:function(){this.renderChildren()},position:function(e,t,n,r){var i=kt.createSVGMatrix().translate(e,t).rotate(n),o=this.childNodes.handle;o.setAttribute("transform",kt.matrixToTransformString(i)),o.setAttribute("cursor",n%180==0?"row-resize":"col-resize");var a=r.getClosestPoint(new Z(e,t)),s=this.childNodes.line;s.setAttribute("x1",e),s.setAttribute("y1",t),s.setAttribute("x2",a.x),s.setAttribute("y2",a.y)},onPointerDown:function(e){this.options.guard(e)||(this.trigger("change:start",this,e),e.stopPropagation(),e.preventDefault(),this.options.paper.undelegateEvents(),this.delegateDocumentEvents(null,e.data))},onPointerMove:function(e){this.trigger("changing",this,e)},onPointerUp:function(e){this.undelegateDocumentEvents(),this.options.paper.delegateEvents(),this.trigger("change:end",this,e)},show:function(){this.el.style.display=""},hide:function(){this.el.style.display="none"}})),Xo=(Ho.extend({name:"segments",precision:.5,options:{handleClass:Yo,segmentLengthThreshold:40,redundancyRemoval:!0,anchor:qo,snapRadius:10,snapHandle:!0,stopPropagation:!0},handles:null,onRender:function(){this.resetHandles();var e=this.relatedView,t=e.model.vertices();t.unshift(e.sourcePoint),t.push(e.targetPoint);for(var n=0,r=t.length;n<r-1;n++){var i=t[n],o=t[n+1],a=this.renderHandle(i,o);this.simulateRelatedView(a.el),this.handles.push(a),a.options.index=n}return this},renderHandle:function(e,t){var n=new this.options.handleClass({paper:this.paper,guard:e=>this.guard(e)});return n.render(),this.updateHandle(n,e,t),n.vel.appendTo(this.el),this.startHandleListening(n),n},update:function(){return this.render(),this},startHandleListening:function(e){this.listenTo(e,"change:start",this.onHandleChangeStart),this.listenTo(e,"changing",this.onHandleChanging),this.listenTo(e,"change:end",this.onHandleChangeEnd)},resetHandles:function(){var e=this.handles;if(this.handles=[],this.stopListening(),Array.isArray(e))for(var t=0,n=e.length;t<n;t++)e[t].remove()},shiftHandleIndexes:function(e){for(var t=this.handles,n=0,r=t.length;n<r;n++)t[n].options.index+=e},resetAnchor:function(e,t){var n=this.relatedView.model;t?n.prop([e,"anchor"],t,{rewrite:!0,ui:!0,tool:this.cid}):n.removeProp([e,"anchor"],{ui:!0,tool:this.cid})},snapHandle:function(e,t,n){var r=e.options.index,i=this.relatedView.model.vertices(),o=e.options.axis,a=i[r-2]||n.sourceAnchor,s=i[r+1]||n.targetAnchor,u=this.options.snapRadius;return Math.abs(t[o]-a[o])<u?t[o]=a[o]:Math.abs(t[o]-s[o])<u&&(t[o]=s[o]),t},onHandleChanging:function(e,t){const{options:n}=this;var r=this.eventData(t),i=this.relatedView,o=i.paper,a=e.options.index-1,s=Mt(t),u=o.snapToGrid(s.clientX,s.clientY),l=this.snapHandle(e,u.clone(),r),c=e.options.axis,f=this.options.snapHandle?0:u[c]-l[c],h=i.model,d=Jt(h.vertices()),p=d[a],g=d[a+1],v=this.options.anchor;"function"!=typeof v&&(v=null);var m=i.sourceView,y=i.sourceBBox,b=!1,w=!1;if(p?0===a?y.containsPoint(p)?(d.shift(),this.shiftHandleIndexes(-1),b=!0):(p[c]=l[c],w=!0):p[c]=l[c]:((p=i.sourceAnchor.toJSON())[c]=l[c],y.containsPoint(p)?(p[c]=l[c],b=!0):(d.unshift(p),this.shiftHandleIndexes(1),w=!0)),v&&m){if(b){var x=r.sourceAnchor.clone();x[c]=l[c];var k=v.call(i,x,m,i.sourceMagnet||m.el,"source",i);this.resetAnchor("source",k)}w&&this.resetAnchor("source",r.sourceAnchorDef)}var S=i.targetView,_=i.targetBBox,E=!1,C=!1;if(g?a===d.length-2?_.containsPoint(g)?(d.pop(),E=!0):(g[c]=l[c],C=!0):g[c]=l[c]:((g=i.targetAnchor.toJSON())[c]=l[c],_.containsPoint(g)?E=!0:(d.push(g),C=!0)),v&&S){if(E){var A=r.targetAnchor.clone();A[c]=l[c];var P=v.call(i,A,S,i.targetMagnet||S.el,"target",i);this.resetAnchor("target",P)}C&&this.resetAnchor("target",r.targetAnchorDef)}h.vertices(d,{ui:!0,tool:this.cid}),this.updateHandle(e,p,g,f),n.stopPropagation||i.notifyPointermove(s,u.x,u.y)},onHandleChangeStart:function(e,t){const{options:n,handles:r,relatedView:i}=this,{model:o,paper:a}=i;var s=e.options.index;if(Array.isArray(r)){for(var u=0,l=r.length;u<l;u++)u!==s&&r[u].hide();this.focus(),this.eventData(t,{sourceAnchor:i.sourceAnchor.clone(),targetAnchor:i.targetAnchor.clone(),sourceAnchorDef:Kt(o.prop(["source","anchor"])),targetAnchorDef:Kt(o.prop(["target","anchor"]))}),o.startBatch("segment-move",{ui:!0,tool:this.cid}),n.stopPropagation||i.notifyPointerdown(...a.getPointerArgs(t))}},onHandleChangeEnd:function(e,t){const{options:n,relatedView:r}=this,{paper:i,model:o}=r;n.redundancyRemoval&&r.removeRedundantLinearVertices({ui:!0,tool:this.cid});const a=Mt(t),s=i.snapToGrid(a.clientX,a.clientY);this.render(),this.blur(),o.stopBatch("segment-move",{ui:!0,tool:this.cid}),n.stopPropagation||r.notifyPointerup(a,s.x,s.y),r.checkMouseleave(a)},updateHandle:function(e,t,n,r){var i=Math.abs(t.x-n.x)<this.precision,o=Math.abs(t.y-n.y)<this.precision;if(i||o){var a=new re(t,n);if(a.length()<this.options.segmentLengthThreshold)e.hide();else{var s=a.midpoint(),u=i?"x":"y";s[u]+=r||0;var l=a.vector().vectorAngle(new Z(1,0));e.position(s.x,s.y,l,this.relatedView),e.show(),e.options.axis=u}}else e.hide()},onRemove:function(){this.resetHandles()}},{SegmentHandle:Yo}),Ho.extend({tagName:"path",xAxisVector:new Z(1,0),events:{mousedown:"onPointerDown",touchstart:"onPointerDown"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},onRender:function(){this.update()},update:function(){var e,t,n=this.ratio,r=this.relatedView,i=r.getTangentAtRatio(n);if(i?(e=i.start,t=i.vector().vectorAngle(this.xAxisVector)||0):(e=r.getPointAtRatio(n),t=0),!e)return this;var o=kt.createSVGMatrix().translate(e.x,e.y).rotate(t);return this.vel.transform(o,{absolute:!0}),this},onPointerDown:function(e){if(!this.guard(e)){e.stopPropagation(),e.preventDefault();var t=this.relatedView;t.model.startBatch("arrowhead-move",{ui:!0,tool:this.cid}),t.can("arrowheadMove")&&(t.startArrowheadMove(this.arrowheadType),this.delegateDocumentEvents(),t.paper.undelegateEvents()),this.focus(),this.el.style.pointerEvents="none"}},onPointerMove:function(e){var t=Mt(e),n=this.paper.snapToGrid(t.clientX,t.clientY);this.relatedView.pointermove(t,n.x,n.y)},onPointerUp:function(e){this.undelegateDocumentEvents();var t=this.relatedView,n=t.paper,r=Mt(e),i=n.snapToGrid(r.clientX,r.clientY);t.pointerup(r,i.x,i.y),n.delegateEvents(),this.blur(),this.el.style.pointerEvents="",t.model.stopBatch("arrowhead-move",{ui:!0,tool:this.cid})}})),Ko=(Xo.extend({name:"target-arrowhead",ratio:1,arrowheadType:"target",attributes:{d:"M -10 -8 10 0 -10 8 Z",fill:"#33334F",stroke:"#FFFFFF","stroke-width":2,cursor:"move",class:"target-arrowhead"}}),Xo.extend({name:"source-arrowhead",ratio:0,arrowheadType:"source",attributes:{d:"M 10 -8 -10 0 10 8 Z",fill:"#33334F",stroke:"#FFFFFF","stroke-width":2,cursor:"move",class:"source-arrowhead"}}),Ho.extend({name:"button",events:{mousedown:"onPointerDown",touchstart:"onPointerDown"},options:{distance:0,offset:0,rotate:!1},onRender:function(){this.renderChildren(this.options.markup),this.update()},update:function(){return this.position(),this},position:function(){const{relatedView:e,vel:t}=this,n=e.model.isLink()?this.getLinkMatrix():this.getElementMatrix();t.transform(n,{absolute:!0})},getElementMatrix(){const{relatedView:e,options:t}=this;let{x:n=0,y:r=0,offset:i={},useModelGeometry:o,rotate:a}=t,s=Wo(e,o);const u=e.model.angle();a||(s=s.bbox(u));const{x:l=0,y:c=0}=i;jt(n)&&(n=parseFloat(n)/100*s.width),jt(r)&&(r=parseFloat(r)/100*s.height);let f=kt.createSVGMatrix().translate(s.x+s.width/2,s.y+s.height/2);return a&&(f=f.rotate(u)),f=f.translate(n+l-s.width/2,r+c-s.height/2),f},getLinkMatrix(){const{relatedView:e,options:t}=this,{offset:n=0,distance:r=0,rotate:i}=t;let o,a,s;o=jt(r)?e.getTangentAtRatio(parseFloat(r)/100):e.getTangentAtLength(r),o?(a=o.start,s=o.vector().vectorAngle(new Z(1,0))||0):(a=e.getConnection().start,s=0);let u=kt.createSVGMatrix().translate(a.x,a.y).rotate(s).translate(0,n);return i||(u=u.rotate(-s)),u},onPointerDown:function(e){if(!this.guard(e)){e.stopPropagation(),e.preventDefault();var t=this.options.action;"function"==typeof t&&t.call(this.relatedView,e,this.relatedView,this)}}})),Jo=Ko.extend({children:[{tagName:"circle",selector:"button",attributes:{r:7,fill:"#FF1D00",cursor:"pointer"}},{tagName:"path",selector:"icon",attributes:{d:"M -3 -3 3 3 M -3 3 3 -3",fill:"none",stroke:"#FFFFFF","stroke-width":2,"pointer-events":"none"}}],options:{distance:60,offset:0,action:function(e,t,n){t.model.remove({ui:!0,tool:n.cid})}}});Ko.extend({name:"connect",documentEvents:{mousemove:"drag",touchmove:"drag",mouseup:"dragend",touchend:"dragend",touchcancel:"dragend"},children:[{tagName:"circle",selector:"button",attributes:{r:7,fill:"#333333",cursor:"pointer"}},{tagName:"path",selector:"icon",attributes:{d:"M -4 -1 L 0 -1 L 0 -4 L 4 0 L 0 4 0 1 -4 1 z",fill:"#FFFFFF",stroke:"none","stroke-width":2,"pointer-events":"none"}}],options:{distance:80,offset:0,magnet:e=>e.el,action:(e,t,n)=>n.dragstart(e)},getMagnetNode:function(){const{options:e,relatedView:t}=this,{magnet:n}=e;let r;switch(typeof n){case"function":r=n.call(this,t,this);break;case"string":[r]=t.findBySelector(n);break;default:r=n}if(r||(r=t.el),r instanceof SVGElement)return r;throw new Error("Connect: magnet must be an SVGElement")},dragstart:function(e){const{paper:t,relatedView:n}=this,r=Mt(e),{x:i,y:o}=t.clientToLocalPoint(r.clientX,r.clientY);n.dragLinkStart(r,this.getMagnetNode(),i,o),t.undelegateEvents(),this.delegateDocumentEvents(null,e.data),this.focus()},drag:function(e){const{paper:t,relatedView:n}=this,r=Mt(e),{x:i,y:o}=t.snapToGrid(r.clientX,r.clientY);n.dragLink(r,i,o)},dragend:function(e){const{paper:t,relatedView:n}=this,r=Mt(e),{x:i,y:o}=t.snapToGrid(r.clientX,r.clientY);n.dragLinkEnd(r,i,o),this.undelegateDocumentEvents(),t.delegateEvents(),this.blur(),n.checkMouseleave(r)}}),Ho.extend({name:"boundary",tagName:"rect",options:{padding:10,useModelGeometry:!1},attributes:{fill:"none",stroke:"#33334F","stroke-width":.5,"stroke-dasharray":"5, 5","pointer-events":"none"},onRender:function(){this.update()},update:function(){const{relatedView:e,options:t,vel:n}=this,{useModelGeometry:r,rotate:i}=t,o=zt(t.padding);let a=Wo(e,r).moveAndExpand({x:-o.left,y:-o.top,width:o.left+o.right,height:o.top+o.bottom});var s=e.model;if(s.isElement()){var u=s.angle();if(u)if(i){var l=s.getBBox().center();n.rotate(u,l.x,l.y,{absolute:!0})}else a=a.bbox(u)}return n.attr(a.toJSON()),this}});var Qo=Ho.extend({tagName:"g",type:null,children:[{tagName:"circle",selector:"anchor",attributes:{cursor:"pointer"}},{tagName:"rect",selector:"area",attributes:{"pointer-events":"none",fill:"none",stroke:"#33334F","stroke-dasharray":"2,4",rx:5,ry:5}}],events:{mousedown:"onPointerDown",touchstart:"onPointerDown",dblclick:"onPointerDblClick",dbltap:"onPointerDblClick"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},options:{snap:function(e,t,n,r,i,o){var a=o.options.snapRadius,s="source"===r,u=s?0:-1,l=this.model.vertex(u)||this.getEndAnchor(s?"target":"source");return l&&(Math.abs(l.x-e.x)<a&&(e.x=l.x),Math.abs(l.y-e.y)<a&&(e.y=l.y)),e},anchor:qo,resetAnchor:!0,customAnchorAttributes:{"stroke-width":4,stroke:"#33334F",fill:"#FFFFFF",r:5},defaultAnchorAttributes:{"stroke-width":2,stroke:"#FFFFFF",fill:"#33334F",r:6},areaPadding:6,snapRadius:10,restrictArea:!0,redundancyRemoval:!0},onRender:function(){this.renderChildren(),this.toggleArea(!1),this.update()},update:function(){var e=this.type;return this.relatedView.getEndView(e)?(this.updateAnchor(),this.updateArea(),this.el.style.display=""):this.el.style.display="none",this},updateAnchor:function(){var e=this.childNodes;if(e){var t=e.anchor;if(t){var n=this.relatedView,r=this.type,i=n.getEndAnchor(r),o=this.options,a=n.model.prop([r,"anchor"]);t.setAttribute("transform","translate("+i.x+","+i.y+")");var s=a?o.customAnchorAttributes:o.defaultAnchorAttributes;for(var u in s)t.setAttribute(u,s[u])}}},updateArea:function(){var e=this.childNodes;if(e){var t=e.area;if(t){var n,r,i,o=this.relatedView,a=this.type,s=o.getEndView(a),u=s.model,l=o.getEndMagnet(a),c=this.options.areaPadding;isFinite(c)||(c=0),s.isNodeConnection(l)?(r=0,i=(n=s.getBBox()).center()):(n=s.getNodeUnrotatedBBox(l),r=u.angle(),i=n.center(),r&&i.rotate(u.getBBox().center(),-r)),n.inflate(c),t.setAttribute("x",-n.width/2),t.setAttribute("y",-n.height/2),t.setAttribute("width",n.width),t.setAttribute("height",n.height),t.setAttribute("transform","translate("+i.x+","+i.y+") rotate("+r+")")}}},toggleArea:function(e){this.childNodes.area.style.display=e?"":"none"},onPointerDown:function(e){this.guard(e)||(e.stopPropagation(),e.preventDefault(),this.paper.undelegateEvents(),this.delegateDocumentEvents(),this.focus(),this.toggleArea(this.options.restrictArea),this.relatedView.model.startBatch("anchor-move",{ui:!0,tool:this.cid}))},resetAnchor:function(e){var t=this.type,n=this.relatedView.model;e?n.prop([t,"anchor"],e,{rewrite:!0,ui:!0,tool:this.cid}):n.removeProp([t,"anchor"],{ui:!0,tool:this.cid})},onPointerMove:function(e){var t,n=this.relatedView,r=this.type,i=n.getEndView(r),o=i.model,a=n.getEndMagnet(r),s=Mt(e),u=this.paper.clientToLocalPoint(s.clientX,s.clientY),l=this.options.snap;if("function"==typeof l&&(u=l.call(n,u,i,a,r,n,this),u=new Z(u)),this.options.restrictArea)if(i.isNodeConnection(a)){var c=i.getClosestPoint(u);c&&(u=c)}else{var f=i.getNodeUnrotatedBBox(a),h=o.angle(),d=o.getBBox().center(),p=u.clone().rotate(d,h);f.containsPoint(p)||(u=f.pointNearestToPoint(p).rotate(d,-h))}var g=this.options.anchor;"function"==typeof g&&(t=g.call(n,u,i,a,r,n)),this.resetAnchor(t),this.update()},onPointerUp:function(e){this.paper.delegateEvents(),this.undelegateDocumentEvents(),this.blur(),this.toggleArea(!1);var t=this.relatedView;this.options.redundancyRemoval&&t.removeRedundantLinearVertices({ui:!0,tool:this.cid}),t.model.stopBatch("anchor-move",{ui:!0,tool:this.cid})},onPointerDblClick:function(){var e=this.options.resetAnchor;!1!==e&&(!0===e&&(e=null),this.resetAnchor(Jt(e)),this.update())}});Qo.extend({name:"source-anchor",type:"source"}),Qo.extend({name:"target-anchor",type:"target"});const Zo=Or.extend({tagName:"g",className:"tools",svgElement:!0,tools:null,isRendered:!1,options:{tools:null,relatedView:null,name:null},configure:function(e){var t=(e=Ht(this.options,e)).tools;if(!Array.isArray(t))return this;var n=e.relatedView;if(!(n instanceof Ir))return this;for(var r=this.tools=[],i=0,o=t.length;i<o;i++){var a=t[i];a instanceof Ho&&(a.configure(n,this),this.vel.append(a.el),r.push(a))}return this.isRendered=!1,n.requestUpdate(n.getFlag("TOOLS")),this},getName:function(){return this.options.name},update:function(e){e||(e={});var t=this.tools;if(!t)return this;for(var n=this.isRendered,r=0,i=t.length;r<i;r++){var o=t[r];n?e.tool!==o.cid&&o.isVisible()&&o.update():o.render()}return n||(this.mount(),this.blurTool(),this.isRendered=!0),this},focusTool:function(e){var t=this.tools;if(!t)return this;for(var n=0,r=t.length;n<r;n++){var i=t[n];e===i?i.show():i.hide()}return this},blurTool:function(e){var t=this.tools;if(!t)return this;for(var n=0,r=t.length;n<r;n++){var i=t[n];i===e||i.isVisible()||(i.show(),i.update())}return this},hide:function(){return this.focusTool(null)},show:function(){return this.blurTool(null)},onRemove:function(){var e=this.tools;if(!e)return this;for(var t=0,n=e.length;t<n;t++)e[t].remove();this.tools=null},mount:function(){const{options:e,el:t}=this,{relatedView:n,layer:r=Yi.TOOLS,z:i}=e;return n&&(r?n.paper.getLayerView(r).insertSortedNode(t,i):n.el.appendChild(t)),this}}),ea={_results:{},_tests:{svgforeignobject:function(){return!!document.createElementNS&&/SVGForeignObject/.test({}.toString.call(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")))}},addTest:function(e,t){return this._tests[e]=t},test:function(e){var t=this._tests[e];if(!t)throw new Error('Test not defined ("'+e+'"). Use `joint.env.addTest(name, fn) to add a new test.`');var n=this._results[e];if(void 0!==n)return n;try{n=t()}catch(e){n=!1}return this._results[e]=n,n}},ta=Ar.define("standard.Rectangle",{attrs:{body:{refWidth:"100%",refHeight:"100%",strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"}]}),na=Ar.define("standard.Circle",{attrs:{body:{refCx:"50%",refCy:"50%",refR:"50%",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"circle",selector:"body"},{tagName:"text",selector:"label"}]}),ra=Ar.define("standard.Ellipse",{attrs:{body:{refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"ellipse",selector:"body"},{tagName:"text",selector:"label"}]}),ia=Ar.define("standard.Path",{attrs:{body:{refD:"M 0 0 L 10 0 10 10 0 10 Z",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"path",selector:"body"},{tagName:"text",selector:"label"}]}),oa=Ar.define("standard.Polygon",{attrs:{body:{refPoints:"0 0 10 0 10 10 0 10",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"polygon",selector:"body"},{tagName:"text",selector:"label"}]}),aa=Ar.define("standard.Polyline",{attrs:{body:{refPoints:"0 0 10 0 10 10 0 10 0 0",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"polyline",selector:"body"},{tagName:"text",selector:"label"}]}),sa=Ar.define("standard.Image",{attrs:{image:{refWidth:"100%",refHeight:"100%"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"image",selector:"image"},{tagName:"text",selector:"label"}]}),ua=Ar.define("standard.BorderedImage",{attrs:{border:{refWidth:"100%",refHeight:"100%",stroke:"#333333",strokeWidth:2},background:{refWidth:-1,refHeight:-1,x:.5,y:.5,fill:"#FFFFFF"},image:{refWidth:-1,refHeight:-1,x:.5,y:.5},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"background",attributes:{stroke:"none"}},{tagName:"image",selector:"image"},{tagName:"rect",selector:"border",attributes:{fill:"none"}},{tagName:"text",selector:"label"}]}),la=Ar.define("standard.EmbeddedImage",{attrs:{body:{refWidth:"100%",refHeight:"100%",stroke:"#333333",fill:"#FFFFFF",strokeWidth:2},image:{refWidth:"30%",refHeight:-20,x:10,y:10,preserveAspectRatio:"xMidYMin"},label:{textVerticalAnchor:"top",textAnchor:"left",refX:"30%",refX2:20,refY:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"image",selector:"image"},{tagName:"text",selector:"label"}]}),ca=Ar.define("standard.InscribedImage",{attrs:{border:{refRx:"50%",refRy:"50%",refCx:"50%",refCy:"50%",stroke:"#333333",strokeWidth:2},background:{refRx:"50%",refRy:"50%",refCx:"50%",refCy:"50%",fill:"#FFFFFF"},image:{refWidth:"68%",refHeight:"68%",refX:"16%",refY:"16%",preserveAspectRatio:"xMidYMid"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"ellipse",selector:"background"},{tagName:"image",selector:"image"},{tagName:"ellipse",selector:"border",attributes:{fill:"none"}},{tagName:"text",selector:"label"}]}),fa=Ar.define("standard.HeaderedRectangle",{attrs:{body:{refWidth:"100%",refHeight:"100%",strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},header:{refWidth:"100%",height:30,strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},headerText:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:15,fontSize:16,fill:"#333333"},bodyText:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",refY2:15,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"header"},{tagName:"text",selector:"headerText"},{tagName:"text",selector:"bodyText"}]}),ha=Ar.define("standard.Cylinder",{attrs:{body:{lateralArea:10,fill:"#FFFFFF",stroke:"#333333",strokeWidth:2},top:{refCx:"50%",cy:10,refRx:"50%",ry:10,fill:"#FFFFFF",stroke:"#333333",strokeWidth:2},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"100%",refY2:15,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"path",selector:"body"},{tagName:"ellipse",selector:"top"},{tagName:"text",selector:"label"}],topRy:function(e,t){if(void 0===e)return this.attr("body/lateralArea");var n={lateralArea:e},r=jt(e)?{refCy:e,refRy:e,cy:null,ry:null}:{refCy:null,refRy:null,cy:e,ry:e};return this.attr({body:n,top:r},t)}},{attributes:{lateralArea:{set:function(e,t){var n=jt(e);n&&(e=parseFloat(e)/100);var r=t.x,i=t.y,o=t.width,a=t.height,s=o/2,u=n?a*e:e,l=kt.KAPPA,c=l*s,f=l*(n?a*e:e),h=r+o/2,d=r+o,p=i+u,g=p-u,v=i+a-u,m=i+a;return{d:["M",r,p,"L",r,v,"C",r,v+f,h-c,m,h,m,"C",h+c,m,d,v+f,d,v,"L",d,p,"C",d,p-f,h+c,g,h,g,"C",h-c,g,r,p-f,r,p,"Z"].join(" ")}}}}});var da=ea.test("svgforeignobject")?{tagName:"foreignObject",selector:"foreignObject",attributes:{overflow:"hidden"},children:[{tagName:"div",namespaceURI:"http://www.w3.org/1999/xhtml",selector:"label",style:{width:"100%",height:"100%",position:"static",backgroundColor:"transparent",textAlign:"center",margin:0,padding:"0px 5px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}}]}:{tagName:"text",selector:"label",attributes:{"text-anchor":"middle"}};const pa=Ar.define("standard.TextBlock",{attrs:{body:{refWidth:"100%",refHeight:"100%",stroke:"#333333",fill:"#ffffff",strokeWidth:2},foreignObject:{refWidth:"100%",refHeight:"100%"},label:{style:{fontSize:14}}}},{markup:[{tagName:"rect",selector:"body"},da]},{attributes:{text:{set:function(e,t,n,r){if(!(n instanceof HTMLElement)){var i=r.style||{},o={text:e,width:-5,height:"100%"},a=Ht({textVerticalAnchor:"middle"},i);return Wn.textWrap.set.call(this,o,t,n,a),{fill:i.color||null}}n.textContent=e},position:function(e,t,n){if(n instanceof SVGElement)return t.center()}}}}),ga=Yn.define("standard.Link",{attrs:{line:{connection:!0,stroke:"#333333",strokeWidth:2,strokeLinejoin:"round",targetMarker:{type:"path",d:"M 10 -5 0 0 10 5 z"}},wrapper:{connection:!0,strokeWidth:10,strokeLinejoin:"round"}}},{markup:[{tagName:"path",selector:"wrapper",attributes:{fill:"none",cursor:"pointer",stroke:"transparent","stroke-linecap":"round"}},{tagName:"path",selector:"line",attributes:{fill:"none","pointer-events":"none"}}]}),va=Yn.define("standard.DoubleLink",{attrs:{line:{connection:!0,stroke:"#DDDDDD",strokeWidth:4,strokeLinejoin:"round",targetMarker:{type:"path",stroke:"#000000",d:"M 10 -3 10 -10 -2 0 10 10 10 3"}},outline:{connection:!0,stroke:"#000000",strokeWidth:6,strokeLinejoin:"round"}}},{markup:[{tagName:"path",selector:"outline",attributes:{fill:"none"}},{tagName:"path",selector:"line",attributes:{fill:"none"}}]}),ma=Yn.define("standard.ShadowLink",{attrs:{line:{connection:!0,stroke:"#FF0000",strokeWidth:20,strokeLinejoin:"round",targetMarker:{type:"path",stroke:"none",d:"M 0 -10 -10 0 0 10 z"},sourceMarker:{type:"path",stroke:"none",d:"M -10 -10 0 0 -10 10 0 10 0 -10 z"}},shadow:{connection:!0,refX:3,refY:6,stroke:"#000000",strokeOpacity:.2,strokeWidth:20,strokeLinejoin:"round",targetMarker:{type:"path",d:"M 0 -10 -10 0 0 10 z",stroke:"none"},sourceMarker:{type:"path",stroke:"none",d:"M -10 -10 0 0 -10 10 0 10 0 -10 z"}}}},{markup:[{tagName:"path",selector:"shadow",attributes:{fill:"none"}},{tagName:"path",selector:"line",attributes:{fill:"none"}}]});var ya=n(6246),ba=n(8362);const wa="#fe9b00",xa="#00a5ff",ka="#606d84",Sa="#2a303b",_a="#4eaf52",Ea="#ffffff",Ca="#dddddd",Aa="#ca3e37",Pa="#2b5797",La={},Ta=(e,{width:t,lineHeight:n})=>{const r=`${e}-${t}-${n}`;if(La[r])return La[r];const i=Ft(e,{width:t},{wordWrap:"break-word"}),o=(i.match(/\n/g)||[]).length*n;return La[r]={brokenText:i,textHeight:o},{brokenText:i,textHeight:o}},Na=(e,t)=>null!=t&&t.includes(e)?.3:1,Oa=(e,t)=>{switch(e){case"N":return{bodyColor:"rgba(78, 175, 82, 0.1)",strokeColor:_a,label:"green",opacity:Na("added",t)};case"E":return{bodyColor:"rgba(43, 87, 151, 0.1)",strokeColor:Pa,label:"blue",opacity:Na("changed",t)};case"D":return{bodyColor:"rgba(202, 62, 55, 0.1)",strokeColor:Aa,label:"red",opacity:Na("removed",t)};default:return{bodyColor:Ea,strokeColor:"#757575",label:"grey",opacity:Na("no changes",t)}}},Ma=e=>e&&"Condition"===e.type;function Ra({isCompare:e,node:t,variablesPairs:n,containsLabel:r="Contains",notContainsLabel:i="Doesn't contain",andOperator:o="AND",orOperator:a="OR",deletedVarFlag:s="(Deleted)",isTreeIncludesContextVarsData:u,uncheckedChanges:l,boxColors:c}){if(null==t||!t.conditions)return{conditions:[]};const{upperCase:f}=E,h={eq:"[=]",neq:"[≠]",contains:`[${r}]`,not_contains:`[${i}]`};let d=!1;return{conditions:t.conditions.map((t=>{var r,i,o,a;let f=!1;const p=Oa((null==(r=t.nextStep)?void 0:r.diffType)||(null==t?void 0:t.diffType),l),g=p.label||c.label,v=null==(o=null==(i=null==t?void 0:t.expression)?void 0:i.rules)?void 0:o.map((({variableId:e,operator:t,value:r,isDeleted:i,variableName:o})=>{const a=u?{isDeleted:i,name:o}:null==n?void 0:n[e];return!f&&null!=a&&a.isDeleted&&(f=!0,d=!0),`${null!=a&&a.isDeleted?`${a.name} ${s}`:null==a?void 0:a.name} ${h[t]} ${r}`}));return{id:t.id,nextStep:t.nextStep,joiner:null==(a=null==t?void 0:t.expression)?void 0:a.joiner,rules:v||[],shouldRemovePort:f,group:e&&g?g:t.nextStep?"outWithLink":"outWithoutLink",opacity:p.opacity||c.opacity}})).map((({joiner:e,rules:t,...n})=>({text:e?t.join(` ${f("or"===e?a:o)} `):t[0],...n}))),isConditionsIncludeDeletedVars:d}}var Da=function(e,t){return e<t?-1:e>t?1:0},ja=function(e,t){var n=e.localeCompare(t);return n?n/Math.abs(n):0},Ia=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Fa=/^\s+|\s+$/g,za=/\s+/g,Va=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Ba=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,$a=/^0+[1-9]{1}[0-9]*$/,Ua=/[^\x00-\x80]/,Ha=function(e,t){return e<t?-1:e>t?1:0},qa=function(e){return e.replace(za," ").replace(Fa,"")},Wa=function(e){if(0!==e.length){var t=Number(e);if(!Number.isNaN(t))return t}},Ga=function(e,t,n){if(Va.test(e)&&(!$a.test(e)||0===t||"."!==n[t-1]))return Wa(e)||0},Ya=function(e,t,n){return{parsedNumber:Ga(e,t,n),normalizedString:qa(e)}},Xa=function(e){var t=function(e){return e.replace(Ia,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}(e).map(Ya);return t},Ka=function(e){return"function"==typeof e},Ja=function(e){return Number.isNaN(e)||e instanceof Number&&Number.isNaN(e.valueOf())},Qa=function(e){return null===e},Za=function(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof Number||e instanceof String||e instanceof Boolean||e instanceof Date)},es=function(e){return"symbol"==typeof e},ts=function(e){return void 0===e},ns=function(e){if("string"==typeof e||e instanceof String||("number"==typeof e||e instanceof Number)&&!Ja(e)||"boolean"==typeof e||e instanceof Boolean||e instanceof Date){var t=function(e){return"boolean"==typeof e||e instanceof Boolean?Number(e).toString():"number"==typeof e||e instanceof Number?e.toString():e instanceof Date?e.getTime().toString():"string"==typeof e||e instanceof String?e.toLowerCase().replace(Fa,""):""}(e),n=function(e){var t=Wa(e);return void 0!==t?t:function(e){try{var t=Date.parse(e);return!Number.isNaN(t)&&Ba.test(e)?t:void 0}catch(e){return}}(e)}(t);return{parsedNumber:n,chunks:Xa(n?""+n:t),value:e}}return{isArray:Array.isArray(e),isFunction:Ka(e),isNaN:Ja(e),isNull:Qa(e),isObject:Za(e),isSymbol:es(e),isUndefined:ts(e),value:e}},rs=function(e){return"function"==typeof e?e:function(t){if(Array.isArray(t)){var n=Number(e);if(Number.isInteger(n))return t[n]}else if(t&&"object"==typeof t){var r=Object.getOwnPropertyDescriptor(t,e);return null==r?void 0:r.value}return t}};function is(e,t,n){if(!e||!Array.isArray(e))return[];var r=function(e){if(!e)return[];var t=Array.isArray(e)?[].concat(e):[e];return t.some((function(e){return"string"!=typeof e&&"number"!=typeof e&&"function"!=typeof e}))?[]:t}(t),i=function(e){if(!e)return[];var t=Array.isArray(e)?[].concat(e):[e];return t.some((function(e){return"asc"!==e&&"desc"!==e&&"function"!=typeof e}))?[]:t}(n);return function(e,t,n){var r=t.length?t.map(rs):[function(e){return e}],i=e.map((function(e,t){return{index:t,values:r.map((function(t){return t(e)})).map(ns)}}));return i.sort((function(e,t){return function(e,t,n){for(var r=e.index,i=e.values,o=t.index,a=t.values,s=i.length,u=n.length,l=0;l<s;l++){var c=l<u?n[l]:null;if(c&&"function"==typeof c){var f=c(i[l].value,a[l].value);if(f)return f}else{var h=(d=i[l],p=a[l],d.value===p.value?0:void 0!==d.parsedNumber&&void 0!==p.parsedNumber?Da(d.parsedNumber,p.parsedNumber):d.chunks&&p.chunks?function(e,t){for(var n=e.length,r=t.length,i=Math.min(n,r),o=0;o<i;o++){var a=e[o],s=t[o];if(a.normalizedString!==s.normalizedString){if(""===a.normalizedString!=(""===s.normalizedString))return""===a.normalizedString?-1:1;if(void 0!==a.parsedNumber&&void 0!==s.parsedNumber){var u=Da(a.parsedNumber,s.parsedNumber);return 0===u?Ha(a.normalizedString,s.normalizedString):u}return void 0!==a.parsedNumber||void 0!==s.parsedNumber?void 0!==a.parsedNumber?-1:1:Ua.test(a.normalizedString+s.normalizedString)?ja(a.normalizedString,s.normalizedString):Ha(a.normalizedString,s.normalizedString)}}return n>i||r>i?n<=i?-1:1:0}(d.chunks,p.chunks):function(e,t){return(e.chunks?!t.chunks:t.chunks)?e.chunks?-1:1:(e.isNaN?!t.isNaN:t.isNaN)?e.isNaN?-1:1:(e.isSymbol?!t.isSymbol:t.isSymbol)?e.isSymbol?-1:1:(e.isObject?!t.isObject:t.isObject)?e.isObject?-1:1:(e.isArray?!t.isArray:t.isArray)?e.isArray?-1:1:(e.isFunction?!t.isFunction:t.isFunction)?e.isFunction?-1:1:(e.isNull?!t.isNull:t.isNull)?e.isNull?-1:1:0}(d,p));if(h)return h*("desc"===c?-1:1)}}var d,p;return r-o}(e,t,n)})),i.map((function(t){return function(e,t){return e[t]}(e,t.index)}))}(e,r,i)}const{has:os,isEqual:as,some:ss}=E,us=e=>{const t=as(e.type,"Condition"),n=os(e,"url")&&as(e.type,"Link"),r=!os(e,"question.answers")&&!n&&as(e.type,"Solution");return t?_a:r?Sa:n?wa:xa},ls=({id:e,source:t,target:n,isDefault:r=!1,lineProps:i})=>({id:e,type:"standard.Link",source:t,target:n,attrs:{line:{targetMarker:{d:"M 13 -7.5 0 0 13 7.5"},...i}},isDefault:r}),cs=({nodes:e,node:t,variablesPairs:n,isTreeIncludesContextVarsData:r,isCompare:i,defaultOptionColor:o,boxColors:a,uncheckedChanges:s,targetCellsIds:u})=>{var l,c,f;if(!as(t.type,"Condition"))return;const h=[];let d=!1;return null!=(l=null==t?void 0:t.defaultNextStep)&&l.id&&ss(e,{id:null==(c=null==t?void 0:t.defaultNextStep)?void 0:c.id})&&t.id?(u.add((null==(f=null==t?void 0:t.defaultNextStep)?void 0:f.id)||""),h.push(ls({id:`${t.id}-${t.defaultNextStep.id}-default`,source:{id:t.id,port:`${t.id}`},target:{id:t.defaultNextStep.id},isDefault:!0,lineProps:{stroke:i&&(o.strokeColor||a.strokeColor)||Ca,opacity:o.opacity||1}}))):d=!0,t.conditions&&t.conditions.length?(t.conditions.forEach(((o,l)=>{var c,f;const p=Oa((null==(c=o.nextStep)?void 0:c.diffType)||(null==o?void 0:o.diffType),s),{nextStep:g}=o,v=(null==(f=null==o?void 0:o.expression)?void 0:f.rules)||[],m=ss(v,r?({isDeleted:e})=>e:({variableId:e})=>{var t;return null==(t=null==n?void 0:n[e])?void 0:t.isDeleted}),y=g&&ss(e,{id:g.id})&&t.id&&!m;y&&(u.add(g.id),h.push(ls({id:`${t.id}-${g.id}-${l}`,source:{id:t.id,port:o.id},target:{id:g.id},lineProps:{stroke:i&&(p.strokeColor||a.strokeColor)||Ca,opacity:p.opacity||1}}))),!y&&!d&&(d=!0)})),{conditionsConnection:h,isAnyUnlinkedConditions:d}):{conditionsConnection:h,isAnyUnlinkedConditions:d}},fs={defaultC:Ca,selectedC:Sa,hoverC:"#939393"},hs={stroke:fs.defaultC,"stroke-width":2,fill:fs.defaultC},ds={stroke:fs.defaultC,"stroke-width":2,fill:"transparent"},ps={stroke:fs.hoverC},gs={stroke:fs.defaultC},vs={noURLError:"Add the link",deletedVariableWarn:"Replace deleted variable(s)",linkConnectionWarn:"Add the incoming or outgoing connection"},ms=20,ys=".question-icon",bs={},ws=Ar.define("qad.Question",{ports:{groups:{outWithLink:{position:"right",attrs:{circle:{magnet:!0,cursor:"pointer",r:8,...ds}}},outWithoutLink:{position:"right",attrs:{circle:{magnet:!0,cursor:"pointer",r:8,...hs}}},red:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:Aa,r:10}}},green:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:_a,r:10}}},blue:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:Pa,r:10}}},grey:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:"#757575",r:10}}}}},attrs:{".body-background":{refWidth:"100%",refHeight:"100%",fill:"white"},".body":{refWidth:"100%",refHeight:"100%",rx:5,stroke:Sa,fill:"white",cursor:"pointer"},text:{fontSize:14,lineHeight:20,fontFamily:"Open Sans, Arial, sans-serif",fill:Sa,fontWeight:600,cursor:"default"},".question-text":{xAlignment:"start",refX:50,refY:ms},".edit-button":{fill:ka,event:"step:edit",width:20,height:20,refX:"100%",refX2:-5,refY:5,xAlignment:"right",cursor:"pointer",title:"Click to edit"},".option-rect":{rx:3,ry:3,stroke:"none",fill:"none",height:30,refWidth:"100%"},".option-order-number":{fill:ka,xAlignment:"middle",refX:32,yAlignment:"middle",refY:15,fontWeight:400},".option-order-box":{fill:"#f5f5f5",width:24,height:24,xAlignment:ms,yAlignment:"middle",refY:15,rx:5,fontWeight:400},".option-text":{fontSize:14,fontWeight:400,lineHeight:20,fill:Sa,refX:50,yAlignment:-8},".variables-text":{fontSize:14,fontWeight:400,lineHeight:20,fill:Sa,refX:50},[ys]:{x:ms,y:18},".variables-icon":{x:ms},".warning-icon":{x:15},".error-icon":{x:15}}},{markup:'<rect class="body-background"/><rect class="body"\n /><text class="question-text"/><g class="edit-button"><path fill-opacity="0" d="M0 0h15v15H0z"\n /><path d="M0 11.873l9.22-9.22 3.126 3.124-9.221 9.22H0v-3.124zM14.754 2.19a.835.835 0 0 1 0 1.179L13.23 4.894l-3.125-3.125L11.63.244a.835.835 0 0 1 1.18 0l1.945 1.946z"\n /></g><g class="variables" /><g class="options" />',optionMarkup:'<g class="option"><rect class="option-rect"/><rect class="option-order-box" /><text class="option-order-number"/><text class="option-text"/></g>',variablesMarkup:'<text class="variables-text"/>',questionMarkup:'<svg class="question-icon" width="14px" height="14px" viewBox="0 0 50 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Page-1" stroke="none" stroke-width="1" fill-rule="evenodd">\n <g id="question" fill-rule="nonzero">\n <path d="M25,0 C11.215,0 0,11.215 0,25 C0,38.785 11.215,50 25,50 C38.785,50 50,38.785 50,25 C50,11.215 38.785,0 25,0 Z M25,45.455\n C13.721,45.455 4.545,36.279 4.545,25 C4.545,13.722 13.721,4.545 25,4.545 C36.279,4.545 45.455,13.722 45.455,25 C45.455,36.279 36.279,45.455 25,45.455 Z"/>\n <path d="M26.975,35.296 C27.041,34.44 26.795,33.716 26.235,33.123 C25.675,32.531 24.967,32.235 24.111,32.235 C23.321,32.235 22.63,32.498\n 22.037,33.025 C21.444,33.551 21.148,34.243 21.148,35.099 C21.148,35.955 21.412,36.663 21.938,37.222 C22.465,37.782 23.123,38.062 23.914,38.062\n C24.77,38.062 25.494,37.815 26.086,37.321 C26.679,36.827 26.976,36.152 26.976,35.296 L26.975,35.296 Z M31.815,22.654 C32.605,21.535 33,20.35\n 33,19.1 C33,16.927 32.177,15.215 30.53,13.964 C28.95,12.779 26.91,12.186 24.407,12.186 C22.564,12.186 21.017,12.614 19.765,13.47 C17.922,14.72\n 17,16.96 17,20.185 L21.84,20.185 C21.84,18.802 21.971,17.914 22.235,17.519 C22.827,16.531 23.683,16.037 24.802,16.037 C25.922,16.037 26.745,16.399\n 27.272,17.123 C27.798,17.848 28.062,18.605 28.062,19.395 C28.062,19.922 27.798,20.58 27.272,21.37 C27.14,21.634 26.811,21.963 26.284,22.358\n C24.572,23.346 23.42,24.333 22.827,25.321 C22.3,26.177 21.971,27.527 21.84,29.371 C21.84,29.634 21.971,29.765 22.235,29.765 L26.086,29.765\n C26.416,29.765 26.58,29.634 26.58,29.37 C26.58,28.646 26.646,28.02 26.778,27.494 C26.975,26.901 27.37,26.342 27.963,25.814 L29.346,24.926\n C30.596,24.004 31.42,23.246 31.815,22.654 Z"/>\n </g>\n </g>\n</svg>',solutionMarkup:'<svg class="question-icon" viewBox="0 0 14 14" width="14" height="14" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 0c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.14-7-7 3.14-7 7-7zm0 1.273A5.734 5.734 0 0 0 1.273 7 5.734 5.734 0 0 0 7 12.727 5.734 5.734 0 0 0 12.727 7 5.734 5.734 0 0 0 7 1.273zm2.748 3.111a.61.61 0 1 1 .862.863L6.244 9.613a.61.61 0 0 1-.863 0L3.387 7.62a.61.61 0 1 1 .863-.862l1.563 1.562z" fill-rule="evenodd"/>\n</svg>',linkMarkup:'<svg class="question-icon" width="14px" height="14px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" xml:space="preserve">\n <g id="Symbols">\n <g id="menu_x2F_open_x5F_link" transform="translate(-21.000000, -12.000000)">\n <path id="Link-Icon" d="M29.4,13.1c0.7-0.7,1.6-1.1,2.7-1.1c1,0,1.9,0.4,2.7,1.1l1.1,1.1c0.7,0.7,1.1,1.6,1.1,2.7\n s-0.4,1.9-1.1,2.7l-3.6,3.6c-1.1,1.1-2.5,1.4-3.9,0.8c-0.5-0.2-1-0.5-1.3-0.8L25.9,22l1.6-1.6l1.1,1.1c0.3,0.3,0.7,0.5,1.1,0.5\n s0.8-0.2,1.1-0.5l3.6-3.6c0.3-0.3,0.5-0.7,0.5-1.1s-0.2-0.8-0.5-1.1l-1.1-1.1c-0.3-0.3-0.7-0.5-1.1-0.5c-0.4,0-0.8,0.2-1.1,0.5\n l-0.5,0.5c-0.4-0.2-0.8-0.4-1.2-0.5s-0.8-0.1-1.1-0.1H28L29.4,13.1z M29.8,15.9c0.5,0.2,0.9,0.5,1.3,0.9l1.1,1.1l-1.6,1.6\n l-1.1-1.1c-0.3-0.3-0.7-0.5-1.1-0.5s-0.8,0.2-1.1,0.5L23.7,22c-0.3,0.3-0.5,0.7-0.5,1.1s0.2,0.8,0.5,1.1l1.1,1.1\n c0.3,0.3,0.7,0.5,1.1,0.5s0.8-0.2,1.1-0.5l0.5-0.5c0.4,0.2,0.8,0.4,1.2,0.5s0.8,0.1,1.1,0.1h0.4l-1.6,1.6C27.9,27.6,27,28,25.9,28\n c-1.1,0-1.9-0.4-2.7-1.1l-1.1-1.1c-0.7-0.7-1.1-1.6-1.1-2.7c0-1.1,0.4-1.9,1.1-2.7l3.6-3.6c0.5-0.5,1.2-0.9,1.9-1\n C28.5,15.5,29.1,15.6,29.8,15.9z"/>\n </g>\n </g>\n</svg>',conditionMarkup:'<svg class="question-icon" width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">\n <g fill="none" fill-rule="evenodd">\n <path d="M0 0h18v18H0z"/>\n <path d="M4.209 16.636 3 15.44l4.14-4.098A3.38 3.38 0 0 0 8.143 8.94V4.613L6.78 5.953 5.571 4.759 9 1.364l3.429 3.394-1.209 1.196-1.363-1.34V8.94c0 .899.36 1.764 1.003 2.4L15 15.44l-1.209 1.196L9 11.893l-4.791 4.743z" fill="#4EAF52" fill-rule="nonzero"/>\n </g>\n</svg>',initialStepMarkup:(e,t="First")=>{const n=(e=>{const t=document.createElement("canvas").getContext("2d");if(t){t.font="14px Open Sans";const{width:n}=t.measureText(e);return Math.ceil(n)+31}return 57})(t);return`<svg class="first-step-icon" width="${n}" height="22" viewBox="7 10 ${n} 22" xmlns="http://www.w3.org/2000/svg">\n <g class="first-step-icon__part" fill="none" fill-rule="evenodd">\n <path fill="#606D84" d="M 0 0 h ${n-10} L ${n} 10 L ${n-10} 22 H 0 z"/>\n <text class="first-step-icon__text" font-family="OpenSans-Regular, Open Sans" font-size="14">\n <tspan x="10" y="16">${t}</tspan>\n </text>\n </g>\n <title>${e}</title>\n </svg>`},variablesIconMarkup:'<svg class="variables-icon" width="14px" height="14px" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-43.000000, -248.000000)">\n <g transform="translate(10.000000, 185.000000)">\n <g transform="translate(33.000000, 63.000000)">\n <rect x="0" y="0" width="14" height="14"></rect>\n <path d="M3,1 L3,1.94736842 L1.10284464,1.94736842 L1.10284464,12.0459127 L3,12.0459127 L3,13 L0,13 L0,1 L3,1 Z M14,1 L14,13 L11,13 L11,12.0459127 L12.8971554,12.0459127 L12.8971554,1.94736842 L11,1.94736842 L11,1 L14,1 Z M4.68378651,3 L7.01208459,6.06569343 L9.33232628,3 L10.8388721,3 L7.7693857,6.90510949 L11,11 L9.48539778,11 L7.01208459,7.75912409 L4.51460222,11 L3,11 L6.2306143,6.90510949 L3.1611279,3 L4.68378651,3 Z" fill-rule="nonzero"></path>\n </g>\n </g>\n </g>\n</g>\n</svg>',labelMarkup:'<g><rect class="label" /><text class="label-text" /></g>',warningMessageMarkup:'<g class="warning-message"><rect class="warning-body"/><text class="warning-text"/></g>',warningIconMarkup:'<svg class="warning-icon" width="14px" height="14px" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">\n<g fill="none" fill-rule="evenodd">\n <path d="M4 18.818h16L12 5 4 18.818zm8.727-2.182h-1.454v-1.454h1.454v1.454zm0-2.909h-1.454v-2.909h1.454v2.91z" fill="#FE9B00" fill-rule="nonzero"/>\n</g>\n</svg>',errorIconMarkup:'<svg class="error-icon" width="14px" height="14px" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">\n<g fill="none" fill-rule="evenodd">\n <path d="M12.5 5C8.36 5 5 8.36 5 12.5c0 4.14 3.36 7.5 7.5 7.5 4.14 0 7.5-3.36 7.5-7.5C20 8.36 16.64 5 12.5 5zm.75 11.25h-1.5v-1.5h1.5v1.5zm0-3h-1.5v-4.5h1.5v4.5z" fill="#CA3E37" fill-rule="nonzero"/>\n</g>\n</svg>',initialize(...e){Ar.prototype.initialize.apply(this,e);const t=this.get("question")||"",n=this.get("id"),r=this.get("isSolution"),i=this.get("isLink"),o=this.get("interactive"),a=this.get("color"),s=this.get("position"),u=this.get("boxColors"),l=this.get("isReadOnly"),c=this.get("isCompare"),f=this.get("labelText"),h=this.get("activeStepId"),d=h&&h===n,p=this.get("assignedVariablesText")||"",g=this.get("isFirstStep"),{brokenText:v,textHeight:m}=Ta(t,{width:230,lineHeight:20}),{brokenText:y="",textHeight:b=0}=p?Ta(p,{width:230,lineHeight:20}):{},w=this.get("bodyTitle")??"Double click to edit";if((g||r)&&this.attr(".body",{stroke:xa,strokeWidth:1}),(r||i)&&(this.attr(".question-text",{refX:55,refY:25}),this.attr(ys,{x:25,y:23})),a&&(this.attr(".body",{stroke:a,strokeWidth:1}),this.attr(ys,{fill:a}),this.attr(".variables-icon path",{fill:a})),this.attr(".first-step-icon__part",{cursor:"pointer"}),this.attr(".first-step-icon__text",{"font-weight":"400",fill:Ea,cursor:"inherit"}),u.bodyColor&&c){const e=g&&this.get("highlightFirstStep");this.attr(".body",{stroke:u.strokeColor,strokeWidth:1,fill:u.bodyColor,opacity:u.opacity}),this.attr(".label-text",{text:f,y:e?-17:-8,x:5,fill:"#fff"}),this.attr(".label",{fill:u.strokeColor,width:8.4*f.length+10,height:20,opacity:u.opacity,y:e?-31:-22,rx:3}),this.attr(ys,{fill:u.strokeColor,opacity:u.opacity}),this.attr(".variables-icon",{opacity:u.opacity}),this.attr(".variables-icon path",{fill:u.strokeColor}),this.attr(".variables-text",{opacity:u.opacity}),this.attr(".question-text",{opacity:u.opacity}),this.attr(".options",{opacity:u.opacity})}s&&this.moveBox(s),d&&this.attr(".body",{fill:a,fillOpacity:.1,stroke:a}),this.attr(".body",{title:o||l?w:"",cursor:o||l?"pointer":"default"}),this.attr({".question-text":{text:v,title:t}}),p&&(this.attr({".variables-text":{text:y,title:p,refY:25}}),this.attr(".variables-icon/y",45+m+4)),!c&&!l&&this.attr({".warning-body":{refWidth:"100%",fillOpacity:.12,ry:5},".warning-text":{fontSize:14,fontWeight:400,lineHeight:20,fill:Sa,refX:50}});const x=p?80:45;this.attr(".variables/refY",25+m),this.attr(".options/refY",x+b+m);const{optionsOffset:k}=this.renderOptions(m,b),{warningHeight:S}=this.renderWarningMessage({offsetY:(k||-5)+x+b+m});this.adjustSize(m,b+S)},getOptions:function(){if(this.get("isCondition")){const e=this.get("conditions")||[],{conditionDefaultTitle:t,group:n,opacity:r}=this.get("conditionDefaultProps")||{};return[...e,{id:this.get("id"),group:n,opacity:r,text:t}]}return this.get("options")},getVariablesText:function(){return this.get("assignedVariablesText")},getStepWarnings:function(){const{isEmpty:e}=E,t=this.get("url"),n=this.get("isLink");return{isEmptyLink:e(t)&&n,isAnyDeletedVariable:this.get("isOptionsIncludeDeletedVars")||this.get("isConditionsIncludeDeletedVars"),isUnlinkedMagnets:this.get("isUnlinkedMagnets"),...this.get("warningMessages")||vs}},renderWarningMessage:function({offsetY:e}){const t=this.get("isCompare"),n=this.get("isReadOnly"),r={warningHeight:0};if(t||n)return r;const{isEmptyLink:i,isAnyDeletedVariable:o,isUnlinkedMagnets:a,noURLError:s,deletedVariableWarn:u,linkConnectionWarn:l}=this.getStepWarnings();if(!(i||o||a))return r;const c=i?s:o?u:l,f=i?Aa:wa,h=i?".error-icon":".warning-icon",{brokenText:d,textHeight:p}=Ta(c,{width:230,lineHeight:20});return this.attr({".warning-text":{text:d,title:c,refY:e+20+10},".warning-body":{height:p+35,refY:e+20,fill:f},[h]:{y:e+20+4}}),{warningHeight:p+35}},renderOptions:function(e,t=0){let n=0,r=0;const i={},o=this.getVariablesText(),a=this.get("isCompare");return this.getOptions().forEach(function(s,u){const l=`.option-${s.id}`,c=s.text||"",{brokenText:f,textHeight:h}=Ta(c,{width:200,lineHeight:20});i[l]={transform:`translate(0, ${n})`},i[`${l} .option-order-number`]={text:u+1},i[`${l} .option-text`]={text:f,title:s.text,refY:15},n+=30+h;const d=(o?80+e+t:45+e)+ms;(a||!s.shouldRemovePort)&&this.addPort({group:s.group,id:s.id,args:{y:d+r-5,x:280},attrs:{circle:{opacity:s.opacity}}}),r+=h+30}.bind(this)),this.attr(i),{optionsOffset:n??0}},adjustSize:function(e,t=0){const n=this.get("isLink"),r=this.get("isSolution"),i=this.getOptions()||[],o=this.getVariablesText();let a=0;i.forEach((e=>{const t=e.text||"",{textHeight:n}=Ta(t,{width:200,lineHeight:20});a+=n}));const s=o?80:45,u=30*i.length+(n||r?35:s)+(n||r?25:ms)+e+t+a;this.resize(300,u)},moveBox:function(e){this.position(e.x,e.y)}}),xs=zr.extend({renderMarkup(...e){zr.prototype.renderMarkup.apply(this,e),this.renderOptions(),this.renderVariables(),this.renderIcons(),this.renderLabels(),this.renderWarningMessage()},renderVariables:function(){this.model.getVariablesText()&&(this.$(".variables").append(kt(this.model.variablesMarkup).node),this.$(".body").parent().append(kt(this.model.variablesIconMarkup).node))},renderWarningMessage:function(){const e=this.model.get("isCompare"),t=this.model.get("isReadOnly");if(e||t)return;const{isEmptyLink:n,isAnyDeletedVariable:r,isUnlinkedMagnets:i}=this.model.getStepWarnings();if(n||r||i){const e=n?"errorIconMarkup":"warningIconMarkup";this.$(".body").parent().append(kt(this.model.warningMessageMarkup).node),this.$(".warning-message").append(kt(this.model[e]).node)}},renderOptions:function(){this.model.getOptions().forEach(function(e){const t=`option-${e.id}`,n=kt(this.model.optionMarkup).addClass(t);n.attr("option-id",e.id),this.$(".options").append(n.node)}.bind(this))},renderIcons:function(){const e=this.model.get("isLink"),t=this.model.get("isCondition"),n=this.model.get("isSolution"),r=this.model.get("isFirstStep"),i=this.model.get("highlightFirstStep"),o=this.model.get("firstStepTitle"),a=this.model.get("firstStepLabel");e?this.$(".body").parent().append(kt(this.model.linkMarkup).node):n?this.$(".body").parent().append(kt(this.model.solutionMarkup).node):t?this.$(".body").parent().append(kt(this.model.conditionMarkup).node):this.$(".body").parent().append(kt(this.model.questionMarkup).node),i&&r&&this.$(".body").parent().append(kt(this.model.initialStepMarkup(o,a)).node)},renderLabels:function(){this.$(".body").parent().append(kt(this.model.labelMarkup).node)}});Object.assign(bs,{qad:{Question:ws,QuestionView:xs},standard:h});const ks=()=>{},Ss="line/stroke",_s="attrs/circle";function Es({el:e,selectedLink:t,asyncRender:n=!1,onLinkConnect:r=ks,onLinkDisconnect:i=ks,onStepEdit:o=ks,onPaperClick:a=ks,onCellMousedDown:s=ks,onCellMousedUp:u=ks,onMouseEnterElement:l=ks,onMouseLeaveElement:c=ks,interactive:f,isReadOnly:h=!1,isStatic:d=!1,isCompare:p=!1,isTreeIncludesContextVarsData:g=!1,uncheckedChanges:v,labelsText:m={addedLabel:"Added",removedLabel:"Removed",changedLabel:"Changed",noChangesLabel:"No changes"},onPan:y=ks,highlightFirstStep:b=!1,firstStepTitle:w,firstStepLabel:x,activeStepId:k,conditionDefaultTitle:S,containsLabel:_,notContainsLabel:C,andOperator:A,orOperator:P,getCurrentVariables:L,currentNodesRef:T,onInvalidConditionsConnecting:N,deletedVarFlag:O,warningMessages:M,isSetStepHoverStyles:R}){const D=new Tr({},{cellNamespace:bs}),j=new Io({el:e,interactive:f,async:n,sorting:Io.sorting.APPROX,model:D,height:"auto",width:"100%",linkPinning:!1,multiLinks:!1,clickThreshold:1,gridSize:10,cellViewNamespace:bs,defaultRouter:{name:"manhattan",args:{side:"right",step:10,maximumLoops:100,paddingBox:{top:0,left:0,right:0,bottom:0},padding:{top:10,left:20,right:10,bottom:20},startDirections:["right"],endDirections:["top","bottom","left"],excludeTypes:["qad.Question"]}},defaultConnector:{name:"rounded",args:{radius:20}},defaultLink:new ga({attrs:{line:{stroke:fs.defaultC,strokeWidth:2,targetMarker:{d:"M 13 -7.5 0 0 13 7.5"}}}}),defaultConnectionPoint:{name:"boundary",args:{offset:1}},validateConnection:function(e,t,n){var r,i;if(e===n)return!1;const o=null==(r=null==T?void 0:T.current)?void 0:r.find((({id:t})=>{var n;return t===(null==(n=null==e?void 0:e.model)?void 0:n.id)})),a=null==(i=null==T?void 0:T.current)?void 0:i.find((({id:e})=>{var t;return e===(null==(t=null==n?void 0:n.model)?void 0:t.id)})),s=Ma(o),u=Ma(a);return s&&u&&N?(N(),!1):!n.model.isLink()}});function I(){D.getLinks().forEach((e=>{e.toFront()}))}function F(e){var t;const{defaultC:n,selectedC:r}=fs,i=e.model.attr(Ss)===r;e.model.attr(Ss,i?n:r);const o=e.model.attributes.source.port;null==(t=e.sourceView.model)||t.portProp(o,_s,{stroke:i?n:r}),e.targetView.model.attr(".body/stroke",i?e.targetView.model.attributes.color||n:r)}function z(){t&&(t=null)}return d||function(){function e(e,t){if(t.stopPropagation(),e.model.isLink())return;const n=e.model.id;o(n.toString())}j.on("blank:pointerclick",a),p||(j.on("link:mouseenter",(function(e){var n,r;if((null==(n=null==t?void 0:t.model)?void 0:n.id)!==(null==(r=null==e?void 0:e.model)?void 0:r.id)){const t=e.model.attributes.source.port;e.model.attr(Ss,fs.hoverC);const n=e.model.getSourceElement();null==n||n.portProp(t,_s,{...ps})}e.model.toFront()})),j.on("link:mouseleave",(function(e){var n,r;if((null==(n=null==t?void 0:t.model)?void 0:n.id)!==(null==(r=null==e?void 0:e.model)?void 0:r.id)){const t=e.model.attributes.source.port,n=e.model.getSourceElement();null==n||n.portProp(t,_s,{...gs}),e.model.attr(Ss,fs.defaultC)}t&&t.model.toFront()}))),(f||R)&&(j.on("element:mouseenter",(function(e){l(e.model)})),j.on("element:mouseleave",(function(e){c(e.model)}))),f&&(j.on("link:connect",(function(e,t,n){const i=e.model,o=i.source(),a=i.target();"circle"===(null==a?void 0:a.magnet)&&i.target({id:n.model.id});const s=D.getConnectedLinks(i.getSourceElement(),{outbound:!0}).filter((function(e){const t=e.get("source"),n=e.get("target");return t.port===o.port&&n.id!==a.id}));s.length>0&&s.forEach((e=>{e.remove()}));const u=e.model.attributes.source.port,l=e.model.getSourceElement();null==l||l.portProp(u,_s,{...ds}),r({source:o,target:a})})),j.on("link:disconnect",(function(e,n,r){var o;const a=e.model,s=a.source(),u=a.attributes.source.port;r.model.isElement()&&(null==(o=r.model)||o.portProp(u,_s,{...hs})),t&&(F(t),z()),i({source:s})})),j.on("cell:pointermove",(function(e){e.model.toFront()})),j.on("cell:pointerdown",(function(e){s(e,D)})),j.on("cell:pointerup",(function(e,t,n,r){const i=D.getConnectedLinks(e.model,{outbound:!0});null!=i&&i.length&&i.forEach((e=>e.toFront())),u(e,D,t,n,r)})),j.on("link:pointerclick",(function(e){if(void 0!==t){if(t&&(t.removeTools(),F(t)),(null==t?void 0:t.model.id)!==e.model.id)return F(e),t=e,void function(e){const t=new Jo({distance:30,action:function(e){this.model.remove({ui:!0}),this.sourceView&&this.notify("link:disconnect",e,this.sourceView,this.sourceMagnet,"source")}}),n=new Zo({tools:[t]});e.addTools(n)}(e);z()}})),j.on("link:pointerdblclick",(function(e){y(e)}))),j.on("cell:pointerdblclick",e),j.on("cell:pointerclick",e)}(),Object.freeze({scaleContentToFit:function(){j.scaleContentToFit({padding:30})},autoLayoutNodes:function(){Fo.layout(D,{setLinkVertices:!1,dagre:ya,graphlib:ba,nodeSep:0,edgeSep:0,rankSep:0,marginX:0,rankDir:"LR",ranker:"network-simplex"})},nodesToJSON:function({nodes:e,buttonsText:t,activeStepId:n}){const{get:r,has:i,isEmpty:o,isEqual:a,some:s}=E,u=[],l=null==L?void 0:L(),c=!g&&!o(l),d=new Set;return e.forEach((o=>{var y,E,L,T,N,R,D,j,I,F;const z=r(o,"question.answers")||[],V=a(o.type,"Condition"),B=i(o,"url")&&a(o.type,"Link"),$=!i(o,"question.answers")&&!B&&a(o.type,"Solution"),U=Oa(o.diffType||(null==(E=null==(y=o.settings)?void 0:y.position)?void 0:E.diffType),v),H=((e,t)=>{switch(e){case"N":return(null==t?void 0:t.addedLabel)||"Added";case"E":return(null==t?void 0:t.changedLabel)||"Changed";case"D":return(null==t?void 0:t.removedLabel)||"Removed";default:return(null==t?void 0:t.noChangesLabel)||"No changes"}})(o.diffType,m),q=new Set,W=new Map;let G=!1;const Y=z.map((({nextStep:t,title:n,id:r,diffType:i,assignments:a},l)=>{const f=Oa((null==t?void 0:t.diffType)||i,v),h=f.label||U.label;c&&null!=a&&a.length&&a.forEach((e=>{q.add(e.variableId)})),g&&null!=a&&a.length&&a.forEach((e=>{W.set(e.variableId,{name:e.variableName||"",isDeleted:e.isDeleted})}));const m=t&&(null==o?void 0:o.id)&&s(e,{id:null==t?void 0:t.id});return m&&(d.add(t.id),u.push({id:`${o.id}-${t.id}-${l}`,type:"standard.Link",source:{id:o.id,port:r},target:{id:t.id},attrs:{line:{stroke:p&&(f.strokeColor||U.strokeColor)||fs.defaultC,targetMarker:{d:"M 13 -7.5 0 0 13 7.5"},opacity:f.opacity||1}}})),!m&&!G&&(G=!0),{id:r,text:n,group:p&&h?h:t?"outWithLink":"outWithoutLink",opacity:f.opacity||U.opacity}})),X=Oa(null==(L=o.defaultNextStep)?void 0:L.diffType,v),K=X.label||U.label,J=p&&K?K:null!=(T=o.defaultNextStep)&&T.id?"outWithLink":"outWithoutLink",{conditionsConnection:Q,isAnyUnlinkedConditions:Z}=cs({nodes:e,node:o,variablesPairs:l,isTreeIncludesContextVarsData:g,isCompare:p,defaultOptionColor:X,boxColors:U,uncheckedChanges:v,targetCellsIds:d})||{};null!=Q&&Q.length&&u.push(...Q);const{assignedVariablesText:ee,isOptionsIncludeDeletedVars:te}=(({assignedIds:e,variablesPairs:t,deletedVarFlag:n="(Deleted)",assignedVariables:r=[],isTreeIncludesContextVarsData:i,shouldUseVariablesPairs:o})=>{const a=i&&!!r.length,s=o&&!(null==e||!e.length);if(!a&&!s)return;const u=s?((e,t)=>e.reduce(((e,n)=>{const r=null==t?void 0:t[n];return r&&e.push(r),e}),[]))(e,t):r,l=is(u,[e=>!(null==e||!e.isDeleted),e=>e.name]),{varNames:c,isOptionsIncludeDeletedVars:f}=((e,t)=>{const n=[];let r=!1;return e.forEach((e=>{if(e.isDeleted)return n.push(`${e.name} ${t}`),void(r=!0);n.push(e.name)})),{varNames:n,isOptionsIncludeDeletedVars:r}})(l,n);return{assignedVariablesText:c.join(", "),isOptionsIncludeDeletedVars:f}})({assignedIds:[...q],assignedVariables:[...W.values()],isTreeIncludesContextVarsData:g,shouldUseVariablesPairs:c,variablesPairs:l,deletedVarFlag:O})||{};u.push({id:o.id,isFirstStep:o.isFirstStep,url:o.url,type:"qad.Question",question:r(o,"question.title",o.title),isSolution:$,isCondition:V,isLink:B,options:Y,interactive:f,color:(null==(N=o.settings)?void 0:N.borderColor)||us(o),boxColors:U,isReadOnly:h,isCompare:p,highlightFirstStep:b,labelText:H,firstStepTitle:w,firstStepLabel:x,warningMessages:M,activeStepId:n||k,position:{x:(null==(D=null==(R=o.settings)?void 0:R.position)?void 0:D.x)||0,y:(null==(I=null==(j=o.settings)?void 0:j.position)?void 0:I.y)||0},bodyTitle:r(t,"bodyTitle")??"Double click to edit",attrs:{".edit-button":{title:r(t,"editButtonTitle")??"Click to edit"}},...V?{conditionDefaultProps:{conditionDefaultTitle:S,group:J,opacity:X.opacity||U.opacity},defaultNextStepId:null==(F=null==o?void 0:o.defaultNextStep)?void 0:F.id,...Ra({isCompare:p,node:o,containsLabel:_,notContainsLabel:C,andOperator:A,orOperator:P,variablesPairs:l,deletedVarFlag:O,isTreeIncludesContextVarsData:g,uncheckedChanges:v,boxColors:U})}:{},...ee&&{assignedVariablesText:ee,isOptionsIncludeDeletedVars:te},isUnlinkedMagnets:Z||G})})),p||h?{cells:u}:{cells:u.map((e=>e.isFirstStep||d.has(null==e?void 0:e.id)||null!=e&&e.isUnlinkedMagnets?e:{...e,isUnlinkedMagnets:!0}))}},fromJSON:function(e,t){j.freeze(),D.resetCells(e.cells),j.unfreeze({batchSize:10,progress:e=>{e&&j.unfreeze()}}),t||I()},resetSelectedLink:z,pushLinksToFront:I,paper:j,graph:D})}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".joint-cell{cursor:default}.joint-cell .edit-button{opacity:0;transition:opacity .25s ease}.joint-cell:hover .edit-button{opacity:1}.Graph{display:flex;flex-grow:1;position:relative}.Graph__graph-holder{padding:30px;overflow:hidden}.Graph__graph-holder svg{overflow:visible!important;cursor:move}.Graph__graph-holder[data-interactive=false] .joint-cell .edit-button{display:none}.Graph__graph-holder[data-interactive=false] .joint-port circle{cursor:default}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();const Cs=({tree:e,variables:t,conditionDefaultTitle:n="Default",containsLabel:r="Contains",notContainsLabel:i="Doesn't contain",andOperator:o="AND",orOperator:a="OR"})=>{const s=(0,d.useRef)(void 0),u=(0,d.useRef)(void 0),l=(0,d.useRef)(e);return(0,d.useEffect)((()=>{s.current&&(u.current=Es({el:s.current,isStatic:!0,isReadOnly:!0,highlightFirstStep:!0,interactive:!1,getCurrentVariables:()=>(e=>null==e?void 0:e.reduce(((e,t)=>(e[t.variableId]={...t},e)),{}))(t.map((({id:e,name:t,isDeleted:n})=>({variableId:e,name:t,isDeleted:n})))),conditionDefaultTitle:n,containsLabel:r,notContainsLabel:i,andOperator:o,orOperator:a}),setTimeout((()=>{(e=>{var t,n,r,i;const o=null==(t=null==u?void 0:u.current)?void 0:t.nodesToJSON({nodes:e}),a=0===(null==(n=l.current)?void 0:n.filter((e=>{var t;return null==(t=e.settings)?void 0:t.position})).length);null==(r=null==u?void 0:u.current)||r.fromJSON(o),a&&(null==(i=null==u?void 0:u.current)||i.autoLayoutNodes())})(l.current)}),0))}),[]),(0,S.jsx)("div",{"data-interactive":!1,className:"Graph__graph-holder",id:"graph-holder",style:{padding:12},ref:s})},As={de:{translation:{"pdf-viewer":JSON.parse('{"fullscreen":"Vollbildmodus","reloadPage":"Seite erneut laden","pleaseWait":"Dokument wird geladen, bitte warten","loading":{"text":"Bitte warten Sie, bis die benötigten Seiten geladen sind"},"zooming":{"zoomIn":"Vergrößern","zoomOut":"Verkleinern"},"actions":{"rotate":"Im Uhrzeigersinn drehen","download":"Herunterladen","print":"Drucken"},"errors":{"unspecific":"Es ist ein Fehler aufgetreten"},"exportDTPDF":{"question":"Frage","solution":"Lösung","condition":"Bedingung","link":"Link","step":"Schritt","startingPoint":"Startpunkt","parentSteps":"Übergeordneter Schritt","noLinks":"Keine verknüpften Schritte","exportedInfo":"Exportiert am {{date}} von {{exportedBy}}","createdInfo":"Erstellt von {{createdBy}}","conditionDefaultTitle":"Standard","contains":"Enthält","notContains":"Enthält nicht","andOperator":"UND","orOperator":"ODER","default":"Standard","deleted":"Gelöscht"}}')}},en:{translation:{"pdf-viewer":JSON.parse('{"fullscreen":"Fullscreen","reloadPage":"Reload page","pleaseWait":"Loading document, please wait","loading":{"text":"Please wait until we load requested pages"},"zooming":{"zoomIn":"Zoom in","zoomOut":"Zoom out"},"actions":{"rotate":"Rotate clockwise","download":"Download","print":"Print"},"errors":{"unspecific":"Something went wrong"},"exportDTPDF":{"question":"Question","solution":"Solution","condition":"Condition","link":"Link","step":"Step","startingPoint":"Starting point","parentSteps":"Parent step","noLinks":"No linked steps","exportedInfo":"Exported at {{date}} by {{exportedBy}}","createdInfo":"Created by {{createdBy}}","conditionDefaultTitle":"Default","contains":"Contains","notContains":"Doesn\'t contain","andOperator":"AND","orOperator":"OR","default":"Default","deleted":"Deleted"}}')}},es:{translation:{"pdf-viewer":JSON.parse('{"fullscreen":"Pantalla completa","reloadPage":"Recargar página","pleaseWait":"Cargando documentos, espere","loading":{"text":"Por favor, espere hasta que carguemos las páginas solicitadas"},"zooming":{"zoomIn":"Acercar","zoomOut":"Alejar"},"actions":{"rotate":"Girar en el sentido de las agujas del reloj","download":"Descargar","print":"Imprimir"},"errors":{"unspecific":"Algo salió mal"},"exportDTPDF":{"question":"Pregunta","solution":"Solución","condition":"Condición","link":"Enlace","step":"Paso","startingPoint":"Punto de partida","parentSteps":"Etapa actual","noLinks":"Sin elementos enlazados","exportedInfo":"Exportado a {{date}} por {{exportedBy}}","createdInfo":"Creado por {{createdBy}}","conditionDefaultTitle":"Predeterminado","contains":"Contiene","notContains":"No contiene","andOperator":"Y","orOperator":"O","default":"Predeterminado","deleted":"Eliminado"}}')}},pl:{translation:{"pdf-viewer":JSON.parse('{"fullscreen":"Fullscreen","reloadPage":"Przeładowanie strony","pleaseWait":"Ładowanie dokumentu, proszę czekać","loading":{"text":"Proszę czekać, aż załadujemy żądane strony"},"zooming":{"zoomIn":"Powiększenie","zoomOut":"Powiększenie"},"actions":{"rotate":"Obróć się zgodnie z ruchem wskazówek zegara","download":"Pobierz","print":"Drukuj"},"errors":{"unspecific":"Coś poszło nie tak"},"exportDTPDF":{"question":"Pytanie","solution":"Rozwiązanie","condition":"Stan","link":"Odnośnik","step":"Krok","startingPoint":"Punkt początkowy","parentSteps":"Krok rodzica","noLinks":"Нет связанных групп","exportedInfo":"Eksportowane w {{date}} na {{exportedBy}}","createdInfo":"Stworzony przez {{createdBy}}","conditionDefaultTitle":"Default","contains":"Zawiera","notContains":"Nie zawiera","andOperator":"I","orOperator":"Lub","default":"Default","deleted":"Usunięto"}}')}},uk:{translation:{"pdf-viewer":JSON.parse('{"fullscreen":"Повноекранний режим","reloadPage":"Оновити","pleaseWait":"Завантаження документу, будь ласка, зачекайте","loading":{"text":"Зачекайте, ми завантажуємо вміст сторінки"},"zooming":{"zoomIn":"Наблизити","zoomOut":"Зменшити"},"actions":{"rotate":"Повернути за годинниковою стрілкою","download":"Завантажити","print":"Друкувати"},"errors":{"unspecific":"Щось пішло не так"},"exportDTPDF":{"question":"Питання","solution":"Рішення","condition":"Умова","link":"Посилання","step":"Крок","startingPoint":"Початковий крок","parentSteps":"Батьківський крок","noLinks":"Немає пов\'язаних кроків","exportedInfo":"Експортовано на {{date}} користувачем {{exportedBy}}","createdInfo":"Створено користувачем {{createdBy}}","conditionDefaultTitle":"За замовчанням","contains":"Містить","notContains":"Не містить","andOperator":"ТА","orOperator":"АБО","default":"За замовчанням","deleted":"Видалений"}}')}}},Ps=e=>"string"==typeof e,Ls=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},Ts=e=>null==e?"":""+e,Ns=/###/g,Os=e=>e&&e.indexOf("###")>-1?e.replace(Ns,"."):e,Ms=e=>!e||Ps(e),Rs=(e,t,n)=>{const r=Ps(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Ms(e))return{};const t=Os(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Ms(e)?{}:{obj:e,k:Os(r[i])}},Ds=(e,t,n)=>{const{obj:r,k:i}=Rs(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=Rs(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=Rs(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},js=(e,t)=>{const{obj:n,k:r}=Rs(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Is=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Ps(e[r])||e[r]instanceof String||Ps(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Is(e[r],t[r],n):e[r]=t[r]);return e},Fs=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var zs={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Vs=e=>Ps(e)?e.replace(/[&<>"'\/]/g,(e=>zs[e])):e,Bs=[" ",",","?","!",";"],$s=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Us=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let e=0;e<r.length;){if(!i||"object"!=typeof i)return;let t,o="";for(let a=e;a<r.length;++a)if(a!==e&&(o+=n),o+=r[a],t=i[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}i=t}return i},Hs=e=>e?.replace("_","-"),qs={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Ws{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||qs,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(Ps(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Ws(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Ws(this.logger,e)}}var Gs=new Ws;class Ys{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((t=>{let[r,i]=t;for(let t=0;t<i;t++)r.apply(r,[e,...n])}))}}class Xs extends Ys{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):Ps(n)&&i?a.push(...n.split(i)):a.push(n)));const s=js(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&o&&Ps(n)?Us(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Ds(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(Ps(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=js(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Is(s,n,i):s={...s,...n},Ds(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var Ks={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach((e=>{t=this.processors[e]?.process(t,n,r,i)??t})),t}};const Js={},Qs=e=>!Ps(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Zs extends Ys{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{n[e]&&(r[e]=n[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Gs.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return void 0!==n?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Bs.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const i=$s.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Ps(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:Ps(i)?[i]:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:o}const c=this.resolve(e,t);let f=c?.res;const h=c?.usedKey||o,d=c?.exactUsedKey||o,p=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==t.count&&!Ps(t.count),m=Zs.hasDefaultValue(t),y=v?this.pluralResolver.getSuffix(u,t.count,t):"",b=t.ordinal&&v?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",w=v&&!t.ordinal&&0===t.count,x=w&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${y}`]||t[`defaultValue${b}`]||t.defaultValue;let k=f;g&&!f&&m&&(k=x);const S=Qs(k),_=Object.prototype.toString.apply(k);if(!(g&&k&&S&&["[object Number]","[object Function]","[object RegExp]"].indexOf(_)<0)||Ps(p)&&Array.isArray(k))if(g&&Ps(p)&&Array.isArray(f))f=f.join(p),f&&(f=this.extendTranslation(f,e,t,n));else{let r=!1,a=!1;!this.isValidLookup(f)&&m&&(r=!0,f=x),this.isValidLookup(f)||(a=!0,f=o);const l=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:f,h=m&&x!==f&&this.options.updateMissing;if(a||r||h){if(this.logger.log(h?"updateKey":"missingKey",u,s,o,h?x:f),i){const e=this.resolve(o,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const i=m&&r!==f?r:l;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,i,h,t):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,s,n,i,h,t),this.emit("missingKey",e,s,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);w&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],o+n,t[`defaultValue${n}`]||x)}))})):r(e,o,x))}f=this.extendTranslation(f,e,t,c,n),a&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${s}:${o}`),(a||r)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${o}`:o,r?f:void 0))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,k,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(i){const e=Array.isArray(k),n=e?[]:{},r=e?d:h;for(const e in k)if(Object.prototype.hasOwnProperty.call(k,e)){const o=`${r}${i}${e}`;n[e]=m&&!f?this.translate(o,{...t,defaultValue:Qs(x)?x[e]:void 0,joinArrays:!1,ns:a}):this.translate(o,{...t,joinArrays:!1,ns:a}),n[e]===o&&(n[e]=k[e])}f=n}}return r?(c.res=f,c.usedParams=this.getUsedParamsDetails(t),c):f}extendTranslation(e,t,n,r,i){var o=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=Ps(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&!Ps(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i?.[0]!==r[0]||n.context?o.translate(...r,t):(o.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=Ps(a)?[a]:a;return null!=e&&s?.length&&!1!==n.applyPostProcessor&&(e=Ks.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ps(e)&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!Ps(a.count),f=c&&!a.ordinal&&0===a.count,h=void 0!==a.context&&(Ps(a.context)||"number"==typeof a.context)&&""!==a.context,d=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((e=>{this.isValidLookup(t)||(o=e,Js[`${d[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(o)||(Js[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${d.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((n=>{if(this.isValidLookup(t))return;i=n;const o=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(o.push(u+e),a.ordinal&&0===e.indexOf(r)&&o.push(u+e.replace(r,this.options.pluralSeparator)),f&&o.push(u+t)),h){const n=`${u}${this.options.contextSeparator}${a.context}`;o.push(n),c&&(o.push(n+e),a.ordinal&&0===e.indexOf(r)&&o.push(n+e.replace(r,this.options.pluralSeparator)),f&&o.push(n+t))}}let s;for(;s=o.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Ps(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class eu{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Gs.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Hs(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Hs(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Ps(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Ps(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Ps(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):Ps(e)&&i(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))})),r}}const tu={zero:0,one:1,two:2,few:3,many:4,other:5},nu={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ru{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Gs.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Hs("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),nu;if(!e.match(/-|_/))return nu;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort(((e,t)=>tu[e]-tu[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const iu=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=((e,t,n)=>{const r=js(e,n);return void 0!==r?r:js(t,n)})(e,t,n);return!o&&i&&Ps(n)&&(o=Us(e,n,r),void 0===o&&(o=Us(t,n,r))),o},ou=e=>e.replace(/\$/g,"$$$$");class au{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Gs.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:d,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:Vs,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?Fs(i):o||"{{",this.suffix=a?Fs(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?Fs(f):h||Fs("$t("),this.nestingSuffix=d?Fs(d):p||Fs(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const i=iu(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(iu(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>ou(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ou(this.escape(e)):ou(e)}].forEach((t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=u(n),void 0===o)if("function"==typeof l){const t=l(e,i,r);o=Ps(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(c){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else Ps(o)||this.useRawValueToEscape||(o=Ts(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),c?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];i={...o},i=i.replace&&!Ps(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),i),i),r&&n[0]===e&&!Ps(r))return r;Ps(r)||(r=Ts(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce(((e,t)=>this.format(e,t,o.lng,{...o,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const su=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(Hs(r),i),t[a]=s),s(n)}};class uu{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Gs.create("formatter"),this.options=e,this.formats={number:su(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:su(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:su(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:su(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:su(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=su(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find((e=>e.indexOf(")")>-1))){const e=i.findIndex((e=>e.indexOf(")")>-1));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}const o=i.reduce(((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}}))}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e);return o}}class lu extends Ys{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Gs.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:r,k:i}=Rs(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*i,o)}),i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Ps(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Ps(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,((n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)}))}saveMissing(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const s={...o,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let i;i=5===u.length?u(e,t,n,r,s):u(e,t,n,r),i&&"function"==typeof i.then?i.then((e=>a(null,e))).catch(a):a(null,i)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const cu=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Ps(e[1])&&(t.defaultValue=e[1]),Ps(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),fu=e=>(Ps(e.ns)&&(e.ns=[e.ns]),Ps(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ps(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),hu=()=>{};class du extends Ys{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=fu(e),this.services={},this.logger=Gs,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(Ps(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=cu();this.options={...r,...this.options,...fu(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?Gs.init(i(this.modules.logger),this.options):Gs.init(null,this.options),t=this.modules.formatter?this.modules.formatter:uu;const n=new eu(this.options);this.store=new Xs(this.options.resources,this.options);const o=this.services;o.logger=Gs,o.resourceStore=this.store,o.languageUtils=n,o.pluralResolver=new ru(n,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(o.formatter=i(t),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new au(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new lu(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new Zs(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=hu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const o=Ls(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hu;const n=Ps(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};n?r(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e))),this.options.preload?.forEach?.((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=Ls();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=hu),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Ks.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=Ls();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,o)=>{o?(i(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Ps(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,(e=>{o(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const i=function(e,t){let o;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else o={...t};o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||i.keyPrefix);const l=r.options.keySeparator||".";let c;return c=o.keyPrefix&&Array.isArray(e)?e.map((e=>`${o.keyPrefix}${l}${e}`)):o.keyPrefix?`${o.keyPrefix}${l}${e}`:e,r.t(c,o)};return Ps(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.translate(...t)}exists(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=Ls();return this.options.ns?(Ps(e)&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Ls();Ps(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return i.length?(this.options.preload=r.concat(i),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services?.languageUtils||new eu(cu());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new du(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hu;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new du(r);if(void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e)),["store","services","language"].forEach((e=>{i[e]=this[e]})),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce(((e,t)=>(e[t]={...this.store.data[t]},Object.keys(e[t]).reduce(((n,r)=>(n[r]={...e[t][r]},n)),{}))),{});i.store=new Xs(e,r),i.services.resourceStore=i.store}return i.translator=new Zs(i.services,r),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)})),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const pu=du.createInstance();function gu(e){return gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gu(e)}function vu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mu(e){var t=function(e){if("object"!=gu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gu(t)?t:t+""}function yu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mu(r.key),r)}}function bu(e,t,n){return t&&yu(e.prototype,t),n&&yu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xu(e,t){return xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xu(e,t)}function ku(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xu(e,t)}function Su(e,t){if(t&&("object"==gu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wu(e)}function _u(e){return _u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_u(e)}function Eu(e,t,n){return(t=mu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Au(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 Pu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Au(Object(n),!0).forEach((function(t){Eu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Au(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}pu.createInstance=du.createInstance,pu.createInstance,pu.dir,pu.init,pu.loadResources,pu.reloadResources,pu.use,pu.changeLanguage,pu.getFixedT,pu.t,pu.exists,pu.setDefaultNamespace,pu.hasLoadedNamespace,pu.loadNamespaces,pu.loadLanguages;var Lu={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},Tu=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vu(this,e),this.init(t,n)}return bu(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Lu,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,Pu(Pu({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}}]),e}(),Nu=new Tu,Ou=function(){function e(){vu(this,e),this.observers={}}return bu(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function Mu(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function Ru(e){return null==e?"":""+e}function Du(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function ju(e,t,n){var r=Du(e,t,Object);r.obj[r.k]=n}function Iu(e,t){var n=Du(e,t),r=n.obj,i=n.k;if(r)return r[i]}function Fu(e,t,n){var r=Iu(e,n);return void 0!==r?r:Iu(t,n)}function zu(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):zu(e[r],t[r],n):e[r]=t[r]);return e}function Vu(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Bu={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function $u(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return Bu[e]})):e}var Uu="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Hu=[" ",",","?","!",";"];function qu(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 Wu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qu(Object(n),!0).forEach((function(t){Eu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i)return;if("string"==typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var a=2,s=r.slice(o,o+a).join(n),u=i[s];void 0===u&&r.length>o+a;)a++,u=i[s=r.slice(o,o+a).join(n)];if(void 0===u)return;if("string"==typeof u)return u;if(s&&"string"==typeof u[s])return u[s];var l=r.slice(o+a).join(n);return l?Gu(u,l,n):void 0}i=i[r[o]]}return i}}var Yu=function(e){ku(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=_u(t);if(n){var i=_u(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Su(this,e)});function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return vu(this,i),t=r.call(this),Uu&&Ou.call(wu(t)),t.data=e||{},t.options=n,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return bu(i,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=Iu(this.data,a);return s||!o||"string"!=typeof n?s:Gu(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),ju(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=Iu(this.data,a)||{};r?zu(s,n,i):s=Wu(Wu({},s),n),ju(this.data,a,s),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?Wu(Wu({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),i}(Ou),Xu={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))})),t}};function Ku(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 Ju(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ku(Object(n),!0).forEach((function(t){Eu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ku(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qu={},Zu=function(e){ku(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=_u(t);if(n){var i=_u(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Su(this,e)});function i(e){var t,n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return vu(this,i),t=r.call(this),Uu&&Ou.call(wu(t)),n=e,o=wu(t),["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((function(e){n[e]&&(o[e]=n[e])})),t.options=a,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=Nu.create("translator"),t}return bu(i,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=Hu.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var i=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}(e,n,r));if(o&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:i};var u=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,n){var r=this;if("object"!==gu(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),s=a.key,u=a.namespaces,l=u[u.length-1],c=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(f){var h=t.nsSeparator||this.options.nsSeparator;return l+h+s}return s}var d=this.resolve(e,t),p=d&&d.res,g=d&&d.usedKey||s,v=d&&d.exactUsedKey||s,m=Object.prototype.toString.apply(p),y=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&p&&"string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p&&["[object Number]","[object Function]","[object RegExp]"].indexOf(m)<0&&("string"!=typeof y||"[object Array]"!==m)){if(!t.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,p,Ju(Ju({},t),{},{ns:u})):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(o){var w="[object Array]"===m,x=w?[]:{},k=w?v:g;for(var S in p)if(Object.prototype.hasOwnProperty.call(p,S)){var _="".concat(k).concat(o).concat(S);x[S]=this.translate(_,Ju(Ju({},t),{joinArrays:!1,ns:u})),x[S]===_&&(x[S]=p[S])}p=x}}else if(b&&"string"==typeof y&&"[object Array]"===m)(p=p.join(y))&&(p=this.extendTranslation(p,e,t,n));else{var E=!1,C=!1,A=void 0!==t.count&&"string"!=typeof t.count,P=i.hasDefaultValue(t),L=A?this.pluralResolver.getSuffix(c,t.count,t):"",T=t["defaultValue".concat(L)]||t.defaultValue;!this.isValidLookup(p)&&P&&(E=!0,p=T),this.isValidLookup(p)||(C=!0,p=s);var N=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:p,O=P&&T!==p&&this.options.updateMissing;if(C||E||O){if(this.logger.log(O?"updateKey":"missingKey",c,l,s,O?T:p),o){var M=this.resolve(s,Ju(Ju({},t),{},{keySeparator:!1}));M&&M.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var R=[],D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&D&&D[0])for(var j=0;j<D.length;j++)R.push(D[j]);else"all"===this.options.saveMissingTo?R=this.languageUtils.toResolveHierarchy(t.lng||this.language):R.push(t.lng||this.language);var I=function(e,n,i){var o=P&&i!==p?i:N;r.options.missingKeyHandler?r.options.missingKeyHandler(e,l,n,o,O,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,l,n,o,O,t),r.emit("missingKey",e,l,n,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?R.forEach((function(e){r.pluralResolver.getSuffixes(e).forEach((function(n){I([e],s+n,t["defaultValue".concat(n)]||T)}))})):I(R,s,T))}p=this.extendTranslation(p,e,t,d,n),C&&p===s&&this.options.appendNamespaceToMissingKey&&(p="".concat(l,":").concat(s)),(C||E)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(p))}return p}},{key:"extendTranslation",value:function(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(Ju(Ju({},n),{interpolation:Ju(Ju({},this.options.interpolation),n.interpolation)}));var a,s="string"==typeof e&&(n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables);if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=Ju(Ju({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),s){var c=e.match(this.interpolator.nestingRegexp);a<(c&&c.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):o.translate.apply(o,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,h="string"==typeof f?[f]:f;return null!=e&&h&&h.length&&!1!==n.applyPostProcessor&&(e=Xu.handle(h,e,t,this.options&&this.options.postProcessPassResolved?Ju({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),l=u.key;n=l;var c=u.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,h=f&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),d=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach((function(e){a.isValidLookup(t)||(o=e,!Qu["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(Qu["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){i=n;var o,u=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,l,n,e,s);else{var c;f&&(c=a.pluralResolver.getSuffix(n,s.count,s));var p="_zero";if(f&&(u.push(l+c),h&&u.push(l+p)),d){var g="".concat(l).concat(a.options.contextSeparator).concat(s.context);u.push(g),f&&(u.push(g+c),h&&u.push(g+p))}}for(;o=u.pop();)a.isValidLookup(t)||(r=o,t=a.getResource(n,e,o,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),i}(Ou);function el(e){return e.charAt(0).toUpperCase()+e.slice(1)}var tl=function(){function e(t){vu(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Nu.create("languageUtils")}return bu(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=el(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=el(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=el(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))})),i}}]),e}(),nl=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],rl={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},il=["v1","v2","v3"],ol={zero:0,one:1,two:2,few:3,many:4,other:5},al=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vu(this,e),this.languageUtils=t,this.options=r,this.logger=Nu.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(n={},nl.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:rl[e.fc]}}))})),n)}return bu(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return ol[e]-ol[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!il.includes(this.options.compatibilityJSON)}}]),e}();function sl(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 ul(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sl(Object(n),!0).forEach((function(t){Eu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ll=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vu(this,e),this.logger=Nu.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return bu(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:$u,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?Vu(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?Vu(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?Vu(t.nestingPrefix):t.nestingPrefixEscaped||Vu("$t("),this.nestingSuffix=t.nestingSuffix?Vu(t.nestingSuffix):t.nestingSuffixEscaped||Vu(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0){var i=Fu(t,u,e);return s.alwaysFormat?s.format(i,void 0,n,ul(ul(ul({},r),t),{},{interpolationkey:e})):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),l=o.join(s.formatSeparator).trim();return s.format(Fu(t,u,a),l,n,ul(ul(ul({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach((function(t){for(a=0;i=t.regex.exec(e);){if(void 0===(o=c(i[1].trim())))if("function"==typeof f){var n=f(e,i,r);o="string"==typeof n?n:""}else{if(h){o=i[0];continue}s.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o=""}else"string"==typeof o||s.useRawValueToEscape||(o=Ru(o));var u=t.safeValue(o);if(e=e.replace(i[0],u),h?(t.regex.lastIndex+=u.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=ul({},o);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0],i=(i=this.interpolate(i,a)).replace(/'/g,'"');try{a=JSON.parse(i),t&&(a=ul(ul({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=c.shift(),u=c,l=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Ru(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=u.reduce((function(e,t){return i.format(e,t,o.lng,ul(ul({},o),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function cl(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 fl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cl(Object(n),!0).forEach((function(t){Eu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hl=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vu(this,e),this.logger=Nu.create("formatter"),this.options=t,this.formats={number:function(e,t,n){return new Intl.NumberFormat(t,n).format(e)},currency:function(e,t,n){return new Intl.NumberFormat(t,fl(fl({},n),{},{style:"currency"})).format(e)},datetime:function(e,t,n){return new Intl.DateTimeFormat(t,fl({},n)).format(e)},relativetime:function(e,t,n){return new Intl.RelativeTimeFormat(t,fl({},n)).format(e,n.range||"day")},list:function(e,t,n){return new Intl.ListFormat(t,fl({},n)).format(e)}},this.init(t)}return bu(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e]=t}},{key:"format",value:function(e,t,n,r){var i=this,o=t.split(this.formatSeparator).reduce((function(e,t){var o=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((function(e){if(e){var t=(o=e.split(":"),a=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(o,a)||function(e,t){if(e){if("string"==typeof e)return Cu(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cu(e,t):void 0}}(o,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=t[0],i=t[1];"false"===i.trim()&&(n[r.trim()]=!1),"true"===i.trim()&&(n[r.trim()]=!0),isNaN(i.trim())||(n[r.trim()]=parseInt(i.trim(),10)),n[r.trim()]||(n[r.trim()]=i.trim())}var o,a}))}return{formatName:t,formatOptions:n}}(t),a=o.formatName,s=o.formatOptions;if(i.formats[a]){var u=e;try{var l=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},c=l.locale||l.lng||r.locale||r.lng||n;u=i.formats[a](e,c,fl(fl(fl({},s),r),l))}catch(e){i.logger.warn(e)}return u}return i.logger.warn("there was no format function for ".concat(a)),e}),e);return o}}]),e}();function dl(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 pl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dl(Object(n),!0).forEach((function(t){Eu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gl=function(e){ku(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=_u(t);if(n){var i=_u(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Su(this,e)});function i(e,t,n){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return vu(this,i),o=r.call(this),Uu&&Ou.call(wu(o)),o.backend=e,o.store=t,o.services=n,o.languageUtils=n.languageUtils,o.options=a,o.logger=Nu.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,a.backend,a),o}return bu(i,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),o.indexOf(s)<0&&o.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:o,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,l,c;r=n.loaded,s=o,(l=(u=Du(r,[i],Object)).obj)[c=u.k]=l[c]||[],l[c].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&i<5?setTimeout((function(){r.read.call(r,e,t,n,i+1,2*o,a)}),o):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,pl(pl({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),i}(Ou);function vl(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ml(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 yl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ml(Object(n),!0).forEach((function(t){Eu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ml(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bl(){}var wl=function(e){ku(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=_u(t);if(n){var i=_u(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Su(this,e)});function i(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(vu(this,i),e=r.call(this),Uu&&Ou.call(wu(e)),e.options=vl(n),e.services={},e.logger=Nu,e.modules={external:[]},t=wu(e),Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))})),o&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,o),Su(e,wu(e));setTimeout((function(){e.init(n,o)}),0)}return e}return bu(i,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===gu(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===gu(e[2])||"object"===gu(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=yl(yl(yl({},r),this.options),vl(t)),this.options.interpolation=yl({},this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?Nu.init(i(this.modules.logger),this.options):Nu.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=hl);var a=new tl(this.options);this.store=new Yu(this.options.resources,this.options);var s=this.services;s.logger=Nu,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new al(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(s.formatter=i(o),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new ll(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new gl(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new Zu(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=bl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var l=Mu(),c=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bl,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var i=[],o=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return o(e)})),this.options.preload&&this.options.preload.forEach((function(e){return o(e)})),this.services.backendConnector.load(i,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=Mu();return e||(e=this.languages),t||(t=this.options.ns),n||(n=bl),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Xu.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=Mu();this.emit("languageChanging",e);var i=function(e){if(n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<n.languages.length;t++){var r=n.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&n.store.hasLanguageSomeTranslations(r)){n.resolvedLanguage=r;break}}},o=function(o){e||o||!n.services.languageDetector||(o=[]);var a="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);a&&(n.language||i(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,i=function e(t,i){var o;if("object"!==gu(i)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,i].concat(s))}else o=yl({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns;var l=r.options.keySeparator||".",c=n?"".concat(n).concat(l).concat(t):t;return r.t(c,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||i&&!a(o,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=Mu();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=Mu();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bl,r=yl(yl(yl({},this.options),t),{isClone:!0}),o=new i(r);return["store","services","language"].forEach((function(t){o[t]=e[t]})),o.services=yl({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new Zu(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(r,n),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),i}(Ou);Eu(wl,"createInstance",(function(){return new wl(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var xl=wl.createInstance();xl.createInstance=wl.createInstance,xl.createInstance,xl.init,xl.loadResources,xl.reloadResources,xl.use,xl.changeLanguage,xl.getFixedT,xl.t,xl.exists,xl.setDefaultNamespace,xl.hasLoadedNamespace,xl.loadNamespaces,xl.loadLanguages;var kl=n(4353);n(494),n(7317),n(4173);var Sl=n(5750),_l=n(7375);kl.extend(Sl),kl.extend(_l);const El=(e,t)=>kl(e).format(t),Cl={format(e,t,n="en"){var r;return r=n,kl.locale(r),void 0===e?e:"uppercase"===t?e.toUpperCase():"lowercase"===t?e.toLowerCase():"capitalize"===t?e.charAt(0).toUpperCase()+e.slice(1):"bold"===t?`<b>${e}</b>`:"italic"===t?`<i>${e}</i>`:"datetime"===t?El(e,"MMMM D, YYYY h:mm A"):"datetimeUTC"===t?`${El(e,"MMMM D, YYYY H:mm")} (UTC)`:"numeral"===t?Number(e).toLocaleString("en-US"):"emphatic"===t?`<em>${e}</em>`:"strong"===t?`<strong>${e}</strong>`:e}};var Al=pu.createInstance();Al.init({lng:"en",resources:As,fallbackLng:"en",interpolation:Cl,missingKeyHandler:function(){return"⛔️"}}),Al.use(w);const Pl=Al;function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ll.apply(null,arguments)}const Tl=function(e){var t=e.tree,n=e.variables,r={conditionDefaultTitle:Pl.t("pdf-viewer.exportDTPDF.conditionDefaultTitle"),containsLabel:Pl.t("pdf-viewer.exportDTPDF.contains"),notContainsLabel:Pl.t("pdf-viewer.exportDTPDF.notContains"),andOperator:Pl.t("pdf-viewer.exportDTPDF.andOperator"),orOperator:Pl.t("pdf-viewer.exportDTPDF.orOperator")};return d.createElement(k,{i18n:Pl},d.createElement(Cs,Ll({tree:t},r,{variables:n})))};var Nl=function(e){var t=e.language,n=e.tree,r=e.variables,i=e.containerSelector,o=void 0===i?"#diagram-container":i,a=document.querySelector(o);t&&Pl.changeLanguage(t),p.createRoot(a).render(d.createElement(Tl,{tree:n,variables:r},null))}})();var i=window;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
|