(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[193],{77314:function(t,e,n){"use strict";n.d(e,{TA:function(){return nn}});var i,r,s,a=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==o},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function l(t,e){return!1!==e.clone&&e.isMergeableObject(t)?u(Array.isArray(t)?[]:{},t,e):t}function c(t,e,n){return t.concat(e).map(function(t){return l(t,n)})}function u(t,e,n){(n=n||{}).arrayMerge=n.arrayMerge||c,n.isMergeableObject=n.isMergeableObject||a;var i,r,s=Array.isArray(e);return s!==Array.isArray(t)?l(e,n):s?n.arrayMerge(t,e,n):(r={},(i=n).isMergeableObject(t)&&Object.keys(t).forEach(function(e){r[e]=l(t[e],i)}),Object.keys(e).forEach(function(n){i.isMergeableObject(e[n])&&t[n]?r[n]=u(t[n],e[n],i):r[n]=l(e[n],i)}),r)}u.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,n){return u(t,n,e)},{})};var h=u,d="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,p=d||f||Function("return this")(),v=p.Symbol,m=Object.prototype,g=m.hasOwnProperty,y=m.toString,b=v?v.toStringTag:void 0,_=function(t){var e=g.call(t,b),n=t[b];try{t[b]=void 0;var i=!0}catch(t){}var r=y.call(t);return i&&(e?t[b]=n:delete t[b]),r},w=Object.prototype.toString,x=v?v.toStringTag:void 0,k=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":x&&x in Object(t)?_(t):w.call(t)},C=function(t,e){return function(n){return t(e(n))}},j=C(Object.getPrototypeOf,Object),M=function(t){return null!=t&&"object"==typeof t},E=Object.prototype,S=Function.prototype.toString,N=E.hasOwnProperty,T=S.call(Object),O=function(t){if(!M(t)||"[object Object]"!=k(t))return!1;var e=j(t);if(null===e)return!0;var n=N.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&S.call(n)==T},L=function(t,e){return t===e||t!=t&&e!=e},A=function(t,e){for(var n=t.length;n--;)if(L(t[n][0],e))return n;return -1},R=Array.prototype.splice;function I(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}I.prototype.clear=function(){this.__data__=[],this.size=0},I.prototype.delete=function(t){var e=this.__data__,n=A(e,t);return!(n<0)&&(n==e.length-1?e.pop():R.call(e,n,1),--this.size,!0)},I.prototype.get=function(t){var e=this.__data__,n=A(e,t);return n<0?void 0:e[n][1]},I.prototype.has=function(t){return A(this.__data__,t)>-1},I.prototype.set=function(t,e){var n=this.__data__,i=A(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};var D=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},P=function(t){if(!D(t))return!1;var e=k(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Z=p["__core-js_shared__"],F=(i=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",$=Function.prototype.toString,z=function(t){if(null!=t){try{return $.call(t)}catch(t){}try{return t+""}catch(t){}}return""},B=/^\[object .+?Constructor\]$/,V=Object.prototype,U=Function.prototype.toString,q=V.hasOwnProperty,W=RegExp("^"+U.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=function(t,e){var n,i=null==t?void 0:t[e];return D(n=i)&&(!F||!(F in n))&&(P(n)?W:B).test(z(n))?i:void 0},G=H(p,"Map"),Y=H(Object,"create"),K=Object.prototype.hasOwnProperty,Q=Object.prototype.hasOwnProperty;function X(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}X.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},X.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},X.prototype.get=function(t){var e=this.__data__;if(Y){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return K.call(e,t)?e[t]:void 0},X.prototype.has=function(t){var e=this.__data__;return Y?void 0!==e[t]:Q.call(e,t)},X.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Y&&void 0===e?"__lodash_hash_undefined__":e,this};var J=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},tt=function(t,e){var n=t.__data__;return J(e)?n["string"==typeof e?"string":"hash"]:n.map};function te(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function tn(t){var e=this.__data__=new I(t);this.size=e.size}te.prototype.clear=function(){this.size=0,this.__data__={hash:new X,map:new(G||I),string:new X}},te.prototype.delete=function(t){var e=tt(this,t).delete(t);return this.size-=e?1:0,e},te.prototype.get=function(t){return tt(this,t).get(t)},te.prototype.has=function(t){return tt(this,t).has(t)},te.prototype.set=function(t,e){var n=tt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},tn.prototype.clear=function(){this.__data__=new I,this.size=0},tn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},tn.prototype.get=function(t){return this.__data__.get(t)},tn.prototype.has=function(t){return this.__data__.has(t)},tn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof I){var i=n.__data__;if(!G||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new te(i)}return n.set(t,e),this.size=n.size,this};var ti=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t},tr=function(){try{var t=H(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),ts=function(t,e,n){"__proto__"==e&&tr?tr(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},ta=Object.prototype.hasOwnProperty,to=function(t,e,n){var i=t[e];ta.call(t,e)&&L(i,n)&&(void 0!==n||e in t)||ts(t,e,n)},tl=function(t,e,n,i){var r=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var o=e[s],l=i?i(n[o],t[o],o,n,t):void 0;void 0===l&&(l=t[o]),r?ts(n,o,l):to(n,o,l)}return n},tc=function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i},tu=function(t){return M(t)&&"[object Arguments]"==k(t)},th=Object.prototype,td=th.hasOwnProperty,tf=th.propertyIsEnumerable,tp=tu(function(){return arguments}())?tu:function(t){return M(t)&&td.call(t,"callee")&&!tf.call(t,"callee")},tv=Array.isArray,tm="object"==typeof exports&&exports&&!exports.nodeType&&exports,tg=tm&&"object"==typeof module&&module&&!module.nodeType&&module,ty=tg&&tg.exports===tm?p.Buffer:void 0,tb=(ty?ty.isBuffer:void 0)||function(){return!1},t_=/^(?:0|[1-9]\d*)$/,tw=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&t_.test(t))&&t>-1&&t%1==0&&t<e},tx=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},tk={};tk["[object Float32Array]"]=tk["[object Float64Array]"]=tk["[object Int8Array]"]=tk["[object Int16Array]"]=tk["[object Int32Array]"]=tk["[object Uint8Array]"]=tk["[object Uint8ClampedArray]"]=tk["[object Uint16Array]"]=tk["[object Uint32Array]"]=!0,tk["[object Arguments]"]=tk["[object Array]"]=tk["[object ArrayBuffer]"]=tk["[object Boolean]"]=tk["[object DataView]"]=tk["[object Date]"]=tk["[object Error]"]=tk["[object Function]"]=tk["[object Map]"]=tk["[object Number]"]=tk["[object Object]"]=tk["[object RegExp]"]=tk["[object Set]"]=tk["[object String]"]=tk["[object WeakMap]"]=!1;var tC=function(t){return function(e){return t(e)}},tj="object"==typeof exports&&exports&&!exports.nodeType&&exports,tM=tj&&"object"==typeof module&&module&&!module.nodeType&&module,tE=tM&&tM.exports===tj&&d.process,tS=function(){try{var t=tM&&tM.require&&tM.require("util").types;if(t)return t;return tE&&tE.binding&&tE.binding("util")}catch(t){}}(),tN=tS&&tS.isTypedArray,tT=tN?tC(tN):function(t){return M(t)&&tx(t.length)&&!!tk[k(t)]},tO=Object.prototype.hasOwnProperty,tL=function(t,e){var n=tv(t),i=!n&&tp(t),r=!n&&!i&&tb(t),s=!n&&!i&&!r&&tT(t),a=n||i||r||s,o=a?tc(t.length,String):[],l=o.length;for(var c in t)(e||tO.call(t,c))&&!(a&&("length"==c||r&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||tw(c,l)))&&o.push(c);return o},tA=Object.prototype,tR=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||tA)},tI=C(Object.keys,Object),tD=Object.prototype.hasOwnProperty,tP=function(t){if(!tR(t))return tI(t);var e=[];for(var n in Object(t))tD.call(t,n)&&"constructor"!=n&&e.push(n);return e},tZ=function(t){return null!=t&&tx(t.length)&&!P(t)},tF=function(t){return tZ(t)?tL(t):tP(t)},t$=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},tz=Object.prototype.hasOwnProperty,tB=function(t){if(!D(t))return t$(t);var e=tR(t),n=[];for(var i in t)"constructor"==i&&(e||!tz.call(t,i))||n.push(i);return n},tV=function(t){return tZ(t)?tL(t,!0):tB(t)},tU="object"==typeof exports&&exports&&!exports.nodeType&&exports,tq=tU&&"object"==typeof module&&module&&!module.nodeType&&module,tW=tq&&tq.exports===tU?p.Buffer:void 0,tH=tW?tW.allocUnsafe:void 0,tG=function(t,e){if(e)return t.slice();var n=t.length,i=tH?tH(n):new t.constructor(n);return t.copy(i),i},tY=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e},tK=function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,s=[];++n<i;){var a=t[n];e(a,n,t)&&(s[r++]=a)}return s},tQ=function(){return[]},tX=Object.prototype.propertyIsEnumerable,tJ=Object.getOwnPropertySymbols,t0=tJ?function(t){return null==t?[]:tK(tJ(t=Object(t)),function(e){return tX.call(t,e)})}:tQ,t1=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t},t2=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)t1(e,t0(t)),t=j(t);return e}:tQ,t3=function(t,e,n){var i=e(t);return tv(t)?i:t1(i,n(t))},t4=function(t){return t3(t,tF,t0)},t5=function(t){return t3(t,tV,t2)},t7=H(p,"DataView"),t6=H(p,"Promise"),t8=H(p,"Set"),t9=H(p,"WeakMap"),et="[object Map]",ee="[object Promise]",en="[object Set]",ei="[object WeakMap]",er="[object DataView]",es=z(t7),ea=z(G),eo=z(t6),el=z(t8),ec=z(t9),eu=k;(t7&&eu(new t7(new ArrayBuffer(1)))!=er||G&&eu(new G)!=et||t6&&eu(t6.resolve())!=ee||t8&&eu(new t8)!=en||t9&&eu(new t9)!=ei)&&(eu=function(t){var e=k(t),n="[object Object]"==e?t.constructor:void 0,i=n?z(n):"";if(i)switch(i){case es:return er;case ea:return et;case eo:return ee;case el:return en;case ec:return ei}return e});var eh=eu,ed=Object.prototype.hasOwnProperty,ef=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ed.call(t,"index")&&(n.index=t.index,n.input=t.input),n},ep=p.Uint8Array,ev=function(t){var e=new t.constructor(t.byteLength);return new ep(e).set(new ep(t)),e},em=function(t,e){var n=e?ev(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)},eg=/\w*$/,ey=function(t){var e=new t.constructor(t.source,eg.exec(t));return e.lastIndex=t.lastIndex,e},eb=v?v.prototype:void 0,e_=eb?eb.valueOf:void 0,ew=function(t,e){var n=e?ev(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},ex=function(t,e,n){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return ev(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return em(t,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 ew(t,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return ey(t);case"[object Symbol]":return e_?Object(e_.call(t)):{}}},ek=Object.create,eC=function(){function t(){}return function(e){if(!D(e))return{};if(ek)return ek(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),ej=tS&&tS.isMap,eM=ej?tC(ej):function(t){return M(t)&&"[object Map]"==eh(t)},eE=tS&&tS.isSet,eS=eE?tC(eE):function(t){return M(t)&&"[object Set]"==eh(t)},eN="[object Arguments]",eT="[object Function]",eO="[object Object]",eL={};eL[eN]=eL["[object Array]"]=eL["[object ArrayBuffer]"]=eL["[object DataView]"]=eL["[object Boolean]"]=eL["[object Date]"]=eL["[object Float32Array]"]=eL["[object Float64Array]"]=eL["[object Int8Array]"]=eL["[object Int16Array]"]=eL["[object Int32Array]"]=eL["[object Map]"]=eL["[object Number]"]=eL[eO]=eL["[object RegExp]"]=eL["[object Set]"]=eL["[object String]"]=eL["[object Symbol]"]=eL["[object Uint8Array]"]=eL["[object Uint8ClampedArray]"]=eL["[object Uint16Array]"]=eL["[object Uint32Array]"]=!0,eL["[object Error]"]=eL[eT]=eL["[object WeakMap]"]=!1;var eA=function t(e,n,i,r,s,a){var o,l=1&n,c=2&n,u=4&n;if(i&&(o=s?i(e,r,s,a):i(e)),void 0!==o)return o;if(!D(e))return e;var h=tv(e);if(h){if(o=ef(e),!l)return tY(e,o)}else{var d,f,p,v,m=eh(e),g=m==eT||"[object GeneratorFunction]"==m;if(tb(e))return tG(e,l);if(m==eO||m==eN||g&&!s){if(o=c||g?{}:"function"!=typeof e.constructor||tR(e)?{}:eC(j(e)),!l)return c?(f=(d=o)&&tl(e,tV(e),d),tl(e,t2(e),f)):(v=(p=o)&&tl(e,tF(e),p),tl(e,t0(e),v))}else{if(!eL[m])return s?e:{};o=ex(e,m,l)}}a||(a=new tn);var y=a.get(e);if(y)return y;a.set(e,o),eS(e)?e.forEach(function(r){o.add(t(r,n,i,r,e,a))}):eM(e)&&e.forEach(function(r,s){o.set(s,t(r,n,i,s,e,a))});var b=u?c?t5:t4:c?tV:tF,_=h?void 0:b(e);return ti(_||e,function(r,s){_&&(r=e[s=r]),to(o,s,t(r,n,i,s,e,a))}),o},eR=function(t){return eA(t,5)},eI=n(2265),eD=n(8727),eP=n.n(eD),eZ=function(t,e){},eF=function(t){return eA(t,4)},e$=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r},ez=function(t){return"symbol"==typeof t||M(t)&&"[object Symbol]"==k(t)};function eB(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var a=t.apply(this,i);return n.cache=s.set(r,a)||s,a};return n.cache=new(eB.Cache||te),n}eB.Cache=te;var eV=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eU=/\\(\\)?/g,eq=(s=(r=eB(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(eV,function(t,n,i,r){e.push(i?r.replace(eU,"$1"):n||t)}),e},function(t){return 500===s.size&&s.clear(),t})).cache,r),eW=1/0,eH=function(t){if("string"==typeof t||ez(t))return t;var e=t+"";return"0"==e&&1/t==-eW?"-0":e},eG=1/0,eY=v?v.prototype:void 0,eK=eY?eY.toString:void 0,eQ=function t(e){if("string"==typeof e)return e;if(tv(e))return e$(e,t)+"";if(ez(e))return eK?eK.call(e):"";var n=e+"";return"0"==n&&1/e==-eG?"-0":n},eX=function(t){return tv(t)?e$(t,eH):ez(t)?[t]:tY(eq(null==t?"":eQ(t)))};function eJ(){return(eJ=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function e0(t,e){if(null==t)return{};var n,i,r={},s=Object.keys(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}function e1(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n(63285);var e2=(0,eI.createContext)(void 0);e2.displayName="FormikContext",e2.Provider,e2.Consumer;var e3=function(t){return Array.isArray(t)&&0===t.length},e4=function(t){return"function"==typeof t},e5=function(t){return null!==t&&"object"==typeof t},e7=function(t){return"[object String]"===Object.prototype.toString.call(t)},e6=function(t){return e5(t)&&e4(t.then)};function e8(t,e,n,i){void 0===i&&(i=0);for(var r=eX(e);t&&i<r.length;)t=t[r[i++]];return i===r.length||t?void 0===t?n:t:n}function e9(t,e,n){for(var i=eF(t),r=i,s=0,a=eX(e);s<a.length-1;s++){var o=a[s],l=e8(t,a.slice(0,s+1));if(l&&(e5(l)||Array.isArray(l)))r=r[o]=eF(l);else{var c=a[s+1];r=r[o]=String(Math.floor(Number(c)))===c&&Number(c)>=0?[]:{}}}return(0===s?t:r)[a[s]]===n?t:(void 0===n?delete r[a[s]]:r[a[s]]=n,0===s&&void 0===n&&delete i[a[s]],i)}var nt={},ne={};function nn(t){var e=t.validateOnChange,n=void 0===e||e,i=t.validateOnBlur,r=void 0===i||i,s=t.validateOnMount,a=void 0!==s&&s,o=t.isInitialValid,l=t.enableReinitialize,c=void 0!==l&&l,u=t.onSubmit,d=e0(t,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=eJ({validateOnChange:n,validateOnBlur:r,validateOnMount:a,onSubmit:u},d),p=(0,eI.useRef)(f.initialValues),v=(0,eI.useRef)(f.initialErrors||nt),m=(0,eI.useRef)(f.initialTouched||ne),g=(0,eI.useRef)(f.initialStatus),y=(0,eI.useRef)(!1),b=(0,eI.useRef)({});(0,eI.useEffect)(function(){return y.current=!0,function(){y.current=!1}},[]);var _=(0,eI.useState)(0)[1],w=(0,eI.useRef)({values:eR(f.initialValues),errors:eR(f.initialErrors)||nt,touched:eR(f.initialTouched)||ne,status:eR(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),x=w.current,k=(0,eI.useCallback)(function(t){var e=w.current;w.current=function(t,e){switch(e.type){case"SET_VALUES":return eJ({},t,{values:e.payload});case"SET_TOUCHED":return eJ({},t,{touched:e.payload});case"SET_ERRORS":if(eP()(t.errors,e.payload))return t;return eJ({},t,{errors:e.payload});case"SET_STATUS":return eJ({},t,{status:e.payload});case"SET_ISSUBMITTING":return eJ({},t,{isSubmitting:e.payload});case"SET_ISVALIDATING":return eJ({},t,{isValidating:e.payload});case"SET_FIELD_VALUE":return eJ({},t,{values:e9(t.values,e.payload.field,e.payload.value)});case"SET_FIELD_TOUCHED":return eJ({},t,{touched:e9(t.touched,e.payload.field,e.payload.value)});case"SET_FIELD_ERROR":return eJ({},t,{errors:e9(t.errors,e.payload.field,e.payload.value)});case"RESET_FORM":return eJ({},t,e.payload);case"SET_FORMIK_STATE":return e.payload(t);case"SUBMIT_ATTEMPT":return eJ({},t,{touched:function t(e,n,i,r){void 0===i&&(i=new WeakMap),void 0===r&&(r={});for(var s=0,a=Object.keys(e);s<a.length;s++){var o=a[s],l=e[o];e5(l)?i.get(l)||(i.set(l,!0),r[o]=Array.isArray(l)?[]:{},t(l,n,i,r[o])):r[o]=n}return r}(t.values,!0),isSubmitting:!0,submitCount:t.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return eJ({},t,{isSubmitting:!1});default:return t}}(e,t),e!==w.current&&_(function(t){return t+1})},[]),C=(0,eI.useCallback)(function(t,e){return new Promise(function(n,i){var r=f.validate(t,e);null==r?n(nt):e6(r)?r.then(function(t){n(t||nt)},function(t){i(t)}):n(r)})},[f.validate]),j=(0,eI.useCallback)(function(t,e){var n,i,r=f.validationSchema,s=e4(r)?r(e):r,a=e&&s.validateAt?s.validateAt(e,t):(void 0===n&&(n=!1),i=function t(e){var n=Array.isArray(e)?[]:{};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=String(i);!0===Array.isArray(e[r])?n[r]=e[r].map(function(e){return!0===Array.isArray(e)||O(e)?t(e):""!==e?e:void 0}):O(e[r])?n[r]=t(e[r]):n[r]=""!==e[r]?e[r]:void 0}return n}(t),s[n?"validateSync":"validate"](i,{abortEarly:!1,context:i}));return new Promise(function(t,e){a.then(function(){t(nt)},function(n){"ValidationError"===n.name?t(function(t){var e={};if(t.inner){if(0===t.inner.length)return e9(e,t.path,t.message);for(var n=t.inner,i=Array.isArray(n),r=0,n=i?n:n[Symbol.iterator]();;){if(i){if(r>=n.length)break;s=n[r++]}else{if((r=n.next()).done)break;s=r.value}var s,a=s;e8(e,a.path)||(e=e9(e,a.path,a.message))}}return e}(n)):e(n)})})},[f.validationSchema]),M=(0,eI.useCallback)(function(t,e){return new Promise(function(n){return n(b.current[t].validate(e))})},[]),E=(0,eI.useCallback)(function(t){var e=Object.keys(b.current).filter(function(t){return e4(b.current[t].validate)});return Promise.all(e.length>0?e.map(function(e){return M(e,e8(t,e))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")]).then(function(t){return t.reduce(function(t,n,i){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(t=e9(t,e[i],n)),t},{})})},[M]),S=(0,eI.useCallback)(function(t){return Promise.all([E(t),f.validationSchema?j(t):{},f.validate?C(t):{}]).then(function(t){var e=t[0],n=t[1],i=t[2];return h.all([e,n,i],{arrayMerge:ni})})},[f.validate,f.validationSchema,E,C,j]),N=ns(function(t){return void 0===t&&(t=x.values),k({type:"SET_ISVALIDATING",payload:!0}),S(t).then(function(t){return y.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:t})),t})});(0,eI.useEffect)(function(){a&&!0===y.current&&eP()(p.current,f.initialValues)&&N(p.current)},[a,N]);var T=(0,eI.useCallback)(function(t){var e=t&&t.values?t.values:p.current,n=t&&t.errors?t.errors:v.current?v.current:f.initialErrors||{},i=t&&t.touched?t.touched:m.current?m.current:f.initialTouched||{},r=t&&t.status?t.status:g.current?g.current:f.initialStatus;p.current=e,v.current=n,m.current=i,g.current=r;var s=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!t&&!!t.isSubmitting,errors:n,touched:i,status:r,values:e,isValidating:!!t&&!!t.isValidating,submitCount:t&&t.submitCount&&"number"==typeof t.submitCount?t.submitCount:0}})};if(f.onReset){var a=f.onReset(x.values,K);e6(a)?a.then(s):s()}else s()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);(0,eI.useEffect)(function(){!0===y.current&&!eP()(p.current,f.initialValues)&&c&&(p.current=f.initialValues,T(),a&&N(p.current))},[c,f.initialValues,T,a,N]),(0,eI.useEffect)(function(){c&&!0===y.current&&!eP()(v.current,f.initialErrors)&&(v.current=f.initialErrors||nt,k({type:"SET_ERRORS",payload:f.initialErrors||nt}))},[c,f.initialErrors]),(0,eI.useEffect)(function(){c&&!0===y.current&&!eP()(m.current,f.initialTouched)&&(m.current=f.initialTouched||ne,k({type:"SET_TOUCHED",payload:f.initialTouched||ne}))},[c,f.initialTouched]),(0,eI.useEffect)(function(){c&&!0===y.current&&!eP()(g.current,f.initialStatus)&&(g.current=f.initialStatus,k({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var L=ns(function(t){if(b.current[t]&&e4(b.current[t].validate)){var e=e8(x.values,t),n=b.current[t].validate(e);return e6(n)?(k({type:"SET_ISVALIDATING",payload:!0}),n.then(function(t){return t}).then(function(e){k({type:"SET_FIELD_ERROR",payload:{field:t,value:e}}),k({type:"SET_ISVALIDATING",payload:!1})})):(k({type:"SET_FIELD_ERROR",payload:{field:t,value:n}}),Promise.resolve(n))}return f.validationSchema?(k({type:"SET_ISVALIDATING",payload:!0}),j(x.values,t).then(function(t){return t}).then(function(e){k({type:"SET_FIELD_ERROR",payload:{field:t,value:e8(e,t)}}),k({type:"SET_ISVALIDATING",payload:!1})})):Promise.resolve()}),A=(0,eI.useCallback)(function(t,e){var n=e.validate;b.current[t]={validate:n}},[]),R=(0,eI.useCallback)(function(t){delete b.current[t]},[]),I=ns(function(t,e){return k({type:"SET_TOUCHED",payload:t}),(void 0===e?r:e)?N(x.values):Promise.resolve()}),D=(0,eI.useCallback)(function(t){k({type:"SET_ERRORS",payload:t})},[]),P=ns(function(t,e){var i=e4(t)?t(x.values):t;return k({type:"SET_VALUES",payload:i}),(void 0===e?n:e)?N(i):Promise.resolve()}),Z=(0,eI.useCallback)(function(t,e){k({type:"SET_FIELD_ERROR",payload:{field:t,value:e}})},[]),F=ns(function(t,e,i){return k({type:"SET_FIELD_VALUE",payload:{field:t,value:e}}),(void 0===i?n:i)?N(e9(x.values,t,e)):Promise.resolve()}),$=(0,eI.useCallback)(function(t,e){var n,i=e,r=t;if(!e7(t)){t.persist&&t.persist();var s=t.target?t.target:t.currentTarget,a=s.type,o=s.name,l=s.id,c=s.value,u=s.checked,h=(s.outerHTML,s.options),d=s.multiple;i=e||o||l,r=/number|range/.test(a)?isNaN(n=parseFloat(c))?"":n:/checkbox/.test(a)?function(t,e,n){if("boolean"==typeof t)return!!e;var i=[],r=!1,s=-1;if(Array.isArray(t))i=t,r=(s=t.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return!!e;return e&&n&&!r?i.concat(n):r?i.slice(0,s).concat(i.slice(s+1)):i}(e8(x.values,i),u,c):h&&d?Array.from(h).filter(function(t){return t.selected}).map(function(t){return t.value}):c}i&&F(i,r)},[F,x.values]),z=ns(function(t){if(e7(t))return function(e){return $(e,t)};$(t)}),B=ns(function(t,e,n){return void 0===e&&(e=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:t,value:e}}),(void 0===n?r:n)?N(x.values):Promise.resolve()}),V=(0,eI.useCallback)(function(t,e){t.persist&&t.persist();var n=t.target,i=n.name,r=n.id;n.outerHTML,B(e||i||r,!0)},[B]),U=ns(function(t){if(e7(t))return function(e){return V(e,t)};V(t)}),q=(0,eI.useCallback)(function(t){e4(t)?k({type:"SET_FORMIK_STATE",payload:t}):k({type:"SET_FORMIK_STATE",payload:function(){return t}})},[]),W=(0,eI.useCallback)(function(t){k({type:"SET_STATUS",payload:t})},[]),H=(0,eI.useCallback)(function(t){k({type:"SET_ISSUBMITTING",payload:t})},[]),G=ns(function(){return k({type:"SUBMIT_ATTEMPT"}),N().then(function(t){var e,n=t instanceof Error;if(!n&&0===Object.keys(t).length){try{if(e=Q(),void 0===e)return}catch(t){throw t}return Promise.resolve(e).then(function(t){return y.current&&k({type:"SUBMIT_SUCCESS"}),t}).catch(function(t){if(y.current)throw k({type:"SUBMIT_FAILURE"}),t})}if(y.current&&(k({type:"SUBMIT_FAILURE"}),n))throw t})}),Y=ns(function(t){t&&t.preventDefault&&e4(t.preventDefault)&&t.preventDefault(),t&&t.stopPropagation&&e4(t.stopPropagation)&&t.stopPropagation(),G().catch(function(t){console.warn("Warning: An unhandled error was caught from submitForm()",t)})}),K={resetForm:T,validateForm:N,validateField:L,setErrors:D,setFieldError:Z,setFieldTouched:B,setFieldValue:F,setStatus:W,setSubmitting:H,setTouched:I,setValues:P,setFormikState:q,submitForm:G},Q=ns(function(){return u(x.values,K)}),X=ns(function(t){t&&t.preventDefault&&e4(t.preventDefault)&&t.preventDefault(),t&&t.stopPropagation&&e4(t.stopPropagation)&&t.stopPropagation(),T()}),J=(0,eI.useCallback)(function(t){return{value:e8(x.values,t),error:e8(x.errors,t),touched:!!e8(x.touched,t),initialValue:e8(p.current,t),initialTouched:!!e8(m.current,t),initialError:e8(v.current,t)}},[x.errors,x.touched,x.values]),tt=(0,eI.useCallback)(function(t){return{setValue:function(e,n){return F(t,e,n)},setTouched:function(e,n){return B(t,e,n)},setError:function(e){return Z(t,e)}}},[F,B,Z]),te=(0,eI.useCallback)(function(t){var e=e5(t),n=e?t.name:t,i=e8(x.values,n),r={name:n,value:i,onChange:z,onBlur:U};if(e){var s=t.type,a=t.value,o=t.as,l=t.multiple;"checkbox"===s?void 0===a?r.checked=!!i:(r.checked=!!(Array.isArray(i)&&~i.indexOf(a)),r.value=a):"radio"===s?(r.checked=i===a,r.value=a):"select"===o&&l&&(r.value=r.value||[],r.multiple=!0)}return r},[U,z,x.values]),tn=(0,eI.useMemo)(function(){return!eP()(p.current,x.values)},[p.current,x.values]),ti=(0,eI.useMemo)(function(){return void 0!==o?tn?x.errors&&0===Object.keys(x.errors).length:!1!==o&&e4(o)?o(f):o:x.errors&&0===Object.keys(x.errors).length},[o,tn,x.errors,f]);return eJ({},x,{initialValues:p.current,initialErrors:v.current,initialTouched:m.current,initialStatus:g.current,handleBlur:U,handleChange:z,handleReset:X,handleSubmit:Y,resetForm:T,setErrors:D,setFormikState:q,setFieldTouched:B,setFieldValue:F,setFieldError:Z,setStatus:W,setSubmitting:H,setTouched:I,setValues:P,submitForm:G,validateForm:N,validateField:L,isValid:ti,dirty:tn,unregisterField:R,registerField:A,getFieldProps:te,getFieldMeta:J,getFieldHelpers:tt,validateOnBlur:r,validateOnChange:n,validateOnMount:a})}function ni(t,e,n){var i=t.slice();return e.forEach(function(e,r){if(void 0===i[r]){var s=!1!==n.clone&&n.isMergeableObject(e);i[r]=s?h(Array.isArray(e)?[]:{},e,n):e}else n.isMergeableObject(e)?i[r]=h(t[r],e,n):-1===t.indexOf(e)&&i.push(e)}),i}var nr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?eI.useLayoutEffect:eI.useEffect;function ns(t){var e=(0,eI.useRef)(t);return nr(function(){e.current=t}),(0,eI.useCallback)(function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.current.apply(void 0,n)},[])}(0,eI.forwardRef)(function(t,e){var n,i=t.action,r=e0(t,["action"]),s=((n=(0,eI.useContext)(e2))||eZ(!1),n),a=s.handleReset,o=s.handleSubmit;return(0,eI.createElement)("form",eJ({onSubmit:o,ref:e,onReset:a,action:null!=i?i:"#"},r))}).displayName="Form";var na=function(t,e,n){var i=nu(t),r=i[e];return i.splice(e,1),i.splice(n,0,r),i},no=function(t,e,n){var i=nu(t),r=i[e];return i[e]=i[n],i[n]=r,i},nl=function(t,e,n){var i=nu(t);return i.splice(e,0,n),i},nc=function(t,e,n){var i=nu(t);return i[e]=n,i},nu=function(t){if(!t)return[];if(Array.isArray(t))return[].concat(t);var e=Object.keys(t).map(function(t){return parseInt(t)}).reduce(function(t,e){return e>t?e:t},0);return Array.from(eJ({},t,{length:e+1}))},nh=function(t,e){var n="function"==typeof t?t:e;return function(t){return Array.isArray(t)||e5(t)?n(nu(t)):t}};(function(t){function e(e){var n;return(n=t.call(this,e)||this).updateArrayField=function(t,e,i){var r=n.props,s=r.name;(0,r.formik.setFormikState)(function(n){var r=nh(i,t),a=nh(e,t),o=e9(n.values,s,t(e8(n.values,s))),l=i?r(e8(n.errors,s)):void 0,c=e?a(e8(n.touched,s)):void 0;return e3(l)&&(l=void 0),e3(c)&&(c=void 0),eJ({},n,{values:o,errors:i?e9(n.errors,s,l):n.errors,touched:e?e9(n.touched,s,c):n.touched})})},n.push=function(t){return n.updateArrayField(function(e){return[].concat(nu(e),[eR(t)])},!1,!1)},n.handlePush=function(t){return function(){return n.push(t)}},n.swap=function(t,e){return n.updateArrayField(function(n){return no(n,t,e)},!0,!0)},n.handleSwap=function(t,e){return function(){return n.swap(t,e)}},n.move=function(t,e){return n.updateArrayField(function(n){return na(n,t,e)},!0,!0)},n.handleMove=function(t,e){return function(){return n.move(t,e)}},n.insert=function(t,e){return n.updateArrayField(function(n){return nl(n,t,e)},function(e){return nl(e,t,null)},function(e){return nl(e,t,null)})},n.handleInsert=function(t,e){return function(){return n.insert(t,e)}},n.replace=function(t,e){return n.updateArrayField(function(n){return nc(n,t,e)},!1,!1)},n.handleReplace=function(t,e){return function(){return n.replace(t,e)}},n.unshift=function(t){var e=-1;return n.updateArrayField(function(n){var i=n?[t].concat(n):[t];return e=i.length,i},function(t){return t?[null].concat(t):[null]},function(t){return t?[null].concat(t):[null]}),e},n.handleUnshift=function(t){return function(){return n.unshift(t)}},n.handleRemove=function(t){return function(){return n.remove(t)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(e1(n)),n.pop=n.pop.bind(e1(n)),n}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t;var n=e.prototype;return n.componentDidUpdate=function(t){this.props.validateOnChange&&this.props.formik.validateOnChange&&!eP()(e8(t.formik.values,t.name),e8(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(t){var e;return this.updateArrayField(function(n){var i=n?nu(n):[];return e||(e=i[t]),e4(i.splice)&&i.splice(t,1),e4(i.every)&&i.every(function(t){return void 0===t})?[]:i},!0,!0),e},n.pop=function(){var t;return this.updateArrayField(function(e){var n=e.slice();return t||(t=n&&n.pop&&n.pop()),n},!0,!0),t},n.render=function(){var t={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},e=this.props,n=e.component,i=e.render,r=e.children,s=e.name,a=e0(e.formik,["validate","validationSchema"]),o=eJ({},t,{form:a,name:s});return n?(0,eI.createElement)(n,o):i?i(o):r?"function"==typeof r?r(o):0===eI.Children.count(r)?null:eI.Children.only(r):null},e})(eI.Component).defaultProps={validateOnChange:!0}},63285:function(t,e,n){"use strict";var i=n(84851),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function l(t){return i.isMemo(t)?a:o[t.$$typeof]||r}o[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[i.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,n,i){if("string"!=typeof n){if(p){var r=f(n);r&&r!==p&&t(e,r,i)}var a=u(n);h&&(a=a.concat(h(n)));for(var o=l(e),v=l(n),m=0;m<a.length;++m){var g=a[m];if(!s[g]&&!(i&&i[g])&&!(v&&v[g])&&!(o&&o[g])){var y=d(n,g);try{c(e,g,y)}catch(t){}}}}return e}},91978:function(){"use strict";var t,e={allowDownsampling:!0},n=function(){function t(t,e){var n=this;this._resolutionMediaQueryList=null,this._resolutionListener=function(t){return n._onResolutionChanged()},this._canvasConfiguredListeners=[],this.canvas=t,this._canvasSize={width:this.canvas.clientWidth,height:this.canvas.clientHeight},this._options=e,this._configureCanvas(),this._installResolutionListener()}return t.prototype.destroy=function(){this._canvasConfiguredListeners.length=0,this._uninstallResolutionListener(),this.canvas=null},Object.defineProperty(t.prototype,"canvasSize",{get:function(){return{width:this._canvasSize.width,height:this._canvasSize.height}},enumerable:!0,configurable:!0}),t.prototype.resizeCanvas=function(t){this._canvasSize={width:t.width,height:t.height},this._configureCanvas()},Object.defineProperty(t.prototype,"pixelRatio",{get:function(){var t=this.canvas.ownerDocument.defaultView;if(null==t)throw Error("No window is associated with the canvas");return t.devicePixelRatio>1||this._options.allowDownsampling?t.devicePixelRatio:1},enumerable:!0,configurable:!0}),t.prototype.subscribeCanvasConfigured=function(t){this._canvasConfiguredListeners.push(t)},t.prototype.unsubscribeCanvasConfigured=function(t){this._canvasConfiguredListeners=this._canvasConfiguredListeners.filter(function(e){return e!=t})},t.prototype._configureCanvas=function(){var t=this.pixelRatio;this.canvas.style.width=this._canvasSize.width+"px",this.canvas.style.height=this._canvasSize.height+"px",this.canvas.width=this._canvasSize.width*t,this.canvas.height=this._canvasSize.height*t,this._emitCanvasConfigured()},t.prototype._emitCanvasConfigured=function(){var t=this;this._canvasConfiguredListeners.forEach(function(e){return e.call(t)})},t.prototype._installResolutionListener=function(){if(null!==this._resolutionMediaQueryList)throw Error("Resolution listener is already installed");var t=this.canvas.ownerDocument.defaultView;if(null==t)throw Error("No window is associated with the canvas");var e=t.devicePixelRatio;this._resolutionMediaQueryList=t.matchMedia("all and (resolution: "+e+"dppx)"),this._resolutionMediaQueryList.addListener(this._resolutionListener)},t.prototype._uninstallResolutionListener=function(){null!==this._resolutionMediaQueryList&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},t.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},t.prototype._onResolutionChanged=function(){this._configureCanvas(),this._reinstallResolutionListener()},t}();function i(t,e){var n,i=((n={})[0]=[],n[1]=[t.lineWidth,t.lineWidth],n[2]=[2*t.lineWidth,2*t.lineWidth],n[3]=[6*t.lineWidth,6*t.lineWidth],n[4]=[t.lineWidth,4*t.lineWidth],n)[e];t.setLineDash(i)}function r(t,e,n,i){t.beginPath();var r=t.lineWidth%2?.5:0;t.moveTo(n,e+r),t.lineTo(i,e+r),t.stroke()}(z=V||(V={}))[z.Simple=0]="Simple",z[z.WithSteps=1]="WithSteps",(B=U||(U={}))[B.Solid=0]="Solid",B[B.Dotted=1]="Dotted",B[B.Dashed=2]="Dashed",B[B.LargeDashed=3]="LargeDashed",B[B.SparseDotted=4]="SparseDotted";var s=function(t,e){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function a(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function l(t,e,n){if(n||2==arguments.length)for(var i,r=0,s=e.length;r<s;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function c(t,e){if(!t)throw Error("Assertion failed"+(e?": "+e:""))}function u(t){if(void 0===t)throw Error("Value is undefined");return t}function h(t){if(null===t)throw Error("Value is null");return t}function d(t){return h(u(t))}function f(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var i=0;i<e.length;i++){var r=e[i];for(var s in r)void 0!==r[s]&&("object"!=typeof r[s]||void 0===t[s]?t[s]=r[s]:f(t[s],r[s]))}return t}function p(t){return"number"==typeof t&&isFinite(t)}function v(t){return"number"==typeof t&&t%1==0}function m(t){return"string"==typeof t}function g(t){return"boolean"==typeof t}function y(t){var e,n,i;if(!t||"object"!=typeof t)return t;for(n in e=Array.isArray(t)?[]:{},t)t.hasOwnProperty(n)&&(i=t[n],e[n]=i&&"object"==typeof i?y(i):i);return e}function b(t){return null!==t}function _(t){return null===t?void 0:t}var w=function(){function t(){this.t=[]}return t.prototype.i=function(t){this.t=t},t.prototype.h=function(t,e,n,i){this.t.forEach(function(r){t.save(),r.h(t,e,n,i),t.restore()})},t}(),x=function(){function t(){}return t.prototype.h=function(t,e,n,i){t.save(),t.scale(e,e),this.u(t,n,i),t.restore()},t.prototype.o=function(t,e,n,i){t.save(),t.scale(e,e),this.l(t,n,i),t.restore()},t.prototype.l=function(t,e,n){},t}(),k=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.v=null,e}return a(e,t),e.prototype._=function(t){this.v=t},e.prototype.u=function(t){if(null!==this.v&&null!==this.v.M){var e=this.v.M,n=this.v,i=function(i){t.beginPath();for(var r=e.to-1;r>=e.from;--r){var s=n.m[r];t.moveTo(s.p,s.g),t.arc(s.p,s.g,i,0,2*Math.PI)}t.fill()};t.fillStyle=n.k,i(n.C+2),t.fillStyle=n.N,i(n.C)}},e}(x);function C(){return{m:[{p:0,g:0,S:0,D:0}],N:"",k:"",C:0,M:null}}var j={from:0,to:1},M=function(){function t(t,e){this.A=new w,this.T=[],this.B=[],this.L=!0,this.F=t,this.V=e,this.A.i(this.T)}return t.prototype.O=function(t){var e=this.F.W();e.length!==this.T.length&&(this.B=e.map(C),this.T=this.B.map(function(t){var e=new k;return e._(t),e}),this.A.i(this.T)),this.L=!0},t.prototype.P=function(t,e,n){return this.L&&(this.R(t),this.L=!1),this.A},t.prototype.R=function(t){var e=this,n=this.F.W(),i=this.V.I(),r=this.F.j();n.forEach(function(n,s){var a,o=e.B[s],l=n.q(i);if(null!==l&&n.U()){var c=h(n.H());o.N=l.Y,o.C=l.C,o.m[0].D=l.D,o.m[0].g=n.$().K(l.D,c.X),o.k=null!==(a=l.Z)&&void 0!==a?a:e.F.J(o.m[0].g/t),o.m[0].S=i,o.m[0].p=r.G(i),o.M=j}else o.M=null})},t}(),E=function(){function t(t){this.tt=t}return t.prototype.h=function(t,e,n,s){if(null!==this.tt){var a=this.tt.it.U,o=this.tt.nt.U;if(a||o){t.save();var l=Math.round(this.tt.p*e),c=Math.round(this.tt.g*e),u=Math.ceil(this.tt.st*e),h=Math.ceil(this.tt.ht*e);t.lineCap="butt",a&&l>=0&&(t.lineWidth=Math.floor(this.tt.it.rt*e),t.strokeStyle=this.tt.it.et,t.fillStyle=this.tt.it.et,i(t,this.tt.it.ut),function(t,e,n,i){t.beginPath();var r=t.lineWidth%2?.5:0;t.moveTo(e+r,0),t.lineTo(e+r,i),t.stroke()}(t,l,0,h)),o&&c>=0&&(t.lineWidth=Math.floor(this.tt.nt.rt*e),t.strokeStyle=this.tt.nt.et,t.fillStyle=this.tt.nt.et,i(t,this.tt.nt.ut),r(t,c,0,u)),t.restore()}}},t}(),S=function(){function t(t){this.L=!0,this.at={it:{rt:1,ut:0,et:"",U:!1},nt:{rt:1,ut:0,et:"",U:!1},st:0,ht:0,p:0,g:0},this.ot=new E(this.at),this.lt=t}return t.prototype.O=function(){this.L=!0},t.prototype.P=function(t,e){return this.L&&(this.R(),this.L=!1),this.ot},t.prototype.R=function(){var t=this.lt.U(),e=h(this.lt.ft()),n=e.vt().ct().crosshair,i=this.at;i.nt.U=t&&this.lt._t(e),i.it.U=t&&this.lt.dt(),i.nt.rt=n.horzLine.width,i.nt.ut=n.horzLine.style,i.nt.et=n.horzLine.color,i.it.rt=n.vertLine.width,i.it.ut=n.vertLine.style,i.it.et=n.vertLine.color,i.st=e.wt(),i.ht=e.Mt(),i.p=this.lt.bt(),i.g=this.lt.gt()},t}(),N={khaki:"#f0e68c",azure:"#f0ffff",aliceblue:"#f0f8ff",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",gray:"#808080",green:"#008000",honeydew:"#f0fff0",floralwhite:"#fffaf0",lightblue:"#add8e6",lightcoral:"#f08080",lemonchiffon:"#fffacd",hotpink:"#ff69b4",lightyellow:"#ffffe0",greenyellow:"#adff2f",lightgoldenrodyellow:"#fafad2",limegreen:"#32cd32",linen:"#faf0e6",lightcyan:"#e0ffff",magenta:"#f0f",maroon:"#800000",olive:"#808000",orange:"#ffa500",oldlace:"#fdf5e6",mediumblue:"#0000cd",transparent:"#0000",lime:"#0f0",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",midnightblue:"#191970",orchid:"#da70d6",mediumorchid:"#ba55d3",mediumturquoise:"#48d1cc",orangered:"#ff4500",royalblue:"#4169e1",powderblue:"#b0e0e6",red:"#f00",coral:"#ff7f50",turquoise:"#40e0d0",white:"#fff",whitesmoke:"#f5f5f5",wheat:"#f5deb3",teal:"#008080",steelblue:"#4682b4",bisque:"#ffe4c4",aquamarine:"#7fffd4",aqua:"#0ff",sienna:"#a0522d",silver:"#c0c0c0",springgreen:"#00ff7f",antiquewhite:"#faebd7",burlywood:"#deb887",brown:"#a52a2a",beige:"#f5f5dc",chocolate:"#d2691e",chartreuse:"#7fff00",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cadetblue:"#5f9ea0",tomato:"#ff6347",fuchsia:"#f0f",blue:"#00f",salmon:"#fa8072",blanchedalmond:"#ffebcd",slateblue:"#6a5acd",slategray:"#708090",thistle:"#d8bfd8",tan:"#d2b48c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",blueviolet:"#8a2be2",black:"#000",darkmagenta:"#8b008b",darkslateblue:"#483d8b",darkkhaki:"#bdb76b",darkorchid:"#9932cc",darkorange:"#ff8c00",darkgreen:"#006400",darkred:"#8b0000",dodgerblue:"#1e90ff",darkslategray:"#2f4f4f",dimgray:"#696969",deepskyblue:"#00bfff",firebrick:"#b22222",forestgreen:"#228b22",indigo:"#4b0082",ivory:"#fffff0",lavenderblush:"#fff0f5",feldspar:"#d19275",indianred:"#cd5c5c",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightskyblue:"#87cefa",lightslategray:"#789",lightslateblue:"#8470ff",snow:"#fffafa",lightseagreen:"#20b2aa",lightsalmon:"#ffa07a",darksalmon:"#e9967a",darkviolet:"#9400d3",mediumpurple:"#9370d8",mediumaquamarine:"#66cdaa",skyblue:"#87ceeb",lavender:"#e6e6fa",lightsteelblue:"#b0c4de",mediumvioletred:"#c71585",mintcream:"#f5fffa",navajowhite:"#ffdead",navy:"#000080",olivedrab:"#6b8e23",palevioletred:"#d87093",violetred:"#d02090",yellow:"#ff0",yellowgreen:"#9acd32",lawngreen:"#7cfc00",pink:"#ffc0cb",paleturquoise:"#afeeee",palegoldenrod:"#eee8aa",darkolivegreen:"#556b2f",darkseagreen:"#8fbc8f",darkturquoise:"#00ced1",peachpuff:"#ffdab9",deeppink:"#ff1493",violet:"#ee82ee",palegreen:"#98fb98",mediumseagreen:"#3cb371",peru:"#cd853f",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",purple:"#800080",seagreen:"#2e8b57",seashell:"#fff5ee",papayawhip:"#ffefd5",mediumslateblue:"#7b68ee",plum:"#dda0dd",mediumspringgreen:"#00fa9a"};function T(t){return t<0?0:t>255?255:Math.round(t)||0}function O(t){return t<=0||t>0?t<0?0:t>1?1:Math.round(1e4*t)/1e4:0}var L=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,A=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,R=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,I=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?[\d]{0,10}(?:\.\d+)?)\s*\)$/;function D(t){var e;if((t=t.toLowerCase())in N&&(t=N[t]),e=I.exec(t)||R.exec(t))return[T(parseInt(e[1],10)),T(parseInt(e[2],10)),T(parseInt(e[3],10)),O(e.length<5?1:parseFloat(e[4]))];if(e=A.exec(t))return[T(parseInt(e[1],16)),T(parseInt(e[2],16)),T(parseInt(e[3],16)),1];if(e=L.exec(t))return[T(17*parseInt(e[1],16)),T(17*parseInt(e[2],16)),T(17*parseInt(e[3],16)),1];throw Error("Cannot parse color: "+t)}function P(t){var e=D(t);return{yt:"rgb("+e[0]+", "+e[1]+", "+e[2]+")",kt:.199*e[0]+.687*e[1]+.114*e[2]>160?"black":"white"}}function Z(t,e,n){t.save(),t.scale(e,e),n(),t.restore()}function F(t,e,n,i,r,s){t.save(),t.globalCompositeOperation="copy",t.fillStyle=s,t.fillRect(e,n,i,r),t.restore()}function $(t,e,n,i,r,s,a){t.save(),t.globalCompositeOperation="copy";var o=t.createLinearGradient(0,0,0,r);o.addColorStop(0,s),o.addColorStop(1,a),t.fillStyle=o,t.fillRect(e,n,i,r),t.restore()}var z,B,V,U,q,W=function(){function t(t,e){this._(t,e)}return t.prototype._=function(t,e){this.tt=t,this.Ct=e},t.prototype.h=function(t,e,n,i,r,s){if(this.tt.U){t.font=e.Nt;var a=this.tt.xt||!this.tt.St?e.Dt:0,o=e.At,l=e.Tt,c=e.Bt,u=e.Lt,h=e.Ft,d=this.tt.Et,f=Math.ceil(n.Vt(t,d)),p=e.Ot,v=e.Wt+l+c,m=Math.ceil(.5*v),g=o+f+u+h+a,y=this.Ct.zt;this.Ct.Pt&&(y=this.Ct.Pt);var b,_,w=(y=Math.round(y))-m,x=w+v,k="right"===r,C=k?i:0,j=Math.ceil(i*s),M=C;if(t.fillStyle=this.Ct.yt,t.lineWidth=1,t.lineCap="butt",d){k?(b=C-a,_=(M=C-g)+h):(M=C+g,b=C+a,_=C+o+a+u);var E=Math.max(1,Math.floor(s)),S=Math.max(1,Math.floor(o*s)),N=k?j:0,T=Math.round(w*s),O=Math.round(M*s),L=Math.round(y*s)-Math.floor(.5*s),A=L+E+(L-T),R=Math.round(b*s);t.save(),t.beginPath(),t.moveTo(N,T),t.lineTo(O,T),t.lineTo(O,A),t.lineTo(N,A),t.fill(),t.fillStyle=this.tt.Z,t.fillRect(k?j-S:0,T,S,A-T),this.tt.xt&&(t.fillStyle=this.Ct.et,t.fillRect(N,L,R-N,E)),t.textAlign="left",t.fillStyle=this.Ct.et,Z(t,s,function(){t.fillText(d,_,x-c-p)}),t.restore()}}},t.prototype.Mt=function(t,e){return this.tt.U?t.Wt+t.Tt+t.Bt:0},t}(),H=function(){function t(t){this.Rt={zt:0,et:"#FFF",yt:"#000"},this.It={Et:"",U:!1,xt:!0,St:!1,Z:""},this.jt={Et:"",U:!1,xt:!1,St:!0,Z:""},this.L=!0,this.qt=new(t||W)(this.It,this.Rt),this.Ut=new(t||W)(this.jt,this.Rt)}return t.prototype.Et=function(){return this.It.Et},t.prototype.zt=function(){return this.Ht(),this.Rt.zt},t.prototype.O=function(){this.L=!0},t.prototype.Mt=function(t,e){return void 0===e&&(e=!1),Math.max(this.qt.Mt(t,e),this.Ut.Mt(t,e))},t.prototype.Yt=function(){return this.Rt.Pt||0},t.prototype.Kt=function(t){this.Rt.Pt=t},t.prototype.$t=function(){return this.Ht(),this.It.U||this.jt.U},t.prototype.Xt=function(){return this.Ht(),this.It.U},t.prototype.P=function(t){return this.Ht(),this.It.xt=this.It.xt&&t.ct().drawTicks,this.jt.xt=this.jt.xt&&t.ct().drawTicks,this.qt._(this.It,this.Rt),this.Ut._(this.jt,this.Rt),this.qt},t.prototype.Zt=function(){return this.Ht(),this.qt._(this.It,this.Rt),this.Ut._(this.jt,this.Rt),this.Ut},t.prototype.Ht=function(){this.L&&(this.It.xt=!0,this.jt.xt=!1,this.Jt(this.It,this.jt,this.Rt))},t}(),G=function(t){function e(e,n,i){var r=t.call(this)||this;return r.lt=e,r.Gt=n,r.Qt=i,r}return a(e,t),e.prototype.Jt=function(t,e,n){t.U=!1;var i=this.lt.ct().horzLine;if(i.labelVisible){var r=this.Gt.H();if(this.lt.U()&&!this.Gt.ti()&&null!==r){var s=P(i.labelBackgroundColor);n.yt=s.yt,n.et=s.kt;var a=this.Qt(this.Gt);n.zt=a.zt,t.Et=this.Gt.ii(a.D,r),t.U=!0}}},e}(H),Y=/[1-9]/g,K=function(){function t(){this.tt=null}return t.prototype._=function(t){this.tt=t},t.prototype.h=function(t,e,n){var i=this;if(null!==this.tt&&!1!==this.tt.U&&0!==this.tt.Et.length){t.font=e.Nt;var r=Math.round(e.ni.Vt(t,this.tt.Et,Y));if(!(r<=0)){t.save();var s=e.si,a=r+2*s,o=a/2,l=this.tt.wt,c=this.tt.zt,u=Math.floor(c-o)+.5;u<0?(c+=Math.abs(0-u),u=Math.floor(c-o)+.5):u+a>l&&(c-=Math.abs(l-(u+a)),u=Math.floor(c-o)+.5);var d=u+a,f=0+e.At+e.Tt+e.Wt+e.Bt;t.fillStyle=this.tt.yt;var p=Math.round(u*n),v=Math.round(0*n),m=Math.round(d*n),g=Math.round(f*n);t.fillRect(p,v,m-p,g-v);var y=Math.round(this.tt.zt*n),b=Math.round((v+e.At+e.Dt)*n);t.fillStyle=this.tt.et;var _=Math.max(1,Math.floor(n)),w=Math.floor(.5*n);t.fillRect(y-w,v,_,b-v);var x=f-e.Ot-e.Bt;t.textAlign="left",t.fillStyle=this.tt.et,Z(t,n,function(){t.fillText(h(i.tt).Et,u+s,x)}),t.restore()}}},t}(),Q=function(){function t(t,e,n){this.L=!0,this.ot=new K,this.at={U:!1,yt:"#4c525e",et:"white",Et:"",wt:0,zt:NaN},this.V=t,this.hi=e,this.Qt=n}return t.prototype.O=function(){this.L=!0},t.prototype.P=function(){return this.L&&(this.R(),this.L=!1),this.ot._(this.at),this.ot},t.prototype.R=function(){var t=this.at;t.U=!1;var e=this.V.ct().vertLine;if(e.labelVisible){var n=this.hi.j();if(!n.ti()){var i=n.ri(this.V.I());t.wt=n.wt();var r=this.Qt();if(r.S){t.zt=r.zt,t.Et=n.ei(h(i)),t.U=!0;var s=P(e.labelBackgroundColor);t.yt=s.yt,t.et=s.kt}}}},t}(),X=function(){function t(){this.ui=null,this.ai=0}return t.prototype.oi=function(){return this.ai},t.prototype.li=function(t){this.ai=t},t.prototype.$=function(){return this.ui},t.prototype.fi=function(t){this.ui=t},t.prototype.ci=function(){return[]},t.prototype.U=function(){return!0},t}();(tp=q||(q={}))[tp.Normal=0]="Normal",tp[tp.Magnet=1]="Magnet";var J=function(t){function e(e,n){var i,r,s,a,o=t.call(this)||this;o.vi=null,o._i=NaN,o.di=0,o.wi=!0,o.Mi=new Map,o.bi=!1,o.mi=NaN,o.pi=NaN,o.gi=NaN,o.yi=NaN,o.hi=e,o.ki=n,o.Ci=new M(e,o),o.Ni=(s=function(){return o._i},a=function(){return o.pi},function(t){var e=a(),n=s();if(t===h(o.vi).xi())return{D:n,zt:e};var i=h(t.H());return{D:t.Si(e,i),zt:e}});var l=(i=function(){return o.di},r=function(){return o.bt()},function(){return{S:o.hi.j().ri(i()),zt:r()}});return o.Di=new Q(o,e,l),o.Ai=new S(o),o}return a(e,t),e.prototype.ct=function(){return this.ki},e.prototype.Ti=function(t,e){this.gi=t,this.yi=e},e.prototype.Bi=function(){this.gi=NaN,this.yi=NaN},e.prototype.Li=function(){return this.gi},e.prototype.Fi=function(){return this.yi},e.prototype.Ei=function(t,e,n){this.bi||(this.bi=!0),this.wi=!0,this.Vi(t,e,n)},e.prototype.I=function(){return this.di},e.prototype.bt=function(){return this.mi},e.prototype.gt=function(){return this.pi},e.prototype.U=function(){return this.wi},e.prototype.Oi=function(){this.wi=!1,this.Wi(),this._i=NaN,this.mi=NaN,this.pi=NaN,this.vi=null,this.Bi()},e.prototype.zi=function(t){return null!==this.vi?[this.Ai,this.Ci]:[]},e.prototype._t=function(t){return t===this.vi&&this.ki.horzLine.visible},e.prototype.dt=function(){return this.ki.vertLine.visible},e.prototype.Pi=function(t,e){this.wi&&this.vi===t||this.Mi.clear();var n=[];return this.vi===t&&n.push(this.Ri(this.Mi,e,this.Ni)),n},e.prototype.ci=function(){return this.wi?[this.Di]:[]},e.prototype.ft=function(){return this.vi},e.prototype.Ii=function(){this.Ai.O(),this.Mi.forEach(function(t){return t.O()}),this.Di.O(),this.Ci.O()},e.prototype.ji=function(t){return t&&!t.xi().ti()?t.xi():null},e.prototype.Vi=function(t,e,n){this.qi(t,e,n)&&this.Ii()},e.prototype.qi=function(t,e,n){var i=this.mi,r=this.pi,s=this._i,a=this.di,o=this.vi,l=this.ji(n);this.di=t,this.mi=isNaN(t)?NaN:this.hi.j().G(t),this.vi=n;var c=null!==l?l.H():null;return null!==l&&null!==c?(this._i=e,this.pi=l.K(e,c)):(this._i=NaN,this.pi=NaN),i!==this.mi||r!==this.pi||a!==this.di||s!==this._i||o!==this.vi},e.prototype.Wi=function(){var t=this.hi.W().map(function(t){return t.Hi().Ui()}).filter(b),e=0===t.length?null:Math.max.apply(Math,t);this.di=null!==e?e:NaN},e.prototype.Ri=function(t,e,n){var i=t.get(e);return void 0===i&&(i=new G(this,e,n),t.set(e,i)),i},e}(X);function tt(t,e){if(!p(t))return"n/a";if(!v(e)||e<0||e>16)throw TypeError("invalid length");return 0===e?t.toString():("0000000000000000"+t.toString()).slice(-e)}var te=function(){function t(t,e){if(e||(e=1),p(t)&&v(t)||(t=100),t<0)throw TypeError("invalid base");this.Gt=t,this.Yi=e,this.Ki()}return t.prototype.format=function(t){var e=t<0?"−":"";return t=Math.abs(t),e+this.$i(t)},t.prototype.Ki=function(){if(this.Xi=0,this.Gt>0&&this.Yi>0)for(var t=this.Gt;t>1;)t/=10,this.Xi++},t.prototype.$i=function(t){var e=this.Gt/this.Yi,n=Math.floor(t),i="",r=void 0!==this.Xi?this.Xi:NaN;if(e>1){var s=+(Math.round(t*e)-n*e).toFixed(this.Xi);s>=e&&(s-=e,n+=1),i="."+tt(+s.toFixed(this.Xi)*this.Yi,r)}else n=Math.round(n*e)/e,r>0&&(i="."+tt(0,r));return n.toFixed(0)+i},t}(),tn=function(t){function e(e){return void 0===e&&(e=100),t.call(this,e)||this}return a(e,t),e.prototype.format=function(e){return t.prototype.format.call(this,e)+"%"},e}(te),ti=function(){function t(){this.Zi=[]}return t.prototype.Ji=function(t,e,n){this.Zi.push({Gi:t,Qi:e,tn:!0===n})},t.prototype.nn=function(t){var e=this.Zi.findIndex(function(e){return t===e.Gi});e>-1&&this.Zi.splice(e,1)},t.prototype.sn=function(t){this.Zi=this.Zi.filter(function(e){return e.Qi===t})},t.prototype.hn=function(t,e){var n=l([],this.Zi,!0);this.Zi=this.Zi.filter(function(t){return!t.tn}),n.forEach(function(n){return n.Gi(t,e)})},t.prototype.rn=function(){return this.Zi.length>0},t.prototype.en=function(){this.Zi=[]},t}(),tr=function(){function t(t,e){this.un=t,this.an=e}return t.prototype.on=function(t){return null!==t&&this.un===t.un&&this.an===t.an},t.prototype.ln=function(){return new t(this.un,this.an)},t.prototype.fn=function(){return this.un},t.prototype.cn=function(){return this.an},t.prototype.vn=function(){return this.an-this.un},t.prototype.ti=function(){return this.an===this.un||Number.isNaN(this.an)||Number.isNaN(this.un)},t.prototype._n=function(e){return null===e?this:new t(Math.min(this.fn(),e.fn()),Math.max(this.cn(),e.cn()))},t.prototype.dn=function(t){if(p(t)&&0!=this.an-this.un){var e=.5*(this.an+this.un),n=this.an-e,i=this.un-e;n*=t,i*=t,this.an=e+n,this.un=e+i}},t.prototype.wn=function(t){p(t)&&(this.an+=t,this.un+=t)},t.prototype.Mn=function(){return{minValue:this.un,maxValue:this.an}},t.bn=function(e){return null===e?null:new t(e.minValue,e.maxValue)},t}();function ts(t,e,n){return Math.min(Math.max(t,e),n)}function ta(t){return t<=0?NaN:Math.log(t)/Math.log(10)}function to(t){var e=Math.ceil(t);return e%2!=0?e-1:e}function tl(t){var e=Math.ceil(t);return e%2==0?e-1:e}function tc(t,e){var n=100*(t-e)/e;return e<0?-n:n}function tu(t,e){var n=100*(t-e)/e+100;return e<0?-n:n}function th(t){var e=Math.abs(t);if(e<1e-8)return 0;var n=ta(e+1e-4)+4;return t<0?-n:n}function td(t){var e=Math.abs(t);if(e<1e-8)return 0;var n=Math.pow(10,e-4)-1e-4;return t<0?-n:n}function tf(t){return null===t?null:new tr(th(t.fn()),th(t.cn()))}var tp,tv,tm=function(){function t(t,e){if(this.mn=t,this.pn=e,function(t){if(t<0)return!1;for(var e=t;e>1;e/=10)if(e%10!=0)return!1;return!0}(this.mn))this.gn=[2,2.5,2];else{this.gn=[];for(var n=this.mn;1!==n;){if(n%2==0)this.gn.push(2),n/=2;else{if(n%5!=0)throw Error("unexpected base");this.gn.push(2,2.5),n/=5}if(this.gn.length>100)throw Error("something wrong with base")}}}return t.prototype.yn=function(t,e,n){for(var i=0===this.mn?0:1/this.mn,r=Math.pow(10,Math.max(0,Math.ceil(ta(t-e)))),s=0,a=this.pn[0];;){var o=i-r<=1e-14&&r>i+1e-14,l=n*a-r<=1e-14,c=1-r<=1e-14;if(!(o&&l&&c))break;r/=a,a=this.pn[++s%this.pn.length]}if(r<=i+1e-14&&(r=i),r=Math.max(1,r),this.gn.length>0&&1e-14>Math.abs(r-1))for(s=0,a=this.gn[0];n*a-r<=1e-14&&r>i+1e-14;)r/=a,a=this.gn[++s%this.gn.length];return r},t}(),tg=function(){function t(t,e,n,i){this.kn=[],this.Gt=t,this.mn=e,this.Cn=n,this.Nn=i}return t.prototype.yn=function(t,e){if(t<e)throw Error("high < low");var n=this.Gt.Mt(),i=(t-e)*this.xn()/n,r=new tm(this.mn,[2,2.5,2]),s=new tm(this.mn,[2,2,2.5]),a=new tm(this.mn,[2.5,2,2]),o=[];return o.push(r.yn(t,e,i),s.yn(t,e,i),a.yn(t,e,i)),function(t){if(t.length<1)throw Error("array is empty");for(var e=t[0],n=1;n<t.length;++n)t[n]<e&&(e=t[n]);return e}(o)},t.prototype.Sn=function(){var t=this.Gt,e=t.H();if(null!==e){var n=t.Mt(),i=this.Cn(n-1,e),r=this.Cn(0,e),s=this.Gt.ct().entireTextOnly?this.Dn()/2:0,a=n-1-s,o=Math.max(i,r),l=Math.min(i,r);if(o!==l){for(var c=this.yn(o,l),u=o%c,h=o>=l?1:-1,d=null,f=0,p=o-(u+=u<0?c:0);p>l;p-=c){var v=this.Nn(p,e,!0);null!==d&&Math.abs(v-d)<this.xn()||v<s||v>a||(f<this.kn.length?(this.kn[f].An=v,this.kn[f].Tn=t.Bn(p)):this.kn.push({An:v,Tn:t.Bn(p)}),f++,d=v,t.Ln()&&(c=this.yn(p*h,l)))}this.kn.length=f}else this.kn=[]}else this.kn=[]},t.prototype.Fn=function(){return this.kn},t.prototype.Dn=function(){return this.Gt.Wt()},t.prototype.xn=function(){return Math.ceil(2.5*this.Dn())},t}();function ty(t){return t.slice().sort(function(t,e){return h(t.oi())-h(e.oi())})}(tb=tv||(tv={}))[tb.Normal=0]="Normal",tb[tb.Logarithmic=1]="Logarithmic",tb[tb.Percentage=2]="Percentage",tb[tb.IndexedTo100=3]="IndexedTo100";var tb,t_,tw,tx=new tn,tk=new te(100,1),tC=function(){function t(t,e,n,i){this.En=0,this.Vn=null,this.On=null,this.Wn=null,this.zn={Pn:!1,Rn:null},this.In=0,this.jn=0,this.qn=new ti,this.Un=new ti,this.Hn=[],this.Yn=null,this.Kn=null,this.$n=null,this.Xn=null,this.Zn=tk,this.Jn=t,this.ki=e,this.Gn=n,this.Qn=i,this.ts=new tg(this,100,this.ns.bind(this),this.ss.bind(this))}return t.prototype.hs=function(){return this.Jn},t.prototype.ct=function(){return this.ki},t.prototype.rs=function(t){if(f(this.ki,t),this.es(),void 0!==t.mode&&this.us({os:t.mode}),void 0!==t.scaleMargins){var e=u(t.scaleMargins.top),n=u(t.scaleMargins.bottom);if(e<0||e>1)throw Error("Invalid top margin - expect value between 0 and 1, given="+e);if(n<0||n>1||e+n>1)throw Error("Invalid bottom margin - expect value between 0 and 1, given="+n);if(e+n>1)throw Error("Invalid margins - sum of margins must be less than 1, given="+(e+n));this.ls(),this.Kn=null}},t.prototype.fs=function(){return this.ki.autoScale},t.prototype.Ln=function(){return 1===this.ki.mode},t.prototype.cs=function(){return 2===this.ki.mode},t.prototype.vs=function(){return 3===this.ki.mode},t.prototype.os=function(){return{_s:this.ki.autoScale,ds:this.ki.invertScale,os:this.ki.mode}},t.prototype.us=function(t){var e,n=this.os(),i=null;void 0!==t._s&&(this.ki.autoScale=t._s),void 0!==t.os&&(this.ki.mode=t.os,2!==t.os&&3!==t.os||(this.ki.autoScale=!0),this.zn.Pn=!1),1===n.os&&t.os!==n.os&&(function(t){if(null===t)return!1;var e=td(t.fn()),n=td(t.cn());return isFinite(e)&&isFinite(n)}(this.On)?null!==(i=null===(e=this.On)?null:new tr(td(e.fn()),td(e.cn())))&&this.ws(i):this.ki.autoScale=!0),1===t.os&&t.os!==n.os&&null!==(i=tf(this.On))&&this.ws(i);var r=n.os!==this.ki.mode;r&&(2===n.os||this.cs())&&this.es(),r&&(3===n.os||this.vs())&&this.es(),void 0!==t.ds&&n.ds!==t.ds&&(this.ki.invertScale=t.ds,this.Ms()),this.Un.hn(n,this.os())},t.prototype.bs=function(){return this.Un},t.prototype.Wt=function(){return this.Gn.fontSize},t.prototype.Mt=function(){return this.En},t.prototype.ps=function(t){this.En!==t&&(this.En=t,this.ls(),this.Kn=null)},t.prototype.gs=function(){if(this.Vn)return this.Vn;var t=this.Mt()-this.ys()-this.ks();return this.Vn=t,t},t.prototype.Cs=function(){return this.Ns(),this.On},t.prototype.ws=function(t,e){var n=this.On;(e||null===n&&null!==t||null!==n&&!n.on(t))&&(this.Kn=null,this.On=t)},t.prototype.ti=function(){return this.Ns(),0===this.En||!this.On||this.On.ti()},t.prototype.xs=function(t){return this.ds()?t:this.Mt()-1-t},t.prototype.K=function(t,e){return this.cs()?t=tc(t,e):this.vs()&&(t=tu(t,e)),this.ss(t,e)},t.prototype.Ss=function(t,e,n){this.Ns();for(var i=this.ks(),r=h(this.Cs()),s=r.fn(),a=r.cn(),o=this.gs()-1,l=this.ds(),c=o/(a-s),u=void 0===n?0:n.from,d=void 0===n?t.length:n.to,f=this.Ds(),p=u;p<d;p++){var v=t[p],m=v.D;if(!isNaN(m)){var g=m;null!==f&&(g=f(v.D,e));var y=i+c*(g-s),b=l?y:this.En-1-y;v.g=b}}},t.prototype.As=function(t,e,n){this.Ns();for(var i=this.ks(),r=h(this.Cs()),s=r.fn(),a=r.cn(),o=this.gs()-1,l=this.ds(),c=o/(a-s),u=void 0===n?0:n.from,d=void 0===n?t.length:n.to,f=this.Ds(),p=u;p<d;p++){var v=t[p],m=v.open,g=v.high,y=v.low,b=v.close;null!==f&&(m=f(v.open,e),g=f(v.high,e),y=f(v.low,e),b=f(v.close,e));var _=i+c*(m-s),w=l?_:this.En-1-_;v.Ts=w,_=i+c*(g-s),w=l?_:this.En-1-_,v.Bs=w,_=i+c*(y-s),w=l?_:this.En-1-_,v.Ls=w,_=i+c*(b-s),w=l?_:this.En-1-_,v.Fs=w}},t.prototype.Si=function(t,e){var n=this.ns(t,e);return this.Es(n,e)},t.prototype.Es=function(t,e){var n,i,r=t;return this.cs()?(n=r,e<0&&(n=-n),r=n/100*e+e):this.vs()&&(i=r-100,e<0&&(i=-i),r=i/100*e+e),r},t.prototype.Vs=function(){return this.Hn},t.prototype.Os=function(){if(this.Yn)return this.Yn;for(var t=[],e=0;e<this.Hn.length;e++){var n=this.Hn[e];null===n.oi()&&n.li(e+1),t.push(n)}return t=ty(t),this.Yn=t,this.Yn},t.prototype.Ws=function(t){-1===this.Hn.indexOf(t)&&(this.Hn.push(t),this.es(),this.zs())},t.prototype.Ps=function(t){var e=this.Hn.indexOf(t);if(-1===e)throw Error("source is not attached to scale");this.Hn.splice(e,1),0===this.Hn.length&&(this.us({_s:!0}),this.ws(null)),this.es(),this.zs()},t.prototype.H=function(){for(var t=null,e=0,n=this.Hn;e<n.length;e++){var i=n[e].H();null!==i&&(null===t||i.Rs<t.Rs)&&(t=i)}return null===t?null:t.X},t.prototype.ds=function(){return this.ki.invertScale},t.prototype.Fn=function(){return this.Kn||(this.ts.Sn(),this.Kn=this.ts.Fn(),this.qn.hn()),this.Kn},t.prototype.Is=function(){return this.qn},t.prototype.js=function(t){this.cs()||this.vs()||null===this.$n&&null===this.Wn&&(this.ti()||(this.$n=this.En-t,this.Wn=h(this.Cs()).ln()))},t.prototype.qs=function(t){if(!this.cs()&&!this.vs()&&null!==this.$n){this.us({_s:!1}),(t=this.En-t)<0&&(t=0);var e=(this.$n+.2*(this.En-1))/(t+.2*(this.En-1)),n=h(this.Wn).ln();e=Math.max(e,.1),n.dn(e),this.ws(n)}},t.prototype.Us=function(){this.cs()||this.vs()||(this.$n=null,this.Wn=null)},t.prototype.Hs=function(t){this.fs()||null===this.Xn&&null===this.Wn&&(this.ti()||(this.Xn=t,this.Wn=h(this.Cs()).ln()))},t.prototype.Ys=function(t){if(!this.fs()&&null!==this.Xn){var e=h(this.Cs()).vn()/(this.gs()-1),n=t-this.Xn;this.ds()&&(n*=-1);var i=n*e,r=h(this.Wn).ln();r.wn(i),this.ws(r,!0),this.Kn=null}},t.prototype.Ks=function(){this.fs()||null!==this.Xn&&(this.Xn=null,this.Wn=null)},t.prototype.$s=function(){return this.Zn||this.es(),this.Zn},t.prototype.ii=function(t,e){switch(this.ki.mode){case 2:return this.$s().format(tc(t,e));case 3:return this.$s().format(tu(t,e));default:return this.Xs(t)}},t.prototype.Bn=function(t){switch(this.ki.mode){case 2:case 3:return this.$s().format(t);default:return this.Xs(t)}},t.prototype.Zs=function(t){return this.Xs(t,h(this.Js()).$s())},t.prototype.Gs=function(t,e){return t=tc(t,e),tx.format(t)},t.prototype.Qs=function(){return this.Hn},t.prototype.th=function(t){this.zn={Rn:t,Pn:!1}},t.prototype.Ii=function(){this.Hn.forEach(function(t){return t.Ii()})},t.prototype.es=function(){this.Kn=null;var t=this.Js(),e=100;null!==t&&(e=Math.round(1/t.ih())),this.Zn=tk,this.cs()?(this.Zn=tx,e=100):this.vs()?(this.Zn=new te(100,1),e=100):null!==t&&(this.Zn=t.$s()),this.ts=new tg(this,e,this.ns.bind(this),this.ss.bind(this)),this.ts.Sn()},t.prototype.zs=function(){this.Yn=null},t.prototype.Js=function(){return this.Hn[0]||null},t.prototype.ys=function(){return this.ds()?this.ki.scaleMargins.bottom*this.Mt()+this.jn:this.ki.scaleMargins.top*this.Mt()+this.In},t.prototype.ks=function(){return this.ds()?this.ki.scaleMargins.top*this.Mt()+this.In:this.ki.scaleMargins.bottom*this.Mt()+this.jn},t.prototype.Ns=function(){this.zn.Pn||(this.zn.Pn=!0,this.nh())},t.prototype.ls=function(){this.Vn=null},t.prototype.ss=function(t,e){if(this.Ns(),this.ti())return 0;t=this.Ln()&&t?th(t):t;var n=h(this.Cs()),i=this.ks()+(this.gs()-1)*(t-n.fn())/n.vn();return this.xs(i)},t.prototype.ns=function(t,e){if(this.Ns(),this.ti())return 0;var n=this.xs(t),i=h(this.Cs()),r=i.fn()+i.vn()*((n-this.ks())/(this.gs()-1));return this.Ln()?td(r):r},t.prototype.Ms=function(){this.Kn=null,this.ts.Sn()},t.prototype.nh=function(){var t=this.zn.Rn;if(null!==t){for(var e=null,n=0,i=0,r=0,s=this.Qs();r<s.length;r++){var a=s[r];if(a.U()){var o=a.H();if(null!==o){var l=a.sh(t.hh(),t.rh()),c=l&&l.Cs();if(null!==c){switch(this.ki.mode){case 1:c=tf(c);break;case 2:u=c,d=o.X,c=new tr(tc(u.fn(),d),tc(u.cn(),d));break;case 3:f=c,p=o.X,c=new tr(tu(f.fn(),p),tu(f.cn(),p))}if(e=null===e?c:e._n(h(c)),null!==l){var u,d,f,p,v=l.eh();null!==v&&(i=Math.max(n=Math.max(n,v.above),v.below))}}}}}if(n===this.In&&i===this.jn||(this.In=n,this.jn=i,this.Kn=null,this.ls()),null!==e){if(e.fn()===e.cn()){var m=this.Js(),g=5*(null===m||this.cs()||this.vs()?1:m.ih());e=new tr(e.fn()-g,e.cn()+g)}this.ws(e)}else null===this.On&&this.ws(new tr(-.5,.5));this.zn.Pn=!0}},t.prototype.Ds=function(){return this.cs()?tc:this.vs()?tu:this.Ln()?th:null},t.prototype.Xs=function(t,e){return void 0===this.Qn.priceFormatter?(void 0===e&&(e=this.$s()),e.format(t)):this.Qn.priceFormatter(t)},t}();function tj(t){void 0!==t.borderColor&&(t.borderUpColor=t.borderColor,t.borderDownColor=t.borderColor),void 0!==t.wickColor&&(t.wickUpColor=t.wickColor,t.wickDownColor=t.wickColor)}(tD=t_||(t_={}))[tD.Disabled=0]="Disabled",tD[tD.Continuous=1]="Continuous",tD[tD.OnDataUpdate=2]="OnDataUpdate",(tP=tw||(tw={}))[tP.LastBar=0]="LastBar",tP[tP.LastVisible=1]="LastVisible";var tM=function(t){return t.getUTCFullYear()},tE=function(){function t(t,e){void 0===t&&(t="yyyy-MM-dd"),void 0===e&&(e="default"),this.uh=t,this.ah=e}return t.prototype.oh=function(t){var e,n,i;return e=t,n=this.uh,i=this.ah,n.replace(/yyyy/g,tt(tM(e),4)).replace(/yy/g,tt(tM(e)%100,2)).replace(/MMMM/g,new Date(e.getUTCFullYear(),e.getUTCMonth(),1).toLocaleString(i,{month:"long"})).replace(/MMM/g,new Date(e.getUTCFullYear(),e.getUTCMonth(),1).toLocaleString(i,{month:"short"})).replace(/MM/g,tt(e.getUTCMonth()+1,2)).replace(/dd/g,tt(e.getUTCDate(),2))},t}(),tS=function(){function t(t){this.lh=t||"%h:%m:%s"}return t.prototype.oh=function(t){return this.lh.replace("%h",tt(t.getUTCHours(),2)).replace("%m",tt(t.getUTCMinutes(),2)).replace("%s",tt(t.getUTCSeconds(),2))},t}(),tN={fh:"yyyy-MM-dd",_h:"%h:%m:%s",dh:" ",wh:"default"},tT=function(){function t(t){void 0===t&&(t={});var e=o(o({},tN),t);this.Mh=new tE(e.fh,e.wh),this.bh=new tS(e._h),this.mh=e.dh}return t.prototype.oh=function(t){return""+this.Mh.oh(t)+this.mh+this.bh.oh(t)},t}();function tO(t,e,n,i,r){void 0===i&&(i=0),void 0===r&&(r=t.length);for(var s=r-i;0<s;){var a=s>>1,o=i+a;n(t[o],e)?(i=o+1,s-=a+1):s=a}return i}function tL(t,e,n,i,r){void 0===i&&(i=0),void 0===r&&(r=t.length);for(var s=r-i;0<s;){var a=s>>1,o=i+a;n(e,t[o])?s=a:(i=o+1,s-=a+1)}return i}var tA=function(){function t(t,e){void 0===e&&(e=50),this.ph=0,this.gh=1,this.yh=1,this.kh=new Map,this.Ch=new Map,this.Nh=t,this.xh=e}return t.prototype.oh=function(t){var e=void 0===t.Sh?new Date(1e3*t.Dh).getTime():new Date(Date.UTC(t.Sh.year,t.Sh.month-1,t.Sh.day)).getTime(),n=this.kh.get(e);if(void 0!==n)return n.Ah;if(this.ph===this.xh){var i=this.Ch.get(this.yh);this.Ch.delete(this.yh),this.kh.delete(u(i)),this.yh++,this.ph--}var r=this.Nh(t);return this.kh.set(e,{Ah:r,Th:this.gh}),this.Ch.set(this.gh,e),this.ph++,this.gh++,r},t}(),tR=function(){function t(t,e){c(t<=e,"right should be >= left"),this.Bh=t,this.Lh=e}return t.prototype.hh=function(){return this.Bh},t.prototype.rh=function(){return this.Lh},t.prototype.Fh=function(){return this.Lh-this.Bh+1},t.prototype.Eh=function(t){return this.Bh<=t&&t<=this.Lh},t.prototype.on=function(t){return this.Bh===t.hh()&&this.Lh===t.rh()},t}();function tI(t,e){return null===t||null===e?t===e:t.on(e)}var tD,tP,tZ,tF=function(){function t(){this.Vh=new Map,this.kh=null}return t.prototype.Oh=function(t,e){this.Wh(e),this.kh=null;for(var n=e;n<t.length;++n){var i=t[n],r=this.Vh.get(i.zh);void 0===r&&(r=[],this.Vh.set(i.zh,r)),r.push({Ph:n,S:i.S,Rh:i.zh})}},t.prototype.Ih=function(t,e){var n=Math.ceil(e/t);return null!==this.kh&&this.kh.jh===n||(this.kh={Fn:this.qh(n),jh:n}),this.kh.Fn},t.prototype.Wh=function(t){if(0!==t){var e=[];this.Vh.forEach(function(n,i){t<=n[0].Ph?e.push(i):n.splice(tO(n,t,function(e){return e.Ph<t}),1/0)});for(var n=0;n<e.length;n++){var i=e[n];this.Vh.delete(i)}}else this.Vh.clear()},t.prototype.qh=function(t){for(var e=[],n=0,i=Array.from(this.Vh.keys()).sort(function(t,e){return e-t});n<i.length;n++){var r=i[n];if(this.Vh.get(r)){var s=e;e=[];for(var a=s.length,o=0,l=u(this.Vh.get(r)),c=l.length,h=1/0,d=-1/0,f=0;f<c;f++){for(var p=l[f],v=p.Ph;o<a;){var m=s[o],g=m.Ph;if(!(g<v)){h=g;break}o++,e.push(m),d=g,h=1/0}h-v>=t&&v-d>=t&&(e.push(p),d=v)}for(;o<a;o++)e.push(s[o])}}return e},t}(),t$=function(){function t(t){this.Uh=t}return t.prototype.Hh=function(){return null===this.Uh?null:new tR(Math.floor(this.Uh.hh()),Math.ceil(this.Uh.rh()))},t.prototype.Yh=function(){return this.Uh},t.Kh=function(){return new t(null)},t}();(tz=tZ||(tZ={}))[tz.Year=0]="Year",tz[tz.Month=1]="Month",tz[tz.DayOfMonth=2]="DayOfMonth",tz[tz.Time=3]="Time",tz[tz.TimeWithSeconds=4]="TimeWithSeconds";var tz,tB,tV=function(){function t(t,e,n){this.$h=0,this.Xh=null,this.Zh=[],this.Xn=null,this.$n=null,this.Jh=new tF,this.Gh=new Map,this.Qh=t$.Kh(),this.tr=!0,this.ir=new ti,this.nr=new ti,this.sr=new ti,this.hr=null,this.rr=null,this.er=[],this.ki=e,this.Qn=n,this.ur=e.rightOffset,this.ar=e.barSpacing,this.hi=t,this.lr()}return t.prototype.ct=function(){return this.ki},t.prototype.cr=function(t){f(this.Qn,t),this.vr(),this.lr()},t.prototype.rs=function(t,e){var n;f(this.ki,t),this.ki.fixLeftEdge&&this._r(),this.ki.fixRightEdge&&this.dr(),void 0!==t.barSpacing&&this.hi.wr(t.barSpacing),void 0!==t.rightOffset&&this.hi.Mr(t.rightOffset),void 0!==t.minBarSpacing&&this.hi.wr(null!==(n=t.barSpacing)&&void 0!==n?n:this.ar),this.vr(),this.lr(),this.sr.hn()},t.prototype.ri=function(t){var e;return(null===(e=this.Zh[t])||void 0===e?void 0:e.S)||null},t.prototype.br=function(t,e){if(this.Zh.length<1)return null;if(t.Dh>this.Zh[this.Zh.length-1].S.Dh)return e?this.Zh.length-1:null;var n=tO(this.Zh,t.Dh,function(t,e){return t.S.Dh<e});return t.Dh<this.Zh[n].S.Dh?e?n:null:n},t.prototype.ti=function(){return 0===this.$h||0===this.Zh.length},t.prototype.mr=function(){return this.pr(),this.Qh.Hh()},t.prototype.gr=function(){return this.pr(),this.Qh.Yh()},t.prototype.yr=function(){var t=this.mr();if(null===t)return null;var e={from:t.hh(),to:t.rh()};return this.kr(e)},t.prototype.kr=function(t){var e=Math.round(t.from),n=Math.round(t.to),i=h(this.Cr()),r=h(this.Nr());return{from:h(this.ri(Math.max(i,e))),to:h(this.ri(Math.min(r,n)))}},t.prototype.Sr=function(t){return{from:h(this.br(t.from,!0)),to:h(this.br(t.to,!0))}},t.prototype.wt=function(){return this.$h},t.prototype.Dr=function(t){if(isFinite(t)&&!(t<=0)&&this.$h!==t){if(this.ki.lockVisibleTimeRangeOnResize&&this.$h){var e=this.ar*t/this.$h;this.ar=e}if(this.ki.fixLeftEdge){var n=this.mr();if(null!==n&&0>=n.hh()){var i=this.$h-t;this.ur-=Math.round(i/this.ar)+1}}this.$h=t,this.tr=!0,this.Ar(),this.Tr()}},t.prototype.G=function(t){if(this.ti()||!v(t))return 0;var e=this.Br()+this.ur-t;return this.$h-(e+.5)*this.ar-1},t.prototype.Lr=function(t,e){for(var n=this.Br(),i=void 0===e?0:e.from,r=void 0===e?t.length:e.to,s=i;s<r;s++){var a=t[s].S,o=n+this.ur-a,l=this.$h-(o+.5)*this.ar-1;t[s].p=l}},t.prototype.Fr=function(t){return Math.ceil(this.Er(t))},t.prototype.Mr=function(t){this.tr=!0,this.ur=t,this.Tr(),this.hi.Vr(),this.hi.Or()},t.prototype.Wr=function(){return this.ar},t.prototype.wr=function(t){this.zr(t),this.Tr(),this.hi.Vr(),this.hi.Or()},t.prototype.Pr=function(){return this.ur},t.prototype.Fn=function(){if(this.ti())return null;if(null!==this.rr)return this.rr;for(var t=this.ar,e=5*(this.hi.ct().layout.fontSize+4),n=Math.round(e/t),i=h(this.mr()),r=Math.max(i.hh(),i.hh()-n),s=Math.max(i.rh(),i.rh()-n),a=this.Jh.Ih(t,e),o=this.Cr()+n,l=this.Nr()-n,c=0,u=0;u<a.length;u++){var d=a[u];if(r<=d.Ph&&d.Ph<=s){var f=void 0;c<this.er.length?((f=this.er[c]).An=this.G(d.Ph),f.Tn=this.Rr(d.S,d.Rh),f.Rh=d.Rh):(f={Ir:!1,An:this.G(d.Ph),Tn:this.Rr(d.S,d.Rh),Rh:d.Rh},this.er.push(f)),this.ar>e/2?f.Ir=!1:f.Ir=this.ki.fixLeftEdge&&d.Ph<=o||this.ki.fixRightEdge&&d.Ph>=l,c++}}return this.er.length=c,this.rr=this.er,this.er},t.prototype.jr=function(){this.tr=!0,this.wr(this.ki.barSpacing),this.Mr(this.ki.rightOffset)},t.prototype.qr=function(t){this.tr=!0,this.Xh=t,this.Tr(),this._r()},t.prototype.Ur=function(t,e){var n=this.Er(t),i=this.Wr();this.wr(i+i/10*e),this.ki.rightBarStaysOnScroll||this.Mr(this.Pr()+(n-this.Er(t)))},t.prototype.js=function(t){this.Xn&&this.Ks(),null===this.$n&&null===this.hr&&(this.ti()||(this.$n=t,this.Hr()))},t.prototype.qs=function(t){if(null!==this.hr){var e=ts(this.$h-t,0,this.$h),n=ts(this.$h-h(this.$n),0,this.$h);0!==e&&0!==n&&this.wr(this.hr.Wr*e/n)}},t.prototype.Us=function(){null!==this.$n&&(this.$n=null,this.Yr())},t.prototype.Hs=function(t){null===this.Xn&&null===this.hr&&(this.ti()||(this.Xn=t,this.Hr()))},t.prototype.Ys=function(t){if(null!==this.Xn){var e=(this.Xn-t)/this.Wr();this.ur=h(this.hr).Pr+e,this.tr=!0,this.Tr()}},t.prototype.Ks=function(){null!==this.Xn&&(this.Xn=null,this.Yr())},t.prototype.Kr=function(){this.$r(this.ki.rightOffset)},t.prototype.$r=function(t,e){var n=this;if(void 0===e&&(e=400),!isFinite(t))throw RangeError("offset is required and must be finite number");if(!isFinite(e)||e<=0)throw RangeError("animationDuration (optional) must be finite positive number");var i=this.ur,r=performance.now(),s=function(){var a=(performance.now()-r)/e,o=a>=1;n.Mr(o?t:i+(t-i)*a),o||setTimeout(s,20)};s()},t.prototype.O=function(t,e){this.tr=!0,this.Zh=t,this.Jh.Oh(t,e),this.Tr()},t.prototype.Xr=function(){return this.ir},t.prototype.Zr=function(){return this.nr},t.prototype.Jr=function(){return this.sr},t.prototype.Br=function(){return this.Xh||0},t.prototype.Gr=function(t){var e=t.Fh();this.zr(this.$h/e),this.ur=t.rh()-this.Br(),this.Tr(),this.tr=!0,this.hi.Vr(),this.hi.Or()},t.prototype.Qr=function(){var t=this.Cr(),e=this.Nr();null!==t&&null!==e&&this.Gr(new tR(t,e+this.ki.rightOffset))},t.prototype.te=function(t){var e=new tR(t.from,t.to);this.Gr(e)},t.prototype.ei=function(t){return void 0!==this.Qn.timeFormatter?this.Qn.timeFormatter(t.Sh||t.Dh):this.ie.oh(new Date(1e3*t.Dh))},t.prototype.Cr=function(){return 0===this.Zh.length?null:0},t.prototype.Nr=function(){return 0===this.Zh.length?null:this.Zh.length-1},t.prototype.ne=function(t){return(this.$h-1-t)/this.ar},t.prototype.Er=function(t){var e=this.ne(t);return Math.round(1e6*(this.Br()+this.ur-e))/1e6},t.prototype.zr=function(t){var e=this.ar;this.ar=t,this.Ar(),e!==this.ar&&(this.tr=!0,this.se())},t.prototype.pr=function(){if(this.tr){if(this.tr=!1,this.ti())this.he(t$.Kh());else{var t=this.Br(),e=this.$h/this.ar,n=this.ur+t,i=new tR(n-e+1,n);this.he(new t$(i))}}},t.prototype.Ar=function(){var t=this.re();if(this.ar<t&&(this.ar=t,this.tr=!0),0!==this.$h){var e=.5*this.$h;this.ar>e&&(this.ar=e,this.tr=!0)}},t.prototype.re=function(){return this.ki.fixLeftEdge&&this.ki.fixRightEdge&&0!==this.Zh.length?this.$h/this.Zh.length:this.ki.minBarSpacing},t.prototype.Tr=function(){var t=this.ee();this.ur>t&&(this.ur=t,this.tr=!0);var e=this.ue();null!==e&&this.ur<e&&(this.ur=e,this.tr=!0)},t.prototype.ue=function(){var t=this.Cr(),e=this.Xh;return null===t||null===e?null:t-e-1+(this.ki.fixLeftEdge?this.$h/this.ar:Math.min(2,this.Zh.length))},t.prototype.ee=function(){return this.ki.fixRightEdge?0:this.$h/this.ar-Math.min(2,this.Zh.length)},t.prototype.Hr=function(){this.hr={Wr:this.Wr(),Pr:this.Pr()}},t.prototype.Yr=function(){this.hr=null},t.prototype.Rr=function(t,e){var n=this,i=this.Gh.get(e);return void 0===i&&(i=new tA(function(t){return n.ae(t,e)}),this.Gh.set(e,i)),i.oh(t)},t.prototype.ae=function(t,e){var n,i=function(t,e,n){switch(t){case 0:case 10:return e?n?4:3:2;case 20:case 21:case 22:case 30:case 31:case 32:case 33:return e?3:2;case 50:return 2;case 60:return 1;case 70:return 0}}(e,this.ki.timeVisible,this.ki.secondsVisible);return void 0!==this.ki.tickMarkFormatter?this.ki.tickMarkFormatter(null!==(n=t.Sh)&&void 0!==n?n:t.Dh,i,this.Qn.locale):function(t,e,n){var i={};switch(e){case 0:i.year="numeric";break;case 1:i.month="short";break;case 2:i.day="numeric";break;case 3:i.hour12=!1,i.hour="2-digit",i.minute="2-digit";break;case 4:i.hour12=!1,i.hour="2-digit",i.minute="2-digit",i.second="2-digit"}var r=new Date(void 0===t.Sh?1e3*t.Dh:Date.UTC(t.Sh.year,t.Sh.month-1,t.Sh.day));return new Date(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()).toLocaleString(n,i)}(t,i,this.Qn.locale)},t.prototype.he=function(t){var e=this.Qh;this.Qh=t,tI(e.Hh(),this.Qh.Hh())||this.ir.hn(),tI(e.Yh(),this.Qh.Yh())||this.nr.hn(),this.se()},t.prototype.se=function(){this.rr=null},t.prototype.vr=function(){this.se(),this.Gh.clear()},t.prototype.lr=function(){var t=this.Qn.dateFormat;this.ki.timeVisible?this.ie=new tT({fh:t,_h:this.ki.secondsVisible?"%h:%m:%s":"%h:%m",dh:"   ",wh:this.Qn.locale}):this.ie=new tE(t,this.Qn.locale)},t.prototype._r=function(){if(this.ki.fixLeftEdge){var t=this.Cr();if(null!==t){var e=this.mr();if(null!==e){var n=e.hh()-t;if(n<0){var i=this.ur-n-1;this.Mr(i)}this.Ar()}}}},t.prototype.dr=function(){this.Tr(),this.Ar()},t}();function tU(t){return!p(t)&&!m(t)}(t=tB||(tB={})).Solid="solid",t.VerticalGradient="gradient";var tq="'Trebuchet MS', Roboto, Ubuntu, sans-serif";function tW(t,e,n){return void 0!==n?n+=" ":n="",void 0===e&&(e=tq),""+n+t+"px "+e}var tH=function(){function t(t){this.oe={At:1,Dt:4,Wt:NaN,Nt:"",le:"",et:"",Bt:0,Lt:0,Ft:0,Tt:0,Ot:0},this.F=t}return t.prototype.ct=function(){var t=this.oe,e=this.fe(),n=this.ce();return t.Wt===e&&t.le===n||(t.Wt=e,t.le=n,t.Nt=tW(e,n),t.Tt=Math.floor(e/3.5),t.Bt=t.Tt,t.Lt=Math.max(Math.ceil(e/2-t.Dt/2),0),t.Ft=Math.ceil(e/2+t.Dt/2),t.Ot=Math.round(e/10)),t.et=this.ve(),this.oe},t.prototype.ve=function(){return this.F.ct().layout.textColor},t.prototype.fe=function(){return this.F.ct().layout.fontSize},t.prototype.ce=function(){return this.F.ct().layout.fontFamily},t}();function tG(t){return"left"===t||"right"===t}var tY=function(){function t(t){this._e=new Map,this.de=!1,this.we=[],this.Me=t}return t.prototype.be=function(t,e){var n,i=void 0===(n=this._e.get(t))?e:{me:Math.max(n.me,e.me),_s:n._s||e._s};this._e.set(t,i)},t.prototype.pe=function(){return this.Me},t.prototype.ge=function(t){var e=this._e.get(t);return void 0===e?{me:this.Me}:{me:Math.max(this.Me,e.me),_s:e._s}},t.prototype.ye=function(){this.we=[{ke:0}]},t.prototype.Ce=function(t){this.we=[{ke:1,X:t}]},t.prototype.Ne=function(){this.we=[{ke:4}]},t.prototype.wr=function(t){this.we.push({ke:2,X:t})},t.prototype.Mr=function(t){this.we.push({ke:3,X:t})},t.prototype.xe=function(){return this.we},t.prototype._n=function(t){var e=this;this.de=this.de||t.de,this.we=this.we.concat(t.we);for(var n=0,i=t.we;n<i.length;n++){var r=i[n];this.Se(r)}this.Me=Math.max(this.Me,t.Me),t._e.forEach(function(t,n){e.be(n,t)})},t.prototype.Se=function(t){switch(t.ke){case 0:this.ye();break;case 1:this.Ce(t.X);break;case 2:this.wr(t.X);break;case 3:this.Mr(t.X);break;case 4:this.Ne()}},t}(),tK=function(){function t(t){this.De=t}return t.prototype.format=function(t){var e="";return t<0&&(e="-",t=-t),t<995?e+this.Ae(t):t<999995?e+this.Ae(t/1e3)+"K":t<999999995?(t=1e3*Math.round(t/1e3),e+this.Ae(t/1e6)+"M"):(t=1e6*Math.round(t/1e6),e+this.Ae(t/1e9)+"B")},t.prototype.Ae=function(t){var e=Math.pow(10,this.De);return((t=Math.round(t*e)/e)>=1e-15&&t<1?t.toFixed(this.De).replace(/\.?0+$/,""):String(t)).replace(/(\.[1-9]*)0+$/,function(t,e){return e})},t}();function tQ(t,e,n,i){if(0!==e.length){var r=e[i.from].p,s=e[i.from].g;t.moveTo(r,s);for(var a=i.from+1;a<i.to;++a){var o=e[a];if(1===n){var l=e[a-1].g,c=o.p;t.lineTo(c,l)}t.lineTo(o.p,o.g)}}}var tX=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.v=null,e}return a(e,t),e.prototype._=function(t){this.v=t},e.prototype.u=function(t){if(null!==this.v&&0!==this.v.m.length&&null!==this.v.M){if(t.lineCap="butt",t.lineJoin="round",t.lineWidth=this.v.rt,i(t,this.v.ut),t.lineWidth=1,t.beginPath(),1===this.v.m.length){var e=this.v.m[0],n=this.v.Te/2;t.moveTo(e.p-n,this.v.Be),t.lineTo(e.p-n,e.g),t.lineTo(e.p+n,e.g),t.lineTo(e.p+n,this.v.Be)}else t.moveTo(this.v.m[this.v.M.from].p,this.v.Be),t.lineTo(this.v.m[this.v.M.from].p,this.v.m[this.v.M.from].g),tQ(t,this.v.m,this.v.Le,this.v.M),this.v.M.to>this.v.M.from&&(t.lineTo(this.v.m[this.v.M.to-1].p,this.v.Be),t.lineTo(this.v.m[this.v.M.from].p,this.v.Be));t.closePath(),t.fillStyle=this.Fe(t),t.fill()}},e}(x),tJ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.Fe=function(t){var e=this.v,n=t.createLinearGradient(0,0,0,e.Ee);return n.addColorStop(0,e.Ve),n.addColorStop(1,e.Oe),n},e}(tX),t0=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.v=null,e}return a(e,t),e.prototype._=function(t){this.v=t},e.prototype.u=function(t){if(null!==this.v&&0!==this.v.m.length&&null!==this.v.M){if(t.lineCap="butt",t.lineWidth=this.v.rt,i(t,this.v.ut),t.strokeStyle=this.We(t),t.lineJoin="round",t.beginPath(),1===this.v.m.length){var e=this.v.m[0];t.moveTo(e.p-this.v.Te/2,e.g),t.lineTo(e.p+this.v.Te/2,e.g)}else tQ(t,this.v.m,this.v.Le,this.v.M);t.stroke()}},e}(x),t1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.We=function(){return this.v.N},e}(t0);function t2(t,e){return t.S<e}function t3(t,e){return t<e.S}function t4(t,e,n){var i=e.hh(),r=e.rh(),s=tO(t,i,t2),a=tL(t,r,t3);if(!n)return{from:s,to:a};var o=s,l=a;return s>0&&s<t.length&&t[s].S>=i&&(o=s-1),a>0&&a<t.length&&t[a-1].S<=r&&(l=a+1),{from:o,to:l}}var t5=function(){function t(t,e,n){this.ze=!0,this.Pe=!0,this.Re=!0,this.Ie=[],this.je=null,this.qe=t,this.Ue=e,this.He=n}return t.prototype.O=function(t){this.ze=!0,"data"===t&&(this.Pe=!0),"options"===t&&(this.Re=!0)},t.prototype.Ye=function(){this.Pe&&(this.Ke(),this.Pe=!1),this.ze&&(this.$e(),this.ze=!1),this.Re&&(this.Xe(),this.Re=!1)},t.prototype.Ze=function(){this.je=null},t.prototype.$e=function(){var t=this.qe.$(),e=this.Ue.j();if(this.Ze(),!e.ti()&&!t.ti()){var n=e.mr();if(null!==n&&0!==this.qe.Hi().Je()){var i=this.qe.H();null!==i&&(this.je=t4(this.Ie,n,this.He),this.Ge(t,e,i.X))}}},t}(),t7=function(t){function e(e,n){return t.call(this,e,n,!0)||this}return a(e,t),e.prototype.Ge=function(t,e,n){e.Lr(this.Ie,_(this.je)),t.Ss(this.Ie,n,_(this.je))},e.prototype.Qe=function(t,e){return{S:t,D:e,p:NaN,g:NaN}},e.prototype.Xe=function(){},e.prototype.Ke=function(){var t=this,e=this.qe.tu();this.Ie=this.qe.Hi().iu().map(function(n){var i=n.X[3];return t.nu(n.Ph,i,e)})},e}(t5),t6=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.ot=new w,i.su=new tJ,i.hu=new t1,i.ot.i([i.su,i.hu]),i}return a(e,t),e.prototype.P=function(t,e){if(!this.qe.U())return null;var n=this.qe.ct();return this.Ye(),this.su._({Le:n.lineType,m:this.Ie,ut:n.lineStyle,rt:n.lineWidth,Ve:n.topColor,Oe:n.bottomColor,Be:t,Ee:t,M:this.je,Te:this.Ue.j().Wr()}),this.hu._({Le:n.lineType,m:this.Ie,N:n.lineColor,ut:n.lineStyle,rt:n.lineWidth,M:this.je,Te:this.Ue.j().Wr()}),this.ot},e.prototype.nu=function(t,e){return this.Qe(t,e)},e}(t7),t8=function(){function t(){this.tt=null,this.ru=0,this.eu=0}return t.prototype._=function(t){this.tt=t},t.prototype.h=function(t,e,n,i){if(null!==this.tt&&0!==this.tt.Hi.length&&null!==this.tt.M){this.ru=this.uu(e),this.ru>=2&&Math.max(1,Math.floor(e))%2!=this.ru%2&&this.ru--,this.eu=this.tt.au?Math.min(this.ru,Math.floor(e)):this.ru;for(var r=null,s=this.eu<=this.ru&&this.tt.Wr>=Math.floor(1.5*e),a=this.tt.M.from;a<this.tt.M.to;++a){var o=this.tt.Hi[a];r!==o.et&&(t.fillStyle=o.et,r=o.et);var l=Math.floor(.5*this.eu),c=Math.round(o.p*e),u=c-l,h=this.eu,d=u+h-1,f=Math.min(o.Bs,o.Ls),p=Math.max(o.Bs,o.Ls),v=Math.round(f*e)-l,m=Math.max(Math.round(p*e)+l-v,this.eu);t.fillRect(u,v,h,m);var g=Math.ceil(1.5*this.ru);if(s){if(this.tt.ou){var y=c-g,b=Math.max(v,Math.round(o.Ts*e)-l),_=b+h-1;_>v+m-1&&(b=(_=v+m-1)-h+1),t.fillRect(y,b,u-y,_-b+1)}var w=c+g,x=Math.max(v,Math.round(o.Fs*e)-l),k=x+h-1;k>v+m-1&&(x=(k=v+m-1)-h+1),t.fillRect(d+1,x,w-d,k-x+1)}}}},t.prototype.uu=function(t){return Math.max(Math.floor(t),Math.floor(Math.floor(.3*h(this.tt).Wr*t)))},t}(),t9=function(t){function e(e,n){return t.call(this,e,n,!1)||this}return a(e,t),e.prototype.Ge=function(t,e,n){e.Lr(this.Ie,_(this.je)),t.As(this.Ie,n,_(this.je))},e.prototype.lu=function(t,e,n){return{S:t,open:e.X[0],high:e.X[1],low:e.X[2],close:e.X[3],p:NaN,Ts:NaN,Bs:NaN,Ls:NaN,Fs:NaN}},e.prototype.Ke=function(){var t=this,e=this.qe.tu();this.Ie=this.qe.Hi().iu().map(function(n){return t.nu(n.Ph,n,e)})},e}(t5),et=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ot=new t8,e}return a(e,t),e.prototype.P=function(t,e){if(!this.qe.U())return null;var n=this.qe.ct();this.Ye();var i={Hi:this.Ie,Wr:this.Ue.j().Wr(),ou:n.openVisible,au:n.thinBars,M:this.je};return this.ot._(i),this.ot},e.prototype.Xe=function(){var t=this;this.Ie.forEach(function(e){e.et=t.qe.tu().cu(e.S).fu})},e.prototype.nu=function(t,e,n){return o(o({},this.lu(t,e,n)),{et:n.cu(t).fu})},e}(t9),ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.Fe=function(t){var e=this.v,n=t.createLinearGradient(0,0,0,e.Ee),i=ts(e.Be/e.Ee,0,1);return n.addColorStop(0,e.vu),n.addColorStop(i,e._u),n.addColorStop(i,e.du),n.addColorStop(1,e.wu),n},e}(tX),en=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.We=function(t){var e=this.v,n=t.createLinearGradient(0,0,0,e.Ee),i=ts(e.Be/e.Ee,0,1);return n.addColorStop(0,e.Ve),n.addColorStop(i,e.Ve),n.addColorStop(i,e.Oe),n.addColorStop(1,e.Oe),n},e}(t0),ei=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.Mu=new ee,i.bu=new en,i.A=new w,i.A.i([i.Mu,i.bu]),i}return a(e,t),e.prototype.P=function(t,e){if(!this.qe.U())return null;var n=this.qe.H();if(null===n)return null;var i=this.qe.ct();this.Ye();var r=this.qe.$().K(i.baseValue.price,n.X),s=this.Ue.j().Wr();return this.Mu._({m:this.Ie,vu:i.topFillColor1,_u:i.topFillColor2,du:i.bottomFillColor1,wu:i.bottomFillColor2,rt:i.lineWidth,ut:i.lineStyle,Le:0,Be:r,Ee:t,M:this.je,Te:s}),this.bu._({m:this.Ie,Ve:i.topLineColor,Oe:i.bottomLineColor,rt:i.lineWidth,ut:i.lineStyle,Le:0,Be:r,Ee:t,M:this.je,Te:s}),this.A},e.prototype.nu=function(t,e){return this.Qe(t,e)},e}(t7),er=function(){function t(){this.tt=null,this.ru=0}return t.prototype._=function(t){this.tt=t},t.prototype.h=function(t,e,n,i){if(null!==this.tt&&0!==this.tt.Hi.length&&null!==this.tt.M){this.ru=function(t,e){if(t>=2.5&&t<=4)return Math.floor(3*e);var n=1-.2*Math.atan(Math.max(4,t)-4)/(.5*Math.PI),i=Math.min(Math.floor(t*n*e),Math.floor(t*e));return Math.max(Math.floor(e),i)}(this.tt.Wr,e),this.ru>=2&&Math.floor(e)%2!=this.ru%2&&this.ru--;var r=this.tt.Hi;this.tt.mu&&this.pu(t,r,this.tt.M,e),this.tt.gu&&this.yu(t,r,this.tt.M,this.tt.Wr,e);var s=this.ku(e);(!this.tt.gu||this.ru>2*s)&&this.Cu(t,r,this.tt.M,e)}},t.prototype.pu=function(t,e,n,i){if(null!==this.tt){var r="",s=Math.min(Math.floor(i),Math.floor(this.tt.Wr*i));s=Math.max(Math.floor(i),Math.min(s,this.ru));for(var a=Math.floor(.5*s),o=null,l=n.from;l<n.to;l++){var c=e[l];c.Nu!==r&&(t.fillStyle=c.Nu,r=c.Nu);var u=Math.round(Math.min(c.Ts,c.Fs)*i),h=Math.round(Math.max(c.Ts,c.Fs)*i),d=Math.round(c.Bs*i),f=Math.round(c.Ls*i),p=Math.round(i*c.p)-a,v=p+s-1;null!==o&&(p=Math.min(p=Math.max(o+1,p),v));var m=v-p+1;t.fillRect(p,d,m,u-d),t.fillRect(p,h+1,m,f-h),o=v}}},t.prototype.ku=function(t){var e=Math.floor(1*t);this.ru<=2*e&&(e=Math.floor(.5*(this.ru-1)));var n=Math.max(Math.floor(t),e);return this.ru<=2*n?Math.max(Math.floor(t),Math.floor(1*t)):n},t.prototype.yu=function(t,e,n,i,r){if(null!==this.tt)for(var s="",a=this.ku(r),o=null,l=n.from;l<n.to;l++){var c,u,h,d=e[l];d.Z!==s&&(t.fillStyle=d.Z,s=d.Z);var f=Math.round(d.p*r)-Math.floor(.5*this.ru),p=f+this.ru-1,v=Math.round(Math.min(d.Ts,d.Fs)*r),m=Math.round(Math.max(d.Ts,d.Fs)*r);if(null!==o&&(f=Math.min(f=Math.max(o+1,f),p)),this.tt.Wr*r>2*a)c=f,u=p-f+1,h=m-v+1,t.fillRect(c+a,v,u-2*a,a),t.fillRect(c+a,v+h-a,u-2*a,a),t.fillRect(c,v,a,h),t.fillRect(c+u-a,v,a,h);else{var g=p-f+1;t.fillRect(f,v,g,m-v+1)}o=p}},t.prototype.Cu=function(t,e,n,i){if(null!==this.tt)for(var r="",s=this.ku(i),a=n.from;a<n.to;a++){var o=e[a],l=Math.round(Math.min(o.Ts,o.Fs)*i),c=Math.round(Math.max(o.Ts,o.Fs)*i),u=Math.round(o.p*i)-Math.floor(.5*this.ru),h=u+this.ru-1;if(o.et!==r){var d=o.et;t.fillStyle=d,r=d}this.tt.gu&&(u+=s,l+=s,h-=s,c-=s),l>c||t.fillRect(u,l,h-u+1,c-l+1)}},t}(),es=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ot=new er,e}return a(e,t),e.prototype.P=function(t,e){if(!this.qe.U())return null;var n=this.qe.ct();this.Ye();var i={Hi:this.Ie,Wr:this.Ue.j().Wr(),mu:n.wickVisible,gu:n.borderVisible,M:this.je};return this.ot._(i),this.ot},e.prototype.Xe=function(){var t=this;this.Ie.forEach(function(e){var n=t.qe.tu().cu(e.S);e.et=n.fu,e.Nu=n.xu,e.Z=n.Su})},e.prototype.nu=function(t,e,n){var i=n.cu(t);return o(o({},this.lu(t,e,n)),{et:i.fu,Nu:i.xu,Z:i.Su})},e}(t9),ea=function(){function t(){this.tt=null,this.Du=[]}return t.prototype._=function(t){this.tt=t,this.Du=[]},t.prototype.h=function(t,e,n,i){if(null!==this.tt&&0!==this.tt.m.length&&null!==this.tt.M){this.Du.length||this.Au(e);for(var r=Math.max(1,Math.floor(e)),s=Math.round(this.tt.Tu*e)-Math.floor(r/2),a=s+r,o=this.tt.M.from;o<this.tt.M.to;o++){var l=this.tt.m[o],c=this.Du[o-this.tt.M.from],u=Math.round(l.g*e);t.fillStyle=l.et;var h=void 0,d=void 0;u<=s?(h=u,d=a):(h=s,d=u-Math.floor(r/2)+r),t.fillRect(c.hh,h,c.rh-c.hh+1,d-h)}}},t.prototype.Au=function(t){if(null!==this.tt&&0!==this.tt.m.length&&null!==this.tt.M){var e=1>=Math.ceil(this.tt.Wr*t)?0:Math.max(1,Math.floor(t)),n=Math.round(this.tt.Wr*t)-e;this.Du=Array(this.tt.M.to-this.tt.M.from);for(var i=this.tt.M.from;i<this.tt.M.to;i++){var r,s=this.tt.m[i],a=Math.round(s.p*t),o=void 0,l=void 0;n%2?(o=a-(r=(n-1)/2),l=a+r):(o=a-(r=n/2),l=a+r-1),this.Du[i-this.tt.M.from]={hh:o,rh:l,Bu:a,Lu:s.p*t,S:s.S}}for(i=this.tt.M.from+1;i<this.tt.M.to;i++){var c=this.Du[i-this.tt.M.from],u=this.Du[i-this.tt.M.from-1];c.S===u.S+1&&c.hh-u.rh!==e+1&&(u.Bu>u.Lu?u.rh=c.hh-e-1:c.hh=u.rh+e+1)}var h=Math.ceil(this.tt.Wr*t);for(i=this.tt.M.from;i<this.tt.M.to;i++){(c=this.Du[i-this.tt.M.from]).rh<c.hh&&(c.rh=c.hh);var d=c.rh-c.hh+1;h=Math.min(d,h)}if(e>0&&h<4)for(i=this.tt.M.from;i<this.tt.M.to;i++)(d=(c=this.Du[i-this.tt.M.from]).rh-c.hh+1)>h&&(c.Bu>c.Lu?c.rh-=1:c.hh+=1)}else this.Du=[]},t}();function eo(t){return{m:[],Wr:t,Tu:NaN,M:null}}var el=function(t){function e(e,n){var i=t.call(this,e,n,!1)||this;return i.A=new w,i.Fu=eo(0),i.ot=new ea,i}return a(e,t),e.prototype.P=function(t,e){return this.qe.U()?(this.Ye(),this.A):null},e.prototype.Ke=function(){var t=this.Ue.j().Wr();this.Fu=eo(t);for(var e=0,n=0,i=this.qe.ct().color,r=0,s=this.qe.Hi().iu();r<s.length;r++){var a=s[r],o=a.X[3],l=void 0!==a.et?a.et:i,c={S:a.Ph,D:o,p:NaN,g:NaN,et:l};++e<this.Fu.m.length?this.Fu.m[e]=c:this.Fu.m.push(c),this.Ie[n++]={S:a.Ph,p:0}}this.ot._(this.Fu),this.A.i([this.ot])},e.prototype.Xe=function(){},e.prototype.Ze=function(){t.prototype.Ze.call(this),this.Fu.M=null},e.prototype.Ge=function(t,e,n){if(null!==this.je){var i=e.Wr(),r=h(e.mr()),s=t.K(this.qe.ct().base,n);e.Lr(this.Fu.m),t.Ss(this.Fu.m,n),this.Fu.Tu=s,this.Fu.M=t4(this.Fu.m,r,!1),this.Fu.Wr=i,this.ot._(this.Fu)}},e}(t5),ec=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.hu=new t1,i}return a(e,t),e.prototype.P=function(t,e){if(!this.qe.U())return null;var n=this.qe.ct();this.Ye();var i={m:this.Ie,N:n.color,ut:n.lineStyle,Le:n.lineType,rt:n.lineWidth,M:this.je,Te:this.Ue.j().Wr()};return this.hu._(i),this.hu},e.prototype.nu=function(t,e){return this.Qe(t,e)},e}(t7),eu=/[2-9]/g,eh=function(){function t(t){void 0===t&&(t=50),this.kh=new Map,this.Eu=0,this.Vu=Array.from(Array(t))}return t.prototype.Ou=function(){this.kh.clear(),this.Vu.fill(void 0)},t.prototype.Vt=function(t,e,n){var i=String(e).replace(n||eu,"0"),r=this.kh.get(i);if(void 0===r){if(0===(r=t.measureText(i).width)&&0!==e.length)return 0;var s=this.Vu[this.Eu];void 0!==s&&this.kh.delete(s),this.Vu[this.Eu]=i,this.Eu=(this.Eu+1)%this.Vu.length,this.kh.set(i,r)}return r},t}(),ed=function(){function t(t){this.Wu=null,this.oe=null,this.zu="right",this.$h=0,this.Pu=t}return t.prototype.Ru=function(t,e,n,i){this.Wu=t,this.oe=e,this.$h=n,this.zu=i},t.prototype.h=function(t,e){null!==this.oe&&null!==this.Wu&&this.Wu.h(t,this.oe,this.Pu,this.$h,this.zu,e)},t}(),ef=function(){function t(t,e,n){this.Iu=t,this.Pu=new eh(50),this.ju=e,this.F=n,this.fe=-1,this.ot=new ed(this.Pu)}return t.prototype.P=function(t,e){var n=this.F.qu(this.ju);if(null===n)return null;var i=n.Uu(this.ju)?n.xi():this.ju.$();if(null===i)return null;var r=n.Hu(i);if("overlay"===r)return null;var s=this.F.Yu();return s.Wt!==this.fe&&(this.fe=s.Wt,this.Pu.Ou()),this.ot.Ru(this.Iu.Zt(),s,e,r),this.ot},t}(),ep=function(){function t(){this.tt=null}return t.prototype._=function(t){this.tt=t},t.prototype.h=function(t,e,n,s){if(null!==this.tt&&!1!==this.tt.U){var a=Math.round(this.tt.g*e);if(!(a<0||a>Math.ceil(this.tt.Mt*e))){var o=Math.ceil(this.tt.wt*e);t.lineCap="butt",t.strokeStyle=this.tt.et,t.lineWidth=Math.floor(this.tt.rt*e),i(t,this.tt.ut),r(t,a,0,o)}}},t}(),ev=function(){function t(t){this.Ku={wt:0,Mt:0,g:0,et:"rgba(0, 0, 0, 0)",rt:1,ut:0,U:!1},this.$u=new ep,this.L=!0,this.qe=t,this.Ue=t.vt(),this.$u._(this.Ku)}return t.prototype.O=function(){this.L=!0},t.prototype.P=function(t,e){return this.qe.U()?(this.L&&(this.Xu(t,e),this.L=!1),this.$u):null},t}(),em=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.Xu=function(t,e){this.Ku.U=!1;var n=this.qe.$(),i=n.os().os;if(2===i||3===i){var r=this.qe.ct();if(r.baseLineVisible&&this.qe.U()){var s=this.qe.H();null!==s&&(this.Ku.U=!0,this.Ku.g=n.K(s.X,s.X),this.Ku.wt=e,this.Ku.Mt=t,this.Ku.et=r.baseLineColor,this.Ku.rt=r.baseLineWidth,this.Ku.ut=r.baseLineStyle)}}},e}(ev),eg=function(){function t(){this.tt=null}return t.prototype._=function(t){this.tt=t},t.prototype.Zu=function(){return this.tt},t.prototype.h=function(t,e,n,i){var r=this.tt;if(null!==r){t.save();var s=Math.max(1,Math.floor(e)),a=s%2/2,o=Math.round(r.Lu.x*e)+a,l=r.Lu.y*e;t.fillStyle=r.Ju,t.beginPath();var c=Math.max(2,1.5*r.Gu)*e;t.arc(o,l,c,0,2*Math.PI,!1),t.fill(),t.fillStyle=r.Qu,t.beginPath(),t.arc(o,l,r.C*e,0,2*Math.PI,!1),t.fill(),t.lineWidth=s,t.strokeStyle=r.ta,t.beginPath(),t.arc(o,l,r.C*e+s/2,0,2*Math.PI,!1),t.stroke(),t.restore()}},t}(),ey=[{ia:0,na:.25,sa:4,ha:10,ra:.25,ea:0,ua:.4,aa:.8},{ia:.25,na:.525,sa:10,ha:14,ra:0,ea:0,ua:.8,aa:0},{ia:.525,na:1,sa:14,ha:14,ra:0,ea:0,ua:0,aa:0}];function eb(t,e,n,i){return function(t,e){if("transparent"===t)return t;var n=D(t),i=n[3];return"rgba("+n[0]+", "+n[1]+", "+n[2]+", "+e*i+")"}(t,n+(i-n)*e)}function e_(t,e){for(var n,i=t%2600/2600,r=0;r<ey.length;r++){var s=ey[r];if(i>=s.ia&&i<=s.na){n=s;break}}c(void 0!==n,"Last price animation internal logic error");var a,o=(i-n.ia)/(n.na-n.ia);return{Qu:eb(e,o,n.ra,n.ea),ta:eb(e,o,n.ua,n.aa),C:(a=n.sa)+(n.ha-a)*o}}var ew=function(){function t(t){this.ot=new eg,this.L=!0,this.oa=!0,this.la=performance.now(),this.fa=this.la-1,this.ca=t}return t.prototype.O=function(t){if(this.L=!0,"data"===t&&2===this.ca.ct().lastPriceAnimation){var e=performance.now(),n=this.fa-e;if(n>0)return void(n<650&&(this.fa+=2600));this.la=e,this.fa=e+2600}},t.prototype.va=function(){this.oa=!0},t.prototype.U=function(){return 0!==this.ca.ct().lastPriceAnimation},t.prototype._a=function(){switch(this.ca.ct().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.fa}},t.prototype.P=function(t,e){return this.L?(this.R(t,e),this.L=!1,this.oa=!1):this.oa&&(this.da(),this.oa=!1),this.ot},t.prototype.R=function(t,e){this.ot._(null);var n=this.ca.vt().j(),i=n.mr(),r=this.ca.H();if(null!==i&&null!==r){var s=this.ca.wa(!0);if(!s.Ma&&i.Eh(s.Ph)){var a={x:n.G(s.Ph),y:this.ca.$().K(s.D,r.X)},o=s.et,l=this.ca.ct().lineWidth,c=e_(this.ba(),o);this.ot._({Ju:o,Gu:l,Qu:c.Qu,ta:c.ta,C:c.C,Lu:a})}}},t.prototype.da=function(){var t=this.ot.Zu();if(null!==t){var e=e_(this.ba(),t.Ju);t.Qu=e.Qu,t.ta=e.ta,t.C=e.C}},t.prototype.ba=function(){return this._a()?performance.now()-this.la:2599},t}();function ex(t,e){return tl(Math.min(Math.max(t,12),30)*e)}function ek(t,e){switch(t){case"arrowDown":case"arrowUp":return ex(e,1);case"circle":return ex(e,.8);case"square":return ex(e,.7)}}function eC(t){return Math.max(ex(t,.1),3)}function ej(t,e,n,i,r){var s=ek("square",n),a=(s-1)/2,o=t-a,l=e-a;return i>=o&&i<=o+s&&r>=l&&r<=l+s}function eM(t,e,n,i,r){var s=(ek("arrowUp",r)-1)/2,a=(tl(r/2)-1)/2;e.beginPath(),t?(e.moveTo(n-s,i),e.lineTo(n,i-s),e.lineTo(n+s,i),e.lineTo(n+a,i),e.lineTo(n+a,i+s),e.lineTo(n-a,i+s)):(e.moveTo(n-s,i),e.lineTo(n,i+s),e.lineTo(n+s,i),e.lineTo(n+a,i),e.lineTo(n+a,i-s),e.lineTo(n-a,i-s)),e.lineTo(n-a,i),e.fill()}var eE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tt=null,e.Pu=new eh,e.fe=-1,e.ce="",e.ma="",e}return a(e,t),e.prototype._=function(t){this.tt=t},e.prototype.Ru=function(t,e){this.fe===t&&this.ce===e||(this.fe=t,this.ce=e,this.ma=tW(t,e),this.Pu.Ou())},e.prototype.pa=function(t,e){if(null===this.tt||null===this.tt.M)return null;for(var n=this.tt.M.from;n<this.tt.M.to;n++){var i=this.tt.m[n];if(function(t,e,n){var i,r,s,a;return!(void 0===t.Et||(i=t.p,r=t.Et.g,s=t.Et.wt,a=t.Et.Mt/2,!(e>=i)||!(e<=i+s)||!(n>=r-a)||!(n<=r+a)))||function(t,e,n){var i,r,s,a,o,l;if(0===t.Je)return!1;switch(t.Na){case"arrowDown":case"arrowUp":return i=t.p,ej(i,t.g,t.Je,e,n);case"circle":return r=t.p,s=t.g,a=2+ek("circle",t.Je)/2,Math.sqrt((o=r-e)*o+(l=s-n)*l)<=a;case"square":return ej(t.p,t.g,t.Je,e,n)}}(t,e,n)}(i,t,e))return{ga:i.ya,ka:i.ka}}return null},e.prototype.u=function(t,e,n){if(null!==this.tt&&null!==this.tt.M){t.textBaseline="middle",t.font=this.ma;for(var i=this.tt.M.from;i<this.tt.M.to;i++){var r=this.tt.m[i];void 0!==r.Et&&(r.Et.wt=this.Pu.Vt(t,r.Et.Ca),r.Et.Mt=this.fe),t.fillStyle=r.et,void 0!==r.Et&&function(t,e,n,i){t.fillText(e,n,i)}(t,r.Et.Ca,r.p-r.Et.wt/2,r.Et.g),function(t,e){if(0!==t.Je){switch(t.Na){case"arrowDown":return void eM(!1,e,t.p,t.g,t.Je);case"arrowUp":return void eM(!0,e,t.p,t.g,t.Je);case"circle":var n,i,r;return void(n=t.p,i=t.g,r=(ek("circle",t.Je)-1)/2,e.beginPath(),e.arc(n,i,r,0,2*Math.PI,!1),e.fill());case"square":return void function(t,e,n,i){var r=ek("square",i),s=(r-1)/2;t.fillRect(e-s,n-s,r,r)}(e,t.p,t.g,t.Je)}t.Na}}(r,t)}}},e}(x),eS=function(){function t(t,e){this.L=!0,this.Da=!0,this.Aa=!0,this.Ta=null,this.ot=new eE,this.ca=t,this.hi=e,this.tt={m:[],M:null}}return t.prototype.O=function(t){this.L=!0,this.Aa=!0,"data"===t&&(this.Da=!0)},t.prototype.P=function(t,e,n){if(!this.ca.U())return null;this.L&&this.Ye();var i=this.hi.ct().layout;return this.ot.Ru(i.fontSize,i.fontFamily),this.ot._(this.tt),this.ot},t.prototype.Ba=function(){if(this.Aa){if(this.ca.La().length>0){var t=this.hi.j().Wr(),e=eC(t),n=1.5*to(ex(t,1))+2*e;this.Ta={above:n,below:n}}else this.Ta=null;this.Aa=!1}return this.Ta},t.prototype.Ye=function(){var t=this.ca.$(),e=this.hi.j(),n=this.ca.La();this.Da&&(this.tt.m=n.map(function(t){return{S:t.time,p:0,g:0,Je:0,Na:t.shape,et:t.color,ya:t.ya,ka:t.id,Et:void 0}}),this.Da=!1);var i=this.hi.ct().layout;this.tt.M=null;var r=e.mr();if(null!==r){var s=this.ca.H();if(null!==s&&0!==this.tt.m.length){var a=NaN,o=eC(e.Wr()),l={xa:o,Sa:o};this.tt.M=t4(this.tt.m,r,!0);for(var c=this.tt.M.from;c<this.tt.M.to;c++){var u=n[c];u.time!==a&&(l.xa=o,l.Sa=o,a=u.time);var h=this.tt.m[c];h.p=e.G(u.time),void 0!==u.text&&u.text.length>0&&(h.Et={Ca:u.text,g:0,wt:0,Mt:0});var d=this.ca.Fa(u.time);null!==d&&function(t,e,n,i,r,s,a,o,l){var c=p(n)?n:n.close,u=p(n)?n:n.high,h=p(n)?n:n.low,d=p(e.size)?Math.max(e.size,0):1,f=to(ex(o.Wr(),1))*d,v=f/2;switch(t.Je=f,e.position){case"inBar":return t.g=a.K(c,l),void(void 0!==t.Et&&(t.Et.g=t.g+v+s+.6*r));case"aboveBar":return t.g=a.K(u,l)-v-i.xa,void 0!==t.Et&&(t.Et.g=t.g-v-.6*r,i.xa+=1.2*r),void(i.xa+=f+s);case"belowBar":return t.g=a.K(h,l)+v+i.Sa,void 0!==t.Et&&(t.Et.g=t.g+v+s+.6*r,i.Sa+=1.2*r),void(i.Sa+=f+s)}e.position}(h,u,d,l,i.fontSize,o,t,e,s.X)}this.L=!1}}},t}(),eN=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.Xu=function(t,e){var n=this.Ku;n.U=!1;var i=this.qe.ct();if(i.priceLineVisible&&this.qe.U()){var r=this.qe.wa(0===i.priceLineSource);r.Ma||(n.U=!0,n.g=r.zt,n.et=this.qe.Ea(r.et),n.wt=e,n.Mt=t,n.rt=i.priceLineWidth,n.ut=i.priceLineStyle)}},e}(ev),eT=function(t){function e(e){var n=t.call(this)||this;return n.lt=e,n}return a(e,t),e.prototype.Jt=function(t,e,n){t.U=!1,e.U=!1;var i=this.lt;if(i.U()){var r=i.ct(),s=r.lastValueVisible,a=""!==i.Va(),o=0===r.seriesLastValueMode,l=i.wa(!1);if(!l.Ma){s&&(t.Et=this.Oa(l,s,o),t.U=0!==t.Et.length),(a||o)&&(e.Et=this.Wa(l,s,a,o),e.U=e.Et.length>0);var c=i.Ea(l.et),u=P(c);n.yt=u.yt,n.et=u.kt,n.zt=l.zt,e.Z=i.vt().J(l.zt/i.$().Mt()),t.Z=c}}},e.prototype.Wa=function(t,e,n,i){var r="",s=this.lt.Va();return n&&0!==s.length&&(r+=s+" "),e&&i&&(r+=this.lt.$().cs()?t.za:t.Pa),r.trim()},e.prototype.Oa=function(t,e,n){return e?n?this.lt.$().cs()?t.Pa:t.za:t.Et:""},e}(H),eO=function(){function t(t,e){this.On=t,this.Ra=e||null}return t.prototype.Cs=function(){return this.On},t.prototype.eh=function(){return this.Ra},t.prototype.Mn=function(){return null===this.On?null:{priceRange:this.On.Mn(),margins:this.Ra||void 0}},t.bn=function(e){return null===e?null:new t(tr.bn(e.priceRange),e.margins)},t}(),eL=function(t){function e(e,n){var i=t.call(this,e)||this;return i.Ia=n,i}return a(e,t),e.prototype.Xu=function(t,e){var n=this.Ku;if(n.U=!1,this.qe.U()){var i=this.Ia.ja();if(null!==i){var r=this.Ia.ct();n.U=!0,n.g=i,n.et=r.color,n.wt=e,n.Mt=t,n.rt=r.lineWidth,n.ut=r.lineStyle}}},e}(ev),eA=function(t){function e(e,n){var i=t.call(this)||this;return i.ca=e,i.Ia=n,i}return a(e,t),e.prototype.Jt=function(t,e,n){t.U=!1,e.U=!1;var i=this.Ia.ct(),r=i.axisLabelVisible,s=""!==i.title,a=this.ca;if(r&&a.U()){var o=this.Ia.ja();if(null!==o){s&&(e.Et=i.title,e.U=!0),e.Z=a.vt().J(o/a.$().Mt()),t.Et=a.$().Zs(i.price),t.U=!0;var l=P(i.color);n.yt=l.yt,n.et=l.kt,n.zt=o}}},e}(H),eR=function(){function t(t,e){this.ca=t,this.ki=e,this.qa=new eL(t,this),this.Iu=new eA(t,this),this.Ua=new ef(this.Iu,t,t.vt())}return t.prototype.rs=function(t){f(this.ki,t),this.O(),this.ca.vt().Or()},t.prototype.ct=function(){return this.ki},t.prototype.zi=function(){return[this.qa,this.Ua]},t.prototype.Ha=function(){return this.Iu},t.prototype.O=function(){this.qa.O(),this.Iu.O()},t.prototype.ja=function(){var t=this.ca,e=t.$();if(t.vt().j().ti()||e.ti())return null;var n=t.H();return null===n?null:e.K(this.ki.price,n.X)},t}(),eI=function(t){function e(e){var n=t.call(this)||this;return n.hi=e,n}return a(e,t),e.prototype.vt=function(){return this.hi},e}(X),eD={fu:"",Su:"",xu:""},eP=function(){function t(t){this.ca=t}return t.prototype.cu=function(t,e){var n=this.ca.Ya(),i=this.ca.ct();switch(n){case"Line":return this.Ka(i);case"Area":return this.$a(i);case"Baseline":return this.Xa(i,t,e);case"Bar":return this.Za(i,t,e);case"Candlestick":return this.Ja(i,t,e);case"Histogram":return this.Ga(i,t,e)}throw Error("Unknown chart style")},t.prototype.Za=function(t,e,n){var i=o({},eD),r=t.upColor,s=t.downColor,a=h(this.Qa(e,n)),l=d(a.X[0])<=d(a.X[3]);return i.fu=l?r:s,i.Su=l?r:s,i},t.prototype.Ja=function(t,e,n){var i=o({},eD),r=t.upColor,s=t.downColor,a=t.borderUpColor,l=t.borderDownColor,c=t.wickUpColor,u=t.wickDownColor,f=h(this.Qa(e,n)),p=d(f.X[0])<=d(f.X[3]);return i.fu=p?r:s,i.Su=p?a:l,i.xu=p?c:u,i},t.prototype.$a=function(t){return o(o({},eD),{fu:t.lineColor})},t.prototype.Xa=function(t,e,n){var i=h(this.Qa(e,n)).X[3]>=t.baseValue.price;return o(o({},eD),{fu:i?t.topLineColor:t.bottomLineColor})},t.prototype.Ka=function(t){return o(o({},eD),{fu:t.color})},t.prototype.Ga=function(t,e,n){var i=o({},eD),r=h(this.Qa(e,n));return i.fu=void 0!==r.et?r.et:t.color,i},t.prototype.Qa=function(t,e){return void 0!==e?e.X:this.ca.Hi().io(t)},t}(),eZ=function(){function t(){this.no=[],this.so=new Map,this.ho=new Map}return t.prototype.ro=function(){return this.Je()>0?this.no[this.no.length-1]:null},t.prototype.eo=function(){return this.Je()>0?this.uo(0):null},t.prototype.Ui=function(){return this.Je()>0?this.uo(this.no.length-1):null},t.prototype.Je=function(){return this.no.length},t.prototype.ti=function(){return 0===this.Je()},t.prototype.Eh=function(t){return null!==this.ao(t,0)},t.prototype.io=function(t){return this.oo(t)},t.prototype.oo=function(t,e){void 0===e&&(e=0);var n=this.ao(t,e);return null===n?null:o(o({},this.lo(n)),{Ph:this.uo(n)})},t.prototype.iu=function(){return this.no},t.prototype.fo=function(t,e,n){if(this.ti())return null;for(var i=null,r=0;r<n.length;r++){var s=n[r];i=eF(i,this.co(t,e,s))}return i},t.prototype._=function(t){this.ho.clear(),this.so.clear(),this.no=t},t.prototype.uo=function(t){return this.no[t].Ph},t.prototype.lo=function(t){return this.no[t]},t.prototype.ao=function(t,e){var n=this.vo(t);if(null===n&&0!==e)switch(e){case -1:return this._o(t);case 1:return this.do(t);default:throw TypeError("Unknown search mode")}return n},t.prototype._o=function(t){var e=this.wo(t);return e>0&&(e-=1),e!==this.no.length&&this.uo(e)<t?e:null},t.prototype.do=function(t){var e=this.Mo(t);return e!==this.no.length&&t<this.uo(e)?e:null},t.prototype.vo=function(t){var e=this.wo(t);return e===this.no.length||t<this.no[e].Ph?null:e},t.prototype.wo=function(t){return tO(this.no,t,function(t,e){return t.Ph<e})},t.prototype.Mo=function(t){return tL(this.no,t,function(t,e){return e.Ph>t})},t.prototype.bo=function(t,e,n){for(var i=null,r=t;r<e;r++){var s=this.no[r].X[n];Number.isNaN(s)||(null===i?i={mo:s,po:s}:(s<i.mo&&(i.mo=s),s>i.po&&(i.po=s)))}return i},t.prototype.co=function(t,e,n){if(this.ti())return null;var i=null,r=h(this.eo()),s=h(this.Ui()),a=Math.max(t,r),o=Math.min(e,s),l=30*Math.ceil(a/30),c=Math.max(l,30*Math.floor(o/30)),u=this.wo(a),d=this.Mo(Math.min(o,l,e));i=eF(i,this.bo(u,d,n));var f=this.so.get(n);void 0===f&&(f=new Map,this.so.set(n,f));for(var p=Math.max(l+1,a);p<c;p+=30){var v=Math.floor(p/30),m=f.get(v);if(void 0===m){var g=this.wo(30*v),y=this.Mo(30*(v+1)-1);m=this.bo(g,y,n),f.set(v,m)}i=eF(i,m)}return u=this.wo(c),d=this.Mo(o),eF(i,this.bo(u,d,n))},t}();function eF(t,e){return null===t?e:null===e?t:{mo:Math.min(t.mo,e.mo),po:Math.max(t.po,e.po)}}var e$=function(t){function e(e,n,i){var r=t.call(this,e)||this;r.tt=new eZ,r.qa=new eN(r),r.yo=[],r.ko=new em(r),r.Co=null,r.No=null,r.xo=[],r.So=[],r.Do=null,r.ki=n,r.Ao=i;var s=new eT(r);return r.Mi=[s],r.Ua=new ef(s,r,e),"Area"!==i&&"Line"!==i&&"Baseline"!==i||(r.Co=new ew(r)),r.To(),r.Bo(),r}return a(e,t),e.prototype.en=function(){null!==this.Do&&clearTimeout(this.Do)},e.prototype.Ea=function(t){return this.ki.priceLineColor||t},e.prototype.wa=function(t){var e={Ma:!0},n=this.$();if(this.vt().j().ti()||n.ti()||this.tt.ti())return e;var i,r,s=this.vt().j().mr(),a=this.H();if(null===s||null===a)return e;if(t){var o=this.tt.ro();if(null===o)return e;i=o,r=o.Ph}else{var l=this.tt.oo(s.rh(),-1);if(null===l||null===(i=this.tt.io(l.Ph)))return e;r=l.Ph}var c=i.X[3],u=this.tu().cu(r,{X:i}),h=n.K(c,a.X);return{Ma:!1,D:c,Et:n.ii(c,a.X),za:n.Zs(c),Pa:n.Gs(c,a.X),et:u.fu,zt:h,Ph:r}},e.prototype.tu=function(){return null!==this.No||(this.No=new eP(this)),this.No},e.prototype.ct=function(){return this.ki},e.prototype.rs=function(t){var e=t.priceScaleId;void 0!==e&&e!==this.ki.priceScaleId&&this.vt().Lo(this,e),f(this.ki,t),null!==this.ui&&void 0!==t.scaleMargins&&this.ui.rs({scaleMargins:t.scaleMargins}),void 0!==t.priceFormat&&this.To(),this.vt().Fo(this),this.vt().Eo(),this.Ai.O("options")},e.prototype._=function(t){this.tt._(t),this.Vo(),this.Ai.O("data"),this.Ci.O("data"),null===(e=this.Co)||void 0===e||e.O("data");var e,n=this.vt().qu(this);this.vt().Oo(n),this.vt().Fo(this),this.vt().Eo(),this.vt().Or()},e.prototype.Wo=function(t){this.xo=t.map(function(t){return o({},t)}),this.Vo();var e=this.vt().qu(this);this.Ci.O("data"),this.vt().Oo(e),this.vt().Fo(this),this.vt().Eo(),this.vt().Or()},e.prototype.La=function(){return this.So},e.prototype.zo=function(t){var e=new eR(this,t);return this.yo.push(e),this.vt().Fo(this),e},e.prototype.Po=function(t){var e=this.yo.indexOf(t);-1!==e&&this.yo.splice(e,1),this.vt().Fo(this)},e.prototype.Ya=function(){return this.Ao},e.prototype.H=function(){var t=this.Ro();return null===t?null:{X:t.X[3],Rs:t.S}},e.prototype.Ro=function(){var t=this.vt().j().mr();if(null===t)return null;var e=t.hh();return this.tt.oo(e,1)},e.prototype.Hi=function(){return this.tt},e.prototype.Fa=function(t){var e=this.tt.io(t);return null===e?null:"Bar"===this.Ao||"Candlestick"===this.Ao?{open:e.X[0],high:e.X[1],low:e.X[2],close:e.X[3]}:e.X[3]},e.prototype.Io=function(t){var e=this,n=this.Co;return null!==n&&n.U()?(null===this.Do&&n._a()&&(this.Do=setTimeout(function(){e.Do=null,e.vt().jo()},0)),n.va(),[n]):[]},e.prototype.zi=function(){var t=[];this.qo()||t.push(this.ko);for(var e=0,n=this.yo;e<n.length;e++){var i=n[e];t.push.apply(t,i.zi())}return t.push(this.Ai,this.qa,this.Ua,this.Ci),t},e.prototype.Pi=function(t,e){if(e!==this.ui&&!this.qo())return[];for(var n=l([],this.Mi,!0),i=0,r=this.yo;i<r.length;i++){var s=r[i];n.push(s.Ha())}return n},e.prototype.sh=function(t,e){var n=this;if(void 0!==this.ki.autoscaleInfoProvider){var i=this.ki.autoscaleInfoProvider(function(){var i=n.Uo(t,e);return null===i?null:i.Mn()});return eO.bn(i)}return this.Uo(t,e)},e.prototype.ih=function(){return this.ki.priceFormat.minMove},e.prototype.$s=function(){return this.Zn},e.prototype.Ii=function(){var t;this.Ai.O(),this.Ci.O();for(var e=0,n=this.Mi;e<n.length;e++)n[e].O();for(var i=0,r=this.yo;i<r.length;i++)r[i].O();this.qa.O(),this.ko.O(),null===(t=this.Co)||void 0===t||t.O()},e.prototype.$=function(){return h(t.prototype.$.call(this))},e.prototype.q=function(t){if(!(("Line"===this.Ao||"Area"===this.Ao||"Baseline"===this.Ao)&&this.ki.crosshairMarkerVisible))return null;var e=this.tt.io(t);return null===e?null:{D:e.X[3],C:this.Ho(),Z:this.Yo(),Y:this.Ko(t)}},e.prototype.Va=function(){return this.ki.title},e.prototype.U=function(){return this.ki.visible},e.prototype.qo=function(){return!tG(this.$().hs())},e.prototype.Uo=function(t,e){if(!v(t)||!v(e)||this.tt.ti())return null;var n="Line"===this.Ao||"Area"===this.Ao||"Baseline"===this.Ao||"Histogram"===this.Ao?[3]:[2,1],i=this.tt.fo(t,e,n),r=null!==i?new tr(i.mo,i.po):null;if("Histogram"===this.Ya()){var s=this.ki.base,a=new tr(s,s);r=null!==r?r._n(a):a}return new eO(r,this.Ci.Ba())},e.prototype.Ho=function(){switch(this.Ao){case"Line":case"Area":case"Baseline":return this.ki.crosshairMarkerRadius}return 0},e.prototype.Yo=function(){switch(this.Ao){case"Line":case"Area":case"Baseline":var t=this.ki.crosshairMarkerBorderColor;if(0!==t.length)return t}return null},e.prototype.Ko=function(t){switch(this.Ao){case"Line":case"Area":case"Baseline":var e=this.ki.crosshairMarkerBackgroundColor;if(0!==e.length)return e}return this.tu().cu(t).fu},e.prototype.To=function(){switch(this.ki.priceFormat.type){case"custom":this.Zn={format:this.ki.priceFormat.formatter};break;case"volume":this.Zn=new tK(this.ki.priceFormat.precision);break;case"percent":this.Zn=new tn(this.ki.priceFormat.precision);break;default:var t=Math.pow(10,this.ki.priceFormat.precision);this.Zn=new te(t,this.ki.priceFormat.minMove*t)}null!==this.ui&&this.ui.es()},e.prototype.Vo=function(){var t=this,e=this.vt().j();if(e.ti()||0===this.tt.Je())this.So=[];else{var n=h(this.tt.eo());this.So=this.xo.map(function(i,r){var s=h(e.br(i.time,!0));return{time:h(t.tt.oo(s,s<n?1:-1)).Ph,position:i.position,shape:i.shape,color:i.color,id:i.id,ya:r,text:i.text,size:i.size}})}},e.prototype.Bo=function(){switch(this.Ci=new eS(this,this.vt()),this.Ao){case"Bar":this.Ai=new et(this,this.vt());break;case"Candlestick":this.Ai=new es(this,this.vt());break;case"Line":this.Ai=new ec(this,this.vt());break;case"Area":this.Ai=new t6(this,this.vt());break;case"Baseline":this.Ai=new ei(this,this.vt());break;case"Histogram":this.Ai=new el(this,this.vt());break;default:throw Error("Unknown chart style assigned: "+this.Ao)}},e}(eI),ez=function(){function t(t){this.ki=t}return t.prototype.$o=function(t,e,n){if(0===this.ki.mode)return t;var i=n.xi(),r=i.H();if(null===r)return t;var s=i.K(t,r),a=n.Vs().filter(function(t){return t instanceof e$}).reduce(function(t,i){if(n.Uu(i)||!i.U())return t;var r=i.$(),s=i.Hi();if(r.ti()||!s.Eh(e))return t;var a=s.io(e);if(null===a)return t;var o=d(i.H());return t.concat([r.K(a.X[3],o.X)])},[]);if(0===a.length)return t;a.sort(function(t,e){return Math.abs(t-s)-Math.abs(e-s)});var o=a[0];return i.Si(o,r)},t}(),eB=function(){function t(){this.tt=null}return t.prototype._=function(t){this.tt=t},t.prototype.h=function(t,e,n,r){var s=this;if(null!==this.tt){var a,o=Math.max(1,Math.floor(e));t.lineWidth=o;var l=Math.ceil(this.tt.ht*e),c=Math.ceil(this.tt.st*e);a=function(){var n=h(s.tt);if(n.Xo){t.strokeStyle=n.Zo,i(t,n.Jo),t.beginPath();for(var r=0,a=n.Go;r<a.length;r++){var u=Math.round(a[r].An*e);t.moveTo(u,-o),t.lineTo(u,l+o)}t.stroke()}if(n.Qo){t.strokeStyle=n.tl,i(t,n.il),t.beginPath();for(var d=0,f=n.nl;d<f.length;d++){var p=Math.round(f[d].An*e);t.moveTo(-o,p),t.lineTo(c+o,p)}t.stroke()}},t.save(),t.lineWidth%2&&t.translate(.5,.5),a(),t.restore()}},t}(),eV=function(){function t(t){this.ot=new eB,this.L=!0,this.vi=t}return t.prototype.O=function(){this.L=!0},t.prototype.P=function(t,e){if(this.L){var n=this.vi.vt().ct().grid,i={ht:t,st:e,Qo:n.horzLines.visible,Xo:n.vertLines.visible,tl:n.horzLines.color,Zo:n.vertLines.color,il:n.horzLines.style,Jo:n.vertLines.style,nl:this.vi.xi().Fn(),Go:this.vi.vt().j().Fn()||[]};this.ot._(i),this.L=!1}return this.ot},t}(),eU=function(){function t(t){this.Ai=new eV(t)}return t.prototype.sl=function(){return this.Ai},t}(),eq=function(){function t(t,e){this.Hn=[],this.hl=new Map,this.En=0,this.$h=0,this.rl=1e3,this.Yn=null,this.el=new ti,this.ul=t,this.hi=e,this.al=new eU(this);var n=e.ct();this.ol=this.ll("left",n.leftPriceScale),this.fl=this.ll("right",n.rightPriceScale),this.ol.bs().Ji(this.cl.bind(this,this.ol),this),this.fl.bs().Ji(this.cl.bind(this,this.ol),this),this.vl(n)}return t.prototype.vl=function(t){if(t.leftPriceScale&&this.ol.rs(t.leftPriceScale),t.rightPriceScale&&this.fl.rs(t.rightPriceScale),t.localization&&(this.ol.es(),this.fl.es()),t.overlayPriceScales)for(var e=0,n=Array.from(this.hl.values());e<n.length;e++){var i=h(n[e][0].$());i.rs(t.overlayPriceScales),t.localization&&i.es()}},t.prototype._l=function(t){switch(t){case"left":return this.ol;case"right":return this.fl}return this.hl.has(t)?u(this.hl.get(t))[0].$():null},t.prototype.en=function(){this.vt().dl().sn(this),this.ol.bs().sn(this),this.fl.bs().sn(this),this.Hn.forEach(function(t){t.en&&t.en()}),this.el.hn()},t.prototype.wl=function(){return this.rl},t.prototype.Ml=function(t){this.rl=t},t.prototype.vt=function(){return this.hi},t.prototype.wt=function(){return this.$h},t.prototype.Mt=function(){return this.En},t.prototype.Dr=function(t){this.$h=t,this.bl()},t.prototype.ps=function(t){var e=this;this.En=t,this.ol.ps(t),this.fl.ps(t),this.Hn.forEach(function(n){if(e.Uu(n)){var i=n.$();null!==i&&i.ps(t)}}),this.bl()},t.prototype.Vs=function(){return this.Hn},t.prototype.Uu=function(t){var e=t.$();return null===e||this.ol!==e&&this.fl!==e},t.prototype.Ws=function(t,e,n){var i=void 0!==n?n:this.pl().ml+1;this.gl(t,e,i)},t.prototype.Ps=function(t){var e=this.Hn.indexOf(t);c(-1!==e,"removeDataSource: invalid data source"),this.Hn.splice(e,1);var n=h(t.$()).hs();if(this.hl.has(n)){var i=u(this.hl.get(n)),r=i.indexOf(t);-1!==r&&(i.splice(r,1),0===i.length&&this.hl.delete(n))}var s=t.$();s&&s.Vs().indexOf(t)>=0&&s.Ps(t),null!==s&&(s.zs(),this.yl(s)),this.Yn=null},t.prototype.Hu=function(t){return t===this.ol?"left":t===this.fl?"right":"overlay"},t.prototype.kl=function(){return this.ol},t.prototype.Cl=function(){return this.fl},t.prototype.Nl=function(t,e){t.js(e)},t.prototype.xl=function(t,e){t.qs(e),this.bl()},t.prototype.Sl=function(t){t.Us()},t.prototype.Dl=function(t,e){t.Hs(e)},t.prototype.Al=function(t,e){t.Ys(e),this.bl()},t.prototype.Tl=function(t){t.Ks()},t.prototype.bl=function(){this.Hn.forEach(function(t){t.Ii()})},t.prototype.xi=function(){var t=null;return this.hi.ct().rightPriceScale.visible&&0!==this.fl.Vs().length?t=this.fl:this.hi.ct().leftPriceScale.visible&&0!==this.ol.Vs().length?t=this.ol:0!==this.Hn.length&&(t=this.Hn[0].$()),null===t&&(t=this.fl),t},t.prototype.yl=function(t){null!==t&&t.fs()&&this.Bl(t)},t.prototype.Ll=function(t){var e=this.ul.mr();t.us({_s:!0}),null!==e&&t.th(e),this.bl()},t.prototype.Fl=function(){this.Bl(this.ol),this.Bl(this.fl)},t.prototype.El=function(){var t=this;this.yl(this.ol),this.yl(this.fl),this.Hn.forEach(function(e){t.Uu(e)&&t.yl(e.$())}),this.bl(),this.hi.Or()},t.prototype.Os=function(){return null===this.Yn&&(this.Yn=ty(this.Hn)),this.Yn},t.prototype.Vl=function(){return this.el},t.prototype.Ol=function(){return this.al},t.prototype.Bl=function(t){var e=t.Qs();if(e&&e.length>0&&!this.ul.ti()){var n=this.ul.mr();null!==n&&t.th(n)}t.Ii()},t.prototype.pl=function(){var t=this.Os();if(0===t.length)return{Wl:0,ml:0};for(var e=0,n=0,i=0;i<t.length;i++){var r=t[i].oi();null!==r&&(r<e&&(e=r),r>n&&(n=r))}return{Wl:e,ml:n}},t.prototype.gl=function(t,e,n){var i=this._l(e);if(null===i&&(i=this.ll(e,this.hi.ct().overlayPriceScales)),this.Hn.push(t),!tG(e)){var r=this.hl.get(e)||[];r.push(t),this.hl.set(e,r)}i.Ws(t),t.fi(i),t.li(n),this.yl(i),this.Yn=null},t.prototype.cl=function(t,e,n){e.os!==n.os&&this.Bl(t)},t.prototype.ll=function(t,e){var n=new tC(t,o({visible:!0,autoScale:!0},y(e)),this.hi.ct().layout,this.hi.ct().localization);return n.ps(this.Mt()),n},t}(),eW=function(t){function e(e){var n=t.call(this)||this;return n.zl=new Map,n.tt=e,n}return a(e,t),e.prototype.u=function(t){},e.prototype.l=function(t){if(this.tt.U){t.save();for(var e=0,n=0,i=this.tt.Pl;n<i.length;n++)if(0!==(l=i[n]).Et.length){t.font=l.Nt;var r=this.Rl(t,l.Et);r>this.tt.wt?l.Ur=this.tt.wt/r:l.Ur=1,e+=l.Il*l.Ur}var s=0;switch(this.tt.jl){case"top":s=0;break;case"center":s=Math.max((this.tt.Mt-e)/2,0);break;case"bottom":s=Math.max(this.tt.Mt-e,0)}t.fillStyle=this.tt.et;for(var a=0,o=this.tt.Pl;a<o.length;a++){var l=o[a];t.save();var c=0;switch(this.tt.ql){case"left":t.textAlign="left",c=l.Il/2;break;case"center":t.textAlign="center",c=this.tt.wt/2;break;case"right":t.textAlign="right",c=this.tt.wt-1-l.Il/2}t.translate(c,s),t.textBaseline="top",t.font=l.Nt,t.scale(l.Ur,l.Ur),t.fillText(l.Et,0,l.Ul),t.restore(),s+=l.Il*l.Ur}t.restore()}},e.prototype.Rl=function(t,e){var n=this.Hl(t.font),i=n.get(e);return void 0===i&&(i=t.measureText(e).width,n.set(e,i)),i},e.prototype.Hl=function(t){var e=this.zl.get(t);return void 0===e&&(e=new Map,this.zl.set(t,e)),e},e}(x),eH=function(){function t(t){this.L=!0,this.at={U:!1,et:"",Mt:0,wt:0,Pl:[],jl:"center",ql:"center"},this.ot=new eW(this.at),this.lt=t}return t.prototype.O=function(){this.L=!0},t.prototype.P=function(t,e){return this.L&&(this.R(t,e),this.L=!1),this.ot},t.prototype.R=function(t,e){var n=this.lt.ct(),i=this.at;i.U=n.visible,i.U&&(i.et=n.color,i.wt=e,i.Mt=t,i.ql=n.horzAlign,i.jl=n.vertAlign,i.Pl=[{Et:n.text,Nt:tW(n.fontSize,n.fontFamily,n.fontStyle),Il:1.2*n.fontSize,Ul:0,Ur:0}])},t}(),eG=function(t){function e(e,n){var i=t.call(this)||this;return i.ki=n,i.Ai=new eH(i),i}return a(e,t),e.prototype.Pi=function(){return[]},e.prototype.zi=function(){return[this.Ai]},e.prototype.ct=function(){return this.ki},e.prototype.Ii=function(){this.Ai.O()},e}(X),eY=function(){function t(t,e){this.Yl=[],this.Kl=[],this.$h=0,this.$l=null,this.Xl=null,this.Zl=new ti,this.Jl=new ti,this.Gl=null,this.Ql=t,this.ki=e,this.tf=new tH(this),this.ul=new tV(this,e.timeScale,this.ki.localization),this.V=new J(this,e.crosshair),this.if=new ez(e.crosshair),this.nf=new eG(this,e.watermark),this.sf(),this.Yl[0].Ml(2e3),this.hf=this.rf(0),this.ef=this.rf(1)}return t.prototype.uf=function(){this.af(new tY(3))},t.prototype.Or=function(){this.af(new tY(2))},t.prototype.jo=function(){this.af(new tY(1))},t.prototype.Fo=function(t){var e=this.lf(t);this.af(e)},t.prototype.ff=function(){return this.Xl},t.prototype.cf=function(t){var e=this.Xl;this.Xl=t,null!==e&&this.Fo(e.vf),null!==t&&this.Fo(t.vf)},t.prototype.ct=function(){return this.ki},t.prototype.rs=function(t){f(this.ki,t),this.Yl.forEach(function(e){return e.vl(t)}),void 0!==t.timeScale&&this.ul.rs(t.timeScale),void 0!==t.localization&&this.ul.cr(t.localization),(t.leftPriceScale||t.rightPriceScale)&&this.Zl.hn(),this.hf=this.rf(0),this.ef=this.rf(1),this.uf()},t.prototype._f=function(t,e){var n=this.df(t);null!==n&&(n.$.rs(e),this.Zl.hn())},t.prototype.df=function(t){for(var e=0,n=this.Yl;e<n.length;e++){var i=n[e],r=i._l(t);if(null!==r)return{ft:i,$:r}}return null},t.prototype.j=function(){return this.ul},t.prototype.wf=function(){return this.Yl},t.prototype.Mf=function(){return this.nf},t.prototype.bf=function(){return this.V},t.prototype.mf=function(){return this.Jl},t.prototype.pf=function(t,e){t.ps(e),this.Vr()},t.prototype.Dr=function(t){this.$h=t,this.ul.Dr(this.$h),this.Yl.forEach(function(e){return e.Dr(t)}),this.Vr()},t.prototype.sf=function(t){var e=new eq(this.ul,this);void 0!==t?this.Yl.splice(t,0,e):this.Yl.push(e);var n=void 0===t?this.Yl.length-1:t,i=new tY(3);return i.be(n,{me:0,_s:!0}),this.af(i),e},t.prototype.Nl=function(t,e,n){t.Nl(e,n)},t.prototype.xl=function(t,e,n){t.xl(e,n),this.Eo(),this.af(this.gf(t,2))},t.prototype.Sl=function(t,e){t.Sl(e),this.af(this.gf(t,2))},t.prototype.Dl=function(t,e,n){e.fs()||t.Dl(e,n)},t.prototype.Al=function(t,e,n){e.fs()||(t.Al(e,n),this.Eo(),this.af(this.gf(t,2)))},t.prototype.Tl=function(t,e){e.fs()||(t.Tl(e),this.af(this.gf(t,2)))},t.prototype.Ll=function(t,e){t.Ll(e),this.af(this.gf(t,2))},t.prototype.yf=function(t){this.ul.js(t)},t.prototype.kf=function(t,e){var n=this.j();n.ti()||0===e||(t=Math.max(1,Math.min(t,n.wt())),n.Ur(t,e),this.Vr())},t.prototype.Cf=function(t){this.Nf(0),this.xf(t),this.Sf()},t.prototype.Df=function(t){this.ul.qs(t),this.Vr()},t.prototype.Af=function(){this.ul.Us(),this.Or()},t.prototype.Nf=function(t){this.$l=t,this.ul.Hs(t)},t.prototype.xf=function(t){var e=!1;return null!==this.$l&&Math.abs(t-this.$l)>20&&(this.$l=null,e=!0),this.ul.Ys(t),this.Vr(),e},t.prototype.Sf=function(){this.ul.Ks(),this.Or(),this.$l=null},t.prototype.W=function(){return this.Kl},t.prototype.Tf=function(t,e,n){this.V.Ti(t,e);var i=NaN,r=this.ul.Fr(t),s=this.ul.mr();null!==s&&(r=Math.min(Math.max(s.hh(),r),s.rh()));var a=n.xi(),o=a.H();null!==o&&(i=a.Si(e,o)),i=this.if.$o(i,r,n),this.V.Ei(r,i,n),this.jo(),this.Jl.hn(this.V.I(),{x:t,y:e})},t.prototype.Bf=function(){this.bf().Oi(),this.jo(),this.Jl.hn(null,null)},t.prototype.Eo=function(){var t=this.V.ft();if(null!==t){var e=this.V.Li(),n=this.V.Fi();this.Tf(e,n,t)}this.V.Ii()},t.prototype.Lf=function(t,e,n){var i=this.ul.ri(0);void 0!==e&&void 0!==n&&this.ul.O(e,n);var r=this.ul.ri(0),s=this.ul.Br(),a=this.ul.mr();if(null!==a&&null!==i&&null!==r){var o=a.Eh(s),l=i.Dh>r.Dh,c=null!==t&&t>s&&!l,u=o&&this.ul.ct().shiftVisibleRangeOnNewBar;if(c&&!u){var h=t-s;this.ul.Mr(this.ul.Pr()-h)}}this.ul.qr(t)},t.prototype.Oo=function(t){null!==t&&t.El()},t.prototype.qu=function(t){var e=this.Yl.find(function(e){return e.Os().includes(t)});return void 0===e?null:e},t.prototype.Vr=function(){this.nf.Ii(),this.Yl.forEach(function(t){return t.El()}),this.Eo()},t.prototype.en=function(){this.Yl.forEach(function(t){return t.en()}),this.Yl.length=0,this.ki.localization.priceFormatter=void 0,this.ki.localization.timeFormatter=void 0},t.prototype.Ff=function(){return this.tf},t.prototype.Yu=function(){return this.tf.ct()},t.prototype.dl=function(){return this.Zl},t.prototype.Ef=function(t,e){var n=this.Yl[0],i=this.Vf(e,t,n);return this.Kl.push(i),1===this.Kl.length?this.uf():this.Or(),i},t.prototype.Of=function(t){var e=this.qu(t),n=this.Kl.indexOf(t);c(-1!==n,"Series not found"),this.Kl.splice(n,1),h(e).Ps(t),t.en&&t.en()},t.prototype.Lo=function(t,e){var n=h(this.qu(t));n.Ps(t);var i=this.df(e);if(null===i){var r=t.oi();n.Ws(t,e,r)}else r=i.ft===n?t.oi():void 0,i.ft.Ws(t,e,r)},t.prototype.Qr=function(){var t=new tY(2);t.ye(),this.af(t)},t.prototype.Wf=function(t){var e=new tY(2);e.Ce(t),this.af(e)},t.prototype.Ne=function(){var t=new tY(2);t.Ne(),this.af(t)},t.prototype.wr=function(t){var e=new tY(2);e.wr(t),this.af(e)},t.prototype.Mr=function(t){var e=new tY(2);e.Mr(t),this.af(e)},t.prototype.zf=function(){return this.ki.rightPriceScale.visible?"right":"left"},t.prototype.Pf=function(){return this.ef},t.prototype.Rf=function(){return this.hf},t.prototype.J=function(t){var e,n,i,r,s,a,o,l,c,u,h,d,f=this.ef,p=this.hf;if(f===p)return f;if(t=Math.max(0,Math.min(100,Math.round(100*t))),null===this.Gl||this.Gl.Ve!==p||this.Gl.Oe!==f)this.Gl={Ve:p,Oe:f,If:new Map};else{var v=this.Gl.If.get(t);if(void 0!==v)return v}var m=(e=t/100,i=(n=D(p))[0],r=n[1],s=n[2],a=n[3],l=(o=D(f))[0],c=o[1],u=o[2],h=o[3],"rgba("+(d=[T(i+e*(l-i)),T(r+e*(c-r)),T(s+e*(u-s)),O(a+e*(h-a))])[0]+", "+d[1]+", "+d[2]+", "+d[3]+")");return this.Gl.If.set(t,m),m},t.prototype.gf=function(t,e){var n=new tY(e);if(null!==t){var i=this.Yl.indexOf(t);n.be(i,{me:e})}return n},t.prototype.lf=function(t,e){return void 0===e&&(e=2),this.gf(this.qu(t),e)},t.prototype.af=function(t){this.Ql&&this.Ql(t),this.Yl.forEach(function(t){return t.Ol().sl().O()})},t.prototype.Vf=function(t,e,n){var i=new e$(this,t,e),r=void 0!==t.priceScaleId?t.priceScaleId:this.zf();return n.Ws(i,r),tG(r)||i.rs(t),i},t.prototype.rf=function(t){var e=this.ki.layout;return"gradient"===e.background.type?0===t?e.background.topColor:e.background.bottomColor:e.background.color},t}(),eK=function(){function t(t,e){this.st=t,this.ht=e}return t.prototype.on=function(t){return this.st===t.st&&this.ht===t.ht},t}();function eQ(t){return t.ownerDocument&&t.ownerDocument.defaultView&&t.ownerDocument.defaultView.devicePixelRatio||1}function eX(t){var e=h(t.getContext("2d"));return e.setTransform(1,0,0,1,0,0),e}function eJ(t,e){var n=t.createElement("canvas"),i=eQ(n);return n.style.width=e.st+"px",n.style.height=e.ht+"px",n.width=e.st*i,n.height=e.ht*i,n}function e0(t,i){var r,s=h(t.ownerDocument).createElement("canvas");t.appendChild(s);var a=(void 0===r&&(r=e),new n(s,r));return a.resizeCanvas({width:i.st,height:i.ht}),a}function e1(t,e,n){var i=(t.jf-e.jf)/(t.S-e.S);return Math.sign(i)*Math.min(Math.abs(i),n)}var e2=function(){function t(t,e,n,i){this.qf=null,this.Uf=null,this.Hf=null,this.Yf=null,this.Kf=null,this.$f=0,this.Xf=0,this.Zf=!1,this.Jf=t,this.Gf=e,this.Qf=n,this.Yi=i}return t.prototype.tc=function(t,e){if(null!==this.qf){if(this.qf.S===e)return void(this.qf.jf=t);if(Math.abs(this.qf.jf-t)<this.Yi)return}this.Yf=this.Hf,this.Hf=this.Uf,this.Uf=this.qf,this.qf={S:e,jf:t}},t.prototype.ia=function(t,e){if(null!==this.qf&&null!==this.Uf&&!(e-this.qf.S>50)){var n=0,i=e1(this.qf,this.Uf,this.Gf),r=(u=this.qf,h=this.Uf,u.jf-h.jf),s=[i],a=[r];if(n+=r,null!==this.Hf){var o=e1(this.Uf,this.Hf,this.Gf);if(Math.sign(o)===Math.sign(i)){var l=(d=this.Uf,f=this.Hf,d.jf-f.jf);if(s.push(o),a.push(l),n+=l,null!==this.Yf){var c=e1(this.Hf,this.Yf,this.Gf);if(Math.sign(c)===Math.sign(i)){var u,h,d,f,p,v,m=(p=this.Hf,v=this.Yf,p.jf-v.jf);s.push(c),a.push(m),n+=m}}}}for(var g,y,b=0,_=0;_<s.length;++_)b+=a[_]/n*s[_];Math.abs(b)<this.Jf||(this.Kf={jf:t,S:e},this.Xf=b,this.$f=(g=Math.abs(b),Math.log(-(1*(y=Math.log(this.Qf))/g))/y))}},t.prototype.ic=function(t){var e=h(this.Kf),n=t-e.S;return e.jf+this.Xf*(Math.pow(this.Qf,n)-1)/Math.log(this.Qf)},t.prototype.nc=function(t){return null===this.Kf||this.sc(t)===this.$f},t.prototype.hc=function(){return this.Zf},t.prototype.rc=function(){this.Zf=!0},t.prototype.sc=function(t){return Math.min(t-h(this.Kf).S,this.$f)},t}(),e3="undefined"!=typeof window,e4=function(){if(!e3)return!1;var t=!!navigator.maxTouchPoints||!!navigator.msMaxTouchPoints||!!e3&&("ontouchstart"in window||!!(window.DocumentTouch&&document instanceof window.DocumentTouch));return"onorientationchange"in window&&t}(),e5=function(){if(!e3)return!1;var t=/Android/i.test(navigator.userAgent),e=/iPhone|iPad|iPod|AppleWebKit.+Mobile/i.test(navigator.userAgent);return t||e}(),e7=function(){function t(t,e,n){this.ec=0,this.uc=null,this.ac=null,this.oc=!1,this.lc=null,this.fc=!1,this.cc=!1,this.vc=null,this._c=null,this.dc=null,this.wc=null,this.Mc=0,this.bc=!1,this.mc=!1,this.gc=!1,this.yc=t,this.kc=e,this.ki=n,this.Cc()}return t.prototype.en=function(){null!==this.vc&&(this.vc(),this.vc=null),null!==this._c&&(this._c(),this._c=null),null!==this.dc&&(this.dc(),this.dc=null),this.Nc(),this.xc()},t.prototype.Sc=function(t){var e=this;this._c&&this._c();var n=this.Dc.bind(this);this._c=function(){e.yc.removeEventListener("mousemove",n)},this.yc.addEventListener("mousemove",n),e9(t)&&this.Dc(t);var i=this.Ac(t);this.Tc(i,this.kc.Bc)},t.prototype.xc=function(){null!==this.uc&&clearTimeout(this.uc),this.ec=0,this.uc=null},t.prototype.Dc=function(t){if(!this.gc||e9(t)){var e=this.Ac(t);this.Tc(e,this.kc.Lc)}},t.prototype.Fc=function(t){if((!("button"in t)||0===t.button)&&null===this.wc){var e=e9(t);if(!this.mc||!e){this.bc=!0;var n=this.Ac(t),i=d(this.lc),r=Math.abs(i.p-n.Ec),s=Math.abs(i.g-n.Vc),a=r+s>5;if(a||!e){if(a&&!this.fc&&e){var o=.5*r,l=s>=o&&!this.ki.Oc,c=o>s&&!this.ki.Wc;l||c||(this.mc=!0)}a&&(this.fc=!0,this.cc=!0,e&&this.Nc()),this.mc||(this.Tc(n,this.kc.zc),e&&nt(t))}}}},t.prototype.Pc=function(t){if(!("button"in t)||0===t.button){var e=this.Ac(t);this.Nc(),this.lc=null,this.gc=!1,this.dc&&(this.dc(),this.dc=null),e9(t)&&this.Rc(t),this.Tc(e,this.kc.Ic),++this.ec,this.uc&&this.ec>1?(this.Tc(e,this.kc.jc),this.xc()):this.cc||this.Tc(e,this.kc.qc),e9(t)&&(nt(t),this.Rc(t),0===t.touches.length&&(this.oc=!1))}},t.prototype.Nc=function(){null!==this.ac&&(clearTimeout(this.ac),this.ac=null)},t.prototype.Uc=function(t){if(!("button"in t)||0===t.button){var e=this.Ac(t);this.cc=!1,this.fc=!1,this.mc=!1,e9(t)&&this.Sc(t),this.lc={p:e.Ec,g:e.Vc},this.dc&&(this.dc(),this.dc=null);var n=this.Fc.bind(this),i=this.Pc.bind(this),r=this.yc.ownerDocument.documentElement;this.dc=function(){r.removeEventListener("touchmove",n),r.removeEventListener("touchend",i),r.removeEventListener("mousemove",n),r.removeEventListener("mouseup",i)},r.addEventListener("touchmove",n,{passive:!1}),r.addEventListener("touchend",i,{passive:!1}),this.Nc(),e9(t)&&1===t.touches.length?this.ac=setTimeout(this.Hc.bind(this,t),240):(r.addEventListener("mousemove",n),r.addEventListener("mouseup",i)),this.gc=!0,this.Tc(e,this.kc.Yc),this.uc||(this.ec=0,this.uc=setTimeout(this.xc.bind(this),500))}},t.prototype.Cc=function(){var t=this;this.yc.addEventListener("mouseenter",this.Sc.bind(this)),this.yc.addEventListener("touchcancel",this.Nc.bind(this));var e=this.yc.ownerDocument,n=function(e){t.kc.Kc&&(e.composed&&t.yc.contains(e.composedPath()[0])||e.target&&t.yc.contains(e.target)||t.kc.Kc())};this.vc=function(){e.removeEventListener("mousedown",n),e.removeEventListener("touchstart",n)},e.addEventListener("mousedown",n),e.addEventListener("touchstart",n,{passive:!0}),this.yc.addEventListener("mouseleave",this.Rc.bind(this)),this.yc.addEventListener("touchstart",this.Uc.bind(this),{passive:!0}),e4||this.yc.addEventListener("mousedown",this.Uc.bind(this)),this.$c(),this.yc.addEventListener("touchmove",function(){},{passive:!1})},t.prototype.$c=function(){var t=this;void 0===this.kc.Xc&&void 0===this.kc.Zc&&void 0===this.kc.Jc||(this.yc.addEventListener("touchstart",function(e){return t.Gc(e.touches)},{passive:!0}),this.yc.addEventListener("touchmove",function(e){if(2===e.touches.length&&null!==t.wc&&void 0!==t.kc.Zc){var n=e8(e.touches[0],e.touches[1])/t.Mc;t.kc.Zc(t.wc,n),nt(e)}},{passive:!1}),this.yc.addEventListener("touchend",function(e){t.Gc(e.touches)}))},t.prototype.Gc=function(t){1===t.length&&(this.bc=!1),2!==t.length||this.bc||this.oc?this.Qc():this.tv(t)},t.prototype.tv=function(t){var e=e6(this.yc);this.wc={p:(t[0].clientX-e.left+(t[1].clientX-e.left))/2,g:(t[0].clientY-e.top+(t[1].clientY-e.top))/2},this.Mc=e8(t[0],t[1]),void 0!==this.kc.Xc&&this.kc.Xc(),this.Nc()},t.prototype.Qc=function(){null!==this.wc&&(this.wc=null,void 0!==this.kc.Jc&&this.kc.Jc())},t.prototype.Rc=function(t){this._c&&this._c();var e=this.Ac(t);this.Tc(e,this.kc.iv)},t.prototype.Hc=function(t){var e=this.Ac(t);this.Tc(e,this.kc.nv),this.cc=!0,this.oc=!0},t.prototype.Tc=function(t,e){e&&e.call(this.kc,t)},t.prototype.Ac=function(t){e="touches"in t&&t.touches.length?t.touches[0]:"changedTouches"in t&&t.changedTouches.length?t.changedTouches[0]:t;var e,n=e6(this.yc);return{sv:e.clientX,hv:e.clientY,Ec:e.pageX,Vc:e.pageY,rv:e.screenX,ev:e.screenY,uv:e.clientX-n.left,av:e.clientY-n.top,ov:t.ctrlKey,lv:t.altKey,fv:t.shiftKey,cv:t.metaKey,ke:t.type.startsWith("mouse")?"mouse":"touch",vv:t.view}},t}();function e6(t){return t.getBoundingClientRect()||{left:0,top:0}}function e8(t,e){var n=t.clientX-e.clientX,i=t.clientY-e.clientY;return Math.sqrt(n*n+i*i)}function e9(t){return!!t.touches}function nt(t){t.cancelable&&t.preventDefault()}var ne=function(){function t(t,e,n,i){this.Pu=new eh(200),this.fe=0,this._v="",this.ma="",this.Vu=[],this.dv=new Map,this.fe=t,this._v=e,this.ma=tW(t,n,i)}return t.prototype.en=function(){this.Pu.Ou(),this.Vu=[],this.dv.clear()},t.prototype.wv=function(t,e,n,i,r){var s=this.Mv(t,e);if("left"!==r){var a=eQ(t.canvas);n-=Math.floor(s.bv*a)}i-=Math.floor(s.Mt/2),t.drawImage(s.mv,n,i,s.wt,s.Mt)},t.prototype.Mv=function(t,e){var n,i=this;if(this.dv.has(e))n=u(this.dv.get(e));else{if(this.Vu.length>=200){var r=u(this.Vu.shift());this.dv.delete(r)}var s=eQ(t.canvas),a=Math.ceil(this.fe/4.5),o=Math.round(this.fe/10),l=Math.ceil(this.Pu.Vt(t,e)),c=to(Math.round(l+2*a)),h=to(this.fe+2*a),d=eJ(document,new eK(c,h));n={Et:e,bv:Math.round(Math.max(1,l)),wt:Math.ceil(c*s),Mt:Math.ceil(h*s),mv:d},0!==l&&(this.Vu.push(n.Et),this.dv.set(n.Et,n)),Z(t=eX(n.mv),s,function(){t.font=i.ma,t.fillStyle=i._v,t.fillText(e,0,h-a-o)})}return n},t}(),nn=function(){function t(t,e,n,i){var r=this;this.Gt=null,this.pv=null,this.gv=null,this.yv=!1,this.kv=new eh(50),this.Cv=new ne(11,"#000"),this._v=null,this.ma=null,this.Nv=0,this.xv=function(){r.Sv(r.tf.ct()),r.vi.Dv().vt().Or()},this.Av=function(){r.vi.Dv().vt().Or()},this.vi=t,this.ki=e,this.tf=n,this.Tv="left"===i,this.Bv=document.createElement("div"),this.Bv.style.height="100%",this.Bv.style.overflow="hidden",this.Bv.style.width="25px",this.Bv.style.left="0",this.Bv.style.position="relative",this.Lv=e0(this.Bv,new eK(16,16)),this.Lv.subscribeCanvasConfigured(this.xv);var s=this.Lv.canvas;s.style.position="absolute",s.style.zIndex="1",s.style.left="0",s.style.top="0",this.Fv=e0(this.Bv,new eK(16,16)),this.Fv.subscribeCanvasConfigured(this.Av);var a=this.Fv.canvas;a.style.position="absolute",a.style.zIndex="2",a.style.left="0",a.style.top="0";var o={Yc:this.Ev.bind(this),zc:this.Vv.bind(this),Kc:this.Ov.bind(this),Ic:this.Wv.bind(this),jc:this.zv.bind(this),Bc:this.Pv.bind(this),iv:this.Rv.bind(this)};this.Iv=new e7(this.Fv.canvas,o,{Oc:!1,Wc:!0})}return t.prototype.en=function(){this.Iv.en(),this.Fv.unsubscribeCanvasConfigured(this.Av),this.Fv.destroy(),this.Lv.unsubscribeCanvasConfigured(this.xv),this.Lv.destroy(),null!==this.Gt&&this.Gt.Is().sn(this),this.Gt=null,null!==this.gv&&(clearTimeout(this.gv),this.gv=null),this.Cv.en()},t.prototype.jv=function(){return this.Bv},t.prototype.N=function(){return h(this.Gt).ct().borderColor},t.prototype.qv=function(){return this.ki.textColor},t.prototype.Wt=function(){return this.ki.fontSize},t.prototype.Uv=function(){return tW(this.Wt(),this.ki.fontFamily)},t.prototype.Hv=function(){var t=this.tf.ct(),e=this._v!==t.et,n=this.ma!==t.Nt;return(e||n)&&(this.Sv(t),this._v=t.et),n&&(this.kv.Ou(),this.ma=t.Nt),t},t.prototype.Yv=function(){if(null===this.Gt)return 0;var t=34,e=this.Hv(),n=eX(this.Lv.canvas),i=this.Gt.Fn();n.font=this.Uv(),i.length>0&&(t=Math.max(this.kv.Vt(n,i[0].Tn),this.kv.Vt(n,i[i.length-1].Tn)));for(var r=this.Kv(),s=r.length;s--;){var a=this.kv.Vt(n,r[s].Et());a>t&&(t=a)}var o=this.Gt.H();if(null!==o&&null!==this.pv){var l=this.Gt.Si(1,o),c=this.Gt.Si(this.pv.ht-2,o);t=Math.max(t,this.kv.Vt(n,this.Gt.ii(Math.floor(Math.min(l,c))+.11111111111111,o)),this.kv.Vt(n,this.Gt.ii(Math.ceil(Math.max(l,c))-.11111111111111,o)))}var u=Math.ceil(e.At+e.Dt+e.Lt+e.Ft+t);return u+u%2},t.prototype.$v=function(t){if(t.st<0||t.ht<0)throw Error("Try to set invalid size to PriceAxisWidget "+JSON.stringify(t));null!==this.pv&&this.pv.on(t)||(this.pv=t,this.Lv.resizeCanvas({width:t.st,height:t.ht}),this.Fv.resizeCanvas({width:t.st,height:t.ht}),this.Bv.style.width=t.st+"px",this.Bv.style.height=t.ht+"px",this.Bv.style.minWidth=t.st+"px")},t.prototype.Xv=function(){return h(this.pv).st},t.prototype.fi=function(t){this.Gt!==t&&(null!==this.Gt&&this.Gt.Is().sn(this),this.Gt=t,t.Is().Ji(this.qn.bind(this),this))},t.prototype.$=function(){return this.Gt},t.prototype.Ou=function(){var t=this.vi.Zv();this.vi.Dv().vt().Ll(t,h(this.$()))},t.prototype.Jv=function(t){if(null!==this.pv){if(1!==t){var e=eX(this.Lv.canvas);this.Gv(),this.Qv(e,this.Lv.pixelRatio),this.yu(e,this.Lv.pixelRatio),this.t_(e,this.Lv.pixelRatio),this.i_(e,this.Lv.pixelRatio)}var n=eX(this.Fv.canvas),i=this.pv.st,r=this.pv.ht;Z(n,this.Fv.pixelRatio,function(){n.clearRect(0,0,i,r)}),this.n_(n,this.Fv.pixelRatio)}},t.prototype.s_=function(){return this.Lv.canvas},t.prototype.Ev=function(t){if(null!==this.Gt&&!this.Gt.ti()&&this.vi.Dv().ct().handleScale.axisPressedMouseMove.price){var e=this.vi.Dv().vt(),n=this.vi.Zv();this.yv=!0,e.Nl(n,this.Gt,t.av)}},t.prototype.Vv=function(t){if(null!==this.Gt&&this.vi.Dv().ct().handleScale.axisPressedMouseMove.price){var e=this.vi.Dv().vt(),n=this.vi.Zv(),i=this.Gt;e.xl(n,i,t.av)}},t.prototype.Ov=function(){if(null!==this.Gt&&this.vi.Dv().ct().handleScale.axisPressedMouseMove.price){var t=this.vi.Dv().vt(),e=this.vi.Zv(),n=this.Gt;this.yv&&(this.yv=!1,t.Sl(e,n))}},t.prototype.Wv=function(t){if(null!==this.Gt&&this.vi.Dv().ct().handleScale.axisPressedMouseMove.price){var e=this.vi.Dv().vt(),n=this.vi.Zv();this.yv=!1,e.Sl(n,this.Gt)}},t.prototype.zv=function(t){this.vi.Dv().ct().handleScale.axisDoubleClickReset&&this.Ou()},t.prototype.Pv=function(t){null!==this.Gt&&(!this.vi.Dv().vt().ct().handleScale.axisPressedMouseMove.price||this.Gt.cs()||this.Gt.vs()||this.h_(1))},t.prototype.Rv=function(t){this.h_(0)},t.prototype.Kv=function(){var t=this,e=[],n=null===this.Gt?void 0:this.Gt;return function(i){for(var r=0;r<i.length;++r)for(var s=i[r].Pi(t.vi.Zv(),n),a=0;a<s.length;a++)e.push(s[a])}(this.vi.Zv().Os()),e},t.prototype.Qv=function(t,e){var n=this;if(null!==this.pv){var i=this.pv.st,r=this.pv.ht;Z(t,e,function(){var e=n.vi.Zv().vt(),s=e.Rf(),a=e.Pf();s===a?F(t,0,0,i,r,s):$(t,0,0,i,r,s,a)})}},t.prototype.yu=function(t,e){if(null!==this.pv&&null!==this.Gt&&this.Gt.ct().borderVisible){t.save(),t.fillStyle=this.N();var n,i=Math.max(1,Math.floor(this.Hv().At*e));n=this.Tv?Math.floor(this.pv.st*e)-i:0,t.fillRect(n,0,i,Math.ceil(this.pv.ht*e)),t.restore()}},t.prototype.t_=function(t,e){if(null!==this.pv&&null!==this.Gt){var n=this.Gt.Fn();t.save(),t.strokeStyle=this.N(),t.font=this.Uv(),t.fillStyle=this.N();var i=this.Hv(),r=this.Gt.ct().borderVisible&&this.Gt.ct().drawTicks,s=this.Tv?Math.floor((this.pv.st-i.Dt)*e-i.At*e):Math.floor(i.At*e),a=this.Tv?Math.round(s-i.Lt*e):Math.round(s+i.Dt*e+i.Lt*e),o=this.Tv?"right":"left",l=Math.max(1,Math.floor(e)),c=Math.floor(.5*e);if(r){var u=Math.round(i.Dt*e);t.beginPath();for(var h=0;h<n.length;h++){var d=n[h];t.rect(s,Math.round(d.An*e)-c,u,l)}t.fill()}t.fillStyle=this.qv();for(var f=0;f<n.length;f++)d=n[f],this.Cv.wv(t,d.Tn,a,Math.round(d.An*e),o);t.restore()}},t.prototype.Gv=function(){if(null!==this.pv&&null!==this.Gt){var t=this.pv.ht/2,e=[],n=this.Gt.Os().slice(),i=this.vi.Zv(),r=this.Hv();this.Gt===i.xi()&&this.vi.Zv().Os().forEach(function(t){i.Uu(t)&&n.push(t)});var s=this.Gt.Vs()[0],a=this.Gt;n.forEach(function(n){var r=n.Pi(i,a);r.forEach(function(t){t.Kt(null),t.$t()&&e.push(t)}),s===n&&r.length>0&&(t=r[0].zt())});var o=e.filter(function(e){return e.zt()<=t}),l=e.filter(function(e){return e.zt()>t});if(o.sort(function(t,e){return e.zt()-t.zt()}),o.length&&l.length&&l.push(o[0]),l.sort(function(t,e){return t.zt()-e.zt()}),e.forEach(function(t){return t.Kt(t.zt())}),this.Gt.ct().alignLabels){for(var c,u,h=1;h<o.length;h++){var d=o[h],f=(c=o[h-1]).Mt(r,!1);d.zt()>(u=c.Yt())-f&&d.Kt(u-f)}for(var p=1;p<l.length;p++)d=l[p],f=(c=l[p-1]).Mt(r,!0),d.zt()<(u=c.Yt())+f&&d.Kt(u+f)}}},t.prototype.i_=function(t,e){var n=this;if(null!==this.pv){t.save();var i=this.pv,r=this.Kv(),s=this.Hv(),a=this.Tv?"right":"left";r.forEach(function(r){if(r.Xt()){var o=r.P(h(n.Gt));t.save(),o.h(t,s,n.kv,i.st,a,e),t.restore()}}),t.restore()}},t.prototype.n_=function(t,e){var n=this;if(null!==this.pv&&null!==this.Gt){t.save();var i=this.pv,r=this.vi.Dv().vt(),s=[],a=this.vi.Zv(),o=r.bf().Pi(a,this.Gt);o.length&&s.push(o);var l=this.Hv(),c=this.Tv?"right":"left";s.forEach(function(r){r.forEach(function(r){t.save(),r.P(h(n.Gt)).h(t,l,n.kv,i.st,c,e),t.restore()})}),t.restore()}},t.prototype.h_=function(t){this.Bv.style.cursor=1===t?"ns-resize":"default"},t.prototype.qn=function(){var t=this,e=this.Yv();if(this.Nv<e){var n=this.vi.Dv();null===this.gv&&(this.gv=setTimeout(function(){n&&n.vt().uf(),t.gv=null},100))}this.Nv=e},t.prototype.Sv=function(t){this.Cv.en(),this.Cv=new ne(t.Wt,t.et,t.le)},t}();function ni(t,e,n,i,r){t.o&&t.o(e,n,i,r)}function nr(t,e,n,i,r){t.h(e,n,i,r)}function ns(t,e){return t.zi(e)}function na(t,e){return void 0!==t.Io?t.Io(e):[]}var no=function(){function t(t,e){var n=this;this.pv=new eK(0,0),this.r_=null,this.e_=null,this.u_=null,this.a_=!1,this.o_=new ti,this.l_=0,this.f_=!1,this.c_=null,this.v_=!1,this.__=null,this.d_=null,this.xv=function(){return n.w_&&n.hi().Or()},this.Av=function(){return n.w_&&n.hi().Or()},this.M_=t,this.w_=e,this.w_.Vl().Ji(this.b_.bind(this),this,!0),this.m_=document.createElement("td"),this.m_.style.padding="0",this.m_.style.position="relative";var i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.position="relative",i.style.overflow="hidden",this.p_=document.createElement("td"),this.p_.style.padding="0",this.g_=document.createElement("td"),this.g_.style.padding="0",this.m_.appendChild(i),this.Lv=e0(i,new eK(16,16)),this.Lv.subscribeCanvasConfigured(this.xv);var r=this.Lv.canvas;r.style.position="absolute",r.style.zIndex="1",r.style.left="0",r.style.top="0",this.Fv=e0(i,new eK(16,16)),this.Fv.subscribeCanvasConfigured(this.Av);var s=this.Fv.canvas;s.style.position="absolute",s.style.zIndex="2",s.style.left="0",s.style.top="0",this.y_=document.createElement("tr"),this.y_.appendChild(this.p_),this.y_.appendChild(this.m_),this.y_.appendChild(this.g_),this.k_();var a=this.Dv().ct().handleScroll;this.Iv=new e7(this.Fv.canvas,this,{Oc:!a.vertTouchDrag,Wc:!a.horzTouchDrag})}return t.prototype.en=function(){null!==this.r_&&this.r_.en(),null!==this.e_&&this.e_.en(),this.Fv.unsubscribeCanvasConfigured(this.Av),this.Fv.destroy(),this.Lv.unsubscribeCanvasConfigured(this.xv),this.Lv.destroy(),null!==this.w_&&this.w_.Vl().sn(this),this.Iv.en()},t.prototype.Zv=function(){return h(this.w_)},t.prototype.C_=function(e){null!==this.w_&&this.w_.Vl().sn(this),this.w_=e,null!==this.w_&&this.w_.Vl().Ji(t.prototype.b_.bind(this),this,!0),this.k_()},t.prototype.Dv=function(){return this.M_},t.prototype.jv=function(){return this.y_},t.prototype.k_=function(){if(null!==this.w_&&(this.N_(),0!==this.hi().W().length)){if(null!==this.r_){var t=this.w_.kl();this.r_.fi(h(t))}if(null!==this.e_){var e=this.w_.Cl();this.e_.fi(h(e))}}},t.prototype.wl=function(){return null!==this.w_?this.w_.wl():0},t.prototype.Ml=function(t){this.w_&&this.w_.Ml(t)},t.prototype.Bc=function(t){if(this.w_){var e=t.uv,n=t.av;e4||this.x_(e,n)}},t.prototype.Yc=function(t){if(this.f_=!1,this.v_=null!==this.c_,this.w_){if(this.S_(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)h(document.activeElement).blur();else{var e=document.getSelection();null!==e&&e.removeAllRanges()}var n=this.hi();if(!this.w_.xi().ti()&&!n.j().ti()){if(null!==this.c_){var i=n.bf();this.__={x:i.bt(),y:i.gt()},this.c_={x:t.uv,y:t.av}}e4||this.x_(t.uv,t.av)}}},t.prototype.Lc=function(t){if(this.w_){var e=t.uv,n=t.av;if(this.D_()&&this.A_(),!e4){this.x_(e,n);var i=this.pa(e,n);this.hi().cf(i&&{vf:i.vf,T_:i.T_})}}},t.prototype.qc=function(t){if(null!==this.w_){var e=t.uv,n=t.av;if(this.o_.rn()){var i=this.hi().bf().I();this.o_.hn(i,{x:e,y:n})}this.B_()}},t.prototype.zc=function(t){if(null!==this.w_){var e=this.hi(),n=t.uv,i=t.av;if(null!==this.c_){this.v_=!1;var r=h(this.__),s=r.x+(n-this.c_.x),a=r.y+(i-this.c_.y);this.x_(s,a)}else this.D_()||this.x_(n,i);if(!e.j().ti()){var o=this.M_.ct(),l=o.handleScroll,c=o.kineticScroll;if(l.pressedMouseMove&&"touch"!==t.ke||(l.horzTouchDrag||l.vertTouchDrag)&&"mouse"!==t.ke){var u=this.w_.xi(),d=performance.now();null!==this.u_||this.L_()||(this.u_={x:t.sv,y:t.hv,Dh:d,uv:t.uv,av:t.av}),null!==this.d_&&this.d_.tc(t.uv,d),null===this.u_||this.a_||this.u_.x===t.sv&&this.u_.y===t.hv||(null===this.d_&&("touch"===t.ke&&c.touch||"mouse"===t.ke&&c.mouse)&&(this.d_=new e2(.2,7,.997,15),this.d_.tc(this.u_.uv,this.u_.Dh),this.d_.tc(t.uv,d)),u.ti()||e.Dl(this.w_,u,t.av),e.Nf(t.uv),this.a_=!0),this.a_&&(u.ti()||e.Al(this.w_,u,t.av),e.xf(t.uv))}}}},t.prototype.Ic=function(t){null!==this.w_&&(this.f_=!1,this.F_(t))},t.prototype.nv=function(t){if(this.f_=!0,null===this.c_&&e5){var e={x:t.uv,y:t.av};this.E_(e,e)}},t.prototype.iv=function(t){null!==this.w_&&(this.w_.vt().cf(null),e5||this.A_())},t.prototype.V_=function(){return this.o_},t.prototype.Xc=function(){this.l_=1,this.S_()},t.prototype.Zc=function(t,e){if(this.M_.ct().handleScale.pinch){var n=5*(e-this.l_);this.l_=e,this.hi().kf(t.p,n)}},t.prototype.pa=function(t,e){var n=this.w_;if(null===n)return null;for(var i=0,r=n.Os();i<r.length;i++){var s=r[i],a=this.O_(s.zi(n),t,e);if(null!==a)return{vf:s,vv:a.vv,T_:a.T_}}return null},t.prototype.W_=function(t,e){h("left"===e?this.r_:this.e_).$v(new eK(t,this.pv.ht))},t.prototype.z_=function(){return this.pv},t.prototype.$v=function(t){if(t.st<0||t.ht<0)throw Error("Try to set invalid size to PaneWidget "+JSON.stringify(t));this.pv.on(t)||(this.pv=t,this.Lv.resizeCanvas({width:t.st,height:t.ht}),this.Fv.resizeCanvas({width:t.st,height:t.ht}),this.m_.style.width=t.st+"px",this.m_.style.height=t.ht+"px")},t.prototype.P_=function(){var t=h(this.w_);t.yl(t.kl()),t.yl(t.Cl());for(var e=0,n=t.Vs();e<n.length;e++){var i=n[e];if(t.Uu(i)){var r=i.$();null!==r&&t.yl(r),i.Ii()}}},t.prototype.s_=function(){return this.Lv.canvas},t.prototype.Jv=function(t){if(0!==t&&null!==this.w_){if(t>1&&this.P_(),null!==this.r_&&this.r_.Jv(t),null!==this.e_&&this.e_.Jv(t),1!==t){var e=eX(this.Lv.canvas);e.save(),this.Qv(e,this.Lv.pixelRatio),this.w_&&(this.R_(e,this.Lv.pixelRatio),this.I_(e,this.Lv.pixelRatio),this.j_(e,this.Lv.pixelRatio,ns)),e.restore()}var n=eX(this.Fv.canvas);n.clearRect(0,0,Math.ceil(this.pv.st*this.Fv.pixelRatio),Math.ceil(this.pv.ht*this.Fv.pixelRatio)),this.j_(n,this.Lv.pixelRatio,na),this.q_(n,this.Fv.pixelRatio)}},t.prototype.U_=function(){return this.r_},t.prototype.H_=function(){return this.e_},t.prototype.b_=function(){null!==this.w_&&this.w_.Vl().sn(this),this.w_=null},t.prototype.Qv=function(t,e){var n=this;Z(t,e,function(){var e=n.hi(),i=e.Rf(),r=e.Pf();i===r?F(t,0,0,n.pv.st,n.pv.ht,r):$(t,0,0,n.pv.st,n.pv.ht,i,r)})},t.prototype.R_=function(t,e){var n=h(this.w_),i=n.Ol().sl().P(n.Mt(),n.wt());null!==i&&(t.save(),i.h(t,e,!1),t.restore())},t.prototype.I_=function(t,e){var n=this.hi().Mf();this.Y_(t,e,ns,ni,n),this.Y_(t,e,ns,nr,n)},t.prototype.q_=function(t,e){this.Y_(t,e,ns,nr,this.hi().bf())},t.prototype.j_=function(t,e,n){for(var i=h(this.w_).Os(),r=0;r<i.length;r++){var s=i[r];this.Y_(t,e,n,ni,s)}for(var a=0;a<i.length;a++)s=i[a],this.Y_(t,e,n,nr,s)},t.prototype.Y_=function(t,e,n,i,r){for(var s=h(this.w_),a=n(r,s),o=s.Mt(),l=s.wt(),c=s.vt().ff(),u=null!==c&&c.vf===r,d=null!==c&&u&&void 0!==c.T_?c.T_.ga:void 0,f=0;f<a.length;f++){var p=a[f].P(o,l);null!==p&&(t.save(),i(p,t,e,u,d),t.restore())}},t.prototype.O_=function(t,e,n){for(var i=0;i<t.length;i++){var r=t[i],s=r.P(this.pv.ht,this.pv.st);if(null!==s&&s.pa){var a=s.pa(e,n);if(null!==a)return{vv:r,T_:a}}}return null},t.prototype.N_=function(){if(null!==this.w_){var t=this.M_,e=this.w_.kl().ct().visible,n=this.w_.Cl().ct().visible;e||null===this.r_||(this.p_.removeChild(this.r_.jv()),this.r_.en(),this.r_=null),n||null===this.e_||(this.g_.removeChild(this.e_.jv()),this.e_.en(),this.e_=null);var i=t.vt().Ff();e&&null===this.r_&&(this.r_=new nn(this,t.ct().layout,i,"left"),this.p_.appendChild(this.r_.jv())),n&&null===this.e_&&(this.e_=new nn(this,t.ct().layout,i,"right"),this.g_.appendChild(this.e_.jv()))}},t.prototype.D_=function(){return e5&&null===this.c_},t.prototype.L_=function(){return e5&&this.f_||null!==this.c_},t.prototype.K_=function(t){return Math.max(0,Math.min(t,this.pv.st-1))},t.prototype.X_=function(t){return Math.max(0,Math.min(t,this.pv.ht-1))},t.prototype.x_=function(t,e){this.hi().Tf(this.K_(t),this.X_(e),h(this.w_))},t.prototype.A_=function(){this.hi().Bf()},t.prototype.B_=function(){this.v_&&(this.c_=null,this.A_())},t.prototype.E_=function(t,e){this.c_=t,this.v_=!1,this.x_(e.x,e.y);var n=this.hi().bf();this.__={x:n.bt(),y:n.gt()}},t.prototype.hi=function(){return this.M_.vt()},t.prototype.Z_=function(){var t=this.hi(),e=this.Zv(),n=e.xi();t.Tl(e,n),t.Sf(),this.u_=null,this.a_=!1},t.prototype.F_=function(t){var e=this;if(this.a_){var n=performance.now();if(null!==this.d_&&this.d_.ia(t.uv,n),null===this.d_||this.d_.nc(n))this.Z_();else{var i=this.hi(),r=i.j(),s=this.d_,a=function(){if(!s.hc()){var t=performance.now(),n=s.nc(t);if(!s.hc()){var o=r.Pr();i.xf(s.ic(t)),o===r.Pr()&&(n=!0,e.d_=null)}n?e.Z_():requestAnimationFrame(a)}};requestAnimationFrame(a)}}},t.prototype.S_=function(){var t=performance.now(),e=null===this.d_||this.d_.nc(t);null!==this.d_&&(e||this.Z_()),null!==this.d_&&(this.d_.rc(),this.d_=null)},t}(),nl=function(){function t(t,e,n,i,r){var s=this;this.L=!0,this.pv=new eK(0,0),this.xv=function(){return s.Jv(3)},this.Tv="left"===t,this.tf=n.Ff,this.ki=e,this.J_=i,this.G_=r,this.Bv=document.createElement("div"),this.Bv.style.width="25px",this.Bv.style.height="100%",this.Bv.style.overflow="hidden",this.Lv=e0(this.Bv,new eK(16,16)),this.Lv.subscribeCanvasConfigured(this.xv)}return t.prototype.en=function(){this.Lv.unsubscribeCanvasConfigured(this.xv),this.Lv.destroy()},t.prototype.jv=function(){return this.Bv},t.prototype.z_=function(){return this.pv},t.prototype.$v=function(t){if(t.st<0||t.ht<0)throw Error("Try to set invalid size to PriceAxisStub "+JSON.stringify(t));this.pv.on(t)||(this.pv=t,this.Lv.resizeCanvas({width:t.st,height:t.ht}),this.Bv.style.width=t.st+"px",this.Bv.style.minWidth=t.st+"px",this.Bv.style.height=t.ht+"px",this.L=!0)},t.prototype.Jv=function(t){if((!(t<3)||this.L)&&0!==this.pv.st&&0!==this.pv.ht){this.L=!1;var e=eX(this.Lv.canvas);this.Qv(e,this.Lv.pixelRatio),this.yu(e,this.Lv.pixelRatio)}},t.prototype.s_=function(){return this.Lv.canvas},t.prototype.yu=function(t,e){if(this.J_()){var n=this.pv.st;t.save(),t.fillStyle=this.ki.timeScale.borderColor;var i=Math.floor(this.tf.ct().At*e),r=this.Tv?Math.round(n*e)-i:0;t.fillRect(r,0,i,i),t.restore()}},t.prototype.Qv=function(t,e){var n=this;Z(t,e,function(){F(t,0,0,n.pv.st,n.pv.ht,n.G_())})},t}();function nc(t,e){return t.Rh>e.Rh?t:e}var nu=function(){function t(t){var e=this;this.Q_=null,this.td=null,this.oe=null,this.nd=!1,this.pv=new eK(0,0),this.sd=new ti,this.kv=new eh(5),this.xv=function(){return e.M_.vt().Or()},this.Av=function(){return e.M_.vt().Or()},this.M_=t,this.ki=t.ct().layout,this.hd=document.createElement("tr"),this.rd=document.createElement("td"),this.rd.style.padding="0",this.ed=document.createElement("td"),this.ed.style.padding="0",this.Bv=document.createElement("td"),this.Bv.style.height="25px",this.Bv.style.padding="0",this.ud=document.createElement("div"),this.ud.style.width="100%",this.ud.style.height="100%",this.ud.style.position="relative",this.ud.style.overflow="hidden",this.Bv.appendChild(this.ud),this.Lv=e0(this.ud,new eK(16,16)),this.Lv.subscribeCanvasConfigured(this.xv);var n=this.Lv.canvas;n.style.position="absolute",n.style.zIndex="1",n.style.left="0",n.style.top="0",this.Fv=e0(this.ud,new eK(16,16)),this.Fv.subscribeCanvasConfigured(this.Av);var i=this.Fv.canvas;i.style.position="absolute",i.style.zIndex="2",i.style.left="0",i.style.top="0",this.hd.appendChild(this.rd),this.hd.appendChild(this.Bv),this.hd.appendChild(this.ed),this.ad(),this.M_.vt().dl().Ji(this.ad.bind(this),this),this.Iv=new e7(this.Fv.canvas,this,{Oc:!0,Wc:!1})}return t.prototype.en=function(){this.Iv.en(),null!==this.Q_&&this.Q_.en(),null!==this.td&&this.td.en(),this.Fv.unsubscribeCanvasConfigured(this.Av),this.Fv.destroy(),this.Lv.unsubscribeCanvasConfigured(this.xv),this.Lv.destroy()},t.prototype.jv=function(){return this.hd},t.prototype.od=function(){return this.Q_},t.prototype.ld=function(){return this.td},t.prototype.Yc=function(t){if(!this.nd){this.nd=!0;var e=this.M_.vt();!e.j().ti()&&this.M_.ct().handleScale.axisPressedMouseMove.time&&e.yf(t.uv)}},t.prototype.Kc=function(){var t=this.M_.vt();!t.j().ti()&&this.nd&&(this.nd=!1,this.M_.ct().handleScale.axisPressedMouseMove.time&&t.Af())},t.prototype.zc=function(t){var e=this.M_.vt();!e.j().ti()&&this.M_.ct().handleScale.axisPressedMouseMove.time&&e.Df(t.uv)},t.prototype.Ic=function(t){this.nd=!1;var e=this.M_.vt();e.j().ti()&&!this.M_.ct().handleScale.axisPressedMouseMove.time||e.Af()},t.prototype.jc=function(){this.M_.ct().handleScale.axisDoubleClickReset&&this.M_.vt().Ne()},t.prototype.Bc=function(t){this.M_.vt().ct().handleScale.axisPressedMouseMove.time&&this.h_(1)},t.prototype.iv=function(t){this.h_(0)},t.prototype.z_=function(){return this.pv},t.prototype.fd=function(){return this.sd},t.prototype.vd=function(t,e,n){this.pv&&this.pv.on(t)||(this.pv=t,this.Lv.resizeCanvas({width:t.st,height:t.ht}),this.Fv.resizeCanvas({width:t.st,height:t.ht}),this.Bv.style.width=t.st+"px",this.Bv.style.height=t.ht+"px",this.sd.hn(t)),null!==this.Q_&&this.Q_.$v(new eK(e,t.ht)),null!==this.td&&this.td.$v(new eK(n,t.ht))},t.prototype._d=function(){var t=this.dd();return Math.ceil(t.At+t.Dt+t.Wt+t.Tt+t.Bt)},t.prototype.O=function(){this.M_.vt().j().Fn()},t.prototype.s_=function(){return this.Lv.canvas},t.prototype.Jv=function(t){if(0!==t){if(1!==t){var e=eX(this.Lv.canvas);this.Qv(e,this.Lv.pixelRatio),this.yu(e,this.Lv.pixelRatio),this.t_(e,this.Lv.pixelRatio),null!==this.Q_&&this.Q_.Jv(t),null!==this.td&&this.td.Jv(t)}var n=eX(this.Fv.canvas),i=this.Fv.pixelRatio;n.clearRect(0,0,Math.ceil(this.pv.st*i),Math.ceil(this.pv.ht*i)),this.wd([this.M_.vt().bf()],n,i)}},t.prototype.Qv=function(t,e){var n=this;Z(t,e,function(){F(t,0,0,n.pv.st,n.pv.ht,n.M_.vt().Pf())})},t.prototype.yu=function(t,e){if(this.M_.ct().timeScale.borderVisible){t.save(),t.fillStyle=this.Md();var n=Math.max(1,Math.floor(this.dd().At*e));t.fillRect(0,0,Math.ceil(this.pv.st*e),n),t.restore()}},t.prototype.t_=function(t,e){var n=this,i=this.M_.vt().j().Fn();if(i&&0!==i.length){var r=i.reduce(nc,i[0]).Rh;r>30&&r<50&&(r=30),t.save(),t.strokeStyle=this.Md();var s=this.dd(),a=s.At+s.Dt+s.Tt+s.Wt-s.Ot;t.textAlign="center",t.fillStyle=this.Md();var o=Math.floor(this.dd().At*e),l=Math.max(1,Math.floor(e)),c=Math.floor(.5*e);if(this.M_.vt().j().ct().borderVisible){t.beginPath();for(var u=Math.round(s.Dt*e),h=i.length;h--;){var d=Math.round(i[h].An*e);t.rect(d-c,o,l,u)}t.fill()}t.fillStyle=this.ve(),Z(t,e,function(){t.font=n.bd();for(var e,s=0;s<i.length;s++)if((e=i[s]).Rh<r){var o=e.Ir?n.md(t,e.An,e.Tn):e.An;t.fillText(e.Tn,o,a)}t.font=n.pd();for(var l=0;l<i.length;l++)(e=i[l]).Rh>=r&&(o=e.Ir?n.md(t,e.An,e.Tn):e.An,t.fillText(e.Tn,o,a))})}},t.prototype.md=function(t,e,n){var i=this.kv.Vt(t,n),r=Math.floor(e-i/2)+.5;return r<0?e+=Math.abs(0-r):r+i>this.pv.st&&(e-=Math.abs(this.pv.st-(r+i))),e},t.prototype.wd=function(t,e,n){for(var i=this.dd(),r=0;r<t.length;r++)for(var s=0,a=t[r].ci();s<a.length;s++){var o=a[s];e.save(),o.P().h(e,i,n),e.restore()}},t.prototype.Md=function(){return this.M_.ct().timeScale.borderColor},t.prototype.ve=function(){return this.ki.textColor},t.prototype.fe=function(){return this.ki.fontSize},t.prototype.bd=function(){return tW(this.fe(),this.ki.fontFamily)},t.prototype.pd=function(){return tW(this.fe(),this.ki.fontFamily,"bold")},t.prototype.dd=function(){null===this.oe&&(this.oe={At:1,Ot:NaN,Tt:NaN,Bt:NaN,si:NaN,Dt:3,Wt:NaN,Nt:"",ni:new eh});var t=this.oe,e=this.bd();if(t.Nt!==e){var n=this.fe();t.Wt=n,t.Nt=e,t.Tt=Math.ceil(n/2.5),t.Bt=t.Tt,t.si=Math.ceil(n/2),t.Ot=Math.round(this.fe()/5),t.ni.Ou()}return this.oe},t.prototype.h_=function(t){this.Bv.style.cursor=1===t?"ew-resize":"default"},t.prototype.ad=function(){var t=this.M_.vt(),e=t.ct();e.leftPriceScale.visible||null===this.Q_||(this.rd.removeChild(this.Q_.jv()),this.Q_.en(),this.Q_=null),e.rightPriceScale.visible||null===this.td||(this.ed.removeChild(this.td.jv()),this.td.en(),this.td=null);var n={Ff:this.M_.vt().Ff()},i=function(){return e.leftPriceScale.borderVisible&&t.j().ct().borderVisible},r=function(){return t.Pf()};e.leftPriceScale.visible&&null===this.Q_&&(this.Q_=new nl("left",e,n,i,r),this.rd.appendChild(this.Q_.jv())),e.rightPriceScale.visible&&null===this.td&&(this.td=new nl("right",e,n,i,r),this.ed.appendChild(this.td.jv()))},t}(),nh=function(){function t(t,e){this.gd=[],this.yd=0,this.En=0,this.$h=0,this.kd=0,this.Cd=0,this.Nd=null,this.xd=!1,this.o_=new ti,this.Jl=new ti,this.ki=e,this.hd=document.createElement("div"),this.hd.classList.add("tv-lightweight-charts"),this.hd.style.overflow="hidden",this.hd.style.width="100%",this.hd.style.height="100%",(n=this.hd).style.userSelect="none",n.style.webkitUserSelect="none",n.style.msUserSelect="none",n.style.MozUserSelect="none",n.style.webkitTapHighlightColor="transparent",this.Sd=document.createElement("table"),this.Sd.setAttribute("cellspacing","0"),this.hd.appendChild(this.Sd),this.Dd=this.Ad.bind(this),this.hd.addEventListener("wheel",this.Dd,{passive:!1}),this.hi=new eY(this.Ql.bind(this),this.ki),this.vt().mf().Ji(this.Td.bind(this),this),this.Bd=new nu(this),this.Sd.appendChild(this.Bd.jv());var n,i=this.ki.width,r=this.ki.height;if(0===i||0===r){var s=t.getBoundingClientRect();0===i&&(i=Math.floor(s.width),i-=i%2),0===r&&(r=Math.floor(s.height),r-=r%2)}this.Ld(i,r),this.Fd(),t.appendChild(this.hd),this.Ed(),this.hi.j().Jr().Ji(this.hi.uf.bind(this.hi),this),this.hi.dl().Ji(this.hi.uf.bind(this.hi),this)}return t.prototype.vt=function(){return this.hi},t.prototype.ct=function(){return this.ki},t.prototype.Vd=function(){return this.gd},t.prototype.Od=function(){return this.Bd},t.prototype.en=function(){this.hd.removeEventListener("wheel",this.Dd),0!==this.yd&&window.cancelAnimationFrame(this.yd),this.hi.mf().sn(this),this.hi.j().Jr().sn(this),this.hi.dl().sn(this),this.hi.en();for(var t=0,e=this.gd;t<e.length;t++){var n=e[t];this.Sd.removeChild(n.jv()),n.V_().sn(this),n.en()}this.gd=[],h(this.Bd).en(),null!==this.hd.parentElement&&this.hd.parentElement.removeChild(this.hd),this.Jl.en(),this.o_.en()},t.prototype.Ld=function(t,e,n){if(void 0===n&&(n=!1),this.En!==e||this.$h!==t){this.En=e,this.$h=t;var i=e+"px",r=t+"px";h(this.hd).style.height=i,h(this.hd).style.width=r,this.Sd.style.height=i,this.Sd.style.width=r,n?this.Wd(new tY(3)):this.hi.uf()}},t.prototype.Jv=function(t){void 0===t&&(t=new tY(3));for(var e=0;e<this.gd.length;e++)this.gd[e].Jv(t.ge(e).me);this.ki.timeScale.visible&&this.Bd.Jv(t.pe())},t.prototype.rs=function(t){this.hi.rs(t),this.Ed();var e=t.width||this.$h,n=t.height||this.En;this.Ld(e,n)},t.prototype.V_=function(){return this.o_},t.prototype.mf=function(){return this.Jl},t.prototype.zd=function(){var t=this;null!==this.Nd&&(this.Wd(this.Nd),this.Nd=null);var e=this.gd[0],n=eJ(document,new eK(this.$h,this.En)),i=eX(n);return Z(i,eQ(n),function(){var n=0,r=0,s=function(e){for(var s=0;s<t.gd.length;s++){var a=t.gd[s],o=a.z_().ht,l=h("left"===e?a.U_():a.H_()),c=l.s_();i.drawImage(c,n,r,l.Xv(),o),r+=o}};t.Pd()&&(s("left"),n=h(e.U_()).Xv()),r=0;for(var a=0;a<t.gd.length;a++){var o=t.gd[a],l=o.z_(),c=o.s_();i.drawImage(c,n,r,l.st,l.ht),r+=l.ht}n+=e.z_().st,t.Rd()&&(r=0,s("right"));var u=function(e){var s=h("left"===e?t.Bd.od():t.Bd.ld()),a=s.z_(),o=s.s_();i.drawImage(o,n,r,a.st,a.ht)};if(t.ki.timeScale.visible){n=0,t.Pd()&&(u("left"),n=h(e.U_()).Xv());var d=t.Bd.z_();c=t.Bd.s_(),i.drawImage(c,n,r,d.st,d.ht),t.Rd()&&(n+=e.z_().st,u("right"),i.restore())}}),n},t.prototype.Id=function(t){return"none"===t?0:("left"!==t||this.Pd())&&("right"!==t||this.Rd())?0===this.gd.length?0:h("left"===t?this.gd[0].U_():this.gd[0].H_()).Xv():0},t.prototype.jd=function(){for(var t=0,e=0,n=0,i=0,r=this.gd;i<r.length;i++){var s=r[i];this.Pd()&&(e=Math.max(e,h(s.U_()).Yv())),this.Rd()&&(n=Math.max(n,h(s.H_()).Yv())),t+=s.wl()}var a=this.$h,o=this.En,l=Math.max(a-e-n,0),c=this.ki.timeScale.visible,u=c?this.Bd._d():0;u%2&&(u+=1);for(var d=0+u,f=o<d?0:o-d,p=f/t,v=0,m=0;m<this.gd.length;++m){(s=this.gd[m]).C_(this.hi.wf()[m]);var g,y=0;y=m===this.gd.length-1?f-v:Math.round(s.wl()*p),v+=g=Math.max(y,2),s.$v(new eK(l,g)),this.Pd()&&s.W_(e,"left"),this.Rd()&&s.W_(n,"right"),s.Zv()&&this.hi.pf(s.Zv(),g)}this.Bd.vd(new eK(c?l:0,u),c?e:0,c?n:0),this.hi.Dr(l),this.kd!==e&&(this.kd=e),this.Cd!==n&&(this.Cd=n)},t.prototype.Ad=function(t){var e=t.deltaX/100,n=-t.deltaY/100;if(0!==e&&this.ki.handleScroll.mouseWheel||0!==n&&this.ki.handleScale.mouseWheel){switch(t.cancelable&&t.preventDefault(),t.deltaMode){case t.DOM_DELTA_PAGE:e*=120,n*=120;break;case t.DOM_DELTA_LINE:e*=32,n*=32}if(0!==n&&this.ki.handleScale.mouseWheel){var i=Math.sign(n)*Math.min(1,Math.abs(n)),r=t.clientX-this.hd.getBoundingClientRect().left;this.vt().kf(r,i)}0!==e&&this.ki.handleScroll.mouseWheel&&this.vt().Cf(-80*e)}},t.prototype.Wd=function(t){var e=t.pe();if(3===e&&this.qd(),3===e||2===e){for(var n=this.hi.wf(),i=0;i<n.length;i++)t.ge(i)._s&&n[i].Fl();for(var r=t.xe(),s=0;s<r.length;s++){var a=r[s];this.Se(a)}r.length>0&&(this.hi.Vr(),this.hi.Eo(),this.hi.Or()),this.Bd.O()}this.Jv(t)},t.prototype.Se=function(t){var e=this.hi.j();switch(t.ke){case 0:e.Qr();break;case 1:e.te(t.X);break;case 2:e.wr(t.X);break;case 3:e.Mr(t.X);break;case 4:e.jr()}},t.prototype.Ql=function(t){var e=this;null!==this.Nd?this.Nd._n(t):this.Nd=t,this.xd||(this.xd=!0,this.yd=window.requestAnimationFrame(function(){e.xd=!1,e.yd=0,null!==e.Nd&&(e.Wd(e.Nd),e.Nd=null)}))},t.prototype.qd=function(){this.Fd()},t.prototype.Fd=function(){for(var t=this.hi.wf(),e=t.length,n=this.gd.length,i=e;i<n;i++){var r=u(this.gd.pop());this.Sd.removeChild(r.jv()),r.V_().sn(this),r.en()}for(i=n;i<e;i++)(r=new no(this,t[i])).V_().Ji(this.Ud.bind(this),this),this.gd.push(r),this.Sd.insertBefore(r.jv(),this.Bd.jv());for(i=0;i<e;i++){var s=t[i];(r=this.gd[i]).Zv()!==s?r.C_(s):r.k_()}this.Ed(),this.jd()},t.prototype.Hd=function(t,e){var n,i=new Map;if(null!==t&&this.hi.W().forEach(function(e){var n=e.Fa(t);null!==n&&i.set(e,n)}),null!==t){var r=this.hi.j().ri(t);null!==r&&(n=r)}var s=this.vt().ff();return{S:n,Yd:e||void 0,Kd:null!==s&&s.vf instanceof e$?s.vf:void 0,$d:i,Xd:null!==s&&void 0!==s.T_?s.T_.ka:void 0}},t.prototype.Ud=function(t,e){var n=this;this.o_.hn(function(){return n.Hd(t,e)})},t.prototype.Td=function(t,e){var n=this;this.Jl.hn(function(){return n.Hd(t,e)})},t.prototype.Ed=function(){var t=this.ki.timeScale.visible?"":"none";this.Bd.jv().style.display=t},t.prototype.Pd=function(){return this.gd[0].Zv().kl().ct().visible},t.prototype.Rd=function(){return this.gd[0].Zv().Cl().ct().visible},t}();function nd(t,e,n){var i=n.value,r={Ph:e,S:t,X:[i,i,i,i]};return"color"in n&&void 0!==n.color&&(r.et=n.color),r}function nf(t,e,n){return{Ph:e,S:t,X:[n.open,n.high,n.low,n.close]}}function np(t){return void 0!==t.X}function nv(t){return function(e,n,i){return void 0===i.open&&void 0===i.value?{S:e,Ph:n}:t(e,n,i)}}var nm={Candlestick:nv(nf),Bar:nv(nf),Area:nv(nd),Baseline:nv(nd),Histogram:nv(nd),Line:nv(nd)};function ng(t){return 60*t*6e4}function ny(t){return 60*t*1e3}var nb=[{Zd:1e3,Rh:10},{Zd:ny(1),Rh:20},{Zd:ny(5),Rh:21},{Zd:ny(30),Rh:22},{Zd:ng(1),Rh:30},{Zd:ng(3),Rh:31},{Zd:ng(6),Rh:32},{Zd:ng(12),Rh:33}];function n_(t,e){if(t.getUTCFullYear()!==e.getUTCFullYear())return 70;if(t.getUTCMonth()!==e.getUTCMonth())return 60;if(t.getUTCDate()!==e.getUTCDate())return 50;for(var n=nb.length-1;n>=0;--n)if(Math.floor(e.getTime()/nb[n].Zd)!==Math.floor(t.getTime()/nb[n].Zd))return nb[n].Rh;return 0}function nw(t,e){if(void 0===e&&(e=0),0!==t.length){for(var n=0===e?null:t[e-1].S.Dh,i=null!==n?new Date(1e3*n):null,r=0,s=e;s<t.length;++s){var a=t[s],o=new Date(1e3*a.S.Dh);null!==i&&(a.zh=n_(o,i)),r+=a.S.Dh-(n||a.S.Dh),n=a.S.Dh,i=o}if(0===e&&t.length>1){var l=Math.ceil(r/(t.length-1)),c=new Date(1e3*(t[0].S.Dh-l));t[0].zh=n_(new Date(1e3*t[0].S.Dh),c)}}}function nx(t){if(!tU(t))throw Error("time must be of type BusinessDay");return{Dh:Math.round(new Date(Date.UTC(t.year,t.month-1,t.day,0,0,0,0)).getTime()/1e3),Sh:t}}function nk(t){if(!p(t))throw Error("time must be of type isUTCTimestamp");return{Dh:t}}function nC(t){return 0===t.length?null:tU(t[0].time)?nx:nk}function nj(t){return p(t)?nk(t):tU(t)?nx(t):nx(nM(t))}function nM(t){var e=new Date(t);if(isNaN(e.getTime()))throw Error("Invalid date string="+t+", expected format=yyyy-mm-dd");return{day:e.getUTCDate(),month:e.getUTCMonth()+1,year:e.getUTCFullYear()}}function nE(t){m(t.time)&&(t.time=nM(t.time))}function nS(t){return{Ph:0,Jd:new Map,Rs:t}}var nN=function(){function t(){this.Gd=new Map,this.Qd=new Map,this.tw=new Map,this.iw=[]}return t.prototype.en=function(){this.Gd.clear(),this.Qd.clear(),this.tw.clear(),this.iw=[]},t.prototype.nw=function(t,e){var n=this,i=0!==this.Gd.size,r=!1;if(this.Qd.has(t)){if(1===this.Qd.size)i=!1,r=!0,this.Gd.clear();else for(var s=0,a=this.iw;s<a.length;s++)a[s].pointData.Jd.delete(t)&&(r=!0)}var o=[];if(0!==e.length){!function(t){t.forEach(nE)}(e);var l=h(nC(e)),c=nm[t.Ya()];o=e.map(function(e){var i=l(e.time),s=n.Gd.get(i.Dh);void 0===s&&(s=nS(i),n.Gd.set(i.Dh,s),r=!0);var a=c(i,s.Ph,e);return s.Jd.set(t,a),a})}i&&this.sw(),this.hw(t,o);var u=-1;if(r){var d=[];this.Gd.forEach(function(t){d.push({zh:0,S:t.Rs,pointData:t})}),d.sort(function(t,e){return t.S.Dh-e.S.Dh}),u=this.rw(d)}return this.ew(t,u)},t.prototype.Of=function(t){return this.nw(t,[])},t.prototype.uw=function(t,e){nE(e);var n=h(nC([e]))(e.time),i=this.tw.get(t);if(void 0!==i&&n.Dh<i.Dh)throw Error("Cannot update oldest data, last time="+i.Dh+", new time="+n.Dh);var r=this.Gd.get(n.Dh),s=void 0===r;void 0===r&&(r=nS(n),this.Gd.set(n.Dh,r));var a=nm[t.Ya()](n,r.Ph,e);if(r.Jd.set(t,a),this.aw(t,a),!s)return this.ew(t,-1);var o={zh:0,S:r.Rs,pointData:r},l=tO(this.iw,o.S.Dh,function(t,e){return t.S.Dh<e});this.iw.splice(l,0,o);for(var c=l;c<this.iw.length;++c)nT(this.iw[c].pointData,c);return nw(this.iw,l),this.ew(t,l)},t.prototype.aw=function(t,e){var n=this.Qd.get(t);void 0===n&&(n=[],this.Qd.set(t,n));var i=0!==n.length?n[n.length-1]:null;null===i||e.S.Dh>i.S.Dh?np(e)&&n.push(e):np(e)?n[n.length-1]=e:n.splice(-1,1),this.tw.set(t,e.S)},t.prototype.hw=function(t,e){0!==e.length?(this.Qd.set(t,e.filter(np)),this.tw.set(t,e[e.length-1].S)):(this.Qd.delete(t),this.tw.delete(t))},t.prototype.sw=function(){for(var t=0,e=this.iw;t<e.length;t++){var n=e[t];0===n.pointData.Jd.size&&this.Gd.delete(n.S.Dh)}},t.prototype.rw=function(t){for(var e=-1,n=0;n<this.iw.length&&n<t.length;++n){var i=this.iw[n],r=t[n];if(i.S.Dh!==r.S.Dh){e=n;break}r.zh=i.zh,nT(r.pointData,n)}if(-1===e&&this.iw.length!==t.length&&(e=Math.min(this.iw.length,t.length)),-1===e)return -1;for(n=e;n<t.length;++n)nT(t[n].pointData,n);return nw(t,e),this.iw=t,e},t.prototype.ow=function(){if(0===this.Qd.size)return null;var t=0;return this.Qd.forEach(function(e){0!==e.length&&(t=Math.max(t,e[e.length-1].Ph))}),t},t.prototype.ew=function(t,e){var n={lw:new Map,j:{Br:this.ow()}};if(-1!==e)this.Qd.forEach(function(t,e){n.lw.set(e,{Zu:t})}),this.Qd.has(t)||n.lw.set(t,{Zu:[]}),n.j.fw=this.iw,n.j.cw=e;else{var i=this.Qd.get(t);n.lw.set(t,{Zu:i||[]})}return n},t}();function nT(t,e){t.Ph=e,t.Jd.forEach(function(t){t.Ph=e})}var nO={color:"#FF0000",price:0,lineStyle:2,lineWidth:1,axisLabelVisible:!0,title:""},nL=function(){function t(t){this.Ia=t}return t.prototype.applyOptions=function(t){this.Ia.rs(t)},t.prototype.options=function(){return this.Ia.ct()},t.prototype._w=function(){return this.Ia},t}();function nA(t){var e=t.overlay,n=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&0>e.indexOf(i)&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)0>e.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}(t,["overlay"]);return e&&(n.priceScaleId=""),n}var nR=function(){function t(t,e,n){this.qe=t,this.dw=e,this.ww=n}return t.prototype.priceFormatter=function(){return this.qe.$s()},t.prototype.priceToCoordinate=function(t){var e=this.qe.H();return null===e?null:this.qe.$().K(t,e.X)},t.prototype.coordinateToPrice=function(t){var e=this.qe.H();return null===e?null:this.qe.$().Si(t,e.X)},t.prototype.barsInLogicalRange=function(t){if(null===t)return null;var e=new t$(new tR(t.from,t.to)).Hh(),n=this.qe.Hi();if(n.ti())return null;var i=n.oo(e.hh(),1),r=n.oo(e.rh(),-1),s=h(n.eo()),a=h(n.Ui());if(null!==i&&null!==r&&i.Ph>r.Ph)return{barsBefore:t.from-s,barsAfter:a-t.to};var o={barsBefore:null===i||i.Ph===s?t.from-s:i.Ph-s,barsAfter:null===r||r.Ph===a?a-t.to:a-r.Ph};return null!==i&&null!==r&&(o.from=i.S.Sh||i.S.Dh,o.to=r.S.Sh||r.S.Dh),o},t.prototype.setData=function(t){this.qe.Ya(),this.dw.Mw(this.qe,t)},t.prototype.update=function(t){this.qe.Ya(),this.dw.bw(this.qe,t)},t.prototype.setMarkers=function(t){var e=t.map(function(t){return o(o({},t),{time:nj(t.time)})});this.qe.Wo(e)},t.prototype.applyOptions=function(t){var e=nA(t);this.qe.rs(e)},t.prototype.options=function(){return y(this.qe.ct())},t.prototype.priceScale=function(){return this.ww.priceScale(this.qe.$().hs())},t.prototype.createPriceLine=function(t){var e=f(y(nO),t);return new nL(this.qe.zo(e))},t.prototype.removePriceLine=function(t){this.qe.Po(t._w())},t.prototype.seriesType=function(){return this.qe.Ya()},t}(),nI=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.applyOptions=function(e){tj(e),t.prototype.applyOptions.call(this,e)},e}(nR),nD={autoScale:!0,mode:0,invertScale:!1,alignLabels:!0,borderVisible:!0,borderColor:"#2B2B43",entireTextOnly:!1,visible:!1,drawTicks:!0,scaleMargins:{bottom:.1,top:.2}},nP={width:0,height:0,layout:{background:{type:"solid",color:"#FFFFFF"},textColor:"#191919",fontSize:11,fontFamily:tq},crosshair:{vertLine:{color:"#758696",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#4c525e"},horzLine:{color:"#758696",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#4c525e"},mode:1},grid:{vertLines:{color:"#D6DCDE",style:0,visible:!0},horzLines:{color:"#D6DCDE",style:0,visible:!0}},overlayPriceScales:o({},nD),leftPriceScale:o(o({},nD),{visible:!1}),rightPriceScale:o(o({},nD),{visible:!0}),timeScale:{rightOffset:0,barSpacing:6,minBarSpacing:.5,fixLeftEdge:!1,fixRightEdge:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!1,borderVisible:!0,borderColor:"#2B2B43",visible:!0,timeVisible:!1,secondsVisible:!0,shiftVisibleRangeOnNewBar:!0},watermark:{color:"rgba(0, 0, 0, 0)",visible:!1,fontSize:48,fontFamily:tq,fontStyle:"",text:"",horzAlign:"center",vertAlign:"center"},localization:{locale:e3?navigator.language:"",dateFormat:"dd MMM 'yy"},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0},handleScale:{axisPressedMouseMove:{time:!0,price:!0},axisDoubleClickReset:!0,mouseWheel:!0,pinch:!0},kineticScroll:{mouse:!1,touch:!0}},nZ={upColor:"#26a69a",downColor:"#ef5350",wickVisible:!0,borderVisible:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},nF={upColor:"#26a69a",downColor:"#ef5350",openVisible:!0,thinBars:!0},n$={color:"#2196f3",lineStyle:0,lineWidth:3,lineType:0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBackgroundColor:"",lastPriceAnimation:0},nz={topColor:"rgba( 46, 220, 135, 0.4)",bottomColor:"rgba( 40, 221, 100, 0)",lineColor:"#33D778",lineStyle:0,lineWidth:3,lineType:0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBackgroundColor:"",lastPriceAnimation:0},nB={baseValue:{type:"price",price:0},topFillColor1:"rgba(38, 166, 154, 0.28)",topFillColor2:"rgba(38, 166, 154, 0.05)",topLineColor:"rgba(38, 166, 154, 1)",bottomFillColor1:"rgba(239, 83, 80, 0.05)",bottomFillColor2:"rgba(239, 83, 80, 0.28)",bottomLineColor:"rgba(239, 83, 80, 1)",lineWidth:3,lineStyle:0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBackgroundColor:"",lastPriceAnimation:0},nV={color:"#26a69a",base:0},nU={title:"",visible:!0,lastValueVisible:!0,priceLineVisible:!0,priceLineSource:0,priceLineWidth:1,priceLineColor:"",priceLineStyle:2,baseLineVisible:!0,baseLineWidth:1,baseLineColor:"#B2B5BE",baseLineStyle:0,priceFormat:{type:"price",precision:2,minMove:.01}},nq=function(){function t(t,e){this.mw=t,this.pw=e}return t.prototype.applyOptions=function(t){this.mw.vt()._f(this.pw,t)},t.prototype.options=function(){return this.Gt().ct()},t.prototype.width=function(){return tG(this.pw)?this.mw.Id("left"===this.pw?"left":"right"):0},t.prototype.Gt=function(){return h(this.mw.vt().df(this.pw)).$},t}(),nW=function(){function t(t,e){this.gw=new ti,this.nr=new ti,this.sd=new ti,this.hi=t,this.ul=t.j(),this.Bd=e,this.ul.Xr().Ji(this.yw.bind(this)),this.ul.Zr().Ji(this.kw.bind(this)),this.Bd.fd().Ji(this.Cw.bind(this))}return t.prototype.en=function(){this.ul.Xr().sn(this),this.ul.Zr().sn(this),this.Bd.fd().sn(this),this.gw.en(),this.nr.en(),this.sd.en()},t.prototype.scrollPosition=function(){return this.ul.Pr()},t.prototype.scrollToPosition=function(t,e){e?this.ul.$r(t,1e3):this.hi.Mr(t)},t.prototype.scrollToRealTime=function(){this.ul.Kr()},t.prototype.getVisibleRange=function(){var t,e,n=this.ul.yr();return null===n?null:{from:null!==(t=n.from.Sh)&&void 0!==t?t:n.from.Dh,to:null!==(e=n.to.Sh)&&void 0!==e?e:n.to.Dh}},t.prototype.setVisibleRange=function(t){var e={from:nj(t.from),to:nj(t.to)},n=this.ul.Sr(e);this.hi.Wf(n)},t.prototype.getVisibleLogicalRange=function(){var t=this.ul.gr();return null===t?null:{from:t.hh(),to:t.rh()}},t.prototype.setVisibleLogicalRange=function(t){c(t.from<=t.to,"The from index cannot be after the to index."),this.hi.Wf(t)},t.prototype.resetTimeScale=function(){this.hi.Ne()},t.prototype.fitContent=function(){this.hi.Qr()},t.prototype.logicalToCoordinate=function(t){var e=this.hi.j();return e.ti()?null:e.G(t)},t.prototype.coordinateToLogical=function(t){return this.ul.ti()?null:this.ul.Fr(t)},t.prototype.timeToCoordinate=function(t){var e=nj(t),n=this.ul.br(e,!1);return null===n?null:this.ul.G(n)},t.prototype.coordinateToTime=function(t){var e,n=this.hi.j(),i=n.Fr(t),r=n.ri(i);return null===r?null:null!==(e=r.Sh)&&void 0!==e?e:r.Dh},t.prototype.width=function(){return this.Bd.z_().st},t.prototype.height=function(){return this.Bd.z_().ht},t.prototype.subscribeVisibleTimeRangeChange=function(t){this.gw.Ji(t)},t.prototype.unsubscribeVisibleTimeRangeChange=function(t){this.gw.nn(t)},t.prototype.subscribeVisibleLogicalRangeChange=function(t){this.nr.Ji(t)},t.prototype.unsubscribeVisibleLogicalRangeChange=function(t){this.nr.nn(t)},t.prototype.subscribeSizeChange=function(t){this.sd.Ji(t)},t.prototype.unsubscribeSizeChange=function(t){this.sd.nn(t)},t.prototype.applyOptions=function(t){this.ul.rs(t)},t.prototype.options=function(){return y(this.ul.ct())},t.prototype.yw=function(){this.gw.rn()&&this.gw.hn(this.getVisibleRange())},t.prototype.kw=function(){this.nr.rn()&&this.nr.hn(this.getVisibleLogicalRange())},t.prototype.Cw=function(t){this.sd.hn(t.st,t.ht)},t}();function nH(t){void 0!==t&&"custom"!==t.type&&void 0!==t.minMove&&void 0===t.precision&&(t.precision=function(t){if(t>=1)return 0;for(var e=0;e<8&&!(1e-8>Math.abs(Math.round(t)-t));e++)t*=10;return e}(t.minMove))}function nG(t){return function(t){if(g(t.handleScale)){var e=t.handleScale;t.handleScale={axisDoubleClickReset:e,axisPressedMouseMove:{time:e,price:e},mouseWheel:e,pinch:e}}else if(void 0!==t.handleScale&&g(t.handleScale.axisPressedMouseMove)){var n=t.handleScale.axisPressedMouseMove;t.handleScale.axisPressedMouseMove={time:n,price:n}}var i=t.handleScroll;g(i)&&(t.handleScroll={horzTouchDrag:i,vertTouchDrag:i,mouseWheel:i,pressedMouseMove:i})}(t),function(t){if(t.priceScale){t.leftPriceScale=t.leftPriceScale||{},t.rightPriceScale=t.rightPriceScale||{};var e=t.priceScale.position;delete t.priceScale.position,t.leftPriceScale=f(t.leftPriceScale,t.priceScale),t.rightPriceScale=f(t.rightPriceScale,t.priceScale),"left"===e&&(t.leftPriceScale.visible=!0,t.rightPriceScale.visible=!1),"right"===e&&(t.leftPriceScale.visible=!1,t.rightPriceScale.visible=!0),"none"===e&&(t.leftPriceScale.visible=!1,t.rightPriceScale.visible=!1),t.overlayPriceScales=t.overlayPriceScales||{},void 0!==t.priceScale.invertScale&&(t.overlayPriceScales.invertScale=t.priceScale.invertScale),void 0!==t.priceScale.scaleMargins&&(t.overlayPriceScales.scaleMargins=t.priceScale.scaleMargins)}}(t),t.layout&&t.layout.backgroundColor&&!t.layout.background&&(t.layout.background={type:"solid",color:t.layout.backgroundColor}),t}!function(){function t(t,e){var n=this;this.Nw=new nN,this.xw=new Map,this.Sw=new Map,this.Dw=new ti,this.Aw=new ti;var i=void 0===e?y(nP):f(y(nP),nG(e));this.mw=new nh(t,i),this.mw.V_().Ji(function(t){n.Dw.rn()&&n.Dw.hn(n.Tw(t()))},this),this.mw.mf().Ji(function(t){n.Aw.rn()&&n.Aw.hn(n.Tw(t()))},this);var r=this.mw.vt();this.Bw=new nW(r,this.mw.Od())}t.prototype.remove=function(){this.mw.V_().sn(this),this.mw.mf().sn(this),this.Bw.en(),this.mw.en(),this.xw.clear(),this.Sw.clear(),this.Dw.en(),this.Aw.en(),this.Nw.en()},t.prototype.resize=function(t,e,n){this.mw.Ld(t,e,n)},t.prototype.addAreaSeries=function(t){void 0===t&&(t={}),nH((t=nA(t)).priceFormat);var e=f(y(nU),nz,t),n=this.mw.vt().Ef("Area",e),i=new nR(n,this,this);return this.xw.set(i,n),this.Sw.set(n,i),i},t.prototype.addBaselineSeries=function(t){void 0===t&&(t={}),nH((t=nA(t)).priceFormat);var e=f(y(nU),nB,t),n=this.mw.vt().Ef("Baseline",e),i=new nR(n,this,this);return this.xw.set(i,n),this.Sw.set(n,i),i},t.prototype.addBarSeries=function(t){void 0===t&&(t={}),nH((t=nA(t)).priceFormat);var e=f(y(nU),nF,t),n=this.mw.vt().Ef("Bar",e),i=new nR(n,this,this);return this.xw.set(i,n),this.Sw.set(n,i),i},t.prototype.addCandlestickSeries=function(t){void 0===t&&(t={}),tj(t=nA(t)),nH(t.priceFormat);var e=f(y(nU),nZ,t),n=this.mw.vt().Ef("Candlestick",e),i=new nI(n,this,this);return this.xw.set(i,n),this.Sw.set(n,i),i},t.prototype.addHistogramSeries=function(t){void 0===t&&(t={}),nH((t=nA(t)).priceFormat);var e=f(y(nU),nV,t),n=this.mw.vt().Ef("Histogram",e),i=new nR(n,this,this);return this.xw.set(i,n),this.Sw.set(n,i),i},t.prototype.addLineSeries=function(t){void 0===t&&(t={}),nH((t=nA(t)).priceFormat);var e=f(y(nU),n$,t),n=this.mw.vt().Ef("Line",e),i=new nR(n,this,this);return this.xw.set(i,n),this.Sw.set(n,i),i},t.prototype.removeSeries=function(t){var e=u(this.xw.get(t)),n=this.Nw.Of(e);this.mw.vt().Of(e),this.Lw(n),this.xw.delete(t),this.Sw.delete(e)},t.prototype.Mw=function(t,e){this.Lw(this.Nw.nw(t,e))},t.prototype.bw=function(t,e){this.Lw(this.Nw.uw(t,e))},t.prototype.subscribeClick=function(t){this.Dw.Ji(t)},t.prototype.unsubscribeClick=function(t){this.Dw.nn(t)},t.prototype.subscribeCrosshairMove=function(t){this.Aw.Ji(t)},t.prototype.unsubscribeCrosshairMove=function(t){this.Aw.nn(t)},t.prototype.priceScale=function(t){return void 0===t&&(t=this.mw.vt().zf()),new nq(this.mw,t)},t.prototype.timeScale=function(){return this.Bw},t.prototype.applyOptions=function(t){this.mw.rs(nG(t))},t.prototype.options=function(){return this.mw.ct()},t.prototype.takeScreenshot=function(){return this.mw.zd()},t.prototype.Lw=function(t){var e=this.mw.vt();e.Lf(t.j.Br,t.j.fw,t.j.cw),t.lw.forEach(function(t,e){return e._(t.Zu)}),e.Vr()},t.prototype.Fw=function(t){return u(this.Sw.get(t))},t.prototype.Tw=function(t){var e=this,n=new Map;t.$d.forEach(function(t,i){n.set(e.Fw(i),t)});var i=void 0===t.Kd?void 0:this.Fw(t.Kd);return{time:t.S&&(t.S.Sh||t.S.Dh),point:t.Yd,hoveredSeries:i,hoveredMarkerId:t.Xd,seriesPrices:n}}}()},94975:function(t,e,n){var i=n(39866)(n(74288),"DataView");t.exports=i},9855:function(t,e,n){var i=n(43596),r=n(35907),s=n(35355),a=n(39870),o=n(73372);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=s,l.prototype.has=a,l.prototype.set=o,t.exports=l},99078:function(t,e,n){var i=n(62285),r=n(28706),s=n(63717),a=n(78410),o=n(13368);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=s,l.prototype.has=a,l.prototype.set=o,t.exports=l},88675:function(t,e,n){var i=n(39866)(n(74288),"Map");t.exports=i},76219:function(t,e,n){var i=n(38764),r=n(78615),s=n(83391),a=n(53483),o=n(74724);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=s,l.prototype.has=a,l.prototype.set=o,t.exports=l},69308:function(t,e,n){var i=n(39866)(n(74288),"Promise");t.exports=i},41497:function(t,e,n){var i=n(39866)(n(74288),"Set");t.exports=i},11549:function(t,e,n){var i=n(76219),r=n(54351),s=n(16096);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new i;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=r,a.prototype.has=s,t.exports=a},85885:function(t,e,n){var i=n(99078),r=n(84092),s=n(31663),a=n(69135),o=n(39552),l=n(63960);function c(t){var e=this.__data__=new i(t);this.size=e.size}c.prototype.clear=r,c.prototype.delete=s,c.prototype.get=a,c.prototype.has=o,c.prototype.set=l,t.exports=c},80098:function(t,e,n){var i=n(74288).Uint8Array;t.exports=i},10880:function(t,e,n){var i=n(39866)(n(74288),"WeakMap");t.exports=i},42774:function(t){t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,s=[];++n<i;){var a=t[n];e(a,n,t)&&(s[r++]=a)}return s}},28579:function(t,e,n){var i=n(89772),r=n(56569),s=n(25614),a=n(98051),o=n(84257),l=n(9792),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=s(t),u=!n&&r(t),h=!n&&!u&&a(t),d=!n&&!u&&!h&&l(t),f=n||u||h||d,p=f?i(t.length,String):[],v=p.length;for(var m in t)(e||c.call(t,m))&&!(f&&("length"==m||h&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||o(m,v)))&&p.push(m);return p}},73819:function(t){t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}},73817:function(t){t.exports=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}},76378:function(t){t.exports=function(t,e,n,i){var r=-1,s=null==t?0:t.length;for(i&&s&&(n=t[++r]);++r<s;)n=e(n,t[r],r,t);return n}},25253:function(t){t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}},59652:function(t){var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=function(t){return t.match(e)||[]}},83295:function(t,e,n){var i=n(83023),r=n(37560),s=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];s.call(t,e)&&r(a,n)&&(void 0!==n||e in t)||i(t,e,n)}},24457:function(t,e,n){var i=n(37560);t.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return -1}},83023:function(t,e,n){var i=n(4521);t.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},92167:function(t,e,n){var i=n(67906),r=n(70235);t.exports=function(t,e){e=i(e,t);for(var n=0,s=e.length;null!=t&&n<s;)t=t[r(e[n++])];return n&&n==s?t:void 0}},36452:function(t,e,n){var i=n(73817),r=n(25614);t.exports=function(t,e,n){var s=e(t);return r(t)?s:i(s,n(t))}},93012:function(t){t.exports=function(t,e){return null!=t&&e in Object(t)}},90370:function(t,e,n){var i=n(54506),r=n(10303);t.exports=function(t){return r(t)&&"[object Arguments]"==i(t)}},56318:function(t,e,n){var i=n(6791),r=n(10303);t.exports=function t(e,n,s,a,o){return e===n||(null!=e&&null!=n&&(r(e)||r(n))?i(e,n,s,a,t,o):e!=e&&n!=n)}},6791:function(t,e,n){var i=n(85885),r=n(97638),s=n(88030),a=n(64974),o=n(81690),l=n(25614),c=n(98051),u=n(9792),h="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,v,m,g){var y=l(t),b=l(e),_=y?d:o(t),w=b?d:o(e);_=_==h?f:_,w=w==h?f:w;var x=_==f,k=w==f,C=_==w;if(C&&c(t)){if(!c(e))return!1;y=!0,x=!1}if(C&&!x)return g||(g=new i),y||u(t)?r(t,e,n,v,m,g):s(t,e,_,n,v,m,g);if(!(1&n)){var j=x&&p.call(t,"__wrapped__"),M=k&&p.call(e,"__wrapped__");if(j||M){var E=j?t.value():t,S=M?e.value():e;return g||(g=new i),m(E,S,n,v,g)}}return!!C&&(g||(g=new i),a(t,e,n,v,m,g))}},62538:function(t,e,n){var i=n(85885),r=n(56318);t.exports=function(t,e,n,s){var a=n.length,o=a,l=!s;if(null==t)return!o;for(t=Object(t);a--;){var c=n[a];if(l&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<o;){var u=(c=n[a])[0],h=t[u],d=c[1];if(l&&c[2]){if(void 0===h&&!(u in t))return!1}else{var f=new i;if(s)var p=s(h,d,u,t,e,f);if(!(void 0===p?r(d,h,3,s,f):p))return!1}}return!0}},57595:function(t,e,n){var i=n(86757),r=n(79551),s=n(28302),a=n(1292),o=/^\[object .+?Constructor\]$/,l=Object.prototype,c=Function.prototype.toString,u=l.hasOwnProperty,h=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||r(t))&&(i(t)?h:o).test(a(t))}},59332:function(t,e,n){var i=n(54506),r=n(13973),s=n(10303),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,t.exports=function(t){return s(t)&&r(t.length)&&!!a[i(t)]}},88157:function(t,e,n){var i=n(25569),r=n(51501),s=n(79586),a=n(25614),o=n(22350);t.exports=function(t){return"function"==typeof t?t:null==t?s:"object"==typeof t?a(t)?r(t[0],t[1]):i(t):o(t)}},4578:function(t,e,n){var i=n(35365),r=n(77184),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return r(t);var e=[];for(var n in Object(t))s.call(t,n)&&"constructor"!=n&&e.push(n);return e}},22476:function(t,e,n){var i=n(28302),r=n(35365),s=n(92147),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return s(t);var e=r(t),n=[];for(var o in t)"constructor"==o&&(e||!a.call(t,o))||n.push(o);return n}},25569:function(t,e,n){var i=n(62538),r=n(58424),s=n(47073);t.exports=function(t){var e=r(t);return 1==e.length&&e[0][2]?s(e[0][0],e[0][1]):function(n){return n===t||i(n,t,e)}}},51501:function(t,e,n){var i=n(56318),r=n(13735),s=n(17764),a=n(67352),o=n(45669),l=n(47073),c=n(70235);t.exports=function(t,e){return a(t)&&o(e)?l(c(t),e):function(n){var a=r(n,t);return void 0===a&&a===e?s(n,t):i(e,a,3)}}},20702:function(t,e,n){var i=n(92167),r=n(87325),s=n(67906);t.exports=function(t,e,n){for(var a=-1,o=e.length,l={};++a<o;){var c=e[a],u=i(t,c);n(u,c)&&r(l,s(c,t),u)}return l}},18155:function(t){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},73584:function(t,e,n){var i=n(92167);t.exports=function(t){return function(e){return i(e,t)}}},98880:function(t){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},87325:function(t,e,n){var i=n(83295),r=n(67906),s=n(84257),a=n(28302),o=n(70235);t.exports=function(t,e,n,l){if(!a(t))return t;e=r(e,t);for(var c=-1,u=e.length,h=u-1,d=t;null!=d&&++c<u;){var f=o(e[c]),p=n;if("__proto__"===f||"constructor"===f||"prototype"===f)break;if(c!=h){var v=d[f];void 0===(p=l?l(v,f,d):void 0)&&(p=a(v)?v:s(e[c+1])?[]:{})}i(d,f,p),d=d[f]}return t}},89772:function(t){t.exports=function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}},65020:function(t,e,n){var i=n(23910),r=n(73819),s=n(25614),a=n(78371),o=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(s(e))return r(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-o?"-0":n}},23305:function(t){t.exports=function(t){return function(e){return t(e)}}},65734:function(t){t.exports=function(t,e){return t.has(e)}},67906:function(t,e,n){var i=n(25614),r=n(67352),s=n(39365),a=n(3641);t.exports=function(t,e){return i(t)?t:r(t,e)?[t]:s(a(t))}},92077:function(t,e,n){var i=n(74288)["__core-js_shared__"];t.exports=i},82638:function(t,e,n){var i=n(76378),r=n(42143),s=n(67512),a=RegExp("['’]","g");t.exports=function(t){return function(e){return i(s(r(e).replace(a,"")),t,"")}}},62167:function(t,e,n){var i=n(98880)({À:"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",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"});t.exports=i},4521:function(t,e,n){var i=n(39866),r=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=r},97638:function(t,e,n){var i=n(11549),r=n(25253),s=n(65734);t.exports=function(t,e,n,a,o,l){var c=1&n,u=t.length,h=e.length;if(u!=h&&!(c&&h>u))return!1;var d=l.get(t),f=l.get(e);if(d&&f)return d==e&&f==t;var p=-1,v=!0,m=2&n?new i:void 0;for(l.set(t,e),l.set(e,t);++p<u;){var g=t[p],y=e[p];if(a)var b=c?a(y,g,p,e,t,l):a(g,y,p,t,e,l);if(void 0!==b){if(b)continue;v=!1;break}if(m){if(!r(e,function(t,e){if(!s(m,e)&&(g===t||o(g,t,n,a,l)))return m.push(e)})){v=!1;break}}else if(!(g===y||o(g,y,n,a,l))){v=!1;break}}return l.delete(t),l.delete(e),v}},88030:function(t,e,n){var i=n(23910),r=n(80098),s=n(37560),a=n(97638),o=n(22523),l=n(27794),c=i?i.prototype:void 0,u=c?c.valueOf:void 0;t.exports=function(t,e,n,i,c,h,d){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!h(new r(t),new r(e)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var f=o;case"[object Set]":var p=1&i;if(f||(f=l),t.size!=e.size&&!p)break;var v=d.get(t);if(v)return v==e;i|=2,d.set(t,e);var m=a(f(t),f(e),i,c,h,d);return d.delete(t),m;case"[object Symbol]":if(u)return u.call(t)==u.call(e)}return!1}},64974:function(t,e,n){var i=n(28529),r=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,s,a,o){var l=1&n,c=i(t),u=c.length;if(u!=i(e).length&&!l)return!1;for(var h=u;h--;){var d=c[h];if(!(l?d in e:r.call(e,d)))return!1}var f=o.get(t),p=o.get(e);if(f&&p)return f==e&&p==t;var v=!0;o.set(t,e),o.set(e,t);for(var m=l;++h<u;){var g=t[d=c[h]],y=e[d];if(s)var b=l?s(y,g,d,e,t,o):s(g,y,d,t,e,o);if(!(void 0===b?g===y||a(g,y,n,s,o):b)){v=!1;break}m||(m="constructor"==d)}if(v&&!m){var _=t.constructor,w=e.constructor;_!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(v=!1)}return o.delete(t),o.delete(e),v}},28529:function(t,e,n){var i=n(36452),r=n(80466),s=n(43228);t.exports=function(t){return i(t,s,r)}},75474:function(t,e,n){var i=n(36452),r=n(28868),s=n(18587);t.exports=function(t){return i(t,s,r)}},1507:function(t,e,n){var i=n(7545);t.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}},58424:function(t,e,n){var i=n(45669),r=n(43228);t.exports=function(t){for(var e=r(t),n=e.length;n--;){var s=e[n],a=t[s];e[n]=[s,a,i(a)]}return e}},39866:function(t,e,n){var i=n(57595),r=n(3138);t.exports=function(t,e){var n=r(t,e);return i(n)?n:void 0}},62602:function(t,e,n){var i=n(45070)(Object.getPrototypeOf,Object);t.exports=i},80466:function(t,e,n){var i=n(42774),r=n(55716),s=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,o=a?function(t){return null==t?[]:i(a(t=Object(t)),function(e){return s.call(t,e)})}:r;t.exports=o},28868:function(t,e,n){var i=n(73817),r=n(62602),s=n(80466),a=n(55716),o=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)i(e,s(t)),t=r(t);return e}:a;t.exports=o},81690:function(t,e,n){var i=n(94975),r=n(88675),s=n(69308),a=n(41497),o=n(10880),l=n(54506),c=n(1292),u="[object Map]",h="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",v=c(i),m=c(r),g=c(s),y=c(a),b=c(o),_=l;(i&&_(new i(new ArrayBuffer(1)))!=p||r&&_(new r)!=u||s&&_(s.resolve())!=h||a&&_(new a)!=d||o&&_(new o)!=f)&&(_=function(t){var e=l(t),n="[object Object]"==e?t.constructor:void 0,i=n?c(n):"";if(i)switch(i){case v:return p;case m:return u;case g:return h;case y:return d;case b:return f}return e}),t.exports=_},3138:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},59592:function(t,e,n){var i=n(67906),r=n(56569),s=n(25614),a=n(84257),o=n(13973),l=n(70235);t.exports=function(t,e,n){e=i(e,t);for(var c=-1,u=e.length,h=!1;++c<u;){var d=l(e[c]);if(!(h=null!=t&&n(t,d)))break;t=t[d]}return h||++c!=u?h:!!(u=null==t?0:t.length)&&o(u)&&a(d,u)&&(s(t)||r(t))}},27926:function(t){var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function(t){return e.test(t)}},43596:function(t,e,n){var i=n(20453);t.exports=function(){this.__data__=i?i(null):{},this.size=0}},35907:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},35355:function(t,e,n){var i=n(20453),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(e,t)?e[t]:void 0}},39870:function(t,e,n){var i=n(20453),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:r.call(e,t)}},73372:function(t,e,n){var i=n(20453);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},84257:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var i=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&e.test(t))&&t>-1&&t%1==0&&t<n}},67352:function(t,e,n){var i=n(25614),r=n(78371),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(i(t))return!1;var n=typeof t;return!!("number"==n||"symbol"==n||"boolean"==n||null==t||r(t))||a.test(t)||!s.test(t)||null!=e&&t in Object(e)}},7545:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},79551:function(t,e,n){var i,r=n(92077),s=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!s&&s in t}},35365:function(t){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},45669:function(t,e,n){var i=n(28302);t.exports=function(t){return t==t&&!i(t)}},62285:function(t){t.exports=function(){this.__data__=[],this.size=0}},28706:function(t,e,n){var i=n(24457),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=i(e,t);return!(n<0)&&(n==e.length-1?e.pop():r.call(e,n,1),--this.size,!0)}},63717:function(t,e,n){var i=n(24457);t.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}},78410:function(t,e,n){var i=n(24457);t.exports=function(t){return i(this.__data__,t)>-1}},13368:function(t,e,n){var i=n(24457);t.exports=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},38764:function(t,e,n){var i=n(9855),r=n(99078),s=n(88675);t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(s||r),string:new i}}},78615:function(t,e,n){var i=n(1507);t.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}},83391:function(t,e,n){var i=n(1507);t.exports=function(t){return i(this,t).get(t)}},53483:function(t,e,n){var i=n(1507);t.exports=function(t){return i(this,t).has(t)}},74724:function(t,e,n){var i=n(1507);t.exports=function(t,e){var n=i(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}},22523:function(t){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,i){n[++e]=[i,t]}),n}},47073:function(t){t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},23787:function(t,e,n){var i=n(50967);t.exports=function(t){var e=i(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}},20453:function(t,e,n){var i=n(39866)(Object,"create");t.exports=i},77184:function(t,e,n){var i=n(45070)(Object.keys,Object);t.exports=i},92147:function(t){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},39931:function(t,e,n){t=n.nmd(t);var i=n(17071),r=e&&!e.nodeType&&e,s=r&&t&&!t.nodeType&&t,a=s&&s.exports===r&&i.process,o=function(){try{var t=s&&s.require&&s.require("util").types;if(t)return t;return a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=o},45070:function(t){t.exports=function(t,e){return function(n){return t(e(n))}}},54351:function(t){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},16096:function(t){t.exports=function(t){return this.__data__.has(t)}},27794:function(t){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},84092:function(t,e,n){var i=n(99078);t.exports=function(){this.__data__=new i,this.size=0}},31663:function(t){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},69135:function(t){t.exports=function(t){return this.__data__.get(t)}},39552:function(t){t.exports=function(t){return this.__data__.has(t)}},63960:function(t,e,n){var i=n(99078),r=n(88675),s=n(76219);t.exports=function(t,e){var n=this.__data__;if(n instanceof i){var a=n.__data__;if(!r||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new s(a)}return n.set(t,e),this.size=n.size,this}},39365:function(t,e,n){var i=n(23787),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,a=i(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,function(t,n,i,r){e.push(i?r.replace(s,"$1"):n||t)}),e});t.exports=a},70235:function(t,e,n){var i=n(78371),r=1/0;t.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-r?"-0":e}},1292:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},79269:function(t){var e="\ud800-\udfff",n="\\u2700-\\u27bf",i="a-z\\xdf-\\xf6\\xf8-\\xff",r="A-Z\\xc0-\\xd6\\xd8-\\xde",s="\\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",a="['’]",o="["+s+"]",l="["+i+"]",c="[^"+e+s+"\\d+"+n+i+r+"]",u="(?:\ud83c[\udde6-\uddff]){2}",h="[\ud800-\udbff][\udc00-\udfff]",d="["+r+"]",f="(?:"+l+"|"+c+")",p="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",v="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",m="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",g="[\\ufe0e\\ufe0f]?",y="(?:\\u200d(?:"+["[^"+e+"]",u,h].join("|")+")"+g+m+")*",b="(?:"+["["+n+"]",u,h].join("|")+")"+(g+m+y),_=RegExp([d+"?"+l+"+"+p+"(?="+[o,d,"$"].join("|")+")","(?:"+d+"|"+c+")+"+v+"(?="+[o,d+f,"$"].join("|")+")",d+"?"+f+"+"+p,d+"+"+v,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",b].join("|"),"g");t.exports=function(t){return t.match(_)||[]}},42143:function(t,e,n){var i=n(62167),r=n(3641),s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.exports=function(t){return(t=r(t))&&t.replace(s,i).replace(a,"")}},37560:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},13735:function(t,e,n){var i=n(92167);t.exports=function(t,e,n){var r=null==t?void 0:i(t,e);return void 0===r?n:r}},17764:function(t,e,n){var i=n(93012),r=n(59592);t.exports=function(t,e){return null!=t&&r(t,e,i)}},79586:function(t){t.exports=function(t){return t}},56569:function(t,e,n){var i=n(90370),r=n(10303),s=Object.prototype,a=s.hasOwnProperty,o=s.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(t){return r(t)&&a.call(t,"callee")&&!o.call(t,"callee")};t.exports=l},25614:function(t){var e=Array.isArray;t.exports=e},5629:function(t,e,n){var i=n(86757),r=n(13973);t.exports=function(t){return null!=t&&r(t.length)&&!i(t)}},98051:function(t,e,n){t=n.nmd(t);var i=n(74288),r=n(7406),s=e&&!e.nodeType&&e,a=s&&t&&!t.nodeType&&t,o=a&&a.exports===s?i.Buffer:void 0,l=o?o.isBuffer:void 0;t.exports=l||r},86757:function(t,e,n){var i=n(54506),r=n(28302);t.exports=function(t){if(!r(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},13973:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},9792:function(t,e,n){var i=n(59332),r=n(23305),s=n(39931),a=s&&s.isTypedArray,o=a?r(a):i;t.exports=o},42798:function(t,e,n){var i=n(82638)(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()});t.exports=i},43228:function(t,e,n){var i=n(28579),r=n(4578),s=n(5629);t.exports=function(t){return s(t)?i(t):r(t)}},18587:function(t,e,n){var i=n(28579),r=n(22476),s=n(5629);t.exports=function(t){return s(t)?i(t,!0):r(t)}},50967:function(t,e,n){var i=n(76219);function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var a=t.apply(this,i);return n.cache=s.set(r,a)||s,a};return n.cache=new(r.Cache||i),n}r.Cache=i,t.exports=r},94686:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}},15302:function(t,e,n){var i=n(88157),r=n(94686),s=n(74539);t.exports=function(t,e){return s(t,r(i(e)))}},74539:function(t,e,n){var i=n(73819),r=n(88157),s=n(20702),a=n(75474);t.exports=function(t,e){if(null==t)return{};var n=i(a(t),function(t){return[t]});return e=r(e),s(t,n,function(t,n){return e(t,n[0])})}},22350:function(t,e,n){var i=n(18155),r=n(73584),s=n(67352),a=n(70235);t.exports=function(t){return s(t)?i(a(t)):r(t)}},55716:function(t){t.exports=function(){return[]}},7406:function(t){t.exports=function(){return!1}},3641:function(t,e,n){var i=n(65020);t.exports=function(t){return null==t?"":i(t)}},67512:function(t,e,n){var i=n(59652),r=n(27926),s=n(3641),a=n(79269);t.exports=function(t,e,n){return(t=s(t),void 0===(e=n?void 0:e))?r(t)?a(t):i(t):t.match(e)||[]}},52680:function(t,e){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(null,arguments)}Object.defineProperty(e,"__esModule",{value:!0}),e.extends=n},42586:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(23345),r=n(12579),s=n(73559),a=n(2791);e.useFormatter=i.useFormatter,e.useTranslations=i.useTranslations,e.useLocale=r.default,e.NextIntlClientProvider=s.default,Object.keys(a).forEach(function(t){"default"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})})},23345:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2791);function r(t,e){return function(){try{return e(...arguments)}catch(t){throw Error(void 0)}}}let s=r(0,i.useTranslations),a=r(0,i.useFormatter);e.useFormatter=a,e.useTranslations=s,Object.keys(i).forEach(function(t){"default"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})})},12579:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(99376),r=n(63513),s=n(42132);e.default=function(){let t;let e=i.useParams();try{t=r.useLocale()}catch(n){if("string"!=typeof(null==e?void 0:e[s.LOCALE_SEGMENT_NAME]))throw n;t=e[s.LOCALE_SEGMENT_NAME]}return t}},73559:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(52680),r=n(2265),s=n(54909),a=r&&r.__esModule?r:{default:r};e.default=function(t){let{locale:e,...n}=t;if(!e)throw Error(void 0);return a.default.createElement(s.IntlProvider,i.extends({locale:e},n))}},42132:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COOKIE_LOCALE_NAME="NEXT_LOCALE",e.COOKIE_MAX_AGE=31536e3,e.COOKIE_SAME_SITE="lax",e.HEADER_LOCALE_NAME="X-NEXT-INTL-LOCALE",e.LOCALE_SEGMENT_NAME="locale"},33145:function(t,e,n){"use strict";n.d(e,{default:function(){return r.a}});var i=n(48461),r=n.n(i)},99376:function(t,e,n){"use strict";n.r(e);var i=n(35475),r={};for(var s in i)"default"!==s&&(r[s]=(function(t){return i[t]}).bind(0,s));n.d(e,r)},48461:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){for(var n in e)Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}(e,{default:function(){return l},getImageProps:function(){return o}});let i=n(47043),r=n(55346),s=n(65878),a=i._(n(5084));function o(t){let{props:e}=(0,r.getImgProps)(t,{defaultLoader:a.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/invest/pds/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[t,n]of Object.entries(e))void 0===n&&delete e[t];return{props:e}}let l=s.Image},8727:function(t){"use strict";var e=Array.isArray,n=Object.keys,i=Object.prototype.hasOwnProperty,r="undefined"!=typeof Element;t.exports=function(t,s){try{return function t(s,a){if(s===a)return!0;if(s&&a&&"object"==typeof s&&"object"==typeof a){var o,l,c,u=e(s),h=e(a);if(u&&h){if((l=s.length)!=a.length)return!1;for(o=l;0!=o--;)if(!t(s[o],a[o]))return!1;return!0}if(u!=h)return!1;var d=s instanceof Date,f=a instanceof Date;if(d!=f)return!1;if(d&&f)return s.getTime()==a.getTime();var p=s instanceof RegExp,v=a instanceof RegExp;if(p!=v)return!1;if(p&&v)return s.toString()==a.toString();var m=n(s);if((l=m.length)!==n(a).length)return!1;for(o=l;0!=o--;)if(!i.call(a,m[o]))return!1;if(r&&s instanceof Element&&a instanceof Element)return s===a;for(o=l;0!=o--;)if(("_owner"!==(c=m[o])||!s.$$typeof)&&!t(s[c],a[c]))return!1;return!0}return s!=s&&a!=a}(t,s)}catch(t){if(t.message&&t.message.match(/stack|recursion/i)||-2146828260===t.number)return console.warn("Warning: react-fast-compare does not handle circular references.",t.name,t.message),!1;throw t}}},13126:function(t,e){"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,o=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case u:case h:case s:case o:case a:case f:return t;default:switch(t=t&&t.$$typeof){case c:case d:case m:case v:case l:return t;default:return e}}case r:return e}}}function x(t){return w(t)===h}e.AsyncMode=u,e.ConcurrentMode=h,e.ContextConsumer=c,e.ContextProvider=l,e.Element=i,e.ForwardRef=d,e.Fragment=s,e.Lazy=m,e.Memo=v,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(t){return x(t)||w(t)===u},e.isConcurrentMode=x,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===l},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return w(t)===d},e.isFragment=function(t){return w(t)===s},e.isLazy=function(t){return w(t)===m},e.isMemo=function(t){return w(t)===v},e.isPortal=function(t){return w(t)===r},e.isProfiler=function(t){return w(t)===o},e.isStrictMode=function(t){return w(t)===a},e.isSuspense=function(t){return w(t)===f},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===s||t===h||t===o||t===a||t===f||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===v||t.$$typeof===l||t.$$typeof===c||t.$$typeof===d||t.$$typeof===y||t.$$typeof===b||t.$$typeof===_||t.$$typeof===g)},e.typeOf=w},84851:function(t,e,n){"use strict";t.exports=n(13126)},54909:function(t,e,n){"use strict";t.exports=n(69362)},63513:function(t,e,n){"use strict";t.exports=n(526)},2791:function(t,e,n){"use strict";t.exports=n(13350)},76357:function(t,e,n){"use strict";var i=n(2265),r=n(23442);function s(){let t=i.useContext(r.IntlContext);if(!t)throw Error(void 0);return t}e.useIntlContext=s,e.useLocale=function(){return s().locale}},526:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(76357);n(2265),n(23442),e.useLocale=i.useLocale},14907:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(29303),r=n(47781);n(2265),n(63981),n(1360),e.IntlError=i.IntlError,e.IntlErrorCode=i.IntlErrorCode,e.createFormatter=i.createFormatter,e._createFormatters=r.createFormatters,e.initializeConfig=r.initializeConfig,e.createTranslator=function(t){let{_formatters:e=r.createFormatters(),getMessageFallback:n=r.defaultGetMessageFallback,messages:s,namespace:a,onError:o=r.defaultOnError,...l}=t;return function(t,e){let{messages:n,namespace:r,...s}=t;return n=n["!"],r=i.resolveNamespace(r,"!"),i.createBaseTranslator({...s,messages:n,namespace:r})}({...l,onError:o,formatters:e,getMessageFallback:n,messages:{"!":s},namespace:a?"!.".concat(a):"!"},0)}},29303:function(t,e,n){"use strict";var i,r=n(2265),s=n(63981),a=n(47781),o=s&&s.__esModule?s:{default:s};function l(t,e,n){var i;return(e="symbol"==typeof(i=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"))?i:i+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let c=((i={}).MISSING_MESSAGE="MISSING_MESSAGE",i.MISSING_FORMAT="MISSING_FORMAT",i.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",i.INSUFFICIENT_PATH="INSUFFICIENT_PATH",i.INVALID_MESSAGE="INVALID_MESSAGE",i.INVALID_KEY="INVALID_KEY",i.FORMATTING_ERROR="FORMATTING_ERROR",i);class u extends Error{constructor(t,e){let n=t;e&&(n+=": "+e),super(n),l(this,"code",void 0),l(this,"originalMessage",void 0),this.code=t,e&&(this.originalMessage=e)}}function h(t,e){return t?Object.keys(t).reduce((n,i)=>(n[i]={timeZone:e,...t[i]},n),{}):t}function d(t,e,n,i){let r=a.joinPath(i,n);if(!e)throw Error(r);let s=e;return n.split(".").forEach(e=>{let n=s[e];if(null==e||null==n)throw Error(r+" (".concat(t,")"));s=n}),s}let f=365/12*86400,p={second:1,seconds:1,minute:60,minutes:60,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:365/12*86400,months:365/12*86400,quarter:365/12*259200,quarters:365/12*259200,year:31536e3,years:31536e3};e.IntlError=u,e.IntlErrorCode=c,e.createBaseTranslator=function(t){let e=function(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a.defaultOnError;try{if(!e)throw Error(void 0);let i=n?d(t,e,n):e;if(!i)throw Error(n);return i}catch(e){let t=new u(c.MISSING_MESSAGE,e.message);return i(t),t}}(t.locale,t.messages,t.namespace,t.onError);return function(t){let{defaultTranslationValues:e,formats:n,formatters:i,getMessageFallback:s=a.defaultGetMessageFallback,locale:l,messagesOrError:f,namespace:p,onError:v,timeZone:m}=t;function g(t,e,n){let i=new u(e,n);return v(i),s({error:i,key:t,namespace:p})}function y(t,a,v){let y,b;if(f instanceof u)return s({error:f,key:t,namespace:p});try{y=d(l,f,t,p)}catch(e){return g(t,c.MISSING_MESSAGE,e.message)}if("object"==typeof y){let e;return g(t,Array.isArray(y)?c.INVALID_MESSAGE:c.INSUFFICIENT_PATH,e)}let _=function(t,e){if(e)return;let n=t.replace(/'([{}])/gi,"$1");return/<|{/.test(n)?void 0:n}(y,a);if(_)return _;try{b=i.getMessageFormat(y,l,function(t,e){let n=e?{...t,dateTime:h(t.dateTime,e)}:t,i=o.default.formats.date,r=e?h(i,e):i,s=o.default.formats.time,a=e?h(s,e):s;return{...n,date:{...r,...null==n?void 0:n.dateTime},time:{...a,...null==n?void 0:n.dateTime}}}({...n,...v},m),{formatters:{...i,getDateTimeFormat:(t,e)=>i.getDateTimeFormat(t,{timeZone:m,...e})}})}catch(e){return g(t,c.INVALID_MESSAGE,e.message)}try{let t=b.format(function(t){if(0===Object.keys(t).length)return;let e={};return Object.keys(t).forEach(n=>{let i,s=0,a=t[n];i="function"==typeof a?t=>{let e=a(t);return r.isValidElement(e)?r.cloneElement(e,{key:n+s++}):e}:a,e[n]=i}),e}({...e,...a}));if(null==t)throw Error(void 0);return r.isValidElement(t)||Array.isArray(t)||"string"==typeof t?t:String(t)}catch(e){return g(t,c.FORMATTING_ERROR,e.message)}}function b(t,e,n){let i=y(t,e,n);return"string"!=typeof i?g(t,c.INVALID_MESSAGE,void 0):i}return b.rich=y,b.markup=(t,e,n)=>{let i=y(t,e,n);if("string"!=typeof i){let e=new u(c.FORMATTING_ERROR,void 0);return v(e),s({error:e,key:t,namespace:p})}return i},b.raw=t=>{if(f instanceof u)return s({error:f,key:t,namespace:p});try{return d(l,f,t,p)}catch(e){return g(t,c.MISSING_MESSAGE,e.message)}},b}({...t,messagesOrError:e})},e.createFormatter=function(t){let{_formatters:e=a.createFormatters(),formats:n,locale:i,now:r,onError:s=a.defaultOnError,timeZone:o}=t;function l(t){var e;return null!==(e=t)&&void 0!==e&&e.timeZone||(o?t={...t,timeZone:o}:s(new u(c.ENVIRONMENT_FALLBACK,void 0))),t}function h(t,e,n,i){let r;try{r=function(t,e){let n;if("string"==typeof e){if(!(n=null==t?void 0:t[e])){let t=new u(c.MISSING_FORMAT,void 0);throw s(t),t}}else n=e;return n}(e,t)}catch(t){return i()}try{return n(r)}catch(t){return s(new u(c.FORMATTING_ERROR,t.message)),i()}}function d(t,r){return h(r,null==n?void 0:n.dateTime,n=>(n=l(n),e.getDateTimeFormat(i,n).format(t)),()=>String(t))}function v(){return r||(s(new u(c.ENVIRONMENT_FALLBACK,void 0)),new Date)}return{dateTime:d,number:function(t,r){return h(r,null==n?void 0:n.number,n=>e.getNumberFormat(i,n).format(t),()=>String(t))},relativeTime:function(t,n){try{var r;let s,a;let o={};n instanceof Date||"number"==typeof n?s=new Date(n):n&&(s=null!=n.now?new Date(n.now):v(),a=n.unit,o.style=n.style,o.numberingSystem=n.numberingSystem),s||(s=v());let l=(new Date(t).getTime()-s.getTime())/1e3;a||(a=function(t){let e=Math.abs(t);return e<60?"second":e<3600?"minute":e<86400?"hour":e<604800?"day":e<f?"week":e<31536e3?"month":"year"}(l)),o.numeric="second"===a?"auto":"always";let c=(r=a,Math.round(l/p[r]));return e.getRelativeTimeFormat(i,o).format(c,a)}catch(e){return s(new u(c.FORMATTING_ERROR,e.message)),String(t)}},list:function(t,r){let s=[],a=new Map,o=0;for(let e of t){let t;"object"==typeof e?(t=String(o),a.set(t,e)):t=String(e),s.push(t),o++}return h(r,null==n?void 0:n.list,t=>{let n=e.getListFormat(i,t).formatToParts(s).map(t=>"literal"===t.type?t.value:a.get(t.value)||t.value);return a.size>0?n:n.join("")},()=>String(t))},dateTimeRange:function(t,r,s){return h(s,null==n?void 0:n.dateTime,n=>(n=l(n),e.getDateTimeFormat(i,n).formatRange(t,r)),()=>[d(t),d(r)].join(" – "))}}},e.resolveNamespace=function(t,e){return t===e?void 0:t.slice((e+".").length)}},13350:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(29303),r=n(14907),s=n(47781),a=n(69362),o=n(38780),l=n(76357);n(2265),n(63981),n(1360),n(23442),e.IntlError=i.IntlError,e.IntlErrorCode=i.IntlErrorCode,e.createFormatter=i.createFormatter,e.createTranslator=r.createTranslator,e._createFormatters=s.createFormatters,e.initializeConfig=s.initializeConfig,e.IntlProvider=a.IntlProvider,e.useFormatter=o.useFormatter,e.useMessages=o.useMessages,e.useNow=o.useNow,e.useTimeZone=o.useTimeZone,e.useTranslations=o.useTranslations,e.useLocale=l.useLocale},38780:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(69362),r=n(76357),s=n(2265),a=n(29303);n(47781),n(1360),n(63981),n(23442);let o=!1,l="undefined"==typeof window;e.IntlProvider=i.IntlProvider,e.useLocale=r.useLocale,e.useFormatter=function(){let{formats:t,formatters:e,locale:n,now:i,onError:o,timeZone:l}=r.useIntlContext();return s.useMemo(()=>a.createFormatter({formats:t,locale:n,now:i,onError:o,timeZone:l,_formatters:e}),[t,e,i,n,o,l])},e.useMessages=function(){let t=r.useIntlContext();if(!t.messages)throw Error(void 0);return t.messages},e.useNow=function(t){let e=null==t?void 0:t.updateInterval,{now:n}=r.useIntlContext(),[i,a]=s.useState(n||new Date);return s.useEffect(()=>{if(!e)return;let t=setInterval(()=>{a(new Date)},e);return()=>{clearInterval(t)}},[n,e]),null==e&&n?n:i},e.useTimeZone=function(){return r.useIntlContext().timeZone},e.useTranslations=function(t){return function(t,e,n){let{defaultTranslationValues:i,formats:c,formatters:u,getMessageFallback:h,locale:d,onError:f,timeZone:p}=r.useIntlContext();return t=t["!"],e=a.resolveNamespace(e,"!"),p||o||!l||(o=!0,f(new a.IntlError(a.IntlErrorCode.ENVIRONMENT_FALLBACK,void 0))),s.useMemo(()=>a.createBaseTranslator({formatters:u,getMessageFallback:h,messages:t,defaultTranslationValues:i,namespace:e,onError:f,formats:c,locale:d,timeZone:p}),[u,h,t,i,e,f,c,d,p])}({"!":r.useIntlContext().messages},t?"!.".concat(t):"!",0)}},24894:function(t,e){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))(function(r,s){function a(t){try{l(i.next(t))}catch(t){s(t)}}function o(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,o)}l((i=i.apply(t,e||[])).next())})},s=this&&this.__generator||function(t,e){var n,i,r,s,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.toFormikValidate=e.toFormikValidationSchema=e.ValidationError=void 0;var a=function(t){function e(e){var n=t.call(this,e)||this;return n.name="ValidationError",n.inner=[],n}return i(e,t),e}(Error);e.ValidationError=a,e.toFormikValidationSchema=function(t,e){return{validate:function(n){return r(this,void 0,void 0,function(){return s(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,t.parseAsync(n,e)];case 1:return i.sent(),[3,3];case 2:var r,s;throw(s=new a((r=i.sent()).message)).inner=r.errors.map(function(t){return{message:t.message,path:t.path.join(".")}}),s;case 3:return[2]}})})}}},e.toFormikValidate=function(t,e){var n=this;return function(i){return r(n,void 0,void 0,function(){var n;return s(this,function(r){switch(r.label){case 0:return[4,t.safeParseAsync(i,e)];case 1:if(!(n=r.sent()).success)return[2,function(t){for(var e={},n=0,i=t.errors;n<i.length;n++){var r=i[n];e[r.path.filter(Boolean).join(".")]=r.message}return e}(n.error)];return[2]}})})}}},83140:function(){},89361:function(){},47874:function(){},60625:function(){},40261:function(){},90882:function(){},31444:function(){},73923:function(){},11712:function(){},17046:function(){},50230:function(){},69061:function(){},83002:function(){},25546:function(){},62371:function(){},44364:function(){},85379:function(){},50336:function(){},88591:function(){},90542:function(){},17710:function(){},48917:function(){},64851:function(){},28526:function(){},79325:function(){},32905:function(){},17350:function(){},84074:function(){},44732:function(){},95987:function(){},94250:function(){},3054:function(){},38018:function(){},57390:function(){},87538:function(){},91823:function(){},57705:function(){},4026:function(){},9894:function(){},69433:function(){},59065:function(){},67356:function(t,e,n){"use strict";n.d(e,{g:function(){return r}});var i=n(32464);let r=async(t,e="common",n="v1")=>{try{let r=await fetch((0,i.xn)(t,`api/${n}/login-widget`,e));return r.ok?await r.json():(console.error(`Ошибка ${r.status} при загрузке конфига для ${e}`),{})}catch(t){return console.error(`Сетевая ошибка при загрузке конфига для ${e}`,t),{}}}},20034:function(t,e,n){"use strict";let i;n.d(e,{U:function(){return rY}});var r,s,a,o,l=n(57437),c=n(2265),u=n(98160),h=n(60885),d=n(33054),f=n(61896),p=n(64242),v=n(97859),m=n(18550),g=n(45823),y=n(90388);let b=(0,y.g)("tooltip"),_=Object.freeze({tooltip:b,text:"".concat(b,"__text"),wrapper:"".concat(b,"__wrapper"),inverted:"".concat(b,"--inverted")}),w="M8 10C6 12.58 3.43 16 0 16L16 16C12.58 16 10 12.58 8 10Z";n(59065);let x=t=>{let{children:e,moveToBody:n}=t;return n?(0,l.jsx)(f.ll,{id:"finkit-tooltips",children:e}):(0,l.jsx)(l.Fragment,{children:e})},k=(0,c.forwardRef)((t,e)=>{let{position:n="top",text:i,zIndex:r=1,inverted:s,withoutTail:a,children:o,boundingOffset:u=12,boundaryPadding:h,moveToBody:d=!1,hideWhenOutOfBounds:y=!1,style:b,className:k,dataQa:C,dataId:j,...M}=t,[E,S]=(0,c.useState)(!1),N=(0,c.useRef)(null),{refs:T,floatingStyles:O,context:L,middlewareData:A}=(0,f.YF)({open:E,onOpenChange:S,placement:n,whileElementsMounted:p.Me,middleware:[(0,v.cv)({mainAxis:u}),(0,v.RR)({fallbackAxisSideDirection:"start",crossAxis:!1,...void 0!==h&&{padding:h}}),(0,v.uY)({...void 0!==h&&{padding:h}}),(0,v.x7)({element:N,padding:8}),...y?[(0,v.Cp)({strategy:"escaped",padding:-24})]:[]]}),R=(0,f.XI)(L,{delay:300}),{getReferenceProps:I,getFloatingProps:D}=(0,f.NI)([R]),P=(0,f.Y_)(L,{duration:300});return(0,c.useImperativeHandle)(e,()=>({getActivatorElement:T.reference,getTooltipElement:T.floating})),(0,c.useEffect)(()=>{var t;(null==(t=A.hide)?void 0:t.escaped)&&S(!1)},[A.hide]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{"data-qa":(0,g.g)("".concat(C,"-activator"),!!C),ref:T.setReference,...I,className:_.wrapper,children:o}),P.isMounted&&(0,l.jsx)(x,{moveToBody:d,children:(0,l.jsxs)("div",{role:"tooltip",ref:T.setFloating,style:{...O,...P.styles,...b,zIndex:r},className:(0,m.Z)(_.tooltip,k,{[_.inverted]:s}),...D,...M,"data-qa":C,"data-id":j,children:[(0,l.jsx)("span",{className:(0,m.Z)(_.text,{[_.inverted]:s}),children:i}),!a&&(0,l.jsx)(f.Y$,{ref:N,context:L,width:16,d:w,fill:s?"var(--color-white)":"var(--color-black-500)"})]})})]})});k.displayName="Tooltip";var C=function(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=function t(e){var n,i,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e){if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(i=t(e[n]))&&(r&&(r+=" "),r+=i);else for(n in e)e[n]&&(r&&(r+=" "),r+=n)}return r}(t))&&(i&&(i+=" "),i+=e);return i},j=n(32464),M=n(77046),E=n(4569);let S=Object.freeze({xs:Object.freeze({maxWidth:599}),s:Object.freeze({minWidth:600,maxWidth:767}),m:Object.freeze({minWidth:768,maxWidth:1023}),l:Object.freeze({minWidth:1024,maxWidth:1279}),xl:Object.freeze({minWidth:1280,maxWidth:1439}),"2xl":Object.freeze({minWidth:1440,maxWidth:1919}),"3xl":Object.freeze({minWidth:1920})}),N=Object.freeze(Object.keys(S));function T(){return"undefined"==typeof window}Object.freeze(N.filter(t=>"xs"!==t)),Object.freeze(N.filter(t=>"3xl"!==t));let O=T()?c.useLayoutEffect:c.useEffect;function L(t,e=!1){return T()?e:window.matchMedia(t).matches}var A=n(73354),R=n(95512),I=n(26675),D=n(97339);n(83140);let P=(0,y.g)("accordion"),Z=(0,y.g)("accordion-item"),F=Object.freeze({accordionItem:Z,accordionItemInner:"".concat(Z,"__inner"),body:"".concat(Z,"__body"),header:"".concat(Z,"__header"),content:"".concat(Z,"__content"),contentInner:"".concat(Z,"__content-inner"),controlIcon:"".concat(Z,"__control-icon"),titleWrapper:"".concat(Z,"__title-wrapper"),title:"".concat(Z,"__title"),icon:"".concat(Z,"__icon"),toggleIcon:"".concat(Z,"__toggle-icon"),subTitle:"".concat(Z,"__subtitle"),caption:"".concat(Z,"__caption"),states:{disabled:"".concat(Z,"--disabled"),active:"".concat(Z,"--active"),focused:"".concat(Z,"--focused"),withControl:"".concat(Z,"--with-control"),withIcon:"".concat(Z,"--with-icon")}}),$=Object.freeze({accordion:P,withoutOutline:"".concat(P,"--without-outline"),variants:{primary:"".concat(P,"--primary"),secondary:"".concat(P,"--secondary")}});function z(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"m17.03 11.28-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 1 1 1.06-1.06L12 14.19l3.97-3.97a.75.75 0 1 1 1.06 1.06Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}(0,c.forwardRef)((t,e)=>{let{multiple:n=!1,children:i,activeIndex:r,defaultActiveIndex:s=[],className:a,variant:o="primary",withoutOutline:u=!1,style:h,dataQa:d,dataId:f,onTabToggle:p,...v}=t,[g,y]=(0,c.useState)(s),b=(0,R.i)(r),_=b?r:g,w=(t,e)=>{if(b){let i=x(_,t,n);null==p||p(i,e)}else y(e=>x(e,t,n))},x=(t,e,n)=>n?t.includes(e)?t.filter(t=>t!==e):[...t,e]:t.includes(e)?[]:[e];return(0,l.jsx)("div",{ref:e,className:(0,m.Z)(a,$.accordion,$.variants[o],{[$.withoutOutline]:u}),style:h,...v,"data-id":f,"data-qa":d,children:c.Children.map(i,t=>(0,c.isValidElement)(t)?(0,c.cloneElement)(t,{isActive:_.includes(t.props.id),onToggle:e=>{w(t.props.id,e)}}):t)})}).displayName="Accordion";let B=t=>{let e=Array.from(document.querySelectorAll("[data-accordion-index]"));if(0===e.length)return;let n=e.findIndex(t=>t===document.activeElement),i=n;switch(t){case"next":i=(n+1)%e.length;break;case"previous":i=(n-1+e.length)%e.length}let r=0;for(;r++<e.length;){let n=e[i];if("true"!==n.getAttribute("data-disabled")){n.focus();return}i=(i+("next"===t?1:-1)+e.length)%e.length}};function V(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M7.22 7.22a.743.743 0 0 1 1.06 0L12 10.94l3.72-3.72a.743.743 0 0 1 1.06 0 .742.742 0 0 1 0 1.06L13.061 12l3.72 3.72a.743.743 0 0 1 0 1.06.743.743 0 0 1-1.061 0L12 13.06l-3.72 3.72a.743.743 0 0 1-1.06 0 .743.743 0 0 1 0-1.06L10.94 12 7.22 8.28a.743.743 0 0 1 0-1.06Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}(0,c.forwardRef)((t,e)=>{let{id:n,title:i,tagTitle:r="span",subTitle:s,disabled:a=!1,isActive:o=!1,icon:u,controlIcon:h,errorMessage:d,children:f,className:p,style:v,dataQa:g,dataId:y,onControlClick:b,onToggle:_,...w}=t,x=(0,c.useRef)(null),k=(0,c.useRef)(null),C=(0,c.useRef)(null);(0,c.useEffect)(()=>{let t=x.current,e=k.current;if(!t||!e)return;t.style.minHeight=o?e.scrollHeight+"px":"0",t.style.height=o?e.scrollHeight+"px":"0";let n=new ResizeObserver(()=>{o&&(t.style.minHeight=e.scrollHeight+"px",t.style.height=e.scrollHeight+"px")});return n.observe(e),()=>n.disconnect()},[o]);let j=!h&&!!u;return(0,l.jsxs)("div",{ref:e,className:(0,m.Z)(p,F.accordionItem),style:v,...w,"data-id":y,"data-qa":g,children:[(0,l.jsx)("div",{className:(0,m.Z)(F.accordionItemInner),children:(0,l.jsxs)("div",{className:(0,m.Z)(F.body,[{[F.states.disabled]:a}]),children:[(0,l.jsxs)("button",{type:"button","aria-expanded":o,"aria-disabled":a,"data-disabled":a,"data-accordion-index":n,className:(0,m.Z)(F.header,[{[F.states.active]:o}]),tabIndex:a?-1:0,onClick:a?void 0:_,ref:C,disabled:a,onKeyDown:t=>{if(!a)switch(t.key){case"Enter":case" ":t.preventDefault(),null==_||_(t);break;case"ArrowDown":t.preventDefault(),B("next");break;case"ArrowUp":t.preventDefault(),B("previous")}},children:[(0,l.jsxs)("div",{className:(0,m.Z)(F.titleWrapper),children:[j&&(0,l.jsx)("span",{className:F.icon,children:u}),(0,l.jsx)(r,{className:(0,m.Z)(F.title,{[F.states.withControl]:h}),children:i}),(0,l.jsx)(D.P,{className:(0,m.Z)(F.toggleIcon,[{[F.states.active]:o},{[F.states.withControl]:h}]),children:(0,l.jsx)(z,{})}),h&&(0,l.jsx)(D.P,{className:F.controlIcon,onClick:t=>{var e;h&&t.stopPropagation(),null==(e=C.current)||e.blur(),null==b||b(t)},children:h})]}),s&&(0,l.jsx)("span",{className:(0,m.Z)(F.subTitle,[{[F.states.withIcon]:j}]),children:s})]}),(0,l.jsx)("div",{className:(0,m.Z)(F.content),style:{overflow:"hidden"},"aria-hidden":!o,ref:x,children:(0,l.jsx)("div",{className:F.contentInner,ref:k,children:f})})]})}),d&&(0,l.jsx)(I.C,{withoutIcon:!0,state:"error",text:d})]})}).displayName="AccordionItem",n(5795),n(29832);var U=n(54428);function q(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M10.25 5.75c0 .414.336.75.75.75h5.44L5.22 17.72a.75.75 0 1 0 1.06 1.06L17.5 7.56V13a.75.75 0 0 0 1.5 0V5.75a.75.75 0 0 0-.75-.75H11a.75.75 0 0 0-.75.75Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}n(20746),n(95925),n(96777),n(52475),n(79325);let W=(0,y.g)("link"),H=Object.freeze({link:W,states:{inverted:"".concat(W,"--inverted"),disabled:"".concat(W,"--disabled")},content:"".concat(W,"__content"),icon:"".concat(W,"__icon"),size:{s:"".concat(W,"--s"),m:"".concat(W,"--m")}});function G(t){let{as:e,size:n="m",withIcon:i=!1,children:r,disabled:s,text:a,inverted:o,onClick:c,className:u,style:h,dataQa:d,dataId:f,...p}=t,v=(0,m.Z)(H.link,{[H.states.inverted]:o,[H.states.disabled]:s},H.size[n],u),g=a||r;return(0,l.jsx)(e||"a",{className:v,disabled:s,style:h,onClick:c,"aria-disabled":s,tabIndex:s?-1:0,...p,"data-id":f,"data-qa":d,children:i?(0,l.jsxs)("span",{className:H.content,children:[g,(0,l.jsx)(D.P,{className:H.icon,children:(0,l.jsx)(q,{})})]}):g})}function Y(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("defs",null,c.createElement("clipPath",{id:"a"},c.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),c.createElement("g",{clipPath:"url(#a)"},c.createElement("path",{d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm1.5 0a8.5 8.5 0 1 1 17 0 8.5 8.5 0 0 1-17 0Zm12.28-2.72L13.06 12l2.72 2.72a.743.743 0 0 1 0 1.06.742.742 0 0 1-1.06 0L12 13.06l-2.72 2.72a.743.743 0 0 1-1.06 0 .743.743 0 0 1 0-1.06L10.94 12 8.22 9.28a.743.743 0 0 1 0-1.06.743.743 0 0 1 1.06 0L12 10.94l2.72-2.72a.743.743 0 0 1 1.06 0 .743.743 0 0 1 0 1.06Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})))}function K(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10a9.971 9.971 0 0 0 7.071-2.929A9.97 9.97 0 0 0 22 12c0-5.523-4.477-10-10-10ZM3.5 12a8.5 8.5 0 1 1 17 0 8.5 8.5 0 0 1-17 0ZM12 7.5a1 1 0 1 0 .002 2 1 1 0 0 0-.003-2Zm-1.5 4.25a.75.75 0 0 1 .75-.75h1a.75.75 0 0 1 .75.75v4.5a.75.75 0 1 1-1.5 0V12.5h-.25a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}G.displayName="Link",n(89361);let Q=(0,y.g)("alert"),X=Object.freeze({alert:Q,closeIcon:"".concat(Q,"__close-icon"),icon:"".concat(Q,"__icon"),label:"".concat(Q,"__label"),content:"".concat(Q,"__content"),textBlock:"".concat(Q,"__text-block"),caption:"".concat(Q,"__caption"),link:"".concat(Q,"__link"),button:"".concat(Q,"__button"),state:{default:"".concat(Q,"--default"),success:"".concat(Q,"--success"),warning:"".concat(Q,"--warning"),error:"".concat(Q,"--error"),info:"".concat(Q,"--info")},size:{s:"".concat(Q,"--s"),m:"".concat(Q,"--m")},variant:{primary:"".concat(Q,"--primary"),secondary:"".concat(Q,"--secondary"),green:"".concat(Q,"--green"),verdant:"".concat(Q,"--verdant"),avocado:"".concat(Q,"--avocado"),yellow:"".concat(Q,"--yellow"),orange:"".concat(Q,"--orange"),blue:"".concat(Q,"--blue"),purple:"".concat(Q,"--purple")},fill:"".concat(Q,"--fill")}),J=(0,c.forwardRef)((t,e)=>{let{label:n,state:i="default",variant:r="primary",size:s="m",outline:a=!0,caption:o,linkText:c,linkHref:u,onLinkClick:h,withLinkIcon:d=!1,icon:f,withIcon:p=!1,withClose:v=!1,buttonText:y,buttonVariant:b="primary",className:_,style:w,onClose:x,onButtonClick:k,dataQa:C,dataId:j,...M}=t,S={default:(0,l.jsx)(K,{}),success:(0,l.jsx)(I.a,{}),warning:(0,l.jsx)(I.S,{}),error:(0,l.jsx)(Y,{}),info:(0,l.jsx)(K,{})};return(0,l.jsxs)("div",{ref:e,className:(0,m.Z)(X.alert,X.variant[r],X.size[s],{[X.state[i]]:a},_),style:w,...M,"data-id":j,"data-qa":C,children:[(0,l.jsxs)("div",{className:X.content,children:[p&&(0,l.jsx)(D.P,{className:(0,m.Z)(X.icon,{[X.state[i]]:!f}),children:f||S[i]}),(0,l.jsxs)("div",{className:X.textBlock,children:[n&&(0,l.jsx)("span",{"data-qa":(0,g.g)("".concat(C,"-label"),!!C),className:X.label,children:n}),o&&(0,l.jsx)(I.C,{dataQa:(0,g.g)("".concat(C,"-caption"),!!C),text:o,lineClamp:3,size:s,className:X.caption}),c&&(0,l.jsx)(G,{dataQa:(0,g.g)("".concat(C,"-link"),!!C),href:u,className:X.link,onClick:h,withIcon:d,children:c})]}),v&&(0,l.jsx)("button",{"data-qa":(0,g.g)("".concat(C,"-close"),!!C),type:"button",className:X.closeIcon,onClick:x,children:(0,l.jsx)(D.P,{children:(0,l.jsx)(V,{})})})]}),y&&(0,l.jsx)(E.B,{dataQa:(0,g.g)("".concat(C,"-button"),!!C),label:y,variant:b,size:"xs",className:X.button,onClick:k})]})});J.displayName="Alert";var tt=n(16372),te=n(3385);n(47874);let tn=(0,y.g)("breadcrumbs"),ti={breadcrumbs:tn,breadcrumbsEllipsis:"".concat(tn,"--ellipsis"),displayOne:"".concat(tn,"--display-one"),list:"".concat(tn,"__list"),mobileList:"".concat(tn,"__list--mobile"),desktopList:"".concat(tn,"__list--desktop"),item:"".concat(tn,"__item"),customItem:"".concat(tn,"__item--custom"),link:"".concat(tn,"__link"),linkLabel:"".concat(tn,"__link-label"),text:"".concat(tn,"__text"),separator:"".concat(tn,"__separator"),backIcon:"".concat(tn,"__back-icon"),iconMobile:"".concat(tn,"__icon--mobile"),iconDesktop:"".concat(tn,"__icon--desktop")},tr=function(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;return n||i?{label:n||"Назад",href:"object"!=typeof i?i||"#":void 0,customLink:"object"==typeof i?i:void 0}:e.length&&e.length>1?(null==(t=e[e.length-1])?void 0:t.href)?e[e.length-1]:e[e.length-2]:{label:e[0].label||"Назад",href:e[0].href||"#",customLink:e[0].customLink}};function ts(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M8.22 12.53a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 1 1 1.06 1.06L9.81 12l3.97 3.97a.75.75 0 1 1-1.06 1.06l-4.5-4.5Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}function ta(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"m11.28 17.03 4.5-4.5a.75.75 0 0 0 0-1.06l-4.5-4.5a.75.75 0 1 0-1.06 1.06L14.19 12l-3.97 3.97a.75.75 0 1 0 1.06 1.06Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}let to=t=>{let{item:e,isBackward:n=!1,isLast:i,dataQa:r,onClick:s}=t;return(0,l.jsx)(l.Fragment,{children:e.href||e.customLink?(0,l.jsxs)(l.Fragment,{children:[e.customLink?(0,l.jsx)(l.Fragment,{children:e.customLink}):(0,l.jsxs)("a",{href:e.href,"data-qa":r,className:ti.link,title:e.label,onClick:s?t=>s(t,e.href):void 0,children:[n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(D.P,{className:(0,m.Z)(ti.backIcon,ti.iconDesktop),children:(0,l.jsx)(tt.S,{})}),(0,l.jsx)(D.P,{className:(0,m.Z)(ti.backIcon,ti.iconMobile),children:(0,l.jsx)(ts,{})})]}),(0,l.jsx)("span",{className:ti.linkLabel,children:e.label})]}),!n&&!i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(D.P,{className:(0,m.Z)(ti.separator,ti.iconDesktop),children:(0,l.jsx)(te.S,{})}),(0,l.jsx)(D.P,{className:(0,m.Z)(ti.separator,ti.iconMobile),children:(0,l.jsx)(ta,{})})]})]}):(0,l.jsx)("span",{"aria-current":"page","data-qa":r,className:ti.text,title:e.label,children:e.label})})};to.displayName="BreadcrumbsLink";let tl=t=>{let{items:e=[],dataQa:n,backwardHref:i,backwardLabel:r,onClick:s}=t,a=(0,c.useRef)(null),o=(0,c.useCallback)(t=>{var e;let n=a.current;if(!n)return;let i=(null==t?void 0:t.target).closest("a");if(!i)return;let r=n.getBoundingClientRect(),s=i.getBoundingClientRect();n.scrollTo({left:s.left-r.left-8+(null!==(e=n.scrollLeft)&&void 0!==e?e:0),behavior:"smooth"})},[]),u=tr(e,r,i),h=(t,e)=>{o(t),null==s||s(t,e)};return(0,l.jsx)("ul",{ref:a,className:(0,m.Z)(ti.list,ti.desktopList),"data-qa":(0,g.g)("".concat(n,"-desktop-list"),!!n),children:1===e.length||i||r?(0,l.jsx)("li",{className:(0,m.Z)(ti.item),children:(0,l.jsx)(to,{isBackward:!0,dataQa:(0,g.g)("".concat(n,"-link"),!!n),item:u,onClick:h})}):(0,l.jsx)(l.Fragment,{children:e.map((t,i)=>(0,l.jsx)("li",{className:(0,m.Z)(ti.item,{[ti.customItem]:t.customLink}),children:(0,l.jsx)(to,{item:t,dataQa:(0,g.g)("".concat(n,"-link-").concat(++i),!!n),isLast:i===e.length,onClick:h})},"".concat(t.label,"--").concat(i)))})})};tl.displayName="DesktopBreadcrumbs";let tc=t=>{let{items:e=[],backwardLabel:n,backwardHref:i,dataQa:r,onClick:s}=t,a=tr(e,n,i);return(0,l.jsx)("ul",{className:(0,m.Z)(ti.list,ti.mobileList),"data-qa":(0,g.g)("".concat(r,"-mobile-list"),!!r),children:(0,l.jsx)("li",{className:(0,m.Z)(ti.item),children:(0,l.jsx)(to,{isBackward:!0,dataQa:(0,g.g)("".concat(r,"-link"),!!r),item:a,onClick:s})})})};tc.displayName="MobileBreadcrumbs",(0,c.forwardRef)((t,e)=>{let{items:n=[],isMobile:i,onClick:r,backwardLabel:s,backwardHref:a,style:o,className:c,ellipsis:u=!1,isFullView:h=!1,dataQa:d,dataId:f,...p}=t,v=n.length||s||a;return(0,l.jsx)(l.Fragment,{children:v&&(0,l.jsxs)("nav",{ref:e,"aria-label":"breadcrumbs",className:(0,m.Z)(ti.breadcrumbs,{[ti.displayOne]:void 0===i&&!h,[ti.breadcrumbsEllipsis]:u},c),style:o,...p,"data-id":f,"data-qa":d,children:[!0!==i&&(0,l.jsx)(tl,{items:n,dataQa:d,backwardLabel:s,backwardHref:a,onClick:r||void 0}),!1!==i&&!h&&(0,l.jsx)(tc,{items:n,dataQa:d,backwardLabel:s,backwardHref:a,onClick:r||void 0})]})})}).displayName="Breadcrumbs";var tu=n(9645);n(40261);let th=(0,y.g)("calendar"),td=Object.freeze({calendar:th,header:"".concat(th,"__header"),headerText:"".concat(th,"__header-text"),headerButton:"".concat(th,"__header-button"),headerButtonPrev:"".concat(th,"__header-button--prev"),headerButtonNext:"".concat(th,"__header-button--next"),headerButtonDisabled:"".concat(th,"__header-button--disabled"),weekDays:"".concat(th,"__week-days"),weekDay:"".concat(th,"__week-day"),weekDayOff:"".concat(th,"__week-day--off"),content:"".concat(th,"__content"),days:"".concat(th,"__days"),day:"".concat(th,"__day"),currentDay:"".concat(th,"__day--current"),otherDay:"".concat(th,"__day--other"),selectedDay:"".concat(th,"__day--selected"),previewDay:"".concat(th,"__day--preview"),rangeDay:"".concat(th,"__day--range"),startRangeDay:"".concat(th,"__day--start-range"),endRangeDay:"".concat(th,"__day--end-range"),disabledDay:"".concat(th,"__day--disabled"),emptyDay:"".concat(th,"__day--empty"),events:"".concat(th,"__day-events"),event:"".concat(th,"__day-event"),months:"".concat(th,"__months"),month:"".concat(th,"__month"),disabledMonth:"".concat(th,"__month--disabled"),currentMonth:"".concat(th,"__month--current"),selectedMonth:"".concat(th,"__month--selected"),years:"".concat(th,"__years"),year:"".concat(th,"__year"),disabledYear:"".concat(th,"__year--disabled"),currentYear:"".concat(th,"__year--current"),selectedYear:"".concat(th,"__year--selected")}),tf=Object.freeze({days:"days",months:"months",years:"years"}),tp=["пн","вт","ср","чт","пт","сб","вс"],tv=["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"],tm=t=>{if(t instanceof Date&&!isNaN(t.getTime()))return new Date(t.getFullYear(),t.getMonth(),1);if(Array.isArray(t)&&t.length>0){let e=new Date(t[0]);if(!isNaN(e.getTime()))return new Date(e.getFullYear(),e.getMonth(),1)}return new Date},tg=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),ty=t=>{let e=String(t.getDate()).padStart(2,"0"),n=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return"".concat(e,".").concat(n,".").concat(i)},tb=t=>{let e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(i)},t_=(t,e)=>{if(0===t.length)return"";if(e){if(1===t.length)return ty(t[0]);let e=[...t].sort((t,e)=>t.getTime()-e.getTime());return"".concat(ty(e[0])," - ").concat(ty(e[1]))}return t.length>0?ty(t[0]):""},tw=(t,e,n)=>{if(e.length<2)return!1;let i=n(t),r=n(e[0]),s=n(e[1]);return i>=r&&i<=s},tx=(t,e,n,i)=>{if(1!==e.length||!n)return!1;let r=i(t),s=i(e[0]),a=i(n);return r>=(s<a?s:a)&&r<=(s<a?a:s)},tk=t=>{let{events:e=[]}=t,n=e.slice(0,6);return(0,l.jsx)("span",{className:td.events,children:n.map(t=>(0,l.jsx)("span",{className:(0,m.Z)(td.event,"".concat(td.event,"--").concat(t))},"calendar--".concat(t)))})},tC=()=>(0,l.jsx)("div",{className:td.weekDays,children:tp.map((t,e)=>(0,l.jsx)(d.T,{className:(0,m.Z)(td.weekDay,{[td.weekDayOff]:5===e||6===e}),size:"14",children:t},"week-day--".concat(t)))}),tj=t=>{let{currentDate:e,today:n,selectedDates:i,hoveredDate:r,minAllowedDate:s,maxAllowedDate:a,multiple:o,showCurrentDay:c,showOutsideDays:u,events:h,onDateSelect:d,onDateHover:f}=t,p=e.getFullYear(),v=e.getMonth(),g=new Date(p,v,1),y=new Date(p,v+1,0),b=g.getDay();b=0===b?6:--b;let _=y.getDate(),w=[];if(u){let t=new Date(p,v,0).getDate();for(let e=0;e<b;e++)w.push(new Date(p,v-1,t-e));w.reverse()}else for(let t=0;t<b;t++)w.push(null);let x=Array.from({length:_},(t,e)=>new Date(p,v,e+1));w.push(...x);let k=42-w.length;if(u)for(let t=1;t<=k;t++)w.push(new Date(p,v+1,t));else for(let t=0;t<k;t++)w.push(null);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tC,{}),(0,l.jsx)("div",{className:(0,m.Z)(td.days,[]),children:w.map(t=>{if(!t)return(0,l.jsx)("div",{className:td.emptyDay},"calendar-empty-".concat((0,tu.g)()));let e=tg(t),g=tg(s),y=tg(a),b=u&&(t.getMonth()!==v||t.getFullYear()!==p),_=e<g||e>y,w=i.some(t=>tg(t).getTime()===e.getTime()),x=o&&tw(t,i,tg),k=o&&tx(t,i,r,tg),C=c&&e.getTime()===tg(n).getTime(),j=o&&i.length>=1&&tg(i[0]).getTime()===e.getTime(),M=o&&2===i.length&&tg(i[1]).getTime()===e.getTime(),E=tb(t);return(0,l.jsxs)("button",{type:"button",disabled:_,className:(0,m.Z)(td.day,{[td.otherDay]:b,[td.selectedDay]:w,[td.currentDay]:C,[td.rangeDay]:x,[td.previewDay]:k,[td.startRangeDay]:j,[td.endRangeDay]:M,[td.disabledDay]:_}),onClick:()=>!_&&d(t),onMouseEnter:()=>!_&&f(t),onMouseLeave:()=>f(null),children:[t.getDate(),h[E]&&(0,l.jsx)(tk,{events:h[E]})]},"calendar--day--".concat(t.getTime()))})})]})},tM=t=>{let{view:e,currentDate:n,canNavigatePrev:i,canNavigateNext:r,onNavigate:s,onViewChange:a}=t;return(0,l.jsxs)("div",{className:td.header,children:[(0,l.jsx)("button",{className:(0,m.Z)(td.headerButton,td.headerButtonPrev,{[td.headerButtonDisabled]:!i}),type:"button",disabled:!i,onClick:()=>s("prev"),children:(0,l.jsx)(D.P,{style:{fontSize:24},children:(0,l.jsx)(tt.S,{})})}),(0,l.jsx)("button",{type:"button",className:(0,m.Z)(td.headerButton,td.headerText),onClick:a,children:(()=>{switch(e){case tf.days:return n.toLocaleDateString("ru-RU",{month:"long",year:"numeric"});case tf.months:return n.getFullYear().toString();case tf.years:return"".concat(n.getFullYear()-14," - ").concat(n.getFullYear()+5);default:return""}})()}),(0,l.jsx)("button",{className:(0,m.Z)(td.headerButton,td.headerButtonNext,{[td.headerButtonDisabled]:!r}),type:"button",disabled:!r,onClick:()=>s("next"),children:(0,l.jsx)(D.P,{style:{fontSize:24},children:(0,l.jsx)(te.S,{})})})]})},tE=t=>{let{today:e,currentDate:n,selectedDates:i,minAllowedDate:r,maxAllowedDate:s,showCurrentMonth:a,onMonthSelect:o}=t,c=Array.from({length:12},(t,e)=>new Date(n.getFullYear(),e,1)),u=r.getFullYear(),h=s.getFullYear();return(0,l.jsx)("div",{className:td.months,children:c.map((t,n)=>{let c=tg(r),d=tg(s),f=new Date(t.getFullYear(),t.getMonth(),1),p=new Date(t.getFullYear(),t.getMonth()+1,0)<c||f>d||t.getFullYear()<u||t.getFullYear()>h,v=a&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear(),g=i.some(e=>e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear());return(0,l.jsx)("button",{type:"button",disabled:p,className:(0,m.Z)(td.month,{[td.currentMonth]:v,[td.selectedMonth]:g,[td.disabledMonth]:p}),onClick:()=>{p||o(t)},children:tv[n]},"calendar--month--".concat(t.getTime()))})})},tS=t=>{let{currentDate:e,today:n,selectedDates:i,minAllowedDate:r,maxAllowedDate:s,showCurrentYear:a,onYearSelect:o}=t,c=e.getFullYear()-14,u=Array.from({length:20},(t,e)=>c+e),h=r.getFullYear(),d=s.getFullYear(),f=i.map(t=>t.getFullYear());return(0,l.jsx)("div",{className:td.years,children:u.map(t=>{let e=new Date(t,0,1),i=new Date(t,11,31),c=tg(r),u=tg(s),p=i<c||e>u||t<h||t>d,v=a&&t===n.getFullYear(),g=f.includes(t);return(0,l.jsx)("button",{type:"button",disabled:p,className:(0,m.Z)(td.year,{[td.currentYear]:v,[td.selectedYear]:g,[td.disabledYear]:p}),onClick:()=>{p||o(t)},children:t},"calendar--".concat(t))})})};(0,c.forwardRef)((t,e)=>{let{value:n=null,minAllowedDate:i,maxAllowedDate:r,multiple:s=!1,showCurrentDay:a=!0,showCurrentMonth:o=!0,showCurrentYear:u=!0,showOutsideDays:h=!1,events:d={},className:f,style:p,dataId:v,dataQa:g,onChange:y,...b}=t,[_]=(0,c.useState)(()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate())}),[w,x]=(0,c.useState)("days"),[k,C]=(0,c.useState)(()=>tm(n)),[j,M]=(0,c.useState)([]),[E,S]=(0,c.useState)(null),N=(0,c.useMemo)(()=>tg(i instanceof Date&&!isNaN(i.getTime())?i:new Date(1900,0,1)),[i]),T=(0,c.useMemo)(()=>tg(r instanceof Date&&!isNaN(r.getTime())?r:new Date(new Date().setFullYear(new Date().getFullYear()+100))),[r]),O=(0,c.useRef)(!1);(0,c.useEffect)(()=>{if(null===n){M([]);return}if(void 0===n)return;M(Array.isArray(n)?n.map(t=>new Date(t)):[new Date(n)]);let t=null;Array.isArray(n)?n.length>0&&(t=new Date(n[0])):t=new Date(n),t&&!isNaN(t.getTime())&&C(new Date(t.getFullYear(),t.getMonth(),1))},[n]);let L=(0,c.useCallback)(t=>{let e=tg(t);if(e<N||e>T)return;let n=[];if(s){if(0===j.length)n=[e];else if(1===j.length){let t=j[0];n=t.getTime()===e.getTime()?[]:[t,e].sort((t,e)=>t.getTime()-e.getTime())}else n=[e];S(null)}else n=j.some(t=>tg(t).getTime()===e.getTime())?[]:[e];M(n);let i=null,r="";s?(i=n.length>0?[...n]:null,r=t_(n,s)):(i=n.length>0?n[0]:null,r=n.length>0?ty(n[0]):""),O.current&&(null==y||y(i,r))},[s,N,T,j,y]),A=(0,c.useCallback)(t=>{s&&1===j.length&&S(t)},[s,j.length]);(0,c.useEffect)(()=>(O.current=!0,()=>{O.current=!1}),[]);let R=(0,c.useCallback)(t=>{let e=k.getFullYear(),n=k.getMonth();if(w===tf.days){let e=new Date(k);e.setDate(1),"prev"===t?e.setMonth(n-1):e.setMonth(n+1);let i=tg(new Date(e.getFullYear(),e.getMonth(),1)),r=tg(new Date(e.getFullYear(),e.getMonth()+1,0));return i<=T&&r>=N}if(w===tf.months){let n=e+("prev"===t?-1:1);return n>=N.getFullYear()&&n<=T.getFullYear()}if(w===tf.years){let n=e-e%10+("prev"===t?-10:10);return n<=T.getFullYear()&&n+9>=N.getFullYear()}return!1},[w,k,N,T]),I=(0,c.useCallback)(t=>{C(t),x(tf.days)},[]),D=(0,c.useCallback)(t=>{C(new Date(t,0,1)),x(tf.months)},[]),P=(0,c.useCallback)(()=>{w===tf.days?x(tf.months):w===tf.months?x(tf.years):x(tf.days)},[w]);return(0,l.jsxs)("div",{ref:e,className:(0,m.Z)(f,td.calendar),style:p,...b,"data-qa":g,"data-id":v,children:[(0,l.jsx)(tM,{view:w,currentDate:k,canNavigatePrev:R("prev"),canNavigateNext:R("next"),onNavigate:t=>{let e=new Date(k);switch(w){case tf.days:e.setDate(1),e.setMonth(e.getMonth()+("prev"===t?-1:1));break;case tf.months:e.setFullYear(e.getFullYear()+("prev"===t?-1:1));break;case tf.years:e.setFullYear(e.getFullYear()+("prev"===t?-12:12))}C(e)},onViewChange:P}),(0,l.jsxs)("div",{className:td.content,children:[w===tf.days&&(0,l.jsx)(tj,{today:_,currentDate:k,selectedDates:j,hoveredDate:E,minAllowedDate:N,maxAllowedDate:T,multiple:s,showCurrentDay:a,showOutsideDays:h,events:d,onDateSelect:L,onDateHover:A}),w===tf.months&&(0,l.jsx)(tE,{currentDate:k,today:_,selectedDates:j,minAllowedDate:N,maxAllowedDate:T,showCurrentMonth:o,onMonthSelect:I}),w===tf.years&&(0,l.jsx)(tS,{today:_,currentDate:k,selectedDates:j,minAllowedDate:N,maxAllowedDate:T,showCurrentYear:u,onYearSelect:D})]})]})}).displayName="Calendar";var tN=n(98825);n(11712);let tT=(0,y.g)("chips"),tO=Object.freeze({chips:tT,chip:"".concat(tT,"__item"),icon:"".concat(tT,"__icon"),iconLeft:"".concat(tT,"__icon-left"),iconRight:"".concat(tT,"__icon-right"),label:"".concat(tT,"__label"),variants:{primary:"".concat(tT,"--primary"),secondary:"".concat(tT,"--secondary")},activeVariants:{primary:"".concat(tT,"--active-primary"),secondary:"".concat(tT,"--active-secondary")},sizes:{s:"".concat(tT,"--s"),m:"".concat(tT,"--m"),l:"".concat(tT,"--l")},selected:"".concat(tT,"--selected"),indicator:"".concat(tT,"__indicator"),indicatorVariant:{red:"".concat(tT,"__indicator--red"),orange:"".concat(tT,"__indicator--orange"),green:"".concat(tT,"__indicator--green"),purple:"".concat(tT,"__indicator--purple"),purpleSecondary:"".concat(tT,"__indicator--purple-secondary"),blue:"".concat(tT,"__indicator--blue"),pink:"".concat(tT,"__indicator--pink")}});(0,c.forwardRef)((t,e)=>{let{chips:n,value:i,variant:r="primary",activeVariant:s="primary",multiple:a,clearable:o,size:u="m",className:h,style:d,dataQa:f,dataId:p,onChipClick:v,...y}=t,[b,_]=(0,c.useState)(a?[]:void 0),w=(0,c.useRef)(null);(0,c.useImperativeHandle)(e,()=>({getRoot:()=>w.current,getSelectedChips:()=>b})),(0,c.useEffect)(()=>{a?_(Array.isArray(i)?i:[]):_(i)},[i,a]);let x=a||o,k=t=>a&&Array.isArray(b)?b.includes(t):b===t,C=(t,e,n)=>{_(n),null==v||v(t,e,n)},j=(t,e)=>{if(a&&Array.isArray(b)){if(k(t)){let n=b.filter(e=>e!==t);C(t,e,n)}else C(t,e,[...b,t])}else{let n=o&&k(t)?void 0:t;C(t,e,n)}},M=(t,e)=>{let{id:n,label:i,iconLeft:a,iconRight:o,indicator:c}=t,h=k(n);return(0,l.jsxs)("div",{className:(0,m.Z)(tO.chip,tO.sizes[u],tO.activeVariants[s],tO.variants[r],[{[tO.selected]:h}]),role:x?"checkbox":"radio","aria-checked":h,"aria-label":i,tabIndex:0,"data-qa":(0,g.g)("".concat(f,"-item-").concat(++e),!!f),onClick:t=>{j(n,t)},onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),j(n,t))},children:[a&&(0,l.jsx)("span",{className:(0,m.Z)(tO.icon,tO.iconLeft),"aria-hidden":"true",children:a}),(0,l.jsx)("span",{className:(0,m.Z)(tO.label),children:i}),c&&(0,l.jsx)("div",{className:(0,m.Z)(tO.indicator,tO.indicatorVariant[c])}),o&&(0,l.jsx)("span",{className:(0,m.Z)(tO.icon,tO.iconRight),"aria-hidden":"true",children:o})]},n)};return(0,l.jsx)("div",{ref:w,className:(0,m.Z)(h,tO.chips),style:d,...y,"data-id":p,"data-qa":f,children:n.map((t,e)=>M(t,e))})}).displayName="Chips";var tL=n(93869),tA=n(87215);function tR(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M18.499 3.75a.75.75 0 0 1 1.5 0v4a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.84a7.5 7.5 0 1 0 1.907 4.773.75.75 0 0 1 1.5-.045 9 9 0 1 1-2.497-5.954V3.75Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}n(62371);let tI=(0,y.g)("file-item"),tD=Object.freeze({root:tI,file:"".concat(tI,"__file"),preview:"".concat(tI,"__preview"),previewImage:"".concat(tI,"__preview-image"),previewIcon:"".concat(tI,"__preview-icon"),fileInfo:"".concat(tI,"__file-info"),fileName:"".concat(tI,"__file-name"),fileStatus:"".concat(tI,"__file-status"),fileSize:"".concat(tI,"__file-size"),progress:"".concat(tI,"__progress"),controls:"".concat(tI,"__controls"),close:"".concat(tI,"__close"),repeat:"".concat(tI,"__repeat"),error:"".concat(tI,"__error"),states:{success:"".concat(tI,"--success"),error:"".concat(tI,"--error"),pending:"".concat(tI,"--pending"),uploading:"".concat(tI,"--uploading"),primary:"".concat(tI,"--primary"),secondary:"".concat(tI,"--secondary"),s:"".concat(tI,"--s"),m:"".concat(tI,"--m"),disabled:"".concat(tI,"--disabled")}}),tP=["B","KB","MB","GB"],tZ=[{label:"svg",color:"#F79601",type:"image/svg+xml"},{label:"pdf",color:"#FF0508",type:"application/pdf"},{label:"jpg",color:"#525BBB",type:"image/jpeg"},{label:"zip",color:"#B0864B",type:"application/zip"},{label:"mp4",color:"#000000",type:"video/mp4"},{label:"xls",color:"#117C41",type:"application/vnd.ms-excel"},{label:"docx",color:"#165BBE",type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}],tF="#189EF4",t$=t=>{if(!t)return{label:"file",color:tF};let e=tZ.find(e=>e.type===t);if(e)return{label:e.label,color:e.color};let n=tA.extension(t);return n?{label:n,color:tF}:{label:"file",color:tF}},tz=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(0===t)return"0 ".concat("B");let n=Math.floor(Math.log(t)/Math.log(1024)),i=parseFloat((t/Math.pow(1024,n)).toFixed(e));return"".concat(i," ").concat(tP[n])},tB=(0,c.forwardRef)((t,e)=>{let{file:n,state:i="success",name:r,type:s,fileSize:a,error:o,progress:c=0,size:u="m",variant:h="primary",previewImageUrl:d,className:f,style:p,fileId:v,dataQa:g,dataId:y,onClick:b,onDelete:_,onRepeat:w,...x}=t,k="s"===u,C=(0,R.i)(c)&&"uploading"===i,j=o&&"error"===i,M=s&&/^image\//.test(s),E=t$(s),S=(M&&d?(0,l.jsx)("img",{role:"presentation",className:tD.previewImage,src:d,width:40,alt:r}):null)||(0,l.jsx)("div",{className:tD.previewIcon,style:{backgroundColor:E.color},children:E.label}),N=C&&"primary"===h?"linear-gradient(90deg, var(--color-gray-400) ".concat(c,"%, var(--color-white) ").concat(c,"%"):"linear-gradient(90deg, var(--color-white) ".concat(c,"%, var(--color-gray-400) ").concat(c,"%"),T=(0,m.Z)(f,tD.root,tD.states[h],tD.states[i],tD.states[u]),O=C?{background:N,...p}:p;return(0,l.jsxs)("div",{ref:e,className:T,style:O,onClick:t=>{"success"===i&&(null==b||b(t,v,n))},...x,"data-id":y,"data-qa":g,children:[(0,l.jsxs)("div",{className:tD.file,children:[!k&&(0,l.jsx)("div",{className:tD.preview,children:S}),(0,l.jsxs)("div",{className:tD.fileInfo,children:[(0,l.jsx)("div",{className:tD.fileName,children:r}),!k&&a&&(0,l.jsxs)("div",{className:tD.fileStatus,children:[(0,l.jsx)("div",{className:tD.fileSize,children:"".concat(tz(a))}),C&&(0,l.jsx)("div",{className:tD.progress,children:"Загружено ".concat(c,"%")})]})]}),(0,l.jsxs)("div",{className:tD.controls,children:[k&&C&&(0,l.jsx)("div",{className:tD.progress,children:"".concat(c,"%")}),j&&(0,l.jsx)(D.P,{className:tD.repeat,tabIndex:0,role:"button","aria-label":"Повторить загрузку файла ".concat(r),onClick:t=>{t.preventDefault(),t.stopPropagation(),null==w||w(t,v,n)},children:(0,l.jsx)(tR,{})}),(0,l.jsx)(D.P,{className:tD.close,tabIndex:0,role:"button","aria-label":"Удалить файл ".concat(r),onClick:t=>{t.preventDefault(),t.stopPropagation(),null==_||_(t,v,n)},children:(0,l.jsx)(V,{})})]})]}),j&&(0,l.jsx)("div",{className:tD.error,children:o})]})});tB.displayName="File",n(44364);let tV=Object.freeze({root:(0,y.g)("file-list")}),tU=t=>{let e=new Set;for(let n of t){if(e.has(n))return!0;e.add(n)}return!1};(0,c.forwardRef)((t,e)=>{let{files:n,size:i="m",variant:r="primary",className:s,role:a="list",style:o,dataId:u,dataQa:h,onClick:d,onDelete:f,onRepeat:p,...v}=t;return((0,c.useEffect)(()=>{tU(n.map(t=>t.fileId))&&console.warn("Имеются файлы с одинаковым fileId")},[n]),0===n.length)?null:(0,l.jsx)("div",{ref:e,role:a,"aria-label":"Загруженные файлы",className:(0,m.Z)(s,tV.root),style:o,...v,"data-id":u,"data-qa":h,children:n.map(t=>{var e;return(0,c.createElement)(tB,{...t,role:"listitem","aria-labelledby":"Имя файла - ".concat(t.name,", Размер файла - ").concat(tz(null!==(e=t.fileSize)&&void 0!==e?e:0)),size:i,variant:r,onClick:d,onRepeat:p,onDelete:f,key:t.fileId})})})}).displayName="FileList";let tq=(t=!1)=>{let[e,n]=(0,c.useState)(t);return{value:e,show:(0,c.useCallback)(()=>n(!0),[]),hide:(0,c.useCallback)(()=>n(!1),[]),toggle:(0,c.useCallback)(()=>n(t=>!t),[])}};n(88591);let tW=t=>{let e=(0,c.useRef)(null);return(0,c.useEffect)(()=>{let n=n=>{var i;(null==(i=e.current)?void 0:i.contains(n.target))||t()};return window.addEventListener("click",n),()=>window.removeEventListener("click",n)},[]),e},tH=(t,e,n,i)=>{(0,c.useEffect)(()=>(t.addEventListener(e,n),()=>t.removeEventListener(e,n)),[...i,e,t,n])},tG=(0,y.g)("hint"),tY=Object.freeze({hint:tG,hintDialog:"".concat(tG,"__dialog"),activator:"".concat(tG,"__activator"),footer:"".concat(tG,"__footer"),text:"".concat(tG,"__text"),close:"".concat(tG,"__close"),icon:"".concat(tG,"__icon"),inverted:"".concat(tG,"--inverted")});(0,c.forwardRef)((t,e)=>{let{className:n,style:i,isVisible:r,position:s="top",heading:a,footer:o,children:u,text:d,withoutTail:y,inverted:b,dataQa:_,dataId:x,role:k="dialog",...C}=t,j=(0,c.useRef)(null),{refs:M,floatingStyles:E,context:S}=(0,f.YF)({placement:s,middleware:[(0,p.cv)(12),(0,p.RR)({fallbackAxisSideDirection:"start",crossAxis:!1}),(0,p.uY)(),(0,v.x7)({element:j,padding:8})]}),{value:N,show:T,hide:O,toggle:L}=tq(r),A=tW(O);if((0,c.useImperativeHandle)(e,()=>null==A?void 0:A.current),"undefined"!=typeof window){var R;let t;tH(window,"resize",(R=()=>S.update(),t=!1,function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];t||(R(...n),t=!0,setTimeout(()=>{t=!1},300))}),[]),tH(window,"keyup",t=>{"Escape"===t.key&&O()},[O])}return(0,l.jsxs)("div",{ref:A,className:(0,m.Z)(tY.hint,n),style:i,children:[(0,l.jsx)("button",{type:"button",className:tY.activator,ref:M.setReference,tabIndex:0,onClick:L,children:"function"==typeof u?u({show:T,hide:O,toggle:L,visible:N}):u}),N&&(0,l.jsxs)("div",{role:k,className:(0,m.Z)(tY.hintDialog,{[tY.inverted]:b}),ref:M.setFloating,style:E,...C,"data-id":x,"data-qa":_,children:[a&&(0,l.jsx)(h.H,{dataQa:(0,g.g)("".concat(_,"-heading"),!!_),className:"mb-3",as:"h6",type:"h6",children:a}),(0,l.jsx)("p",{"data-qa":(0,g.g)("".concat(_,"-text"),!!_),className:(0,m.Z)(tY.text),children:d}),o&&(0,l.jsx)("div",{"data-qa":(0,g.g)("".concat(_,"-footer"),!!_),className:(0,m.Z)(tY.footer),children:o}),(0,l.jsx)("button",{type:"button",tabIndex:-1,className:tY.close,onClick:O,children:(0,l.jsx)(D.P,{"aria-hidden":"true",className:tY.icon,style:{display:"inline-flex",fontSize:16},children:(0,l.jsx)(V,{})})}),!y&&(0,l.jsx)(f.Y$,{width:16,ref:j,d:w,context:S,fill:b?"var(--color-white)":"var(--color-black-500)"})]})]})}).displayName="Hint",n(90542);let tK=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];e.forEach(t=>{null==t||t(...n)})}},tQ=(0,y.g)("input-base"),tX={wrapper:tQ,input:"".concat(tQ,"__input"),container:"".concat(tQ,"__container"),label:"".concat(tQ,"__label"),field:"".concat(tQ,"__field"),rightLabel:"".concat(tQ,"__right-label"),caption:"".concat(tQ,"__caption"),placeholder:{visible:"".concat(tQ,"__placeholder"),hidden:"".concat(tQ,"__hidden")},states:{primary:"".concat(tQ,"--primary"),secondary:"".concat(tQ,"--secondary"),error:"".concat(tQ,"--error"),success:"".concat(tQ,"--success"),s:"".concat(tQ,"--s"),m:"".concat(tQ,"--m"),l:"".concat(tQ,"--l"),focused:"".concat(tQ,"--focused"),disabled:"".concat(tQ,"--disabled"),active:"".concat(tQ,"--active"),hasLabel:"".concat(tQ,"--has-label"),accent:"".concat(tQ,"--accent")}},tJ=(0,c.forwardRef)((t,e)=>{let{icon:n,rightLabel:i,disabled:r,state:s,size:a="m",variant:o="primary",label:u,value:h,placeholder:d,maskPlaceholder:p,autoFocus:v=!1,maskPlaceholderVariant:y="default",caption:b,type:_="text",inputMode:w="text",hasCaption:x,className:k,style:C,dataQa:j,dataId:M,inputRef:E,onChange:S,onFocus:N,onBlur:T,onKeyDown:O,...L}=t,A=(0,c.useId)(),{value:R,show:D,hide:P}=tq(),Z=(0,c.useRef)(null),F=(0,f.qq)([E,Z]),$=(0,c.useMemo)(()=>R||!!h||!!d,[h,R,d]),z=(0,c.useCallback)(()=>{var t;null==(t=Z.current)||t.focus()},[]),B=(0,c.useMemo)(()=>{var t;if(!p)return null;let e={hidden:null!=h?h:"",visible:p.substring(null!==(t=null==h?void 0:h.length)&&void 0!==t?t:0)};return p.length===(null==h?void 0:h.length)?null:e},[p,h]);return(0,c.useEffect)(()=>{var t,e,n,i;if(!v)return;let r=null!==(i=null==(t=Z.current)?void 0:t.value.length)&&void 0!==i?i:0;null==(e=Z.current)||e.focus(),null==(n=Z.current)||n.setSelectionRange(r,r)},[v]),(0,l.jsxs)("div",{className:(0,m.Z)(k,tX.wrapper),style:C,"data-qa":j,"data-id":M,children:[(0,l.jsxs)("div",{className:(0,m.Z)(tX.input,tX.states[o],tX.states[a],{[tX.states.focused]:R,[tX.states.error]:"error"===s,[tX.states.success]:"success"===s,[tX.states.disabled]:!!r,[tX.states.hasLabel]:u}),onClick:z,ref:e,children:[(0,l.jsxs)("label",{htmlFor:A,className:tX.container,children:[u&&(0,l.jsx)("span",{className:(0,m.Z)(tX.label,{[tX.states.active]:$,[tX.states.s]:"s"===a,[tX.states.disabled]:r,[tX.states.error]:"error"===s,[tX.states.success]:"success"===s}),children:u}),B&&!!h&&(0,l.jsxs)("div",{className:(0,m.Z)(tX.placeholder.visible,{[tX.states.accent]:"accent"===y}),children:[B.hidden&&(0,l.jsx)("span",{className:tX.placeholder.hidden,children:B.hidden}),B.visible]}),(0,l.jsx)("input",{...L,id:A,ref:F,className:(0,m.Z)(tX.field,{[tX.states.s]:"s"===a,[tX.states.hasLabel]:u,[tX.states.disabled]:r}),type:_,inputMode:w,autoComplete:"off",placeholder:d,value:h,disabled:r,onChange:t=>{null==S||S(t.target.value,t)},onFocus:tK(D,N),onBlur:tK(P,T),onKeyDown:t=>{("Escape"===t.key||"Esc"===t.key)&&(t.preventDefault(),null==S||S("",{target:{value:""}})),null==O||O(t)}})]}),i&&(0,l.jsx)("div",{className:(0,m.Z)(tX.rightLabel,{[tX.states.disabled]:r}),children:i}),n]}),(x||b)&&(0,l.jsx)(I.C,{dataQa:(0,g.g)("".concat(j,"-caption"),!!j),className:(0,m.Z)(tX.caption,{[tX.states.disabled]:r}),state:s,withoutIcon:!0,children:b})]})});tJ.displayName="InputBase";var t0=n(55773),t1=n(66237),t2=n(31755),t3=n(67603),t4=n(85226);function t5(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M4.75 3a.75.75 0 0 0 0 1.5h14.5a.75.75 0 0 0 0-1.5H4.75Zm7.78 3.218a.75.75 0 0 0-1.06 0l-4.25 4.25a.75.75 0 0 0 1.06 1.06l2.97-2.97v11.69a.75.75 0 0 0 1.5 0V8.558l2.97 2.97a.75.75 0 1 0 1.06-1.06l-4.25-4.25Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}n(17710);let t7=(0,y.g)("input-file"),t6={inputFile:t7,input:"".concat(t7,"__input"),uploadArea:"".concat(t7,"__upload-area"),uploadIcon:"".concat(t7,"__upload-icon"),uploadLabel:{default:"".concat(t7,"__upload-label"),purple:"".concat(t7,"__upload-label--purple")},uploadDragged:"".concat(t7,"__upload-dragged"),uploadCaption:"".concat(t7,"__upload-caption"),uploadButton:"".concat(t7,"__upload-button"),uploadWrapper:"".concat(t7,"__upload-wrapper"),selectButton:"".concat(t7,"__select-button"),states:{error:"".concat(t7,"--error"),s:"".concat(t7,"--s"),dragged:"".concat(t7,"--dragged"),disabled:"".concat(t7,"--disabled")}},t8=(t,e)=>{if(t&&e){let n=Array.isArray(e)?e:e.split(","),i=t.name||"",r=t.type||"",s=r.replace(/\/.*$/,"");return n.some(t=>{let e=t.trim();if(/^\*(\/\*)?$/.test(t))return!0;if("."===e.charAt(0)){let t=i.toLowerCase(),n=e.toLowerCase(),r=[n];return(".jpg"===n||".jpeg"===n)&&(r=[".jpg",".jpeg"]),r.some(e=>t.endsWith(e))}return/\/\*$/.test(e)?s===e.replace(/\/.*$/,""):r===e||!!/^\w+$/.test(e)&&(console.error(!1,"Upload takes an invalidate 'accept' type '".concat(e,"'.Skip for check.")),!0)})}return!0};(0,c.forwardRef)((t,e)=>{let{accept:n,maxFileSize:i,disabled:r=!1,multiple:s=!1,capture:a=!1,mode:o="select",size:u="m",style:h,className:f,name:p,dataId:v,dataQa:g,onChange:y,...b}=t,_=(0,c.useId)(),[w,x]=(0,c.useState)(!1),[k,C]=(0,c.useState)(!1),j=(0,c.useRef)(null),M=(0,c.useRef)(null),S=t=>{if(!t)return!0;let e=N(t),n=T(t);return e&&n},N=t=>{if(!i)return!0;for(let e=0;e<t.length;e++)if(t[e].size>1048576*i)return!1;return!0},T=t=>{if(!n)return!0;for(let e=0;e<t.length;e++)if(!t8(t[e],n))return!1;return!0},O=t=>{let e=Object.hasOwn(t,"dataTransfer")?t.dataTransfer.files:t.target.files;if(e){if(!S(e)){x(!0);return}x(!1),null==y||y(e,t)}},L=()=>{var t;null==(t=j.current)||t.click()},A=t=>{r||(t.stopPropagation(),t.preventDefault())},R=t=>{r||(t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy",C(!0))},I=t=>{r||(t.stopPropagation(),t.preventDefault(),C(!1))},P=t=>{if(r)return;t.stopPropagation(),t.preventDefault();let{files:e}=t.dataTransfer;(s||e&&1===e.length)&&O(t),C(!1),t.dataTransfer.clearData()};(0,c.useImperativeHandle)(e,()=>({getInput:()=>j.current,getUploadArea:()=>M.current}));let Z=()=>{let t=Array.isArray(n)?n.join(", "):null==n?void 0:n.split(",").join(", ");return(t?"Доступные форматы ".concat(t,". "):"")+(i?"Размер файла не должен превышать ".concat(i," MB."):"")},F=()=>{let t=Array.isArray(n)?n.join(","):n,e={ref:j,type:"file",className:t6.input,multiple:s,accept:t,capture:a,disabled:r,id:_,name:p,onChange:O};return(0,l.jsx)("input",{...e})},$=()=>{let t={ref:M,className:(0,m.Z)(t6.uploadArea,{[t6.states.error]:w,[t6.states.s]:"s"===u,[t6.states.dragged]:k,[t6.states.disabled]:r}),onDragEnter:A,onDragOver:R,onDragLeave:I,onDrop:P,onClick:L,role:"button",tabIndex:0},e=(0,l.jsx)(D.P,{"aria-hidden":"true",className:(0,m.Z)(t6.uploadIcon,{[t6.states.disabled]:r}),children:(0,l.jsx)(t5,{})}),n=(0,l.jsx)(d.T,{size:"16",weight:"regular",className:(0,m.Z)(t6.uploadDragged,{[t6.states.disabled]:r,[t6.states.dragged]:k,[t6.states.s]:"s"===u}),children:"Перетащите файлы сюда"});if("s"===u){let i=(0,l.jsxs)(d.T,{size:"16",weight:"regular",className:(0,m.Z)(t6.uploadLabel.default,{[t6.states.disabled]:r}),children:[(0,l.jsxs)("span",{className:(0,m.Z)(t6.uploadLabel.purple,{[t6.states.disabled]:r}),children:["Выберите файлы"," "]}),"или перетащите их сюда"]});return(0,l.jsx)(U.F,{caption:Z(),hasCaption:!0,children:(0,l.jsxs)("div",{...t,children:[(0,l.jsxs)("div",{className:(0,m.Z)(t6.uploadWrapper,{[t6.states.dragged]:k}),children:[e,i]}),n]})})}let i=(0,l.jsx)(d.T,{size:"16",weight:"regular",className:(0,m.Z)(t6.uploadLabel.default,{[t6.states.disabled]:r}),children:"Выберите файлы или перетащите их сюда"}),s=(0,l.jsx)(d.T,{size:"14",weight:"regular",className:(0,m.Z)(t6.uploadCaption,{[t6.states.disabled]:r}),children:Z()}),a=(0,l.jsx)(d.T,{size:"16",weight:"regular",className:(0,m.Z)(t6.uploadButton,{[t6.states.disabled]:r}),children:"Выбрать"});return(0,l.jsxs)("div",{...t,children:[(0,l.jsxs)("div",{className:(0,m.Z)(t6.uploadWrapper,{[t6.states.dragged]:k}),children:[e,i,s,a]}),n]})};return(0,l.jsx)("div",{className:(0,m.Z)(f,t6.inputFile),style:h,...b,"data-id":v,"data-qa":g,children:"select"===o?(()=>{let t=F(),e=Z(),n=(0,l.jsx)(E.B,{onClick:L,label:"Выберите файлы",size:"s",stretch:!0,className:(0,m.Z)(t6.selectButton,{disabled:r}),disabled:r});return(0,l.jsxs)(U.F,{caption:e,hasCaption:!0,captionState:w?"error":"default",children:[t,n]})})():(()=>{let t=F(),e=$();return(0,l.jsxs)(l.Fragment,{children:[e,t]})})()})}).displayName="InputFile",n(48917);let t9=(t,e,n,i)=>{let r=[e,n,i];return r[t%100>4&&t%100<20?2:[2,0,1,1,1,2][t%10<5?t%10:5]]||r[0]},et=t=>null==t;function ee(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M5 12a.75.75 0 0 1 .75-.75h12.5a.75.75 0 0 1 0 1.5H5.75A.75.75 0 0 1 5 12Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}function en(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M12.75 5.75a.75.75 0 0 0-1.5 0v5.5h-5.5a.75.75 0 0 0 0 1.5h5.5v5.5a.75.75 0 0 0 1.5 0v-5.5h5.5a.75.75 0 0 0 0-1.5h-5.5v-5.5Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}let ei=t=>{let{value:e,decimals:n="auto",decimalsCount:i=2}=t;switch(n){case"always":return new Intl.NumberFormat("ru",{minimumFractionDigits:i,useGrouping:"min2"}).format(e);case"never":return new Intl.NumberFormat("ru",{maximumFractionDigits:0,useGrouping:"min2"}).format(e);default:return new Intl.NumberFormat("ru",{useGrouping:"min2"}).format(e)}},er=t=>RegExp("^-?(?!0{2,})[(\\d\\s?]*[,.]?\\d*$").test(t),es=(t,e,n)=>(0,R.i)(e)&&t<e?e:(0,R.i)(n)&&t>n?n:t,ea=[",","."],eo=(0,y.g)("input-number"),el={controls:"".concat(eo,"__controls"),icon:"".concat(eo,"__controls-icon"),divider:"".concat(eo,"__controls-divider"),states:{disabled:"".concat(eo,"--disabled")}},ec=t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),eu=(t,e)=>{let n=ec(e.join("")),i=RegExp("[^\\d".concat(n,"]"),"gi");return t.replace(i,"")},eh=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\xa0",n=RegExp(ec(e),"g");return t.replace(n,"")},ed=(t,e)=>{let n=RegExp("((^|\\D)-\\d)|^(-)").test(t),i=eu(eh(t,"\xa0"),ea).replace(",","."),r=n?"-":"";if(i.includes(".")){let[t,n]=i.split(".");if(n){let i=".".concat(n.slice(0,e));return"".concat(r).concat(t).concat(i)}}return"".concat(r).concat(i)},ef=(t,e)=>{let n=String(t),[i,r]=n.split("."),s=new Intl.NumberFormat("ru",{maximumFractionDigits:0,roundingMode:"trunc",useGrouping:"min2"}).format(parseFloat(n)),a=n.includes(".")||n.includes(",");return"never"===e?s:"".concat(s).concat(a?",":"").concat(null!=r?r:"")},ep=(t,e,n)=>{if(!t||!e)return"";if(Array.isArray(e)){let n=ed(t,2),i=Number((n.startsWith("-")?n.slice(1):n).split(".")[0]),[r,s,a]=e;return t9(i,r,s,a)}return e},ev=t=>{let{selectionStart:e,value:n,lastKeyStroke:i,stateValue:r}=t,s=e,a=n;if(r&&s&&"\xa0"===r[s]&&("Backspace"===i||"Delete"===i)){let t=n.split("");return"Backspace"===i&&(t.splice(s-1,1),s-=1),"Delete"===i&&(t.splice(s,1),s+=1),{modifiedValue:a=t.join(""),cursorPosition:s}}return{modifiedValue:a,cursorPosition:e}},em=(0,c.forwardRef)((t,e)=>{let{decimals:n="auto",decimalsCount:i=2,value:r,unit:s,step:a=1,min:o,max:u,size:h="m",withoutControls:d,disabled:f,icon:p,shouldRoundOnChange:v=!1,className:g,style:y,dataQa:b,dataId:_,autoFocus:w=!1,onChange:x,onFocus:k,onBlur:C,onKeyDown:j,onIncrement:M,onDecrement:E,...S}=t,N=(0,c.useMemo)(()=>i<10?i:10,[i]),[T,O]=(0,c.useState)((0,R.i)(r)?ei({value:es(parseFloat(ef(ed(String(r),N),n)),o,u),decimals:n,decimalsCount:N}):""),[L,A]=(0,c.useState)(!1),[I,P]=(0,c.useState)(0),[Z,F]=(0,c.useState)(null),$=(0,c.useRef)(null);(0,c.useImperativeHandle)(e,()=>$.current),(0,c.useEffect)(()=>{L&&"-"!==T&&$.current&&document.activeElement===$.current&&$.current.setSelectionRange(I,I)},[T,I,$,L]);let z=(0,c.useCallback)((t,e)=>{if(A(!0),!er(t))return{float:T?parseFloat(ed(T,N)):void 0,formatted:T};if(""===t)return{float:void 0,formatted:t};if("-"===t)return P(1),{float:void 0,formatted:t};if("."===t||","===t)return P(2),{float:0,formatted:"never"===n?"0":"0,"};if("-."===t||"-,"===t)return P(3),{float:0,formatted:"never"===n?"-0":"-0,"};let{modifiedValue:i,cursorPosition:r}=ev({selectionStart:e,value:t,lastKeyStroke:Z,stateValue:T}),s=ed(i,N),a="never"===n?parseInt(s):parseFloat(s),l=ef(s,n),c=v?es(a,o,u):a;if(c>Number.MAX_SAFE_INTEGER||c<Number.MIN_SAFE_INTEGER)return{float:parseFloat(ed(T,N)),formatted:T};if(!et(r)){let e=r+(l.length-t.length);P(e=e<=0?0:e)}return{float:c,formatted:l}},[n,N,Z,u,o,v,T]),B=(0,c.useCallback)((t,e)=>{if(!e)return;let{target:{value:n,selectionStart:i}}=e,r=z(n,i);O(r.formatted),null==x||x(r.float,{...r,event:e})},[z,x]),V=(0,c.useCallback)(t=>{null==k||k(t)},[k]),U=(0,c.useCallback)(t=>{let{target:{value:e}}=t,i=ed(e,N);if(!i||"-"===i){O(""),null==C||C(t);return}let r=parseFloat(i),s=v?r:es(r,o,u),a=ei({value:s,decimals:n,decimalsCount:N});O(a),v||r===s||null==x||x(s,{float:s,formatted:a}),null==C||C(t)},[n,N,u,o,C,x,v]),q=(0,c.useCallback)(t=>{P(T.length);let e=parseFloat(et(r)?ed(T,N):String(r).replace(",","."))||0,i=es("increase"===t?Number((e+a).toFixed(N)):Number((e-a).toFixed(N)),o,u),s=ei({value:i,decimals:n,decimalsCount:N});O(s),null==x||x(i,{float:i,formatted:s})},[T,r,N,a,o,u,n,x]),W=(0,c.useCallback)(t=>{let{code:e}=t;F(e),("ArrowUp"===e||"ArrowDown"===e)&&(t.preventDefault(),q("ArrowUp"===e?"increase":"decrease")),null==j||j(t)},[q,j]),H=(0,c.useCallback)(t=>{t.preventDefault(),q("decrease"),null==E||E(t)},[q,E]),G=(0,c.useCallback)(t=>{t.preventDefault(),q("increase"),null==M||M(t)},[q,M]),Y=(0,c.useCallback)(t=>{let{code:e}=t;F(e),["Space","Enter"].includes(e)&&(t.preventDefault(),q("decrease"),null==E||E(t))},[q,E]),K=(0,c.useCallback)(t=>{let{code:e}=t;F(e),["Space","Enter"].includes(e)&&(t.preventDefault(),q("increase"),null==M||M(t))},[q,M]),Q=(0,c.useMemo)(()=>{let t=parseFloat(ed(T,N));return et(r)||""===String(r)?"":Number(r)===t?T:"-"!==T&&","!==T&&er(String(r))?ef(ed(String(es(r,o,u)),N),n):T},[n,N,T,r]),X=(0,c.useMemo)(()=>{let[t,e]=Q.split(","),n=Q.includes(","),i=ep(Q,s);if(n){let n=Array(N-e.length).fill(0).join("");return"".concat(t).concat(",").concat(e).concat(n).concat("\xa0").concat(i)}return"".concat(t).concat("\xa0").concat(i)},[Q,s,N]),J={...S,value:Q,maskPlaceholder:X,maskPlaceholderVariant:"accent",size:h,icon:d?p:(0,l.jsxs)("div",{className:(0,m.Z)(el.controls),children:[(0,l.jsx)(D.P,{onClick:f?void 0:H,onKeyDown:f?void 0:Y,className:(0,m.Z)(el.icon,{[el.states.disabled]:!!f}),role:"button",tabIndex:f?-1:0,children:(0,l.jsx)(ee,{})}),(0,l.jsx)("div",{className:el.divider}),(0,l.jsx)(D.P,{onClick:f?void 0:G,onKeyDown:f?void 0:K,className:(0,m.Z)(el.icon,{[el.states.disabled]:!!f}),role:"button",tabIndex:f?-1:0,children:(0,l.jsx)(en,{})})]}),disabled:f,onChange:B,onBlur:U,onFocus:V,onKeyDown:W};return(0,l.jsx)(tJ,{...J,autoFocus:w,inputMode:"decimal",inputRef:$,dataQa:b,dataId:_,className:g,style:y})});function eg(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M12 3C7.069 3 3.702 6.75 2.006 9.226a4.876 4.876 0 0 0 0 5.548C3.702 17.25 7.069 21 12 21s8.297-3.75 9.994-6.226a4.875 4.875 0 0 0 0-5.548C20.297 6.75 16.931 3 12 3Zm-8.757 7.074C4.888 7.673 7.863 4.5 12 4.5s7.112 3.173 8.757 5.574a3.376 3.376 0 0 1 0 3.852C19.112 16.327 16.137 19.5 12 19.5s-7.112-3.173-8.757-5.574a3.376 3.376 0 0 1 0-3.852ZM12 8.004a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2.5 4a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}function ey(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M21.78 3.28a.75.75 0 0 0-1.06-1.06l-2.773 2.773C16.33 3.849 14.34 3 12 3 7.069 3 3.703 6.75 2.006 9.226a4.878 4.878 0 0 0 0 5.55c.697 1.015 1.654 2.217 2.866 3.291L2.22 20.72a.75.75 0 1 0 1.06 1.06l6.95-6.95h.001l4.595-4.595.001-.001L21.78 3.28ZM12 4.5c1.862 0 3.486.639 4.869 1.57l-2.623 2.624A4 4 0 0 0 8.69 14.25l-2.755 2.754c-1.125-.983-2.026-2.106-2.691-3.077a3.378 3.378 0 0 1-.001-3.853C4.888 7.673 7.863 4.5 12 4.5Zm8.379 2.673a.75.75 0 1 0-1.111 1.008 17.849 17.849 0 0 1 1.488 1.892 3.378 3.378 0 0 1 .001 3.853C19.112 16.327 16.137 19.5 12 19.5c-1.3 0-2.481-.311-3.544-.814a.75.75 0 0 0-.641 1.357A9.716 9.716 0 0 0 12 21c4.931 0 8.297-3.75 9.994-6.226a4.878 4.878 0 0 0 0-5.55 19.338 19.338 0 0 0-1.615-2.05ZM12 9.503c.416 0 .809.102 1.154.282l-3.372 3.373A2.5 2.5 0 0 1 12 9.504Zm3.988 2.815a.75.75 0 0 0-1.496-.116 2.5 2.5 0 0 1-2.294 2.294.75.75 0 0 0 .117 1.495 4 4 0 0 0 3.673-3.673Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}em.displayName="InputNumber",n(64851);let eb=(0,y.g)("input-password"),e_={icon:"".concat(eb,"__icon"),states:{disabled:"".concat(eb,"--disabled")}};function ew(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M10.5 2a8.5 8.5 0 1 0 5.456 15.018l4.763 4.762a.75.75 0 0 0 1.06-1.06l-4.762-4.763A8.5 8.5 0 0 0 10.5 2Zm-7 8.5a7 7 0 1 1 14 0 7 7 0 0 1-14 0Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}(0,c.forwardRef)((t,e)=>{let{disabled:n,autoFocus:i=!1,...r}=t,[s,a]=(0,c.useState)(!1);return(0,l.jsx)(tJ,{...r,autoFocus:i,ref:e,disabled:n,type:s?"text":"password",icon:(0,l.jsx)(D.P,{onMouseDown:n?void 0:t=>{t.preventDefault(),t.stopPropagation(),a(t=>!t)},onKeyDown:n?void 0:t=>{[" ","Enter"].includes(t.key)&&(t.preventDefault(),a(t=>!t))},className:(0,m.Z)(e_.icon,{[e_.states.disabled]:!!n}),role:"button",tabIndex:n?-1:0,children:s?(0,l.jsx)(ey,{}):(0,l.jsx)(eg,{})})})}).displayName="InputPassword",n(28526);let ex=(0,y.g)("input-search"),ek={iconSearch:"".concat(ex,"__icon-search"),iconClear:"".concat(ex,"__icon-clear"),states:{disabled:"".concat(ex,"--disabled")}};(0,c.forwardRef)((t,e)=>{let{value:n,disabled:i,onChange:r,...s}=t,[a,o]=(0,c.useState)(n||"");(0,c.useEffect)(()=>{o(n||"")},[n]);let u=(0,c.useCallback)((t,e)=>{o(t||""),null==r||r(t||"",e)},[]);return(0,l.jsx)(tJ,{...s,value:a,ref:e,disabled:i,icon:a?(0,l.jsx)(D.P,{onMouseDown:i?void 0:t=>{t.preventDefault(),t.stopPropagation(),u()},onKeyDown:i?void 0:t=>{[" ","Enter"].includes(t.key)&&(t.preventDefault(),u())},className:(0,m.Z)(ek.iconClear,{[ek.states.disabled]:i}),role:"button",tabIndex:i?-1:0,children:(0,l.jsx)(V,{})}):(0,l.jsx)(D.P,{className:(0,m.Z)(ek.iconSearch,{[ek.states.disabled]:i}),children:(0,l.jsx)(ew,{})}),onChange:(t,e)=>{u(t,e)}})}).displayName="InputSearch",n(41566);var eC=n(30462);n(95987);let ej=(0,y.g)("radio"),eM=Object.freeze({radio:ej,input:"".concat(ej,"__input"),marker:"".concat(ej,"__marker"),wrapper:"".concat(ej,"__wrapper"),label:"".concat(ej,"__label"),caption:"".concat(ej,"__caption"),icon:"".concat(ej,"__icon"),iconButton:"".concat(ej,"__icon-button"),states:{error:"".concat(ej,"--error"),disabled:"".concat(ej,"--disabled"),inverted:"".concat(ej,"--inverted")},sizes:{xs:"".concat(ej,"--xs"),s:"".concat(ej,"--s"),m:"".concat(ej,"--m")},variants:{primary:"".concat(ej,"--primary"),secondary:"".concat(ej,"--secondary")}});(0,c.forwardRef)((t,e)=>{let{value:n,variant:i="primary",checked:r=!1,state:s="default",label:a,disabled:o=!1,caption:u,className:h,style:d,icon:f,withIcon:p=!1,size:v="m",inverted:g=!1,children:y,inputRef:b,onChange:_,onIconClick:w,dataQa:x,dataId:k,...C}=t,j=(0,c.useId)(),M=y||a;return(0,l.jsxs)("label",{ref:e,htmlFor:j,"data-marker-label":"",className:(0,m.Z)(h,eM.radio,{[eM.states.disabled]:o,[eM.states.inverted]:g,[eM.states.error]:"error"===s,[eM.sizes[v]]:!0,[eM.variants[i]]:!0}),style:d,"data-id":k,"data-qa":x,children:[(0,l.jsx)("input",{id:j,value:n,checked:r,className:eM.input,type:"radio",disabled:o,onChange:t=>{null==_||_(t.target.value,t)},ref:b,...C}),(0,l.jsx)("span",{className:eM.marker,children:(0,l.jsx)(tL.C,{type:"radio",checked:r,inverted:g,state:s,disabled:o})}),M&&(0,l.jsxs)("span",{className:eM.wrapper,children:[(0,l.jsx)("span",{className:eM.label,children:M}),u&&(0,l.jsx)(I.C,{className:eM.caption,withoutIcon:!0,children:u})]}),p&&(0,l.jsx)("button",{type:"button",className:(0,m.Z)(eM.iconButton),onClick:o?void 0:w,children:(0,l.jsx)(D.P,{className:(0,m.Z)(eM.icon),children:f?(0,l.jsx)(l.Fragment,{children:f}):(0,l.jsx)(eC.S,{})})})]})}).displayName="Radio",n(3054);let eE=(0,y.g)("segmented-control"),eS=Object.freeze({segmentedControl:eE,secondary:"".concat(eE,"--secondary"),tab:"".concat(eE,"__tab"),label:"".concat(eE,"__label"),icon:"".concat(eE,"__icon"),slot:"".concat(eE,"__slot"),states:{stretch:"".concat(eE,"--stretch"),rounded:"".concat(eE,"--rounded"),small:"".concat(eE,"--s"),medium:"".concat(eE,"--m"),weightVariant:"".concat(eE,"--wight-medium"),left:"".concat(eE,"__tab--left"),right:"".concat(eE,"__tab--right"),active:"".concat(eE,"__tab--active"),iconOnly:"".concat(eE,"__tab--icon-only"),disabled:"".concat(eE,"__tab--disabled")}}),eN=Object.freeze({labelKey:"label",disabledKey:"disabled",slotLeftKey:"slotLeft",slotRightKey:"slotRight",iconLeftKey:"iconLeft",iconRightKey:"iconRight"});(0,c.forwardRef)((t,e)=>{var n;let{activeTabId:i,tabs:r,onTabChange:s,variant:a="primary",className:o,style:u,stretch:h=!1,rounded:d=!1,tabSettings:f,weightVariant:p="regular",size:v="m",onTabKeyDown:y,dataQa:b,dataId:_,...w}=t,x=(0,c.useRef)(null),k=(0,c.useMemo)(()=>{let t={...eN,...f};return r.map(e=>{var n;return{sourceTab:e,id:e.id,label:e[t.labelKey],disabled:null!==(n=e[t.disabledKey])&&void 0!==n&&n,slotLeft:e[t.slotLeftKey],slotRight:e[t.slotRightKey],iconLeft:e[t.iconLeftKey],iconRight:e[t.iconRightKey]}})},[f,r]),[C,j]=(0,c.useState)(null!=i?i:null==(n=k[0])?void 0:n.id),M=(0,c.useCallback)(t=>{var e;let n=x.current,i=(null==t?void 0:t.target).closest(".".concat(eS.tab)),r=n.getBoundingClientRect(),s=i.getBoundingClientRect();n.scrollTo({left:s.left-r.left-4+(null!==(e=n.scrollLeft)&&void 0!==e?e:0),behavior:"smooth"})},[]),E=(t,e)=>{j(t),M(e),s(t,e)},S=(t,e)=>{((null==e?void 0:e.key)===" "||(null==e?void 0:e.key)==="Enter")&&(j(t),M(e),null==y||y(t,e))};return(0,c.useEffect)(()=>{null!=i&&j(i)},[i]),(0,c.useImperativeHandle)(e,()=>x),(0,l.jsx)("div",{ref:x,role:"tablist",className:(0,m.Z)(eS.segmentedControl,{[eS.secondary]:"secondary"===a,[eS.states.small]:"s"===v,[eS.states.medium]:"m"===v,[eS.states.weightVariant]:"medium"===p,[eS.states.stretch]:h,[eS.states.rounded]:d},o),style:u,...w,"data-id":_,"data-qa":b,children:k.map((t,e)=>(0,l.jsxs)("button",{type:"button",role:"tab","data-qa":(0,g.g)("".concat(b,"-tab-").concat(++e),!!b),"aria-selected":t.id===C,"aria-disabled":t.disabled?t.disabled:void 0,tabIndex:(null==t?void 0:t.disabled)?-1:0,className:(0,m.Z)(eS.tab,{[eS.states.active]:t.id===C,[eS.states.disabled]:t.disabled,[eS.states.iconOnly]:!t.label&&(t.iconLeft||t.slotLeft),[eS.states.left]:t.label&&(t.iconLeft||t.slotLeft),[eS.states.right]:t.label&&(t.iconRight||t.slotRight)}),onClick:t.disabled?void 0:e=>E(t.id,e),onKeyDown:t.disabled?void 0:e=>S(t.id,e),children:[t.iconLeft&&(0,l.jsx)("span",{className:eS.icon,children:t.iconLeft}),t.slotLeft&&t.label&&(0,l.jsx)("span",{className:eS.slot,children:t.slotLeft}),t.label&&(0,l.jsx)("span",{className:eS.label,children:t.label}),t.label&&(0,l.jsxs)(l.Fragment,{children:[t.slotRight&&(0,l.jsx)("span",{className:eS.slot,children:t.slotRight}),t.iconRight&&(0,l.jsx)("span",{className:eS.icon,children:t.iconRight})]})]},t.id))})}).displayName="SegmentedControl",n(98713),n(87538);let eT=(0,y.g)("snackbar"),eO=Object.freeze({snackbar:eT,item:"".concat(eT,"__item"),itemOut:"".concat(eT,"__item--out"),position:{topLeft:"".concat(eT,"--top-left"),topRight:"".concat(eT,"--top-right"),bottomLeft:"".concat(eT,"--bottom-left"),bottomRight:"".concat(eT,"--bottom-right")},alertFill:X.fill}),eL={status:"status",alert:"alert"},eA=(t,e,n)=>t<=e?e:t>=n?n:t,eR=new Map,eI=null;(0,c.forwardRef)((t,e)=>{let{quantity:n=3,position:i="topRight",closeAll:r,style:s,className:a,dataQa:o,dataId:u,...h}=t,[d,p]=(0,c.useState)(!1),[v,g]=(0,c.useState)([]),y=(0,c.useRef)(new Map),b=(0,c.useCallback)(t=>{d||t.forEach(t=>{if(t.withoutTimer||y.current.has(t.id))return;let e=setTimeout(()=>{x(t,()=>{var e;w(t.id),null==(e=t.closeByTimer)||e.call(t)})},t.timer?1e3*eA(t.timer,4,10):4e3);y.current.set(t.id,e)})},[d]),_=(0,c.useCallback)(()=>{y.current.forEach(t=>clearTimeout(t)),y.current.clear()},[]);(0,c.useEffect)(()=>(eI=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){let e=[];eR.forEach(t=>{e.push(new Promise(e=>x(t,e)))}),Promise.all(e).then(()=>{null==r||r(),_(),eR.clear(),g(t.slice(0,eA(n,1,5)))})}else g(t.slice(0,eA(n,1,5)))},()=>{eI=null}),[r,_,n]),(0,c.useEffect)(()=>{b(v)},[v,b]);let w=t=>{eR.delete(t),y.current.has(t)&&(clearTimeout(y.current.get(t)),y.current.delete(t)),eI&&eI([...Array.from(eR.values())])},x=(t,e)=>{eR.set(t.id,{...t,isExiting:!0}),eI&&eI([...Array.from(eR.values())]),setTimeout(()=>{e()},250)},k=()=>{p(!1),b(v)},C=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];k(),x(e,()=>{var i,r;w(e.id),n?null==(i=e.onButtonClick)||i.call(e,t):null==(r=e.onClose)||r.call(e,t)})};return(0,l.jsx)(l.Fragment,{children:!!v.length&&(0,l.jsx)(f.ll,{id:"finkit-snackbars",children:(0,l.jsx)("ul",{ref:e,role:"region",className:(0,m.Z)(eO.snackbar,eO.position[i],a),style:s,onMouseEnter:()=>{p(!0),_()},onMouseLeave:k,...h,"data-qa":o,"data-id":u,children:v.map(t=>(0,l.jsx)("li",{id:t.id,className:(0,m.Z)(eO.item,{[eO.itemOut]:t.isExiting}),children:(0,l.jsx)(J,{role:"error"===t.state?eL.alert:eL.status,label:t.label,state:t.state,caption:t.caption,withClose:t.withClose||t.withoutTimer&&!t.buttonText,onClose:e=>{C(e,t)},buttonText:t.buttonText,onButtonClick:e=>{C(e,t,!0)},className:eO.alertFill,dataQa:t.dataQa,dataId:t.dataId,buttonVariant:"white",withIcon:!0})},t.id))})})})}).displayName="Snackbar",n(48971),n(57705);let eD=(0,y.g)("tabs"),eP=Object.freeze({tabs:eD,tabWrapper:"".concat(eD,"__tab-wrapper"),tab:"".concat(eD,"__tab"),active:"".concat(eD,"__tab--active"),activeLine:"".concat(eD,"__activeLine")});(0,c.forwardRef)((t,e)=>{var n;let{activeTabId:i,tabs:r,onTabChange:s,style:a,className:o,dataQa:u,dataId:h,...d}=t,[f,p]=(0,c.useState)(null!=i?i:null==(n=r[0])?void 0:n.id),[v,y]=(0,c.useState)(null),[b,_]=(0,c.useState)({width:0,left:0}),w=(0,c.useRef)(null);(0,c.useEffect)(()=>{v&&_({left:v.offsetLeft-2,width:v.offsetWidth+4})},[v]);let x=(0,c.useCallback)(t=>{var e;let n=w.current,i=(null==t?void 0:t.target).closest(".".concat(eP.tab)),r=n.getBoundingClientRect(),s=i.getBoundingClientRect();n.scrollTo({left:s.left-r.left-4+(null!==(e=n.scrollLeft)&&void 0!==e?e:0),behavior:"smooth"})},[]),k=(t,e)=>{x(e),p(t),s(t,e)};return(0,c.useImperativeHandle)(e,()=>w),(0,l.jsxs)("ul",{role:"tablist",ref:w,className:(0,m.Z)(eP.tabs,o),style:a,...d,"data-id":h,"data-qa":u,children:[r.map((t,e)=>{let n=t.id===f;return!t.disabled&&(0,l.jsx)("li",{role:"tab","aria-selected":t.id===f,"data-qa":(0,g.g)("".concat(u,"-tab-").concat(++e),!!u),className:eP.tabWrapper,children:(0,l.jsx)("button",{type:"button",ref:n?y:null,className:(0,m.Z)(eP.tab,{[eP.active]:n}),onClick:e=>k(t.id,e),children:t.label})},t.id)}),(0,l.jsx)("div",{className:(0,m.Z)(eP.activeLine),style:{left:b.left,width:b.width}})]})}).displayName="Tabs";var eZ=n(78665);n(9894);let eF=(t,e,n)=>{(0,c.useEffect)(()=>{t&&(n&&e?(t.style.height="auto",t.style.height=t.scrollHeight+"px"):t.style.height="")},[n,t,e])},e$=(0,y.g)("textarea"),ez={root:e$,container:"".concat(e$,"__container"),field:"".concat(e$,"__field"),labelWrapper:"".concat(e$,"__label-wrapper"),label:"".concat(e$,"__label"),captionWrapper:"".concat(e$,"__caption-wrapper"),caption:"".concat(e$,"__caption"),counter:"".concat(e$,"__counter"),states:{primary:"".concat(e$,"--primary"),secondary:"".concat(e$,"--secondary"),error:"".concat(e$,"--error"),success:"".concat(e$,"--success"),s:"".concat(e$,"--s"),m:"".concat(e$,"--m"),l:"".concat(e$,"--l"),focused:"".concat(e$,"--focused"),active:"".concat(e$,"--active"),disabled:"".concat(e$,"--disabled"),hasLabel:"".concat(e$,"--has-label"),hasCaption:"".concat(e$,"--has-caption")}};(0,c.forwardRef)((t,e)=>{let{disabled:n,state:i,size:r="m",variant:s="primary",label:a,className:o,style:u,value:h="",rows:d=1,maxLength:f,caption:p,counter:v,placeholder:g,autoResize:y=!1,hasCaption:b=!1,dataQa:_,dataId:w,onChange:x,onFocus:k,onBlur:C,...j}=t,{value:M,show:E,hide:S}=tq(),N=(0,c.useRef)(null),T="s"!==r;eF(N.current,h,y);let O=(0,c.useMemo)(()=>!M||h||"s"!==r||g?M?g:"s"===r?a:g:a,[g,h,r,M,a]),L=(0,c.useMemo)(()=>d<1?1:d>5?5:d,[d]),A=(0,c.useMemo)(()=>f&&f>0?f:void 0,[f]),R=(0,c.useMemo)(()=>v&&!!A&&A>0&&"".concat(h.length,"/").concat(A),[v,A,h.length]);return(0,l.jsxs)("div",{className:(0,m.Z)(o,ez.root),style:u,ref:e,"data-qa":_,"data-id":w,children:[(0,l.jsx)("div",{className:(0,m.Z)(ez.container,ez.states[s],ez.states[r],{[ez.states.focused]:M,[ez.states.error]:"error"===i,[ez.states.success]:"success"===i,[ez.states.disabled]:!!n}),children:(0,l.jsxs)("label",{className:ez.labelWrapper,children:[T&&(0,l.jsx)("span",{className:(0,m.Z)(ez.label,{[ez.states.active]:M||!!h||!!g}),children:a}),(0,l.jsx)("textarea",{...j,"aria-disabled":n?"true":void 0,"aria-invalid":"error"===i?"true":void 0,className:(0,m.Z)(ez.field,{[ez.states.hasLabel]:T}),rows:L,maxLength:A,ref:N,value:h,placeholder:O,disabled:n,onFocus:t=>{E(),null==k||k(t)},onBlur:t=>{S(),null==C||C(t)},onChange:t=>{null==x||x(t.target.value||"",t)}})]})}),(b||p||R)&&(0,l.jsxs)("div",{className:ez.captionWrapper,children:[(b||p)&&(0,l.jsx)("div",{className:(0,m.Z)(ez.caption,{[ez.states.error]:"error"===i,[ez.states.success]:"success"===i,[ez.states.disabled]:!!n}),children:p}),R&&(0,l.jsx)("div",{className:ez.counter,children:R})]})]})}).displayName="Textarea",n(37418);var eB=n(27590);function eV(){return"undefined"==typeof window}n(25546);let eU=eV()?c.useLayoutEffect:c.useEffect;function eq(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return eV()?e:window.matchMedia(t).matches}function eW(t){let{minWidth:e}=A.a[t];return function(t){let{defaultValue:e=!1,initializeWithValue:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[i,r]=(0,c.useState)(()=>n?eq(t,e):null!=e&&e);function s(){r(eq(t))}return eU(()=>{let e=window.matchMedia(t);return s(),"function"==typeof e.addListener?e.addListener(s):e.addEventListener("change",s),()=>{"function"==typeof e.removeListener?e.removeListener(s):e.removeEventListener("change",s)}},[t]),i}("screen and (min-width: ".concat(e,"px)"))}Object.freeze({divider:(0,y.g)("dropdown-divider")});let eH=(0,y.g)("dropdown-group");Object.freeze({group:eH,title:"".concat(eH,"__title"),content:"".concat(eH,"__content")});let eG=(0,y.g)("dropdown-option"),eY=Object.freeze({option:eG,slot:"".concat(eG,"__slot"),iconSlot:"".concat(eG,"__slot--icon"),wrapper:"".concat(eG,"__wrapper"),label:"".concat(eG,"__label"),caption:"".concat(eG,"__caption"),states:{danger:"".concat(eG,"--danger"),success:"".concat(eG,"--success"),focused:"".concat(eG,"--focused"),disabled:"".concat(eG,"--disabled")}});function eK(t){let{as:e,label:n,caption:i,iconLeft:r,iconRight:s,prepend:a,append:o,variant:u="default",disabled:h=!1,focused:d=!1,className:f,onClick:p,...v}=t,g=(0,m.Z)(f,eY.option,{[eY.states.focused]:d,[eY.states.success]:"success"===u,[eY.states.danger]:"danger"===u,[eY.states.disabled]:!!h}),y=(0,c.useCallback)(t=>{t.preventDefault(),h||null==p||p(t)},[h,p]);return(0,l.jsxs)(e||"div",{...v,className:g,"aria-disabled":h,onClick:y,children:[a&&(0,l.jsx)("span",{className:eY.slot,children:a}),r&&(0,l.jsx)("span",{className:(0,m.Z)(eY.slot,eY.iconSlot),children:r}),(0,l.jsxs)("div",{className:eY.wrapper,children:[(0,l.jsx)("span",{className:eY.label,children:n}),i&&(0,l.jsx)("span",{className:eY.caption,children:i})]}),s&&(0,l.jsx)("span",{className:(0,m.Z)(eY.slot,eY.iconSlot),children:s}),o&&(0,l.jsx)("span",{className:eY.slot,children:o})]})}let eQ=(t,e,n)=>t?"object"!=typeof t?n:"function"==typeof e?e(t):t[e]:void 0,eX=(0,y.g)("input-autocomplete"),eJ={input:eX,pending:"".concat(eX,"__pending"),pendingIcon:"".concat(eX,"__pending-icon"),empty:"".concat(eX,"__empty"),emptyText:"".concat(eX,"__empty-text"),emptyDescription:"".concat(eX,"__empty-description"),options:"".concat(eX,"__options"),optionIcon:"".concat(eX,"__option-icon"),button:"".concat(eX,"__button"),states:{selected:"".concat(eX,"--selected")}};function e0(t){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("defs",null,c.createElement("clipPath",{id:"a"},c.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),c.createElement("g",{clipPath:"url(#a)"},c.createElement("path",{d:"m10.53 16.53 8.25-8.25a.743.743 0 0 0 0-1.06.743.743 0 0 0-1.06 0L10 14.94l-3.72-3.72a.743.743 0 0 0-1.06 0 .743.743 0 0 0 0 1.06l4.25 4.25c.146.147.323.22.53.22a.722.722 0 0 0 .53-.22Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})))}let e1=t=>{let{items:e,itemSize:n,renderItem:i,overscan:r=2,outerRef:s,itemsContainerClassname:a}=t,[o,u]=(0,c.useState)({start:0,end:0}),h=(0,c.useCallback)(()=>{if(!s.current)return;let t=s.current.clientHeight,i=s.current.scrollTop;u({start:Math.max(0,Math.floor(i/n)-r),end:Math.min(e.length,Math.ceil((i+t)/n)+r)})},[n,e.length,s,r]);(0,c.useLayoutEffect)(()=>{h()},[h]),(0,c.useEffect)(()=>{let t=s.current;if(!t)return;let e=()=>h();t.addEventListener("scroll",e);let n=new ResizeObserver(()=>h());return n.observe(t),()=>{t.removeEventListener("scroll",e),n.disconnect()}},[h,s]);let d=e.length*n+16,f=e.slice(o.start,o.end),p={position:"absolute",top:0,height:f.length*n,transform:"translateY(".concat(o.start*n,"px)"),width:"100%",margin:0};return(0,l.jsx)("div",{style:{position:"relative",height:d,width:"auto",margin:"-8px"},children:(0,l.jsx)("ul",{className:a,style:p,role:"listbox",children:f.map((t,e)=>i(t,o.start+e))},"options")})};function e2(t){let{inputValue:e,mappedOptions:n,pending:i=!1,optionsEmptyText:r="Нет результатов",optionsEmptyDescription:s,contentInnerRef:a,withVirtualize:o=!1,handleOptionClick:u}=t,h=(0,c.useId)();if(i)return(0,l.jsx)("div",{className:eJ.pending,children:(0,l.jsx)(D.P,{className:eJ.pendingIcon,children:(0,l.jsx)(E.S,{})})});if((null==e?void 0:e.length)&&!n.length)return(0,l.jsxs)("div",{className:eJ.empty,children:[(0,l.jsx)("div",{className:eJ.emptyText,children:r}),s&&(0,l.jsx)("div",{className:eJ.emptyDescription,children:s})]});let d=t=>(0,l.jsx)(eK,{role:"option","aria-selected":t.selected,as:"li",disabled:t.disabled,label:t.label,caption:t.caption,focused:t.active,onClick:()=>u(t),append:(0,l.jsx)(D.P,{className:(0,m.Z)(eJ.optionIcon,{[eJ.states.selected]:t.selected}),style:{fontSize:24},children:(0,l.jsx)(e0,{})})},JSON.stringify(t.value));return o?(0,l.jsx)(e1,{outerRef:a,items:n,itemSize:40,renderItem:d,itemsContainerClassname:eJ.options}):(0,l.jsx)("ul",{className:eJ.options,id:h,role:"listbox",children:n.map(d)},"options")}(0,c.forwardRef)((t,e)=>{let{value:n,selectedValue:i,label:r,options:s=[],state:a,icon:o,rightLabel:u,desktopMaxHeight:h,pending:d=!1,buttonLabel:f="Выбрать",optionValue:p="value",optionLabel:v="label",optionCaption:m="caption",optionDisabled:y="disabled",variant:b="primary",size:_="m",disabled:w=!1,caption:x,hasCaption:k=!1,keepFocus:C=!1,optionsEmptyText:j="Нет результатов",optionsEmptyDescription:M,withVirtualize:S,onChange:N,onSelect:T,onFocus:O,onBlur:L,onKeydown:A,dataQa:R,dataId:I,className:D,style:P,...Z}=t,[F,$]=(0,c.useState)(!1),[z,B]=(0,c.useState)(""),V=(0,c.useRef)(null),U=(0,c.useRef)(null),q=(0,c.useRef)(null),W=(0,c.useRef)(null),H=eW("m");(0,c.useImperativeHandle)(e,()=>U.current);let G=(0,c.useMemo)(()=>H?F&&(s.length>0||!!z||d):F,[z,H,F,s.length,d]),Y=(0,c.useMemo)(()=>s.map((t,e)=>{let n=eQ(t,p,t),r=eQ(i,p,i);return{index:e,value:n,label:eQ(t,v,t),caption:eQ(t,m),disabled:eQ(t,y),selected:r===n,original:t}}),[m,y,v,p,s,i]),K=(0,c.useMemo)(()=>Y.find(t=>{let{selected:e}=t;return e}),[Y]);(0,c.useEffect)(()=>{if(!n&&!i){B("");return}n&&B(n)},[n]),(0,c.useEffect)(()=>{i&&B(eQ(i,v,i))},[]),(0,c.useEffect)(()=>{F||(K?Q(K.label):X())},[F]);let Q=t=>{B(t),null==N||N(t)},X=t=>{null==T||T(t)},J=()=>{$(!0)},tt=()=>{$(!1)},te=t=>{null==L||L(t)};return(0,l.jsx)("div",{ref:e,className:eJ.input,"data-id":I,"data-qa":R,children:(0,l.jsxs)(nD,{opened:G,onToggle:$,width:"inherit",placement:"bottom",mobileFullHeight:!0,desktopMaxHeight:h,footer:H||!i?void 0:(0,l.jsx)(E.B,{label:f,disabled:!i,className:eJ.button,onClick:()=>{tt()}}),heading:H?void 0:(0,l.jsx)(tJ,{inputRef:q,className:D,style:P,value:z,label:r,rightLabel:u,icon:o,state:a,caption:x,hasCaption:k,onChange:Q,onBlur:te,...Z}),dataQa:(0,g.g)("".concat(R,"-dropdown"),!!R),children:[(0,l.jsx)(nU,{asChild:!0,children:(0,l.jsx)(tJ,{value:z,label:r,rightLabel:u,icon:o,size:_,variant:b,state:a,disabled:w,caption:x,hasCaption:k,onClick:void 0,onChange:Q,onFocus:t=>{J(),H||(t.preventDefault(),setTimeout(()=>{var t;null==(t=q.current)||t.focus()},100)),null==O||O(t)},onBlur:te,onKeyDown:t=>{"Tab"===t.key&&tt(),null==A||A(t)},ref:V,inputRef:U,...Z,dataQa:(0,g.g)("".concat(R,"-dropdown-input"),!!R)})}),(0,l.jsx)(nF,{contentInnerRef:W,children:(0,l.jsx)(e2,{inputValue:z,mappedOptions:Y,pending:d,optionsEmptyText:j,optionsEmptyDescription:M,handleOptionClick:t=>{var e;if(Q(t.label),X(t.original),H){if(C){null==(e=U.current)||e.focus();return}tt()}},contentInnerRef:W,withVirtualize:S})})]})})}).displayName="InputAutocomplete";let e3="dd.MM.yyyy",e4=(t,e)=>((t<1||t>12)&&console.warn("Месяц должен быть в диапазоне от 1 до 12"),new Date(e,t,0).getDate()),e5=t=>{let[e,n,i]=t.split(".").map(Number),r=e4(n,i||1900);return[(e>r?r:e).toString().padStart(2,"0"),n.toString().padStart(2,"0"),i.toString().padStart(4,"0").substring(0,4)].join(".")};(0,c.forwardRef)((t,e)=>{let{value:n=null,autoFocus:i=!1,onChange:r,onKeyDown:s,...a}=t,[o,u]=(0,c.useState)(""),{ref:h,setValue:d}=(0,t0.Cj)({mask:Date,autofix:!0,pattern:"d.`m.`Y",validate:()=>{},placeholderChar:" ",prepare:t=>!t||t.length<10||t.includes(" ")?t:e5(t),overwrite:!1,blocks:{d:{mask:t0.LV.MaskedRange,from:1,to:31,maxLength:2},m:{mask:t0.LV.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:t0.LV.MaskedRange,from:1900,to:2099,maxLength:4}}},{onAccept:t=>{if(t.length<10||t.includes(" "))null!==n&&(null==r||r(null,""));else{let e=e5(t),n=(0,t1.Z)(e,e3,new Date);if((0,t2.Z)(n)){null==r||r(n,e),u(e);return}}u(t)}});return(0,c.useEffect)(()=>{if(n instanceof Date&&(0,t2.Z)(n)){let t=(0,t3.Z)(n,e3);d(t),u(t)}else"string"==typeof n&&(0,t4.Z)(n,"dd.mm.yyyy")&&(d(n),u(n))},[n,d]),(0,c.useImperativeHandle)(e,()=>h.current),(0,l.jsx)(tJ,{...a,autoFocus:i,inputRef:h,value:o,inputMode:"numeric",onKeyDown:t=>{("Escape"===t.key||"Esc"===t.key)&&(t.preventDefault(),u(""),d(""),null==r||r(null,"")),null==s||s(t)},maskPlaceholder:"дд.мм.гггг"})}).displayName="InputDate";let e7=(0,c.forwardRef)((t,e)=>{let{maskOpts:n,value:i="",autoFocus:r=!1,onChange:s,onKeyDown:a,...o}=t,[u,h]=(0,c.useState)(""),{ref:d,setValue:f,unmaskedValue:p}=(0,t0.Cj)(n,{onAccept:(t,e)=>{h(t),null==s||s(e.unmaskedValue,t)}});return(0,c.useEffect)(()=>{i!==p&&(f(i),h(i))},[i,f,p]),(0,c.useImperativeHandle)(e,()=>d.current),(0,l.jsx)(tJ,{...o,autoFocus:r,inputRef:d,value:u,onKeyDown:t=>{("Escape"===t.key||"Esc"===t.key)&&(t.preventDefault(),f(""),h(""),null==s||s("","")),null==a||a(t)}})});e7.displayName="InputMasked";let e6=t=>{let[e,n]=(0,c.useState)(t),i=(0,c.useRef)([]),r=(0,c.useRef)(e),s=(0,c.useCallback)((t,e)=>{e&&i.current.unshift(e),n(e=>{let n={...e,...t};return r.current=n,n})},[]),a=(0,c.useCallback)(()=>r.current,[]);return(0,c.useEffect)(()=>{i.current[0]&&(i.current[0](e),i.current.shift())},[e]),[e,s,a]},e8=t=>{let e=(0,c.useRef)();return(0,c.useEffect)(()=>{e.current=JSON.parse(JSON.stringify(t))},[t]),e.current},e9=t=>{let e=t.toString().split(".")[1];return e?e.length:0},nt=t=>t.touches&&t.touches.length||t.changedTouches&&t.changedTouches.length,ne=(t,e,n)=>{let i=Number(((e-t)/n).toFixed(8));return parseInt(i.toString(),10)===i},nn=(t,e,n,i,r,s,a)=>{if(t=Math.round(1e11*t)/1e11,!s){let n=a[e-1],i=a[e+1];if(n&&n>t)return n;if(i&&i<t)return i}if(t>i)return i;if(t<n)return n;let o=Math.floor(1e11*t-1e11*n)%Math.floor(1e11*r),l=Math.floor(1e11*t-Math.abs(o)),c=0===o?t:l/1e11,u=Math.abs(o/1e11)<r/2?c:c+r,h=e9(r);return parseFloat(u.toFixed(h))},ni=(t,e,n)=>(t-e)/(n-e),nr=t=>t===nE.Up,ns=(t,e,n)=>{if(e>=n)throw RangeError("min (".concat(e,") is equal/bigger than max (").concat(n,")"));if(t<e)throw RangeError("value (".concat(t,") is smaller than min (").concat(e,")"));if(t>n)throw RangeError("value (".concat(t,") is bigger than max (").concat(n,")"))},na=t=>{if(!(t.length<2)&&!t.slice(1).every((e,n)=>t[n]<=e))throw RangeError("values={[".concat(t,"]} needs to be sorted when allowOverlap={false}"))},no=t=>{let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10),bottom:parseInt(e.marginBottom,10),left:parseInt(e.marginLeft,10),right:parseInt(e.marginRight,10)}},nl=t=>{let e=window.getComputedStyle(t);return{top:parseInt(e.paddingTop,10)+parseInt(e.borderTopWidth,10),bottom:parseInt(e.paddingBottom,10)+parseInt(e.borderBottomWidth,10),left:parseInt(e.paddingLeft,10)+parseInt(e.borderLeftWidth,10),right:parseInt(e.paddingRight,10)+parseInt(e.borderRightWidth,10)}},nc=(t,e,n)=>{let i=n?-1:1;t.forEach((t,n)=>nh(t,i*e[n].x,e[n].y))},nu=(t,e,n,i)=>{let r=0,s=ng(t[0],e,n,i);for(let a=1;a<t.length;a++){let o=ng(t[a],e,n,i);o<s&&(s=o,r=a)}return r},nh=(t,e,n)=>{t.style.transform="translate(".concat(e,"px, ").concat(n,"px)")},nd=t=>{let e;let n=null;return function(){for(var i=arguments.length,r=Array(i),s=0;s<i;s++)r[s]=arguments[s];e=r,n||(n=requestAnimationFrame(()=>{n=null,t(...e)}))}},nf=(t,e,n)=>{let i=t.slice(0);return i[e]=n,i},np=t=>{let{values:e,colors:n,min:i,max:r,direction:s=nE.Right}=t,a=e.slice(0).sort((t,e)=>t-e).map(t=>(t-i)/(r-i)*100).reduce((t,e,i)=>"".concat(t,", ").concat(n[i]," ").concat(e,"%, ").concat(n[i+1]," ").concat(e,"%"),"");return"linear-gradient(".concat(s,", ").concat(n[0]," 0%").concat(a,", ").concat(n[n.length-1]," 100%)")},nv=()=>null,nm=()=>{throw Error("Did not expect to get here")},ng=(t,e,n,i)=>{let{left:r,top:s,width:a,height:o}=t.getBoundingClientRect();return nr(i)?Math.abs(n-(s+o/2)):Math.abs(e-(r+a/2))},ny=(t,e,n)=>{let i=["#C2C2C6",...Array(t-1||1).fill(n?"#A5A7AB":"#525BBB"),"#C2C2C6"];return 1===t&&(e?i.pop():i.shift()),i},nb=(0,y.g)("range-slider"),n_=Object.freeze({range:nb,vertical:"".concat(nb,"--vertical"),disabled:"".concat(nb,"--disabled"),track:"".concat(nb,"__track"),thumb:"".concat(nb,"__thumb"),thumbDrag:"".concat(nb,"__thumb--drag"),label:"".concat(nb,"__label"),mark:"".concat(nb,"__mark"),legend:"".concat(nb,"__legend"),legendItem:"".concat(nb,"__legend-item")}),nw=["ArrowRight","ArrowUp","k","PageUp"],nx=["ArrowLeft","ArrowDown","j","PageDown"],nk=t=>{let{props:e,children:n,propValues:i,disabled:r}=t;return(0,l.jsx)("div",{className:(0,m.Z)(n_.range,{[n_.vertical]:i.direction===nE.Up,[n_.disabled]:r},e.className),onMouseDown:e.onMouseDown,onTouchStart:e.onTouchStart,style:{...e.style},"data-id":e.dataId,"data-qa":e.dataQa,children:(0,l.jsx)("div",{ref:e.ref,className:(0,m.Z)(n_.track),style:{background:np({values:i.values,colors:ny(i.values.length,!!i.rtl,r),min:i.min||0,max:i.max||100,direction:i.direction||nE.Right,rtl:!!i.rtl})},children:n})})},nC=t=>{let{props:e,isDragged:n,formattedValue:i}=t,{key:r,...s}=e;return(0,l.jsxs)("div",{...s,style:e.style,className:(0,m.Z)(n_.thumb,e.className,{[n_.thumbDrag]:n}),children:[(0,l.jsx)("label",{className:(0,m.Z)(n_.label),children:i}),(0,l.jsx)("span",{})]},r)},nj=t=>{let{props:e,index:n,propValues:i}=t,r={width:"2px",height:n%2?"12px":"16px",backgroundColor:n*(i.step||1)+(i.min||0)<i.values[0]?"#525BBB":"#D2D3D5"},s={width:n%2?"12px":"16px",height:"2px",backgroundColor:n*(i.step||1)>(i.max||100)-i.values[0]?"#525BBB":"#D2D3D5"},a=i.direction===nE.Right?r:s,{key:o,...c}=e;return 1===i.values.length&&(0,l.jsx)("div",{...c,className:(0,m.Z)(e.className),style:{...e.style,...a}},o)},nM=(0,c.forwardRef)((t,e)=>{let{step:n=1,direction:i=nE.Right,rtl:r=!1,disabled:s=!1,allowOverlap:a=!1,draggableTrack:o=!1,min:u=0,max:h=100,legend:d=[],onChange:f=()=>null,renderTrack:p=nk,renderThumb:v=nC,renderMark:g=nj,showMarks:y=!1,onFinalChange:b,formatValue:_=t=>String(t),className:w,dataQa:x,dataId:k,...C}=t,j=(0,c.useMemo)(()=>({...C,step:n,direction:i,rtl:r,disabled:s,allowOverlap:a,draggableTrack:o,min:u,max:h,legend:d}),[C,n,i,r,s,a,o,u,h,d]),M=(0,c.useRef)(j);(0,c.useEffect)(()=>{M.current=j},[j]);let E=(0,c.useRef)(null),S=(0,c.useRef)(Array(C.values.length).fill(null)),N=(0,c.useRef)(),T=(0,c.useRef)([]),O=(0,c.useRef)(),L=(0,c.useRef)(),A=nd(t=>{if(t.preventDefault(),!(1&t.buttons))return I(t);te(t.clientX,t.clientY)}),R=nd(t=>{t.preventDefault(),te(t.touches[0].clientX,t.touches[0].clientY)}),I=t=>{let{draggedThumbIndex:e,draggedTrackPos:n}=F();if(t.preventDefault(),document.removeEventListener("mousemove",A),document.removeEventListener("touchmove",R),document.removeEventListener("mouseup",D),document.removeEventListener("touchend",D),document.removeEventListener("touchcancel",D),-1===e&&-1===n[0]&&-1===n[1])return null;Z({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},()=>{tn()})},D=nd(I),[P,Z,F]=e6({draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:Array(C.values.length).fill(0).map((t,e)=>e),isChanged:!1,markOffsets:[],legendOffsets:[]}),$=t=>{if(!y){O.current=void 0,N.current=void 0;return}O.current=(t.max-t.min)/t.step,N.current=[]},z=t=>{if(!t.legend||!t.legend.length)return},B=()=>{nc(U(),q(),M.current.rtl),W(),H()},V=t=>{if(M.current.disabled)return;let e=nt(t);if(!e&&0!==t.button)return;let n=K(t);if(-1===n)return;e?Q():X();let{thumbZIndexes:i}=F();Z({draggedThumbIndex:n,thumbZIndexes:i.map((t,e)=>e===n?Math.max(...i):t<=i[n]?t:t-1)})},U=()=>E.current?Array.from(E.current.children).filter(t=>t.hasAttribute("aria-valuenow")):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[]),q=()=>{let t=M.current.values,e=E.current;if(!e)return[];let n=e.getBoundingClientRect(),i=nl(e);return U().map((e,r)=>{let s={x:0,y:0},a=e.getBoundingClientRect(),o=no(e);switch(M.current.direction){case nE.Right:return s.x=-((o.left+i.left)*1),s.y=-(((a.height-n.height)/2+i.top)*1),s.x+=n.width*ni(t[r],M.current.min,M.current.max)-a.width/2,s;case nE.Up:return s.x=-(((a.width-n.width)/2+o.left+i.left)*1),s.y=-i.left,s.y+=n.height-n.height*ni(t[r],M.current.min,M.current.max)-a.height/2,s;default:return nm()}})};e&&"function"!=typeof e&&(e.current=E.current),e&&"function"!=typeof e&&e.current&&(e.current.getThumbs=U,e.current.getOffsets=q);let W=()=>{if(!y||!E.current||!O.current||!N.current||null===E.current)return;let t=window.getComputedStyle(E.current),e=parseInt(t.width,10),n=parseInt(t.height,10),i=parseInt(t.paddingLeft,10),r=parseInt(t.paddingTop,10),s=[];for(let t=0;t<O.current+1;t++){let a=9999,o=9999;if(N.current[t]){let e=N.current[t].getBoundingClientRect();a=e.height,o=e.width}M.current.direction===nE.Right?s.push([Math.round(e/O.current*t+i-o/2),-Math.round((a-n)/2)]):s.push([Math.round(n/O.current*t+r-a/2),-Math.round((o-e)/2)])}Z({markOffsets:s})},H=()=>{var t;if(!M.current.legend||!M.current.legend.length||!E.current||!T.current||M.current.rtl||i!==nE.Right)return;let e=window.getComputedStyle(E.current),n=parseInt(e.width,10),r=parseInt(e.paddingLeft,10),s=n/((M.current.max-M.current.min)/M.current.step),a=[];for(let e=0;e<M.current.legend.length;e++){let i=9999,o=9999;if(T.current[e]){let n=null==(t=T.current[e])?void 0:t.getBoundingClientRect();i=(null==n?void 0:n.height)||i,o=(null==n?void 0:n.width)||o}let l=M.current.legend[e],c=Math.round(((nS(l)?l.value:l)-M.current.min)/M.current.step*s+r-o/2);a.push([Math.min(Math.max(c,0),n-o),Math.round(i/5)])}Z({legendOffsets:a})};(0,c.useEffect)(()=>{var t;$(M.current),z(M.current),L.current=window.ResizeObserver?new window.ResizeObserver(B):{observe:()=>window.addEventListener("resize",B),unobserve:()=>window.removeEventListener("resize",B)},document.addEventListener("touchstart",V,{passive:!1}),document.addEventListener("mousedown",V,{passive:!1}),a||na(C.values),C.values.forEach(t=>ns(t,u,h));let e=E.current;return e&&(null==(t=L.current)||t.observe(e)),nc(U(),q(),r),W(),H(),C.values.forEach(t=>{ne(u,t,n)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}),()=>{var t;document.removeEventListener("mousedown",V,{passive:!1}),document.removeEventListener("mousemove",A),document.removeEventListener("touchmove",R),document.removeEventListener("touchstart",V),document.removeEventListener("mouseup",D),document.removeEventListener("touchend",D),e&&(null==(t=L.current)||t.unobserve(e))}},[j.min,j.max]);let G=e8(j),Y=e8(P);(0,c.useEffect)(()=>{((null==G?void 0:G.max)!==h||(null==G?void 0:G.min)!==u||(null==G?void 0:G.step)!==n||JSON.stringify(null==G?void 0:G.legend)!==JSON.stringify(d))&&($(M.current),z(M.current)),nc(U(),q(),r),((null==G?void 0:G.max)!==h||(null==G?void 0:G.min)!==u||(null==G?void 0:G.step)!==n||JSON.stringify(null==G?void 0:G.legend)!==JSON.stringify(d)||(null==Y?void 0:Y.markOffsets.length)!==P.markOffsets.length||(null==Y?void 0:Y.legendOffsets.length)!==P.legendOffsets.length)&&(W(),H(),C.values.forEach(t=>{ne(u,t,n)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},[j,P]);let K=t=>U().findIndex(e=>e===t.target||e.contains(t.target)),Q=()=>{document.addEventListener("touchmove",R,{passive:!1}),document.addEventListener("touchend",D,{passive:!1}),document.addEventListener("touchcancel",D,{passive:!1})},X=()=>{document.addEventListener("mousemove",A),document.addEventListener("mouseup",D)},J=(t,e)=>nn(t,e,M.current.min,M.current.max,M.current.step,M.current.allowOverlap,M.current.values),tt=t=>{JSON.stringify(t)!==JSON.stringify(M.current.values)&&(M.current.values=t,f(t))},te=(t,e)=>{let{draggedThumbIndex:n,draggedTrackPos:i}=F(),r=M.current.values;if(-1===n&&-1===i[0]&&-1===i[1])return null;let s=E.current;if(!s)return null;let a=s.getBoundingClientRect(),o=nr(M.current.direction)?a.height:a.width;if(-1!==i[0]&&-1!==i[1]){let n=t-i[0],s=e-i[1],a=0;switch(M.current.direction){case nE.Right:a=n/o*(M.current.max-M.current.min);break;case nE.Up:a=s/o*(M.current.max-M.current.min);break;default:nm()}if(M.current.rtl&&(a*=-1),Math.abs(a)>=M.current.step/2){for(let t=0;t<S.current.length;t++){if(r[t]===M.current.max&&1===Math.sign(a)||r[t]===M.current.min&&-1===Math.sign(a))return;let e=r[t]+a;e>M.current.max?a=M.current.max-r[t]:e<M.current.min&&(a=M.current.min-r[t])}let n=r.slice(0);for(let t=0;t<S.current.length;t++)n=nf(n,t,J(r[t]+a,t));Z({draggedTrackPos:[t,e]}),tt(n)}}else{let i=0;switch(M.current.direction){case nE.Right:i=(t-a.left)/o*(M.current.max-M.current.min)+M.current.min;break;case nE.Up:i=(o-(e-a.top))/o*(M.current.max-M.current.min)+M.current.min;break;default:nm()}M.current.rtl&&(i=M.current.max+M.current.min-i),Math.abs(r[n]-i)>=M.current.step/2&&tt(nf(r,n,J(i,n)))}},tn=()=>{Z({isChanged:!1});let t=M.current.values;b&&b(t)},ti=t=>{let e=M.current.values,{isChanged:n}=F(),i=K(t.nativeEvent),r=M.current.rtl?-1:1;-1!==i&&(nw.includes(t.key)?(t.preventDefault(),Z({draggedThumbIndex:i,isChanged:!0}),tt(nf(e,i,J(e[i]+r*("PageUp"===t.key?10*M.current.step:M.current.step),i)))):nx.includes(t.key)?(t.preventDefault(),Z({draggedThumbIndex:i,isChanged:!0}),tt(nf(e,i,J(e[i]-r*("PageDown"===t.key?10*M.current.step:M.current.step),i)))):"Tab"===t.key?Z({draggedThumbIndex:-1},()=>{n&&tn()}):n&&tn())},tr=()=>{let{isChanged:t}=F();Z({draggedThumbIndex:-1},()=>{t&&tn()})},ts=t=>{let{values:e}=M.current,n=e.reduce((n,i,r)=>{let s=Math.abs(e[n]-t);return Math.abs(i-t)<=s?r:n},0);tt(e.map((e,i)=>i===n?t:e))};return(0,l.jsxs)(l.Fragment,{children:[p({props:{style:{cursor:P.draggedThumbIndex>-1?"grabbing":o?nr(i)?"ns-resize":"ew-resize":1!==C.values.length||s?"inherit":"pointer"},onMouseDown:s?nv:t=>{var e;if(0!==t.button)return;let n=M.current.values;if(t.persist(),t.preventDefault(),X(),n.length>1&&M.current.draggableTrack){if(S.current.some(e=>null==e?void 0:e.contains(t.target)))return;Z({draggedTrackPos:[t.clientX,t.clientY]},()=>te(t.clientX,t.clientY))}else{let n=nu(S.current.map(t=>t),t.clientX,t.clientY,M.current.direction);null==(e=S.current[n])||e.focus(),Z({draggedThumbIndex:n},()=>te(t.clientX,t.clientY))}},onTouchStart:s?nv:t=>{var e;let n=M.current.values;if(t.persist(),Q(),n.length>1&&M.current.draggableTrack){if(S.current.some(e=>null==e?void 0:e.contains(t.target)))return;Z({draggedTrackPos:[t.touches[0].clientX,t.touches[0].clientY]},()=>te(t.touches[0].clientX,t.touches[0].clientY))}else{let n=nu(S.current.map(t=>t),t.touches[0].clientX,t.touches[0].clientY,M.current.direction);null==(e=S.current[n])||e.focus(),Z({draggedThumbIndex:n},()=>te(t.touches[0].clientX,t.touches[0].clientY))}},ref:t=>{E.current=t},className:(0,m.Z)(w),dataQa:x,dataId:k},isDragged:P.draggedThumbIndex>-1,disabled:s,children:[...P.markOffsets.map((t,e)=>{let n={left:"".concat(t[0],"px"),marginTop:"".concat(t[1],"px")},r={top:"".concat(t[0],"px"),marginLeft:"".concat(t[1],"px")};return g({props:{style:i===nE.Right?n:r,key:"mark".concat(e),ref:t=>{t&&N.current&&(N.current[e]=t)},className:n_.mark},index:e,propValues:j})}),...C.values.map((t,e)=>{let n=P.draggedThumbIndex===e;return v({index:e,value:t,formattedValue:_(t),isDragged:n,props:{style:{zIndex:P.thumbZIndexes[e],cursor:s?"inherit":n?"grabbing":"grab"},key:e,tabIndex:s?void 0:0,"aria-valuemax":a?h:C.values[e+1]||h,"aria-valuemin":a?u:C.values[e-1]||u,"aria-valuenow":t,draggable:!1,ref:t=>{t&&(S.current[e]=t)},role:"slider",onKeyDown:s?nv:ti,onKeyUp:s?nv:tr,className:n_.thumb}})})],propValues:j}),j.direction===nE.Right&&(0,l.jsx)("div",{className:n_.legend,children:d.map((t,e)=>{var n,i;let r;return r=nS(t)?t.value:t,(0,l.jsx)("button",{type:"button",ref:t=>{Array.isArray(T.current)&&(T.current[e]=t)},className:(0,m.Z)(n_.legendItem),style:{left:"".concat(null==(n=P.legendOffsets[e])?void 0:n[0],"px"),marginTop:"".concat(null==(i=P.legendOffsets[e])?void 0:i[1],"px")},tabIndex:s?-1:0,onClick:s?void 0:()=>ts(r),children:nS(t)?t.label:_(r)},"legend".concat(e))})})]})});nM.displayName="RangeSlider";var nE=((r=nE||{}).Right="to right",r.Up="to top",r);let nS=t=>"object"==typeof t,nN=(0,y.g)("input-range"),nT={inputRange:nN,input:"".concat(nN,"__input"),slider:"".concat(nN,"__slider")};(0,c.forwardRef)((t,e)=>{let{value:n,step:i=1,min:r=0,max:s=100,disabled:a,ticks:o=[],className:u,inputClassname:h,sliderClassname:d,size:f="m",decimals:p="auto",decimalsCount:v=2,tooltip:g=t=>t,dataId:y,dataQa:b,autoFocus:_=!1,style:w,onChange:x,onBlur:k,...C}=t,j=(0,c.useMemo)(()=>"number"!=typeof n||n<r?r:n>s?s:n,[n,r,s]),[M,E]=(0,eB.u)(j||r,n),[S,N]=(0,c.useState)(j?[j]:[r]),T=(0,c.useRef)(null),O=(0,c.useRef)(null);(0,c.useImperativeHandle)(e,()=>({inputRef:T.current,sliderRef:O.current}),[O,T]);let L=(0,c.useCallback)(t=>{if(E(t),!t||t<r){N([r]);return}if(t>s){N([s]);return}N([t]),null==x||x(t)},[s,r,x,E]);(0,c.useEffect)(()=>{"number"==typeof n&&L(n)},[n]);let A=(0,c.useCallback)(t=>{M||(N([r]),E(r),null==x||x(r)),null==k||k(t)},[M,r,k,E,x]),R=(0,c.useCallback)(t=>{var e;E(t[0]),N(t),null==(e=null==T?void 0:T.current)||e.focus(),null==x||x(t[0])},[x,E]),I=(0,c.useCallback)(()=>{var t;null==(t=null==T?void 0:T.current)||t.blur()},[]);return(0,l.jsxs)("div",{className:(0,m.Z)(u,nT.inputRange),style:w,"data-qa":b,"data-id":y,children:[(0,l.jsx)(em,{...C,autoFocus:_,value:M,withoutControls:!0,min:r,max:s,disabled:a,step:i,ref:T,className:(0,m.Z)(h,nT.input),size:f,decimals:p,decimalsCount:v,onChange:L,onBlur:A}),(0,l.jsx)(nM,{values:S,min:r,max:s,legend:o,step:Math.abs(i),disabled:a,ref:O,className:(0,m.Z)(d,nT.slider),formatValue:g,onChange:R,onFinalChange:I})]})}).displayName="InputRange",(0,c.forwardRef)((t,e)=>{let{value:n="",autoFocus:i=!1,onChange:r,onKeyDown:s,dataQa:a,dataId:o,...u}=t,[h,d]=(0,c.useState)(""),{ref:f,unmaskedValue:p,setValue:v}=(0,t0.Cj)({mask:"+{7} (000) 000-00-00"},{onAccept:(t,e)=>{d(t),null==r||r(e.unmaskedValue,t)}});return(0,c.useEffect)(()=>{n!==p&&v(n)},[n,v,p]),(0,c.useImperativeHandle)(e,()=>f.current),(0,l.jsx)(tJ,{...u,autoFocus:i,dataQa:a,dataId:o,inputRef:f,value:h,maskPlaceholder:"+7 (000) 000-00-00",onKeyDown:t=>{("Escape"===t.key||"Esc"===t.key)&&(t.preventDefault(),v(""),d(""),null==r||r("","")),null==s||s(t)}})}).displayName="InputTel";let nO=(0,y.g)("modal"),nL=Object.freeze({modal:nO,overlay:"".concat(nO,"__overlay"),withoutFooter:"".concat(nO,"--without-footer"),noContent:"".concat(nO,"--no-content"),open:"".concat(nO,"--open"),overlayOpen:"".concat(nO,"__overlay--open"),height:{medium:"".concat(nO,"--height-medium"),full:"".concat(nO,"--height-full")},size:{s:"".concat(nO,"--s"),m:"".concat(nO,"--m"),l:"".concat(nO,"--l"),xl:"".concat(nO,"--xl")},header:"".concat(nO,"__header"),headerText:"".concat(nO,"__header-text"),headerTitle:"".concat(nO,"__header-title"),headerSubtitle:"".concat(nO,"__header-subtitle"),closeIcon:"".concat(nO,"__close-icon"),backButton:"".concat(nO,"__back-button"),backButtonText:"".concat(nO,"__back-button-text"),headerStates:{centered:"".concat(nO,"__header--centered"),withLongBtn:"".concat(nO,"__header--with-long-btn"),defaultHeight:"".concat(nO,"__header--default-height")},content:"".concat(nO,"__content"),withoutPadding:"".concat(nO,"__content--without-padding"),withScroll:"".concat(nO,"__content--with-scroll"),footer:"".concat(nO,"__footer"),footerContainer:"".concat(nO,"__footer-container"),footerBtn:"".concat(nO,"__footer-btn"),footerDescription:"".concat(nO,"__footer-description"),divider:"".concat(nO,"__divider"),dividerTop:"".concat(nO,"__divider--top"),dividerBottom:"".concat(nO,"__divider--bottom")}),nA=t=>{let{primaryBtnText:e,onPrimary:n,secondaryBtnText:i,onSecondary:r,thirdBtnText:s,onThird:a,description:o,children:c,noContent:u,dataQa:h}=t;return(0,l.jsxs)("div",{"data-qa":(0,g.g)("".concat(h,"-footer"),!!h),className:(0,m.Z)(nL.footer,{[nL.noContent]:u}),children:[!u&&(0,l.jsx)("div",{className:(0,m.Z)(nL.divider,nL.dividerTop)}),c||(0,l.jsxs)("div",{className:nL.footerContainer,children:[s&&(0,l.jsx)(E.B,{dataQa:(0,g.g)("".concat(h,"-footer-third-btn"),!!h),label:s,variant:"secondary",size:"s",className:nL.footerBtn,onClick:a}),i&&(0,l.jsx)(E.B,{dataQa:(0,g.g)("".concat(h,"-footer-secondary-btn"),!!h),label:i,variant:"secondary",size:"s",className:nL.footerBtn,onClick:r}),e&&(0,l.jsx)(E.B,{dataQa:(0,g.g)("".concat(h,"-footer-primary-btn"),!!h),label:e,size:"s",className:nL.footerBtn,onClick:n})]}),o&&(0,l.jsx)("span",{"data-qa":(0,g.g)("".concat(h,"-footer-description"),!!h),className:nL.footerDescription,children:o})]})},nR=t=>{let{text:e,title:n,subtitle:i,align:r="left",backBtnVariant:s,onBack:a,onClose:o,noContent:c,dataQa:u,withoutCloseBtn:h=!1}=t;return(0,l.jsxs)("div",{"data-qa":(0,g.g)("".concat(u,"-header"),!!u),className:(0,m.Z)(nL.header,{[nL.headerStates.centered]:"center"===r||!!s,[nL.headerStates.withLongBtn]:"long"===s,[nL.headerStates.defaultHeight]:!e&&!n&&!i}),children:[e&&(0,l.jsx)("span",{"data-qa":(0,g.g)("".concat(u,"-header-text"),!!u),className:nL.headerText,children:e}),n&&(0,l.jsx)("span",{"data-qa":(0,g.g)("".concat(u,"-header-title"),!!u),className:nL.headerTitle,children:n}),i&&(0,l.jsx)("span",{"data-qa":(0,g.g)("".concat(u,"-header-subtitle"),!!u),className:nL.headerSubtitle,children:i}),!h&&(0,l.jsx)("button",{"data-qa":(0,g.g)("".concat(u,"-header-close"),!!u),type:"button",className:nL.closeIcon,onClick:o,children:(0,l.jsx)(D.P,{children:(0,l.jsx)(V,{})})}),s&&(0,l.jsxs)("button",{"data-qa":(0,g.g)("".concat(u,"-header-back"),!!u),type:"button",className:nL.backButton,onClick:a,children:[(0,l.jsx)(D.P,{children:(0,l.jsx)(tt.S,{})}),"long"===s&&(0,l.jsx)("span",{className:nL.backButtonText,children:"Назад"})]}),!c&&(0,l.jsx)("div",{className:(0,m.Z)(nL.divider,nL.dividerBottom)})]})},nI=(0,c.forwardRef)((t,e)=>{let{header:n,footer:i,open:r=!1,size:s="m",noPadding:a=!1,height:o="full",onClose:u,children:h,className:d,style:p,dataQa:v,dataId:y,dismissDisabled:b=!1,..._}=t,[w,x]=(0,c.useState)(!1),[k,C]=(0,c.useState)(!1),j=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{j.current&&cancelAnimationFrame(j.current)},[]),(0,c.useEffect)(()=>{if(j.current&&cancelAnimationFrame(j.current),r)return x(!0),j.current=requestAnimationFrame(()=>{requestAnimationFrame(()=>{C(!0)})}),()=>{j.current&&cancelAnimationFrame(j.current)};{C(!1);let t=setTimeout(()=>{x(!1)},300);return()=>{clearTimeout(t),j.current&&cancelAnimationFrame(j.current)}}},[r]);let M=()=>{C(!1);let t=setTimeout(()=>{null==u||u(),x(!1)},300);return()=>clearTimeout(t)},{context:E}=(0,f.YF)({open:w,onOpenChange:t=>{t||M()}}),S=(0,f.bQ)(E,{outsidePressEvent:"mousedown",outsidePress:!b,escapeKey:!b}),N=(0,f.qs)(E,{role:"dialog"}),{getFloatingProps:T}=(0,f.NI)([S,N]),[O,L]=(0,c.useState)(!1),A=(0,c.useCallback)(t=>{t&&new ResizeObserver(()=>{L(t.scrollHeight>t.clientHeight)}).observe(t)},[]);return w?(0,l.jsx)(f.ll,{id:"finkit-modals",children:(0,l.jsx)(f.y0,{lockScroll:!0,className:(0,m.Z)(nL.overlay,{[nL.overlayOpen]:k}),children:(0,l.jsx)(f.wD,{context:E,children:(0,l.jsxs)("div",{ref:e,className:(0,m.Z)(nL.modal,nL.size[s],nL.height[o],{[nL.withoutFooter]:!(null==i?void 0:i.primaryBtnText)&&!(null==i?void 0:i.children),[nL.open]:k},d),style:p,...T(),..._,"data-id":y,"data-qa":v,children:[(0,l.jsx)(nR,{...n,dataQa:v,noContent:!h,onClose:M}),h&&(0,l.jsx)("div",{"data-qa":(0,g.g)("".concat(v,"-content"),!!v),ref:A,className:(0,m.Z)(nL.content,{[nL.withoutFooter]:!(null==i?void 0:i.primaryBtnText)&&!(null==i?void 0:i.children),[nL.withoutPadding]:a,[nL.withScroll]:O}),children:h}),((null==i?void 0:i.primaryBtnText)||(null==i?void 0:i.children))&&(0,l.jsx)(nA,{...i,dataQa:v,noContent:!h})]})})})}):null});nI.displayName="Modal",(0,y.g)("select");let nD=t=>{let{children:e,...n}=t,i=function(){let{placement:t="bottom",width:e="auto",desktopMaxHeight:n,mobileFullHeight:i=!1,title:r,description:s,opened:a,onToggle:o,heading:l,footer:u,dataQa:h,dataId:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[m,g]=(0,c.useState)(!1),y=null!=a?a:m,b=null!=o?o:g,_=(0,f.YF)({open:y,onOpenChange:b,placement:t,whileElementsMounted:p.Me,middleware:[(0,v.cv)(8),(0,v.RR)({fallbackAxisSideDirection:"none"}),(0,v.uY)({crossAxis:!1,padding:8})]});return(0,c.useMemo)(()=>({open:y,setOpen:b,..._,width:e,desktopMaxHeight:n,title:r,description:s,heading:l,footer:u,mobileFullHeight:i,dataQa:h,dataId:d}),[y,b,_,e,n,r,s,l,u,i,h,d])}(n);return(0,l.jsx)(n$.Provider,{value:i,children:e})};nD.displayName="Dropdown";let nP=(0,y.g)("dropdown"),nZ=Object.freeze({dropdown:nP,overlay:"".concat(nP,"__overlay"),mobileHeading:"".concat(nP,"__mobile-heading"),heading:"".concat(nP,"__heading"),title:"".concat(nP,"__title"),description:"".concat(nP,"__description"),content:"".concat(nP,"__content"),contentInner:"".concat(nP,"__content-inner"),footer:"".concat(nP,"__footer"),close:"".concat(nP,"__close"),closeIcon:"".concat(nP,"__close-icon"),states:{auto:"".concat(nP,"--auto"),fullHeight:"".concat(nP,"--full-height")}}),nF=(0,c.forwardRef)((t,e)=>{var n,i;let{style:r,contentInnerRef:s,...a}=t,{open:o,context:u,width:h,floatingStyles:d,refs:p,heading:v,title:y,description:b,footer:_,desktopMaxHeight:w,mobileFullHeight:x,dataQa:k,dataId:C,setOpen:j}=nz(),M=(0,f.qq)([p.setFloating,e]),E=(0,c.useRef)(null),S=eW("s"),{isMounted:N,styles:T}=(0,f.Y_)(u,{initial:{opacity:.2,transform:S?"translate(0, 0)":"translate(0, 100%)"},open:{opacity:1,transform:"translate(0, 0)"},duration:{open:300,close:100}});if((0,c.useEffect)(()=>{let t=t=>{let{target:e}=t;!o||[E.current,p.reference.current].some(t=>t===e||t&&t.contains(e))||j(!1)};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[o,p.reference,j]),!N)return null;let O=(0,l.jsxs)("div",{ref:E,className:(0,m.Z)(nZ.dropdown,{[nZ.states.fullHeight]:x}),role:S?"popup":"dialog","aria-modal":!S,"data-id":C,"data-qa":k,style:T,children:[(0,l.jsx)(nV,{title:y,description:b,heading:v,isDesktop:S,setOpen:j,"data-qa":(0,g.g)("".concat(k,"-header"),!!k)}),(0,l.jsx)("div",{...a,className:nZ.content,"data-qa":(0,g.g)("".concat(k,"-content"),!!k),children:(0,l.jsx)("div",{className:nZ.contentInner,style:{maxHeight:S?w:void 0},ref:s,children:a.children})}),(0,l.jsx)(nB,{"data-qa":(0,g.g)("".concat(k,"-header"),!!k),footer:_})]});if(S){let t;return"inherit"===h?t=null==(i=null==(n=null==p?void 0:p.reference)?void 0:n.current)?void 0:i.clientWidth:"auto"===h?t=void 0:"number"==typeof h&&(t=h),(0,l.jsx)("div",{className:(0,m.Z)(nZ.overlay,{[nZ.states.auto]:"auto"===h}),style:{...r,...d,...void 0!==t&&{width:t}},ref:M,children:O})}return(0,l.jsx)(f.ll,{id:"finkit-dropdown",children:(0,l.jsx)(f.y0,{lockScroll:!0,className:(0,m.Z)(nZ.overlay,{[nZ.states.auto]:"auto"===h}),style:r,ref:M,children:O})})});nF.displayName="DropdownContent";let n$=(0,c.createContext)(null),nz=()=>{let t=(0,c.useContext)(n$);if(null===t)throw Error("Dropdown components must be wrapped in <Dropdown />");return t},nB=t=>{let{footer:e,...n}=t;return e?(0,l.jsx)("div",{...n,className:nZ.footer,children:e}):null};nB.displayName="DropdownFooter";let nV=t=>{let{title:e,description:n,heading:i,isDesktop:r,setOpen:s,...a}=t,o=(0,c.useMemo)(()=>i||(r&&(e||n)?(0,l.jsxs)(l.Fragment,{children:[e&&(0,l.jsx)("div",{className:nZ.title,children:e}),n&&(0,l.jsx)("div",{className:nZ.description,children:n})]}):null),[n,i,r,e]);return(0,l.jsxs)(l.Fragment,{children:[!r&&(0,l.jsxs)("div",{...a,className:nZ.mobileHeading,children:[e&&(0,l.jsx)("div",{className:nZ.title,children:e}),n&&(0,l.jsx)("div",{className:nZ.description,children:n}),(0,l.jsx)("button",{className:nZ.close,type:"button",tabIndex:-1,"aria-label":"Закрыть окно",onClick:()=>s(!1),children:(0,l.jsx)(D.P,{"aria-hidden":"true",className:nZ.closeIcon,style:{display:"inline-flex"},children:(0,l.jsx)(V,{})})})]}),o&&(0,l.jsx)("div",{...a,className:nZ.heading,children:o})]})};nV.displayName="DropdownHeader";let nU=(0,c.forwardRef)(function(t,e){let{children:n,asChild:i=!1,disabled:r,...s}=t,{refs:a,open:o,setOpen:u}=nz(),h=n.ref,d=(0,f.qq)([a.setReference,e,h]),p=(0,c.useCallback)(()=>{r||u(!o)},[r,o,u]);return i&&(0,c.isValidElement)(n)?(0,c.cloneElement)(n,{ref:d,disabled:r,onClick:p,...s,...n.props}):(0,l.jsx)("button",{ref:d,onClick:p,disabled:r,...s,type:"button",children:n})});function nq(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}nU.displayName="DropdownTrigger";let nW=nq(),nH=/[&<>"']/,nG=RegExp(nH.source,"g"),nY=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,nK=RegExp(nY.source,"g"),nQ={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nX=t=>nQ[t];function nJ(t,e){if(e){if(nH.test(t))return t.replace(nG,nX)}else if(nY.test(t))return t.replace(nK,nX);return t}let n0=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,n1=/(^|[^\[])\^/g;function n2(t,e){let n="string"==typeof t?t:t.source;e=e||"";let i={replace:(t,e)=>{let r="string"==typeof e?e:e.source;return r=r.replace(n1,"$1"),n=n.replace(t,r),i},getRegex:()=>new RegExp(n,e)};return i}function n3(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch(t){return null}return t}let n4={exec:()=>null};function n5(t,e){let n=t.replace(/\|/g,(t,e,n)=>{let i=!1,r=e;for(;--r>=0&&"\\"===n[r];)i=!i;return i?"|":" |"}).split(/ \|/),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e){if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("")}for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function n7(t,e,n){let i=t.length;if(0===i)return"";let r=0;for(;r<i;){let s=t.charAt(i-r-1);if(s!==e||n){if(s!==e&&n)r++;else break}else r++}return t.slice(0,i-r)}function n6(t,e,n,i){let r=e.href,s=e.title?nJ(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){i.state.inLink=!0;let t={type:"link",raw:n,href:r,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,t}return{type:"image",raw:n,href:r,title:s,text:nJ(a)}}class n8{options;rules;lexer;constructor(t){this.options=t||nW}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:n7(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],n=function(t,e){let n=t.match(/^(\s+)(?:```)/);if(null===n)return e;let i=n[1];return e.split("\n").map(t=>{let e=t.match(/^\s+/);if(null===e)return t;let[n]=e;return n.length>=i.length?t.slice(i.length):t}).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){let e=n7(t,"#");this.options.pedantic?t=e.trim():(!e||/ $/.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n    $1");t=n7(t.replace(/^ *>[ \t]?/gm,""),"\n");let n=this.lexer.state.top;this.lexer.state.top=!0;let i=this.lexer.blockTokens(t);return this.lexer.state.top=n,{type:"blockquote",raw:e[0],tokens:i,text:t}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let s=RegExp(`^( {0,3}${n})((?:[	 ][^\\n]*)?(?:\\n|$))`),a="",o="",l=!1;for(;t;){let n,i=!1;if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;a=e[0],t=t.substring(a.length);let c=e[2].split("\n",1)[0].replace(/^\t+/,t=>" ".repeat(3*t.length)),u=t.split("\n",1)[0],h=0;this.options.pedantic?(h=2,o=c.trimStart()):(h=(h=e[2].search(/[^ ]/))>4?1:h,o=c.slice(h),h+=e[1].length);let d=!1;if(!c&&/^ *$/.test(u)&&(a+=u+"\n",t=t.substring(u.length+1),i=!0),!i){let e=RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),n=RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),r=RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;t;){let s=t.split("\n",1)[0];if(u=s,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),i.test(u)||r.test(u)||e.test(u)||n.test(t))break;if(u.search(/[^ ]/)>=h||!u.trim())o+="\n"+u.slice(h);else{if(d||c.search(/[^ ]/)>=4||i.test(c)||r.test(c)||n.test(c))break;o+="\n"+u}d||u.trim()||(d=!0),a+=s+"\n",t=t.substring(s.length+1),c=u.slice(h)}}!r.loose&&(l?r.loose=!0:/\n *\n *$/.test(a)&&(l=!0));let f=null;this.options.gfm&&(f=/^\[[ xX]\] /.exec(o))&&(n="[ ] "!==f[0],o=o.replace(/^\[[ xX]\] +/,"")),r.items.push({type:"list_item",raw:a,task:!!f,checked:n,loose:!1,text:o,tokens:[]}),r.raw+=a}r.items[r.items.length-1].raw=a.trimEnd(),r.items[r.items.length-1].text=o.trimEnd(),r.raw=r.raw.trimEnd();for(let t=0;t<r.items.length;t++)if(this.lexer.state.top=!1,r.items[t].tokens=this.lexer.blockTokens(r.items[t].text,[]),!r.loose){let e=r.items[t].tokens.filter(t=>"space"===t.type),n=e.length>0&&e.some(t=>/\n.*\n/.test(t.raw));r.loose=n}if(r.loose)for(let t=0;t<r.items.length;t++)r.items[t].loose=!0;return r}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(/\s+/g," "),n=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;let n=n5(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),r=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let t of i)/^ *-+: *$/.test(t)?s.align.push("right"):/^ *:-+: *$/.test(t)?s.align.push("center"):/^ *:-+ *$/.test(t)?s.align.push("left"):s.align.push(null);for(let t of n)s.header.push({text:t,tokens:this.lexer.inline(t)});for(let t of r)s.rows.push(n5(t,s.header.length).map(t=>({text:t,tokens:this.lexer.inline(t)})));return s}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:nJ(e[1])}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t))return;let e=n7(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(")"))return -1;let n=0;for(let e=0;e<t.length;e++)if("\\"===t[e])e++;else if("("===t[e])n++;else if(")"===t[e]&&--n<0)return e;return -1}(e[2],"()");if(t>-1){let n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);t&&(n=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(t)?n.slice(1):n.slice(1,-1)),n6(e,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=e[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!t){let t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return n6(n,t,n[0],this.lexer)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...i[0]].length-1,r,s,a=n,o=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(i=l.exec(e));){if(!(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6]))continue;if(s=[...r].length,i[3]||i[4]){a+=s;continue}if((i[5]||i[6])&&n%3&&!((n+s)%3)){o+=s;continue}if((a-=s)>0)continue;s=Math.min(s,s+a+o);let e=[...i[0]][0].length,l=t.slice(0,n+i.index+e+s);if(Math.min(n,s)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," "),n=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return n&&i&&(t=t.substring(1,t.length-1)),t=nJ(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,n;return n="@"===e[2]?"mailto:"+(t=nJ(e[1])):t=nJ(e[1]),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])n="mailto:"+(t=nJ(e[0]));else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=nJ(e[0]),n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:nJ(e[0]),{type:"text",raw:e[0],text:t}}}}let n9=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,it=/(?:[*+-]|\d{1,9}[.)])/,ie=n2(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,it).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ii=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ir=/(?!\s*\])(?:\\.|[^\[\]\\])+/,is=n2(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",ir).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ia=n2(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,it).getRegex(),io="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",il=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ic=n2("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",il).replace("tag",io).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),iu=n2(ii).replace("hr",n9).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",io).getRegex(),ih={blockquote:n2(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",iu).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:is,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:n9,html:ic,lheading:ie,list:ia,newline:/^(?: *(?:\n|$))+/,paragraph:iu,table:n4,text:/^[^\n]+/},id=n2("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",n9).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",io).getRegex(),ip={...ih,table:id,paragraph:n2(ii).replace("hr",n9).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",id).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",io).getRegex()},iv={...ih,html:n2("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",il).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:n4,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:n2(ii).replace("hr",n9).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ie).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},im=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ig=/^( {2,}|\\)\n(?!\s*$)/,iy="\\p{P}\\p{S}",ib=n2(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,iy).getRegex(),i_=n2(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,iy).getRegex(),iw=n2("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,iy).getRegex(),ix=n2("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,iy).getRegex(),ik=n2(/\\([punct])/,"gu").replace(/punct/g,iy).getRegex(),iC=n2(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ij=n2(il).replace("(?:-->|$)","-->").getRegex(),iM=n2("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ij).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),iE=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,iS=n2(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",iE).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),iN=n2(/^!?\[(label)\]\[(ref)\]/).replace("label",iE).replace("ref",ir).getRegex(),iT=n2(/^!?\[(ref)\](?:\[\])?/).replace("ref",ir).getRegex(),iO=n2("reflink|nolink(?!\\()","g").replace("reflink",iN).replace("nolink",iT).getRegex(),iL={_backpedal:n4,anyPunctuation:ik,autolink:iC,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:ig,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:n4,emStrongLDelim:i_,emStrongRDelimAst:iw,emStrongRDelimUnd:ix,escape:im,link:iS,nolink:iT,punctuation:ib,reflink:iN,reflinkSearch:iO,tag:iM,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:n4},iA={...iL,link:n2(/^!?\[(label)\]\((.*?)\)/).replace("label",iE).getRegex(),reflink:n2(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",iE).getRegex()},iR={...iL,escape:n2(im).replace("])","~|])").getRegex(),url:n2(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},iI={...iR,br:n2(ig).replace("{2,}","*").getRegex(),text:n2(iR.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},iD={normal:ih,gfm:ip,pedantic:iv},iP={normal:iL,gfm:iR,breaks:iI,pedantic:iA};class iZ{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||nW,this.options.tokenizer=this.options.tokenizer||new n8,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={block:iD.normal,inline:iP.normal};this.options.pedantic?(e.block=iD.pedantic,e.inline=iP.pedantic):this.options.gfm&&(e.block=iD.gfm,this.options.breaks?e.inline=iP.breaks:e.inline=iP.gfm),this.tokenizer.rules=e}static get rules(){return{block:iD,inline:iP}}static lex(t,e){return new iZ(e).lex(t)}static lexInline(t,e){return new iZ(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[]){let n,i,r,s;for(t=this.options.pedantic?t.replace(/\t/g,"    ").replace(/^ +$/gm,""):t.replace(/^( *)(\t+)/gm,(t,e,n)=>e+"    ".repeat(n.length));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(i=>!!(n=i.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),1===n.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),(i=e[e.length-1])&&("paragraph"===i.type||"text"===i.type)?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);continue}if((n=this.tokenizer.fences(t))||(n=this.tokenizer.heading(t))||(n=this.tokenizer.hr(t))||(n=this.tokenizer.blockquote(t))||(n=this.tokenizer.list(t))||(n=this.tokenizer.html(t))){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),(i=e[e.length-1])&&("paragraph"===i.type||"text"===i.type)?(i.raw+="\n"+n.raw,i.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if((n=this.tokenizer.table(t))||(n=this.tokenizer.lheading(t))){t=t.substring(n.raw.length),e.push(n);continue}if(r=t,this.options.extensions&&this.options.extensions.startBlock){let e,n=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{"number"==typeof(e=t.call({lexer:this},i))&&e>=0&&(n=Math.min(n,e))}),n<1/0&&n>=0&&(r=t.substring(0,n+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){i=e[e.length-1],s&&"paragraph"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n),s=r.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),(i=e[e.length-1])&&"text"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,i,r,s,a,o;let l=t;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(a||(o=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(i=>!!(n=i.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),(i=e[e.length-1])&&"text"===n.type&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),(i=e[e.length-1])&&"text"===n.type&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if((n=this.tokenizer.emStrong(t,l,o))||(n=this.tokenizer.codespan(t))||(n=this.tokenizer.br(t))||(n=this.tokenizer.del(t))||(n=this.tokenizer.autolink(t))||!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}if(r=t,this.options.extensions&&this.options.extensions.startInline){let e,n=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{"number"==typeof(e=t.call({lexer:this},i))&&e>=0&&(n=Math.min(n,e))}),n<1/0&&n>=0&&(r=t.substring(0,n+1))}if(n=this.tokenizer.inlineText(r)){t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),a=!0,(i=e[e.length-1])&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw Error(e)}}return e}}class iF{options;constructor(t){this.options=t||nW}code(t,e,n){let i=(e||"").match(/^\S*/)?.[0];return(t=t.replace(/\n$/,"")+"\n",i)?'<pre><code class="language-'+nJ(i)+'">'+(n?t:nJ(t,!0))+"</code></pre>\n":"<pre><code>"+(n?t:nJ(t,!0))+"</code></pre>\n"}blockquote(t){return`<blockquote>
${t}</blockquote>
`}html(t,e){return t}heading(t,e,n){return`<h${e}>${t}</h${e}>
`}hr(){return"<hr>\n"}list(t,e,n){let i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"</"+i+">\n"}listitem(t,e,n){return`<li>${t}</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
`}table(t,e){return e&&(e=`<tbody>${e}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+e+"</table>\n"}tablerow(t){return`<tr>
${t}</tr>
`}tablecell(t,e){let n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,e,n){let i=n3(t);if(null===i)return n;let r='<a href="'+(t=i)+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>"}image(t,e,n){let i=n3(t);if(null===i)return n;t=i;let r=`<img src="${t}" alt="${n}"`;return e&&(r+=` title="${e}"`),r+=">"}text(t){return t}}class i${strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,n){return""+n}image(t,e,n){return""+n}br(){return""}}class iz{options;renderer;textRenderer;constructor(t){this.options=t||nW,this.options.renderer=this.options.renderer||new iF,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new i$}static parse(t,e){return new iz(e).parse(t)}static parseInline(t,e){return new iz(e).parseInline(t)}parse(t,e=!0){let n="";for(let i=0;i<t.length;i++){let r=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){let t=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(r.type)){n+=t||"";continue}}switch(r.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":n+=this.renderer.heading(this.parseInline(r.tokens),r.depth,this.parseInline(r.tokens,this.textRenderer).replace(n0,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""));continue;case"code":n+=this.renderer.code(r.text,r.lang,!!r.escaped);continue;case"table":{let t="",e="";for(let t=0;t<r.header.length;t++)e+=this.renderer.tablecell(this.parseInline(r.header[t].tokens),{header:!0,align:r.align[t]});t+=this.renderer.tablerow(e);let i="";for(let t=0;t<r.rows.length;t++){let n=r.rows[t];e="";for(let t=0;t<n.length;t++)e+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:r.align[t]});i+=this.renderer.tablerow(e)}n+=this.renderer.table(t,i);continue}case"blockquote":{let t=this.parse(r.tokens);n+=this.renderer.blockquote(t);continue}case"list":{let t=r.ordered,e=r.start,i=r.loose,s="";for(let t=0;t<r.items.length;t++){let e=r.items[t],n=e.checked,a=e.task,o="";if(e.task){let t=this.renderer.checkbox(!!n);i?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):o+=t+" "}o+=this.parse(e.tokens,i),s+=this.renderer.listitem(o,a,!!n)}n+=this.renderer.list(s,t,e);continue}case"html":n+=this.renderer.html(r.text,r.block);continue;case"paragraph":n+=this.renderer.paragraph(this.parseInline(r.tokens));continue;case"text":{let s=r,a=s.tokens?this.parseInline(s.tokens):s.text;for(;i+1<t.length&&"text"===t[i+1].type;)a+="\n"+((s=t[++i]).tokens?this.parseInline(s.tokens):s.text);n+=e?this.renderer.paragraph(a):a;continue}default:{let t='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw Error(t)}}}return n}parseInline(t,e){e=e||this.renderer;let n="";for(let i=0;i<t.length;i++){let r=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){let t=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=t||"";continue}}switch(r.type){case"escape":case"text":n+=e.text(r.text);break;case"html":n+=e.html(r.text);break;case"link":n+=e.link(r.href,r.title,this.parseInline(r.tokens,e));break;case"image":n+=e.image(r.href,r.title,r.text);break;case"strong":n+=e.strong(this.parseInline(r.tokens,e));break;case"em":n+=e.em(this.parseInline(r.tokens,e));break;case"codespan":n+=e.codespan(r.text);break;case"br":n+=e.br();break;case"del":n+=e.del(this.parseInline(r.tokens,e));break;default:{let t='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw Error(t)}}}return n}}class iB{options;constructor(t){this.options=t||nW}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}class iV{defaults=nq();options=this.setOptions;parse=this.#t(iZ.lex,iz.parse);parseInline=this.#t(iZ.lexInline,iz.parseInline);Parser=iz;Renderer=iF;TextRenderer=i$;Lexer=iZ;Tokenizer=n8;Hooks=iB;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let i of t)switch(n=n.concat(e.call(this,i)),i.type){case"table":for(let t of i.header)n=n.concat(this.walkTokens(t.tokens,e));for(let t of i.rows)for(let i of t)n=n.concat(this.walkTokens(i.tokens,e));break;case"list":n=n.concat(this.walkTokens(i.items,e));break;default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let r=t[i].flat(1/0);n=n.concat(this.walkTokens(r,e))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw Error("extension name required");if("renderer"in t){let n=e.renderers[t.name];n?e.renderers[t.name]=function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=n.apply(this,e)),i}:e.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw Error("extension level must be 'block' or 'inline'");let n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),n.extensions=e),t.renderer){let e=this.defaults.renderer||new iF(this.defaults);for(let n in t.renderer){if(!(n in e))throw Error(`renderer '${n}' does not exist`);if("options"===n)continue;let i=t.renderer[n],r=e[n];e[n]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=r.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new n8(this.defaults);for(let n in t.tokenizer){if(!(n in e))throw Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let i=t.tokenizer[n],r=e[n];e[n]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=r.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new iB;for(let n in t.hooks){if(!(n in e))throw Error(`hook '${n}' does not exist`);if("options"===n)continue;let i=t.hooks[n],r=e[n];iB.passThroughHooks.has(n)?e[n]=t=>{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then(t=>r.call(e,t));let n=i.call(e,t);return r.call(e,n)}:e[n]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=r.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(i.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return iZ.lex(t,e??this.defaults)}parser(t,e){return iz.parse(t,e??this.defaults)}#t(t,e){return(n,i)=>{let r={...i},s={...this.defaults,...r};!0===this.defaults.async&&!1===r.async&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);let a=this.#e(!!s.silent,!!s.async);if(null==n)return a(Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(e=>t(e,s)).then(t=>s.hooks?s.hooks.processAllTokens(t):t).then(t=>s.walkTokens?Promise.all(this.walkTokens(t,s.walkTokens)).then(()=>t):t).then(t=>e(t,s)).then(t=>s.hooks?s.hooks.postprocess(t):t).catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let i=t(n,s);s.hooks&&(i=s.hooks.processAllTokens(i)),s.walkTokens&&this.walkTokens(i,s.walkTokens);let r=e(i,s);return s.hooks&&(r=s.hooks.postprocess(r)),r}catch(t){return a(t)}}}#e(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+nJ(n.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}}let iU=new iV;function iq(t,e){return iU.parse(t,e)}iq.options=iq.setOptions=function(t){return iU.setOptions(t),iq.defaults=iU.defaults,nW=iq.defaults,iq},iq.getDefaults=nq,iq.defaults=nW,iq.use=function(...t){return iU.use(...t),iq.defaults=iU.defaults,nW=iq.defaults,iq},iq.walkTokens=function(t,e){return iU.walkTokens(t,e)},iq.parseInline=iU.parseInline,iq.Parser=iz,iq.parser=iz.parse,iq.Renderer=iF,iq.TextRenderer=i$,iq.Lexer=iZ,iq.lexer=iZ.lex,iq.Tokenizer=n8,iq.Hooks=iB,iq.parse=iq,iq.options,iq.setOptions,iq.use,iq.walkTokens,iq.parseInline,iz.parse,iZ.lex,n(96434).Buffer,Object.freeze({643:"RUB",840:"USD",978:"EUR",36:"AUD",944:"AZN",826:"GBP",51:"AMD",933:"BYN",975:"BGN",986:"BRL",348:"HUF",704:"VND",344:"HKD",981:"GEL",208:"DKK",784:"AED",818:"EGP",356:"INR",360:"IDR",398:"KZT",124:"CAD",634:"QAR",417:"KGS",156:"CNY",498:"MDL",554:"NZD",578:"NOK",985:"PLN",946:"RON",960:"XDR",702:"SGD",972:"TJS",764:"THB",949:"TRY",934:"TMT",860:"UZS",980:"UAH",203:"CZK",752:"SEK",756:"CHF",941:"RSD",710:"ZAR",410:"KRW",392:"JPY"});let iW=Object.freeze({RUB:"₽",USD:"$",EUR:"€",AUD:"AU$",AZN:"₼",GBP:"\xa3",AMD:"֏",BYN:"Br",BGN:"лв",BRL:"R$",HUF:"Ft",VND:"₫",HKD:"HK$",GEL:"₾",DKK:"kr",AED:"د.إ.",EGP:"E\xa3",INR:"₹",IDR:"Rp",KZT:"₸",CAD:"CA$",QAR:"ر.ق.",KGS:"с",CNY:"CN\xa5",MDL:"L",NZD:"NZ$",NOK:"kr",PLN:"zł",RON:"L",XDR:"XDR",SGD:"S$",TJS:"SM",THB:"฿",TRY:"₺",TMT:"T",UZS:"сум",UAH:"₴",CZK:"Kč",SEK:"kr",CHF:"₣",RSD:"дин",ZAR:"R",KRW:"₩",JPY:"\xa5"});(s=a||(a={})).Pending="pending",s.Success="success";let iH={decimalCount:2,decimalSeparator:",",thousandsSeparator:"\xa0",decimalIsWithoutZeros:!0,preventLargeNumbers:!1};(o||(o={})).PERSISTENT_STATE="persistentState";let iG=Object.freeze(Object.keys(Object.freeze({xs:Object.freeze({maxWidth:599}),s:Object.freeze({minWidth:600,maxWidth:767}),m:Object.freeze({minWidth:768,maxWidth:1023}),l:Object.freeze({minWidth:1024,maxWidth:1279}),xl:Object.freeze({minWidth:1280,maxWidth:1439}),"2xl":Object.freeze({minWidth:1440,maxWidth:1919}),"3xl":Object.freeze({minWidth:1920})})));function iY(t){return`finkit-${t}`}Object.freeze(iG.filter(t=>"xs"!==t)),Object.freeze(iG.filter(t=>"3xl"!==t));let iK=Object.freeze({privateIcon:iY("private-icon")}),iQ={display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden"},iX=iY("caption");Object.freeze({caption:iX,captionWithIcon:`${iX}--with-icon`,content:`${iX}__content`,icon:`${iX}__icon`,text:`${iX}__text`,size:{s:`${iX}--s`,m:`${iX}--m`},states:{success:`${iX}--success`,error:`${iX}--error`,warning:`${iX}--warning`}}),iY("card");let iJ=iY("col");Object.freeze({col:iJ,state:{size:(t,e)=>!0===e?`${iJ}--${t}`:`${iJ}--${t}-${e}`,offsetLeft:(t,e)=>`${iJ}--${t}-offset-left-${e}`,offsetRight:(t,e)=>`${iJ}--${t}-offset-right-${e}`}});let i0=iY("container");Object.freeze({container:i0,states:{narrow:`${i0}--narrow`}});let i1=iY("divider");Object.freeze({divider:i1,content:`${i1}__content`});let i2=iY("form-field");Object.freeze({formField:i2,labelWrapper:`${i2}__label-wrapper`,label:`${i2}__label`,description:`${i2}__description`});let i3=iY("heading");Object.freeze({heading:i3,states:Object.freeze({display:`${i3}--display`,hero:`${i3}--hero`,h1:`${i3}--h1`,h2:`${i3}--h2`,h3:`${i3}--h3`,h4:`${i3}--h4`,h5:`${i3}--h5`,h6:`${i3}--h6`})});let i4=iY("loader");Object.freeze({loader:i4,variant:{primary:`${i4}--primary`,purple:`${i4}--purple`,accent:`${i4}--accent`,white:`${i4}--white`},size:{s:`${i4}--s`,m:`${i4}--m`,l:`${i4}--l`}});let i5=iY("progress-bar");Object.freeze({progressBar:i5,rounded:`${i5}-rounded`,indicator:`${i5}__indicator`,text:`${i5}__text`,animationCircle:`${i5}__animation-circle`});let i7=iY("row"),i6=(t,e,n)=>`${i7}--gutter-${t}-${e}-${n}`;Object.freeze({row:i7,state:{reverse:`${i7}--reverse`,gutter:(t,e="xs")=>Array.isArray(t)?[i6(e,t[0],"h"),i6(e,t[1],"v")].join(" "):i6(e,t,"h")}});let i8=iY("skeleton");Object.freeze({skeleton:i8,states:{inline:`${i8}--inline`,rounded:`${i8}--rounded`,inverted:`${i8}--inverted`,suspend:`${i8}--suspend`}});let i9=Object.freeze({text:iY("text")});function rt({as:t,className:e,style:n,children:i,size:r,weight:s,fontFamily:a,lineClamp:o,dataQa:c,dataId:u,...h}){return(0,l.jsx)(t||"span",{className:(0,m.Z)(i9.text,e),style:{...r&&{fontSize:`var(--font-size-${r})`,lineHeight:`var(--font-line-height-${r})`},...s&&{fontWeight:`var(--font-weight-${s})`},...o&&{WebkitLineClamp:o,lineClamp:o,...iQ},...a&&{fontFamily:`var(--font-family-${a})`},...n},...h,"data-id":u,"data-qa":c,children:i})}rt.displayName="Text","function"==typeof TextDecoder&&new TextDecoder("utf-8",{ignoreBOM:!0});let re="function"==typeof TextEncoder?new TextEncoder:void 0,rn=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ri=(i={},rn.forEach((t,e)=>i[t]=e),i),rr=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,rs=String.fromCharCode.bind(String),ra="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),ro=t=>t.replace(/=/g,"").replace(/[+\/]/g,t=>"+"==t?"-":"_"),rl=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),rc="function"==typeof btoa?t=>btoa(t):t=>{let e,n,i,r,s="",a=t.length%3;for(let a=0;a<t.length;){if((n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255||(r=t.charCodeAt(a++))>255)throw TypeError("invalid character found");s+=rn[(e=n<<16|i<<8|r)>>18&63]+rn[e>>12&63]+rn[e>>6&63]+rn[63&e]}return a?s.slice(0,a-3)+"===".substring(a):s},ru="function"==typeof Uint8Array.prototype.toBase64?t=>t.toBase64():t=>{let e=[];for(let n=0,i=t.length;n<i;n+=4096)e.push(rs.apply(null,t.subarray(n,n+4096)));return rc(e.join(""))},rh=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?rs(192|e>>>6)+rs(128|63&e):rs(224|e>>>12&15)+rs(128|e>>>6&63)+rs(128|63&e)}var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return rs(240|e>>>18&7)+rs(128|e>>>12&63)+rs(128|e>>>6&63)+rs(128|63&e)},rd=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,rf=t=>t.replace(rd,rh),rp=re?t=>ru(re.encode(t)):t=>rc(rf(t)),rv=(t,e=!1)=>e?ro(rp(t)):rp(t),rm=t=>rv(t,!0),rg="function"==typeof atob?t=>atob(rl(t)):t=>{let e,n,i;if(t=t.replace(/\s+/g,""),!rr.test(t))throw TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let r=[];for(let s=0;s<t.length;)e=ri[t.charAt(s++)]<<18|ri[t.charAt(s++)]<<12|(n=ri[t.charAt(s++)])<<6|(i=ri[t.charAt(s++)]),64===n?r.push(rs(e>>16&255)):64===i?r.push(rs(e>>16&255,e>>8&255)):r.push(rs(e>>16&255,e>>8&255,255&e));return r.join("")};"function"==typeof Uint8Array.fromBase64||(t=>ra(rg(t).split("").map(t=>t.charCodeAt(0))));var ry=n(67356);let rb={logo:"_logo_1cju4_61",mainLogo:"_mainLogo_1cju4_68",brandmarkLogo:"_brandmarkLogo_1cju4_72",divider:"_divider_1cju4_76"},r_=({s3AssetsUrl:t,className:e,withLogo:n=!1,isNewYearLogo:i=!1,dataQa:r,brandmarkCode:s})=>{if(!t)return null;let a=i?(0,j.xn)(t,"logo/finuslugi/lk-regular-new-year.svg"):(0,j.xn)(t,"logo/finuslugi/lk-regular.svg"),o=(0,j.xn)(t,`/images/logo-brandmark-bank-${s}.svg`);return(0,l.jsx)(l.Fragment,{children:n&&(0,l.jsxs)("div",{className:C(rb.logo,e),"data-qa":r,children:[(0,l.jsx)("img",{className:rb.mainLogo,src:a,alt:"Логотип"}),s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:rb.divider}),(0,l.jsx)("img",{className:rb.brandmarkLogo,src:o,alt:"Логотип партнера"})]})]})})};r_.displayName="Logo";let rw={privateIcon:"_privateIcon_xcp32_1",autoWidth:"_autoWidth_xcp32_14"},rx=({children:t,className:e,style:n,autoWidth:i,...r})=>(0,l.jsx)("span",{className:C(e,rw.privateIcon,i&&rw.autoWidth),style:n,...r,children:t});rx.displayName="PrivateIcon";let rk={buttons:"_buttons_sr6nb_61","--disabled":"_--disabled_sr6nb_68",buttonIcons:"_buttonIcons_sr6nb_72",divider:"_divider_sr6nb_77",gridView:"_gridView_sr6nb_81",gridViewDivider:"_gridViewDivider_sr6nb_91",formView:"_formView_sr6nb_95",modalInner:"_modalInner_sr6nb_101"},rC=({buttonsData:t,disabled:e=!1,primaryTextOverride:n,additionalTextOverride:i,extraTextOverride:r,overrideLoginAction:s,onAnalyticsEvent:a,onOpen:o,linkTarget:u})=>{let{buttons:h,type:d}=t,f={primary:n,additional:i,extra:r};return h.length?(0,l.jsxs)(l.Fragment,{children:[1===h.length&&(0,l.jsx)(E.B,{dataQa:`login-widget-${d}-button`,as:s?"button":"a",...s?{}:{target:u,href:e?"#login-widget-consents":h[0].href},stretch:!0,variant:"primary"===d?"primary":"secondary",disabled:e,label:f[d]??h[0].label,iconLeft:f[d]?void 0:h[0].icon,onClick:()=>{null==a||a({eventCategory:"login-widget",eventAction:"click_button_login",eventLabel:h[0].type}),null==s||s(h[0].type)}},`button-${d}`),h.length>1&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(E.B,{dataQa:`login-widget-${d}-button`,stretch:!0,variant:"primary"===d?"primary":"secondary",disabled:e,label:f[d]?(0,l.jsx)("span",{children:f[d]}):function(t){let{maxWidth:e}=S.xs;return function(t,{defaultValue:e=!1,initializeWithValue:n=!0}={}){let[i,r]=(0,c.useState)(()=>n?L(t,e):e??!1);function s(){r(L(t))}return O(()=>{let e=window.matchMedia(t);return s(),"function"==typeof e.addListener?e.addListener(s):e.addEventListener("change",s),()=>{"function"==typeof e.removeListener?e.removeListener(s):e.removeEventListener("change",s)}},[t]),i}(`screen and (max-width: ${e}px)`)}(0)&&h.length>5?(0,l.jsx)("span",{children:"Войти по ID"}):(0,l.jsx)("span",{className:rk.buttonIcons,children:h.map(t=>t.icon?(0,l.jsx)(rx,{style:{lineHeight:0},children:t.icon},t.type):void 0)}),onClick:()=>null==o?void 0:o(d)},`button-${d}`)})]}):null};rC.displayName="ButtonsGroup";let rj=({buttonsList:t=[],isOpen:e=!1,buttonsType:n="",overrideLoginAction:i,onAnalyticsEvent:r,onClose:s,linkTarget:a})=>{var o,u;let h=(0,c.useCallback)(t=>{null==r||r({eventCategory:"login-widget",eventAction:"click_button_login",eventLabel:t}),null==i||i(t),setTimeout(()=>null==s?void 0:s())},[]);return(0,l.jsx)(nI,{header:{title:"Выберите способ входа"},open:e,onClose:s,dataQa:"login-widget-buttons-modal",children:(0,l.jsx)("div",{className:rk.modalInner,children:null==(u=null==(o=t.find(t=>t.type===n))?void 0:o.buttons)?void 0:u.map(({type:t,href:e,caption:n,icon:r,secondaryIcon:s})=>(0,l.jsx)(E.B,{dataQa:`login-widget-buttons-modal-button-${null==t?void 0:t.toLowerCase()}`,as:i?"button":"a",...i?{}:{target:a,href:e},stretch:!0,variant:"secondary",label:n,iconLeft:s??r,onClick:()=>h(t)},`modal-button-${t}`))})})};rj.displayName="ButtonsModal";let rM=({buttonsList:t=[],disabled:e=!1,primaryTextOverride:n,additionalTextOverride:i,extraTextOverride:r,overrideLoginAction:s,onAnalyticsEvent:a,linkTarget:o})=>{let[u,h]=(0,c.useState)(!1),[d,f]=(0,c.useState)(),{primaryGroup:p,remainingGroup:v,isRemainingGroupVisible:m}=(0,c.useMemo)(()=>{let[e,...n]=t,i=n.some(({buttons:t})=>t.length);return{primaryGroup:e,remainingGroup:n,isRemainingGroupVisible:i}},[t]),g=(0,c.useCallback)(t=>{h(!0),f(t),null==a||a({eventCategory:"login-widget",eventAction:"click_popup_open",eventLabel:"popup_select_login_provider"})},[]),y=(0,c.useCallback)(()=>{h(!1),f(""),null==a||a({eventCategory:"login-widget",eventAction:"click_popup_close",eventLabel:"popup_select_login_provider"})},[]);return t.length?(0,l.jsxs)("div",{className:C(rk.buttons,{[rk["--disabled"]]:e}),"data-qa":"login-widget-buttons",children:[(0,l.jsx)(rC,{buttonsData:p,disabled:e,primaryTextOverride:n,overrideLoginAction:s,onAnalyticsEvent:a,onOpen:g,linkTarget:o}),m&&(0,l.jsxs)(l.Fragment,{children:[!!p.buttons.length&&(0,l.jsx)(M.D,{className:rk.divider,content:"или",dataQa:"login-widget-buttons-divider"}),v.map(t=>(0,l.jsx)(rC,{buttonsData:t,additionalTextOverride:i,extraTextOverride:r,disabled:e,overrideLoginAction:s,onAnalyticsEvent:a,onOpen:g,linkTarget:o},`group-${t.type}`))]}),(0,l.jsx)(rj,{buttonsList:t,buttonsType:d,isOpen:u,overrideLoginAction:s,onAnalyticsEvent:a,onClose:y,linkTarget:o})]}):null};rM.displayName="Buttons";let rE=({buttonsList:t=[],disabled:e=!1,primaryTextOverride:n,overrideLoginAction:i,onAnalyticsEvent:r,linkTarget:s})=>{let a=(0,c.useCallback)(t=>{null==r||r({eventCategory:"login-widget",eventAction:"click_button_login",eventLabel:t}),null==i||i(t)},[]),{primaryGroup:o,remainingGroup:u,isRemainingGroupVisible:h}=(0,c.useMemo)(()=>{let[e,...n]=t;return{primaryGroup:e,remainingGroup:n.reduce((t,{buttons:e})=>[...t,...e],[]),isRemainingGroupVisible:n.some(({buttons:t})=>t.length)}},[t]);return t.length?(0,l.jsxs)("div",{className:C(rk.buttons,{[rk["--disabled"]]:e}),"data-qa":"login-widget-buttons",children:[(0,l.jsx)(rC,{buttonsData:o,disabled:e,primaryTextOverride:n,overrideLoginAction:i,onAnalyticsEvent:r,linkTarget:s}),h&&(0,l.jsxs)(l.Fragment,{children:[!!o.buttons.length&&(0,l.jsx)(M.D,{className:rk.gridViewDivider,content:"или",dataQa:"login-widget-buttons-divider"}),(0,l.jsx)("div",{className:C(rk.gridView,{[rk["--disabled"]]:e}),"data-qa":"login-widget-buttons",children:u.map(t=>(0,l.jsx)(E.B,{appearance:"outline",stretch:!0,variant:"secondary",dataQa:`login-widget-${t.type}-button`,as:i?"button":"a",...i?{}:{target:s,href:t.href},disabled:e,label:(0,l.jsx)(rx,{className:rk.buttonIcons,autoWidth:!0,children:t.icon},t.type),onClick:()=>a(t.type)},`button-${t.type}`))})]})]}):null};rE.displayName="ButtonsGrid";let rS=({phone:t,onPhoneChange:e,buttonsList:n,disabled:i,primaryTextOverride:r,overrideLoginAction:s,onAnalyticsEvent:a,linkTarget:o})=>(0,l.jsxs)("div",{className:C(rk.formView),children:[(0,l.jsx)(e7,{label:"Номер телефона",maskOpts:{mask:"+{7} (000) 000-00-00"},maskPlaceholder:"+7 (900) 777-77-77",maskPlaceholderVariant:"default",onChange:e,size:"m",value:t,variant:"primary"}),(0,l.jsx)(rE,{buttonsList:n,disabled:i,primaryTextOverride:r,overrideLoginAction:s,onAnalyticsEvent:a,linkTarget:o})]});rS.displayName="PhoneViewButtons";let rN=({template:t,onLinkClick:e})=>{if(!Object.keys(t).length||!t.links)return null;let{text:n,links:i}=t,r=n.split(/(\$\d+)/);return(0,l.jsx)(l.Fragment,{children:r.map(t=>{if(t.startsWith("$")){let n=i[parseInt(t.slice(1))-1];return(0,l.jsx)("a",{href:n.href,target:"_blank",rel:"noreferrer",onClick:()=>null==e?void 0:e(n.href),children:n.text},`link--${n.text}`)}return(0,l.jsx)("span",{children:t},`text--${t}`)})})};rN.displayName="TemplateText";let rT={consents:"_consents_15mth_61",list:"_list_15mth_61",checkbox:"_checkbox_15mth_66",error:"_error_15mth_76"},rO=({consents:t=[],onAgree:e,onError:n,onAnalyticsEvent:i})=>{let[r,s]=(0,c.useState)(()=>Object.fromEntries(t.map(t=>[t.key,t.value]))),a=t.filter(t=>!t.hidden),o=a.filter(t=>t.required).some(t=>!r[t.key]);(0,c.useEffect)(()=>{e(r)},[r]),(0,c.useEffect)(()=>{n(o)},[o]);let u=(t,e)=>{s(n=>({...n,[t]:e})),null==i||i({eventCategory:"login-widget",eventAction:"click_checkbox_consent",eventLabel:`${t}_${e?"tick":"untick"}`})},h=t=>{null==i||i({eventCategory:"login-widget",eventAction:"click_link_consent",eventLabel:t})};return t.length?(0,l.jsx)("div",{id:"login-widget-consents",className:rT.consents,"data-qa":"login-widget-consents",children:(0,l.jsx)("div",{className:rT.list,"data-qa":"login-widget-consents-list",children:a.map(({key:t,title:e,required:n})=>{var i;return(0,l.jsx)(tN.C,{dataQa:`login-widget-consents-checkbox-${t}`,className:C(rT.checkbox,{[rT.error]:!r[t]&&o}),state:n&&!r[t]?"error":"default",value:r[t],onChange:e=>u(t,e),children:null!=(i=e.links)&&i.length?(0,l.jsx)(rN,{template:e,onLinkClick:h}):e.text},t)})})}):null};rO.displayName="Consents";let rL={list:"_list_1n3xe_69",item:"_item_1n3xe_77",icon:"_icon_1n3xe_91"},rA={check:(0,l.jsx)(t=>c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("defs",null,c.createElement("clipPath",{id:"a"},c.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),c.createElement("g",{clipPath:"url(#a)"},c.createElement("path",{d:"m10.53 16.53 8.25-8.25a.743.743 0 0 0 0-1.06.743.743 0 0 0-1.06 0L10 14.94l-3.72-3.72a.743.743 0 0 0-1.06 0 .743.743 0 0 0 0 1.06l4.25 4.25c.146.147.323.22.53.22a.722.722 0 0 0 .53-.22Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))),{}),cup:(0,l.jsx)(t=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("defs",null,c.createElement("clipPath",{id:"a"},c.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),c.createElement("g",{clipPath:"url(#a)"},c.createElement("path",{d:"M16.619 3.039A1.748 1.748 0 0 0 16.25 3h-8.5a1.733 1.733 0 0 0-.968.292 1.757 1.757 0 0 0-.743 1.09c-.026.12-.039.242-.039.368V5H4.361c-.147 0-.256.006-.328.019-.13.023-.25.063-.36.12a1.243 1.243 0 0 0-.307.227 1.242 1.242 0 0 0-.347.667A2.058 2.058 0 0 0 3 6.361V8.75a3.249 3.249 0 0 0 .537 1.79 3.254 3.254 0 0 0 1.448 1.204 3.256 3.256 0 0 0 1.096.252 5.996 5.996 0 0 0 .39 1.34 6.009 6.009 0 0 0 1.286 1.907 6.003 6.003 0 0 0 2.94 1.616c.182.04.367.072.553.095V19.5h-4.5c-.42 0-.75.33-.75.75s.33.75.75.75h10.5c.42 0 .75-.33.75-.75s-.33-.75-.75-.75h-4.5v-2.546a5.838 5.838 0 0 0 1.586-.426 5.976 5.976 0 0 0 2.678-2.229 5.998 5.998 0 0 0 .905-2.303 3.217 3.217 0 0 0 1.622-.533 3.245 3.245 0 0 0 .922-.922A3.246 3.246 0 0 0 21 8.75V6.361c0-.147-.006-.256-.019-.328a1.241 1.241 0 0 0-1.014-1.014A2.058 2.058 0 0 0 19.639 5H18v-.25a1.746 1.746 0 0 0-.291-.967 1.743 1.743 0 0 0-.778-.645 1.738 1.738 0 0 0-.312-.1ZM7.75 4.5h8.5c.03.012.152.049.177.073.012.03.073.143.073.177V11a4.504 4.504 0 0 1-.353 1.752 4.487 4.487 0 0 1-1.686 2.017 4.496 4.496 0 0 1-4.212.378 4.472 4.472 0 0 1-1.431-.965 4.512 4.512 0 0 1-.965-1.43A4.469 4.469 0 0 1 7.5 11V4.75c.012-.03.049-.152.073-.177.025-.024.148-.06.177-.073Zm-3.25 2H6v3.983a1.73 1.73 0 0 1-.15-.029h-.001a1.744 1.744 0 0 1-1.068-.752A1.734 1.734 0 0 1 4.5 8.75V6.5Zm13.65 3.955c-.05.011-.1.02-.15.028V6.5h1.5v2.25a1.752 1.752 0 0 1-.281.952 1.76 1.76 0 0 1-1.07.753Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))),{}),shield:(0,l.jsx)(t=>c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M11.855 2c-.67 0-1.331.142-1.942.416L4.625 4.789A2.752 2.752 0 0 0 3 7.301v3.71c0 4.11 1.819 6.78 3.814 8.445a13.032 13.032 0 0 0 4.788 2.492c.261.07.533.069.792.002.68-.177 2.8-.81 4.766-2.309 1.986-1.513 3.84-3.935 3.84-7.63v-4.71a2.752 2.752 0 0 0-1.625-2.512l-5.287-2.373A4.747 4.747 0 0 0 12.145 2h-.29Zm-1.329 1.787a3.245 3.245 0 0 1 1.33-.285h.289c.458 0 .91.097 1.329.285L18.76 6.16c.45.201.739.648.739 1.14v4.712c0 3.108-1.53 5.125-3.248 6.434-1.738 1.324-3.639 1.895-4.234 2.05a.058.058 0 0 1-.031 0c-.587-.156-2.48-.745-4.212-2.192C6.065 16.875 4.5 14.608 4.5 11.01V7.3c0-.493.289-.94.739-1.141l5.287-2.373Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})),{}),"coat-of-arms":(0,l.jsx)(t=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("defs",null,c.createElement("clipPath",{id:"a"},c.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),c.createElement("g",{clipPath:"url(#a)"},c.createElement("path",{d:"M10.22 3.28a.747.747 0 0 1-.165-.242A.745.745 0 0 1 10 2.75q0-.375.188-.563Q10.374 2 10.75 2h2.5c.104 0 .2.018.288.055.088.037.17.091.242.165.177.176.266.353.266.53 0 .177-.089.354-.266.53l-1.25 1.25q-.265.265-.53.265c-.177 0-.354-.088-.53-.265l-1.25-1.25ZM12 7.19l3.22-3.22a.722.722 0 0 1 .53-.22c.207 0 .384.073.53.22l1.25 1.25a.741.741 0 0 1 .22.53q0 .155-.055.288-.055.132-.165.242-.11.11-.242.165-.133.055-.288.055h-.849l-2.036 3.054.122.123c.171.17.3.36.385.566.085.206.128.43.128.671l1 .086c.083 0 .146-.02.188-.063.041-.041.062-.104.062-.187v-.25a.743.743 0 0 1 .186-.494l3.5-4a.744.744 0 0 1 .564-.256c.104 0 .2.018.288.055.088.037.17.091.242.165a.747.747 0 0 1 .165.242A.745.745 0 0 1 21 6.5v4.256c0 .69-.127 1.325-.38 1.905a4.716 4.716 0 0 1-1.138 1.575L17.26 16.3a.737.737 0 0 1-.361.185.736.736 0 0 1-.405-.03l-1.145-.416 1.712 1.711H18c.42 0 .75.33.75.75s-.33.75-.75.75h-1.25a.746.746 0 0 1-.288-.055.744.744 0 0 1-.242-.165l-2.077-2.076c-.115.08-.248.145-.396.193l2.14 3.458c.037.06.065.123.084.19q.015.05.022.102.007.05.007.103a.722.722 0 0 1-.22.53.722.722 0 0 1-.53.22h-6.5a.75.75 0 0 1-.395-.112.723.723 0 0 1-.335-.466.746.746 0 0 1-.013-.293.744.744 0 0 1 .105-.274l2.141-3.458a1.474 1.474 0 0 1-.396-.193L7.78 19.03q-.11.11-.242.165a.746.746 0 0 1-.288.055H6c-.42 0-.75-.33-.75-.75s.33-.75.75-.75h.94l1.71-1.711-1.144.416a.736.736 0 0 1-.405.03.737.737 0 0 1-.361-.185l-2.222-2.064a4.716 4.716 0 0 1-1.139-1.575Q3 11.791 3 10.756V6.5a.753.753 0 0 1 .256-.564.723.723 0 0 1 .544-.184.722.722 0 0 1 .514.254l3.5 4a.743.743 0 0 1 .174.36Q8 10.432 8 10.5v.25c0 .083.02.146.063.188.041.041.104.062.187.062h1c0-.242.043-.551.128-.758q.128-.309.385-.565l.122-.123L7.849 6.5H7a.749.749 0 0 1-.75-.75c0-.104.018-.2.055-.288a.745.745 0 0 1 .165-.242l1.25-1.25a.722.722 0 0 1 .53-.22c.207 0 .384.073.53.22L12 7.19Zm-1.425.696.899 1.348a.746.746 0 0 1-.094.946l-.557.557c-.012.03-.073.143-.073.177v.836a.722.722 0 0 1-.22.53.722.722 0 0 1-.53.22H8.25c-.583 0-1.02-.146-1.313-.438-.286-.286-.432-.713-.437-1.28l-2-2.286v2.26q0 .708.26 1.303c.173.398.432.757.779 1.078l1.885 1.752 2.32-.844a.722.722 0 0 1 .573.025.722.722 0 0 1 .388.424.744.744 0 0 1 .034.126l.008.064q.003.033.003.066v.75c0 .083.02.146.063.188.041.041.104.062.187.062h.536c.177 0 .331.053.464.16.06-.036.192-.112.259-.131a.746.746 0 0 1 .205-.029H13c.083 0 .146-.02.188-.063.041-.041.062-.104.062-.187v-.75c0-.207.073-.384.22-.53a.722.722 0 0 1 .66-.209.744.744 0 0 1 .126.034l2.32.844 1.885-1.752c.347-.321.606-.68.78-1.077.172-.397.259-.832.259-1.304v-2.26l-2 2.286c-.005.567-.151.994-.438 1.28-.291.292-.729.438-1.312.438H14a.722.722 0 0 1-.53-.22.722.722 0 0 1-.22-.53v-.836c-.012-.03-.049-.152-.073-.177l-.557-.557a.729.729 0 0 1-.216-.456.745.745 0 0 1 .122-.49l.899-1.348-.895.894A.722.722 0 0 1 12 9a.722.722 0 0 1-.53-.22l-.895-.894ZM12 17.175l-1.904 3.075h3.808L12 17.175Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))),{}),"octostar-check":(0,l.jsx)(t=>c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M10.005 2.865a2.73 2.73 0 0 1 3.99 0l.854.914c.245.262.59.405.949.393l1.25-.042a2.73 2.73 0 0 1 2.821 2.821l-.042 1.25c-.012.358.131.704.393.949l.914.854a2.73 2.73 0 0 1 0 3.99l-.914.854c-.262.245-.405.59-.393.949l.042 1.25a2.73 2.73 0 0 1-2.821 2.821l-1.25-.042a1.242 1.242 0 0 0-.949.393l-.854.914a2.73 2.73 0 0 1-3.99 0l-.854-.914a1.242 1.242 0 0 0-.949-.393l-1.25.042a2.73 2.73 0 0 1-2.821-2.821l.042-1.25a1.241 1.241 0 0 0-.393-.949l-.914-.854a2.73 2.73 0 0 1 0-3.99l.914-.854c.262-.245.405-.59.393-.949l-.042-1.25A2.73 2.73 0 0 1 6.952 4.13l1.25.042c.358.012.704-.131.949-.393l.854-.914Zm2.902 1.017a1.241 1.241 0 0 0-1.814 0l-.854.914a2.73 2.73 0 0 1-2.087.865l-1.25-.043a1.241 1.241 0 0 0-1.283 1.283l.043 1.25a2.73 2.73 0 0 1-.865 2.087l-.914.854a1.241 1.241 0 0 0 0 1.814l.914.854c.576.538.891 1.3.865 2.087l-.043 1.25a1.241 1.241 0 0 0 1.283 1.283l1.25-.043a2.731 2.731 0 0 1 2.087.865l.854.914c.49.525 1.323.525 1.814 0l.854-.914a2.731 2.731 0 0 1 2.087-.865l1.25.043a1.241 1.241 0 0 0 1.283-1.283l-.043-1.25a2.73 2.73 0 0 1 .865-2.087l.914-.854a1.241 1.241 0 0 0 0-1.814l-.914-.854a2.73 2.73 0 0 1-.865-2.087l.043-1.25a1.241 1.241 0 0 0-1.283-1.283l-1.25.043a2.73 2.73 0 0 1-2.087-.865l-.854-.914ZM15.03 9.97a.75.75 0 0 1 0 1.06l-3 3a.75.75 0 0 1-1.06 0l-1.5-1.5a.75.75 0 1 1 1.06-1.06l.97.97 2.47-2.47a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})),{}),"shield-check":(0,l.jsx)(t=>c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M9.913 2.416A4.747 4.747 0 0 1 11.855 2h.29c.67 0 1.331.142 1.943.416l5.287 2.373A2.752 2.752 0 0 1 21 7.3v4.712c0 3.694-1.854 6.116-3.84 7.63-1.965 1.497-4.086 2.131-4.766 2.308a1.558 1.558 0 0 1-.792-.002 13.032 13.032 0 0 1-4.788-2.492C4.819 17.79 3 15.121 3 11.011V7.3c0-1.086.637-2.068 1.625-2.512l5.288-2.373Zm1.942 1.086c-.458 0-.91.097-1.329.285L5.24 6.16A1.25 1.25 0 0 0 4.5 7.3v3.71c0 3.598 1.566 5.866 3.275 7.293 1.732 1.448 3.625 2.037 4.212 2.193a.058.058 0 0 0 .03 0c.596-.155 2.497-.726 4.235-2.05 1.717-1.309 3.248-3.326 3.248-6.434V7.3a1.25 1.25 0 0 0-.739-1.14l-5.287-2.373a3.245 3.245 0 0 0-1.33-.285h-.289ZM15.78 9.22a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47 3.47-3.47a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})),{})},rR=({highlights:t})=>{if(!t||!t.items.length)return null;let e=t=>rA[t]||rA.check,{items:n,heading:i}=t;return(0,l.jsxs)(u.C,{variant:"secondary",dataQa:"login-widget-highlights",children:[i&&(0,l.jsx)(h.H,{as:"h5",type:"h5",className:"mb-2",dataQa:"login-widget-highlights-heading",children:i}),(0,l.jsx)("ul",{className:rL.list,"data-qa":"login-widget-highlights-list",children:(0,l.jsx)(l.Fragment,{children:n.map(({text:t,icon:n})=>(0,l.jsxs)("li",{className:rL.item,"data-qa":"login-widget-highlights-list-item",children:[(0,l.jsx)("div",{className:rL.icon,"data-qa":"login-widget-highlights-list-icon",children:e(n)}),(0,l.jsx)(d.T,{as:"p",dataQa:"login-widget-highlights-list-text",children:t})]},`${t}--${n}`))})})]})};rR.displayName="Highlights";let rI={legalInfo:"_legalInfo_1o9mv_61"},rD=({legalInfo:t,onAnalyticsEvent:e})=>{if(!t||Object.values(t).every(t=>!t))return null;let{plain:n,html:i,md:r}=t,s=r?iq.parse(r):i??"";return(0,l.jsx)("div",{className:rI.legalInfo,"data-qa":"login-widget-legal-info",children:n?(0,l.jsx)(rN,{template:n,onLinkClick:t=>{null==e||e({eventCategory:"login-widget",eventAction:"click_link_legal_info",eventLabel:t})}}):(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:s},onClick:t=>{let{href:n}=t.target;n&&(null==e||e({eventCategory:"login-widget",eventAction:"click_link_legal_info",eventLabel:n}))}})})};rD.displayName="LegalInfo";let rP={DAY:["день","дня","дней"],MONTH:["мес.","мес.","мес."],YEAR:["год","года","лет"],TERMLESS:["бессрочный","бессрочный","бессрочный"]},rZ={deposit:"Вклад",credit:"Кредит",bond:"Облигация",account:"Счет","banking-account":"Банковский счет"},rF=t=>{if(!(t instanceof Date))return null;let e=String(t.getDate()).padStart(2,"0"),n=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return`${e}.${n}.${i}`},r$={productCard:"_productCard_1kl4e_61","--credits":"_--credits_1kl4e_64",detailRate:"_detailRate_1kl4e_64","--bond":"_--bond_1kl4e_67",headingWrap:"_headingWrap_1kl4e_71",wrapper:"_wrapper_1kl4e_79",info:"_info_1kl4e_85",logo:"_logo_1kl4e_91",textWrapper:"_textWrapper_1kl4e_100",text:"_text_1kl4e_100",label:"_label_1kl4e_124",details:"_details_1kl4e_140",detail:"_detail_1kl4e_64",detailTitle:"_detailTitle_1kl4e_152",detailValue:"_detailValue_1kl4e_158"},rz=({title:t,value:e,className:n,...i})=>(0,l.jsxs)("div",{className:r$.detail,...i,children:[(0,l.jsx)(rt,{dataQa:"login-widget-product-card-detail-title",className:r$.detailTitle,children:t}),(0,l.jsx)(rt,{dataQa:"login-widget-product-card-detail-value",className:(C(r$.detailValue),n),children:e})]});rz.displayName="ProductDetail";let rB=({params:t})=>{if(!t)return null;let{amount:e,rate:n}=t??{},i=rF(t.endDate),r=t.term,s=[{id:"params-rate",title:"Ставка",value:`${n}%`},{id:"params-amount",title:"Сумма",value:`${function(t,e){try{let n;let{hasCurrencySymbol:i=!0,currencyCode:r,decimalCount:s=iH.decimalCount,decimalSeparator:a=iH.decimalSeparator,thousandsSeparator:o=iH.thousandsSeparator,decimalIsWithoutZeros:l=iH.decimalIsWithoutZeros,preventLargeNumbers:c=iH.preventLargeNumbers}=e||{},u=t;if("string"==typeof u&&(u=u.replace(/\s+/g,"").replace(",",".")),u=Number(u)||0,c&&(n=function(t,e){if(t>=1e9){let n=(Math.floor(t/1e9*1e3)/1e3).toString();return n.includes(".")?n.replace(".",",").replace(/0+$/,"")+e+"млрд":n+e+"млрд"}if(t>=1e6){let n=(Math.floor(t/1e6*1e3)/1e3).toString();return n.includes(".")?n.replace(".",",").replace(/0+$/,"")+e+"млн":n+e+"млн"}return t>=1e4&&t<=99999?Math.trunc(t):t}(u,o)),!c||c&&"number"==typeof n){let t=Number(null!=n?n:u),e=c&&t>1e3?0:function(t){let e=Math.abs(Number(t));return Number.isNaN(e)?iH.decimalCount:e}(s),i=Math.abs(t).toFixed(e),r=parseInt(i,10);n=function({money:t,moneyInt:e,thousandsSeparator:n}){let i=e.toString(),r=RegExp(i.length>4?"(\\d{3})(?=\\d)":"(\\d{4})(?=\\d)","g"),s=i.length>4?i.length%3:0,a=s?i.substr(0,s)+n:"";return(t<0?"-":"")+a+i.substr(s).replace(r,`$1${n}`)}({money:t,moneyInt:r,thousandsSeparator:o})+function({money:t,moneyInt:e,decimalCount:n,decimalSeparator:i,decimalIsWithoutZeros:r}){let s=Math.abs(t-e).toFixed(n),a=r?s.slice(2).replace(/0+$/,""):s.slice(2);return!n||0===(Number(t)||0)||r&&0===parseFloat(s)||""===a?"":i+a}({money:Number(i),moneyInt:r,decimalCount:e,decimalSeparator:a,decimalIsWithoutZeros:l})}return n+(i?`\xa0${iW[r]||iW.RUB}`:"")}catch(t){return console.log(t),""}}(null==e?void 0:e.value,{preventLargeNumbers:!0,currencyCode:(null==e?void 0:e.currency)??"RUB"})}`},{id:r?"params-term":i?"params-end-date":"",title:r?"Срок":i?"Погашение":"",value:r?`${function(t,e,n=!1){if(!Array.isArray(e))throw Error("Plurals must be type of Array<String>");let[i,r,s]=e,a=Math.abs(+t);return(a%=100)>=5&&a<=20?n?s:`${t} ${s}`:1==(a%=10)?n?i:`${t} ${i}`:a>=2&&a<=4?n?r:`${t} ${r}`:n?s:`${t} ${s}`}(r.value,rP[r.type??"DAY"])}`:i||""}];return(0,l.jsx)("div",{className:r$.details,"data-qa":"login-widget-product-card-details",children:s.map(({id:t,title:e,value:n})=>(0,l.jsx)(rz,{"data-qa":`login-widget-product-card-detail-${t}`,title:e,value:n,className:C({[r$.detailRate]:"params-rate"===t})},t))})};rB.displayName="ProductDetails";let rV=({productInfo:t,s3AssetsUrl:e,className:n,onAnalyticsEvent:i})=>{let r=(0,c.useRef)(null),s=!t||!Object.keys(t).length,a=!r.current||!Object.keys(r.current).length;if((0,c.useEffect)(()=>{var e;s&&!a?null==i||i({eventCategory:"login-widget",eventAction:"view_product_delete",eventLabel:(null==(e=r.current)?void 0:e.type)??void 0}):!s&&a?null==i||i({eventCategory:"login-widget",eventAction:"view_product_add",eventLabel:t.type??void 0}):s||a||null==i||i({eventCategory:"login-widget",eventAction:"view_product_update",eventLabel:t.type??void 0}),r.current=t},[t]),s)return null;let{title:o,label:f,type:p,params:v,provider:m}=t,g=(0,j.xn)(e,`/images/logo-brandmark-bank-${null==m?void 0:m.code}.svg`),y=null==m?void 0:m.code,b=p?rZ[p]:"";return(0,l.jsxs)(u.C,{variant:"secondary",className:C(r$.productCard,{[r$[`--${p}`]??""]:!0},n),dataQa:"login-widget-product-card",children:[(0,l.jsxs)("div",{className:C("mb-3",r$.headingWrap),children:[(0,l.jsx)(h.H,{as:"h5",type:"h5",dataQa:"login-widget-product-card-heading",children:"Выбранный продукт"}),f&&(0,l.jsx)(eZ.T,{label:f,rounded:!0,size:"s",variant:"red",dataQa:"login-widget-product-card-label"})]}),(0,l.jsxs)("div",{className:r$.wrapper,children:[(0,l.jsxs)("div",{className:r$.info,"data-qa":"login-widget-product-card-info",children:[y&&(0,l.jsx)("img",{className:r$.logo,loading:"lazy",width:"100%",height:"36px",src:g,alt:"Логотип продукта","data-qa":"login-widget-product-card-logo"}),(0,l.jsxs)("div",{className:r$.textWrapper,children:[b&&(0,l.jsx)(d.T,{as:"p",dataQa:"login-widget-product-card-title",className:r$.text,children:b}),o&&(0,l.jsx)(d.T,{as:"p",dataQa:"login-widget-product-card-text",className:r$.text,children:o})]})]}),(0,l.jsx)(rB,{params:v})]})]})};rV.displayName="ProductCard";let rU=Object.freeze({ESIA:{label:"Войти через Госуслуги",caption:"Госуслуги",icon:t=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{d:"M10.8103 12.2093H8.5558C8.5328 12.2093 8.52129 12.2206 8.50979 12.2432C8.45228 13.2503 8.25673 14.3252 7.98067 15.2078C7.98067 15.2192 7.98067 15.2305 7.99217 15.2418C8.00368 15.2531 8.01518 15.2531 8.02668 15.2531H8.79736C8.82036 15.2531 8.83187 15.2418 8.83187 15.2305C9.05041 14.5516 9.22295 13.6689 9.29197 12.9221H10.0281V15.2192C10.0281 15.2418 10.0511 15.2644 10.0741 15.2644H10.8103C10.8333 15.2644 10.8563 15.2418 10.8563 15.2192V12.2432C10.8563 12.2206 10.8333 12.2093 10.8103 12.2093V12.2093ZM20.346 12.2093H19.6098C19.5868 12.2093 19.5638 12.2319 19.5638 12.2545V14.5516C19.4028 14.5968 19.2417 14.6194 19.0577 14.6194C18.5746 14.6194 18.4595 14.4723 18.4595 13.8387V12.2545C18.4595 12.2319 18.4365 12.2093 18.4135 12.2093H17.6889C17.6659 12.2093 17.6429 12.2319 17.6429 12.2545V13.9179C17.6429 14.9589 17.9994 15.3549 18.9081 15.3549C19.4258 15.3549 20.0124 15.2192 20.3575 15.0947C20.369 15.0834 20.3805 15.0721 20.3805 15.0607V12.2545C20.392 12.2206 20.369 12.2093 20.346 12.2093V12.2093ZM4.74844 12.2093H4.00077C3.97777 12.2093 3.96626 12.2206 3.96626 12.2432C3.85124 12.6958 3.60968 13.4653 3.28761 14.2687L2.53994 12.2432C2.52844 12.2319 2.51693 12.2206 2.50543 12.2206H1.74626C1.73476 12.2206 1.72325 12.2319 1.71175 12.2432C1.70025 12.2545 1.70025 12.2658 1.71175 12.2772L2.83901 15.3097C2.72398 15.5473 2.62046 15.7397 2.51693 15.9207C2.43642 16.0565 2.3674 16.1923 2.29838 16.3281C2.28688 16.3394 2.28688 16.3507 2.29838 16.362C2.30989 16.3733 2.32139 16.3846 2.33289 16.3846H3.14958C3.16108 16.3846 3.18409 16.3733 3.18409 16.362C3.32212 16.1018 3.49466 15.7397 3.65569 15.3663C4.1388 14.2574 4.51839 13.2163 4.80595 12.2658C4.80595 12.2545 4.80595 12.2432 4.79445 12.2319C4.77145 12.2093 4.75994 12.2093 4.74844 12.2093V12.2093ZM7.42855 14.5516C7.42855 14.5402 7.41704 14.5289 7.40554 14.5289H7.37103C7.18699 14.5968 6.85342 14.6421 6.62336 14.6421C6.10575 14.6421 5.86419 14.5063 5.86419 13.7368C5.86419 13.1145 5.94471 12.8316 6.62336 12.8316C6.81891 12.8316 6.99145 12.8542 7.2215 12.9221C7.24451 12.9221 7.25601 12.9221 7.26751 12.8995C7.34803 12.7411 7.45155 12.5487 7.56658 12.3111V12.2772C7.56658 12.2658 7.55508 12.2545 7.54357 12.2545C7.24451 12.164 6.88792 12.1074 6.56585 12.1074C5.49611 12.1074 5.013 12.6053 5.013 13.7255C5.013 14.8571 5.49611 15.3663 6.56585 15.3663C6.83041 15.3663 7.37103 15.3097 7.62409 15.2078C7.6471 15.1965 7.6586 15.1739 7.6471 15.1513L7.42855 14.5516V14.5516ZM14.4336 12.2093H13.686C13.663 12.2093 13.6515 12.2206 13.6515 12.2432C13.5364 12.7071 13.2949 13.4653 12.9728 14.2687L12.2251 12.2432C12.2136 12.2319 12.2021 12.2206 12.1906 12.2206H11.4315C11.42 12.2206 11.4084 12.2319 11.3969 12.2432C11.3854 12.2545 11.3854 12.2658 11.3969 12.2772L12.5242 15.3097C12.4092 15.5473 12.3057 15.7397 12.2021 15.9207C12.1216 16.0565 12.0526 16.1923 11.9836 16.3394C11.9721 16.3507 11.9721 16.362 11.9836 16.3733C11.9951 16.3846 12.0066 16.396 12.0181 16.396H12.8348C12.8463 16.396 12.8693 16.3846 12.8693 16.3733C13.0073 16.1131 13.1799 15.751 13.3409 15.3776C13.8125 14.2687 14.2036 13.2276 14.4911 12.2772C14.4911 12.2658 14.4911 12.2545 14.4796 12.2432C14.4566 12.2093 14.4451 12.2093 14.4336 12.2093V12.2093ZM17.1943 12.2093H15.0203C14.9973 12.2093 14.9743 12.2319 14.9743 12.2545V15.2305C14.9743 15.2531 14.9973 15.2757 15.0203 15.2757H15.7564C15.7794 15.2757 15.8024 15.2531 15.8024 15.2305V12.9334H16.9412C16.9527 12.9334 16.9757 12.9221 16.9757 12.9108C17.0677 12.7071 17.1483 12.4921 17.2403 12.2772V12.2432C17.2173 12.2093 17.2058 12.2093 17.1943 12.2093",fill:"currentColor"}),c.createElement("path",{d:"M5.62258 7.63786C4.56434 7.63786 4.15025 8.09048 4.15025 9.23334C4.15025 10.3988 4.56434 10.8514 5.62258 10.8514C6.69233 10.8514 7.10642 10.3988 7.10642 9.23334C7.10642 8.07917 6.69233 7.63786 5.62258 7.63786ZM5.62258 10.1838C5.13947 10.1838 4.98994 10.0594 4.98994 9.24465C4.98994 8.38468 5.15098 8.30547 5.62258 8.30547C6.10569 8.30547 6.26673 8.38468 6.26673 9.24465C6.26673 10.0594 6.1172 10.1838 5.62258 10.1838ZM10.0511 10.0594C10.0511 10.048 10.0396 10.0367 10.0281 10.0367H9.99357C9.80953 10.1046 9.47596 10.1499 9.24591 10.1499C8.72829 10.1499 8.48673 10.0141 8.48673 9.24465C8.48673 8.62231 8.56725 8.33942 9.24591 8.33942C9.44145 8.33942 9.61399 8.36205 9.84404 8.42994C9.86705 8.42994 9.87855 8.42994 9.89005 8.40731C9.97057 8.2489 10.0741 8.05654 10.1891 7.81891V7.78497C10.1891 7.77365 10.1776 7.76233 10.1661 7.76233C9.86705 7.67181 9.51047 7.61523 9.18839 7.61523C8.11865 7.61523 7.63554 8.11311 7.63554 9.23334C7.63554 10.3649 8.11865 10.8741 9.18839 10.8741C9.45295 10.8741 9.99358 10.8175 10.2466 10.7157C10.2696 10.7043 10.2811 10.6817 10.2696 10.6591L10.0511 10.0594V10.0594ZM3.9202 7.71707H1.74621C1.7232 7.71707 1.7002 7.7397 1.7002 7.76233V10.7383C1.7002 10.7609 1.7232 10.7836 1.74621 10.7836H2.48237C2.50538 10.7836 2.52838 10.7609 2.52838 10.7383V8.42994H3.65564C3.66714 8.42994 3.69015 8.41863 3.69015 8.40731C3.78217 8.20364 3.86269 7.98864 3.95471 7.77365V7.7397C3.9432 7.72839 3.9317 7.71707 3.9202 7.71707Z",fill:"currentColor"}),c.createElement("path",{d:"M23.7851 14.9477V14.9024C23.7851 14.8798 23.7851 14.8458 23.7966 14.8232C23.8312 14.4045 23.8542 13.8953 23.8772 13.3069V13.2617C23.8887 12.8656 23.9002 12.4356 23.9002 11.9943C23.9002 11.553 23.8887 11.1231 23.8772 10.727V10.6818C23.8542 10.1047 23.8312 9.58416 23.7966 9.16549C23.7966 9.14286 23.7966 9.10891 23.7851 9.08628V9.04102C23.7851 8.99576 23.7736 8.96181 23.7736 8.91655V8.87129C23.7391 8.42999 23.7161 8.15842 23.7046 8.13578C23.7046 8.09052 23.6931 8.04526 23.6931 8.01132V7.97737C23.6816 7.89816 23.6701 7.83027 23.6471 7.75106C23.6471 7.73974 23.6471 7.72843 23.6356 7.71711C23.4401 6.80056 22.9224 5.79349 22.2783 5.03536C22.0252 4.74116 21.7607 4.4809 21.4846 4.27723C21.4616 4.2546 21.1395 4.02829 20.6334 3.67751C20.0468 3.28147 19.2071 2.72702 18.2524 2.18388C16.55 1.19943 15.0432 0.509194 14.8361 0.429986C14.8246 0.429986 14.8246 0.41867 14.8246 0.41867C14.376 0.226308 13.8354 0.0905233 13.2488 0.0339463C13.1337 0.0226308 13.0187 0.0113154 12.9037 0.0113154C12.7887 0 12.6851 0 12.5816 0H12.4206C11.6384 0.0226308 10.9137 0.158416 10.3386 0.41867C10.2581 0.452617 8.72824 1.14286 6.99135 2.14993L6.92233 2.18388C5.13943 3.21358 3.74762 4.23197 3.6901 4.27723C3.253 4.59406 2.86192 5.00141 2.50534 5.52192C2.42482 5.63508 2.42482 5.92928 2.76989 5.92928H3.6556C4.03518 5.92928 4.1272 5.70297 4.5528 5.39745C5.0244 5.05799 5.95611 4.37907 7.6585 3.38331C8.88928 2.67044 10.0395 2.10467 10.6032 1.84441C10.6147 1.84441 10.6262 1.8331 10.6377 1.8331C10.6377 1.8331 10.6492 1.8331 10.6492 1.82178C10.6492 1.82178 10.6607 1.82178 10.6607 1.81047C10.6722 1.81047 10.6837 1.79915 10.6837 1.79915C10.6952 1.79915 10.7067 1.78784 10.7182 1.78784C10.8562 1.71994 10.9482 1.686 10.9482 1.686C11.3393 1.51627 11.8915 1.40311 12.4781 1.3918H12.7081C12.8807 1.3918 13.0532 1.40311 13.2143 1.42574C13.5708 1.471 13.8929 1.5389 14.1575 1.65205C14.1805 1.66337 14.215 1.67468 14.238 1.686C14.238 1.686 14.2495 1.69731 14.284 1.70863C14.5486 1.82178 15.9749 2.48939 17.5277 3.38331C18.4479 3.91513 19.2646 4.44696 19.8282 4.83168C20.3229 5.17115 20.6219 5.38614 20.6334 5.39745C20.852 5.55587 21.0705 5.78218 21.2776 6.03112C21.7952 6.68741 22.2208 7.58133 22.2898 8.27157C22.2898 8.28288 22.3243 8.55445 22.3588 9.01839C22.3588 9.05233 22.3588 9.07496 22.3703 9.10891V9.1768C22.3703 9.22206 22.3818 9.25601 22.3818 9.30127V9.34653C22.3818 9.36916 22.3818 9.40311 22.3933 9.42574C22.3933 9.48232 22.4048 9.5389 22.4048 9.59547C22.4048 9.62942 22.4048 9.66337 22.4163 9.69731V9.71994C22.4163 9.7652 22.4163 9.79915 22.4278 9.84441V9.93494C22.4623 10.5233 22.4853 11.2249 22.4853 11.9604C22.4853 12.6959 22.4623 13.3975 22.4278 13.9859V14.0764C22.4278 14.1216 22.4278 14.1556 22.4163 14.2008V14.2235C22.4163 14.2574 22.4163 14.2914 22.4048 14.3253C22.4048 14.3819 22.3933 14.4385 22.3933 14.495C22.3933 14.529 22.3933 14.5516 22.3818 14.5743V14.6195C22.3818 14.6648 22.3703 14.6987 22.3703 14.744V14.8119C22.3703 14.8458 22.3703 14.8798 22.3588 14.9024C22.3243 15.3663 22.2898 15.6492 22.2898 15.6492C22.2208 16.3395 21.7952 17.2334 21.2776 17.8897C21.0705 18.1499 20.852 18.3649 20.6334 18.5233C20.6219 18.5233 20.3229 18.7496 19.8282 19.0891C19.2646 19.4738 18.4364 20.0057 17.5277 20.5375C15.9749 21.4427 14.5371 22.099 14.284 22.2122L14.238 22.2348C14.215 22.2461 14.1805 22.2574 14.1575 22.2687C13.8929 22.3706 13.5708 22.4498 13.2143 22.495C13.0532 22.5177 12.8807 22.529 12.7081 22.529H12.4781C11.8915 22.5177 11.3393 22.4158 10.9482 22.2348C10.9482 22.2348 10.8677 22.2008 10.7182 22.133C10.7067 22.1216 10.6837 22.1216 10.6722 22.1103C10.6607 22.099 10.6492 22.099 10.6377 22.0877C10.6262 22.0877 10.6262 22.0764 10.6147 22.0764C10.6032 22.0764 10.5917 22.0651 10.5802 22.0651C10.5687 22.0537 10.5572 22.0537 10.5341 22.0424H10.5226C9.93601 21.8161 8.83176 21.273 7.6585 20.5941C5.94461 19.6096 5.0244 18.9194 4.5528 18.5799C4.1272 18.2744 4.03518 18.0481 3.6556 18.0481H2.76989C2.42482 18.0481 2.42482 18.3423 2.50534 18.4554C2.86192 18.976 3.253 19.3833 3.6901 19.7001C3.74762 19.7454 5.15093 20.7638 6.92233 21.7935C7.01435 21.8501 7.10637 21.9066 7.2099 21.9519C8.85477 22.8798 10.2696 23.5134 10.3501 23.5587C10.9137 23.8076 11.6499 23.9547 12.4321 23.9774H12.5931C12.6966 23.9774 12.8002 23.9774 12.9037 23.9661C13.0187 23.9661 13.1337 23.9547 13.2488 23.9434C13.8354 23.8868 14.3875 23.7511 14.8246 23.5587C14.8246 23.5587 14.8361 23.5587 14.8361 23.5474C15.0317 23.4569 16.55 22.7666 18.2409 21.7935C19.1956 21.239 20.0353 20.6959 20.6219 20.2999C21.128 19.9491 21.4501 19.7228 21.4731 19.7001C21.7492 19.4965 22.0137 19.2362 22.2668 18.942C22.9109 18.1839 23.4286 17.1768 23.6241 16.2603C23.6241 16.2489 23.6241 16.2376 23.6356 16.2263C23.6471 16.1471 23.6701 16.0679 23.6816 16V15.9661C23.6931 15.9208 23.6931 15.8755 23.6931 15.8416C23.6931 15.819 23.7276 15.5474 23.7621 15.1061V15.0608C23.7851 15.0269 23.7851 14.9929 23.7851 14.9477",fill:"currentColor"})),secondaryIcon:t=>c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("defs",null,c.createElement("linearGradient",{x1:12.343,y1:1,x2:12.343,y2:22.951,id:"esia-colored",gradientUnits:"userSpaceOnUse"},c.createElement("stop",{offset:.329,stopColor:"#0F67B1"}),c.createElement("stop",{offset:.636,stopColor:"#EF3E58"}))),c.createElement("path",{d:"M22.24 14.656v.042c0 .03 0 .072-.021.082v.042c-.031.404-.063.653-.063.674 0 .03 0 .072-.01.114v.031c-.01.062-.031.135-.041.207-.01.01-.01.021-.01.031-.177.84-.643 1.763-1.223 2.458-.229.27-.467.508-.716.695l-.766.55c-.7.48-1.416.936-2.146 1.368-1.523.892-2.89 1.524-3.067 1.607 0 .01-.01.01-.01.01-.394.177-.891.301-1.42.353-.104.01-.207.02-.31.02-.094.011-.187.011-.28.011h-.146c-.704-.02-1.368-.155-1.875-.383-.073-.042-1.347-.623-2.83-1.473a2.051 2.051 0 0 1-.258-.145 36.043 36.043 0 0 1-2.912-1.918 4.527 4.527 0 0 1-1.068-1.141c-.072-.103-.072-.373.239-.373h.787c.342 0 .425.207.809.487.424.311 1.253.944 2.797 1.846.84.493 1.701.95 2.58 1.369h.011c.021.01.031.01.042.02.01 0 .02.01.03.01.01 0 .01.011.021.011.01.01.021.01.031.02.01.011.032.011.042.021.135.063.207.094.207.094.353.166.85.26 1.378.27h.207c.156 0 .311-.01.457-.032a3.65 3.65 0 0 0 .85-.207c.02-.01.051-.02.072-.031l.041-.02a33.402 33.402 0 0 0 4.995-2.863c.446-.31.715-.518.726-.518.196-.145.393-.342.58-.58.466-.602.85-1.421.912-2.054 0 0 .031-.26.062-.684.01-.02.01-.052.01-.083v-.063c0-.041.01-.072.01-.114v-.04c.011-.022.011-.042.011-.074 0-.051.01-.103.01-.155.01-.031.01-.062.01-.093v-.021c.011-.042.011-.073.011-.114v-.083c.07-1.237.07-2.476 0-3.712v-.083c-.01-.042-.01-.073-.01-.114v-.021c-.01-.031-.01-.062-.01-.093 0-.052-.01-.104-.01-.156-.011-.02-.011-.052-.011-.072v-.042c0-.041-.01-.073-.01-.114v-.062c-.011-.031-.011-.052-.011-.083-.031-.425-.062-.674-.062-.685-.062-.632-.446-1.451-.912-2.053a3.411 3.411 0 0 0-.58-.58 33.42 33.42 0 0 0-5.762-3.401c-.02-.01-.052-.021-.073-.031a3.19 3.19 0 0 0-.85-.208c-.145-.02-.3-.03-.456-.03h-.207c-.528.01-1.025.113-1.378.269 0 0-.083.03-.207.093-.01 0-.02.01-.031.01 0 0-.01.01-.02.01 0 .011-.011.011-.011.011 0 .01-.01.01-.01.01-.011 0-.021.01-.032.01-.497.24-1.533.748-2.642 1.4-1.534.913-2.373 1.535-2.798 1.846-.383.28-.466.488-.808.488h-.798c-.311 0-.311-.27-.239-.384.322-.477.674-.85 1.068-1.14a37.769 37.769 0 0 1 2.912-1.93l.062-.03a34.228 34.228 0 0 1 3.026-1.576c.518-.239 1.17-.373 1.886-.384h.145c.093 0 .186.01.28.01.103 0 .207.01.31.021a4.745 4.745 0 0 1 1.42.353s0 .01.01.01c.177.083 1.545.705 3.068 1.607a33.005 33.005 0 0 1 2.912 1.918c.248.187.487.426.715.695.58.695 1.047 1.618 1.223 2.458.01.01.01.02.01.03.019.069.033.138.041.208v.031c0 .031.01.073.01.114.011.021.032.27.063.674v.042c0 .041.01.072.01.114v.041c.01.021.01.052.01.073l.073 1.39v.04c.01.364.021.758.021 1.162l-.02 1.162v.04c-.021.54-.042 1.007-.073 1.39-.01.021-.01.052-.01.073ZM9.865 10.218a.022.022 0 0 0-.02-.02h-.032a2.295 2.295 0 0 1-.673.103c-.466 0-.684-.124-.684-.83 0-.57.062-.83.684-.83.176 0 .332.022.539.084.02 0 .03 0 .041-.02l.27-.54v-.031a.022.022 0 0 0-.02-.02 3.125 3.125 0 0 0-.882-.136c-.964 0-1.399.456-1.399 1.483 0 1.037.435 1.504 1.399 1.504.238 0 .725-.052.954-.146.02-.01.03-.03.02-.052l-.197-.549Zm-3.99-2.23c-.953 0-1.326.415-1.326 1.463 0 1.068.373 1.483 1.327 1.483.963 0 1.336-.415 1.336-1.483 0-1.048-.373-1.462-1.336-1.462Zm-3.492.084a.044.044 0 0 0-.041.041v2.727c0 .021.02.042.041.042h.664c.02 0 .041-.021.041-.042V8.725h1.026c.01 0 .031-.01.031-.02.083-.187.156-.385.238-.581v-.032c-.01-.01-.02-.02-.03-.02h-1.97Zm3.493 2.26c-.435 0-.57-.114-.57-.86 0-.788.145-.861.57-.861.435 0 .58.072.58.86 0 .737-.135.861-.58.861Zm1.627 3.992a.022.022 0 0 0-.02-.02h-.032a2.295 2.295 0 0 1-.674.103c-.466 0-.684-.124-.684-.83 0-.57.073-.829.684-.829.176 0 .332.02.54.083.02 0 .03 0 .04-.02l.27-.54v-.03a.022.022 0 0 0-.007-.015 3.126 3.126 0 0 0-.895-.141c-.963 0-1.399.456-1.399 1.482 0 1.037.436 1.504 1.4 1.504.238 0 .725-.052.953-.145.02-.01.03-.032.02-.052l-.196-.55Zm3.046-2.146H8.52c-.02 0-.031.01-.041.031A11.895 11.895 0 0 1 8 14.926c0 .01 0 .02.01.03.01.011.021.011.031.011h.695c.02 0 .03-.01.03-.02.198-.623.353-1.432.415-2.116h.664v2.105c0 .02.02.041.041.041h.663c.021 0 .042-.02.042-.041v-2.727c0-.01-.021-.031-.042-.031Zm5.752 0h-1.959a.044.044 0 0 0-.041.041v2.727c0 .021.02.042.041.042h.663c.02 0 .042-.02.042-.042v-2.115h1.025c.01 0 .032-.01.032-.02.083-.187.155-.384.238-.581v-.032c-.02-.01-.031-.02-.041-.02Zm2.839 0h-.663a.045.045 0 0 0-.042.041v2.105c-.145.042-.29.062-.456.062-.435 0-.539-.134-.539-.715v-1.452a.045.045 0 0 0-.041-.041h-.663a.045.045 0 0 0-.041.041v1.525c0 .953.32 1.316 1.14 1.316.466 0 .994-.124 1.305-.238.01-.01.02-.02.02-.031v-2.572c.021-.02 0-.04-.02-.04v-.001Zm-14.052.01h-.674c-.02 0-.03.01-.03.031-.104.415-.322 1.12-.612 1.856L3.1 12.21c-.011-.01-.021-.02-.032-.02h-.684c-.01 0-.02.01-.03.02-.011.01-.011.02 0 .031l1.015 2.779c-.09.19-.187.377-.29.56a4.458 4.458 0 0 0-.197.383c-.01.011-.01.021 0 .032.01.01.02.02.031.02h.736c.01 0 .03-.01.03-.02.154-.3.295-.603.426-.913.435-1.016.777-1.97 1.036-2.84 0-.011 0-.022-.01-.032-.021-.02-.031-.02-.042-.02Zm8.726 0h-.674c-.02 0-.031.01-.031.031-.104.425-.321 1.12-.612 1.856l-.673-1.866c-.01-.01-.02-.02-.031-.02h-.684c-.01 0-.02.01-.031.02-.01.01-.01.02 0 .031l1.015 2.779c-.09.19-.187.377-.29.56a4.444 4.444 0 0 0-.197.383c-.01.011-.01.021 0 .032.01.01.02.02.031.02h.736c.01 0 .031-.01.031-.02.153-.3.295-.603.425-.913a28.78 28.78 0 0 0 1.036-2.84c0-.011 0-.022-.01-.032-.02-.02-.031-.02-.041-.02Z",clipRule:"evenodd",fill:"url(#esia-colored)",fillRule:"evenodd"}))},PHONE:{label:"По номеру телефона",caption:"Номер телефона",icon:t=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("defs",null,c.createElement("clipPath",{id:"a"},c.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),c.createElement("g",{clipPath:"url(#a)"},c.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.045 3.68a10.239 10.239 0 0 0 .738 2.993 1.323 1.323 0 0 1-.643 1.696l-.866.41a.225.225 0 0 0-.123.133.158.158 0 0 0 .011.135 12.756 12.756 0 0 0 3.321 3.815c.466.358.957.683 1.473.976a.156.156 0 0 0 .134.011.225.225 0 0 0 .133-.122l.408-.863a1.293 1.293 0 0 1 .732-.666 1.322 1.322 0 0 1 .967.022c1.094.453 2.215.708 3.401.766a1.302 1.302 0 0 1 1.173.805c.066.16.1.327.1.5v4.459a2.712 2.712 0 0 1-.816 1.944 2.494 2.494 0 0 1-1.37.68c-.21.031-.425.035-.644.01a18.77 18.77 0 0 1-9.782-4.113l-.002-.001a18.711 18.711 0 0 1-3.727-4.103 18.728 18.728 0 0 1-2.549-5.666 18.72 18.72 0 0 1-.495-2.672 2.494 2.494 0 0 1 .127-1.11 2.512 2.512 0 0 1 .894-1.194 2.68 2.68 0 0 1 1.001-.457c.2-.046.403-.068.612-.068h4a1.747 1.747 0 0 1 1.234.505 1.804 1.804 0 0 1 .381.532 1.897 1.897 0 0 1 .177.644Zm10.485.85-4 4c-.177.177-.354.265-.53.265-.177 0-.354-.088-.53-.265l-2-2a.743.743 0 0 1 0-1.06.743.743 0 0 1 1.06 0L17 6.94l3.47-3.47a.743.743 0 0 1 1.06 0 .742.742 0 0 1 0 1.06ZM9.552 3.816a.38.38 0 0 0-.044-.149c-.056-.054-.185-.167-.255-.167h-4a1.247 1.247 0 0 0-.485.098 1.174 1.174 0 0 0-.38.26 1.022 1.022 0 0 0-.23.365.976.976 0 0 0-.048.44 17.25 17.25 0 0 0 1.909 6.18 17.291 17.291 0 0 0 4.324 5.268 17.171 17.171 0 0 0 4.308 2.576c.733.303 1.48.555 2.24.753h.001c.801.21 1.617.36 2.448.454a.976.976 0 0 0 .806-.279 1.15 1.15 0 0 0 .26-.38 1.23 1.23 0 0 0 .097-.485v-4.274a11.7 11.7 0 0 1-3.593-.808l-.331.7a1.73 1.73 0 0 1-1 .9 1.648 1.648 0 0 1-1.363-.125 14.257 14.257 0 0 1-4.312-3.77l-.001-.001c-.382-.503-.73-1.03-1.045-1.584a1.642 1.642 0 0 1-.125-1.364 1.726 1.726 0 0 1 .898-1l.703-.333a11.71 11.71 0 0 1-.782-3.275Z",clipRule:"evenodd"}))),secondaryIcon:void 0},ALFA:{label:void 0,caption:"Альфа ID",icon:t=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...t},c.createElement("defs",null,c.createElement("clipPath",{id:"clip146_396"},c.createElement("rect",{id:"Logo",width:24,height:24,fill:"white",fillOpacity:0})),c.createElement("clipPath",{id:"clip129_3008"},c.createElement("rect",{id:"Button",rx:12,width:24,height:24,fill:"white",fillOpacity:0}))),c.createElement("rect",{id:"Button",rx:12,width:24,height:24,fill:"#EF3124",fillOpacity:1}),c.createElement("g",{clipPath:"url(#clip129_3008)"},c.createElement("g",{clipPath:"url(#clip146_396)"},c.createElement("path",{id:"Union",d:"M12.0784 4.99939C13.0987 4.99939 13.3867 5.60126 13.6481 6.36017L16.3427 14.2609L14.3805 14.2609L13.7791 12.3771L10.2207 12.3771L9.56677 14.2609L7.70911 14.2609L10.4826 6.36017C10.7441 5.57532 11.058 4.99939 12.0784 4.99939ZM11.9999 7.04004L10.7181 10.8074L13.2297 10.8074L12.0524 7.04004L11.9999 7.04004ZM16.5 16.8002L7.49997 16.8002L7.49997 18.6578L16.5 18.6578L16.5 16.8002Z",clipRule:"evenodd",fill:"#FFFFFF",fillOpacity:1,fillRule:"evenodd"})))),secondaryIcon:void 0},SBER:{label:void 0,caption:"Сбер ID",icon:t=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...t},c.createElement("defs",null,c.createElement("clipPath",{id:"clip146_362"},c.createElement("rect",{id:"Logo",width:20,height:20,transform:"translate(2.000000 2.000000)",fill:"white",fillOpacity:0})),c.createElement("clipPath",{id:"clip129_3001"},c.createElement("rect",{id:"Button",rx:12,width:24,height:24,fill:"white",fillOpacity:0}))),c.createElement("rect",{id:"Button",rx:12,width:24,height:24,fill:"#21A038",fillOpacity:1}),c.createElement("g",{clipPath:"url(#clip129_3001)"},c.createElement("g",{clipPath:"url(#clip146_362)"},c.createElement("path",{id:"Vector",d:"M12 4.5C13.8 4.5 15.45 5.13 16.74 6.19L15.45 7.22C14.48 6.52 13.29 6.1 11.99 6.1C8.74 6.1 6.1 8.74 6.1 12C6.1 15.25 8.74 17.89 11.99 17.89C15.25 17.89 17.89 15.25 17.89 12C17.89 11.92 17.89 11.85 17.88 11.77L19.38 10.69C19.46 11.11 19.49 11.55 19.49 12C19.49 16.14 16.14 19.5 11.99 19.5C7.85 19.5 4.5 16.14 4.5 12C4.5 7.85 7.85 4.5 12 4.5Z",fill:"#FFFFFF",fillOpacity:1,fillRule:"evenodd"}),c.createElement("path",{id:"Vector",d:"M9.17 10.17L12 12L18.08 7.53L18.99 9L12 14.11L9.17 12.35L9.17 10.17Z",fill:"#FFFFFF",fillOpacity:1,fillRule:"evenodd"})))),secondaryIcon:void 0},VTB:{label:void 0,caption:"ВТБ ID",icon:t=>c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...t},c.createElement("defs",null,c.createElement("linearGradient",{id:"c",x1:0,x2:24,y1:12,y2:12,gradientUnits:"userSpaceOnUse"},c.createElement("stop",{stopColor:"#0037FF"}),c.createElement("stop",{offset:.75,stopColor:"#0085FF"})),c.createElement("clipPath",{id:"b"},c.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),c.createElement("mask",{id:"a",width:24,height:24,x:0,y:0,"mask-type":"alpha",maskUnits:"userSpaceOnUse"},c.createElement("circle",{cx:12,cy:12,r:12,fill:"#F7F8FA"})),c.createElement("g",{mask:"url(#a)"},c.createElement("path",{fill:"#F7F8FA",d:"M0 0h24v24H0z"})),c.createElement("g",{clipPath:"url(#b)",mask:"url(#a)"},c.createElement("path",{fill:"url(#c)",d:"M0 0h24v24H0z"}),c.createElement("path",{fill:"#FFF",fillRule:"evenodd",d:"M19.5 7.5H7.7l-.85 2.25h11.79l.86-2.25Zm-1.18 3.37H6.52l-.85 2.25h11.8l.85-2.25ZM5.33 14.25h11.52l-.83 2.25H4.5l.83-2.25Z"}))),secondaryIcon:void 0},MTS:{label:void 0,caption:"МТС ID",icon:t=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...t},c.createElement("defs",null),c.createElement("rect",{id:"Button",width:24,height:24,fill:"#FFFFFF",fillOpacity:0}),c.createElement("mask",{id:"mask129_2994","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:0,y:0,width:24,height:24},c.createElement("rect",{id:"rect",width:24,height:24,fill:"#000000",fillOpacity:1})),c.createElement("g",{mask:"url(#mask129_2994)"},c.createElement("rect",{id:"rect",width:24,height:24,fill:"#FF0032",fillOpacity:1}),c.createElement("path",{id:"path",d:"M15.98 1.82L15.98 2.94L18.4 2.94L18.4 7.32L19.75 7.4L19.75 2.94L22.16 2.94L22.16 1.82L15.98 1.82Z",fill:"#FFFFFF",fillOpacity:1,fillRule:"nonzero"}),c.createElement("path",{id:"path",d:"M7.3 1.84L5.53 5.5L3.77 1.84L1.84 1.84L1.84 7.38L3.19 7.38L3.19 3.42L4.92 6.76L6.15 6.76L7.87 3.42L7.87 7.38L9.22 7.38L9.22 1.84L7.3 1.84Z",fill:"#FFFFFF",fillOpacity:1,fillRule:"nonzero"}),c.createElement("path",{id:"path",d:"M20.81 20.3C20.78 20.51 20.69 20.7 20.54 20.84C20.39 20.98 20.2 21.07 20 21.11C19.71 21.17 19.41 21.2 19.11 21.2C18.79 21.2 18.47 21.15 18.17 21.06C17.92 20.98 17.7 20.81 17.55 20.6C17.41 20.38 17.33 20.06 17.33 19.66L17.33 19.1C17.33 18.69 17.41 18.38 17.55 18.16C17.7 17.94 17.92 17.78 18.16 17.7C18.47 17.6 18.79 17.56 19.11 17.56C19.41 17.56 19.7 17.59 20 17.64C20.2 17.68 20.39 17.78 20.54 17.92C20.69 18.06 20.78 18.25 20.8 18.46L22.16 18.46C22.13 18.03 21.97 17.62 21.69 17.3C21.42 17 21.07 16.78 20.68 16.68C20.17 16.54 19.64 16.48 19.11 16.49C18.46 16.49 17.9 16.58 17.44 16.77C16.98 16.94 16.6 17.27 16.36 17.69C16.12 18.1 15.99 18.65 15.99 19.31L15.99 19.44C15.99 20.11 16.12 20.65 16.36 21.06C16.6 21.49 16.98 21.81 17.44 21.99C17.9 22.17 18.46 22.26 19.11 22.26C19.64 22.27 20.17 22.21 20.68 22.08C21.07 21.97 21.42 21.76 21.69 21.46C21.97 21.13 22.13 20.72 22.16 20.3L20.81 20.3Z",fill:"#FFFFFF",fillOpacity:1,fillRule:"nonzero"}))),secondaryIcon:void 0},TINKOFF:{label:void 0,caption:"T-ID",icon:t=>c.createElement("svg",{width:44,height:24,viewBox:"0 0 44 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...t},c.createElement("defs",null),c.createElement("mask",{id:"mask129_2984","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:0,y:0,width:44,height:24},c.createElement("rect",{id:"rect",width:44,height:24,fill:"#000000",fillOpacity:1})),c.createElement("g",{mask:"url(#mask129_2984)"},c.createElement("path",{id:"path",d:"M32.11 0L11.88 0C5.32 0 0 5.37 0 12C0 18.62 5.32 24 11.88 24L32.11 24C38.67 24 44 18.62 44 12C44 5.37 38.67 0 32.11 0Z",fill:"#303030",fillOpacity:1,fillRule:"nonzero"}),c.createElement("path",{id:"path",d:"M6.89 6.16L19.7 6.16L19.7 12.67C19.7 14.33 18.82 15.87 17.39 16.71L13.3 19.09L9.2 16.71C7.77 15.87 6.89 14.33 6.89 12.67L6.89 6.16Z",fill:"#FFDD2D",fillOpacity:1,fillRule:"nonzero"}),c.createElement("path",{id:"path",d:"M10.41 9.59L10.41 11.61C10.68 11.3 11.18 11.08 11.75 11.08L12.37 11.08L12.37 13.44C12.37 14.06 12.2 14.61 11.95 14.91L14.64 14.91C14.39 14.61 14.22 14.06 14.22 13.44L14.22 11.09L14.84 11.09C15.41 11.09 15.91 11.3 16.18 11.61L16.18 9.59L10.41 9.59Z",fill:"#333333",fillOpacity:1,fillRule:"evenodd"}),c.createElement("path",{id:"path",d:"M27.01 16.07L27.01 8.43L24.63 8.43L24.63 16.07L27.01 16.07Z",fill:"#FFFFFF",fillOpacity:1,fillRule:"nonzero"}),c.createElement("path",{id:"path",d:"M32.77 16.07C35.79 16.07 37.28 14.45 37.28 12.25C37.28 10.05 35.79 8.43 33.02 8.43L28.76 8.43L28.76 16.07L32.77 16.07ZM32.53 10.26C34.17 10.26 34.85 11 34.85 12.25C34.85 13.41 34.17 14.29 32.53 14.29L31.06 14.29L31.06 10.26L32.53 10.26Z",fill:"#FFFFFF",fillOpacity:1,fillRule:"nonzero"}))),secondaryIcon:void 0},SOVCOM:{label:void 0,caption:"Совком ID",icon:t=>c.createElement("svg",{width:24.000015,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...t},c.createElement("defs",null),c.createElement("path",{id:"Vector",d:"M14.39 0.25L14.39 6.47L11.97 6.47C8.93 6.47 6.47 8.93 6.47 11.97C6.47 15.02 8.93 17.48 11.97 17.48L14.39 17.48L14.39 23.7C19.89 22.64 24 17.82 24 11.97C24 6.17 19.89 1.35 14.39 0.25Z",fill:"#003791",fillOpacity:1,fillRule:"nonzero"}),c.createElement("path",{id:"Vector",d:"M11.97 19.42C7.87 19.42 4.52 16.08 4.52 11.97C4.52 7.87 7.87 4.53 11.97 4.53L12.44 4.53L12.44 0L11.97 0C5.37 0 0 5.37 0 11.97C0 18.62 5.37 24 11.97 24L12.44 24L12.44 19.42L11.97 19.42L11.97 19.42Z",fill:"#FC5055",fillOpacity:1,fillRule:"nonzero"})),secondaryIcon:void 0},PSB:{label:void 0,caption:"ПСБ ID",icon:t=>c.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,fill:"none",...t},c.createElement("defs",null,c.createElement("clipPath",{id:"clipPath_0"},c.createElement("rect",{width:24,height:24,x:0,y:0,fill:"rgb(255,255,255)"}))),c.createElement("rect",{id:"Logo symbol / Company / Promsvyazbank",width:24,height:24,x:0,y:0}),c.createElement("g",{id:"Logo",clipPath:"url(#clipPath_0)"},c.createElement("rect",{id:"Logo",width:24,height:24,x:0,y:0}),c.createElement("rect",{id:"Brand fill",width:24,height:24,x:0,y:0,opacity:0,fill:"rgb(247,248,250)"}),c.createElement("g",{id:"Group"},c.createElement("path",{id:"Vector",d:"M14.5735 4L9.14286 9.332L14.5735 9.332L14.5735 20L20 14.68L20 4L14.5735 4Z",fill:"rgb(234,86,22)",fillRule:"evenodd"}),c.createElement("path",{id:"Vector",d:"M9.42654 20L14.8571 14.668L9.42654 14.668L9.42654 4L4 9.32L4 20L9.42654 20Z",fill:"rgb(234,86,22)",fillRule:"nonzero"}),c.createElement("path",{id:"Vector",d:"M9.42654 20L14.8571 14.668L9.42654 14.668L9.42654 4L4 9.32L4 20L9.42654 20Z",fill:"rgb(44,45,132)",fillRule:"nonzero"})))),secondaryIcon:void 0},MOBILE:{label:void 0,caption:"Mobile ID",icon:t=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("defs",null,c.createElement("clipPath",{id:"a"},c.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),c.createElement("g",{clipPath:"url(#a)"},c.createElement("path",{d:"M4.935 2.92a4.737 4.737 0 0 1 .985-.985c.326-.242.697-.43 1.114-.566q.559-.182 1.323-.266.637-.07 1.61-.09C10.366 1.003 11.043 1 12 1q1.436 0 2.032.012.974.02 1.611.09c.51.057.95.146 1.323.267.417.136.788.325 1.114.566a4.752 4.752 0 0 1 .985.985c.241.326.43.697.566 1.114.121.373.21.814.266 1.323q.07.637.09 1.61Q20 7.565 20 9v6q0 1.436-.012 2.032c-.014.65-.044 1.187-.09 1.611-.057.51-.146.95-.267 1.323a3.864 3.864 0 0 1-.566 1.114c-.28.377-.608.706-.986.985-.325.241-.696.43-1.113.566a6.65 6.65 0 0 1-1.323.266q-.637.07-1.61.09Q13.435 23 12 23t-2.032-.012q-.974-.02-1.611-.09a6.648 6.648 0 0 1-1.323-.267q-.626-.204-1.114-.566a4.72 4.72 0 0 1-.985-.985 3.857 3.857 0 0 1-.566-1.114 6.646 6.646 0 0 1-.266-1.323 18.77 18.77 0 0 1-.09-1.61Q4 16.435 4 15V9q0-1.436.012-2.032.02-.974.09-1.611c.057-.51.146-.95.267-1.323.136-.417.324-.788.566-1.114Zm1.205.894a2.375 2.375 0 0 0-.345.685c-.09.274-.156.615-.201 1.022-.042.38-.07.873-.082 1.478Q5.5 7.58 5.5 9v6c0 .947.004 1.614.012 2 .013.606.04 1.099.082 1.48.045.406.112.747.201 1.021.086.262.2.49.345.685.191.258.416.483.674.674.194.145.423.26.685.345.274.09.615.156 1.022.201.38.042.873.07 1.478.082.387.008 1.054.012 2.001.012q1.42 0 2-.012c.606-.013 1.099-.04 1.48-.082a5.182 5.182 0 0 0 1.021-.201c.262-.086.49-.2.685-.345.258-.191.483-.416.674-.674.145-.194.26-.423.345-.685.09-.274.156-.615.201-1.022.042-.38.07-.873.082-1.478.008-.387.012-1.054.012-2.001V9q0-1.42-.012-2a17.368 17.368 0 0 0-.082-1.48 5.184 5.184 0 0 0-.201-1.021c-.086-.262-.2-.49-.345-.685a3.26 3.26 0 0 0-.308-.359l-.004-.004q-.169-.168-.362-.311a2.374 2.374 0 0 0-.685-.345 5.185 5.185 0 0 0-1.022-.201c-.38-.042-.873-.07-1.478-.082C13.614 2.504 12.947 2.5 12 2.5q-1.42 0-2 .012a17.38 17.38 0 0 0-1.48.082 5.184 5.184 0 0 0-1.021.201c-.262.086-.49.2-.685.345q-.194.143-.362.312a3.256 3.256 0 0 0-.312.362ZM12 20c.552 0 1-.45 1-1s-.448-1-1-1-1 .45-1 1 .448 1 1 1Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))),secondaryIcon:void 0}}),rq=t=>{let{providers:e,getHref:n,scenarioOptions:i}=t,r=t=>t?t.filter(t=>!!rU[t]).map(t=>({...rU[t],href:n(t,i),type:t,caption:rU[t].caption,icon:(0,c.createElement)(rU[t].icon),secondaryIcon:rU[t].secondaryIcon?(0,c.createElement)(rU[t].secondaryIcon):void 0})):[],{primary:s=[],additional:a=[],extra:o=[]}=e,l=r(s),u=r(a),h=r(o);return{primaryButtons:l,additionalButtons:u,extraButtons:h,buttonsList:[{type:"primary",buttons:l},{type:"additional",buttons:u},{type:"extra",buttons:h}]}},rW=(t,e)=>{var n,i;let r=n=>(null==e?void 0:e[n])===null?null:(null==e?void 0:e[n])??(null==t?void 0:t[n]),s={theme:(null==e?void 0:e.theme)??"light",variant:(null==e?void 0:e.variant)??"primary",linkTarget:(null==e?void 0:e.linkTarget)??"_blank",withLogo:(null==e?void 0:e.withLogo)??!1,isNewYearLogo:(null==e?void 0:e.isNewYearLogo)??!1,primaryTextOverride:null==e?void 0:e.primaryTextOverride,additionalTextOverride:null==e?void 0:e.additionalTextOverride,extraTextOverride:null==e?void 0:e.extraTextOverride,title:r("title"),description:r("description"),highlights:r("highlights"),consents:null==t?void 0:t.consents,legalInfo:null==t?void 0:t.legalInfo,availableAuthProviders:null==t?void 0:t.availableAuthProviders},a=(t=[],e)=>void 0!==e?t.filter(t=>e.includes(t)):t,o=(t,e)=>({...t,primaryAuthProviders:a(null==t?void 0:t.primaryAuthProviders,e),additionalAuthProviders:a(null==t?void 0:t.additionalAuthProviders,e),extraAuthProviders:a(null==t?void 0:t.extraAuthProviders,e)}),l=null==t?void 0:t.availableAuthProviders,c=!(null!=e&&e.primaryAuthProviders)&&!(null!=(n=null==e?void 0:e.additionalAuthProviders)&&n.length)&&!(null!=(i=null==e?void 0:e.extraAuthProviders)&&i.length);if(!e||c)return{...t&&o(t,l),...s};let u=o(e,l);return u.primaryAuthProviders.length>0||u.additionalAuthProviders.length>0||u.extraAuthProviders.length>0?{...u,...s}:{...t&&o(t,l),...s}},rH=t=>{let{configKey:e,entryPointId:n,serverConfig:i={},baseUrl:r,apiBaseUrl:s,apiVersion:a,autoFetch:o=!0,product:l,productContext:u,isSilent:h,config:d,query:f={},scenarioParams:p={},onMount:v,onDestroy:m,onAnalyticsEvent:g}=t,[y,b]=(0,c.useState)(null),[_,w]=(0,c.useState)(o),x=(0,c.useCallback)(async()=>{try{w(!0);let t=await (0,ry.g)(s,e??void 0,a);b(t)}catch(t){throw Error(`Unknown fetch error: ${t}`)}finally{w(!1)}},[]);(0,c.useEffect)(()=>(null==v||v(),null==g||g({eventCategory:"login-widget",eventAction:"mount_login_widget"}),()=>{null==m||m(),null==g||g({eventCategory:"login-widget",eventAction:"unmount_login_widget"})}),[]),(0,c.useEffect)(()=>{o&&x()},[o,x]);let k=o?y:i,C=(t="ESIA",e={})=>({version:"v2",entryPointId:n,product:l,productContext:u,isSilent:h,authProvider:t,consents:Object.fromEntries(((null==k?void 0:k.consents)??[]).map(t=>[t.key,t.value])),...p,...e}),M=(t,e)=>rm(JSON.stringify(C(t,e))),E=rW(k,d);return{getConfig:()=>({...E}),getHref:(t,e)=>(0,j.jb)((0,j.xn)(r,"/registration"),{...f,scenario:M(t,e)}),isPending:_}},rG={loginWidget:"_loginWidget_h02n9_61",wrapper:"_wrapper_h02n9_81",heading:"_heading_h02n9_86",description:"_description_h02n9_87"},rY=({serverConfig:t,baseUrl:e,s3AssetsUrl:n="",configKey:i,entryPointId:r,apiVersion:s,config:a,product:o,productContext:f,query:p,scenarioParams:v,isSilent:m,skeleton:g=(0,l.jsx)("p",{children:"Загружаем данные..."}),className:y,style:b,overrideLoginAction:_,onMount:w,onDestroy:x,onAnalyticsEvent:j,...M})=>{let[E,S]=(0,c.useState)(),[N,T]=(0,c.useState)(),[O,L]=(0,c.useState)(),{getConfig:A,getHref:R}=rH({configKey:i,apiBaseUrl:"",apiVersion:s,entryPointId:r,autoFetch:!1,baseUrl:e,product:o,productContext:f,query:p,scenarioParams:v,isSilent:m,config:a,serverConfig:t,onMount:w,onDestroy:x,onAnalyticsEvent:j}),{theme:I,variant:D,linkTarget:P,title:Z,description:F,highlights:$,withLogo:z,isNewYearLogo:B,legalInfo:V,consents:U=[],primaryTextOverride:q,additionalTextOverride:W,extraTextOverride:H,primaryAuthProviders:G,additionalAuthProviders:Y=[],extraAuthProviders:K=[],view:Q="base"}=A(),{buttonsList:X}=rq({providers:{primary:G,additional:Y,extra:K},getHref:R,scenarioOptions:{consents:E,phone:O}}),J=X.some(({buttons:t})=>t.length>0),tt=(0,c.useCallback)(t=>{null==j||j(t)},[j]),te=(0,c.useCallback)(t=>{L(t)},[]),tn="phone"===Q?rS:rM,ti="primary"===D?u.C:"div",tr=N?k:"div",ts=(0,c.useCallback)(t=>{T(t)},[]),ta=(0,c.useMemo)(()=>o??{},[JSON.stringify(o)]);return t?Object.keys(t).length?(0,l.jsx)("div",{className:C(rG.loginWidget,y),style:b,...M,"data-auth-widgets-theme":I,"data-qa":"login-widget",children:(0,l.jsxs)(ti,{className:rG.wrapper,children:[(0,l.jsx)(r_,{s3AssetsUrl:n,withLogo:z,isNewYearLogo:B,dataQa:"login-widget-logo"}),(Z||F)&&(0,l.jsxs)("div",{children:[Z&&(0,l.jsx)(h.H,{type:"h2",className:rG.heading,dataQa:"login-widget-heading",children:Z}),F&&(0,l.jsx)(d.T,{as:"p",fontFamily:"secondary",size:"14",className:C(rG.description),dataQa:"login-widget-description",children:F})]}),J?(0,l.jsx)(tr,{text:N?"Чтобы войти в личный кабинет, подтвердите свое согласие:":"",...N?{dataQa:"login-widget-tooltip"}:{},children:(0,l.jsx)(tn,{buttonsList:X,disabled:N,primaryTextOverride:q,additionalTextOverride:W,extraTextOverride:H,overrideLoginAction:_,onAnalyticsEvent:tt,linkTarget:P,phone:O,onPhoneChange:te})}):(0,l.jsx)(d.T,{as:"p",weight:"bold",size:"20",dataQa:"login-widget-providers-empty",style:{textAlign:"center"},className:"mb-2",children:"Возникла техническая ошибка. Выберите другой способ входа или попробуйте войти позже"}),(0,l.jsx)(rO,{consents:U,onAgree:t=>{S(t)},onError:ts,onAnalyticsEvent:j}),(0,l.jsx)(rV,{productInfo:ta,s3AssetsUrl:n,onAnalyticsEvent:j}),(0,l.jsx)(rR,{highlights:$??null}),(0,l.jsx)(rD,{legalInfo:V,onAnalyticsEvent:j})]})}):(0,l.jsx)("p",{children:"Возникла техническая ошибка. Попробуйте позже"}):(0,l.jsx)(l.Fragment,{children:g})};rY.displayName="LoginWidget"},4569:function(t,e,n){"use strict";n.d(e,{B:function(){return f},S:function(){return c}});var i=n(57437),r=n(2265),s=n(18550),a=n(97339),o=n(73354),l=n(90388);function c(t){return r.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},r.createElement("path",{d:"M15.827 2.761A10.001 10.001 0 1 0 12 22a.75.75 0 0 0 .75-.75v-.004a.75.75 0 0 0-.75-.75A8.496 8.496 0 1 1 20.496 12c0 .414.336.75.75.75h.004A.75.75 0 0 0 22 12a10 10 0 0 0-6.173-9.239Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}n(60625);let u=t=>t?"string"==typeof t?t.split(" ").map(t=>{if(t.includes("-")){let e=t.indexOf("-");return[t.substring(0,e),t.substring(e+1,t.length)]}return[t]}).reduce((t,e)=>{let[n,i]=e;return{...t,[n]:void 0===i||i}},{}):t:{},h=(0,l.g)("button"),d={button:h,label:"".concat(h,"__label"),icon:"".concat(h,"__icon"),spinner:"".concat(h,"__spinner"),states:{ghost:"".concat(h,"--ghost"),outline:"".concat(h,"--outline"),stretch:"".concat(h,"--stretch"),iconOnly:"".concat(h,"--icon-only"),iconLeft:"".concat(h,"--icon-left"),iconRight:"".concat(h,"--icon-right"),rounded:"".concat(h,"--rounded"),disabled:"".concat(h,"--disabled"),hidden:"".concat(h,"--hidden")}},f=(0,r.forwardRef)((t,e)=>{let{as:n,appearance:l="fill",children:h,className:f,disabled:p=!1,iconLeft:v,iconRight:m,label:g,pending:y,shape:b="default",size:_="m",stretch:w=!1,variant:x="primary",type:k,dataId:C,dataQa:j,style:M,onClick:E,...S}=t,N=n||"button",T=g||h,O=(0,r.useMemo)(()=>"icon"===b||"circle-icon"===b,[b]),L=(0,r.useMemo)(()=>{let t={};if(_&&!o.B.includes(_)){let e=u(_);t=o.B.reduce((t,n)=>{let i="xs"===n?"".concat(d.button,"--").concat(e[n]):"".concat(d.button,"--").concat(e[n],"-").concat(n);return{...t,[i]:!!e[n]}},{})}return t},[_]),A=(0,r.useMemo)(()=>({[d.button]:!0,["".concat(d.button,"--").concat(x)]:!0,["".concat(d.button,"--").concat(_)]:_&&o.B.includes(_),[d.states.iconOnly]:O,[d.states.stretch]:!0===w,["".concat(d.states.stretch,":").concat(w)]:"string"==typeof w,[d.states.ghost]:"ghost"===l,[d.states.outline]:"outline"===l,[d.states.rounded]:"circle-icon"===b,[d.states.iconLeft]:v&&!O,[d.states.iconRight]:m&&!O,[d.states.disabled]:p,...L}),[l,p,v,O,m,L,b,_,w,x]),R=(0,r.useMemo)(()=>!!m&&(!O||!v),[v,m,O]),I=(0,r.useCallback)(t=>{if(p){t.preventDefault();return}null==E||E(t)},[E,p]);return(0,i.jsxs)(N,{className:(0,s.Z)(f,{...A}),ref:e,style:M,type:"button"===N?k||"button":void 0,disabled:"button"===N?p:void 0,"aria-disabled":p||void 0,tabIndex:p?-1:0,onClick:I,...S,"data-qa":j,"data-id":C,children:[v&&(0,i.jsx)("span",{role:"img","aria-hidden":"true",className:(0,s.Z)(d.icon,{[d.states.hidden]:y}),children:v}),T&&!O&&(0,i.jsx)("span",{className:(0,s.Z)(d.label,{[d.states.hidden]:y}),children:T}),R&&(0,i.jsx)("span",{role:"img","aria-hidden":"true",className:(0,s.Z)(d.icon,{[d.states.hidden]:y}),children:m}),y&&(0,i.jsx)("span",{role:"img","aria-hidden":"true",className:d.spinner,children:(0,i.jsx)(a.P,{children:(0,i.jsx)(c,{})})})]})});f.displayName="Button"},26675:function(t,e,n){"use strict";n.d(e,{C:function(){return f},S:function(){return u},a:function(){return c}});var i=n(57437),r=n(18550),s=n(2265),a=n(97339),o=n(70795),l=n(90388);function c(t){return s.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("defs",null,s.createElement("clipPath",{id:"a"},s.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),s.createElement("g",{clipPath:"url(#a)"},s.createElement("path",{d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm1.5 0a8.5 8.5 0 1 1 17 0 8.5 8.5 0 0 1-17 0Zm12.28-1.72-4.25 4.25a.722.722 0 0 1-.53.22.722.722 0 0 1-.53-.22l-2.25-2.25a.743.743 0 0 1 0-1.06.743.743 0 0 1 1.06 0L11 12.94l3.72-3.72a.743.743 0 0 1 1.06 0 .743.743 0 0 1 0 1.06Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})))}function u(t){return s.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("path",{d:"M12.617 2.035a4.736 4.736 0 0 0-1.232 0c-1.28.167-2.263 1.01-3.216 2.25-.944 1.231-1.97 3.005-3.284 5.28l-.06.105c-1.316 2.277-2.342 4.053-2.937 5.487-.6 1.447-.838 2.72-.344 3.912.159.382.366.74.617 1.069.785 1.024 2.007 1.454 3.56 1.659 1.539.202 3.59.202 6.22.202h.12c2.63 0 4.681 0 6.22-.202 1.553-.204 2.775-.635 3.56-1.66a4.75 4.75 0 0 0 .617-1.068c.494-1.192.256-2.465-.344-3.912-.595-1.434-1.621-3.21-2.937-5.487l-.06-.105c-1.315-2.275-2.34-4.049-3.285-5.28-.952-1.24-1.935-2.083-3.215-2.25ZM11.58 3.522a3.23 3.23 0 0 1 .844 0c.678.089 1.343.535 2.22 1.677.877 1.143 1.854 2.83 3.205 5.169 1.352 2.34 2.328 4.031 2.88 5.364.552 1.331.606 2.13.344 2.762-.108.261-.25.507-.422.731-.415.543-1.135.897-2.564 1.085-1.43.188-3.382.189-6.085.189s-4.655-.001-6.085-.19c-1.43-.187-2.149-.54-2.564-1.084a3.249 3.249 0 0 1-.422-.73c-.262-.632-.208-1.432.344-2.763.552-1.333 1.528-3.023 2.88-5.364 1.351-2.338 2.328-4.026 3.205-5.17.877-1.141 1.543-1.587 2.22-1.676Zm1.173 5.227a.75.75 0 0 0-1.5 0v5.5a.75.75 0 1 0 1.5 0v-5.5Zm-1.75 8.253a1 1 0 1 1 2-.005 1 1 0 0 1-2 .005Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}n(90882);let h=(0,l.g)("caption"),d=Object.freeze({caption:h,captionWithIcon:`${h}--with-icon`,content:`${h}__content`,icon:`${h}__icon`,text:`${h}__text`,size:{s:`${h}--s`,m:`${h}--m`},states:{success:`${h}--success`,error:`${h}--error`,warning:`${h}--warning`}});function f({as:t,children:e,state:n="default",size:s="m",text:l,withoutIcon:h=!1,lineClamp:f,role:p,dataQa:v,dataId:m,className:g,style:y,...b}){let _=l||e,w=!h&&["success","error","warning"].includes(n),x="success"===n?c:u,k=(0,r.Z)(g,d.caption,d.size[s],{[d.captionWithIcon]:w,[d.states.success]:"success"===n,[d.states.error]:"error"===n,[d.states.warning]:"warning"===n});return(0,i.jsx)(t||"div",{className:k,style:y,role:p,...b,"data-id":m,"data-qa":v,children:(0,i.jsxs)("div",{className:d.content,children:[w&&_&&(0,i.jsx)(a.P,{className:d.icon,children:(0,i.jsx)(x,{})}),(0,i.jsx)("span",{className:(0,r.Z)(d.text),style:{...f?{WebkitLineClamp:f,lineClamp:f,...o.l}:void 0},children:_})]})})}f.displayName="Caption"},98160:function(t,e,n){"use strict";n.d(e,{C:function(){return l}});var i=n(57437),r=n(18550),s=n(90388);n(31444);let a=(0,s.g)("card"),o={card:a,variants:{primary:`${a}--primary`,secondary:`${a}--secondary`}},l=({as:t,className:e,style:n,children:s,variant:a="primary",dataQa:l,dataId:c,...u})=>(0,i.jsx)(t||"div",{className:(0,r.Z)(e,o.card,o.variants[a]),style:n,...u,"data-id":c,"data-qa":l,children:s});l.displayName="Card"},98825:function(t,e,n){"use strict";n.d(e,{C:function(){return p}});var i=n(57437),r=n(2265),s=n(18550),a=n(30462),o=n(26675);n(73354);var l=n(27590),c=n(93869),u=n(97339),h=n(90388);n(73923);let d=(0,h.g)("checkbox"),f=Object.freeze({checkbox:d,input:"".concat(d,"__input"),marker:"".concat(d,"__marker"),wrapper:"".concat(d,"__wrapper"),label:"".concat(d,"__label"),caption:"".concat(d,"__caption"),icon:"".concat(d,"__icon"),iconButton:"".concat(d,"__icon-button"),states:{error:"".concat(d,"--error"),disabled:"".concat(d,"--disabled"),inverted:"".concat(d,"--inverted")},sizes:{xs:"".concat(d,"--xs"),s:"".concat(d,"--s"),m:"".concat(d,"--m")},variants:{primary:"".concat(d,"--primary"),secondary:"".concat(d,"--secondary")}}),p=(0,r.forwardRef)((t,e)=>{let{value:n=!1,variant:h="primary",state:d="default",label:p,disabled:v=!1,caption:m,className:g,icon:y,withIcon:b=!1,size:_="m",style:w,inverted:x=!1,children:k,inputRef:C,dataQa:j,dataId:M,onChange:E,onIconClick:S,...N}=t,[T,O]=(0,l.u)(!1,n),L=(0,r.useId)(),A=k||p;return(0,i.jsxs)("label",{ref:e,htmlFor:L,"data-marker-label":"",className:(0,s.Z)(g,f.checkbox,{[f.states.inverted]:x,[f.states.disabled]:v,[f.states.error]:"error"===d,[f.sizes[_]]:!0,[f.variants[h]]:!0}),style:w,"data-id":M,"data-qa":j,children:[(0,i.jsx)("input",{id:L,ref:C,value:String(T),className:f.input,type:"checkbox","aria-invalid":"error"===d,disabled:v,onChange:t=>{let e="string"==typeof T?!!T:!T;O(e),null==E||E(e,t)},...N}),(0,i.jsx)("span",{className:f.marker,children:(0,i.jsx)(c.C,{type:"checkbox",checked:T,inverted:x,state:d,disabled:v})}),A&&(0,i.jsxs)("span",{className:f.wrapper,children:[(0,i.jsx)("span",{className:(0,s.Z)(f.label),children:A}),m&&(0,i.jsx)(o.C,{className:f.caption,withoutIcon:!0,children:m})]}),b&&(0,i.jsx)("button",{type:"button",className:(0,s.Z)(f.iconButton),onClick:v?void 0:S,children:(0,i.jsx)(u.P,{className:(0,s.Z)(f.icon),children:y?(0,i.jsx)(i.Fragment,{children:y}):(0,i.jsx)(a.S,{})})})]})});p.displayName="Checkbox"},5795:function(t,e,n){"use strict";n(57437),n(18550);var i=n(90388);n(17046);let r=(0,i.g)("col");Object.freeze({col:r,state:{size:(t,e)=>!0===e?`${r}--${t}`:`${r}--${t}-${e}`,offsetLeft:(t,e)=>`${r}--${t}-offset-left-${e}`,offsetRight:(t,e)=>`${r}--${t}-offset-right-${e}`}})},93869:function(t,e,n){"use strict";n.d(e,{C:function(){return f}});var i=n(57437),r=n(18550),s=n(2265),a=n(97339),o=n(90388);function l(t){return s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.836 6.466a1.5 1.5 0 0 1-.051 2.12l-9.45 9a1.5 1.5 0 0 1-2.07 0l-4.05-3.857a1.5 1.5 0 1 1 2.07-2.172L9.3 14.429l8.415-8.015a1.5 1.5 0 0 1 2.121.052Z"}))}function c(t){return s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("rect",{width:18,height:3,x:3,y:10.5,fill:"currentColor",rx:1.5}))}n(50230);let u=["checkbox"],h=(0,o.g)("common-marker"),d={marker:h,icon:`${h}__icon`,states:{checkbox:`${h}--checkbox`,radio:`${h}--radio`,toggle:`${h}--toggle`,error:`${h}--error`,checked:`${h}--checked`,disabled:`${h}--disabled`,inverted:`${h}--inverted`,indeterminate:`${h}--indeterminate`}},f=({as:t,state:e="default",type:n="checkbox",className:s,checked:o,inverted:h,disabled:f,...p})=>(0,i.jsx)(t||"span",{...p,className:(0,r.Z)(s,d.marker,{[d.states.checkbox]:"checkbox"===n,[d.states.radio]:"radio"===n,[d.states.toggle]:"toggle"===n,[d.states.checked]:!!o,[d.states.indeterminate]:"indeterminate"===o,[d.states.error]:"error"===e,[d.states.inverted]:h,[d.states.disabled]:f}),children:u.includes(n)&&(0,i.jsx)(a.P,{className:(0,r.Z)(d.icon,{[d.states.checked]:o,[d.states.inverted]:h,[d.states.error]:"error"===e,[d.states.disabled]:f}),children:"indeterminate"===o?(0,i.jsx)(c,{}):(0,i.jsx)(l,{})})});f.displayName="CommonMarker"},29832:function(t,e,n){"use strict";n(57437),n(18550);var i=n(90388);n(69061);let r=(0,i.g)("container");Object.freeze({container:r,states:{narrow:`${r}--narrow`}})},77046:function(t,e,n){"use strict";n.d(e,{D:function(){return l}});var i=n(57437),r=n(18550),s=n(90388);n(83002);let a=(0,s.g)("divider"),o=Object.freeze({divider:a,content:`${a}__content`}),l=({content:t,className:e,style:n,dataQa:s,dataId:a,...l})=>(0,i.jsx)("div",{className:(0,r.Z)(o.divider,e),style:n,...l,"data-id":a,"data-qa":s,children:t&&(0,i.jsx)("div",{className:o.content,children:t})});l.displayName="Divider"},54428:function(t,e,n){"use strict";n.d(e,{F:function(){return c}});var i=n(57437),r=n(18550),s=n(26675),a=n(90388);n(85379);let o=(0,a.g)("form-field"),l=Object.freeze({formField:o,labelWrapper:`${o}__label-wrapper`,label:`${o}__label`,description:`${o}__description`}),c=({label:t,description:e,caption:n,captionState:a,children:o,hasCaption:c,className:u,style:h,dataQa:d,dataId:f,...p})=>(0,i.jsxs)("div",{className:(0,r.Z)(l.formField,u),style:h,...p,"data-id":f,"data-qa":d,children:[(t||e)&&(0,i.jsxs)("div",{className:l.labelWrapper,children:[(0,i.jsx)("span",{className:l.label,children:t}),(0,i.jsx)("span",{className:l.description,children:e})]}),o,(c||n)&&(0,i.jsx)(s.C,{text:n,state:a})]});c.displayName="FormField"},60885:function(t,e,n){"use strict";n.d(e,{H:function(){return u}});var i=n(57437),r=n(18550),s=n(70795),a=n(90388);n(50336);let o={display:"h1",hero:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},l=(0,a.g)("heading"),c=Object.freeze({heading:l,states:Object.freeze({display:`${l}--display`,hero:`${l}--hero`,h1:`${l}--h1`,h2:`${l}--h2`,h3:`${l}--h3`,h4:`${l}--h4`,h5:`${l}--h5`,h6:`${l}--h6`})}),u=({as:t,children:e,weight:n,type:a,lineClamp:l,className:u,style:h,dataQa:d,dataId:f,...p})=>{var v;let m=t||o[a]||"div",g=/^h[1-6]$/.test(m),y=(null==(v=a.match(/\d+/))?void 0:v[0])||1;return(0,i.jsx)(m,{className:(0,r.Z)(c.heading,c.states[a],u),style:{...n?{fontWeight:`var(--font-weight-${n})`}:void 0,...l?{WebkitLineClamp:l,lineClamp:l,...s.l}:void 0,...h},role:g?null:"heading","aria-level":g?null:y,...p,"data-id":f,"data-qa":d,children:e})};u.displayName="Heading"},20746:function(t,e,n){"use strict";n(57437),n(18550);var i=n(90388);n(32905);let r=(0,i.g)("loader");Object.freeze({loader:r,variant:{primary:`${r}--primary`,purple:`${r}--purple`,accent:`${r}--accent`,white:`${r}--white`},size:{s:`${r}--s`,m:`${r}--m`,l:`${r}--l`}})},41566:function(t,e,n){"use strict";n.d(e,{P:function(){return v}});var i=n(57437),r=n(2265),s=n(18550),a=n(16372),o=n(3385),l=n(97339),c=n(90388);function u(t){return r.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},r.createElement("path",{d:"M5.997 10.746c-.686 0-1.252.559-1.247 1.254A1.251 1.251 0 0 0 6 13.246c.69 0 1.25-.56 1.25-1.25 0-.692-.564-1.25-1.253-1.25Zm6 0c-.686 0-1.252.559-1.247 1.254A1.251 1.251 0 0 0 12 13.246c.69 0 1.25-.56 1.25-1.25 0-.692-.564-1.25-1.253-1.25ZM16.75 12a1.247 1.247 0 0 1 1.247-1.254c.69 0 1.253.558 1.253 1.25 0 .69-.56 1.25-1.25 1.25A1.252 1.252 0 0 1 16.75 12Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}n(17350);let h=(t,e)=>Array.from({length:e-t+1},(e,n)=>n+t),d=t=>{let{totalCount:e,pageSize:n,siblingCount:i=1,currentPage:s}=t;return(0,r.useMemo)(()=>{let t=Math.ceil(e/n);if(i+5>=t)return h(1,t);let r=Math.max(s-i,1),a=Math.min(s+i,t),o=r>2,l=a<t-1;return!o&&l?[...h(1,2+2*i),"...",t]:o&&!l?[1,"...",...h(t-(2+2*i)+1,t)]:o&&l?[1,"...",...h(r,a),"...",t]:void 0},[e,n,i,s])},f=(0,c.g)("pagination"),p=Object.freeze({pagination:f,bullet:"".concat(f,"--bullet"),dots:"".concat(f,"__dots"),link:"".concat(f,"__link"),active:"".concat(f,"__link--active"),controls:"".concat(f,"__link--controls"),big:"".concat(f,"__link--big"),prev:"".concat(f,"__link--prev"),next:"".concat(f,"__link--next"),disabled:"".concat(f,"__link--disabled")}),v=t=>{let{isControl:e=!1,onPageChange:n,totalCount:c,siblingCount:h=1,currentPage:f,pageSize:v,className:m,style:g,dataId:y,dataQa:b,sizePaginationBtn:_="small",hidePaginationControl:w=!1,renderLinkComponent:x,link:k}=t,C=d({currentPage:f,totalCount:c,siblingCount:h,pageSize:v});if(0===f||(null==C?void 0:C.length)<2)return null;let j=C[(null==C?void 0:C.length)-1],M=null==x?void 0:x(f+1),E=null==x?void 0:x(f-1),S=(0,s.Z)(p.controls,p.prev,{[p.big]:"big"===_,[p.link]:"small"===_,[p.disabled]:1===f}),N=(0,s.Z)(p.controls,p.next,{[p.big]:"big"===_,[p.link]:"small"===_,[p.disabled]:f===+j}),T=t=>(0,s.Z)(p.link,{[p.active]:t===f}),O=(0,i.jsx)(l.P,{style:{fontSize:24},children:(0,i.jsx)(o.S,{})}),L=(0,i.jsx)(l.P,{style:{fontSize:24},children:(0,i.jsx)(a.S,{})});return e?(0,i.jsx)("div",{role:"navigation","aria-label":"Навигация по страницам",className:(0,s.Z)(p.pagination,p.bullet),"data-id":y,"data-qa":b,children:Array.from({length:c/v},(t,e)=>e+1).map((t,e)=>{let s=null==x?void 0:x(+t),a=T(+t);return(0,r.isValidElement)(s)?(0,r.cloneElement)(s,{key:e,className:a}):(0,i.jsx)("a",{className:a,href:k?"".concat(k).concat(+t):"#","aria-current":f===+t?"true":"false","aria-label":"".concat(+t),onClick:e=>{e.preventDefault(),null==n||n(+t)}},e)})}):(0,i.jsxs)("div",{role:"navigation","aria-label":"Навигация по страницам",className:(0,s.Z)(p.pagination,m),style:g,"data-id":y,"data-qa":b,children:[(null==C?void 0:C.length)&&!w?(0,r.isValidElement)(E)?(0,r.cloneElement)(E,{children:L,className:S}):(0,i.jsx)("a",{href:k?"".concat(k).concat(f-1):"#",className:S,onClick:t=>{t.preventDefault(),null==n||n(f-1)},children:L}):null,(null==C?void 0:C.length)&&(null==C?void 0:C.map((t,e)=>{if("..."===t)return(0,i.jsx)("div",{className:(0,s.Z)(p.dots),children:(0,i.jsx)(l.P,{children:(0,i.jsx)(u,{})})},e);let a=null==x?void 0:x(+t),o=T(+t);return(0,r.isValidElement)(a)?(0,r.cloneElement)(a,{children:t,key:e,className:o}):(0,i.jsx)("a",{className:o,"aria-current":f===+t?"true":"false","aria-label":"".concat(+t),href:k?"".concat(k).concat(+t):"#",onClick:e=>{e.preventDefault(),null==n||n(+t)},children:t},e)})),(null==C?void 0:C.length)&&!w?(0,r.isValidElement)(M)?(0,r.cloneElement)(M,{children:O,className:N}):(0,i.jsx)("a",{href:k?"".concat(k).concat(f+1):"#",className:N,onClick:t=>{t.preventDefault(),null==n||n(f+1)},children:O}):null]})};v.displayName="Pagination"},97339:function(t,e,n){"use strict";n.d(e,{P:function(){return o}});var i=n(57437),r=n(18550),s=n(90388);n(84074);let a=Object.freeze({privateIcon:(0,s.g)("private-icon")}),o=({children:t,className:e,style:n,...s})=>(0,i.jsx)("span",{className:(0,r.Z)(a.privateIcon,e),style:n,...s,children:t});o.displayName="PrivateIcon"},95925:function(t,e,n){"use strict";n(57437);var i=(n(18550),n(90388));n(44732);let r=(0,i.g)("progress-bar");Object.freeze({progressBar:r,rounded:`${r}-rounded`,indicator:`${r}__indicator`,text:`${r}__text`,animationCircle:`${r}__animation-circle`})},96777:function(t,e,n){"use strict";n(57437),n(18550);var i=n(90388);n(94250);let r=(0,i.g)("row"),s=(t,e,n)=>`${r}--gutter-${t}-${e}-${n}`;Object.freeze({row:r,state:{reverse:`${r}--reverse`,gutter:(t,e="xs")=>Array.isArray(t)?[s(e,t[0],"h"),s(e,t[1],"v")].join(" "):s(e,t,"h")}})},52475:function(t,e,n){"use strict";n(57437),n(18550);var i=n(90388);n(38018);let r=(0,i.g)("skeleton");Object.freeze({skeleton:r,states:{inline:`${r}--inline`,rounded:`${r}--rounded`,inverted:`${r}--inverted`,suspend:`${r}--suspend`}})},78665:function(t,e,n){"use strict";n.d(e,{T:function(){return c}});var i=n(57437),r=n(2265),s=n(18550),a=n(90388);n(4026);let o=(0,a.g)("tag"),l=Object.freeze({tag:o,label:"".concat(o,"__label"),icon:"".concat(o,"__icon"),rounded:"".concat(o,"--rounded"),variant:{primary:"".concat(o,"--primary"),secondary:"".concat(o,"--secondary"),red:"".concat(o,"--red"),green:"".concat(o,"--green"),orange:"".concat(o,"--orange"),purple:"".concat(o,"--purple"),outline:"".concat(o,"--outline")},size:{s:"".concat(o,"--s"),m:"".concat(o,"--m"),l:"".concat(o,"--l")},iconMargin:{left:"".concat(o,"__icon--left"),right:"".concat(o,"__icon--right")}}),c=(0,r.forwardRef)((t,e)=>{let{label:n,size:r="m",rounded:a,variant:o="primary",iconLeft:c,iconRight:u,onIconLeftClick:h,onIconRightClick:d,className:f,style:p,dataQa:v,dataId:m,...g}=t;return(0,i.jsx)(i.Fragment,{children:n&&(0,i.jsxs)("div",{ref:e,className:(0,s.Z)(l.tag,l.variant[o],l.size[r],{[l.rounded]:a},f),style:p,...g,"data-id":m,"data-qa":v,children:[c&&(0,i.jsx)("button",{type:"button",className:(0,s.Z)(l.icon,l.iconMargin.left,{[l.size.l]:"l"===r}),onClick:t=>null==h?void 0:h(t),disabled:!h,children:c}),(0,i.jsx)("span",{className:(0,s.Z)(l.label,l.size[r]),children:n}),u&&(0,i.jsx)("button",{type:"button",className:(0,s.Z)(l.icon,l.iconMargin.right,{[l.size.l]:"l"===r}),onClick:t=>null==d?void 0:d(t),disabled:!d,children:u})]})})});c.displayName="Tag"},33054:function(t,e,n){"use strict";n.d(e,{T:function(){return o}});var i=n(57437),r=n(18550),s=n(70795);let a=Object.freeze({text:(0,n(90388).g)("text")});function o({as:t,className:e,style:n,children:o,size:l,weight:c,fontFamily:u,lineClamp:h,dataQa:d,dataId:f,...p}){return(0,i.jsx)(t||"span",{className:(0,r.Z)(a.text,e),style:{...l&&{fontSize:`var(--font-size-${l})`,lineHeight:`var(--font-line-height-${l})`},...c&&{fontWeight:`var(--font-weight-${c})`},...h&&{WebkitLineClamp:h,lineClamp:h,...s.l},...u&&{fontFamily:`var(--font-family-${u})`},...n},...p,"data-id":f,"data-qa":d,children:o})}o.displayName="Text"},37418:function(t,e,n){"use strict";n.d(e,{T:function(){return h}});var i=n(57437),r=n(2265),s=n(18550);n(73354);var a=n(27590),o=n(93869),l=n(90388);n(69433);let c=(0,l.g)("toggle"),u=Object.freeze({toggle:c,wrapper:"".concat(c,"__wrapper"),secondaryLabel:"".concat(c,"__secondary-label"),input:"".concat(c,"__input"),marker:"".concat(c,"__marker"),label:"".concat(c,"__label"),caption:"".concat(c,"__caption"),states:{disabled:"".concat(c,"--disabled"),inverted:"".concat(c,"--inverted"),flipped:"".concat(c,"--flipped"),checked:"".concat(c,"--checked")}}),h=(0,r.forwardRef)((t,e)=>{let{value:n,onChange:l,label:c,secondaryLabel:h,disabled:d=!1,caption:f,inverted:p=!1,flipped:v=!1,className:m,style:g,inputRef:y,dataQa:b,dataId:_,...w}=t,[x,k]=(0,a.u)(null!=n&&n,n),C=(0,r.useId)();return(0,i.jsxs)("label",{className:(0,s.Z)(m,u.toggle,{[u.states.disabled]:d,[u.states.inverted]:p,[u.states.flipped]:v,[u.states.checked]:x}),style:g,htmlFor:C,"data-marker-label":"",ref:e,"data-id":_,"data-qa":b,children:[(0,i.jsx)("input",{id:C,role:"switch","aria-checked":x,type:"checkbox",className:u.input,checked:x,onChange:t=>{k(t.target.checked),null==l||l(t.target.checked,t)},disabled:d,ref:y,...w}),(0,i.jsx)("span",{className:u.marker,children:(0,i.jsx)(o.C,{type:"toggle",checked:x,inverted:p,disabled:d})}),c&&h&&(0,i.jsx)("span",{className:u.secondaryLabel,children:h}),c&&(0,i.jsxs)("span",{className:u.wrapper,children:[(0,i.jsx)("span",{className:u.label,children:c}),f&&(0,i.jsx)("span",{className:u.caption,children:f})]})]})});h.displayName="Toggle"},73354:function(t,e,n){"use strict";n.d(e,{B:function(){return r},a:function(){return i},b:function(){return s}});let i=Object.freeze({xs:Object.freeze({maxWidth:599}),s:Object.freeze({minWidth:600,maxWidth:767}),m:Object.freeze({minWidth:768,maxWidth:1023}),l:Object.freeze({minWidth:1024,maxWidth:1279}),xl:Object.freeze({minWidth:1280,maxWidth:1439}),"2xl":Object.freeze({minWidth:1440,maxWidth:1919}),"3xl":Object.freeze({minWidth:1920})}),r=Object.freeze(Object.keys(i)),s=Object.freeze(r.filter(t=>"xs"!==t));Object.freeze(r.filter(t=>"3xl"!==t))},70795:function(t,e,n){"use strict";n.d(e,{l:function(){return i}});let i={display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden"}},90388:function(t,e,n){"use strict";function i(t){return`finkit-modular-${t}`}n.d(e,{g:function(){return i}})},16372:function(t,e,n){"use strict";n.d(e,{S:function(){return r}});var i=n(2265);function r(t){return i.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},i.createElement("path",{d:"M7.22 12.53a.75.75 0 0 1 0-1.06l6.5-6.5a.75.75 0 1 1 1.06 1.06L8.81 12l5.97 5.97a.75.75 0 1 1-1.06 1.06l-6.5-6.5Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}},3385:function(t,e,n){"use strict";n.d(e,{S:function(){return r}});var i=n(2265);function r(t){return i.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},i.createElement("path",{d:"m10.28 19.03 6.5-6.5a.75.75 0 0 0 0-1.06l-6.5-6.5a.75.75 0 1 0-1.06 1.06L15.19 12l-5.97 5.97a.75.75 0 1 0 1.06 1.06Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}},30462:function(t,e,n){"use strict";n.d(e,{S:function(){return r}});var i=n(2265);function r(t){return i.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},i.createElement("path",{d:"M12.004 7.246A1.247 1.247 0 0 1 10.75 6c0-.69.558-1.253 1.25-1.253.69 0 1.25.56 1.25 1.25 0 .688-.559 1.248-1.246 1.25ZM10.75 12c0 .686.559 1.252 1.254 1.247a1.252 1.252 0 0 0 1.246-1.25c0-.69-.56-1.25-1.25-1.25-.692 0-1.25.564-1.25 1.253Zm0 6c0 .686.559 1.253 1.254 1.247a1.252 1.252 0 0 0 1.246-1.25c0-.69-.56-1.25-1.25-1.25-.692 0-1.25.564-1.25 1.253Z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}))}},45823:function(t,e,n){"use strict";n.d(e,{g:function(){return i}});let i=(t,e=!0)=>e?t:void 0},9645:function(t,e,n){"use strict";n.d(e,{g:function(){return i}});let i=()=>Date.now().toString()+Math.random().toString(36).slice(2,9)},95512:function(t,e,n){"use strict";function i(t){return void 0!==t}n.d(e,{i:function(){return i}})},27590:function(t,e,n){"use strict";n.d(e,{u:function(){return s}});var i=n(2265),r=n(95512);function s(t,e){let[n,s]=(0,i.useState)(t);return(0,i.useEffect)(()=>{(0,r.i)(e)&&s(e)},[JSON.stringify(e)]),[n,s]}},18550:function(t,e,n){"use strict";e.Z=function(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=function t(e){var n,i,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e){if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(i=t(e[n]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i)}return r}(t))&&(i&&(i+=" "),i+=e);return i}},32464:function(t,e,n){"use strict";n.d(e,{jb:function(){return b},xn:function(){return _}});let i=/#/g,r=/&/g,s=/\//g,a=/=/g,o=/\+/g,l=/%5e/gi,c=/%60/gi,u=/%7c/gi,h=/%20/gi;function d(t){return encodeURI(""+("string"==typeof t?t:JSON.stringify(t))).replace(u,"|").replace(o,"%2B").replace(h,"+").replace(i,"%23").replace(r,"%26").replace(c,"`").replace(l,"^").replace(s,"%2F")}function f(t){return d(t).replace(a,"%3D")}function p(t=""){try{return decodeURIComponent(""+t)}catch{return""+t}}let v=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,m=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,g=/^([/\\]\s*){2,}[^/\\]/,y=/^\.?\//;function b(t,e){let n=function t(e="",n){let i=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(i){let[,t,e=""]=i;return{protocol:t.toLowerCase(),pathname:e,href:t+e,auth:"",host:"",search:"",hash:""}}if(!function(t,e={}){return("boolean"==typeof e&&(e={acceptRelative:e}),e.strict)?v.test(t):m.test(t)||!!e.acceptRelative&&g.test(t)}(e,{acceptRelative:!0}))return n?t(n+e):x(e);let[,r="",s,a=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o="",l=""]=a.match(/([^#/?]*)(.*)?/)||[];"file:"===r&&(l=l.replace(/\/(?=[A-Za-z]:)/,""));let{pathname:c,search:u,hash:h}=x(l);return{protocol:r.toLowerCase(),auth:s?s.slice(0,Math.max(0,s.length-1)):"",host:o,pathname:c,search:u,hash:h,[w]:!r}}(t),i={...function(t=""){let e=Object.create(null);for(let n of("?"===t[0]&&(t=t.slice(1)),t.split("&"))){let t=n.match(/([^=]+)=?(.*)/)||[];if(t.length<2)continue;let i=p(t[1].replace(o," "));if("__proto__"===i||"constructor"===i)continue;let r=p((t[2]||"").replace(o," "));void 0===e[i]?e[i]=r:Array.isArray(e[i])?e[i].push(r):e[i]=[e[i],r]}return e}(n.search),...e};return n.search=Object.keys(i).filter(t=>void 0!==i[t]).map(t=>{var e;return(("number"==typeof(e=i[t])||"boolean"==typeof e)&&(e=String(e)),e)?Array.isArray(e)?e.map(e=>`${f(t)}=${d(e)}`).join("&"):`${f(t)}=${d(e)}`:f(t)}).filter(Boolean).join("&"),function(t){let e=t.pathname||"",n=t.search?(t.search.startsWith("?")?"":"?")+t.search:"",i=t.hash||"",r=t.auth?t.auth+"@":"",s=t.host||"";return(t.protocol||t[w]?(t.protocol||"")+"//":"")+r+s+e+n+i}(n)}function _(t,...e){let n=t||"";for(let t of e.filter(t=>t&&"/"!==t))if(n){let e=t.replace(y,"");n=function(t="",e){return t.endsWith("/")?t:t+"/"}(n)+e}else n=t;return n}let w=Symbol.for("ufo:protocolRelative");function x(t=""){let[e="",n="",i=""]=(t.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:n,hash:i}}},64131:function(t,e){"use strict";function n(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)t[i]=n[i]}return t}var i=function t(e,i){function r(t,r,s){if("undefined"!=typeof document){"number"==typeof(s=n({},i,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var o in s)s[o]&&(a+="; "+o,!0!==s[o]&&(a+="="+s[o].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+a}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],i={},r=0;r<n.length;r++){var s=n[r].split("="),a=s.slice(1).join("=");try{var o=decodeURIComponent(s[0]);if(i[o]=e.read(a,o),t===o)break}catch(t){}}return t?i[t]:i}},remove:function(t,e){r(t,"",n({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,n({},this.attributes,e))},withConverter:function(e){return t(n({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});e.Z=i},60089:function(t,e,n){"use strict";n.d(e,{Wg:function(){return g}});let i=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,r=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,s=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function a(t,e){if("__proto__"===t||"constructor"===t&&e&&"object"==typeof e&&"prototype"in e){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`);return}return e}function o(t,e={}){if("string"!=typeof t)return t;let n=t.trim();if('"'===t[0]&&t.endsWith('"')&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){let t=n.toLowerCase();if("true"===t)return!0;if("false"===t)return!1;if("undefined"===t)return;if("null"===t)return null;if("nan"===t)return Number.NaN;if("infinity"===t)return Number.POSITIVE_INFINITY;if("-infinity"===t)return Number.NEGATIVE_INFINITY}if(!s.test(t)){if(e.strict)throw SyntaxError("[destr] Invalid JSON");return t}try{if(i.test(t)||r.test(t)){if(e.strict)throw Error("[destr] Possible prototype pollution");return JSON.parse(t,a)}return JSON.parse(t)}catch(n){if(e.strict)throw n;return t}}var l=n(77337);class c extends Error{constructor(t,e){super(t,e),this.name="FetchError",e?.cause&&!this.cause&&(this.cause=e.cause)}}let u=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function h(t="GET"){return u.has(t.toUpperCase())}let d=new Set(["image/svg","application/xml","application/xhtml","application/html"]),f=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i,p=new Set([408,409,425,429,500,502,503,504]),v=new Set([101,204,205,304]),m=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}(),g=function t(e={}){let{fetch:n=globalThis.fetch,Headers:i=globalThis.Headers,AbortController:r=globalThis.AbortController}=e;async function s(t){let e=t.error&&"AbortError"===t.error.name&&!t.options.timeout||!1;if(!1!==t.options.retry&&!e){let e;e="number"==typeof t.options.retry?t.options.retry:h(t.options.method)?0:1;let n=t.response&&t.response.status||500;if(e>0&&(Array.isArray(t.options.retryStatusCodes)?t.options.retryStatusCodes.includes(n):p.has(n))){let n=t.options.retryDelay||0;return n>0&&await new Promise(t=>setTimeout(t,n)),a(t.request,{...t.options,retry:e-1,timeout:t.options.timeout})}}let n=function(t){let e=t.error?.message||t.error?.toString()||"",n=t.request?.method||t.options?.method||"GET",i=t.request?.url||String(t.request)||"/",r=`[${n}] ${JSON.stringify(i)}`,s=t.response?`${t.response.status} ${t.response.statusText}`:"<no response>",a=new c(`${r}: ${s}${e?` ${e}`:""}`,t.error?{cause:t.error}:void 0);for(let e of["request","options","response"])Object.defineProperty(a,e,{get:()=>t[e]});for(let[e,n]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(a,e,{get:()=>t.response&&t.response[n]});return a}(t);throw Error.captureStackTrace&&Error.captureStackTrace(n,a),n}let a=async function(t,a={}){let c={request:t,options:function(t,e,n=globalThis.Headers){let i={...e,...t};if(e?.params&&t?.params&&(i.params={...e?.params,...t?.params}),e?.query&&t?.query&&(i.query={...e?.query,...t?.query}),e?.headers&&t?.headers)for(let[r,s]of(i.headers=new n(e?.headers||{}),new n(t?.headers||{})))i.headers.set(r,s);return i}(a,e.defaults,i),response:void 0,error:void 0};if(c.options.method=c.options.method?.toUpperCase(),c.options.onRequest&&await c.options.onRequest(c),"string"==typeof c.request&&(c.options.baseURL&&(c.request=(0,l.pJ)(c.request,c.options.baseURL)),(c.options.query||c.options.params)&&(c.request=(0,l.jb)(c.request,{...c.options.params,...c.options.query}))),c.options.body&&h(c.options.method)&&(function(t){if(void 0===t)return!1;let e=typeof t;return"string"===e||"number"===e||"boolean"===e||null===e||"object"===e&&(!!Array.isArray(t)||!t.buffer&&(t.constructor&&"Object"===t.constructor.name||"function"==typeof t.toJSON))}(c.options.body)?(c.options.body="string"==typeof c.options.body?c.options.body:JSON.stringify(c.options.body),c.options.headers=new i(c.options.headers||{}),c.options.headers.has("content-type")||c.options.headers.set("content-type","application/json"),c.options.headers.has("accept")||c.options.headers.set("accept","application/json")):("pipeTo"in c.options.body&&"function"==typeof c.options.body.pipeTo||"function"==typeof c.options.body.pipe)&&!("duplex"in c.options)&&(c.options.duplex="half")),!c.options.signal&&c.options.timeout){let t=new r;setTimeout(()=>t.abort(),c.options.timeout),c.options.signal=t.signal}try{c.response=await n(c.request,c.options)}catch(t){return c.error=t,c.options.onRequestError&&await c.options.onRequestError(c),await s(c)}if(c.response.body&&!v.has(c.response.status)&&"HEAD"!==c.options.method){let t=(c.options.parseResponse?"json":c.options.responseType)||function(t=""){if(!t)return"json";let e=t.split(";").shift()||"";return f.test(e)?"json":d.has(e)||e.startsWith("text/")?"text":"blob"}(c.response.headers.get("content-type")||"");switch(t){case"json":{let t=await c.response.text(),e=c.options.parseResponse||o;c.response._data=e(t);break}case"stream":c.response._data=c.response.body;break;default:c.response._data=await c.response[t]()}}return(c.options.onResponse&&await c.options.onResponse(c),!c.options.ignoreResponseError&&c.response.status>=400&&c.response.status<600)?(c.options.onResponseError&&await c.options.onResponseError(c),await s(c)):c.response},u=async function(t,e){return(await a(t,e))._data};return u.raw=a,u.native=(...t)=>n(...t),u.create=(n={})=>t({...e,defaults:{...e.defaults,...n}}),u}({fetch:m.fetch||(()=>Promise.reject(Error("[ofetch] global.fetch is not supported!"))),Headers:m.Headers,AbortController:m.AbortController})},31229:function(t,e,n){"use strict";let i;n.d(e,{z:function(){return eo}}),(t8=ee||(ee={})).assertEqual=t=>t,t8.assertIs=function(t){},t8.assertNever=function(t){throw Error()},t8.arrayToEnum=t=>{let e={};for(let n of t)e[n]=n;return e},t8.getValidEnumValues=t=>{let e=t8.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),n={};for(let i of e)n[i]=t[i];return t8.objectValues(n)},t8.objectValues=t=>t8.objectKeys(t).map(function(e){return t[e]}),t8.objectKeys="function"==typeof Object.keys?t=>Object.keys(t):t=>{let e=[];for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e},t8.find=(t,e)=>{for(let n of t)if(e(n))return n},t8.isInteger="function"==typeof Number.isInteger?t=>Number.isInteger(t):t=>"number"==typeof t&&isFinite(t)&&Math.floor(t)===t,t8.joinValues=function(t,e=" | "){return t.map(t=>"string"==typeof t?`'${t}'`:t).join(e)},t8.jsonStringifyReplacer=(t,e)=>"bigint"==typeof e?e.toString():e,(en||(en={})).mergeShapes=(t,e)=>({...t,...e});let r=ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),s=t=>{switch(typeof t){case"undefined":return r.undefined;case"string":return r.string;case"number":return isNaN(t)?r.nan:r.number;case"boolean":return r.boolean;case"function":return r.function;case"bigint":return r.bigint;case"symbol":return r.symbol;case"object":if(Array.isArray(t))return r.array;if(null===t)return r.null;if(t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch)return r.promise;if("undefined"!=typeof Map&&t instanceof Map)return r.map;if("undefined"!=typeof Set&&t instanceof Set)return r.set;if("undefined"!=typeof Date&&t instanceof Date)return r.date;return r.object;default:return r.unknown}},a=ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class o extends Error{constructor(t){super(),this.issues=[],this.addIssue=t=>{this.issues=[...this.issues,t]},this.addIssues=(t=[])=>{this.issues=[...this.issues,...t]};let e=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,e):this.__proto__=e,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let e=t||function(t){return t.message},n={_errors:[]},i=t=>{for(let r of t.issues)if("invalid_union"===r.code)r.unionErrors.map(i);else if("invalid_return_type"===r.code)i(r.returnTypeError);else if("invalid_arguments"===r.code)i(r.argumentsError);else if(0===r.path.length)n._errors.push(e(r));else{let t=n,i=0;for(;i<r.path.length;){let n=r.path[i];i===r.path.length-1?(t[n]=t[n]||{_errors:[]},t[n]._errors.push(e(r))):t[n]=t[n]||{_errors:[]},t=t[n],i++}}};return i(this),n}static assert(t){if(!(t instanceof o))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ee.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(t=t=>t.message){let e={},n=[];for(let i of this.issues)i.path.length>0?(e[i.path[0]]=e[i.path[0]]||[],e[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:e}}get formErrors(){return this.flatten()}}o.create=t=>new o(t);let l=(t,e)=>{let n;switch(t.code){case a.invalid_type:n=t.received===r.undefined?"Required":`Expected ${t.expected}, received ${t.received}`;break;case a.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,ee.jsonStringifyReplacer)}`;break;case a.unrecognized_keys:n=`Unrecognized key(s) in object: ${ee.joinValues(t.keys,", ")}`;break;case a.invalid_union:n="Invalid input";break;case a.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ee.joinValues(t.options)}`;break;case a.invalid_enum_value:n=`Invalid enum value. Expected ${ee.joinValues(t.options)}, received '${t.received}'`;break;case a.invalid_arguments:n="Invalid function arguments";break;case a.invalid_return_type:n="Invalid function return type";break;case a.invalid_date:n="Invalid date";break;case a.invalid_string:"object"==typeof t.validation?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,"number"==typeof t.validation.position&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:ee.assertNever(t.validation):n="regex"!==t.validation?`Invalid ${t.validation}`:"Invalid";break;case a.too_small:n="array"===t.type?`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:"string"===t.type?`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:"number"===t.type?`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:"date"===t.type?`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:"Invalid input";break;case a.too_big:n="array"===t.type?`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:"string"===t.type?`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:"number"===t.type?`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:"bigint"===t.type?`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:"date"===t.type?`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:"Invalid input";break;case a.custom:n="Invalid input";break;case a.invalid_intersection_types:n="Intersection results could not be merged";break;case a.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case a.not_finite:n="Number must be finite";break;default:n=e.defaultError,ee.assertNever(t)}return{message:n}},c=l;function u(){return c}let h=t=>{let{data:e,path:n,errorMaps:i,issueData:r}=t,s=[...n,...r.path||[]],a={...r,path:s};if(void 0!==r.message)return{...r,path:s,message:r.message};let o="";for(let t of i.filter(t=>!!t).slice().reverse())o=t(a,{data:e,defaultError:o}).message;return{...r,path:s,message:o}};function d(t,e){let n=u(),i=h({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===l?void 0:l].filter(t=>!!t)});t.common.issues.push(i)}class f{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(t,e){let n=[];for(let i of e){if("aborted"===i.status)return p;"dirty"===i.status&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,e){let n=[];for(let t of e){let e=await t.key,i=await t.value;n.push({key:e,value:i})}return f.mergeObjectSync(t,n)}static mergeObjectSync(t,e){let n={};for(let i of e){let{key:e,value:r}=i;if("aborted"===e.status||"aborted"===r.status)return p;"dirty"===e.status&&t.dirty(),"dirty"===r.status&&t.dirty(),"__proto__"!==e.value&&(void 0!==r.value||i.alwaysSet)&&(n[e.value]=r.value)}return{status:t.value,value:n}}}let p=Object.freeze({status:"aborted"}),v=t=>({status:"dirty",value:t}),m=t=>({status:"valid",value:t}),g=t=>"aborted"===t.status,y=t=>"dirty"===t.status,b=t=>"valid"===t.status,_=t=>"undefined"!=typeof Promise&&t instanceof Promise;function w(t,e,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function x(t,e,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(t,n):r?r.value=n:e.set(t,n),n}"function"==typeof SuppressedError&&SuppressedError,(t9=ei||(ei={})).errToObj=t=>"string"==typeof t?{message:t}:t||{},t9.toString=t=>"string"==typeof t?t:null==t?void 0:t.message;class k{constructor(t,e,n,i){this._cachedPath=[],this.parent=t,this.data=e,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let C=(t,e)=>{if(b(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let e=new o(t.common.issues);return this._error=e,this._error}}};function j(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:i,description:r}=t;if(e&&(n||i))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return e?{errorMap:e,description:r}:{errorMap:(e,r)=>{var s,a;let{message:o}=t;return"invalid_enum_value"===e.code?{message:null!=o?o:r.defaultError}:void 0===r.data?{message:null!==(s=null!=o?o:i)&&void 0!==s?s:r.defaultError}:"invalid_type"!==e.code?{message:r.defaultError}:{message:null!==(a=null!=o?o:n)&&void 0!==a?a:r.defaultError}},description:r}}class M{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return s(t.data)}_getOrReturnCtx(t,e){return e||{common:t.parent.common,data:t.data,parsedType:s(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new f,ctx:{common:t.parent.common,data:t.data,parsedType:s(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let e=this._parse(t);if(_(e))throw Error("Synchronous parse encountered promise.");return e}_parseAsync(t){return Promise.resolve(this._parse(t))}parse(t,e){let n=this.safeParse(t,e);if(n.success)return n.data;throw n.error}safeParse(t,e){var n;let i={common:{issues:[],async:null!==(n=null==e?void 0:e.async)&&void 0!==n&&n,contextualErrorMap:null==e?void 0:e.errorMap},path:(null==e?void 0:e.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:s(t)},r=this._parseSync({data:t,path:i.path,parent:i});return C(i,r)}async parseAsync(t,e){let n=await this.safeParseAsync(t,e);if(n.success)return n.data;throw n.error}async safeParseAsync(t,e){let n={common:{issues:[],contextualErrorMap:null==e?void 0:e.errorMap,async:!0},path:(null==e?void 0:e.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:s(t)},i=this._parse({data:t,path:n.path,parent:n});return C(n,await (_(i)?i:Promise.resolve(i)))}refine(t,e){let n=t=>"string"==typeof e||void 0===e?{message:e}:"function"==typeof e?e(t):e;return this._refinement((e,i)=>{let r=t(e),s=()=>i.addIssue({code:a.custom,...n(e)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then(t=>!!t||(s(),!1)):!!r||(s(),!1)})}refinement(t,e){return this._refinement((n,i)=>!!t(n)||(i.addIssue("function"==typeof e?e(n,i):e),!1))}_refinement(t){return new tm({schema:this,typeName:ea.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return tg.create(this,this._def)}nullable(){return ty.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return J.create(this,this._def)}promise(){return tv.create(this,this._def)}or(t){return te.create([this,t],this._def)}and(t){return tr.create(this,t,this._def)}transform(t){return new tm({...j(this._def),schema:this,typeName:ea.ZodEffects,effect:{type:"transform",transform:t}})}default(t){return new tb({...j(this._def),innerType:this,defaultValue:"function"==typeof t?t:()=>t,typeName:ea.ZodDefault})}brand(){return new tk({typeName:ea.ZodBranded,type:this,...j(this._def)})}catch(t){return new t_({...j(this._def),innerType:this,catchValue:"function"==typeof t?t:()=>t,typeName:ea.ZodCatch})}describe(t){return new this.constructor({...this._def,description:t})}pipe(t){return tC.create(this,t)}readonly(){return tj.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let E=/^c[^\s-]{8,}$/i,S=/^[0-9a-z]+$/,N=/^[0-9A-HJKMNP-TV-Z]{26}$/,T=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,O=/^[a-z0-9_-]{21}$/i,L=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,A=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,R=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,I=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,D=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,P="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Z=RegExp(`^${P}$`);function F(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:null==t.precision&&(e=`${e}(\\.\\d+)?`),e}function $(t){let e=`${P}T${F(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,RegExp(`^${e}$`)}class z extends M{_parse(t){var e,n;let s;if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==r.string){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.string,received:e.parsedType}),p}let o=new f;for(let r of this._def.checks)if("min"===r.kind)t.data.length<r.value&&(d(s=this._getOrReturnCtx(t,s),{code:a.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),o.dirty());else if("max"===r.kind)t.data.length>r.value&&(d(s=this._getOrReturnCtx(t,s),{code:a.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),o.dirty());else if("length"===r.kind){let e=t.data.length>r.value,n=t.data.length<r.value;(e||n)&&(s=this._getOrReturnCtx(t,s),e?d(s,{code:a.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):n&&d(s,{code:a.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),o.dirty())}else if("email"===r.kind)A.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{validation:"email",code:a.invalid_string,message:r.message}),o.dirty());else if("emoji"===r.kind)i||(i=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),i.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{validation:"emoji",code:a.invalid_string,message:r.message}),o.dirty());else if("uuid"===r.kind)T.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{validation:"uuid",code:a.invalid_string,message:r.message}),o.dirty());else if("nanoid"===r.kind)O.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{validation:"nanoid",code:a.invalid_string,message:r.message}),o.dirty());else if("cuid"===r.kind)E.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{validation:"cuid",code:a.invalid_string,message:r.message}),o.dirty());else if("cuid2"===r.kind)S.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{validation:"cuid2",code:a.invalid_string,message:r.message}),o.dirty());else if("ulid"===r.kind)N.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{validation:"ulid",code:a.invalid_string,message:r.message}),o.dirty());else if("url"===r.kind)try{new URL(t.data)}catch(e){d(s=this._getOrReturnCtx(t,s),{validation:"url",code:a.invalid_string,message:r.message}),o.dirty()}else"regex"===r.kind?(r.regex.lastIndex=0,r.regex.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{validation:"regex",code:a.invalid_string,message:r.message}),o.dirty())):"trim"===r.kind?t.data=t.data.trim():"includes"===r.kind?t.data.includes(r.value,r.position)||(d(s=this._getOrReturnCtx(t,s),{code:a.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),o.dirty()):"toLowerCase"===r.kind?t.data=t.data.toLowerCase():"toUpperCase"===r.kind?t.data=t.data.toUpperCase():"startsWith"===r.kind?t.data.startsWith(r.value)||(d(s=this._getOrReturnCtx(t,s),{code:a.invalid_string,validation:{startsWith:r.value},message:r.message}),o.dirty()):"endsWith"===r.kind?t.data.endsWith(r.value)||(d(s=this._getOrReturnCtx(t,s),{code:a.invalid_string,validation:{endsWith:r.value},message:r.message}),o.dirty()):"datetime"===r.kind?$(r).test(t.data)||(d(s=this._getOrReturnCtx(t,s),{code:a.invalid_string,validation:"datetime",message:r.message}),o.dirty()):"date"===r.kind?Z.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{code:a.invalid_string,validation:"date",message:r.message}),o.dirty()):"time"===r.kind?RegExp(`^${F(r)}$`).test(t.data)||(d(s=this._getOrReturnCtx(t,s),{code:a.invalid_string,validation:"time",message:r.message}),o.dirty()):"duration"===r.kind?L.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{validation:"duration",code:a.invalid_string,message:r.message}),o.dirty()):"ip"===r.kind?(e=t.data,("v4"===(n=r.version)||!n)&&R.test(e)||("v6"===n||!n)&&I.test(e)||(d(s=this._getOrReturnCtx(t,s),{validation:"ip",code:a.invalid_string,message:r.message}),o.dirty())):"base64"===r.kind?D.test(t.data)||(d(s=this._getOrReturnCtx(t,s),{validation:"base64",code:a.invalid_string,message:r.message}),o.dirty()):ee.assertNever(r);return{status:o.value,value:t.data}}_regex(t,e,n){return this.refinement(e=>t.test(e),{validation:e,code:a.invalid_string,...ei.errToObj(n)})}_addCheck(t){return new z({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ei.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ei.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ei.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ei.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ei.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ei.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ei.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ei.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ei.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ei.errToObj(t)})}datetime(t){var e,n;return"string"==typeof t?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:void 0===(null==t?void 0:t.precision)?null:null==t?void 0:t.precision,offset:null!==(e=null==t?void 0:t.offset)&&void 0!==e&&e,local:null!==(n=null==t?void 0:t.local)&&void 0!==n&&n,...ei.errToObj(null==t?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return"string"==typeof t?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:void 0===(null==t?void 0:t.precision)?null:null==t?void 0:t.precision,...ei.errToObj(null==t?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ei.errToObj(t)})}regex(t,e){return this._addCheck({kind:"regex",regex:t,...ei.errToObj(e)})}includes(t,e){return this._addCheck({kind:"includes",value:t,position:null==e?void 0:e.position,...ei.errToObj(null==e?void 0:e.message)})}startsWith(t,e){return this._addCheck({kind:"startsWith",value:t,...ei.errToObj(e)})}endsWith(t,e){return this._addCheck({kind:"endsWith",value:t,...ei.errToObj(e)})}min(t,e){return this._addCheck({kind:"min",value:t,...ei.errToObj(e)})}max(t,e){return this._addCheck({kind:"max",value:t,...ei.errToObj(e)})}length(t,e){return this._addCheck({kind:"length",value:t,...ei.errToObj(e)})}nonempty(t){return this.min(1,ei.errToObj(t))}trim(){return new z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>"datetime"===t.kind)}get isDate(){return!!this._def.checks.find(t=>"date"===t.kind)}get isTime(){return!!this._def.checks.find(t=>"time"===t.kind)}get isDuration(){return!!this._def.checks.find(t=>"duration"===t.kind)}get isEmail(){return!!this._def.checks.find(t=>"email"===t.kind)}get isURL(){return!!this._def.checks.find(t=>"url"===t.kind)}get isEmoji(){return!!this._def.checks.find(t=>"emoji"===t.kind)}get isUUID(){return!!this._def.checks.find(t=>"uuid"===t.kind)}get isNANOID(){return!!this._def.checks.find(t=>"nanoid"===t.kind)}get isCUID(){return!!this._def.checks.find(t=>"cuid"===t.kind)}get isCUID2(){return!!this._def.checks.find(t=>"cuid2"===t.kind)}get isULID(){return!!this._def.checks.find(t=>"ulid"===t.kind)}get isIP(){return!!this._def.checks.find(t=>"ip"===t.kind)}get isBase64(){return!!this._def.checks.find(t=>"base64"===t.kind)}get minLength(){let t=null;for(let e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxLength(){let t=null;for(let e of this._def.checks)"max"===e.kind&&(null===t||e.value<t)&&(t=e.value);return t}}z.create=t=>{var e;return new z({checks:[],typeName:ea.ZodString,coerce:null!==(e=null==t?void 0:t.coerce)&&void 0!==e&&e,...j(t)})};class B extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){let e;if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==r.number){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.number,received:e.parsedType}),p}let n=new f;for(let i of this._def.checks)"int"===i.kind?ee.isInteger(t.data)||(d(e=this._getOrReturnCtx(t,e),{code:a.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):"min"===i.kind?(i.inclusive?t.data<i.value:t.data<=i.value)&&(d(e=this._getOrReturnCtx(t,e),{code:a.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):"max"===i.kind?(i.inclusive?t.data>i.value:t.data>=i.value)&&(d(e=this._getOrReturnCtx(t,e),{code:a.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):"multipleOf"===i.kind?0!==function(t,e){let n=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,r=n>i?n:i;return parseInt(t.toFixed(r).replace(".",""))%parseInt(e.toFixed(r).replace(".",""))/Math.pow(10,r)}(t.data,i.value)&&(d(e=this._getOrReturnCtx(t,e),{code:a.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(t.data)||(d(e=this._getOrReturnCtx(t,e),{code:a.not_finite,message:i.message}),n.dirty()):ee.assertNever(i);return{status:n.value,value:t.data}}gte(t,e){return this.setLimit("min",t,!0,ei.toString(e))}gt(t,e){return this.setLimit("min",t,!1,ei.toString(e))}lte(t,e){return this.setLimit("max",t,!0,ei.toString(e))}lt(t,e){return this.setLimit("max",t,!1,ei.toString(e))}setLimit(t,e,n,i){return new B({...this._def,checks:[...this._def.checks,{kind:t,value:e,inclusive:n,message:ei.toString(i)}]})}_addCheck(t){return new B({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ei.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ei.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ei.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ei.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ei.toString(t)})}multipleOf(t,e){return this._addCheck({kind:"multipleOf",value:t,message:ei.toString(e)})}finite(t){return this._addCheck({kind:"finite",message:ei.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ei.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ei.toString(t)})}get minValue(){let t=null;for(let e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxValue(){let t=null;for(let e of this._def.checks)"max"===e.kind&&(null===t||e.value<t)&&(t=e.value);return t}get isInt(){return!!this._def.checks.find(t=>"int"===t.kind||"multipleOf"===t.kind&&ee.isInteger(t.value))}get isFinite(){let t=null,e=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===e||n.value>e)&&(e=n.value):"max"===n.kind&&(null===t||n.value<t)&&(t=n.value)}return Number.isFinite(e)&&Number.isFinite(t)}}B.create=t=>new B({checks:[],typeName:ea.ZodNumber,coerce:(null==t?void 0:t.coerce)||!1,...j(t)});class V extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){let e;if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==r.bigint){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.bigint,received:e.parsedType}),p}let n=new f;for(let i of this._def.checks)"min"===i.kind?(i.inclusive?t.data<i.value:t.data<=i.value)&&(d(e=this._getOrReturnCtx(t,e),{code:a.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):"max"===i.kind?(i.inclusive?t.data>i.value:t.data>=i.value)&&(d(e=this._getOrReturnCtx(t,e),{code:a.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):"multipleOf"===i.kind?t.data%i.value!==BigInt(0)&&(d(e=this._getOrReturnCtx(t,e),{code:a.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):ee.assertNever(i);return{status:n.value,value:t.data}}gte(t,e){return this.setLimit("min",t,!0,ei.toString(e))}gt(t,e){return this.setLimit("min",t,!1,ei.toString(e))}lte(t,e){return this.setLimit("max",t,!0,ei.toString(e))}lt(t,e){return this.setLimit("max",t,!1,ei.toString(e))}setLimit(t,e,n,i){return new V({...this._def,checks:[...this._def.checks,{kind:t,value:e,inclusive:n,message:ei.toString(i)}]})}_addCheck(t){return new V({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ei.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ei.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ei.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ei.toString(t)})}multipleOf(t,e){return this._addCheck({kind:"multipleOf",value:t,message:ei.toString(e)})}get minValue(){let t=null;for(let e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxValue(){let t=null;for(let e of this._def.checks)"max"===e.kind&&(null===t||e.value<t)&&(t=e.value);return t}}V.create=t=>{var e;return new V({checks:[],typeName:ea.ZodBigInt,coerce:null!==(e=null==t?void 0:t.coerce)&&void 0!==e&&e,...j(t)})};class U extends M{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==r.boolean){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.boolean,received:e.parsedType}),p}return m(t.data)}}U.create=t=>new U({typeName:ea.ZodBoolean,coerce:(null==t?void 0:t.coerce)||!1,...j(t)});class q extends M{_parse(t){let e;if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==r.date){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.date,received:e.parsedType}),p}if(isNaN(t.data.getTime()))return d(this._getOrReturnCtx(t),{code:a.invalid_date}),p;let n=new f;for(let i of this._def.checks)"min"===i.kind?t.data.getTime()<i.value&&(d(e=this._getOrReturnCtx(t,e),{code:a.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):"max"===i.kind?t.data.getTime()>i.value&&(d(e=this._getOrReturnCtx(t,e),{code:a.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):ee.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new q({...this._def,checks:[...this._def.checks,t]})}min(t,e){return this._addCheck({kind:"min",value:t.getTime(),message:ei.toString(e)})}max(t,e){return this._addCheck({kind:"max",value:t.getTime(),message:ei.toString(e)})}get minDate(){let t=null;for(let e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return null!=t?new Date(t):null}get maxDate(){let t=null;for(let e of this._def.checks)"max"===e.kind&&(null===t||e.value<t)&&(t=e.value);return null!=t?new Date(t):null}}q.create=t=>new q({checks:[],coerce:(null==t?void 0:t.coerce)||!1,typeName:ea.ZodDate,...j(t)});class W extends M{_parse(t){if(this._getType(t)!==r.symbol){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.symbol,received:e.parsedType}),p}return m(t.data)}}W.create=t=>new W({typeName:ea.ZodSymbol,...j(t)});class H extends M{_parse(t){if(this._getType(t)!==r.undefined){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.undefined,received:e.parsedType}),p}return m(t.data)}}H.create=t=>new H({typeName:ea.ZodUndefined,...j(t)});class G extends M{_parse(t){if(this._getType(t)!==r.null){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.null,received:e.parsedType}),p}return m(t.data)}}G.create=t=>new G({typeName:ea.ZodNull,...j(t)});class Y extends M{constructor(){super(...arguments),this._any=!0}_parse(t){return m(t.data)}}Y.create=t=>new Y({typeName:ea.ZodAny,...j(t)});class K extends M{constructor(){super(...arguments),this._unknown=!0}_parse(t){return m(t.data)}}K.create=t=>new K({typeName:ea.ZodUnknown,...j(t)});class Q extends M{_parse(t){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.never,received:e.parsedType}),p}}Q.create=t=>new Q({typeName:ea.ZodNever,...j(t)});class X extends M{_parse(t){if(this._getType(t)!==r.undefined){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.void,received:e.parsedType}),p}return m(t.data)}}X.create=t=>new X({typeName:ea.ZodVoid,...j(t)});class J extends M{_parse(t){let{ctx:e,status:n}=this._processInputParams(t),i=this._def;if(e.parsedType!==r.array)return d(e,{code:a.invalid_type,expected:r.array,received:e.parsedType}),p;if(null!==i.exactLength){let t=e.data.length>i.exactLength.value,r=e.data.length<i.exactLength.value;(t||r)&&(d(e,{code:t?a.too_big:a.too_small,minimum:r?i.exactLength.value:void 0,maximum:t?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&e.data.length<i.minLength.value&&(d(e,{code:a.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&e.data.length>i.maxLength.value&&(d(e,{code:a.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),e.common.async)return Promise.all([...e.data].map((t,n)=>i.type._parseAsync(new k(e,t,e.path,n)))).then(t=>f.mergeArray(n,t));let s=[...e.data].map((t,n)=>i.type._parseSync(new k(e,t,e.path,n)));return f.mergeArray(n,s)}get element(){return this._def.type}min(t,e){return new J({...this._def,minLength:{value:t,message:ei.toString(e)}})}max(t,e){return new J({...this._def,maxLength:{value:t,message:ei.toString(e)}})}length(t,e){return new J({...this._def,exactLength:{value:t,message:ei.toString(e)}})}nonempty(t){return this.min(1,t)}}J.create=(t,e)=>new J({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ea.ZodArray,...j(e)});class tt extends M{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let t=this._def.shape(),e=ee.objectKeys(t);return this._cached={shape:t,keys:e}}_parse(t){if(this._getType(t)!==r.object){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.object,received:e.parsedType}),p}let{status:e,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof Q&&"strip"===this._def.unknownKeys))for(let t in n.data)s.includes(t)||o.push(t);let l=[];for(let t of s){let e=i[t],r=n.data[t];l.push({key:{status:"valid",value:t},value:e._parse(new k(n,r,n.path,t)),alwaysSet:t in n.data})}if(this._def.catchall instanceof Q){let t=this._def.unknownKeys;if("passthrough"===t)for(let t of o)l.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===t)o.length>0&&(d(n,{code:a.unrecognized_keys,keys:o}),e.dirty());else if("strip"===t);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let t=this._def.catchall;for(let e of o){let i=n.data[e];l.push({key:{status:"valid",value:e},value:t._parse(new k(n,i,n.path,e)),alwaysSet:e in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let t=[];for(let e of l){let n=await e.key,i=await e.value;t.push({key:n,value:i,alwaysSet:e.alwaysSet})}return t}).then(t=>f.mergeObjectSync(e,t)):f.mergeObjectSync(e,l)}get shape(){return this._def.shape()}strict(t){return ei.errToObj,new tt({...this._def,unknownKeys:"strict",...void 0!==t?{errorMap:(e,n)=>{var i,r,s,a;let o=null!==(s=null===(r=(i=this._def).errorMap)||void 0===r?void 0:r.call(i,e,n).message)&&void 0!==s?s:n.defaultError;return"unrecognized_keys"===e.code?{message:null!==(a=ei.errToObj(t).message)&&void 0!==a?a:o}:{message:o}}}:{}})}strip(){return new tt({...this._def,unknownKeys:"strip"})}passthrough(){return new tt({...this._def,unknownKeys:"passthrough"})}extend(t){return new tt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new tt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ea.ZodObject})}setKey(t,e){return this.augment({[t]:e})}catchall(t){return new tt({...this._def,catchall:t})}pick(t){let e={};return ee.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(e[n]=this.shape[n])}),new tt({...this._def,shape:()=>e})}omit(t){let e={};return ee.objectKeys(this.shape).forEach(n=>{t[n]||(e[n]=this.shape[n])}),new tt({...this._def,shape:()=>e})}deepPartial(){return function t(e){if(e instanceof tt){let n={};for(let i in e.shape){let r=e.shape[i];n[i]=tg.create(t(r))}return new tt({...e._def,shape:()=>n})}return e instanceof J?new J({...e._def,type:t(e.element)}):e instanceof tg?tg.create(t(e.unwrap())):e instanceof ty?ty.create(t(e.unwrap())):e instanceof ts?ts.create(e.items.map(e=>t(e))):e}(this)}partial(t){let e={};return ee.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];t&&!t[n]?e[n]=i:e[n]=i.optional()}),new tt({...this._def,shape:()=>e})}required(t){let e={};return ee.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])e[n]=this.shape[n];else{let t=this.shape[n];for(;t instanceof tg;)t=t._def.innerType;e[n]=t}}),new tt({...this._def,shape:()=>e})}keyof(){return td(ee.objectKeys(this.shape))}}tt.create=(t,e)=>new tt({shape:()=>t,unknownKeys:"strip",catchall:Q.create(),typeName:ea.ZodObject,...j(e)}),tt.strictCreate=(t,e)=>new tt({shape:()=>t,unknownKeys:"strict",catchall:Q.create(),typeName:ea.ZodObject,...j(e)}),tt.lazycreate=(t,e)=>new tt({shape:t,unknownKeys:"strip",catchall:Q.create(),typeName:ea.ZodObject,...j(e)});class te extends M{_parse(t){let{ctx:e}=this._processInputParams(t),n=this._def.options;if(e.common.async)return Promise.all(n.map(async t=>{let n={...e,common:{...e.common,issues:[]},parent:null};return{result:await t._parseAsync({data:e.data,path:e.path,parent:n}),ctx:n}})).then(function(t){for(let e of t)if("valid"===e.result.status)return e.result;for(let n of t)if("dirty"===n.result.status)return e.common.issues.push(...n.ctx.common.issues),n.result;let n=t.map(t=>new o(t.ctx.common.issues));return d(e,{code:a.invalid_union,unionErrors:n}),p});{let t;let i=[];for(let r of n){let n={...e,common:{...e.common,issues:[]},parent:null},s=r._parseSync({data:e.data,path:e.path,parent:n});if("valid"===s.status)return s;"dirty"!==s.status||t||(t={result:s,ctx:n}),n.common.issues.length&&i.push(n.common.issues)}if(t)return e.common.issues.push(...t.ctx.common.issues),t.result;let r=i.map(t=>new o(t));return d(e,{code:a.invalid_union,unionErrors:r}),p}}get options(){return this._def.options}}te.create=(t,e)=>new te({options:t,typeName:ea.ZodUnion,...j(e)});let tn=t=>{if(t instanceof tu)return tn(t.schema);if(t instanceof tm)return tn(t.innerType());if(t instanceof th)return[t.value];if(t instanceof tf)return t.options;if(t instanceof tp)return ee.objectValues(t.enum);if(t instanceof tb)return tn(t._def.innerType);if(t instanceof H)return[void 0];else if(t instanceof G)return[null];else if(t instanceof tg)return[void 0,...tn(t.unwrap())];else if(t instanceof ty)return[null,...tn(t.unwrap())];else if(t instanceof tk)return tn(t.unwrap());else if(t instanceof tj)return tn(t.unwrap());else if(t instanceof t_)return tn(t._def.innerType);else return[]};class ti extends M{_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==r.object)return d(e,{code:a.invalid_type,expected:r.object,received:e.parsedType}),p;let n=this.discriminator,i=e.data[n],s=this.optionsMap.get(i);return s?e.common.async?s._parseAsync({data:e.data,path:e.path,parent:e}):s._parseSync({data:e.data,path:e.path,parent:e}):(d(e,{code:a.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,e,n){let i=new Map;for(let n of e){let e=tn(n.shape[t]);if(!e.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of e){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,n)}}return new ti({typeName:ea.ZodDiscriminatedUnion,discriminator:t,options:e,optionsMap:i,...j(n)})}}class tr extends M{_parse(t){let{status:e,ctx:n}=this._processInputParams(t),i=(t,i)=>{if(g(t)||g(i))return p;let o=function t(e,n){let i=s(e),a=s(n);if(e===n)return{valid:!0,data:e};if(i===r.object&&a===r.object){let i=ee.objectKeys(n),r=ee.objectKeys(e).filter(t=>-1!==i.indexOf(t)),s={...e,...n};for(let i of r){let r=t(e[i],n[i]);if(!r.valid)return{valid:!1};s[i]=r.data}return{valid:!0,data:s}}if(i===r.array&&a===r.array){if(e.length!==n.length)return{valid:!1};let i=[];for(let r=0;r<e.length;r++){let s=t(e[r],n[r]);if(!s.valid)return{valid:!1};i.push(s.data)}return{valid:!0,data:i}}return i===r.date&&a===r.date&&+e==+n?{valid:!0,data:e}:{valid:!1}}(t.value,i.value);return o.valid?((y(t)||y(i))&&e.dirty(),{status:e.value,value:o.data}):(d(n,{code:a.invalid_intersection_types}),p)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([t,e])=>i(t,e)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}tr.create=(t,e,n)=>new tr({left:t,right:e,typeName:ea.ZodIntersection,...j(n)});class ts extends M{_parse(t){let{status:e,ctx:n}=this._processInputParams(t);if(n.parsedType!==r.array)return d(n,{code:a.invalid_type,expected:r.array,received:n.parsedType}),p;if(n.data.length<this._def.items.length)return d(n,{code:a.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&n.data.length>this._def.items.length&&(d(n,{code:a.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),e.dirty());let i=[...n.data].map((t,e)=>{let i=this._def.items[e]||this._def.rest;return i?i._parse(new k(n,t,n.path,e)):null}).filter(t=>!!t);return n.common.async?Promise.all(i).then(t=>f.mergeArray(e,t)):f.mergeArray(e,i)}get items(){return this._def.items}rest(t){return new ts({...this._def,rest:t})}}ts.create=(t,e)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ts({items:t,typeName:ea.ZodTuple,rest:null,...j(e)})};class ta extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:e,ctx:n}=this._processInputParams(t);if(n.parsedType!==r.object)return d(n,{code:a.invalid_type,expected:r.object,received:n.parsedType}),p;let i=[],s=this._def.keyType,o=this._def.valueType;for(let t in n.data)i.push({key:s._parse(new k(n,t,n.path,t)),value:o._parse(new k(n,n.data[t],n.path,t)),alwaysSet:t in n.data});return n.common.async?f.mergeObjectAsync(e,i):f.mergeObjectSync(e,i)}get element(){return this._def.valueType}static create(t,e,n){return new ta(e instanceof M?{keyType:t,valueType:e,typeName:ea.ZodRecord,...j(n)}:{keyType:z.create(),valueType:t,typeName:ea.ZodRecord,...j(e)})}}class to extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:e,ctx:n}=this._processInputParams(t);if(n.parsedType!==r.map)return d(n,{code:a.invalid_type,expected:r.map,received:n.parsedType}),p;let i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([t,e],r)=>({key:i._parse(new k(n,t,n.path,[r,"key"])),value:s._parse(new k(n,e,n.path,[r,"value"]))}));if(n.common.async){let t=new Map;return Promise.resolve().then(async()=>{for(let n of o){let i=await n.key,r=await n.value;if("aborted"===i.status||"aborted"===r.status)return p;("dirty"===i.status||"dirty"===r.status)&&e.dirty(),t.set(i.value,r.value)}return{status:e.value,value:t}})}{let t=new Map;for(let n of o){let i=n.key,r=n.value;if("aborted"===i.status||"aborted"===r.status)return p;("dirty"===i.status||"dirty"===r.status)&&e.dirty(),t.set(i.value,r.value)}return{status:e.value,value:t}}}}to.create=(t,e,n)=>new to({valueType:e,keyType:t,typeName:ea.ZodMap,...j(n)});class tl extends M{_parse(t){let{status:e,ctx:n}=this._processInputParams(t);if(n.parsedType!==r.set)return d(n,{code:a.invalid_type,expected:r.set,received:n.parsedType}),p;let i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&(d(n,{code:a.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),e.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&(d(n,{code:a.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),e.dirty());let s=this._def.valueType;function o(t){let n=new Set;for(let i of t){if("aborted"===i.status)return p;"dirty"===i.status&&e.dirty(),n.add(i.value)}return{status:e.value,value:n}}let l=[...n.data.values()].map((t,e)=>s._parse(new k(n,t,n.path,e)));return n.common.async?Promise.all(l).then(t=>o(t)):o(l)}min(t,e){return new tl({...this._def,minSize:{value:t,message:ei.toString(e)}})}max(t,e){return new tl({...this._def,maxSize:{value:t,message:ei.toString(e)}})}size(t,e){return this.min(t,e).max(t,e)}nonempty(t){return this.min(1,t)}}tl.create=(t,e)=>new tl({valueType:t,minSize:null,maxSize:null,typeName:ea.ZodSet,...j(e)});class tc extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==r.function)return d(e,{code:a.invalid_type,expected:r.function,received:e.parsedType}),p;function n(t,n){return h({data:t,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,u(),l].filter(t=>!!t),issueData:{code:a.invalid_arguments,argumentsError:n}})}function i(t,n){return h({data:t,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,u(),l].filter(t=>!!t),issueData:{code:a.invalid_return_type,returnTypeError:n}})}let s={errorMap:e.common.contextualErrorMap},c=e.data;if(this._def.returns instanceof tv){let t=this;return m(async function(...e){let r=new o([]),a=await t._def.args.parseAsync(e,s).catch(t=>{throw r.addIssue(n(e,t)),r}),l=await Reflect.apply(c,this,a);return await t._def.returns._def.type.parseAsync(l,s).catch(t=>{throw r.addIssue(i(l,t)),r})})}{let t=this;return m(function(...e){let r=t._def.args.safeParse(e,s);if(!r.success)throw new o([n(e,r.error)]);let a=Reflect.apply(c,this,r.data),l=t._def.returns.safeParse(a,s);if(!l.success)throw new o([i(a,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new tc({...this._def,args:ts.create(t).rest(K.create())})}returns(t){return new tc({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,e,n){return new tc({args:t||ts.create([]).rest(K.create()),returns:e||K.create(),typeName:ea.ZodFunction,...j(n)})}}class tu extends M{get schema(){return this._def.getter()}_parse(t){let{ctx:e}=this._processInputParams(t);return this._def.getter()._parse({data:e.data,path:e.path,parent:e})}}tu.create=(t,e)=>new tu({getter:t,typeName:ea.ZodLazy,...j(e)});class th extends M{_parse(t){if(t.data!==this._def.value){let e=this._getOrReturnCtx(t);return d(e,{received:e.data,code:a.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:t.data}}get value(){return this._def.value}}function td(t,e){return new tf({values:t,typeName:ea.ZodEnum,...j(e)})}th.create=(t,e)=>new th({value:t,typeName:ea.ZodLiteral,...j(e)});class tf extends M{constructor(){super(...arguments),er.set(this,void 0)}_parse(t){if("string"!=typeof t.data){let e=this._getOrReturnCtx(t),n=this._def.values;return d(e,{expected:ee.joinValues(n),received:e.parsedType,code:a.invalid_type}),p}if(w(this,er,"f")||x(this,er,new Set(this._def.values),"f"),!w(this,er,"f").has(t.data)){let e=this._getOrReturnCtx(t),n=this._def.values;return d(e,{received:e.data,code:a.invalid_enum_value,options:n}),p}return m(t.data)}get options(){return this._def.values}get enum(){let t={};for(let e of this._def.values)t[e]=e;return t}get Values(){let t={};for(let e of this._def.values)t[e]=e;return t}get Enum(){let t={};for(let e of this._def.values)t[e]=e;return t}extract(t,e=this._def){return tf.create(t,{...this._def,...e})}exclude(t,e=this._def){return tf.create(this.options.filter(e=>!t.includes(e)),{...this._def,...e})}}er=new WeakMap,tf.create=td;class tp extends M{constructor(){super(...arguments),es.set(this,void 0)}_parse(t){let e=ee.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==r.string&&n.parsedType!==r.number){let t=ee.objectValues(e);return d(n,{expected:ee.joinValues(t),received:n.parsedType,code:a.invalid_type}),p}if(w(this,es,"f")||x(this,es,new Set(ee.getValidEnumValues(this._def.values)),"f"),!w(this,es,"f").has(t.data)){let t=ee.objectValues(e);return d(n,{received:n.data,code:a.invalid_enum_value,options:t}),p}return m(t.data)}get enum(){return this._def.values}}es=new WeakMap,tp.create=(t,e)=>new tp({values:t,typeName:ea.ZodNativeEnum,...j(e)});class tv extends M{unwrap(){return this._def.type}_parse(t){let{ctx:e}=this._processInputParams(t);return e.parsedType!==r.promise&&!1===e.common.async?(d(e,{code:a.invalid_type,expected:r.promise,received:e.parsedType}),p):m((e.parsedType===r.promise?e.data:Promise.resolve(e.data)).then(t=>this._def.type.parseAsync(t,{path:e.path,errorMap:e.common.contextualErrorMap})))}}tv.create=(t,e)=>new tv({type:t,typeName:ea.ZodPromise,...j(e)});class tm extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ea.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:e,ctx:n}=this._processInputParams(t),i=this._def.effect||null,r={addIssue:t=>{d(n,t),t.fatal?e.abort():e.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===i.type){let t=i.transform(n.data,r);if(n.common.async)return Promise.resolve(t).then(async t=>{if("aborted"===e.value)return p;let i=await this._def.schema._parseAsync({data:t,path:n.path,parent:n});return"aborted"===i.status?p:"dirty"===i.status||"dirty"===e.value?v(i.value):i});{if("aborted"===e.value)return p;let i=this._def.schema._parseSync({data:t,path:n.path,parent:n});return"aborted"===i.status?p:"dirty"===i.status||"dirty"===e.value?v(i.value):i}}if("refinement"===i.type){let t=t=>{let e=i.refinement(t,r);if(n.common.async)return Promise.resolve(e);if(e instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return t};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?p:("dirty"===n.status&&e.dirty(),t(n.value).then(()=>({status:e.value,value:n.value}))));{let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===i.status?p:("dirty"===i.status&&e.dirty(),t(i.value),{status:e.value,value:i.value})}}if("transform"===i.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(t=>b(t)?Promise.resolve(i.transform(t.value,r)).then(t=>({status:e.value,value:t})):t);{let t=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!b(t))return t;let s=i.transform(t.value,r);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:e.value,value:s}}}ee.assertNever(i)}}tm.create=(t,e,n)=>new tm({schema:t,typeName:ea.ZodEffects,effect:e,...j(n)}),tm.createWithPreprocess=(t,e,n)=>new tm({schema:e,effect:{type:"preprocess",transform:t},typeName:ea.ZodEffects,...j(n)});class tg extends M{_parse(t){return this._getType(t)===r.undefined?m(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}tg.create=(t,e)=>new tg({innerType:t,typeName:ea.ZodOptional,...j(e)});class ty extends M{_parse(t){return this._getType(t)===r.null?m(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ty.create=(t,e)=>new ty({innerType:t,typeName:ea.ZodNullable,...j(e)});class tb extends M{_parse(t){let{ctx:e}=this._processInputParams(t),n=e.data;return e.parsedType===r.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:e.path,parent:e})}removeDefault(){return this._def.innerType}}tb.create=(t,e)=>new tb({innerType:t,typeName:ea.ZodDefault,defaultValue:"function"==typeof e.default?e.default:()=>e.default,...j(e)});class t_ extends M{_parse(t){let{ctx:e}=this._processInputParams(t),n={...e,common:{...e.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return _(i)?i.then(t=>({status:"valid",value:"valid"===t.status?t.value:this._def.catchValue({get error(){return new o(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new o(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}t_.create=(t,e)=>new t_({innerType:t,typeName:ea.ZodCatch,catchValue:"function"==typeof e.catch?e.catch:()=>e.catch,...j(e)});class tw extends M{_parse(t){if(this._getType(t)!==r.nan){let e=this._getOrReturnCtx(t);return d(e,{code:a.invalid_type,expected:r.nan,received:e.parsedType}),p}return{status:"valid",value:t.data}}}tw.create=t=>new tw({typeName:ea.ZodNaN,...j(t)});let tx=Symbol("zod_brand");class tk extends M{_parse(t){let{ctx:e}=this._processInputParams(t),n=e.data;return this._def.type._parse({data:n,path:e.path,parent:e})}unwrap(){return this._def.type}}class tC extends M{_parse(t){let{status:e,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let t=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===t.status?p:"dirty"===t.status?(e.dirty(),v(t.value)):this._def.out._parseAsync({data:t.value,path:n.path,parent:n})})();{let t=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===t.status?p:"dirty"===t.status?(e.dirty(),{status:"dirty",value:t.value}):this._def.out._parseSync({data:t.value,path:n.path,parent:n})}}static create(t,e){return new tC({in:t,out:e,typeName:ea.ZodPipeline})}}class tj extends M{_parse(t){let e=this._def.innerType._parse(t),n=t=>(b(t)&&(t.value=Object.freeze(t.value)),t);return _(e)?e.then(t=>n(t)):n(e)}unwrap(){return this._def.innerType}}function tM(t,e={},n){return t?Y.create().superRefine((i,r)=>{var s,a;if(!t(i)){let t="function"==typeof e?e(i):"string"==typeof e?{message:e}:e,o=null===(a=null!==(s=t.fatal)&&void 0!==s?s:n)||void 0===a||a;r.addIssue({code:"custom",..."string"==typeof t?{message:t}:t,fatal:o})}}):Y.create()}tj.create=(t,e)=>new tj({innerType:t,typeName:ea.ZodReadonly,...j(e)});let tE={object:tt.lazycreate};(et=ea||(ea={})).ZodString="ZodString",et.ZodNumber="ZodNumber",et.ZodNaN="ZodNaN",et.ZodBigInt="ZodBigInt",et.ZodBoolean="ZodBoolean",et.ZodDate="ZodDate",et.ZodSymbol="ZodSymbol",et.ZodUndefined="ZodUndefined",et.ZodNull="ZodNull",et.ZodAny="ZodAny",et.ZodUnknown="ZodUnknown",et.ZodNever="ZodNever",et.ZodVoid="ZodVoid",et.ZodArray="ZodArray",et.ZodObject="ZodObject",et.ZodUnion="ZodUnion",et.ZodDiscriminatedUnion="ZodDiscriminatedUnion",et.ZodIntersection="ZodIntersection",et.ZodTuple="ZodTuple",et.ZodRecord="ZodRecord",et.ZodMap="ZodMap",et.ZodSet="ZodSet",et.ZodFunction="ZodFunction",et.ZodLazy="ZodLazy",et.ZodLiteral="ZodLiteral",et.ZodEnum="ZodEnum",et.ZodEffects="ZodEffects",et.ZodNativeEnum="ZodNativeEnum",et.ZodOptional="ZodOptional",et.ZodNullable="ZodNullable",et.ZodDefault="ZodDefault",et.ZodCatch="ZodCatch",et.ZodPromise="ZodPromise",et.ZodBranded="ZodBranded",et.ZodPipeline="ZodPipeline",et.ZodReadonly="ZodReadonly";let tS=z.create,tN=B.create,tT=tw.create,tO=V.create,tL=U.create,tA=q.create,tR=W.create,tI=H.create,tD=G.create,tP=Y.create,tZ=K.create,tF=Q.create,t$=X.create,tz=J.create,tB=tt.create,tV=tt.strictCreate,tU=te.create,tq=ti.create,tW=tr.create,tH=ts.create,tG=ta.create,tY=to.create,tK=tl.create,tQ=tc.create,tX=tu.create,tJ=th.create,t0=tf.create,t1=tp.create,t2=tv.create,t3=tm.create,t4=tg.create,t5=ty.create,t7=tm.createWithPreprocess,t6=tC.create;var t8,t9,et,ee,en,ei,er,es,ea,eo=Object.freeze({__proto__:null,defaultErrorMap:l,setErrorMap:function(t){c=t},getErrorMap:u,makeIssue:h,EMPTY_PATH:[],addIssueToContext:d,ParseStatus:f,INVALID:p,DIRTY:v,OK:m,isAborted:g,isDirty:y,isValid:b,isAsync:_,get util(){return ee},get objectUtil(){return en},ZodParsedType:r,getParsedType:s,ZodType:M,datetimeRegex:$,ZodString:z,ZodNumber:B,ZodBigInt:V,ZodBoolean:U,ZodDate:q,ZodSymbol:W,ZodUndefined:H,ZodNull:G,ZodAny:Y,ZodUnknown:K,ZodNever:Q,ZodVoid:X,ZodArray:J,ZodObject:tt,ZodUnion:te,ZodDiscriminatedUnion:ti,ZodIntersection:tr,ZodTuple:ts,ZodRecord:ta,ZodMap:to,ZodSet:tl,ZodFunction:tc,ZodLazy:tu,ZodLiteral:th,ZodEnum:tf,ZodNativeEnum:tp,ZodPromise:tv,ZodEffects:tm,ZodTransformer:tm,ZodOptional:tg,ZodNullable:ty,ZodDefault:tb,ZodCatch:t_,ZodNaN:tw,BRAND:tx,ZodBranded:tk,ZodPipeline:tC,ZodReadonly:tj,custom:tM,Schema:M,ZodSchema:M,late:tE,get ZodFirstPartyTypeKind(){return ea},coerce:{string:t=>z.create({...t,coerce:!0}),number:t=>B.create({...t,coerce:!0}),boolean:t=>U.create({...t,coerce:!0}),bigint:t=>V.create({...t,coerce:!0}),date:t=>q.create({...t,coerce:!0})},any:tP,array:tz,bigint:tO,boolean:tL,date:tA,discriminatedUnion:tq,effect:t3,enum:t0,function:tQ,instanceof:(t,e={message:`Input not instance of ${t.name}`})=>tM(e=>e instanceof t,e),intersection:tW,lazy:tX,literal:tJ,map:tY,nan:tT,nativeEnum:t1,never:tF,null:tD,nullable:t5,number:tN,object:tB,oboolean:()=>tL().optional(),onumber:()=>tN().optional(),optional:t4,ostring:()=>tS().optional(),pipeline:t6,preprocess:t7,promise:t2,record:tG,set:tK,strictObject:tV,string:tS,symbol:tR,transformer:t3,tuple:tH,undefined:tI,union:tU,unknown:tZ,void:t$,NEVER:p,ZodIssueCode:a,quotelessJson:t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:o})}}]);