(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[327],{29583:function(e,t,n){"use strict";function r(e,t){var n=t&&t.cache?t.cache:l,r=t&&t.serializer?t.serializer:a;return(t&&t.strategy?t.strategy:function(e,t){var n,r,a=1===e.length?i:o;return n=t.cache.create(),r=t.serializer,a.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 a=function(){return JSON.stringify(arguments)};function s(){this.cache=Object.create(null)}s.prototype.get=function(e){return this.cache[e]},s.prototype.set=function(e,t){this.cache[e]=t};var l={create:function(){return new s}},c={variadic:function(e,t){var n,r;return n=t.cache.create(),r=t.serializer,o.bind(this,e,n,r)},monadic:function(e,t){var n,r;return n=t.cache.create(),r=t.serializer,i.bind(this,e,n,r)}}},90889:function(e,t,n){"use strict";n.r(t),n.d(t,{ErrorCode:function(){return p},FormatError:function(){return eu},IntlMessageFormat:function(){return ev},InvalidValueError:function(){return eh},InvalidValueTypeError:function(){return ed},MissingValueError:function(){return ep},PART_TYPE:function(){return m},default:function(){return e_},formatToParts:function(){return ef},isFormatXMLElementFn:function(){return em}});var r,i,o,a,s,l,c,u,h,d,p,m,f=function(e,t){return(f=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var v=function(){return(v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function _(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function b(e){return e.type===c.literal}function y(e){return e.type===c.number}function w(e){return e.type===c.date}function x(e){return e.type===c.time}function E(e){return e.type===c.select}function T(e){return e.type===c.plural}function N(e){return e.type===c.tag}function C(e){return!!(e&&"object"==typeof e&&e.type===u.number)}function j(e){return!!(e&&"object"==typeof e&&e.type===u.dateTime)}"function"==typeof SuppressedError&&SuppressedError,(r=l||(l={}))[r.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",r[r.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",r[r.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",r[r.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",r[r.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",r[r.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",r[r.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",r[r.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",r[r.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",r[r.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",r[r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",r[r.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",r[r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",r[r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",r[r.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",r[r.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",r[r.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",r[r.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",r[r.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",r[r.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",r[r.INVALID_TAG=23]="INVALID_TAG",r[r.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",r[r.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",r[r.UNCLOSED_TAG=27]="UNCLOSED_TAG",(i=c||(c={}))[i.literal=0]="literal",i[i.argument=1]="argument",i[i.number=2]="number",i[i.date=3]="date",i[i.time=4]="time",i[i.select=5]="select",i[i.plural=6]="plural",i[i.pound=7]="pound",i[i.tag=8]="tag",(o=u||(u={}))[o.number=0]="number",o[o.dateTime=1]="dateTime";var A=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,S=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,k=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,L=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,I=/^(@+)?(\+|#+)?[rs]?$/g,O=/(\*)(0+)|(#+)(0+)|(0+)/g,B=/^(0+)$/;function H(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(I,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(A.source,"*")),D=new RegExp("".concat(A.source,"*$"));function F(e,t){return{start:e,end:t}}var G=!!String.prototype.startsWith&&"_a".startsWith("a",1),$=!!String.fromCodePoint,z=!!Object.fromEntries,W=!!String.prototype.codePointAt,V=!!String.prototype.trimStart,Z=!!String.prototype.trimEnd,q=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&9007199254740991>=Math.abs(e)},X=!0;try{var K=er("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");X=(null===(h=K.exec("a"))||void 0===h?void 0:h[0])==="a"}catch(e){X=!1}var Y=G?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},J=$?String.fromCodePoint:function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0;i>o;){if((e=t[o++])>1114111)throw RangeError(e+" is not a valid code point");r+=e<65536?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,e%1024+56320)}return r},Q=z?Object.fromEntries:function(e){for(var t={},n=0;n<e.length;n++){var r=e[n],i=r[0],o=r[1];t[i]=o}return t},ee=W?function(e,t){return e.codePointAt(t)}:function(e,t){var n,r=e.length;if(!(t<0)&&!(t>=r)){var i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:(i-55296<<10)+(n-56320)+65536}},et=V?function(e){return e.trimStart()}:function(e){return e.replace(U,"")},en=Z?function(e){return e.trimEnd()}:function(e){return e.replace(D,"")};function er(e,t){return new RegExp(e,t)}if(X){var ei=er("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");d=function(e,t){var n;return ei.lastIndex=t,null!==(n=ei.exec(e)[1])&&void 0!==n?n:""}}else d=function(e,t){for(var n=[];;){var r,i=ee(e,t);if(void 0===i||es(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 a=this.clonePosition();this.bump(),r.push({type:c.pound,location:F(a,this.clonePosition())})}else if(60!==i||this.ignoreTag||47!==this.peek()){if(60===i&&!this.ignoreTag&&ea(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,a=this.clonePosition();if(!this.bumpIf("</"))return this.error(l.UNCLOSED_TAG,F(n,this.clonePosition()));if(this.isEOF()||!ea(this.char()))return this.error(l.INVALID_TAG,F(a,this.clonePosition()));var s=this.clonePosition();return r!==this.parseTagName()?this.error(l.UNMATCHED_CLOSING_TAG,F(s,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(a,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 a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}var s=F(n,this.clonePosition());return{val:{type:c.literal,value:r,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){var e;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ea(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=d(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(),a=this.parseIdentifierIfPossible().value,s=this.clonePosition();switch(a){case"":return this.error(l.EXPECT_ARGUMENT_TYPE,F(o,s));case"number":case"date":case"time":this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var m=en(p.val);if(0===m.length)return this.error(l.EXPECT_ARGUMENT_STYLE,F(this.clonePosition(),this.clonePosition()));h={style:m,styleLocation:F(d,this.clonePosition())}}var f=this.tryParseArgumentClose(r);if(f.err)return f;var g=F(r,this.clonePosition());if(h&&Y(null==h?void 0:h.style,"::",0)){var _,b=et(h.style.slice(2));if("number"===a){var p=this.parseNumberSkeletonFromString(b,h.styleLocation);if(p.err)return p;return{val:{type:c.number,value:n,location:g,style:p.val},err:null}}if(0===b.length)return this.error(l.EXPECT_DATE_TIME_SKELETON,g);var y=b;this.locale&&(y=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if("j"===i){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var a=1+(1&o),s=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)&&(s=0);s-- >0;)n+="a";for(;a-- >0;)n=l+n}else"J"===i?n+="H":n+=i}return n}(b,this.locale));var m={type:u.dateTime,pattern:y,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?(_={},y.replace(S,function(e){var t=e.length;switch(e[0]){case"G":_.era=4===t?"long":5===t?"narrow":"short";break;case"y":_.year=2===t?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":_.month=["numeric","2-digit","short","long","narrow"][t-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":_.day=["numeric","2-digit"][t-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":_.weekday=4===t?"long":5===t?"narrow":"short";break;case"e":if(t<4)throw RangeError("`e..eee` (weekday) patterns are not supported");_.weekday=["short","long","narrow","short"][t-4];break;case"c":if(t<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");_.weekday=["short","long","narrow","short"][t-4];break;case"a":_.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":_.hourCycle="h12",_.hour=["numeric","2-digit"][t-1];break;case"H":_.hourCycle="h23",_.hour=["numeric","2-digit"][t-1];break;case"K":_.hourCycle="h11",_.hour=["numeric","2-digit"][t-1];break;case"k":_.hourCycle="h24",_.hour=["numeric","2-digit"][t-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":_.minute=["numeric","2-digit"][t-1];break;case"s":_.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":_.timeZoneName=t<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),_):{}};return{val:{type:"date"===a?c.date:c.time,value:n,location:g,style:m},err:null}}return{val:{type:"number"===a?c.number:"date"===a?c.date:c.time,value:n,location:g,style:null!==(i=null==h?void 0:h.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(l.EXPECT_SELECT_ARGUMENT_OPTIONS,F(w,v({},w)));this.bumpSpace();var x=this.parseIdentifierIfPossible(),E=0;if("select"!==a&&"offset"===x.value){if(!this.bumpIf(":"))return this.error(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,F(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,l.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),x=this.parseIdentifierIfPossible(),E=p.val}var T=this.tryParsePluralOrSelectOptions(e,a,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"===a)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"===a?"cardinal":"ordinal",location:N},err:null};default:return this.error(l.INVALID_ARGUMENT_TYPE,F(o,s))}},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],a=i.slice(1),s=0;s<a.length;s++)if(0===a[s].length)throw Error("Invalid number skeleton");n.push({stem:o,options:a})}return n}(e)}catch(e){return this.error(l.INVALID_NUMBER_SKELETON,t)}return{val:{type:u.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=r.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=v(v(v({},t),{notation:"scientific"}),r.options.reduce(function(e,t){return v(v({},e),P(t)||{})},{}));continue;case"engineering":t=v(v(v({},t),{notation:"engineering"}),r.options.reduce(function(e,t){return v(v({},e),P(t)||{})},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(r.options.length>1)throw RangeError("integer-width stems only accept a single optional option");r.options[0].replace(O,function(e,n,r,i,o,a){if(n)t.minimumIntegerDigits=r.length;else if(i&&o)throw Error("We currently do not support maximum integer digits");else if(a)throw Error("We currently do not support exact integer digits");return""});continue}if(B.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(L.test(r.stem)){if(r.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(L,function(e,n,r,i,o,a){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&a?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""});var i=r.options[0];"w"===i?t=v(v({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=v(v({},t),H(i)));continue}if(I.test(r.stem)){t=v(v({},t),H(r.stem));continue}var o=P(r.stem);o&&(t=v(v({},t),o));var a=function(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!B.test(e))throw Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}(r.stem);a&&(t=v(v({},t),a))}return t}(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){for(var i,o=!1,a=[],s=new Set,c=r.value,u=r.location;;){if(0===c.length){var h=this.clonePosition();if("select"!==t&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_SELECTOR,l.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;u=F(h,this.clonePosition()),c=this.message.slice(h.offset,this.offset())}else break}if(s.has(c))return this.error("select"===t?l.DUPLICATE_SELECT_ARGUMENT_SELECTOR:l.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===c&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?l.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:l.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,F(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(e+1,t,n);if(m.err)return m;var f=this.tryParseArgumentClose(p);if(f.err)return f;a.push([c,{value:m.val,location:F(p,this.clonePosition())}]),s.add(c),this.bumpSpace(),c=(i=this.parseIdentifierIfPossible()).value,u=i.location}return 0===a.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:a,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 a=this.char();if(a>=48&&a<=57)i=!0,o=10*o+(a-48),this.bump();else break}var s=F(r,this.clonePosition());return i?q(o*=n)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=ee(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Y(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&es(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 ea(e){return e>=97&&e<=122||e>=65&&e<=90}function es(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function el(e,t){void 0===t&&(t={});var n=new eo(e,t=v({shouldParseSkeletons:!0,requiresOtherClause:!0},t)).parse();if(n.err){var r=SyntaxError(l[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||function e(t){t.forEach(function(t){if(delete t.location,E(t)||T(t))for(var n in t.options)delete t.options[n].location,e(t.options[n].value);else y(t)&&C(t.style)?delete t.style.location:(w(t)||x(t))&&j(t.style)?delete t.style.location:N(t)&&e(t.children)})}(n.val),n.val}var ec=n(29583);(a=p||(p={})).MISSING_VALUE="MISSING_VALUE",a.INVALID_VALUE="INVALID_VALUE",a.MISSING_INTL_API="MISSING_INTL_API";var eu=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return g(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),eh=function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),p.INVALID_VALUE,i)||this}return g(t,e),t}(eu),ed=function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),p.INVALID_VALUE,r)||this}return g(t,e),t}(eu),ep=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),p.MISSING_VALUE,n)||this}return g(t,e),t}(eu);function em(e){return"function"==typeof e}function ef(e,t,n,r,i,o,a){if(1===e.length&&b(e[0]))return[{type:m.literal,value:e[0].value}];for(var s=[],l=0;l<e.length;l++){var u=e[l];if(b(u)){s.push({type:m.literal,value:u.value});continue}if(u.type===c.pound){"number"==typeof o&&s.push({type:m.literal,value:n.getNumberFormat(t).format(o)});continue}var h=u.value;if(!(i&&h in i))throw new ep(h,a);var d=i[h];if(u.type===c.argument){d&&"string"!=typeof d&&"number"!=typeof d||(d="string"==typeof d||"number"==typeof d?String(d):""),s.push({type:"string"==typeof d?m.literal:m.object,value:d});continue}if(w(u)){var f="string"==typeof u.style?r.date[u.style]:j(u.style)?u.style.parsedOptions:void 0;s.push({type:m.literal,value:n.getDateTimeFormat(t,f).format(d)});continue}if(x(u)){var f="string"==typeof u.style?r.time[u.style]:j(u.style)?u.style.parsedOptions:r.time.medium;s.push({type:m.literal,value:n.getDateTimeFormat(t,f).format(d)});continue}if(y(u)){var f="string"==typeof u.style?r.number[u.style]:C(u.style)?u.style.parsedOptions:void 0;f&&f.scale&&(d*=f.scale||1),s.push({type:m.literal,value:n.getNumberFormat(t,f).format(d)});continue}if(N(u)){var g=u.children,v=u.value,_=i[v];if(!em(_))throw new ed(v,"function",a);var A=_(ef(g,t,n,r,i,o).map(function(e){return e.value}));Array.isArray(A)||(A=[A]),s.push.apply(s,A.map(function(e){return{type:"string"==typeof e?m.literal:m.object,value:e}}))}if(E(u)){var S=u.options[d]||u.options.other;if(!S)throw new eh(u.value,d,Object.keys(u.options),a);s.push.apply(s,ef(S.value,t,n,r,i));continue}if(T(u)){var S=u.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new eu('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',p.MISSING_INTL_API,a);var k=n.getPluralRules(t,{type:u.pluralType}).select(d-(u.offset||0));S=u.options[k]||u.options.other}if(!S)throw new eh(u.value,d,Object.keys(u.options),a);s.push.apply(s,ef(S.value,t,n,r,i,d-(u.offset||0)));continue}}return s.length<2?s:s.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}}}}}(s=m||(m={}))[s.literal=0]="literal",s[s.object=1]="object";var ev=function(){function e(t,n,r,i){var o,a,s=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.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(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=s.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.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===(a=this.formatterCache)&&(a={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(a.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(a.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(a.pluralRules),strategy:ec.strategies.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return new Intl.Locale(t.length>0?t[0]:"string"==typeof e?e:e[0])}},e.__parse=el,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),e_=ev},12612:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}n.d(t,{default:function(){return a}});var i=n(2265),o=n(54480);function a(e){let{locale:t,...n}=e;if(!t)throw Error("Failed to determine locale in `NextIntlClientProvider`, please provide the `locale` prop explicitly.\n\nSee https://next-intl-docs.vercel.app/docs/configuration#locale");return i.createElement(o.P,r({locale:t},n))}},40905:function(e,t){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DOMAttributeNames:function(){return r},default:function(){return a},isEqualNode:function(){return o}});let r={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function i(e){let{type:t,props:n}=e,i=document.createElement(t);for(let e in n){if(!n.hasOwnProperty(e)||"children"===e||"dangerouslySetInnerHTML"===e||void 0===n[e])continue;let o=r[e]||e.toLowerCase();"script"===t&&("async"===o||"defer"===o||"noModule"===o)?i[o]=!!n[e]:i.setAttribute(o,n[e])}let{children:o,dangerouslySetInnerHTML:a}=n;return a?i.innerHTML=a.__html||"":o&&(i.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):""),i}function o(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){let n=t.getAttribute("nonce");if(n&&!e.getAttribute("nonce")){let r=t.cloneNode(!0);return r.setAttribute("nonce",""),r.nonce=n,n===e.nonce&&e.isEqualNode(r)}}return e.isEqualNode(t)}function a(){return{mountedInstances:new Set,updateHead:e=>{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let n=t[e.type]||[];n.push(e),t[e.type]=n});let r=t.title?t.title[0]:null,i="";if(r){let{children:e}=r.props;i="string"==typeof e?e:Array.isArray(e)?e.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach(e=>{n(e,t[e]||[])})}}}n=(e,t)=>{let n=document.getElementsByTagName("head")[0],r=n.querySelector("meta[name=next-head-count]"),a=Number(r.content),s=[];for(let t=0,n=r.previousElementSibling;t<a;t++,n=(null==n?void 0:n.previousElementSibling)||null){var l;(null==n?void 0:null==(l=n.tagName)?void 0:l.toLowerCase())===e&&s.push(n)}let c=t.map(i).filter(e=>{for(let t=0,n=s.length;t<n;t++)if(o(s[t],e))return s.splice(t,1),!1;return!0});s.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),c.forEach(e=>n.insertBefore(e,r)),r.content=(a-s.length+c.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},49189:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84080:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return b},handleClientScriptLoad:function(){return g},initScriptLoader:function(){return v}});let r=n(99920),i=n(41452),o=n(57437),a=r._(n(54887)),s=i._(n(2265)),l=n(36590),c=n(40905),u=n(49189),h=new Map,d=new Set,p=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],m=e=>{if(a.default.preinit){e.forEach(e=>{a.default.preinit(e,{as:"style"})});return}if("undefined"!=typeof window){let t=document.head;e.forEach(e=>{let n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.appendChild(n)})}},f=e=>{let{src:t,id:n,onLoad:r=()=>{},onReady:i=null,dangerouslySetInnerHTML:o,children:a="",strategy:s="afterInteractive",onError:l,stylesheets:u}=e,f=n||t;if(f&&d.has(f))return;if(h.has(t)){d.add(f),h.get(t).then(r,l);return}let g=()=>{i&&i(),d.add(f)},v=document.createElement("script"),_=new Promise((e,t)=>{v.addEventListener("load",function(t){e(),r&&r.call(this,t),g()}),v.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});for(let[n,r]of(o?(v.innerHTML=o.__html||"",g()):a?(v.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):"",g()):t&&(v.src=t,h.set(t,_)),Object.entries(e))){if(void 0===r||p.includes(n))continue;let e=c.DOMAttributeNames[n]||n.toLowerCase();v.setAttribute(e,r)}"worker"===s&&v.setAttribute("type","text/partytown"),v.setAttribute("data-nscript",s),u&&m(u),document.body.appendChild(v)};function g(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>f(e))}):f(e)}function v(e){e.forEach(g),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");d.add(t)})}function _(e){let{id:t,src:n="",onLoad:r=()=>{},onReady:i=null,strategy:c="afterInteractive",onError:h,stylesheets:p,...m}=e,{updateScripts:g,scripts:v,getIsSsr:_,appDir:b,nonce:y}=(0,s.useContext)(l.HeadManagerContext),w=(0,s.useRef)(!1);(0,s.useEffect)(()=>{let e=t||n;w.current||(i&&e&&d.has(e)&&i(),w.current=!0)},[i,t,n]);let x=(0,s.useRef)(!1);if((0,s.useEffect)(()=>{!x.current&&("afterInteractive"===c?f(e):"lazyOnload"===c&&("complete"===document.readyState?(0,u.requestIdleCallback)(()=>f(e)):window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>f(e))})),x.current=!0)},[e,c]),("beforeInteractive"===c||"worker"===c)&&(g?(v[c]=(v[c]||[]).concat([{id:t,src:n,onLoad:r,onReady:i,onError:h,...m}]),g(v)):_&&_()?d.add(t||n):_&&!_()&&f(e)),b){if(p&&p.forEach(e=>{a.default.preinit(e,{as:"style"})}),"beforeInteractive"===c)return n?(a.default.preload(n,m.integrity?{as:"script",integrity:m.integrity,nonce:y}:{as:"script",nonce:y}),(0,o.jsx)("script",{nonce:y,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([n,{...m,id:t}])+")"}})):(m.dangerouslySetInnerHTML&&(m.children=m.dangerouslySetInnerHTML.__html,delete m.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:y,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...m,id:t}])+")"}}));"afterInteractive"===c&&n&&a.default.preload(n,m.integrity?{as:"script",integrity:m.integrity,nonce:y}:{as:"script",nonce:y})}return null}Object.defineProperty(_,"__nextScript",{value:!0});let b=_;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},58945:function(e,t,n){"use strict";let r=n(2265).createContext(void 0);t.IntlContext=r},54480:function(e,t,n){"use strict";var r=n(2265),i=n(73834),o=n(58945);n(29583),n(90889);var a=r&&r.__esModule?r:{default:r};t.P=function(e){let{children:t,defaultTranslationValues:n,formats:s,getMessageFallback:l,locale:c,messages:u,now:h,onError:d,timeZone:p}=e,m=r.useMemo(()=>i.createFormatters(),[c]),f=r.useMemo(()=>({...i.initializeConfig({locale:c,defaultTranslationValues:n,formats:s,getMessageFallback:l,messages:u,now:h,onError:d,timeZone:p}),formatters:m}),[n,s,m,l,c,u,h,d,p]);return a.default.createElement(o.IntlContext.Provider,{value:f},t)}},73834:function(e,t,n){"use strict";var r,i=n(29583),o=(r=n(90889))&&r.__esModule?r:{default:r};function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(".")}function s(e){return a(e.namespace,e.key)}function l(e){console.error(e)}function c(e,t){return i.memoize(e,{cache:{create:()=>({get:e=>t[e],set(e,n){t[e]=n}})},strategy:i.strategies.variadic})}function u(e,t){return c(function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new e(...n)},t)}t.createFormatters=function(){let e=u(Intl.DateTimeFormat,{}),t=u(Intl.NumberFormat,{}),n=u(Intl.PluralRules,{}),r=u(Intl.RelativeTimeFormat,{}),i=u(Intl.ListFormat,{}),a=u(Intl.DisplayNames,{}),s=c(function(){return new o.default(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],{formatters:{getNumberFormat:t,getDateTimeFormat:e,getPluralRules:n},...arguments.length<=3?void 0:arguments[3]})},{});return{getDateTimeFormat:e,getNumberFormat:t,getPluralRules:n,getMessageFormat:s,getRelativeTimeFormat:r,getListFormat:i,getDisplayNames:a}},t.defaultGetMessageFallback=s,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||s}},t.joinPath=a},91802:function(){},87479:function(){},11826:function(){},74270:function(){},5195:function(e,t,n){"use strict";n.d(t,{D:function(){return L},P:function(){return U},U:function(){return M},u:function(){return w}});var r=n(57437),i=n(44839),o=n(2265),a=n(23644),s=n(93381),l=n(54887);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,s.g)("click-outside","sc"),d=Object.freeze({overlay:`${h}__overlay`,open:`${h}--open`,close:`${h}--close`}),p=({onClose:e,onToucheMove:t,isOpen:n,delay:a=c})=>{let s=(0,o.useRef)(null),l=(0,o.useCallback)(()=>{e&&(s.current=setTimeout(()=>{e()},a))},[a,e]),u=(0,o.useCallback)(e=>{"Escape"===e.key&&l()},[l]);return(0,o.useEffect)(()=>(n&&window.addEventListener("keydown",u),()=>{s.current&&clearTimeout(s.current),window.removeEventListener("keydown",u)}),[n,u]),(0,r.jsx)("div",{className:(0,i.Z)(d.overlay,{[d.open]:n,[d.close]:!n}),onTouchStart:t,onClick:l})},m=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},f=e=>{e.style.top||(window.prevScrollPosition=window.scrollY)},g=(e,t,n)=>{t.style.setProperty("overflow-y","scroll"),e.classList.toggle("scroll-disable-windows",!0),e.style.setProperty("width",`calc(100vw - ${n}px)`),e.style.setProperty("top",`-${window.prevScrollPosition}px`)},v=e=>{e.style.setProperty("overflow","hidden"),e.style.setProperty("height","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)},y=()=>document.querySelectorAll("[data-portal]").length>1,w=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,a=window.innerWidth-o.clientWidth,s=a>0;if(e&&s)f(i),g(i,o,a),m(r,!0);else if(e)v(i),m(r,!0);else{let e=!y();e&&_(i),e&&b(),m(r,!1)}return()=>{let e=!y();e&&_(i),e&&b()}},[e]),t},x=(0,s.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,s.g)("drawer-content","sc"),C=Object.freeze({container:`${N}__container`,open:`${N}--open`,close:`${N}--close`,header:`${N}__header`,rowHeader:`${N}__header--row`,title:`${N}__title`,center:`${N}__title--center`,left:`${N}__title--left`,right:`${N}__title--right`,controlContainer:`${N}__control-container`,content:`${N}__content`,footer:`${N}__footer`}),j=({onClose:e,onContentClick:t,children:n,title:s,rowTitle:l,titleAlign:c,isCloseable:u,footer:h,closeButton:d,isOpen:p,contentClassName:m,footerClassName:f,contentStyle:g,width:v})=>{let _=(0,o.useRef)(null),b=(0,o.useRef)(null),[y,w]=(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&&w(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",r,!1),()=>{null==n||n.removeEventListener("scroll",r,!1)}},[]);let x=g||v?{width:v,...g||{}}:void 0;return(0,r.jsxs)("div",{ref:_,style:x,className:(0,i.Z)(C.container,{[C.open]:p,[C.close]:!p},m),children:[s||u?(0,r.jsxs)("div",{className:(0,i.Z)(C.header,{[C.rowHeader]:l}),children:[u?d?"function"==typeof d?d():d:(0,r.jsx)("button",{type:"button",className:C.controlContainer,onClick:e,children:(0,r.jsx)(a.IconFdsCloseO,{size:24})}):null,s?(0,r.jsx)("h3",{className:(0,i.Z)(C.title,{[C[c]]:!0}),children:s}):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:y})]})},A=(0,s.g)("drawer-layout","sc"),S=Object.freeze({window:`${A}__window`}),k=({onClose:e,isOpen:t,children:n,withDisabledScroll:a,className:s,...l})=>{let c=(0,o.useCallback)(e=>e.stopPropagation(),[]);return w(t&&a),(0,r.jsxs)("div",{"data-portal":!0,className:(0,i.Z)(S.window,s),children:[(0,r.jsx)(p,{onClose:e,isOpen:t,delay:0}),(0,r.jsx)(j,{onContentClick:c,onClose:e,isOpen:t,...l,children:n})]})},L=({isOpen:e=!1,children:t,titleAlign:n="center",isCloseable:i=!0,withDisabledScroll:o=!0,...a})=>{let{mounted:s}=u({opened:e});return s?(0,r.jsx)(k,{titleAlign:n,isCloseable:i,isOpen:e,withDisabledScroll:o,...a,children:t}):null};L.displayName="Drawer";let I=(0,s.g)("mobile-modal-footer","sc"),O=Object.freeze({footer:`${I}__footer`,footerWithoutShadow:`${I}__footer--without-shadow`}),B=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,r.jsx)("div",{className:(0,i.Z)(O.footer,t&&O.footerWithoutShadow,n),children:"function"==typeof e?e():e}),H=(0,s.g)("mobile-popup","sc"),P=Object.freeze({mobilePopup:`${H}`,mobilePopupOpen:`${H}--open`,content:`${H}__content`,contentFull:`${H}__content--full`,contentTransition:`${H}__content--transition`,contentTransitionOpen:`${H}__content--transition-open`,contentLine:`${H}__content-line`,contentContainer:`${H}__content-container`,smallContentContainer:`${H}__content-container--small`,min:`${H}__content-container--min`,title:`${H}__title`,closeContainer:`${H}__close-container`,closeButton:`${H}__close-button`}),R=({children:e,footer:t,isOpen:n,isSmallPopup:s,onClose:l,hasCloseButton:c=!0,full:u,touchDistance:h=100,withDisabledScroll:d=!0,contentClassName:m,className:f,title:g,closeButton:v,footerClassName:_})=>{let[b,y]=(0,o.useState)(!1),[x,E]=(0,o.useState)(!1),[T,N]=(0,o.useState)(!0),[C,j]=(0,o.useState)("120%"),A=(0,o.useRef)(null),S=(0,o.useRef)(0),k=(0,o.useRef)(!1),L=e=>{var t,n,r;let i=null==(t=A.current)?void 0:t.offsetTop,o=null==(n=A.current)?void 0:n.offsetHeight;if(k.current=!0,N(!1),i&&o){let t=(null==(r=null==e?void 0:e.touches[0])?void 0:r.clientY)-i,n=0;t>=0&&t<=o+30&&(n=t),t>o+30&&(n=o+30),j(`${n}px`),S.current=n}},I=()=>{k.current&&(S.current>h&&l?null==l||l():j("0"),N(!0),k.current=!1),window.removeEventListener("touchmove",L),window.removeEventListener("touchend",I)};return(0,o.useEffect)(()=>{n&&setTimeout(()=>{y(!0),E(!0),j("0")},100),!n&&x&&(j("120%"),y(!1),E(!1))},[x,n]),w(n&&d),(0,r.jsxs)("div",{"data-portal":!0,className:(0,i.Z)(P.mobilePopup,x&&P.mobilePopupOpen,f),children:[(0,r.jsx)(p,{onClose:()=>{n&&(null==l||l())},onToucheMove:()=>{n&&(y(!1),window.addEventListener("touchmove",L),window.addEventListener("touchend",I))},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:A,style:{transform:`translateY(${C})`},children:[(0,r.jsx)("div",{className:P.contentLine}),(0,r.jsxs)("div",{className:(0,i.Z)(P.contentContainer,s&&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)(a.IconFdsCloseO,{size:24})}):null}):null,e]}),t&&(0,r.jsx)(B,{footerClassName:_,isSmallPopup:s,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}},93381:function(e,t,n){"use strict";function r(e,t){return`finkit-widgets-${t}-${e}`}n.d(t,{g:function(){return r}})},81598:function(e,t,n){"use strict";let r;n.d(t,{D:function(){return s},h:function(){return c}});var i=n(72918),o=n(77707);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,o.AB)(e)}};var s=((r=s||{}).icon="icon",r.chip="chip",r.accordion="accordion",r.button="button",r.checkbox="checkbox",r.radio="radio",r.select="select",r.toggle="toggle",r.tooltip="tooltip",r.link="link",r.banner="banner",r.tag="tag",r.date="date",r.field="field",r.offer="offer",r.tab="tab",r.submitButton="submitButton",r.popup="popup",r.block="block",r);let l={icon:"click_icon_",chip:"click_chip_",accordion:"show_acc_",button:"click_button_",checkbox:"click_check_",radio:"click_radio_",select:"click_sel_",toggle:"click_togg_",tooltip:"click_tip_",link:"click_link_",banner:"click_bnr_",tag:"click_tag_",date:"input_date_",field:"input_field_",offer:"click_offer_",tab:"click_tab_",submitButton:"form_button_",popup:"show_pop_up_",block:"click_block_"},c=({eventCategory:e,eventActionType:t,eventActionText:n="",eventLabel:r})=>{let o={event:"data-event",eventCategory:e,eventAction:l[t]+(0,i.t)(n)};void 0!==r&&(o.eventLabel=(0,i.t)("string"==typeof r?r:r.toString())),a(o)}},72918:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});let r={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},i=e=>e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();return t in r?r[t]:e}).replaceAll(/[ \u00A0]/g,"_")},46079:function(e,t,n){"use strict";n.d(t,{CookiesPlate:function(){return h}});var r=n(57437),i=n(23644),o=n(44839),a=n(2265),s=n(93381);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,s.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:s="https://assets.finuslugi.ru/mp-assets/user-agreement.pdf",children:c,closeIcon:h,onMount:d,onLinkClick:p,onClose:m,mountAfterScroll:f=!0}=e,[g,v]=(0,a.useState)(!1),[_,b]=(0,a.useState)(!1),[y,w]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),l.getItem("Allow-Cookie")||(w(!0),setTimeout(()=>{v(!0),null==d||d()},n))};return f?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let x=(0,a.useCallback)(()=>{l.setItem("Allow-Cookie","1"),b(!0),null==m||m(),setTimeout(()=>w(!1),1e3)},[m]);return y?(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:s,target:"_blank",rel:"noreferrer",onClick:p,children:"cookie"})," ","для лучшей работы сайта"]}),(0,r.jsx)("button",{className:u.button,onClick:x,children:h||(0,r.jsx)(i.IconFdsCloseO,{})})]})})}):(0,r.jsx)(r.Fragment,{})}},97018:function(e,t,n){"use strict";n.d(t,{C:function(){return w}});var r=n(57437),i=n(9938),o=n(94702),a=n(44839),s=n(2265),l=n(72918),c=n(23644),u=n(93381);let h=(0,u.g)("check-all","sc"),d=Object.freeze({wrapper:`${h}__wrapper`,link:`${h}__link`,icon:`${h}__icon`,iconGray:`${h}__icon--gray`}),p=({children:e,className:t,linkClassName:n,iconGrayBackground:i,Link:s,event:l,href:u,dataLayerPush:h})=>{let p=s??o.rU;return(0,r.jsx)("div",{className:(0,a.Z)(d.wrapper,t),onClick:()=>{l&&h(l)},children:(0,r.jsxs)(p,{className:(0,a.Z)(d.link,n),href:u,children:[e,(0,r.jsx)("span",{className:(0,a.Z)(d.icon,{[d.iconGray]:i}),children:(0,r.jsx)(c.IconFdsArrowUpRightSmallO,{size:24})})]})})},m=(0,u.g)("faq-block","sc"),f=Object.freeze({faqBlock:m,titleWrapper:`${m}__title-wrapper`,title:`${m}__title`,accordionWrapper:`${m}__accordion-wrapper`,accordionItems:`${m}__accordion-items`,accordion:`${m}__accordion`,accordionItem:`${m}__accordion-item`,accordionItemContent:`${m}__accordion-item-content`,accordionActiveItemContent:`${m}__accordion-item-content--active`,accordionItemText:`${m}__accordion-item-text`,states:{primary:`${m}--primary`,secondary:`${m}--secondary`}}),g=(0,u.g)("faq-content-block","sc"),v=Object.freeze({contentBlocks:`${g}__content-blocks`,blockLink:`${g}__block-link`,keynoteWrapper:`${g}__keynote-wrapper`,keynote:`${g}__keynote`,annotation:`${g}__annotation`,contentTableWrapper:`${g}__content-table-wrapper`}),_=e=>{e.data.forEach((t,n)=>{"header"===t.type&&(e.headerBlocksCount++,3===e.headerBlocksCount&&("banner"===e.data[n-1].type&&(e.banner=e.data.splice(n-1,1)),"banner"===e.data[n+1].type&&(e.banner=e.data.splice(n+1,1))),e.banner&&4===e.headerBlocksCount&&e.data.splice(n,0,e.banner[0]))})},b=({className:e,data:t})=>{if(!Array.isArray(t))return null;let n=(()=>{let e=[],n=1,i={data:t,headerBlocksCount:0,banner:[]};_(i),_(i);let o={},a=e=>{var t,n,r,i;let a=(null==(t=e.data)?void 0:t.text)??(null==(n=e.data)?void 0:n.url)??(null==(r=e.data)?void 0:r.html)??(null!=(i=e.data)&&i.year?String(e.data.year):"");return o[e.type]=(o[e.type]??0)+1,`${e.type}-${String(a).slice(0,80)}-${o[e.type]}`};return t.forEach(t=>{let i=a(t);switch(t.type){case"header":e.push((0,r.jsx)("h2",{id:`content_header_${n}`,role:"header",children:t.data.text||""},i)),n++;break;case"sub_header":e.push((0,r.jsx)("h3",{role:"sub-header",children:t.data.text||""},i));break;case"paragraph":e.push((0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.text||""},role:"paragraph"},i));break;case"link":e.push((0,r.jsx)("div",{className:v.blockLink,children:(0,r.jsx)("a",{target:"_blank",href:t.data.url||"",role:"link",rel:"noreferrer",children:t.data.text||""})},i));break;case"dossier":e.push((0,r.jsxs)("div",{children:[(0,r.jsx)("span",{role:"dossier-year",children:t.data.year||""}),(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.text||""},role:"dossier-text"})]},i));break;case"html":e.push((0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.html||""},role:"html"},i));break;case"annotation":e.push((0,r.jsx)("div",{className:v.annotation,dangerouslySetInnerHTML:{__html:t.data.text||""},role:"annotation"},i));break;case"company-annotation":e.push((0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.text||""},role:"company-annotation"},i));break;case"keynote":e.push((0,r.jsx)("div",{className:v.keynoteWrapper,children:(0,r.jsx)("p",{className:v.keynote,dangerouslySetInnerHTML:{__html:t.data.text||""},role:"keynote"})},i));break;case"image":e.push((0,r.jsx)("img",{src:t.data.url||"",alt:"image"},i))}}),e})();return(0,r.jsx)("div",{className:(0,a.Z)(v.contentBlocks,e),role:"blocks",children:n})},y=({question:e,eventCategory:t,dataLayerPush:n,...i})=>(0,r.jsx)(o.Qd,{...i,title:e.question,outline:!1,className:(0,a.Z)(f.accordionItem),children:(0,r.jsx)("div",{className:(0,a.Z)(f.accordionItemContent,{[f.accordionActiveItemContent]:i.isActive}),onClick:e=>{e.target instanceof HTMLAnchorElement&&n({event:"data-event",eventCategory:t,eventAction:"click_link",eventLabel:e.target.href})},children:"string"==typeof e.answer?(0,r.jsx)(b,{data:[{type:"html",data:{html:e.answer}}]}):e.answer})}),w=({sectionTitle:e="Частые вопросы",innerTitle:t,questions:n=[],href:c,checkAllText:u,Link:h,className:d,eventCategory:m="cb-faq",multiple:g=!1,variant:v="secondary",dataLayerPush:_})=>{let b=g?n.map(e=>e.question):[],[w,x]=(0,s.useState)(b);return(0,r.jsx)("section",{className:(0,a.Z)(f.faqBlock,f.states[v],d),children:(0,r.jsxs)(i.W2,{children:[!t&&(0,r.jsx)("div",{className:f.titleWrapper,children:(0,r.jsx)(i.X6,{as:"h2",type:"display",className:f.title,children:e})}),(0,r.jsxs)("div",{className:f.accordionWrapper,children:[t&&(0,r.jsx)(i.X6,{as:"h3",type:"h1",className:(0,a.Z)(f.title,`${f.title}--inner`),children:t}),(0,r.jsx)("div",{className:f.accordionItems,children:(0,r.jsx)(o.UQ,{className:f.accordion,activeIndex:w,onTabToggle:e=>{let t=(null==e?void 0:e.length)>(null==w?void 0:w.length),n=e.filter(e=>!w.includes(e))[0]||w.filter(t=>!e.includes(t))[0];x(e),_({event:"data-event",eventCategory:m,eventAction:`click_togg_${t?"on":"off"}`,eventLabel:(0,l.t)(String(n))})},multiple:g,children:n.map(e=>(0,r.jsx)(y,{id:`${e.question}-${e.answer}`,question:e,dataLayerPush:_,eventCategory:m},`${e.question}-${e.answer}`))})}),c&&u&&(0,r.jsx)(p,{href:c,event:{event:"data-event",eventCategory:m,eventAction:"сlick_link_answer-link",eventLabel:c},dataLayerPush:_,...null!=h?{Link:h}:{},iconGrayBackground:!0,children:u||"Читать все вопросы"})]})]})})}},28693:function(e,t,n){"use strict";let r;n.d(t,{$:function(){return q}});var i=n(57437),o=n(9938),a=n(44839),s=n(7467),l=n(93381),c=n(94702),u=n(81598),h=n(23644),d=n(2265),p=n(5195);let m=(0,l.g)("footer-contacts-block","sc"),f=Object.freeze({contactsWrapper:"".concat(m,"__contacts-wrapper"),gray:"".concat(m,"__gray"),phones:"".concat(m,"__phones"),contactsButtons:"".concat(m,"__contacts-buttons"),vkIcon:"".concat(m,"__vk-icon"),tgIcon:"".concat(m,"__tg-icon"),dzenIcon:"".concat(m,"__dzen-icon"),maxIcon:"".concat(m,"__max-icon"),link:"".concat(m,"__link")}),g=(0,l.g)("footer","sc"),v=Object.freeze({wrapper:"".concat(g,"__wrapper"),section:"".concat(g,"__section"),container:"".concat(g,"__container"),top:"".concat(g,"__top"),main:"".concat(g,"__main"),links:"".concat(g,"__links"),disclaimer:"".concat(g,"__disclaimer"),bottom:"".concat(g,"__bottom"),bottomLinks:"".concat(g,"__bottom-links"),bottomDisclaimer:"".concat(g,"__bottom-disclaimer"),compact:"".concat(g,"__wrapper--compact"),white:"".concat(g,"__wrapper--white")}),_="finkit-widgets-sc-footer",b=[{title:"8 (800) 505-32-32",url:"tel:88005053232"},{title:"+7 (495) 145-32-32",url:"tel:+74951453232"}],y=[...b,{title:"Онлайн чат",url:void 0}],w=[{type:"vk",className:f.vkIcon,iconName:"vk"},{type:"telegramChannel",className:f.tgIcon,iconName:"telegram"},{type:"dzen",className:f.dzenIcon,iconName:"dzen"},{type:"max",className:f.maxIcon,iconName:"max"}],x=(0,i.jsxs)("p",{children:["На сайте finuslugi.ru предоставляются услуги оператора финансовой платформы ПАО Московская Биржа, а также услуги ООО \xabМБ Маркетплейс\xbb, организации, не являющейся оператором финансовой платформы в соответствии с Федеральным законом от 20.07.2020 №211-ФЗ \xabО совершении финансовых сделок с использованием финансовой платформы\xbb. Услуги оператора финансовой платформы ПАО Московская Биржа обозначены пометкой \xabОткрытие онлайн на Финуслугах\xbb. Иная информация на сайте www.finuslugi.ru считается размещенной ООО \xabМБ Маркетплейс\xbb, если иное явно не следует из существа размещаемой информации. ООО \xabМБ Маркетплейс\xbb входит в Группу \xabМосковская Биржа\xbb.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),"Группа \xabМосковская Биржа\xbb - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),E=e=>{let{onClick:t,eventActionText:n,eventLabel:r,...o}=e;return(0,i.jsx)(c.zx,{onClick:e=>{null==t||t(e),(0,u.h)({eventCategory:_,eventActionType:u.D.button,eventActionText:n||"",eventLabel:r})},...o})},T=e=>{let{onClick:t,eventActionType:n,eventActionText:r,eventLabel:o,chat:a,...s}=e;return(0,i.jsx)(c.rU,{onClick:e=>{var i,s,l;null==t||t(e),a&&(null==e||e.preventDefault(),null==(l=null==(s=null==(i=null==window?void 0:window.supportWidget)?void 0:i.craftTalk)?void 0:s.open)||l.call(s)),(0,u.h)({eventCategory:_,eventActionType:n||u.D.link,eventActionText:r||"",eventLabel:o})},...s})},N=e=>{let{minioUrl:t,blogs:n}=e;return(0,i.jsxs)("div",{className:f.contactsWrapper,children:[(0,i.jsx)(o.xv,{className:f.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,i.jsx)("div",{className:f.phones,children:y.map(e=>{let{title:t,url:n}=e;return(0,i.jsx)(T,{href:n,eventActionText:t,chat:!n,children:t},t)})}),(0,i.jsx)(o.xv,{className:f.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,i.jsx)("div",{className:f.contactsButtons,children:w.map(e=>{let{type:r,className:o,iconName:a}=e;return(0,i.jsx)(E,{as:"a",href:null==n?void 0:n[r],target:"_blank",className:o,iconRight:(0,i.jsx)("img",{width:24,height:24,src:(0,s.xn)(t,"/widgets/footer/".concat(a,".svg")),alt:r,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:r,eventLabel:null==n?void 0:n[r]},r)})}),(0,i.jsx)(o.xv,{className:f.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,i.jsx)("div",{className:f.contactsButtons,children:(0,i.jsxs)(T,{href:null==n?void 0:n.investTg,target:"_blank",className:f.link,eventActionText:"telegram",eventLabel:null==n?void 0:n.investTg,children:[(0,i.jsx)(E,{className:f.tgIcon,iconRight:(0,i.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}),"Финуслуги Инвест"]})})]})},C=(0,l.g)("footer-disclaimer","sc"),j=Object.freeze({disclaimer:"".concat(C)}),A=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,u.h)({eventCategory:_,eventActionType:u.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,i.jsx)("div",{className:(0,a.Z)(e.className,j.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,i.jsx)("div",{className:(0,a.Z)(e.className,j.disclaimer),onClick:t,children:e.children})},S=()=>{let e=new URL(window.location.href),t=new URLSearchParams;return e.searchParams.forEach((e,n)=>{/^utm_/i.test(n)&&t.set(n,e)}),t},k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",[t,n]=(0,d.useState)(e);return(0,d.useEffect)(()=>{let t=S();if(!t||0===t.size)return;let[r,i=""]=e.split("?"),o=new URLSearchParams(i);t.forEach((e,t)=>{o.has(t)||o.set(t,e)});let a=o.toString();n(a?"".concat(r,"?").concat(a):r)},[e]),t},L=(0,l.g)("footer-modal-body","sc"),I=Object.freeze({wrapper:"".concat(L,"__wrapper"),title:"".concat(L,"__title"),item:"".concat(L,"__item"),label:"".concat(L,"__label"),button:"".concat(L,"__button"),description:"".concat(L,"__description")}),O=e=>{let{directions:t}=e;return(0,i.jsxs)("div",{className:I.wrapper,children:[(0,i.jsx)("div",{className:I.title,children:"Направления"}),t.map(e=>(0,i.jsxs)(T,{className:I.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:"".concat(e.name,"_").concat(e.url),children:[(0,i.jsxs)("div",{className:I.label,children:[(0,i.jsx)("span",{children:e.name}),(0,i.jsx)(E,{className:I.button,iconRight:(0,i.jsx)(h.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,i.jsx)("p",{className:I.description,children:e.description})]},e.url))]})},B=(0,l.g)("footer-popup","sc"),H=Object.freeze({wrapper:"".concat(B,"__wrapper"),button:"".concat(B,"__button"),icon:"".concat(B,"__icon"),buttonWrapper:"".concat(B,"__button-wrapper")}),P=e=>{let{directions:t}=e,n=(0,c._m)("l"),[r,o]=(0,d.useState)(!1),a=()=>{o(!1)};return(0,i.jsxs)("div",{className:H.wrapper,children:[(0,i.jsx)("div",{className:H.buttonWrapper,children:(0,i.jsx)(E,{className:H.button,appearance:"ghost",variant:"white",onClick:()=>{o(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,i.jsx)("div",{className:H.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,i.jsx)("div",{},e))})})}),(0,i.jsxs)(p.P,{children:[!n&&(0,i.jsx)(p.U,{isOpen:r,onClose:a,full:!0,children:(0,i.jsx)(O,{directions:t})}),n&&(0,i.jsx)(p.D,{isOpen:r,onClose:a,width:"804px",children:(0,i.jsx)(O,{directions:t})})]})]})},R=(0,l.g)("footer-left-column","sc"),M=Object.freeze({leftColumn:"".concat(R,"__left-column"),logoWrapper:"".concat(R,"__logo-wrapper"),banner:"".concat(R,"__banner"),mobAppLink:"".concat(R,"__mob-app-link")}),U=e=>{let{showcaseUrl:t,minioUrl:n,directions:r,mobAppUrl:a}=e,l=k(a);return(0,i.jsxs)("div",{className:M.leftColumn,children:[(0,i.jsx)(T,{className:M.logoWrapper,href:t,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(t),children:(0,i.jsx)("img",{src:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,i.jsx)(P,{directions:null!=r?r:[]}),(0,i.jsx)(T,{href:l,target:"_blank",eventActionType:u.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:l,className:M.mobAppLink,children:(0,i.jsxs)(o.Zb,{className:M.banner,children:[(0,i.jsxs)(o.xv,{weight:"medium",children:["Управляйте финансами",(0,i.jsx)("br",{}),"через приложение Финуслуг"]}),(0,i.jsx)(E,{iconRight:(0,i.jsx)(h.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,i.jsx)("img",{src:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},D=(0,l.g)("footer-logo","sc"),F=Object.freeze({wrapper:"".concat(D,"__wrapper"),link:"".concat(D,"__link"),fromMoex:"".concat(D,"__from-moex"),logo:"".concat(D,"__logo"),white:"".concat(D,"__wrapper--white")}),G=e=>{let{showcaseUrl:t,minioUrl:n,isWhite:r}=e;return(0,i.jsx)("div",{className:(0,a.Z)(F.wrapper,{[F.white]:r}),children:(0,i.jsxs)(T,{className:F.link,href:t,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(t),children:[(0,i.jsx)("img",{className:F.logo,src:"".concat(n,"/images/logo-brandmark-common-finuslugi.svg")}),(0,i.jsx)("img",{className:F.fromMoex,src:"".concat(n,"/images/fromMoex.svg")})]})})};var $=((r=$||{}).BLACK="black",r.GRAY="gray",r);let z=(0,l.g)("footer-warning","sc"),W=Object.freeze({reservedSpace:"".concat(z,"__reserved-space"),wrapper:"".concat(z,"__wrapper"),wrapperGray:"".concat(z,"__wrapper--gray"),fixed:"".concat(z,"__wrapper--fixed"),container:"".concat(z,"__container"),text:"".concat(z,"__text"),invisibleText:"".concat(z,"__text--invisible")}),V=e=>{let{text:t,variant:n,fixed:r,isPlaceholder:s}=e;return(0,i.jsx)("div",{className:(0,a.Z)(W.wrapper,{[W.wrapperGray]:"gray"===n,[W.fixed]:r&&!s}),children:(0,i.jsx)(o.W2,{className:W.container,children:(0,i.jsx)("div",{className:(0,a.Z)(W.text,{[W.invisibleText]:s}),dangerouslySetInnerHTML:{__html:t}})})})},Z=e=>{var t,n;let{warning:r}=e,o="string"==typeof r?{text:r}:r,a={text:o.text,fixed:null===(t=o.fixed)||void 0===t||t,variant:null!==(n=o.variant)&&void 0!==n?n:$.BLACK};return(0,i.jsxs)("div",{className:W.reservedSpace,children:[(0,i.jsx)(V,{...a,isPlaceholder:a.fixed}),a.fixed&&(0,i.jsx)(V,{...a,fixed:!0})]})},q=e=>{var t,n;let{data:r,showcaseUrl:s="https://finuslugi.ru",minioUrl:l="https://assets.finuslugi.ru/mp-assets",customDisclaimer:c,variant:u="default",className:h}=e,d=!c&&null!=r&&r.disclaimer?r.disclaimer:void 0,p=u.includes("compact"),m=u.includes("white"),f=null==(t=null==r?void 0:r.bottom)?void 0:t.concat(p?b:[]),g=r&&"warning"in r?r.warning:void 0;return r?(0,i.jsx)("footer",{className:(0,a.Z)(v.wrapper,h,{[v.compact]:p,[v.white]:m}),children:(0,i.jsxs)("section",{className:v.section,children:[(0,i.jsxs)(o.W2,{className:v.container,children:[!p&&(0,i.jsx)(U,{showcaseUrl:s,minioUrl:l,directions:null==r?void 0:r.directions,mobAppUrl:null==r?void 0:r.mobAppUrl}),(0,i.jsx)("div",{className:v.wrapper,children:(0,i.jsxs)("div",{className:v.top,children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:v.main,children:[!p&&(0,i.jsx)("div",{className:v.links,children:null==(n=null==r?void 0:r.top)?void 0:n.map(e=>(0,i.jsx)(T,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),p&&(0,i.jsx)(G,{showcaseUrl:s,minioUrl:l,isWhite:m}),(0,i.jsx)(A,{className:v.disclaimer,disclaimer:d,children:c||x})]}),(0,i.jsxs)("div",{className:v.bottom,children:[(0,i.jsx)("div",{className:v.bottomLinks,children:null==f?void 0:f.map(e=>(0,i.jsx)(T,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,i.jsx)(A,{className:v.bottomDisclaimer,disclaimer:null==r?void 0:r.bottomDisclaimer})]})]}),!p&&(0,i.jsx)(N,{minioUrl:l,blogs:null==r?void 0:r.blogs})]})})]}),p&&!!g&&(0,i.jsx)(Z,{warning:g})]})}):null}},14497:function(e,t,n){"use strict";n.d(t,{CitySelectProvider:function(){return z},h:function(){return eP}});var r=n(57437),i=n(2265),o=n(81598),a=n(23644),s=n(9938),l=n(94702),c=n(44839),u=n(7467),h=n(5195),d=n(93381);let p=(0,d.g)("header","sc"),m=Object.freeze({header:`${p}`,fixed:`${p}__fixed`,hidden:`${p}__fixed--hidden`,transparent:`${p}--transparent`,navigationOpen:`${p}__navigation-open`,container:`${p}__container`,leftRow:`${p}__left-row`,logo:`${p}__logo`,menuItems:`${p}__menu-items`,menuItemActive:`${p}__menu-item-active`,tabletMenuButton:`${p}__tablet-menu-button`,buttonGroup:`${p}__button-group`,chips:`${p}__chips`,menuButton:`${p}__menu-button`,moreButtons:`${p}__more-buttons`,auth:`${p}__auth`,whiteIcons:`${p}__white-icons`,close:`${p}__close`,removed:`${p}__removed`,overlay:`${p}__overlay`,overlayOpening:`${p}__overlay--opening`,overlayClosing:`${p}__overlay--closing`}),f="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,a=0,s=()=>window.innerWidth<768,l=s(),c=()=>window.scrollY||document.documentElement.scrollTop,u=()=>{let e=document.querySelector(":root");e&&(a=parseFloat(window.getComputedStyle(e).getPropertyValue("--fixed-header-height")),o=c())},h=()=>{let e=s();e!==l&&(l=e,a=0)},d=function(){let s=c(),l=document.getElementById("headerMobileBanner"),h=null==l?void 0:l.getAttribute("data-opening");if("true"===h)return;a||u();let d=s<a,p=s<((null==r?void 0:r.clientHeight)||0);if(n&&p||d){i=!1,e(!1),t(!0);return}e(i=s>o),i&&setTimeout(()=>t(!1),50);let m=i?"0px":"false"===h?`${a}px`:"";document.documentElement.style.setProperty("--new-header-height-desktop",m),document.documentElement.style.setProperty("--new-header-height-mobile",m),o=s<=0?0:s};return window.addEventListener("scroll",d),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",d),window.removeEventListener("resize",h)}},y=()=>{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},w=()=>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(w())return;let e=y();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,d.g)("navigation-chips","sc"),j=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`}),A=(0,d.g)("navigation-content","sc"),S=Object.freeze({contentWrapper:`${A}__content-wrapper`,content:`${A}__content`,contentOpen:`${A}__content--open`,contentHeader:`${A}__content-header`,contentTitle:`${A}__content-title`,contentTitleUrl:`${A}__content-title--url`,contentTitleLink:`${A}__content-title--link`,contentTitleNew:`${A}__content-title--new`,new:`${A}__new`,vip:`${A}__vip`,arrowIcon:`${A}__arrow-icon`,links:`${A}__links`,linksColumns:`${A}__links--columns`,linksTitleless:`${A}__links--titleless`,removed:`${A}__removed`,hidden:`${A}__content--hidden`}),k=({chip:e,hidden:t,onClick:n,refCallback:i,activeChipId:s})=>{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:j.label,children:e.title}),e.arrow&&(0,r.jsx)(a.IconFdsArrowUpRightSmallO,{size:24})]}),d=(0,c.Z)(j.chip,{[j.hidden]:t,[S.new]:!!e.new,[S.vip]:!!e.vip,[j.active]:e.url===s});return l?(0,r.jsx)("button",{type:"button",className:d,onClick:u,ref:i,children:h}):(0,r.jsx)("a",{href:e.url,className:d,onClick:u,ref:i,children:h})},L=({items:e=[],maxNumberOfLines:t,variant:n,className:s,activeChipId:l,onClick:u})=>{let h=(0,i.useRef)(null),d=(0,i.useRef)(null),p=(0,i.useRef)({}),[m,f]=(0,i.useState)(!1),[g,v]=(0,i.useState)(e.length),[_,b]=(0,i.useState)(!1);(0,i.useMemo)(()=>{let t=p.current;e.forEach(e=>{e.url in t||(t[e.url]=null)}),Object.keys(t).forEach(n=>{e.find(e=>String(e.url)===String(n))||delete t[n]})},[e]);let y=(0,i.useCallback)(()=>{let n=h.current;if(!n)return;let r=e=>e?e.getBoundingClientRect().width:0,i=r(n),o=Math.max(Number(t)||0,0),a=()=>{v(e.length),b(!1)};if(m||0===o||i<=0){a();return}let s=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),l=r(d.current),c=e.map(e=>r(p.current[e.url]));if(c.some(e=>0===e)){a();return}let u=1,f=0,g=0;for(let e of c){let t=u===o?l+s:0,n=0===f?e:f+s+e;if(n+t<=i-.5)f=n,g++;else{if(++u>o)break;f=e,g++}}b(g<e.length),v(g)},[m,e,t]);(0,i.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(y)});return t.observe(e),requestAnimationFrame(y),()=>{t.disconnect()}},[y]),(0,i.useEffect)(()=>{requestAnimationFrame(y)},[y]);let w=m||(t??0)<=0||!_;return(0,r.jsx)("div",{className:(0,c.Z)(s,j.wrapper,{[j.gray]:"gray"===n,[j.white]:"white"===n}),children:(0,r.jsxs)("div",{ref:h,className:j.container,children:[e.map((e,t)=>(0,r.jsx)(k,{chip:e,hidden:!w&&t>=g,activeChipId:l,onClick:u,refCallback:t=>{p.current[e.url]=t}},e.url)),!w&&_&&(0,r.jsxs)("button",{type:"button",ref:d,className:(0,c.Z)(j.chip,j.more),onClick:()=>{N(o.D.chip,"Еще"),f(!0)},children:[(0,r.jsx)(a.IconFdsDotsVerticalO,{size:20}),(0,r.jsx)("span",{className:j.label,children:"Еще"})]}),(w||!_)&&(0,r.jsxs)("button",{type:"button",ref:d,className:(0,c.Z)(j.chip,j.more,j.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,r.jsx)(a.IconFdsDotsVerticalO,{size:20}),(0,r.jsx)("span",{className:j.label,children:"Еще"})]})]})})},I=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},O=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=I("all_regions")||[];return window.allRegions=e,e},B=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]),[])},H=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=O(),U=B(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 $(){return(0,i.useContext)(G)}let z=e=>{let{children:t,showStartGeoPopup:n=!0,lastRegionsUpdateUnixTimestamp:a,dadataUrl:s="https://finuslugi.ru/backend/money/dadata"}=e,l=Number(I("lastRegionsUpdateUnixTimestamp")||0),c=Number(a||0)>l,[u,h]=(0,i.useState)(O()),[{startRegion:d,startTown:p},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),[y,w]=(0,i.useState)(D.popupVisible),x=(0,i.useRef)(""),E=(0,i.useMemo)(()=>B(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]),j=(0,i.useCallback)(e=>{w(e)},[w]),A=(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")?j(!0):C()},[n,g,j,C]),S=(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),j(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[j]),k=()=>{v({region:I("user_region"),town:I("user_town")});let e=async e=>{let{coords:{latitude:t,longitude:n}}=e,r="".concat(s,"?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)&&H().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:y,handleToggleModal:j,selectCity:S,handleButtonClick:A,startRegion:d,startTown:p},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,d.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")}),q=e=>{var t;let{groupedTowns:n,chips:s,query:c,setQuery:u,isDrawer:h}=e,d=$(),p=(0,i.useRef)(null),[m,f]=(0,i.useState)("10000px");(0,i.useEffect)(()=>{if(!h||!p.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),a=o.reduce((e,t,n)=>t<o[e]?n:e,0);0===a&&i[0].push(i[1].shift()),2===a&&i[2].unshift(i[1].pop()),1===a&&o[0]>o[2]&&i[1].unshift(i[0].pop()),1===a&&o[0]<o[2]&&i[1].push(i[2].shift());let s=Math.max(...i.map(e));return s>=r?r:t(i,s)};new ResizeObserver(()=>{var e;if(!(null!=(e=p.current)&&e.children))return;let n=Array.from(p.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(p.current)},[]);let g=e=>{if(R(o.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return d.selectCity();let t=d.regions.find(t=>t.id===Number(e.parentId))||null;d.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)(a.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)(a.IconFdsCloseCircleO,{size:24,onClick:()=>u("")}):(0,r.jsx)(a.IconFdsSearchO,{size:24})}),(0,r.jsx)(l.cL,{className:Z.chips,chips:s,value:(null==(t=d.town)?void 0:t.id)||0,onChipClick:e=>{g(d.towns.find(t=>t.id===e))}}),(0,r.jsx)("div",{className:Z.townsListWrapper,children:(0,r.jsx)("div",{ref:p,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))})})]})},X=[1095,1096,134,720,189,180],K=()=>{var e;let t=$(),n=(0,l._m)("l"),[a,s]=(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(a.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},[]),[a,t.towns.length]),d=(0,i.useMemo)(()=>[{id:0,label:"Вся Россия"},...X.map(e=>{let n=t.towns.find(t=>t.id===e);return{id:null==n?void 0:n.id,label:null==n?void 0:n.name}}).filter(e=>(null==e?void 0:e.id)!==void 0)],[t.towns.length]),p=()=>{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:p,full:!0,children:(0,r.jsx)(q,{groupedTowns:u,chips:d,query:a,setQuery:s})}),n&&(0,r.jsx)(h.D,{title:c,isOpen:t.popupVisible,onClose:p,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,r.jsx)(q,{groupedTowns:u,chips:d,query:a,setQuery:s,isDrawer:!0})})]})},Y={"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(Y,e)?Y[e]:Y["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),a=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,s)=>{if(o.current){s(Error("chat is already opened"));return}r?(r.openWidget(),t(!1),i()):(a(!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(),a(!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,a]=(0,i.useState)(!1),[s,l]=(0,i.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d}=et(),[p,m]=(0,i.useState)(null),[f,g]=(0,i.useState)(null),[v,_]=(0,i.useState)(!1),[y,w]=(0,i.useState)(!1),[x,E]=(0,i.useState)(!1),N=(0,i.useRef)(null),C=(0,h.u)(v),j=(0,i.useRef)(null),A=(0,i.useRef)(null),S=(0,i.useRef)(null),k=(0,i.useRef)(null),L=(0,i.useCallback)(()=>{C.current&&C.current.scrollTo({top:0})},[C]),I=(0,i.useCallback)(e=>{g(e),L()},[L]),O=(0,i.useCallback)(e=>{j.current&&clearTimeout(j.current),e&&w(!0),e||(j.current=setTimeout(()=>{w(!1),I(null)},300))},[I]),B=(0,i.useCallback)((e,t,n)=>{if(t&&I(t),!n&&e===p||!e){O(!v),_(!v);return}m(e),O(!0),_(!0)},[p,I,v,O]),H=(0,i.useCallback)(()=>{A.current&&clearTimeout(A.current),E(!0),A.current=setTimeout(()=>{E(!1)},650)},[]);return(0,i.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=b(a,l,e.isMainBannerPage);return T(),t},[]),(0,r.jsx)("div",{children:(0,r.jsx)(en.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:s,openedBlock:p,setOpenedBlock:B,openedSection:f,setOpenedSection:I,isNavigationOpen:v,isNavigationMounted:y,navMenuItemsRef:N,navigationRef:C,ignoreClicks:x,setIgnoreClicks:H,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d,fixedContainerRef:S,headerRef:k},children:e.children})})},eo=e=>{let{label:t,onClick:n,eventActionText:i,eventLabel:a,...s}=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:a||""})},...s})},ea=(0,d.g)("header-popup","sc"),es=Object.freeze({popup:"".concat(ea,"__popup"),popupHeader:"".concat(ea,"__popup-header"),popupClose:"".concat(ea,"__popup-close"),body:"".concat(ea,"__body")}),el=e=>{let{isOpen:t,onClose:n,children:i,title:o}=e,s=(0,l._m)("l");return(0,r.jsxs)(h.P,{children:[!s&&(0,r.jsx)(h.U,{title:o,isOpen:t,onClose:n,children:i}),s&&t&&(0,r.jsxs)("div",{className:es.popup,children:[(0,r.jsxs)("div",{className:es.popupHeader,children:[o,(0,r.jsx)(eo,{className:es.popupClose,iconLeft:(0,r.jsx)(a.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:n,eventActionText:"IconFdsCloseO"})]}),(0,r.jsx)("div",{className:es.body,children:i})]})]})},ec=(0,d.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=$(),[a,s]=(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((" "+a).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<a&&s(i),100===n&&(clearInterval(u.current),h())},t)})():(clearInterval(u.current),s(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:a})}),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:"Нет, изменить"})]})]})},ed=(0,d.g)("city-select","sc"),ep=Object.freeze({button:"".concat(ed,"__button"),minimal:"".concat(ed,"__minimal"),full:"".concat(ed,"__full")}),em=e=>{var t;let{initialTown:n}=e,o=$(),s=(null==(t=o.town)?void 0:t.name)||n||"Вся Россия",{setIsChatModalOpen:u,isChatModalOpen:h}=er(),{startPopupVisible:d,setStartPopupVisible:p,popupVisible:m}=o,f=(0,i.useRef)();(0,i.useEffect)(()=>{m&&(f.current="popup")},[m]),(0,i.useEffect)(()=>{h&&(f.current="chat")},[h]),(0,i.useEffect)(()=>{d&&(f.current="startPopup")},[d]),(0,i.useEffect)(()=>{f.current&&("chat"===f.current&&d?p(!1):["startPopup","popup"].includes(f.current)&&h&&u(!1))},[m,h,d,p,u]);let g={appearance:"ghost",size:"xs",onClick:()=>o.handleButtonClick(!1),iconLeft:(0,r.jsx)(a.IconFdsLocationO,{size:24})};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.zx,{...g,className:(0,c.Z)(ep.button,ep.full),label:s}),(0,r.jsx)(l.zx,{...g,className:(0,c.Z)(ep.button,ep.minimal),shape:"icon"}),(0,r.jsx)(K,{}),(0,r.jsx)(eh,{})]})},ef=e=>{let{onClick:t,eventActionType:n,eventActionText:i,eventLabel:a,...s}=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:a||""})},...s})},eg=(0,d.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",ey=()=>{let e=localStorage.getItem(eb);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},ew=()=>{localStorage.setItem(eb,new Date().toISOString())},ex=()=>{let e=ey();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},eE=e=>{let{minioUrl:t,className:n,mobileAppUrl:o}=e,{fixedContainerRef:h,headerRef:d}=er(),[p,m]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[v,b]=(0,i.useState)(!1),y=(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")))},[]),w=(0,i.useCallback)(()=>{let e=h.current;e&&(document.documentElement.style.removeProperty("--fixed-header-height"),document.documentElement.style.removeProperty("--new-header-height-desktop"),document.documentElement.style.removeProperty("--new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-desktop"),document.documentElement.style.removeProperty("--header-height"),e.style.transform="")},[]);return(0,i.useEffect)(()=>{let e=d.current;if(!e)return;let t=()=>{f&&m(!1),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;p&&(y(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?m(!0):b(!0));let t=()=>{if(!p)return null;y(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{w(),window.removeEventListener("resize",t)}},[p,y,w]),p?(0,r.jsx)("div",{id:"headerMobileBanner",role:"region","aria-label":"Мобильное приложение","data-opening":v,className:(0,c.Z)(ev.wrapper,n),children:(0,r.jsx)(s.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:()=>{ew(),w(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?m(!1):g(!0)},children:(0,r.jsx)(a.IconFdsCloseO,{size:"100%"})})]})})}):null},eT=(0,d.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)(s.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]})},ej=e=>{let{data:t,isMobile:n}=e,s=er();return(0,r.jsx)("div",{className:S.contentWrapper,children:t.map(e=>(0,r.jsx)(i.Fragment,{children:e.sections.map(e=>(0,r.jsxs)("div",{className:(0,c.Z)(S.content,{[S.hidden]:s.openedSection!==e.id,[S.contentOpen]:!!s.openedSection}),children:[(0,r.jsx)("div",{className:S.contentHeader,children:(0,r.jsx)("label",{children:e.title})}),e.content.map((t,i)=>{var s,l;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,r.jsx)("a",{className:(0,c.Z)(S.contentTitle,{[S.removed]:!t.title,[S.contentTitleUrl]:!!t.url,[S.contentTitleLink]:!!e.isSeeAllLinkAvailable,[S.contentTitleNew]:!!t.new}),href:e.isSeeAllLinkAvailable?t.url:void 0,children:(0,r.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,r.jsx)("div",{className:S.arrowIcon,children:(0,r.jsx)(a.IconFdsArrowUpRightSmallO,{})}),t.title]})})}),!(null!=(s=t.links)&&s.length)&&(0,r.jsx)(L,{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)(S.links,{[S.linksColumns]:!!t.columns,[S.linksTitleless]:!t.title}),children:t.links.map(e=>(0,r.jsxs)("a",{href:e.url,className:(0,c.Z)({[S.new]:!!e.new}),onClick:()=>N(o.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,r.jsx)("div",{className:S.arrowIcon,children:(0,r.jsx)(a.IconFdsArrowUpRightSmallO,{})}),(0,r.jsx)("span",{children:e.title})]},e.url))})]},"".concat(t.url,"_").concat(i))})]},e.id))},e.id))})},eA=(0,d.g)("navigation-section-icon","sc"),eS=Object.freeze({icon:"".concat(eA)}),ek=e=>{let{name:t,background:n}=e,o=(0,i.useMemo)(()=>t&&a[t]||null,[t]);return t&&o?(0,r.jsx)("div",{className:eS.icon,style:{background:n},children:(0,r.jsx)(o,{})}):null},eL=(0,d.g)("navigation","sc"),eI=Object.freeze({navigation:"".concat(eL),navigationOpening:"".concat(eL,"--opening"),navigationClosing:"".concat(eL,"--closing"),wrapper:"".concat(eL,"__wrapper"),container:"".concat(eL,"__container"),containerOpen:"".concat(eL,"__container--open"),sections:"".concat(eL,"__sections"),sectionsOpen:"".concat(eL,"__sections--open"),citySelectButton:"".concat(eL,"__city-select-button"),sectionsTitle:"".concat(eL,"__sections-title"),sectionsWrapper:"".concat(eL,"__sections-wrapper"),section:"".concat(eL,"__section"),sectionArrow:"".concat(eL,"__section-arrow"),sectionExtra:"".concat(eL,"__section--extra"),sectionActive:"".concat(eL,"__section--active"),sectionTitle:"".concat(eL,"__section-title"),chatWrapper:"".concat(eL,"__chat-wrapper"),chatHeader:"".concat(eL,"__chat-header"),backButton:"".concat(eL,"__back-button"),useful:"".concat(eL,"__useful"),usefulOpen:"".concat(eL,"__useful--open"),usefulTitle:"".concat(eL,"__useful-title"),usefulGrid:"".concat(eL,"__useful-grid"),removed:"".concat(eL,"__removed")}),eO=e=>{var t;let{data:n}=e,u=er(),h=$(),d=(0,l.aF)("m"),[p,m]=(0,i.useState)(!0);(0,i.useEffect)(()=>{m(d)},[d]);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),y=(0,i.useCallback)(()=>{p&&(_.current=!0,b.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),g()},window.history.pushState(null,"",window.location.href))},[g,p]),w=(0,i.useCallback)(()=>{_.current=!1,window.onpopstate=b.current,window.history.go(-1)},[]),x=(0,i.useRef)(null),E=(0,i.useCallback)(e=>{if(p||!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)},[p,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&&y(),!u.isNavigationOpen&&_.current&&w()},[u.isNavigationOpen]);let j=(e,t)=>()=>{N(o.D.button,t),u.setOpenedSection(e)},{start:A,clear:S}=W(),k=(e,t)=>()=>{p||A(j(e,t),150)},L=()=>{p||S()};return(0,r.jsx)("div",{ref:u.navigationRef,className:(0,c.Z)(eI.navigation,{[eI.removed]:!u.isNavigationMounted,[eI.navigationOpening]:u.isNavigationOpen,[eI.navigationClosing]:!u.isNavigationOpen}),children:(0,r.jsx)("div",{className:eI.wrapper,children:(0,r.jsxs)(s.W2,{className:(0,c.Z)(eI.container,{[eI.containerOpen]:!!u.openedSection}),children:[(0,r.jsxs)("div",{className:(0,c.Z)(eI.sections,{[eI.sectionsOpen]:!!u.openedSection}),children:[(0,r.jsx)(l.zx,{className:eI.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>h.handleButtonClick(!1),iconLeft:(0,r.jsx)(a.IconFdsLocationO,{size:24}),label:(null==(t=h.town)?void 0:t.name)||"Вся Россия"}),n.map(e=>(0,r.jsxs)("ul",{className:(0,c.Z)(eI.sectionsWrapper,{[eI.removed]:u.openedBlock!==e.id&&!p}),children:[(0,r.jsx)("div",{className:eI.sectionsTitle,children:v[e.id]}),e.sections.map(e=>(0,r.jsxs)("li",{className:(0,c.Z)(eI.section,{[eI.sectionExtra]:!!e.extra,[eI.sectionActive]:u.openedSection===e.id}),onClick:j(e.id,e.title),onMouseEnter:k(e.id,e.title),onMouseLeave:L,children:[(0,r.jsx)(ek,{name:e.uikitIcon,background:e.uikitIconBg}),(0,r.jsx)("span",{className:eI.sectionTitle,children:e.title}),(0,r.jsx)("div",{className:eI.sectionArrow,children:(0,r.jsx)(a.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,r.jsxs)("div",{className:eI.chatWrapper,children:[(0,r.jsx)("div",{className:eI.chatHeader,children:"Нужна помощь?"}),(0,r.jsx)(eC,{})]})]}),(0,r.jsxs)("button",{type:"button",className:(0,c.Z)(eI.backButton,{[eI.removed]:!u.openedSection}),onClick:()=>{N(o.D.button,"Назад"),u.setOpenedSection(null)},children:[(0,r.jsx)(a.IconFdsChevronLeftO,{size:24}),(0,r.jsx)("span",{children:"Назад"})]}),(0,r.jsx)(ej,{data:n,isMobile:p}),(0,r.jsxs)("div",{className:(0,c.Z)(eI.useful,{[eI.usefulOpen]:!!u.openedSection}),children:[(0,r.jsx)("div",{className:eI.usefulTitle,children:"Полезное на Финуслугах"}),n.map(e=>(0,r.jsx)(i.Fragment,{children:e.sections.map(e=>(0,r.jsx)("div",{className:(0,c.Z)(eI.usefulGrid,{[eI.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))]})]})})})},eB=(e,t,n)=>{var r,i,o,a,s,l,c;let h=(null==(i=null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r.findIndex)?void 0:i.call(r,e=>{let{id:t}=e;return"news"===t}))||-1,d=(null==(a=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[h])?void 0:a.content)||[];if(null!=(c=null==(l=null==(s=null==e?void 0:e.NAVIGATOR)?void 0:s[h])?void 0:l.content)&&c[0]&&Array.isArray(n)&&d.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[h].content[0].links=r}return[{id:"FINPRODUCTS",sections:Array.isArray(null==e?void 0:e.FINPRODUCTS)?null==e?void 0:e.FINPRODUCTS:[]},{id:"NAVIGATOR",sections:Array.isArray(null==e?void 0:e.NAVIGATOR)?null==e?void 0:e.NAVIGATOR:[]},{id:"ABOUT",sections:Array.isArray(null==e?void 0:e.ABOUT)?null==e?void 0:e.ABOUT:[]}]},eH=e=>{let{data:t,showcaseUrl:n="https://finuslugi.ru",minioUrl:h="https://assets.finuslugi.ru/mp-assets",lkUrl:d="https://lk.finuslugi.ru/registration",initialTown:p,isMainBannerPage:f,enableAppHeaderBanner:v=!1,news:_,className:b}=e,y=er(),w=(0,i.useMemo)(()=>eB(t,n,_),[t,n,_]),x=null==t?void 0:t.config,E=(0,i.useMemo)(()=>w.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[w]),T=y.isAuth?"Личный кабинет":"Войти",C=f&&y.isHeaderTransparent,j=(e,t,n,r)=>()=>{e!==y.openedBlock?N(o.D.toggle,t,"on"):N(o.D.button,"menu_close","on");let i=n?E[e]:"";y.setOpenedBlock(e,i,!!r)},{start:A,clear:S}=W(),k=(e,t,n,r)=>()=>{y.isNavigationOpen&&e===y.openedBlock||y.setIgnoreClicks(),A(j(e,t,n,r),200)},L=e=>()=>{y.ignoreClicks||e()},I=e=>y.openedBlock===e&&y.isNavigationOpen;return t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("header",{ref:y.headerRef,className:(0,c.Z)(m.header,b,{[m.transparent]:C}),children:(0,r.jsxs)("div",{ref:y.fixedContainerRef,className:(0,c.Z)(m.fixed,{[m.hidden]:y.isHeaderHidden,[m.navigationOpen]:y.isNavigationOpen}),children:[!!(null!=x&&x.appBannerUrl)&&v&&(0,r.jsx)(eE,{mobileAppUrl:x.appBannerUrl,minioUrl:h}),(0,r.jsxs)(s.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:y.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]:I(t)}),label:n,variant:"white",size:"xs",onClick:L(j(t,n,!0)),onMouseEnter:k(t,n,!0,!0),onMouseLeave:S})},t)})})}),(0,r.jsx)(eo,{className:(0,c.Z)(m.tabletMenuButton,{[m.menuItemActive]:y.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,r.jsx)(a.IconFdsChevronDownO,{size:24}),onClick:j("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,r.jsxs)("div",{className:(0,c.Z)(m.buttonGroup,{[m.whiteIcons]:(null==x?void 0:x.iconColorOnMobileMainBanner)==="white"}),children:[(0,r.jsxs)("div",{className:m.chips,children:[(0,r.jsx)(eo,{as:"a",href:d,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:"profile_".concat(d),iconLeft:(0,r.jsx)(a.IconFdsUserO,{size:20})}),(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)(a.IconFdsChatDotsCircleO,{size:24})})]}),(0,r.jsx)(eo,{className:m.menuButton,size:"xs",shape:C?"icon":"default",appearance:C?"ghost":"fill",label:"Меню",onClick:j("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,r.jsx)(a.IconFdsMenuSkewedO,{size:24})}),(0,r.jsxs)("div",{className:m.moreButtons,children:[(0,r.jsx)(em,{initialTown:p}),(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",appearance:"ghost",eventActionText:"IconFdsChatDotsSquareAddO",iconLeft:(0,r.jsx)(a.IconFdsChatDotsSquareAddO,{size:24}),children:"Онлайн чат"}),(0,r.jsx)(eo,{as:"a",href:d,size:"xs",eventActionText:T,eventLabel:"".concat(T,"_").concat(d),label:T})]})]}),(0,r.jsxs)(ef,{className:m.auth,href:d,eventActionText:T,eventLabel:"".concat(T,"_").concat(d),children:[(0,r.jsx)(eo,{size:"xs",shape:"circle-icon",iconLeft:(0,r.jsx)(a.IconFdsUserO,{}),eventActionText:T,eventLabel:"".concat(T,"_").concat(d)}),(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)(a.IconFdsCloseO,{}),onClick:()=>y.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,r.jsx)("div",{className:(0,c.Z)(m.overlay,{[m.removed]:!y.isNavigationMounted,[m.overlayOpening]:y.isNavigationOpen,[m.overlayClosing]:!y.isNavigationOpen}),onClick:L(()=>y.setOpenedBlock(null))}),(0,r.jsx)(eO,{data:w,minioUrl:h})]}):null},eP=e=>(0,r.jsx)(ei,{isMainBannerPage:e.isMainBannerPage,children:(0,r.jsx)(eH,{...e})})},65288:function(e,t,n){"use strict";n.d(t,{B:function(){return y}});var r=n(57437),i=n(9938),o=n(44839),a=n(23644),s=n(94702),l=n(81598),c=n(93381),u=n(2265);let h=(0,c.g)("support","sc"),d=Object.freeze({support:h,title:`${h}__title`,cardsContainer:`${h}__cards-container`}),p="cb-support",m=(0,c.g)("support-app-card","sc"),f=Object.freeze({supportAppCard:m,textWrapper:`${m}__text-wrapper`,imageContainer:`${m}__image-container`,title:`${m}__title`,description:`${m}__description`,icon:`${m}__icon`,imageWrapper:`${m}__image-wrapper`,image:`${m}__image`}),g=({title:e,linkUrl:t,s3Assets:n,description:i})=>{let o=(0,s.aF)("s");return(0,r.jsxs)("div",{className:f.supportAppCard,onClick:()=>{o&&((0,l.h)({eventCategory:p,eventActionType:l.D.banner,eventActionText:e,eventLabel:t}),window.open(t,"_blank","noreferrer"))},children:[(0,r.jsx)(a.IconFdsArrowUpRightSmallO,{className:f.icon,size:32}),(0,r.jsxs)("div",{className:f.textWrapper,children:[(0,r.jsx)("div",{className:f.title,children:e}),!!i&&(0,r.jsx)("div",{className:f.description,children:i})]}),(0,r.jsx)("div",{className:f.imageContainer,children:(0,r.jsxs)("picture",{className:f.imageWrapper,children:[(0,r.jsx)("source",{media:"(max-width: 767px)",srcSet:`${n}/mp-assets/widgets/SupportBlock/mobile-app.png 1x, ${n}/mp-assets/widgets/SupportBlock/mobile-app@2x.png 2x`}),(0,r.jsx)("img",{className:f.image,loading:"lazy",src:`${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg`,srcSet:`${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg 1x, ${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app@2x.jpg 2x`})]})})]})},v=(0,c.g)("support-phone-card","sc"),_=Object.freeze({supportPhoneCard:v,contacts:`${v}__contacts`,phone:`${v}__phone`,chat:`${v}__chat`,info:`${v}__info`,image:`${v}__image`}),b=({phones:e,description:t,s3Assets:n})=>{let i=(0,u.useCallback)(()=>{var e,t,n;null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)||n.call(t),(0,l.h)({eventCategory:p,eventActionType:l.D.button,eventActionText:"messenger",eventLabel:"chat"})},[]),o=e=>{let t=e.replace(/[\s-]/g,"");(0,l.h)({eventCategory:p,eventActionType:l.D.link,eventActionText:"phone",eventLabel:t})};return(0,r.jsxs)("div",{className:_.supportPhoneCard,children:[(0,r.jsxs)("div",{className:_.contacts,children:[e.map(e=>(0,r.jsx)("a",{className:_.phone,href:e.href,onClick:()=>o(e.label),children:e.label},e.label)),(0,r.jsx)("span",{className:_.chat,onClick:i,children:"Онлайн чат"})]}),(0,r.jsx)("div",{className:_.info,children:t}),(0,r.jsx)("img",{className:_.image,src:`${n}/mp-assets/widgets/SupportBlock/bannerSupportGirl.png`})]})},y=({className:e,phoneCard:t,appCard:n,s3Assets:a})=>(0,r.jsx)("section",{className:(0,o.Z)(d.support,e),children:(0,r.jsxs)(i.W2,{children:[(0,r.jsx)(i.X6,{as:"h2",type:"display",weight:"bold",className:(0,o.Z)(d.title,"mb-6"),children:"Поддержка"}),(0,r.jsxs)("div",{className:d.cardsContainer,children:[(0,r.jsx)(b,{s3Assets:a,...t}),(0,r.jsx)(g,{s3Assets:a,...n})]})]})});y.displayName="Support"}}]);