@redneckz/wildless-cms-uni-blocks 0.7.5 → 0.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +103 -19
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/Tabs/LinkTab.d.ts +1 -0
  5. package/bundle/components/Tabs/ScrollableTabs.d.ts +8 -0
  6. package/bundle/components/Tabs/TabsContent.d.ts +12 -0
  7. package/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
  8. package/bundle/components/Tabs/renderTab.d.ts +2 -1
  9. package/bundle/components/Tabs/tabItemClasses.d.ts +6 -1
  10. package/dist/components/Tabs/LinkTab.d.ts +1 -0
  11. package/dist/components/Tabs/LinkTab.js +2 -2
  12. package/dist/components/Tabs/LinkTab.js.map +1 -1
  13. package/dist/components/Tabs/ScrollableTabs.d.ts +8 -0
  14. package/dist/components/Tabs/ScrollableTabs.js +24 -0
  15. package/dist/components/Tabs/ScrollableTabs.js.map +1 -0
  16. package/dist/components/Tabs/Tabs.js +9 -2
  17. package/dist/components/Tabs/Tabs.js.map +1 -1
  18. package/dist/components/Tabs/TabsContent.d.ts +12 -0
  19. package/dist/components/Tabs/renderGroupTab.d.ts +2 -2
  20. package/dist/components/Tabs/renderGroupTab.js +12 -4
  21. package/dist/components/Tabs/renderGroupTab.js.map +1 -1
  22. package/dist/components/Tabs/renderTab.d.ts +2 -1
  23. package/dist/components/Tabs/renderTab.js +4 -6
  24. package/dist/components/Tabs/renderTab.js.map +1 -1
  25. package/dist/components/Tabs/tabItemClasses.d.ts +6 -1
  26. package/dist/components/Tabs/tabItemClasses.js +61 -2
  27. package/dist/components/Tabs/tabItemClasses.js.map +1 -1
  28. package/dist/setup-fixture.js +0 -1
  29. package/dist/setup-fixture.js.map +1 -1
  30. package/lib/common.css +1 -1
  31. package/lib/components/Tabs/LinkTab.d.ts +1 -0
  32. package/lib/components/Tabs/LinkTab.js +3 -3
  33. package/lib/components/Tabs/LinkTab.js.map +1 -1
  34. package/lib/components/Tabs/ScrollableTabs.d.ts +8 -0
  35. package/lib/components/Tabs/ScrollableTabs.js +22 -0
  36. package/lib/components/Tabs/ScrollableTabs.js.map +1 -0
  37. package/lib/components/Tabs/Tabs.fixture.d.ts +1 -0
  38. package/lib/components/Tabs/Tabs.js +9 -2
  39. package/lib/components/Tabs/Tabs.js.map +1 -1
  40. package/lib/components/Tabs/TabsContent.d.ts +12 -0
  41. package/lib/components/Tabs/renderGroupTab.d.ts +2 -2
  42. package/lib/components/Tabs/renderGroupTab.js +13 -5
  43. package/lib/components/Tabs/renderGroupTab.js.map +1 -1
  44. package/lib/components/Tabs/renderTab.d.ts +2 -1
  45. package/lib/components/Tabs/renderTab.js +4 -6
  46. package/lib/components/Tabs/renderTab.js.map +1 -1
  47. package/lib/components/Tabs/tabItemClasses.d.ts +6 -1
  48. package/lib/components/Tabs/tabItemClasses.js +58 -1
  49. package/lib/components/Tabs/tabItemClasses.js.map +1 -1
  50. package/lib/setup-fixture.js +0 -1
  51. package/lib/setup-fixture.js.map +1 -1
  52. package/mobile/bundle/bundle.umd.js +1 -1
  53. package/mobile/bundle/bundle.umd.min.js +1 -1
  54. package/mobile/bundle/components/Tabs/LinkTab.d.ts +1 -0
  55. package/mobile/bundle/components/Tabs/ScrollableTabs.d.ts +8 -0
  56. package/mobile/bundle/components/Tabs/TabsContent.d.ts +12 -0
  57. package/mobile/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
  58. package/mobile/bundle/components/Tabs/renderTab.d.ts +2 -1
  59. package/mobile/bundle/components/Tabs/tabItemClasses.d.ts +6 -1
  60. package/mobile/dist/components/Tabs/LinkTab.d.ts +1 -0
  61. package/mobile/dist/components/Tabs/LinkTab.js +2 -2
  62. package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
  63. package/mobile/dist/components/Tabs/ScrollableTabs.d.ts +8 -0
  64. package/mobile/dist/components/Tabs/ScrollableTabs.js +24 -0
  65. package/mobile/dist/components/Tabs/ScrollableTabs.js.map +1 -0
  66. package/mobile/dist/components/Tabs/Tabs.js +9 -2
  67. package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
  68. package/mobile/dist/components/Tabs/TabsContent.d.ts +12 -0
  69. package/mobile/dist/components/Tabs/renderGroupTab.d.ts +2 -2
  70. package/mobile/dist/components/Tabs/renderGroupTab.js +12 -4
  71. package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
  72. package/mobile/dist/components/Tabs/renderTab.d.ts +2 -1
  73. package/mobile/dist/components/Tabs/renderTab.js +4 -6
  74. package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
  75. package/mobile/dist/components/Tabs/tabItemClasses.d.ts +6 -1
  76. package/mobile/dist/components/Tabs/tabItemClasses.js +61 -2
  77. package/mobile/dist/components/Tabs/tabItemClasses.js.map +1 -1
  78. package/mobile/dist/setup-fixture.js +0 -1
  79. package/mobile/dist/setup-fixture.js.map +1 -1
  80. package/mobile/lib/components/Tabs/LinkTab.d.ts +1 -0
  81. package/mobile/lib/components/Tabs/LinkTab.js +3 -3
  82. package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
  83. package/mobile/lib/components/Tabs/ScrollableTabs.d.ts +8 -0
  84. package/mobile/lib/components/Tabs/ScrollableTabs.js +22 -0
  85. package/mobile/lib/components/Tabs/ScrollableTabs.js.map +1 -0
  86. package/mobile/lib/components/Tabs/Tabs.js +9 -2
  87. package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
  88. package/mobile/lib/components/Tabs/TabsContent.d.ts +12 -0
  89. package/mobile/lib/components/Tabs/renderGroupTab.d.ts +2 -2
  90. package/mobile/lib/components/Tabs/renderGroupTab.js +13 -5
  91. package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
  92. package/mobile/lib/components/Tabs/renderTab.d.ts +2 -1
  93. package/mobile/lib/components/Tabs/renderTab.js +4 -6
  94. package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
  95. package/mobile/lib/components/Tabs/tabItemClasses.d.ts +6 -1
  96. package/mobile/lib/components/Tabs/tabItemClasses.js +58 -1
  97. package/mobile/lib/components/Tabs/tabItemClasses.js.map +1 -1
  98. package/mobile/lib/setup-fixture.js +0 -1
  99. package/mobile/lib/setup-fixture.js.map +1 -1
  100. package/mobile/src/components/Tabs/LinkTab.tsx +5 -13
  101. package/mobile/src/components/Tabs/ScrollableTabs.tsx +55 -0
  102. package/mobile/src/components/Tabs/Tabs.tsx +26 -4
  103. package/mobile/src/components/Tabs/TabsContent.ts +13 -0
  104. package/mobile/src/components/Tabs/renderGroupTab.tsx +30 -20
  105. package/mobile/src/components/Tabs/renderTab.tsx +8 -5
  106. package/mobile/src/components/Tabs/tabItemClasses.ts +65 -1
  107. package/mobile/src/setup-fixture.ts +0 -1
  108. package/package.json +1 -1
  109. package/src/components/Tabs/LinkTab.tsx +5 -13
  110. package/src/components/Tabs/ScrollableTabs.tsx +55 -0
  111. package/src/components/Tabs/Tabs.fixture.tsx +22 -0
  112. package/src/components/Tabs/Tabs.tsx +26 -4
  113. package/src/components/Tabs/TabsContent.ts +13 -0
  114. package/src/components/Tabs/renderGroupTab.tsx +30 -20
  115. package/src/components/Tabs/renderTab.tsx +8 -5
  116. package/src/components/Tabs/tabItemClasses.ts +65 -1
  117. package/src/setup-fixture.ts +0 -1
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),i=n("useState"),r=n("useEffect"),l=n("useCallback"),a=n("useMemo"),s=n("useRef");const o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CDN(){return this._.CDN}get BASE_PATH(){return this._.BASE_PATH&&!this._.BASE_PATH.endsWith("/")?`${this._.BASE_PATH}/`:this._.BASE_PATH}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},c="likesToken";function d(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(c)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:n}=await e.json();return globalThis.localStorage?.setItem(c,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:t})}),{likes:i}=await e.json();return i||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:i}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:i},body:JSON.stringify({node_id:t,user_name:i})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:n,name:i}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:i},body:JSON.stringify({node_id:t,user_name:i})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}}}}const m=(...e)=>globalThis._uni._jsx(...e),h=(...e)=>globalThis._uni._jsxs(...e),u=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:p(e)),t._tmpl},p=e=>{function t(t,n){const{children:i,...r}=t||{},l=n?.slots?.default,a=i||l&&l();return e(Object.assign(r,a&&{children:a}),n)}return t.inheritAttrs=!1,t},g=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),b=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),x=[];function f(e,t){const{key:n,blockDecorator:i=b,blocksRegistry:r={},ancestors:l=x,className:a=""}=t,{type:s}=e;s&&s in r||console.warn(`No block with "${s}" is registered`);const o=s&&r[s];return i({blockClassName:g("scroll-mt-12",a,e.style||"col-span-12"),block:e,ancestors:l,render:({block:i,blockClassName:r})=>{const{content:l}=i;return o?m(o,{className:r,block:e,options:t,...l},n):null}},n)}const N=[],y=(e,{key:t,ancestors:n=N,slotName:i=null,renderChild:r=f,...l})=>(e||[]).map(((e,a)=>r(e,{...l,key:`${t||e.type}-${a}`,ancestors:l.parent?[...n||N,[l.parent,i]]:n})));function v({children:e,block:t,options:n,renderChild:i}){return e||(t&&n?y(t.blocks,{...n,parent:t,renderChild:i}):null)}class w{static inst=new w;subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}function k(e,{sensitivity:t,rootRef:n}={}){const i=s(null),l=a((()=>({threshold:C(t),root:n?.current})),[t,n?.current]);return r((()=>{if(!i.current)return;const t=new IntersectionObserver(e,l);return t.observe(i.current),()=>{t.disconnect()}}),[e,l]),i}function C(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const S=e=>e?.replace("#",""),T=e=>`${globalThis.location?.pathname}#${S(e)}`;class ${static inst=new $;eventBus=new w;constructor(){const e=S(globalThis.location?.hash);e&&this.eventBus.subject("goto",{anchor:e})}goto(e){const t=S(e);t&&(this.push(t),this.eventBus.fire("goto",{anchor:t}))}push(e){globalThis.history?.pushState(null,"",T(e))}replace(e){globalThis.history?.replaceState(null,"",T(e))}reset(){globalThis.history?.replaceState(null,"",T())}}const _={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},I=u((({className:e="",version:t="primary",block:n,tag:a="section",role:s,children:o})=>{const c=a,d=function(e,t=$.inst){const n=k(l((n=>{if(!e||!n?.length)return;const i=n[n.length-1];t.eventBus.fire("intersection",{block:e,intersection:i})}),[e,t]),{sensitivity:1});return r((()=>{if(n.current)return t.eventBus.subscribe("goto",(({anchor:t})=>{n.current&&e?.anchor===t&&n.current.scrollIntoView({behavior:"smooth",block:"start"})}))}),[e,t]),n}(n),[h,u]=i(!0);return r((()=>w.inst.subscribe("tab",(e=>{if("group"===e.type){const t=n?.labels?.length||n?.anchor;u(!e.label||(!t||Boolean(n?.labels?.includes(e.label))))}else u(!0)}))),[n]),h?m(c,{className:g("group",_[t],e),...t?{"data-ver":t}:{},...n?.anchor?{id:n.anchor,ref:d}:{},role:s,children:o}):null})),A={h0:"text-m-title",h1:"text-m-title",h2:"text-m-title",h3:"text-h6",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},j=u((e=>{const{className:t,headingType:n="h3",title:i,as:r="h3"}=e;return m(r,{className:`font-sans font-medium m-0 ${A[n]} ${t||""}`,children:i})})),R=u((({children:e,...t})=>m("p",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),B=u((({children:e})=>m("ul",{className:"list-none m-0 p-0",children:e}))),D=u((({title:e,description:t,className:n="",...i})=>h(I,{className:`py-6 px-4 ${n}`,...i,children:[e?m(j,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?m("div",{className:"mb-5",children:m(R,{size:"text-m",font:"font-light",align:"text-center",children:t})}):null,m(B,{children:v(i)})]})));D.childrenTypes=["AccordionItem"];const O=u((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:r,renderFoldButton:a})=>{const[s,o]=i(n),c=l((()=>{o((e=>!e))}),[]),d=r({isUnfolded:s,onToggle:c}),m=a?a({isUnfolded:s,onToggle:c}):null;return h("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),V=u((({className:e="",isUnfolded:t,children:n})=>{const i=s(null);return r((()=>{i.current&&(i.current.style.maxHeight=t?`${i.current.scrollHeight}px`:"")}),[t,n?.length]),m("div",{ref:i,className:`transition-max-h duration-300 overflow-hidden ${i.current||!t?"max-h-0":""} ${e}`,children:n})})),L={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},M=u((({className:e="",imageClassName:t="",name:n="",alt:i=`Иконка ${n}`,title:r=i,iconVersion:l="color",asSVG:a,...s})=>{const c=`${o.CDN||""}icons/${n}.svg`;return a&&"normal"!==l?m(z,{className:e,children:h("svg",{className:g(P(s.width),L[l],"white"===l?"invert":"",t),...s,"aria-hidden":"true",children:[r?m("title",{children:r}):null,i?m("desc",{children:i}):null,m("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):m("img",{className:e,src:c,alt:i,title:r,...s,"aria-hidden":"true"})})),P=e=>e?"":"w-full h-full",z=u((({className:e,children:t})=>e?m("div",{className:e,children:t}):t)),E=(e,t)=>e.media&&t.media?e.media-t.media:0,F=u((({className:e="",image:t,imageClassName:n="",isMobile:i=!1,pathPrefix:r})=>{if(!t||!t?.sources&&!t?.src)return null;return h("picture",{className:`${i?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(E).map((({src:e,format:n,media:i},l)=>m("source",{srcSet:J(e,r),type:W(n),media:i?`(max-width: ${i}px)`:"",...t.size},`${l}_${e}`))):null,H({...t,src:G(t.src,r)},n,i)]})})),H=(e,t="",n=!1)=>{const i={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},r=e.title||"",l=e.alt||e.title,a=n?"m-auto":"m-0";return m("img",{src:e.src,className:`${a} ${t}`,alt:l,title:r,style:i,...e.size})},G=(e,t)=>!e||e?.startsWith("data:image")?e:`${((e="")=>e&&!e.endsWith("/")?`${e}/`:e)(t)}${e}`,J=(e,t)=>e?.split(",").map((e=>G(e.trim(),t))).join(", ");function W(e){return e?`image/${String(e)}`:void 0}const U=u((({className:e="",image:t,imageClassName:n="",isMobile:i,pathPrefix:r,...l})=>t?.src||t?.icon?t.icon?m(M,{className:e,imageClassName:n,iconVersion:t?.iconVersion||"normal",name:t.icon,...l}):m(F,{className:e,imageClassName:n,image:t,isMobile:i,pathPrefix:r}):null)),Y=u((e=>m(U,{...e,isMobile:!0}))),X=u((({children:e,...t})=>m("span",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),K=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),q=["PlusIcon","MinusIcon"],Q=u((({className:e="",label:t="",labelIcon:n,isExpanded:i,...r})=>{const{bordered:l}=function(e,t){const{content:n}=function(e){return e?.parent||{}}(e);return n||t}(r.options,{});return m("li",{className:`${l?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0"} border-solid border-main-divider ${e}`,children:m(O,{isFoldButtonOnTop:!0,unfoldedByDefault:i,renderFoldableSection:({isUnfolded:e})=>m(V,{className:"flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0",isUnfolded:e,children:v(r)}),renderFoldButton:({isUnfolded:e,onToggle:i})=>m(Z,{className:l?"":"py-3.5 px-0",label:t,icon:q[Number(e)],primaryIcon:n,onClick:i})})})}));Q.childrenTypes=[];const Z=u((({className:e,icon:t,label:n,primaryIcon:i,onClick:r})=>h("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text group cursor-pointer ${e}`,onClick:r,children:[h("div",{className:"flex group-hover:text-primary-main",children:[i?m(Y,{image:K(i),className:"mr-3 flex-shrink-0",width:"24",height:"24",asSVG:!0}):null,m(X,{size:"text-m-title-xs",font:"font-medium",children:n})]}),m(Y,{className:"flex-shrink-0",image:K({icon:t}),width:"24",height:"24",asSVG:!0})]}))),ee=u((({className:e="",style:t,idx:n,activeIndex:i,observerOptions:r,children:a,onIntersection:s})=>{const o=k(l((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),r);return m("div",{className:`inline-block snap-always box-border ${e}`,style:t,role:"listitem","aria-current":Boolean(n===i),ref:o,children:a})})),te=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],ne=u((({className:e="",containerRef:t,activeIndex:n,visibleItemCount:i=0,gap:r=0,padding:a=0,listType:o="horizontal-list",snapAlign:c="snap-center",children:d,onVisibleItemsChange:h,onVisibleIndicesChange:u})=>{const p={sensitivity:1,rootRef:t},b=s([]),x=l(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,h&&h(n),u&&u(re(n))}),[h,u]),f=i>0?r*Number(i)-1:0,N="vertical-list"===o,y="horizontal-list"===o,v={...y?ie(a,f):{},...N?le(t):{},gap:`${r}px`};return m("div",{className:g("box-border overflow-auto no-scrollbar",o,e),style:v,role:"list",ref:t,children:(w=(e,t)=>m(ee,{className:g(c,i?te[i-1]:""),style:y?ie(a/4):{},activeIndex:n,idx:t,observerOptions:p,onIntersection:x,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(w):w(e,0))(d)});var w})),ie=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),re=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),le=e=>({height:e?.current?.firstElementChild?.clientHeight||0}),ae={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},se={"horizontal-list":"w-6","vertical-list":"h-6"},oe=u((({containerRef:e,activeIndex:t,dotCount:n=0,listType:i="horizontal-list"})=>n?m("div",{className:`flex gap-2 ${ae[i]}`,children:new Array(n).fill(null).map(((n,r)=>m("div",{className:`cursor-pointer bg-primary-main rounded-full transition-width duration-300 group-data-secondary:bg-white ${r===t?se[i]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(n=>{n!==t&&e?.current&&e.current.children[n]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(r)},String(r))))}):null)),ce=e=>e,de=(e=ce)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),me=(e=ce)=>de((t=>-e(t))),he=e=>t=>e.scrollWidth/t,ue=e=>(t,n)=>{e.scrollBy({left:n*he(e)(t),behavior:"smooth"})},pe=({itemCount:e,isCyclic:t,onVisibleIndicesChange:n})=>{const r=s(null),[a,o]=i([]),c=l((e=>{o((t=>{return(n=t)===(i=e)||Boolean(n&&i&&n?.length===i?.length&&n.every(((e,t)=>e===i[t])))?t:e;var n,i})),n&&n(e)}),[e]),[d,m]=a.length?[me()(a),de()(a)]:[-1,-1],h=d>0,u=m<e-1,p=l((()=>{var n;r.current&&(t&&!h?(n=r.current).scrollTo({left:n.scrollWidth,behavior:"smooth"}):ue(r.current)(e,-1))}),[t,e,h]),g=l((()=>{r.current&&(t&&!u?r.current.scrollTo({left:0,behavior:"smooth"}):ue(r.current)(e,1))}),[e,t,u]);return[r,{scrollLeft:p,scrollRight:g,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},ge=u((({className:e="",gap:t=14,padding:n=16,showDots:i=!0,children:r,onVisibleIndicesChange:l,listType:a="horizontal-list"})=>{const s=Array.isArray(r)?r.length:0,[o,c]=pe({itemCount:s,onVisibleIndicesChange:l}),[d]=c.visibleIndicesRange;return h("div",{className:g(e,"vertical-list"===a?"relative h-full":""),children:[m(ne,{containerRef:o,activeIndex:d,visibleItemCount:1,gap:t,padding:n,onVisibleIndicesChange:c.handleVisibleIndicesChange,listType:a,children:r}),i?m(oe,{containerRef:o,activeIndex:d,dotCount:s,listType:a}):null]})}));const be=e=>e?.includes("//"),xe=e=>(e||"").replace(/\/?\?.*/,""),fe=e=>{if(!e||!be(e))return;const t=e,n=t.indexOf("//"),i=t.indexOf("/",n+"//".length);return-1!==i?t.substring(0,i):t},Ne=e=>{if(!e||!be(e))return;return new URL(e).pathname},ye=e=>e?.startsWith("#");var ve=Object.freeze({__proto__:null,isURL:be,withoutQuery:xe,getOrigin:fe,getPathname:Ne,getHash:e=>{if(!e||!be(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:ye});const we=(e,t)=>we._impl(e,t);function ke(){return ke._impl()}function Ce(){const e=ke(),t=$.inst;return n=>{const i=((e,t)=>{if(!e)return e;const n=fe(t?.href);return n?e.replace(n,"")||"/":e})(n.href,e);return{...n,href:i,"aria-label":n.text,onClick:we((r=>{n.onClick&&n.onClick(r),Se(i,n.target)||(r?.preventDefault(),ye(i)?t.goto(i):i&&e.push(i))}),n)}}}we._impl=e=>e,we.setup=e=>{we._impl=e},ke._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),ke.setup=e=>{ke._impl=e};const Se=(e,t)=>be(e)||t&&"_self"!==t||e?.startsWith("/"),Te={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"","":""},$e="bg-main-divider text-main-disabled",_e={primary:$e,secondary:$e,white:$e,link:"",transparent:"","":""},Ie="text-center font-sans select-none",Ae={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"","":""},je=u((e=>{const{text:t,aboveText:n,appendLeft:i,appendRight:r,version:l="primary"}=e;return h("div",{className:Re(e),children:[i?m("div",{className:Ae[l],children:i}):null,Be(e)?h("div",{children:[n?m("div",{className:"text-xs-light text-left",children:n}):null,m("div",{className:"text-left "+(n?"text-s -mt-0.5":"text-l"),children:t})]}):null,r?m("div",{className:Ae[l],children:r}):null]})})),Re=e=>{const{version:t,aboveText:n,rounded:i}=e;if("link"===t)return"";const r="gap-2 "+(n?"py-2.5 px-7":"py-4 px-4");return["group/btn flex items-center justify-center",Be(e)?r:"h-12 w-12",i?"rounded-full":""].join(" ")},Be=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),De=({className:e,rounded:t,version:n})=>["inline-block",Ie,n?_e[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Oe=({className:e,rounded:t,version:n})=>[Ie,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border",n?Te[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ve=u((({disabled:e,children:t,...n})=>{const i=Ce()(n),r=t??m(je,{...i});return m(e?Me:Le,{...i,children:r})})),Le=u((({className:e="",href:t,rel:n,target:i,ariaLabel:r,version:l,rounded:a,onClick:s,children:o})=>m("a",{className:Oe({className:e,version:l,rounded:a}),href:t,rel:n,target:i,"aria-label":r,role:t?"link":"button",onClick:s,children:o}))),Me=u((({className:e,ariaLabel:t,version:n,rounded:i,children:r})=>m("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:De({className:e,rounded:i,version:n}),children:r}))),Pe=(e=!1)=>e?"text-white":"",ze=(e=!1)=>"text-s mb-3.5 "+(e?"text-white":"text-secondary-text/80"),Ee=u((({icon:e,image:t,title:n,subtitle:i,isFillGradient:r})=>h("div",{role:"columnheader",children:[e?m(Y,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}):null,t?.src&&m("div",{className:"mb-3.5",children:m(Y,{image:t})}),n?m(j,{headingType:"h4",className:Pe(r),title:n}):null,i?m("div",{className:ze(r),children:i}):null]}))),Fe=u((({cell:e,rowHeader:t,isFillGradient:n=!1})=>m("div",{className:"box-border flex flex-col",role:"cell",children:m("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(He(n,t))})}))),He=(e,t)=>({label:n,description:i},r)=>h("div",{className:"flex justify-between text-s py-3.5",children:[m("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),h("div",{className:"basis-1/2",children:[n?m("div",{className:"text-right "+(e?"text-white":""),children:n}):null,i?m("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:i}):null]})]},String(r)),Ge=u((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:i,showRow:r,onToggleColumn:l})=>{const a=t?.slice(0,r?t.length:n),s=i?"secondary":"primary";return h("div",{className:`border border-gray rounded-md p-4 mb-3.5 ${i?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[m(Ee,{...e,isFillGradient:i}),a?.length?a.map((({rowHeader:e,cell:t},n)=>m(Fe,{cell:t,rowHeader:e,isFillGradient:i},String(n)))):null,r&&e?.link?m(Ve,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-4 py-[11px]",children:e.link.text}):null,Je({onToggleColumn:l,isFillGradient:i,showRow:r})]})})),Je=({onToggleColumn:e,isFillGradient:t,showRow:n})=>m("div",{className:"mt-5",role:"cell",children:m("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:n?"Скрыть":"Показать описание"})}),We=u((e=>{const{className:t,title:n}=e;return h("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${t||""}`,children:[n?m(j,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:n}):null,m("div",{role:"table",children:m(Ue,{...e})})]})})),Ue=u((({columns:e=[],rowHeaders:t,isColoredFirstColumn:n,visibleRowLength:r,orientation:a,...s})=>{const[o,c]=i(new Array(e.length).fill(!r)),d=l((e=>{const t=(t,n)=>n===e?!t:t;c((e=>e.map(t)))}),[]),h=l((()=>c((e=>new Array(e.length).fill(!1)))),[]),u=e?.map((({data:e,header:i},l)=>{return m(Ge,{visibleRowLength:r,showRow:o[l],header:i,columnData:(a=e,a?.map(((e,n)=>({cell:e,rowHeader:t?.[n]?.title})))),isFillGradient:0===l&&n,onToggleColumn:()=>d(l),...s},String(l));var a}));return"horizontal"===a?m(ge,{onVisibleIndicesChange:h,children:u}):u})),Ye=new Map;function Xe(e,t,{fallback:n}={}){const l=a((()=>Ke(e)),[e]),[s,o]=i(),[c,d]=i(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};r((()=>{if(!l.every((e=>null===e)))try{const e=t(...l);"then"in e?(e=>{e.then((e=>Ye.get(l)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...l]);const u=l[0],p=n&&"string"==typeof u&&n[u];return{data:s||c||!p?s:p,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function Ke(e){return e?Array.isArray(e)?e:e instanceof Function?Ke(e()):[e]:[e]}async function qe(e,t){const n=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await n.json()}function Qe(e,t={}){const{data:n}=Xe(`/wcms-resources/${e}.json`,qe,{fallback:t});return n||{}}const Ze=u((({className:e,isMobile:t=!1})=>{const{term:n,setTerm:r}=(()=>{const[e,t]=i("");return{term:e,setTerm:e=>t(e)}})(),l=t?"text-s":"text-l-light",a=t?" placeholder-transparent":"h-full",s=t?"some search":void 0;return h("form",{className:`font-sans relative ${e}`,children:[h("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[m("div",{className:t?"w-5 h-5":"w-6 h-6",children:m(Y,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),n?null:m("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${l}`,children:"Поиск по сайту"})]}),m("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text ${a}`,value:n,onChange:e=>r(e.target.value),type:"text",name:"search-bar-input",placeholder:s}),t?m("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),r("")},children:m(Y,{image:{icon:"CloseIcon"},width:"24",height:"24"})}):m(Ve,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-[3px] right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:m("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),et=u((e=>m(Ze,{...e,isMobile:!0}))),tt=u((({className:e="",documents:t,...n})=>m(I,{className:`mt-2.5 ${e}`,...n,children:m("ul",{className:"flex flex-col text-s text-secondary-text p-0",children:t?.length?nt(t):null})}))),nt=e=>e.map(((e,t)=>{const{text:n,...i}=e;return m("li",{className:"mb-4 list-none",children:m("a",{className:"hover:text-primary-main",role:"link",...i,children:n||null})},`list_item_${String(t)}`)})),it={"bg-white":"color",transparent:"white"},rt={"bg-white":"text-primary-main",transparent:"text-white"},lt=(e,t,n)=>m(Y,t?.src?{image:t,className:rt[e],width:n?.width,height:n?.height,pathPrefix:"/wcms-resources/",asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:it[e]},className:rt[e],width:n?.width,height:n?.height,asSVG:!0}),at={"bg-white":"text-primary-text",transparent:"text-white"},st=(e,t,n)=>m("span",{className:`${at[t]} ml-2.5 font-medium ${n||""}`,children:e||"Россельхозбанк"}),ot=u((({bgColor:e="bg-white",children:t,className:n="",href:i,logo:r,showTitle:l=!0,targetBlank:a})=>h("a",{className:`inline-flex items-center font-sans no-underline ${n}`,href:i||"https://rshb.ru/",target:a?"_blank":"_self","aria-label":r?.title||"Россельхозбанк",children:[lt(e,r?.image,{width:"34",height:"34"}),l?st(t||r?.title,e,"text-s"):null]}))),ct=u((({className:e="",title:t="Мобильное приложение",description:n,href:i="#"})=>m("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${e}`,children:i?h("div",{className:"flex",children:[m("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-12 h-12",children:m(ot,{className:"w-8",bgColor:"transparent",showTitle:!0})}),h("a",{href:i,target:"_blank",className:"flex flex-col justify-center pl-3",children:[m("div",{className:"text-s font-medium mb-[3px]",children:t}),m("div",{className:"text-s text-secondary-text",children:n})]})]}):null}))),dt=u((({className:e="",items:t,hasButton:n})=>h("div",{className:e,children:[t?.length?t.map(mt):null,n?m(Ve,{version:"primary",className:"mb-6 w-full",href:"/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),mt=(e,t)=>{const{type:n,text:i,description:r}=e;return h("div",{className:"mb-4",children:[m("div",{children:ht(n,i)}),m("div",{className:"mt-1 text-s-light text-secondary-text",children:r})]},String(t))},ht=(e,t="")=>{switch(e){case"tel":return m("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${ut(t)}`,children:t});case"email":return m("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return m("span",{children:t})}},ut=e=>e.replaceAll(/\D/g,""),pt=u((({className:e="",index:t,text:n,...i})=>{const r=Ce(),{href:l,target:a,onClick:s}=r(i);return m("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:l,target:a,onClick:s,children:n||`Документ ${t}`})})),gt=u((({title:e,links:t,className:n=""})=>h("div",{className:n,children:[m("span",{className:"text-primary-text text-s font-medium",children:e}),t?.length?m("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>m(pt,{index:t,className:"text-s",...e},String(t))))}):null]}))),bt=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],icon:{icon:"YoutubeIcon"},label:"Youtube"}],xt={default:"w-14 h-14",small:"w-12 h-12"},ft=u((({isRounded:e=!1,buttonSize:t="default",iconVersion:n="color",...i})=>{const r=Ce(),{href:l,onClick:a}=r(i),{icon:s,label:o}=bt.find((({origins:e})=>e.some((e=>l?.includes(e)))))||{},c=s?{...K(s),iconVersion:n}:null;return s?m("a",{className:g("group/media flex items-center justify-center box-border",xt[t],e?"rounded-full":"rounded-md","border-solid border border-main-divider hover:border-transparent","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white group-data-secondary:hover:bg-secondary-hover"),href:l,"aria-label":o,target:"_blank",rel:"noopener noreferrer",onClick:a,children:c?m(Y,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24",asSVG:!0}):null}):null})),Nt=u((({className:e="",media:t})=>m("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e}`,children:t?.map(((e,t)=>m(ft,{...e},String(t))))}))),yt=u((({className:e="",index:t,...n})=>{const i=Ce(),{href:r,target:l,text:a,onClick:s}=i(n);return m("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:r,target:l,onClick:s,children:a||`Документ ${t}`})})),vt=u((({className:e="",links:t})=>h("div",{className:e,children:[m("div",{className:"py-6",children:m("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?m("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>m(yt,{index:t,...e},String(t))))}):null]}))),wt=u((({className:e="",...t})=>{const n=t.options?.page?.fallback,i=Qe(o.SITEMAP||"sitemap",n),{documents:r,relatedEnterprises:l,contacts:a,socialMedia:s,horizontalNavigationTitle:c}=Qe(o.FOOTER||"footer",n);return h("footer",{className:`font-sans px-4 py-[26px] bg-white ${e}`,children:[m(dt,{className:"overflow-hidden",items:a,hasButton:!0}),m(B,{children:i.topItems?.map(((e,t)=>m(Q,{label:e.text,children:m(tt,{documents:e.items})},String(t))))}),m("div",{children:i?.dispositions?.map(kt)}),m(ct,{title:"Мобильное приложение",description:"Загрузить для IOS и Android",...t}),m(et,{className:"grow"}),m(Nt,{className:"pb-4",media:s}),m(gt,{title:c,links:l}),m(vt,{links:r})]})})),kt=(e,t)=>{const{icon:n,href:i,text:r}=e;return h(Ve,{version:"link",href:i,className:"flex text-s mb-4 w-6",children:[n?m(Y,{className:"pr-1",image:K(n),width:"24",height:"24",asSVG:!0}):null,m("span",{className:"pl-2.5 font-medium text-primary-text",children:r})]},`footer-${t}`)},Ct=u((({className:e="",title:t,description:n,cards:i=[],orientation:r="horizontal",...l})=>h(I,{className:`relative px-4 py-6 overflow-hidden ${e}`,...l,children:[h("div",{className:"flex flex-col items-center mb-5",children:[t?m(j,{headingType:"h3",className:"text-center "+(n?"mb-2":"mb-5"),title:t}):null,n?m("div",{className:"text-m max-w-[600px] text-center mb-5",children:n}):null]}),St(r,i)]})));function St(e,t){return"horizontal"===e?m(ge,{children:t?.map(Tt)}):m("div",{className:"grid gap-3.5",children:t?.map(Tt)})}function Tt(e,t){return h("div",{className:`w-full h-full flex flex-col justify-between shrink-0 box-border snap-start snap-always border-solid border rounded-md border-gray p-4\n ${_[e.version??"primary"]}`,children:[h("div",{children:[$t(e.icon),e.title?m("h3",{className:"text-m-title-xs font-medium m-0",children:e.title}):null,e.description?_t(e):null,e.items?.length?At(e.items,e.isDotted,e.version):null]}),e?.button?.text?(n=e.button,m(Ve,{className:"mt-3",...n})):null]},t);var n}const $t=e=>e?.src||e?.icon?m("div",{className:"flex justify-center",children:m(Y,{className:"mb-3.5",image:e})}):null;function _t(e){return m("div",{className:"text-secondary-text mt-1 text-s "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}const It={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-primary-text",transparent:"","":""};function At(e,t,n="primary"){return m("section",{className:"mt-3",children:e.map(((e,i)=>h("div",{children:[t?m("div",{className:`rounded-full inline-block mr-3 mt-2 w-2 h-2 min-w-2 min-h-2 ${It[n]}`}):null,m("span",{className:"text-m font-medium",children:e.title}),m("span",{className:"text-s pl-2 "+("primary"===n?"text-secondary-text":""),children:e.text})]},String(i))))})}const jt=(e,t,n=((e,t)=>t.startsWith(e)))=>n(xe((e=>be(e)||e?.startsWith("/")?e:`${o.BASE_PATH||""}${e}`)(e)),xe(be(e)?t.href:Ne(t.href))),Rt=e=>t=>jt(t.href,e),Bt=e=>t=>t.items?.some(Rt(e))||jt(t.href,e)||((e,t)=>[fe(e),fe(t.href)].every(((e,t,n)=>Boolean(e)&&e===n[0])))(t.href,e)||Boolean(o.BASE_PATH?.startsWith(t.href||"/")),Dt=u((({className:e="",active:t,dataItemName:n,children:i,...r})=>{const l=Ce(),{href:a,target:s,text:o,onClick:c}=l(r);return h("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:a,target:s,"data-item-name":n,onClick:c,children:[m("span",{className:Ot(t),children:o||i}),t?m("div",{className:Vt(t)}):null]})})),Ot=(e=!1)=>g("font-sans text-s",e?"text-primary-main":"text-secondary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Vt=(e=!1)=>g("absolute left-0 -bottom-3 w-full h-0.5",e?"bg-primary-main group-data-transparent:bg-transparent":""),Lt=864e5;function Mt(e,t,n=globalThis?.localStorage){const i=l((async(...i)=>{const r=`async:${e}`,l=function(e){const{data:t=null,timestamp:n=null}=e?JSON.parse(e):{};return t&&Date.now()-n<Lt?t:void 0}(n.getItem(r));if(l)return l;const a=await t(...i);return n.setItem(r,JSON.stringify({data:a,timestamp:Date.now()})),a}),[e,t]);return Xe(e,i)}const Pt=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}},zt=u((({burgerSubMenu:e,onClick:t,defaultLocation:n="",children:a})=>{const[s]=function(e){const t=Pt(),[n,a]=i(t?.region??{name:e}),{data:s}=Mt("/api/v1/region",qe);return r((()=>{a(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[n,l((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),a(e)}),[a])]}(n);return h("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[m("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:t,children:m(Y,{image:{icon:"CloseIcon"},width:"24",height:"24",asSVG:!0})}),h("button",{className:"flex items-center text-s p-0 mb-4 bg-transparent cursor-pointer",children:[m(Y,{image:{icon:"GeolocationIcon"},width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),m(X,{color:"text-secondary-text",children:s.name})]}),a,m("div",{className:"mb-7",children:e?.map(Et)}),m(et,{className:"grow"})]})})),Et=(e,t)=>{const{icon:n,href:i,text:r}=e;return h("a",{href:i,className:"flex text-s mb-4 hover:text-primary-main",children:[n?m(Y,{className:"text-primary-main pr-1",image:n,width:"24",height:"24",asSVG:!0}):null,m("span",{className:"font-medium pl-0.5",children:r})]},`headerSubMenu-${t}`)},Ft=u((({onClick:e,bgColor:t,logo:n})=>h("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-12",children:[h("div",{className:"flex items-center",children:[m("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:m(Y,{image:{icon:"BurgerIcon",iconVersion:"bg-white"===t?"black":"white"},className:"text-primary-text w-6 h-6",width:"24",height:"24",asSVG:!0})}),m(ot,{className:"mr-8",bgColor:t,logo:n})]}),m("button",{className:"text-primary-main group-data-transparent:text-white group-data-transparent:hover:text-primary-hover text-s border-0 bg-transparent",children:"Войти"})]}))),Ht={"bg-white":"primary",transparent:"transparent"},Gt=u((({bgColor:e="bg-white",version:t=Ht[e],...n})=>{const r=ke(),a=n.options?.page?.fallback,{topItems:s,dispositions:c,defaultLocation:d,logo:u}=Qe(o.SITEMAP||"sitemap",a),p=s?.find(Bt(r)),g=p?.items,b=(e=>(t=[])=>{const n=t?.filter(Rt(e));return n?.length?de((e=>e.href?.length||0))(n):void 0})(r)(g),[x,f]=i(!1),N=l((()=>f((e=>!e))),[]);return h(I,{tag:"header",version:t,...n,children:[h("div",{className:"container px-4 py-0 box-border",children:[m(Ft,{onClick:N,bgColor:e,logo:u}),m("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-12",children:m("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:g?.map(((e,t)=>m(Dt,{className:"mr-8 whitespace-nowrap text-s",active:e===b,...e},String(t))))})})]}),x?m(zt,{onClick:N,burgerSubMenu:c,defaultLocation:d,children:m(B,{children:s?.map(((e,t)=>m(Q,{label:e.text,children:m(tt,{documents:e.items})},String(t))))})}):null]})})),Jt={XXL:{wrapper:"gap-[18px]",title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5"},XL:{wrapper:"gap-4",title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl-light"},L:{wrapper:"gap-4",title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl-light"},M:{wrapper:"gap-3",title:{headingType:"h3",as:"h3"},descriptionSize:"text-xl-light"},S:{wrapper:"gap-2",title:{headingType:"h4",as:"h4"},descriptionSize:"text-xl-light"},XS:{wrapper:"gap-2",title:{headingType:"h5",as:"h5"},descriptionSize:"text-l-light"}},Wt=u((({className:e,title:t,description:n,headlineVersion:i="XL",align:r="text-center",as:l,version:a="",...s})=>{const o=Jt[i];return h(I,{className:g("flex flex-col p-12",o.wrapper,e),version:a,...s,children:[t?m(j,{className:g("whitespace-pre-wrap",r),...o?.title,as:l||o?.title.as,title:t}):null,n?m(R,{color:"group-data-secondary:text-white/80",size:o.descriptionSize,align:r,children:n}):null]})})),Ut=u((({className:e,iconClassName:t,textClassName:n,suffixClassName:i,doc:r,icon:l})=>{const{text:a,fileSize:s,...o}=r;return h("a",{className:e,role:"link",...o,children:[l?m(Y,{className:t,image:K(l),width:"24px",height:"24px",asSVG:!0}):null,a?h("span",{className:n,children:[a,m("span",{className:i,children:o?.href&&Yt(Xt(o.href),s)})]}):null]})})),Yt=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Xt=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Kt=u((({className:e="",doc:t,icon:n})=>m(Ut,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:n}))),qt=u((({hasBorder:e=!0,documents:t,icon:n})=>m(ge,{className:"text-s text-primary-main mt-5",children:t?.length?t.map(((t,i)=>m(Kt,{className:e?"rounded-md border-gray border border-solid p-4":"",doc:t,icon:n},String(i)))):null}))),Qt=u((({hasBorder:e=!0,documents:t,icon:n})=>m("div",{className:"text-s text-primary-main flex flex-col mt-5 "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,i)=>m("div",{role:"listitem",children:m(Kt,{className:e?"rounded-md border-gray border border-solid p-4":"",doc:t,icon:n})},String(i)))):null}))),Zt=u((({className:e="",title:t,description:n,icon:i={icon:"DocIconMonoColor"},documents:r,orientation:l="vertical",hasBorder:a=!0,align:s,...o})=>h(I,{className:g("py-6 px-4 overflow-x-hidden",e),...o,children:[m(Wt,{className:"!p-0 "+(n?"gap-2":"gap-5"),title:t,description:n,align:s,headlineVersion:"M",as:"h2"}),m("vertical"===l?Qt:qt,{hasBorder:a,documents:r,icon:i})]}))),en=e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function tn(e=""){const t=en(e);return t<=4?"S":t<=8?"M":"L"}function nn(e=""){const t=en(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function rn(e=""){const t=en(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const ln=u((({className:e,title:t,description:n="Блок в разработке...",...i})=>h(I,{className:g("p-9 box-border",e,rn(e),nn(e)),...i,children:[m(Wt,{className:"!p-0 max-w-[600px]",title:t,description:n,headlineVersion:tn(e)}),m("figure",{className:"m-0 min-w-[80%]",children:an()})]}))),an=(e=3)=>on(100,e).map((e=>Math.floor(e))).map(sn),sn=(e,t)=>m("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),on=(e,t)=>[e].concat(t>0?on(e/1.618,t-1):[]),cn=(e,{className:t="",buttonClassName:n,isVertical:i}={})=>e?.length&&e.some((e=>e?.text))?m("div",{className:g("flex",i?"flex-col gap-2":"gap-4",t),children:e.map(dn(n))}):null,dn=(e="")=>(t,n)=>{const{text:i,icon:r,iconRight:l,version:a,...s}=t||{},o="secondary"===a?"color":"white";return i?m(Ve,{className:e,appendLeft:mn({...r,iconVersion:o}),appendRight:mn({...l,iconVersion:o}),version:a,text:i,...s},n?String(n):""):null},mn=e=>e?.icon||e?.src?m(Y,{image:e,width:String(e?.size?.width||24),height:String(24),asSVG:!0}):null,hn={L:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4",M:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3",S:"w-1 h-1 min-w-1 min-h-1 mr-2"},un=u((({className:e="",isDotted:t=!0,children:n,size:i="M"})=>h("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?m("div",{children:m("div",{className:`rounded-full align-middle inline-block bg-primary-text group-data-secondary:bg-white ${hn[i]}`})}):null,m("span",{children:n})]}))),pn={S:"text-l-light",M:"text-h6",L:"text-h5"},gn={S:"ml-2",M:"ml-3",L:"ml-4"},bn=u((({className:e="",hasIndent:t,isDotted:n,itemClassName:i="",items:r,listItemSize:l="M"})=>r?.length?m("section",{className:`text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${pn[l]} ${t?gn[l]:""} ${e}`,role:"list",children:r.map(((e,t)=>m(un,{className:`${i} mb-1.5`,isDotted:n,size:l,children:e},String(t))))}):null)),xn=u((({className:e="",title:t="",buttons:n,image:i,children:r})=>h("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,h("div",{className:"flex grow w-full justify-between",children:[h("div",{className:"flex flex-col justify-between w-full",children:[m("div",{className:"h-full",children:r}),n?m("div",{className:"mt-auto pt-8",children:n}):null]}),i]})]}))),fn=u((e=>{const{className:t="",icon:n,label:i,description:r,version:l="primary",benefitsVersion:a="normal"}=e,s="white"===a?"secondary":"primary";return h("div",{className:`flex gap-5 ${r?"items-start":"items-center"} ${t}`,children:[n?m("div",{className:Nn(l,a),children:m(Y,{className:"w-6 h-6",image:K(n,s),asSVG:!0})}):null,h("div",{className:"gap-0.5",children:[i?m("div",{className:"text-h6 text-primary-text group-data-secondary:text-white",children:i}):null,r?m("div",{className:"text-m-light text-secondary-text group-data-secondary:text-white",children:r}):null]})]})}));function Nn(e,t){let n="bg-primary-main text-black";return"secondary"===e?n="bg-white/30 text-black":"normal"===t&&(n="bg-secondary-light text-primary-main"),`w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${n}`}const yn=(e="primary",t="normal")=>({icon:n,label:i,description:r},l)=>m(fn,{icon:n,label:i,description:r,version:e,benefitsVersion:t},String(l)),vn=u((({className:e="",headlineVersion:t="L",benefits:n,benefitsVersion:i="normal",buttons:r,image:l,items:a,version:s="primary",isDotted:o=!0,label:c,title:d,description:u,...p})=>h(I,{className:`w-full ${e}`,version:s,...p,children:[h("div",{children:[c?kn(c):null,m(Wt,{className:"!p-0 max-w-[600px]",title:d,description:u,headlineVersion:t,align:"text-left"}),h(xn,{buttons:cn(r,{className:"mt-5",isVertical:!0}),children:[n?.filter((e=>e.label))?.length?m("div",{className:"mt-3",children:n.map(yn(s,i))}):null,a?.length?m(bn,{className:"mt-3 text-m",items:a,isDotted:o}):null]})]}),wn(l)]})));function wn(e){return e?.src?m(Y,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const kn=e=>m("div",{className:"w-fit px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid border-secondary-hover",children:m(X,{color:"text-primary-main group-data-secondary:text-white/80",children:e})}),Cn=u((e=>{const{className:t="",...n}=e;return m(I,{className:`px-4 py-6 ${t}`,...n,children:m(vn,{...e})})})),Sn={primary:{description:"!text-secondary-text text-l-light",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light",dot:"bg-secondary-text"},secondary:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},gray:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},transparent:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},"":{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"}},Tn={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-12 w-12 min-w-12 min-h-12"},$n={normal:"min-h-[70px]",small:"min-h-12"},_n=u((({className:e="",title:t,description:n,showLines:i=!0,steps:r,size:l="normal",version:a="primary",...s})=>{const o=Sn[a];return h(I,{className:`box-border px-4 py-6 flex flex-col ${e}`,version:a,...s,children:[t?m(j,{headingType:"h3",className:"text-center",title:t}):null,n?m("p",{className:`text-m-light text-center ${o.description} ${t?"mt-2":""}`,children:n}):null,r?.length?m("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:m("div",{className:"flex flex-col justify-between gap-x-[101px]",children:r.map(In(l,a,i))})}):null]})})),In=(e,t,n)=>(i,r,l)=>{const a=l.length-1===r,s="normal"===e?"ml-[34px]":"ml-6",o=Sn[t];return m("div",{children:h("div",{className:"flex flex-row text-center relative",children:[h("div",{className:"overflow-hidden flex-shrink-0",children:[An(e,t)(i,r),a?null:m("div",{className:`min-h-8 h-full w-0.5 ${n?o.iconConnector:""} ${s}`})]}),h("div",{className:`flex flex-col justify-center h-fit ${$n[e]}`,children:[i.label?m("div",{className:"text-m-title-xs font-medium m-0 text-left mb-1",children:i.label}):null,i.description?m("div",{className:`text-s ${o.description} text-left`,children:i.description}):null]})]})},String(r))},An=(e,t)=>(n,i)=>{const r="normal"===e?"38":"27",l="normal"===e?"text-m-title":"text-m-title-xs";return m("div",{className:`${Tn[e]} ${Sn[t].iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:m("span",{className:`font-medium flex self-center ${l}`,children:(a=n?.icon,Boolean(a?.icon||a?.src)?m(Y,{image:K({...n.icon},t),width:r,height:r,asSVG:!0}):m("span",{children:i+1}))})});var a},jn={Buttons:({buttons:e})=>cn(e,{className:"mt-3",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?m(Y,{image:{...e,className:"m-0"}}):null,List:({isDotted:e,...t})=>m(bn,{className:"flex flex-col justify-between items-start text-m",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>h("div",{children:[e?m("div",{className:"text-xl font-medium m-0 "+(t?"mb-1":""),children:e}):null,t?m("div",{className:"text-s text-secondary-text",children:t}):null]})},Rn=u((({title:e,icon:t})=>h("div",{className:"flex gap-2.5 mb-2",children:[e?m(j,{headingType:"h3",className:"font-medium",title:e}):null,t?m(Y,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),Bn=u((({tile:e,...t})=>h("div",{className:"rounded-md border-gray h-full box-border border p-4",children:[m(Rn,{...e?.header}),e?.data?.length?e.data.map(((e,n)=>h("div",{children:[n>0?m("div",{className:"h-5"}):null,Dn(e,t)]},String(n)))):null]})));function Dn(e,t){if(!e||!e.tableCellType||!(e.tableCellType in jn))return null;const n=jn[e.tableCellType];return m(n,{displayTable:()=>null,isVisible:!0,...e,...t})}const On=u((({tiles:e,...t})=>e?.length?m(ge,{...t,children:e.map(((e,n)=>m(Bn,{tile:e,...t},String(n))))}):null)),Vn=u((({tiles:e,...t})=>e?.length?m("div",{className:"flex flex-col gap-3.5",children:e.map(((e,n)=>m(Bn,{tile:e,...t},String(n))))}):null)),Ln=u((({className:e,title:t,description:n,tariffsColumns:i,rowHeaders:r,orientation:l="vertical",...a})=>{const s=Mn(i),o=Pn(r,s);return h("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[t?m(j,{headingType:"h2",className:`text-center ${n?"mb-2":"mb-5"}`,title:t}):null,n?m("div",{className:"mb-5 text-center text-m",children:n}):null,m("vertical"===l?Vn:On,{tiles:o,...a})]})})),Mn=e=>e?.[0]?.data?e[0].data:[],Pn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),zn={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"},secondary:{background:"bg-primary-main",icon:"bg-white text-primary-main",title:"text-white",description:"text-white"},"secondary-light":{background:"bg-primary-main/10",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"}},En=u((({title:e,description:t,blockVersion:n="primary",iconVersion:i,image:r,className:l="",items:a,isDotted:s=!0})=>{const o=zn[n];return h("section",{className:`font-sans px-4 py-[18px] flex flex-col ${o.background} ${l}`,children:["small"===i?Fn(o.icon):null,"big"===i?Hn(r):null,h("div",{className:"py-0.5",children:[e?m("div",{className:`text-l font-medium mb-1 ${o.title}`,children:e}):null,t?m("div",{className:`text-s ${o.description}`,children:t}):null,a?.length?m(bn,{className:"mt-1 text-m",items:a,isDotted:s}):null]})]})}));function Fn(e){return m("div",{className:"mb-3",children:m("div",{className:`rounded-full h-4 w-4 text-center text-xs-light ${e}`,children:"i"})})}function Hn(e){return e?.src?m(Y,{className:"pb-3 mr-auto",image:e}):null}const Gn={Accordion:D,AccordionItem:Q,ComparisonTable:We,Footer:wt,Gallery:Ct,Header:Gt,Headline:Wt,LinkDocs:Zt,LinkList:tt,MobileAppTile:ct,ProductBlock:Cn,StepsBlock:_n,TariffsTable:Ln,TextBlock:En,Placeholder:ln},Jn=["Header","Footer"],Wn=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Un(e=$.inst,t=globalThis){const n=s(new Map);r((()=>e.eventBus.subscribe("intersection",(({block:e,intersection:t})=>{n.current&&n.current.set(e,t)}))),[e]),r((()=>{const i=((e,t=600)=>{let n;const i=(...r)=>{i.dispose(),n=setTimeout((()=>{e(...r)}),t)};return i.dispose=()=>{n&&clearTimeout(n)},i})((()=>{if(!(globalThis.scrollY>3*globalThis.innerHeight/4))return void e.reset();const t=function(e){const t=e.filter((([e])=>!Jn.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[n]=t.length>0?me(Wn)(t):[];return n}([...n.current||[]]);t?.anchor?e.replace(t.anchor):t||e.reset()}),100);return t.addEventListener("scroll",i),()=>{i.dispose(),t.removeEventListener("scroll",i)}}),[e,t])}const Yn=d();const Xn=u((({className:e,onClick:t,ariaLabel:n})=>m("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:Kn()}))),Kn=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),m("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},qn=u((({className:e=""})=>{const t=function(e){const[t,n]=i(0);return r((()=>{(async()=>{const[t]=await Yn.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:l((async()=>{n(await Yn.like(e))}),[e]),dislike:l((async()=>{n(await Yn.dislike(e))}),[e])}}(ke().pathname);return h("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e}`,children:[m(Xn,{onClick:we(t.like),ariaLabel:"Поставить отметку «лайк»"}),m(Xn,{onClick:we(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),m("span",{className:"select-none",children:t.likeCount})]})})),Qn=u((e=>{const{className:t="",blocksRegistry:n,blockDecorator:i,data:r={}}=e,{style:l,blocks:a,slots:s,likeControl:o,colorPalette:c="pc"}=r,d={key:"",page:r,blocksRegistry:n,blockDecorator:i,parent:r};return Un(),h("section",{className:g("relative",l,t),"data-theme":c,children:[s?.header?m("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:y(s?.header,{...d,slotName:"header"})}):null,h("div",{className:"container grid grid-cols-12 gap-1",children:[y(a,d),s?.footer?y(s?.footer,{...d,slotName:"footer"}):null]}),o?m("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:m(qn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));Qn.childrenTypes=[],Qn.slots=()=>["header","footer"];e.Blocks=Gn,e.ContentPage=Qn,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=d,e.handlerDecorator=we,e.joinList=function(e){return t=>t.reduce(((t,n,i)=>t.length?t.concat({...e,key:i},n):[n]),[])},e.packageVersion="0.7.5",e.projectSettings=o,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=ve,e.useRouter=ke,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),i=n("useState"),r=n("useEffect"),l=n("useCallback"),a=n("useMemo"),s=n("useRef");const o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CDN(){return this._.CDN}get BASE_PATH(){return this._.BASE_PATH&&!this._.BASE_PATH.endsWith("/")?`${this._.BASE_PATH}/`:this._.BASE_PATH}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},c="likesToken";function d(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(c)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:n}=await e.json();return globalThis.localStorage?.setItem(c,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:t})}),{likes:i}=await e.json();return i||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:i}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:i},body:JSON.stringify({node_id:t,user_name:i})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:n,name:i}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:i},body:JSON.stringify({node_id:t,user_name:i})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}}}}const m=(...e)=>globalThis._uni._jsx(...e),h=(...e)=>globalThis._uni._jsxs(...e),u=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:p(e)),t._tmpl},p=e=>{function t(t,n){const{children:i,...r}=t||{},l=n?.slots?.default,a=i||l&&l();return e(Object.assign(r,a&&{children:a}),n)}return t.inheritAttrs=!1,t},g=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),b=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),x=[];function f(e,t){const{key:n,blockDecorator:i=b,blocksRegistry:r={},ancestors:l=x,className:a=""}=t,{type:s}=e;s&&s in r||console.warn(`No block with "${s}" is registered`);const o=s&&r[s];return i({blockClassName:g("scroll-mt-12",a,e.style||"col-span-12"),block:e,ancestors:l,render:({block:i,blockClassName:r})=>{const{content:l}=i;return o?m(o,{className:r,block:e,options:t,...l},n):null}},n)}const N=[],y=(e,{key:t,ancestors:n=N,slotName:i=null,renderChild:r=f,...l})=>(e||[]).map(((e,a)=>r(e,{...l,key:`${t||e.type}-${a}`,ancestors:l.parent?[...n||N,[l.parent,i]]:n})));function v({children:e,block:t,options:n,renderChild:i}){return e||(t&&n?y(t.blocks,{...n,parent:t,renderChild:i}):null)}class w{static inst=new w;subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}function k(e,{sensitivity:t,rootRef:n}={}){const i=s(null),l=a((()=>({threshold:C(t),root:n?.current})),[t,n?.current]);return r((()=>{if(!i.current)return;const t=new IntersectionObserver(e,l);return t.observe(i.current),()=>{t.disconnect()}}),[e,l]),i}function C(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const S=e=>e?.replace("#",""),T=e=>`${globalThis.location?.pathname}#${S(e)}`;class ${static inst=new $;eventBus=new w;constructor(){const e=S(globalThis.location?.hash);e&&this.eventBus.subject("goto",{anchor:e})}goto(e){const t=S(e);t&&(this.push(t),this.eventBus.fire("goto",{anchor:t}))}push(e){globalThis.history?.pushState(null,"",T(e))}replace(e){globalThis.history?.replaceState(null,"",T(e))}reset(){globalThis.history?.replaceState(null,"",T())}}const _={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},I=u((({className:e="",version:t="primary",block:n,tag:a="section",role:s,children:o})=>{const c=a,d=function(e,t=$.inst){const n=k(l((n=>{if(!e||!n?.length)return;const i=n[n.length-1];t.eventBus.fire("intersection",{block:e,intersection:i})}),[e,t]),{sensitivity:1});return r((()=>{if(n.current)return t.eventBus.subscribe("goto",(({anchor:t})=>{n.current&&e?.anchor===t&&n.current.scrollIntoView({behavior:"smooth",block:"start"})}))}),[e,t]),n}(n),[h,u]=i(!0);return r((()=>w.inst.subscribe("tab",(e=>{if("group"===e.type){const t=n?.labels?.length||n?.anchor;u(!e.label||(!t||Boolean(n?.labels?.includes(e.label))))}else u(!0)}))),[n]),h?m(c,{className:g("group",_[t],e),...t?{"data-ver":t}:{},...n?.anchor?{id:n.anchor,ref:d}:{},role:s,children:o}):null})),A={h0:"text-m-title",h1:"text-m-title",h2:"text-m-title",h3:"text-h6",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},j=u((e=>{const{className:t,headingType:n="h3",title:i,as:r="h3"}=e;return m(r,{className:`font-sans font-medium m-0 ${A[n]} ${t||""}`,children:i})})),R=u((({children:e,...t})=>m("p",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),B=u((({children:e})=>m("ul",{className:"list-none m-0 p-0",children:e}))),D=u((({title:e,description:t,className:n="",...i})=>h(I,{className:`py-6 px-4 ${n}`,...i,children:[e?m(j,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?m("div",{className:"mb-5",children:m(R,{size:"text-m",font:"font-light",align:"text-center",children:t})}):null,m(B,{children:v(i)})]})));D.childrenTypes=["AccordionItem"];const O=u((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:r,renderFoldButton:a})=>{const[s,o]=i(n),c=l((()=>{o((e=>!e))}),[]),d=r({isUnfolded:s,onToggle:c}),m=a?a({isUnfolded:s,onToggle:c}):null;return h("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),V=u((({className:e="",isUnfolded:t,children:n})=>{const i=s(null);return r((()=>{i.current&&(i.current.style.maxHeight=t?`${i.current.scrollHeight}px`:"")}),[t,n?.length]),m("div",{ref:i,className:`transition-max-h duration-300 overflow-hidden ${i.current||!t?"max-h-0":""} ${e}`,children:n})})),L={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},M=u((({className:e="",imageClassName:t="",name:n="",alt:i=`Иконка ${n}`,title:r=i,iconVersion:l="color",asSVG:a,...s})=>{const c=`${o.CDN||""}icons/${n}.svg`;return a&&"normal"!==l?m(z,{className:e,children:h("svg",{className:g(P(s.width),L[l],"white"===l?"invert":"",t),...s,"aria-hidden":"true",children:[r?m("title",{children:r}):null,i?m("desc",{children:i}):null,m("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):m("img",{className:e,src:c,alt:i,title:r,...s,"aria-hidden":"true"})})),P=e=>e?"":"w-full h-full",z=u((({className:e,children:t})=>e?m("div",{className:e,children:t}):t)),E=(e,t)=>e.media&&t.media?e.media-t.media:0,F=u((({className:e="",image:t,imageClassName:n="",isMobile:i=!1,pathPrefix:r})=>{if(!t||!t?.sources&&!t?.src)return null;return h("picture",{className:`${i?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(E).map((({src:e,format:n,media:i},l)=>m("source",{srcSet:J(e,r),type:W(n),media:i?`(max-width: ${i}px)`:"",...t.size},`${l}_${e}`))):null,H({...t,src:G(t.src,r)},n,i)]})})),H=(e,t="",n=!1)=>{const i={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},r=e.title||"",l=e.alt||e.title,a=n?"m-auto":"m-0";return m("img",{src:e.src,className:`${a} ${t}`,alt:l,title:r,style:i,...e.size})},G=(e,t)=>!e||e?.startsWith("data:image")?e:`${((e="")=>e&&!e.endsWith("/")?`${e}/`:e)(t)}${e}`,J=(e,t)=>e?.split(",").map((e=>G(e.trim(),t))).join(", ");function W(e){return e?`image/${String(e)}`:void 0}const U=u((({className:e="",image:t,imageClassName:n="",isMobile:i,pathPrefix:r,...l})=>t?.src||t?.icon?t.icon?m(M,{className:e,imageClassName:n,iconVersion:t?.iconVersion||"normal",name:t.icon,...l}):m(F,{className:e,imageClassName:n,image:t,isMobile:i,pathPrefix:r}):null)),Y=u((e=>m(U,{...e,isMobile:!0}))),X=u((({children:e,...t})=>m("span",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),K=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),q=["PlusIcon","MinusIcon"],Q=u((({className:e="",label:t="",labelIcon:n,isExpanded:i,...r})=>{const{bordered:l}=function(e,t){const{content:n}=function(e){return e?.parent||{}}(e);return n||t}(r.options,{});return m("li",{className:`${l?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0"} border-solid border-main-divider ${e}`,children:m(O,{isFoldButtonOnTop:!0,unfoldedByDefault:i,renderFoldableSection:({isUnfolded:e})=>m(V,{className:"flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0",isUnfolded:e,children:v(r)}),renderFoldButton:({isUnfolded:e,onToggle:i})=>m(Z,{className:l?"":"py-3.5 px-0",label:t,icon:q[Number(e)],primaryIcon:n,onClick:i})})})}));Q.childrenTypes=[];const Z=u((({className:e,icon:t,label:n,primaryIcon:i,onClick:r})=>h("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text group cursor-pointer ${e}`,onClick:r,children:[h("div",{className:"flex group-hover:text-primary-main",children:[i?m(Y,{image:K(i),className:"mr-3 flex-shrink-0",width:"24",height:"24",asSVG:!0}):null,m(X,{size:"text-m-title-xs",font:"font-medium",children:n})]}),m(Y,{className:"flex-shrink-0",image:K({icon:t}),width:"24",height:"24",asSVG:!0})]}))),ee=u((({className:e="",style:t,idx:n,activeIndex:i,observerOptions:r,children:a,onIntersection:s})=>{const o=k(l((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),r);return m("div",{className:`inline-block snap-always box-border ${e}`,style:t,role:"listitem","aria-current":Boolean(n===i),ref:o,children:a})})),te=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],ne=u((({className:e="",containerRef:t,activeIndex:n,visibleItemCount:i=0,gap:r=0,padding:a=0,listType:o="horizontal-list",snapAlign:c="snap-center",children:d,onVisibleItemsChange:h,onVisibleIndicesChange:u})=>{const p={sensitivity:1,rootRef:t},b=s([]),x=l(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,h&&h(n),u&&u(re(n))}),[h,u]),f=i>0?r*Number(i)-1:0,N="vertical-list"===o,y="horizontal-list"===o,v={...y?ie(a,f):{},...N?le(t):{},gap:`${r}px`};return m("div",{className:g("box-border overflow-auto no-scrollbar",o,e),style:v,role:"list",ref:t,children:(w=(e,t)=>m(ee,{className:g(c,i?te[i-1]:""),style:y?ie(a/4):{},activeIndex:n,idx:t,observerOptions:p,onIntersection:x,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(w):w(e,0))(d)});var w})),ie=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),re=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),le=e=>({height:e?.current?.firstElementChild?.clientHeight||0}),ae={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},se={"horizontal-list":"w-6","vertical-list":"h-6"},oe=u((({containerRef:e,activeIndex:t,dotCount:n=0,listType:i="horizontal-list"})=>n?m("div",{className:`flex gap-2 ${ae[i]}`,children:new Array(n).fill(null).map(((n,r)=>m("div",{className:`cursor-pointer bg-primary-main rounded-full transition-width duration-300 group-data-secondary:bg-white ${r===t?se[i]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(n=>{n!==t&&e?.current&&e.current.children[n]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(r)},String(r))))}):null)),ce=e=>e,de=(e=ce)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),me=(e=ce)=>de((t=>-e(t))),he=e=>t=>e.scrollWidth/t,ue=e=>(t,n)=>{e.scrollBy({left:n*he(e)(t),behavior:"smooth"})},pe=({itemCount:e,isCyclic:t,onVisibleIndicesChange:n})=>{const r=s(null),[a,o]=i([]),c=l((e=>{o((t=>{return(n=t)===(i=e)||Boolean(n&&i&&n?.length===i?.length&&n.every(((e,t)=>e===i[t])))?t:e;var n,i})),n&&n(e)}),[e]),[d,m]=a.length?[me()(a),de()(a)]:[-1,-1],h=d>0,u=m<e-1,p=l((()=>{var n;r.current&&(t&&!h?(n=r.current).scrollTo({left:n.scrollWidth,behavior:"smooth"}):ue(r.current)(e,-1))}),[t,e,h]),g=l((()=>{r.current&&(t&&!u?r.current.scrollTo({left:0,behavior:"smooth"}):ue(r.current)(e,1))}),[e,t,u]);return[r,{scrollLeft:p,scrollRight:g,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},ge=u((({className:e="",gap:t=14,padding:n=16,showDots:i=!0,children:r,onVisibleIndicesChange:l,listType:a="horizontal-list"})=>{const s=Array.isArray(r)?r.length:0,[o,c]=pe({itemCount:s,onVisibleIndicesChange:l}),[d]=c.visibleIndicesRange;return h("div",{className:g(e,"vertical-list"===a?"relative h-full":""),children:[m(ne,{containerRef:o,activeIndex:d,visibleItemCount:1,gap:t,padding:n,onVisibleIndicesChange:c.handleVisibleIndicesChange,listType:a,children:r}),i?m(oe,{containerRef:o,activeIndex:d,dotCount:s,listType:a}):null]})}));const be=e=>e?.includes("//"),xe=e=>(e||"").replace(/\/?\?.*/,""),fe=e=>{if(!e||!be(e))return;const t=e,n=t.indexOf("//"),i=t.indexOf("/",n+"//".length);return-1!==i?t.substring(0,i):t},Ne=e=>{if(!e||!be(e))return;return new URL(e).pathname},ye=e=>e?.startsWith("#");var ve=Object.freeze({__proto__:null,isURL:be,withoutQuery:xe,getOrigin:fe,getPathname:Ne,getHash:e=>{if(!e||!be(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:ye});const we=(e,t)=>we._impl(e,t);function ke(){return ke._impl()}function Ce(){const e=ke(),t=$.inst;return n=>{const i=((e,t)=>{if(!e)return e;const n=fe(t?.href);return n?e.replace(n,"")||"/":e})(n.href,e);return{...n,href:i,"aria-label":n.text,onClick:we((r=>{n.onClick&&n.onClick(r),Se(i,n.target)||(r?.preventDefault(),ye(i)?t.goto(i):i&&e.push(i))}),n)}}}we._impl=e=>e,we.setup=e=>{we._impl=e},ke._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),ke.setup=e=>{ke._impl=e};const Se=(e,t)=>be(e)||t&&"_self"!==t||e?.startsWith("/"),Te={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"","":""},$e="bg-main-divider text-main-disabled",_e={primary:$e,secondary:$e,white:$e,link:"",transparent:"","":""},Ie="text-center font-sans select-none",Ae={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"","":""},je=u((e=>{const{text:t,aboveText:n,appendLeft:i,appendRight:r,version:l="primary"}=e;return h("div",{className:Re(e),children:[i?m("div",{className:Ae[l],children:i}):null,Be(e)?h("div",{children:[n?m("div",{className:"text-xs-light text-left",children:n}):null,m("div",{className:"text-left "+(n?"text-s -mt-0.5":"text-l"),children:t})]}):null,r?m("div",{className:Ae[l],children:r}):null]})})),Re=e=>{const{version:t,aboveText:n,rounded:i}=e;if("link"===t)return"";const r="gap-2 "+(n?"py-2.5 px-7":"py-4 px-4");return["group/btn flex items-center justify-center",Be(e)?r:"h-12 w-12",i?"rounded-full":""].join(" ")},Be=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),De=({className:e,rounded:t,version:n})=>["inline-block",Ie,n?_e[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Oe=({className:e,rounded:t,version:n})=>[Ie,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border",n?Te[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ve=u((({disabled:e,children:t,...n})=>{const i=Ce()(n),r=t??m(je,{...i});return m(e?Me:Le,{...i,children:r})})),Le=u((({className:e="",href:t,rel:n,target:i,ariaLabel:r,version:l,rounded:a,onClick:s,children:o})=>m("a",{className:Oe({className:e,version:l,rounded:a}),href:t,rel:n,target:i,"aria-label":r,role:t?"link":"button",onClick:s,children:o}))),Me=u((({className:e,ariaLabel:t,version:n,rounded:i,children:r})=>m("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:De({className:e,rounded:i,version:n}),children:r}))),Pe=(e=!1)=>e?"text-white":"",ze=(e=!1)=>"text-s mb-3.5 "+(e?"text-white":"text-secondary-text/80"),Ee=u((({icon:e,image:t,title:n,subtitle:i,isFillGradient:r})=>h("div",{role:"columnheader",children:[e?m(Y,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}):null,t?.src&&m("div",{className:"mb-3.5",children:m(Y,{image:t})}),n?m(j,{headingType:"h4",className:Pe(r),title:n}):null,i?m("div",{className:ze(r),children:i}):null]}))),Fe=u((({cell:e,rowHeader:t,isFillGradient:n=!1})=>m("div",{className:"box-border flex flex-col",role:"cell",children:m("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(He(n,t))})}))),He=(e,t)=>({label:n,description:i},r)=>h("div",{className:"flex justify-between text-s py-3.5",children:[m("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),h("div",{className:"basis-1/2",children:[n?m("div",{className:"text-right "+(e?"text-white":""),children:n}):null,i?m("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:i}):null]})]},String(r)),Ge=u((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:i,showRow:r,onToggleColumn:l})=>{const a=t?.slice(0,r?t.length:n),s=i?"secondary":"primary";return h("div",{className:`border border-gray rounded-md p-4 mb-3.5 ${i?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[m(Ee,{...e,isFillGradient:i}),a?.length?a.map((({rowHeader:e,cell:t},n)=>m(Fe,{cell:t,rowHeader:e,isFillGradient:i},String(n)))):null,r&&e?.link?m(Ve,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-4 py-[11px]",children:e.link.text}):null,Je({onToggleColumn:l,isFillGradient:i,showRow:r})]})})),Je=({onToggleColumn:e,isFillGradient:t,showRow:n})=>m("div",{className:"mt-5",role:"cell",children:m("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:n?"Скрыть":"Показать описание"})}),We=u((e=>{const{className:t,title:n}=e;return h("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${t||""}`,children:[n?m(j,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:n}):null,m("div",{role:"table",children:m(Ue,{...e})})]})})),Ue=u((({columns:e=[],rowHeaders:t,isColoredFirstColumn:n,visibleRowLength:r,orientation:a,...s})=>{const[o,c]=i(new Array(e.length).fill(!r)),d=l((e=>{const t=(t,n)=>n===e?!t:t;c((e=>e.map(t)))}),[]),h=l((()=>c((e=>new Array(e.length).fill(!1)))),[]),u=e?.map((({data:e,header:i},l)=>{return m(Ge,{visibleRowLength:r,showRow:o[l],header:i,columnData:(a=e,a?.map(((e,n)=>({cell:e,rowHeader:t?.[n]?.title})))),isFillGradient:0===l&&n,onToggleColumn:()=>d(l),...s},String(l));var a}));return"horizontal"===a?m(ge,{onVisibleIndicesChange:h,children:u}):u})),Ye=new Map;function Xe(e,t,{fallback:n}={}){const l=a((()=>Ke(e)),[e]),[s,o]=i(),[c,d]=i(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};r((()=>{if(!l.every((e=>null===e)))try{const e=t(...l);"then"in e?(e=>{e.then((e=>Ye.get(l)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...l]);const u=l[0],p=n&&"string"==typeof u&&n[u];return{data:s||c||!p?s:p,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function Ke(e){return e?Array.isArray(e)?e:e instanceof Function?Ke(e()):[e]:[e]}async function qe(e,t){const n=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await n.json()}function Qe(e,t={}){const{data:n}=Xe(`/wcms-resources/${e}.json`,qe,{fallback:t});return n||{}}const Ze=u((({className:e,isMobile:t=!1})=>{const{term:n,setTerm:r}=(()=>{const[e,t]=i("");return{term:e,setTerm:e=>t(e)}})(),l=t?"text-s":"text-l-light",a=t?" placeholder-transparent":"h-full",s=t?"some search":void 0;return h("form",{className:`font-sans relative ${e}`,children:[h("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[m("div",{className:t?"w-5 h-5":"w-6 h-6",children:m(Y,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),n?null:m("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${l}`,children:"Поиск по сайту"})]}),m("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text ${a}`,value:n,onChange:e=>r(e.target.value),type:"text",name:"search-bar-input",placeholder:s}),t?m("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),r("")},children:m(Y,{image:{icon:"CloseIcon"},width:"24",height:"24"})}):m(Ve,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-[3px] right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:m("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),et=u((e=>m(Ze,{...e,isMobile:!0}))),tt=u((({className:e="",documents:t,...n})=>m(I,{className:`mt-2.5 ${e}`,...n,children:m("ul",{className:"flex flex-col text-s text-secondary-text p-0",children:t?.length?nt(t):null})}))),nt=e=>e.map(((e,t)=>{const{text:n,...i}=e;return m("li",{className:"mb-4 list-none",children:m("a",{className:"hover:text-primary-main",role:"link",...i,children:n||null})},`list_item_${String(t)}`)})),it={"bg-white":"color",transparent:"white"},rt={"bg-white":"text-primary-main",transparent:"text-white"},lt=(e,t,n)=>m(Y,t?.src?{image:t,className:rt[e],width:n?.width,height:n?.height,pathPrefix:"/wcms-resources/",asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:it[e]},className:rt[e],width:n?.width,height:n?.height,asSVG:!0}),at={"bg-white":"text-primary-text",transparent:"text-white"},st=(e,t,n)=>m("span",{className:`${at[t]} ml-2.5 font-medium ${n||""}`,children:e||"Россельхозбанк"}),ot=u((({bgColor:e="bg-white",children:t,className:n="",href:i,logo:r,showTitle:l=!0,targetBlank:a})=>h("a",{className:`inline-flex items-center font-sans no-underline ${n}`,href:i||"https://rshb.ru/",target:a?"_blank":"_self","aria-label":r?.title||"Россельхозбанк",children:[lt(e,r?.image,{width:"34",height:"34"}),l?st(t||r?.title,e,"text-s"):null]}))),ct=u((({className:e="",title:t="Мобильное приложение",description:n,href:i="#"})=>m("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${e}`,children:i?h("div",{className:"flex",children:[m("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-12 h-12",children:m(ot,{className:"w-8",bgColor:"transparent",showTitle:!0})}),h("a",{href:i,target:"_blank",className:"flex flex-col justify-center pl-3",children:[m("div",{className:"text-s font-medium mb-[3px]",children:t}),m("div",{className:"text-s text-secondary-text",children:n})]})]}):null}))),dt=u((({className:e="",items:t,hasButton:n})=>h("div",{className:e,children:[t?.length?t.map(mt):null,n?m(Ve,{version:"primary",className:"mb-6 w-full",href:"/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),mt=(e,t)=>{const{type:n,text:i,description:r}=e;return h("div",{className:"mb-4",children:[m("div",{children:ht(n,i)}),m("div",{className:"mt-1 text-s-light text-secondary-text",children:r})]},String(t))},ht=(e,t="")=>{switch(e){case"tel":return m("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${ut(t)}`,children:t});case"email":return m("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return m("span",{children:t})}},ut=e=>e.replaceAll(/\D/g,""),pt=u((({className:e="",index:t,text:n,...i})=>{const r=Ce(),{href:l,target:a,onClick:s}=r(i);return m("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:l,target:a,onClick:s,children:n||`Документ ${t}`})})),gt=u((({title:e,links:t,className:n=""})=>h("div",{className:n,children:[m("span",{className:"text-primary-text text-s font-medium",children:e}),t?.length?m("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>m(pt,{index:t,className:"text-s",...e},String(t))))}):null]}))),bt=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],icon:{icon:"YoutubeIcon"},label:"Youtube"}],xt={default:"w-14 h-14",small:"w-12 h-12"},ft=u((({isRounded:e=!1,buttonSize:t="default",iconVersion:n="color",...i})=>{const r=Ce(),{href:l,onClick:a}=r(i),{icon:s,label:o}=bt.find((({origins:e})=>e.some((e=>l?.includes(e)))))||{},c=s?{...K(s),iconVersion:n}:null;return s?m("a",{className:g("group/media flex items-center justify-center box-border",xt[t],e?"rounded-full":"rounded-md","border-solid border border-main-divider hover:border-transparent","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white group-data-secondary:hover:bg-secondary-hover"),href:l,"aria-label":o,target:"_blank",rel:"noopener noreferrer",onClick:a,children:c?m(Y,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24",asSVG:!0}):null}):null})),Nt=u((({className:e="",media:t})=>m("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e}`,children:t?.map(((e,t)=>m(ft,{...e},String(t))))}))),yt=u((({className:e="",index:t,...n})=>{const i=Ce(),{href:r,target:l,text:a,onClick:s}=i(n);return m("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:r,target:l,onClick:s,children:a||`Документ ${t}`})})),vt=u((({className:e="",links:t})=>h("div",{className:e,children:[m("div",{className:"py-6",children:m("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?m("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>m(yt,{index:t,...e},String(t))))}):null]}))),wt=u((({className:e="",...t})=>{const n=t.options?.page?.fallback,i=Qe(o.SITEMAP||"sitemap",n),{documents:r,relatedEnterprises:l,contacts:a,socialMedia:s,horizontalNavigationTitle:c}=Qe(o.FOOTER||"footer",n);return h("footer",{className:`font-sans px-4 py-[26px] bg-white ${e}`,children:[m(dt,{className:"overflow-hidden",items:a,hasButton:!0}),m(B,{children:i.topItems?.map(((e,t)=>m(Q,{label:e.text,children:m(tt,{documents:e.items})},String(t))))}),m("div",{children:i?.dispositions?.map(kt)}),m(ct,{title:"Мобильное приложение",description:"Загрузить для IOS и Android",...t}),m(et,{className:"grow"}),m(Nt,{className:"pb-4",media:s}),m(gt,{title:c,links:l}),m(vt,{links:r})]})})),kt=(e,t)=>{const{icon:n,href:i,text:r}=e;return h(Ve,{version:"link",href:i,className:"flex text-s mb-4 w-6",children:[n?m(Y,{className:"pr-1",image:K(n),width:"24",height:"24",asSVG:!0}):null,m("span",{className:"pl-2.5 font-medium text-primary-text",children:r})]},`footer-${t}`)},Ct=u((({className:e="",title:t,description:n,cards:i=[],orientation:r="horizontal",...l})=>h(I,{className:`relative px-4 py-6 overflow-hidden ${e}`,...l,children:[h("div",{className:"flex flex-col items-center mb-5",children:[t?m(j,{headingType:"h3",className:"text-center "+(n?"mb-2":"mb-5"),title:t}):null,n?m("div",{className:"text-m max-w-[600px] text-center mb-5",children:n}):null]}),St(r,i)]})));function St(e,t){return"horizontal"===e?m(ge,{children:t?.map(Tt)}):m("div",{className:"grid gap-3.5",children:t?.map(Tt)})}function Tt(e,t){return h("div",{className:`w-full h-full flex flex-col justify-between shrink-0 box-border snap-start snap-always border-solid border rounded-md border-gray p-4\n ${_[e.version??"primary"]}`,children:[h("div",{children:[$t(e.icon),e.title?m("h3",{className:"text-m-title-xs font-medium m-0",children:e.title}):null,e.description?_t(e):null,e.items?.length?At(e.items,e.isDotted,e.version):null]}),e?.button?.text?(n=e.button,m(Ve,{className:"mt-3",...n})):null]},t);var n}const $t=e=>e?.src||e?.icon?m("div",{className:"flex justify-center",children:m(Y,{className:"mb-3.5",image:e})}):null;function _t(e){return m("div",{className:"text-secondary-text mt-1 text-s "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}const It={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-primary-text",transparent:"","":""};function At(e,t,n="primary"){return m("section",{className:"mt-3",children:e.map(((e,i)=>h("div",{children:[t?m("div",{className:`rounded-full inline-block mr-3 mt-2 w-2 h-2 min-w-2 min-h-2 ${It[n]}`}):null,m("span",{className:"text-m font-medium",children:e.title}),m("span",{className:"text-s pl-2 "+("primary"===n?"text-secondary-text":""),children:e.text})]},String(i))))})}const jt=(e,t,n=((e,t)=>t.startsWith(e)))=>n(xe((e=>be(e)||e?.startsWith("/")?e:`${o.BASE_PATH||""}${e}`)(e)),xe(be(e)?t.href:Ne(t.href))),Rt=e=>t=>jt(t.href,e),Bt=e=>t=>t.items?.some(Rt(e))||jt(t.href,e)||((e,t)=>[fe(e),fe(t.href)].every(((e,t,n)=>Boolean(e)&&e===n[0])))(t.href,e)||Boolean(o.BASE_PATH?.startsWith(t.href||"/")),Dt=u((({className:e="",active:t,dataItemName:n,children:i,...r})=>{const l=Ce(),{href:a,target:s,text:o,onClick:c}=l(r);return h("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:a,target:s,"data-item-name":n,onClick:c,children:[m("span",{className:Ot(t),children:o||i}),t?m("div",{className:Vt(t)}):null]})})),Ot=(e=!1)=>g("font-sans text-s",e?"text-primary-main":"text-secondary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Vt=(e=!1)=>g("absolute left-0 -bottom-3 w-full h-0.5",e?"bg-primary-main group-data-transparent:bg-transparent":""),Lt=864e5;function Mt(e,t,n=globalThis?.localStorage){const i=l((async(...i)=>{const r=`async:${e}`,l=function(e){const{data:t=null,timestamp:n=null}=e?JSON.parse(e):{};return t&&Date.now()-n<Lt?t:void 0}(n.getItem(r));if(l)return l;const a=await t(...i);return n.setItem(r,JSON.stringify({data:a,timestamp:Date.now()})),a}),[e,t]);return Xe(e,i)}const Pt=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}},zt=u((({burgerSubMenu:e,onClick:t,defaultLocation:n="",children:a})=>{const[s]=function(e){const t=Pt(),[n,a]=i(t?.region??{name:e}),{data:s}=Mt("/api/v1/region",qe);return r((()=>{a(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[n,l((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),a(e)}),[a])]}(n);return h("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[m("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:t,children:m(Y,{image:{icon:"CloseIcon"},width:"24",height:"24",asSVG:!0})}),h("button",{className:"flex items-center text-s p-0 mb-4 bg-transparent cursor-pointer",children:[m(Y,{image:{icon:"GeolocationIcon"},width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),m(X,{color:"text-secondary-text",children:s.name})]}),a,m("div",{className:"mb-7",children:e?.map(Et)}),m(et,{className:"grow"})]})})),Et=(e,t)=>{const{icon:n,href:i,text:r}=e;return h("a",{href:i,className:"flex text-s mb-4 hover:text-primary-main",children:[n?m(Y,{className:"text-primary-main pr-1",image:n,width:"24",height:"24",asSVG:!0}):null,m("span",{className:"font-medium pl-0.5",children:r})]},`headerSubMenu-${t}`)},Ft=u((({onClick:e,bgColor:t,logo:n})=>h("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-12",children:[h("div",{className:"flex items-center",children:[m("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:m(Y,{image:{icon:"BurgerIcon",iconVersion:"bg-white"===t?"black":"white"},className:"text-primary-text w-6 h-6",width:"24",height:"24",asSVG:!0})}),m(ot,{className:"mr-8",bgColor:t,logo:n})]}),m("button",{className:"text-primary-main group-data-transparent:text-white group-data-transparent:hover:text-primary-hover text-s border-0 bg-transparent",children:"Войти"})]}))),Ht={"bg-white":"primary",transparent:"transparent"},Gt=u((({bgColor:e="bg-white",version:t=Ht[e],...n})=>{const r=ke(),a=n.options?.page?.fallback,{topItems:s,dispositions:c,defaultLocation:d,logo:u}=Qe(o.SITEMAP||"sitemap",a),p=s?.find(Bt(r)),g=p?.items,b=(e=>(t=[])=>{const n=t?.filter(Rt(e));return n?.length?de((e=>e.href?.length||0))(n):void 0})(r)(g),[x,f]=i(!1),N=l((()=>f((e=>!e))),[]);return h(I,{tag:"header",version:t,...n,children:[h("div",{className:"container px-4 py-0 box-border",children:[m(Ft,{onClick:N,bgColor:e,logo:u}),m("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-12",children:m("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:g?.map(((e,t)=>m(Dt,{className:"mr-8 whitespace-nowrap text-s",active:e===b,...e},String(t))))})})]}),x?m(zt,{onClick:N,burgerSubMenu:c,defaultLocation:d,children:m(B,{children:s?.map(((e,t)=>m(Q,{label:e.text,children:m(tt,{documents:e.items})},String(t))))})}):null]})})),Jt={XXL:{wrapper:"gap-[18px]",title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5"},XL:{wrapper:"gap-4",title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl-light"},L:{wrapper:"gap-4",title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl-light"},M:{wrapper:"gap-3",title:{headingType:"h3",as:"h3"},descriptionSize:"text-xl-light"},S:{wrapper:"gap-2",title:{headingType:"h4",as:"h4"},descriptionSize:"text-xl-light"},XS:{wrapper:"gap-2",title:{headingType:"h5",as:"h5"},descriptionSize:"text-l-light"}},Wt=u((({className:e,title:t,description:n,headlineVersion:i="XL",align:r="text-center",as:l,version:a="",...s})=>{const o=Jt[i];return h(I,{className:g("flex flex-col p-12",o.wrapper,e),version:a,...s,children:[t?m(j,{className:g("whitespace-pre-wrap",r),...o?.title,as:l||o?.title.as,title:t}):null,n?m(R,{color:"group-data-secondary:text-white/80",size:o.descriptionSize,align:r,children:n}):null]})})),Ut=u((({className:e,iconClassName:t,textClassName:n,suffixClassName:i,doc:r,icon:l})=>{const{text:a,fileSize:s,...o}=r;return h("a",{className:e,role:"link",...o,children:[l?m(Y,{className:t,image:K(l),width:"24px",height:"24px",asSVG:!0}):null,a?h("span",{className:n,children:[a,m("span",{className:i,children:o?.href&&Yt(Xt(o.href),s)})]}):null]})})),Yt=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Xt=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Kt=u((({className:e="",doc:t,icon:n})=>m(Ut,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:n}))),qt=u((({hasBorder:e=!0,documents:t,icon:n})=>m(ge,{className:"text-s text-primary-main mt-5",children:t?.length?t.map(((t,i)=>m(Kt,{className:e?"rounded-md border-gray border border-solid p-4":"",doc:t,icon:n},String(i)))):null}))),Qt=u((({hasBorder:e=!0,documents:t,icon:n})=>m("div",{className:"text-s text-primary-main flex flex-col mt-5 "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,i)=>m("div",{role:"listitem",children:m(Kt,{className:e?"rounded-md border-gray border border-solid p-4":"",doc:t,icon:n})},String(i)))):null}))),Zt=u((({className:e="",title:t,description:n,icon:i={icon:"DocIconMonoColor"},documents:r,orientation:l="vertical",hasBorder:a=!0,align:s,...o})=>h(I,{className:g("py-6 px-4 overflow-x-hidden",e),...o,children:[m(Wt,{className:"!p-0 "+(n?"gap-2":"gap-5"),title:t,description:n,align:s,headlineVersion:"M",as:"h2"}),m("vertical"===l?Qt:qt,{hasBorder:a,documents:r,icon:i})]}))),en=e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function tn(e=""){const t=en(e);return t<=4?"S":t<=8?"M":"L"}function nn(e=""){const t=en(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function rn(e=""){const t=en(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const ln=u((({className:e,title:t,description:n="Блок в разработке...",...i})=>h(I,{className:g("p-9 box-border",e,rn(e),nn(e)),...i,children:[m(Wt,{className:"!p-0 max-w-[600px]",title:t,description:n,headlineVersion:tn(e)}),m("figure",{className:"m-0 min-w-[80%]",children:an()})]}))),an=(e=3)=>on(100,e).map((e=>Math.floor(e))).map(sn),sn=(e,t)=>m("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),on=(e,t)=>[e].concat(t>0?on(e/1.618,t-1):[]),cn=(e,{className:t="",buttonClassName:n,isVertical:i}={})=>e?.length&&e.some((e=>e?.text))?m("div",{className:g("flex",i?"flex-col gap-2":"gap-4",t),children:e.map(dn(n))}):null,dn=(e="")=>(t,n)=>{const{text:i,icon:r,iconRight:l,version:a,...s}=t||{},o="secondary"===a?"color":"white";return i?m(Ve,{className:e,appendLeft:mn({...r,iconVersion:o}),appendRight:mn({...l,iconVersion:o}),version:a,text:i,...s},n?String(n):""):null},mn=e=>e?.icon||e?.src?m(Y,{image:e,width:String(e?.size?.width||24),height:String(24),asSVG:!0}):null,hn={L:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4",M:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3",S:"w-1 h-1 min-w-1 min-h-1 mr-2"},un=u((({className:e="",isDotted:t=!0,children:n,size:i="M"})=>h("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?m("div",{children:m("div",{className:`rounded-full align-middle inline-block bg-primary-text group-data-secondary:bg-white ${hn[i]}`})}):null,m("span",{children:n})]}))),pn={S:"text-l-light",M:"text-h6",L:"text-h5"},gn={S:"ml-2",M:"ml-3",L:"ml-4"},bn=u((({className:e="",hasIndent:t,isDotted:n,itemClassName:i="",items:r,listItemSize:l="M"})=>r?.length?m("section",{className:`text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${pn[l]} ${t?gn[l]:""} ${e}`,role:"list",children:r.map(((e,t)=>m(un,{className:`${i} mb-1.5`,isDotted:n,size:l,children:e},String(t))))}):null)),xn=u((({className:e="",title:t="",buttons:n,image:i,children:r})=>h("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,h("div",{className:"flex grow w-full justify-between",children:[h("div",{className:"flex flex-col justify-between w-full",children:[m("div",{className:"h-full",children:r}),n?m("div",{className:"mt-auto pt-8",children:n}):null]}),i]})]}))),fn=u((e=>{const{className:t="",icon:n,label:i,description:r,version:l="primary",benefitsVersion:a="normal"}=e,s="white"===a?"secondary":"primary";return h("div",{className:`flex gap-5 ${r?"items-start":"items-center"} ${t}`,children:[n?m("div",{className:Nn(l,a),children:m(Y,{className:"w-6 h-6",image:K(n,s),asSVG:!0})}):null,h("div",{className:"gap-0.5",children:[i?m("div",{className:"text-h6 text-primary-text group-data-secondary:text-white",children:i}):null,r?m("div",{className:"text-m-light text-secondary-text group-data-secondary:text-white",children:r}):null]})]})}));function Nn(e,t){let n="bg-primary-main text-black";return"secondary"===e?n="bg-white/30 text-black":"normal"===t&&(n="bg-secondary-light text-primary-main"),`w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${n}`}const yn=(e="primary",t="normal")=>({icon:n,label:i,description:r},l)=>m(fn,{icon:n,label:i,description:r,version:e,benefitsVersion:t},String(l)),vn=u((({className:e="",headlineVersion:t="L",benefits:n,benefitsVersion:i="normal",buttons:r,image:l,items:a,version:s="primary",isDotted:o=!0,label:c,title:d,description:u,...p})=>h(I,{className:`w-full ${e}`,version:s,...p,children:[h("div",{children:[c?kn(c):null,m(Wt,{className:"!p-0 max-w-[600px]",title:d,description:u,headlineVersion:t,align:"text-left"}),h(xn,{buttons:cn(r,{className:"mt-5",isVertical:!0}),children:[n?.filter((e=>e.label))?.length?m("div",{className:"mt-3",children:n.map(yn(s,i))}):null,a?.length?m(bn,{className:"mt-3 text-m",items:a,isDotted:o}):null]})]}),wn(l)]})));function wn(e){return e?.src?m(Y,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const kn=e=>m("div",{className:"w-fit px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid border-secondary-hover",children:m(X,{color:"text-primary-main group-data-secondary:text-white/80",children:e})}),Cn=u((e=>{const{className:t="",...n}=e;return m(I,{className:`px-4 py-6 ${t}`,...n,children:m(vn,{...e})})})),Sn={primary:{description:"!text-secondary-text text-l-light",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light",dot:"bg-secondary-text"},secondary:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},gray:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},transparent:{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"},"":{description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"}},Tn={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-12 w-12 min-w-12 min-h-12"},$n={normal:"min-h-[70px]",small:"min-h-12"},_n=u((({className:e="",title:t,description:n,showLines:i=!0,steps:r,size:l="normal",version:a="primary",...s})=>{const o=Sn[a];return h(I,{className:`box-border px-4 py-6 flex flex-col ${e}`,version:a,...s,children:[t?m(j,{headingType:"h3",className:"text-center",title:t}):null,n?m("p",{className:`text-m-light text-center ${o.description} ${t?"mt-2":""}`,children:n}):null,r?.length?m("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:m("div",{className:"flex flex-col justify-between gap-x-[101px]",children:r.map(In(l,a,i))})}):null]})})),In=(e,t,n)=>(i,r,l)=>{const a=l.length-1===r,s="normal"===e?"ml-[34px]":"ml-6",o=Sn[t];return m("div",{children:h("div",{className:"flex flex-row text-center relative",children:[h("div",{className:"overflow-hidden flex-shrink-0",children:[An(e,t)(i,r),a?null:m("div",{className:`min-h-8 h-full w-0.5 ${n?o.iconConnector:""} ${s}`})]}),h("div",{className:`flex flex-col justify-center h-fit ${$n[e]}`,children:[i.label?m("div",{className:"text-m-title-xs font-medium m-0 text-left mb-1",children:i.label}):null,i.description?m("div",{className:`text-s ${o.description} text-left`,children:i.description}):null]})]})},String(r))},An=(e,t)=>(n,i)=>{const r="normal"===e?"38":"27",l="normal"===e?"text-m-title":"text-m-title-xs";return m("div",{className:`${Tn[e]} ${Sn[t].iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:m("span",{className:`font-medium flex self-center ${l}`,children:(a=n?.icon,Boolean(a?.icon||a?.src)?m(Y,{image:K({...n.icon},t),width:r,height:r,asSVG:!0}):m("span",{children:i+1}))})});var a},jn={Buttons:({buttons:e})=>cn(e,{className:"mt-3",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?m(Y,{image:{...e,className:"m-0"}}):null,List:({isDotted:e,...t})=>m(bn,{className:"flex flex-col justify-between items-start text-m",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>h("div",{children:[e?m("div",{className:"text-xl font-medium m-0 "+(t?"mb-1":""),children:e}):null,t?m("div",{className:"text-s text-secondary-text",children:t}):null]})},Rn=u((({title:e,icon:t})=>h("div",{className:"flex gap-2.5 mb-2",children:[e?m(j,{headingType:"h3",className:"font-medium",title:e}):null,t?m(Y,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),Bn=u((({tile:e,...t})=>h("div",{className:"rounded-md border-gray h-full box-border border p-4",children:[m(Rn,{...e?.header}),e?.data?.length?e.data.map(((e,n)=>h("div",{children:[n>0?m("div",{className:"h-5"}):null,Dn(e,t)]},String(n)))):null]})));function Dn(e,t){if(!e||!e.tableCellType||!(e.tableCellType in jn))return null;const n=jn[e.tableCellType];return m(n,{displayTable:()=>null,isVisible:!0,...e,...t})}const On=u((({tiles:e,...t})=>e?.length?m(ge,{...t,children:e.map(((e,n)=>m(Bn,{tile:e,...t},String(n))))}):null)),Vn=u((({tiles:e,...t})=>e?.length?m("div",{className:"flex flex-col gap-3.5",children:e.map(((e,n)=>m(Bn,{tile:e,...t},String(n))))}):null)),Ln=u((({className:e,title:t,description:n,tariffsColumns:i,rowHeaders:r,orientation:l="vertical",...a})=>{const s=Mn(i),o=Pn(r,s);return h("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[t?m(j,{headingType:"h2",className:`text-center ${n?"mb-2":"mb-5"}`,title:t}):null,n?m("div",{className:"mb-5 text-center text-m",children:n}):null,m("vertical"===l?Vn:On,{tiles:o,...a})]})})),Mn=e=>e?.[0]?.data?e[0].data:[],Pn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),zn={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"},secondary:{background:"bg-primary-main",icon:"bg-white text-primary-main",title:"text-white",description:"text-white"},"secondary-light":{background:"bg-primary-main/10",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"}},En=u((({title:e,description:t,blockVersion:n="primary",iconVersion:i,image:r,className:l="",items:a,isDotted:s=!0})=>{const o=zn[n];return h("section",{className:`font-sans px-4 py-[18px] flex flex-col ${o.background} ${l}`,children:["small"===i?Fn(o.icon):null,"big"===i?Hn(r):null,h("div",{className:"py-0.5",children:[e?m("div",{className:`text-l font-medium mb-1 ${o.title}`,children:e}):null,t?m("div",{className:`text-s ${o.description}`,children:t}):null,a?.length?m(bn,{className:"mt-1 text-m",items:a,isDotted:s}):null]})]})}));function Fn(e){return m("div",{className:"mb-3",children:m("div",{className:`rounded-full h-4 w-4 text-center text-xs-light ${e}`,children:"i"})})}function Hn(e){return e?.src?m(Y,{className:"pb-3 mr-auto",image:e}):null}const Gn={Accordion:D,AccordionItem:Q,ComparisonTable:We,Footer:wt,Gallery:Ct,Header:Gt,Headline:Wt,LinkDocs:Zt,LinkList:tt,MobileAppTile:ct,ProductBlock:Cn,StepsBlock:_n,TariffsTable:Ln,TextBlock:En,Placeholder:ln},Jn=["Header","Footer"],Wn=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Un(e=$.inst,t=globalThis){const n=s(new Map);r((()=>e.eventBus.subscribe("intersection",(({block:e,intersection:t})=>{n.current&&n.current.set(e,t)}))),[e]),r((()=>{const i=((e,t=600)=>{let n;const i=(...r)=>{i.dispose(),n=setTimeout((()=>{e(...r)}),t)};return i.dispose=()=>{n&&clearTimeout(n)},i})((()=>{if(!(globalThis.scrollY>3*globalThis.innerHeight/4))return void e.reset();const t=function(e){const t=e.filter((([e])=>!Jn.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[n]=t.length>0?me(Wn)(t):[];return n}([...n.current||[]]);t?.anchor?e.replace(t.anchor):t||e.reset()}),100);return t.addEventListener("scroll",i),()=>{i.dispose(),t.removeEventListener("scroll",i)}}),[e,t])}const Yn=d();const Xn=u((({className:e,onClick:t,ariaLabel:n})=>m("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:Kn()}))),Kn=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),m("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},qn=u((({className:e=""})=>{const t=function(e){const[t,n]=i(0);return r((()=>{(async()=>{const[t]=await Yn.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:l((async()=>{n(await Yn.like(e))}),[e]),dislike:l((async()=>{n(await Yn.dislike(e))}),[e])}}(ke().pathname);return h("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e}`,children:[m(Xn,{onClick:we(t.like),ariaLabel:"Поставить отметку «лайк»"}),m(Xn,{onClick:we(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),m("span",{className:"select-none",children:t.likeCount})]})})),Qn=u((e=>{const{className:t="",blocksRegistry:n,blockDecorator:i,data:r={}}=e,{style:l,blocks:a,slots:s,likeControl:o,colorPalette:c="pc"}=r,d={key:"",page:r,blocksRegistry:n,blockDecorator:i,parent:r};return Un(),h("section",{className:g("relative",l,t),"data-theme":c,children:[s?.header?m("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:y(s?.header,{...d,slotName:"header"})}):null,h("div",{className:"container grid grid-cols-12 gap-1",children:[y(a,d),s?.footer?y(s?.footer,{...d,slotName:"footer"}):null]}),o?m("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:m(qn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));Qn.childrenTypes=[],Qn.slots=()=>["header","footer"];e.Blocks=Gn,e.ContentPage=Qn,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=d,e.handlerDecorator=we,e.joinList=function(e){return t=>t.reduce(((t,n,i)=>t.length?t.concat({...e,key:i},n):[n]),[])},e.packageVersion="0.7.6",e.projectSettings=o,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=ve,e.useRouter=ke,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -2,6 +2,7 @@ import type { LinkTabData, TabData } from './TabsContent';
2
2
  interface LinkTabProps {
3
3
  tab: LinkTabData;
4
4
  currentTab?: TabData;
5
+ isScrollable?: boolean;
5
6
  }
6
7
  export declare const LinkTab: import("@redneckz/uni-jsx").UNIComponent<LinkTabProps, any, any>;
7
8
  export {};
@@ -0,0 +1,8 @@
1
+ import type { RenderTabProps } from './renderTab';
2
+ import type { TabData } from './TabsContent';
3
+ interface ScrollableTabsProps extends RenderTabProps {
4
+ tabs?: TabData[];
5
+ }
6
+ export declare type IsScrollButtonsShown = boolean[];
7
+ export declare const ScrollableTabs: import("@redneckz/uni-jsx").UNIComponent<ScrollableTabsProps, any, any>;
8
+ export {};
@@ -23,6 +23,13 @@ export declare type LinkTabData = LinkProps & {
23
23
  * }
24
24
  */
25
25
  export declare type TabData = GroupTabData | LinkTabData;
26
+ /**
27
+ * @enumNames [
28
+ * "По ширине экрана",
29
+ * "С прокруткой"
30
+ * ]
31
+ */
32
+ export declare type TabsMode = 'wideScreen' | 'scrollable';
26
33
  /**
27
34
  * @title Вкладки
28
35
  */
@@ -33,4 +40,9 @@ export interface TabsContent {
33
40
  isSticky?: boolean;
34
41
  /** @title Показывать счетчик блоков во вкладках */
35
42
  showCounter?: boolean;
43
+ /**
44
+ * @title Режим вкладок
45
+ * @default "wideScreen"
46
+ */
47
+ tabsMode?: TabsMode;
36
48
  }
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import type { RenderTabProps } from './renderTab';
3
2
  import type { GroupTabData } from './TabsContent';
4
- export declare const renderGroupTab: ({ page, currentTab, showCounter, onClick }: RenderTabProps) => (tab: GroupTabData, i: number) => JSX.Element;
3
+ import type { RenderTabProps } from './renderTab';
4
+ export declare const renderGroupTab: ({ page, currentTab, showCounter, onClick, isScrollable }: RenderTabProps) => (tab: GroupTabData, i: number) => JSX.Element;
@@ -6,5 +6,6 @@ export interface RenderTabProps {
6
6
  currentTab?: TabData;
7
7
  showCounter?: boolean;
8
8
  onClick: (tab: TabData) => void;
9
+ isScrollable?: boolean;
9
10
  }
10
- export declare const renderTab: ({ page, currentTab, showCounter, onClick }: RenderTabProps) => (tab: TabData, i: number) => JSX.Element | null;
11
+ export declare const renderTab: ({ page, currentTab, showCounter, onClick, isScrollable }: RenderTabProps) => (tab: TabData, i: number) => JSX.Element | null;
@@ -1,6 +1,11 @@
1
1
  export declare const LINK_CLASSES = "h-12 flex-1 flex items-center justify-center cursor-pointer";
2
2
  export declare const ACTIVE_LINK_CLASSES = "bg-primary-main";
3
3
  export declare const INACTIVE_LINK_CLASSES = "group/btn bg-white";
4
- export declare const TEXT_CLASSES = "font-sans text-m";
4
+ export declare const SCROLLABLE_ACTIVE_LINK_CLASSES = "bg-white text-primary-main";
5
+ export declare const WIDESCREEN_ACTIVE_LINK_CLASSES = "bg-primary-main text-white";
6
+ export declare const TEXT_CLASSES = "font-sans text-m text-center";
5
7
  export declare const ACTIVE_TEXT_CLASSES = "text-white";
6
8
  export declare const INACTIVE_TEXT_CLASSES = "text-secondary-text group-hover/btn:text-primary-main";
9
+ export declare const WHITE_ACTIVE_TEXT_CLASSES = "text-primary-main";
10
+ export declare const getGroupTabClassName: (type: string, active: boolean, isScrollable: boolean) => any;
11
+ export declare const getLinkTabClassName: (type: string, active: boolean, isScrollable: boolean) => any;
@@ -2,6 +2,7 @@ import type { LinkTabData, TabData } from './TabsContent';
2
2
  interface LinkTabProps {
3
3
  tab: LinkTabData;
4
4
  currentTab?: TabData;
5
+ isScrollable?: boolean;
5
6
  }
6
7
  export declare const LinkTab: import("@redneckz/uni-jsx").UNIComponent<LinkTabProps, any, any>;
7
8
  export {};
@@ -5,10 +5,10 @@ const uni_jsx_1 = require("@redneckz/uni-jsx");
5
5
  const useLink_1 = require("../../hooks/useLink");
6
6
  const tabItemClasses_1 = require("./tabItemClasses");
7
7
  exports.LinkTab = (0, uni_jsx_1.JSX)((props) => {
8
- const { tab, currentTab } = props;
8
+ const { tab, currentTab, isScrollable = false } = props;
9
9
  const active = currentTab?.type === 'link' && currentTab.href === tab.href;
10
10
  const link = (0, useLink_1.useLink)();
11
11
  const adjustedProps = link(tab);
12
- return ((0, jsx_runtime_1.jsx)("a", { role: "tab", className: `${tabItemClasses_1.LINK_CLASSES} ${active ? tabItemClasses_1.ACTIVE_LINK_CLASSES : tabItemClasses_1.INACTIVE_LINK_CLASSES}`, target: tab.target, href: adjustedProps.href, onClick: adjustedProps.onClick, children: (0, jsx_runtime_1.jsx)("span", { className: `${tabItemClasses_1.TEXT_CLASSES} ${active ? tabItemClasses_1.ACTIVE_TEXT_CLASSES : tabItemClasses_1.INACTIVE_TEXT_CLASSES}`, children: tab.text }) }));
12
+ return ((0, jsx_runtime_1.jsx)("a", { role: "tab", className: (0, tabItemClasses_1.getLinkTabClassName)('link', active, isScrollable), target: tab.target, href: adjustedProps.href, onClick: adjustedProps.onClick, children: (0, jsx_runtime_1.jsx)("span", { className: (0, tabItemClasses_1.getLinkTabClassName)('text', active, isScrollable), children: tab.text }) }));
13
13
  });
14
14
  //# sourceMappingURL=LinkTab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkTab.js","sourceRoot":"","sources":["../../../src/components/Tabs/LinkTab.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,qDAO0B;AAQb,QAAA,OAAO,GAAG,IAAA,aAAG,EAAe,CAAC,KAAK,EAAE,EAAE;IACjD,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,MAAM,GAAG,UAAU,EAAE,IAAI,KAAK,MAAM,IAAI,UAAU,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC;IAE3E,MAAM,IAAI,GAAG,IAAA,iBAAO,GAAE,CAAC;IACvB,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAEhC,OAAO,CACL,8BACE,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,GAAG,6BAAY,IAAI,MAAM,CAAC,CAAC,CAAC,oCAAmB,CAAC,CAAC,CAAC,sCAAqB,EAAE,EACpF,MAAM,EAAE,GAAG,CAAC,MAAM,EAClB,IAAI,EAAE,aAAa,CAAC,IAAI,EACxB,OAAO,EAAE,aAAa,CAAC,OAAO,YAE9B,iCAAM,SAAS,EAAE,GAAG,6BAAY,IAAI,MAAM,CAAC,CAAC,CAAC,oCAAmB,CAAC,CAAC,CAAC,sCAAqB,EAAE,YACvF,GAAG,CAAC,IAAI,GACJ,GACL,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"LinkTab.js","sourceRoot":"","sources":["../../../src/components/Tabs/LinkTab.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,qDAAuD;AAS1C,QAAA,OAAO,GAAG,IAAA,aAAG,EAAe,CAAC,KAAK,EAAE,EAAE;IACjD,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IACxD,MAAM,MAAM,GAAG,UAAU,EAAE,IAAI,KAAK,MAAM,IAAI,UAAU,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC;IAE3E,MAAM,IAAI,GAAG,IAAA,iBAAO,GAAE,CAAC;IACvB,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAEhC,OAAO,CACL,8BACE,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,IAAA,oCAAmB,EAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAC5D,MAAM,EAAE,GAAG,CAAC,MAAM,EAClB,IAAI,EAAE,aAAa,CAAC,IAAI,EACxB,OAAO,EAAE,aAAa,CAAC,OAAO,YAE9B,iCAAM,SAAS,EAAE,IAAA,oCAAmB,EAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,YAAG,GAAG,CAAC,IAAI,GAAQ,GACnF,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { RenderTabProps } from './renderTab';
2
+ import type { TabData } from './TabsContent';
3
+ interface ScrollableTabsProps extends RenderTabProps {
4
+ tabs?: TabData[];
5
+ }
6
+ export declare type IsScrollButtonsShown = boolean[];
7
+ export declare const ScrollableTabs: import("@redneckz/uni-jsx").UNIComponent<ScrollableTabsProps, any, any>;
8
+ export {};
@@ -0,0 +1,24 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.ScrollableTabs = void 0;
3
+ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
+ const uni_jsx_1 = require("@redneckz/uni-jsx");
5
+ const SwipeListContainer_1 = require("../../ui-kit/SwipeListControl/SwipeListContainer");
6
+ const useSwipeListScroll_1 = require("../../ui-kit/SwipeListControl/useSwipeListScroll");
7
+ const ArrowButton_1 = require("../../ui-kit/Button/ArrowButton");
8
+ const renderTab_1 = require("./renderTab");
9
+ const scrollButtonStyle = 'absolute z-50 top-0';
10
+ exports.ScrollableTabs = (0, uni_jsx_1.JSX)((props) => {
11
+ const { tabs, onClick, currentTab, page, showCounter } = props;
12
+ const [containerRef, scroll] = (0, useSwipeListScroll_1.useSwipeListScroll)({
13
+ itemCount: tabs?.length || 0,
14
+ isCyclic: false,
15
+ });
16
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "relative max-w-full m-auto", children: [(0, jsx_runtime_1.jsx)("div", { className: `font-sans max-w-full w-full overflow-hidden relative bg-white`, children: (0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs?.map((0, renderTab_1.renderTab)({
17
+ onClick,
18
+ currentTab,
19
+ showCounter,
20
+ page,
21
+ isScrollable: true,
22
+ })) }) }), scroll.canScrollLeft ? ((0, jsx_runtime_1.jsx)(ArrowButton_1.ScrollLeftButton, { className: `${scrollButtonStyle} left-6`, onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? ((0, jsx_runtime_1.jsx)(ArrowButton_1.ScrollRightButton, { className: `${scrollButtonStyle} rotate-180 right-6`, onClick: scroll.scrollRight })) : null] }));
23
+ });
24
+ //# sourceMappingURL=ScrollableTabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrollableTabs.js","sourceRoot":"","sources":["../../../src/components/Tabs/ScrollableTabs.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,yFAAsF;AACtF,yFAAsF;AACtF,iEAAsF;AACtF,2CAAwC;AAQxC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAEnC,QAAA,cAAc,GAAG,IAAA,aAAG,EAAsB,CAAC,KAAK,EAAE,EAAE;IAC/D,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE/D,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,IAAA,uCAAkB,EAAiB;QAChE,SAAS,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;QAC5B,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;IAEH,OAAO,CACL,iCAAK,SAAS,EAAC,4BAA4B,aACzC,gCAAK,SAAS,EAAE,+DAA+D,YAC7E,uBAAC,uCAAkB,IACjB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAC,YAAY,EACtB,sBAAsB,EAAE,MAAM,CAAC,0BAA0B,YAExD,IAAI,EAAE,GAAG,CACR,IAAA,qBAAS,EAAC;wBACR,OAAO;wBACP,UAAU;wBACV,WAAW;wBACX,IAAI;wBACJ,YAAY,EAAE,IAAI;qBACnB,CAAC,CACH,GACkB,GACjB,EACL,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CACtB,uBAAC,8BAAgB,IAAC,SAAS,EAAE,GAAG,iBAAiB,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,GAAI,CAC3F,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CACvB,uBAAC,+BAAiB,IAChB,SAAS,EAAE,GAAG,iBAAiB,qBAAqB,EACpD,OAAO,EAAE,MAAM,CAAC,WAAW,GAC3B,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -6,14 +6,16 @@ const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
6
6
  const EventBus_1 = require("../../EventBus/EventBus");
7
7
  const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
8
8
  const renderTab_1 = require("./renderTab");
9
+ const ScrollableTabs_1 = require("./ScrollableTabs");
9
10
  exports.Tabs = (0, uni_jsx_1.JSX)((props) => {
10
- const { className = '', tabs, showCounter, isSticky, ...rest } = props;
11
+ const { className = '', tabs, showCounter, isSticky, tabsMode, ...rest } = props;
11
12
  const [currentTab, setCurrentTab] = (0, hooks_1.useState)(tabs ? tabs[0] : undefined);
12
13
  (0, hooks_1.useEffect)(() => EventBus_1.EventBus.inst.subscribe('tab', (event) => {
13
14
  const tab = tabs?.find(checkTab(event));
14
15
  if (event.type === 'link' && tab) {
15
16
  setCurrentTab(tab);
16
17
  }
18
+ return [];
17
19
  }), [tabs]);
18
20
  (0, hooks_1.useEffect)(() => currentTab?.type === 'group'
19
21
  ? EventBus_1.EventBus.inst.subject('tab', { label: currentTab.ref })
@@ -24,7 +26,12 @@ exports.Tabs = (0, uni_jsx_1.JSX)((props) => {
24
26
  }
25
27
  setCurrentTab(selectedTab);
26
28
  }, []);
27
- return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: `${isSticky ? 'sticky top-1 z-20 ' : ''}box-border flex gap-x-1 ${className}`, role: "tablist", ...rest, children: tabs?.map((0, renderTab_1.renderTab)({ onClick: handleClick, currentTab, showCounter, ...rest })) }));
29
+ return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: `relative box-border flex gap-x-1 w-full ${isSticky ? 'sticky top-1 z-20 ' : ''} ${className}`, role: "tablist", ...rest, children: tabsMode === 'scrollable' ? ((0, jsx_runtime_1.jsx)(ScrollableTabs_1.ScrollableTabs, { tabs: tabs, onClick: handleClick, currentTab: currentTab, showCounter: showCounter, ...rest })) : (tabs?.map((0, renderTab_1.renderTab)({
30
+ onClick: handleClick,
31
+ currentTab,
32
+ showCounter,
33
+ ...rest,
34
+ }))) }));
28
35
  });
