(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[804],{3284: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)}}},623:function(e,t,n){"use strict";n.r(t),n.d(t,{ErrorCode:function(){return d},FormatError:function(){return eu},IntlMessageFormat:function(){return ev},InvalidValueError:function(){return eh},InvalidValueTypeError:function(){return ep},MissingValueError:function(){return ed},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,p,d,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 w(e){return e.type===c.number}function y(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 A(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 S=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,j=/(?:[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,B=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,O=/^(@+)?(\+|#+)?[rs]?$/g,L=/(\*)(0+)|(#+)(0+)|(0+)/g,H=/^(0+)$/;function I(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(O,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 R(e){return P(e)||{}}var M={"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"]},U=new RegExp("^".concat(S.source,"*")),D=new RegExp("".concat(S.source,"*$"));function F(e,t){return{start:e,end:t}}var G=!!String.prototype.startsWith&&"_a".startsWith("a",1),z=!!String.fromCodePoint,$=!!Object.fromEntries,W=!!String.prototype.codePointAt,V=!!String.prototype.trimStart,Z=!!String.prototype.trimEnd,X=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&9007199254740991>=Math.abs(e)},K=!0;try{var Y=er("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");K=(null===(h=Y.exec("a"))||void 0===h?void 0:h[0])==="a"}catch(e){K=!1}var q=G?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},J=z?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=$?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(U,"")},en=Z?function(e){return e.trimEnd()}:function(e){return e.replace(D,"")};function er(e,t){return new RegExp(e,t)}if(K){var ei=er("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");p=function(e,t){var n;return ei.lastIndex=t,null!==(n=ei.exec(e)[1])&&void 0!==n?n:""}}else p=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:F(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,F(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:F(n,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(l.INVALID_TAG,F(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,F(n,this.clonePosition()));if(this.isEOF()||!es(this.char()))return this.error(l.INVALID_TAG,F(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(l.UNMATCHED_CLOSING_TAG,F(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:c.tag,value:r,children:o,location:F(n,this.clonePosition())},err:null}:this.error(l.INVALID_TAG,F(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=F(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,F(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(l.EMPTY_ARGUMENT,F(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(l.MALFORMED_ARGUMENT,F(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,F(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:c.argument,value:r,location:F(n,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,F(n,this.clonePosition()));return this.parseArgumentOptions(e,t,r,n);default:return this.error(l.MALFORMED_ARGUMENT,F(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=p(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:F(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,F(o,a));case"number":case"date":case"time":this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var p=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var m=en(d.val);if(0===m.length)return this.error(l.EXPECT_ARGUMENT_STYLE,F(this.clonePosition(),this.clonePosition()));h={style:m,styleLocation:F(p,this.clonePosition())}}var f=this.tryParseArgumentClose(r);if(f.err)return f;var g=F(r,this.clonePosition());if(h&&q(null==h?void 0:h.style,"::",0)){var _,b=et(h.style.slice(2));if("number"===s){var d=this.parseNumberSkeletonFromString(b,h.styleLocation);if(d.err)return d;return{val:{type:c.number,value:n,location:g,style:d.val},err:null}}if(0===b.length)return this.error(l.EXPECT_DATE_TIME_SKELETON,g);var w=b;this.locale&&(w=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),(M[t||""]||M[r||""]||M["".concat(r,"-001")]||M["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:w,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?(_={},w.replace(j,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 y=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(l.EXPECT_SELECT_ARGUMENT_OPTIONS,F(y,v({},y)));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,F(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,l.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),x=this.parseIdentifierIfPossible(),E=d.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=F(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,F(o,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,F(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,F(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(L,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(H.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(B.test(r.stem)){if(r.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(B,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),I(i)));continue}if(O.test(r.stem)){t=v(v({},t),I(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)),!H.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 p=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_SELECTOR,l.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;u=F(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 d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?l.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:l.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,F(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(e+1,t,n);if(m.err)return m;var f=this.tryParseArgumentClose(d);if(f.err)return f;s.push([c,{value:m.val,location:F(d,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,F(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(l.MISSING_OTHER_CLAUSE,F(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=F(r,this.clonePosition());return i?X(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(q(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 w(t)&&C(t.style)?delete t.style.location:(y(t)||x(t))&&A(t.style)?delete t.style.location:N(t)&&e(t.children)})}(n.val),n.val}var ec=n(3284);(s=d||(d={})).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('", "'),'"'),d.INVALID_VALUE,i)||this}return g(t,e),t}(eu),ep=function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),d.INVALID_VALUE,r)||this}return g(t,e),t}(eu),ed=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,'"'),d.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 ed(h,s);var p=i[h];if(u.type===c.argument){p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),a.push({type:"string"==typeof p?m.literal:m.object,value:p});continue}if(y(u)){var f="string"==typeof u.style?r.date[u.style]:A(u.style)?u.style.parsedOptions:void 0;a.push({type:m.literal,value:n.getDateTimeFormat(t,f).format(p)});continue}if(x(u)){var f="string"==typeof u.style?r.time[u.style]:A(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:m.literal,value:n.getDateTimeFormat(t,f).format(p)});continue}if(w(u)){var f="string"==typeof u.style?r.number[u.style]:C(u.style)?u.style.parsedOptions:void 0;f&&f.scale&&(p*=f.scale||1),a.push({type:m.literal,value:n.getNumberFormat(t,f).format(p)});continue}if(N(u)){var g=u.children,v=u.value,_=i[v];if(!em(_))throw new ep(v,"function",s);var S=_(ef(g,t,n,r,i,o).map(function(e){return e.value}));Array.isArray(S)||(S=[S]),a.push.apply(a,S.map(function(e){return{type:"string"==typeof e?m.literal:m.object,value:e}}))}if(E(u)){var j=u.options[p]||u.options.other;if(!j)throw new eh(u.value,p,Object.keys(u.options),s);a.push.apply(a,ef(j.value,t,n,r,i));continue}if(T(u)){var j=u.options["=".concat(p)];if(!j){if(!Intl.PluralRules)throw new eu('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',d.MISSING_INTL_API,s);var k=n.getPluralRules(t,{type:u.pluralType}).select(p-(u.offset||0));j=u.options[k]||u.options.other}if(!j)throw new eh(u.value,p,Object.keys(u.options),s);a.push.apply(a,ef(j.value,t,n,r,i,p-(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},7146: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.r(t),n.d(t,{default:function(){return s}});var i=n(2265),o=n(9172);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))}},3859:function(e,t,n){"use strict";let r=n(2265).createContext(void 0);t.IntlContext=r},9172:function(e,t,n){"use strict";var r=n(2265),i=n(9616),o=n(3859);n(3284),n(623);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:p,timeZone:d}=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:p,timeZone:d}),formatters:m}),[n,a,m,l,c,u,h,p,d]);return s.default.createElement(o.IntlContext.Provider,{value:f},t)}},9616:function(e,t,n){"use strict";var r,i=n(3284),o=(r=n(623))&&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={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t=u(Intl.DateTimeFormat,e.dateTime),n=u(Intl.NumberFormat,e.number),r=u(Intl.PluralRules,e.pluralRules),i=u(Intl.RelativeTimeFormat,e.relativeTime),s=u(Intl.ListFormat,e.list),a=u(Intl.DisplayNames,e.displayNames),l=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:n,getDateTimeFormat:t,getPluralRules:r},...arguments.length<=3?void 0:arguments[3]})},e.message);return{getDateTimeFormat:t,getNumberFormat:n,getPluralRules:r,getMessageFormat:l,getRelativeTimeFormat:i,getListFormat:s,getDisplayNames:a}},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},9928:function(){},4380:function(){},5530:function(){},682:function(e,t,n){"use strict";n.d(t,{D:function(){return B},P:function(){return U},U:function(){return M},u:function(){return y}});var r=n(7437),i=n(3167),o=n(2265),s=n(6094),a=n(3919),l=n(4887);let c=300,u=({opened:e})=>{let[t,n]=(0,o.useState)(!1),r=(0,o.useRef)(null),i=(0,o.useRef)(!1);return(0,o.useEffect)(()=>(e&&!i.current?(i.current=!0,n(!0)):!e&&i.current&&(r.current=setTimeout(()=>{i.current=!1,n(!1)},c)),()=>{r.current&&clearTimeout(r.current)}),[e]),{mounted:t}},h=(0,a.g)("click-outside","sc"),p=Object.freeze({overlay:`${h}__overlay`,open:`${h}--open`,close:`${h}--close`}),d=({onClose:e,onToucheMove:t,isOpen:n,delay:s=c})=>{let a=(0,o.useRef)(null),l=(0,o.useCallback)(()=>{e&&(a.current=setTimeout(()=>{e()},s))},[s,e]),u=(0,o.useCallback)(e=>{"Escape"===e.key&&l()},[l]);return(0,o.useEffect)(()=>(n&&window.addEventListener("keydown",u),()=>{a.current&&clearTimeout(a.current),window.removeEventListener("keydown",u)}),[n,u]),(0,r.jsx)("div",{className:(0,i.Z)(p.overlay,{[p.open]:n,[p.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","100vw")},_=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)},w=()=>document.querySelectorAll("[data-portal]").length>1,y=e=>{let t=(0,o.useRef)(null),n=(0,o.useRef)(!1);return(0,o.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=!w();e&&_(i),e&&b(),m(r,!1)}return()=>{let e=!w();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,i.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`}),A=({onClose:e,onContentClick:t,children:n,title:a,rowTitle:l,titleAlign:c,isCloseable:u,footer:h,closeButton:p,isOpen:d,contentClassName:m,footerClassName:f,contentStyle:g,width:v})=>{let _=(0,o.useRef)(null),b=(0,o.useRef)(null),[w,y]=(0,o.useState)(!1);(0,o.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&&y(()=>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,i.Z)(C.container,{[C.open]:d,[C.close]:!d},m),children:[a||u?(0,r.jsxs)("div",{className:(0,i.Z)(C.header,{[C.rowHeader]:l}),children:[u?p?"function"==typeof p?p():p:(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,i.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,i.Z)(C.footer,f),footer:h,hasScroll:w})]})},S=(0,a.g)("drawer-layout","sc"),j=Object.freeze({window:`${S}__window`}),k=({onClose:e,isOpen:t,children:n,withDisabledScroll:s,className:a,...l})=>{let c=(0,o.useCallback)(e=>e.stopPropagation(),[]);return y(t&&s),(0,r.jsxs)("div",{"data-portal":!0,className:(0,i.Z)(j.window,a),children:[(0,r.jsx)(d,{onClose:e,isOpen:t,delay:0}),(0,r.jsx)(A,{onContentClick:c,onClose:e,isOpen:t,...l,children:n})]})},B=({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};B.displayName="Drawer";let O=(0,a.g)("mobile-modal-footer","sc"),L=Object.freeze({footer:`${O}__footer`,footerWithoutShadow:`${O}__footer--without-shadow`}),H=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,r.jsx)("div",{className:(0,i.Z)(L.footer,t&&L.footerWithoutShadow,n),children:"function"==typeof e?e():e}),I=(0,a.g)("mobile-popup","sc"),P=Object.freeze({mobilePopup:`${I}`,mobilePopupOpen:`${I}--open`,content:`${I}__content`,contentFull:`${I}__content--full`,contentTransition:`${I}__content--transition`,contentTransitionOpen:`${I}__content--transition-open`,contentLine:`${I}__content-line`,contentContainer:`${I}__content-container`,smallContentContainer:`${I}__content-container--small`,min:`${I}__content-container--min`,title:`${I}__title`,closeContainer:`${I}__close-container`,closeButton:`${I}__close-button`}),R=({children:e,footer:t,isOpen:n,isSmallPopup:a,onClose:l,hasCloseButton:c=!0,full:u,touchDistance:h=100,withDisabledScroll:p=!0,contentClassName:m,className:f,title:g,closeButton:v,footerClassName:_})=>{let[b,w]=(0,o.useState)(!1),[x,E]=(0,o.useState)(!1),[T,N]=(0,o.useState)(!0),[C,A]=(0,o.useState)("120%"),S=(0,o.useRef)(null),j=(0,o.useRef)(0),k=(0,o.useRef)(!1),B=e=>{var t,n,r;let i=null==(t=S.current)?void 0:t.offsetTop,o=null==(n=S.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),A(`${n}px`),j.current=n}},O=()=>{k.current&&(j.current>h&&l?null==l||l():A("0"),N(!0),k.current=!1),window.removeEventListener("touchmove",B),window.removeEventListener("touchend",O)};return(0,o.useEffect)(()=>{n&&setTimeout(()=>{w(!0),E(!0),A("0")},100),!n&&x&&(A("120%"),w(!1),E(!1))},[x,n]),y(n&&p),(0,r.jsxs)("div",{"data-portal":!0,className:(0,i.Z)(P.mobilePopup,x&&P.mobilePopupOpen,f),children:[(0,r.jsx)(d,{onClose:()=>{n&&(null==l||l())},onToucheMove:()=>{n&&(w(!1),window.addEventListener("touchmove",B),window.addEventListener("touchend",O))},isOpen:n,delay:0}),(0,r.jsxs)("div",{className:(0,i.Z)(P.content,u&&P.contentFull,T&&P.contentTransition,T&&b&&P.contentTransitionOpen),ref:S,style:{transform:`translateY(${C})`},children:[(0,r.jsx)("div",{className:P.contentLine}),(0,r.jsxs)("div",{className:(0,i.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)(H,{footerClassName:_,isSmallPopup:a,footer:t})]})]})},M=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...i})=>{let{mounted:o}=u({opened:n});return o?(0,r.jsx)(R,{isSmallPopup:t,isOpen:n,...i,children:e}):null};M.displayName="UiMobilePopup";let U=({children:e,id:t="portal-root"})=>{let[n,r]=(0,o.useState)(null);return(0,o.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}},3919:function(e,t,n){"use strict";function r(e,t){return`finkit-widgets-${t}-${e}`}n.d(t,{g:function(){return r}})},2331:function(e,t,n){"use strict";n.d(t,{D:function(){return l},h:function(){return u}});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,"_");var o,s=n(915);let a=(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,s.AB)(e)}};var l=((o=l||{}).icon="icon",o.chip="chip",o.accordion="accordion",o.button="button",o.checkbox="checkbox",o.radio="radio",o.select="select",o.toggle="toggle",o.tooltip="tooltip",o.link="link",o.banner="banner",o.tag="tag",o.date="date",o.field="field",o.offer="offer",o.tab="tab",o.submitButton="submitButton",o.popup="popup",o.block="block",o);let c={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_"},u=({eventCategory:e,eventActionType:t,eventActionText:n="",eventLabel:r})=>{let o={event:"data-event",eventCategory:e,eventAction:c[t]+i(n)};void 0!==r&&(o.eventLabel=i("string"==typeof r?r:r.toString())),a(o)}},2116:function(e,t,n){"use strict";n.r(t),n.d(t,{CookiesPlate:function(){return h}});var r=n(7437),i=n(6094),o=n(3167),s=n(2265),a=n(3919);let l={getItem:e=>{var t;if(typeof document>"u")return null;let n=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return n&&null!==(t=n.split("=")[1])&&void 0!==t?t:null},setItem:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(typeof document>"u")return;(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let r="".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t));for(let e in n){if(!n.hasOwnProperty(e))continue;r+="; ".concat(e);let t=n[e];!0!==t&&(r+="=".concat(t))}document.cookie=r},removeItem:e=>{l.setItem(e,"",{"max-age":-1})}},c=(0,a.g)("cookies-plate","sc"),u=Object.freeze({wrapper:"".concat(c,"__wrapper"),contentWrapper:"".concat(c,"__content-wrapper"),visible:"".concat(c,"--visible"),hidden:"".concat(c,"--hidden"),content:"".concat(c,"__content"),text:"".concat(c,"__text"),link:"".concat(c,"__link"),button:"".concat(c,"__button")}),h=e=>{let{className:t,mountDelay:n=3e3,href:a="https://assets.finuslugi.ru/mp-assets/user-agreement.pdf",children:c,closeIcon:h,onMount:p,onLinkClick:d,onClose:m,mountAfterScroll:f=!0}=e,[g,v]=(0,s.useState)(!1),[_,b]=(0,s.useState)(!1),[w,y]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),l.getItem("Allow-Cookie")||(y(!0),setTimeout(()=>{v(!0),null==p||p()},n))};return f?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let x=(0,s.useCallback)(()=>{l.setItem("Allow-Cookie","1"),b(!0),null==m||m(),setTimeout(()=>y(!1),1e3)},[m]);return w?(0,r.jsx)("div",{className:u.wrapper,children:(0,r.jsx)("div",{className:(0,o.Z)(u.contentWrapper,{[u.visible]:g,[u.hidden]:_}),children:(0,r.jsxs)("div",{className:(0,o.Z)(t,u.content),children:[c||(0,r.jsxs)("p",{className:u.text,children:["Мы используем"," ",(0,r.jsx)("a",{className:u.link,href:a,target:"_blank",rel:"noreferrer",onClick:d,children:"cookie"})," ","для лучшей работы сайта"]}),(0,r.jsx)("button",{className:u.button,onClick:x,children:h||(0,r.jsx)(i.IconFdsCloseO,{})})]})})}):(0,r.jsx)(r.Fragment,{})}},9623:function(e,t,n){"use strict";n.d(t,{$:function(){return V}});var r=n(7437),i=n(2833),o=n(3167),s=n(4866),a=n(3919),l=n(1810),c=n(2331),u=n(6094),h=n(2265),p=n(682);let d=(0,a.g)("footer-contacts-block","sc"),m=Object.freeze({contactsWrapper:"".concat(d,"__contacts-wrapper"),gray:"".concat(d,"__gray"),phones:"".concat(d,"__phones"),contactsButtons:"".concat(d,"__contacts-buttons"),vkIcon:"".concat(d,"__vk-icon"),tgIcon:"".concat(d,"__tg-icon"),dzenIcon:"".concat(d,"__dzen-icon"),maxIcon:"".concat(d,"__max-icon"),link:"".concat(d,"__link")}),f=(0,a.g)("footer","sc"),g=Object.freeze({wrapper:"".concat(f,"__wrapper"),section:"".concat(f,"__section"),container:"".concat(f,"__container"),top:"".concat(f,"__top"),main:"".concat(f,"__main"),links:"".concat(f,"__links"),disclaimer:"".concat(f,"__disclaimer"),bottom:"".concat(f,"__bottom"),bottomLinks:"".concat(f,"__bottom-links"),bottomDisclaimer:"".concat(f,"__bottom-disclaimer"),compact:"".concat(f,"__wrapper--compact"),white:"".concat(f,"__wrapper--white")}),v="finkit-widgets-sc-footer",_=[{title:"8 (800) 505-32-32",url:"tel:88005053232"},{title:"+7 (495) 145-32-32",url:"tel:+74951453232"}],b=[..._,{title:"Онлайн чат",url:void 0}],w=[{type:"vk",className:m.vkIcon,iconName:"vk"},{type:"telegramChannel",className:m.tgIcon,iconName:"telegram"},{type:"dzen",className:m.dzenIcon,iconName:"dzen"},{type:"max",className:m.maxIcon,iconName:"max"}],y=(0,r.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,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Группа \xabМосковская Биржа\xbb - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),x=e=>{let{onClick:t,eventActionText:n,eventLabel:i,...o}=e;return(0,r.jsx)(l.zx,{onClick:e=>{null==t||t(e),(0,c.h)({eventCategory:v,eventActionType:c.D.button,eventActionText:n||"",eventLabel:i})},...o})},E=e=>{let{onClick:t,eventActionType:n,eventActionText:i,eventLabel:o,chat:s,...a}=e;return(0,r.jsx)(l.rU,{onClick:e=>{var r,a,l;null==t||t(e),s&&(null==e||e.preventDefault(),null==(l=null==(a=null==(r=null==window?void 0:window.supportWidget)?void 0:r.craftTalk)?void 0:a.open)||l.call(a)),(0,c.h)({eventCategory:v,eventActionType:n||c.D.link,eventActionText:i||"",eventLabel:o})},...a})},T=e=>{let{minioUrl:t,blogs:n}=e;return(0,r.jsxs)("div",{className:m.contactsWrapper,children:[(0,r.jsx)(i.xv,{className:m.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,r.jsx)("div",{className:m.phones,children:b.map(e=>{let{title:t,url:n}=e;return(0,r.jsx)(E,{href:n,eventActionText:t,chat:!n,children:t},t)})}),(0,r.jsx)(i.xv,{className:m.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,r.jsx)("div",{className:m.contactsButtons,children:w.map(e=>{let{type:i,className:o,iconName:a}=e;return(0,r.jsx)(x,{as:"a",href:null==n?void 0:n[i],target:"_blank",className:o,iconRight:(0,r.jsx)("img",{width:24,height:24,src:(0,s.xn)(t,"/widgets/footer/".concat(a,".svg")),alt:i,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:i,eventLabel:null==n?void 0:n[i]},i)})}),(0,r.jsx)(i.xv,{className:m.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,r.jsx)("div",{className:m.contactsButtons,children:(0,r.jsxs)(E,{href:null==n?void 0:n.investTg,target:"_blank",className:m.link,eventActionText:"telegram",eventLabel:null==n?void 0:n.investTg,children:[(0,r.jsx)(x,{className:m.tgIcon,iconRight:(0,r.jsx)("img",{width:24,height:24,src:(0,s.xn)(t,"/widgets/footer/telegram.svg"),alt:"telegram",loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:"telegram",eventLabel:null==n?void 0:n.investTg}),"Финуслуги Инвест"]})})]})},N=(0,a.g)("footer-disclaimer","sc"),C=Object.freeze({disclaimer:"".concat(N)}),A=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,c.h)({eventCategory:v,eventActionType:c.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,r.jsx)("div",{className:(0,o.Z)(e.className,C.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,r.jsx)("div",{className:(0,o.Z)(e.className,C.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},j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",[t,n]=(0,h.useState)(e);return(0,h.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?"".concat(r,"?").concat(s):r)},[e]),t},k=(0,a.g)("footer-modal-body","sc"),B=Object.freeze({wrapper:"".concat(k,"__wrapper"),title:"".concat(k,"__title"),item:"".concat(k,"__item"),label:"".concat(k,"__label"),button:"".concat(k,"__button"),description:"".concat(k,"__description")}),O=e=>{let{directions:t}=e;return(0,r.jsxs)("div",{className:B.wrapper,children:[(0,r.jsx)("div",{className:B.title,children:"Направления"}),t.map(e=>(0,r.jsxs)(E,{className:B.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:"".concat(e.name,"_").concat(e.url),children:[(0,r.jsxs)("div",{className:B.label,children:[(0,r.jsx)("span",{children:e.name}),(0,r.jsx)(x,{className:B.button,iconRight:(0,r.jsx)(u.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,r.jsx)("p",{className:B.description,children:e.description})]},e.url))]})},L=(0,a.g)("footer-popup","sc"),H=Object.freeze({wrapper:"".concat(L,"__wrapper"),button:"".concat(L,"__button"),icon:"".concat(L,"__icon"),buttonWrapper:"".concat(L,"__button-wrapper")}),I=e=>{let{directions:t}=e,n=(0,l._m)("l"),[i,o]=(0,h.useState)(!1),s=()=>{o(!1)};return(0,r.jsxs)("div",{className:H.wrapper,children:[(0,r.jsx)("div",{className:H.buttonWrapper,children:(0,r.jsx)(x,{className:H.button,appearance:"ghost",variant:"white",onClick:()=>{o(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,r.jsx)("div",{className:H.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,r.jsx)("div",{},e))})})}),(0,r.jsxs)(p.P,{children:[!n&&(0,r.jsx)(p.U,{isOpen:i,onClose:s,full:!0,children:(0,r.jsx)(O,{directions:t})}),n&&(0,r.jsx)(p.D,{isOpen:i,onClose:s,width:"804px",children:(0,r.jsx)(O,{directions:t})})]})]})},P=(0,a.g)("footer-left-column","sc"),R=Object.freeze({leftColumn:"".concat(P,"__left-column"),logoWrapper:"".concat(P,"__logo-wrapper"),banner:"".concat(P,"__banner"),mobAppLink:"".concat(P,"__mob-app-link")}),M=e=>{let{showcaseUrl:t,minioUrl:n,directions:o,mobAppUrl:a}=e,l=j(a);return(0,r.jsxs)("div",{className:R.leftColumn,children:[(0,r.jsx)(E,{className:R.logoWrapper,href:t,eventActionType:c.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(t),children:(0,r.jsx)("img",{src:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,r.jsx)(I,{directions:null!=o?o:[]}),(0,r.jsx)(E,{href:l,target:"_blank",eventActionType:c.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:l,className:R.mobAppLink,children:(0,r.jsxs)(i.Zb,{className:R.banner,children:[(0,r.jsxs)(i.xv,{weight:"medium",children:["Управляйте финансами",(0,r.jsx)("br",{}),"через приложение Финуслуг"]}),(0,r.jsx)(x,{iconRight:(0,r.jsx)(u.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,r.jsxs)("picture",{children:[(0,r.jsx)("source",{srcSet:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,r.jsx)("img",{src:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},U=(0,a.g)("footer-logo","sc"),D=Object.freeze({wrapper:"".concat(U,"__wrapper"),link:"".concat(U,"__link"),fromMoex:"".concat(U,"__from-moex"),logo:"".concat(U,"__logo"),white:"".concat(U,"__wrapper--white")}),F=e=>{let{showcaseUrl:t,minioUrl:n,isWhite:i}=e;return(0,r.jsx)("div",{className:(0,o.Z)(D.wrapper,{[D.white]:i}),children:(0,r.jsxs)(E,{className:D.link,href:t,eventActionType:c.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(t),children:[(0,r.jsx)("img",{className:D.logo,src:"".concat(n,"/images/logo-brandmark-common-finuslugi.svg")}),(0,r.jsx)("img",{className:D.fromMoex,src:"".concat(n,"/images/fromMoex.svg")})]})})},G=(0,a.g)("footer-warning","sc"),z=Object.freeze({reservedSpace:"".concat(G,"__reserved-space"),wrapper:"".concat(G,"__wrapper"),fixed:"".concat(G,"__wrapper--fixed"),container:"".concat(G,"__container")}),$=e=>{let{text:t,fixed:n}=e;return(0,r.jsx)("div",{className:(0,o.Z)(z.wrapper,{[z.fixed]:n}),children:(0,r.jsx)(i.W2,{className:z.container,children:t})})},W=e=>{let{text:t}=e;return(0,r.jsxs)("div",{className:z.reservedSpace,children:[(0,r.jsx)($,{text:t}),(0,r.jsx)($,{text:t,fixed:!0})]})},V=e=>{var t,n;let{data:s,showcaseUrl:a="https://finuslugi.ru",minioUrl:l="https://assets.finuslugi.ru/mp-assets",customDisclaimer:c,variant:u="default",className:h}=e,p=!c&&null!=s&&s.disclaimer?s.disclaimer:void 0,d=u.includes("compact"),m=u.includes("white"),f=null==(t=null==s?void 0:s.bottom)?void 0:t.concat(d?_:[]),v="warning"in s?s.warning:void 0;return(0,r.jsx)("footer",{className:(0,o.Z)(g.wrapper,h,{[g.compact]:d,[g.white]:m}),children:(0,r.jsxs)("section",{className:g.section,children:[(0,r.jsxs)(i.W2,{className:g.container,children:[!d&&(0,r.jsx)(M,{showcaseUrl:a,minioUrl:l,directions:s.directions,mobAppUrl:s.mobAppUrl}),(0,r.jsx)("div",{className:g.wrapper,children:(0,r.jsxs)("div",{className:g.top,children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:g.main,children:[!d&&(0,r.jsx)("div",{className:g.links,children:null==(n=null==s?void 0:s.top)?void 0:n.map(e=>(0,r.jsx)(E,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),d&&(0,r.jsx)(F,{showcaseUrl:a,minioUrl:l,isWhite:m}),(0,r.jsx)(A,{className:g.disclaimer,disclaimer:p,children:c||y})]}),(0,r.jsxs)("div",{className:g.bottom,children:[(0,r.jsx)("div",{className:g.bottomLinks,children:null==f?void 0:f.map(e=>(0,r.jsx)(E,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,r.jsx)(A,{className:g.bottomDisclaimer,disclaimer:null==s?void 0:s.bottomDisclaimer})]})]}),!d&&(0,r.jsx)(T,{minioUrl:l,blogs:s.blogs})]})})]}),d&&!!v&&(0,r.jsx)(W,{text:v})]})})}},6678:function(e,t,n){"use strict";n.r(t),n.d(t,{CitySelectProvider:function(){return $},Header:function(){return eP},useCitySelectContext:function(){return z}});var r=n(7437),i=n(2265),o=n(2331),s=n(6094),a=n(2833),l=n(1810),c=n(3167),u=n(4866),h=n(682),p=n(3919);let d=(0,p.g)("header","sc"),m=Object.freeze({header:`${d}`,fixed:`${d}__fixed`,hidden:`${d}__fixed--hidden`,transparent:`${d}--transparent`,navigationOpen:`${d}__navigation-open`,container:`${d}__container`,leftRow:`${d}__left-row`,logo:`${d}__logo`,menuItems:`${d}__menu-items`,menuItemActive:`${d}__menu-item-active`,tabletMenuButton:`${d}__tablet-menu-button`,buttonGroup:`${d}__button-group`,chips:`${d}__chips`,menuButton:`${d}__menu-button`,moreButtons:`${d}__more-buttons`,auth:`${d}__auth`,close:`${d}__close`,removed:`${d}__removed`,overlay:`${d}__overlay`,overlayOpening:`${d}__overlay--opening`,overlayClosing:`${d}__overlay--closing`}),f="cb-header",g=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],v=g.reduce((e,t)=>(e[t.id]=t.label,e),{}),_=Object.freeze({mobile:56,desktop:80}),b=(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)},p=function(){let a=c(),l=document.getElementById("headerMobileBanner"),h=null==l?void 0:l.getAttribute("data-opening");if("true"===h)return;s||u();let p=a<s,d=a<((null==r?void 0:r.clientHeight)||0);if(n&&d||p){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",p),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",h)}},w=()=>{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},y=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),x=(e,t)=>{let n=new Date;n.setTime(n.getTime()+864e5*t);let r=encodeURIComponent(JSON.stringify(e));document.cookie=`utm_params=${r};expires=${n.toUTCString()};path=/;SameSite=Lax`},E=()=>{if(y())return;let e=w();e&&x(e,90)},T=()=>{setTimeout(()=>{if(!(typeof document>"u"||!document.cookie))try{E()}catch(e){console.error("UTM tracking error:",e)}},0)},N=(e,t,n)=>(0,o.h)({eventCategory:f,eventActionType:e,eventActionText:t,eventLabel:n}),C=(0,p.g)("navigation-chips","sc"),A=Object.freeze({wrapper:`${C}__wrapper`,gray:`${C}__variantGray`,white:`${C}__variantWhite`,container:`${C}__container`,chip:`${C}__chip`,more:`${C}__chip--more`,active:`${C}__chip--active`,label:`${C}__label`,hidden:`${C}__hidden`}),S=(0,p.g)("navigation-content","sc"),j=Object.freeze({contentWrapper:`${S}__content-wrapper`,content:`${S}__content`,contentOpen:`${S}__content--open`,contentHeader:`${S}__content-header`,contentTitle:`${S}__content-title`,contentTitleUrl:`${S}__content-title--url`,contentTitleLink:`${S}__content-title--link`,contentTitleNew:`${S}__content-title--new`,new:`${S}__new`,vip:`${S}__vip`,arrowIcon:`${S}__arrow-icon`,links:`${S}__links`,linksColumns:`${S}__links--columns`,linksTitleless:`${S}__links--titleless`,removed:`${S}__removed`,hidden:`${S}__content--hidden`}),k=({chip:e,hidden:t,onClick:n,refCallback:i,activeChipId:a})=>{let l=!!n,u=()=>{if(l)return null==n?void 0:n(e.url);N(o.D.chip,e.title,`${e.title}_${e.url}`)},h=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:A.label,children:e.title}),e.arrow&&(0,r.jsx)(s.IconFdsArrowUpRightSmallO,{size:24})]}),p=(0,c.Z)(A.chip,{[A.hidden]:t,[j.new]:!!e.new,[j.vip]:!!e.vip,[A.active]:e.url===a});return l?(0,r.jsx)("button",{type:"button",className:p,onClick:u,ref:i,children:h}):(0,r.jsx)("a",{href:e.url,className:p,onClick:u,ref:i,children:h})},B=({items:e=[],maxNumberOfLines:t,variant:n,className:a,activeChipId:l,onClick:u})=>{let h=(0,i.useRef)(null),p=(0,i.useRef)(null),d=(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=d.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 w=(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(p.current),c=e.map(e=>r(d.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(w)});return t.observe(e),requestAnimationFrame(w),()=>{t.disconnect()}},[w]),(0,i.useEffect)(()=>{requestAnimationFrame(w)},[w]);let y=m||(t??0)<=0||!_;return(0,r.jsx)("div",{className:(0,c.Z)(a,A.wrapper,{[A.gray]:"gray"===n,[A.white]:"white"===n}),children:(0,r.jsxs)("div",{ref:h,className:A.container,children:[e.map((e,t)=>(0,r.jsx)(k,{chip:e,hidden:!y&&t>=g,activeChipId:l,onClick:u,refCallback:t=>{d.current[e.url]=t}},e.url)),!y&&_&&(0,r.jsxs)("button",{type:"button",ref:p,className:(0,c.Z)(A.chip,A.more),onClick:()=>{N(o.D.chip,"Еще"),f(!0)},children:[(0,r.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,r.jsx)("span",{className:A.label,children:"Еще"})]}),(y||!_)&&(0,r.jsxs)("button",{type:"button",ref:p,className:(0,c.Z)(A.chip,A.more,A.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,r.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,r.jsx)("span",{className:A.label,children:"Еще"})]})]})})},O=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 "'.concat(e,'": ').concat(t))}return null},L=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=O("all_regions")||[];return window.allRegions=e,e},H=e=>{let t={};return e.map(e=>{let{id:n,name:r,towns:i}=e;return i.forEach(e=>{e.parentId=n,t[e.name]=t[e.name]||{},t[e.name][e.id]=r}),i}).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},I=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)},P=async e=>{let t=null;try{t=await (await fetch("".concat(e),{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},R=(e,t,n)=>{(0,o.h)({eventCategory:F,eventActionType:e,eventActionText:t,eventLabel:n})},M=L(),U=H(M),D={regions:M,towns:U,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},F="finkit-widgets-sc-city-select",G=(0,i.createContext)(D);function z(){return(0,i.useContext)(G)}let $=e=>{let{children:t,showStartGeoPopup:n=!0,lastRegionsUpdateUnixTimestamp:s,dadataUrl:a="https://finuslugi.ru/backend/money/dadata"}=e,l=Number(O("lastRegionsUpdateUnixTimestamp")||0),c=Number(s||0)>l,[u,h]=(0,i.useState)(L()),[{startRegion:p,startTown:d},m]=(0,i.useState)({startRegion:D.startRegion,startTown:D.startTown}),[{region:f,town:g},v]=(0,i.useState)({region:D.region,town:D.town}),[_,b]=(0,i.useState)(D.startPopupVisible),[w,y]=(0,i.useState)(D.popupVisible),x=(0,i.useRef)(""),E=(0,i.useMemo)(()=>H(u),[u.length]),T=(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)||""),b(!0),m({startRegion:e,startTown:t})},[b,m]),N=(0,i.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||T(e,t)},[T]),C=(0,i.useCallback)(()=>{if(x.current&&!f&&!g){var e,t;let n=null!==(e=E.find(e=>e.name===x.current))&&void 0!==e?e:null;return N(null!==(t=u.find(e=>e.id===(null==n?void 0:n.parentId)))&&void 0!==t?t:null,n)}N(f,g)},[f,g,E,u,N]),A=(0,i.useCallback)(e=>{y(e)},[y]),S=(0,i.useCallback)(e=>{e?R(o.D.icon,"location"):R(o.D.button,(null==g?void 0:g.name)||"Вся Россия"),!n||window.sessionStorage.getItem("start_popup_opened")?A(!0):C()},[n,g,A,C]),j=(0,i.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem("user_region",JSON.stringify(e)||""),window.localStorage.setItem("user_town",JSON.stringify(t)||"")):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem("user_region",""),window.localStorage.setItem("user_town","")),v({region:e||null,town:t||null}),b(!1),A(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[A]),k=()=>{v({region:O("user_region"),town:O("user_town")});let e=async e=>{let{coords:{latitude:t,longitude:n}}=e,r="".concat(a,"?lat=").concat(t,"&lon=").concat(n),i=await P(r);null!=i&&i.location&&(x.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&n)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch(e){}};return(0,i.useEffect)(()=>{if((u.length<1||c)&&I().then(e=>h(e)),window.innerWidth<1024){let e=()=>{k(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{k()},0)},[]),(0,r.jsx)(G.Provider,{value:{regions:u,towns:E,region:f,town:g,startPopupVisible:_,setStartPopupVisible:b,popupVisible:w,handleToggleModal:A,selectCity:j,handleButtonClick:S,startRegion:p,startTown:d},children:t})},W=()=>{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}},V=(0,p.g)("city-select-modal-body","sc"),Z=Object.freeze({wrapper:"".concat(V,"__wrapper"),subtitle:"".concat(V,"__subtitle"),hintWrapper:"".concat(V,"__hint-wrapper"),hintText:"".concat(V,"__hint-text"),input:"".concat(V,"__input"),chips:"".concat(V,"__chips"),townsListWrapper:"".concat(V,"__towns-list-wrapper"),townsList:"".concat(V,"__towns-list"),townsGroup:"".concat(V,"__towns-group"),townsGroupLabel:"".concat(V,"__towns-group-label"),townsGroupList:"".concat(V,"__towns-group-list"),townsName:"".concat(V,"__towns-name"),regionName:"".concat(V,"__region-name")}),X=e=>{var t;let{groupedTowns:n,chips:a,query:c,setQuery:u,isDrawer:h}=e,p=z(),d=(0,i.useRef)(null),[m,f]=(0,i.useState)("10000px");(0,i.useEffect)(()=>{if(!h||!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(e){r=0}r>0&&f("".concat(r,"px"))}).observe(d.current)},[]);let g=e=>{if(R(o.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return p.selectCity();let t=p.regions.find(t=>t.id===Number(e.parentId))||null;p.selectCity(t,e)};return(0,r.jsxs)("div",{className:Z.wrapper,children:[(0,r.jsxs)("div",{className:Z.subtitle,children:["Покажем предложения рядом с вами",(0,r.jsxs)("div",{className:Z.hintWrapper,children:[(0,r.jsx)(s.IconFdsQuestionCircleO,{size:24}),(0,r.jsx)("div",{className:Z.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,r.jsx)(l.MA,{className:Z.input,value:c,onChange:u,size:"s",placeholder:"Введите название города",icon:c?(0,r.jsx)(s.IconFdsCloseCircleO,{size:24,onClick:()=>u("")}):(0,r.jsx)(s.IconFdsSearchO,{size:24})}),(0,r.jsx)(l.cL,{className:Z.chips,chips:a,value:(null==(t=p.town)?void 0:t.id)||0,onChipClick:e=>{g(p.towns.find(t=>t.id===e))}}),(0,r.jsx)("div",{className:Z.townsListWrapper,children:(0,r.jsx)("div",{ref:d,className:Z.townsList,style:{maxHeight:m},children:n.map(e=>(0,r.jsxs)("div",{className:Z.townsGroup,children:[(0,r.jsx)("div",{className:Z.townsGroupLabel,children:e.letter}),(0,r.jsx)("div",{className:Z.townsGroupList,children:e.towns.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>g(e),children:[(0,r.jsx)("div",{className:Z.townsName,children:e.name}),(0,r.jsx)("div",{className:Z.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},K=[1095,1096,134,720,189,180],Y=()=>{var e;let t=z(),n=(0,l._m)("l"),[s,a]=(0,i.useState)(""),c="Ваш выбор: ".concat((null==(e=t.town)?void 0:e.name)||"Вся Россия"),u=(0,i.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(s.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},[]),[s,t.towns.length]),p=(0,i.useMemo)(()=>[{id:0,label:"Вся Россия"},...K.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]),d=()=>{R(o.D.button,"close"),t.handleToggleModal(!1)};return(0,r.jsxs)(h.P,{children:[!n&&(0,r.jsx)(h.U,{title:c,isOpen:t.popupVisible,onClose:d,full:!0,children:(0,r.jsx)(X,{groupedTowns:u,chips:p,query:s,setQuery:a})}),n&&(0,r.jsx)(h.D,{title:c,isOpen:t.popupVisible,onClose:d,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,r.jsx)(X,{groupedTowns:u,chips:p,query:s,setQuery:a,isDrawer:!0})})]})},q={"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"},J=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(q,e)?q[e]:q["finuslugi.ru"]},Q=(e,t)=>{let n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href="".concat(e,"/assets/css/").concat(t),document.head.appendChild(n);let r=document.createElement("script");r.src="".concat(e,"/get-bootstrap/").concat(t),r.defer=!0,document.body.appendChild(r)},ee=()=>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)}})}),et=()=>{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=J(),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&&ee().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()},Q(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}},en=(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 er(){return(0,i.useContext)(en)}let ei=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:p}=et(),[d,m]=(0,i.useState)(null),[f,g]=(0,i.useState)(null),[v,_]=(0,i.useState)(!1),[w,y]=(0,i.useState)(!1),[x,E]=(0,i.useState)(!1),N=(0,i.useRef)(null),C=(0,h.u)(v),A=(0,i.useRef)(null),S=(0,i.useRef)(null),j=(0,i.useRef)(null),k=(0,i.useRef)(null),B=(0,i.useCallback)(()=>{C.current&&C.current.scrollTo({top:0})},[C]),O=(0,i.useCallback)(e=>{g(e),B()},[B]),L=(0,i.useCallback)(e=>{A.current&&clearTimeout(A.current),e&&y(!0),e||(A.current=setTimeout(()=>{y(!1),O(null)},300))},[O]),H=(0,i.useCallback)((e,t,n)=>{if(t&&O(t),!n&&e===d||!e){L(!v),_(!v);return}m(e),L(!0),_(!0)},[d,O,v,L]),I=(0,i.useCallback)(()=>{S.current&&clearTimeout(S.current),E(!0),S.current=setTimeout(()=>{E(!1)},650)},[]);return(0,i.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=b(s,l,e.isMainBannerPage);return T(),t},[]),(0,r.jsx)("div",{children:(0,r.jsx)(en.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:a,openedBlock:d,setOpenedBlock:H,openedSection:f,setOpenedSection:O,isNavigationOpen:v,isNavigationMounted:w,navMenuItemsRef:N,navigationRef:C,ignoreClicks:x,setIgnoreClicks:I,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p,fixedContainerRef:j,headerRef:k},children:e.children})})},eo=e=>{let{label:t,onClick:n,eventActionText:i,eventLabel:s,...a}=e;return(0,r.jsx)(l.zx,{label:t,onClick:e=>{null==n||n(e),(0,o.h)({eventCategory:f,eventActionType:o.D.button,eventActionText:i||"",eventLabel:s||""})},...a})},es=(0,p.g)("header-popup","sc"),ea=Object.freeze({popup:"".concat(es,"__popup"),popupHeader:"".concat(es,"__popup-header"),popupClose:"".concat(es,"__popup-close"),body:"".concat(es,"__body")}),el=e=>{let{isOpen:t,onClose:n,children:i,title:o}=e,a=(0,l._m)("l");return(0,r.jsxs)(h.P,{children:[!a&&(0,r.jsx)(h.U,{title:o,isOpen:t,onClose:n,children:i}),a&&t&&(0,r.jsxs)("div",{className:ea.popup,children:[(0,r.jsxs)("div",{className:ea.popupHeader,children:[o,(0,r.jsx)(eo,{className:ea.popupClose,iconLeft:(0,r.jsx)(s.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:n,eventActionText:"IconFdsCloseO"})]}),(0,r.jsx)("div",{className:ea.body,children:i})]})]})},ec=(0,p.g)("start-choice-popup","sc"),eu=Object.freeze({top:"".concat(ec,"__top"),progress:"".concat(ec,"__progress"),innerCircle:"".concat(ec,"__inner-circle"),title:"".concat(ec,"__title"),subtitle:"".concat(ec,"__subtitle"),actions:"".concat(ec,"__actions")}),eh=()=>{var e,t;let n=z(),[s,a]=(0,i.useState)(10),[l,c]=(0,i.useState)(0),u=(0,i.useRef)(void 0),h=()=>{R(o.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((" "+s).slice(1)),t=1e3*e/100,n=0,r=0;u.current=setInterval(()=>{n++,r+=t,c(3.6*n);let i=e-Math.floor(r/1e3);i<s&&a(i),100===n&&(clearInterval(u.current),h())},t)})():(clearInterval(u.current),a(10),c(0))},[n.startPopupVisible]),(0,r.jsxs)(el,{isOpen:n.startPopupVisible,onClose:h,title:(0,r.jsx)("button",{type:"button",className:eu.progress,style:{background:"conic-gradient(#ff0508 ".concat(l,"deg, #e3e7ec 0deg)")},onClick:h,children:(0,r.jsx)("div",{className:eu.innerCircle,children:s})}),children:[(0,r.jsxs)("div",{className:eu.top,children:[(0,r.jsxs)("div",{className:eu.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,r.jsx)("div",{className:eu.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,r.jsxs)("div",{className:eu.actions,children:[(0,r.jsx)(eo,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{R(o.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,r.jsx)(eo,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{R(o.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},ep=(0,p.g)("city-select","sc"),ed=Object.freeze({button:"".concat(ep,"__button")}),em=e=>{var t;let{initialTown:n}=e,o=z(),a=(null==(t=o.town)?void 0:t.name)||n||"Вся Россия",{setIsChatModalOpen:c,isChatModalOpen:u}=er(),{startPopupVisible:h,setStartPopupVisible:p,popupVisible:d}=o,m=(0,i.useRef)();return(0,i.useEffect)(()=>{d&&(m.current="popup")},[d]),(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?p(!1):["startPopup","popup"].includes(m.current)&&u&&c(!1))},[d,u,h,p,c]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.zx,{className:ed.button,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>o.handleButtonClick(!1),iconLeft:(0,r.jsx)(s.IconFdsLocationO,{size:16}),label:a}),(0,r.jsx)(Y,{}),(0,r.jsx)(eh,{})]})},ef=e=>{let{onClick:t,eventActionType:n,eventActionText:i,eventLabel:s,...a}=e;return(0,r.jsx)(l.rU,{onClick:e=>{null==t||t(e),(0,o.h)({eventCategory:f,eventActionType:n||o.D.link,eventActionText:i||"",eventLabel:s||""})},...a})},eg=(0,p.g)("header-mobile-app-banner","sc"),ev=Object.freeze({wrapper:"".concat(eg,"__wrapper"),container:"".concat(eg,"__container"),closeButton:"".concat(eg,"__close-button"),innerWrapper:"".concat(eg,"__inner-wrapper"),imageWrapper:"".concat(eg,"__image-wrapper"),image:"".concat(eg,"__image"),title:"".concat(eg,"__title"),description:"".concat(eg,"__description"),callToAction:"".concat(eg,"__call-to-action"),scanQr:"".concat(eg,"__scan-qr")}),e_=Object.freeze({mobile:56,desktop:68}),eb="headerBannerShownAt",ew=()=>{let e=localStorage.getItem(eb);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},ey=()=>{localStorage.setItem(eb,new Date().toISOString())},ex=()=>{let e=ew();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},eE=e=>{let{minioUrl:t,className:n,mobileAppUrl:o}=e,{fixedContainerRef:h,headerRef:p}=er(),[d,m]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[v,b]=(0,i.useState)(!1),w=(0,i.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"desktop",t=h.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height","".concat(e_[e]+_[e],"px")),document.documentElement.style.setProperty("--new-header-height-desktop","".concat(e_.desktop+_.desktop,"px")),document.documentElement.style.setProperty("--new-header-height-mobile","".concat(e_.mobile+_.mobile,"px")),document.documentElement.style.setProperty("--static-new-header-height-mobile","".concat(e_.mobile+_.mobile,"px")),document.documentElement.style.setProperty("--static-new-header-height-desktop","".concat(e_.desktop+_.desktop,"px")),document.documentElement.style.setProperty("--header-height","".concat(e_[e]+108,"px")))},[]),y=(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=p.current;if(!e)return;let t=()=>{f&&m(!1),b(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[f]),(0,i.useEffect)(()=>{ex()&&m(!0)},[]),(0,i.useEffect)(()=>{let e=window.innerWidth<768;d&&(w(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?m(!0):b(!0));let t=()=>{if(!d)return null;w(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{y(),window.removeEventListener("resize",t)}},[d,w,y]),d?(0,r.jsx)("div",{id:"headerMobileBanner",role:"region","aria-label":"Мобильное приложение","data-opening":v,className:(0,c.Z)(ev.wrapper,n),children:(0,r.jsx)(a.W2,{children:(0,r.jsxs)("div",{className:ev.container,children:[(0,r.jsxs)("div",{className:ev.innerWrapper,children:[(0,r.jsxs)("picture",{className:ev.imageWrapper,children:[(0,r.jsx)("source",{srcSet:(0,u.xn)(t,"/widgets/header/qr-mobile-app.svg"),media:"(min-width: 768px)"}),(0,r.jsx)("img",{className:ev.image,src:(0,u.xn)(t,"/logo/finuslugi/default-regular.svg")})]}),(0,r.jsxs)("div",{className:ev.scanQr,children:[(0,r.jsx)("div",{className:ev.title,children:"Скачайте приложение Финуслуги"}),(0,r.jsx)("div",{className:ev.description,children:"Сканируйте QR-код"})]}),(0,r.jsxs)("div",{className:ev.callToAction,children:[(0,r.jsxs)("div",{children:["Приложение",(0,r.jsx)("br",{}),"Финуслуги"]}),(0,r.jsx)(l.zx,{onClick:()=>{window.open(o,"_blank","noreferrer")},variant:"white",size:"xs",children:"Скачать"})]})]}),(0,r.jsx)("div",{"aria-label":"Закрыть",role:"button",className:ev.closeButton,onClick:()=>{ey(),y(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?m(!1):g(!0)},children:(0,r.jsx)(s.IconFdsCloseO,{size:"100%"})})]})})}):null},eT=(0,p.g)("header-chat-modal-body","sc"),eN=Object.freeze({wrapper:"".concat(eT,"__wrapper"),cardButton:"".concat(eT,"__card-button"),card:"".concat(eT,"__card"),cardTitle:"".concat(eT,"__card-title"),cardSubtitle:"".concat(eT,"__card-subtitle"),button:"".concat(eT,"__button")}),eC=()=>{let e=er();return(0,r.jsxs)("div",{className:eN.wrapper,children:[(0,r.jsx)(eo,{className:eN.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)(a.Zb,{className:eN.card,variant:"secondary",children:[(0,r.jsxs)("div",{className:eN.cardTitle,children:[(0,r.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat"}),"Напишите в чат"]}),(0,r.jsxs)("p",{className:eN.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,r.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},eA=e=>{let{data:t,isMobile:n}=e,a=er();return(0,r.jsx)("div",{className:j.contentWrapper,children:t.map(e=>(0,r.jsx)(i.Fragment,{children:e.sections.map(e=>(0,r.jsxs)("div",{className:(0,c.Z)(j.content,{[j.hidden]:a.openedSection!==e.id,[j.contentOpen]:!!a.openedSection}),children:[(0,r.jsx)("div",{className:j.contentHeader,children:(0,r.jsx)("label",{children:e.title})}),e.content.map((t,i)=>{var a,l;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,r.jsx)("a",{className:(0,c.Z)(j.contentTitle,{[j.removed]:!t.title,[j.contentTitleUrl]:!!t.url,[j.contentTitleLink]:!!e.isSeeAllLinkAvailable,[j.contentTitleNew]:!!t.new}),href:e.isSeeAllLinkAvailable?t.url:void 0,children:(0,r.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,r.jsx)("div",{className:j.arrowIcon,children:(0,r.jsx)(s.IconFdsArrowUpRightSmallO,{})}),t.title]})})}),!(null!=(a=t.links)&&a.length)&&(0,r.jsx)(B,{items:t.chips||[],maxNumberOfLines:e.content.length<=1?99:n?3:2}),!!(null!=(l=t.links)&&l.length)&&(0,r.jsx)("div",{className:(0,c.Z)(j.links,{[j.linksColumns]:!!t.columns,[j.linksTitleless]:!t.title}),children:t.links.map(e=>(0,r.jsxs)("a",{href:e.url,className:(0,c.Z)({[j.new]:!!e.new}),onClick:()=>N(o.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,r.jsx)("div",{className:j.arrowIcon,children:(0,r.jsx)(s.IconFdsArrowUpRightSmallO,{})}),(0,r.jsx)("span",{children:e.title})]},e.url))})]},"".concat(t.url,"_").concat(i))})]},e.id))},e.id))})},eS=(0,p.g)("navigation-section-icon","sc"),ej=Object.freeze({icon:"".concat(eS)}),ek=e=>{let{name:t,background:n}=e,o=(0,i.useMemo)(()=>t&&s[t]||null,[t]);return t&&o?(0,r.jsx)("div",{className:ej.icon,style:{background:n},children:(0,r.jsx)(o,{})}):null},eB=(0,p.g)("navigation","sc"),eO=Object.freeze({navigation:"".concat(eB),navigationOpening:"".concat(eB,"--opening"),navigationClosing:"".concat(eB,"--closing"),wrapper:"".concat(eB,"__wrapper"),container:"".concat(eB,"__container"),containerOpen:"".concat(eB,"__container--open"),sections:"".concat(eB,"__sections"),sectionsOpen:"".concat(eB,"__sections--open"),citySelectButton:"".concat(eB,"__city-select-button"),sectionsTitle:"".concat(eB,"__sections-title"),sectionsWrapper:"".concat(eB,"__sections-wrapper"),section:"".concat(eB,"__section"),sectionArrow:"".concat(eB,"__section-arrow"),sectionExtra:"".concat(eB,"__section--extra"),sectionActive:"".concat(eB,"__section--active"),sectionTitle:"".concat(eB,"__section-title"),chatWrapper:"".concat(eB,"__chat-wrapper"),chatHeader:"".concat(eB,"__chat-header"),backButton:"".concat(eB,"__back-button"),useful:"".concat(eB,"__useful"),usefulOpen:"".concat(eB,"__useful--open"),usefulTitle:"".concat(eB,"__useful-title"),usefulGrid:"".concat(eB,"__useful-grid"),removed:"".concat(eB,"__removed")}),eL=e=>{var t;let{data:n}=e,u=er(),h=z(),p=(0,l.aF)("m"),[d,m]=(0,i.useState)(!0);(0,i.useEffect)(()=>{m(p)},[p]);let f=(0,i.useRef)(null),g=(0,i.useCallback)(()=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>u.openedSection?u.setOpenedSection(null):u.isNavigationOpen?u.setOpenedBlock(null):void 0,50)},[u]),_=(0,i.useRef)(!1),b=(0,i.useRef)(null),w=(0,i.useCallback)(()=>{d&&(_.current=!0,b.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),g()},window.history.pushState(null,"",window.location.href))},[g,d]),y=(0,i.useCallback)(()=>{_.current=!1,window.onpopstate=b.current,window.history.go(-1)},[]),x=(0,i.useRef)(null),E=(0,i.useCallback)(e=>{if(d||!u.navMenuItemsRef.current||!u.navigationRef.current)return;let t=e.target,n=!u.navMenuItemsRef.current.contains(t)&&!u.navigationRef.current.contains(t);if(n&&!x.current){u.setIgnoreClicks(),x.current=setTimeout(()=>u.setOpenedBlock(null),300);return}!n&&x.current&&(clearTimeout(x.current),x.current=null)},[d,u]),T=(0,i.useRef)(null),C=(0,i.useCallback)(e=>{typeof window>"u"||(e?(T.current=E,window.addEventListener("mousemove",T.current)):T.current&&window.removeEventListener("mousemove",T.current))},[E]);(0,i.useEffect)(()=>{C(u.isNavigationOpen),u.isNavigationOpen&&!_.current&&w(),!u.isNavigationOpen&&_.current&&y()},[u.isNavigationOpen]);let A=(e,t)=>()=>{N(o.D.button,t),u.setOpenedSection(e)},{start:S,clear:j}=W(),k=(e,t)=>()=>{d||S(A(e,t),150)},B=()=>{d||j()};return(0,r.jsx)("div",{ref:u.navigationRef,className:(0,c.Z)(eO.navigation,{[eO.removed]:!u.isNavigationMounted,[eO.navigationOpening]:u.isNavigationOpen,[eO.navigationClosing]:!u.isNavigationOpen}),children:(0,r.jsx)("div",{className:eO.wrapper,children:(0,r.jsxs)(a.W2,{className:(0,c.Z)(eO.container,{[eO.containerOpen]:!!u.openedSection}),children:[(0,r.jsxs)("div",{className:(0,c.Z)(eO.sections,{[eO.sectionsOpen]:!!u.openedSection}),children:[(0,r.jsx)(l.zx,{className:eO.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>h.handleButtonClick(!1),iconLeft:(0,r.jsx)(s.IconFdsLocationO,{size:24}),label:(null==(t=h.town)?void 0:t.name)||"Вся Россия"}),n.map(e=>(0,r.jsxs)("ul",{className:(0,c.Z)(eO.sectionsWrapper,{[eO.removed]:u.openedBlock!==e.id&&!d}),children:[(0,r.jsx)("div",{className:eO.sectionsTitle,children:v[e.id]}),e.sections.map(e=>(0,r.jsxs)("li",{className:(0,c.Z)(eO.section,{[eO.sectionExtra]:!!e.extra,[eO.sectionActive]:u.openedSection===e.id}),onClick:A(e.id,e.title),onMouseEnter:k(e.id,e.title),onMouseLeave:B,children:[(0,r.jsx)(ek,{name:e.uikitIcon,background:e.uikitIconBg}),(0,r.jsx)("span",{className:eO.sectionTitle,children:e.title}),(0,r.jsx)("div",{className:eO.sectionArrow,children:(0,r.jsx)(s.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,r.jsxs)("div",{className:eO.chatWrapper,children:[(0,r.jsx)("div",{className:eO.chatHeader,children:"Нужна помощь?"}),(0,r.jsx)(eC,{})]})]}),(0,r.jsxs)("button",{type:"button",className:(0,c.Z)(eO.backButton,{[eO.removed]:!u.openedSection}),onClick:()=>{N(o.D.button,"Назад"),u.setOpenedSection(null)},children:[(0,r.jsx)(s.IconFdsChevronLeftO,{size:24}),(0,r.jsx)("span",{children:"Назад"})]}),(0,r.jsx)(eA,{data:n,isMobile:d}),(0,r.jsxs)("div",{className:(0,c.Z)(eO.useful,{[eO.usefulOpen]:!!u.openedSection}),children:[(0,r.jsx)("div",{className:eO.usefulTitle,children:"Полезное на Финуслугах"}),n.map(e=>(0,r.jsx)(i.Fragment,{children:e.sections.map(e=>(0,r.jsx)("div",{className:(0,c.Z)(eO.usefulGrid,{[eO.removed]:u.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,r.jsxs)("a",{href:e.url,onClick:()=>N(o.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,r.jsx)("div",{children:(0,r.jsx)("img",{src:e.icon,srcSet:e.icon2?"".concat(e.icon,", ").concat(e.icon2," 2x"):void 0,alt:e.title,loading:"lazy"})}),(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},"".concat(e.title,"_").concat(t)))},e.id))},e.id))]})]})})})},eH=(e,t,n)=>{var r,i,o;let s=(null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r.findIndex(e=>{let{id:t}=e;return"news"===t}))||-1,a=(null==(o=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i[s])?void 0:o.content)||[];if(e&&Array.isArray(n)&&a.length){let r=n.map(e=>{let{title:n,url:r}=e;return{title:n,url:(0,u.xn)(t||"",r),new:0}});e.NAVIGATOR[s].content[0].links=r}return[{id:"FINPRODUCTS",sections:(null==e?void 0:e.FINPRODUCTS)||[]},{id:"NAVIGATOR",sections:(null==e?void 0:e.NAVIGATOR)||[]},{id:"ABOUT",sections:(null==e?void 0:e.ABOUT)||[]}]},eI=e=>{let{data:t,showcaseUrl:n="https://finuslugi.ru",minioUrl:h="https://assets.finuslugi.ru/mp-assets",lkUrl:p="https://lk.finuslugi.ru/registration",initialTown:d,isMainBannerPage:f,enableAppHeaderBanner:v=!1,news:_,className:b}=e,w=er(),y=eH(t,n,_),x=null==t?void 0:t.config,E=(0,i.useMemo)(()=>y.reduce((e,t)=>(e[t.id]=t.sections[0].id,e),{}),[y]),T=w.isAuth?"Личный кабинет":"Войти",C=f&&w.isHeaderTransparent,A=(e,t,n,r)=>()=>{e!==w.openedBlock?N(o.D.toggle,t,"on"):N(o.D.button,"menu_close","on");let i=n?E[e]:"";w.setOpenedBlock(e,i,!!r)},{start:S,clear:j}=W(),k=(e,t,n,r)=>()=>{w.isNavigationOpen&&e===w.openedBlock||w.setIgnoreClicks(),S(A(e,t,n,r),200)},B=e=>()=>{w.ignoreClicks||e()},O=e=>w.openedBlock===e&&w.isNavigationOpen;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("header",{ref:w.headerRef,className:(0,c.Z)(m.header,b,{[m.transparent]:C}),children:(0,r.jsxs)("div",{ref:w.fixedContainerRef,className:(0,c.Z)(m.fixed,{[m.hidden]:w.isHeaderHidden,[m.navigationOpen]:w.isNavigationOpen}),children:[!!(null!=x&&x.appBannerUrl)&&v&&(0,r.jsx)(eE,{mobileAppUrl:x.appBannerUrl,minioUrl:h}),(0,r.jsxs)(a.W2,{className:m.container,children:[(0,r.jsxs)("div",{className:m.leftRow,children:[(0,r.jsx)(ef,{className:m.logo,href:n,eventActionType:o.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(n),children:(0,r.jsxs)("picture",{children:[(0,r.jsx)("source",{srcSet:(0,u.xn)(h,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,r.jsx)("img",{src:(0,u.xn)(h,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,r.jsx)("nav",{ref:w.navMenuItemsRef,className:m.menuItems,children:(0,r.jsx)("ul",{children:g.map(e=>{let{id:t,label:n}=e;return(0,r.jsx)("li",{children:(0,r.jsx)(l.zx,{className:(0,c.Z)({[m.menuItemActive]:O(t)}),label:n,variant:"white",size:"xs",onClick:B(A(t,n,!0)),onMouseEnter:k(t,n,!0,!0),onMouseLeave:j})},t)})})}),(0,r.jsx)(eo,{className:(0,c.Z)(m.tabletMenuButton,{[m.menuItemActive]:w.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,r.jsx)(s.IconFdsChevronDownO,{size:24}),onClick:A("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,r.jsxs)("div",{className:m.buttonGroup,children:[(0,r.jsxs)("div",{className:m.chips,children:[(0,r.jsx)(eo,{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)(s.IconFdsChatDotsCircleO,{size:24})}),(0,r.jsx)(eo,{as:"a",href:p,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:"profile_".concat(p),iconLeft:(0,r.jsx)(s.IconFdsUserO,{size:24})})]}),(0,r.jsx)(eo,{className:m.menuButton,size:"xs",shape:C?"icon":"default",appearance:C?"ghost":"fill",label:"Меню",onClick:A("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,r.jsx)(s.IconFdsMenuSkewedO,{size:24})}),(0,r.jsxs)("div",{className:m.moreButtons,children:[(0,r.jsx)(em,{initialTown:d}),(0,r.jsx)(eo,{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)(s.IconFdsChatDotsCircleO,{size:24})}),(0,r.jsx)(eo,{as:"a",href:p,size:"xs",eventActionText:T,eventLabel:"".concat(T,"_").concat(p),label:T})]})]}),(0,r.jsxs)(ef,{className:m.auth,href:p,eventActionText:T,eventLabel:"".concat(T,"_").concat(p),children:[(0,r.jsx)(eo,{size:"xs",shape:"circle-icon",iconLeft:(0,r.jsx)(s.IconFdsUserO,{}),eventActionText:T,eventLabel:"".concat(T,"_").concat(p)}),(0,r.jsx)("p",{children:T})]}),(0,r.jsx)("div",{className:m.close,children:(0,r.jsx)(eo,{className:m.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,r.jsx)(s.IconFdsCloseO,{}),onClick:()=>w.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,r.jsx)("div",{className:(0,c.Z)(m.overlay,{[m.removed]:!w.isNavigationMounted,[m.overlayOpening]:w.isNavigationOpen,[m.overlayClosing]:!w.isNavigationOpen}),onClick:B(()=>w.setOpenedBlock(null))}),(0,r.jsx)(eL,{data:y,minioUrl:h})]})},eP=e=>(0,r.jsx)(ei,{isMainBannerPage:e.isMainBannerPage,children:(0,r.jsx)(eI,{...e})})},5362:function(e,t,n){"use strict";n.d(t,{B:function(){return w}});var r=n(7437),i=n(2833),o=n(3167),s=n(6094),a=n(1810),l=n(2331),c=n(3919),u=n(2265);let h=(0,c.g)("support","sc"),p=Object.freeze({support:h,title:`${h}__title`,cardsContainer:`${h}__cards-container`}),d="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:d,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:d,eventActionType:l.D.button,eventActionText:"messenger",eventLabel:"chat"})},[]),o=e=>{let t=e.replace(/[\s-]/g,"");(0,l.h)({eventCategory:d,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`})]})},w=({className:e,phoneCard:t,appCard:n,s3Assets:s})=>(0,r.jsx)("section",{className:(0,o.Z)(p.support,e),children:(0,r.jsxs)(i.W2,{children:[(0,r.jsx)(i.X6,{as:"h2",type:"display",weight:"bold",className:(0,o.Z)(p.title,"mb-6"),children:"Поддержка"}),(0,r.jsxs)("div",{className:p.cardsContainer,children:[(0,r.jsx)(b,{s3Assets:s,...t}),(0,r.jsx)(g,{s3Assets:s,...n})]})]})});w.displayName="Support"},4866:function(e,t,n){"use strict";n.d(t,{xn:function(){return i}});let r=/^\.?\//;function i(e,...t){let n=e||"";for(let e of t.filter(e=>e&&"/"!==e))if(n){let t=e.replace(r,"");n=function(e="",t){return e.endsWith("/")?e:e+"/"}(n)+t}else n=e;return n}Symbol.for("ufo:protocolRelative")}}]);