(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[745],{29583:function(e,t,n){"use strict";function r(e,t){var n=t&&t.cache?t.cache:l,r=t&&t.serializer?t.serializer:s;return(t&&t.strategy?t.strategy:function(e,t){var n,r,s=1===e.length?i:o;return n=t.cache.create(),r=t.serializer,s.bind(this,e,n,r)})(e,{cache:n,serializer:r})}function i(e,t,n,r){var i=null==r||"number"==typeof r||"boolean"==typeof r?r:n(r),o=t.get(i);return void 0===o&&(o=e.call(this,r),t.set(i,o)),o}function o(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}n.r(t),n.d(t,{memoize:function(){return r},strategies:function(){return c}});var s=function(){return JSON.stringify(arguments)};function a(){this.cache=Object.create(null)}a.prototype.get=function(e){return this.cache[e]},a.prototype.set=function(e,t){this.cache[e]=t};var l={create:function(){return new a}},c={variadic:function(e,t){var n,r;return n=t.cache.create(),r=t.serializer,o.bind(this,e,n,r)},monadic:function(e,t){var n,r;return n=t.cache.create(),r=t.serializer,i.bind(this,e,n,r)}}},90889:function(e,t,n){"use strict";n.r(t),n.d(t,{ErrorCode:function(){return p},FormatError:function(){return eu},IntlMessageFormat:function(){return ev},InvalidValueError:function(){return eh},InvalidValueTypeError:function(){return ed},MissingValueError:function(){return ep},PART_TYPE:function(){return m},default:function(){return e_},formatToParts:function(){return ef},isFormatXMLElementFn:function(){return em}});var r,i,o,s,a,l,c,u,h,d,p,m,f=function(e,t){return(f=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var v=function(){return(v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function _(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function b(e){return e.type===c.literal}function y(e){return e.type===c.number}function w(e){return e.type===c.date}function x(e){return e.type===c.time}function E(e){return e.type===c.select}function T(e){return e.type===c.plural}function N(e){return e.type===c.tag}function C(e){return!!(e&&"object"==typeof e&&e.type===u.number)}function j(e){return!!(e&&"object"==typeof e&&e.type===u.dateTime)}"function"==typeof SuppressedError&&SuppressedError,(r=l||(l={}))[r.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",r[r.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",r[r.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",r[r.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",r[r.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",r[r.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",r[r.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",r[r.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",r[r.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",r[r.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",r[r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",r[r.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",r[r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",r[r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",r[r.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",r[r.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",r[r.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",r[r.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",r[r.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",r[r.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",r[r.INVALID_TAG=23]="INVALID_TAG",r[r.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",r[r.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",r[r.UNCLOSED_TAG=27]="UNCLOSED_TAG",(i=c||(c={}))[i.literal=0]="literal",i[i.argument=1]="argument",i[i.number=2]="number",i[i.date=3]="date",i[i.time=4]="time",i[i.select=5]="select",i[i.plural=6]="plural",i[i.pound=7]="pound",i[i.tag=8]="tag",(o=u||(u={}))[o.number=0]="number",o[o.dateTime=1]="dateTime";var A=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,S=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,k=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,I=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,L=/^(@+)?(\+|#+)?[rs]?$/g,O=/(\*)(0+)|(#+)(0+)|(0+)/g,B=/^(0+)$/;function H(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(L,function(e,n,r){return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""}),t}function P(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function $(e){return P(e)||{}}var R={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},M=new RegExp("^".concat(A.source,"*")),U=new RegExp("".concat(A.source,"*$"));function D(e,t){return{start:e,end:t}}var F=!!String.prototype.startsWith&&"_a".startsWith("a",1),G=!!String.fromCodePoint,z=!!Object.fromEntries,W=!!String.prototype.codePointAt,V=!!String.prototype.trimStart,Z=!!String.prototype.trimEnd,q=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&9007199254740991>=Math.abs(e)},X=!0;try{var K=er("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");X=(null===(h=K.exec("a"))||void 0===h?void 0:h[0])==="a"}catch(e){X=!1}var Y=F?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},J=G?String.fromCodePoint:function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0;i>o;){if((e=t[o++])>1114111)throw RangeError(e+" is not a valid code point");r+=e<65536?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,e%1024+56320)}return r},Q=z?Object.fromEntries:function(e){for(var t={},n=0;n<e.length;n++){var r=e[n],i=r[0],o=r[1];t[i]=o}return t},ee=W?function(e,t){return e.codePointAt(t)}:function(e,t){var n,r=e.length;if(!(t<0)&&!(t>=r)){var i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:(i-55296<<10)+(n-56320)+65536}},et=V?function(e){return e.trimStart()}:function(e){return e.replace(M,"")},en=Z?function(e){return e.trimEnd()}:function(e){return e.replace(U,"")};function er(e,t){return new RegExp(e,t)}if(X){var ei=er("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");d=function(e,t){var n;return ei.lastIndex=t,null!==(n=ei.exec(e)[1])&&void 0!==n?n:""}}else d=function(e,t){for(var n=[];;){var r,i=ee(e,t);if(void 0===i||ea(i)||(r=i)>=33&&r<=35||36===r||r>=37&&r<=39||40===r||41===r||42===r||43===r||44===r||45===r||r>=46&&r<=47||r>=58&&r<=59||r>=60&&r<=62||r>=63&&r<=64||91===r||92===r||93===r||94===r||96===r||123===r||124===r||125===r||126===r||161===r||r>=162&&r<=165||166===r||167===r||169===r||171===r||172===r||174===r||176===r||177===r||182===r||187===r||191===r||215===r||247===r||r>=8208&&r<=8213||r>=8214&&r<=8215||8216===r||8217===r||8218===r||r>=8219&&r<=8220||8221===r||8222===r||8223===r||r>=8224&&r<=8231||r>=8240&&r<=8248||8249===r||8250===r||r>=8251&&r<=8254||r>=8257&&r<=8259||8260===r||8261===r||8262===r||r>=8263&&r<=8273||8274===r||8275===r||r>=8277&&r<=8286||r>=8592&&r<=8596||r>=8597&&r<=8601||r>=8602&&r<=8603||r>=8604&&r<=8607||8608===r||r>=8609&&r<=8610||8611===r||r>=8612&&r<=8613||8614===r||r>=8615&&r<=8621||8622===r||r>=8623&&r<=8653||r>=8654&&r<=8655||r>=8656&&r<=8657||8658===r||8659===r||8660===r||r>=8661&&r<=8691||r>=8692&&r<=8959||r>=8960&&r<=8967||8968===r||8969===r||8970===r||8971===r||r>=8972&&r<=8991||r>=8992&&r<=8993||r>=8994&&r<=9e3||9001===r||9002===r||r>=9003&&r<=9083||9084===r||r>=9085&&r<=9114||r>=9115&&r<=9139||r>=9140&&r<=9179||r>=9180&&r<=9185||r>=9186&&r<=9254||r>=9255&&r<=9279||r>=9280&&r<=9290||r>=9291&&r<=9311||r>=9472&&r<=9654||9655===r||r>=9656&&r<=9664||9665===r||r>=9666&&r<=9719||r>=9720&&r<=9727||r>=9728&&r<=9838||9839===r||r>=9840&&r<=10087||10088===r||10089===r||10090===r||10091===r||10092===r||10093===r||10094===r||10095===r||10096===r||10097===r||10098===r||10099===r||10100===r||10101===r||r>=10132&&r<=10175||r>=10176&&r<=10180||10181===r||10182===r||r>=10183&&r<=10213||10214===r||10215===r||10216===r||10217===r||10218===r||10219===r||10220===r||10221===r||10222===r||10223===r||r>=10224&&r<=10239||r>=10240&&r<=10495||r>=10496&&r<=10626||10627===r||10628===r||10629===r||10630===r||10631===r||10632===r||10633===r||10634===r||10635===r||10636===r||10637===r||10638===r||10639===r||10640===r||10641===r||10642===r||10643===r||10644===r||10645===r||10646===r||10647===r||10648===r||r>=10649&&r<=10711||10712===r||10713===r||10714===r||10715===r||r>=10716&&r<=10747||10748===r||10749===r||r>=10750&&r<=11007||r>=11008&&r<=11055||r>=11056&&r<=11076||r>=11077&&r<=11078||r>=11079&&r<=11084||r>=11085&&r<=11123||r>=11124&&r<=11125||r>=11126&&r<=11157||11158===r||r>=11159&&r<=11263||r>=11776&&r<=11777||11778===r||11779===r||11780===r||11781===r||r>=11782&&r<=11784||11785===r||11786===r||11787===r||11788===r||11789===r||r>=11790&&r<=11798||11799===r||r>=11800&&r<=11801||11802===r||11803===r||11804===r||11805===r||r>=11806&&r<=11807||11808===r||11809===r||11810===r||11811===r||11812===r||11813===r||11814===r||11815===r||11816===r||11817===r||r>=11818&&r<=11822||11823===r||r>=11824&&r<=11833||r>=11834&&r<=11835||r>=11836&&r<=11839||11840===r||11841===r||11842===r||r>=11843&&r<=11855||r>=11856&&r<=11857||11858===r||r>=11859&&r<=11903||r>=12289&&r<=12291||12296===r||12297===r||12298===r||12299===r||12300===r||12301===r||12302===r||12303===r||12304===r||12305===r||r>=12306&&r<=12307||12308===r||12309===r||12310===r||12311===r||12312===r||12313===r||12314===r||12315===r||12316===r||12317===r||r>=12318&&r<=12319||12320===r||12336===r||64830===r||64831===r||r>=65093&&r<=65094)break;n.push(i),t+=i>=65536?2:1}return J.apply(void 0,n)};var eo=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var i=this.char();if(123===i){var o=this.parseArgument(e,n);if(o.err)return o;r.push(o.val)}else if(125===i&&e>0)break;else if(35===i&&("plural"===t||"selectordinal"===t)){var s=this.clonePosition();this.bump(),r.push({type:c.pound,location:D(s,this.clonePosition())})}else if(60!==i||this.ignoreTag||47!==this.peek()){if(60===i&&!this.ignoreTag&&es(this.peek()||0)){var o=this.parseTag(e,t);if(o.err)return o;r.push(o.val)}else{var o=this.parseLiteral(e,t);if(o.err)return o;r.push(o.val)}}else{if(!n)return this.error(l.UNMATCHED_CLOSING_TAG,D(this.clonePosition(),this.clonePosition()));break}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:c.literal,value:"<".concat(r,"/>"),location:D(n,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(l.INVALID_TAG,D(n,this.clonePosition()));var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();if(!this.bumpIf("</"))return this.error(l.UNCLOSED_TAG,D(n,this.clonePosition()));if(this.isEOF()||!es(this.char()))return this.error(l.INVALID_TAG,D(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(l.UNMATCHED_CLOSING_TAG,D(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:c.tag,value:r,children:o,location:D(n,this.clonePosition())},err:null}:this.error(l.INVALID_TAG,D(s,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(t);if(i){r+=i;continue}var o=this.tryParseUnquoted(e,t);if(o){r+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){r+=s;continue}break}var a=D(n,this.clonePosition());return{val:{type:c.literal,value:r,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){var e;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(es(e=this.peek()||0)||47===e)?null:(this.bump(),"<")},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39===this.peek())t.push(39),this.bump();else{this.bump();break}}else t.push(n);this.bump()}return J.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),J(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(l.EMPTY_ARGUMENT,D(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(l.MALFORMED_ARGUMENT,D(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:c.argument,value:r,location:D(n,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition()));return this.parseArgumentOptions(e,t,r,n);default:return this.error(l.MALFORMED_ARGUMENT,D(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=d(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:D(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(s){case"":return this.error(l.EXPECT_ARGUMENT_TYPE,D(o,a));case"number":case"date":case"time":this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var m=en(p.val);if(0===m.length)return this.error(l.EXPECT_ARGUMENT_STYLE,D(this.clonePosition(),this.clonePosition()));h={style:m,styleLocation:D(d,this.clonePosition())}}var f=this.tryParseArgumentClose(r);if(f.err)return f;var g=D(r,this.clonePosition());if(h&&Y(null==h?void 0:h.style,"::",0)){var _,b=et(h.style.slice(2));if("number"===s){var p=this.parseNumberSkeletonFromString(b,h.styleLocation);if(p.err)return p;return{val:{type:c.number,value:n,location:g,style:p.val},err:null}}if(0===b.length)return this.error(l.EXPECT_DATE_TIME_SKELETON,g);var y=b;this.locale&&(y=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if("j"===i){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var s=1+(1&o),a=o<2?1:3+(o>>1),l=function(e){var t,n=e.hourCycle;if(void 0===n&&e.hourCycles&&e.hourCycles.length&&(n=e.hourCycles[0]),n)switch(n){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}var r=e.language;return"root"!==r&&(t=e.maximize().region),(R[t||""]||R[r||""]||R["".concat(r,"-001")]||R["001"])[0]}(t);for(("H"==l||"k"==l)&&(a=0);a-- >0;)n+="a";for(;s-- >0;)n=l+n}else"J"===i?n+="H":n+=i}return n}(b,this.locale));var m={type:u.dateTime,pattern:y,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?(_={},y.replace(S,function(e){var t=e.length;switch(e[0]){case"G":_.era=4===t?"long":5===t?"narrow":"short";break;case"y":_.year=2===t?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":_.month=["numeric","2-digit","short","long","narrow"][t-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":_.day=["numeric","2-digit"][t-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":_.weekday=4===t?"long":5===t?"narrow":"short";break;case"e":if(t<4)throw RangeError("`e..eee` (weekday) patterns are not supported");_.weekday=["short","long","narrow","short"][t-4];break;case"c":if(t<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");_.weekday=["short","long","narrow","short"][t-4];break;case"a":_.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":_.hourCycle="h12",_.hour=["numeric","2-digit"][t-1];break;case"H":_.hourCycle="h23",_.hour=["numeric","2-digit"][t-1];break;case"K":_.hourCycle="h11",_.hour=["numeric","2-digit"][t-1];break;case"k":_.hourCycle="h24",_.hour=["numeric","2-digit"][t-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":_.minute=["numeric","2-digit"][t-1];break;case"s":_.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":_.timeZoneName=t<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),_):{}};return{val:{type:"date"===s?c.date:c.time,value:n,location:g,style:m},err:null}}return{val:{type:"number"===s?c.number:"date"===s?c.date:c.time,value:n,location:g,style:null!==(i=null==h?void 0:h.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(l.EXPECT_SELECT_ARGUMENT_OPTIONS,D(w,v({},w)));this.bumpSpace();var x=this.parseIdentifierIfPossible(),E=0;if("select"!==s&&"offset"===x.value){if(!this.bumpIf(":"))return this.error(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,D(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,l.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),x=this.parseIdentifierIfPossible(),E=p.val}var T=this.tryParsePluralOrSelectOptions(e,s,t,x);if(T.err)return T;var f=this.tryParseArgumentClose(r);if(f.err)return f;var N=D(r,this.clonePosition());if("select"===s)return{val:{type:c.select,value:n,options:Q(T.val),location:N},err:null};return{val:{type:c.plural,value:n,options:Q(T.val),offset:E,pluralType:"plural"===s?"cardinal":"ordinal",location:N},err:null};default:return this.error(l.INVALID_ARGUMENT_TYPE,D(o,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,D(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(l.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,D(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw Error("Number skeleton cannot be empty");for(var t=e.split(k).filter(function(e){return e.length>0}),n=[],r=0;r<t.length;r++){var i=t[r].split("/");if(0===i.length)throw Error("Invalid number skeleton");for(var o=i[0],s=i.slice(1),a=0;a<s.length;a++)if(0===s[a].length)throw Error("Invalid number skeleton");n.push({stem:o,options:s})}return n}(e)}catch(e){return this.error(l.INVALID_NUMBER_SKELETON,t)}return{val:{type:u.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=r.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=v(v(v({},t),{notation:"scientific"}),r.options.reduce(function(e,t){return v(v({},e),P(t)||{})},{}));continue;case"engineering":t=v(v(v({},t),{notation:"engineering"}),r.options.reduce(function(e,t){return v(v({},e),P(t)||{})},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(r.options.length>1)throw RangeError("integer-width stems only accept a single optional option");r.options[0].replace(O,function(e,n,r,i,o,s){if(n)t.minimumIntegerDigits=r.length;else if(i&&o)throw Error("We currently do not support maximum integer digits");else if(s)throw Error("We currently do not support exact integer digits");return""});continue}if(B.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(I.test(r.stem)){if(r.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(I,function(e,n,r,i,o,s){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&s?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+s.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""});var i=r.options[0];"w"===i?t=v(v({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=v(v({},t),H(i)));continue}if(L.test(r.stem)){t=v(v({},t),H(r.stem));continue}var o=P(r.stem);o&&(t=v(v({},t),o));var s=function(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!B.test(e))throw Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}(r.stem);s&&(t=v(v({},t),s))}return t}(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){for(var i,o=!1,s=[],a=new Set,c=r.value,u=r.location;;){if(0===c.length){var h=this.clonePosition();if("select"!==t&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_SELECTOR,l.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;u=D(h,this.clonePosition()),c=this.message.slice(h.offset,this.offset())}else break}if(a.has(c))return this.error("select"===t?l.DUPLICATE_SELECT_ARGUMENT_SELECTOR:l.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===c&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?l.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:l.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,D(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(e+1,t,n);if(m.err)return m;var f=this.tryParseArgumentClose(p);if(f.err)return f;s.push([c,{value:m.val,location:D(p,this.clonePosition())}]),a.add(c),this.bumpSpace(),c=(i=this.parseIdentifierIfPossible()).value,u=i.location}return 0===s.length?this.error("select"===t?l.EXPECT_SELECT_ARGUMENT_SELECTOR:l.EXPECT_PLURAL_ARGUMENT_SELECTOR,D(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(l.MISSING_OTHER_CLAUSE,D(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,o=10*o+(s-48),this.bump();else break}var a=D(r,this.clonePosition());return i?q(o*=n)?{val:o,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=ee(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Y(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ea(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function es(e){return e>=97&&e<=122||e>=65&&e<=90}function ea(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function el(e,t){void 0===t&&(t={});var n=new eo(e,t=v({shouldParseSkeletons:!0,requiresOtherClause:!0},t)).parse();if(n.err){var r=SyntaxError(l[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||function e(t){t.forEach(function(t){if(delete t.location,E(t)||T(t))for(var n in t.options)delete t.options[n].location,e(t.options[n].value);else y(t)&&C(t.style)?delete t.style.location:(w(t)||x(t))&&j(t.style)?delete t.style.location:N(t)&&e(t.children)})}(n.val),n.val}var ec=n(29583);(s=p||(p={})).MISSING_VALUE="MISSING_VALUE",s.INVALID_VALUE="INVALID_VALUE",s.MISSING_INTL_API="MISSING_INTL_API";var eu=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return g(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),eh=function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),p.INVALID_VALUE,i)||this}return g(t,e),t}(eu),ed=function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),p.INVALID_VALUE,r)||this}return g(t,e),t}(eu),ep=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),p.MISSING_VALUE,n)||this}return g(t,e),t}(eu);function em(e){return"function"==typeof e}function ef(e,t,n,r,i,o,s){if(1===e.length&&b(e[0]))return[{type:m.literal,value:e[0].value}];for(var a=[],l=0;l<e.length;l++){var u=e[l];if(b(u)){a.push({type:m.literal,value:u.value});continue}if(u.type===c.pound){"number"==typeof o&&a.push({type:m.literal,value:n.getNumberFormat(t).format(o)});continue}var h=u.value;if(!(i&&h in i))throw new ep(h,s);var d=i[h];if(u.type===c.argument){d&&"string"!=typeof d&&"number"!=typeof d||(d="string"==typeof d||"number"==typeof d?String(d):""),a.push({type:"string"==typeof d?m.literal:m.object,value:d});continue}if(w(u)){var f="string"==typeof u.style?r.date[u.style]:j(u.style)?u.style.parsedOptions:void 0;a.push({type:m.literal,value:n.getDateTimeFormat(t,f).format(d)});continue}if(x(u)){var f="string"==typeof u.style?r.time[u.style]:j(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:m.literal,value:n.getDateTimeFormat(t,f).format(d)});continue}if(y(u)){var f="string"==typeof u.style?r.number[u.style]:C(u.style)?u.style.parsedOptions:void 0;f&&f.scale&&(d*=f.scale||1),a.push({type:m.literal,value:n.getNumberFormat(t,f).format(d)});continue}if(N(u)){var g=u.children,v=u.value,_=i[v];if(!em(_))throw new ed(v,"function",s);var A=_(ef(g,t,n,r,i,o).map(function(e){return e.value}));Array.isArray(A)||(A=[A]),a.push.apply(a,A.map(function(e){return{type:"string"==typeof e?m.literal:m.object,value:e}}))}if(E(u)){var S=u.options[d]||u.options.other;if(!S)throw new eh(u.value,d,Object.keys(u.options),s);a.push.apply(a,ef(S.value,t,n,r,i));continue}if(T(u)){var S=u.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new eu('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',p.MISSING_INTL_API,s);var k=n.getPluralRules(t,{type:u.pluralType}).select(d-(u.offset||0));S=u.options[k]||u.options.other}if(!S)throw new eh(u.value,d,Object.keys(u.options),s);a.push.apply(a,ef(S.value,t,n,r,i,d-(u.offset||0)));continue}}return a.length<2?a:a.reduce(function(e,t){var n=e[e.length-1];return n&&n.type===m.literal&&t.type===m.literal?n.value+=t.value:e.push(t),e},[])}function eg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}(a=m||(m={}))[a.literal=0]="literal",a[a.object=1]="object";var ev=function(){function e(t,n,r,i){var o,s,a=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=a.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce(function(e,t){return e.length&&t.type===m.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e},[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return ef(a.ast,a.locales,a.formatters,a.formats,e,void 0,a.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=a.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var l=i||{},c=(l.formatters,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}(l,["formatters"]));this.ast=e.__parse(t,v(v({},c),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=(o=e.formats,r?Object.keys(o).reduce(function(e,t){var n,i;return e[t]=(n=o[t],(i=r[t])?v(v(v({},n||{}),i||{}),Object.keys(n).reduce(function(e,t){return e[t]=v(v({},n[t]),i[t]||{}),e},{})):n),e},v({},o)):o),this.formatters=i&&i.formatters||(void 0===(s=this.formatterCache)&&(s={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:(0,ec.memoize)(function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,_([void 0],t,!1)))},{cache:eg(s.number),strategy:ec.strategies.variadic}),getDateTimeFormat:(0,ec.memoize)(function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,_([void 0],t,!1)))},{cache:eg(s.dateTime),strategy:ec.strategies.variadic}),getPluralRules:(0,ec.memoize)(function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,_([void 0],t,!1)))},{cache:eg(s.pluralRules),strategy:ec.strategies.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return new Intl.Locale(t.length>0?t[0]:"string"==typeof e?e:e[0])}},e.__parse=el,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),e_=ev},12612:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}n.d(t,{default:function(){return s}});var i=n(2265),o=n(54480);function s(e){let{locale:t,...n}=e;if(!t)throw Error("Failed to determine locale in `NextIntlClientProvider`, please provide the `locale` prop explicitly.\n\nSee https://next-intl-docs.vercel.app/docs/configuration#locale");return i.createElement(o.P,r({locale:t},n))}},40905:function(e,t){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DOMAttributeNames:function(){return r},default:function(){return s},isEqualNode:function(){return o}});let r={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function i(e){let{type:t,props:n}=e,i=document.createElement(t);for(let e in n){if(!n.hasOwnProperty(e)||"children"===e||"dangerouslySetInnerHTML"===e||void 0===n[e])continue;let o=r[e]||e.toLowerCase();"script"===t&&("async"===o||"defer"===o||"noModule"===o)?i[o]=!!n[e]:i.setAttribute(o,n[e])}let{children:o,dangerouslySetInnerHTML:s}=n;return s?i.innerHTML=s.__html||"":o&&(i.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):""),i}function o(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){let n=t.getAttribute("nonce");if(n&&!e.getAttribute("nonce")){let r=t.cloneNode(!0);return r.setAttribute("nonce",""),r.nonce=n,n===e.nonce&&e.isEqualNode(r)}}return e.isEqualNode(t)}function s(){return{mountedInstances:new Set,updateHead:e=>{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let n=t[e.type]||[];n.push(e),t[e.type]=n});let r=t.title?t.title[0]:null,i="";if(r){let{children:e}=r.props;i="string"==typeof e?e:Array.isArray(e)?e.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach(e=>{n(e,t[e]||[])})}}}n=(e,t)=>{let n=document.getElementsByTagName("head")[0],r=n.querySelector("meta[name=next-head-count]"),s=Number(r.content),a=[];for(let t=0,n=r.previousElementSibling;t<s;t++,n=(null==n?void 0:n.previousElementSibling)||null){var l;(null==n?void 0:null==(l=n.tagName)?void 0:l.toLowerCase())===e&&a.push(n)}let c=t.map(i).filter(e=>{for(let t=0,n=a.length;t<n;t++)if(o(a[t],e))return a.splice(t,1),!1;return!0});a.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),c.forEach(e=>n.insertBefore(e,r)),r.content=(s-a.length+c.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},49189:function(e,t){"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,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84080: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,{default:function(){return b},handleClientScriptLoad:function(){return g},initScriptLoader:function(){return v}});let r=n(99920),i=n(41452),o=n(57437),s=r._(n(54887)),a=i._(n(2265)),l=n(36590),c=n(40905),u=n(49189),h=new Map,d=new Set,p=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],m=e=>{if(s.default.preinit){e.forEach(e=>{s.default.preinit(e,{as:"style"})});return}if("undefined"!=typeof window){let t=document.head;e.forEach(e=>{let n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.appendChild(n)})}},f=e=>{let{src:t,id:n,onLoad:r=()=>{},onReady:i=null,dangerouslySetInnerHTML:o,children:s="",strategy:a="afterInteractive",onError:l,stylesheets:u}=e,f=n||t;if(f&&d.has(f))return;if(h.has(t)){d.add(f),h.get(t).then(r,l);return}let g=()=>{i&&i(),d.add(f)},v=document.createElement("script"),_=new Promise((e,t)=>{v.addEventListener("load",function(t){e(),r&&r.call(this,t),g()}),v.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});for(let[n,r]of(o?(v.innerHTML=o.__html||"",g()):s?(v.textContent="string"==typeof s?s:Array.isArray(s)?s.join(""):"",g()):t&&(v.src=t,h.set(t,_)),Object.entries(e))){if(void 0===r||p.includes(n))continue;let e=c.DOMAttributeNames[n]||n.toLowerCase();v.setAttribute(e,r)}"worker"===a&&v.setAttribute("type","text/partytown"),v.setAttribute("data-nscript",a),u&&m(u),document.body.appendChild(v)};function g(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>f(e))}):f(e)}function v(e){e.forEach(g),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");d.add(t)})}function _(e){let{id:t,src:n="",onLoad:r=()=>{},onReady:i=null,strategy:c="afterInteractive",onError:h,stylesheets:p,...m}=e,{updateScripts:g,scripts:v,getIsSsr:_,appDir:b,nonce:y}=(0,a.useContext)(l.HeadManagerContext),w=(0,a.useRef)(!1);(0,a.useEffect)(()=>{let e=t||n;w.current||(i&&e&&d.has(e)&&i(),w.current=!0)},[i,t,n]);let x=(0,a.useRef)(!1);if((0,a.useEffect)(()=>{!x.current&&("afterInteractive"===c?f(e):"lazyOnload"===c&&("complete"===document.readyState?(0,u.requestIdleCallback)(()=>f(e)):window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>f(e))})),x.current=!0)},[e,c]),("beforeInteractive"===c||"worker"===c)&&(g?(v[c]=(v[c]||[]).concat([{id:t,src:n,onLoad:r,onReady:i,onError:h,...m}]),g(v)):_&&_()?d.add(t||n):_&&!_()&&f(e)),b){if(p&&p.forEach(e=>{s.default.preinit(e,{as:"style"})}),"beforeInteractive"===c)return n?(s.default.preload(n,m.integrity?{as:"script",integrity:m.integrity,nonce:y}:{as:"script",nonce:y}),(0,o.jsx)("script",{nonce:y,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([n,{...m,id:t}])+")"}})):(m.dangerouslySetInnerHTML&&(m.children=m.dangerouslySetInnerHTML.__html,delete m.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:y,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...m,id:t}])+")"}}));"afterInteractive"===c&&n&&s.default.preload(n,m.integrity?{as:"script",integrity:m.integrity,nonce:y}:{as:"script",nonce:y})}return null}Object.defineProperty(_,"__nextScript",{value:!0});let b=_;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},58945:function(e,t,n){"use strict";let r=n(2265).createContext(void 0);t.IntlContext=r},54480:function(e,t,n){"use strict";var r=n(2265),i=n(73834),o=n(58945);n(29583),n(90889);var s=r&&r.__esModule?r:{default:r};t.P=function(e){let{children:t,defaultTranslationValues:n,formats:a,getMessageFallback:l,locale:c,messages:u,now:h,onError:d,timeZone:p}=e,m=r.useMemo(()=>i.createFormatters(),[c]),f=r.useMemo(()=>({...i.initializeConfig({locale:c,defaultTranslationValues:n,formats:a,getMessageFallback:l,messages:u,now:h,onError:d,timeZone:p}),formatters:m}),[n,a,m,l,c,u,h,d,p]);return s.default.createElement(o.IntlContext.Provider,{value:f},t)}},73834:function(e,t,n){"use strict";var r,i=n(29583),o=(r=n(90889))&&r.__esModule?r:{default:r};function s(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(".")}function a(e){return s(e.namespace,e.key)}function l(e){console.error(e)}function c(e,t){return i.memoize(e,{cache:{create:()=>({get:e=>t[e],set(e,n){t[e]=n}})},strategy:i.strategies.variadic})}function u(e,t){return c(function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new e(...n)},t)}t.createFormatters=function(){let e=u(Intl.DateTimeFormat,{}),t=u(Intl.NumberFormat,{}),n=u(Intl.PluralRules,{}),r=u(Intl.RelativeTimeFormat,{}),i=u(Intl.ListFormat,{}),s=u(Intl.DisplayNames,{}),a=c(function(){return new o.default(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],{formatters:{getNumberFormat:t,getDateTimeFormat:e,getPluralRules:n},...arguments.length<=3?void 0:arguments[3]})},{});return{getDateTimeFormat:e,getNumberFormat:t,getPluralRules:n,getMessageFormat:a,getRelativeTimeFormat:r,getListFormat:i,getDisplayNames:s}},t.defaultGetMessageFallback=a,t.defaultOnError=l,t.initializeConfig=function(e){let{getMessageFallback:t,messages:n,onError:r,...i}=e;return{...i,messages:n,onError:r||l,getMessageFallback:t||a}},t.joinPath=s},91802:function(){},87479:function(){},11826:function(){},74270:function(){},7340:function(e,t,n){"use strict";let r;n.d(t,{F:function(){return q}});var i=n(57437),o=n(9938),s=n(44839),a=n(7467),l=n(93381),c=n(94702),u=n(14695),h=n(23644),d=n(2265),p=n(38925);let m=(0,l.g)("footer-contacts-block","sc"),f=Object.freeze({contactsWrapper:`${m}__contacts-wrapper`,gray:`${m}__gray`,phones:`${m}__phones`,contactsButtons:`${m}__contacts-buttons`,vkIcon:`${m}__vk-icon`,tgIcon:`${m}__tg-icon`,dzenIcon:`${m}__dzen-icon`,maxIcon:`${m}__max-icon`,link:`${m}__link`}),g=(0,l.g)("footer","sc"),v=Object.freeze({wrapper:`${g}__wrapper`,section:`${g}__section`,container:`${g}__container`,top:`${g}__top`,main:`${g}__main`,links:`${g}__links`,disclaimer:`${g}__disclaimer`,bottom:`${g}__bottom`,bottomLinks:`${g}__bottom-links`,bottomDisclaimer:`${g}__bottom-disclaimer`,compact:`${g}__wrapper--compact`,white:`${g}__wrapper--white`}),_="finkit-widgets-sc-footer",b=[{title:"8 (800) 505-32-32",url:"tel:88005053232"},{title:"+7 (495) 145-32-32",url:"tel:+74951453232"}],y=[...b,{title:"Онлайн чат",url:void 0}],w=[{type:"vk",className:f.vkIcon,iconName:"vk"},{type:"telegramChannel",className:f.tgIcon,iconName:"telegram"},{type:"dzen",className:f.dzenIcon,iconName:"dzen"},{type:"max",className:f.maxIcon,iconName:"max"}],x=(0,i.jsxs)("p",{children:["На сайте finuslugi.ru предоставляются услуги оператора финансовой платформы ПАО Московская Биржа, а также услуги ООО \xabМБ Маркетплейс\xbb, организации, не являющейся оператором финансовой платформы в соответствии с Федеральным законом от 20.07.2020 №211-ФЗ \xabО совершении финансовых сделок с использованием финансовой платформы\xbb. Услуги оператора финансовой платформы ПАО Московская Биржа обозначены пометкой \xabОткрытие онлайн на Финуслугах\xbb. Иная информация на сайте www.finuslugi.ru считается размещенной ООО \xabМБ Маркетплейс\xbb, если иное явно не следует из существа размещаемой информации. ООО \xabМБ Маркетплейс\xbb входит в Группу \xabМосковская Биржа\xbb.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),"Группа \xabМосковская Биржа\xbb - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),E=({onClick:e,eventActionText:t,eventLabel:n,...r})=>(0,i.jsx)(c.zx,{onClick:r=>{null==e||e(r),(0,u.h)({eventCategory:_,eventActionType:u.D.button,eventActionText:t||"",eventLabel:n})},...r}),T=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:r,chat:o,...s})=>(0,i.jsx)(c.rU,{onClick:i=>{var s,a,l;null==e||e(i),o&&(null==i||i.preventDefault(),null==(l=null==(a=null==(s=null==window?void 0:window.supportWidget)?void 0:s.craftTalk)?void 0:a.open)||l.call(a)),(0,u.h)({eventCategory:_,eventActionType:t||u.D.link,eventActionText:n||"",eventLabel:r})},...s}),N=({minioUrl:e,blogs:t})=>(0,i.jsxs)("div",{className:f.contactsWrapper,children:[(0,i.jsx)(o.xv,{className:f.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,i.jsx)("div",{className:f.phones,children:y.map(({title:e,url:t})=>(0,i.jsx)(T,{href:t,eventActionText:e,chat:!t,children:e},e))}),(0,i.jsx)(o.xv,{className:f.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,i.jsx)("div",{className:f.contactsButtons,children:w.map(({type:n,className:r,iconName:o})=>(0,i.jsx)(E,{as:"a",href:null==t?void 0:t[n],target:"_blank",className:r,iconRight:(0,i.jsx)("img",{width:24,height:24,src:(0,a.xn)(e,`/widgets/footer/${o}.svg`),alt:n,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:n,eventLabel:null==t?void 0:t[n]},n))}),(0,i.jsx)(o.xv,{className:f.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,i.jsx)("div",{className:f.contactsButtons,children:(0,i.jsxs)(T,{href:null==t?void 0:t.investTg,target:"_blank",className:f.link,eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg,children:[(0,i.jsx)(E,{className:f.tgIcon,iconRight:(0,i.jsx)("img",{width:24,height:24,src:(0,a.xn)(e,"/widgets/footer/telegram.svg"),alt:"telegram",loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg}),"Финуслуги Инвест"]})})]}),C=(0,l.g)("footer-disclaimer","sc"),j=Object.freeze({disclaimer:`${C}`}),A=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,u.h)({eventCategory:_,eventActionType:u.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,i.jsx)("div",{className:(0,s.Z)(e.className,j.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,i.jsx)("div",{className:(0,s.Z)(e.className,j.disclaimer),onClick:t,children:e.children})},S=()=>{let e=new URL(window.location.href),t=new URLSearchParams;return e.searchParams.forEach((e,n)=>{/^utm_/i.test(n)&&t.set(n,e)}),t},k=(e="")=>{let[t,n]=(0,d.useState)(e);return(0,d.useEffect)(()=>{let t=S();if(!t||0===t.size)return;let[r,i=""]=e.split("?"),o=new URLSearchParams(i);t.forEach((e,t)=>{o.has(t)||o.set(t,e)});let s=o.toString();n(s?`${r}?${s}`:r)},[e]),t},I=(0,l.g)("footer-modal-body","sc"),L=Object.freeze({wrapper:`${I}__wrapper`,title:`${I}__title`,item:`${I}__item`,label:`${I}__label`,button:`${I}__button`,description:`${I}__description`}),O=({directions:e})=>(0,i.jsxs)("div",{className:L.wrapper,children:[(0,i.jsx)("div",{className:L.title,children:"Направления"}),e.map(e=>(0,i.jsxs)(T,{className:L.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:`${e.name}_${e.url}`,children:[(0,i.jsxs)("div",{className:L.label,children:[(0,i.jsx)("span",{children:e.name}),(0,i.jsx)(E,{className:L.button,iconRight:(0,i.jsx)(h.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,i.jsx)("p",{className:L.description,children:e.description})]},e.url))]}),B=(0,l.g)("footer-popup","sc"),H=Object.freeze({wrapper:`${B}__wrapper`,button:`${B}__button`,icon:`${B}__icon`,buttonWrapper:`${B}__button-wrapper`}),P=({directions:e})=>{let t=(0,c._m)("l"),[n,r]=(0,d.useState)(!1),o=()=>{r(!1)};return(0,i.jsxs)("div",{className:H.wrapper,children:[(0,i.jsx)("div",{className:H.buttonWrapper,children:(0,i.jsx)(E,{className:H.button,appearance:"ghost",variant:"white",onClick:()=>{r(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,i.jsx)("div",{className:H.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,i.jsx)("div",{},e))})})}),(0,i.jsxs)(p.P,{children:[!t&&(0,i.jsx)(p.U,{isOpen:n,onClose:o,full:!0,children:(0,i.jsx)(O,{directions:e})}),t&&(0,i.jsx)(p.D,{isOpen:n,onClose:o,width:"804px",children:(0,i.jsx)(O,{directions:e})})]})]})},$=(0,l.g)("footer-left-column","sc"),R=Object.freeze({leftColumn:`${$}__left-column`,logoWrapper:`${$}__logo-wrapper`,banner:`${$}__banner`,mobAppLink:`${$}__mob-app-link`,br:`${$}__br`}),M=({showcaseUrl:e,minioUrl:t,directions:n,mobAppUrl:r})=>{let s=k(r);return(0,i.jsxs)("div",{className:R.leftColumn,children:[(0,i.jsx)(T,{className:R.logoWrapper,href:e,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:(0,i.jsx)("img",{src:(0,a.xn)(t,"/widgets/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,i.jsx)(P,{directions:n??[]}),(0,i.jsx)(T,{href:s,target:"_blank",eventActionType:u.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:s,className:R.mobAppLink,children:(0,i.jsxs)(o.Zb,{className:R.banner,children:[(0,i.jsxs)(o.xv,{weight:"medium",children:["Управляйте финансами",(0,i.jsx)("br",{}),"через приложение",(0,i.jsx)("br",{className:R.br})," Финуслуг"]}),(0,i.jsx)(E,{iconRight:(0,i.jsx)(h.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,a.xn)(t,"/widgets/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,i.jsx)("img",{src:(0,a.xn)(t,"/widgets/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},U=(0,l.g)("footer-logo","sc"),D=Object.freeze({wrapper:`${U}__wrapper`,link:`${U}__link`,fromMoex:`${U}__from-moex`,logo:`${U}__logo`,white:`${U}__wrapper--white`}),F=({showcaseUrl:e,minioUrl:t,isWhite:n})=>(0,i.jsx)("div",{className:(0,s.Z)(D.wrapper,{[D.white]:n}),children:(0,i.jsxs)(T,{className:D.link,href:e,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:[(0,i.jsx)("img",{className:D.logo,src:`${t}/images/logo-brandmark-common-finuslugi.svg`}),(0,i.jsx)("img",{className:D.fromMoex,src:`${t}/images/fromMoex.svg`})]})});var G=((r=G||{}).BLACK="black",r.GRAY="gray",r);let z=(0,l.g)("footer-warning","sc"),W=Object.freeze({reservedSpace:`${z}__reserved-space`,wrapper:`${z}__wrapper`,wrapperGray:`${z}__wrapper--gray`,fixed:`${z}__wrapper--fixed`,container:`${z}__container`,text:`${z}__text`,invisibleText:`${z}__text--invisible`}),V=({text:e,variant:t,fixed:n,isPlaceholder:r})=>(0,i.jsx)("div",{className:(0,s.Z)(W.wrapper,{[W.wrapperGray]:"gray"===t,[W.fixed]:n&&!r}),children:(0,i.jsx)(o.W2,{className:W.container,children:(0,i.jsx)("div",{className:(0,s.Z)(W.text,{[W.invisibleText]:r}),dangerouslySetInnerHTML:{__html:e}})})}),Z=({warning:e})=>{let t="string"==typeof e?{text:e}:e,n={text:t.text,fixed:t.fixed??!0,variant:t.variant??G.BLACK};return(0,i.jsxs)("div",{className:W.reservedSpace,children:[(0,i.jsx)(V,{...n,isPlaceholder:n.fixed}),n.fixed&&(0,i.jsx)(V,{...n,fixed:!0})]})},q=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",customDisclaimer:r,variant:a="default",className:l})=>{var c,u;let h=!r&&null!=e&&e.disclaimer?e.disclaimer:void 0,d=a.includes("compact"),p=a.includes("white"),m=null==(c=null==e?void 0:e.bottom)?void 0:c.concat(d?b:[]),f=e&&"warning"in e?e.warning:void 0;return e?(0,i.jsx)("footer",{className:(0,s.Z)(v.wrapper,l,{[v.compact]:d,[v.white]:p}),children:(0,i.jsxs)("section",{className:v.section,children:[(0,i.jsxs)(o.W2,{className:v.container,children:[!d&&(0,i.jsx)(M,{showcaseUrl:t,minioUrl:n,directions:null==e?void 0:e.directions,mobAppUrl:null==e?void 0:e.mobAppUrl}),(0,i.jsx)("div",{className:v.wrapper,children:(0,i.jsxs)("div",{className:v.top,children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:v.main,children:[!d&&(0,i.jsx)("div",{className:v.links,children:null==(u=null==e?void 0:e.top)?void 0:u.map(e=>(0,i.jsx)(T,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),d&&(0,i.jsx)(F,{showcaseUrl:t,minioUrl:n,isWhite:p}),(0,i.jsx)(A,{className:v.disclaimer,disclaimer:h,children:r||x})]}),(0,i.jsxs)("div",{className:v.bottom,children:[(0,i.jsx)("div",{className:v.bottomLinks,children:null==m?void 0:m.map(e=>(0,i.jsx)(T,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,i.jsx)(A,{className:v.bottomDisclaimer,disclaimer:null==e?void 0:e.bottomDisclaimer})]})]}),!d&&(0,i.jsx)(N,{minioUrl:n,blogs:null==e?void 0:e.blogs})]})})]}),d&&!!f&&(0,i.jsx)(Z,{warning:f})]})}):null}},39344:function(e,t,n){"use strict";n.d(t,{C:function(){return X},H:function(){return eD}});var r=n(57437),i=n(2265),o=n(23644),s=n(9938),a=n(94702),l=n(44839),c=n(7467),u=n(14695),h=n(38925),d=n(93381);let p=(0,d.g)("header","sc"),m=Object.freeze({header:`${p}`,fixed:`${p}__fixed`,hidden:`${p}__fixed--hidden`,transparent:`${p}--transparent`,navigationOpen:`${p}__navigation-open`,container:`${p}__container`,leftRow:`${p}__left-row`,logo:`${p}__logo`,menuItems:`${p}__menu-items`,menuItemActive:`${p}__menu-item-active`,tabletMenuButton:`${p}__tablet-menu-button`,buttonGroup:`${p}__button-group`,chips:`${p}__chips`,menuButton:`${p}__menu-button`,moreButtons:`${p}__more-buttons`,auth:`${p}__auth`,whiteIcons:`${p}__white-icons`,close:`${p}__close`,removed:`${p}__removed`,overlay:`${p}__overlay`,overlayOpening:`${p}__overlay--opening`,overlayClosing:`${p}__overlay--closing`}),f="user_region",g="user_town",v="cb-header",_=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],b=_.reduce((e,t)=>(e[t.id]=t.label,e),{}),y=Object.freeze({mobile:56,desktop:80});var w=n(6035);let x=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let r=document.getElementById("mainHomeBanner"),i=!1,o=0,s=0,a=()=>window.innerWidth<768,l=a(),c=()=>window.scrollY||document.documentElement.scrollTop,u=()=>{let e=document.querySelector(":root");e&&(s=parseFloat(window.getComputedStyle(e).getPropertyValue("--fixed-header-height")),o=c())},h=()=>{let e=a();e!==l&&(l=e,s=0)},d=function(){let a=c(),l=document.getElementById("headerMobileBanner"),h=null==l?void 0:l.getAttribute("data-opening");if("true"===h)return;s||u();let d=a<s,p=a<((null==r?void 0:r.clientHeight)||0);if(n&&p||d){i=!1,e(!1),t(!0);return}e(i=a>o),i&&setTimeout(()=>t(!1),50);let m=i?"0px":"false"===h?`${s}px`:"";document.documentElement.style.setProperty("--new-header-height-desktop",m),document.documentElement.style.setProperty("--new-header-height-mobile",m),o=a<=0?0:a};return window.addEventListener("scroll",d),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",d),window.removeEventListener("resize",h)}},E=()=>{let e=new URLSearchParams(window.location.search),t={};for(let[n,r]of Array.from(e.entries()))n.startsWith("utm_")&&(t[n]=r);return Object.keys(t).length>0?t:null},T=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),N=(e,t,n)=>{let r=new Date;r.setTime(r.getTime()+864e5*n);let i=encodeURIComponent(JSON.stringify(t)),o=`;domain=.${window.location.hostname}`;document.cookie=`${e}=${i};expires=${r.toUTCString()};path=/;SameSite=Lax${o}`},C=()=>{let e=E();e&&!T()&&N("utm_params",e,90),e&&N("utm_last",e,90)},j=()=>{setTimeout(()=>{if(!(typeof document>"u"||"string"!=typeof document.cookie))try{C()}catch(e){console.error("UTM tracking error:",e)}},0)},A=(e,t,n)=>(0,u.h)({eventCategory:v,eventActionType:e,eventActionText:t,eventLabel:n}),S=(0,d.g)("navigation-chips","sc"),k=Object.freeze({wrapper:`${S}__wrapper`,gray:`${S}__variantGray`,white:`${S}__variantWhite`,container:`${S}__container`,chip:`${S}__chip`,more:`${S}__chip--more`,active:`${S}__chip--active`,label:`${S}__label`,hidden:`${S}__hidden`}),I=(0,d.g)("navigation-content","sc"),L=Object.freeze({contentWrapper:`${I}__content-wrapper`,content:`${I}__content`,contentOpen:`${I}__content--open`,contentHeader:`${I}__content-header`,contentTitle:`${I}__content-title`,contentTitleUrl:`${I}__content-title--url`,contentTitleLink:`${I}__content-title--link`,contentTitleNew:`${I}__content-title--new`,new:`${I}__new`,vip:`${I}__vip`,arrowIcon:`${I}__arrow-icon`,links:`${I}__links`,linksColumns:`${I}__links--columns`,linksTitleless:`${I}__links--titleless`,removed:`${I}__removed`,hidden:`${I}__content--hidden`}),O=({chip:e,hidden:t,onClick:n,refCallback:i,activeChipId:s})=>{let a=!!n,c=()=>{if(a)return null==n?void 0:n(e.url);A(u.D.chip,e.title,`${e.title}_${e.url}`)},h=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:k.label,children:e.title}),e.arrow&&(0,r.jsx)(o.IconFdsArrowUpRightSmallO,{size:24})]}),d=(0,l.Z)(k.chip,{[k.hidden]:t,[L.new]:!!e.new,[L.vip]:!!e.vip,[k.active]:e.url===s});return a?(0,r.jsx)("button",{type:"button",className:d,onClick:c,ref:i,children:h}):(0,r.jsx)("a",{href:e.url,className:d,onClick:c,ref:i,children:h})},B=({items:e=[],maxNumberOfLines:t,variant:n,className:s,activeChipId:a,onClick:c})=>{let h=(0,i.useRef)(null),d=(0,i.useRef)(null),p=(0,i.useRef)({}),[m,f]=(0,i.useState)(!1),[g,v]=(0,i.useState)(e.length),[_,b]=(0,i.useState)(!1);(0,i.useMemo)(()=>{let t=p.current;e.forEach(e=>{e.url in t||(t[e.url]=null)}),Object.keys(t).forEach(n=>{e.find(e=>String(e.url)===String(n))||delete t[n]})},[e]);let y=(0,i.useCallback)(()=>{let n=h.current;if(!n)return;let r=e=>e?e.getBoundingClientRect().width:0,i=r(n),o=Math.max(Number(t)||0,0),s=()=>{v(e.length),b(!1)};if(m||0===o||i<=0){s();return}let a=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),l=r(d.current),c=e.map(e=>r(p.current[e.url]));if(c.some(e=>0===e)){s();return}let u=1,f=0,g=0;for(let e of c){let t=u===o?l+a:0,n=0===f?e:f+a+e;if(n+t<=i-.5)f=n,g++;else{if(++u>o)break;f=e,g++}}b(g<e.length),v(g)},[m,e,t]);(0,i.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(y)});return t.observe(e),requestAnimationFrame(y),()=>{t.disconnect()}},[y]),(0,i.useEffect)(()=>{requestAnimationFrame(y)},[y]);let w=m||(t??0)<=0||!_;return(0,r.jsx)("div",{className:(0,l.Z)(s,k.wrapper,{[k.gray]:"gray"===n,[k.white]:"white"===n}),children:(0,r.jsxs)("div",{ref:h,className:k.container,children:[e.map((e,t)=>(0,r.jsx)(O,{chip:e,hidden:!w&&t>=g,activeChipId:a,onClick:c,refCallback:t=>{p.current[e.url]=t}},e.url)),!w&&_&&(0,r.jsxs)("button",{type:"button",ref:d,className:(0,l.Z)(k.chip,k.more),onClick:()=>{A(u.D.chip,"Еще"),f(!0)},children:[(0,r.jsx)(o.IconFdsDotsVerticalO,{size:20}),(0,r.jsx)("span",{className:k.label,children:"Еще"})]}),(w||!_)&&(0,r.jsxs)("button",{type:"button",ref:d,className:(0,l.Z)(k.chip,k.more,k.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,r.jsx)(o.IconFdsDotsVerticalO,{size:20}),(0,r.jsx)("span",{className:k.label,children:"Еще"})]})]})})},H=(e,t)=>{if(!(typeof document>"u")){if(!e&&!t){w.a.removeItem(f),w.a.removeItem(g);return}w.a.setItem(f,JSON.stringify(e)||"",{"max-age":31536e3}),w.a.setItem(g,JSON.stringify(t)||"",{"max-age":31536e3})}},P=e=>{if(typeof document>"u")return null;let t=w.a.getItem(e)??void 0;if(!t||"undefined"===t)return null;try{return JSON.parse(decodeURIComponent(t))}catch{return null}},$=function(e){if(typeof window>"u"||!window.localStorage)return null;let t=window.localStorage.getItem(e);if(!t||"undefined"===t)return null;try{return JSON.parse(t)}catch(t){console.warn(`Invalid object in localStorage for key "${e}": ${t}`)}return null},R=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=$("all_regions")||[];return window.allRegions=e,e},M=e=>{let t={};return e.map(({id:e,name:n,towns:r})=>(r.forEach(r=>{r.parentId=e,t[r.name]=t[r.name]||{},t[r.name][r.id]=n}),r)).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},U=async()=>{let e={regions:[]};try{e=await (await fetch("https://finuslugi.ru/money_data/Root.json?short=1")).json()}catch(e){console.warn(e)}let t=null!=e&&e.regions?e.regions:[];return t.length<1?[]:(window.allRegions=t,window.localStorage.setItem("all_regions",JSON.stringify(t)),window.localStorage.setItem("lastRegionsUpdateUnixTimestamp",JSON.stringify(Date.now())),t)},D=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},F=(e,t,n)=>{(0,u.h)({eventCategory:V,eventActionType:e,eventActionText:t,eventLabel:n})},G=R(),z=M(G),W={regions:G,towns:z,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},V="finkit-widgets-sc-city-select",Z=(0,i.createContext)(W);function q(){return(0,i.useContext)(Z)}let X=({children:e,initialRegion:t,initialTown:n,showStartGeoPopup:o=!0,lastRegionsUpdateUnixTimestamp:s,dadataUrl:a="https://finuslugi.ru/backend/money/dadata"})=>{let l=Number($("lastRegionsUpdateUnixTimestamp")||0),c=Number(s||0)>l,[h,d]=(0,i.useState)(R()),[{startRegion:p,startTown:m},v]=(0,i.useState)({startRegion:W.startRegion,startTown:W.startTown}),_=t??W.region,b=n??W.town,[{region:y,town:w},x]=(0,i.useState)({region:_,town:b}),[E,T]=(0,i.useState)(W.startPopupVisible),[N,C]=(0,i.useState)(W.popupVisible),j=(0,i.useRef)(""),A=(0,i.useMemo)(()=>M(h),[h.length]),S=(0,i.useCallback)((e,t)=>{window.sessionStorage.setItem("start_popup_opened","1"),window.localStorage.setItem("auto_town",JSON.stringify(t)||""),window.localStorage.setItem("auto_region",JSON.stringify(e)||""),T(!0),v({startRegion:e,startTown:t})},[T,v]),k=(0,i.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||S(e,t)},[S]),I=(0,i.useCallback)(()=>{if(j.current&&!y&&!w){let e=A.find(e=>e.name===j.current)??null;return k(h.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}k(y,w)},[y,w,A,h,k]),L=(0,i.useCallback)(e=>{C(e)},[C]),O=(0,i.useCallback)(e=>{e?F(u.D.icon,"location"):F(u.D.button,(null==w?void 0:w.name)||"Вся Россия"),!o||window.sessionStorage.getItem("start_popup_opened")?L(!0):I()},[o,w,L,I]),B=(0,i.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem(f,JSON.stringify(e)||""),window.localStorage.setItem(g,JSON.stringify(t)||""),H(e||null,t||null)):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem(f,""),window.localStorage.setItem(g,""),H(null,null)),x({region:e||null,town:t||null}),T(!1),L(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[L]),G=()=>{x({region:P(f)??$(f),town:P(g)??$(g)});let e=async({coords:{latitude:e,longitude:t}})=>{let n=`${a}?lat=${e}&lon=${t}`,r=await D(n);null!=r&&r.location&&(j.current=r.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&o)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch{}};return(0,i.useEffect)(()=>{if((h.length<1||c)&&U().then(e=>d(e)),window.innerWidth<1024){let e=()=>{G(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{G()},0)},[]),(0,r.jsx)(Z.Provider,{value:{regions:h,towns:A,region:y,town:w,startPopupVisible:E,setStartPopupVisible:T,popupVisible:N,handleToggleModal:L,selectCity:B,handleButtonClick:O,startRegion:p,startTown:m},children:e})},K=()=>{let e=(0,i.useRef)(null),t=(0,i.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,i.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,i.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},Y=(0,d.g)("city-select-modal-body","sc"),J=Object.freeze({wrapper:`${Y}__wrapper`,subtitle:`${Y}__subtitle`,hintWrapper:`${Y}__hint-wrapper`,hintText:`${Y}__hint-text`,input:`${Y}__input`,chips:`${Y}__chips`,townsListWrapper:`${Y}__towns-list-wrapper`,townsList:`${Y}__towns-list`,townsGroup:`${Y}__towns-group`,townsGroupLabel:`${Y}__towns-group-label`,townsGroupList:`${Y}__towns-group-list`,townsName:`${Y}__towns-name`,regionName:`${Y}__region-name`}),Q=({groupedTowns:e,chips:t,query:n,setQuery:s,isDrawer:l})=>{var c;let h=q(),d=(0,i.useRef)(null),[p,m]=(0,i.useState)("10000px");(0,i.useEffect)(()=>{if(!l||!d.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,r)=>{let i=n.map(e=>[...e]),o=i.map(e),s=o.reduce((e,t,n)=>t<o[e]?n:e,0);0===s&&i[0].push(i[1].shift()),2===s&&i[2].unshift(i[1].pop()),1===s&&o[0]>o[2]&&i[1].unshift(i[0].pop()),1===s&&o[0]<o[2]&&i[1].push(i[2].shift());let a=Math.max(...i.map(e));return a>=r?r:t(i,a)};new ResizeObserver(()=>{var e;if(!(null!=(e=d.current)&&e.children))return;let n=Array.from(d.current.children,e=>e.offsetHeight+32);if(0===n.length)return;let r=0;try{r=t([[],n,[]],1/0)}catch{r=0}r>0&&m(`${r}px`)}).observe(d.current)},[]);let f=e=>{if(F(u.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return h.selectCity();let t=h.regions.find(t=>t.id===Number(e.parentId))||null;h.selectCity(t,e)};return(0,r.jsxs)("div",{className:J.wrapper,children:[(0,r.jsxs)("div",{className:J.subtitle,children:["Покажем предложения рядом с вами",(0,r.jsxs)("div",{className:J.hintWrapper,children:[(0,r.jsx)(o.IconFdsQuestionCircleO,{size:24}),(0,r.jsx)("div",{className:J.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,r.jsx)(a.MA,{className:J.input,value:n,onChange:s,size:"s",placeholder:"Введите название города",icon:n?(0,r.jsx)(o.IconFdsCloseCircleO,{size:24,onClick:()=>s("")}):(0,r.jsx)(o.IconFdsSearchO,{size:24})}),(0,r.jsx)(a.cL,{className:J.chips,chips:t,value:(null==(c=h.town)?void 0:c.id)||0,onChipClick:e=>{f(h.towns.find(t=>t.id===e))}}),(0,r.jsx)("div",{className:J.townsListWrapper,children:(0,r.jsx)("div",{ref:d,className:J.townsList,style:{maxHeight:p},children:e.map(e=>(0,r.jsxs)("div",{className:J.townsGroup,children:[(0,r.jsx)("div",{className:J.townsGroupLabel,children:e.letter}),(0,r.jsx)("div",{className:J.townsGroupList,children:e.towns.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>f(e),children:[(0,r.jsx)("div",{className:J.townsName,children:e.name}),(0,r.jsx)("div",{className:J.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},ee=[1095,1096,134,720,189,180],et=()=>{var e;let t=q(),n=(0,a._m)("l"),[o,s]=(0,i.useState)(""),l=`Ваш выбор: ${(null==(e=t.town)?void 0:e.name)||"Вся Россия"}`,c=(0,i.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(o.toLocaleLowerCase())).sort((e,t)=>e.name.localeCompare(t.name)).reduce((e,t)=>{let n=e.pop();return n||(n={letter:t.name[0],towns:[]}),n.letter!==t.name[0]&&(e.push(n),n={letter:t.name[0],towns:[]}),n.towns.push(t),e.push(n),e},[]),[o,t.towns.length]),d=(0,i.useMemo)(()=>[{id:0,label:"Вся Россия"},...ee.map(e=>{let n=t.towns.find(t=>t.id===e);return{id:null==n?void 0:n.id,label:null==n?void 0:n.name}}).filter(e=>(null==e?void 0:e.id)!==void 0)],[t.towns.length]),p=()=>{F(u.D.button,"close"),t.handleToggleModal(!1)};return(0,r.jsxs)(h.P,{children:[!n&&(0,r.jsx)(h.U,{title:l,isOpen:t.popupVisible,onClose:p,full:!0,children:(0,r.jsx)(Q,{groupedTowns:c,chips:d,query:o,setQuery:s})}),n&&(0,r.jsx)(h.D,{title:l,isOpen:t.popupVisible,onClose:p,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,r.jsx)(Q,{groupedTowns:c,chips:d,query:o,setQuery:s,isDrawer:!0})})]})},en={"uat-mp.beta.moex.com":"//chat-marketplace.beta.moex.com","finuslugi.ru":"//chat.finuslugi.ru","dev-rc.beta.moex.com":"//dev-opbot.tech.finuslugi.ru"},er=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(en,e)?en[e]:en["finuslugi.ru"]},ei=(e,t)=>{let n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=`${e}/assets/css/${t}`,document.head.appendChild(n);let r=document.createElement("script");r.src=`${e}/get-bootstrap/${t}`,r.defer=!0,document.body.appendChild(r)},eo=()=>new MutationObserver(e=>{e.forEach(e=>{if("style"===e.attributeName){let e=document.querySelector(".webchat"),t=!!e&&"none"!==e.style.display;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.isOpened=t)}})}),es=()=>{let[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(!1),o=(0,i.useRef)(!1),s=e=>{o.current=e,r(e)};return(0,i.useEffect)(()=>{if(typeof window>"u")return;let e=er(),n="webchat_main";window.supportWidget={craftTalk:{isOpened:!1,setConfig:t=>{if(t.host&&(e=t.host),t.channel&&(n=t.channel),t.user){let e="function"==typeof t.user?t.user:()=>({...t.user});window.__WebchatUserCallback=e}},open:()=>new Promise(e=>{e()}),close:()=>null,toggle:()=>null}};let r=null;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.open=()=>new Promise((i,a)=>{if(o.current){a(Error("chat is already opened"));return}r?(r.openWidget(),t(!1),i()):(s(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;r=e;let o=document.querySelector(".webchat");o&&eo().observe(o,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=r.closeWidget),null==r||r.openWidget(),s(!1),t(!1),i()},ei(e,n))}),window.supportWidget.craftTalk.toggle=()=>{var e,t,n,r;null!=(t=null==(e=window.supportWidget)?void 0:e.craftTalk)&&t.isOpened?window.supportWidget.craftTalk.close():null==(r=null==(n=window.supportWidget)?void 0:n.craftTalk)||r.open()})},[]),{isChatModalOpen:e,setIsChatModalOpen:t,isChatLoading:n}},ea=(0,i.createContext)({isAuth:!1,isHeaderHidden:!1,isHeaderTransparent:!1,openedBlock:null,setOpenedBlock:()=>null,openedSection:null,setOpenedSection:()=>null,isNavigationOpen:!1,isNavigationMounted:!1,navMenuItemsRef:{current:null},navigationRef:{current:null},ignoreClicks:!1,setIgnoreClicks:()=>null,isChatModalOpen:!1,setIsChatModalOpen:()=>null,isChatLoading:!1,fixedContainerRef:{current:null},headerRef:{current:null}});function el(){return(0,i.useContext)(ea)}let ec=e=>{let[t,n]=(0,i.useState)(!1),[o,s]=(0,i.useState)(!1),[a,l]=(0,i.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d}=es(),[p,m]=(0,i.useState)(null),[f,g]=(0,i.useState)(null),[v,_]=(0,i.useState)(!1),[b,y]=(0,i.useState)(!1),[w,E]=(0,i.useState)(!1),T=(0,i.useRef)(null),N=(0,h.u)(v),C=(0,i.useRef)(null),A=(0,i.useRef)(null),S=(0,i.useRef)(null),k=(0,i.useRef)(null),I=(0,i.useCallback)(()=>{N.current&&N.current.scrollTo({top:0})},[N]),L=(0,i.useCallback)(e=>{g(e),I()},[I]),O=(0,i.useCallback)(e=>{C.current&&clearTimeout(C.current),e&&y(!0),e||(C.current=setTimeout(()=>{y(!1),L(null)},300))},[L]),B=(0,i.useCallback)((e,t,n)=>{if(t&&L(t),!n&&e===p||!e){O(!v),_(!v);return}m(e),O(!0),_(!0)},[p,L,v,O]),H=(0,i.useCallback)(()=>{A.current&&clearTimeout(A.current),E(!0),A.current=setTimeout(()=>{E(!1)},650)},[]);return(0,i.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=x(s,l,e.isMainBannerPage);return j(),t},[]),(0,r.jsx)("header",{children:(0,r.jsx)(ea.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:a,openedBlock:p,setOpenedBlock:B,openedSection:f,setOpenedSection:L,isNavigationOpen:v,isNavigationMounted:b,navMenuItemsRef:T,navigationRef:N,ignoreClicks:w,setIgnoreClicks:H,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d,fixedContainerRef:S,headerRef:k},children:e.children})})},eu=({label:e,onClick:t,eventActionText:n,eventLabel:i,...o})=>(0,r.jsx)(a.zx,{label:e,onClick:e=>{null==t||t(e),(0,u.h)({eventCategory:v,eventActionType:u.D.button,eventActionText:n||"",eventLabel:i||""})},...o}),eh=(0,d.g)("header-popup","sc"),ed=Object.freeze({popup:`${eh}__popup`,popupHeader:`${eh}__popup-header`,popupClose:`${eh}__popup-close`,body:`${eh}__body`}),ep=({isOpen:e,onClose:t,children:n,title:i})=>{let s=(0,a._m)("l");return(0,r.jsxs)(h.P,{children:[!s&&(0,r.jsx)(h.U,{title:i,isOpen:e,onClose:t,children:n}),s&&e&&(0,r.jsxs)("div",{className:ed.popup,children:[(0,r.jsxs)("div",{className:ed.popupHeader,children:[i,(0,r.jsx)(eu,{className:ed.popupClose,iconLeft:(0,r.jsx)(o.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:t,eventActionText:"IconFdsCloseO"})]}),(0,r.jsx)("div",{className:ed.body,children:n})]})]})},em=(0,d.g)("start-choice-popup","sc"),ef=Object.freeze({top:`${em}__top`,progress:`${em}__progress`,innerCircle:`${em}__inner-circle`,title:`${em}__title`,subtitle:`${em}__subtitle`,actions:`${em}__actions`}),eg=()=>{var e,t;let n=q(),[o,s]=(0,i.useState)(10),[a,l]=(0,i.useState)(0),c=(0,i.useRef)(void 0),h=()=>{F(u.D.button,"close_choose_popup"),window.localStorage.setItem("auto_town",JSON.stringify(n.startTown)||""),window.localStorage.setItem("auto_region",JSON.stringify(n.startRegion)||""),n.setStartPopupVisible(!1)};return(0,i.useEffect)(()=>{n.startPopupVisible?(()=>{let e=Number((" "+o).slice(1)),t=1e3*e/100,n=0,r=0;c.current=setInterval(()=>{n++,r+=t,l(3.6*n);let i=e-Math.floor(r/1e3);i<o&&s(i),100===n&&(clearInterval(c.current),h())},t)})():(clearInterval(c.current),s(10),l(0))},[n.startPopupVisible]),(0,r.jsxs)(ep,{isOpen:n.startPopupVisible,onClose:h,title:(0,r.jsx)("button",{type:"button",className:ef.progress,style:{background:`conic-gradient(#ff0508 ${a}deg, #e3e7ec 0deg)`},onClick:h,children:(0,r.jsx)("div",{className:ef.innerCircle,children:o})}),children:[(0,r.jsxs)("div",{className:ef.top,children:[(0,r.jsxs)("div",{className:ef.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,r.jsx)("div",{className:ef.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,r.jsxs)("div",{className:ef.actions,children:[(0,r.jsx)(eu,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{F(u.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,r.jsx)(eu,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{F(u.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},ev=(0,d.g)("city-select","sc"),e_=Object.freeze({button:`${ev}__button`,minimal:`${ev}__minimal`,full:`${ev}__full`}),eb=({initialTown:e})=>{var t;let n=q(),s=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:c,isChatModalOpen:u}=el(),{startPopupVisible:h,setStartPopupVisible:d,popupVisible:p}=n,m=(0,i.useRef)();(0,i.useEffect)(()=>{p&&(m.current="popup")},[p]),(0,i.useEffect)(()=>{u&&(m.current="chat")},[u]),(0,i.useEffect)(()=>{h&&(m.current="startPopup")},[h]),(0,i.useEffect)(()=>{m.current&&("chat"===m.current&&h?d(!1):["startPopup","popup"].includes(m.current)&&u&&c(!1))},[p,u,h,d,c]);let f={appearance:"ghost",size:"xs",onClick:()=>n.handleButtonClick(!1),iconLeft:(0,r.jsx)(o.IconFdsLocationO,{size:24})};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.zx,{...f,className:(0,l.Z)(e_.button,e_.full),label:s}),(0,r.jsx)(a.zx,{...f,className:(0,l.Z)(e_.button,e_.minimal),shape:"icon"}),(0,r.jsx)(et,{}),(0,r.jsx)(eg,{})]})},ey=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:i,...o})=>(0,r.jsx)(a.rU,{onClick:r=>{null==e||e(r),(0,u.h)({eventCategory:v,eventActionType:t||u.D.link,eventActionText:n||"",eventLabel:i||""})},...o}),ew=(0,d.g)("header-mobile-app-banner","sc"),ex=Object.freeze({wrapper:`${ew}__wrapper`,container:`${ew}__container`,closeButton:`${ew}__close-button`,innerWrapper:`${ew}__inner-wrapper`,imageWrapper:`${ew}__image-wrapper`,image:`${ew}__image`,title:`${ew}__title`,description:`${ew}__description`,callToAction:`${ew}__call-to-action`,scanQr:`${ew}__scan-qr`}),eE=Object.freeze({mobile:56,desktop:68}),eT="headerBannerShownAt",eN=()=>{let e=localStorage.getItem(eT);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},eC=()=>{localStorage.setItem(eT,new Date().toISOString())},ej=()=>{let e=eN();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},eA=({minioUrl:e,className:t,mobileAppUrl:n})=>{let{fixedContainerRef:h,headerRef:d}=el(),[p,m]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[v,_]=(0,i.useState)(!1),b=(0,i.useCallback)((e="desktop")=>{let t=h.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height",`${eE[e]+y[e]}px`),document.documentElement.style.setProperty("--new-header-height-desktop",`${eE.desktop+y.desktop}px`),document.documentElement.style.setProperty("--new-header-height-mobile",`${eE.mobile+y.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-mobile",`${eE.mobile+y.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-desktop",`${eE.desktop+y.desktop}px`),document.documentElement.style.setProperty("--header-height",`${eE[e]+108}px`))},[]),w=(0,i.useCallback)(()=>{let e=h.current;e&&(document.documentElement.style.removeProperty("--fixed-header-height"),document.documentElement.style.removeProperty("--new-header-height-desktop"),document.documentElement.style.removeProperty("--new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-desktop"),document.documentElement.style.removeProperty("--header-height"),e.style.transform="")},[]);return(0,i.useEffect)(()=>{let e=d.current;if(!e)return;let t=()=>{f&&m(!1),_(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[f]),(0,i.useEffect)(()=>{ej()&&m(!0)},[]),(0,i.useEffect)(()=>{let e=window.innerWidth<768;p&&(b(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?m(!0):_(!0));let t=()=>{if(!p)return null;b(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{w(),window.removeEventListener("resize",t)}},[p,b,w]),p?(0,r.jsx)("div",{id:"headerMobileBanner",role:"region","aria-label":"Мобильное приложение","data-opening":v,className:(0,l.Z)(ex.wrapper,t),children:(0,r.jsx)(s.W2,{children:(0,r.jsxs)("div",{className:ex.container,children:[(0,r.jsxs)("div",{className:ex.innerWrapper,children:[(0,r.jsxs)("picture",{className:ex.imageWrapper,children:[(0,r.jsx)("source",{srcSet:(0,c.xn)(e,"/widgets/header/qr-mobile-app.svg"),media:"(min-width: 768px)"}),(0,r.jsx)("img",{className:ex.image,src:(0,c.xn)(e,"/logo/finuslugi/default-regular.svg")})]}),(0,r.jsxs)("div",{className:ex.scanQr,children:[(0,r.jsx)("div",{className:ex.title,children:"Скачайте приложение Финуслуги"}),(0,r.jsx)("div",{className:ex.description,children:"Сканируйте QR-код"})]}),(0,r.jsxs)("div",{className:ex.callToAction,children:[(0,r.jsxs)("div",{children:["Приложение",(0,r.jsx)("br",{}),"Финуслуги"]}),(0,r.jsx)(a.zx,{onClick:()=>{A(u.D.button,"skachat_mob_prilozheniye_fu"),window.open(n,"_blank","noreferrer")},variant:"white",size:"xs",children:"Скачать"})]})]}),(0,r.jsx)("div",{"aria-label":"Закрыть",role:"button",className:ex.closeButton,onClick:()=>{eC(),w(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?m(!1):g(!0)},children:(0,r.jsx)(o.IconFdsCloseO,{size:"100%"})})]})})}):null},eS=(0,d.g)("header-chat-modal-body","sc"),ek=Object.freeze({wrapper:`${eS}__wrapper`,cardButton:`${eS}__card-button`,card:`${eS}__card`,cardTitle:`${eS}__card-title`,cardSubtitle:`${eS}__card-subtitle`,button:`${eS}__button`}),eI=()=>{let e=el();return(0,r.jsxs)("div",{className:ek.wrapper,children:[(0,r.jsx)(eu,{className:ek.cardButton,variant:"secondary",pending:e.isChatLoading,onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},eventActionText:"Напишите в чат",children:(0,r.jsxs)(s.Zb,{className:ek.card,variant:"secondary",children:[(0,r.jsxs)("div",{className:ek.cardTitle,children:[(0,r.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat",width:24,height:24,loading:"lazy"}),"Напишите в чат"]}),(0,r.jsxs)("p",{className:ek.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,r.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},eL=({data:e,isMobile:t})=>{let n=el();return(0,r.jsx)("div",{className:L.contentWrapper,children:e.map(e=>(0,r.jsx)(i.Fragment,{children:e.sections.map(e=>(0,r.jsxs)("div",{className:(0,l.Z)(L.content,{[L.hidden]:n.openedSection!==e.id,[L.contentOpen]:!!n.openedSection}),children:[(0,r.jsx)("div",{className:L.contentHeader,children:(0,r.jsx)("label",{children:e.title})}),e.content.map((n,i)=>{var s,a;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,r.jsx)("a",{className:(0,l.Z)(L.contentTitle,{[L.removed]:!n.title,[L.contentTitleUrl]:!!n.url,[L.contentTitleLink]:!!e.isSeeAllLinkAvailable,[L.contentTitleNew]:!!n.new}),href:e.isSeeAllLinkAvailable?n.url:void 0,children:(0,r.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,r.jsx)("div",{className:L.arrowIcon,children:(0,r.jsx)(o.IconFdsArrowUpRightSmallO,{})}),n.title]})})}),!(null!=(s=n.links)&&s.length)&&(0,r.jsx)(B,{items:n.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(a=n.links)&&a.length)&&(0,r.jsx)("div",{className:(0,l.Z)(L.links,{[L.linksColumns]:!!n.columns,[L.linksTitleless]:!n.title}),children:n.links.map(e=>(0,r.jsxs)("a",{href:e.url,className:(0,l.Z)({[L.new]:!!e.new}),onClick:()=>A(u.D.link,e.title,`${e.title}_${e.url}`),children:[(0,r.jsx)("div",{className:L.arrowIcon,children:(0,r.jsx)(o.IconFdsArrowUpRightSmallO,{})}),(0,r.jsx)("span",{children:e.title})]},e.url))})]},`${n.url}_${i}`)})]},e.id))},e.id))})},eO=(0,d.g)("navigation-section-icon","sc"),eB=Object.freeze({icon:`${eO}`}),eH=({name:e,background:t})=>{let n=(0,i.useMemo)(()=>e&&o[e]||null,[e]);return e&&n?(0,r.jsx)("div",{className:eB.icon,style:{background:t},children:(0,r.jsx)(n,{})}):null},eP=(0,d.g)("navigation","sc"),e$=Object.freeze({navigation:`${eP}`,navigationOpening:`${eP}--opening`,navigationClosing:`${eP}--closing`,wrapper:`${eP}__wrapper`,container:`${eP}__container`,containerOpen:`${eP}__container--open`,sections:`${eP}__sections`,sectionsOpen:`${eP}__sections--open`,citySelectButton:`${eP}__city-select-button`,sectionsTitle:`${eP}__sections-title`,sectionsWrapper:`${eP}__sections-wrapper`,section:`${eP}__section`,sectionArrow:`${eP}__section-arrow`,sectionExtra:`${eP}__section--extra`,sectionActive:`${eP}__section--active`,sectionTitle:`${eP}__section-title`,chatWrapper:`${eP}__chat-wrapper`,chatHeader:`${eP}__chat-header`,backButton:`${eP}__back-button`,useful:`${eP}__useful`,usefulOpen:`${eP}__useful--open`,usefulTitle:`${eP}__useful-title`,usefulGrid:`${eP}__useful-grid`,removed:`${eP}__removed`}),eR=({data:e})=>{var t;let n=el(),c=q(),h=(0,a.aF)("m"),[d,p]=(0,i.useState)(!0);(0,i.useEffect)(()=>{p(h)},[h]);let m=(0,i.useRef)(null),f=(0,i.useCallback)(()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>n.openedSection?n.setOpenedSection(null):n.isNavigationOpen?n.setOpenedBlock(null):void 0,50)},[n]),g=(0,i.useRef)(!1),v=(0,i.useRef)(null),_=(0,i.useCallback)(()=>{d&&(g.current=!0,v.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),f()},window.history.pushState(null,"",window.location.href))},[f,d]),y=(0,i.useCallback)(()=>{g.current=!1,window.onpopstate=v.current,window.history.go(-1)},[]),w=(0,i.useRef)(null),x=(0,i.useCallback)(e=>{if(d||!n.navMenuItemsRef.current||!n.navigationRef.current)return;let t=e.target,r=!n.navMenuItemsRef.current.contains(t)&&!n.navigationRef.current.contains(t);if(r&&!w.current){n.setIgnoreClicks(),w.current=setTimeout(()=>n.setOpenedBlock(null),300);return}!r&&w.current&&(clearTimeout(w.current),w.current=null)},[d,n]),E=(0,i.useRef)(null),T=(0,i.useCallback)(e=>{typeof window>"u"||(e?(E.current=x,window.addEventListener("mousemove",E.current)):E.current&&window.removeEventListener("mousemove",E.current))},[x]);(0,i.useEffect)(()=>{T(n.isNavigationOpen),n.isNavigationOpen&&!g.current&&_(),!n.isNavigationOpen&&g.current&&y()},[n.isNavigationOpen]);let N=(e,t)=>()=>{A(u.D.button,t),n.setOpenedSection(e)},{start:C,clear:j}=K(),S=(e,t)=>()=>{d||C(N(e,t),150)},k=()=>{d||j()};return(0,r.jsx)("div",{ref:n.navigationRef,className:(0,l.Z)(e$.navigation,{[e$.removed]:!n.isNavigationMounted,[e$.navigationOpening]:n.isNavigationOpen,[e$.navigationClosing]:!n.isNavigationOpen}),children:(0,r.jsx)("div",{className:e$.wrapper,children:(0,r.jsxs)(s.W2,{className:(0,l.Z)(e$.container,{[e$.containerOpen]:!!n.openedSection}),children:[(0,r.jsxs)("div",{className:(0,l.Z)(e$.sections,{[e$.sectionsOpen]:!!n.openedSection}),children:[(0,r.jsx)(a.zx,{className:e$.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>c.handleButtonClick(!1),iconLeft:(0,r.jsx)(o.IconFdsLocationO,{size:24}),label:(null==(t=c.town)?void 0:t.name)||"Вся Россия"}),e.map(e=>(0,r.jsxs)("ul",{className:(0,l.Z)(e$.sectionsWrapper,{[e$.removed]:n.openedBlock!==e.id&&!d}),children:[(0,r.jsx)("div",{className:e$.sectionsTitle,children:b[e.id]}),e.sections.map(e=>(0,r.jsxs)("li",{className:(0,l.Z)(e$.section,{[e$.sectionExtra]:!!e.extra,[e$.sectionActive]:n.openedSection===e.id}),onClick:N(e.id,e.title),onMouseEnter:S(e.id,e.title),onMouseLeave:k,children:[(0,r.jsx)(eH,{name:e.uikitIcon,background:e.uikitIconBg}),(0,r.jsx)("span",{className:e$.sectionTitle,children:e.title}),(0,r.jsx)("div",{className:e$.sectionArrow,children:(0,r.jsx)(o.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,r.jsxs)("div",{className:e$.chatWrapper,children:[(0,r.jsx)("div",{className:e$.chatHeader,children:"Нужна помощь?"}),(0,r.jsx)(eI,{})]})]}),(0,r.jsxs)("button",{type:"button",className:(0,l.Z)(e$.backButton,{[e$.removed]:!n.openedSection}),onClick:()=>{A(u.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,r.jsx)(o.IconFdsChevronLeftO,{size:24}),(0,r.jsx)("span",{children:"Назад"})]}),(0,r.jsx)(eL,{data:e,isMobile:d}),(0,r.jsxs)("div",{className:(0,l.Z)(e$.useful,{[e$.usefulOpen]:!!n.openedSection}),children:[(0,r.jsx)("div",{className:e$.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,r.jsx)(i.Fragment,{children:e.sections.map(e=>(0,r.jsx)("div",{className:(0,l.Z)(e$.usefulGrid,{[e$.removed]:n.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,r.jsxs)("a",{href:e.url,onClick:()=>A(u.D.link,e.title,`${e.title}_${e.url}`),children:[(0,r.jsx)("div",{children:(0,r.jsx)("img",{src:e.icon,srcSet:e.icon2?`${e.icon}, ${e.icon2} 2x`:void 0,alt:e.title,loading:"lazy"})}),(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},`${e.title}_${t}`))},e.id))},e.id))]})]})})})},eM=(e,t,n)=>{var r,i,o,s,a,l,u;let h=(null==(i=null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r.findIndex)?void 0:i.call(r,({id:e})=>"news"===e))||-1,d=(null==(s=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[h])?void 0:s.content)||[];if(null!=(u=null==(l=null==(a=null==e?void 0:e.NAVIGATOR)?void 0:a[h])?void 0:l.content)&&u[0]&&Array.isArray(n)&&d.length){let r=n.map(({title:e,url:n})=>({title:e,url:(0,c.xn)(t||"",n),new:0}));e.NAVIGATOR[h].content[0].links=r}return[{id:"FINPRODUCTS",sections:Array.isArray(null==e?void 0:e.FINPRODUCTS)?null==e?void 0:e.FINPRODUCTS:[]},{id:"NAVIGATOR",sections:Array.isArray(null==e?void 0:e.NAVIGATOR)?null==e?void 0:e.NAVIGATOR:[]},{id:"ABOUT",sections:Array.isArray(null==e?void 0:e.ABOUT)?null==e?void 0:e.ABOUT:[]}]},eU=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",lkUrl:h="https://lk.finuslugi.ru/registration",initialTown:d,isMainBannerPage:p,enableAppHeaderBanner:f=!1,news:g,className:v})=>{let b=el(),y=(0,i.useMemo)(()=>eM(e,t,g),[e,t,g]),w=null==e?void 0:e.config,x=(0,i.useMemo)(()=>y.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[y]),E=b.isAuth?"Личный кабинет":"Войти",T=p&&b.isHeaderTransparent,N=(e,t,n,r)=>()=>{e!==b.openedBlock?A(u.D.toggle,t,"on"):A(u.D.button,"menu_close","on");let i=n?x[e]:"";b.setOpenedBlock(e,i,!!r)},{start:C,clear:j}=K(),S=(e,t,n,r)=>()=>{b.isNavigationOpen&&e===b.openedBlock||b.setIgnoreClicks(),C(N(e,t,n,r),200)},k=e=>()=>{b.ignoreClicks||e()},I=e=>b.openedBlock===e&&b.isNavigationOpen;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:b.headerRef,className:(0,l.Z)(m.header,v,{[m.transparent]:T}),children:(0,r.jsxs)("div",{ref:b.fixedContainerRef,className:(0,l.Z)(m.fixed,{[m.hidden]:b.isHeaderHidden,[m.navigationOpen]:b.isNavigationOpen}),children:[!!(null!=w&&w.appBannerUrl)&&f&&(0,r.jsx)(eA,{mobileAppUrl:w.appBannerUrl,minioUrl:n}),(0,r.jsxs)(s.W2,{className:m.container,children:[(0,r.jsxs)("div",{className:m.leftRow,children:[(0,r.jsx)(ey,{className:m.logo,href:t,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${t}`,children:(0,r.jsxs)("picture",{children:[(0,r.jsx)("source",{srcSet:(0,c.xn)(n,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,r.jsx)("img",{src:(0,c.xn)(n,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,r.jsx)("nav",{ref:b.navMenuItemsRef,className:m.menuItems,children:(0,r.jsx)("ul",{children:_.map(({id:e,label:t})=>(0,r.jsx)("li",{children:(0,r.jsx)(a.zx,{className:(0,l.Z)({[m.menuItemActive]:I(e)}),label:t,variant:"white",size:"xs",onClick:k(N(e,t,!0)),onMouseEnter:S(e,t,!0,!0),onMouseLeave:j})},e))})}),(0,r.jsx)(eu,{className:(0,l.Z)(m.tabletMenuButton,{[m.menuItemActive]:b.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,r.jsx)(o.IconFdsChevronDownO,{size:24}),onClick:N("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,r.jsxs)("div",{className:(0,l.Z)(m.buttonGroup,{[m.whiteIcons]:(null==w?void 0:w.iconColorOnMobileMainBanner)==="white"}),children:[(0,r.jsxs)("div",{className:m.chips,children:[(0,r.jsx)(eu,{as:"a",href:h,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${h}`,iconLeft:(0,r.jsx)(o.IconFdsUserO,{size:20})}),(0,r.jsx)(eu,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,r.jsx)(o.IconFdsChatDotsCircleO,{size:24})})]}),(0,r.jsx)(eu,{className:m.menuButton,size:"xs",shape:T?"icon":"default",appearance:T?"ghost":"fill",label:"Меню",onClick:N("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,r.jsx)(o.IconFdsMenuSkewedO,{size:24})}),(0,r.jsxs)("div",{className:m.moreButtons,children:[(0,r.jsx)(eb,{initialTown:d}),(0,r.jsx)(eu,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",appearance:"ghost",eventActionText:"IconFdsChatDotsSquareAddO",iconLeft:(0,r.jsx)(o.IconFdsChatDotsSquareAddO,{size:24}),children:"Онлайн чат"}),(0,r.jsx)(eu,{as:"a",href:h,size:"xs",eventActionText:E,eventLabel:`${E}_${h}`,label:E})]})]}),(0,r.jsxs)(ey,{className:m.auth,href:h,eventActionText:E,eventLabel:`${E}_${h}`,children:[(0,r.jsx)(eu,{size:"xs",shape:"circle-icon",iconLeft:(0,r.jsx)(o.IconFdsUserO,{}),eventActionText:E,eventLabel:`${E}_${h}`}),(0,r.jsx)("p",{children:E})]}),(0,r.jsx)("div",{className:m.close,children:(0,r.jsx)(eu,{className:m.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,r.jsx)(o.IconFdsCloseO,{}),onClick:()=>b.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,r.jsx)("div",{className:(0,l.Z)(m.overlay,{[m.removed]:!b.isNavigationMounted,[m.overlayOpening]:b.isNavigationOpen,[m.overlayClosing]:!b.isNavigationOpen}),onClick:k(()=>b.setOpenedBlock(null))}),(0,r.jsx)(eR,{data:y,minioUrl:n})]}):null},eD=e=>(0,r.jsx)(ec,{isMainBannerPage:e.isMainBannerPage,children:(0,r.jsx)(eU,{...e})})},38925:function(e,t,n){"use strict";n.d(t,{D:function(){return I},P:function(){return M},U:function(){return R},u:function(){return w}});var r=n(57437),i=n(2265),o=n(44839),s=n(23644),a=n(93381),l=n(54887);let c=300,u=({opened:e})=>{let[t,n]=(0,i.useState)(!1),r=(0,i.useRef)(null),o=(0,i.useRef)(!1);return(0,i.useEffect)(()=>(e&&!o.current?(o.current=!0,n(!0)):!e&&o.current&&(r.current=setTimeout(()=>{o.current=!1,n(!1)},c)),()=>{r.current&&clearTimeout(r.current)}),[e]),{mounted:t}},h=(0,a.g)("click-outside","sc"),d=Object.freeze({overlay:`${h}__overlay`,open:`${h}--open`,close:`${h}--close`}),p=({onClose:e,onToucheMove:t,isOpen:n,delay:s=c})=>{let a=(0,i.useRef)(null),l=(0,i.useCallback)(()=>{e&&(a.current=setTimeout(()=>{e()},s))},[s,e]),u=(0,i.useCallback)(e=>{"Escape"===e.key&&l()},[l]);return(0,i.useEffect)(()=>(n&&window.addEventListener("keydown",u),()=>{a.current&&clearTimeout(a.current),window.removeEventListener("keydown",u)}),[n,u]),(0,r.jsx)("div",{className:(0,o.Z)(d.overlay,{[d.open]:n,[d.close]:!n}),onTouchStart:t,onClick:l})},m=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},f=e=>{e.style.top||(window.prevScrollPosition=window.scrollY)},g=(e,t,n)=>{t.style.setProperty("overflow-y","scroll"),e.classList.toggle("scroll-disable-windows",!0),e.style.setProperty("width",`calc(100vw - ${n}px)`),e.style.setProperty("top",`-${window.prevScrollPosition}px`)},v=e=>{e.style.setProperty("overflow","hidden"),e.style.setProperty("height","100vh")},_=e=>{e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},b=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},y=()=>document.querySelectorAll("[data-portal]").length>1,w=e=>{let t=(0,i.useRef)(null),n=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(n.current===e)return;n.current=e;let r=t.current,i=document.body,o=document.documentElement,s=window.innerWidth-o.clientWidth,a=s>0;if(e&&a)f(i),g(i,o,s),m(r,!0);else if(e)v(i),m(r,!0);else{let e=!y();e&&_(i),e&&b(),m(r,!1)}return()=>{let e=!y();e&&_(i),e&&b()}},[e]),t},x=(0,a.g)("drawer-footer","sc"),E=Object.freeze({footer:`${x}__footer`,hasScroll:`${x}__footer--has-scroll`}),T=({footer:e,hasScroll:t,className:n})=>(0,r.jsx)("div",{className:(0,o.Z)(E.footer,{[E.hasScroll]:t},n),children:"function"==typeof e?e():e}),N=(0,a.g)("drawer-content","sc"),C=Object.freeze({container:`${N}__container`,open:`${N}--open`,close:`${N}--close`,header:`${N}__header`,rowHeader:`${N}__header--row`,title:`${N}__title`,center:`${N}__title--center`,left:`${N}__title--left`,right:`${N}__title--right`,controlContainer:`${N}__control-container`,content:`${N}__content`,footer:`${N}__footer`}),j=({onClose:e,onContentClick:t,children:n,title:a,rowTitle:l,titleAlign:c,isCloseable:u,footer:h,closeButton:d,isOpen:p,contentClassName:m,footerClassName:f,contentStyle:g,width:v})=>{let _=(0,i.useRef)(null),b=(0,i.useRef)(null),[y,w]=(0,i.useState)(!1);(0,i.useEffect)(()=>{var e;if(!b.current||!_.current)return;let t=(null==(e=null==b?void 0:b.current)?void 0:e.getBoundingClientRect().top)||0,n=null==_?void 0:_.current,r=()=>{let e=null==b?void 0:b.current;e&&w(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",r,!1),()=>{null==n||n.removeEventListener("scroll",r,!1)}},[]);let x=g||v?{width:v,...g||{}}:void 0;return(0,r.jsxs)("div",{ref:_,style:x,className:(0,o.Z)(C.container,{[C.open]:p,[C.close]:!p},m),children:[a||u?(0,r.jsxs)("div",{className:(0,o.Z)(C.header,{[C.rowHeader]:l}),children:[u?d?"function"==typeof d?d():d:(0,r.jsx)("button",{type:"button",className:C.controlContainer,onClick:e,children:(0,r.jsx)(s.IconFdsCloseO,{size:24})}):null,a?(0,r.jsx)("h3",{className:(0,o.Z)(C.title,{[C[c]]:!0}),children:a}):null]}):null,(0,r.jsx)("div",{ref:b,className:C.content,onClick:t,children:n}),h&&(0,r.jsx)(T,{className:(0,o.Z)(C.footer,f),footer:h,hasScroll:y})]})},A=(0,a.g)("drawer-layout","sc"),S=Object.freeze({window:`${A}__window`}),k=({onClose:e,isOpen:t,children:n,withDisabledScroll:s,className:a,...l})=>{let c=(0,i.useCallback)(e=>e.stopPropagation(),[]);return w(t&&s),(0,r.jsxs)("div",{"data-portal":!0,className:(0,o.Z)(S.window,a),children:[(0,r.jsx)(p,{onClose:e,isOpen:t,delay:0}),(0,r.jsx)(j,{onContentClick:c,onClose:e,isOpen:t,...l,children:n})]})},I=({isOpen:e=!1,children:t,titleAlign:n="center",isCloseable:i=!0,withDisabledScroll:o=!0,...s})=>{let{mounted:a}=u({opened:e});return a?(0,r.jsx)(k,{titleAlign:n,isCloseable:i,isOpen:e,withDisabledScroll:o,...s,children:t}):null};I.displayName="Drawer";let L=(0,a.g)("mobile-modal-footer","sc"),O=Object.freeze({footer:`${L}__footer`,footerWithoutShadow:`${L}__footer--without-shadow`}),B=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,r.jsx)("div",{className:(0,o.Z)(O.footer,t&&O.footerWithoutShadow,n),children:"function"==typeof e?e():e}),H=(0,a.g)("mobile-popup","sc"),P=Object.freeze({mobilePopup:`${H}`,mobilePopupOpen:`${H}--open`,content:`${H}__content`,contentFull:`${H}__content--full`,contentTransition:`${H}__content--transition`,contentTransitionOpen:`${H}__content--transition-open`,contentLine:`${H}__content-line`,contentContainer:`${H}__content-container`,smallContentContainer:`${H}__content-container--small`,min:`${H}__content-container--min`,title:`${H}__title`,closeContainer:`${H}__close-container`,closeButton:`${H}__close-button`}),$=({children:e,footer:t,isOpen:n,isSmallPopup:a,onClose:l,hasCloseButton:c=!0,full:u,touchDistance:h=100,withDisabledScroll:d=!0,contentClassName:m,className:f,title:g,closeButton:v,footerClassName:_})=>{let[b,y]=(0,i.useState)(!1),[x,E]=(0,i.useState)(!1),[T,N]=(0,i.useState)(!0),[C,j]=(0,i.useState)("120%"),A=(0,i.useRef)(null),S=(0,i.useRef)(0),k=(0,i.useRef)(!1),I=e=>{var t,n,r;let i=null==(t=A.current)?void 0:t.offsetTop,o=null==(n=A.current)?void 0:n.offsetHeight;if(k.current=!0,N(!1),i&&o){let t=(null==(r=null==e?void 0:e.touches[0])?void 0:r.clientY)-i,n=0;t>=0&&t<=o+30&&(n=t),t>o+30&&(n=o+30),j(`${n}px`),S.current=n}},L=()=>{k.current&&(S.current>h&&l?null==l||l():j("0"),N(!0),k.current=!1),window.removeEventListener("touchmove",I),window.removeEventListener("touchend",L)};return(0,i.useEffect)(()=>{n&&setTimeout(()=>{y(!0),E(!0),j("0")},100),!n&&x&&(j("120%"),y(!1),E(!1))},[x,n]),w(n&&d),(0,r.jsxs)("div",{"data-portal":!0,className:(0,o.Z)(P.mobilePopup,x&&P.mobilePopupOpen,f),children:[(0,r.jsx)(p,{onClose:()=>{n&&(null==l||l())},onToucheMove:()=>{n&&(y(!1),window.addEventListener("touchmove",I),window.addEventListener("touchend",L))},isOpen:n,delay:0}),(0,r.jsxs)("div",{className:(0,o.Z)(P.content,u&&P.contentFull,T&&P.contentTransition,T&&b&&P.contentTransitionOpen),ref:A,style:{transform:`translateY(${C})`},children:[(0,r.jsx)("div",{className:P.contentLine}),(0,r.jsxs)("div",{className:(0,o.Z)(P.contentContainer,a&&P.smallContentContainer,{[P.min]:!g&&!c},m),children:[!!g&&(0,r.jsx)("div",{className:P.title,children:g}),c?(0,r.jsx)("div",{className:P.closeContainer,children:c?v?"function"==typeof v?v():v:(0,r.jsx)("button",{onClick:l,className:P.closeButton,children:(0,r.jsx)(s.IconFdsCloseO,{size:24})}):null}):null,e]}),t&&(0,r.jsx)(B,{footerClassName:_,isSmallPopup:a,footer:t})]})]})},R=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...i})=>{let{mounted:o}=u({opened:n});return o?(0,r.jsx)($,{isSmallPopup:t,isOpen:n,...i,children:e}):null};R.displayName="UiMobilePopup";let M=({children:e,id:t="portal-root"})=>{let[n,r]=(0,i.useState)(null);return(0,i.useEffect)(()=>{let e=document.getElementById(t);if(e){r(e);return}let n=document.createElement("div");return n.id=t,document.body.appendChild(n),r(n),()=>{document.body.removeChild(n)}},[t]),n?(0,l.createPortal)(e,n):null}},93381:function(e,t,n){"use strict";function r(e,t){return`finkit-widgets-${t}-${e}`}n.d(t,{g:function(){return r}})},6035:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});let r={getItem:e=>{if(typeof document>"u")return null;let t=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return t?t.split("=")[1]??null:null},setItem:(e,t,n={})=>{if(typeof document>"u")return;(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let r=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;for(let e in n){if(!n.hasOwnProperty(e))continue;r+=`; ${e}`;let t=n[e];!0!==t&&(r+=`=${t}`)}document.cookie=r},removeItem:e=>{r.setItem(e,"",{"max-age":-1})}}},14695:function(e,t,n){"use strict";let r;n.d(t,{D:function(){return a},h:function(){return c}});var i=n(72918),o=n(77707);let s=(e,t)=>{if(typeof window>"u")return;let n=sessionStorage.getItem("pushedEvents"),r=n?JSON.parse(n):[];e.event||(e.event="data-event"),"string"==typeof e.eventAction&&(e.eventAction=e.eventAction.toLowerCase().replaceAll(" ","_")),"string"==typeof e.eventLabel&&(e.eventLabel=e.eventLabel.toLowerCase().replaceAll(" ","_")),e.eventLabel||(e.eventLabel="undefined");let i=r.find(n=>n.eventCategory===e.eventCategory&&n.eventAction===e.eventAction&&n.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===n.url));if(!t||!i){if(t){let t={...e};t.url=window.location.pathname,r.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(r))}(0,o.AB)(e)}};var a=((r=a||{}).icon="icon",r.chip="chip",r.accordion="accordion",r.button="button",r.checkbox="checkbox",r.radio="radio",r.select="select",r.toggle="toggle",r.tooltip="tooltip",r.link="link",r.banner="banner",r.tag="tag",r.date="date",r.field="field",r.offer="offer",r.tab="tab",r.submitButton="submitButton",r.popup="popup",r.block="block",r);let l={icon:"click_icon_",chip:"click_chip_",accordion:"show_acc_",button:"click_button_",checkbox:"click_check_",radio:"click_radio_",select:"click_sel_",toggle:"click_togg_",tooltip:"click_tip_",link:"click_link_",banner:"click_bnr_",tag:"click_tag_",date:"input_date_",field:"input_field_",offer:"click_offer_",tab:"click_tab_",submitButton:"form_button_",popup:"show_pop_up_",block:"click_block_"},c=({eventCategory:e,eventActionType:t,eventActionText:n="",eventLabel:r})=>{let o={event:"data-event",eventCategory:e,eventAction:l[t]+(0,i.t)(n)};void 0!==r&&(o.eventLabel=(0,i.t)("string"==typeof r?r:r.toString())),s(o)}},72918:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});let r={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},i=e=>e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();return t in r?r[t]:e}).replaceAll(/[ \u00A0]/g,"_")},46079:function(e,t,n){"use strict";n.d(t,{CookiesPlate:function(){return u}});var r=n(57437),i=n(2265),o=n(23644),s=n(44839),a=n(6035);let l=(0,n(93381).g)("cookies-plate","sc"),c=Object.freeze({wrapper:"".concat(l,"__wrapper"),contentWrapper:"".concat(l,"__content-wrapper"),visible:"".concat(l,"--visible"),hidden:"".concat(l,"--hidden"),content:"".concat(l,"__content"),text:"".concat(l,"__text"),link:"".concat(l,"__link"),button:"".concat(l,"__button")}),u=e=>{let{className:t,mountDelay:n=3e3,href:l="https://assets.finuslugi.ru/mp-assets/user-agreement.pdf",children:u,closeIcon:h,onMount:d,onLinkClick:p,onClose:m,mountAfterScroll:f=!0}=e,[g,v]=(0,i.useState)(!1),[_,b]=(0,i.useState)(!1),[y,w]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),a.a.getItem("Allow-Cookie")||(w(!0),setTimeout(()=>{v(!0),null==d||d()},n))};return f?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let x=(0,i.useCallback)(()=>{a.a.setItem("Allow-Cookie","1"),b(!0),null==m||m(),setTimeout(()=>w(!1),1e3)},[m]);return y?(0,r.jsx)("div",{className:c.wrapper,children:(0,r.jsx)("div",{className:(0,s.Z)(c.contentWrapper,{[c.visible]:g,[c.hidden]:_}),children:(0,r.jsxs)("div",{className:(0,s.Z)(t,c.content),children:[u||(0,r.jsxs)("p",{className:c.text,children:["Мы используем"," ",(0,r.jsx)("a",{className:c.link,href:l,target:"_blank",rel:"noreferrer",onClick:p,children:"cookie"})," ","для лучшей работы сайта"]}),(0,r.jsx)("button",{className:c.button,onClick:x,children:h||(0,r.jsx)(o.IconFdsCloseO,{})})]})})}):(0,r.jsx)(r.Fragment,{})}},97018:function(e,t,n){"use strict";n.d(t,{C:function(){return x}});var r=n(57437),i=n(2265),o=n(9938),s=n(94702),a=n(44839),l=n(72918),c=n(23644),u=n(93381);let h=(0,u.g)("check-all","sc"),d=Object.freeze({wrapper:`${h}__wrapper`,link:`${h}__link`,icon:`${h}__icon`,iconGray:`${h}__icon--gray`}),p=({children:e,className:t,linkClassName:n,iconGrayBackground:i,Link:o,event:l,href:u,dataLayerPush:h})=>{let p=o??s.rU;return(0,r.jsx)("div",{className:(0,a.Z)(d.wrapper,t),onClick:()=>{l&&h(l)},children:(0,r.jsxs)(p,{className:(0,a.Z)(d.link,n),href:u,children:[e,(0,r.jsx)("span",{className:(0,a.Z)(d.icon,{[d.iconGray]:i}),children:(0,r.jsx)(c.IconFdsArrowUpRightSmallO,{size:24})})]})})},m=(0,u.g)("faq-block","sc"),f=Object.freeze({faqBlock:m,titleWrapper:`${m}__title-wrapper`,title:`${m}__title`,accordionWrapper:`${m}__accordion-wrapper`,accordionItems:`${m}__accordion-items`,accordionItemGray:`${m}__accordion-item--gray`,accordionItemContent:`${m}__accordion-item-content`,accordionActiveItemContent:`${m}__accordion-item-content--active`,states:{primary:`${m}--primary`,secondary:`${m}--secondary`,gray:`${m}--gray`}}),g=e=>{e.data.forEach((t,n)=>{"header"===t.type&&(e.headerBlocksCount++,3===e.headerBlocksCount&&("banner"===e.data[n-1].type&&(e.banner=e.data.splice(n-1,1)),"banner"===e.data[n+1].type&&(e.banner=e.data.splice(n+1,1))),e.banner&&4===e.headerBlocksCount&&e.data.splice(n,0,e.banner[0]))})},v=(0,u.g)("faq-content-block","sc"),_=Object.freeze({contentBlocks:`${v}__content-blocks`,blockLink:`${v}__block-link`,keynoteWrapper:`${v}__keynote-wrapper`,keynote:`${v}__keynote`,annotation:`${v}__annotation`,contentTableWrapper:`${v}__content-table-wrapper`}),b=({className:e,data:t})=>{if(!Array.isArray(t))return null;let n=(()=>{let e=[],n=1,i={data:t,headerBlocksCount:0,banner:[]};g(i),g(i);let o={},s=e=>{var t,n,r,i;let s=(null==(t=e.data)?void 0:t.text)??(null==(n=e.data)?void 0:n.url)??(null==(r=e.data)?void 0:r.html)??(null!=(i=e.data)&&i.year?String(e.data.year):"");return o[e.type]=(o[e.type]??0)+1,`${e.type}-${String(s).slice(0,80)}-${o[e.type]}`};return t.forEach(t=>{let i=s(t);switch(t.type){case"header":e.push((0,r.jsx)("h2",{id:`content_header_${n}`,role:"header",children:t.data.text||""},i)),n++;break;case"sub_header":e.push((0,r.jsx)("h3",{role:"sub-header",children:t.data.text||""},i));break;case"paragraph":e.push((0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.text||""},role:"paragraph"},i));break;case"link":e.push((0,r.jsx)("div",{className:_.blockLink,children:(0,r.jsx)("a",{target:"_blank",href:t.data.url||"",role:"link",rel:"noreferrer",children:t.data.text||""})},i));break;case"dossier":e.push((0,r.jsxs)("div",{children:[(0,r.jsx)("span",{role:"dossier-year",children:t.data.year||""}),(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.text||""},role:"dossier-text"})]},i));break;case"html":e.push((0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.html||""},role:"html"},i));break;case"annotation":e.push((0,r.jsx)("div",{className:_.annotation,dangerouslySetInnerHTML:{__html:t.data.text||""},role:"annotation"},i));break;case"company-annotation":e.push((0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.text||""},role:"company-annotation"},i));break;case"keynote":e.push((0,r.jsx)("div",{className:_.keynoteWrapper,children:(0,r.jsx)("p",{className:_.keynote,dangerouslySetInnerHTML:{__html:t.data.text||""},role:"keynote"})},i));break;case"image":e.push((0,r.jsx)("img",{src:t.data.url||"",alt:"image"},i))}}),e})();return(0,r.jsx)("div",{className:(0,a.Z)(_.contentBlocks,e),role:"blocks",children:n})},y=({question:e,eventCategory:t,dataLayerPush:n,...i})=>(0,r.jsx)(s.Qd,{...i,title:e.question,children:(0,r.jsx)("div",{className:(0,a.Z)(f.accordionItemContent,{[f.accordionActiveItemContent]:i.isActive}),onClick:e=>{e.target instanceof HTMLAnchorElement&&n({event:"data-event",eventCategory:t,eventAction:"click_link",eventLabel:e.target.href})},children:"string"==typeof e.answer?(0,r.jsx)(b,{data:[{type:"html",data:{html:e.answer}}]}):e.answer})}),w=e=>{setTimeout(()=>{let{top:t}=e.getBoundingClientRect();t<80&&e.scrollIntoView({behavior:"smooth",block:"start"})},300)},x=({sectionTitle:e="Частые вопросы",innerTitle:t,questions:n=[],href:c,checkAllText:u,Link:h,className:d,eventCategory:m="cb-faq",multiple:g=!1,variant:v="secondary",dataLayerPush:_,tagTitle:b})=>{let x=g?n.map(e=>e.question):[],[E,T]=(0,i.useState)(x),N="gray"===v;return(0,r.jsx)("section",{className:(0,a.Z)(f.faqBlock,f.states[v],d),children:(0,r.jsxs)(o.W2,{children:[!t&&(0,r.jsx)("div",{className:f.titleWrapper,children:(0,r.jsx)(o.X6,{as:"h2",type:"display",className:f.title,children:e})}),(0,r.jsxs)("div",{className:f.accordionWrapper,children:[t&&(0,r.jsx)(o.X6,{as:"h3",type:"h1",style:{paddingBottom:"12px"},className:(0,a.Z)(f.title,`${f.title}--inner`),children:t}),(0,r.jsx)("div",{className:f.accordionItems,children:(0,r.jsx)(s.UQ,{activeIndex:E,variant:N?"primary":"secondary",withoutOutline:N,onTabToggle:e=>{let t=(null==e?void 0:e.length)>(null==E?void 0:E.length),n=e.filter(e=>!E.includes(e))[0]||E.filter(t=>!e.includes(t))[0];_({event:"data-event",eventCategory:m,eventAction:`click_togg_${t?"on":"off"}`,eventLabel:(0,l.t)(String(n))}),T(e);let r=`[data-accordion-index="${n}"]`,i=document.querySelector(r);i&&w(i)},multiple:g,children:n.map(e=>{let t=`faq-${e.question}`;return(0,r.jsx)(y,{id:t,question:e,dataLayerPush:_,eventCategory:m,className:N?f.accordionItemGray:void 0,tagTitle:b},t)})})}),c&&u&&(0,r.jsx)(p,{href:c,event:{event:"data-event",eventCategory:m,eventAction:"сlick_link_answer-link",eventLabel:c},dataLayerPush:_,...null!=h?{Link:h}:{},iconGrayBackground:!0,children:u||"Читать все вопросы"})]})]})})}},27787:function(e,t,n){"use strict";n.d(t,{CitySelectProvider:function(){return r.C}});var r=n(39344)},65288:function(e,t,n){"use strict";n.d(t,{B:function(){return y}});var r=n(57437),i=n(9938),o=n(44839),s=n(23644),a=n(94702),l=n(14695),c=n(93381),u=n(2265);let h=(0,c.g)("support","sc"),d=Object.freeze({support:h,title:`${h}__title`,cardsContainer:`${h}__cards-container`}),p="cb-support",m=(0,c.g)("support-app-card","sc"),f=Object.freeze({supportAppCard:m,textWrapper:`${m}__text-wrapper`,imageContainer:`${m}__image-container`,title:`${m}__title`,description:`${m}__description`,icon:`${m}__icon`,imageWrapper:`${m}__image-wrapper`,image:`${m}__image`}),g=({title:e,linkUrl:t,s3Assets:n,description:i})=>{let o=(0,a.aF)("s");return(0,r.jsxs)("div",{className:f.supportAppCard,onClick:()=>{o&&((0,l.h)({eventCategory:p,eventActionType:l.D.banner,eventActionText:e,eventLabel:t}),window.open(t,"_blank","noreferrer"))},children:[(0,r.jsx)(s.IconFdsArrowUpRightSmallO,{className:f.icon,size:32}),(0,r.jsxs)("div",{className:f.textWrapper,children:[(0,r.jsx)("div",{className:f.title,children:e}),!!i&&(0,r.jsx)("div",{className:f.description,children:i})]}),(0,r.jsx)("div",{className:f.imageContainer,children:(0,r.jsxs)("picture",{className:f.imageWrapper,children:[(0,r.jsx)("source",{media:"(max-width: 767px)",srcSet:`${n}/mp-assets/widgets/SupportBlock/mobile-app.png 1x, ${n}/mp-assets/widgets/SupportBlock/mobile-app@2x.png 2x`}),(0,r.jsx)("img",{className:f.image,loading:"lazy",src:`${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg`,srcSet:`${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg 1x, ${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app@2x.jpg 2x`})]})})]})},v=(0,c.g)("support-phone-card","sc"),_=Object.freeze({supportPhoneCard:v,contacts:`${v}__contacts`,phone:`${v}__phone`,chat:`${v}__chat`,info:`${v}__info`,image:`${v}__image`}),b=({phones:e,description:t,s3Assets:n})=>{let i=(0,u.useCallback)(()=>{var e,t,n;null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)||n.call(t),(0,l.h)({eventCategory:p,eventActionType:l.D.button,eventActionText:"messenger",eventLabel:"chat"})},[]),o=e=>{let t=e.replace(/[\s-]/g,"");(0,l.h)({eventCategory:p,eventActionType:l.D.link,eventActionText:"phone",eventLabel:t})};return(0,r.jsxs)("div",{className:_.supportPhoneCard,children:[(0,r.jsxs)("div",{className:_.contacts,children:[e.map(e=>(0,r.jsx)("a",{className:_.phone,href:e.href,onClick:()=>o(e.label),children:e.label},e.label)),(0,r.jsx)("span",{className:_.chat,onClick:i,children:"Онлайн чат"})]}),(0,r.jsx)("div",{className:_.info,children:t}),(0,r.jsx)("img",{className:_.image,src:`${n}/mp-assets/widgets/SupportBlock/bannerSupportGirl.png`})]})},y=({className:e,phoneCard:t,appCard:n,s3Assets:s})=>(0,r.jsx)("section",{className:(0,o.Z)(d.support,e),children:(0,r.jsxs)(i.W2,{children:[(0,r.jsx)(i.X6,{as:"h2",type:"display",weight:"bold",className:(0,o.Z)(d.title,"mb-6"),children:"Поддержка"}),(0,r.jsxs)("div",{className:d.cardsContainer,children:[(0,r.jsx)(b,{s3Assets:s,...t}),(0,r.jsx)(g,{s3Assets:s,...n})]})]})});y.displayName="Support"}}]);