29
36
  const checkTab = (event) => (_) => _.type === 'link' && _.href === `#${event.label}`;
30
37
  //# sourceMappingURL=Tabs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA+E;AAC/E,sDAAmD;AAEnD,4DAAyD;AACzD,2CAAwC;AAU3B,QAAA,IAAI,GAAG,IAAA,aAAG,EAAiB,CAAC,KAAK,EAAE,EAAE;IAChD,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAEvE,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEzE,IAAA,iBAAS,EACP,GAAG,EAAE,CACH,mBAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;QACvC,MAAM,GAAG,GAAG,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACxC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,GAAG,EAAE;YAChC,aAAa,CAAC,GAAG,CAAC,CAAC;SACpB;IACH,CAAC,CAAC,EACJ,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,IAAA,iBAAS,EACP,GAAG,EAAE,CACH,UAAU,EAAE,IAAI,KAAK,OAAO;QAC1B,CAAC,CAAC,mBAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC;QACzD,CAAC,CAAC,SAAS,EACf,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,MAAM,WAAW,GAAG,IAAA,mBAAW,EAAC,CAAC,WAAoB,EAAE,EAAE;QACvD,IAAI,WAAW,EAAE,IAAI,KAAK,OAAO,EAAE;YACjC,mBAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC;SAC/E;QACD,aAAa,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,uBAAC,2BAAY,IACX,SAAS,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,2BAA2B,SAAS,EAAE,EACxF,IAAI,EAAC,SAAS,KACV,IAAI,YAEP,IAAI,EAAE,GAAG,CAAC,IAAA,qBAAS,EAAC,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,GACpE,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAG,CAAC,KAAyB,EAAE,EAAE,CAAC,CAAC,CAAU,EAAE,EAAE,CAC7D,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA+E;AAC/E,sDAAmD;AAGnD,4DAAyD;AACzD,2CAAwC;AACxC,qDAAkD;AASrC,QAAA,IAAI,GAAG,IAAA,aAAG,EAAiB,CAAC,KAAK,EAAE,EAAE;IAChD,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEzE,IAAA,iBAAS,EACP,GAAG,EAAE,CACH,mBAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;QACvC,MAAM,GAAG,GAAG,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACxC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,GAAG,EAAE;YAChC,aAAa,CAAC,GAAG,CAAC,CAAC;SACpB;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,EACJ,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,IAAA,iBAAS,EACP,GAAG,EAAE,CACH,UAAU,EAAE,IAAI,KAAK,OAAO;QAC1B,CAAC,CAAC,mBAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC;QACzD,CAAC,CAAC,SAAS,EACf,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,MAAM,WAAW,GAAG,IAAA,mBAAW,EAAC,CAAC,WAAoB,EAAE,EAAE;QACvD,IAAI,WAAW,EAAE,IAAI,KAAK,OAAO,EAAE;YACjC,mBAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC;SAC/E;QACD,aAAa,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,uBAAC,2BAAY,IACX,SAAS,EAAE,2CACT,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EACpC,IAAI,SAAS,EAAE,EACf,IAAI,EAAC,SAAS,KACV,IAAI,YAEP,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,CAC3B,uBAAC,+BAAc,IACb,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,KACpB,IAAI,GACR,CACH,CAAC,CAAC,CAAC,CACF,IAAI,EAAE,GAAG,CACP,IAAA,qBAAS,EAAC;YACR,OAAO,EAAE,WAAW;YACpB,UAAU;YACV,WAAW;YACX,GAAG,IAAI;SACR,CAAC,CACH,CACF,GACY,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAG,CAAC,KAAyB,EAAE,EAAE,CAAC,CAAC,CAAU,EAAE,EAAE,CAC7D,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC"}
