(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[40],{4212:function(e,t,n){var a=n(7741).Symbol;e.exports=a},3690:function(e){e.exports=function(e,t){for(var n=-1,a=null==e?0:e.length,r=Array(a);++n<a;)r[n]=t(e[n],n,e);return r}},2670:function(e){e.exports=function(e,t,n,a){var r=-1,l=null==e?0:e.length;for(a&&l&&(n=e[++r]);++r<l;)n=t(n,e[r],r,e);return n}},7037:function(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},7976:function(e,t,n){var a=n(4212),r=n(9829),l=n(8611),i=a?a.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?r(e):l(e)}},8357:function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},2218:function(e,t,n){var a=n(4212),r=n(3690),l=n(5059),i=n(2704),s=1/0,o=a?a.prototype:void 0,c=o?o.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(l(t))return r(t,e)+"";if(i(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-s?"-0":n}},4259:function(e,t,n){var a=n(2670),r=n(7148),l=n(2896),i=RegExp("['’]","g");e.exports=function(e){return function(t){return a(l(r(t).replace(i,"")),e,"")}}},7744:function(e,t,n){var a=n(8357)({À:"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"});e.exports=a},8584:function(e,t,n){var a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=a},9829:function(e,t,n){var a=n(4212),r=Object.prototype,l=r.hasOwnProperty,i=r.toString,s=a?a.toStringTag:void 0;e.exports=function(e){var t=l.call(e,s),n=e[s];try{e[s]=void 0;var a=!0}catch(e){}var r=i.call(e);return a&&(t?e[s]=n:delete e[s]),r}},409:function(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},8611:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},7741:function(e,t,n){var a=n(8584),r="object"==typeof self&&self&&self.Object===Object&&self,l=a||r||Function("return this")();e.exports=l},183:function(e){var t="\ud800-\udfff",n="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",r="A-Z\\xc0-\\xd6\\xd8-\\xde",l="\\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",i="['’]",s="["+l+"]",o="["+a+"]",c="[^"+t+l+"\\d+"+n+a+r+"]",d="(?:\ud83c[\udde6-\uddff]){2}",u="[\ud800-\udbff][\udc00-\udfff]",h="["+r+"]",p="(?:"+o+"|"+c+")",f="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",m="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",v="[\\ufe0e\\ufe0f]?",x="(?:\\u200d(?:"+["[^"+t+"]",d,u].join("|")+")"+v+g+")*",b="(?:"+["["+n+"]",d,u].join("|")+")"+(v+g+x),w=RegExp([h+"?"+o+"+"+f+"(?="+[s,h,"$"].join("|")+")","(?:"+h+"|"+c+")+"+m+"(?="+[s,h+p,"$"].join("|")+")",h+"?"+p+"+"+f,h+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",b].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},7148:function(e,t,n){var a=n(7744),r=n(5635),l=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=r(e))&&e.replace(l,a).replace(i,"")}},5059:function(e){var t=Array.isArray;e.exports=t},9340:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},2704:function(e,t,n){var a=n(7976),r=n(9340);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==a(e)}},8278:function(e,t,n){var a=n(4259)(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});e.exports=a},5635:function(e,t,n){var a=n(2218);e.exports=function(e){return null==e?"":a(e)}},2896:function(e,t,n){var a=n(7037),r=n(409),l=n(5635),i=n(183);e.exports=function(e,t,n){return(e=l(e),void 0===(t=n?void 0:t))?r(e)?i(e):a(e):e.match(t)||[]}},703:function(e,t,n){"use strict";n.d(t,{default:function(){return r.a}});var a=n(7447),r=n.n(a)},7907:function(e,t,n){"use strict";var a=n(5313);n.o(a,"useParams")&&n.d(t,{useParams:function(){return a.useParams}}),n.o(a,"usePathname")&&n.d(t,{usePathname:function(){return a.usePathname}})},7447:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getImageProps:function(){return s},default:function(){return o}});let a=n(6921),r=n(8630),l=n(1749),i=a._(n(536)),s=e=>{let{props:t}=(0,r.getImgProps)(e,{defaultLoader:i.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/invest/advisory/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}},o=l.Image},3657:function(){},8292:function(){},2327:function(){},7518:function(){},718:function(){},5763:function(){},6199:function(){},3042:function(){},8305:function(){},1203:function(){},3188:function(){},9904:function(){},7161:function(){},3417:function(){},8650:function(){},9999:function(){},3737:function(){},8342:function(){},8414:function(){},4201:function(){},7378:function(){},1459:function(){},9003:function(){},7807:function(){},5710:function(){},9216:function(){},9365:function(){},1267:function(){},9459:function(){},6609:function(){},9193:function(){},3223:function(){},1290:function(){},1279:function(){},4408:function(){},717:function(){},6266:function(){},4432:function(){},917:function(){},7503:function(){},5574:function(){},2776:function(e,t,n){"use strict";let a;n.d(t,{U:function(){return r7}});var r,l,i,s,o=n(7437),c=n(2265),d=n(5915),u=n(3077),h=n(3350),p=n(7325),f=n(2687),m=n(9707),g=n(9690),v=n(2578),x=n(7031);let b=(0,x.g)("tooltip"),w=Object.freeze({tooltip:b,text:"".concat(b,"__text"),wrapper:"".concat(b,"__wrapper"),inverted:"".concat(b,"--inverted")}),y="M8 10C6 12.58 3.43 16 0 16L16 16C12.58 16 10 12.58 8 10Z";n(5574);let k=(0,c.forwardRef)((e,t)=>{let{position:n="top",text:a,zIndex:r=1,inverted:l,withoutTail:i,children:s,boundingOffset:d=12,style:u,className:h,dataQa:x,dataId:b,...k}=e,[_,C]=(0,c.useState)(!1),j=(0,c.useRef)(null),{refs:N,floatingStyles:E,context:L}=(0,p.YF)({open:_,onOpenChange:C,placement:n,whileElementsMounted:f.Me,middleware:[(0,m.cv)({mainAxis:d}),(0,m.RR)({fallbackAxisSideDirection:"start",crossAxis:!1}),(0,m.uY)(),(0,m.x7)({element:j,padding:8})]}),R=(0,p.XI)(L,{delay:300}),{getReferenceProps:A,getFloatingProps:$}=(0,p.NI)([R]),Z=(0,p.Y_)(L,{duration:300});return(0,c.useImperativeHandle)(t,()=>({getActivatorElement:N.reference,getTooltipElement:N.floating})),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{"data-qa":(0,v.g)("".concat(x,"-activator"),!!x),ref:N.setReference,...A,className:w.wrapper,children:s}),Z.isMounted&&(0,o.jsxs)("div",{role:"tooltip",ref:N.setFloating,style:{...E,...Z.styles,...u,zIndex:r},className:(0,g.Z)(w.tooltip,h,{[w.inverted]:l}),...$,...k,"data-qa":x,"data-id":b,children:[(0,o.jsx)("span",{className:(0,g.Z)(w.text,{[w.inverted]:l}),children:a}),!i&&(0,o.jsx)(p.Y$,{ref:j,context:L,width:16,d:y,fill:l?"var(--color-white)":"var(--color-black-500)"})]})]})});k.displayName="Tooltip";var _=function(){for(var e,t,n=0,a="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,a,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t){if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(a=e(t[n]))&&(r&&(r+=" "),r+=a);else for(n in t)t[n]&&(r&&(r+=" "),r+=n)}return r}(e))&&(a&&(a+=" "),a+=t);return a};let C=/#/g,j=/&/g,N=/\//g,E=/=/g,L=/\+/g,R=/%5e/gi,A=/%60/gi,$=/%7c/gi,Z=/%20/gi;function S(e){return encodeURI(""+("string"==typeof e?e:JSON.stringify(e))).replace($,"|").replace(L,"%2B").replace(Z,"+").replace(C,"%23").replace(j,"%26").replace(A,"`").replace(R,"^").replace(N,"%2F")}function z(e){return S(e).replace(E,"%3D")}function T(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}let I=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,O=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,D=/^([/\\]\s*){2,}[^/\\]/,M=/^\.?\//;function F(e,...t){let n=e||"";for(let e of t.filter(e=>e&&"/"!==e))if(n){let t=e.replace(M,"");n=function(e="",t){return e.endsWith("/")?e:e+"/"}(n)+t}else n=e;return n}let B=Symbol.for("ufo:protocolRelative");function P(e=""){let[t="",n="",a=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:a}}var q=n(3026),H=n(5658);let V=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})}),W=Object.freeze(Object.keys(V));function Y(){return"undefined"==typeof window}Object.freeze(W.filter(e=>"xs"!==e)),Object.freeze(W.filter(e=>"3xl"!==e));let U=Y()?c.useLayoutEffect:c.useEffect;function Q(e,t=!1){return Y()?t:window.matchMedia(e).matches}var K=n(2023),G=n(271),X=n(5515),J=n(1974);n(3657);let ee=(0,x.g)("accordion"),et=(0,x.g)("accordion-item"),en=Object.freeze({accordionItem:et,accordionItemInner:"".concat(et,"__inner"),body:"".concat(et,"__body"),header:"".concat(et,"__header"),content:"".concat(et,"__content"),contentInner:"".concat(et,"__content-inner"),controlIcon:"".concat(et,"__control-icon"),titleWrapper:"".concat(et,"__title-wrapper"),title:"".concat(et,"__title"),icon:"".concat(et,"__icon"),toggleIcon:"".concat(et,"__toggle-icon"),subTitle:"".concat(et,"__subtitle"),caption:"".concat(et,"__caption"),states:{disabled:"".concat(et,"--disabled"),active:"".concat(et,"--active"),focused:"".concat(et,"--focused"),withControl:"".concat(et,"--with-control"),withIcon:"".concat(et,"--with-icon")}}),ea=Object.freeze({accordion:ee,withoutOutline:"".concat(ee,"--without-outline"),variants:{primary:"".concat(ee,"--primary"),secondary:"".concat(ee,"--secondary")}});function er(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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)((e,t)=>{let{multiple:n=!1,children:a,activeIndex:r,defaultActiveIndex:l=[],className:i,variant:s="primary",withoutOutline:d=!1,style:u,dataQa:h,dataId:p,onTabToggle:f,...m}=e,[v,x]=(0,c.useState)(l),b=(0,G.i)(r),w=b?r:v,y=(e,t)=>{if(b){let a=k(w,e,n);null==f||f(a,t)}else x(t=>k(t,e,n))},k=(e,t,n)=>n?e.includes(t)?e.filter(e=>e!==t):[...e,t]:e.includes(t)?[]:[t];return(0,o.jsx)("div",{ref:t,className:(0,g.Z)(i,ea.accordion,ea.variants[s],{[ea.withoutOutline]:d}),style:u,...m,"data-id":p,"data-qa":h,children:c.Children.map(a,e=>(0,c.isValidElement)(e)?(0,c.cloneElement)(e,{isActive:w.includes(e.props.id),onToggle:t=>{y(e.props.id,t)}}):e)})}).displayName="Accordion";let el=e=>{let t=Array.from(document.querySelectorAll("[data-accordion-index]"));if(0===t.length)return;let n=t.findIndex(e=>e===document.activeElement),a=n;switch(e){case"next":a=(n+1)%t.length;break;case"previous":a=(n-1+t.length)%t.length}let r=0;for(;r++<t.length;){let n=t[a];if("true"!==n.getAttribute("data-disabled")){n.focus();return}a=(a+("next"===e?1:-1)+t.length)%t.length}};function ei(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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)((e,t)=>{let{id:n,title:a,subTitle:r,disabled:l=!1,isActive:i=!1,icon:s,controlIcon:d,errorMessage:u,children:h,className:p,style:f,dataQa:m,dataId:v,onControlClick:x,onToggle:b,...w}=e,y=(0,c.useRef)(null),k=(0,c.useRef)(null);(0,c.useEffect)(()=>{let e=y.current;e&&(e.style.maxHeight=i?(null==e?void 0:e.scrollHeight)+"px":"0")},[i]);let _=!d&&!!s;return(0,o.jsxs)("div",{ref:t,className:(0,g.Z)(p,en.accordionItem),style:f,...w,"data-id":v,"data-qa":m,children:[(0,o.jsx)("div",{className:(0,g.Z)(en.accordionItemInner),children:(0,o.jsxs)("div",{className:(0,g.Z)(en.body,[{[en.states.disabled]:l}]),children:[(0,o.jsxs)("button",{type:"button","aria-expanded":i,"aria-disabled":l,"data-disabled":l,"data-accordion-index":n,className:(0,g.Z)(en.header,[{[en.states.active]:i}]),tabIndex:l?-1:0,onClick:l?void 0:b,ref:k,disabled:l,onKeyDown:e=>{if(!l)switch(e.key){case"Enter":case" ":e.preventDefault(),null==b||b(e);break;case"ArrowDown":e.preventDefault(),el("next");break;case"ArrowUp":e.preventDefault(),el("previous")}},children:[(0,o.jsxs)("div",{className:(0,g.Z)(en.titleWrapper),children:[_&&(0,o.jsx)("span",{className:en.icon,children:s}),(0,o.jsx)("span",{className:(0,g.Z)(en.title,{[en.states.withControl]:d}),children:a}),(0,o.jsx)(J.P,{className:(0,g.Z)(en.toggleIcon,[{[en.states.active]:i},{[en.states.withControl]:d}]),children:(0,o.jsx)(er,{})}),d&&(0,o.jsx)(J.P,{className:en.controlIcon,onClick:e=>{var t;d&&e.stopPropagation(),null==(t=k.current)||t.blur(),null==x||x(e)},children:d})]}),r&&(0,o.jsx)("span",{className:(0,g.Z)(en.subTitle,[{[en.states.withIcon]:_}]),children:r})]}),(0,o.jsx)("div",{className:(0,g.Z)(en.content),"aria-hidden":!i,ref:y,children:(0,o.jsx)("div",{className:en.contentInner,children:h})})]})}),u&&(0,o.jsx)(X.C,{withoutIcon:!0,state:"error",text:u})]})}).displayName="AccordionItem",n(5884),n(529);var es=n(1088);function eo(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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(1720),n(356),n(3931),n(4150),n(5710);let ec=(0,x.g)("link"),ed=Object.freeze({link:ec,states:{inverted:"".concat(ec,"--inverted"),disabled:"".concat(ec,"--disabled")},content:"".concat(ec,"__content"),icon:"".concat(ec,"__icon"),size:{s:"".concat(ec,"--s"),m:"".concat(ec,"--m")}});function eu(e){let{as:t,size:n="m",withIcon:a=!1,children:r,disabled:l,text:i,inverted:s,onClick:c,className:d,style:u,dataQa:h,dataId:p,...f}=e,m=(0,g.Z)(ed.link,{[ed.states.inverted]:s,[ed.states.disabled]:l},ed.size[n],d),v=i||r;return(0,o.jsx)(t||"a",{className:m,disabled:l,style:u,onClick:c,"aria-disabled":l,tabIndex:l?-1:0,...f,"data-id":p,"data-qa":h,children:a?(0,o.jsxs)("span",{className:ed.content,children:[v,(0,o.jsx)(J.P,{className:ed.icon,children:(0,o.jsx)(eo,{})})]}):v})}function eh(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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 ep(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"}))}eu.displayName="Link",n(8292);let ef=(0,x.g)("alert"),em=Object.freeze({alert:ef,closeIcon:"".concat(ef,"__close-icon"),icon:"".concat(ef,"__icon"),label:"".concat(ef,"__label"),content:"".concat(ef,"__content"),textBlock:"".concat(ef,"__text-block"),caption:"".concat(ef,"__caption"),link:"".concat(ef,"__link"),button:"".concat(ef,"__button"),state:{default:"".concat(ef,"--default"),success:"".concat(ef,"--success"),warning:"".concat(ef,"--warning"),error:"".concat(ef,"--error"),info:"".concat(ef,"--info")},size:{s:"".concat(ef,"--s"),m:"".concat(ef,"--m")},variant:{primary:"".concat(ef,"--primary"),secondary:"".concat(ef,"--secondary"),green:"".concat(ef,"--green"),verdant:"".concat(ef,"--verdant"),avocado:"".concat(ef,"--avocado"),yellow:"".concat(ef,"--yellow"),orange:"".concat(ef,"--orange"),blue:"".concat(ef,"--blue"),purple:"".concat(ef,"--purple")},fill:"".concat(ef,"--fill")}),eg=(0,c.forwardRef)((e,t)=>{let{label:n,state:a="default",variant:r="primary",size:l="m",outline:i=!0,caption:s,linkText:c,linkHref:d,onLinkClick:u,withLinkIcon:h=!1,icon:p,withIcon:f=!1,withClose:m=!1,buttonText:x,buttonVariant:b="primary",className:w,style:y,onClose:k,onButtonClick:_,dataQa:C,dataId:j,...N}=e,E={default:(0,o.jsx)(ep,{}),success:(0,o.jsx)(X.a,{}),warning:(0,o.jsx)(X.S,{}),error:(0,o.jsx)(eh,{}),info:(0,o.jsx)(ep,{})};return(0,o.jsxs)("div",{ref:t,className:(0,g.Z)(em.alert,em.variant[r],em.size[l],{[em.state[a]]:i},w),style:y,...N,"data-id":j,"data-qa":C,children:[(0,o.jsxs)("div",{className:em.content,children:[f&&(0,o.jsx)(J.P,{className:(0,g.Z)(em.icon,{[em.state[a]]:!p}),children:p||E[a]}),(0,o.jsxs)("div",{className:em.textBlock,children:[n&&(0,o.jsx)("span",{"data-qa":(0,v.g)("".concat(C,"-label"),!!C),className:em.label,children:n}),s&&(0,o.jsx)(X.C,{dataQa:(0,v.g)("".concat(C,"-caption"),!!C),text:s,lineClamp:3,size:l,className:em.caption}),c&&(0,o.jsx)(eu,{dataQa:(0,v.g)("".concat(C,"-link"),!!C),href:d,className:em.link,onClick:u,withIcon:h,children:c})]}),m&&(0,o.jsx)("button",{"data-qa":(0,v.g)("".concat(C,"-close"),!!C),type:"button",className:em.closeIcon,onClick:k,children:(0,o.jsx)(J.P,{children:(0,o.jsx)(ei,{})})})]}),x&&(0,o.jsx)(H.B,{dataQa:(0,v.g)("".concat(C,"-button"),!!C),label:x,variant:b,size:"xs",className:em.button,onClick:_})]})});eg.displayName="Alert";var ev=n(9725),ex=n(6982);n(2327);let eb=(0,x.g)("breadcrumbs"),ew={breadcrumbs:eb,breadcrumbsEllipsis:"".concat(eb,"--ellipsis"),displayOne:"".concat(eb,"--display-one"),list:"".concat(eb,"__list"),mobileList:"".concat(eb,"__list--mobile"),desktopList:"".concat(eb,"__list--desktop"),item:"".concat(eb,"__item"),customItem:"".concat(eb,"__item--custom"),link:"".concat(eb,"__link"),linkLabel:"".concat(eb,"__link-label"),text:"".concat(eb,"__text"),separator:"".concat(eb,"__separator"),backIcon:"".concat(eb,"__back-icon")},ey=e=>{let{item:t,isBackward:n=!1,isLast:a,dataQa:r,onClick:l}=e;return(0,o.jsx)(o.Fragment,{children:t.href||t.customLink?(0,o.jsxs)(o.Fragment,{children:[t.customLink?(0,o.jsx)(o.Fragment,{children:t.customLink}):(0,o.jsxs)("a",{href:t.href,"data-qa":r,className:ew.link,title:t.label,onClick:l?e=>l(e,t.href):void 0,children:[n&&(0,o.jsx)(J.P,{className:ew.backIcon,children:(0,o.jsx)(ev.S,{})}),(0,o.jsx)("span",{className:ew.linkLabel,children:t.label})]}),!n&&!a&&(0,o.jsx)(J.P,{className:ew.separator,children:(0,o.jsx)(ex.S,{})})]}):(0,o.jsx)("span",{"aria-current":"page","data-qa":r,className:ew.text,title:t.label,children:t.label})})};ey.displayName="BreadcrumbsLink";let ek=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;return n||a?{label:n||"Назад",href:"object"!=typeof a?a||"#":void 0,customLink:"object"==typeof a?a:void 0}:t.length&&t.length>1?(null==(e=t[t.length-1])?void 0:e.href)?t[t.length-1]:t[t.length-2]:{label:t[0].label||"Назад",href:t[0].href||"#",customLink:t[0].customLink}},e_=e=>{let{items:t=[],dataQa:n,backwardHref:a,backwardLabel:r,onClick:l}=e,i=ek(t,r,a);return(0,o.jsx)("ul",{className:(0,g.Z)(ew.list,ew.desktopList),"data-qa":(0,v.g)("".concat(n,"-desktop-list"),!!n),children:1===t.length||a||r?(0,o.jsx)("li",{className:(0,g.Z)(ew.item),children:(0,o.jsx)(ey,{isBackward:!0,dataQa:(0,v.g)("".concat(n,"-link"),!!n),item:i,onClick:l})}):(0,o.jsx)(o.Fragment,{children:t.map((e,a)=>(0,o.jsx)("li",{className:(0,g.Z)(ew.item,{[ew.customItem]:e.customLink}),children:(0,o.jsx)(ey,{item:e,dataQa:(0,v.g)("".concat(n,"-link-").concat(++a),!!n),isLast:a===t.length,onClick:l})},"".concat(e.label,"--").concat(a)))})})};e_.displayName="DesktopBreadcrumbs";let eC=e=>{let{items:t=[],backwardLabel:n,backwardHref:a,dataQa:r,onClick:l}=e,i=ek(t,n,a);return(0,o.jsx)("ul",{className:(0,g.Z)(ew.list,ew.mobileList),"data-qa":(0,v.g)("".concat(r,"-mobile-list"),!!r),children:(0,o.jsx)("li",{className:(0,g.Z)(ew.item),children:(0,o.jsx)(ey,{isBackward:!0,dataQa:(0,v.g)("".concat(r,"-link"),!!r),item:i,onClick:l})})})};eC.displayName="MobileBreadcrumbs",(0,c.forwardRef)((e,t)=>{let{items:n=[],isMobile:a,onClick:r,backwardLabel:l,backwardHref:i,style:s,className:c,ellipsis:d=!1,dataQa:u,dataId:h,...p}=e,f=n.length||l||i;return(0,o.jsx)(o.Fragment,{children:f&&(0,o.jsxs)("nav",{ref:t,"aria-label":"breadcrumbs",className:(0,g.Z)(ew.breadcrumbs,{[ew.displayOne]:void 0===a,[ew.breadcrumbsEllipsis]:d},c),style:s,...p,"data-id":h,"data-qa":u,children:[!0!==a&&(0,o.jsx)(e_,{items:n,dataQa:u,backwardLabel:l,backwardHref:i,onClick:r||void 0}),!1!==a&&(0,o.jsx)(eC,{items:n,dataQa:u,backwardLabel:l,backwardHref:i,onClick:r||void 0})]})})}).displayName="Breadcrumbs";var ej=n(1310);n(718);let eN=(0,x.g)("calendar"),eE=Object.freeze({calendar:eN,header:"".concat(eN,"__header"),headerText:"".concat(eN,"__header-text"),headerButton:"".concat(eN,"__header-button"),headerButtonPrev:"".concat(eN,"__header-button--prev"),headerButtonNext:"".concat(eN,"__header-button--next"),headerButtonDisabled:"".concat(eN,"__header-button--disabled"),weekDays:"".concat(eN,"__week-days"),weekDay:"".concat(eN,"__week-day"),weekDayOff:"".concat(eN,"__week-day--off"),content:"".concat(eN,"__content"),days:"".concat(eN,"__days"),day:"".concat(eN,"__day"),currentDay:"".concat(eN,"__day--current"),otherDay:"".concat(eN,"__day--other"),selectedDay:"".concat(eN,"__day--selected"),previewDay:"".concat(eN,"__day--preview"),rangeDay:"".concat(eN,"__day--range"),startRangeDay:"".concat(eN,"__day--start-range"),endRangeDay:"".concat(eN,"__day--end-range"),disabledDay:"".concat(eN,"__day--disabled"),emptyDay:"".concat(eN,"__day--empty"),events:"".concat(eN,"__day-events"),event:"".concat(eN,"__day-event"),months:"".concat(eN,"__months"),month:"".concat(eN,"__month"),disabledMonth:"".concat(eN,"__month--disabled"),currentMonth:"".concat(eN,"__month--current"),selectedMonth:"".concat(eN,"__month--selected"),years:"".concat(eN,"__years"),year:"".concat(eN,"__year"),disabledYear:"".concat(eN,"__year--disabled"),currentYear:"".concat(eN,"__year--current"),selectedYear:"".concat(eN,"__year--selected")}),eL=Object.freeze({days:"days",months:"months",years:"years"}),eR=["пн","вт","ср","чт","пт","сб","вс"],eA=["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"],e$=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),eZ=e=>{let t=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=e.getFullYear();return"".concat(t,".").concat(n,".").concat(a)},eS=e=>{let t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(a)},ez=(e,t)=>{if(0===e.length)return"";if(t){if(1===e.length)return eZ(e[0]);let t=[...e].sort((e,t)=>e.getTime()-t.getTime());return"".concat(eZ(t[0])," - ").concat(eZ(t[1]))}return e.length>0?eZ(e[0]):""},eT=(e,t,n)=>{if(t.length<2)return!1;let a=n(e),r=n(t[0]),l=n(t[1]);return a>=r&&a<=l},eI=(e,t,n,a)=>{if(1!==t.length||!n)return!1;let r=a(e),l=a(t[0]),i=a(n);return r>=(l<i?l:i)&&r<=(l<i?i:l)},eO=e=>{let{events:t=[]}=e,n=t.slice(0,6);return(0,o.jsx)("span",{className:eE.events,children:n.map(e=>(0,o.jsx)("span",{className:(0,g.Z)(eE.event,"".concat(eE.event,"--").concat(e))},"calendar--".concat(e)))})},eD=()=>(0,o.jsx)("div",{className:eE.weekDays,children:eR.map((e,t)=>(0,o.jsx)(h.T,{className:(0,g.Z)(eE.weekDay,{[eE.weekDayOff]:5===t||6===t}),size:"14",children:e},"week-day--".concat(e)))}),eM=e=>{let{currentDate:t,today:n,selectedDates:a,hoveredDate:r,minAllowedDate:l,maxAllowedDate:i,multiple:s,showCurrentDay:c,showOutsideDays:d,events:u,onDateSelect:h,onDateHover:p}=e,f=t.getFullYear(),m=t.getMonth(),v=new Date(f,m,1),x=new Date(f,m+1,0),b=v.getDay();b=0===b?6:--b;let w=x.getDate(),y=[];if(d){let e=new Date(f,m,0).getDate();for(let t=0;t<b;t++)y.push(new Date(f,m-1,e-t));y.reverse()}else for(let e=0;e<b;e++)y.push(null);let k=Array.from({length:w},(e,t)=>new Date(f,m,t+1));y.push(...k);let _=42-y.length;if(d)for(let e=1;e<=_;e++)y.push(new Date(f,m+1,e));else for(let e=0;e<_;e++)y.push(null);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(eD,{}),(0,o.jsx)("div",{className:(0,g.Z)(eE.days,[]),children:y.map(e=>{if(!e)return(0,o.jsx)("div",{className:eE.emptyDay},"calendar-empty-".concat((0,ej.g)()));let t=e$(e),v=e$(l),x=e$(i),b=d&&(e.getMonth()!==m||e.getFullYear()!==f),w=t<v||t>x,y=a.some(e=>e$(e).getTime()===t.getTime()),k=s&&eT(e,a,e$),_=s&&eI(e,a,r,e$),C=c&&t.getTime()===e$(n).getTime(),j=s&&a.length>=1&&e$(a[0]).getTime()===t.getTime(),N=s&&2===a.length&&e$(a[1]).getTime()===t.getTime(),E=eS(e);return(0,o.jsxs)("button",{type:"button",disabled:w,className:(0,g.Z)(eE.day,{[eE.otherDay]:b,[eE.selectedDay]:y,[eE.currentDay]:C,[eE.rangeDay]:k,[eE.previewDay]:_,[eE.startRangeDay]:j,[eE.endRangeDay]:N,[eE.disabledDay]:w}),onClick:()=>!w&&h(e),onMouseEnter:()=>!w&&p(e),onMouseLeave:()=>p(null),children:[e.getDate(),u[E]&&(0,o.jsx)(eO,{events:u[E]})]},"calendar--day--".concat(e.getTime()))})})]})},eF=e=>{let{view:t,currentDate:n,canNavigatePrev:a,canNavigateNext:r,onNavigate:l,onViewChange:i}=e;return(0,o.jsxs)("div",{className:eE.header,children:[(0,o.jsx)("button",{className:(0,g.Z)(eE.headerButton,eE.headerButtonPrev,{[eE.headerButtonDisabled]:!a}),type:"button",disabled:!a,onClick:()=>l("prev"),children:(0,o.jsx)(J.P,{style:{fontSize:24},children:(0,o.jsx)(ev.S,{})})}),(0,o.jsx)("button",{type:"button",className:(0,g.Z)(eE.headerButton,eE.headerText),onClick:i,children:(()=>{switch(t){case eL.days:return n.toLocaleDateString("ru-RU",{month:"long",year:"numeric"});case eL.months:return n.getFullYear().toString();case eL.years:return"".concat(n.getFullYear()-14," - ").concat(n.getFullYear()+5);default:return""}})()}),(0,o.jsx)("button",{className:(0,g.Z)(eE.headerButton,eE.headerButtonNext,{[eE.headerButtonDisabled]:!r}),type:"button",disabled:!r,onClick:()=>l("next"),children:(0,o.jsx)(J.P,{style:{fontSize:24},children:(0,o.jsx)(ex.S,{})})})]})},eB=e=>{let{today:t,currentDate:n,selectedDates:a,minAllowedDate:r,maxAllowedDate:l,showCurrentMonth:i,onMonthSelect:s}=e,c=Array.from({length:12},(e,t)=>new Date(n.getFullYear(),t,1)),d=r.getFullYear(),u=l.getFullYear();return(0,o.jsx)("div",{className:eE.months,children:c.map((e,n)=>{let c=e$(r),h=e$(l),p=new Date(e.getFullYear(),e.getMonth(),1),f=new Date(e.getFullYear(),e.getMonth()+1,0)<c||p>h||e.getFullYear()<d||e.getFullYear()>u,m=i&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear(),v=a.some(t=>t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear());return(0,o.jsx)("button",{type:"button",disabled:f,className:(0,g.Z)(eE.month,{[eE.currentMonth]:m,[eE.selectedMonth]:v,[eE.disabledMonth]:f}),onClick:()=>{f||s(e)},children:eA[n]},"calendar--month--".concat(e.getTime()))})})},eP=e=>{let{currentDate:t,today:n,minAllowedDate:a,maxAllowedDate:r,showCurrentYear:l,onYearSelect:i}=e,s=t.getFullYear()-14,c=Array.from({length:20},(e,t)=>s+t),d=a.getFullYear(),u=r.getFullYear();return(0,o.jsx)("div",{className:eE.years,children:c.map(e=>{let s=new Date(e,0,1),c=new Date(e,11,31),h=e$(a),p=e$(r),f=c<h||s>p||e<d||e>u,m=l&&e===n.getFullYear(),v=e===t.getFullYear();return(0,o.jsx)("button",{type:"button",disabled:f,className:(0,g.Z)(eE.year,{[eE.currentYear]:m,[eE.selectedYear]:v,[eE.disabledYear]:f}),onClick:()=>{f||i(e)},children:e},"calendar--".concat(e))})})};(0,c.forwardRef)((e,t)=>{let{value:n=null,minAllowedDate:a,maxAllowedDate:r,multiple:l=!1,showCurrentDay:i=!0,showCurrentMonth:s=!0,showCurrentYear:d=!0,showOutsideDays:u=!1,events:h={},className:p,style:f,dataId:m,dataQa:v,onChange:x,...b}=e,[w]=(0,c.useState)(()=>{let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}),[y,k]=(0,c.useState)("days"),[_,C]=(0,c.useState)(new Date),[j,N]=(0,c.useState)([]),[E,L]=(0,c.useState)(null),R=(0,c.useMemo)(()=>e$(a instanceof Date&&!isNaN(a.getTime())?a:new Date(1900,0,1)),[a]),A=(0,c.useMemo)(()=>e$(r instanceof Date&&!isNaN(r.getTime())?r:new Date(new Date().setFullYear(new Date().getFullYear()+100))),[r]),$=(0,c.useRef)(!1);(0,c.useEffect)(()=>{if(null===n){N([]);return}if(void 0!==n)N(Array.isArray(n)?n.map(e=>new Date(e)):[new Date(n)])},[n]);let Z=(0,c.useCallback)(e=>{let t=e$(e);if(t<R||t>A)return;let n=[];if(l){if(0===j.length)n=[t];else if(1===j.length){let e=j[0];n=e.getTime()===t.getTime()?[]:[e,t].sort((e,t)=>e.getTime()-t.getTime())}else n=[t];L(null)}else n=j.some(e=>e$(e).getTime()===t.getTime())?[]:[t];N(n);let a=null,r="";l?(a=n.length>0?[...n]:null,r=ez(n,l)):(a=n.length>0?n[0]:null,r=n.length>0?eZ(n[0]):""),$.current&&(null==x||x(a,r))},[l,R,A,j,x]),S=(0,c.useCallback)(e=>{l&&1===j.length&&L(e)},[l,j.length]);(0,c.useEffect)(()=>($.current=!0,()=>{$.current=!1}),[]);let z=(0,c.useCallback)(e=>{let t=_.getFullYear(),n=_.getMonth();if(y===eL.days){let t=new Date(_);"prev"===e?t.setMonth(n-1):t.setMonth(n+1);let a=e$(new Date(t.getFullYear(),t.getMonth(),1)),r=e$(new Date(t.getFullYear(),t.getMonth()+1,0));return a<=A&&r>=R}if(y===eL.months){let n=t+("prev"===e?-1:1);return n>=R.getFullYear()&&n<=A.getFullYear()}if(y===eL.years){let n=t-t%10+("prev"===e?-10:10);return n<=A.getFullYear()&&n+9>=R.getFullYear()}return!1},[y,_,R,A]),T=(0,c.useCallback)(e=>{C(e),k(eL.days)},[]),I=(0,c.useCallback)(e=>{C(new Date(e,0,1)),k(eL.months)},[]),O=(0,c.useCallback)(()=>{k(y===eL.days?eL.months:y===eL.months?eL.years:eL.days)},[y]);return(0,o.jsxs)("div",{ref:t,className:(0,g.Z)(p,eE.calendar),style:f,...b,"data-qa":v,"data-id":m,children:[(0,o.jsx)(eF,{view:y,currentDate:_,canNavigatePrev:z("prev"),canNavigateNext:z("next"),onNavigate:e=>{let t=new Date(_);switch(y){case eL.days:t.setMonth(t.getMonth()+("prev"===e?-1:1));break;case eL.months:t.setFullYear(t.getFullYear()+("prev"===e?-1:1));break;case eL.years:t.setFullYear(t.getFullYear()+("prev"===e?-12:12))}C(t)},onViewChange:O}),(0,o.jsxs)("div",{className:eE.content,children:[y===eL.days&&(0,o.jsx)(eM,{today:w,currentDate:_,selectedDates:j,hoveredDate:E,minAllowedDate:R,maxAllowedDate:A,multiple:l,showCurrentDay:i,showOutsideDays:u,events:h,onDateSelect:Z,onDateHover:S}),y===eL.months&&(0,o.jsx)(eB,{currentDate:_,today:w,selectedDates:j,minAllowedDate:R,maxAllowedDate:A,showCurrentMonth:s,onMonthSelect:T}),y===eL.years&&(0,o.jsx)(eP,{today:w,currentDate:_,minAllowedDate:R,maxAllowedDate:A,showCurrentYear:d,onYearSelect:I})]})]})}).displayName="Calendar";var eq=n(2821);n(8305);let eH=(0,x.g)("chips"),eV=Object.freeze({chips:eH,chip:"".concat(eH,"__item"),icon:"".concat(eH,"__icon"),iconLeft:"".concat(eH,"__icon-left"),iconRight:"".concat(eH,"__icon-right"),label:"".concat(eH,"__label"),variants:{primary:"".concat(eH,"--primary"),secondary:"".concat(eH,"--secondary")},activeVariants:{primary:"".concat(eH,"--active-primary"),secondary:"".concat(eH,"--active-secondary")},sizes:{s:"".concat(eH,"--s"),m:"".concat(eH,"--m"),l:"".concat(eH,"--l")},selected:"".concat(eH,"--selected"),indicator:"".concat(eH,"__indicator"),indicatorVariant:{red:"".concat(eH,"__indicator--red"),orange:"".concat(eH,"__indicator--orange"),green:"".concat(eH,"__indicator--green"),purple:"".concat(eH,"__indicator--purple"),purpleSecondary:"".concat(eH,"__indicator--purple-secondary"),blue:"".concat(eH,"__indicator--blue"),pink:"".concat(eH,"__indicator--pink")}});(0,c.forwardRef)((e,t)=>{let{chips:n,value:a,variant:r="primary",activeVariant:l="primary",multiple:i,clearable:s,size:d="m",className:u,style:h,dataQa:p,dataId:f,onChipClick:m,...x}=e,[b,w]=(0,c.useState)(i?[]:void 0),y=(0,c.useRef)(null);(0,c.useImperativeHandle)(t,()=>({getRoot:()=>y.current,getSelectedChips:()=>b})),(0,c.useEffect)(()=>{i?w(Array.isArray(a)?a:[]):w(a)},[a,i]);let k=i||s,_=e=>i&&Array.isArray(b)?b.includes(e):b===e,C=(e,t,n)=>{w(n),null==m||m(e,t,n)},j=(e,t)=>{if(i&&Array.isArray(b)){if(_(e)){let n=b.filter(t=>t!==e);C(e,t,n)}else C(e,t,[...b,e])}else{let n=s&&_(e)?void 0:e;C(e,t,n)}},N=(e,t)=>{let{id:n,label:a,iconLeft:i,iconRight:s,indicator:c}=e,u=_(n);return(0,o.jsxs)("div",{className:(0,g.Z)(eV.chip,eV.sizes[d],eV.activeVariants[l],eV.variants[r],[{[eV.selected]:u}]),role:k?"checkbox":"radio","aria-checked":u,"aria-label":a,tabIndex:0,"data-qa":(0,v.g)("".concat(p,"-item-").concat(++t),!!p),onClick:e=>{j(n,e)},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),j(n,e))},children:[i&&(0,o.jsx)("span",{className:(0,g.Z)(eV.icon,eV.iconLeft),"aria-hidden":"true",children:i}),(0,o.jsx)("span",{className:(0,g.Z)(eV.label),children:a}),c&&(0,o.jsx)("div",{className:(0,g.Z)(eV.indicator,eV.indicatorVariant[c])}),s&&(0,o.jsx)("span",{className:(0,g.Z)(eV.icon,eV.iconRight),"aria-hidden":"true",children:s})]},n)};return(0,o.jsx)("div",{ref:y,className:(0,g.Z)(u,eV.chips),style:h,...x,"data-id":f,"data-qa":p,children:n.map((e,t)=>N(e,t))})}).displayName="Chips";var eW=n(4124),eY=n(2521),eU=n(6301);function eQ(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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(8650);let eK=(0,x.g)("file-item"),eG=Object.freeze({root:eK,file:"".concat(eK,"__file"),preview:"".concat(eK,"__preview"),previewImage:"".concat(eK,"__preview-image"),previewIcon:"".concat(eK,"__preview-icon"),fileInfo:"".concat(eK,"__file-info"),fileName:"".concat(eK,"__file-name"),fileStatus:"".concat(eK,"__file-status"),fileSize:"".concat(eK,"__file-size"),progress:"".concat(eK,"__progress"),controls:"".concat(eK,"__controls"),close:"".concat(eK,"__close"),repeat:"".concat(eK,"__repeat"),error:"".concat(eK,"__error"),states:{success:"".concat(eK,"--success"),error:"".concat(eK,"--error"),pending:"".concat(eK,"--pending"),uploading:"".concat(eK,"--uploading"),primary:"".concat(eK,"--primary"),secondary:"".concat(eK,"--secondary"),s:"".concat(eK,"--s"),m:"".concat(eK,"--m"),disabled:"".concat(eK,"--disabled")}}),eX=["B","KB","MB","GB"],eJ=[{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"}],e0="#189EF4",e1=e=>{if(!e)return{label:"file",color:e0};let t=eJ.find(t=>t.type===e);if(t)return{label:t.label,color:t.color};let n=eU.extension(e);return n?{label:n,color:e0}:{label:"file",color:e0}},e2=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(0===e)return"0 ".concat("B");let n=Math.floor(Math.log(e)/Math.log(1024)),a=parseFloat((e/Math.pow(1024,n)).toFixed(t));return"".concat(a," ").concat(eX[n])},e3=(0,c.forwardRef)((e,t)=>{let{file:n,state:a="success",name:r,type:l,fileSize:i,error:s,progress:c=0,size:d="m",variant:u="primary",previewImageUrl:h,className:p,style:f,fileId:m,dataQa:v,dataId:x,onClick:b,onDelete:w,onRepeat:y,...k}=e,_="s"===d,C=(0,G.i)(c)&&"uploading"===a,j=s&&"error"===a,N=l&&/^image\//.test(l),E=e1(l),L=(N&&h?(0,o.jsx)("img",{role:"presentation",className:eG.previewImage,src:h,width:40,alt:r}):null)||(0,o.jsx)("div",{className:eG.previewIcon,style:{backgroundColor:E.color},children:E.label}),R=C&&"primary"===u?"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,"%"),A=(0,g.Z)(p,eG.root,eG.states[u],eG.states[a],eG.states[d]),$=C?{background:R,...f}:f;return(0,o.jsxs)("div",{ref:t,className:A,style:$,onClick:e=>{"success"===a&&(null==b||b(e,m,n))},...k,"data-id":x,"data-qa":v,children:[(0,o.jsxs)("div",{className:eG.file,children:[!_&&(0,o.jsx)("div",{className:eG.preview,children:L}),(0,o.jsxs)("div",{className:eG.fileInfo,children:[(0,o.jsx)("div",{className:eG.fileName,children:r}),!_&&i&&(0,o.jsxs)("div",{className:eG.fileStatus,children:[(0,o.jsx)("div",{className:eG.fileSize,children:"".concat(e2(i))}),C&&(0,o.jsx)("div",{className:eG.progress,children:"Загружено ".concat(c,"%")})]})]}),(0,o.jsxs)("div",{className:eG.controls,children:[_&&C&&(0,o.jsx)("div",{className:eG.progress,children:"".concat(c,"%")}),j&&(0,o.jsx)(J.P,{className:eG.repeat,tabIndex:0,role:"button","aria-label":"Повторить загрузку файла ".concat(r),onClick:e=>{e.preventDefault(),e.stopPropagation(),null==y||y(e,m,n)},children:(0,o.jsx)(eQ,{})}),(0,o.jsx)(J.P,{className:eG.close,tabIndex:0,role:"button","aria-label":"Удалить файл ".concat(r),onClick:e=>{e.preventDefault(),e.stopPropagation(),null==w||w(e,m,n)},children:(0,o.jsx)(ei,{})})]})]}),j&&(0,o.jsx)("div",{className:eG.error,children:s})]})});e3.displayName="File",n(9999);let e4=Object.freeze({root:(0,x.g)("file-list")}),e7=e=>{let t=new Set;for(let n of e){if(t.has(n))return!0;t.add(n)}return!1};(0,c.forwardRef)((e,t)=>{let{files:n,size:a="m",variant:r="primary",className:l,role:i="list",style:s,dataId:d,dataQa:u,onClick:h,onDelete:p,onRepeat:f,...m}=e;return((0,c.useEffect)(()=>{e7(n.map(e=>e.fileId))&&console.warn("Имеются файлы с одинаковым fileId")},[n]),0===n.length)?null:(0,o.jsx)("div",{ref:t,role:i,"aria-label":"Загруженные файлы",className:(0,g.Z)(l,e4.root),style:s,...m,"data-id":d,"data-qa":u,children:n.map(e=>{var t;return(0,c.createElement)(e3,{...e,role:"listitem","aria-labelledby":"Имя файла - ".concat(e.name,", Размер файла - ").concat(e2(null!==(t=e.fileSize)&&void 0!==t?t:0)),size:a,variant:r,onClick:h,onRepeat:f,onDelete:p,key:e.fileId})})})}).displayName="FileList";let e5=(e=!1)=>{let[t,n]=(0,c.useState)(e);return{value:t,show:(0,c.useCallback)(()=>n(!0),[]),hide:(0,c.useCallback)(()=>n(!1),[]),toggle:(0,c.useCallback)(()=>n(e=>!e),[])}};n(8414);let e6=e=>{let t=(0,c.useRef)(null);return(0,c.useEffect)(()=>{let n=n=>{var a;(null==(a=t.current)?void 0:a.contains(n.target))||e()};return window.addEventListener("click",n),()=>window.removeEventListener("click",n)},[]),t},e9=(e,t,n,a)=>{(0,c.useEffect)(()=>(e.addEventListener(t,n),()=>e.removeEventListener(t,n)),[...a,t,e,n])},e8=(0,x.g)("hint"),te=Object.freeze({hint:e8,hintDialog:"".concat(e8,"__dialog"),activator:"".concat(e8,"__activator"),footer:"".concat(e8,"__footer"),text:"".concat(e8,"__text"),close:"".concat(e8,"__close"),icon:"".concat(e8,"__icon"),inverted:"".concat(e8,"--inverted")});(0,c.forwardRef)((e,t)=>{let{className:n,style:a,isVisible:r,position:l="top",heading:i,footer:s,children:d,text:h,withoutTail:x,inverted:b,dataQa:w,dataId:k,role:_="dialog",...C}=e,j=(0,c.useRef)(null),{refs:N,floatingStyles:E,context:L}=(0,p.YF)({placement:l,middleware:[(0,f.cv)(12),(0,f.RR)({fallbackAxisSideDirection:"start",crossAxis:!1}),(0,f.uY)(),(0,m.x7)({element:j,padding:8})]}),{value:R,show:A,hide:$,toggle:Z}=e5(r),S=e6($);if((0,c.useImperativeHandle)(t,()=>null==S?void 0:S.current),"undefined"!=typeof window){var z;let e;e9(window,"resize",(z=()=>L.update(),e=!1,function(){for(var t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];e||(z(...n),e=!0,setTimeout(()=>{e=!1},300))}),[]),e9(window,"keyup",e=>{"Escape"===e.key&&$()},[$])}return(0,o.jsxs)("div",{ref:S,className:(0,g.Z)(te.hint,n),style:a,children:[(0,o.jsx)("button",{type:"button",className:te.activator,ref:N.setReference,tabIndex:0,onClick:Z,children:"function"==typeof d?d({show:A,hide:$,toggle:Z,visible:R}):d}),R&&(0,o.jsxs)("div",{role:_,className:(0,g.Z)(te.hintDialog,{[te.inverted]:b}),ref:N.setFloating,style:E,...C,"data-id":k,"data-qa":w,children:[i&&(0,o.jsx)(u.H,{dataQa:(0,v.g)("".concat(w,"-heading"),!!w),className:"mb-3",as:"h6",type:"h6",children:i}),(0,o.jsx)("p",{"data-qa":(0,v.g)("".concat(w,"-text"),!!w),className:(0,g.Z)(te.text),children:h}),s&&(0,o.jsx)("div",{"data-qa":(0,v.g)("".concat(w,"-footer"),!!w),className:(0,g.Z)(te.footer),children:s}),(0,o.jsx)("button",{type:"button",tabIndex:-1,className:te.close,onClick:$,children:(0,o.jsx)(J.P,{"aria-hidden":"true",className:te.icon,style:{display:"inline-flex",fontSize:16},children:(0,o.jsx)(ei,{})})}),!x&&(0,o.jsx)(p.Y$,{width:16,ref:j,d:y,context:L,fill:b?"var(--color-white)":"var(--color-black-500)"})]})]})}).displayName="Hint",n(4201);let tt=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(var e=arguments.length,n=Array(e),a=0;a<e;a++)n[a]=arguments[a];t.forEach(e=>{null==e||e(...n)})}},tn=(0,x.g)("input-base"),ta={wrapper:tn,input:"".concat(tn,"__input"),container:"".concat(tn,"__container"),label:"".concat(tn,"__label"),field:"".concat(tn,"__field"),rightLabel:"".concat(tn,"__right-label"),caption:"".concat(tn,"__caption"),placeholder:{visible:"".concat(tn,"__placeholder"),hidden:"".concat(tn,"__hidden")},states:{primary:"".concat(tn,"--primary"),secondary:"".concat(tn,"--secondary"),error:"".concat(tn,"--error"),success:"".concat(tn,"--success"),s:"".concat(tn,"--s"),m:"".concat(tn,"--m"),l:"".concat(tn,"--l"),focused:"".concat(tn,"--focused"),disabled:"".concat(tn,"--disabled"),active:"".concat(tn,"--active"),hasLabel:"".concat(tn,"--has-label"),accent:"".concat(tn,"--accent")}},tr=(0,c.forwardRef)((e,t)=>{let{icon:n,rightLabel:a,disabled:r,state:l,size:i="m",variant:s="primary",label:d,value:u,placeholder:h,maskPlaceholder:f,autoFocus:m=!1,maskPlaceholderVariant:x="default",caption:b,type:w="text",inputMode:y="text",hasCaption:k,className:_,style:C,dataQa:j,dataId:N,inputRef:E,onChange:L,onFocus:R,onBlur:A,onKeyDown:$,...Z}=e,S=(0,c.useId)(),{value:z,show:T,hide:I}=e5(),O=(0,c.useRef)(null),D=(0,p.qq)([E,O]),M=(0,c.useMemo)(()=>z||!!u||!!h,[u,z,h]),F=(0,c.useCallback)(()=>{var e;null==(e=O.current)||e.focus()},[]),B=(0,c.useMemo)(()=>{var e;if(!f)return null;let t={hidden:null!=u?u:"",visible:f.substring(null!==(e=null==u?void 0:u.length)&&void 0!==e?e:0)};return f.length===(null==u?void 0:u.length)?null:t},[f,u]);return(0,c.useEffect)(()=>{var e,t,n,a;if(!m)return;let r=null!==(a=null==(e=O.current)?void 0:e.value.length)&&void 0!==a?a:0;null==(t=O.current)||t.focus(),null==(n=O.current)||n.setSelectionRange(r,r)},[m]),(0,o.jsxs)("div",{className:(0,g.Z)(_,ta.wrapper),style:C,"data-qa":j,"data-id":N,children:[(0,o.jsxs)("div",{className:(0,g.Z)(ta.input,ta.states[s],ta.states[i],{[ta.states.focused]:z,[ta.states.error]:"error"===l,[ta.states.success]:"success"===l,[ta.states.disabled]:!!r,[ta.states.hasLabel]:d}),onClick:F,ref:t,children:[(0,o.jsxs)("label",{htmlFor:S,className:ta.container,children:[d&&(0,o.jsx)("span",{className:(0,g.Z)(ta.label,{[ta.states.active]:M,[ta.states.s]:"s"===i,[ta.states.disabled]:r,[ta.states.error]:"error"===l,[ta.states.success]:"success"===l}),children:d}),B&&!!u&&(0,o.jsxs)("div",{className:(0,g.Z)(ta.placeholder.visible,{[ta.states.accent]:"accent"===x}),children:[B.hidden&&(0,o.jsx)("span",{className:ta.placeholder.hidden,children:B.hidden}),B.visible]}),(0,o.jsx)("input",{...Z,id:S,ref:D,className:(0,g.Z)(ta.field,{[ta.states.s]:"s"===i,[ta.states.hasLabel]:d,[ta.states.disabled]:r}),type:w,inputMode:y,autoComplete:"off",placeholder:h,value:u,disabled:r,onChange:e=>{null==L||L(e.target.value,e)},onFocus:tt(T,R),onBlur:tt(I,A),onKeyDown:e=>{("Escape"===e.key||"Esc"===e.key)&&(e.preventDefault(),null==L||L("",{target:{value:""}})),null==$||$(e)}})]}),a&&(0,o.jsx)("div",{className:(0,g.Z)(ta.rightLabel,{[ta.states.disabled]:r}),children:a}),n]}),(k||b)&&(0,o.jsx)(X.C,{dataQa:(0,v.g)("".concat(j,"-caption"),!!j),className:(0,g.Z)(ta.caption,{[ta.states.disabled]:r}),state:l,withoutIcon:!0,children:b})]})});tr.displayName="InputBase";var tl=n(3794),ti=n(4486),ts=n(8947),to=n(9912),tc=n(370);function td(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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(7378);let tu=(0,x.g)("input-file"),th={inputFile:tu,input:"".concat(tu,"__input"),uploadArea:"".concat(tu,"__upload-area"),uploadIcon:"".concat(tu,"__upload-icon"),uploadLabel:{default:"".concat(tu,"__upload-label"),purple:"".concat(tu,"__upload-label--purple")},uploadDragged:"".concat(tu,"__upload-dragged"),uploadCaption:"".concat(tu,"__upload-caption"),uploadButton:"".concat(tu,"__upload-button"),uploadWrapper:"".concat(tu,"__upload-wrapper"),selectButton:"".concat(tu,"__select-button"),states:{error:"".concat(tu,"--error"),s:"".concat(tu,"--s"),dragged:"".concat(tu,"--dragged"),disabled:"".concat(tu,"--disabled")}},tp=(e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(","),a=e.name||"",r=e.type||"",l=r.replace(/\/.*$/,"");return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if("."===t.charAt(0)){let e=a.toLowerCase(),n=t.toLowerCase(),r=[n];return(".jpg"===n||".jpeg"===n)&&(r=[".jpg",".jpeg"]),r.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?l===t.replace(/\/.*$/,""):r===t||!!/^\w+$/.test(t)&&(console.error(!1,"Upload takes an invalidate 'accept' type '".concat(t,"'.Skip for check.")),!0)})}return!0};(0,c.forwardRef)((e,t)=>{let{accept:n,maxFileSize:a,disabled:r=!1,multiple:l=!1,capture:i=!1,mode:s="select",size:d="m",style:u,className:p,name:f,dataId:m,dataQa:v,onChange:x,...b}=e,w=(0,c.useId)(),[y,k]=(0,c.useState)(!1),[_,C]=(0,c.useState)(!1),j=(0,c.useRef)(null),N=(0,c.useRef)(null),E=e=>{if(!e)return!0;let t=L(e),n=R(e);return t&&n},L=e=>{if(!a)return!0;for(let t=0;t<e.length;t++)if(e[t].size>1048576*a)return!1;return!0},R=e=>{if(!n)return!0;for(let t=0;t<e.length;t++)if(!tp(e[t],n))return!1;return!0},A=e=>{let t=Object.hasOwn(e,"dataTransfer")?e.dataTransfer.files:e.target.files;if(t){if(!E(t)){k(!0);return}k(!1),null==x||x(t,e)}},$=()=>{var e;null==(e=j.current)||e.click()},Z=e=>{r||(e.stopPropagation(),e.preventDefault())},S=e=>{r||(e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",C(!0))},z=e=>{r||(e.stopPropagation(),e.preventDefault(),C(!1))},T=e=>{if(r)return;e.stopPropagation(),e.preventDefault();let{files:t}=e.dataTransfer;(l||t&&1===t.length)&&A(e),C(!1),e.dataTransfer.clearData()};(0,c.useImperativeHandle)(t,()=>({getInput:()=>j.current,getUploadArea:()=>N.current}));let I=()=>{let e=Array.isArray(n)?n.join(", "):null==n?void 0:n.split(",").join(", ");return(e?"Доступные форматы ".concat(e,". "):"")+(a?"Размер файла не должен превышать ".concat(a," MB."):"")},O=()=>{let e=Array.isArray(n)?n.join(","):n,t={ref:j,type:"file",className:th.input,multiple:l,accept:e,capture:i,disabled:r,id:w,name:f,onChange:A};return(0,o.jsx)("input",{...t})},D=()=>{let e={ref:N,className:(0,g.Z)(th.uploadArea,{[th.states.error]:y,[th.states.s]:"s"===d,[th.states.dragged]:_,[th.states.disabled]:r}),onDragEnter:Z,onDragOver:S,onDragLeave:z,onDrop:T,onClick:$,role:"button",tabIndex:0},t=(0,o.jsx)(J.P,{"aria-hidden":"true",className:(0,g.Z)(th.uploadIcon,{[th.states.disabled]:r}),children:(0,o.jsx)(td,{})}),n=(0,o.jsx)(h.T,{size:"16",weight:"regular",className:(0,g.Z)(th.uploadDragged,{[th.states.disabled]:r,[th.states.dragged]:_,[th.states.s]:"s"===d}),children:"Перетащите файлы сюда"});if("s"===d){let a=(0,o.jsxs)(h.T,{size:"16",weight:"regular",className:(0,g.Z)(th.uploadLabel.default,{[th.states.disabled]:r}),children:[(0,o.jsxs)("span",{className:(0,g.Z)(th.uploadLabel.purple,{[th.states.disabled]:r}),children:["Выберите файлы"," "]}),"или перетащите их сюда"]});return(0,o.jsx)(es.F,{caption:I(),hasCaption:!0,children:(0,o.jsxs)("div",{...e,children:[(0,o.jsxs)("div",{className:(0,g.Z)(th.uploadWrapper,{[th.states.dragged]:_}),children:[t,a]}),n]})})}let a=(0,o.jsx)(h.T,{size:"16",weight:"regular",className:(0,g.Z)(th.uploadLabel.default,{[th.states.disabled]:r}),children:"Выберите файлы или перетащите их сюда"}),l=(0,o.jsx)(h.T,{size:"14",weight:"regular",className:(0,g.Z)(th.uploadCaption,{[th.states.disabled]:r}),children:I()}),i=(0,o.jsx)(h.T,{size:"16",weight:"regular",className:(0,g.Z)(th.uploadButton,{[th.states.disabled]:r}),children:"Выбрать"});return(0,o.jsxs)("div",{...e,children:[(0,o.jsxs)("div",{className:(0,g.Z)(th.uploadWrapper,{[th.states.dragged]:_}),children:[t,a,l,i]}),n]})};return(0,o.jsx)("div",{className:(0,g.Z)(p,th.inputFile),style:u,...b,"data-id":m,"data-qa":v,children:"select"===s?(()=>{let e=O(),t=I(),n=(0,o.jsx)(H.B,{onClick:$,label:"Выберите файлы",size:"s",stretch:!0,className:(0,g.Z)(th.selectButton,{disabled:r}),disabled:r});return(0,o.jsxs)(es.F,{caption:t,hasCaption:!0,captionState:y?"error":"default",children:[e,n]})})():(()=>{let e=O(),t=D();return(0,o.jsxs)(o.Fragment,{children:[t,e]})})()})}).displayName="InputFile",n(1459);let tf=(e,t,n,a)=>{let r=[t,n,a];return r[e%100>4&&e%100<20?2:[2,0,1,1,1,2][e%10<5?e%10:5]]||r[0]},tm=e=>null==e;function tg(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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 tv(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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 tx=[",","."],tb=(0,x.g)("input-number"),tw={controls:"".concat(tb,"__controls"),icon:"".concat(tb,"__controls-icon"),divider:"".concat(tb,"__controls-divider"),states:{disabled:"".concat(tb,"--disabled")}},ty=e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),tk=(e,t)=>{let n=ty(t.join("")),a=RegExp("[^\\d".concat(n,"]"),"gi");return e.replace(a,"")},t_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\xa0",n=RegExp(ty(t),"g");return e.replace(n,"")},tC=(e,t)=>{let n=RegExp("((^|\\D)-\\d)|^(-)").test(e),a=tk(t_(e,"\xa0"),tx).replace(",","."),r=n?"-":"";if(a.includes(".")){let[e,n]=a.split(".");if(n){let a=".".concat(n.slice(0,t));return"".concat(r).concat(e).concat(a)}}return"".concat(r).concat(a)},tj=(e,t)=>{let n=String(e),[a,r]=n.split("."),l=new Intl.NumberFormat("ru",{maximumFractionDigits:0,roundingMode:"trunc",useGrouping:"min2"}).format(parseFloat(n)),i=n.includes(".")||n.includes(",");return"never"===t?l:"".concat(l).concat(i?",":"").concat(null!=r?r:"")},tN=(e,t,n)=>{if(!e||!t)return"";if(Array.isArray(t)){let n=tC(e,2),a=Number((n.startsWith("-")?n.slice(1):n).split(".")[0]),[r,l,i]=t;return tf(a,r,l,i)}return t},tE=e=>RegExp("^-?(?!0{2,})[(\\d\\s?]*[,.]?\\d*$").test(e),tL=e=>{let{selectionStart:t,value:n,lastKeyStroke:a,stateValue:r}=e,l=t,i=n;if(r&&l&&"\xa0"===r[l]&&("Backspace"===a||"Delete"===a)){let e=n.split("");return"Backspace"===a&&(e.splice(l-1,1),l-=1),"Delete"===a&&(e.splice(l,1),l+=1),{modifiedValue:i=e.join(""),cursorPosition:l}}return{modifiedValue:i,cursorPosition:t}},tR=(e,t,n)=>(0,G.i)(t)&&e<t?t:(0,G.i)(n)&&e>n?n:e,tA=e=>{let{value:t,decimals:n="auto",decimalsCount:a=2}=e;switch(n){case"always":return new Intl.NumberFormat("ru",{minimumFractionDigits:a,useGrouping:"min2"}).format(t);case"never":return new Intl.NumberFormat("ru",{maximumFractionDigits:0,useGrouping:"min2"}).format(t);default:return new Intl.NumberFormat("ru",{useGrouping:"min2"}).format(t)}},t$=(0,c.forwardRef)((e,t)=>{let{decimals:n="auto",decimalsCount:a=2,value:r,unit:l,step:i=1,min:s,max:d,size:u="m",withoutControls:h,disabled:p,icon:f,shouldRoundOnChange:m=!1,className:v,style:x,dataQa:b,dataId:w,autoFocus:y=!1,onChange:k,onFocus:_,onBlur:C,onKeyDown:j,onIncrement:N,onDecrement:E,...L}=e,R=(0,c.useMemo)(()=>a<10?a:10,[a]),[A,$]=(0,c.useState)((0,G.i)(r)?tA({value:tR(parseFloat(tj(tC(String(r),R),n)),s,d),decimals:n,decimalsCount:R}):""),[Z,S]=(0,c.useState)(!1),[z,T]=(0,c.useState)(0),[I,O]=(0,c.useState)(null),D=(0,c.useRef)(null);(0,c.useImperativeHandle)(t,()=>D.current),(0,c.useEffect)(()=>{Z&&"-"!==A&&D.current&&document.activeElement===D.current&&D.current.setSelectionRange(z,z)},[A,z,D,Z]);let M=(0,c.useCallback)((e,t)=>{if(S(!0),!tE(e))return{float:A?parseFloat(tC(A,R)):void 0,formatted:A};if(""===e)return{float:void 0,formatted:e};if("-"===e)return T(1),{float:void 0,formatted:e};if("."===e||","===e)return T(2),{float:0,formatted:"never"===n?"0":"0,"};if("-."===e||"-,"===e)return T(3),{float:0,formatted:"never"===n?"-0":"-0,"};let{modifiedValue:a,cursorPosition:r}=tL({selectionStart:t,value:e,lastKeyStroke:I,stateValue:A}),l=tC(a,R),i="never"===n?parseInt(l):parseFloat(l),o=tj(l,n),c=m?tR(i,s,d):i;if(c>Number.MAX_SAFE_INTEGER||c<Number.MIN_SAFE_INTEGER)return{float:parseFloat(tC(A,R)),formatted:A};if(!tm(r)){let t=r+(o.length-e.length);T(t=t<=0?0:t)}return{float:c,formatted:o}},[n,R,I,d,s,m,A]),F=(0,c.useCallback)((e,t)=>{if(!t)return;let{target:{value:n,selectionStart:a}}=t,r=M(n,a);$(r.formatted),null==k||k(r.float,{...r,event:t})},[M,k]),B=(0,c.useCallback)(e=>{null==_||_(e)},[_]),P=(0,c.useCallback)(e=>{let{target:{value:t}}=e,a=tC(t,R);if(!a||"-"===a){$(""),null==C||C(e);return}let r=parseFloat(a),l=m?r:tR(r,s,d),i=tA({value:l,decimals:n,decimalsCount:R});$(i),m||r===l||null==k||k(l,{float:l,formatted:i}),null==C||C(e)},[n,R,d,s,C,k,m]),q=(0,c.useCallback)(e=>{T(A.length);let t=parseFloat(tm(r)?tC(A,R):String(r).replace(",","."))||0,a=tR("increase"===e?Number((t+i).toFixed(R)):Number((t-i).toFixed(R)),s,d),l=tA({value:a,decimals:n,decimalsCount:R});$(l),null==k||k(a,{float:a,formatted:l})},[A,r,R,i,s,d,n,k]),H=(0,c.useCallback)(e=>{let{code:t}=e;O(t),("ArrowUp"===t||"ArrowDown"===t)&&(e.preventDefault(),q("ArrowUp"===t?"increase":"decrease")),null==j||j(e)},[q,j]),V=(0,c.useCallback)(e=>{e.preventDefault(),q("decrease"),null==E||E(e)},[q,E]),W=(0,c.useCallback)(e=>{e.preventDefault(),q("increase"),null==N||N(e)},[q,N]),Y=(0,c.useCallback)(e=>{let{code:t}=e;O(t),["Space","Enter"].includes(t)&&(e.preventDefault(),q("decrease"),null==E||E(e))},[q,E]),U=(0,c.useCallback)(e=>{let{code:t}=e;O(t),["Space","Enter"].includes(t)&&(e.preventDefault(),q("increase"),null==N||N(e))},[q,N]),Q=(0,c.useMemo)(()=>{let e=parseFloat(tC(A,R));return tm(r)||""===String(r)?"":Number(r)===e?A:"-"!==A&&","!==A&&tE(String(r))?tj(tC(String(tR(r,s,d)),R),n):A},[n,R,A,r]),K=(0,c.useMemo)(()=>{let[e,t]=Q.split(","),n=Q.includes(","),a=tN(Q,l);if(n){let n=Array(R-t.length).fill(0).join("");return"".concat(e).concat(",").concat(t).concat(n).concat("\xa0").concat(a)}return"".concat(e).concat("\xa0").concat(a)},[Q,l,R]),X={...L,value:Q,maskPlaceholder:K,maskPlaceholderVariant:"accent",size:u,icon:h?f:(0,o.jsxs)("div",{className:(0,g.Z)(tw.controls),children:[(0,o.jsx)(J.P,{onClick:p?void 0:V,onKeyDown:p?void 0:Y,className:(0,g.Z)(tw.icon,{[tw.states.disabled]:!!p}),role:"button",tabIndex:p?-1:0,children:(0,o.jsx)(tg,{})}),(0,o.jsx)("div",{className:tw.divider}),(0,o.jsx)(J.P,{onClick:p?void 0:W,onKeyDown:p?void 0:U,className:(0,g.Z)(tw.icon,{[tw.states.disabled]:!!p}),role:"button",tabIndex:p?-1:0,children:(0,o.jsx)(tv,{})})]}),disabled:p,onChange:F,onBlur:P,onFocus:B,onKeyDown:H};return(0,o.jsx)(tr,{...X,autoFocus:y,inputMode:"decimal",inputRef:D,dataQa:b,dataId:w,className:v,style:x})});function tZ(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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 tS(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"}))}t$.displayName="InputNumber",n(9003);let tz=(0,x.g)("input-password"),tT={icon:"".concat(tz,"__icon"),states:{disabled:"".concat(tz,"--disabled")}};function tI(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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)((e,t)=>{let{disabled:n,autoFocus:a=!1,...r}=e,[l,i]=(0,c.useState)(!1);return(0,o.jsx)(tr,{...r,autoFocus:a,ref:t,disabled:n,type:l?"text":"password",icon:(0,o.jsx)(J.P,{onMouseDown:n?void 0:e=>{e.preventDefault(),e.stopPropagation(),i(e=>!e)},onKeyDown:n?void 0:e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),i(e=>!e))},className:(0,g.Z)(tT.icon,{[tT.states.disabled]:!!n}),role:"button",tabIndex:n?-1:0,children:l?(0,o.jsx)(tS,{}):(0,o.jsx)(tZ,{})})})}).displayName="InputPassword",n(7807);let tO=(0,x.g)("input-search"),tD={iconSearch:"".concat(tO,"__icon-search"),iconClear:"".concat(tO,"__icon-clear"),states:{disabled:"".concat(tO,"--disabled")}};(0,c.forwardRef)((e,t)=>{let{value:n,disabled:a,onChange:r,...l}=e,[i,s]=(0,c.useState)(n||"");(0,c.useEffect)(()=>{s(n||"")},[n]);let d=(0,c.useCallback)((e,t)=>{s(e||""),null==r||r(e||"",t)},[]);return(0,o.jsx)(tr,{...l,value:i,ref:t,disabled:a,icon:i?(0,o.jsx)(J.P,{onMouseDown:a?void 0:e=>{e.preventDefault(),e.stopPropagation(),d()},onKeyDown:a?void 0:e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),d())},className:(0,g.Z)(tD.iconClear,{[tD.states.disabled]:a}),role:"button",tabIndex:a?-1:0,children:(0,o.jsx)(ei,{})}):(0,o.jsx)(J.P,{className:(0,g.Z)(tD.iconSearch,{[tD.states.disabled]:a}),children:(0,o.jsx)(tI,{})}),onChange:(e,t)=>{d(e,t)}})}).displayName="InputSearch",n(4408);let tM=(0,x.g)("snackbar"),tF=Object.freeze({snackbar:tM,item:"".concat(tM,"__item"),itemOut:"".concat(tM,"__item--out"),position:{topLeft:"".concat(tM,"--top-left"),topRight:"".concat(tM,"--top-right"),bottomLeft:"".concat(tM,"--bottom-left"),bottomRight:"".concat(tM,"--bottom-right")},alertFill:em.fill}),tB={status:"status",alert:"alert"},tP=(e,t,n)=>e<=t?t:e>=n?n:e,tq=new Map,tH=null;(0,c.forwardRef)((e,t)=>{let{quantity:n=3,position:a="topRight",closeAll:r,style:l,className:i,dataQa:s,dataId:d,...u}=e,[h,f]=(0,c.useState)(!1),[m,v]=(0,c.useState)([]),x=(0,c.useRef)(new Map),b=(0,c.useCallback)(e=>{h||e.forEach(e=>{if(e.withoutTimer||x.current.has(e.id))return;let t=setTimeout(()=>{k(e,()=>{var t;y(e.id),null==(t=e.closeByTimer)||t.call(e)})},e.timer?1e3*tP(e.timer,4,10):4e3);x.current.set(e.id,t)})},[h]),w=(0,c.useCallback)(()=>{x.current.forEach(e=>clearTimeout(e)),x.current.clear()},[]);(0,c.useEffect)(()=>(tH=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){let t=[];tq.forEach(e=>{t.push(new Promise(t=>k(e,t)))}),Promise.all(t).then(()=>{null==r||r(),w(),tq.clear(),v(e.slice(0,tP(n,1,5)))})}else v(e.slice(0,tP(n,1,5)))},()=>{tH=null}),[r,w,n]),(0,c.useEffect)(()=>{b(m)},[m,b]);let y=e=>{tq.delete(e),x.current.has(e)&&(clearTimeout(x.current.get(e)),x.current.delete(e)),tH&&tH([...Array.from(tq.values())])},k=(e,t)=>{tq.set(e.id,{...e,isExiting:!0}),tH&&tH([...Array.from(tq.values())]),setTimeout(()=>{t()},250)},_=()=>{f(!1),b(m)},C=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_(),k(t,()=>{var a,r;y(t.id),n?null==(a=t.onButtonClick)||a.call(t,e):null==(r=t.onClose)||r.call(t,e)})};return(0,o.jsx)(o.Fragment,{children:!!m.length&&(0,o.jsx)(p.ll,{id:"finkit-snackbars",children:(0,o.jsx)("ul",{ref:t,role:"region",className:(0,g.Z)(tF.snackbar,tF.position[a],i),style:l,onMouseEnter:()=>{f(!0),w()},onMouseLeave:_,...u,"data-qa":s,"data-id":d,children:m.map(e=>(0,o.jsx)("li",{id:e.id,className:(0,g.Z)(tF.item,{[tF.itemOut]:e.isExiting}),children:(0,o.jsx)(eg,{role:"error"===e.state?tB.alert:tB.status,label:e.label,state:e.state,caption:e.caption,withClose:e.withClose||e.withoutTimer&&!e.buttonText,onClose:t=>{C(t,e)},buttonText:e.buttonText,onButtonClick:t=>{C(t,e,!0)},className:tF.alertFill,dataQa:e.dataQa,dataId:e.dataId,buttonVariant:"white",withIcon:!0})},e.id))})})})}).displayName="Snackbar",n(3440);var tV=n(2626);n(6609);let tW=(0,x.g)("radio"),tY=Object.freeze({radio:tW,input:"".concat(tW,"__input"),marker:"".concat(tW,"__marker"),wrapper:"".concat(tW,"__wrapper"),label:"".concat(tW,"__label"),caption:"".concat(tW,"__caption"),icon:"".concat(tW,"__icon"),iconButton:"".concat(tW,"__icon-button"),states:{error:"".concat(tW,"--error"),disabled:"".concat(tW,"--disabled"),inverted:"".concat(tW,"--inverted")},sizes:{xs:"".concat(tW,"--xs"),s:"".concat(tW,"--s"),m:"".concat(tW,"--m")},variants:{primary:"".concat(tW,"--primary"),secondary:"".concat(tW,"--secondary")}});(0,c.forwardRef)((e,t)=>{let{value:n,variant:a="primary",checked:r=!1,state:l="default",label:i,disabled:s=!1,caption:d,className:u,style:h,icon:p,withIcon:f=!1,size:m="m",inverted:v=!1,children:x,inputRef:b,onChange:w,onIconClick:y,dataQa:k,dataId:_,...C}=e,j=(0,c.useId)(),N=x||i;return(0,o.jsxs)("label",{ref:t,htmlFor:j,"data-marker-label":"",className:(0,g.Z)(u,tY.radio,{[tY.states.disabled]:s,[tY.states.inverted]:v,[tY.states.error]:"error"===l,[tY.sizes[m]]:!0,[tY.variants[a]]:!0}),style:h,"data-id":_,"data-qa":k,children:[(0,o.jsx)("input",{id:j,value:n,checked:r,className:tY.input,type:"radio",disabled:s,onChange:e=>{null==w||w(e.target.value,e)},ref:b,...C}),(0,o.jsx)("span",{className:tY.marker,children:(0,o.jsx)(eW.C,{type:"radio",checked:r,inverted:v,state:l,disabled:s})}),N&&(0,o.jsxs)("span",{className:tY.wrapper,children:[(0,o.jsx)("span",{className:tY.label,children:N}),d&&(0,o.jsx)(X.C,{className:tY.caption,withoutIcon:!0,children:d})]}),f&&(0,o.jsx)("button",{type:"button",className:(0,g.Z)(tY.iconButton),onClick:s?void 0:y,children:(0,o.jsx)(J.P,{className:(0,g.Z)(tY.icon),children:p?(0,o.jsx)(o.Fragment,{children:p}):(0,o.jsx)(tV.S,{})})})]})}).displayName="Radio",n(3223);let tU=(0,x.g)("segmented-control"),tQ=Object.freeze({segmentedControl:tU,secondary:"".concat(tU,"--secondary"),tab:"".concat(tU,"__tab"),label:"".concat(tU,"__label"),icon:"".concat(tU,"__icon"),slot:"".concat(tU,"__slot"),states:{stretch:"".concat(tU,"--stretch"),rounded:"".concat(tU,"--rounded"),small:"".concat(tU,"--s"),medium:"".concat(tU,"--m"),weightVariant:"".concat(tU,"--wight-medium"),left:"".concat(tU,"__tab--left"),right:"".concat(tU,"__tab--right"),active:"".concat(tU,"__tab--active"),iconOnly:"".concat(tU,"__tab--icon-only"),disabled:"".concat(tU,"__tab--disabled")}}),tK=Object.freeze({labelKey:"label",disabledKey:"disabled",slotLeftKey:"slotLeft",slotRightKey:"slotRight",iconLeftKey:"iconLeft",iconRightKey:"iconRight"});(0,c.forwardRef)((e,t)=>{var n;let{activeTabId:a,tabs:r,onTabChange:l,variant:i="primary",className:s,style:d,stretch:u=!1,rounded:h=!1,tabSettings:p,weightVariant:f="regular",size:m="m",onTabKeyDown:x,dataQa:b,dataId:w,...y}=e,k=(0,c.useRef)(null),_=(0,c.useMemo)(()=>{let e={...tK,...p};return r.map(t=>{var n;return{sourceTab:t,id:t.id,label:t[e.labelKey],disabled:null!==(n=t[e.disabledKey])&&void 0!==n&&n,slotLeft:t[e.slotLeftKey],slotRight:t[e.slotRightKey],iconLeft:t[e.iconLeftKey],iconRight:t[e.iconRightKey]}})},[p,r]),[C,j]=(0,c.useState)(null!=a?a:null==(n=_[0])?void 0:n.id),N=(0,c.useCallback)(e=>{var t;let n=k.current,a=(null==e?void 0:e.target).closest(".".concat(tQ.tab)),r=n.getBoundingClientRect(),l=a.getBoundingClientRect();n.scrollTo({left:l.left-r.left-4+(null!==(t=n.scrollLeft)&&void 0!==t?t:0),behavior:"smooth"})},[]),E=(e,t)=>{j(e),N(t),l(e,t)},L=(e,t)=>{((null==t?void 0:t.key)===" "||(null==t?void 0:t.key)==="Enter")&&(j(e),N(t),null==x||x(e,t))};return(0,c.useEffect)(()=>{null!=a&&j(a)},[a]),(0,c.useImperativeHandle)(t,()=>k),(0,o.jsx)("div",{ref:k,role:"tablist",className:(0,g.Z)(tQ.segmentedControl,{[tQ.secondary]:"secondary"===i,[tQ.states.small]:"s"===m,[tQ.states.medium]:"m"===m,[tQ.states.weightVariant]:"medium"===f,[tQ.states.stretch]:u,[tQ.states.rounded]:h},s),style:d,...y,"data-id":w,"data-qa":b,children:_.map((e,t)=>(0,o.jsxs)("button",{type:"button",role:"tab","data-qa":(0,v.g)("".concat(b,"-tab-").concat(++t),!!b),"aria-selected":e.id===C,"aria-disabled":e.disabled?e.disabled:void 0,tabIndex:(null==e?void 0:e.disabled)?-1:0,className:(0,g.Z)(tQ.tab,{[tQ.states.active]:e.id===C,[tQ.states.disabled]:e.disabled,[tQ.states.iconOnly]:!e.label&&(e.iconLeft||e.slotLeft),[tQ.states.left]:e.label&&(e.iconLeft||e.slotLeft),[tQ.states.right]:e.label&&(e.iconRight||e.slotRight)}),onClick:e.disabled?void 0:t=>E(e.id,t),onKeyDown:e.disabled?void 0:t=>L(e.id,t),children:[e.iconLeft&&(0,o.jsx)("span",{className:tQ.icon,children:e.iconLeft}),e.slotLeft&&e.label&&(0,o.jsx)("span",{className:tQ.slot,children:e.slotLeft}),e.label&&(0,o.jsx)("span",{className:tQ.label,children:e.label}),e.label&&(0,o.jsxs)(o.Fragment,{children:[e.slotRight&&(0,o.jsx)("span",{className:tQ.slot,children:e.slotRight}),e.iconRight&&(0,o.jsx)("span",{className:tQ.icon,children:e.iconRight})]})]},e.id))})}).displayName="SegmentedControl",n(3257),n(3549),n(6266);let tG=(0,x.g)("tabs"),tX=Object.freeze({tabs:tG,tabWrapper:"".concat(tG,"__tab-wrapper"),tab:"".concat(tG,"__tab"),active:"".concat(tG,"__tab--active"),activeLine:"".concat(tG,"__activeLine")});(0,c.forwardRef)((e,t)=>{var n;let{activeTabId:a,tabs:r,onTabChange:l,style:i,className:s,dataQa:d,dataId:u,...h}=e,[p,f]=(0,c.useState)(null!=a?a:null==(n=r[0])?void 0:n.id),[m,x]=(0,c.useState)(null),[b,w]=(0,c.useState)({width:0,left:0}),y=(0,c.useRef)(null);(0,c.useEffect)(()=>{m&&w({left:m.offsetLeft-2,width:m.offsetWidth+4})},[m]);let k=(0,c.useCallback)(e=>{var t;let n=y.current,a=(null==e?void 0:e.target).closest(".".concat(tX.tab)),r=n.getBoundingClientRect(),l=a.getBoundingClientRect();n.scrollTo({left:l.left-r.left-4+(null!==(t=n.scrollLeft)&&void 0!==t?t:0),behavior:"smooth"})},[]),_=(e,t)=>{k(t),f(e),l(e,t)};return(0,c.useImperativeHandle)(t,()=>y),(0,o.jsxs)("ul",{role:"tablist",ref:y,className:(0,g.Z)(tX.tabs,s),style:i,...h,"data-id":u,"data-qa":d,children:[r.map((e,t)=>{let n=e.id===p;return!e.disabled&&(0,o.jsx)("li",{role:"tab","aria-selected":e.id===p,"data-qa":(0,v.g)("".concat(d,"-tab-").concat(++t),!!d),className:tX.tabWrapper,children:(0,o.jsx)("button",{type:"button",ref:n?x:null,className:(0,g.Z)(tX.tab,{[tX.active]:n}),onClick:t=>_(e.id,t),children:e.label})},e.id)}),(0,o.jsx)("div",{className:(0,g.Z)(tX.activeLine),style:{left:b.left,width:b.width}})]})}).displayName="Tabs";var tJ=n(18);n(917);let t0=(0,x.g)("textarea"),t1={root:t0,container:"".concat(t0,"__container"),field:"".concat(t0,"__field"),labelWrapper:"".concat(t0,"__label-wrapper"),label:"".concat(t0,"__label"),captionWrapper:"".concat(t0,"__caption-wrapper"),caption:"".concat(t0,"__caption"),counter:"".concat(t0,"__counter"),states:{primary:"".concat(t0,"--primary"),secondary:"".concat(t0,"--secondary"),error:"".concat(t0,"--error"),success:"".concat(t0,"--success"),s:"".concat(t0,"--s"),m:"".concat(t0,"--m"),l:"".concat(t0,"--l"),focused:"".concat(t0,"--focused"),active:"".concat(t0,"--active"),disabled:"".concat(t0,"--disabled"),hasLabel:"".concat(t0,"--has-label"),hasCaption:"".concat(t0,"--has-caption")}},t2=(e,t,n)=>{(0,c.useEffect)(()=>{e&&(n&&t?(e.style.height="auto",e.style.height=e.scrollHeight+"px"):e.style.height="")},[n,e,t])};function t3(){return"undefined"==typeof window}(0,c.forwardRef)((e,t)=>{let{disabled:n,state:a,size:r="m",variant:l="primary",label:i,className:s,style:d,value:u="",rows:h=1,maxLength:p,caption:f,counter:m,placeholder:v,autoResize:x=!1,hasCaption:b=!1,dataQa:w,dataId:y,onChange:k,onFocus:_,onBlur:C,...j}=e,{value:N,show:E,hide:L}=e5(),R=(0,c.useRef)(null),A="s"!==r;t2(R.current,u,x);let $=(0,c.useMemo)(()=>!N||u||"s"!==r||v?N?v:"s"===r?i:v:i,[v,u,r,N,i]),Z=(0,c.useMemo)(()=>h<1?1:h>5?5:h,[h]),S=(0,c.useMemo)(()=>p&&p>0?p:void 0,[p]),z=(0,c.useMemo)(()=>m&&!!S&&S>0&&"".concat(u.length,"/").concat(S),[m,S,u.length]);return(0,o.jsxs)("div",{className:(0,g.Z)(s,t1.root),style:d,ref:t,"data-qa":w,"data-id":y,children:[(0,o.jsx)("div",{className:(0,g.Z)(t1.container,t1.states[l],t1.states[r],{[t1.states.focused]:N,[t1.states.error]:"error"===a,[t1.states.success]:"success"===a,[t1.states.disabled]:!!n}),children:(0,o.jsxs)("label",{className:t1.labelWrapper,children:[A&&(0,o.jsx)("span",{className:(0,g.Z)(t1.label,{[t1.states.active]:N||!!u||!!v}),children:i}),(0,o.jsx)("textarea",{...j,"aria-disabled":n?"true":void 0,"aria-invalid":"error"===a?"true":void 0,className:(0,g.Z)(t1.field,{[t1.states.hasLabel]:A}),rows:Z,maxLength:S,ref:R,value:u,placeholder:$,disabled:n,onFocus:e=>{E(),null==_||_(e)},onBlur:e=>{L(),null==C||C(e)},onChange:e=>{null==k||k(e.target.value||"",e)}})]})}),(b||f||z)&&(0,o.jsxs)("div",{className:t1.captionWrapper,children:[(b||f)&&(0,o.jsx)("div",{className:(0,g.Z)(t1.caption,{[t1.states.error]:"error"===a,[t1.states.success]:"success"===a,[t1.states.disabled]:!!n}),children:f}),z&&(0,o.jsx)("div",{className:t1.counter,children:z})]})]})}).displayName="Textarea",n(8354),n(3417);let t4=t3()?c.useLayoutEffect:c.useEffect;function t7(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t3()?t:window.matchMedia(e).matches}function t5(e){let{minWidth:t}=K.a[e];return function(e){let{defaultValue:t=!1,initializeWithValue:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[a,r]=(0,c.useState)(()=>n?t7(e,t):null!=t&&t);function l(){r(t7(e))}return t4(()=>{let t=window.matchMedia(e);return l(),"function"==typeof t.addListener?t.addListener(l):t.addEventListener("change",l),()=>{"function"==typeof t.removeListener?t.removeListener(l):t.removeEventListener("change",l)}},[e]),a}("screen and (min-width: ".concat(t,"px)"))}Object.freeze({divider:(0,x.g)("dropdown-divider")});let t6=(0,x.g)("dropdown-group");Object.freeze({group:t6,title:"".concat(t6,"__title"),content:"".concat(t6,"__content")});let t9=(0,x.g)("dropdown-option"),t8=Object.freeze({option:t9,slot:"".concat(t9,"__slot"),iconSlot:"".concat(t9,"__slot--icon"),wrapper:"".concat(t9,"__wrapper"),label:"".concat(t9,"__label"),caption:"".concat(t9,"__caption"),states:{danger:"".concat(t9,"--danger"),success:"".concat(t9,"--success"),focused:"".concat(t9,"--focused"),disabled:"".concat(t9,"--disabled")}});function ne(e){let{as:t,label:n,caption:a,iconLeft:r,iconRight:l,prepend:i,append:s,variant:d="default",disabled:u=!1,focused:h=!1,className:p,onClick:f,...m}=e,v=(0,g.Z)(p,t8.option,{[t8.states.focused]:h,[t8.states.success]:"success"===d,[t8.states.danger]:"danger"===d,[t8.states.disabled]:!!u}),x=(0,c.useCallback)(e=>{e.preventDefault(),u||null==f||f(e)},[u,f]);return(0,o.jsxs)(t||"div",{...m,className:v,"aria-disabled":u,onClick:x,children:[i&&(0,o.jsx)("span",{className:t8.slot,children:i}),r&&(0,o.jsx)("span",{className:(0,g.Z)(t8.slot,t8.iconSlot),children:r}),(0,o.jsxs)("div",{className:t8.wrapper,children:[(0,o.jsx)("span",{className:t8.label,children:n}),a&&(0,o.jsx)("span",{className:t8.caption,children:a})]}),l&&(0,o.jsx)("span",{className:(0,g.Z)(t8.slot,t8.iconSlot),children:l}),s&&(0,o.jsx)("span",{className:t8.slot,children:s})]})}let nt=(e,t,n)=>e?"object"!=typeof e?n:"function"==typeof t?t(e):e[t]:void 0,nn=(0,x.g)("input-autocomplete"),na={input:nn,pending:"".concat(nn,"__pending"),pendingIcon:"".concat(nn,"__pending-icon"),empty:"".concat(nn,"__empty"),emptyText:"".concat(nn,"__empty-text"),emptyDescription:"".concat(nn,"__empty-description"),options:"".concat(nn,"__options"),optionIcon:"".concat(nn,"__option-icon"),button:"".concat(nn,"__button"),states:{selected:"".concat(nn,"--selected")}};function nr(e){return c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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 nl=e=>{let{items:t,itemSize:n,renderItem:a,overscan:r=2,outerRef:l,itemsContainerClassname:i}=e,[s,d]=(0,c.useState)({start:0,end:0}),u=(0,c.useCallback)(()=>{if(!l.current)return;let e=l.current.clientHeight,a=l.current.scrollTop;d({start:Math.max(0,Math.floor(a/n)-r),end:Math.min(t.length,Math.ceil((a+e)/n)+r)})},[n,t.length,l,r]);(0,c.useLayoutEffect)(()=>{u()},[u]),(0,c.useEffect)(()=>{let e=l.current;if(!e)return;let t=()=>u();e.addEventListener("scroll",t);let n=new ResizeObserver(()=>u());return n.observe(e),()=>{e.removeEventListener("scroll",t),n.disconnect()}},[u,l]);let h=t.length*n+16,p=t.slice(s.start,s.end),f={position:"absolute",top:0,height:p.length*n,transform:"translateY(".concat(s.start*n,"px)"),width:"100%",margin:0};return(0,o.jsx)("div",{style:{position:"relative",height:h,width:"auto",margin:"-8px"},children:(0,o.jsx)("ul",{className:i,style:f,role:"listbox",children:p.map((e,t)=>a(e,s.start+t))},"options")})};function ni(e){let{inputValue:t,mappedOptions:n,pending:a=!1,optionsEmptyText:r="Нет результатов",optionsEmptyDescription:l,contentInnerRef:i,withVirtualize:s=!1,handleOptionClick:d}=e,u=(0,c.useId)();if(a)return(0,o.jsx)("div",{className:na.pending,children:(0,o.jsx)(J.P,{className:na.pendingIcon,children:(0,o.jsx)(H.S,{})})});if((null==t?void 0:t.length)&&!n.length)return(0,o.jsxs)("div",{className:na.empty,children:[(0,o.jsx)("div",{className:na.emptyText,children:r}),l&&(0,o.jsx)("div",{className:na.emptyDescription,children:l})]});let h=e=>(0,o.jsx)(ne,{role:"option","aria-selected":e.selected,as:"li",disabled:e.disabled,label:e.label,caption:e.caption,focused:e.active,onClick:()=>d(e),append:(0,o.jsx)(J.P,{className:(0,g.Z)(na.optionIcon,{[na.states.selected]:e.selected}),style:{fontSize:24},children:(0,o.jsx)(nr,{})})},JSON.stringify(e.value));return s?(0,o.jsx)(nl,{outerRef:i,items:n,itemSize:40,renderItem:h,itemsContainerClassname:na.options}):(0,o.jsx)("ul",{className:na.options,id:u,role:"listbox",children:n.map(h)},"options")}(0,c.forwardRef)((e,t)=>{let{value:n,selectedValue:a,label:r,options:l=[],state:i,icon:s,rightLabel:d,desktopMaxHeight:u,pending:h=!1,buttonLabel:p="Выбрать",optionValue:f="value",optionLabel:m="label",optionCaption:g="caption",optionDisabled:x="disabled",variant:b="primary",size:w="m",disabled:y=!1,caption:k,hasCaption:_=!1,keepFocus:C=!1,optionsEmptyText:j="Нет результатов",optionsEmptyDescription:N,withVirtualize:E,onChange:L,onSelect:R,onFocus:A,onBlur:$,onKeydown:Z,dataQa:S,dataId:z,className:T,style:I,...O}=e,[D,M]=(0,c.useState)(!1),[F,B]=(0,c.useState)(""),P=(0,c.useRef)(null),q=(0,c.useRef)(null),V=(0,c.useRef)(null),W=(0,c.useRef)(null),Y=t5("m");(0,c.useImperativeHandle)(t,()=>q.current);let U=(0,c.useMemo)(()=>Y?D&&(l.length>0||!!F||h):D,[F,Y,D,l.length,h]),Q=(0,c.useMemo)(()=>l.map((e,t)=>{let n=nt(e,f,e),r=nt(a,f,a);return{index:t,value:n,label:nt(e,m,e),caption:nt(e,g),disabled:nt(e,x),selected:r===n,original:e}}),[g,x,m,f,l,a]),K=(0,c.useMemo)(()=>Q.find(e=>{let{selected:t}=e;return t}),[Q]);(0,c.useEffect)(()=>{if(!n&&!a){B("");return}n&&B(n)},[n]),(0,c.useEffect)(()=>{a&&B(nt(a,m,a))},[]),(0,c.useEffect)(()=>{D||(K?G(K.label):X())},[D]);let G=e=>{B(e),null==L||L(e)},X=e=>{null==R||R(e)},J=()=>{M(!0)},ee=()=>{M(!1)},et=e=>{null==$||$(e)};return(0,o.jsx)("div",{ref:t,className:na.input,"data-id":z,"data-qa":S,children:(0,o.jsxs)(nK,{opened:U,onToggle:M,width:"inherit",placement:"bottom",mobileFullHeight:!0,desktopMaxHeight:u,footer:Y||!a?void 0:(0,o.jsx)(H.B,{label:p,disabled:!a,className:na.button,onClick:()=>{ee()}}),heading:Y?void 0:(0,o.jsx)(tr,{inputRef:V,className:T,style:I,value:F,label:r,rightLabel:d,icon:s,state:i,caption:k,hasCaption:_,onChange:G,onBlur:et,...O}),dataQa:(0,v.g)("".concat(S,"-dropdown"),!!S),children:[(0,o.jsx)(n4,{asChild:!0,children:(0,o.jsx)(tr,{value:F,label:r,rightLabel:d,icon:s,size:w,variant:b,state:i,disabled:y,caption:k,hasCaption:_,onClick:void 0,onChange:G,onFocus:e=>{J(),Y||(e.preventDefault(),setTimeout(()=>{var e;null==(e=V.current)||e.focus()},100)),null==A||A(e)},onBlur:et,onKeyDown:e=>{"Tab"===e.key&&ee(),null==Z||Z(e)},ref:P,inputRef:q,...O,dataQa:(0,v.g)("".concat(S,"-dropdown-input"),!!S)})}),(0,o.jsx)(nJ,{contentInnerRef:W,children:(0,o.jsx)(ni,{inputValue:F,mappedOptions:Q,pending:h,optionsEmptyText:j,optionsEmptyDescription:N,handleOptionClick:e=>{var t;if(G(e.label),X(e.original),Y){if(C){null==(t=q.current)||t.focus();return}ee()}},contentInnerRef:W,withVirtualize:E})})]})})}).displayName="InputAutocomplete";let ns="dd.MM.yyyy",no=(e,t)=>((e<1||e>12)&&console.warn("Месяц должен быть в диапазоне от 1 до 12"),new Date(t,e,0).getDate()),nc=e=>{let[t,n,a]=e.split(".").map(Number),r=no(n,a||1900);return[(t>r?r:t).toString().padStart(2,"0"),n.toString().padStart(2,"0"),a.toString().padStart(4,"0").substring(0,4)].join(".")};(0,c.forwardRef)((e,t)=>{let{value:n=null,autoFocus:a=!1,onChange:r,onKeyDown:l,...i}=e,[s,d]=(0,c.useState)(""),{ref:u,setValue:h}=(0,tc.Cj)({mask:Date,autofix:!0,pattern:"d.`m.`Y",validate:()=>{},placeholderChar:" ",prepare:e=>!e||e.length<10||e.includes(" ")?e:nc(e),overwrite:!1,blocks:{d:{mask:tc.LV.MaskedRange,from:1,to:31,maxLength:2},m:{mask:tc.LV.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:tc.LV.MaskedRange,from:1900,to:2099,maxLength:4}}},{onAccept:e=>{if(e.length<10||e.includes(" "))null!==n&&(null==r||r(null,""));else{let t=nc(e),n=(0,tl.Z)(t,ns,new Date);if((0,ti.Z)(n)){null==r||r(n,t),d(t);return}}d(e)}});return(0,c.useEffect)(()=>{if(n instanceof Date&&(0,ti.Z)(n)){let e=(0,ts.Z)(n,ns);h(e),d(e)}else"string"==typeof n&&(0,to.Z)(n,"dd.mm.yyyy")&&(h(n),d(n))},[n,h]),(0,c.useImperativeHandle)(t,()=>u.current),(0,o.jsx)(tr,{...i,autoFocus:a,inputRef:u,value:s,inputMode:"numeric",onKeyDown:e=>{("Escape"===e.key||"Esc"===e.key)&&(e.preventDefault(),d(""),h(""),null==r||r(null,"")),null==l||l(e)},maskPlaceholder:"дд.мм.гггг"})}).displayName="InputDate";let nd=(0,c.forwardRef)((e,t)=>{let{maskOpts:n,value:a="",autoFocus:r=!1,onChange:l,onKeyDown:i,...s}=e,[d,u]=(0,c.useState)(""),{ref:h,setValue:p,unmaskedValue:f}=(0,tc.Cj)(n,{onAccept:(e,t)=>{u(e),null==l||l(t.unmaskedValue,e)}});return(0,c.useEffect)(()=>{a!==f&&(p(a),u(a))},[a,p,f]),(0,c.useImperativeHandle)(t,()=>h.current),(0,o.jsx)(tr,{...s,autoFocus:r,inputRef:h,value:d,onKeyDown:e=>{("Escape"===e.key||"Esc"===e.key)&&(e.preventDefault(),p(""),u(""),null==l||l("","")),null==i||i(e)}})});nd.displayName="InputMasked";let nu=e=>{let[t,n]=(0,c.useState)(e),a=(0,c.useRef)([]),r=(0,c.useRef)(t),l=(0,c.useCallback)((e,t)=>{t&&a.current.unshift(t),n(t=>{let n={...t,...e};return r.current=n,n})},[]),i=(0,c.useCallback)(()=>r.current,[]);return(0,c.useEffect)(()=>{a.current[0]&&(a.current[0](t),a.current.shift())},[t]),[t,l,i]},nh=e=>{let t=(0,c.useRef)();return(0,c.useEffect)(()=>{t.current=JSON.parse(JSON.stringify(e))},[e]),t.current},np=(0,x.g)("range-slider"),nf=Object.freeze({range:np,vertical:"".concat(np,"--vertical"),disabled:"".concat(np,"--disabled"),track:"".concat(np,"__track"),thumb:"".concat(np,"__thumb"),thumbDrag:"".concat(np,"__thumb--drag"),label:"".concat(np,"__label"),mark:"".concat(np,"__mark"),legend:"".concat(np,"__legend"),legendItem:"".concat(np,"__legend-item")}),nm=e=>{let t=e.toString().split(".")[1];return t?t.length:0},ng=e=>e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length,nv=(e,t,n)=>{let a=Number(((t-e)/n).toFixed(8));return parseInt(a.toString(),10)===a},nx=(e,t,n,a,r,l,i)=>{if(e=Math.round(1e11*e)/1e11,!l){let n=i[t-1],a=i[t+1];if(n&&n>e)return n;if(a&&a<e)return a}if(e>a)return a;if(e<n)return n;let s=Math.floor(1e11*e-1e11*n)%Math.floor(1e11*r),o=Math.floor(1e11*e-Math.abs(s)),c=0===s?e:o/1e11,d=Math.abs(s/1e11)<r/2?c:c+r,u=nm(r);return parseFloat(d.toFixed(u))},nb=(e,t,n)=>(e-t)/(n-t),nw=e=>e===nB.Up,ny=(e,t,n)=>{if(t>=n)throw RangeError("min (".concat(t,") is equal/bigger than max (").concat(n,")"));if(e<t)throw RangeError("value (".concat(e,") is smaller than min (").concat(t,")"));if(e>n)throw RangeError("value (".concat(e,") is bigger than max (").concat(n,")"))},nk=e=>{if(!(e.length<2)&&!e.slice(1).every((t,n)=>e[n]<=t))throw RangeError("values={[".concat(e,"]} needs to be sorted when allowOverlap={false}"))},n_=e=>{let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10),bottom:parseInt(t.marginBottom,10),left:parseInt(t.marginLeft,10),right:parseInt(t.marginRight,10)}},nC=e=>{let t=window.getComputedStyle(e);return{top:parseInt(t.paddingTop,10)+parseInt(t.borderTopWidth,10),bottom:parseInt(t.paddingBottom,10)+parseInt(t.borderBottomWidth,10),left:parseInt(t.paddingLeft,10)+parseInt(t.borderLeftWidth,10),right:parseInt(t.paddingRight,10)+parseInt(t.borderRightWidth,10)}},nj=(e,t,n)=>{let a=n?-1:1;e.forEach((e,n)=>nE(e,a*t[n].x,t[n].y))},nN=(e,t,n,a)=>{let r=0,l=nS(e[0],t,n,a);for(let i=1;i<e.length;i++){let s=nS(e[i],t,n,a);s<l&&(l=s,r=i)}return r},nE=(e,t,n)=>{e.style.transform="translate(".concat(t,"px, ").concat(n,"px)")},nL=e=>{let t;let n=null;return function(){for(var a=arguments.length,r=Array(a),l=0;l<a;l++)r[l]=arguments[l];t=r,n||(n=requestAnimationFrame(()=>{n=null,e(...t)}))}},nR=(e,t,n)=>{let a=e.slice(0);return a[t]=n,a},nA=e=>{let{values:t,colors:n,min:a,max:r,direction:l=nB.Right}=e,i=t.slice(0).sort((e,t)=>e-t).map(e=>(e-a)/(r-a)*100).reduce((e,t,a)=>"".concat(e,", ").concat(n[a]," ").concat(t,"%, ").concat(n[a+1]," ").concat(t,"%"),"");return"linear-gradient(".concat(l,", ").concat(n[0]," 0%").concat(i,", ").concat(n[n.length-1]," 100%)")},n$=()=>null,nZ=()=>{throw Error("Did not expect to get here")},nS=(e,t,n,a)=>{let{left:r,top:l,width:i,height:s}=e.getBoundingClientRect();return nw(a)?Math.abs(n-(l+s/2)):Math.abs(t-(r+i/2))},nz=(e,t,n)=>{let a=["#C2C2C6",...Array(e-1||1).fill(n?"#A5A7AB":"#525BBB"),"#C2C2C6"];return 1===e&&(t?a.pop():a.shift()),a},nT=["ArrowRight","ArrowUp","k","PageUp"],nI=["ArrowLeft","ArrowDown","j","PageDown"],nO=e=>{let{props:t,children:n,propValues:a,disabled:r}=e;return(0,o.jsx)("div",{className:(0,g.Z)(nf.range,{[nf.vertical]:a.direction===nB.Up,[nf.disabled]:r},t.className),onMouseDown:t.onMouseDown,onTouchStart:t.onTouchStart,style:{...t.style},"data-id":t.dataId,"data-qa":t.dataQa,children:(0,o.jsx)("div",{ref:t.ref,className:(0,g.Z)(nf.track),style:{background:nA({values:a.values,colors:nz(a.values.length,!!a.rtl,r),min:a.min||0,max:a.max||100,direction:a.direction||nB.Right,rtl:!!a.rtl})},children:n})})},nD=e=>{let{props:t,isDragged:n,formattedValue:a}=e,{key:r,...l}=t;return(0,o.jsxs)("div",{...l,style:t.style,className:(0,g.Z)(nf.thumb,t.className,{[nf.thumbDrag]:n}),children:[(0,o.jsx)("label",{className:(0,g.Z)(nf.label),children:a}),(0,o.jsx)("span",{})]},r)},nM=e=>{let{props:t,index:n,propValues:a}=e,r={width:"2px",height:n%2?"12px":"16px",backgroundColor:n*(a.step||1)+(a.min||0)<a.values[0]?"#525BBB":"#D2D3D5"},l={width:n%2?"12px":"16px",height:"2px",backgroundColor:n*(a.step||1)>(a.max||100)-a.values[0]?"#525BBB":"#D2D3D5"},i=a.direction===nB.Right?r:l,{key:s,...c}=t;return 1===a.values.length&&(0,o.jsx)("div",{...c,className:(0,g.Z)(t.className),style:{...t.style,...i}},s)},nF=(0,c.forwardRef)((e,t)=>{let{step:n=1,direction:a=nB.Right,rtl:r=!1,disabled:l=!1,allowOverlap:i=!1,draggableTrack:s=!1,min:d=0,max:u=100,legend:h=[],onChange:p=()=>null,renderTrack:f=nO,renderThumb:m=nD,renderMark:v=nM,showMarks:x=!1,onFinalChange:b,formatValue:w=e=>String(e),className:y,dataQa:k,dataId:_,...C}=e,j=(0,c.useMemo)(()=>({...C,step:n,direction:a,rtl:r,disabled:l,allowOverlap:i,draggableTrack:s,min:d,max:u,legend:h}),[C,n,a,r,l,i,s,d,u,h]),N=(0,c.useRef)(j);(0,c.useEffect)(()=>{N.current=j},[j]);let E=(0,c.useRef)(null),L=(0,c.useRef)(Array(C.values.length).fill(null)),R=(0,c.useRef)(),A=(0,c.useRef)([]),$=(0,c.useRef)(),Z=(0,c.useRef)(),S=nL(e=>{if(e.preventDefault(),!(1&e.buttons))return T(e);et(e.clientX,e.clientY)}),z=nL(e=>{e.preventDefault(),et(e.touches[0].clientX,e.touches[0].clientY)}),T=e=>{let{draggedThumbIndex:t,draggedTrackPos:n}=M();if(e.preventDefault(),document.removeEventListener("mousemove",S),document.removeEventListener("touchmove",z),document.removeEventListener("mouseup",I),document.removeEventListener("touchend",I),document.removeEventListener("touchcancel",I),-1===t&&-1===n[0]&&-1===n[1])return null;D({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},()=>{en()})},I=nL(T),[O,D,M]=nu({draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:Array(C.values.length).fill(0).map((e,t)=>t),isChanged:!1,markOffsets:[],legendOffsets:[]}),F=e=>{if(!x){$.current=void 0,R.current=void 0;return}$.current=(e.max-e.min)/e.step,R.current=[]},B=e=>{if(!e.legend||!e.legend.length)return},P=()=>{nj(H(),V(),N.current.rtl),W(),Y()},q=e=>{if(N.current.disabled)return;let t=ng(e);if(!t&&0!==e.button)return;let n=K(e);if(-1===n)return;t?G():X();let{thumbZIndexes:a}=M();D({draggedThumbIndex:n,thumbZIndexes:a.map((e,t)=>t===n?Math.max(...a):e<=a[n]?e:e-1)})},H=()=>E.current?Array.from(E.current.children).filter(e=>e.hasAttribute("aria-valuenow")):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[]),V=()=>{let e=N.current.values,t=E.current;if(!t)return[];let n=t.getBoundingClientRect(),a=nC(t);return H().map((t,r)=>{let l={x:0,y:0},i=t.getBoundingClientRect(),s=n_(t);switch(N.current.direction){case nB.Right:return l.x=-((s.left+a.left)*1),l.y=-(((i.height-n.height)/2+a.top)*1),l.x+=n.width*nb(e[r],N.current.min,N.current.max)-i.width/2,l;case nB.Up:return l.x=-(((i.width-n.width)/2+s.left+a.left)*1),l.y=-a.left,l.y+=n.height-n.height*nb(e[r],N.current.min,N.current.max)-i.height/2,l;default:return nZ()}})};t&&"function"!=typeof t&&(t.current=E.current),t&&"function"!=typeof t&&t.current&&(t.current.getThumbs=H,t.current.getOffsets=V);let W=()=>{if(!x||!E.current||!$.current||!R.current||null===E.current)return;let e=window.getComputedStyle(E.current),t=parseInt(e.width,10),n=parseInt(e.height,10),a=parseInt(e.paddingLeft,10),r=parseInt(e.paddingTop,10),l=[];for(let e=0;e<$.current+1;e++){let i=9999,s=9999;if(R.current[e]){let t=R.current[e].getBoundingClientRect();i=t.height,s=t.width}N.current.direction===nB.Right?l.push([Math.round(t/$.current*e+a-s/2),-Math.round((i-n)/2)]):l.push([Math.round(n/$.current*e+r-i/2),-Math.round((s-t)/2)])}D({markOffsets:l})},Y=()=>{var e;if(!N.current.legend||!N.current.legend.length||!E.current||!A.current||N.current.rtl||a!==nB.Right)return;let t=window.getComputedStyle(E.current),n=parseInt(t.width,10),r=parseInt(t.paddingLeft,10),l=n/((N.current.max-N.current.min)/N.current.step),i=[];for(let t=0;t<N.current.legend.length;t++){let a=9999,s=9999;if(A.current[t]){let n=null==(e=A.current[t])?void 0:e.getBoundingClientRect();a=(null==n?void 0:n.height)||a,s=(null==n?void 0:n.width)||s}let o=N.current.legend[t],c=Math.round(((nP(o)?o.value:o)-N.current.min)/N.current.step*l+r-s/2);i.push([Math.min(Math.max(c,0),n-s),Math.round(a/5)])}D({legendOffsets:i})};(0,c.useEffect)(()=>{var e;F(N.current),B(N.current),Z.current=window.ResizeObserver?new window.ResizeObserver(P):{observe:()=>window.addEventListener("resize",P),unobserve:()=>window.removeEventListener("resize",P)},document.addEventListener("touchstart",q,{passive:!1}),document.addEventListener("mousedown",q,{passive:!1}),i||nk(C.values),C.values.forEach(e=>ny(e,d,u));let t=E.current;return t&&(null==(e=Z.current)||e.observe(t)),nj(H(),V(),r),W(),Y(),C.values.forEach(e=>{nv(d,e,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 e;document.removeEventListener("mousedown",q,{passive:!1}),document.removeEventListener("mousemove",S),document.removeEventListener("touchmove",z),document.removeEventListener("touchstart",q),document.removeEventListener("mouseup",I),document.removeEventListener("touchend",I),t&&(null==(e=Z.current)||e.unobserve(t))}},[j.min,j.max]);let U=nh(j),Q=nh(O);(0,c.useEffect)(()=>{((null==U?void 0:U.max)!==u||(null==U?void 0:U.min)!==d||(null==U?void 0:U.step)!==n||JSON.stringify(null==U?void 0:U.legend)!==JSON.stringify(h))&&(F(N.current),B(N.current)),nj(H(),V(),r),((null==U?void 0:U.max)!==u||(null==U?void 0:U.min)!==d||(null==U?void 0:U.step)!==n||JSON.stringify(null==U?void 0:U.legend)!==JSON.stringify(h)||(null==Q?void 0:Q.markOffsets.length)!==O.markOffsets.length||(null==Q?void 0:Q.legendOffsets.length)!==O.legendOffsets.length)&&(W(),Y(),C.values.forEach(e=>{nv(d,e,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,O]);let K=e=>H().findIndex(t=>t===e.target||t.contains(e.target)),G=()=>{document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",I,{passive:!1}),document.addEventListener("touchcancel",I,{passive:!1})},X=()=>{document.addEventListener("mousemove",S),document.addEventListener("mouseup",I)},J=(e,t)=>nx(e,t,N.current.min,N.current.max,N.current.step,N.current.allowOverlap,N.current.values),ee=e=>{JSON.stringify(e)!==JSON.stringify(N.current.values)&&(N.current.values=e,p(e))},et=(e,t)=>{let{draggedThumbIndex:n,draggedTrackPos:a}=M(),r=N.current.values;if(-1===n&&-1===a[0]&&-1===a[1])return null;let l=E.current;if(!l)return null;let i=l.getBoundingClientRect(),s=nw(N.current.direction)?i.height:i.width;if(-1!==a[0]&&-1!==a[1]){let n=e-a[0],l=t-a[1],i=0;switch(N.current.direction){case nB.Right:i=n/s*(N.current.max-N.current.min);break;case nB.Up:i=l/s*(N.current.max-N.current.min);break;default:nZ()}if(N.current.rtl&&(i*=-1),Math.abs(i)>=N.current.step/2){for(let e=0;e<L.current.length;e++){if(r[e]===N.current.max&&1===Math.sign(i)||r[e]===N.current.min&&-1===Math.sign(i))return;let t=r[e]+i;t>N.current.max?i=N.current.max-r[e]:t<N.current.min&&(i=N.current.min-r[e])}let n=r.slice(0);for(let e=0;e<L.current.length;e++)n=nR(n,e,J(r[e]+i,e));D({draggedTrackPos:[e,t]}),ee(n)}}else{let a=0;switch(N.current.direction){case nB.Right:a=(e-i.left)/s*(N.current.max-N.current.min)+N.current.min;break;case nB.Up:a=(s-(t-i.top))/s*(N.current.max-N.current.min)+N.current.min;break;default:nZ()}N.current.rtl&&(a=N.current.max+N.current.min-a),Math.abs(r[n]-a)>=N.current.step/2&&ee(nR(r,n,J(a,n)))}},en=()=>{D({isChanged:!1});let e=N.current.values;b&&b(e)},ea=e=>{let t=N.current.values,{isChanged:n}=M(),a=K(e.nativeEvent),r=N.current.rtl?-1:1;-1!==a&&(nT.includes(e.key)?(e.preventDefault(),D({draggedThumbIndex:a,isChanged:!0}),ee(nR(t,a,J(t[a]+r*("PageUp"===e.key?10*N.current.step:N.current.step),a)))):nI.includes(e.key)?(e.preventDefault(),D({draggedThumbIndex:a,isChanged:!0}),ee(nR(t,a,J(t[a]-r*("PageDown"===e.key?10*N.current.step:N.current.step),a)))):"Tab"===e.key?D({draggedThumbIndex:-1},()=>{n&&en()}):n&&en())},er=()=>{let{isChanged:e}=M();D({draggedThumbIndex:-1},()=>{e&&en()})},el=e=>{let{values:t}=N.current,n=t.reduce((n,a,r)=>{let l=Math.abs(t[n]-e);return Math.abs(a-e)<=l?r:n},0);ee(t.map((t,a)=>a===n?e:t))};return(0,o.jsxs)(o.Fragment,{children:[f({props:{style:{cursor:O.draggedThumbIndex>-1?"grabbing":s?nw(a)?"ns-resize":"ew-resize":1!==C.values.length||l?"inherit":"pointer"},onMouseDown:l?n$:e=>{var t;if(0!==e.button)return;let n=N.current.values;if(e.persist(),e.preventDefault(),X(),n.length>1&&N.current.draggableTrack){if(L.current.some(t=>null==t?void 0:t.contains(e.target)))return;D({draggedTrackPos:[e.clientX,e.clientY]},()=>et(e.clientX,e.clientY))}else{let n=nN(L.current.map(e=>e),e.clientX,e.clientY,N.current.direction);null==(t=L.current[n])||t.focus(),D({draggedThumbIndex:n},()=>et(e.clientX,e.clientY))}},onTouchStart:l?n$:e=>{var t;let n=N.current.values;if(e.persist(),G(),n.length>1&&N.current.draggableTrack){if(L.current.some(t=>null==t?void 0:t.contains(e.target)))return;D({draggedTrackPos:[e.touches[0].clientX,e.touches[0].clientY]},()=>et(e.touches[0].clientX,e.touches[0].clientY))}else{let n=nN(L.current.map(e=>e),e.touches[0].clientX,e.touches[0].clientY,N.current.direction);null==(t=L.current[n])||t.focus(),D({draggedThumbIndex:n},()=>et(e.touches[0].clientX,e.touches[0].clientY))}},ref:e=>{E.current=e},className:(0,g.Z)(y),dataQa:k,dataId:_},isDragged:O.draggedThumbIndex>-1,disabled:l,children:[...O.markOffsets.map((e,t)=>{let n={left:"".concat(e[0],"px"),marginTop:"".concat(e[1],"px")},r={top:"".concat(e[0],"px"),marginLeft:"".concat(e[1],"px")};return v({props:{style:a===nB.Right?n:r,key:"mark".concat(t),ref:e=>{e&&R.current&&(R.current[t]=e)},className:nf.mark},index:t,propValues:j})}),...C.values.map((e,t)=>{let n=O.draggedThumbIndex===t;return m({index:t,value:e,formattedValue:w(e),isDragged:n,props:{style:{zIndex:O.thumbZIndexes[t],cursor:l?"inherit":n?"grabbing":"grab"},key:t,tabIndex:l?void 0:0,"aria-valuemax":i?u:C.values[t+1]||u,"aria-valuemin":i?d:C.values[t-1]||d,"aria-valuenow":e,draggable:!1,ref:e=>{e&&(L.current[t]=e)},role:"slider",onKeyDown:l?n$:ea,onKeyUp:l?n$:er,className:nf.thumb}})})],propValues:j}),j.direction===nB.Right&&(0,o.jsx)("div",{className:nf.legend,children:h.map((e,t)=>{var n,a;let r;return r=nP(e)?e.value:e,(0,o.jsx)("button",{type:"button",ref:e=>{Array.isArray(A.current)&&(A.current[t]=e)},className:(0,g.Z)(nf.legendItem),style:{left:"".concat(null==(n=O.legendOffsets[t])?void 0:n[0],"px"),marginTop:"".concat(null==(a=O.legendOffsets[t])?void 0:a[1],"px")},tabIndex:l?-1:0,onClick:l?void 0:()=>el(r),children:nP(e)?e.label:w(r)},"legend".concat(t))})})]})});nF.displayName="RangeSlider";var nB=((r=nB||{}).Right="to right",r.Up="to top",r);let nP=e=>"object"==typeof e,nq=(0,x.g)("input-range"),nH={inputRange:nq,input:"".concat(nq,"__input"),slider:"".concat(nq,"__slider")};(0,c.forwardRef)((e,t)=>{let{value:n,step:a=1,min:r=0,max:l=100,disabled:i,ticks:s=[],className:d,inputClassname:u,sliderClassname:h,size:p="m",decimals:f="auto",decimalsCount:m=2,tooltip:v=e=>e,dataId:x,dataQa:b,autoFocus:w=!1,style:y,onChange:k,onBlur:_,...C}=e,j=(0,c.useMemo)(()=>"number"!=typeof n||n<r?r:n>l?l:n,[n,r,l]),[N,E]=(0,eq.u)(j||r,n),[L,R]=(0,c.useState)(j?[j]:[r]),A=(0,c.useRef)(null),$=(0,c.useRef)(null);(0,c.useImperativeHandle)(t,()=>({inputRef:A.current,sliderRef:$.current}),[$,A]);let Z=(0,c.useCallback)(e=>{if(E(e),!e||e<r){R([r]);return}if(e>l){R([l]);return}R([e]),null==k||k(e)},[l,r,k,E]);(0,c.useEffect)(()=>{"number"==typeof n&&Z(n)},[n]);let S=(0,c.useCallback)(e=>{N||(R([r]),E(r),null==k||k(r)),null==_||_(e)},[N,r,_,E,k]),z=(0,c.useCallback)(e=>{var t;E(e[0]),R(e),null==(t=null==A?void 0:A.current)||t.focus(),null==k||k(e[0])},[k,E]),T=(0,c.useCallback)(()=>{var e;null==(e=null==A?void 0:A.current)||e.blur()},[]);return(0,o.jsxs)("div",{className:(0,g.Z)(d,nH.inputRange),style:y,"data-qa":b,"data-id":x,children:[(0,o.jsx)(t$,{...C,autoFocus:w,value:N,withoutControls:!0,min:r,max:l,disabled:i,step:a,ref:A,className:(0,g.Z)(u,nH.input),size:p,decimals:f,decimalsCount:m,onChange:Z,onBlur:S}),(0,o.jsx)(nF,{values:L,min:r,max:l,legend:s,step:Math.abs(a),disabled:i,ref:$,className:(0,g.Z)(h,nH.slider),formatValue:v,onChange:z,onFinalChange:T})]})}).displayName="InputRange",(0,c.forwardRef)((e,t)=>{let{value:n="",autoFocus:a=!1,onChange:r,onKeyDown:l,dataQa:i,dataId:s,...d}=e,[u,h]=(0,c.useState)(""),{ref:p,unmaskedValue:f,setValue:m}=(0,tc.Cj)({mask:"+{7} (000) 000-00-00"},{onAccept:(e,t)=>{h(e),null==r||r(t.unmaskedValue,e)}});return(0,c.useEffect)(()=>{n!==f&&m(n)},[n,m,f]),(0,c.useImperativeHandle)(t,()=>p.current),(0,o.jsx)(tr,{...d,autoFocus:a,dataQa:i,dataId:s,inputRef:p,value:u,maskPlaceholder:"+7 (000) 000-00-00",onKeyDown:e=>{("Escape"===e.key||"Esc"===e.key)&&(e.preventDefault(),m(""),h(""),null==r||r("","")),null==l||l(e)}})}).displayName="InputTel";let nV=(0,x.g)("modal"),nW=Object.freeze({modal:nV,overlay:"".concat(nV,"__overlay"),withoutFooter:"".concat(nV,"--without-footer"),noContent:"".concat(nV,"--no-content"),open:"".concat(nV,"--open"),overlayOpen:"".concat(nV,"__overlay--open"),height:{medium:"".concat(nV,"--height-medium"),full:"".concat(nV,"--height-full")},size:{s:"".concat(nV,"--s"),m:"".concat(nV,"--m"),l:"".concat(nV,"--l"),xl:"".concat(nV,"--xl")},header:"".concat(nV,"__header"),headerText:"".concat(nV,"__header-text"),headerTitle:"".concat(nV,"__header-title"),headerSubtitle:"".concat(nV,"__header-subtitle"),closeIcon:"".concat(nV,"__close-icon"),backButton:"".concat(nV,"__back-button"),backButtonText:"".concat(nV,"__back-button-text"),headerStates:{centered:"".concat(nV,"__header--centered"),withLongBtn:"".concat(nV,"__header--with-long-btn"),defaultHeight:"".concat(nV,"__header--default-height")},content:"".concat(nV,"__content"),withoutPadding:"".concat(nV,"__content--without-padding"),withScroll:"".concat(nV,"__content--with-scroll"),footer:"".concat(nV,"__footer"),footerContainer:"".concat(nV,"__footer-container"),footerBtn:"".concat(nV,"__footer-btn"),footerDescription:"".concat(nV,"__footer-description"),divider:"".concat(nV,"__divider"),dividerTop:"".concat(nV,"__divider--top"),dividerBottom:"".concat(nV,"__divider--bottom")}),nY=e=>{let{primaryBtnText:t,onPrimary:n,secondaryBtnText:a,onSecondary:r,thirdBtnText:l,onThird:i,description:s,children:c,noContent:d,dataQa:u}=e;return(0,o.jsxs)("div",{"data-qa":(0,v.g)("".concat(u,"-footer"),!!u),className:(0,g.Z)(nW.footer,{[nW.noContent]:d}),children:[!d&&(0,o.jsx)("div",{className:(0,g.Z)(nW.divider,nW.dividerTop)}),c||(0,o.jsxs)("div",{className:nW.footerContainer,children:[l&&(0,o.jsx)(H.B,{dataQa:(0,v.g)("".concat(u,"-footer-third-btn"),!!u),label:l,variant:"secondary",size:"s",className:nW.footerBtn,onClick:i}),a&&(0,o.jsx)(H.B,{dataQa:(0,v.g)("".concat(u,"-footer-secondary-btn"),!!u),label:a,variant:"secondary",size:"s",className:nW.footerBtn,onClick:r}),t&&(0,o.jsx)(H.B,{dataQa:(0,v.g)("".concat(u,"-footer-primary-btn"),!!u),label:t,size:"s",className:nW.footerBtn,onClick:n})]}),s&&(0,o.jsx)("span",{"data-qa":(0,v.g)("".concat(u,"-footer-description"),!!u),className:nW.footerDescription,children:s})]})},nU=e=>{let{text:t,title:n,subtitle:a,align:r="left",backBtnVariant:l,onBack:i,onClose:s,noContent:c,dataQa:d,withoutCloseBtn:u=!1}=e;return(0,o.jsxs)("div",{"data-qa":(0,v.g)("".concat(d,"-header"),!!d),className:(0,g.Z)(nW.header,{[nW.headerStates.centered]:"center"===r||!!l,[nW.headerStates.withLongBtn]:"long"===l,[nW.headerStates.defaultHeight]:!t&&!n&&!a}),children:[t&&(0,o.jsx)("span",{"data-qa":(0,v.g)("".concat(d,"-header-text"),!!d),className:nW.headerText,children:t}),n&&(0,o.jsx)("span",{"data-qa":(0,v.g)("".concat(d,"-header-title"),!!d),className:nW.headerTitle,children:n}),a&&(0,o.jsx)("span",{"data-qa":(0,v.g)("".concat(d,"-header-subtitle"),!!d),className:nW.headerSubtitle,children:a}),!u&&(0,o.jsx)("button",{"data-qa":(0,v.g)("".concat(d,"-header-close"),!!d),type:"button",className:nW.closeIcon,onClick:s,children:(0,o.jsx)(J.P,{children:(0,o.jsx)(ei,{})})}),l&&(0,o.jsxs)("button",{"data-qa":(0,v.g)("".concat(d,"-header-back"),!!d),type:"button",className:nW.backButton,onClick:i,children:[(0,o.jsx)(J.P,{children:(0,o.jsx)(ev.S,{})}),"long"===l&&(0,o.jsx)("span",{className:nW.backButtonText,children:"Назад"})]}),!c&&(0,o.jsx)("div",{className:(0,g.Z)(nW.divider,nW.dividerBottom)})]})},nQ=(0,c.forwardRef)((e,t)=>{let{header:n,footer:a,open:r=!1,size:l="m",noPadding:i=!1,height:s="full",onClose:d,children:u,className:h,style:f,dataQa:m,dataId:x,dismissDisabled:b=!1,...w}=e,[y,k]=(0,c.useState)(!1),[_,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 k(!0),j.current=requestAnimationFrame(()=>{requestAnimationFrame(()=>{C(!0)})}),()=>{j.current&&cancelAnimationFrame(j.current)};{C(!1);let e=setTimeout(()=>{k(!1)},300);return()=>{clearTimeout(e),j.current&&cancelAnimationFrame(j.current)}}},[r]);let N=()=>{C(!1);let e=setTimeout(()=>{null==d||d(),k(!1)},300);return()=>clearTimeout(e)},{context:E}=(0,p.YF)({open:y,onOpenChange:e=>{e||N()}}),L=(0,p.bQ)(E,{outsidePressEvent:"mousedown",outsidePress:!b,escapeKey:!b}),R=(0,p.qs)(E,{role:"dialog"}),{getFloatingProps:A}=(0,p.NI)([L,R]),[$,Z]=(0,c.useState)(!1),S=(0,c.useCallback)(e=>{e&&new ResizeObserver(()=>{Z(e.scrollHeight>e.clientHeight)}).observe(e)},[]);return y?(0,o.jsx)(p.ll,{id:"finkit-modals",children:(0,o.jsx)(p.y0,{lockScroll:!0,className:(0,g.Z)(nW.overlay,{[nW.overlayOpen]:_}),children:(0,o.jsx)(p.wD,{context:E,children:(0,o.jsxs)("div",{ref:t,className:(0,g.Z)(nW.modal,nW.size[l],nW.height[s],{[nW.withoutFooter]:!(null==a?void 0:a.primaryBtnText)&&!(null==a?void 0:a.children),[nW.open]:_},h),style:f,...A(),...w,"data-id":x,"data-qa":m,children:[(0,o.jsx)(nU,{...n,dataQa:m,noContent:!u,onClose:N}),u&&(0,o.jsx)("div",{"data-qa":(0,v.g)("".concat(m,"-content"),!!m),ref:S,className:(0,g.Z)(nW.content,{[nW.withoutFooter]:!(null==a?void 0:a.primaryBtnText)&&!(null==a?void 0:a.children),[nW.withoutPadding]:i,[nW.withScroll]:$}),children:u}),((null==a?void 0:a.primaryBtnText)||(null==a?void 0:a.children))&&(0,o.jsx)(nY,{...a,dataQa:m,noContent:!u})]})})})}):null});nQ.displayName="Modal",(0,x.g)("select");let nK=e=>{let{children:t,...n}=e,a=function(){let{placement:e="bottom",width:t="auto",desktopMaxHeight:n,mobileFullHeight:a=!1,title:r,description:l,opened:i,onToggle:s,heading:o,footer:d,dataQa:u,dataId:h}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[g,v]=(0,c.useState)(!1),x=null!=i?i:g,b=null!=s?s:v,w=(0,p.YF)({open:x,onOpenChange:b,placement:e,whileElementsMounted:f.Me,middleware:[(0,m.cv)(8),(0,m.RR)({fallbackAxisSideDirection:"start"}),(0,m.uY)()]});return(0,c.useMemo)(()=>({open:x,setOpen:b,...w,width:t,desktopMaxHeight:n,title:r,description:l,heading:o,footer:d,mobileFullHeight:a,dataQa:u,dataId:h}),[x,b,w,t,n,r,l,o,d,a,u,h])}(n);return(0,o.jsx)(n0.Provider,{value:a,children:t})};nK.displayName="Dropdown";let nG=(0,x.g)("dropdown"),nX=Object.freeze({dropdown:nG,overlay:"".concat(nG,"__overlay"),mobileHeading:"".concat(nG,"__mobile-heading"),heading:"".concat(nG,"__heading"),title:"".concat(nG,"__title"),description:"".concat(nG,"__description"),content:"".concat(nG,"__content"),contentInner:"".concat(nG,"__content-inner"),footer:"".concat(nG,"__footer"),close:"".concat(nG,"__close"),closeIcon:"".concat(nG,"__close-icon"),states:{auto:"".concat(nG,"--auto"),fullHeight:"".concat(nG,"--full-height")}}),nJ=(0,c.forwardRef)((e,t)=>{let{style:n,contentInnerRef:a,...r}=e,{open:l,context:i,width:s,floatingStyles:d,refs:u,heading:h,title:f,description:m,footer:x,desktopMaxHeight:b,mobileFullHeight:w,dataQa:y,dataId:k,setOpen:_}=n1(),C=(0,p.qq)([u.setFloating,t]),j=(0,c.useRef)(null),N=t5("s"),{isMounted:E,styles:L}=(0,p.Y_)(i,{initial:{opacity:.2,transform:N?"translate(0, 0)":"translate(0, 100%)"},open:{opacity:1,transform:"translate(0, 0)"},duration:{open:300,close:100}}),R=(0,c.useMemo)(()=>{var e,t;if(N)return{width:"inherit"===s?null==(t=null==(e=null==u?void 0:u.reference)?void 0:e.current)?void 0:t.clientWidth:"auto"===s?void 0:s,transform:N?d.transform:void 0,...n}},[d.transform,N,null==u?void 0:u.reference,n,s]),A=(0,c.useCallback)(()=>{let e=u.floating.current;if(e){if(N||!l){(0,eY.tG)(e);return}(0,eY.Qp)(e)}},[N,l,u.floating]);return(0,c.useEffect)(()=>{let e=e=>{let{target:t}=e;!l||[j.current,u.reference.current].some(e=>e===t||e&&e.contains(t))||_(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l,u.reference,_]),(0,c.useEffect)(()=>{A()},[A]),(0,c.useEffect)(()=>()=>{(0,eY.tP)()},[]),E?(0,o.jsx)("div",{className:(0,g.Z)(nX.overlay,{[nX.states.auto]:"auto"===s}),style:R,ref:C,children:(0,o.jsxs)("div",{ref:j,className:(0,g.Z)(nX.dropdown,{[nX.states.fullHeight]:w}),role:N?"popup":"dialog","aria-modal":!N,"data-id":k,"data-qa":y,style:L,children:[(0,o.jsx)(n3,{title:f,description:m,heading:h,isDesktop:N,setOpen:_,"data-qa":(0,v.g)("".concat(y,"-header"),!!y)}),(0,o.jsx)("div",{...r,className:nX.content,"data-qa":(0,v.g)("".concat(y,"-content"),!!y),children:(0,o.jsx)("div",{className:nX.contentInner,style:{maxHeight:N?b:void 0},ref:a,children:r.children})}),(0,o.jsx)(n2,{"data-qa":(0,v.g)("".concat(y,"-header"),!!y),footer:x})]})}):null});nJ.displayName="DropdownContent";let n0=(0,c.createContext)(null),n1=()=>{let e=(0,c.useContext)(n0);if(null===e)throw Error("Dropdown components must be wrapped in <Dropdown />");return e},n2=e=>{let{footer:t,...n}=e;return t?(0,o.jsx)("div",{...n,className:nX.footer,children:t}):null};n2.displayName="DropdownFooter";let n3=e=>{let{title:t,description:n,heading:a,isDesktop:r,setOpen:l,...i}=e,s=(0,c.useMemo)(()=>a||(r&&(t||n)?(0,o.jsxs)(o.Fragment,{children:[t&&(0,o.jsx)("div",{className:nX.title,children:t}),n&&(0,o.jsx)("div",{className:nX.description,children:n})]}):null),[n,a,r,t]);return(0,o.jsxs)(o.Fragment,{children:[!r&&(0,o.jsxs)("div",{...i,className:nX.mobileHeading,children:[t&&(0,o.jsx)("div",{className:nX.title,children:t}),n&&(0,o.jsx)("div",{className:nX.description,children:n}),(0,o.jsx)("button",{className:nX.close,type:"button",tabIndex:-1,"aria-label":"Закрыть окно",onClick:()=>l(!1),children:(0,o.jsx)(J.P,{"aria-hidden":"true",className:nX.closeIcon,style:{display:"inline-flex"},children:(0,o.jsx)(ei,{})})})]}),s&&(0,o.jsx)("div",{...i,className:nX.heading,children:s})]})};n3.displayName="DropdownHeader";let n4=(0,c.forwardRef)(function(e,t){let{children:n,asChild:a=!1,disabled:r,...l}=e,{refs:i,open:s,setOpen:d}=n1(),u=n.ref,h=(0,p.qq)([i.setReference,t,u]),f=(0,c.useCallback)(()=>{r||d(!s)},[r,s,d]);return a&&(0,c.isValidElement)(n)?(0,c.cloneElement)(n,{ref:h,disabled:r,onClick:f,...l,...n.props}):(0,o.jsx)("button",{ref:h,onClick:f,disabled:r,...l,type:"button",children:n})});function n7(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}n4.displayName="DropdownTrigger";let n5=n7(),n6=/[&<>"']/,n9=RegExp(n6.source,"g"),n8=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ae=RegExp(n8.source,"g"),at={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},an=e=>at[e];function aa(e,t){if(t){if(n6.test(e))return e.replace(n9,an)}else if(n8.test(e))return e.replace(ae,an);return e}let ar=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,al=/(^|[^\[])\^/g;function ai(e,t){let n="string"==typeof e?e:e.source;t=t||"";let a={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(al,"$1"),n=n.replace(e,r),a},getRegex:()=>new RegExp(n,t)};return a}function as(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}let ao={exec:()=>null};function ac(e,t){let n=e.replace(/\|/g,(e,t,n)=>{let a=!1,r=t;for(;--r>=0&&"\\"===n[r];)a=!a;return a?"|":" |"}).split(/ \|/),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("")}for(;a<n.length;a++)n[a]=n[a].trim().replace(/\\\|/g,"|");return n}function ad(e,t,n){let a=e.length;if(0===a)return"";let r=0;for(;r<a;){let l=e.charAt(a-r-1);if(l!==t||n){if(l!==t&&n)r++;else break}else r++}return e.slice(0,a-r)}function au(e,t,n,a){let r=t.href,l=t.title?aa(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){a.state.inLink=!0;let e={type:"link",raw:n,href:r,title:l,text:i,tokens:a.inlineTokens(i)};return a.state.inLink=!1,e}return{type:"image",raw:n,href:r,title:l,text:aa(i)}}class ah{options;rules;lexer;constructor(e){this.options=e||n5}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ad(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t){let n=e.match(/^(\s+)(?:```)/);if(null===n)return t;let a=n[1];return t.split("\n").map(e=>{let t=e.match(/^\s+/);if(null===t)return e;let[n]=t;return n.length>=a.length?e.slice(a.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){let t=ad(e,"#");this.options.pedantic?e=t.trim():(!t||/ $/.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n    $1");e=ad(e.replace(/^ *>[ \t]?/gm,""),"\n");let n=this.lexer.state.top;this.lexer.state.top=!0;let a=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:a,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),a=n.length>1,r={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let l=RegExp(`^( {0,3}${n})((?:[	 ][^\\n]*)?(?:\\n|$))`),i="",s="",o=!1;for(;e;){let n,a=!1;if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let c=t[2].split("\n",1)[0].replace(/^\t+/,e=>" ".repeat(3*e.length)),d=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,s=c.trimStart()):(u=(u=t[2].search(/[^ ]/))>4?1:u,s=c.slice(u),u+=t[1].length);let h=!1;if(!c&&/^ *$/.test(d)&&(i+=d+"\n",e=e.substring(d.length+1),a=!0),!a){let t=RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),n=RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),a=RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),r=RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){let l=e.split("\n",1)[0];if(d=l,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),a.test(d)||r.test(d)||t.test(d)||n.test(e))break;if(d.search(/[^ ]/)>=u||!d.trim())s+="\n"+d.slice(u);else{if(h||c.search(/[^ ]/)>=4||a.test(c)||r.test(c)||n.test(c))break;s+="\n"+d}h||d.trim()||(h=!0),i+=l+"\n",e=e.substring(l.length+1),c=d.slice(u)}}!r.loose&&(o?r.loose=!0:/\n *\n *$/.test(i)&&(o=!0));let p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(s))&&(n="[ ] "!==p[0],s=s.replace(/^\[[ xX]\] +/,"")),r.items.push({type:"list_item",raw:i,task:!!p,checked:n,loose:!1,text:s,tokens:[]}),r.raw+=i}r.items[r.items.length-1].raw=i.trimEnd(),r.items[r.items.length-1].text=s.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){let t=r.items[e].tokens.filter(e=>"space"===e.type),n=t.length>0&&t.some(e=>/\n.*\n/.test(e.raw));r.loose=n}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:a}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;let n=ac(t[1]),a=t[2].replace(/^\||\| *$/g,"").split("|"),r=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],l={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let e of a)/^ *-+: *$/.test(e)?l.align.push("right"):/^ *:-+: *$/.test(e)?l.align.push("center"):/^ *:-+ *$/.test(e)?l.align.push("left"):l.align.push(null);for(let e of n)l.header.push({text:e,tokens:this.lexer.inline(e)});for(let e of r)l.rows.push(ac(e,l.header.length).map(e=>({text:e,tokens:this.lexer.inline(e)})));return l}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:aa(t[1])}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;let t=ad(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return -1;let n=0;for(let a=0;a<e.length;a++)if("\\"===e[a])a++;else if(e[a]===t[0])n++;else if(e[a]===t[1]&&--n<0)return a;return -1}(t[2],"()");if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],a="";if(this.options.pedantic){let e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),au(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:a?a.replace(this.rules.inline.anyPunctuation,"$1"):a},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return au(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&n.match(/[\p{L}\p{N}]/u))&&(!(a[1]||a[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...a[0]].length-1,r,l,i=n,s=0,o="*"===a[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,t=t.slice(-1*e.length+n);null!=(a=o.exec(t));){if(!(r=a[1]||a[2]||a[3]||a[4]||a[5]||a[6]))continue;if(l=[...r].length,a[3]||a[4]){i+=l;continue}if((a[5]||a[6])&&n%3&&!((n+l)%3)){s+=l;continue}if((i-=l)>0)continue;l=Math.min(l,l+i+s);let t=[...a[0]][0].length,o=e.slice(0,n+a.index+t+l);if(Math.min(n,l)%2){let e=o.slice(1,-1);return{type:"em",raw:o,text:e,tokens:this.lexer.inlineTokens(e)}}let c=o.slice(2,-2);return{type:"strong",raw:o,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," "),n=/[^ ]/.test(e),a=/^ /.test(e)&&/ $/.test(e);return n&&a&&(e=e.substring(1,e.length-1)),e=aa(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return n="@"===t[2]?"mailto:"+(e=aa(t[1])):e=aa(t[1]),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])n="mailto:"+(e=aa(t[0]));else{let a;do a=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(a!==t[0]);e=aa(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:aa(t[0]),{type:"text",raw:t[0],text:e}}}}let ap=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,af=/(?:[*+-]|\d{1,9}[.)])/,am=ai(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,af).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(),ag=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,av=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ax=ai(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",av).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ab=ai(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,af).getRegex(),aw="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",ay=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ak=ai("^ {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",ay).replace("tag",aw).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a_=ai(ag).replace("hr",ap).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",aw).getRegex(),aC={blockquote:ai(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",a_).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ax,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:ap,html:ak,lheading:am,list:ab,newline:/^(?: *(?:\n|$))+/,paragraph:a_,table:ao,text:/^[^\n]+/},aj=ai("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ap).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",aw).getRegex(),aN={...aC,table:aj,paragraph:ai(ag).replace("hr",ap).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",aj).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",aw).getRegex()},aE={...aC,html:ai("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",ay).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:ao,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ai(ag).replace("hr",ap).replace("heading"," *#{1,6} *[^\n]").replace("lheading",am).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},aL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,aR=/^( {2,}|\\)\n(?!\s*$)/,aA="\\p{P}\\p{S}",a$=ai(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,aA).getRegex(),aZ=ai(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,aA).getRegex(),aS=ai("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,aA).getRegex(),az=ai("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,aA).getRegex(),aT=ai(/\\([punct])/,"gu").replace(/punct/g,aA).getRegex(),aI=ai(/^<(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(),aO=ai(ay).replace("(?:-->|$)","-->").getRegex(),aD=ai("^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",aO).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),aM=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,aF=ai(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",aM).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),aB=ai(/^!?\[(label)\]\[(ref)\]/).replace("label",aM).replace("ref",av).getRegex(),aP=ai(/^!?\[(ref)\](?:\[\])?/).replace("ref",av).getRegex(),aq=ai("reflink|nolink(?!\\()","g").replace("reflink",aB).replace("nolink",aP).getRegex(),aH={_backpedal:ao,anyPunctuation:aT,autolink:aI,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:aR,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ao,emStrongLDelim:aZ,emStrongRDelimAst:aS,emStrongRDelimUnd:az,escape:aL,link:aF,nolink:aP,punctuation:a$,reflink:aB,reflinkSearch:aq,tag:aD,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:ao},aV={...aH,link:ai(/^!?\[(label)\]\((.*?)\)/).replace("label",aM).getRegex(),reflink:ai(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",aM).getRegex()},aW={...aH,escape:ai(aL).replace("])","~|])").getRegex(),url:ai(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},aY={...aW,br:ai(aR).replace("{2,}","*").getRegex(),text:ai(aW.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},aU={normal:aC,gfm:aN,pedantic:aE},aQ={normal:aH,gfm:aW,breaks:aY,pedantic:aV};class aK{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||n5,this.options.tokenizer=this.options.tokenizer||new ah,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 t={block:aU.normal,inline:aQ.normal};this.options.pedantic?(t.block=aU.pedantic,t.inline=aQ.pedantic):this.options.gfm&&(t.block=aU.gfm,this.options.breaks?t.inline=aQ.breaks:t.inline=aQ.gfm),this.tokenizer.rules=t}static get rules(){return{block:aU,inline:aQ}}static lex(e,t){return new aK(t).lex(e)}static lexInline(e,t){return new aK(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){let n,a,r,l;for(e=this.options.pedantic?e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(e,t,n)=>t+"    ".repeat(n.length));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>!!(n=a.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),(a=t[t.length-1])&&("paragraph"===a.type||"text"===a.type)?(a.raw+="\n"+n.raw,a.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):t.push(n);continue}if((n=this.tokenizer.fences(e))||(n=this.tokenizer.heading(e))||(n=this.tokenizer.hr(e))||(n=this.tokenizer.blockquote(e))||(n=this.tokenizer.list(e))||(n=this.tokenizer.html(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),(a=t[t.length-1])&&("paragraph"===a.type||"text"===a.type)?(a.raw+="\n"+n.raw,a.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if((n=this.tokenizer.table(e))||(n=this.tokenizer.lheading(e))){e=e.substring(n.raw.length),t.push(n);continue}if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t,n=1/0,a=e.slice(1);this.options.extensions.startBlock.forEach(e=>{"number"==typeof(t=e.call({lexer:this},a))&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(r=e.substring(0,n+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){a=t[t.length-1],l&&"paragraph"===a.type?(a.raw+="\n"+n.raw,a.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):t.push(n),l=r.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),(a=t[t.length-1])&&"text"===a.type?(a.raw+="\n"+n.raw,a.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,a,r,l,i,s;let o=e;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(l=this.tokenizer.rules.inline.reflinkSearch.exec(o));)e.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(l=this.tokenizer.rules.inline.blockSkip.exec(o));)o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(l=this.tokenizer.rules.inline.anyPunctuation.exec(o));)o=o.slice(0,l.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(s=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(a=>!!(n=a.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),(a=t[t.length-1])&&"text"===n.type&&"text"===a.type?(a.raw+=n.raw,a.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),(a=t[t.length-1])&&"text"===n.type&&"text"===a.type?(a.raw+=n.raw,a.text+=n.text):t.push(n);continue}if((n=this.tokenizer.emStrong(e,o,s))||(n=this.tokenizer.codespan(e))||(n=this.tokenizer.br(e))||(n=this.tokenizer.del(e))||(n=this.tokenizer.autolink(e))||!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(r=e,this.options.extensions&&this.options.extensions.startInline){let t,n=1/0,a=e.slice(1);this.options.extensions.startInline.forEach(e=>{"number"==typeof(t=e.call({lexer:this},a))&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(r=e.substring(0,n+1))}if(n=this.tokenizer.inlineText(r)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),i=!0,(a=t[t.length-1])&&"text"===a.type?(a.raw+=n.raw,a.text+=n.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}}class aG{options;constructor(e){this.options=e||n5}code(e,t,n){let a=(t||"").match(/^\S*/)?.[0];return(e=e.replace(/\n$/,"")+"\n",a)?'<pre><code class="language-'+aa(a)+'">'+(n?e:aa(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:aa(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>
${e}</blockquote>
`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>
`}hr(){return"<hr>\n"}list(e,t,n){let a=t?"ol":"ul";return"<"+a+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+a+">\n"}listitem(e,t,n){return`<li>${e}</li>
`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>
`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>
${e}</tr>
`}tablecell(e,t){let n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){let a=as(e);if(null===a)return n;let r='<a href="'+(e=a)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"}image(e,t,n){let a=as(e);if(null===a)return n;e=a;let r=`<img src="${e}" alt="${n}"`;return t&&(r+=` title="${t}"`),r+=">"}text(e){return e}}class aX{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class aJ{options;renderer;textRenderer;constructor(e){this.options=e||n5,this.options.renderer=this.options.renderer||new aG,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new aX}static parse(e,t){return new aJ(t).parse(e)}static parseInline(e,t){return new aJ(t).parseInline(e)}parse(e,t=!0){let n="";for(let a=0;a<e.length;a++){let r=e[a];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){let e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(r.type)){n+=e||"";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(ar,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""));continue;case"code":n+=this.renderer.code(r.text,r.lang,!!r.escaped);continue;case"table":{let e="",t="";for(let e=0;e<r.header.length;e++)t+=this.renderer.tablecell(this.parseInline(r.header[e].tokens),{header:!0,align:r.align[e]});e+=this.renderer.tablerow(t);let a="";for(let e=0;e<r.rows.length;e++){let n=r.rows[e];t="";for(let e=0;e<n.length;e++)t+=this.renderer.tablecell(this.parseInline(n[e].tokens),{header:!1,align:r.align[e]});a+=this.renderer.tablerow(t)}n+=this.renderer.table(e,a);continue}case"blockquote":{let e=this.parse(r.tokens);n+=this.renderer.blockquote(e);continue}case"list":{let e=r.ordered,t=r.start,a=r.loose,l="";for(let e=0;e<r.items.length;e++){let t=r.items[e],n=t.checked,i=t.task,s="";if(t.task){let e=this.renderer.checkbox(!!n);a?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=e+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=e+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",text:e+" "}):s+=e+" "}s+=this.parse(t.tokens,a),l+=this.renderer.listitem(s,i,!!n)}n+=this.renderer.list(l,e,t);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 l=r,i=l.tokens?this.parseInline(l.tokens):l.text;for(;a+1<e.length&&"text"===e[a+1].type;)i+="\n"+((l=e[++a]).tokens?this.parseInline(l.tokens):l.text);n+=t?this.renderer.paragraph(i):i;continue}default:{let e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let a=0;a<e.length;a++){let r=e[a];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){let e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=e||"";continue}}switch(r.type){case"escape":case"text":n+=t.text(r.text);break;case"html":n+=t.html(r.text);break;case"link":n+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":n+=t.image(r.href,r.title,r.text);break;case"strong":n+=t.strong(this.parseInline(r.tokens,t));break;case"em":n+=t.em(this.parseInline(r.tokens,t));break;case"codespan":n+=t.codespan(r.text);break;case"br":n+=t.br();break;case"del":n+=t.del(this.parseInline(r.tokens,t));break;default:{let e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return n}}class a0{options;constructor(e){this.options=e||n5}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class a1{defaults=n7();options=this.setOptions;parse=this.#e(aK.lex,aJ.parse);parseInline=this.#e(aK.lexInline,aJ.parseInline);Parser=aJ;Renderer=aG;TextRenderer=aX;Lexer=aK;Tokenizer=ah;Hooks=a0;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let a of e)switch(n=n.concat(t.call(this,a)),a.type){case"table":for(let e of a.header)n=n.concat(this.walkTokens(e.tokens,t));for(let e of a.rows)for(let a of e)n=n.concat(this.walkTokens(a.tokens,t));break;case"list":n=n.concat(this.walkTokens(a.items,t));break;default:{let e=a;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(a=>{let r=e[a].flat(1/0);n=n.concat(this.walkTokens(r,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let a=e.renderer.apply(this,t);return!1===a&&(a=n.apply(this,t)),a}:t.renderers[e.name]=e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new aG(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if("options"===n)continue;let a=e.renderer[n],r=t[n];t[n]=(...e)=>{let n=a.apply(t,e);return!1===n&&(n=r.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ah(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let a=e.tokenizer[n],r=t[n];t[n]=(...e)=>{let n=a.apply(t,e);return!1===n&&(n=r.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new a0;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if("options"===n)continue;let a=e.hooks[n],r=t[n];a0.passThroughHooks.has(n)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(a.call(t,e)).then(e=>r.call(t,e));let n=a.call(t,e);return r.call(t,n)}:t[n]=(...e)=>{let n=a.apply(t,e);return!1===n&&(n=r.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,a=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(a.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return aK.lex(e,t??this.defaults)}parser(e,t){return aJ.parse(e,t??this.defaults)}#e(e,t){return(n,a)=>{let r={...a},l={...this.defaults,...r};!0===this.defaults.async&&!1===r.async&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);let i=this.#t(!!l.silent,!!l.async);if(null==n)return i(Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(n):n).then(t=>e(t,l)).then(e=>l.hooks?l.hooks.processAllTokens(e):e).then(e=>l.walkTokens?Promise.all(this.walkTokens(e,l.walkTokens)).then(()=>e):e).then(e=>t(e,l)).then(e=>l.hooks?l.hooks.postprocess(e):e).catch(i);try{l.hooks&&(n=l.hooks.preprocess(n));let a=e(n,l);l.hooks&&(a=l.hooks.processAllTokens(a)),l.walkTokens&&this.walkTokens(a,l.walkTokens);let r=t(a,l);return l.hooks&&(r=l.hooks.postprocess(r)),r}catch(e){return i(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+aa(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}}let a2=new a1;function a3(e,t){return a2.parse(e,t)}a3.options=a3.setOptions=function(e){return a2.setOptions(e),a3.defaults=a2.defaults,n5=a3.defaults,a3},a3.getDefaults=n7,a3.defaults=n5,a3.use=function(...e){return a2.use(...e),a3.defaults=a2.defaults,n5=a3.defaults,a3},a3.walkTokens=function(e,t){return a2.walkTokens(e,t)},a3.parseInline=a2.parseInline,a3.Parser=aJ,a3.parser=aJ.parse,a3.Renderer=aG,a3.TextRenderer=aX,a3.Lexer=aK,a3.lexer=aK.lex,a3.Tokenizer=ah,a3.Hooks=a0,a3.parse=a3,a3.options,a3.setOptions,a3.use,a3.walkTokens,a3.parseInline,aJ.parse,aK.lex,n(8620).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 a4=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"});(l=i||(i={})).Pending="pending",l.Success="success";let a7={decimalCount:2,decimalSeparator:",",thousandsSeparator:"\xa0",decimalIsWithoutZeros:!0,preventLargeNumbers:!1};(s||(s={})).PERSISTENT_STATE="persistentState";let a5=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 a6(e){return`finkit-${e}`}Object.freeze(a5.filter(e=>"xs"!==e)),Object.freeze(a5.filter(e=>"3xl"!==e));let a9={display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden"},a8=a6("caption");Object.freeze({caption:a8,captionWithIcon:`${a8}--with-icon`,content:`${a8}__content`,icon:`${a8}__icon`,text:`${a8}__text`,size:{s:`${a8}--s`,m:`${a8}--m`},states:{success:`${a8}--success`,error:`${a8}--error`,warning:`${a8}--warning`}}),a6("card");let re=a6("col");Object.freeze({col:re,state:{size:(e,t)=>!0===t?`${re}--${e}`:`${re}--${e}-${t}`,offsetLeft:(e,t)=>`${re}--${e}-offset-left-${t}`,offsetRight:(e,t)=>`${re}--${e}-offset-right-${t}`}});let rt=a6("container");Object.freeze({container:rt,states:{narrow:`${rt}--narrow`}});let rn=a6("divider");Object.freeze({divider:rn,content:`${rn}__content`});let ra=a6("form-field");Object.freeze({formField:ra,labelWrapper:`${ra}__label-wrapper`,label:`${ra}__label`,description:`${ra}__description`});let rr=a6("heading");Object.freeze({heading:rr,states:Object.freeze({display:`${rr}--display`,hero:`${rr}--hero`,h1:`${rr}--h1`,h2:`${rr}--h2`,h3:`${rr}--h3`,h4:`${rr}--h4`,h5:`${rr}--h5`,h6:`${rr}--h6`})});let rl=a6("loader");Object.freeze({loader:rl,variant:{primary:`${rl}--primary`,purple:`${rl}--purple`,accent:`${rl}--accent`,white:`${rl}--white`},size:{s:`${rl}--s`,m:`${rl}--m`,l:`${rl}--l`}});let ri=a6("progress-bar");Object.freeze({progressBar:ri,rounded:`${ri}-rounded`,indicator:`${ri}__indicator`,text:`${ri}__text`,animationCircle:`${ri}__animation-circle`});let rs=a6("row"),ro=(e,t,n)=>`${rs}--gutter-${e}-${t}-${n}`;Object.freeze({row:rs,state:{reverse:`${rs}--reverse`,gutter:(e,t="xs")=>Array.isArray(e)?[ro(t,e[0],"h"),ro(t,e[1],"v")].join(" "):ro(t,e,"h")}});let rc=a6("skeleton");Object.freeze({skeleton:rc,states:{inline:`${rc}--inline`,rounded:`${rc}--rounded`,inverted:`${rc}--inverted`,suspend:`${rc}--suspend`}});let rd=Object.freeze({text:a6("text")});function ru({as:e,className:t,style:n,children:a,size:r,weight:l,fontFamily:i,lineClamp:s,dataQa:c,dataId:d,...u}){return(0,o.jsx)(e||"span",{className:(0,g.Z)(rd.text,t),style:{...r&&{fontSize:`var(--font-size-${r})`,lineHeight:`var(--font-line-height-${r})`},...l&&{fontWeight:`var(--font-weight-${l})`},...s&&{WebkitLineClamp:s,lineClamp:s,...a9},...i&&{fontFamily:`var(--font-family-${i})`},...n},...u,"data-id":d,"data-qa":c,children:a})}ru.displayName="Text";var rh=n(8620).Buffer;let rp="function"==typeof rh;"function"==typeof TextDecoder&&new TextDecoder;let rf="function"==typeof TextEncoder?new TextEncoder:void 0,rm=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),rg=(a={},rm.forEach((e,t)=>a[e]=t),a),rv=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,rx=String.fromCharCode.bind(String);"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);let rb=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),rw="function"==typeof btoa?e=>btoa(e):rp?e=>rh.from(e,"binary").toString("base64"):e=>{let t,n,a,r,l="",i=e.length%3;for(let i=0;i<e.length;){if((n=e.charCodeAt(i++))>255||(a=e.charCodeAt(i++))>255||(r=e.charCodeAt(i++))>255)throw TypeError("invalid character found");l+=rm[(t=n<<16|a<<8|r)>>18&63]+rm[t>>12&63]+rm[t>>6&63]+rm[63&t]}return i?l.slice(0,i-3)+"===".substring(i):l},ry=rp?e=>rh.from(e).toString("base64"):e=>{let t=[];for(let n=0,a=e.length;n<a;n+=4096)t.push(rx.apply(null,e.subarray(n,n+4096)));return rw(t.join(""))},rk=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?rx(192|t>>>6)+rx(128|63&t):rx(224|t>>>12&15)+rx(128|t>>>6&63)+rx(128|63&t)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return rx(240|t>>>18&7)+rx(128|t>>>12&63)+rx(128|t>>>6&63)+rx(128|63&t)},r_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,rC=e=>e.replace(r_,rk),rj=rp?e=>rh.from(e,"utf8").toString("base64"):rf?e=>ry(rf.encode(e)):e=>rw(rC(e)),rN=(e,t=!1)=>t?rb(rj(e)):rj(e),rE=e=>rN(e,!0);"function"==typeof atob||rp||(e=>{if(e=e.replace(/\s+/g,""),!rv.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n="",a,r;for(let l=0;l<e.length;)t=rg[e.charAt(l++)]<<18|rg[e.charAt(l++)]<<12|(a=rg[e.charAt(l++)])<<6|(r=rg[e.charAt(l++)]),n+=64===a?rx(t>>16&255):64===r?rx(t>>16&255,t>>8&255):rx(t>>16&255,t>>8&255,255&t);return n});let rL=async(e,t="common",n="v1")=>{try{let a=await fetch(F(e,`api/${n}/login-widget`,t));return a.ok?await a.json():(console.error(`Ошибка ${a.status} при загрузке конфига для ${t}`),{})}catch(e){return console.error(`Сетевая ошибка при загрузке конфига для ${t}`,e),{}}},rR={logo:"_logo_1cju4_61",mainLogo:"_mainLogo_1cju4_68",brandmarkLogo:"_brandmarkLogo_1cju4_72",divider:"_divider_1cju4_76"},rA=({s3AssetsUrl:e,className:t,withLogo:n=!1,isNewYearLogo:a=!1,dataQa:r,brandmarkCode:l})=>{if(!e)return null;let i=a?F(e,"logo/finuslugi/lk-regular-new-year.svg"):F(e,"logo/finuslugi/lk-regular.svg"),s=F(e,`/images/logo-brandmark-bank-${l}.svg`);return(0,o.jsx)(o.Fragment,{children:n&&(0,o.jsxs)("div",{className:_(rR.logo,t),"data-qa":r,children:[(0,o.jsx)("img",{className:rR.mainLogo,src:i,alt:"Логотип"}),l&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:rR.divider}),(0,o.jsx)("img",{className:rR.brandmarkLogo,src:s,alt:"Логотип партнера"})]})]})})};rA.displayName="Logo";let r$={privateIcon:"_privateIcon_xcp32_1",autoWidth:"_autoWidth_xcp32_14"},rZ=({children:e,className:t,style:n,autoWidth:a,...r})=>(0,o.jsx)("span",{className:_(t,r$.privateIcon,a&&r$.autoWidth),style:n,...r,children:e});rZ.displayName="PrivateIcon";let rS={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"},rz=({buttonsData:e,disabled:t=!1,primaryTextOverride:n,additionalTextOverride:a,extraTextOverride:r,overrideLoginAction:l,onAnalyticsEvent:i,onOpen:s,linkTarget:d})=>{let{buttons:u,type:h}=e,p={primary:n,additional:a,extra:r};return u.length?(0,o.jsxs)(o.Fragment,{children:[1===u.length&&(0,o.jsx)(H.B,{dataQa:`login-widget-${h}-button`,as:l?"button":"a",...l?{}:{target:d,href:t?"#login-widget-consents":u[0].href},stretch:!0,variant:"primary"===h?"primary":"secondary",disabled:t,label:p[h]??u[0].label,iconLeft:p[h]?void 0:u[0].icon,onClick:()=>{null==i||i({eventCategory:"login-widget",eventAction:"click_button_login",eventLabel:u[0].type}),null==l||l(u[0].type)}},`button-${h}`),u.length>1&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(H.B,{dataQa:`login-widget-${h}-button`,stretch:!0,variant:"primary"===h?"primary":"secondary",disabled:t,label:p[h]?(0,o.jsx)("span",{children:p[h]}):function(e){let{maxWidth:t}=V.xs;return function(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){let[a,r]=(0,c.useState)(()=>n?Q(e,t):t??!1);function l(){r(Q(e))}return U(()=>{let t=window.matchMedia(e);return l(),"function"==typeof t.addListener?t.addListener(l):t.addEventListener("change",l),()=>{"function"==typeof t.removeListener?t.removeListener(l):t.removeEventListener("change",l)}},[e]),a}(`screen and (max-width: ${t}px)`)}(0)&&u.length>5?(0,o.jsx)("span",{children:"Войти по ID"}):(0,o.jsx)("span",{className:rS.buttonIcons,children:u.map(e=>e.icon?(0,o.jsx)(rZ,{style:{lineHeight:0},children:e.icon},e.type):void 0)}),onClick:()=>null==s?void 0:s(h)},`button-${h}`)})]}):null};rz.displayName="ButtonsGroup";let rT=({buttonsList:e=[],isOpen:t=!1,buttonsType:n="",overrideLoginAction:a,onAnalyticsEvent:r,onClose:l,linkTarget:i})=>{var s,d;let u=(0,c.useCallback)(e=>{null==r||r({eventCategory:"login-widget",eventAction:"click_button_login",eventLabel:e}),null==a||a(e),setTimeout(()=>null==l?void 0:l())},[]);return(0,o.jsx)(nQ,{header:{title:"Выберите способ входа"},open:t,onClose:l,dataQa:"login-widget-buttons-modal",children:(0,o.jsx)("div",{className:rS.modalInner,children:null==(d=null==(s=e.find(e=>e.type===n))?void 0:s.buttons)?void 0:d.map(({type:e,href:t,caption:n,icon:r,secondaryIcon:l})=>(0,o.jsx)(H.B,{dataQa:`login-widget-buttons-modal-button-${null==e?void 0:e.toLowerCase()}`,as:a?"button":"a",...a?{}:{target:i,href:t},stretch:!0,variant:"secondary",label:n,iconLeft:l??r,onClick:()=>u(e)},`modal-button-${e}`))})})};rT.displayName="ButtonsModal";let rI=({buttonsList:e=[],disabled:t=!1,primaryTextOverride:n,additionalTextOverride:a,extraTextOverride:r,overrideLoginAction:l,onAnalyticsEvent:i,linkTarget:s})=>{let[d,u]=(0,c.useState)(!1),[h,p]=(0,c.useState)(),{primaryGroup:f,remainingGroup:m,isRemainingGroupVisible:g}=(0,c.useMemo)(()=>{let[t,...n]=e,a=n.some(({buttons:e})=>e.length);return{primaryGroup:t,remainingGroup:n,isRemainingGroupVisible:a}},[e]),v=(0,c.useCallback)(e=>{u(!0),p(e),null==i||i({eventCategory:"login-widget",eventAction:"click_popup_open",eventLabel:"popup_select_login_provider"})},[]),x=(0,c.useCallback)(()=>{u(!1),p(""),null==i||i({eventCategory:"login-widget",eventAction:"click_popup_close",eventLabel:"popup_select_login_provider"})},[]);return e.length?(0,o.jsxs)("div",{className:_(rS.buttons,{[rS["--disabled"]]:t}),"data-qa":"login-widget-buttons",children:[(0,o.jsx)(rz,{buttonsData:f,disabled:t,primaryTextOverride:n,overrideLoginAction:l,onAnalyticsEvent:i,onOpen:v,linkTarget:s}),g&&(0,o.jsxs)(o.Fragment,{children:[!!f.buttons.length&&(0,o.jsx)(q.D,{className:rS.divider,content:"или",dataQa:"login-widget-buttons-divider"}),m.map(e=>(0,o.jsx)(rz,{buttonsData:e,additionalTextOverride:a,extraTextOverride:r,disabled:t,overrideLoginAction:l,onAnalyticsEvent:i,onOpen:v,linkTarget:s},`group-${e.type}`))]}),(0,o.jsx)(rT,{buttonsList:e,buttonsType:h,isOpen:d,overrideLoginAction:l,onAnalyticsEvent:i,onClose:x,linkTarget:s})]}):null};rI.displayName="Buttons";let rO=({buttonsList:e=[],disabled:t=!1,primaryTextOverride:n,overrideLoginAction:a,onAnalyticsEvent:r,linkTarget:l})=>{let i=(0,c.useCallback)(e=>{null==r||r({eventCategory:"login-widget",eventAction:"click_button_login",eventLabel:e}),null==a||a(e)},[]),{primaryGroup:s,remainingGroup:d,isRemainingGroupVisible:u}=(0,c.useMemo)(()=>{let[t,...n]=e;return{primaryGroup:t,remainingGroup:n.reduce((e,{buttons:t})=>[...e,...t],[]),isRemainingGroupVisible:n.some(({buttons:e})=>e.length)}},[e]);return e.length?(0,o.jsxs)("div",{className:_(rS.buttons,{[rS["--disabled"]]:t}),"data-qa":"login-widget-buttons",children:[(0,o.jsx)(rz,{buttonsData:s,disabled:t,primaryTextOverride:n,overrideLoginAction:a,onAnalyticsEvent:r,linkTarget:l}),u&&(0,o.jsxs)(o.Fragment,{children:[!!s.buttons.length&&(0,o.jsx)(q.D,{className:rS.gridViewDivider,content:"или",dataQa:"login-widget-buttons-divider"}),(0,o.jsx)("div",{className:_(rS.gridView,{[rS["--disabled"]]:t}),"data-qa":"login-widget-buttons",children:d.map(e=>(0,o.jsx)(H.B,{appearance:"outline",stretch:!0,variant:"secondary",dataQa:`login-widget-${e.type}-button`,as:a?"button":"a",...a?{}:{target:l,href:e.href},disabled:t,label:(0,o.jsx)(rZ,{className:rS.buttonIcons,autoWidth:!0,children:e.icon},e.type),onClick:()=>i(e.type)},`button-${e.type}`))})]})]}):null};rO.displayName="ButtonsGrid";let rD=({phone:e,onPhoneChange:t,buttonsList:n,disabled:a,primaryTextOverride:r,overrideLoginAction:l,onAnalyticsEvent:i,linkTarget:s})=>(0,o.jsxs)("div",{className:_(rS.formView),children:[(0,o.jsx)(nd,{label:"Номер телефона",maskOpts:{mask:"+{7} (000) 000-00-00"},maskPlaceholder:"+7 (900) 777-77-77",maskPlaceholderVariant:"default",onChange:t,size:"m",value:e,variant:"primary"}),(0,o.jsx)(rO,{buttonsList:n,disabled:a,primaryTextOverride:r,overrideLoginAction:l,onAnalyticsEvent:i,linkTarget:s})]});rD.displayName="PhoneViewButtons";let rM=({template:e,onLinkClick:t})=>{if(!Object.keys(e).length||!e.links)return null;let{text:n,links:a}=e,r=n.split(/(\$\d+)/);return(0,o.jsx)(o.Fragment,{children:r.map(e=>{if(e.startsWith("$")){let n=a[parseInt(e.slice(1))-1];return(0,o.jsx)("a",{href:n.href,target:"_blank",rel:"noreferrer",onClick:()=>null==t?void 0:t(n.href),children:n.text},`link--${n.text}`)}return(0,o.jsx)("span",{children:e},`text--${e}`)})})};rM.displayName="TemplateText";let rF={consents:"_consents_15mth_61",list:"_list_15mth_61",checkbox:"_checkbox_15mth_66",error:"_error_15mth_76"},rB=({consents:e=[],onAgree:t,onError:n,onAnalyticsEvent:a})=>{let[r,l]=(0,c.useState)(()=>Object.fromEntries(e.map(e=>[e.key,e.value]))),i=e.filter(e=>!e.hidden),s=i.filter(e=>e.required).some(e=>!r[e.key]);(0,c.useEffect)(()=>{t(r)},[r]),(0,c.useEffect)(()=>{n(s)},[s]);let d=(e,t)=>{l(n=>({...n,[e]:t})),null==a||a({eventCategory:"login-widget",eventAction:"click_checkbox_consent",eventLabel:`${e}_${t?"tick":"untick"}`})},u=e=>{null==a||a({eventCategory:"login-widget",eventAction:"click_link_consent",eventLabel:e})};return e.length?(0,o.jsx)("div",{id:"login-widget-consents",className:rF.consents,"data-qa":"login-widget-consents",children:(0,o.jsx)("div",{className:rF.list,"data-qa":"login-widget-consents-list",children:i.map(({key:e,title:t,required:n})=>{var a;return(0,o.jsx)(eq.C,{dataQa:`login-widget-consents-checkbox-${e}`,className:_(rF.checkbox,{[rF.error]:!r[e]&&s}),state:n&&!r[e]?"error":"default",value:r[e],onChange:t=>d(e,t),children:null!=(a=t.links)&&a.length?(0,o.jsx)(rM,{template:t,onLinkClick:u}):t.text},e)})})}):null};rB.displayName="Consents";let rP={list:"_list_1n3xe_69",item:"_item_1n3xe_77",icon:"_icon_1n3xe_91"},rq={check:(0,o.jsx)(e=>c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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,o.jsx)(e=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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,o.jsx)(e=>c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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,o.jsx)(e=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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,o.jsx)(e=>c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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,o.jsx)(e=>c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),{})},rH=({highlights:e})=>{if(!e||!e.items.length)return null;let t=e=>rq[e]||rq.check,{items:n,heading:a}=e;return(0,o.jsxs)(d.C,{variant:"secondary",dataQa:"login-widget-highlights",children:[a&&(0,o.jsx)(u.H,{as:"h5",type:"h5",className:"mb-2",dataQa:"login-widget-highlights-heading",children:a}),(0,o.jsx)("ul",{className:rP.list,"data-qa":"login-widget-highlights-list",children:(0,o.jsx)(o.Fragment,{children:n.map(({text:e,icon:n})=>(0,o.jsxs)("li",{className:rP.item,"data-qa":"login-widget-highlights-list-item",children:[(0,o.jsx)("div",{className:rP.icon,"data-qa":"login-widget-highlights-list-icon",children:t(n)}),(0,o.jsx)(h.T,{as:"p",dataQa:"login-widget-highlights-list-text",children:e})]},`${e}--${n}`))})})]})};rH.displayName="Highlights";let rV={legalInfo:"_legalInfo_1o9mv_61"},rW=({legalInfo:e,onAnalyticsEvent:t})=>{if(!e||Object.values(e).every(e=>!e))return null;let{plain:n,html:a,md:r}=e,l=r?a3.parse(r):a??"";return(0,o.jsx)("div",{className:rV.legalInfo,"data-qa":"login-widget-legal-info",children:n?(0,o.jsx)(rM,{template:n,onLinkClick:e=>{null==t||t({eventCategory:"login-widget",eventAction:"click_link_legal_info",eventLabel:e})}}):(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:l},onClick:e=>{let{href:n}=e.target;n&&(null==t||t({eventCategory:"login-widget",eventAction:"click_link_legal_info",eventLabel:n}))}})})};rW.displayName="LegalInfo";let rY={DAY:["день","дня","дней"],MONTH:["мес.","мес.","мес."],YEAR:["год","года","лет"],TERMLESS:["бессрочный","бессрочный","бессрочный"]},rU={deposit:"Вклад",credit:"Кредит",bond:"Облигация",account:"Счет","banking-account":"Банковский счет"},rQ=e=>{if(!(e instanceof Date))return null;let t=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=e.getFullYear();return`${t}.${n}.${a}`},rK={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"},rG=({title:e,value:t,className:n,...a})=>(0,o.jsxs)("div",{className:rK.detail,...a,children:[(0,o.jsx)(ru,{dataQa:"login-widget-product-card-detail-title",className:rK.detailTitle,children:e}),(0,o.jsx)(ru,{dataQa:"login-widget-product-card-detail-value",className:(_(rK.detailValue),n),children:t})]});rG.displayName="ProductDetail";let rX=({params:e})=>{if(!e)return null;let{amount:t,rate:n}=e??{},a=rQ(e.endDate),r=e.term,l=[{id:"params-rate",title:"Ставка",value:`${n}%`},{id:"params-amount",title:"Сумма",value:`${function(e,t){try{let n;let{hasCurrencySymbol:a=!0,currencyCode:r,decimalCount:l=a7.decimalCount,decimalSeparator:i=a7.decimalSeparator,thousandsSeparator:s=a7.thousandsSeparator,decimalIsWithoutZeros:o=a7.decimalIsWithoutZeros,preventLargeNumbers:c=a7.preventLargeNumbers}=t||{},d=e;if("string"==typeof d&&(d=d.replace(/\s+/g,"").replace(",",".")),d=Number(d)||0,c&&(n=function(e,t){if(e>=1e9){let n=(Math.floor(e/1e9*1e3)/1e3).toString();return n.includes(".")?n.replace(".",",").replace(/0+$/,"")+t+"млрд":n+t+"млрд"}if(e>=1e6){let n=(Math.floor(e/1e6*1e3)/1e3).toString();return n.includes(".")?n.replace(".",",").replace(/0+$/,"")+t+"млн":n+t+"млн"}return e>=1e4&&e<=99999?Math.trunc(e):e}(d,s)),!c||c&&"number"==typeof n){let e=Number(null!=n?n:d),t=c&&e>1e3?0:function(e){let t=Math.abs(Number(e));return Number.isNaN(t)?a7.decimalCount:t}(l),a=Math.abs(e).toFixed(t),r=parseInt(a,10);n=function({money:e,moneyInt:t,thousandsSeparator:n}){let a=t.toString(),r=RegExp(a.length>4?"(\\d{3})(?=\\d)":"(\\d{4})(?=\\d)","g"),l=a.length>4?a.length%3:0,i=l?a.substr(0,l)+n:"";return(e<0?"-":"")+i+a.substr(l).replace(r,`$1${n}`)}({money:e,moneyInt:r,thousandsSeparator:s})+function({money:e,moneyInt:t,decimalCount:n,decimalSeparator:a,decimalIsWithoutZeros:r}){let l=Math.abs(e-t).toFixed(n),i=r?l.slice(2).replace(/0+$/,""):l.slice(2);return!n||0===(Number(e)||0)||r&&0===parseFloat(l)||""===i?"":a+i}({money:Number(a),moneyInt:r,decimalCount:t,decimalSeparator:i,decimalIsWithoutZeros:o})}return n+(a?`\xa0${a4[r]||a4.RUB}`:"")}catch(e){return console.log(e),""}}(null==t?void 0:t.value,{preventLargeNumbers:!0,currencyCode:(null==t?void 0:t.currency)??"RUB"})}`},{id:r?"params-term":a?"params-end-date":"",title:r?"Срок":a?"Погашение":"",value:r?`${function(e,t,n=!1){if(!Array.isArray(t))throw Error("Plurals must be type of Array<String>");let[a,r,l]=t,i=Math.abs(+e);return(i%=100)>=5&&i<=20?n?l:`${e} ${l}`:1==(i%=10)?n?a:`${e} ${a}`:i>=2&&i<=4?n?r:`${e} ${r}`:n?l:`${e} ${l}`}(r.value,rY[r.type??"DAY"])}`:a||""}];return(0,o.jsx)("div",{className:rK.details,"data-qa":"login-widget-product-card-details",children:l.map(({id:e,title:t,value:n})=>(0,o.jsx)(rG,{"data-qa":`login-widget-product-card-detail-${e}`,title:t,value:n,className:_({[rK.detailRate]:"params-rate"===e})},e))})};rX.displayName="ProductDetails";let rJ=({productInfo:e,s3AssetsUrl:t,className:n,onAnalyticsEvent:a})=>{let r=(0,c.useRef)(null),l=!e||!Object.keys(e).length,i=!r.current||!Object.keys(r.current).length;if((0,c.useEffect)(()=>{var t;l&&!i?null==a||a({eventCategory:"login-widget",eventAction:"view_product_delete",eventLabel:(null==(t=r.current)?void 0:t.type)??void 0}):!l&&i?null==a||a({eventCategory:"login-widget",eventAction:"view_product_add",eventLabel:e.type??void 0}):l||i||null==a||a({eventCategory:"login-widget",eventAction:"view_product_update",eventLabel:e.type??void 0}),r.current=e},[e]),l)return null;let{title:s,label:p,type:f,params:m,provider:g}=e,v=F(t,`/images/logo-brandmark-bank-${null==g?void 0:g.code}.svg`),x=null==g?void 0:g.code,b=f?rU[f]:"";return(0,o.jsxs)(d.C,{variant:"secondary",className:_(rK.productCard,{[rK[`--${f}`]??""]:!0},n),dataQa:"login-widget-product-card",children:[(0,o.jsxs)("div",{className:_("mb-3",rK.headingWrap),children:[(0,o.jsx)(u.H,{as:"h5",type:"h5",dataQa:"login-widget-product-card-heading",children:"Выбранный продукт"}),p&&(0,o.jsx)(tJ.T,{label:p,rounded:!0,size:"s",variant:"red",dataQa:"login-widget-product-card-label"})]}),(0,o.jsxs)("div",{className:rK.wrapper,children:[(0,o.jsxs)("div",{className:rK.info,"data-qa":"login-widget-product-card-info",children:[x&&(0,o.jsx)("img",{className:rK.logo,loading:"lazy",width:"100%",height:"36px",src:v,alt:"Логотип продукта","data-qa":"login-widget-product-card-logo"}),(0,o.jsxs)("div",{className:rK.textWrapper,children:[b&&(0,o.jsx)(h.T,{as:"p",dataQa:"login-widget-product-card-title",className:rK.text,children:b}),s&&(0,o.jsx)(h.T,{as:"p",dataQa:"login-widget-product-card-text",className:rK.text,children:s})]})]}),(0,o.jsx)(rX,{params:m})]})]})};rJ.displayName="ProductCard";let r0=Object.freeze({ESIA:{label:"Войти через Госуслуги",caption:"Госуслуги",icon:e=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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:e=>c.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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:e=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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:e=>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",...e},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:e=>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",...e},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:e=>c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},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:e=>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",...e},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:e=>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",...e},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:e=>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",...e},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}}),r1=e=>{let{providers:t,getHref:n,scenarioOptions:a}=e,r=e=>e?e.map(e=>({...r0[e],href:n(e,a),type:e,caption:r0[e].caption,icon:(0,c.createElement)(r0[e].icon),secondaryIcon:r0[e].secondaryIcon?(0,c.createElement)(r0[e].secondaryIcon):void 0})):[],{primary:l=[],additional:i=[],extra:s=[]}=t,o=r(l),d=r(i),u=r(s);return{primaryButtons:o,additionalButtons:d,extraButtons:u,buttonsList:[{type:"primary",buttons:o},{type:"additional",buttons:d},{type:"extra",buttons:u}]}},r2=(e,t)=>{var n,a;let r=n=>(null==t?void 0:t[n])===null?null:(null==t?void 0:t[n])??(null==e?void 0:e[n]),l={theme:(null==t?void 0:t.theme)??"light",variant:(null==t?void 0:t.variant)??"primary",linkTarget:(null==t?void 0:t.linkTarget)??"_blank",withLogo:(null==t?void 0:t.withLogo)??!1,isNewYearLogo:(null==t?void 0:t.isNewYearLogo)??!1,primaryTextOverride:null==t?void 0:t.primaryTextOverride,additionalTextOverride:null==t?void 0:t.additionalTextOverride,extraTextOverride:null==t?void 0:t.extraTextOverride,title:r("title"),description:r("description"),highlights:r("highlights"),consents:null==e?void 0:e.consents,legalInfo:null==e?void 0:e.legalInfo,availableAuthProviders:null==e?void 0:e.availableAuthProviders},i=(e=[],t)=>void 0!==t?e.filter(e=>t.includes(e)):e,s=(e,t)=>({...e,primaryAuthProviders:i(null==e?void 0:e.primaryAuthProviders,t),additionalAuthProviders:i(null==e?void 0:e.additionalAuthProviders,t),extraAuthProviders:i(null==e?void 0:e.extraAuthProviders,t)}),o=null==e?void 0:e.availableAuthProviders,c=!(null!=t&&t.primaryAuthProviders)&&!(null!=(n=null==t?void 0:t.additionalAuthProviders)&&n.length)&&!(null!=(a=null==t?void 0:t.extraAuthProviders)&&a.length);if(!t||c)return{...e&&s(e,o),...l};let d=s(t,o);return d.primaryAuthProviders.length>0||d.additionalAuthProviders.length>0||d.extraAuthProviders.length>0?{...d,...l}:{...e&&s(e,o),...l}},r3=e=>{let{configKey:t,entryPointId:n,serverConfig:a={},baseUrl:r,apiBaseUrl:l,apiVersion:i,autoFetch:s=!0,product:o,productContext:d,isSilent:u,config:h,query:p={},scenarioParams:f={},onMount:m,onDestroy:g,onAnalyticsEvent:v}=e,[x,b]=(0,c.useState)(null),[w,y]=(0,c.useState)(s),k=(0,c.useCallback)(async()=>{try{y(!0);let e=await rL(l,t??void 0,i);b(e)}catch(e){throw Error(`Unknown fetch error: ${e}`)}finally{y(!1)}},[]);(0,c.useEffect)(()=>(null==m||m(),null==v||v({eventCategory:"login-widget",eventAction:"mount_login_widget"}),()=>{null==g||g(),null==v||v({eventCategory:"login-widget",eventAction:"unmount_login_widget"})}),[]),(0,c.useEffect)(()=>{s&&k()},[s,k]);let _=s?x:a,C=(e="ESIA",t={})=>({version:"v2",entryPointId:n,product:o,productContext:d,isSilent:u,authProvider:e,consents:Object.fromEntries(((null==_?void 0:_.consents)??[]).map(e=>[e.key,e.value])),...f,...t}),j=(e,t)=>rE(JSON.stringify(C(e,t))),N=r2(_,h);return{getConfig:()=>({...N}),getHref:(e,t)=>(function(e,t){let n=function e(t="",n){let a=t.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(a){let[,e,t=""]=a;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:"",host:"",search:"",hash:""}}if(!function(e,t={}){return("boolean"==typeof t&&(t={acceptRelative:t}),t.strict)?I.test(e):O.test(e)||!!t.acceptRelative&&D.test(e)}(t,{acceptRelative:!0}))return n?e(n+t):P(t);let[,r="",l,i=""]=t.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,s="",o=""]=i.match(/([^#/?]*)(.*)?/)||[];"file:"===r&&(o=o.replace(/\/(?=[A-Za-z]:)/,""));let{pathname:c,search:d,hash:u}=P(o);return{protocol:r.toLowerCase(),auth:l?l.slice(0,Math.max(0,l.length-1)):"",host:s,pathname:c,search:d,hash:u,[B]:!r}}(e),a={...function(e=""){let t=Object.create(null);for(let n of("?"===e[0]&&(e=e.slice(1)),e.split("&"))){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let a=T(e[1].replace(L," "));if("__proto__"===a||"constructor"===a)continue;let r=T((e[2]||"").replace(L," "));void 0===t[a]?t[a]=r:Array.isArray(t[a])?t[a].push(r):t[a]=[t[a],r]}return t}(n.search),...t};return n.search=Object.keys(a).filter(e=>void 0!==a[e]).map(e=>{var t;return(("number"==typeof(t=a[e])||"boolean"==typeof t)&&(t=String(t)),t)?Array.isArray(t)?t.map(t=>`${z(e)}=${S(t)}`).join("&"):`${z(e)}=${S(t)}`:z(e)}).filter(Boolean).join("&"),function(e){let t=e.pathname||"",n=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",a=e.hash||"",r=e.auth?e.auth+"@":"",l=e.host||"";return(e.protocol||e[B]?(e.protocol||"")+"//":"")+r+l+t+n+a}(n)})(F(r,"/registration"),{...p,scenario:j(e,t)}),isPending:w}},r4={loginWidget:"_loginWidget_h02n9_61",wrapper:"_wrapper_h02n9_81",heading:"_heading_h02n9_86",description:"_description_h02n9_87"},r7=({serverConfig:e,baseUrl:t,s3AssetsUrl:n="",configKey:a,entryPointId:r,apiVersion:l,config:i,product:s,productContext:p,query:f,scenarioParams:m,isSilent:g,skeleton:v=(0,o.jsx)("p",{children:"Загружаем данные..."}),className:x,style:b,overrideLoginAction:w,onMount:y,onDestroy:C,onAnalyticsEvent:j,...N})=>{let[E,L]=(0,c.useState)(),[R,A]=(0,c.useState)(),[$,Z]=(0,c.useState)(),{getConfig:S,getHref:z}=r3({configKey:a,apiBaseUrl:"",apiVersion:l,entryPointId:r,autoFetch:!1,baseUrl:t,product:s,productContext:p,query:f,scenarioParams:m,isSilent:g,config:i,serverConfig:e,onMount:y,onDestroy:C,onAnalyticsEvent:j}),{theme:T,variant:I,linkTarget:O,title:D,description:M,highlights:F,withLogo:B,isNewYearLogo:P,legalInfo:q,consents:H=[],primaryTextOverride:V,additionalTextOverride:W,extraTextOverride:Y,primaryAuthProviders:U,additionalAuthProviders:Q=[],extraAuthProviders:K=[],view:G="base"}=S(),{buttonsList:X}=r1({providers:{primary:U,additional:Q,extra:K},getHref:z,scenarioOptions:{consents:E,phone:$}}),J=X.some(({buttons:e})=>e.length>0),ee=(0,c.useCallback)(e=>{null==j||j(e)},[j]),et=(0,c.useCallback)(e=>{Z(e)},[]),en="phone"===G?rD:rI,ea="primary"===I?d.C:"div",er=R?k:"div",el=(0,c.useCallback)(e=>{A(e)},[]),ei=(0,c.useMemo)(()=>s??{},[JSON.stringify(s)]);return e?Object.keys(e).length?(0,o.jsx)("div",{className:_(r4.loginWidget,x),style:b,...N,"data-auth-widgets-theme":T,"data-qa":"login-widget",children:(0,o.jsxs)(ea,{className:r4.wrapper,children:[(0,o.jsx)(rA,{s3AssetsUrl:n,withLogo:B,isNewYearLogo:P,dataQa:"login-widget-logo"}),(D||M)&&(0,o.jsxs)("div",{children:[D&&(0,o.jsx)(u.H,{type:"h2",className:r4.heading,dataQa:"login-widget-heading",children:D}),M&&(0,o.jsx)(h.T,{as:"p",fontFamily:"secondary",size:"14",className:_(r4.description),dataQa:"login-widget-description",children:M})]}),J?(0,o.jsx)(er,{text:R?"Чтобы войти в личный кабинет, подтвердите свое согласие:":"",...R?{dataQa:"login-widget-tooltip"}:{},children:(0,o.jsx)(en,{buttonsList:X,disabled:R,primaryTextOverride:V,additionalTextOverride:W,extraTextOverride:Y,overrideLoginAction:w,onAnalyticsEvent:ee,linkTarget:O,phone:$,onPhoneChange:et})}):(0,o.jsx)(h.T,{as:"p",weight:"bold",size:"20",dataQa:"login-widget-providers-empty",style:{textAlign:"center"},className:"mb-2",children:"Возникла техническая ошибка. Выберите другой способ входа или попробуйте войти позже"}),(0,o.jsx)(rB,{consents:H,onAgree:e=>{L(e)},onError:el,onAnalyticsEvent:j}),(0,o.jsx)(rJ,{productInfo:ei,s3AssetsUrl:n,onAnalyticsEvent:j}),(0,o.jsx)(rH,{highlights:F??null}),(0,o.jsx)(rW,{legalInfo:q,onAnalyticsEvent:j})]})}):(0,o.jsx)("p",{children:"Возникла техническая ошибка. Попробуйте позже"}):(0,o.jsx)(o.Fragment,{children:v})};r7.displayName="LoginWidget"},5658:function(e,t,n){"use strict";n.d(t,{B:function(){return p},S:function(){return c}});var a=n(7437),r=n(9690),l=n(2265),i=n(1974),s=n(2023),o=n(7031);function c(e){return l.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.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(7518);let d=e=>e?"string"==typeof e?e.split(" ").map(e=>{if(e.includes("-")){let t=e.indexOf("-");return[e.substring(0,t),e.substring(t+1,e.length)]}return[e]}).reduce((e,t)=>{let[n,a]=t;return{...e,[n]:void 0===a||a}},{}):e:{},u=(0,o.g)("button"),h={button:u,label:"".concat(u,"__label"),icon:"".concat(u,"__icon"),spinner:"".concat(u,"__spinner"),states:{ghost:"".concat(u,"--ghost"),outline:"".concat(u,"--outline"),stretch:"".concat(u,"--stretch"),iconOnly:"".concat(u,"--icon-only"),iconLeft:"".concat(u,"--icon-left"),iconRight:"".concat(u,"--icon-right"),rounded:"".concat(u,"--rounded"),disabled:"".concat(u,"--disabled"),hidden:"".concat(u,"--hidden")}},p=(0,l.forwardRef)((e,t)=>{let{as:n,appearance:o="fill",children:u,className:p,disabled:f=!1,iconLeft:m,iconRight:g,label:v,pending:x,shape:b="default",size:w="m",stretch:y=!1,variant:k="primary",type:_,dataId:C,dataQa:j,style:N,onClick:E,...L}=e,R=n||"button",A=v||u,$=(0,l.useMemo)(()=>"icon"===b||"circle-icon"===b,[b]),Z=(0,l.useMemo)(()=>{let e={};if(w&&!s.B.includes(w)){let t=d(w);e=s.B.reduce((e,n)=>{let a="xs"===n?"".concat(h.button,"--").concat(t[n]):"".concat(h.button,"--").concat(t[n],"-").concat(n);return{...e,[a]:!!t[n]}},{})}return e},[w]),S=(0,l.useMemo)(()=>({[h.button]:!0,["".concat(h.button,"--").concat(k)]:!0,["".concat(h.button,"--").concat(w)]:w&&s.B.includes(w),[h.states.iconOnly]:$,[h.states.stretch]:!0===y,["".concat(h.states.stretch,":").concat(y)]:"string"==typeof y,[h.states.ghost]:"ghost"===o,[h.states.outline]:"outline"===o,[h.states.rounded]:"circle-icon"===b,[h.states.iconLeft]:m&&!$,[h.states.iconRight]:g&&!$,[h.states.disabled]:f,...Z}),[o,f,m,$,g,Z,b,w,y,k]),z=(0,l.useMemo)(()=>!!g&&(!$||!m),[m,g,$]),T=(0,l.useCallback)(e=>{if(f){e.preventDefault();return}null==E||E(e)},[E,f]);return(0,a.jsxs)(R,{className:(0,r.Z)(p,{...S}),ref:t,style:N,type:"button"===R?_||"button":void 0,disabled:"button"===R?f:void 0,"aria-disabled":f||void 0,tabIndex:f?-1:0,onClick:T,...L,"data-qa":j,"data-id":C,children:[m&&(0,a.jsx)("span",{role:"img","aria-hidden":"true",className:(0,r.Z)(h.icon,{[h.states.hidden]:x}),children:m}),A&&!$&&(0,a.jsx)("span",{className:(0,r.Z)(h.label,{[h.states.hidden]:x}),children:A}),z&&(0,a.jsx)("span",{role:"img","aria-hidden":"true",className:(0,r.Z)(h.icon,{[h.states.hidden]:x}),children:g}),x&&(0,a.jsx)("span",{role:"img","aria-hidden":"true",className:h.spinner,children:(0,a.jsx)(i.P,{children:(0,a.jsx)(c,{})})})]})});p.displayName="Button"},5515:function(e,t,n){"use strict";n.d(t,{C:function(){return p},S:function(){return d},a:function(){return c}});var a=n(7437),r=n(9690),l=n(2265),i=n(1974),s=n(8394),o=n(7031);function c(e){return l.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("defs",null,l.createElement("clipPath",{id:"a"},l.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),l.createElement("g",{clipPath:"url(#a)"},l.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 d(e){return l.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.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(5763);let u=(0,o.g)("caption"),h=Object.freeze({caption:u,captionWithIcon:`${u}--with-icon`,content:`${u}__content`,icon:`${u}__icon`,text:`${u}__text`,size:{s:`${u}--s`,m:`${u}--m`},states:{success:`${u}--success`,error:`${u}--error`,warning:`${u}--warning`}});function p({as:e,children:t,state:n="default",size:l="m",text:o,withoutIcon:u=!1,lineClamp:p,role:f,dataQa:m,dataId:g,className:v,style:x,...b}){let w=o||t,y=!u&&["success","error","warning"].includes(n),k="success"===n?c:d,_=(0,r.Z)(v,h.caption,h.size[l],{[h.captionWithIcon]:y,[h.states.success]:"success"===n,[h.states.error]:"error"===n,[h.states.warning]:"warning"===n});return(0,a.jsx)(e||"div",{className:_,style:x,role:f,...b,"data-id":g,"data-qa":m,children:(0,a.jsxs)("div",{className:h.content,children:[y&&w&&(0,a.jsx)(i.P,{className:h.icon,children:(0,a.jsx)(k,{})}),(0,a.jsx)("span",{className:(0,r.Z)(h.text),style:{...p?{WebkitLineClamp:p,lineClamp:p,...s.l}:void 0},children:w})]})})}p.displayName="Caption"},5915:function(e,t,n){"use strict";n.d(t,{C:function(){return o}});var a=n(7437),r=n(9690),l=n(7031);n(6199);let i=(0,l.g)("card"),s={card:i,variants:{primary:`${i}--primary`,secondary:`${i}--secondary`}},o=({as:e,className:t,style:n,children:l,variant:i="primary",dataQa:o,dataId:c,...d})=>(0,a.jsx)(e||"div",{className:(0,r.Z)(t,s.card,s.variants[i]),style:n,...d,"data-id":c,"data-qa":o,children:l});o.displayName="Card"},2821:function(e,t,n){"use strict";n.d(t,{C:function(){return m},u:function(){return h}});var a=n(7437),r=n(9690),l=n(2265),i=n(2626),s=n(5515);n(2023);var o=n(271),c=n(4124),d=n(1974),u=n(7031);function h(e,t){let[n,a]=(0,l.useState)(e);return(0,l.useEffect)(()=>{(0,o.i)(t)&&a(t)},[JSON.stringify(t)]),[n,a]}n(3042);let p=(0,u.g)("checkbox"),f=Object.freeze({checkbox:p,input:"".concat(p,"__input"),marker:"".concat(p,"__marker"),wrapper:"".concat(p,"__wrapper"),label:"".concat(p,"__label"),caption:"".concat(p,"__caption"),icon:"".concat(p,"__icon"),iconButton:"".concat(p,"__icon-button"),states:{error:"".concat(p,"--error"),disabled:"".concat(p,"--disabled"),inverted:"".concat(p,"--inverted")},sizes:{xs:"".concat(p,"--xs"),s:"".concat(p,"--s"),m:"".concat(p,"--m")},variants:{primary:"".concat(p,"--primary"),secondary:"".concat(p,"--secondary")}}),m=(0,l.forwardRef)((e,t)=>{let{value:n=!1,variant:o="primary",state:u="default",label:p,disabled:m=!1,caption:g,className:v,icon:x,withIcon:b=!1,size:w="m",style:y,inverted:k=!1,children:_,inputRef:C,dataQa:j,dataId:N,onChange:E,onIconClick:L,...R}=e,[A,$]=h(!1,n),Z=(0,l.useId)(),S=_||p;return(0,a.jsxs)("label",{ref:t,htmlFor:Z,"data-marker-label":"",className:(0,r.Z)(v,f.checkbox,{[f.states.inverted]:k,[f.states.disabled]:m,[f.states.error]:"error"===u,[f.sizes[w]]:!0,[f.variants[o]]:!0}),style:y,"data-id":N,"data-qa":j,children:[(0,a.jsx)("input",{id:Z,ref:C,value:String(A),className:f.input,type:"checkbox","aria-invalid":"error"===u,disabled:m,onChange:e=>{let t="string"==typeof A?!!A:!A;$(t),null==E||E(t,e)},...R}),(0,a.jsx)("span",{className:f.marker,children:(0,a.jsx)(c.C,{type:"checkbox",checked:A,inverted:k,state:u,disabled:m})}),S&&(0,a.jsxs)("span",{className:f.wrapper,children:[(0,a.jsx)("span",{className:(0,r.Z)(f.label),children:S}),g&&(0,a.jsx)(s.C,{className:f.caption,withoutIcon:!0,children:g})]}),b&&(0,a.jsx)("button",{type:"button",className:(0,r.Z)(f.iconButton),onClick:m?void 0:L,children:(0,a.jsx)(d.P,{className:(0,r.Z)(f.icon),children:x?(0,a.jsx)(a.Fragment,{children:x}):(0,a.jsx)(i.S,{})})})]})});m.displayName="Checkbox"},5884:function(e,t,n){"use strict";n(7437),n(9690);var a=n(7031);n(1203);let r=(0,a.g)("col");Object.freeze({col:r,state:{size:(e,t)=>!0===t?`${r}--${e}`:`${r}--${e}-${t}`,offsetLeft:(e,t)=>`${r}--${e}-offset-left-${t}`,offsetRight:(e,t)=>`${r}--${e}-offset-right-${t}`}})},4124:function(e,t,n){"use strict";n.d(t,{C:function(){return p}});var a=n(7437),r=n(9690),l=n(2265),i=n(1974),s=n(7031);function o(e){return l.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.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(e){return l.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("rect",{width:18,height:3,x:3,y:10.5,fill:"currentColor",rx:1.5}))}n(3188);let d=["checkbox"],u=(0,s.g)("common-marker"),h={marker:u,icon:`${u}__icon`,states:{checkbox:`${u}--checkbox`,radio:`${u}--radio`,toggle:`${u}--toggle`,error:`${u}--error`,checked:`${u}--checked`,disabled:`${u}--disabled`,inverted:`${u}--inverted`,indeterminate:`${u}--indeterminate`}},p=({as:e,state:t="default",type:n="checkbox",className:l,checked:s,inverted:u,disabled:p,...f})=>(0,a.jsx)(e||"span",{...f,className:(0,r.Z)(l,h.marker,{[h.states.checkbox]:"checkbox"===n,[h.states.radio]:"radio"===n,[h.states.toggle]:"toggle"===n,[h.states.checked]:!!s,[h.states.indeterminate]:"indeterminate"===s,[h.states.error]:"error"===t,[h.states.inverted]:u,[h.states.disabled]:p}),children:d.includes(n)&&(0,a.jsx)(i.P,{className:(0,r.Z)(h.icon,{[h.states.checked]:s,[h.states.inverted]:u,[h.states.error]:"error"===t,[h.states.disabled]:p}),children:"indeterminate"===s?(0,a.jsx)(c,{}):(0,a.jsx)(o,{})})});p.displayName="CommonMarker"},529:function(e,t,n){"use strict";n(7437),n(9690);var a=n(7031);n(9904);let r=(0,a.g)("container");Object.freeze({container:r,states:{narrow:`${r}--narrow`}})},3026:function(e,t,n){"use strict";n.d(t,{D:function(){return o}});var a=n(7437),r=n(9690),l=n(7031);n(7161);let i=(0,l.g)("divider"),s=Object.freeze({divider:i,content:`${i}__content`}),o=({content:e,className:t,style:n,dataQa:l,dataId:i,...o})=>(0,a.jsx)("div",{className:(0,r.Z)(s.divider,t),style:n,...o,"data-id":i,"data-qa":l,children:e&&(0,a.jsx)("div",{className:s.content,children:e})});o.displayName="Divider"},1088:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var a=n(7437),r=n(9690),l=n(5515),i=n(7031);n(3737);let s=(0,i.g)("form-field"),o=Object.freeze({formField:s,labelWrapper:`${s}__label-wrapper`,label:`${s}__label`,description:`${s}__description`}),c=({label:e,description:t,caption:n,captionState:i,children:s,hasCaption:c,className:d,style:u,dataQa:h,dataId:p,...f})=>(0,a.jsxs)("div",{className:(0,r.Z)(o.formField,d),style:u,...f,"data-id":p,"data-qa":h,children:[(e||t)&&(0,a.jsxs)("div",{className:o.labelWrapper,children:[(0,a.jsx)("span",{className:o.label,children:e}),(0,a.jsx)("span",{className:o.description,children:t})]}),s,(c||n)&&(0,a.jsx)(l.C,{text:n,state:i})]});c.displayName="FormField"},3077:function(e,t,n){"use strict";n.d(t,{H:function(){return d}});var a=n(7437),r=n(9690),l=n(8394),i=n(7031);n(8342);let s={display:"h1",hero:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},o=(0,i.g)("heading"),c=Object.freeze({heading:o,states:Object.freeze({display:`${o}--display`,hero:`${o}--hero`,h1:`${o}--h1`,h2:`${o}--h2`,h3:`${o}--h3`,h4:`${o}--h4`,h5:`${o}--h5`,h6:`${o}--h6`})}),d=({as:e,children:t,weight:n,type:i,lineClamp:o,className:d,style:u,dataQa:h,dataId:p,...f})=>{var m;let g=e||s[i]||"div",v=/^h[1-6]$/.test(g),x=(null==(m=i.match(/\d+/))?void 0:m[0])||1;return(0,a.jsx)(g,{className:(0,r.Z)(c.heading,c.states[i],d),style:{...n?{fontWeight:`var(--font-weight-${n})`}:void 0,...o?{WebkitLineClamp:o,lineClamp:o,...l.l}:void 0,...u},role:v?null:"heading","aria-level":v?null:x,...f,"data-id":p,"data-qa":h,children:t})};d.displayName="Heading"},1720:function(e,t,n){"use strict";n(7437),n(9690);var a=n(7031);n(9216);let r=(0,a.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`}})},3440:function(e,t,n){"use strict";n.d(t,{P:function(){return m}});var a=n(7437),r=n(9690),l=n(2265),i=n(9725),s=n(6982),o=n(1974),c=n(7031);function d(e){return l.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.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(9365);let u=(0,c.g)("pagination"),h=Object.freeze({pagination:u,bullet:"".concat(u,"--bullet"),dots:"".concat(u,"__dots"),link:"".concat(u,"__link"),active:"".concat(u,"__link--active"),controls:"".concat(u,"__link--controls"),big:"".concat(u,"__link--big"),prev:"".concat(u,"__link--prev"),next:"".concat(u,"__link--next"),disabled:"".concat(u,"__link--disabled")}),p=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e),f=e=>{let{totalCount:t,pageSize:n,siblingCount:a=1,currentPage:r}=e;return(0,l.useMemo)(()=>{let e=Math.ceil(t/n);if(a+5>=e)return p(1,e);let l=Math.max(r-a,1),i=Math.min(r+a,e),s=l>2,o=i<e-1;return!s&&o?[...p(1,2+2*a),"...",e]:s&&!o?[1,"...",...p(e-(2+2*a)+1,e)]:s&&o?[1,"...",...p(l,i),"...",e]:void 0},[t,n,a,r])},m=e=>{let{isControl:t=!1,onPageChange:n,totalCount:c,siblingCount:u=1,currentPage:p,pageSize:m,className:g,style:v,dataId:x,dataQa:b,sizePaginationBtn:w="small",hidePaginationControl:y=!1,renderLinkComponent:k,link:_}=e,C=f({currentPage:p,totalCount:c,siblingCount:u,pageSize:m});if(0===p||(null==C?void 0:C.length)<2)return null;let j=C[(null==C?void 0:C.length)-1],N=null==k?void 0:k(p+1),E=null==k?void 0:k(p-1),L=(0,r.Z)(h.controls,h.prev,{[h.big]:"big"===w,[h.link]:"small"===w,[h.disabled]:1===p}),R=(0,r.Z)(h.controls,h.next,{[h.big]:"big"===w,[h.link]:"small"===w,[h.disabled]:p===+j}),A=e=>(0,r.Z)(h.link,{[h.active]:e===p}),$=(0,a.jsx)(o.P,{style:{fontSize:24},children:(0,a.jsx)(s.S,{})}),Z=(0,a.jsx)(o.P,{style:{fontSize:24},children:(0,a.jsx)(i.S,{})});return t?(0,a.jsx)("div",{role:"navigation","aria-label":"Навигация по страницам",className:(0,r.Z)(h.pagination,h.bullet),"data-id":x,"data-qa":b,children:Array.from({length:c/m},(e,t)=>t+1).map((e,t)=>{let r=null==k?void 0:k(+e),i=A(+e);return(0,l.isValidElement)(r)?(0,l.cloneElement)(r,{key:t,className:i}):(0,a.jsx)("a",{className:i,href:_?"".concat(_).concat(+e):"#","aria-current":p===+e?"true":"false","aria-label":"".concat(+e),onClick:t=>{t.preventDefault(),null==n||n(+e)}},t)})}):(0,a.jsxs)("div",{role:"navigation","aria-label":"Навигация по страницам",className:(0,r.Z)(h.pagination,g),style:v,"data-id":x,"data-qa":b,children:[(null==C?void 0:C.length)&&!y?(0,l.isValidElement)(E)?(0,l.cloneElement)(E,{children:Z,className:L}):(0,a.jsx)("a",{href:_?"".concat(_).concat(p-1):"#",className:L,onClick:e=>{e.preventDefault(),null==n||n(p-1)},children:Z}):null,(null==C?void 0:C.length)&&(null==C?void 0:C.map((e,t)=>{if("..."===e)return(0,a.jsx)("div",{className:(0,r.Z)(h.dots),children:(0,a.jsx)(o.P,{children:(0,a.jsx)(d,{})})},t);let i=null==k?void 0:k(+e),s=A(+e);return(0,l.isValidElement)(i)?(0,l.cloneElement)(i,{children:e,key:t,className:s}):(0,a.jsx)("a",{className:s,"aria-current":p===+e?"true":"false","aria-label":"".concat(+e),href:_?"".concat(_).concat(+e):"#",onClick:t=>{t.preventDefault(),null==n||n(+e)},children:e},t)})),(null==C?void 0:C.length)&&!y?(0,l.isValidElement)(N)?(0,l.cloneElement)(N,{children:$,className:R}):(0,a.jsx)("a",{href:_?"".concat(_).concat(p+1):"#",className:R,onClick:e=>{e.preventDefault(),null==n||n(p+1)},children:$}):null]})};m.displayName="Pagination"},1974:function(e,t,n){"use strict";n.d(t,{P:function(){return l}});var a=n(7437),r=n(9690);n(1267);let l=({children:e,className:t,style:n,...l})=>(0,a.jsx)("span",{className:(0,r.Z)(t,"private-icon"),style:n,...l,children:e});l.displayName="PrivateIcon"},356:function(e,t,n){"use strict";n(7437);var a=(n(9690),n(7031));n(9459);let r=(0,a.g)("progress-bar");Object.freeze({progressBar:r,rounded:`${r}-rounded`,indicator:`${r}__indicator`,text:`${r}__text`,animationCircle:`${r}__animation-circle`})},3931:function(e,t,n){"use strict";n(7437),n(9690);var a=n(7031);n(9193);let r=(0,a.g)("row"),l=(e,t,n)=>`${r}--gutter-${e}-${t}-${n}`;Object.freeze({row:r,state:{reverse:`${r}--reverse`,gutter:(e,t="xs")=>Array.isArray(e)?[l(t,e[0],"h"),l(t,e[1],"v")].join(" "):l(t,e,"h")}})},4150:function(e,t,n){"use strict";n(7437),n(9690);var a=n(7031);n(1290);let r=(0,a.g)("skeleton");Object.freeze({skeleton:r,states:{inline:`${r}--inline`,rounded:`${r}--rounded`,inverted:`${r}--inverted`,suspend:`${r}--suspend`}})},18:function(e,t,n){"use strict";n.d(t,{T:function(){return c}});var a=n(7437),r=n(9690),l=n(2265),i=n(7031);n(4432);let s=(0,i.g)("tag"),o=Object.freeze({tag:s,label:"".concat(s,"__label"),icon:"".concat(s,"__icon"),rounded:"".concat(s,"--rounded"),variant:{primary:"".concat(s,"--primary"),secondary:"".concat(s,"--secondary"),red:"".concat(s,"--red"),green:"".concat(s,"--green"),orange:"".concat(s,"--orange"),purple:"".concat(s,"--purple"),outline:"".concat(s,"--outline")},size:{s:"".concat(s,"--s"),m:"".concat(s,"--m"),l:"".concat(s,"--l")},iconMargin:{left:"".concat(s,"__icon--left"),right:"".concat(s,"__icon--right")}}),c=(0,l.forwardRef)((e,t)=>{let{label:n,size:l="m",rounded:i,variant:s="primary",iconLeft:c,iconRight:d,onIconLeftClick:u,onIconRightClick:h,className:p,style:f,dataQa:m,dataId:g,...v}=e;return(0,a.jsx)(a.Fragment,{children:n&&(0,a.jsxs)("div",{ref:t,className:(0,r.Z)(o.tag,o.variant[s],o.size[l],{[o.rounded]:i},p),style:f,...v,"data-id":g,"data-qa":m,children:[c&&(0,a.jsx)("button",{type:"button",className:(0,r.Z)(o.icon,o.iconMargin.left,{[o.size.l]:"l"===l}),onClick:e=>null==u?void 0:u(e),disabled:!u,children:c}),(0,a.jsx)("span",{className:(0,r.Z)(o.label,o.size[l]),children:n}),d&&(0,a.jsx)("button",{type:"button",className:(0,r.Z)(o.icon,o.iconMargin.right,{[o.size.l]:"l"===l}),onClick:e=>null==h?void 0:h(e),disabled:!h,children:d})]})})});c.displayName="Tag"},3350:function(e,t,n){"use strict";n.d(t,{T:function(){return s}});var a=n(7437),r=n(9690),l=n(8394);let i=Object.freeze({text:(0,n(7031).g)("text")});function s({as:e,className:t,style:n,children:s,size:o,weight:c,fontFamily:d,lineClamp:u,dataQa:h,dataId:p,...f}){return(0,a.jsx)(e||"span",{className:(0,r.Z)(i.text,t),style:{...o&&{fontSize:`var(--font-size-${o})`,lineHeight:`var(--font-line-height-${o})`},...c&&{fontWeight:`var(--font-weight-${c})`},...u&&{WebkitLineClamp:u,lineClamp:u,...l.l},...d&&{fontFamily:`var(--font-family-${d})`},...n},...f,"data-id":p,"data-qa":h,children:s})}s.displayName="Text"},8354:function(e,t,n){"use strict";n.d(t,{T:function(){return d}});var a=n(7437),r=n(9690),l=n(2265),i=n(4124),s=n(7031);n(7503);let o=(0,s.g)("toggle"),c=Object.freeze({toggle:o,wrapper:"".concat(o,"__wrapper"),secondaryLabel:"".concat(o,"__secondary-label"),input:"".concat(o,"__input"),marker:"".concat(o,"__marker"),label:"".concat(o,"__label"),caption:"".concat(o,"__caption"),states:{disabled:"".concat(o,"--disabled"),inverted:"".concat(o,"--inverted"),flipped:"".concat(o,"--flipped"),checked:"".concat(o,"--checked")}}),d=(0,l.forwardRef)((e,t)=>{let{value:n,onChange:s,label:o,secondaryLabel:d,disabled:u=!1,caption:h,inverted:p=!1,flipped:f=!1,className:m,style:g,inputRef:v,dataQa:x,dataId:b,...w}=e,[y,k]=(0,l.useState)(null!=n&&n),_=(0,l.useId)();return(0,a.jsxs)("label",{className:(0,r.Z)(m,c.toggle,{[c.states.disabled]:u,[c.states.inverted]:p,[c.states.flipped]:f,[c.states.checked]:y}),style:g,htmlFor:_,"data-marker-label":"",ref:t,"data-id":b,"data-qa":x,children:[(0,a.jsx)("input",{id:_,role:"switch","aria-checked":y,type:"checkbox",className:c.input,checked:y,onChange:e=>{k(e.target.checked),null==s||s(e.target.checked,e)},disabled:u,ref:v,...w}),(0,a.jsx)("span",{className:c.marker,children:(0,a.jsx)(i.C,{type:"toggle",checked:y,inverted:p,disabled:u})}),o&&d&&(0,a.jsx)("span",{className:c.secondaryLabel,children:d}),o&&(0,a.jsxs)("span",{className:c.wrapper,children:[(0,a.jsx)("span",{className:c.label,children:o}),h&&(0,a.jsx)("span",{className:c.caption,children:h})]})]})});d.displayName="Toggle"},2023:function(e,t,n){"use strict";n.d(t,{B:function(){return r},a:function(){return a},b:function(){return l}});let a=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(a)),l=Object.freeze(r.filter(e=>"xs"!==e));Object.freeze(r.filter(e=>"3xl"!==e))},8394:function(e,t,n){"use strict";n.d(t,{l:function(){return a}});let a={display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden"}},7031:function(e,t,n){"use strict";function a(e){return`finkit-${e}`}n.d(t,{g:function(){return a}})},9725:function(e,t,n){"use strict";n.d(t,{S:function(){return r}});var a=n(2265);function r(e){return a.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},a.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"}))}},6982:function(e,t,n){"use strict";n.d(t,{S:function(){return r}});var a=n(2265);function r(e){return a.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},a.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"}))}},2626:function(e,t,n){"use strict";n.d(t,{S:function(){return r}});var a=n(2265);function r(e){return a.createElement("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},a.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"}))}},2578:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});let a=(e,t=!0)=>t?e:void 0},1310:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});let a=()=>Date.now().toString()+Math.random().toString(36).slice(2,9)},271:function(e,t,n){"use strict";function a(e){return void 0!==e}n.d(t,{i:function(){return a}})},9690:function(e,t,n){"use strict";t.Z=function(){for(var e,t,n=0,a="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=function e(t){var n,a,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t){if(Array.isArray(t)){var l=t.length;for(n=0;n<l;n++)t[n]&&(a=e(t[n]))&&(r&&(r+=" "),r+=a)}else for(a in t)t[a]&&(r&&(r+=" "),r+=a)}return r}(e))&&(a&&(a+=" "),a+=t);return a}},146:function(e,t){"use strict";/*! js-cookie v3.0.1 | MIT */function n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)e[a]=n[a]}return e}var a=function e(t,a){function r(e,r,l){if("undefined"!=typeof document){"number"==typeof(l=n({},a,l)).expires&&(l.expires=new Date(Date.now()+864e5*l.expires)),l.expires&&(l.expires=l.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var s in l)l[s]&&(i+="; "+s,!0!==l[s]&&(i+="="+l[s].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+i}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],a={},r=0;r<n.length;r++){var l=n[r].split("="),i=l.slice(1).join("=");try{var s=decodeURIComponent(l[0]);if(a[s]=t.read(i,s),e===s)break}catch(e){}}return e?a[e]:a}},remove:function(e,t){r(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});t.Z=a}}]);