@@ -23,6 +23,13 @@ export declare type LinkTabData = LinkProps & {
23
23
  * }
24
24
  */
25
25
  export declare type TabData = GroupTabData | LinkTabData;
26
+ /**
27
+ * @enumNames [
28
+ * "По ширине экрана",
29
+ * "С прокруткой"
30
+ * ]
31
+ */
32
+ export declare type TabsMode = 'wideScreen' | 'scrollable';
26
33
  /**
27
34
  * @title Вкладки
28
35
  */
@@ -33,4 +40,9 @@ export interface TabsContent {
33
40
  isSticky?: boolean;
34
41
  /** @title Показывать счетчик блоков во вкладках */
35
42
  showCounter?: boolean;
43
+ /**
44
+ * @title Режим вкладок
45
+ * @default "wideScreen"
46
+ */
47
+ tabsMode?: TabsMode;
36
48
  }
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import type { RenderTabProps } from './renderTab';
3
2
  import type { GroupTabData } from './TabsContent';
4
- export declare const renderGroupTab: ({ page, currentTab, showCounter, onClick }: RenderTabProps) => (tab: GroupTabData, i: number) => JSX.Element;
3
+ import type { RenderTabProps } from './renderTab';
4
+ export declare const renderGroupTab: ({ page, currentTab, showCounter, onClick, isScrollable }: RenderTabProps) => (tab: GroupTabData, i: number) => JSX.Element;
@@ -5,14 +5,22 @@ const tabItemClasses_1 = require("./tabItemClasses");
5
5
  const BADGE_CLASSES = 'min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center';
6
6
  const ACTIVE_BADGE_CLASSES = 'bg-white/30 text-white';
7
7
  const INACTIVE_BADGE_CLASSES = 'bg-main-divider text-secondary-text group-hover/btn:text-primary-main';
8
- const renderGroupTab = ({ page, currentTab, showCounter, onClick }) => (tab, i) => {
8
+ const renderGroupTab = ({ page, currentTab, showCounter, onClick, isScrollable = false }) => (tab, i) => {
9
9
  const active = currentTab === tab;
10
10
  const count = tab.ref && page?.blocks
11
11
  ? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
12
12
  : 0;
13
- return ((0, jsx_runtime_1.jsx)("div", { className: `${tabItemClasses_1.LINK_CLASSES} ${active ? tabItemClasses_1.ACTIVE_LINK_CLASSES : tabItemClasses_1.INACTIVE_LINK_CLASSES}`, role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? renderTitle(tab.title, active) : null, showCounter && count ? renderCount(count, active) : null] }) }, String(i)));
13
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, tabItemClasses_1.getGroupTabClassName)('div', active, isScrollable), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: (0, jsx_runtime_1.jsxs)("div", { className: `flex flex-1 items-center justify-center ${(0, tabItemClasses_1.getGroupTabClassName)('text', active, isScrollable)}`, children: [renderTitle(tab.title, active, isScrollable), renderCount(showCounter, count, active)] }) }, `group-${String(i)}`));
14
14
  };
15
15
  exports.renderGroupTab = renderGroupTab;
16
- const renderTitle = (title, active) => ((0, jsx_runtime_1.jsx)("h3", { className: `${tabItemClasses_1.TEXT_CLASSES} ${active ? tabItemClasses_1.ACTIVE_TEXT_CLASSES : tabItemClasses_1.INACTIVE_TEXT_CLASSES}`, children: title }));
17
- const renderCount = (count, active) => ((0, jsx_runtime_1.jsx)("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count }));
16
+ const renderTitle = (title, active, isScrollable) => {
17
+ const activeClassName = active ? tabItemClasses_1.WHITE_ACTIVE_TEXT_CLASSES : tabItemClasses_1.INACTIVE_TEXT_CLASSES;
18
+ const titleClassName = isScrollable
19
+ ? `${tabItemClasses_1.TEXT_CLASSES} ${activeClassName}`
20
+ : `${tabItemClasses_1.TEXT_CLASSES} ${active ? tabItemClasses_1.ACTIVE_TEXT_CLASSES : tabItemClasses_1.INACTIVE_TEXT_CLASSES}`;
21
+ return title ? (0, jsx_runtime_1.jsx)("h3", { className: titleClassName, children: title }) : null;
22
+ };
23
+ const renderCount = (showCounter, count, active) => {
24
+ return showCounter && count ? ((0, jsx_runtime_1.jsx)("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count })) : null;
25
+ };
18
26
  //# sourceMappingURL=renderGroupTab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderGroupTab.js","sourceRoot":"","sources":["../../../src/components/Tabs/renderGroupTab.tsx"],"names":[],"mappings":";;;AACA,qDAO0B;AAG1B,MAAM,aAAa,GACjB,kFAAkF,CAAC;AACrF,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AACtD,MAAM,sBAAsB,GAC1B,uEAAuE,CAAC;AAEnE,MAAM,cAAc,GACzB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAkB,EAAE,EAAE,CAC/D,CAAC,GAAiB,EAAE,CAAS,EAAE,EAAE;IAC/B,MAAM,MAAM,GAAG,UAAU,KAAK,GAAG,CAAC;IAElC,MAAM,KAAK,GACT,GAAG,CAAC,GAAG,IAAI,IAAI,EAAE,MAAM;QACrB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAa,CAAC,CAAC,CAAC,MAAM;QAClF,CAAC,CAAC,CAAC,CAAC;IAER,OAAO,CACL,gCAEE,SAAS,EAAE,GAAG,6BAAY,IAAI,MAAM,CAAC,CAAC,CAAC,oCAAmB,CAAC,CAAC,CAAC,sCAAqB,EAAE,EACpF,IAAI,EAAC,KAAK,mBACK,MAAM,EACrB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,YAE3B,iCAAK,SAAS,EAAC,yCAAyC,aACrD,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAClD,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,IACrD,IATD,MAAM,CAAC,CAAC,CAAC,CAUV,CACP,CAAC;AACJ,CAAC,CAAC;AAxBS,QAAA,cAAc,kBAwBvB;AAEJ,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,MAAe,EAAE,EAAE,CAAC,CACtD,+BAAI,SAAS,EAAE,GAAG,6BAAY,IAAI,MAAM,CAAC,CAAC,CAAC,oCAAmB,CAAC,CAAC,CAAC,sCAAqB,EAAE,YACrF,KAAK,GACH,CACN,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,MAAe,EAAE,EAAE,CAAC,CACtD,gCAAK,SAAS,EAAE,GAAG,aAAa,IAAI,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,sBAAsB,EAAE,YACzF,KAAK,GACF,CACP,CAAC"}
1
+ {"version":3,"file":"renderGroupTab.js","sourceRoot":"","sources":["../../../src/components/Tabs/renderGroupTab.tsx"],"names":[],"mappings":";;;AAEA,qDAM0B;AAE1B,MAAM,aAAa,GACjB,kFAAkF,CAAC;AACrF,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AACtD,MAAM,sBAAsB,GAC1B,uEAAuE,CAAC;AAEnE,MAAM,cAAc,GACzB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,GAAG,KAAK,EAAkB,EAAE,EAAE,CACrF,CAAC,GAAiB,EAAE,CAAS,EAAE,EAAE;IAC/B,MAAM,MAAM,GAAG,UAAU,KAAK,GAAG,CAAC;IAElC,MAAM,KAAK,GACT,GAAG,CAAC,GAAG,IAAI,IAAI,EAAE,MAAM;QACrB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAa,CAAC,CAAC,CAAC,MAAM;QAClF,CAAC,CAAC,CAAC,CAAC;IAER,OAAO,CACL,gCAEE,SAAS,EAAE,IAAA,qCAAoB,EAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAC5D,IAAI,EAAC,KAAK,mBACK,MAAM,EACrB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,YAE3B,iCACE,SAAS,EAAE,2CAA2C,IAAA,qCAAoB,EACxE,MAAM,EACN,MAAM,EACN,YAAY,CACb,EAAE,aAEF,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAC5C,WAAW,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,IACpC,IAfD,SAAS,MAAM,CAAC,CAAC,CAAC,EAAE,CAgBrB,CACP,CAAC;AACJ,CAAC,CAAC;AA9BS,QAAA,cAAc,kBA8BvB;AAEJ,MAAM,WAAW,GAAG,CAAC,KAAyB,EAAE,MAAe,EAAE,YAAqB,EAAE,EAAE;IACxF,MAAM,eAAe,GAAG,MAAM,CAAC,CAAC,CAAC,0CAAyB,CAAC,CAAC,CAAC,sCAAqB,CAAC;IACnF,MAAM,cAAc,GAAG,YAAY;QACjC,CAAC,CAAC,GAAG,6BAAY,IAAI,eAAe,EAAE;QACtC,CAAC,CAAC,GAAG,6BAAY,IAAI,MAAM,CAAC,CAAC,CAAC,oCAAmB,CAAC,CAAC,CAAC,sCAAqB,EAAE,CAAC;IAE9E,OAAO,KAAK,CAAC,CAAC,CAAC,+BAAI,SAAS,EAAE,cAAc,YAAG,KAAK,GAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AACpE,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,WAAgC,EAAE,KAAa,EAAE,MAAe,EAAE,EAAE;IACvF,OAAO,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,CAC5B,gCAAK,SAAS,EAAE,GAAG,aAAa,IAAI,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,sBAAsB,EAAE,YACzF,KAAK,GACF,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC"}
@@ -6,5 +6,6 @@ export interface RenderTabProps {
6
6
  currentTab?: TabData;
7
7
  showCounter?: boolean;
8
8
  onClick: (tab: TabData) => void;
9
+ isScrollable?: boolean;
9
10
  }
10
- export declare const renderTab: ({ page, currentTab, showCounter, onClick }: RenderTabProps) => (tab: TabData, i: number) => JSX.Element | null;
11
+ export declare const renderTab: ({ page, currentTab, showCounter, onClick, isScrollable }: RenderTabProps) => (tab: TabData, i: number) => JSX.Element | null;