@simai-studio/ui 5.20261020.1647 → 5.20261020.2008

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.
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # @simai-studio/ui
2
2
 
3
- SIMAI Framework, release `ui-16caec9d7fff` (commit 16caec9d7fff1902140eca352eeddb61c08ace55 of [simai/ui](https://github.com/simai/ui)).
3
+ SIMAI Framework, release `ui-d985d7cc2e2d` (commit d985d7cc2e2d2529f4e18e211f05f8c66ac3a655 of [simai/ui](https://github.com/simai/ui)).
4
4
 
5
5
  ```html
6
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261020.1647/distr/core/css/core.css">
7
- <script>window.sfPath = 'https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261020.1647/distr/';</script>
8
- <script src="https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261020.1647/distr/core/js/core.js"></script>
6
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261020.2008/distr/core/css/core.css">
7
+ <script>window.sfPath = 'https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261020.2008/distr/';</script>
8
+ <script src="https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261020.2008/distr/core/js/core.js"></script>
9
9
  ```
10
10
 
11
11
  Components, utilities and Smart Components ship in their minified form (the Loader asks for it); Core in both forms. Documentation: https://ui.simai.io/
@@ -1 +1 @@
1
- (()=>{"use strict";class t{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const s=t.match(/\(([^)]+)\)/g);s&&s.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const s=this.getUtilityMap();if(!s||!s[e])return;this.extractUtilityClasses(s[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}const e=JSON.parse('{".sf-button":["display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/center (.justify-center)","align-items/center (.items-center)"],".sf-button .sf-icon":["display/flex (.flex)","justify-content/center (.justify-center)","align-items/center (.items-center)"],".sf-button .sf-button-text-container":["display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/center (.justify-center)","align-items/center (.items-center)"]}');const s=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)};function i(t,e={}){const s=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&s.setAttribute(t,String(e))}),s}const n=t=>Math.round(1e3*t)/1e3;function o(t={}){return function({width:t=24,height:e=24,stroke:s=2,dots:o=8,filled:a=3,dotRadius:r=null,direction:l="clockwise",pixel:c=!1}={}){const h=t/2,d=e/2,u=Math.min(t,e)/2,f=Math.max(1,u-s/2),p=i("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:c?t:null,height:c?e:null,"aria-hidden":"true",focusable:"false"}),m={cx:h,cy:d,r:n(f),fill:"none",stroke:"currentColor","stroke-width":s},y=i("circle",{class:"sf-loader-ring-filled",...m,opacity:"0.3"}),b=i("circle",{class:"sf-loader-ring-accent",...m,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"0 100",transform:`rotate(90 ${h} ${d})`}),w=i("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${h} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;w.append(i("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...m,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${n(4)} ${n(96)}`,"stroke-dashoffset":n(-4*t),opacity:n(((t+1)/10)**1.6)}))}const g=Math.max(3,Math.min(32,Math.floor(Number(o)||8))),x=Math.max(1,Math.min(g,Math.floor(Number(a)||3))),E=Math.min(s,.7*Math.PI*(u-s)/g),L=null==r||""===r?E:Math.max(1,Math.min(Number(r)||E,u/4)),N=Math.max(L,u-L),M=i("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${g}; --sf-loader-dot-filled:${x};`});for(let t=0;t<g;t+=1){const e=2*Math.PI/g*t-Math.PI/2,s="counterclockwise"===l?t:(g-t)%g;M.append(i("circle",{class:"sf-loader-dot"+(t<x?" sf-loader-dot--active":""),cx:n(h+N*Math.cos(e)),cy:n(d+N*Math.sin(e)),r:n(L),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${s};`}))}return p.append(y,b,w,M),p}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}class a extends t{static componentName="Buttons";html=null;constructor(t){super(t);const{size:e="1",type:s="default",scheme:i="primary",text:n="",icon:a,iconLeft:r,iconRight:l,iconPosition:c="start",tightness:h,spacing:d,radius:u,loading:f=!1,disabled:p=!1,utilities:m={}}=this.params||{},y=this.attrs.class||this.attrs.className;this.button=document.createElement("button"),this.id&&(this.button.id=this.id),this.button.classList.add("sf-button",`sf-button--size-${e}`,`sf-button--${s}`,`sf-button--${i}`);const b=["normal","compact","comfortable","spacious"].includes(d);b&&"normal"!==d?this.button.classList.add(`spacing-${d}`):!b&&h&&this.button.classList.add(`tightness-${h}`),u&&this.button.classList.add(`radius-${u}`),f&&(this.button.classList.add("loading","sf-button-state-loading"),this.button.setAttribute("aria-busy","true"),this.button.disabled=!0),p&&(this.button.disabled=!0),y&&this.button.classList.add(...`${y}`.split(" ").filter(Boolean)),Object.entries(this.attrs).filter(([t])=>!["class","className"].includes(t)).forEach(([t,e])=>{null!=e&&this.button.setAttribute(t,e)}),this.button.hasAttribute("type")||this.button.setAttribute("type","button");const w=`${c}`.toLowerCase(),g=["right","end"].includes(w),x=r??(a&&!g?a:null),E=l??(a&&g?a:null);this.iconLeft=this.createIcon(x),this.iconRight=this.createIcon(E),this.textContainer=document.createElement("span"),this.textContainer.classList.add("sf-button-text-container"),this.textElement=document.createElement("span"),this.textElement.classList.add("sf-button-text"),this.textContainer.textContent=n,this.applyLayoutUtilities(this.button,".sf-button"),this.applyLayoutUtilities(this.iconLeft,".sf-button .sf-icon"),this.applyLayoutUtilities(this.iconRight,".sf-button .sf-icon"),this.applyLayoutUtilities(this.textContainer,".sf-button .sf-button-text-container"),this.applyUtilities(this.button,m.button??m),this.applyUtilities(this.iconLeft,m.icon),this.applyUtilities(this.iconRight,m.icon),this.applyUtilities(this.textContainer,m.textContainer);let L=this.iconLeft,N=this.iconRight;if(f){const t=!L&&!N;this.spinner=function({className:t="",overlay:e=!1}={}){const s=document.createElement("span");s.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),s.dataset.sfSpinnerBound="1",s.dataset.infinite="true",s.setAttribute("aria-hidden","true");const i=document.createElement("span");return i.className="sf-loader--loading-indicator",i.append(o()),s.append(i),s}({className:"sf-button-spinner",overlay:t}),L?L=this.spinner:N?N=this.spinner:this.button.append(this.spinner)}L&&this.button.append(L),this.button.append(this.textContainer),N&&this.button.append(N),this.template=this.button}createIcon(t){if(!t)return null;const e=document.createElement("i");return e.classList.add("sf-icon"),e.setAttribute("aria-hidden","true"),e.textContent=t,e}applyUtilities(t,e){if(!t||!e)return;var s;(s=e,Array.isArray(s)?s:"string"==typeof s?s.split(" "):Array.isArray(s?.classes)?s.classes:"string"==typeof s?.classes?s.classes.split(" "):Array.isArray(s?.button)?s.button:"string"==typeof s?.button?s.button.split(" "):[]).filter(Boolean).forEach(e=>t.classList.add(e))}}a.utilityMap=e,s("Buttons",a)})();
1
+ (()=>{"use strict";class t{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const s=t.match(/\(([^)]+)\)/g);s&&s.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const s=this.getUtilityMap();if(!s||!s[e])return;this.extractUtilityClasses(s[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}const e=JSON.parse('{".sf-button":["display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/center (.justify-center)","align-items/center (.items-center)"],".sf-button .sf-icon":["display/flex (.flex)","justify-content/center (.justify-center)","align-items/center (.items-center)"],".sf-button .sf-button-text-container":["display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/center (.justify-center)","align-items/center (.items-center)"]}');const s=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)};function i(t,e={}){const s=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&s.setAttribute(t,String(e))}),s}const n=t=>Math.round(1e3*t)/1e3;function o(t={}){return function({width:t=24,height:e=24,stroke:s=2,dots:o=8,filled:a=3,dotRadius:r=null,direction:l="clockwise",pixel:c=!1}={}){const h=t/2,d=e/2,u=Math.min(t,e)/2,f=Math.max(1,u-s/2),p=i("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:c?t:null,height:c?e:null,"aria-hidden":"true",focusable:"false"}),m={cx:h,cy:d,r:n(f),fill:"none",stroke:"currentColor","stroke-width":s},y=i("circle",{class:"sf-loader-ring-filled",...m,opacity:"0.3"}),b=i("circle",{class:"sf-loader-ring-accent",...m,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${h} ${d})`}),w=i("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${h} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;w.append(i("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...m,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${n(4)} ${n(96)}`,"stroke-dashoffset":n(-4*t),opacity:n(((t+1)/10)**1.6)}))}const g=Math.max(3,Math.min(32,Math.floor(Number(o)||8))),x=Math.max(1,Math.min(g,Math.floor(Number(a)||3))),E=Math.min(s,.7*Math.PI*(u-s)/g),L=null==r||""===r?E:Math.max(1,Math.min(Number(r)||E,u/4)),N=Math.max(L,u-L),M=i("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${g}; --sf-loader-dot-filled:${x};`});for(let t=0;t<g;t+=1){const e=2*Math.PI/g*t-Math.PI/2,s="counterclockwise"===l?t:(g-t)%g;M.append(i("circle",{class:"sf-loader-dot"+(t<x?" sf-loader-dot--active":""),cx:n(h+N*Math.cos(e)),cy:n(d+N*Math.sin(e)),r:n(L),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${s};`}))}return p.append(y,b,w,M),p}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}class a extends t{static componentName="Buttons";html=null;constructor(t){super(t);const{size:e="1",type:s="default",scheme:i="primary",text:n="",icon:a,iconLeft:r,iconRight:l,iconPosition:c="start",tightness:h,spacing:d,radius:u,loading:f=!1,disabled:p=!1,utilities:m={}}=this.params||{},y=this.attrs.class||this.attrs.className;this.button=document.createElement("button"),this.id&&(this.button.id=this.id),this.button.classList.add("sf-button",`sf-button--size-${e}`,`sf-button--${s}`,`sf-button--${i}`);const b=["normal","compact","comfortable","spacious"].includes(d);b&&"normal"!==d?this.button.classList.add(`spacing-${d}`):!b&&h&&this.button.classList.add(`tightness-${h}`),u&&this.button.classList.add(`radius-${u}`),f&&(this.button.classList.add("loading","sf-button-state-loading"),this.button.setAttribute("aria-busy","true"),this.button.disabled=!0),p&&(this.button.disabled=!0),y&&this.button.classList.add(...`${y}`.split(" ").filter(Boolean)),Object.entries(this.attrs).filter(([t])=>!["class","className"].includes(t)).forEach(([t,e])=>{null!=e&&this.button.setAttribute(t,e)}),this.button.hasAttribute("type")||this.button.setAttribute("type","button");const w=`${c}`.toLowerCase(),g=["right","end"].includes(w),x=r??(a&&!g?a:null),E=l??(a&&g?a:null);this.iconLeft=this.createIcon(x),this.iconRight=this.createIcon(E),this.textContainer=document.createElement("span"),this.textContainer.classList.add("sf-button-text-container"),this.textElement=document.createElement("span"),this.textElement.classList.add("sf-button-text"),this.textContainer.textContent=n,this.applyLayoutUtilities(this.button,".sf-button"),this.applyLayoutUtilities(this.iconLeft,".sf-button .sf-icon"),this.applyLayoutUtilities(this.iconRight,".sf-button .sf-icon"),this.applyLayoutUtilities(this.textContainer,".sf-button .sf-button-text-container"),this.applyUtilities(this.button,m.button??m),this.applyUtilities(this.iconLeft,m.icon),this.applyUtilities(this.iconRight,m.icon),this.applyUtilities(this.textContainer,m.textContainer);let L=this.iconLeft,N=this.iconRight;if(f){const t=!L&&!N;this.spinner=function({className:t="",overlay:e=!1}={}){const s=document.createElement("span");s.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),s.dataset.sfSpinnerBound="1",s.dataset.infinite="true",s.setAttribute("aria-hidden","true");const i=document.createElement("span");return i.className="sf-loader--loading-indicator",i.append(o()),s.append(i),s}({className:"sf-button-spinner",overlay:t}),L?L=this.spinner:N?N=this.spinner:this.button.append(this.spinner)}L&&this.button.append(L),this.button.append(this.textContainer),N&&this.button.append(N),this.template=this.button}createIcon(t){if(!t)return null;const e=document.createElement("i");return e.classList.add("sf-icon"),e.setAttribute("aria-hidden","true"),e.textContent=t,e}applyUtilities(t,e){if(!t||!e)return;var s;(s=e,Array.isArray(s)?s:"string"==typeof s?s.split(" "):Array.isArray(s?.classes)?s.classes:"string"==typeof s?.classes?s.classes.split(" "):Array.isArray(s?.button)?s.button:"string"==typeof s?.button?s.button.split(" "):[]).filter(Boolean).forEach(e=>t.classList.add(e))}}a.utilityMap=e,s("Buttons",a)})();
@@ -1 +1 @@
1
- (()=>{"use strict";class t{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const s=t.match(/\(([^)]+)\)/g);s&&s.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const s=this.getUtilityMap();if(!s||!s[e])return;this.extractUtilityClasses(s[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}const e=JSON.parse('{".sf-icon-button":["display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/center (.justify-center)","align-items/center (.items-center)"],".sf-icon-button .sf-icon":["display/flex (.flex)","justify-content/center (.justify-center)","align-items/center (.items-center)"]}');const s=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)};function i(t,e={}){const s=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&s.setAttribute(t,String(e))}),s}const n=t=>Math.round(1e3*t)/1e3;function o(t={}){return function({width:t=24,height:e=24,stroke:s=2,dots:o=8,filled:a=3,dotRadius:r=null,direction:l="clockwise",pixel:c=!1}={}){const d=t/2,u=e/2,h=Math.min(t,e)/2,f=Math.max(1,h-s/2),p=i("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:c?t:null,height:c?e:null,"aria-hidden":"true",focusable:"false"}),m={cx:d,cy:u,r:n(f),fill:"none",stroke:"currentColor","stroke-width":s},y=i("circle",{class:"sf-loader-ring-filled",...m,opacity:"0.3"}),b=i("circle",{class:"sf-loader-ring-accent",...m,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"0 100",transform:`rotate(90 ${d} ${u})`}),w=i("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${d} ${u})`});for(let t=0;t<10;t+=1){const e=9===t;w.append(i("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...m,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${n(4)} ${n(96)}`,"stroke-dashoffset":n(-4*t),opacity:n(((t+1)/10)**1.6)}))}const g=Math.max(3,Math.min(32,Math.floor(Number(o)||8))),E=Math.max(1,Math.min(g,Math.floor(Number(a)||3))),N=Math.min(s,.7*Math.PI*(h-s)/g),M=null==r||""===r?N:Math.max(1,Math.min(Number(r)||N,h/4)),x=Math.max(M,h-M),$=i("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${g}; --sf-loader-dot-filled:${E};`});for(let t=0;t<g;t+=1){const e=2*Math.PI/g*t-Math.PI/2,s="counterclockwise"===l?t:(g-t)%g;$.append(i("circle",{class:"sf-loader-dot"+(t<E?" sf-loader-dot--active":""),cx:n(d+x*Math.cos(e)),cy:n(u+x*Math.sin(e)),r:n(M),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${s};`}))}return p.append(y,b,w,$),p}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}class a extends t{static componentName="IconButtons";html=null;constructor(t){super(t);const{size:e="1",type:s="default",scheme:i="primary",icon:n,tightness:a,spacing:r,radius:l,loading:c=!1,disabled:d=!1,utilities:u={}}=this.params||{},h=this.attrs.class||this.attrs.className;this.button=document.createElement("button"),this.id&&(this.button.id=this.id),this.button.classList.add("sf-icon-button","sf-icon-button--icon",`sf-icon-button--size-${e}`,`sf-icon-button--${s}`,`sf-icon-button--${i}`);const f=["normal","compact","comfortable","spacious"].includes(r);f&&"normal"!==r?this.button.classList.add(`spacing-${r}`):!f&&a&&this.button.classList.add(`tightness-${a}`),l&&this.button.classList.add(`radius-${l}`),c&&(this.button.classList.add("loading","sf-icon-button-state-loading"),this.button.setAttribute("aria-busy","true"),this.button.disabled=!0),d&&(this.button.disabled=!0),h&&this.button.classList.add(...`${h}`.split(" ").filter(Boolean)),Object.entries(this.attrs).filter(([t])=>!["class","className"].includes(t)).forEach(([t,e])=>{null!=e&&this.button.setAttribute(t,e)}),this.button.hasAttribute("type")||this.button.setAttribute("type","button"),this.iconElement=this.createIcon(n),this.applyLayoutUtilities(this.button,".sf-icon-button"),this.applyLayoutUtilities(this.iconElement,".sf-icon-button .sf-icon"),this.applyUtilities(this.button,u.button??u),this.applyUtilities(this.iconElement,u.icon),c?(this.spinner=function({className:t="",overlay:e=!1}={}){const s=document.createElement("span");s.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),s.dataset.sfSpinnerBound="1",s.dataset.infinite="true",s.setAttribute("aria-hidden","true");const i=document.createElement("span");return i.className="sf-loader--loading-indicator",i.append(o()),s.append(i),s}({className:"sf-icon-button-spinner"}),this.button.append(this.spinner)):this.iconElement&&this.button.append(this.iconElement),this.template=this.button}createIcon(t){if(!t)return null;const e=document.createElement("i");return e.classList.add("sf-icon"),e.setAttribute("aria-hidden","true"),e.textContent=t,e}applyUtilities(t,e){if(!t||!e)return;var s;(s=e,Array.isArray(s)?s:"string"==typeof s?s.split(" "):Array.isArray(s?.classes)?s.classes:"string"==typeof s?.classes?s.classes.split(" "):Array.isArray(s?.button)?s.button:"string"==typeof s?.button?s.button.split(" "):[]).filter(Boolean).forEach(e=>t.classList.add(e))}}a.utilityMap=e,s("IconButtons",a)})();
1
+ (()=>{"use strict";class t{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const s=t.match(/\(([^)]+)\)/g);s&&s.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const s=this.getUtilityMap();if(!s||!s[e])return;this.extractUtilityClasses(s[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}const e=JSON.parse('{".sf-icon-button":["display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/center (.justify-center)","align-items/center (.items-center)"],".sf-icon-button .sf-icon":["display/flex (.flex)","justify-content/center (.justify-center)","align-items/center (.items-center)"]}');const s=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)};function i(t,e={}){const s=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&s.setAttribute(t,String(e))}),s}const n=t=>Math.round(1e3*t)/1e3;function o(t={}){return function({width:t=24,height:e=24,stroke:s=2,dots:o=8,filled:a=3,dotRadius:r=null,direction:l="clockwise",pixel:c=!1}={}){const d=t/2,u=e/2,h=Math.min(t,e)/2,f=Math.max(1,h-s/2),p=i("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:c?t:null,height:c?e:null,"aria-hidden":"true",focusable:"false"}),m={cx:d,cy:u,r:n(f),fill:"none",stroke:"currentColor","stroke-width":s},y=i("circle",{class:"sf-loader-ring-filled",...m,opacity:"0.3"}),b=i("circle",{class:"sf-loader-ring-accent",...m,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${d} ${u})`}),w=i("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${d} ${u})`});for(let t=0;t<10;t+=1){const e=9===t;w.append(i("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...m,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${n(4)} ${n(96)}`,"stroke-dashoffset":n(-4*t),opacity:n(((t+1)/10)**1.6)}))}const g=Math.max(3,Math.min(32,Math.floor(Number(o)||8))),E=Math.max(1,Math.min(g,Math.floor(Number(a)||3))),N=Math.min(s,.7*Math.PI*(h-s)/g),M=null==r||""===r?N:Math.max(1,Math.min(Number(r)||N,h/4)),x=Math.max(M,h-M),$=i("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${g}; --sf-loader-dot-filled:${E};`});for(let t=0;t<g;t+=1){const e=2*Math.PI/g*t-Math.PI/2,s="counterclockwise"===l?t:(g-t)%g;$.append(i("circle",{class:"sf-loader-dot"+(t<E?" sf-loader-dot--active":""),cx:n(d+x*Math.cos(e)),cy:n(u+x*Math.sin(e)),r:n(M),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${s};`}))}return p.append(y,b,w,$),p}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}class a extends t{static componentName="IconButtons";html=null;constructor(t){super(t);const{size:e="1",type:s="default",scheme:i="primary",icon:n,tightness:a,spacing:r,radius:l,loading:c=!1,disabled:d=!1,utilities:u={}}=this.params||{},h=this.attrs.class||this.attrs.className;this.button=document.createElement("button"),this.id&&(this.button.id=this.id),this.button.classList.add("sf-icon-button","sf-icon-button--icon",`sf-icon-button--size-${e}`,`sf-icon-button--${s}`,`sf-icon-button--${i}`);const f=["normal","compact","comfortable","spacious"].includes(r);f&&"normal"!==r?this.button.classList.add(`spacing-${r}`):!f&&a&&this.button.classList.add(`tightness-${a}`),l&&this.button.classList.add(`radius-${l}`),c&&(this.button.classList.add("loading","sf-icon-button-state-loading"),this.button.setAttribute("aria-busy","true"),this.button.disabled=!0),d&&(this.button.disabled=!0),h&&this.button.classList.add(...`${h}`.split(" ").filter(Boolean)),Object.entries(this.attrs).filter(([t])=>!["class","className"].includes(t)).forEach(([t,e])=>{null!=e&&this.button.setAttribute(t,e)}),this.button.hasAttribute("type")||this.button.setAttribute("type","button"),this.iconElement=this.createIcon(n),this.applyLayoutUtilities(this.button,".sf-icon-button"),this.applyLayoutUtilities(this.iconElement,".sf-icon-button .sf-icon"),this.applyUtilities(this.button,u.button??u),this.applyUtilities(this.iconElement,u.icon),c?(this.spinner=function({className:t="",overlay:e=!1}={}){const s=document.createElement("span");s.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),s.dataset.sfSpinnerBound="1",s.dataset.infinite="true",s.setAttribute("aria-hidden","true");const i=document.createElement("span");return i.className="sf-loader--loading-indicator",i.append(o()),s.append(i),s}({className:"sf-icon-button-spinner"}),this.button.append(this.spinner)):this.iconElement&&this.button.append(this.iconElement),this.template=this.button}createIcon(t){if(!t)return null;const e=document.createElement("i");return e.classList.add("sf-icon"),e.setAttribute("aria-hidden","true"),e.textContent=t,e}applyUtilities(t,e){if(!t||!e)return;var s;(s=e,Array.isArray(s)?s:"string"==typeof s?s.split(" "):Array.isArray(s?.classes)?s.classes:"string"==typeof s?.classes?s.classes.split(" "):Array.isArray(s?.button)?s.button:"string"==typeof s?.button?s.button.split(" "):[]).filter(Boolean).forEach(e=>t.classList.add(e))}}a.utilityMap=e,s("IconButtons",a)})();
@@ -1 +1 @@
1
- (()=>{"use strict";class t{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const s=t.match(/\(([^)]+)\)/g);s&&s.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const s=this.getUtilityMap();if(!s||!s[e])return;this.extractUtilityClasses(s[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}const e=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)},s=(()=>{const t="undefined"!=typeof globalThis?globalThis:{},e="__sfPageLanguage";return t[e]||(t[e]={listeners:new Set,registered:new Map,chosen:null}),t[e]})(),n=s.listeners,o=s.registered,i=t=>String(t??"").trim().toLowerCase().replace("_","-"),a=()=>{for(const t of[...n])try{t()}catch{}};function r(t){let e=t;for(;e;){const t="function"==typeof e.closest?e.closest("[lang]"):null;if(t)return t;const s="function"==typeof e.getRootNode?e.getRootNode():null;e=s&&s!==e&&s.host?s.host:null}return null}function l(t){if(s.chosen)return s.chosen.split("-")[0];const e=r(t),n=e?.getAttribute("lang")||globalThis.document?.documentElement?.lang||"en";return i(n).split("-")[0]||"en"}function d(t){if(s.chosen)return s.chosen;const e=r(t);return i(e?.getAttribute("lang")||globalThis.document?.documentElement?.lang||"en")}function c(t,e,s,n){const a=n??(t=>{const e=t?.tagName;return"string"==typeof e?e.toLowerCase():null})(s);for(const n of(t=>{const e=i(t),s=e.split("-")[0],n=[];for(const t of[e,s,"en"])t&&!n.includes(t)&&n.push(t);return n})(d(s))){const s=a?o.get(a)?.get(n)?.[e]:void 0;if(void 0!==s)return s;const i=t?.[n]?.[e];if(void 0!==i)return i}return e}const h={current:(t=globalThis.document?.documentElement??null)=>d(t),use(t){const e=null==t?null:i(t);return e===s.chosen||(s.chosen=e,a()),s.chosen},register(t,e,s){const n=String(t??"").toLowerCase(),r=i(e);if(!n||!r)throw new TypeError("a component and a language are required");o.has(n)||o.set(n,new Map);const l=o.get(n);return null===s?l.delete(r):l.set(r,{...l.get(r)??{},...s}),a(),this},registerAll(t,e={}){for(const[s,n]of Object.entries(e))this.register(s,t,n);return this},known(t){const e=String(t??"").toLowerCase();return[...o.get(e)?.keys()??[]]},components:()=>[...o.keys()],onChange:t=>"function"!=typeof t?()=>{}:(n.add(t),()=>n.delete(t)),forget(){return o.clear(),s.chosen=null,a(),this}};"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.language=h,window.SF.pageLanguage=l,window.SF.pageText=c);const m=["a[href]","area[href]","button","input","select","textarea","iframe","summary","audio[controls]","video[controls]","[contenteditable]","[tabindex]"].join(","),u=Symbol.for("simai.modal.focus-guards");function f(t,e){return"INPUT"===t?.tagName&&"INPUT"===e?.tagName&&"radio"===t.type&&"radio"===e.type&&!!t.name&&t.name===e.name&&t.form===e.form&&t.getRootNode()===e.getRootNode()}function p(t,e=!1){const s=t.ownerDocument.defaultView,n=Array.from(t.querySelectorAll(m)).filter(t=>t.tabIndex>=0&&!t.matches(":disabled")&&!t.closest("[inert]")&&t.getClientRects().length>0&&"visible"===s.getComputedStyle(t).visibility).sort((t,e)=>(t.tabIndex||1/0)-(e.tabIndex||1/0));return n.filter(t=>{if(!f(t,t))return!0;const s=n.filter(e=>f(t,e)),o=s.find(t=>t.checked);return t===(o||s.at(e?-1:0))})}const g=t=>{const e=Number.parseFloat(t);return Number.isFinite(e)?e*(t.trim().endsWith("ms")?1:1e3):0};function b(t,e=window){let s=!1,n=null,o=null;const i=()=>{s||(s=!0,null!==n&&(e.cancelAnimationFrame(n),n=null),null!==o&&(e.clearTimeout(o),o=null),t())};return n=e.requestAnimationFrame(i),o=e.setTimeout(i,50),"function"==typeof e.queueMicrotask&&e.queueMicrotask(i),()=>{s=!0,null!==n&&e.cancelAnimationFrame(n),null!==o&&e.clearTimeout(o)}}function y(t,e,s=window){let n=null,o=!1;const i=b(()=>{if(o)return;const i=t(),a=i?.querySelectorAll("[data-sf-modal-panel], [data-sf-modal-overlay]")||[],r=Math.max(0,...Array.from(a,t=>{const e=s.getComputedStyle(t);return"none"===e.display?0:function(t){const e=t.transitionProperty.split(",").map(t=>t.trim()),s=t.transitionDuration.split(",").map(g),n=t.transitionDelay.split(",").map(g);return Math.max(0,...e.map((t,e)=>["all","opacity","transform","-webkit-transform"].includes(t)?Math.max(0,s[e%s.length])+n[e%n.length]:0))}(e)}));n=s.setTimeout(()=>{o||e()},r)},s);return()=>{o=!0,i(),null!==n&&s.clearTimeout(n)}}function v(t,e={}){const s=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&s.setAttribute(t,String(e))}),s}const w=t=>Math.round(1e3*t)/1e3;function C(t={}){return function({width:t=24,height:e=24,stroke:s=2,dots:n=8,filled:o=3,dotRadius:i=null,direction:a="clockwise",pixel:r=!1}={}){const l=t/2,d=e/2,c=Math.min(t,e)/2,h=Math.max(1,c-s/2),m=v("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:r?t:null,height:r?e:null,"aria-hidden":"true",focusable:"false"}),u={cx:l,cy:d,r:w(h),fill:"none",stroke:"currentColor","stroke-width":s},f=v("circle",{class:"sf-loader-ring-filled",...u,opacity:"0.3"}),p=v("circle",{class:"sf-loader-ring-accent",...u,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"0 100",transform:`rotate(90 ${l} ${d})`}),g=v("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${l} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;g.append(v("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...u,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${w(4)} ${w(96)}`,"stroke-dashoffset":w(-4*t),opacity:w(((t+1)/10)**1.6)}))}const b=Math.max(3,Math.min(32,Math.floor(Number(n)||8))),y=Math.max(1,Math.min(b,Math.floor(Number(o)||3))),C=Math.min(s,.7*Math.PI*(c-s)/b),_=null==i||""===i?C:Math.max(1,Math.min(Number(i)||C,c/4)),E=Math.max(_,c-_),A=v("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${b}; --sf-loader-dot-filled:${y};`});for(let t=0;t<b;t+=1){const e=2*Math.PI/b*t-Math.PI/2,s="counterclockwise"===a?t:(b-t)%b;A.append(v("circle",{class:"sf-loader-dot"+(t<y?" sf-loader-dot--active":""),cx:w(l+E*Math.cos(e)),cy:w(d+E*Math.sin(e)),r:w(_),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${s};`}))}return m.append(f,p,g,A),m}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}const _=Symbol.for("simai.modal.document-stack");function E(){return document[_]||Object.defineProperty(document,_,{value:{items:[],lockOwner:null},configurable:!0}),document[_]}function A(){return E().items.at(-1)||null}function S(){E().items.forEach((t,e)=>t.applyStackPosition(e)),function(t){const e=t?.getModalRoot?.()||t?.template,s=e?.querySelector?.("[data-sf-modal-panel]"),n=document[u];if(n&&n.panel===s&&n.before.isConnected&&n.after.isConnected)return;if(n?.before.remove(),n?.after.remove(),delete document[u],!s?.parentNode)return;const o={panel:s,relaying:!1};for(const t of["before","after"]){const n=s.ownerDocument.createElement("span");n.tabIndex=0,n.className="sf-modal-focus-guard",n.setAttribute("aria-hidden","true"),n.addEventListener("focus",()=>{if(o.relaying||!s.isConnected||e.inert||"true"===e.getAttribute("aria-hidden"))return;const n="before"===t,i=p(s,n),a=n?i.at(-1):i[0];a&&"IFRAME"!==a.tagName?a.focus({preventScroll:!0}):s.focus({preventScroll:!0})}),o[t]=n}s.before(o.before),s.after(o.after),document[u]=o}(A())}const x=t=>!t.inContainer;function L(t,e=!1){if(!t?.isConnected||"function"!=typeof t.focus||t.matches(":disabled")||t.closest('[inert], [hidden], [aria-hidden="true"]')||!t.getClientRects().length||"visible"!==t.ownerDocument.defaultView.getComputedStyle(t).visibility)return!1;const s=e&&!t.hasAttribute("tabindex");let n;const o=()=>{n?.disconnect(),t.removeEventListener("blur",o),s&&"-1"===t.getAttribute("tabindex")&&t.removeAttribute("tabindex")};s&&(t.setAttribute("tabindex","-1"),t.addEventListener("blur",o,{once:!0}),n=new t.ownerDocument.defaultView.MutationObserver(()=>{t.isConnected||o()}),n.observe(t.ownerDocument.documentElement,{childList:!0,subtree:!0}));let i=!1;try{return t.focus({preventScroll:!0}),i=t.ownerDocument.activeElement===t,i}catch{return!1}finally{s&&!i&&o()}}const k="[data-sf-overlay-container], [data-sf-drawer-container]";function T(...t){return t.filter(Boolean).join(" ").trim()}function N(t="medium"){const e=String(t||"medium").trim().toLowerCase();return["none","small","medium","large"].includes(e)?e:"medium"}function O(t="medium"){return`backdrop-blur-${N(t)}`}function M(t){return["none","small","medium","large"].includes(String(t||"").trim().toLowerCase())}function P(t){return String(t||"").trim()}const F={en:{title:"Dialog",close:"Close"},ru:{title:"Окно",close:"Закрыть"}},B=t=>c(F,"title",t);class I extends t{static componentName="Modal";static registry=new Map;static globalBound=!1;static stack=[];static openCount=0;static uid=0;static lockState=null;static baseZIndex=9e3;static getTopModal(){return A()}static isTopModal(t){return I.getTopModal()===t}static addToStack(t){t&&"inline"!==t.display&&(I.stack=I.stack.filter(e=>e!==t),I.stack.push(t),I.openCount=I.stack.length,function(t,e){const s=E();s.items.includes(t)||(x(t)&&!s.lockOwner&&(s.lockOwner=e,e.lockPage(t.preserveScrollGap)),s.items.push(t),S())}(t,I))}static removeFromStack(t){t&&"inline"!==t.display&&(I.stack=I.stack.filter(e=>e!==t),I.openCount=I.stack.length,function(t){const e=E(),s=e.items.indexOf(t);s<0||(e.items.splice(s,1),e.lockOwner&&!e.items.some(x)&&(e.lockOwner.unlockPage(),e.lockOwner=null),S())}(t))}static bringToFront(t){t&&"inline"!==t.display&&I.stack.includes(t)&&(I.stack=I.stack.filter(e=>e!==t),I.stack.push(t),function(t){const e=E(),s=e.items.indexOf(t);s<0||(e.items.splice(s,1),e.items.push(t),S())}(t))}static updateStackStyles(){S()}constructor(t){super(t);const e=this.params||{};this.modalId=this.id||e.id||"sf-modal-"+ ++I.uid,this.isOpen=!1,this.lastActive=null,this.root=e.root||null,this.container=e.container||null,this.overlay=this.toBoolean(e.overlay,!0),this.unclose=this.toBoolean(e.unclose,!1),this.showClose=this.toBoolean(e.showClose,!0)&&!this.unclose,this.showFooter=this.toBoolean(e.showFooter,!0),this.closeOnEsc=this.toBoolean(e.closeOnEsc,!0)&&!this.unclose,this.closeOnOverlay=this.toBoolean(e.closeOnOverlay,!0)&&!this.unclose,this.preserveScrollGap=this.toBoolean(e.preserveScrollGap,!0),this.autoload=this.toBoolean(e.autoload,!1),this.position=function(t="center"){const e=String(t||"center").trim().toLowerCase();return["center","left","right","inline-start","inline-end","top","bottom"].includes(e)?e:"center"}(e.position),this.fullscreen=this.toBoolean(e.fullscreen,!1),this.mode=function(t){const e=String(t||"inline").trim().toLowerCase();return["inline","ajax","iframe"].includes(e)?e:"inline"}(e.mode),this.display=function(t){const e=String(t||"modal").trim().toLowerCase();return["modal","inline"].includes(e)?e:"modal"}(e.display),this.src=e.src||"",this.preload=this.toBoolean(e.preload,!0),this._fetchController=null,this._contentLoaded=!1,this._contentError=null,this._loadingTimer=null,this._loadingShown=!1,this._loadingDebounceMs=500,this.blur=!!M(e.blur)||this.toBoolean(e.blur,!1),this.hasCustomBlurType=M(e.blurType)||M(e.blur),this.blurType=N(e.blurType||(M(e.blur)?e.blur:"")),this.onOverlayClick=this.onOverlayClick.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this._modalState="closed",this._stackIndex=-1,this._closeTimer=null,this._closeTransitionAbort=null,this.template=this.buildTemplate(e),this.template.id=this.modalId,this.template.setAttribute("data-sf-modal-id",this.modalId),this.template.setAttribute("aria-hidden","true"),this.init()}overlayHomeFor(t=null){let e=this.container;if("string"==typeof e&&(e=document.querySelector(e)),e instanceof Element)return e.matches(k)||e.setAttribute("data-sf-overlay-container",""),e;return(t instanceof Element?t.closest(k):null)||document.body}get overlayHome(){return this.overlayHomeFor()}get inContainer(){return Boolean(this.template?.parentElement?.closest(k))}placeIn(t){"inline"!==this.display&&!this.root&&this.template&&t&&this.template.parentElement!==t&&t.append(this.template)}emitEvent(t,{cancelable:e=!1,detail:s={}}={}){const n={modal:this,id:this.modalId,isOpen:this.isOpen,...s};let o=!1;if(this.template){const s=new CustomEvent(t,{bubbles:!0,cancelable:e,detail:n});this.template.dispatchEvent(s),o=o||s.defaultPrevented}if("undefined"!=typeof window){const e=new CustomEvent(t,{cancelable:!1,detail:n});window.dispatchEvent(e)}return!o}runCallback(t,e={}){const s=this.params?.[t];if("function"==typeof s)return s({modal:this,id:this.modalId,isOpen:this.isOpen,...e})}emitBeforeOpen(){const t=this.emitEvent("modal:before-open",{cancelable:!0,detail:{phase:"before-open"}}),e=this.emitEvent("SFModalBeforeOpenWindow",{cancelable:!0,detail:{phase:"before-open"}});if(!t||!e)return!1;const s=this.runCallback("beforeOpen",{phase:"before-open"}),n=this.runCallback("beforeOpenWindow",{phase:"before-open"});return!1!==s&&!1!==n}emitAfterOpen(){this.emitEvent("modal:after-open",{detail:{phase:"after-open"}}),this.emitEvent("SFModalAfterOpenWindow",{detail:{phase:"after-open"}}),this.runCallback("afterOpen",{phase:"after-open"}),this.runCallback("afterOpenWindow",{phase:"after-open"})}emitBeforeClose(){const t=this.emitEvent("modal:before-close",{cancelable:!0,detail:{phase:"before-close"}}),e=this.emitEvent("SFModalBeforeCloseWindow",{cancelable:!0,detail:{phase:"before-close"}});if(!t||!e)return!1;const s=this.runCallback("beforeClose",{phase:"before-close"}),n=this.runCallback("beforeCloseWindow",{phase:"before-close"});return!1!==s&&!1!==n}emitAfterClose(){this.emitEvent("modal:after-close",{detail:{phase:"after-close"}}),this.emitEvent("SFModalAfterCloseWindow",{detail:{phase:"after-close"}}),this.runCallback("afterClose",{phase:"after-close"}),this.runCallback("afterCloseWindow",{phase:"after-close"})}toBoolean(t,e){if(null==t)return e;if("boolean"==typeof t)return t;const s=`${t}`.trim().toLowerCase();return!!["1","true","yes","on"].includes(s)||!["0","false","no","off"].includes(s)&&e}getBlurClasses(){return this.hasCustomBlurType?[O(this.blurType)]:[]}setOverlay(t){this.overlay=this.toBoolean(t,!0);const e=this.template?.querySelector("[data-sf-modal-overlay]");return e?(e.classList.toggle("hidden",!this.overlay||"inline"===this.display),this):this}buildTemplate(t){const e="inline"===this.display,s=document.createElement("div");s.className=e?`sf-modal sf-modal--inline sf-modal--position-${this.position} sf-modal--positon-${this.position} inline-block w-full`:`sf-modal sf-modal--position-${this.position} sf-modal--positon-${this.position} hidden fixed top-0 inline-start-0 w-full h-full z-9 p-3 items-cross-center content-main-center`,s.setAttribute("role",e?"region":"dialog"),s.setAttribute("aria-modal",e?"false":"true"),s.setAttribute("data-sf-modal-position",this.position),s.setAttribute("data-sf-modal-fullscreen",String(this.fullscreen)),s.setAttribute("data-sf-modal-display",this.display),s.setAttribute("data-sf-modal-state",e?"inline":"closed");const n=document.createElement("div");n.className=T("absolute top-0 inline-start-0 w-full h-full",this.blur?this.hasCustomBlurType?this.getBlurClasses().join(" "):"bg-surface-overlay":"bg-black opacity-6",t.overlayClass),n.setAttribute("data-sf-modal-overlay",""),this.overlay&&!e||n.classList.add("hidden");const o=document.createElement("section");o.className=T("relative overflow-visible",t.panelClass),o.setAttribute("data-sf-modal-panel","");const i=P(t.width),a=P(t.height);i&&(o.style.setProperty("--sf-modal-width",i),o.setAttribute("data-sf-modal-has-width","")),a&&(o.style.setProperty("--sf-modal-height",a),o.setAttribute("data-sf-modal-has-height",""));const r=document.createElement("div");r.className=T(e?"bg-surface border border-outline-variant radius-surface p-2 flex flex-col gap-1 min-w-0":"bg-surface border border-outline-variant radius-surface shadow-3 p-2 flex flex-col gap-1 min-w-0",t.surfaceClass),r.setAttribute("data-sf-modal-surface","");const l=document.createElement("header");if(l.className=T("sf-modal-header flex items-start min-w-0 border-b border-outline-variant gap-1",t.headerClass),Array.isArray(t.headerNodes)&&t.headerNodes.length)s.setAttribute("aria-label",t.title||B(s)),t.headerNodes.forEach(t=>{t instanceof Node&&l.append(t)});else{const e=document.createElement("h2");if(e.id=`${this.modalId}-title`,s.setAttribute("aria-labelledby",e.id),e.className="sf-modal-header-content title-3 m-0",e.textContent=t.title||B(s),l.append(e),this.showClose){const e=document.createElement("button");e.type="button",e.className=T("sf-icon-button sf-modal-header-action sf-modal-close-button sf-icon-button--close sf-icon-button--link sf-icon-button--on-surface sf-icon-button--size-1/3 m-0",t.closeClass),e.setAttribute("aria-label",c(F,"close",e.isConnected?e:document.documentElement)),e.setAttribute("data-sf-modal-close",this.modalId),e.innerHTML=' <span\n class="sf-close sf-close--size-1/3 flex justify-center items-center"\n aria-hidden="true"\n >\n <span class="sf-close-icon"></span>\n </span>',l.append(e)}}const d=document.createElement("div");d.className="sf-modal-body flex flex-col gap-1 min-w-0 overflow-visible",d.setAttribute("data-sf-modal-body","");const h=document.createElement("div");h.className="sf-modal-body-viewport min-w-0 overflow-visible",h.setAttribute("data-sf-modal-body-viewport","");const m=document.createElement("div");m.className=T("sf-modal-body-scroll h-full min-w-0 overflow-y-auto flex flex-col gap-1 p-1/4",t.bodyClass),m.setAttribute("data-sf-modal-body-scroll","");const u=document.createElement("div");if(u.className="sf-modal-content-placeholder flex flex-col gap-2 min-h-8 items-cross-center content-main-center",u.setAttribute("data-sf-modal-content-placeholder",""),"ajax"!==this.mode&&"iframe"!==this.mode||!this.src){if(Array.isArray(t.contentNodes)&&t.contentNodes.length){const e=document.createElement("div");e.className=T("sf-modal-content flex flex-col gap-2",t.contentClass),t.contentNodes.forEach(t=>{t instanceof Node&&e.append(t)}),m.append(e)}}else this._scheduleLoading(u),m.append(u);if(Array.isArray(t.footerNodes)&&t.footerNodes.length&&this.showFooter){const e=document.createElement("div");e.className=T("sf-modal-footer flex flex-wrap gap-2",t.footerClass),t.footerNodes.forEach(t=>{t instanceof Node&&e.append(t)}),d.append(e)}else if("string"==typeof t.html&&t.html.trim())m.innerHTML=t.html;else if("ajax"===this.mode&&this.src||"iframe"===this.mode&&this.src);else{const e=document.createElement("p");e.className="m-0 text-2",e.textContent=t.text||"",m.append(e)}return h.append(m),d.prepend(h),r.append(l,d),o.append(r),s.append(n,o),s}_scheduleLoading(t){this._cancelLoadingTimer(),this._loadingShown=!1,this._loadingTimer=setTimeout(()=>{this._showLoading(t),this._loadingShown=!0},this._loadingDebounceMs)}_cancelLoadingTimer(){this._loadingTimer&&(clearTimeout(this._loadingTimer),this._loadingTimer=null)}_finishLoading(){this._cancelLoadingTimer()}_showLoading(t){t.innerHTML="";const e=document.createElement("div");e.className="sf-modal-loading flex flex-col gap-2 items-cross-center content-main-center p-4",e.setAttribute("data-sf-modal-state","loading"),e.innerHTML='\n <p class="m-0 text-2 color-on-surface-variant">Loading...</p>\n ',e.prepend(function({className:t="",overlay:e=!1}={}){const s=document.createElement("span");s.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),s.dataset.sfSpinnerBound="1",s.dataset.infinite="true",s.setAttribute("aria-hidden","true");const n=document.createElement("span");return n.className="sf-loader--loading-indicator",n.append(C()),s.append(n),s}({className:"sf-modal-spinner"})),t.append(e)}_showError(t,e){t.innerHTML="";const s=document.createElement("div");s.className="sf-modal-error flex flex-col gap-2 items-cross-center content-main-center p-4",s.setAttribute("data-sf-modal-state","error"),s.innerHTML=`\n <div class="sf-modal-error-icon text-4 color-error">⚠</div>\n <p class="sf-modal-error-text m-0 text-2 color-error">${this.escapeHtml(e||"Failed to load content")}</p>\n `,t.append(s)}_abortFetch(){this._fetchController&&(this._fetchController.abort(),this._fetchController=null)}async _loadContent(){this.src&&("iframe"!==this.mode?"ajax"===this.mode&&this._loadAjax():this._loadIframe())}async _loadAjax(){if(this.src.startsWith("#")){const t=document.querySelector(this.src);if(t){this._emitBeforeContentUpload();const e=t.cloneNode(!0);e.removeAttribute("id"),this._finishLoading(),this._replaceContentWithNode(e),this._contentLoaded=!0,this._emitAfterContentUpload()}else this._contentError=`Element not found: ${this.src}`,this._finishLoading(),this._showContentError();return}this._abortFetch(),this._fetchController=new AbortController;try{this._emitBeforeContentUpload();const t=await fetch(this.src,{signal:this._fetchController.signal});if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);const e=await t.text();this._contentLoaded=!0,this._finishLoading(),this._replaceContentWithHtml(e),this._fetchController=null,this._emitAfterContentUpload()}catch(t){if("AbortError"===t.name)return void this._finishLoading();this._contentError=t.message,this._finishLoading(),this._showContentError()}}_loadIframe(){this._emitBeforeContentUpload();const t=this.template?.querySelector("[data-sf-modal-body-scroll]");if(!t)return;t.innerHTML="";const e=document.createElement("iframe");e.className="sf-modal-iframe w-full border-0 radius-surface",e.src=this.src,e.setAttribute("data-sf-modal-iframe",""),e.setAttribute("allowfullscreen",""),e.style.minHeight="var(--sf-modal-iframe-min-height)",e.style.height="100%",e.addEventListener("load",()=>{this._contentLoaded=!0,this._finishLoading(),this._emitAfterContentUpload()}),e.addEventListener("error",()=>{this._contentError="Failed to load iframe content",this._finishLoading(),this._showContentError()}),t.append(e)}_replaceContentWithNode(t){const e=this.template?.querySelector("[data-sf-modal-body-scroll]");if(!e)return;e.innerHTML="";const s=document.createElement("div");s.className="sf-modal-content flex flex-col gap-2",s.append(t),e.append(s)}_replaceContentWithHtml(t){const e=this.template?.querySelector("[data-sf-modal-body-scroll]");if(!e)return;e.innerHTML="";const s=document.createElement("div");s.className="sf-modal-content flex flex-col gap-2",s.innerHTML=t,e.append(s)}_showContentError(){const t=this.template?.querySelector("[data-sf-modal-body-scroll]");if(!t)return;t.innerHTML="";const e=document.createElement("div");e.className="sf-modal-error flex flex-col gap-2 items-cross-center content-main-center p-4",e.setAttribute("data-sf-modal-state","error"),e.innerHTML=`\n <div class="sf-modal-error-icon text-4 color-error">⚠</div>\n <p class="sf-modal-error-text m-0 text-2 color-error">${this.escapeHtml(this._contentError||"Failed to load content")}</p>\n `,t.append(e)}_emitBeforeContentUpload(){this.emitEvent("modal:before-content-upload",{detail:{src:this.src}}),this.runCallback("beforeContentUpload",{src:this.src})}_emitAfterContentUpload(){this.emitEvent("modal:after-content-upload",{detail:{src:this.src}}),this.runCallback("afterContentUpload",{src:this.src})}escapeHtml(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}init(){if("inline"===this.display)return this._modalState="open",this.template.setAttribute("data-sf-modal-state","open"),this.template.classList.remove("hidden"),this.toBoolean(this.params?.open,!0)?this.isOpen=!0:(this.isOpen=!1,this._modalState="closed",this.template.setAttribute("data-sf-modal-state","closed"),this.template.classList.add("hidden")),this.template.setAttribute("aria-hidden",String(!this.isOpen)),this.root&&this.root.append(this.template),I.registry.set(this.modalId,this),void("ajax"!==this.mode&&"iframe"!==this.mode||!this.src||!1===this.preload||this._loadContent());if(this.template.isConnected||this.overlayHome.append(this.template),"inline"===this.display)return this.isOpen=!0,this._modalState="open",this.template.setAttribute("data-sf-modal-state","inline"),this.template.classList.remove("hidden"),I.registry.set(this.modalId,this),void("ajax"!==this.mode&&"iframe"!==this.mode||!this.src||!1===this.preload||this._loadContent());this.template.addEventListener("click",this.onOverlayClick),document.addEventListener("keydown",this.onKeyDown),I.registry.set(this.modalId,this),I.bindGlobalEvents();(this.toBoolean(this.params?.open,!1)||this.autoload)&&requestAnimationFrame(()=>{this.open({animate:!1})}),"ajax"!==this.mode&&"iframe"!==this.mode||!this.src||!1===this.preload||this._loadContent()}destroyInternal(){this._abortFetch(),this._cancelLoadingTimer(),this.cancelCloseTransition(),"inline"===this.display||!this.isOpen&&"closing"!==this._modalState||(this._modalState="closing",this.finishClose()),I.removeFromStack(this),this.template.removeEventListener("click",this.onOverlayClick),document.removeEventListener("keydown",this.onKeyDown),I.registry.delete(this.modalId)}onOverlayClick(t){t.target===this.template.querySelector("[data-sf-modal-overlay]")&&this.closeOnOverlay&&this.close()}onKeyDown(t){if((this.isOpen||"closing"===this._modalState)&&I.isTopModal(this))return"Escape"!==t.key||!this.closeOnEsc||"closing"===this._modalState||t.defaultPrevented||document.documentElement?.dataset?.sfPopoverOpen?void("Tab"===t.key&&this.trapFocus(t)):(t.preventDefault(),t.stopImmediatePropagation(),void this.close())}trapFocus(t){if(!I.isTopModal(this))return;!function(t,e){if(!t)return;const s=p(t,e.shiftKey),n=t.ownerDocument.activeElement;if(!s.length)return e.preventDefault(),void t.focus();const o=s[0],i=s[s.length-1],a=e.shiftKey?o:i;if(!t.contains(n)||n===t||n===a||f(n,a)){const s=e.shiftKey?i:o,n=t.ownerDocument[u];if("IFRAME"===s.tagName&&n?.panel===t){n.relaying=!0;try{(e.shiftKey?n.after:n.before).focus({preventScroll:!0})}finally{n.relaying=!1}return}e.preventDefault(),s.focus()}}(this.template.querySelector("[data-sf-modal-panel]"),t)}focusFirst(){if("inline"!==this.display&&!I.isTopModal(this))return;const t=this.template.querySelector("[data-sf-modal-panel]");t&&(t.setAttribute("tabindex","-1"),t.focus())}applyStackPosition(t=function(t){return E().items.indexOf(t)}(this)){return this._stackIndex=t,this.template&&"inline"!==this.display?t<0?(this.template.style.removeProperty("z-index"),this.template.style.removeProperty("--sf-modal-stack-index"),this):(this.template.style.setProperty("--sf-modal-stack-index",String(t)),this.template.style.zIndex=String(I.baseZIndex+2*t),this):this}open(t={}){const{animate:e=!0}="boolean"==typeof t?{animate:t}:t;if("inline"===this.display){if(this.isOpen)return;if(!this.emitBeforeOpen())return;return this.isOpen=!0,this._modalState="open",this.template.setAttribute("data-sf-modal-state","open"),this.template.classList.remove("hidden"),this.template.setAttribute("aria-hidden","false"),void this.emitAfterOpen()}if(this.isOpen)return I.bringToFront(this),void this.cancelCloseTransition();if(this.emitBeforeOpen()){if(("ajax"===this.mode||"iframe"===this.mode)&&this.src&&!this._contentLoaded&&!this._contentError){const t=this.template?.querySelector("[data-sf-modal-body-scroll]");t&&this._scheduleLoading(t),this._loadContent()}if(this._releaseClosingContent?.(),this._releaseClosingContent=null,"closing"!==this._modalState&&(this.lastActive=document.activeElement,this._focusReturnAncestors=function(t){const e=[];for(let s=t?.parentElement;s;s=s.parentElement)s.matches('main, section, article, [role="main"], [role="region"]')&&e.push(s);return e}(this.lastActive),this.placeIn(this.overlayHomeFor(this.lastActive))),this.cancelCloseTransition(),this.template.classList.remove("hidden"),this.template.classList.add("flex"),this.template.setAttribute("aria-hidden","false"),this.template.classList.toggle("animate",Boolean(e)),this.template.setAttribute("data-sf-modal-state","opening"),this.isOpen=!0,I.addToStack(this),!e)return this._modalState="open",this.template.setAttribute("data-sf-modal-state","open"),this.focusFirst(),void this.emitAfterOpen();b(()=>{this.isOpen&&"closing"!==this._modalState&&(this._modalState="open",this.template.setAttribute("data-sf-modal-state","open"),this.focusFirst(),this.emitAfterOpen())})}}close(){if("inline"===this.display){if(!this.emitBeforeClose())return;return this.isOpen=!1,this._modalState="closed",this.template.setAttribute("data-sf-modal-state","closed"),this.template.classList.add("hidden"),this.template.setAttribute("aria-hidden","true"),void this.emitAfterClose()}if(!this.isOpen||"closing"===this._modalState)return;if(!this.emitBeforeClose())return;this._modalState="closing",this.template.setAttribute("data-sf-modal-state","closing"),this.isOpen=!1;const t=this.template.querySelector("[data-sf-modal-panel]");this._releaseClosingContent=function(t,e=!1){if(!t)return()=>{};const s=new Set,n=()=>{for(const e of t.children)e.hasAttribute("inert")||(e.setAttribute("inert",""),s.add(e))};e&&t.focus({preventScroll:!0}),n();const o=new t.ownerDocument.defaultView.MutationObserver(n);return o.observe(t,{childList:!0}),()=>{o.disconnect();for(const t of s)""===t.getAttribute("inert")&&t.removeAttribute("inert");s.clear()}}(t,I.isTopModal(this)),this._closeTransitionAbort=y(()=>this.template,()=>this.finishClose())}toggle(){this.isOpen?this.close():this.open()}setSrc(t){if(this.src=t||"",this._contentLoaded=!1,this._contentError=null,this._loadingShown=!1,this._abortFetch(),!this.template||!this.isOpen)return this;const e=this.template?.querySelector("[data-sf-modal-body-scroll]");return e&&this._scheduleLoading(e),"ajax"!==this.mode&&"iframe"!==this.mode||!this.src||!1===this.preload||this._loadContent(),this}reloadContent(){if(("ajax"===this.mode||"iframe"===this.mode)&&this.src){this._contentLoaded=!1,this._contentError=null,this._loadingShown=!1,this._abortFetch();const t=this.template?.querySelector("[data-sf-modal-body-scroll]");t&&this._scheduleLoading(t),this._loadContent()}return this}cancelCloseTransition(){this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),this._closeTransitionAbort&&(this._closeTransitionAbort(),this._closeTransitionAbort=null),"closing"===this._modalState&&(this._modalState="open",this.template.setAttribute("data-sf-modal-state","open"))}finishClose(){if("closing"!==this._modalState)return;this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),this._closeTransitionAbort&&(this._closeTransitionAbort(),this._closeTransitionAbort=null),this.template.classList.remove("flex"),this.template.classList.add("hidden"),this.template.setAttribute("data-sf-modal-state","closed"),this.template.setAttribute("aria-hidden","true"),this._releaseClosingContent?.(),this._releaseClosingContent=null,this._modalState="closed";const t=I.isTopModal(this);I.removeFromStack(this),function(t,e,s=[]){if(!t)return;const n=A(),o=n?.getModalRoot?.()||n?.template;if((!n||o?.contains(e))&&L(e))return;if(n)return void n.focusFirst();const i=new Set([...s,...document.querySelectorAll('main, [role="main"]'),document.body]);for(const t of i)if(L(t,!0))return}(t,this.lastActive,this._focusReturnAncestors),this.emitAfterClose()}static bindGlobalEvents(){I.globalBound||"undefined"==typeof document||(document.addEventListener("click",t=>{const e=t.target.closest("[data-sf-modal-open]");if(e){const t=e.getAttribute("data-sf-modal-open"),s=I.registry.get(t);return void(s&&s.open())}const s=t.target.closest("[data-sf-modal-close]");if(!s)return;const n=s.getAttribute("data-sf-modal-close");if(n){const t=I.registry.get(n);return void(t&&t.close())}const o=s.closest(".sf-modal");if(!o)return;const i=o.getAttribute("data-sf-modal-id"),a=I.registry.get(i);a&&a.close()}),I.globalBound=!0)}static lockPage(t=!0){I.lockState||(I.lockState=function(t=!0){const e=document.documentElement,s=document.body;if(!e||!s)return null;const n=Math.max(0,window.innerWidth-e.clientWidth),o=parseFloat(window.getComputedStyle(s).paddingInlineEnd)||0,i={docEl:e,body:s,htmlLocked:e.classList.contains("overflow-hidden"),bodyLocked:s.classList.contains("overflow-hidden"),bodyPaddingInlineEnd:s.style.getPropertyValue("padding-inline-end"),paddingPriority:s.style.getPropertyPriority("padding-inline-end"),appliedPadding:null};return e.classList.add("overflow-hidden"),s.classList.add("overflow-hidden"),t&&n>0&&(s.style.setProperty("padding-inline-end",`${o+n}px`,i.paddingPriority),i.appliedPadding=s.style.getPropertyValue("padding-inline-end")),i}(t))}static unlockPage(){!function(t){if(!t)return;const{docEl:e,body:s}=t;t.htmlLocked||e.classList.remove("overflow-hidden"),t.bodyLocked||s.classList.remove("overflow-hidden"),null!==t.appliedPadding&&s.style.getPropertyValue("padding-inline-end")===t.appliedPadding&&s.style.getPropertyPriority("padding-inline-end")===t.paddingPriority&&(t.bodyPaddingInlineEnd?s.style.setProperty("padding-inline-end",t.bodyPaddingInlineEnd,t.paddingPriority):s.style.removeProperty("padding-inline-end"))}(I.lockState),I.lockState=null}}e("Modal",I)})();
1
+ (()=>{"use strict";class t{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const s=t.match(/\(([^)]+)\)/g);s&&s.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const s=this.getUtilityMap();if(!s||!s[e])return;this.extractUtilityClasses(s[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}const e=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)},s=(()=>{const t="undefined"!=typeof globalThis?globalThis:{},e="__sfPageLanguage";return t[e]||(t[e]={listeners:new Set,registered:new Map,chosen:null}),t[e]})(),o=s.listeners,n=s.registered,i=t=>String(t??"").trim().toLowerCase().replace("_","-"),a=()=>{for(const t of[...o])try{t()}catch{}};function l(t){let e=t;for(;e;){const t="function"==typeof e.closest?e.closest("[lang]"):null;if(t)return t;const s="function"==typeof e.getRootNode?e.getRootNode():null;e=s&&s!==e&&s.host?s.host:null}return null}function r(t){if(s.chosen)return s.chosen.split("-")[0];const e=l(t),o=e?.getAttribute("lang")||globalThis.document?.documentElement?.lang||"en";return i(o).split("-")[0]||"en"}function d(t){if(s.chosen)return s.chosen;const e=l(t);return i(e?.getAttribute("lang")||globalThis.document?.documentElement?.lang||"en")}function c(t,e,s,o){const a=o??(t=>{const e=t?.tagName;return"string"==typeof e?e.toLowerCase():null})(s);for(const o of(t=>{const e=i(t),s=e.split("-")[0],o=[];for(const t of[e,s,"en"])t&&!o.includes(t)&&o.push(t);return o})(d(s))){const s=a?n.get(a)?.get(o)?.[e]:void 0;if(void 0!==s)return s;const i=t?.[o]?.[e];if(void 0!==i)return i}return e}const h={current:(t=globalThis.document?.documentElement??null)=>d(t),use(t){const e=null==t?null:i(t);return e===s.chosen||(s.chosen=e,a()),s.chosen},register(t,e,s){const o=String(t??"").toLowerCase(),l=i(e);if(!o||!l)throw new TypeError("a component and a language are required");n.has(o)||n.set(o,new Map);const r=n.get(o);return null===s?r.delete(l):r.set(l,{...r.get(l)??{},...s}),a(),this},registerAll(t,e={}){for(const[s,o]of Object.entries(e))this.register(s,t,o);return this},known(t){const e=String(t??"").toLowerCase();return[...n.get(e)?.keys()??[]]},components:()=>[...n.keys()],onChange:t=>"function"!=typeof t?()=>{}:(o.add(t),()=>o.delete(t)),forget(){return n.clear(),s.chosen=null,a(),this}};"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.language=h,window.SF.pageLanguage=r,window.SF.pageText=c);const m=["a[href]","area[href]","button","input","select","textarea","iframe","summary","audio[controls]","video[controls]","[contenteditable]","[tabindex]"].join(","),u=Symbol.for("simai.modal.focus-guards");function f(t,e){return"INPUT"===t?.tagName&&"INPUT"===e?.tagName&&"radio"===t.type&&"radio"===e.type&&!!t.name&&t.name===e.name&&t.form===e.form&&t.getRootNode()===e.getRootNode()}function p(t,e=!1){const s=t.ownerDocument.defaultView,o=Array.from(t.querySelectorAll(m)).filter(t=>t.tabIndex>=0&&!t.matches(":disabled")&&!t.closest("[inert]")&&t.getClientRects().length>0&&"visible"===s.getComputedStyle(t).visibility).sort((t,e)=>(t.tabIndex||1/0)-(e.tabIndex||1/0));return o.filter(t=>{if(!f(t,t))return!0;const s=o.filter(e=>f(t,e)),n=s.find(t=>t.checked);return t===(n||s.at(e?-1:0))})}const g=t=>{const e=Number.parseFloat(t);return Number.isFinite(e)?e*(t.trim().endsWith("ms")?1:1e3):0};function b(t,e=window){let s=!1,o=null,n=null;const i=()=>{s||(s=!0,null!==o&&(e.cancelAnimationFrame(o),o=null),null!==n&&(e.clearTimeout(n),n=null),t())};return o=e.requestAnimationFrame(i),n=e.setTimeout(i,50),"function"==typeof e.queueMicrotask&&e.queueMicrotask(i),()=>{s=!0,null!==o&&e.cancelAnimationFrame(o),null!==n&&e.clearTimeout(n)}}function y(t,e,s=window){let o=null,n=!1;const i=b(()=>{if(n)return;const i=t(),a=i?.querySelectorAll("[data-sf-modal-panel], [data-sf-modal-overlay]")||[],l=Math.max(0,...Array.from(a,t=>{const e=s.getComputedStyle(t);return"none"===e.display?0:function(t){const e=t.transitionProperty.split(",").map(t=>t.trim()),s=t.transitionDuration.split(",").map(g),o=t.transitionDelay.split(",").map(g);return Math.max(0,...e.map((t,e)=>["all","opacity","transform","-webkit-transform"].includes(t)?Math.max(0,s[e%s.length])+o[e%o.length]:0))}(e)}));o=s.setTimeout(()=>{n||e()},l)},s);return()=>{n=!0,i(),null!==o&&s.clearTimeout(o)}}function v(t,e={}){const s=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&s.setAttribute(t,String(e))}),s}const w=t=>Math.round(1e3*t)/1e3;function C(t={}){return function({width:t=24,height:e=24,stroke:s=2,dots:o=8,filled:n=3,dotRadius:i=null,direction:a="clockwise",pixel:l=!1}={}){const r=t/2,d=e/2,c=Math.min(t,e)/2,h=Math.max(1,c-s/2),m=v("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:l?t:null,height:l?e:null,"aria-hidden":"true",focusable:"false"}),u={cx:r,cy:d,r:w(h),fill:"none",stroke:"currentColor","stroke-width":s},f=v("circle",{class:"sf-loader-ring-filled",...u,opacity:"0.3"}),p=v("circle",{class:"sf-loader-ring-accent",...u,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${r} ${d})`}),g=v("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${r} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;g.append(v("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...u,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${w(4)} ${w(96)}`,"stroke-dashoffset":w(-4*t),opacity:w(((t+1)/10)**1.6)}))}const b=Math.max(3,Math.min(32,Math.floor(Number(o)||8))),y=Math.max(1,Math.min(b,Math.floor(Number(n)||3))),C=Math.min(s,.7*Math.PI*(c-s)/b),_=null==i||""===i?C:Math.max(1,Math.min(Number(i)||C,c/4)),E=Math.max(_,c-_),A=v("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${b}; --sf-loader-dot-filled:${y};`});for(let t=0;t<b;t+=1){const e=2*Math.PI/b*t-Math.PI/2,s="counterclockwise"===a?t:(b-t)%b;A.append(v("circle",{class:"sf-loader-dot"+(t<y?" sf-loader-dot--active":""),cx:w(r+E*Math.cos(e)),cy:w(d+E*Math.sin(e)),r:w(_),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${s};`}))}return m.append(f,p,g,A),m}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}const _=Symbol.for("simai.modal.document-stack");function E(){return document[_]||Object.defineProperty(document,_,{value:{items:[],lockOwner:null},configurable:!0}),document[_]}function A(){return E().items.at(-1)||null}function S(){E().items.forEach((t,e)=>t.applyStackPosition(e)),function(t){const e=t?.getModalRoot?.()||t?.template,s=e?.querySelector?.("[data-sf-modal-panel]"),o=document[u];if(o&&o.panel===s&&o.before.isConnected&&o.after.isConnected)return;if(o?.before.remove(),o?.after.remove(),delete document[u],!s?.parentNode)return;const n={panel:s,relaying:!1};for(const t of["before","after"]){const o=s.ownerDocument.createElement("span");o.tabIndex=0,o.className="sf-modal-focus-guard",o.setAttribute("aria-hidden","true"),o.addEventListener("focus",()=>{if(n.relaying||!s.isConnected||e.inert||"true"===e.getAttribute("aria-hidden"))return;const o="before"===t,i=p(s,o),a=o?i.at(-1):i[0];a&&"IFRAME"!==a.tagName?a.focus({preventScroll:!0}):s.focus({preventScroll:!0})}),n[t]=o}s.before(n.before),s.after(n.after),document[u]=n}(A())}const x=t=>!t.inContainer;function L(t,e=!1){if(!t?.isConnected||"function"!=typeof t.focus||t.matches(":disabled")||t.closest('[inert], [hidden], [aria-hidden="true"]')||!t.getClientRects().length||"visible"!==t.ownerDocument.defaultView.getComputedStyle(t).visibility)return!1;const s=e&&!t.hasAttribute("tabindex");let o;const n=()=>{o?.disconnect(),t.removeEventListener("blur",n),s&&"-1"===t.getAttribute("tabindex")&&t.removeAttribute("tabindex")};s&&(t.setAttribute("tabindex","-1"),t.addEventListener("blur",n,{once:!0}),o=new t.ownerDocument.defaultView.MutationObserver(()=>{t.isConnected||n()}),o.observe(t.ownerDocument.documentElement,{childList:!0,subtree:!0}));let i=!1;try{return t.focus({preventScroll:!0}),i=t.ownerDocument.activeElement===t,i}catch{return!1}finally{s&&!i&&n()}}const k="[data-sf-overlay-container], [data-sf-drawer-container]";function T(...t){return t.filter(Boolean).join(" ").trim()}function N(t="medium"){const e=String(t||"medium").trim().toLowerCase();return["none","small","medium","large"].includes(e)?e:"medium"}function O(t="medium"){return`backdrop-blur-${N(t)}`}function M(t){return["none","small","medium","large"].includes(String(t||"").trim().toLowerCase())}function F(t){return String(t||"").trim()}const P={en:{title:"Dialog",close:"Close",loading:"Loading…",loadFailed:"Failed to load content",frameFailed:"Failed to load iframe content"},ru:{title:"Окно",close:"Закрыть",loading:"Загрузка…",loadFailed:"Не удалось загрузить содержимое",frameFailed:"Не удалось загрузить встроенную страницу"}},B=(t,e)=>c(P,t,e?.isConnected?e:document.documentElement,"sf-modal"),I=t=>c(P,"title",t);class $ extends t{static componentName="Modal";static registry=new Map;static globalBound=!1;static stack=[];static openCount=0;static uid=0;static lockState=null;static baseZIndex=9e3;static getTopModal(){return A()}static isTopModal(t){return $.getTopModal()===t}static addToStack(t){t&&"inline"!==t.display&&($.stack=$.stack.filter(e=>e!==t),$.stack.push(t),$.openCount=$.stack.length,function(t,e){const s=E();s.items.includes(t)||(x(t)&&!s.lockOwner&&(s.lockOwner=e,e.lockPage(t.preserveScrollGap)),s.items.push(t),S())}(t,$))}static removeFromStack(t){t&&"inline"!==t.display&&($.stack=$.stack.filter(e=>e!==t),$.openCount=$.stack.length,function(t){const e=E(),s=e.items.indexOf(t);s<0||(e.items.splice(s,1),e.lockOwner&&!e.items.some(x)&&(e.lockOwner.unlockPage(),e.lockOwner=null),S())}(t))}static bringToFront(t){t&&"inline"!==t.display&&$.stack.includes(t)&&($.stack=$.stack.filter(e=>e!==t),$.stack.push(t),function(t){const e=E(),s=e.items.indexOf(t);s<0||(e.items.splice(s,1),e.items.push(t),S())}(t))}static updateStackStyles(){S()}constructor(t){super(t);const e=this.params||{};this.modalId=this.id||e.id||"sf-modal-"+ ++$.uid,this.isOpen=!1,this.lastActive=null,this.root=e.root||null,this.container=e.container||null,this.overlay=this.toBoolean(e.overlay,!0),this.unclose=this.toBoolean(e.unclose,!1),this.showClose=this.toBoolean(e.showClose,!0)&&!this.unclose,this.showFooter=this.toBoolean(e.showFooter,!0),this.closeOnEsc=this.toBoolean(e.closeOnEsc,!0)&&!this.unclose,this.closeOnOverlay=this.toBoolean(e.closeOnOverlay,!0)&&!this.unclose,this.preserveScrollGap=this.toBoolean(e.preserveScrollGap,!0),this.autoload=this.toBoolean(e.autoload,!1),this.position=function(t="center"){const e=String(t||"center").trim().toLowerCase();return["center","left","right","inline-start","inline-end","top","bottom"].includes(e)?e:"center"}(e.position),this.fullscreen=this.toBoolean(e.fullscreen,!1),this.mode=function(t){const e=String(t||"inline").trim().toLowerCase();return["inline","ajax","iframe"].includes(e)?e:"inline"}(e.mode),this.display=function(t){const e=String(t||"modal").trim().toLowerCase();return["modal","inline"].includes(e)?e:"modal"}(e.display),this.src=e.src||"",this.preload=this.toBoolean(e.preload,!0),this._fetchController=null,this._contentLoaded=!1,this._contentError=null,this._loadingTimer=null,this._loadingShown=!1,this._loadingDebounceMs=500,this.blur=!!M(e.blur)||this.toBoolean(e.blur,!1),this.hasCustomBlurType=M(e.blurType)||M(e.blur),this.blurType=N(e.blurType||(M(e.blur)?e.blur:"")),this.onOverlayClick=this.onOverlayClick.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this._modalState="closed",this._stackIndex=-1,this._closeTimer=null,this._closeTransitionAbort=null,this.template=this.buildTemplate(e),this.template.id=this.modalId,this.template.setAttribute("data-sf-modal-id",this.modalId),this.template.setAttribute("aria-hidden","true"),this.init()}overlayHomeFor(t=null){let e=this.container;if("string"==typeof e&&(e=document.querySelector(e)),e instanceof Element)return e.matches(k)||e.setAttribute("data-sf-overlay-container",""),e;return(t instanceof Element?t.closest(k):null)||document.body}get overlayHome(){return this.overlayHomeFor()}get inContainer(){return Boolean(this.template?.parentElement?.closest(k))}placeIn(t){"inline"!==this.display&&!this.root&&this.template&&t&&this.template.parentElement!==t&&t.append(this.template)}emitEvent(t,{cancelable:e=!1,detail:s={}}={}){const o={modal:this,id:this.modalId,isOpen:this.isOpen,...s};let n=!1;if(this.template){const s=new CustomEvent(t,{bubbles:!0,cancelable:e,detail:o});this.template.dispatchEvent(s),n=n||s.defaultPrevented}if("undefined"!=typeof window){const e=new CustomEvent(t,{cancelable:!1,detail:o});window.dispatchEvent(e)}return!n}runCallback(t,e={}){const s=this.params?.[t];if("function"==typeof s)return s({modal:this,id:this.modalId,isOpen:this.isOpen,...e})}emitBeforeOpen(){const t=this.emitEvent("modal:before-open",{cancelable:!0,detail:{phase:"before-open"}}),e=this.emitEvent("SFModalBeforeOpenWindow",{cancelable:!0,detail:{phase:"before-open"}});if(!t||!e)return!1;const s=this.runCallback("beforeOpen",{phase:"before-open"}),o=this.runCallback("beforeOpenWindow",{phase:"before-open"});return!1!==s&&!1!==o}emitAfterOpen(){this.emitEvent("modal:after-open",{detail:{phase:"after-open"}}),this.emitEvent("SFModalAfterOpenWindow",{detail:{phase:"after-open"}}),this.runCallback("afterOpen",{phase:"after-open"}),this.runCallback("afterOpenWindow",{phase:"after-open"})}emitBeforeClose(){const t=this.emitEvent("modal:before-close",{cancelable:!0,detail:{phase:"before-close"}}),e=this.emitEvent("SFModalBeforeCloseWindow",{cancelable:!0,detail:{phase:"before-close"}});if(!t||!e)return!1;const s=this.runCallback("beforeClose",{phase:"before-close"}),o=this.runCallback("beforeCloseWindow",{phase:"before-close"});return!1!==s&&!1!==o}emitAfterClose(){this.emitEvent("modal:after-close",{detail:{phase:"after-close"}}),this.emitEvent("SFModalAfterCloseWindow",{detail:{phase:"after-close"}}),this.runCallback("afterClose",{phase:"after-close"}),this.runCallback("afterCloseWindow",{phase:"after-close"})}toBoolean(t,e){if(null==t)return e;if("boolean"==typeof t)return t;const s=`${t}`.trim().toLowerCase();return!!["1","true","yes","on"].includes(s)||!["0","false","no","off"].includes(s)&&e}getBlurClasses(){return this.hasCustomBlurType?[O(this.blurType)]:[]}setOverlay(t){this.overlay=this.toBoolean(t,!0);const e=this.template?.querySelector("[data-sf-modal-overlay]");return e?(e.classList.toggle("hidden",!this.overlay||"inline"===this.display),this):this}buildTemplate(t){const e="inline"===this.display,s=document.createElement("div");s.className=e?`sf-modal sf-modal--inline sf-modal--position-${this.position} sf-modal--positon-${this.position} inline-block w-full`:`sf-modal sf-modal--position-${this.position} sf-modal--positon-${this.position} hidden fixed top-0 inline-start-0 w-full h-full z-9 p-3 items-cross-center content-main-center`,s.setAttribute("role",e?"region":"dialog"),s.setAttribute("aria-modal",e?"false":"true"),s.setAttribute("data-sf-modal-position",this.position),s.setAttribute("data-sf-modal-fullscreen",String(this.fullscreen)),s.setAttribute("data-sf-modal-display",this.display),s.setAttribute("data-sf-modal-state",e?"inline":"closed");const o=document.createElement("div");o.className=T("absolute top-0 inline-start-0 w-full h-full",this.blur?this.hasCustomBlurType?this.getBlurClasses().join(" "):"bg-surface-overlay":"bg-black opacity-6",t.overlayClass),o.setAttribute("data-sf-modal-overlay",""),this.overlay&&!e||o.classList.add("hidden");const n=document.createElement("section");n.className=T("relative overflow-visible",t.panelClass),n.setAttribute("data-sf-modal-panel","");const i=F(t.width),a=F(t.height);i&&(n.style.setProperty("--sf-modal-width",i),n.setAttribute("data-sf-modal-has-width","")),a&&(n.style.setProperty("--sf-modal-height",a),n.setAttribute("data-sf-modal-has-height",""));const l=document.createElement("div");l.className=T(e?"bg-surface border border-outline-variant radius-surface p-2 flex flex-col gap-1 min-w-0":"bg-surface border border-outline-variant radius-surface shadow-3 p-2 flex flex-col gap-1 min-w-0",t.surfaceClass),l.setAttribute("data-sf-modal-surface","");const r=document.createElement("header");if(r.className=T("sf-modal-header flex items-start min-w-0 border-b border-outline-variant gap-1",t.headerClass),Array.isArray(t.headerNodes)&&t.headerNodes.length)s.setAttribute("aria-label",t.title||I(s)),t.headerNodes.forEach(t=>{t instanceof Node&&r.append(t)});else{const e=document.createElement("h2");if(e.id=`${this.modalId}-title`,s.setAttribute("aria-labelledby",e.id),e.className="sf-modal-header-content title-3 m-0",e.textContent=t.title||I(s),r.append(e),this.showClose){const e=document.createElement("button");e.type="button",e.className=T("sf-icon-button sf-modal-header-action sf-modal-close-button sf-icon-button--close sf-icon-button--link sf-icon-button--on-surface sf-icon-button--size-1/3 m-0",t.closeClass),e.setAttribute("aria-label",c(P,"close",e.isConnected?e:document.documentElement)),e.setAttribute("data-sf-modal-close",this.modalId),e.innerHTML=' <span\n class="sf-close sf-close--size-1/3 flex justify-center items-center"\n aria-hidden="true"\n >\n <span class="sf-close-icon"></span>\n </span>',r.append(e)}}const d=document.createElement("div");d.className="sf-modal-body flex flex-col gap-1 min-w-0 overflow-visible",d.setAttribute("data-sf-modal-body","");const h=document.createElement("div");h.className="sf-modal-body-viewport min-w-0 overflow-visible",h.setAttribute("data-sf-modal-body-viewport","");const m=document.createElement("div");m.className=T("sf-modal-body-scroll h-full min-w-0 overflow-y-auto flex flex-col gap-1 p-1/4",t.bodyClass),m.setAttribute("data-sf-modal-body-scroll","");const u=document.createElement("div");if(u.className="sf-modal-content-placeholder flex flex-col gap-2 min-h-8 items-cross-center content-main-center",u.setAttribute("data-sf-modal-content-placeholder",""),"ajax"!==this.mode&&"iframe"!==this.mode||!this.src){if(Array.isArray(t.contentNodes)&&t.contentNodes.length){const e=document.createElement("div");e.className=T("sf-modal-content flex flex-col gap-2",t.contentClass),t.contentNodes.forEach(t=>{t instanceof Node&&e.append(t)}),m.append(e)}}else this._scheduleLoading(u),m.append(u);if(Array.isArray(t.footerNodes)&&t.footerNodes.length&&this.showFooter){const e=document.createElement("div");e.className=T("sf-modal-footer flex flex-wrap gap-2",t.footerClass),t.footerNodes.forEach(t=>{t instanceof Node&&e.append(t)}),d.append(e)}else if("string"==typeof t.html&&t.html.trim())m.innerHTML=t.html;else if("ajax"===this.mode&&this.src||"iframe"===this.mode&&this.src);else{const e=document.createElement("p");e.className="m-0 text-2",e.textContent=t.text||"",m.append(e)}return h.append(m),d.prepend(h),l.append(r,d),n.append(l),s.append(o,n),s}_scheduleLoading(t){this._cancelLoadingTimer(),this._loadingShown=!1,this._loadingTimer=setTimeout(()=>{this._showLoading(t),this._loadingShown=!0},this._loadingDebounceMs)}_cancelLoadingTimer(){this._loadingTimer&&(clearTimeout(this._loadingTimer),this._loadingTimer=null)}_finishLoading(){this._cancelLoadingTimer()}_showLoading(t){t.innerHTML="";const e=document.createElement("div");e.className="sf-modal-loading flex flex-col gap-2 items-cross-center content-main-center p-4",e.setAttribute("data-sf-modal-state","loading");const s=B("loading",this.template);e.setAttribute("role","status"),e.setAttribute("aria-label",s);const o=document.createElement("p");o.className="m-0 text-2 color-on-surface-variant",o.textContent=s,e.append(o),e.prepend(function({className:t="",overlay:e=!1}={}){const s=document.createElement("span");s.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),s.dataset.sfSpinnerBound="1",s.dataset.infinite="true",s.setAttribute("aria-hidden","true");const o=document.createElement("span");return o.className="sf-loader--loading-indicator",o.append(C()),s.append(o),s}({className:"sf-modal-spinner"})),t.append(e)}_showError(t,e){t.innerHTML="";const s=document.createElement("div");s.className="sf-modal-error flex flex-col gap-2 items-cross-center content-main-center p-4",s.setAttribute("data-sf-modal-state","error"),s.innerHTML=`\n <div class="sf-modal-error-icon text-4 color-error">⚠</div>\n <p class="sf-modal-error-text m-0 text-2 color-error">${this.escapeHtml(e||B("loadFailed",this.template))}</p>\n `,t.append(s)}_abortFetch(){this._fetchController&&(this._fetchController.abort(),this._fetchController=null)}async _loadContent(){this.src&&("iframe"!==this.mode?"ajax"===this.mode&&this._loadAjax():this._loadIframe())}async _loadAjax(){if(this.src.startsWith("#")){const t=document.querySelector(this.src);if(t){this._emitBeforeContentUpload();const e=t.cloneNode(!0);e.removeAttribute("id"),this._finishLoading(),this._replaceContentWithNode(e),this._contentLoaded=!0,this._emitAfterContentUpload()}else this._contentError=`Element not found: ${this.src}`,this._finishLoading(),this._showContentError();return}this._abortFetch();const t=new AbortController;this._fetchController=t;try{this._emitBeforeContentUpload();const e=await fetch(this.src,{signal:t.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);const s=await e.text();this._contentLoaded=!0,this._finishLoading(),this._replaceContentWithHtml(s),this._fetchController=null,this._emitAfterContentUpload()}catch(e){if("AbortError"===e.name)return void(this._fetchController&&this._fetchController!==t||this._finishLoading());this._contentError=e.message,this._finishLoading(),this._showContentError()}}_loadIframe(){this._emitBeforeContentUpload();const t=this.template?.querySelector("[data-sf-modal-body-scroll]");if(!t)return;t.innerHTML="";const e=document.createElement("iframe");e.className="sf-modal-iframe w-full border-0 radius-surface",e.src=this.src,e.setAttribute("data-sf-modal-iframe",""),e.setAttribute("allowfullscreen",""),e.style.minHeight="var(--sf-modal-iframe-min-height)",e.style.height="100%",e.addEventListener("load",()=>{this._contentLoaded=!0,this._finishLoading(),this._emitAfterContentUpload()}),e.addEventListener("error",()=>{this._contentError=B("frameFailed",this.template),this._finishLoading(),this._showContentError()}),t.append(e)}_replaceContentWithNode(t){const e=this.template?.querySelector("[data-sf-modal-body-scroll]");if(!e)return;e.innerHTML="";const s=document.createElement("div");s.className="sf-modal-content flex flex-col gap-2",s.append(t),e.append(s)}_replaceContentWithHtml(t){const e=this.template?.querySelector("[data-sf-modal-body-scroll]");if(!e)return;e.innerHTML="";const s=document.createElement("div");s.className="sf-modal-content flex flex-col gap-2",s.innerHTML=t,e.append(s)}_showContentError(){const t=this.template?.querySelector("[data-sf-modal-body-scroll]");if(!t)return;t.innerHTML="";const e=document.createElement("div");e.className="sf-modal-error flex flex-col gap-2 items-cross-center content-main-center p-4",e.setAttribute("data-sf-modal-state","error"),e.innerHTML=`\n <div class="sf-modal-error-icon text-4 color-error">⚠</div>\n <p class="sf-modal-error-text m-0 text-2 color-error">${this.escapeHtml(this._contentError||B("loadFailed",this.template))}</p>\n `,t.append(e)}_emitBeforeContentUpload(){this.emitEvent("modal:before-content-upload",{detail:{src:this.src}}),this.runCallback("beforeContentUpload",{src:this.src})}_emitAfterContentUpload(){this.emitEvent("modal:after-content-upload",{detail:{src:this.src}}),this.runCallback("afterContentUpload",{src:this.src})}escapeHtml(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}init(){if("inline"===this.display)return this._modalState="open",this.template.setAttribute("data-sf-modal-state","open"),this.template.classList.remove("hidden"),this.toBoolean(this.params?.open,!0)?this.isOpen=!0:(this.isOpen=!1,this._modalState="closed",this.template.setAttribute("data-sf-modal-state","closed"),this.template.classList.add("hidden")),this.template.setAttribute("aria-hidden",String(!this.isOpen)),this.root&&this.root.append(this.template),$.registry.set(this.modalId,this),void("ajax"!==this.mode&&"iframe"!==this.mode||!this.src||!1===this.preload||this._loadContent());if(this.template.isConnected||this.overlayHome.append(this.template),"inline"===this.display)return this.isOpen=!0,this._modalState="open",this.template.setAttribute("data-sf-modal-state","inline"),this.template.classList.remove("hidden"),$.registry.set(this.modalId,this),void("ajax"!==this.mode&&"iframe"!==this.mode||!this.src||!1===this.preload||this._loadContent());this.template.addEventListener("click",this.onOverlayClick),document.addEventListener("keydown",this.onKeyDown),$.registry.set(this.modalId,this),$.bindGlobalEvents();(this.toBoolean(this.params?.open,!1)||this.autoload)&&requestAnimationFrame(()=>{this.open({animate:!1})}),"ajax"!==this.mode&&"iframe"!==this.mode||!this.src||!1===this.preload||this._loadContent()}destroyInternal(){this._abortFetch(),this._cancelLoadingTimer(),this.cancelCloseTransition(),"inline"===this.display||!this.isOpen&&"closing"!==this._modalState||(this._modalState="closing",this.finishClose()),$.removeFromStack(this),this.template.removeEventListener("click",this.onOverlayClick),document.removeEventListener("keydown",this.onKeyDown),$.registry.delete(this.modalId)}onOverlayClick(t){t.target===this.template.querySelector("[data-sf-modal-overlay]")&&this.closeOnOverlay&&this.close()}onKeyDown(t){if((this.isOpen||"closing"===this._modalState)&&$.isTopModal(this))return"Escape"!==t.key||!this.closeOnEsc||"closing"===this._modalState||t.defaultPrevented||document.documentElement?.dataset?.sfPopoverOpen?void("Tab"===t.key&&this.trapFocus(t)):(t.preventDefault(),t.stopImmediatePropagation(),void this.close())}trapFocus(t){if(!$.isTopModal(this))return;!function(t,e){if(!t)return;const s=p(t,e.shiftKey),o=t.ownerDocument.activeElement;if(!s.length)return e.preventDefault(),void t.focus();const n=s[0],i=s[s.length-1],a=e.shiftKey?n:i;if(!t.contains(o)||o===t||o===a||f(o,a)){const s=e.shiftKey?i:n,o=t.ownerDocument[u];if("IFRAME"===s.tagName&&o?.panel===t){o.relaying=!0;try{(e.shiftKey?o.after:o.before).focus({preventScroll:!0})}finally{o.relaying=!1}return}e.preventDefault(),s.focus()}}(this.template.querySelector("[data-sf-modal-panel]"),t)}focusFirst(){if("inline"!==this.display&&!$.isTopModal(this))return;const t=this.template.querySelector("[data-sf-modal-panel]");t&&(t.setAttribute("tabindex","-1"),t.focus())}applyStackPosition(t=function(t){return E().items.indexOf(t)}(this)){return this._stackIndex=t,this.template&&"inline"!==this.display?t<0?(this.template.style.removeProperty("z-index"),this.template.style.removeProperty("--sf-modal-stack-index"),this):(this.template.style.setProperty("--sf-modal-stack-index",String(t)),this.template.style.zIndex=String($.baseZIndex+2*t),this):this}open(t={}){const{animate:e=!0}="boolean"==typeof t?{animate:t}:t;if("inline"===this.display){if(this.isOpen)return;if(!this.emitBeforeOpen())return;return this.isOpen=!0,this._modalState="open",this.template.setAttribute("data-sf-modal-state","open"),this.template.classList.remove("hidden"),this.template.setAttribute("aria-hidden","false"),void this.emitAfterOpen()}if(this.isOpen)return $.bringToFront(this),void this.cancelCloseTransition();if(this.emitBeforeOpen()){if(("ajax"===this.mode||"iframe"===this.mode)&&this.src&&!this._contentLoaded&&!this._contentError){const t=this.template?.querySelector("[data-sf-modal-body-scroll]");t&&this._scheduleLoading(t),this._loadContent()}if(this._releaseClosingContent?.(),this._releaseClosingContent=null,"closing"!==this._modalState&&(this.lastActive=document.activeElement,this._focusReturnAncestors=function(t){const e=[];for(let s=t?.parentElement;s;s=s.parentElement)s.matches('main, section, article, [role="main"], [role="region"]')&&e.push(s);return e}(this.lastActive),this.placeIn(this.overlayHomeFor(this.lastActive))),this.cancelCloseTransition(),this.template.classList.remove("hidden"),this.template.classList.add("flex"),this.template.setAttribute("aria-hidden","false"),this.template.classList.toggle("animate",Boolean(e)),this.template.setAttribute("data-sf-modal-state","opening"),this.isOpen=!0,$.addToStack(this),!e)return this._modalState="open",this.template.setAttribute("data-sf-modal-state","open"),this.focusFirst(),void this.emitAfterOpen();b(()=>{this.isOpen&&"closing"!==this._modalState&&(this._modalState="open",this.template.setAttribute("data-sf-modal-state","open"),this.focusFirst(),this.emitAfterOpen())})}}close(){if("inline"===this.display){if(!this.emitBeforeClose())return;return this.isOpen=!1,this._modalState="closed",this.template.setAttribute("data-sf-modal-state","closed"),this.template.classList.add("hidden"),this.template.setAttribute("aria-hidden","true"),void this.emitAfterClose()}if(!this.isOpen||"closing"===this._modalState)return;if(!this.emitBeforeClose())return;this._modalState="closing",this.template.setAttribute("data-sf-modal-state","closing"),this.isOpen=!1;const t=this.template.querySelector("[data-sf-modal-panel]");this._releaseClosingContent=function(t,e=!1){if(!t)return()=>{};const s=new Set,o=()=>{for(const e of t.children)e.hasAttribute("inert")||(e.setAttribute("inert",""),s.add(e))};e&&t.focus({preventScroll:!0}),o();const n=new t.ownerDocument.defaultView.MutationObserver(o);return n.observe(t,{childList:!0}),()=>{n.disconnect();for(const t of s)""===t.getAttribute("inert")&&t.removeAttribute("inert");s.clear()}}(t,$.isTopModal(this)),this._closeTransitionAbort=y(()=>this.template,()=>this.finishClose())}toggle(){this.isOpen?this.close():this.open()}setSrc(t){if(this.src=t||"",this._contentLoaded=!1,this._contentError=null,this._loadingShown=!1,this._abortFetch(),!this.template||!this.isOpen)return this;const e=this.template?.querySelector("[data-sf-modal-body-scroll]");return e&&this._scheduleLoading(e),"ajax"!==this.mode&&"iframe"!==this.mode||!this.src||!1===this.preload||this._loadContent(),this}reloadContent(){if(("ajax"===this.mode||"iframe"===this.mode)&&this.src){this._contentLoaded=!1,this._contentError=null,this._loadingShown=!1,this._abortFetch();const t=this.template?.querySelector("[data-sf-modal-body-scroll]");t&&this._scheduleLoading(t),this._loadContent()}return this}cancelCloseTransition(){this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),this._closeTransitionAbort&&(this._closeTransitionAbort(),this._closeTransitionAbort=null),"closing"===this._modalState&&(this._modalState="open",this.template.setAttribute("data-sf-modal-state","open"))}finishClose(){if("closing"!==this._modalState)return;this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),this._closeTransitionAbort&&(this._closeTransitionAbort(),this._closeTransitionAbort=null),this.template.classList.remove("flex"),this.template.classList.add("hidden"),this.template.setAttribute("data-sf-modal-state","closed"),this.template.setAttribute("aria-hidden","true"),this._releaseClosingContent?.(),this._releaseClosingContent=null,this._modalState="closed";const t=$.isTopModal(this);$.removeFromStack(this),function(t,e,s=[]){if(!t)return;const o=A(),n=o?.getModalRoot?.()||o?.template;if((!o||n?.contains(e))&&L(e))return;if(o)return void o.focusFirst();const i=new Set([...s,...document.querySelectorAll('main, [role="main"]'),document.body]);for(const t of i)if(L(t,!0))return}(t,this.lastActive,this._focusReturnAncestors),this.emitAfterClose()}static bindGlobalEvents(){$.globalBound||"undefined"==typeof document||(document.addEventListener("click",t=>{const e=t.target.closest("[data-sf-modal-open]");if(e){const t=e.getAttribute("data-sf-modal-open"),s=$.registry.get(t);return void(s&&s.open())}const s=t.target.closest("[data-sf-modal-close]");if(!s)return;const o=s.getAttribute("data-sf-modal-close");if(o){const t=$.registry.get(o);return void(t&&t.close())}const n=s.closest(".sf-modal");if(!n)return;const i=n.getAttribute("data-sf-modal-id"),a=$.registry.get(i);a&&a.close()}),$.globalBound=!0)}static lockPage(t=!0){$.lockState||($.lockState=function(t=!0){const e=document.documentElement,s=document.body;if(!e||!s)return null;const o=Math.max(0,window.innerWidth-e.clientWidth),n=parseFloat(window.getComputedStyle(s).paddingInlineEnd)||0,i={docEl:e,body:s,htmlLocked:e.classList.contains("overflow-hidden"),bodyLocked:s.classList.contains("overflow-hidden"),bodyPaddingInlineEnd:s.style.getPropertyValue("padding-inline-end"),paddingPriority:s.style.getPropertyPriority("padding-inline-end"),appliedPadding:null};return e.classList.add("overflow-hidden"),s.classList.add("overflow-hidden"),t&&o>0&&(s.style.setProperty("padding-inline-end",`${n+o}px`,i.paddingPriority),i.appliedPadding=s.style.getPropertyValue("padding-inline-end")),i}(t))}static unlockPage(){!function(t){if(!t)return;const{docEl:e,body:s}=t;t.htmlLocked||e.classList.remove("overflow-hidden"),t.bodyLocked||s.classList.remove("overflow-hidden"),null!==t.appliedPadding&&s.style.getPropertyValue("padding-inline-end")===t.appliedPadding&&s.style.getPropertyPriority("padding-inline-end")===t.paddingPriority&&(t.bodyPaddingInlineEnd?s.style.setProperty("padding-inline-end",t.bodyPaddingInlineEnd,t.paddingPriority):s.style.removeProperty("padding-inline-end"))}($.lockState),$.lockState=null}}e("Modal",$)})();
@@ -1 +1 @@
1
- @layer sf.components{.sf-loader-container{--sf-loader-track-color: var(--sf-surface-container);--sf-loader-svg-width: var(--sf-text-height-1);--sf-loader-svg-height: var(--sf-text-height-1);--sf-loader-stroke-width: 2;--sf-loader-text-gap: var(--sf-space-1\/2);--sf-loader-text-size: var(--sf-text-size-1);--sf-loader-cycle-duration: calc(var(--sf-duration-slow) * 6);--sf-loader-dot-duration: calc(var(--sf-duration-slow) * 3);--sf-loader-spin-duration: calc(var(--sf-duration-slow) * 4);--sf-loader-breath-duration: calc(var(--sf-duration-slow) * 3);--sf-loader-comet-duration: calc(var(--sf-duration-slow) * 2);color:currentColor;color:var(--sf-loader--color, currentColor);display:flex;flex-direction:column;align-items:center;gap:var(--sf-loader-text-gap);justify-content:center}.sf-loader-container .sf-loader--text{font-family:var(--sf-text--family);font-weight:400;font-size:var(--sf-loader-text-size);color:var(--sf-on-surface)}.sf-loader-container.sf-loader--size-1\/3{--sf-loader-svg-width: var(--sf-text-height-1\/3);--sf-loader-svg-height: var(--sf-text-height-1\/3);--sf-loader-text-gap: var(--sf-space-1\/3);--sf-loader-text-size: var(--sf-text-size-1\/3)}.sf-loader-container.sf-loader--size-1\/2{--sf-loader-svg-width: var(--sf-text-height-1\/2);--sf-loader-svg-height: var(--sf-text-height-1\/2);--sf-loader-text-gap: var(--sf-space-1\/3);--sf-loader-text-size: var(--sf-text-size-1\/2)}.sf-loader-container.sf-loader--size-1{--sf-loader-svg-width: var(--sf-text-height-1);--sf-loader-svg-height: var(--sf-text-height-1);--sf-loader-text-gap: var(--sf-space-1\/2);--sf-loader-text-size: var(--sf-text-size-1)}.sf-loader-container.sf-loader--size-2{--sf-loader-svg-width: var(--sf-text-height-2);--sf-loader-svg-height: var(--sf-text-height-2);--sf-loader-text-gap: var(--sf-space-1);--sf-loader-text-size: var(--sf-text-size-2)}.sf-loader-container.sf-loader--size-3{--sf-loader-svg-width: var(--sf-text-height-3);--sf-loader-svg-height: var(--sf-text-height-3);--sf-loader-text-gap: var(--sf-space-2);--sf-loader-text-size: var(--sf-text-size-3)}.sf-loader-container.sf-loader--pixel-geometry{--sf-loader-stroke-width: var(--sf-a5)}.sf-loader-container.sf-loader--pixel-geometry.sf-loader--size-1\/3{--sf-loader-stroke-width: var(--sf-a4)}.sf-loader-container.sf-loader--pixel-geometry.sf-loader--size-1\/2{--sf-loader-stroke-width: var(--sf-a4)}.sf-loader-container.sf-loader--pixel-geometry.sf-loader--size-1{--sf-loader-stroke-width: var(--sf-a6)}.sf-loader-container.sf-loader--pixel-geometry.sf-loader--size-2{--sf-loader-stroke-width: var(--sf-a6)}.sf-loader-container.sf-loader--pixel-geometry.sf-loader--size-3{--sf-loader-stroke-width: var(--sf-a8)}}@layer sf.components{.sf-loader-container .sf-loader--loading-indicator,.sf-loader-container .sf-loader--circles{display:inline-flex;height:var(--sf-loader-svg-height);width:var(--sf-loader-svg-width)}.sf-loader-container .sf-loader-svg{display:block;height:100%;overflow:visible;width:100%}:where([data-sf-spinner]:not([data-sf-spinner=""])){--sf-loader--look-track: inline;--sf-loader--look-accent: inline;--sf-loader--look-comet: none;--sf-loader--look-dots: none;--sf-loader--look-motion: sf-loader-ring-accent-fill;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: none;--sf-loader--look-spin-duration: var(--sf-loader-spin-duration)}[data-sf-spinner=breathing]{--sf-loader--look-track: inline;--sf-loader--look-accent: inline;--sf-loader--look-comet: none;--sf-loader--look-dots: none;--sf-loader--look-motion: sf-loader-breathing;--sf-loader--look-motion-duration: var(--sf-loader-breath-duration);--sf-loader--look-motion-easing: var(--sf-animation);--sf-loader--look-spin: sf-loader-svg-rotate;--sf-loader--look-spin-duration: var(--sf-loader-spin-duration)}[data-sf-spinner=comet]{--sf-loader--look-track: inline;--sf-loader--look-accent: none;--sf-loader--look-comet: inline;--sf-loader--look-dots: none;--sf-loader--look-motion: none;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: sf-loader-svg-rotate;--sf-loader--look-spin-duration: var(--sf-loader-comet-duration)}[data-sf-spinner=dots]{--sf-loader--look-track: none;--sf-loader--look-accent: none;--sf-loader--look-comet: none;--sf-loader--look-dots: inline;--sf-loader--look-motion: none;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: none;--sf-loader--look-spin-duration: var(--sf-loader-spin-duration)}.sf-loader-container:where([data-variant]:not([data-variant=""])){--sf-loader--look-track: inline;--sf-loader--look-accent: inline;--sf-loader--look-comet: none;--sf-loader--look-dots: none;--sf-loader--look-motion: sf-loader-ring-accent-fill;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: none;--sf-loader--look-spin-duration: var(--sf-loader-spin-duration)}.sf-loader-container[data-variant=breathing]{--sf-loader--look-track: inline;--sf-loader--look-accent: inline;--sf-loader--look-comet: none;--sf-loader--look-dots: none;--sf-loader--look-motion: sf-loader-breathing;--sf-loader--look-motion-duration: var(--sf-loader-breath-duration);--sf-loader--look-motion-easing: var(--sf-animation);--sf-loader--look-spin: sf-loader-svg-rotate;--sf-loader--look-spin-duration: var(--sf-loader-spin-duration)}.sf-loader-container[data-variant=comet]{--sf-loader--look-track: inline;--sf-loader--look-accent: none;--sf-loader--look-comet: inline;--sf-loader--look-dots: none;--sf-loader--look-motion: none;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: sf-loader-svg-rotate;--sf-loader--look-spin-duration: var(--sf-loader-comet-duration)}.sf-loader-container[data-variant=dots]{--sf-loader--look-track: none;--sf-loader--look-accent: none;--sf-loader--look-comet: none;--sf-loader--look-dots: inline;--sf-loader--look-motion: none;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: none;--sf-loader--look-spin-duration: var(--sf-loader-spin-duration)}.sf-loader-container .sf-loader-svg{-webkit-animation-name:none;animation-name:none;-webkit-animation-name:var(--sf-loader--look-spin, none);animation-name:var(--sf-loader--look-spin, none);-webkit-animation-duration:var(--sf-loader-spin-duration);animation-duration:var(--sf-loader-spin-duration);-webkit-animation-duration:var(--sf-loader--look-spin-duration, var(--sf-loader-spin-duration));animation-duration:var(--sf-loader--look-spin-duration, var(--sf-loader-spin-duration));-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:both;animation-fill-mode:both}.sf-loader-container .sf-loader-ring-filled{display:inline;display:var(--sf-loader--look-track, inline);fill:none;opacity:var(--sf-opacity-30);stroke:var(--sf-surface-container);stroke:var(--sf-loader-track-color, var(--sf-surface-container));stroke-linecap:round;stroke-width:var(--sf-loader-stroke-width)}.sf-loader-container .sf-loader-ring-accent{display:inline;display:var(--sf-loader--look-accent, inline);fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:var(--sf-loader-stroke-width)}.sf-loader-container .sf-loader--loading-indicator .sf-loader-ring-accent{-webkit-animation-name:sf-loader-ring-accent-fill;animation-name:sf-loader-ring-accent-fill;-webkit-animation-name:var(--sf-loader--look-motion, sf-loader-ring-accent-fill);animation-name:var(--sf-loader--look-motion, sf-loader-ring-accent-fill);-webkit-animation-duration:var(--sf-loader-cycle-duration);animation-duration:var(--sf-loader-cycle-duration);-webkit-animation-duration:var(--sf-loader--look-motion-duration, var(--sf-loader-cycle-duration));animation-duration:var(--sf-loader--look-motion-duration, var(--sf-loader-cycle-duration));-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-timing-function:var(--sf-loader--look-motion-easing, linear);animation-timing-function:var(--sf-loader--look-motion-easing, linear);-webkit-animation-fill-mode:both;animation-fill-mode:both}.sf-loader-container.sf-loader--infinite .sf-loader--loading-indicator .sf-loader-ring-accent,.sf-loader-container.sf-loader--infinite .sf-loader-svg{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.sf-loader-container .sf-loader-comet{display:none;display:var(--sf-loader--look-comet, none)}.sf-loader-container .sf-loader-comet-segment{fill:none;stroke:currentColor;stroke-width:var(--sf-loader-stroke-width)}.sf-loader-container .sf-loader-dots{display:none;display:var(--sf-loader--look-dots, none)}.sf-loader-container .sf-loader-dot{fill:currentColor;opacity:var(--sf-opacity-20);-webkit-animation:sf-loader-dot-wave var(--sf-loader-dot-duration) linear both;animation:sf-loader-dot-wave var(--sf-loader-dot-duration) linear both;-webkit-animation-delay:calc(var(--sf-loader-dot-duration)/var(--sf-loader-dot-count)*var(--sf-loader-dot-step)*-1);animation-delay:calc(var(--sf-loader-dot-duration)/var(--sf-loader-dot-count)*var(--sf-loader-dot-step)*-1)}.sf-loader-container .sf-loader-dot--active{opacity:var(--sf-opacity-60)}.sf-loader-container.sf-loader--infinite .sf-loader-dot{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes sf-loader-svg-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes sf-loader-svg-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes sf-loader-dot-wave{0%{opacity:var(--sf-opacity-20)}18%{opacity:1}40%{opacity:var(--sf-opacity-60)}100%{opacity:var(--sf-opacity-20)}}@keyframes sf-loader-dot-wave{0%{opacity:var(--sf-opacity-20)}18%{opacity:1}40%{opacity:var(--sf-opacity-60)}100%{opacity:var(--sf-opacity-20)}}@media(prefers-reduced-motion: reduce){.sf-loader-container .sf-loader-svg,.sf-loader-container .sf-loader-ring-accent,.sf-loader-container .sf-loader-dot{-webkit-animation:none !important;animation:none !important}.sf-loader-container .sf-loader-ring-accent{opacity:1;stroke-dasharray:24 76}}@-webkit-keyframes sf-loader-breathing{0%{stroke-dasharray:4 96;stroke-dashoffset:0}50%{stroke-dasharray:70 30;stroke-dashoffset:-15}100%{stroke-dasharray:4 96;stroke-dashoffset:-100}}@keyframes sf-loader-breathing{0%{stroke-dasharray:4 96;stroke-dashoffset:0}50%{stroke-dasharray:70 30;stroke-dashoffset:-15}100%{stroke-dasharray:4 96;stroke-dashoffset:-100}}@-webkit-keyframes sf-loader-ring-accent-fill{0%{opacity:0;stroke-dasharray:.01 100;stroke-dashoffset:0}10%{opacity:0;stroke-dasharray:.01 100;stroke-dashoffset:0}18%{opacity:1;stroke-dasharray:6 94;stroke-dashoffset:0}42%{opacity:1;stroke-dasharray:100 0;stroke-dashoffset:0}58%{opacity:1;stroke-dasharray:100 0;stroke-dashoffset:0}82%{opacity:1;stroke-dasharray:6 94;stroke-dashoffset:-94}90%{opacity:0;stroke-dasharray:.01 100;stroke-dashoffset:-100}100%{opacity:0;stroke-dasharray:.01 100;stroke-dashoffset:-100}}@keyframes sf-loader-ring-accent-fill{0%{opacity:0;stroke-dasharray:.01 100;stroke-dashoffset:0}10%{opacity:0;stroke-dasharray:.01 100;stroke-dashoffset:0}18%{opacity:1;stroke-dasharray:6 94;stroke-dashoffset:0}42%{opacity:1;stroke-dasharray:100 0;stroke-dashoffset:0}58%{opacity:1;stroke-dasharray:100 0;stroke-dashoffset:0}82%{opacity:1;stroke-dasharray:6 94;stroke-dashoffset:-94}90%{opacity:0;stroke-dasharray:.01 100;stroke-dashoffset:-100}100%{opacity:0;stroke-dasharray:.01 100;stroke-dashoffset:-100}}}
1
+ @layer sf.components{.sf-loader-container{--sf-loader-track-color: var(--sf-surface-container);--sf-loader-svg-width: var(--sf-text-height-1);--sf-loader-svg-height: var(--sf-text-height-1);--sf-loader-stroke-width: 2;--sf-loader-text-gap: var(--sf-space-1\/2);--sf-loader-text-size: var(--sf-text-size-1);--sf-loader-cycle-duration: calc(var(--sf-duration-slow) * 6);--sf-loader-dot-duration: calc(var(--sf-duration-slow) * 3);--sf-loader-arc-duration: calc(var(--sf-duration-slow) * 2);--sf-loader-spin-duration: calc(var(--sf-duration-slow) * 4);--sf-loader-breath-duration: calc(var(--sf-duration-slow) * 3);--sf-loader-comet-duration: calc(var(--sf-duration-slow) * 2);color:currentColor;color:var(--sf-loader--color, currentColor);display:flex;flex-direction:column;align-items:center;gap:var(--sf-loader-text-gap);justify-content:center}.sf-loader-container .sf-loader--text{font-family:var(--sf-text--family);font-weight:400;font-size:var(--sf-loader-text-size);color:var(--sf-on-surface)}.sf-loader-container.sf-loader--size-1\/3{--sf-loader-svg-width: var(--sf-text-height-1\/3);--sf-loader-svg-height: var(--sf-text-height-1\/3);--sf-loader-text-gap: var(--sf-space-1\/3);--sf-loader-text-size: var(--sf-text-size-1\/3)}.sf-loader-container.sf-loader--size-1\/2{--sf-loader-svg-width: var(--sf-text-height-1\/2);--sf-loader-svg-height: var(--sf-text-height-1\/2);--sf-loader-text-gap: var(--sf-space-1\/3);--sf-loader-text-size: var(--sf-text-size-1\/2)}.sf-loader-container.sf-loader--size-1{--sf-loader-svg-width: var(--sf-text-height-1);--sf-loader-svg-height: var(--sf-text-height-1);--sf-loader-text-gap: var(--sf-space-1\/2);--sf-loader-text-size: var(--sf-text-size-1)}.sf-loader-container.sf-loader--size-2{--sf-loader-svg-width: var(--sf-text-height-2);--sf-loader-svg-height: var(--sf-text-height-2);--sf-loader-text-gap: var(--sf-space-1);--sf-loader-text-size: var(--sf-text-size-2)}.sf-loader-container.sf-loader--size-3{--sf-loader-svg-width: var(--sf-text-height-3);--sf-loader-svg-height: var(--sf-text-height-3);--sf-loader-text-gap: var(--sf-space-2);--sf-loader-text-size: var(--sf-text-size-3)}.sf-loader-container.sf-loader--pixel-geometry{--sf-loader-stroke-width: var(--sf-a5)}.sf-loader-container.sf-loader--pixel-geometry.sf-loader--size-1\/3{--sf-loader-stroke-width: var(--sf-a4)}.sf-loader-container.sf-loader--pixel-geometry.sf-loader--size-1\/2{--sf-loader-stroke-width: var(--sf-a4)}.sf-loader-container.sf-loader--pixel-geometry.sf-loader--size-1{--sf-loader-stroke-width: var(--sf-a6)}.sf-loader-container.sf-loader--pixel-geometry.sf-loader--size-2{--sf-loader-stroke-width: var(--sf-a6)}.sf-loader-container.sf-loader--pixel-geometry.sf-loader--size-3{--sf-loader-stroke-width: var(--sf-a8)}}@layer sf.components{.sf-loader-container .sf-loader--loading-indicator,.sf-loader-container .sf-loader--circles{display:inline-flex;height:var(--sf-loader-svg-height);width:var(--sf-loader-svg-width)}.sf-loader-container .sf-loader-svg{display:block;height:100%;overflow:visible;width:100%}:where([data-sf-spinner]:not([data-sf-spinner=""])){--sf-loader--look-track: inline;--sf-loader--look-accent: inline;--sf-loader--look-comet: none;--sf-loader--look-dots: none;--sf-loader--look-motion: none;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: sf-loader-svg-rotate;--sf-loader--look-spin-duration: var(--sf-loader-arc-duration);--sf-loader--look-dash: 30 70}[data-sf-spinner=breathing]{--sf-loader--look-track: inline;--sf-loader--look-accent: inline;--sf-loader--look-comet: none;--sf-loader--look-dots: none;--sf-loader--look-motion: sf-loader-breathing;--sf-loader--look-motion-duration: var(--sf-loader-breath-duration);--sf-loader--look-motion-easing: var(--sf-animation);--sf-loader--look-spin: sf-loader-svg-rotate;--sf-loader--look-spin-duration: var(--sf-loader-spin-duration);--sf-loader--look-dash: 24 76}[data-sf-spinner=comet]{--sf-loader--look-track: inline;--sf-loader--look-accent: none;--sf-loader--look-comet: inline;--sf-loader--look-dots: none;--sf-loader--look-motion: none;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: sf-loader-svg-rotate;--sf-loader--look-spin-duration: var(--sf-loader-comet-duration);--sf-loader--look-dash: 30 70}[data-sf-spinner=dots]{--sf-loader--look-track: none;--sf-loader--look-accent: none;--sf-loader--look-comet: none;--sf-loader--look-dots: inline;--sf-loader--look-motion: none;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: none;--sf-loader--look-spin-duration: var(--sf-loader-spin-duration);--sf-loader--look-dash: 30 70}.sf-loader-container:where([data-variant]:not([data-variant=""])){--sf-loader--look-track: inline;--sf-loader--look-accent: inline;--sf-loader--look-comet: none;--sf-loader--look-dots: none;--sf-loader--look-motion: none;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: sf-loader-svg-rotate;--sf-loader--look-spin-duration: var(--sf-loader-arc-duration);--sf-loader--look-dash: 30 70}.sf-loader-container[data-variant=breathing]{--sf-loader--look-track: inline;--sf-loader--look-accent: inline;--sf-loader--look-comet: none;--sf-loader--look-dots: none;--sf-loader--look-motion: sf-loader-breathing;--sf-loader--look-motion-duration: var(--sf-loader-breath-duration);--sf-loader--look-motion-easing: var(--sf-animation);--sf-loader--look-spin: sf-loader-svg-rotate;--sf-loader--look-spin-duration: var(--sf-loader-spin-duration);--sf-loader--look-dash: 24 76}.sf-loader-container[data-variant=comet]{--sf-loader--look-track: inline;--sf-loader--look-accent: none;--sf-loader--look-comet: inline;--sf-loader--look-dots: none;--sf-loader--look-motion: none;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: sf-loader-svg-rotate;--sf-loader--look-spin-duration: var(--sf-loader-comet-duration);--sf-loader--look-dash: 30 70}.sf-loader-container[data-variant=dots]{--sf-loader--look-track: none;--sf-loader--look-accent: none;--sf-loader--look-comet: none;--sf-loader--look-dots: inline;--sf-loader--look-motion: none;--sf-loader--look-motion-duration: var(--sf-loader-cycle-duration);--sf-loader--look-motion-easing: linear;--sf-loader--look-spin: none;--sf-loader--look-spin-duration: var(--sf-loader-spin-duration);--sf-loader--look-dash: 30 70}.sf-loader-container .sf-loader-svg{-webkit-animation-name:sf-loader-svg-rotate;animation-name:sf-loader-svg-rotate;-webkit-animation-name:var(--sf-loader--look-spin, sf-loader-svg-rotate);animation-name:var(--sf-loader--look-spin, sf-loader-svg-rotate);-webkit-animation-duration:var(--sf-loader-arc-duration);animation-duration:var(--sf-loader-arc-duration);-webkit-animation-duration:var(--sf-loader--look-spin-duration, var(--sf-loader-arc-duration));animation-duration:var(--sf-loader--look-spin-duration, var(--sf-loader-arc-duration));-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:both;animation-fill-mode:both}.sf-loader-container .sf-loader-ring-filled{display:inline;display:var(--sf-loader--look-track, inline);fill:none;opacity:var(--sf-opacity-30);stroke:var(--sf-surface-container);stroke:var(--sf-loader-track-color, var(--sf-surface-container));stroke-linecap:round;stroke-width:var(--sf-loader-stroke-width)}.sf-loader-container .sf-loader-ring-accent{display:inline;display:var(--sf-loader--look-accent, inline);fill:none;stroke:currentColor;stroke-dasharray:30 70;stroke-dasharray:var(--sf-loader--look-dash, 30 70);stroke-linecap:round;stroke-linejoin:round;stroke-width:var(--sf-loader-stroke-width)}.sf-loader-container .sf-loader--loading-indicator .sf-loader-ring-accent{-webkit-animation-name:none;animation-name:none;-webkit-animation-name:var(--sf-loader--look-motion, none);animation-name:var(--sf-loader--look-motion, none);-webkit-animation-duration:var(--sf-loader-cycle-duration);animation-duration:var(--sf-loader-cycle-duration);-webkit-animation-duration:var(--sf-loader--look-motion-duration, var(--sf-loader-cycle-duration));animation-duration:var(--sf-loader--look-motion-duration, var(--sf-loader-cycle-duration));-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-timing-function:var(--sf-loader--look-motion-easing, linear);animation-timing-function:var(--sf-loader--look-motion-easing, linear);-webkit-animation-fill-mode:both;animation-fill-mode:both}.sf-loader-container.sf-loader--infinite .sf-loader--loading-indicator .sf-loader-ring-accent,.sf-loader-container.sf-loader--infinite .sf-loader-svg{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.sf-loader-container .sf-loader-comet{display:none;display:var(--sf-loader--look-comet, none)}.sf-loader-container .sf-loader-comet-segment{fill:none;stroke:currentColor;stroke-width:var(--sf-loader-stroke-width)}.sf-loader-container .sf-loader-dots{display:none;display:var(--sf-loader--look-dots, none)}.sf-loader-container .sf-loader-dot{fill:currentColor;opacity:var(--sf-opacity-20);-webkit-animation:sf-loader-dot-wave var(--sf-loader-dot-duration) linear both;animation:sf-loader-dot-wave var(--sf-loader-dot-duration) linear both;-webkit-animation-delay:calc(var(--sf-loader-dot-duration)/var(--sf-loader-dot-count)*var(--sf-loader-dot-step)*-1);animation-delay:calc(var(--sf-loader-dot-duration)/var(--sf-loader-dot-count)*var(--sf-loader-dot-step)*-1)}.sf-loader-container .sf-loader-dot--active{opacity:var(--sf-opacity-60)}.sf-loader-container.sf-loader--infinite .sf-loader-dot{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes sf-loader-svg-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes sf-loader-svg-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes sf-loader-dot-wave{0%{opacity:var(--sf-opacity-20)}18%{opacity:1}40%{opacity:var(--sf-opacity-60)}100%{opacity:var(--sf-opacity-20)}}@keyframes sf-loader-dot-wave{0%{opacity:var(--sf-opacity-20)}18%{opacity:1}40%{opacity:var(--sf-opacity-60)}100%{opacity:var(--sf-opacity-20)}}@media(prefers-reduced-motion: reduce){.sf-loader-container .sf-loader-svg,.sf-loader-container .sf-loader-ring-accent,.sf-loader-container .sf-loader-dot{-webkit-animation:none !important;animation:none !important}.sf-loader-container .sf-loader-ring-accent{opacity:1}}@-webkit-keyframes sf-loader-breathing{0%{stroke-dasharray:4 96;stroke-dashoffset:0}50%{stroke-dasharray:70 30;stroke-dashoffset:-15}100%{stroke-dasharray:4 96;stroke-dashoffset:-100}}@keyframes sf-loader-breathing{0%{stroke-dasharray:4 96;stroke-dashoffset:0}50%{stroke-dasharray:70 30;stroke-dashoffset:-15}100%{stroke-dasharray:4 96;stroke-dashoffset:-100}}}
@@ -1 +1 @@
1
- (()=>{"use strict";class t{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const n=t.match(/\(([^)]+)\)/g);n&&n.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const n=this.getUtilityMap();if(!n||!n[e])return;this.extractUtilityClasses(n[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}const e=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)},n=(()=>{const t="undefined"!=typeof globalThis?globalThis:{},e="__sfPageLanguage";return t[e]||(t[e]={listeners:new Set,registered:new Map,chosen:null}),t[e]})(),i=n.listeners,o=n.registered,a=t=>String(t??"").trim().toLowerCase().replace("_","-"),s=()=>{for(const t of[...i])try{t()}catch{}};function r(t){let e=t;for(;e;){const t="function"==typeof e.closest?e.closest("[lang]"):null;if(t)return t;const n="function"==typeof e.getRootNode?e.getRootNode():null;e=n&&n!==e&&n.host?n.host:null}return null}function l(t){if(n.chosen)return n.chosen.split("-")[0];const e=r(t),i=e?.getAttribute("lang")||globalThis.document?.documentElement?.lang||"en";return a(i).split("-")[0]||"en"}function d(t){if(n.chosen)return n.chosen;const e=r(t);return a(e?.getAttribute("lang")||globalThis.document?.documentElement?.lang||"en")}function c(t,e,n,i){const s=i??(t=>{const e=t?.tagName;return"string"==typeof e?e.toLowerCase():null})(n);for(const i of(t=>{const e=a(t),n=e.split("-")[0],i=[];for(const t of[e,n,"en"])t&&!i.includes(t)&&i.push(t);return i})(d(n))){const n=s?o.get(s)?.get(i)?.[e]:void 0;if(void 0!==n)return n;const a=t?.[i]?.[e];if(void 0!==a)return a}return e}const h={current:(t=globalThis.document?.documentElement??null)=>d(t),use(t){const e=null==t?null:a(t);return e===n.chosen||(n.chosen=e,s()),n.chosen},register(t,e,n){const i=String(t??"").toLowerCase(),r=a(e);if(!i||!r)throw new TypeError("a component and a language are required");o.has(i)||o.set(i,new Map);const l=o.get(i);return null===n?l.delete(r):l.set(r,{...l.get(r)??{},...n}),s(),this},registerAll(t,e={}){for(const[n,i]of Object.entries(e))this.register(n,t,i);return this},known(t){const e=String(t??"").toLowerCase();return[...o.get(e)?.keys()??[]]},components:()=>[...o.keys()],onChange:t=>"function"!=typeof t?()=>{}:(i.add(t),()=>i.delete(t)),forget(){return o.clear(),n.chosen=null,s(),this}};function u(){const t=globalThis.SF=globalThis.SF||{};return t.__deprecationNotes instanceof Map||Object.defineProperty(t,"__deprecationNotes",{value:new Map,configurable:!0}),t.__deprecationNotes}function f({component:t="",kind:e="attribute",attribute:n="",from:i,to:o=null}={}){if(!i)return;const a=[t,e,n,i].join("|"),s=u(),r=s.get(a);if(r)r.count+=1;else if(s.set(a,{component:t,kind:e,attribute:n,from:i,to:o,count:1}),function(){const t=globalThis.document?.documentElement;return"warn"===t?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const a=t?`${t}: `:"",s="value"===e?`${n}="${i}"`:`${e} ${i}`;globalThis.console?.warn?.(`[SIMAI Framework] ${a}${s} is a legacy name${o?`; write ${o}`:""}. See contracts/changes/journal.json.`)}}if("undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.language=h,window.SF.pageLanguage=l,window.SF.pageText=c),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const t=globalThis.SF.deprecations||{};t.list=function(){return[...u().values()].map(t=>({...t}))},t.clear=function(){u().clear()},t.note=f,globalThis.SF.deprecations=t}const p=["arc","breathing","comet","dots"];function m(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&n.setAttribute(t,String(e))}),n}const g=t=>Math.round(1e3*t)/1e3;function w({width:t=24,height:e=24,stroke:n=2,dots:i=8,filled:o=3,dotRadius:a=null,direction:s="clockwise",pixel:r=!1}={}){const l=t/2,d=e/2,c=Math.min(t,e)/2,h=Math.max(1,c-n/2),u=m("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:r?t:null,height:r?e:null,"aria-hidden":"true",focusable:"false"}),f={cx:l,cy:d,r:g(h),fill:"none",stroke:"currentColor","stroke-width":n},p=m("circle",{class:"sf-loader-ring-filled",...f,opacity:"0.3"}),w=m("circle",{class:"sf-loader-ring-accent",...f,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"0 100",transform:`rotate(90 ${l} ${d})`}),y=m("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${l} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;y.append(m("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...f,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${g(4)} ${g(96)}`,"stroke-dashoffset":g(-4*t),opacity:g(((t+1)/10)**1.6)}))}const S=Math.max(3,Math.min(32,Math.floor(Number(i)||8))),b=Math.max(1,Math.min(S,Math.floor(Number(o)||3))),v=Math.min(n,.7*Math.PI*(c-n)/S),M=null==a||""===a?v:Math.max(1,Math.min(Number(a)||v,c/4)),E=Math.max(M,c-M),k=m("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${S}; --sf-loader-dot-filled:${b};`});for(let t=0;t<S;t+=1){const e=2*Math.PI/S*t-Math.PI/2,n="counterclockwise"===s?t:(S-t)%S;k.append(m("circle",{class:"sf-loader-dot"+(t<b?" sf-loader-dot--active":""),cx:g(l+E*Math.cos(e)),cy:g(d+E*Math.sin(e)),r:g(M),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${n};`}))}return u.append(p,w,y,k),u}function y(t={}){return w({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}const S={en:{label:"Loading…"},ru:{label:"Загрузка…"}},b=".sf-loader-container",v="sfSpinnerBound";function M(t,e){const n=Number.parseFloat(String(t??""));return Number.isFinite(n)?n:e}function E(t,e,n){return Math.min(Math.max(t,e),n)}function k(t,e,n){const i=String(t||"").trim().toLowerCase();return e.includes(i)?i:n}const x=[["width","data-width","width"],["w","data-w","width"],["height","data-height","height"],["h","data-h","height"],["strokeWidth","data-stroke-width","stroke-width"],["dotRadius","data-dot-radius","dot-radius"]];function N({width:t=58,height:e=58,strokeWidth:n=4,dots:i=8,filled:o=3,dotRadius:a=null,direction:s="clockwise"}={}){const r=E(M(t,58),16,256),l=E(M(e,r),16,256);return w({width:r,height:l,stroke:E(M(n,4),1,Math.min(r,l)/2),dots:i,filled:o,dotRadius:a,direction:s,pixel:!0})}function $(t){const e=t.querySelector(".sf-loader--loading-indicator"),n=t.querySelector(".sf-loader--circles"),i=t.querySelector(".sf-loader--text"),o=Object.prototype.hasOwnProperty.call(t.dataset,"width")||Object.prototype.hasOwnProperty.call(t.dataset,"w"),a=Object.prototype.hasOwnProperty.call(t.dataset,"height")||Object.prototype.hasOwnProperty.call(t.dataset,"h"),s=function(t){const e=t.closest?.("sf-spinner"),n=x.filter(([e])=>{const n=t.dataset[e];return void 0!==n&&""!==n});return n.forEach(([,t,n])=>{f({component:e?"sf-spinner":"spinner",kind:"attribute",from:e?n:t,to:e?"size":null})}),n.length>0}(t),r=E(M(t.dataset.width,M(t.dataset.w,58)),16,256),l=E(M(t.dataset.height,M(t.dataset.h,r)),16,256),d=t.dataset.strokeWidth?E(M(t.dataset.strokeWidth,4),1,Math.min(r,l)/2):null,c=E(Math.floor(M(t.dataset.dots,8)),3,32);return{pixel:s,width:r,height:l,strokeWidth:d,dots:c,filled:E(Math.floor(M(t.dataset.filled,3)),1,c),dotRadius:t.dataset.dotRadius?E(M(t.dataset.dotRadius,1),1,Math.min(r,l)/4):null,direction:k(t.dataset.direction,["clockwise","counterclockwise"],"clockwise"),variant:t.dataset.variant?k(t.dataset.variant,p,"arc"):n?"dots":"",hasExplicitWidth:o,hasExplicitHeight:a,infinite:"true"===t.dataset.infinite,announce:"true"===t.dataset.announce,label:void 0!==t.dataset.label?t.dataset.label:i?.textContent?.trim?.()||"",indicator:e,circles:n,labelNode:i}}function F(t,e,n){let i=t.querySelector(e);return i?(i.innerHTML="",i):(i=document.createElement("div"),i.className=n,i.dataset.sfSpinnerPart=n,t.append(i),i)}function L(t){if(!(t instanceof HTMLElement))return t;const e=$(t);t.classList.add("sf-loader-container"),e.infinite?t.classList.add("sf-loader--infinite"):t.classList.remove("sf-loader--infinite"),e.pixel&&e.hasExplicitWidth?t.style.setProperty("--sf-loader-svg-width",`${e.width}px`):t.style.removeProperty("--sf-loader-svg-width"),e.pixel&&(e.hasExplicitHeight||e.hasExplicitWidth)?t.style.setProperty("--sf-loader-svg-height",`${e.height}px`):t.style.removeProperty("--sf-loader-svg-height"),null!==e.strokeWidth?t.style.setProperty("--sf-loader-stroke-width",`${e.strokeWidth}px`):t.style.removeProperty("--sf-loader-stroke-width"),t.classList.toggle("sf-loader--pixel-geometry",e.pixel),e.variant&&t.dataset.variant!==e.variant&&(t.dataset.variant=e.variant);const n=t.querySelector(".sf-loader--circles");if(n&&!t.querySelector(".sf-loader--loading-indicator")){const t=document.createElement("div");t.className="sf-loader--loading-indicator",t.dataset.sfSpinnerPart="sf-loader--loading-indicator",n.replaceWith(t)}const i=F(t,".sf-loader--loading-indicator","sf-loader--loading-indicator"),o=e.label||e.labelNode?F(t,".sf-loader--text","sf-loader--text"):null,a=e.pixel?N({...e,strokeWidth:e.strokeWidth??4}):y(e);return i.append(a),o&&(o.textContent=e.label||""),function(t,e){const n=Boolean(e.label);if(t.toggleAttribute("aria-hidden",!n),e.announce&&n)return t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),void(t.dataset.sfSpinnerSemantics="status");"status"===t.dataset.sfSpinnerSemantics&&(t.removeAttribute("role"),t.removeAttribute("aria-live"),t.removeAttribute("aria-atomic"),delete t.dataset.sfSpinnerSemantics)}(t,e),t}function P(t){return t instanceof HTMLElement&&"1"!==t.dataset[v]?(L(t),t.dataset[v]="1",t):t}function T(t){t instanceof HTMLElement&&delete t.dataset[v]}function C(t){(t instanceof Element||t===document)&&(t instanceof Element&&t.matches?.(b)&&P(t),t.querySelectorAll?.(b).forEach(P))}e("Spinner",class extends t{static componentName="Spinner";constructor(t){super(t);const{width:e,height:n,label:i=c(S,"label",t?.root??document.documentElement),variant:o,dots:a=8,filled:s=3,strokeWidth:r=null,dotRadius:l=null,infinite:d=!1,announce:h=!1,direction:u="clockwise"}=this.params||{},f=this.attrs.class||this.attrs.className;this.template=document.createElement("div"),this.id&&(this.template.id=this.id),this.template.classList.add("sf-loader-container"),f&&this.template.classList.add(...`${f}`.split(" ").filter(Boolean)),Object.entries(this.attrs).filter(([t])=>!["class","className"].includes(t)).forEach(([t,e])=>{null!=e&&this.template.setAttribute(t,e)}),null!=e&&""!==e&&(this.template.dataset.width=String(e)),null!=n&&""!==n&&(this.template.dataset.height=String(n)),this.template.dataset.label=String(i??""),null!=o&&""!==o&&(this.template.dataset.variant=String(o)),this.template.dataset.dots=String(a),this.template.dataset.filled=String(s),null!=r&&""!==r&&(this.template.dataset.strokeWidth=String(r)),this.template.dataset.infinite=String(d),this.template.dataset.announce=String(h),this.template.dataset.direction=String(u),null!=l&&(this.template.dataset.dotRadius=String(l))}init(){P(this.template)}destroyInternal(){T(this.template)}}),"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.Spinner=window.SF.Spinner||{},window.SF.Spinner.bind=P,window.SF.Spinner.render=L,window.SF.Spinner.unbind=T,window.SF.Spinner.createArcSvg=function(t={}){return["width","height","strokeWidth"].some(e=>{const n=t?.[e];return null!=n&&""!==n})?N(t):y(t)},window.SF.Spinner.createDotsSvg=function({width:t=58,height:e=58,dots:n=16,filled:i=6,dotRadius:o=null,direction:a="clockwise"}={}){const s=E(M(t,58),16,256),r=E(M(e,s),16,256),l=E(Math.floor(M(n,16)),3,32),d=E(Math.floor(M(i,6)),1,l),c=null===o?Math.max(1.5,.06*Math.min(s,r)):E(M(o,1),1,Math.min(s,r)/4),h=Math.max(c,Math.min(s,r)/2-c-1),u=s/2,f=r/2,p=m("svg",{class:"sf-loader-svg",viewBox:`0 0 ${s} ${r}`,width:s,height:r,"aria-hidden":"true",style:`--sf-loader-dot-count:${l}; --sf-loader-dot-filled:${d};`});for(let t=0;t<l;t+=1){const e=2*Math.PI/l*t-Math.PI/2,n=m("circle",{class:"sf-loader-dot"+(t<d?" sf-loader-dot--active":""),cx:u+h*Math.cos(e),cy:f+h*Math.sin(e),r:c,style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${"counterclockwise"===a?t:(l-t)%l};`});p.append(n)}return p}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>C(document)):C(document);new MutationObserver(t=>{t.forEach(t=>{t.addedNodes.forEach(t=>{t instanceof Element&&C(t)})})}).observe(document.documentElement,{childList:!0,subtree:!0})})();
1
+ (()=>{"use strict";class t{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const n=t.match(/\(([^)]+)\)/g);n&&n.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const n=this.getUtilityMap();if(!n||!n[e])return;this.extractUtilityClasses(n[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}const e=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)},n=(()=>{const t="undefined"!=typeof globalThis?globalThis:{},e="__sfPageLanguage";return t[e]||(t[e]={listeners:new Set,registered:new Map,chosen:null}),t[e]})(),i=n.listeners,o=n.registered,a=t=>String(t??"").trim().toLowerCase().replace("_","-"),s=()=>{for(const t of[...i])try{t()}catch{}};function r(t){let e=t;for(;e;){const t="function"==typeof e.closest?e.closest("[lang]"):null;if(t)return t;const n="function"==typeof e.getRootNode?e.getRootNode():null;e=n&&n!==e&&n.host?n.host:null}return null}function l(t){if(n.chosen)return n.chosen.split("-")[0];const e=r(t),i=e?.getAttribute("lang")||globalThis.document?.documentElement?.lang||"en";return a(i).split("-")[0]||"en"}function d(t){if(n.chosen)return n.chosen;const e=r(t);return a(e?.getAttribute("lang")||globalThis.document?.documentElement?.lang||"en")}function c(t,e,n,i){const s=i??(t=>{const e=t?.tagName;return"string"==typeof e?e.toLowerCase():null})(n);for(const i of(t=>{const e=a(t),n=e.split("-")[0],i=[];for(const t of[e,n,"en"])t&&!i.includes(t)&&i.push(t);return i})(d(n))){const n=s?o.get(s)?.get(i)?.[e]:void 0;if(void 0!==n)return n;const a=t?.[i]?.[e];if(void 0!==a)return a}return e}const h={current:(t=globalThis.document?.documentElement??null)=>d(t),use(t){const e=null==t?null:a(t);return e===n.chosen||(n.chosen=e,s()),n.chosen},register(t,e,n){const i=String(t??"").toLowerCase(),r=a(e);if(!i||!r)throw new TypeError("a component and a language are required");o.has(i)||o.set(i,new Map);const l=o.get(i);return null===n?l.delete(r):l.set(r,{...l.get(r)??{},...n}),s(),this},registerAll(t,e={}){for(const[n,i]of Object.entries(e))this.register(n,t,i);return this},known(t){const e=String(t??"").toLowerCase();return[...o.get(e)?.keys()??[]]},components:()=>[...o.keys()],onChange:t=>"function"!=typeof t?()=>{}:(i.add(t),()=>i.delete(t)),forget(){return o.clear(),n.chosen=null,s(),this}};function u(){const t=globalThis.SF=globalThis.SF||{};return t.__deprecationNotes instanceof Map||Object.defineProperty(t,"__deprecationNotes",{value:new Map,configurable:!0}),t.__deprecationNotes}function f({component:t="",kind:e="attribute",attribute:n="",from:i,to:o=null}={}){if(!i)return;const a=[t,e,n,i].join("|"),s=u(),r=s.get(a);if(r)r.count+=1;else if(s.set(a,{component:t,kind:e,attribute:n,from:i,to:o,count:1}),function(){const t=globalThis.document?.documentElement;return"warn"===t?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const a=t?`${t}: `:"",s="value"===e?`${n}="${i}"`:`${e} ${i}`;globalThis.console?.warn?.(`[SIMAI Framework] ${a}${s} is a legacy name${o?`; write ${o}`:""}. See contracts/changes/journal.json.`)}}if("undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.language=h,window.SF.pageLanguage=l,window.SF.pageText=c),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const t=globalThis.SF.deprecations||{};t.list=function(){return[...u().values()].map(t=>({...t}))},t.clear=function(){u().clear()},t.note=f,globalThis.SF.deprecations=t}const p=["arc","breathing","comet","dots"];function m(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&n.setAttribute(t,String(e))}),n}const g=t=>Math.round(1e3*t)/1e3;function w({width:t=24,height:e=24,stroke:n=2,dots:i=8,filled:o=3,dotRadius:a=null,direction:s="clockwise",pixel:r=!1}={}){const l=t/2,d=e/2,c=Math.min(t,e)/2,h=Math.max(1,c-n/2),u=m("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:r?t:null,height:r?e:null,"aria-hidden":"true",focusable:"false"}),f={cx:l,cy:d,r:g(h),fill:"none",stroke:"currentColor","stroke-width":n},p=m("circle",{class:"sf-loader-ring-filled",...f,opacity:"0.3"}),w=m("circle",{class:"sf-loader-ring-accent",...f,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${l} ${d})`}),y=m("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${l} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;y.append(m("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...f,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${g(4)} ${g(96)}`,"stroke-dashoffset":g(-4*t),opacity:g(((t+1)/10)**1.6)}))}const S=Math.max(3,Math.min(32,Math.floor(Number(i)||8))),b=Math.max(1,Math.min(S,Math.floor(Number(o)||3))),v=Math.min(n,.7*Math.PI*(c-n)/S),M=null==a||""===a?v:Math.max(1,Math.min(Number(a)||v,c/4)),E=Math.max(M,c-M),k=m("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${S}; --sf-loader-dot-filled:${b};`});for(let t=0;t<S;t+=1){const e=2*Math.PI/S*t-Math.PI/2,n="counterclockwise"===s?t:(S-t)%S;k.append(m("circle",{class:"sf-loader-dot"+(t<b?" sf-loader-dot--active":""),cx:g(l+E*Math.cos(e)),cy:g(d+E*Math.sin(e)),r:g(M),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${n};`}))}return u.append(p,w,y,k),u}function y(t={}){return w({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}const S={en:{label:"Loading…"},ru:{label:"Загрузка…"}},b=".sf-loader-container",v="sfSpinnerBound";function M(t,e){const n=Number.parseFloat(String(t??""));return Number.isFinite(n)?n:e}function E(t,e,n){return Math.min(Math.max(t,e),n)}function k(t,e,n){const i=String(t||"").trim().toLowerCase();return e.includes(i)?i:n}const x=[["width","data-width","width"],["w","data-w","width"],["height","data-height","height"],["h","data-h","height"],["strokeWidth","data-stroke-width","stroke-width"],["dotRadius","data-dot-radius","dot-radius"]];function N({width:t=58,height:e=58,strokeWidth:n=4,dots:i=8,filled:o=3,dotRadius:a=null,direction:s="clockwise"}={}){const r=E(M(t,58),16,256),l=E(M(e,r),16,256);return w({width:r,height:l,stroke:E(M(n,4),1,Math.min(r,l)/2),dots:i,filled:o,dotRadius:a,direction:s,pixel:!0})}function $(t){const e=t.querySelector(".sf-loader--loading-indicator"),n=t.querySelector(".sf-loader--circles"),i=t.querySelector(".sf-loader--text"),o=Object.prototype.hasOwnProperty.call(t.dataset,"width")||Object.prototype.hasOwnProperty.call(t.dataset,"w"),a=Object.prototype.hasOwnProperty.call(t.dataset,"height")||Object.prototype.hasOwnProperty.call(t.dataset,"h"),s=function(t){const e=t.closest?.("sf-spinner"),n=x.filter(([e])=>{const n=t.dataset[e];return void 0!==n&&""!==n});return n.forEach(([,t,n])=>{f({component:e?"sf-spinner":"spinner",kind:"attribute",from:e?n:t,to:e?"size":null})}),n.length>0}(t),r=E(M(t.dataset.width,M(t.dataset.w,58)),16,256),l=E(M(t.dataset.height,M(t.dataset.h,r)),16,256),d=t.dataset.strokeWidth?E(M(t.dataset.strokeWidth,4),1,Math.min(r,l)/2):null,c=E(Math.floor(M(t.dataset.dots,8)),3,32);return{pixel:s,width:r,height:l,strokeWidth:d,dots:c,filled:E(Math.floor(M(t.dataset.filled,3)),1,c),dotRadius:t.dataset.dotRadius?E(M(t.dataset.dotRadius,1),1,Math.min(r,l)/4):null,direction:k(t.dataset.direction,["clockwise","counterclockwise"],"clockwise"),variant:t.dataset.variant?k(t.dataset.variant,p,"arc"):n?"dots":"",hasExplicitWidth:o,hasExplicitHeight:a,infinite:"true"===t.dataset.infinite,announce:"true"===t.dataset.announce,label:void 0!==t.dataset.label?t.dataset.label:i?.textContent?.trim?.()||"",indicator:e,circles:n,labelNode:i}}function F(t,e,n){let i=t.querySelector(e);return i?(i.innerHTML="",i):(i=document.createElement("div"),i.className=n,i.dataset.sfSpinnerPart=n,t.append(i),i)}function L(t){if(!(t instanceof HTMLElement))return t;const e=$(t);t.classList.add("sf-loader-container"),e.infinite?t.classList.add("sf-loader--infinite"):t.classList.remove("sf-loader--infinite"),e.pixel&&e.hasExplicitWidth?t.style.setProperty("--sf-loader-svg-width",`${e.width}px`):t.style.removeProperty("--sf-loader-svg-width"),e.pixel&&(e.hasExplicitHeight||e.hasExplicitWidth)?t.style.setProperty("--sf-loader-svg-height",`${e.height}px`):t.style.removeProperty("--sf-loader-svg-height"),null!==e.strokeWidth?t.style.setProperty("--sf-loader-stroke-width",`${e.strokeWidth}px`):t.style.removeProperty("--sf-loader-stroke-width"),t.classList.toggle("sf-loader--pixel-geometry",e.pixel),e.variant&&t.dataset.variant!==e.variant&&(t.dataset.variant=e.variant);const n=t.querySelector(".sf-loader--circles");if(n&&!t.querySelector(".sf-loader--loading-indicator")){const t=document.createElement("div");t.className="sf-loader--loading-indicator",t.dataset.sfSpinnerPart="sf-loader--loading-indicator",n.replaceWith(t)}const i=F(t,".sf-loader--loading-indicator","sf-loader--loading-indicator"),o=e.label||e.labelNode?F(t,".sf-loader--text","sf-loader--text"):null,a=e.pixel?N({...e,strokeWidth:e.strokeWidth??4}):y(e);return i.append(a),o&&(o.textContent=e.label||""),function(t,e){const n=Boolean(e.label);if(t.toggleAttribute("aria-hidden",!n),e.announce&&n)return t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),void(t.dataset.sfSpinnerSemantics="status");"status"===t.dataset.sfSpinnerSemantics&&(t.removeAttribute("role"),t.removeAttribute("aria-live"),t.removeAttribute("aria-atomic"),delete t.dataset.sfSpinnerSemantics)}(t,e),t}function P(t){return t instanceof HTMLElement&&"1"!==t.dataset[v]?(L(t),t.dataset[v]="1",t):t}function T(t){t instanceof HTMLElement&&delete t.dataset[v]}function C(t){(t instanceof Element||t===document)&&(t instanceof Element&&t.matches?.(b)&&P(t),t.querySelectorAll?.(b).forEach(P))}e("Spinner",class extends t{static componentName="Spinner";constructor(t){super(t);const{width:e,height:n,label:i=c(S,"label",t?.root??document.documentElement),variant:o,dots:a=8,filled:s=3,strokeWidth:r=null,dotRadius:l=null,infinite:d=!1,announce:h=!1,direction:u="clockwise"}=this.params||{},f=this.attrs.class||this.attrs.className;this.template=document.createElement("div"),this.id&&(this.template.id=this.id),this.template.classList.add("sf-loader-container"),f&&this.template.classList.add(...`${f}`.split(" ").filter(Boolean)),Object.entries(this.attrs).filter(([t])=>!["class","className"].includes(t)).forEach(([t,e])=>{null!=e&&this.template.setAttribute(t,e)}),null!=e&&""!==e&&(this.template.dataset.width=String(e)),null!=n&&""!==n&&(this.template.dataset.height=String(n)),this.template.dataset.label=String(i??""),null!=o&&""!==o&&(this.template.dataset.variant=String(o)),this.template.dataset.dots=String(a),this.template.dataset.filled=String(s),null!=r&&""!==r&&(this.template.dataset.strokeWidth=String(r)),this.template.dataset.infinite=String(d),this.template.dataset.announce=String(h),this.template.dataset.direction=String(u),null!=l&&(this.template.dataset.dotRadius=String(l))}init(){P(this.template)}destroyInternal(){T(this.template)}}),"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.Spinner=window.SF.Spinner||{},window.SF.Spinner.bind=P,window.SF.Spinner.render=L,window.SF.Spinner.unbind=T,window.SF.Spinner.createArcSvg=function(t={}){return["width","height","strokeWidth"].some(e=>{const n=t?.[e];return null!=n&&""!==n})?N(t):y(t)},window.SF.Spinner.createDotsSvg=function({width:t=58,height:e=58,dots:n=16,filled:i=6,dotRadius:o=null,direction:a="clockwise"}={}){const s=E(M(t,58),16,256),r=E(M(e,s),16,256),l=E(Math.floor(M(n,16)),3,32),d=E(Math.floor(M(i,6)),1,l),c=null===o?Math.max(1.5,.06*Math.min(s,r)):E(M(o,1),1,Math.min(s,r)/4),h=Math.max(c,Math.min(s,r)/2-c-1),u=s/2,f=r/2,p=m("svg",{class:"sf-loader-svg",viewBox:`0 0 ${s} ${r}`,width:s,height:r,"aria-hidden":"true",style:`--sf-loader-dot-count:${l}; --sf-loader-dot-filled:${d};`});for(let t=0;t<l;t+=1){const e=2*Math.PI/l*t-Math.PI/2,n=m("circle",{class:"sf-loader-dot"+(t<d?" sf-loader-dot--active":""),cx:u+h*Math.cos(e),cy:f+h*Math.sin(e),r:c,style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${"counterclockwise"===a?t:(l-t)%l};`});p.append(n)}return p}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>C(document)):C(document);new MutationObserver(t=>{t.forEach(t=>{t.addedNodes.forEach(t=>{t instanceof Element&&C(t)})})}).observe(document.documentElement,{childList:!0,subtree:!0})})();
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var e={"67eed2647f47"(e,t,n){n.d(t,{z:()=>i});const a=new WeakMap,s=new WeakSet;function i(e,t){const n=e.ownerDocument;s.has(n)||(n.addEventListener("reset",e=>{const t=e.target;if("FORM"!==t?.tagName)return;const n=Array.from(t.elements);setTimeout(()=>{if(!e.defaultPrevented)for(const e of n)if(e.isConnected&&e.form===t)for(const t of a.get(e)||[])t()},0)},!0),s.add(n));let i=a.get(e);return i||a.set(e,i=new Set),i.add(t),()=>i.delete(t)}},"50d2a204ba4c"(e,t,n){n.d(t,{le:()=>r});function a(e,t={}){const n=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach(([e,t])=>{null!=t&&""!==t&&n.setAttribute(e,String(t))}),n}const s=e=>Math.round(1e3*e)/1e3;function i(e={}){return function({width:e=24,height:t=24,stroke:n=2,dots:i=8,filled:r=3,dotRadius:o=null,direction:l="clockwise",pixel:u=!1}={}){const c=e/2,d=t/2,h=Math.min(e,t)/2,f=Math.max(1,h-n/2),m=a("svg",{class:"sf-loader-svg",viewBox:`0 0 ${e} ${t}`,width:u?e:null,height:u?t:null,"aria-hidden":"true",focusable:"false"}),g={cx:c,cy:d,r:s(f),fill:"none",stroke:"currentColor","stroke-width":n},b=a("circle",{class:"sf-loader-ring-filled",...g,opacity:"0.3"}),p=a("circle",{class:"sf-loader-ring-accent",...g,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"0 100",transform:`rotate(90 ${c} ${d})`}),v=a("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${c} ${d})`});for(let e=0;e<10;e+=1){const t=9===e;v.append(a("circle",{class:"sf-loader-comet-segment"+(t?" sf-loader-comet-head":""),...g,"stroke-linecap":t?"round":"butt",pathLength:100,"stroke-dasharray":`${s(4)} ${s(96)}`,"stroke-dashoffset":s(-4*e),opacity:s(((e+1)/10)**1.6)}))}const y=Math.max(3,Math.min(32,Math.floor(Number(i)||8))),w=Math.max(1,Math.min(y,Math.floor(Number(r)||3))),S=Math.min(n,.7*Math.PI*(h-n)/y),$=null==o||""===o?S:Math.max(1,Math.min(Number(o)||S,h/4)),x=Math.max($,h-$),k=a("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${y}; --sf-loader-dot-filled:${w};`});for(let e=0;e<y;e+=1){const t=2*Math.PI/y*e-Math.PI/2,n="counterclockwise"===l?e:(y-e)%y;k.append(a("circle",{class:"sf-loader-dot"+(e<w?" sf-loader-dot--active":""),cx:s(c+x*Math.cos(t)),cy:s(d+x*Math.sin(t)),r:s($),fill:"currentColor",style:`--sf-loader-dot-index:${e}; --sf-loader-dot-step:${n};`}))}return m.append(b,p,v,k),m}({...e,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}function r({className:e="",overlay:t=!1}={}){const n=document.createElement("span");n.className=["sf-loader-container","sf-loader--infinite",e,e&&t?`${e}--overlay`:""].filter(Boolean).join(" "),n.dataset.sfSpinnerBound="1",n.dataset.infinite="true",n.setAttribute("aria-hidden","true");const a=document.createElement("span");return a.className="sf-loader--loading-indicator",a.append(i()),n.append(a),n}},"18333410c461"(e,t,n){n.a(e,async(e,t)=>{try{var a=n("fbe0570fcc69"),s=n("2c8db2795ace"),i=n("2feae72af89f"),r=n("67eed2647f47"),o=n("0d662e4d7d63"),l=e([a,s,i,o]);[a,s,i,o]=l.then?(await l)():l;var u=n.n(a);const c={en:{group:"Theme",system:"System",light:"Light",dark:"Dark"},ru:{group:"Тема",system:"Как в системе",light:"Светлая",dark:"Тёмная"}},d=["system","light","dark"],h={system:"brightness_auto",light:"light_mode",dark:"dark_mode"};function f(){const e=globalThis.SF?.Loader?.themePreference;return d.includes(e)?e:"system"}function m(e=[]){if(Array.isArray(e))return e;const t=String(e||"").trim();if(!t)return[];if(t.startsWith("["))try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch{return[]}return t.split("|").map(e=>{const[t,n,a=""]=e.split("::"),s=a.split(",").map(e=>e.trim()).filter(Boolean),i=s.find(e=>e.startsWith("icon="));return{value:t.trim(),label:(n||t).trim(),disabled:s.includes("disabled"),loading:s.includes("loading"),icon:i?i.slice(5):""}})}function g(e=[]){const t=new Set;return m(e).map((e,n)=>{const a="string"==typeof e?{value:e,label:e}:e;if(!a||"object"!=typeof a)return null;const s=String(a.value??a.id??n).trim();return!s||t.has(s)?null:(t.add(s),{id:String(a.id||s),value:s,label:String(a.label??a.text??s),icon:String(a.icon||""),ariaLabel:String(a.ariaLabel||a["aria-label"]||""),count:null===a.count||void 0===a.count?"":String(a.count).trim(),iconOnly:Boolean((a.iconOnly??a["icon-only"])&&a.icon),loading:Boolean(a.loading),disabled:Boolean(a.disabled||a.loading)})}).filter(Boolean)}class b extends(u()){static get props(){return{templateName:{attribute:"template",default:"default"},items:{type:Array,default:[],parser:m},value:{default:""},name:{default:""},themeSwitch:{attribute:"theme-switch",type:Boolean,default:!1},size:{default:"1",values:["1/3","1/2","1","2","3"]},spacing:{type:String,default:null},tightness:{default:"",values:["","low","high","highest"]},scheme:{default:"primary",values:["primary","secondary","on-surface"]},appearance:{default:"default",values:["default","segmented"]},plate:{default:"scheme",values:["scheme","raised"]},fullWidth:{attribute:"full-width",type:Boolean,default:!1},radius:{default:"",values:["","default","square","rounded"]},orientation:{default:"horizontal",values:["horizontal","vertical"]},disabled:{type:Boolean,default:!1},ariaLabel:{attribute:"aria-label",default:""},rootClass:{attribute:"root-class",default:""}}}constructor(){super(),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("sf-after-render",e=>{e.target!==this&&e.target.parentElement===this.querySelector(".sf-button-group")&&this.syncButtonSemantics()})}get themeSwitch(){return this.getBooleanAttr("theme-switch",!1)}get themeItems(){return d.map(e=>({value:e,label:(0,o.pageText)(c,e,this),icon:h[e],iconOnly:!0}))}get normalizedItems(){const e=g(this.themeSwitch?this.themeItems:this.getProp("items")),t=e.findIndex(e=>!e.disabled);return e.map((e,n)=>({...e,firstEnabled:n===t}))}get value(){return this.getAttribute("value")||""}set value(e){null!=e&&""!==e?this.setAttribute("value",String(e)):this.removeAttribute("value")}get disabled(){return this.getBooleanAttr("disabled",!1)}get name(){return this.getAttribute("name")||""}connectedCallback(){Object.prototype.hasOwnProperty.call(this,"_resetValue")||(this._resetValue=this.value),super.connectedCallback()}onConnected(){window.addEventListener("sf-theme-change",this.handleThemeChange),this.syncThemePreference()}onDisconnected(){window.removeEventListener("sf-theme-change",this.handleThemeChange),this._releaseReset?.(),this._releaseReset=null,this._resetInput=null,super.onDisconnected()}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),"theme-switch"===e&&t!==n&&this._isMounted&&this.syncThemePreference()}syncThemePreference(){if(!this.themeSwitch)return;const e=f();this.value!==e&&(this.value=e)}handleThemeChange=()=>this.syncThemePreference();templateContext(){return this.createTemplateContext({...this.getPropsContext(),ariaLabel:this.getAttribute("aria-label")||(this.themeSwitch?(0,o.pageText)(c,"group",this):""),...(0,i.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}),component:this,items:this.normalizedItems,value:this.value,disabled:this.disabled})}template(){return(0,s.a)(this.templateContext())}emitValueChange(e){this.emitComponentEvent("button-group-change",e),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{component:this,...e}}))}select(e){const t=String(e??""),n=this.normalizedItems.find(e=>e.value===t);if(!n||n.disabled||this.disabled||t===this.value)return this;const a=this.value;return this.themeSwitch&&!0!==globalThis.SF?.Loader?.setTheme?.(t)||(this.value=t,this.emitValueChange({previous:a,value:t,item:n})),this}afterRender(){this.syncButtonSemantics(),this.bindReset()}bindReset(){const e=this.querySelector(":scope > .sf-button-group-input");this._resetInput!==e&&(this._releaseReset?.(),this._resetInput=e,this._releaseReset=e?(0,r.z)(e,()=>{this.themeSwitch||(this.value=this._resetValue)}):null)}syncButtonSemantics(){const e=this.querySelector(".sf-button-group");if(!e)return;const t=this.normalizedItems,n=this.disabled?[]:t.filter(e=>!e.disabled),a=n.find(e=>e.value===this.value)||n[0];e.querySelectorAll(":scope > sf-button, :scope > button").forEach((e,n)=>{const s=e.matches("button")?e:e.querySelector("button"),i=t[n];if(!s||!i)return;const r=i.value===this.value;s.setAttribute("role","radio"),s.setAttribute("aria-checked",r?"true":"false"),s.tabIndex=i===a?0:-1})}clear(){if(!this.value||this.disabled||this.themeSwitch)return this;const e=this.value;return this.value="",this.emitValueChange({previous:e,value:"",item:null}),this}focus(e){const t=this.querySelector('button[role="radio"][tabindex="0"]:not(:disabled)');return t?.focus?.(e),this}handleClick=e=>{const t=e.target?.closest?.("[data-sf-button-group-value]");t&&this.contains(t)&&this.select(t.getAttribute("data-sf-button-group-value"))};handleKeyDown=e=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key))return;const t=this.normalizedItems.filter(e=>!e.disabled);if(!t.length||this.disabled)return;const n=Math.max(0,t.findIndex(e=>e.value===this.value)),a="Home"===e.key?0:"End"===e.key?t.length-1:["ArrowLeft","ArrowUp"].includes(e.key)?(n-1+t.length)%t.length:(n+1)%t.length;e.preventDefault();const s=this.value;this.select(t[a].value),this.value!==s&&this.addEventListener("sf-after-render",()=>this.focus(),{once:!0})}}b.define("sf-button-group"),t()}catch(p){t(p)}})},"2c8db2795ace"(e,t,n){n.a(e,async(e,a)=>{try{n.d(t,{a:()=>d});var s=n("ddf1cdb42ecc"),i=n("50d2a204ba4c"),r=e([s]),o=r.then?(await r)():r;s=o[0];function l(e,t){return t<=1?"":0===e?"start":e===t-1?"end":"middle"}function u(e,t,n){const a=e.value===n.value,i=n.disabled||e.disabled;return s.html`
1
+ (()=>{"use strict";var e={"67eed2647f47"(e,t,n){n.d(t,{z:()=>i});const a=new WeakMap,s=new WeakSet;function i(e,t){const n=e.ownerDocument;s.has(n)||(n.addEventListener("reset",e=>{const t=e.target;if("FORM"!==t?.tagName)return;const n=Array.from(t.elements);setTimeout(()=>{if(!e.defaultPrevented)for(const e of n)if(e.isConnected&&e.form===t)for(const t of a.get(e)||[])t()},0)},!0),s.add(n));let i=a.get(e);return i||a.set(e,i=new Set),i.add(t),()=>i.delete(t)}},"50d2a204ba4c"(e,t,n){n.d(t,{le:()=>r});function a(e,t={}){const n=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach(([e,t])=>{null!=t&&""!==t&&n.setAttribute(e,String(t))}),n}const s=e=>Math.round(1e3*e)/1e3;function i(e={}){return function({width:e=24,height:t=24,stroke:n=2,dots:i=8,filled:r=3,dotRadius:o=null,direction:l="clockwise",pixel:u=!1}={}){const c=e/2,d=t/2,h=Math.min(e,t)/2,f=Math.max(1,h-n/2),m=a("svg",{class:"sf-loader-svg",viewBox:`0 0 ${e} ${t}`,width:u?e:null,height:u?t:null,"aria-hidden":"true",focusable:"false"}),g={cx:c,cy:d,r:s(f),fill:"none",stroke:"currentColor","stroke-width":n},b=a("circle",{class:"sf-loader-ring-filled",...g,opacity:"0.3"}),p=a("circle",{class:"sf-loader-ring-accent",...g,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${c} ${d})`}),v=a("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${c} ${d})`});for(let e=0;e<10;e+=1){const t=9===e;v.append(a("circle",{class:"sf-loader-comet-segment"+(t?" sf-loader-comet-head":""),...g,"stroke-linecap":t?"round":"butt",pathLength:100,"stroke-dasharray":`${s(4)} ${s(96)}`,"stroke-dashoffset":s(-4*e),opacity:s(((e+1)/10)**1.6)}))}const y=Math.max(3,Math.min(32,Math.floor(Number(i)||8))),w=Math.max(1,Math.min(y,Math.floor(Number(r)||3))),S=Math.min(n,.7*Math.PI*(h-n)/y),$=null==o||""===o?S:Math.max(1,Math.min(Number(o)||S,h/4)),x=Math.max($,h-$),k=a("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${y}; --sf-loader-dot-filled:${w};`});for(let e=0;e<y;e+=1){const t=2*Math.PI/y*e-Math.PI/2,n="counterclockwise"===l?e:(y-e)%y;k.append(a("circle",{class:"sf-loader-dot"+(e<w?" sf-loader-dot--active":""),cx:s(c+x*Math.cos(t)),cy:s(d+x*Math.sin(t)),r:s($),fill:"currentColor",style:`--sf-loader-dot-index:${e}; --sf-loader-dot-step:${n};`}))}return m.append(b,p,v,k),m}({...e,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}function r({className:e="",overlay:t=!1}={}){const n=document.createElement("span");n.className=["sf-loader-container","sf-loader--infinite",e,e&&t?`${e}--overlay`:""].filter(Boolean).join(" "),n.dataset.sfSpinnerBound="1",n.dataset.infinite="true",n.setAttribute("aria-hidden","true");const a=document.createElement("span");return a.className="sf-loader--loading-indicator",a.append(i()),n.append(a),n}},"18333410c461"(e,t,n){n.a(e,async(e,t)=>{try{var a=n("fbe0570fcc69"),s=n("2c8db2795ace"),i=n("2feae72af89f"),r=n("67eed2647f47"),o=n("0d662e4d7d63"),l=e([a,s,i,o]);[a,s,i,o]=l.then?(await l)():l;var u=n.n(a);const c={en:{group:"Theme",system:"System",light:"Light",dark:"Dark"},ru:{group:"Тема",system:"Как в системе",light:"Светлая",dark:"Тёмная"}},d=["system","light","dark"],h={system:"brightness_auto",light:"light_mode",dark:"dark_mode"};function f(){const e=globalThis.SF?.Loader?.themePreference;return d.includes(e)?e:"system"}function m(e=[]){if(Array.isArray(e))return e;const t=String(e||"").trim();if(!t)return[];if(t.startsWith("["))try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch{return[]}return t.split("|").map(e=>{const[t,n,a=""]=e.split("::"),s=a.split(",").map(e=>e.trim()).filter(Boolean),i=s.find(e=>e.startsWith("icon="));return{value:t.trim(),label:(n||t).trim(),disabled:s.includes("disabled"),loading:s.includes("loading"),icon:i?i.slice(5):""}})}function g(e=[]){const t=new Set;return m(e).map((e,n)=>{const a="string"==typeof e?{value:e,label:e}:e;if(!a||"object"!=typeof a)return null;const s=String(a.value??a.id??n).trim();return!s||t.has(s)?null:(t.add(s),{id:String(a.id||s),value:s,label:String(a.label??a.text??s),icon:String(a.icon||""),ariaLabel:String(a.ariaLabel||a["aria-label"]||""),count:null===a.count||void 0===a.count?"":String(a.count).trim(),iconOnly:Boolean((a.iconOnly??a["icon-only"])&&a.icon),loading:Boolean(a.loading),disabled:Boolean(a.disabled||a.loading)})}).filter(Boolean)}class b extends(u()){static get props(){return{templateName:{attribute:"template",default:"default"},items:{type:Array,default:[],parser:m},value:{default:""},name:{default:""},themeSwitch:{attribute:"theme-switch",type:Boolean,default:!1},size:{default:"1",values:["1/3","1/2","1","2","3"]},spacing:{type:String,default:null},tightness:{default:"",values:["","low","high","highest"]},scheme:{default:"primary",values:["primary","secondary","on-surface"]},appearance:{default:"default",values:["default","segmented"]},plate:{default:"scheme",values:["scheme","raised"]},fullWidth:{attribute:"full-width",type:Boolean,default:!1},radius:{default:"",values:["","default","square","rounded"]},orientation:{default:"horizontal",values:["horizontal","vertical"]},disabled:{type:Boolean,default:!1},ariaLabel:{attribute:"aria-label",default:""},rootClass:{attribute:"root-class",default:""}}}constructor(){super(),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("sf-after-render",e=>{e.target!==this&&e.target.parentElement===this.querySelector(".sf-button-group")&&this.syncButtonSemantics()})}get themeSwitch(){return this.getBooleanAttr("theme-switch",!1)}get themeItems(){return d.map(e=>({value:e,label:(0,o.pageText)(c,e,this),icon:h[e],iconOnly:!0}))}get normalizedItems(){const e=g(this.themeSwitch?this.themeItems:this.getProp("items")),t=e.findIndex(e=>!e.disabled);return e.map((e,n)=>({...e,firstEnabled:n===t}))}get value(){return this.getAttribute("value")||""}set value(e){null!=e&&""!==e?this.setAttribute("value",String(e)):this.removeAttribute("value")}get disabled(){return this.getBooleanAttr("disabled",!1)}get name(){return this.getAttribute("name")||""}connectedCallback(){Object.prototype.hasOwnProperty.call(this,"_resetValue")||(this._resetValue=this.value),super.connectedCallback()}onConnected(){window.addEventListener("sf-theme-change",this.handleThemeChange),this.syncThemePreference()}onDisconnected(){window.removeEventListener("sf-theme-change",this.handleThemeChange),this._releaseReset?.(),this._releaseReset=null,this._resetInput=null,super.onDisconnected()}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),"theme-switch"===e&&t!==n&&this._isMounted&&this.syncThemePreference()}syncThemePreference(){if(!this.themeSwitch)return;const e=f();this.value!==e&&(this.value=e)}handleThemeChange=()=>this.syncThemePreference();templateContext(){return this.createTemplateContext({...this.getPropsContext(),ariaLabel:this.getAttribute("aria-label")||(this.themeSwitch?(0,o.pageText)(c,"group",this):""),...(0,i.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}),component:this,items:this.normalizedItems,value:this.value,disabled:this.disabled})}template(){return(0,s.a)(this.templateContext())}emitValueChange(e){this.emitComponentEvent("button-group-change",e),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{component:this,...e}}))}select(e){const t=String(e??""),n=this.normalizedItems.find(e=>e.value===t);if(!n||n.disabled||this.disabled||t===this.value)return this;const a=this.value;return this.themeSwitch&&!0!==globalThis.SF?.Loader?.setTheme?.(t)||(this.value=t,this.emitValueChange({previous:a,value:t,item:n})),this}afterRender(){this.syncButtonSemantics(),this.bindReset()}bindReset(){const e=this.querySelector(":scope > .sf-button-group-input");this._resetInput!==e&&(this._releaseReset?.(),this._resetInput=e,this._releaseReset=e?(0,r.z)(e,()=>{this.themeSwitch||(this.value=this._resetValue)}):null)}syncButtonSemantics(){const e=this.querySelector(".sf-button-group");if(!e)return;const t=this.normalizedItems,n=this.disabled?[]:t.filter(e=>!e.disabled),a=n.find(e=>e.value===this.value)||n[0];e.querySelectorAll(":scope > sf-button, :scope > button").forEach((e,n)=>{const s=e.matches("button")?e:e.querySelector("button"),i=t[n];if(!s||!i)return;const r=i.value===this.value;s.setAttribute("role","radio"),s.setAttribute("aria-checked",r?"true":"false"),s.tabIndex=i===a?0:-1})}clear(){if(!this.value||this.disabled||this.themeSwitch)return this;const e=this.value;return this.value="",this.emitValueChange({previous:e,value:"",item:null}),this}focus(e){const t=this.querySelector('button[role="radio"][tabindex="0"]:not(:disabled)');return t?.focus?.(e),this}handleClick=e=>{const t=e.target?.closest?.("[data-sf-button-group-value]");t&&this.contains(t)&&this.select(t.getAttribute("data-sf-button-group-value"))};handleKeyDown=e=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key))return;const t=this.normalizedItems.filter(e=>!e.disabled);if(!t.length||this.disabled)return;const n=Math.max(0,t.findIndex(e=>e.value===this.value)),a="Home"===e.key?0:"End"===e.key?t.length-1:["ArrowLeft","ArrowUp"].includes(e.key)?(n-1+t.length)%t.length:(n+1)%t.length;e.preventDefault();const s=this.value;this.select(t[a].value),this.value!==s&&this.addEventListener("sf-after-render",()=>this.focus(),{once:!0})}}b.define("sf-button-group"),t()}catch(p){t(p)}})},"2c8db2795ace"(e,t,n){n.a(e,async(e,a)=>{try{n.d(t,{a:()=>d});var s=n("ddf1cdb42ecc"),i=n("50d2a204ba4c"),r=e([s]),o=r.then?(await r)():r;s=o[0];function l(e,t){return t<=1?"":0===e?"start":e===t-1?"end":"middle"}function u(e,t,n){const a=e.value===n.value,i=n.disabled||e.disabled;return s.html`
2
2
  <sf-button
3
3
  text=${e.label}
4
4
  icon=${e.icon||s.nothing}
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var t={"50d2a204ba4c"(t,e,n){n.d(e,{le:()=>a});function i(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&n.setAttribute(t,String(e))}),n}const o=t=>Math.round(1e3*t)/1e3;function s(t={}){return function({width:t=24,height:e=24,stroke:n=2,dots:s=8,filled:a=3,dotRadius:r=null,direction:l="clockwise",pixel:c=!1}={}){const u=t/2,d=e/2,h=Math.min(t,e)/2,f=Math.max(1,h-n/2),g=i("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:c?t:null,height:c?e:null,"aria-hidden":"true",focusable:"false"}),p={cx:u,cy:d,r:o(f),fill:"none",stroke:"currentColor","stroke-width":n},b=i("circle",{class:"sf-loader-ring-filled",...p,opacity:"0.3"}),m=i("circle",{class:"sf-loader-ring-accent",...p,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"0 100",transform:`rotate(90 ${u} ${d})`}),y=i("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${u} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;y.append(i("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...p,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${o(4)} ${o(96)}`,"stroke-dashoffset":o(-4*t),opacity:o(((t+1)/10)**1.6)}))}const S=Math.max(3,Math.min(32,Math.floor(Number(s)||8))),v=Math.max(1,Math.min(S,Math.floor(Number(a)||3))),A=Math.min(n,.7*Math.PI*(h-n)/S),x=null==r||""===r?A:Math.max(1,Math.min(Number(r)||A,h/4)),w=Math.max(x,h-x),$=i("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${S}; --sf-loader-dot-filled:${v};`});for(let t=0;t<S;t+=1){const e=2*Math.PI/S*t-Math.PI/2,n="counterclockwise"===l?t:(S-t)%S;$.append(i("circle",{class:"sf-loader-dot"+(t<v?" sf-loader-dot--active":""),cx:o(u+w*Math.cos(e)),cy:o(d+w*Math.sin(e)),r:o(x),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${n};`}))}return g.append(b,m,y,$),g}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}function a({className:t="",overlay:e=!1}={}){const n=document.createElement("span");n.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),n.dataset.sfSpinnerBound="1",n.dataset.infinite="true",n.setAttribute("aria-hidden","true");const i=document.createElement("span");return i.className="sf-loader--loading-indicator",i.append(s()),n.append(i),n}},"06e8cd089f28"(t,e,n){function i(){const t=globalThis.SF=globalThis.SF||{};return t.__deprecationNotes instanceof Map||Object.defineProperty(t,"__deprecationNotes",{value:new Map,configurable:!0}),t.__deprecationNotes}function o({component:t="",kind:e="attribute",attribute:n="",from:o,to:s=null}={}){if(!o)return;const a=[t,e,n,o].join("|"),r=i(),l=r.get(a);if(l)l.count+=1;else if(r.set(a,{component:t,kind:e,attribute:n,from:o,to:s,count:1}),function(){const t=globalThis.document?.documentElement;return"warn"===t?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const i=t?`${t}: `:"",a="value"===e?`${n}="${o}"`:`${e} ${o}`;globalThis.console?.warn?.(`[SIMAI Framework] ${i}${a} is a legacy name${s?`; write ${s}`:""}. See contracts/changes/journal.json.`)}}if(n.d(e,{YB:()=>o}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const t=globalThis.SF.deprecations||{};t.list=function(){return[...i().values()].map(t=>({...t}))},t.clear=function(){i().clear()},t.note=o,globalThis.SF.deprecations=t}},c76f8895b630(t,e,n){n.a(t,async(t,e)=>{try{var i=n("fbe0570fcc69"),o=n("5168bdf4a1f9"),s=n("ddf1cdb42ecc"),a=n("2feae72af89f"),r=n("06e8cd089f28"),l=t([i,o,s,a]);[i,o,s,a]=l.then?(await l)():l;var c=n.n(i);const u=new Set(["template","size","appearance","type","scheme","status","text","icon","icon-start","icon-end","icon-left","icon-right","icon-position","text-position","spacing","tightness","radius","root-class","loading","segment","disabled","native-type","aria-label","class","style","id","slot"]);function d(t,e){t?.forwardHostAttributes(e,{exclude:u,transferDataAttributes:!0,storageKey:"__sfButtonForwardedDataAttributes",targetStorageKey:"__sfButtonAttributeKeys"})}const h=["default","tonal","outline","link","surface"],f={ghost:"link"},g={danger:"error",critical:"error"};class p extends(c()){constructor(){super(),this._attributeObserver=null}static get props(){return{templateName:{attribute:"template",default:"default"},size:{default:"1"},appearance:{default:"default",aliases:["type"]},scheme:{default:"primary"},status:{default:"",values:["","error"]},textPosition:{type:String,default:"center"},text:{default:""},segment:{default:""},icon:{default:""},iconStart:{type:String,default:null},iconEnd:{type:String,default:null},iconLeft:{default:""},iconRight:{default:""},iconPosition:{default:"start"},spacing:{type:String,default:null},tightness:{default:"",values:["","low","high","highest"]},radius:{default:"",values:["","default","square","rounded"]},rootClass:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},nativeType:{default:"button"},ariaLabel:{default:""}}}get templateName(){return this.getAttribute("template")||"default"}get size(){return this.getAttribute("size")||"1"}get appearance(){const t=this.getAttribute("appearance")||this.getAttribute("type")||"default";return Object.hasOwn(f,t)?((0,r.YB)({component:this.localName,kind:"value",attribute:"appearance",from:t,to:f[t]}),f[t]):h.includes(t)?t:"default"}get type(){return this.appearance}get scheme(){return this.getAttribute("scheme")||"primary"}get status(){const t=this.getAttribute("status")||"";return g[t]?((0,r.YB)({component:this.localName,kind:"value",attribute:"status",from:t,to:g[t]}),g[t]):t}get text(){return this.getAttribute("text")||""}get icon(){return this.getAttribute("icon")||""}get iconLeft(){return this.hasAttribute("icon-left")&&(0,r.YB)({component:this.localName,kind:"attribute",from:"icon-left",to:"icon-start"}),this.getAttribute("icon-start")??this.getAttribute("icon-left")}get iconRight(){return this.hasAttribute("icon-right")&&(0,r.YB)({component:this.localName,kind:"attribute",from:"icon-right",to:"icon-end"}),this.getAttribute("icon-end")??this.getAttribute("icon-right")}get iconStart(){return this.iconLeft}get iconEnd(){return this.iconRight}get iconPosition(){return this.getAttribute("icon-position")||"start"}noteLegacyNames(){return this.hasAttribute("tightness")&&(0,r.YB)({component:this.localName,kind:"attribute",from:"tightness",to:"spacing"}),{}}get tightness(){return(0,a.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).tightness}get spacing(){return(0,a.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).spacing}get radius(){return this.getEnumAttr("radius",["default","square","rounded"],"")}get rootClass(){return this.getAttribute("root-class")||""}get loading(){return this.getBooleanAttr("loading",!1)}get disabled(){return this.getBooleanAttr("disabled",!1)}get nativeType(){return this.getAttribute("native-type")||"button"}get ariaLabel(){return this.getAttribute("aria-label")||""}templateContext(){const t=this.getPropsContext();return this.createTemplateContext({...t,iconLeft:t.iconStart??t.iconLeft,iconRight:t.iconEnd??t.iconRight,iconStart:this.iconStart,iconEnd:this.iconEnd,type:this.type,appearance:"ghost"===t.appearance?"link":t.appearance,status:this.status,...(0,a.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}),...this.noteLegacyNames?.(),component:this})}template(){return(0,o.B)(this.templateContext())}resolveUpdateMode(){return"lit"}afterRender(){d(this,this.querySelector(".sf-button")),this._attributeObserver||(this._attributeObserver=this.observeForwardedHostAttributes(()=>this.querySelector(".sf-button"),{exclude:u,transferDataAttributes:!0,storageKey:"__sfButtonForwardedDataAttributes",targetStorageKey:"__sfButtonAttributeKeys"})._forwardHostAttributeObserver)}get value(){return{template:this.templateName,size:this.size,appearance:this.appearance,type:this.type,scheme:this.scheme,status:this.status,text:this.text,icon:this.icon,iconLeft:this.iconLeft,iconRight:this.iconRight,iconStart:this.iconStart,iconEnd:this.iconEnd,iconPosition:this.iconPosition,tightness:this.tightness,spacing:this.spacing,radius:this.radius,rootClass:this.rootClass,loading:this.loading,disabled:this.disabled,nativeType:this.nativeType,ariaLabel:this.ariaLabel}}onClick(t,e){return"function"==typeof t&&this.addEventListener("click",t,e),this}onFocus(t,e){return"function"==typeof t&&this.addEventListener("focusin",t,e),this}onBlur(t,e){return"function"==typeof t&&this.addEventListener("focusout",t,e),this}onMouseEnter(t,e){return"function"==typeof t&&this.addEventListener("mouseenter",t,e),this}onMouseLeave(t,e){return"function"==typeof t&&this.addEventListener("mouseleave",t,e),this}setDisabled(t=!0){return t?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this}createIcon(t){return t?s.html`<sf-icon icon="${t}" root-class="pointer-event-none" weight="400" aria-hidden="true"></sf-icon>`:""}set value(t){this.setValueAttributes(t)}onDisconnected(){this.disconnectForwardedHostAttributes(),this._attributeObserver=null,super.onDisconnected?.()}}p.define("sf-button"),e()}catch(b){e(b)}})},"5168bdf4a1f9"(t,e,n){n.a(t,async(t,i)=>{try{n.d(e,{B:()=>l});var o=n("ddf1cdb42ecc"),s=n("50d2a204ba4c"),a=t([o]),r=a.then?(await a)():a;o=r[0];function l(t){const{size:e,appearance:n,type:i,scheme:a,status:r,text:l,icon:c,iconLeft:u,iconRight:d,iconPosition:h,spacing:f,radius:g,rootClass:p,textPosition:b,loading:m,disabled:y,nativeType:S,ariaLabel:v,segment:A}=t,x=String(h||"start").toLowerCase(),w=["right","end"].includes(x),$=t.iconStart??(u||(c&&!w?c:"")),_=t.iconEnd??(d||(c&&w?c:"")),M=t.component,T=M?.hasSlotContent?.("icon-start")?M.getSlotContent("icon-start"):M?.hasSlotContent?.("icon-left")?M.getSlotContent("icon-left"):M.createIcon($),k=M?.hasSlotContent?.("icon-end")?M.getSlotContent("icon-end"):M?.hasSlotContent?.("icon-right")?M.getSlotContent("icon-right"):M.createIcon(_),L=M?.hasSlotContent?.("text")?M.getSlotContent("text"):l,C=!T&&!k;let E=T,F=k,B="";if(m){const t=t=>(0,s.le)({className:"sf-button-spinner",overlay:t});T?E=t(!1):k?F=t(!1):B=t(!0)}const N=["sf-button",`sf-button--size-${e}`,`sf-button--${n||i}`,`sf-button--${r||a}`,"flex","items-cross-center",A?`segment-${A}`:"",f&&"normal"!==f?`spacing-${f}`:"",g?`radius-${g}`:"",p,m?"loading sf-button-state-loading":""].filter(Boolean);return o.html`
1
+ (()=>{"use strict";var t={"50d2a204ba4c"(t,e,n){n.d(e,{le:()=>a});function i(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&n.setAttribute(t,String(e))}),n}const o=t=>Math.round(1e3*t)/1e3;function s(t={}){return function({width:t=24,height:e=24,stroke:n=2,dots:s=8,filled:a=3,dotRadius:r=null,direction:l="clockwise",pixel:c=!1}={}){const u=t/2,d=e/2,h=Math.min(t,e)/2,f=Math.max(1,h-n/2),g=i("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:c?t:null,height:c?e:null,"aria-hidden":"true",focusable:"false"}),p={cx:u,cy:d,r:o(f),fill:"none",stroke:"currentColor","stroke-width":n},b=i("circle",{class:"sf-loader-ring-filled",...p,opacity:"0.3"}),m=i("circle",{class:"sf-loader-ring-accent",...p,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${u} ${d})`}),y=i("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${u} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;y.append(i("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...p,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${o(4)} ${o(96)}`,"stroke-dashoffset":o(-4*t),opacity:o(((t+1)/10)**1.6)}))}const S=Math.max(3,Math.min(32,Math.floor(Number(s)||8))),v=Math.max(1,Math.min(S,Math.floor(Number(a)||3))),A=Math.min(n,.7*Math.PI*(h-n)/S),x=null==r||""===r?A:Math.max(1,Math.min(Number(r)||A,h/4)),w=Math.max(x,h-x),$=i("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${S}; --sf-loader-dot-filled:${v};`});for(let t=0;t<S;t+=1){const e=2*Math.PI/S*t-Math.PI/2,n="counterclockwise"===l?t:(S-t)%S;$.append(i("circle",{class:"sf-loader-dot"+(t<v?" sf-loader-dot--active":""),cx:o(u+w*Math.cos(e)),cy:o(d+w*Math.sin(e)),r:o(x),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${n};`}))}return g.append(b,m,y,$),g}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}function a({className:t="",overlay:e=!1}={}){const n=document.createElement("span");n.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),n.dataset.sfSpinnerBound="1",n.dataset.infinite="true",n.setAttribute("aria-hidden","true");const i=document.createElement("span");return i.className="sf-loader--loading-indicator",i.append(s()),n.append(i),n}},"06e8cd089f28"(t,e,n){function i(){const t=globalThis.SF=globalThis.SF||{};return t.__deprecationNotes instanceof Map||Object.defineProperty(t,"__deprecationNotes",{value:new Map,configurable:!0}),t.__deprecationNotes}function o({component:t="",kind:e="attribute",attribute:n="",from:o,to:s=null}={}){if(!o)return;const a=[t,e,n,o].join("|"),r=i(),l=r.get(a);if(l)l.count+=1;else if(r.set(a,{component:t,kind:e,attribute:n,from:o,to:s,count:1}),function(){const t=globalThis.document?.documentElement;return"warn"===t?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const i=t?`${t}: `:"",a="value"===e?`${n}="${o}"`:`${e} ${o}`;globalThis.console?.warn?.(`[SIMAI Framework] ${i}${a} is a legacy name${s?`; write ${s}`:""}. See contracts/changes/journal.json.`)}}if(n.d(e,{YB:()=>o}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const t=globalThis.SF.deprecations||{};t.list=function(){return[...i().values()].map(t=>({...t}))},t.clear=function(){i().clear()},t.note=o,globalThis.SF.deprecations=t}},c76f8895b630(t,e,n){n.a(t,async(t,e)=>{try{var i=n("fbe0570fcc69"),o=n("5168bdf4a1f9"),s=n("ddf1cdb42ecc"),a=n("2feae72af89f"),r=n("06e8cd089f28"),l=t([i,o,s,a]);[i,o,s,a]=l.then?(await l)():l;var c=n.n(i);const u=new Set(["template","size","appearance","type","scheme","status","text","icon","icon-start","icon-end","icon-left","icon-right","icon-position","text-position","spacing","tightness","radius","root-class","loading","segment","disabled","native-type","aria-label","class","style","id","slot"]);function d(t,e){t?.forwardHostAttributes(e,{exclude:u,transferDataAttributes:!0,storageKey:"__sfButtonForwardedDataAttributes",targetStorageKey:"__sfButtonAttributeKeys"})}const h=["default","tonal","outline","link","surface"],f={ghost:"link"},g={danger:"error",critical:"error"};class p extends(c()){constructor(){super(),this._attributeObserver=null}static get props(){return{templateName:{attribute:"template",default:"default"},size:{default:"1"},appearance:{default:"default",aliases:["type"]},scheme:{default:"primary"},status:{default:"",values:["","error"]},textPosition:{type:String,default:"center"},text:{default:""},segment:{default:""},icon:{default:""},iconStart:{type:String,default:null},iconEnd:{type:String,default:null},iconLeft:{default:""},iconRight:{default:""},iconPosition:{default:"start"},spacing:{type:String,default:null},tightness:{default:"",values:["","low","high","highest"]},radius:{default:"",values:["","default","square","rounded"]},rootClass:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},nativeType:{default:"button"},ariaLabel:{default:""}}}get templateName(){return this.getAttribute("template")||"default"}get size(){return this.getAttribute("size")||"1"}get appearance(){const t=this.getAttribute("appearance")||this.getAttribute("type")||"default";return Object.hasOwn(f,t)?((0,r.YB)({component:this.localName,kind:"value",attribute:"appearance",from:t,to:f[t]}),f[t]):h.includes(t)?t:"default"}get type(){return this.appearance}get scheme(){return this.getAttribute("scheme")||"primary"}get status(){const t=this.getAttribute("status")||"";return g[t]?((0,r.YB)({component:this.localName,kind:"value",attribute:"status",from:t,to:g[t]}),g[t]):t}get text(){return this.getAttribute("text")||""}get icon(){return this.getAttribute("icon")||""}get iconLeft(){return this.hasAttribute("icon-left")&&(0,r.YB)({component:this.localName,kind:"attribute",from:"icon-left",to:"icon-start"}),this.getAttribute("icon-start")??this.getAttribute("icon-left")}get iconRight(){return this.hasAttribute("icon-right")&&(0,r.YB)({component:this.localName,kind:"attribute",from:"icon-right",to:"icon-end"}),this.getAttribute("icon-end")??this.getAttribute("icon-right")}get iconStart(){return this.iconLeft}get iconEnd(){return this.iconRight}get iconPosition(){return this.getAttribute("icon-position")||"start"}noteLegacyNames(){return this.hasAttribute("tightness")&&(0,r.YB)({component:this.localName,kind:"attribute",from:"tightness",to:"spacing"}),{}}get tightness(){return(0,a.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).tightness}get spacing(){return(0,a.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).spacing}get radius(){return this.getEnumAttr("radius",["default","square","rounded"],"")}get rootClass(){return this.getAttribute("root-class")||""}get loading(){return this.getBooleanAttr("loading",!1)}get disabled(){return this.getBooleanAttr("disabled",!1)}get nativeType(){return this.getAttribute("native-type")||"button"}get ariaLabel(){return this.getAttribute("aria-label")||""}templateContext(){const t=this.getPropsContext();return this.createTemplateContext({...t,iconLeft:t.iconStart??t.iconLeft,iconRight:t.iconEnd??t.iconRight,iconStart:this.iconStart,iconEnd:this.iconEnd,type:this.type,appearance:"ghost"===t.appearance?"link":t.appearance,status:this.status,...(0,a.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}),...this.noteLegacyNames?.(),component:this})}template(){return(0,o.B)(this.templateContext())}resolveUpdateMode(){return"lit"}afterRender(){d(this,this.querySelector(".sf-button")),this._attributeObserver||(this._attributeObserver=this.observeForwardedHostAttributes(()=>this.querySelector(".sf-button"),{exclude:u,transferDataAttributes:!0,storageKey:"__sfButtonForwardedDataAttributes",targetStorageKey:"__sfButtonAttributeKeys"})._forwardHostAttributeObserver)}get value(){return{template:this.templateName,size:this.size,appearance:this.appearance,type:this.type,scheme:this.scheme,status:this.status,text:this.text,icon:this.icon,iconLeft:this.iconLeft,iconRight:this.iconRight,iconStart:this.iconStart,iconEnd:this.iconEnd,iconPosition:this.iconPosition,tightness:this.tightness,spacing:this.spacing,radius:this.radius,rootClass:this.rootClass,loading:this.loading,disabled:this.disabled,nativeType:this.nativeType,ariaLabel:this.ariaLabel}}onClick(t,e){return"function"==typeof t&&this.addEventListener("click",t,e),this}onFocus(t,e){return"function"==typeof t&&this.addEventListener("focusin",t,e),this}onBlur(t,e){return"function"==typeof t&&this.addEventListener("focusout",t,e),this}onMouseEnter(t,e){return"function"==typeof t&&this.addEventListener("mouseenter",t,e),this}onMouseLeave(t,e){return"function"==typeof t&&this.addEventListener("mouseleave",t,e),this}setDisabled(t=!0){return t?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this}createIcon(t){return t?s.html`<sf-icon icon="${t}" root-class="pointer-event-none" weight="400" aria-hidden="true"></sf-icon>`:""}set value(t){this.setValueAttributes(t)}onDisconnected(){this.disconnectForwardedHostAttributes(),this._attributeObserver=null,super.onDisconnected?.()}}p.define("sf-button"),e()}catch(b){e(b)}})},"5168bdf4a1f9"(t,e,n){n.a(t,async(t,i)=>{try{n.d(e,{B:()=>l});var o=n("ddf1cdb42ecc"),s=n("50d2a204ba4c"),a=t([o]),r=a.then?(await a)():a;o=r[0];function l(t){const{size:e,appearance:n,type:i,scheme:a,status:r,text:l,icon:c,iconLeft:u,iconRight:d,iconPosition:h,spacing:f,radius:g,rootClass:p,textPosition:b,loading:m,disabled:y,nativeType:S,ariaLabel:v,segment:A}=t,x=String(h||"start").toLowerCase(),w=["right","end"].includes(x),$=t.iconStart??(u||(c&&!w?c:"")),_=t.iconEnd??(d||(c&&w?c:"")),M=t.component,T=M?.hasSlotContent?.("icon-start")?M.getSlotContent("icon-start"):M?.hasSlotContent?.("icon-left")?M.getSlotContent("icon-left"):M.createIcon($),k=M?.hasSlotContent?.("icon-end")?M.getSlotContent("icon-end"):M?.hasSlotContent?.("icon-right")?M.getSlotContent("icon-right"):M.createIcon(_),L=M?.hasSlotContent?.("text")?M.getSlotContent("text"):l,C=!T&&!k;let E=T,F=k,B="";if(m){const t=t=>(0,s.le)({className:"sf-button-spinner",overlay:t});T?E=t(!1):k?F=t(!1):B=t(!0)}const N=["sf-button",`sf-button--size-${e}`,`sf-button--${n||i}`,`sf-button--${r||a}`,"flex","items-cross-center",A?`segment-${A}`:"",f&&"normal"!==f?`spacing-${f}`:"",g?`radius-${g}`:"",p,m?"loading sf-button-state-loading":""].filter(Boolean);return o.html`
2
2
  <button
3
3
  type=${S}
4
4
  class=${N.join(" ")}
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var t={"50d2a204ba4c"(t,e,s){s.d(e,{le:()=>i});function a(t,e={}){const s=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&s.setAttribute(t,String(e))}),s}const n=t=>Math.round(1e3*t)/1e3;function r(t={}){return function({width:t=24,height:e=24,stroke:s=2,dots:r=8,filled:i=3,dotRadius:o=null,direction:l="clockwise",pixel:u=!1}={}){const c=t/2,d=e/2,h=Math.min(t,e)/2,f=Math.max(1,h-s/2),g=a("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:u?t:null,height:u?e:null,"aria-hidden":"true",focusable:"false"}),p={cx:c,cy:d,r:n(f),fill:"none",stroke:"currentColor","stroke-width":s},b=a("circle",{class:"sf-loader-ring-filled",...p,opacity:"0.3"}),m=a("circle",{class:"sf-loader-ring-accent",...p,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"0 100",transform:`rotate(90 ${c} ${d})`}),y=a("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${c} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;y.append(a("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...p,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${n(4)} ${n(96)}`,"stroke-dashoffset":n(-4*t),opacity:n(((t+1)/10)**1.6)}))}const v=Math.max(3,Math.min(32,Math.floor(Number(r)||8))),A=Math.max(1,Math.min(v,Math.floor(Number(i)||3))),w=Math.min(s,.7*Math.PI*(h-s)/v),S=null==o||""===o?w:Math.max(1,Math.min(Number(o)||w,h/4)),x=Math.max(S,h-S),M=a("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${v}; --sf-loader-dot-filled:${A};`});for(let t=0;t<v;t+=1){const e=2*Math.PI/v*t-Math.PI/2,s="counterclockwise"===l?t:(v-t)%v;M.append(a("circle",{class:"sf-loader-dot"+(t<A?" sf-loader-dot--active":""),cx:n(c+x*Math.cos(e)),cy:n(d+x*Math.sin(e)),r:n(S),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${s};`}))}return g.append(b,m,y,M),g}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}function i({className:t="",overlay:e=!1}={}){const s=document.createElement("span");s.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),s.dataset.sfSpinnerBound="1",s.dataset.infinite="true",s.setAttribute("aria-hidden","true");const a=document.createElement("span");return a.className="sf-loader--loading-indicator",a.append(r()),s.append(a),s}},"2557e7cf84cc"(t,e,s){s.a(t,async(t,e)=>{try{var a=s("fbe0570fcc69"),n=s("7a7da66f4cf1"),r=s("2feae72af89f"),i=t([a,n,r]);[a,n,r]=i.then?(await i)():i;var o=s.n(a);const l=new Set(["template","kind","variant","size","appearance","type","scheme","status","icon","filled","spacing","tightness","radius","segment","root-class","loading","disabled","native-type","aria-label","class","style","id","slot"]);function u(t,e){t?.forwardHostAttributes(e,{exclude:l,transferDataAttributes:!0,storageKey:"__sfIconButtonForwardedDataAttributes",targetStorageKey:"__sfIconButtonAttributeKeys"})}const c=["default","tonal","outline","link","surface","ghost"];class d extends(o()){constructor(){super(),this._attributeObserver=null}static get props(){return{templateName:{attribute:"template",default:"default"},kind:{default:"icon",values:["icon","close"],aliases:["variant"]},size:{default:"1"},appearance:{default:"default",aliases:["type"]},scheme:{default:"primary"},status:{default:"",values:["","error"]},segment:{default:""},icon:{default:"add"},filled:{type:Boolean,default:!1},spacing:{type:String,default:null},tightness:{default:"",values:["","low","high","highest"]},radius:{default:"",values:["","default","square","rounded"]},rootClass:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},nativeType:{default:"button"},ariaLabel:{default:""}}}get templateName(){return this.getAttribute("template")||"default"}get size(){return this.getAttribute("size")||"1"}get kind(){return this.getProp("kind")}get variant(){return this.kind}get appearance(){const t=this.getAttribute("appearance")||this.getAttribute("type")||"default";return c.includes(t)?t:"default"}get type(){return this.appearance}get scheme(){return this.getAttribute("scheme")||"primary"}get status(){return this.getAttribute("status")||""}get icon(){return this.getAttribute("icon")||"add"}get segment(){return this.getEnumAttr("segment",["start","middle","end"],"")}get filled(){return this.getBooleanAttr("filled",!1)}get tightness(){return(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).tightness}get spacing(){return(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).spacing}get radius(){return this.getEnumAttr("radius",["default","square","rounded"],"")}get rootClass(){return this.getAttribute("root-class")||""}get loading(){return this.getBooleanAttr("loading",!1)}get disabled(){return this.getBooleanAttr("disabled",!1)}get nativeType(){return this.getAttribute("native-type")||"button"}get ariaLabel(){return this.getAttribute("aria-label")||""}templateContext(){const t=this.getPropsContext();return this.createTemplateContext({...t,type:this.type,variant:this.variant,...(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}),component:this})}template(){return(0,n.y)(this.templateContext())}resolveUpdateMode(t=[]){const e=["disabled","aria-label","icon"];return t.length>0&&t.every(t=>e.includes(t))?"dom":"lit"}updateDom(t=[]){const e=this.querySelector(".sf-icon-button");if(!e)return!1;if(t.includes("disabled")&&(e.disabled=this.disabled||this.loading),t.includes("aria-label")&&(this.ariaLabel?e.setAttribute("aria-label",this.ariaLabel):e.removeAttribute("aria-label")),t.includes("icon")){const t=e.querySelector(".sf-icon");t&&(t.textContent=this.icon)}return u(this,e),!0}afterRender(){u(this,this.querySelector(".sf-icon-button")),this._attributeObserver||(this._attributeObserver=this.observeForwardedHostAttributes(()=>this.querySelector(".sf-icon-button"),{exclude:l,transferDataAttributes:!0,storageKey:"__sfIconButtonForwardedDataAttributes",targetStorageKey:"__sfIconButtonAttributeKeys"})._forwardHostAttributeObserver)}get value(){return{template:this.templateName,size:this.size,variant:this.variant,appearance:this.appearance,type:this.type,scheme:this.scheme,status:this.status,icon:this.icon,segment:this.segment,filled:this.filled,tightness:this.tightness,spacing:this.spacing,radius:this.radius,rootClass:this.rootClass,loading:this.loading,disabled:this.disabled,nativeType:this.nativeType,ariaLabel:this.ariaLabel}}setButtonAttributes(t={}){return this.setState({buttonAttributes:t}),this}onClick(t,e){return"function"==typeof t&&this.addEventListener("click",t,e),this}onFocus(t,e){return"function"==typeof t&&this.addEventListener("focusin",t,e),this}onBlur(t,e){return"function"==typeof t&&this.addEventListener("focusout",t,e),this}onMouseEnter(t,e){return"function"==typeof t&&this.addEventListener("mouseenter",t,e),this}onMouseLeave(t,e){return"function"==typeof t&&this.addEventListener("mouseleave",t,e),this}setDisabled(t=!0){return t?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this}set value(t){this.setValueAttributes(t)}onDisconnected(){this.disconnectForwardedHostAttributes(),this._attributeObserver=null,super.onDisconnected?.()}}d.define("sf-icon-button"),e()}catch(h){e(h)}})},"7a7da66f4cf1"(t,e,s){s.a(t,async(t,a)=>{try{s.d(e,{y:()=>u});var n=s("ddf1cdb42ecc"),r=s("50d2a204ba4c"),i=t([n]),o=i.then?(await i)():i;n=o[0];const l=new Set(["1/3","1/2","1","2","3"]);function u(t){const{size:e,appearance:s,type:a,scheme:i,status:o,icon:u,segment:c,tightness:d,kind:h,variant:f,radius:g,filled:p,rootClass:b,loading:m,disabled:y,nativeType:v,ariaLabel:A}=t,w=["sf-icon-button",l.has(e||"1")?`sf-icon-button--size-${e||"1"}`:"",`sf-icon-button--${h??f??"icon"}`,`sf-icon-button--${s||a||"default"}`,"flex","items-cross-center",c?`segment-${c}`:"",`sf-icon-button--${o||i||"primary"}`,d?`tightness-${d}`:"",g?`radius-${g}`:"",b,m?"loading sf-icon-button-state-loading":""].filter(Boolean),S=m?(0,r.le)({className:"sf-icon-button-spinner"}):t.component?.hasSlotContent?.("icon")?t.component.getSlotContent("icon"):"close"===(h??f)?n.html`
1
+ (()=>{"use strict";var t={"50d2a204ba4c"(t,e,s){s.d(e,{le:()=>i});function a(t,e={}){const s=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&s.setAttribute(t,String(e))}),s}const n=t=>Math.round(1e3*t)/1e3;function r(t={}){return function({width:t=24,height:e=24,stroke:s=2,dots:r=8,filled:i=3,dotRadius:o=null,direction:l="clockwise",pixel:u=!1}={}){const c=t/2,d=e/2,h=Math.min(t,e)/2,f=Math.max(1,h-s/2),g=a("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:u?t:null,height:u?e:null,"aria-hidden":"true",focusable:"false"}),p={cx:c,cy:d,r:n(f),fill:"none",stroke:"currentColor","stroke-width":s},b=a("circle",{class:"sf-loader-ring-filled",...p,opacity:"0.3"}),m=a("circle",{class:"sf-loader-ring-accent",...p,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${c} ${d})`}),y=a("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${c} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;y.append(a("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...p,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${n(4)} ${n(96)}`,"stroke-dashoffset":n(-4*t),opacity:n(((t+1)/10)**1.6)}))}const v=Math.max(3,Math.min(32,Math.floor(Number(r)||8))),A=Math.max(1,Math.min(v,Math.floor(Number(i)||3))),w=Math.min(s,.7*Math.PI*(h-s)/v),S=null==o||""===o?w:Math.max(1,Math.min(Number(o)||w,h/4)),x=Math.max(S,h-S),M=a("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${v}; --sf-loader-dot-filled:${A};`});for(let t=0;t<v;t+=1){const e=2*Math.PI/v*t-Math.PI/2,s="counterclockwise"===l?t:(v-t)%v;M.append(a("circle",{class:"sf-loader-dot"+(t<A?" sf-loader-dot--active":""),cx:n(c+x*Math.cos(e)),cy:n(d+x*Math.sin(e)),r:n(S),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${s};`}))}return g.append(b,m,y,M),g}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}function i({className:t="",overlay:e=!1}={}){const s=document.createElement("span");s.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),s.dataset.sfSpinnerBound="1",s.dataset.infinite="true",s.setAttribute("aria-hidden","true");const a=document.createElement("span");return a.className="sf-loader--loading-indicator",a.append(r()),s.append(a),s}},"2557e7cf84cc"(t,e,s){s.a(t,async(t,e)=>{try{var a=s("fbe0570fcc69"),n=s("7a7da66f4cf1"),r=s("2feae72af89f"),i=t([a,n,r]);[a,n,r]=i.then?(await i)():i;var o=s.n(a);const l=new Set(["template","kind","variant","size","appearance","type","scheme","status","icon","filled","spacing","tightness","radius","segment","root-class","loading","disabled","native-type","aria-label","class","style","id","slot"]);function u(t,e){t?.forwardHostAttributes(e,{exclude:l,transferDataAttributes:!0,storageKey:"__sfIconButtonForwardedDataAttributes",targetStorageKey:"__sfIconButtonAttributeKeys"})}const c=["default","tonal","outline","link","surface","ghost"];class d extends(o()){constructor(){super(),this._attributeObserver=null}static get props(){return{templateName:{attribute:"template",default:"default"},kind:{default:"icon",values:["icon","close"],aliases:["variant"]},size:{default:"1"},appearance:{default:"default",aliases:["type"]},scheme:{default:"primary"},status:{default:"",values:["","error"]},segment:{default:""},icon:{default:"add"},filled:{type:Boolean,default:!1},spacing:{type:String,default:null},tightness:{default:"",values:["","low","high","highest"]},radius:{default:"",values:["","default","square","rounded"]},rootClass:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},nativeType:{default:"button"},ariaLabel:{default:""}}}get templateName(){return this.getAttribute("template")||"default"}get size(){return this.getAttribute("size")||"1"}get kind(){return this.getProp("kind")}get variant(){return this.kind}get appearance(){const t=this.getAttribute("appearance")||this.getAttribute("type")||"default";return c.includes(t)?t:"default"}get type(){return this.appearance}get scheme(){return this.getAttribute("scheme")||"primary"}get status(){return this.getAttribute("status")||""}get icon(){return this.getAttribute("icon")||"add"}get segment(){return this.getEnumAttr("segment",["start","middle","end"],"")}get filled(){return this.getBooleanAttr("filled",!1)}get tightness(){return(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).tightness}get spacing(){return(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).spacing}get radius(){return this.getEnumAttr("radius",["default","square","rounded"],"")}get rootClass(){return this.getAttribute("root-class")||""}get loading(){return this.getBooleanAttr("loading",!1)}get disabled(){return this.getBooleanAttr("disabled",!1)}get nativeType(){return this.getAttribute("native-type")||"button"}get ariaLabel(){return this.getAttribute("aria-label")||""}templateContext(){const t=this.getPropsContext();return this.createTemplateContext({...t,type:this.type,variant:this.variant,...(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}),component:this})}template(){return(0,n.y)(this.templateContext())}resolveUpdateMode(t=[]){const e=["disabled","aria-label","icon"];return t.length>0&&t.every(t=>e.includes(t))?"dom":"lit"}updateDom(t=[]){const e=this.querySelector(".sf-icon-button");if(!e)return!1;if(t.includes("disabled")&&(e.disabled=this.disabled||this.loading),t.includes("aria-label")&&(this.ariaLabel?e.setAttribute("aria-label",this.ariaLabel):e.removeAttribute("aria-label")),t.includes("icon")){const t=e.querySelector(".sf-icon");t&&(t.textContent=this.icon)}return u(this,e),!0}afterRender(){u(this,this.querySelector(".sf-icon-button")),this._attributeObserver||(this._attributeObserver=this.observeForwardedHostAttributes(()=>this.querySelector(".sf-icon-button"),{exclude:l,transferDataAttributes:!0,storageKey:"__sfIconButtonForwardedDataAttributes",targetStorageKey:"__sfIconButtonAttributeKeys"})._forwardHostAttributeObserver)}get value(){return{template:this.templateName,size:this.size,variant:this.variant,appearance:this.appearance,type:this.type,scheme:this.scheme,status:this.status,icon:this.icon,segment:this.segment,filled:this.filled,tightness:this.tightness,spacing:this.spacing,radius:this.radius,rootClass:this.rootClass,loading:this.loading,disabled:this.disabled,nativeType:this.nativeType,ariaLabel:this.ariaLabel}}setButtonAttributes(t={}){return this.setState({buttonAttributes:t}),this}onClick(t,e){return"function"==typeof t&&this.addEventListener("click",t,e),this}onFocus(t,e){return"function"==typeof t&&this.addEventListener("focusin",t,e),this}onBlur(t,e){return"function"==typeof t&&this.addEventListener("focusout",t,e),this}onMouseEnter(t,e){return"function"==typeof t&&this.addEventListener("mouseenter",t,e),this}onMouseLeave(t,e){return"function"==typeof t&&this.addEventListener("mouseleave",t,e),this}setDisabled(t=!0){return t?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this}set value(t){this.setValueAttributes(t)}onDisconnected(){this.disconnectForwardedHostAttributes(),this._attributeObserver=null,super.onDisconnected?.()}}d.define("sf-icon-button"),e()}catch(h){e(h)}})},"7a7da66f4cf1"(t,e,s){s.a(t,async(t,a)=>{try{s.d(e,{y:()=>u});var n=s("ddf1cdb42ecc"),r=s("50d2a204ba4c"),i=t([n]),o=i.then?(await i)():i;n=o[0];const l=new Set(["1/3","1/2","1","2","3"]);function u(t){const{size:e,appearance:s,type:a,scheme:i,status:o,icon:u,segment:c,tightness:d,kind:h,variant:f,radius:g,filled:p,rootClass:b,loading:m,disabled:y,nativeType:v,ariaLabel:A}=t,w=["sf-icon-button",l.has(e||"1")?`sf-icon-button--size-${e||"1"}`:"",`sf-icon-button--${h??f??"icon"}`,`sf-icon-button--${s||a||"default"}`,"flex","items-cross-center",c?`segment-${c}`:"",`sf-icon-button--${o||i||"primary"}`,d?`tightness-${d}`:"",g?`radius-${g}`:"",b,m?"loading sf-icon-button-state-loading":""].filter(Boolean),S=m?(0,r.le)({className:"sf-icon-button-spinner"}):t.component?.hasSlotContent?.("icon")?t.component.getSlotContent("icon"):"close"===(h??f)?n.html`
2
2
  <sf-close root-class="pointer-event-none" size="${e||"1"}"></sf-close>`:n.html`
3
3
  <sf-icon filled="${p}" root-class="pointer-event-none" icon="${u}" weight="400" aria-hidden="true"></sf-icon>`;return n.html`
4
4
  <button
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var e={"3f3a6e2680d5"(e,t,o){function i(e,t=!1){if(!e)return()=>{};const o=new Set,i=()=>{for(const t of e.children)t.hasAttribute("inert")||(t.setAttribute("inert",""),o.add(t))};t&&e.focus({preventScroll:!0}),i();const s=new e.ownerDocument.defaultView.MutationObserver(i);return s.observe(e,{childList:!0}),()=>{s.disconnect();for(const e of o)""===e.getAttribute("inert")&&e.removeAttribute("inert");o.clear()}}o.d(t,{e:()=>i})},c8d66dd2c299(e,t,o){o.d(t,{Zg:()=>l,ro:()=>n});const i=["a[href]","area[href]","button","input","select","textarea","iframe","summary","audio[controls]","video[controls]","[contenteditable]","[tabindex]"].join(","),s=Symbol.for("simai.modal.focus-guards");function n(e){const t=e?.getModalRoot?.()||e?.template,o=t?.querySelector?.("[data-sf-modal-panel]"),i=document[s];if(i&&i.panel===o&&i.before.isConnected&&i.after.isConnected)return;if(i?.before.remove(),i?.after.remove(),delete document[s],!o?.parentNode)return;const n={panel:o,relaying:!1};for(const e of["before","after"]){const i=o.ownerDocument.createElement("span");i.tabIndex=0,i.className="sf-modal-focus-guard",i.setAttribute("aria-hidden","true"),i.addEventListener("focus",()=>{if(n.relaying||!o.isConnected||t.inert||"true"===t.getAttribute("aria-hidden"))return;const i="before"===e,s=r(o,i),a=i?s.at(-1):s[0];a&&"IFRAME"!==a.tagName?a.focus({preventScroll:!0}):o.focus({preventScroll:!0})}),n[e]=i}o.before(n.before),o.after(n.after),document[s]=n}function a(e,t){return"INPUT"===e?.tagName&&"INPUT"===t?.tagName&&"radio"===e.type&&"radio"===t.type&&!!e.name&&e.name===t.name&&e.form===t.form&&e.getRootNode()===t.getRootNode()}function r(e,t=!1){const o=e.ownerDocument.defaultView,s=Array.from(e.querySelectorAll(i)).filter(e=>e.tabIndex>=0&&!e.matches(":disabled")&&!e.closest("[inert]")&&e.getClientRects().length>0&&"visible"===o.getComputedStyle(e).visibility).sort((e,t)=>(e.tabIndex||1/0)-(t.tabIndex||1/0));return s.filter(e=>{if(!a(e,e))return!0;const o=s.filter(t=>a(e,t)),i=o.find(e=>e.checked);return e===(i||o.at(t?-1:0))})}function l(e,t){if(!e)return;const o=r(e,t.shiftKey),i=e.ownerDocument.activeElement;if(!o.length)return t.preventDefault(),void e.focus();const n=o[0],l=o[o.length-1],d=t.shiftKey?n:l;if(!e.contains(i)||i===e||i===d||a(i,d)){const o=t.shiftKey?l:n,i=e.ownerDocument[s];if("IFRAME"===o.tagName&&i?.panel===e){i.relaying=!0;try{(t.shiftKey?i.after:i.before).focus({preventScroll:!0})}finally{i.relaying=!1}return}t.preventDefault(),o.focus()}}},"201fd0b17b8b"(e,t,o){o.d(t,{Gp:()=>s,ju:()=>n});const i=e=>{const t=Number.parseFloat(e);return Number.isFinite(t)?t*(e.trim().endsWith("ms")?1:1e3):0};function s(e,t=window){let o=!1,i=null,s=null;const n=()=>{o||(o=!0,null!==i&&(t.cancelAnimationFrame(i),i=null),null!==s&&(t.clearTimeout(s),s=null),e())};return i=t.requestAnimationFrame(n),s=t.setTimeout(n,50),"function"==typeof t.queueMicrotask&&t.queueMicrotask(n),()=>{o=!0,null!==i&&t.cancelAnimationFrame(i),null!==s&&t.clearTimeout(s)}}function n(e,t,o=window){let n=null,a=!1;const r=s(()=>{if(a)return;const s=e(),r=s?.querySelectorAll("[data-sf-modal-panel], [data-sf-modal-overlay]")||[],l=Math.max(0,...Array.from(r,e=>{const t=o.getComputedStyle(e);return"none"===t.display?0:function(e){const t=e.transitionProperty.split(",").map(e=>e.trim()),o=e.transitionDuration.split(",").map(i),s=e.transitionDelay.split(",").map(i);return Math.max(0,...t.map((e,t)=>["all","opacity","transform","-webkit-transform"].includes(e)?Math.max(0,o[t%o.length])+s[t%s.length]:0))}(t)}));n=o.setTimeout(()=>{a||t()},l)},o);return()=>{a=!0,r(),null!==n&&o.clearTimeout(n)}}},ed3ae3576d0a(e,t,o){function i(e=!0){const t=document.documentElement,o=document.body;if(!t||!o)return null;const i=Math.max(0,window.innerWidth-t.clientWidth),s=parseFloat(window.getComputedStyle(o).paddingInlineEnd)||0,n={docEl:t,body:o,htmlLocked:t.classList.contains("overflow-hidden"),bodyLocked:o.classList.contains("overflow-hidden"),bodyPaddingInlineEnd:o.style.getPropertyValue("padding-inline-end"),paddingPriority:o.style.getPropertyPriority("padding-inline-end"),appliedPadding:null};return t.classList.add("overflow-hidden"),o.classList.add("overflow-hidden"),e&&i>0&&(o.style.setProperty("padding-inline-end",`${s+i}px`,n.paddingPriority),n.appliedPadding=o.style.getPropertyValue("padding-inline-end")),n}function s(e){if(!e)return;const{docEl:t,body:o}=e;e.htmlLocked||t.classList.remove("overflow-hidden"),e.bodyLocked||o.classList.remove("overflow-hidden"),null!==e.appliedPadding&&o.style.getPropertyValue("padding-inline-end")===e.appliedPadding&&o.style.getPropertyPriority("padding-inline-end")===e.paddingPriority&&(e.bodyPaddingInlineEnd?o.style.setProperty("padding-inline-end",e.bodyPaddingInlineEnd,e.paddingPriority):o.style.removeProperty("padding-inline-end"))}o.d(t,{i:()=>i,l:()=>s})},"93025a68d8ab"(e,t,o){o.d(t,{BK:()=>p,M$:()=>m,Rm:()=>u,ZT:()=>c,fI:()=>r,k8:()=>h,oN:()=>a,rI:()=>l});var i=o("c8d66dd2c299");const s=Symbol.for("simai.modal.document-stack");function n(){return document[s]||Object.defineProperty(document,s,{value:{items:[],lockOwner:null},configurable:!0}),document[s]}function a(){return n().items.at(-1)||null}function r(e){return n().items.indexOf(e)}function l(){n().items.forEach((e,t)=>e.applyStackPosition(t)),(0,i.ro)(a())}const d=e=>!e.inContainer;function h(e,t){const o=n();o.items.includes(e)||(d(e)&&!o.lockOwner&&(o.lockOwner=t,t.lockPage(e.preserveScrollGap)),o.items.push(e),l())}function c(e){const t=n(),o=t.items.indexOf(e);o<0||(t.items.splice(o,1),t.lockOwner&&!t.items.some(d)&&(t.lockOwner.unlockPage(),t.lockOwner=null),l())}function u(e){const t=n(),o=t.items.indexOf(e);o<0||(t.items.splice(o,1),t.items.push(e),l())}function m(e){const t=[];for(let o=e?.parentElement;o;o=o.parentElement)o.matches('main, section, article, [role="main"], [role="region"]')&&t.push(o);return t}function f(e,t=!1){if(!e?.isConnected||"function"!=typeof e.focus||e.matches(":disabled")||e.closest('[inert], [hidden], [aria-hidden="true"]')||!e.getClientRects().length||"visible"!==e.ownerDocument.defaultView.getComputedStyle(e).visibility)return!1;const o=t&&!e.hasAttribute("tabindex");let i;const s=()=>{i?.disconnect(),e.removeEventListener("blur",s),o&&"-1"===e.getAttribute("tabindex")&&e.removeAttribute("tabindex")};o&&(e.setAttribute("tabindex","-1"),e.addEventListener("blur",s,{once:!0}),i=new e.ownerDocument.defaultView.MutationObserver(()=>{e.isConnected||s()}),i.observe(e.ownerDocument.documentElement,{childList:!0,subtree:!0}));let n=!1;try{return e.focus({preventScroll:!0}),n=e.ownerDocument.activeElement===e,n}catch{return!1}finally{o&&!n&&s()}}function p(e,t,o=[]){if(!e)return;const i=a(),s=i?.getModalRoot?.()||i?.template;if((!i||s?.contains(t))&&f(t))return;if(i)return void i.focusFirst();const n=new Set([...o,...document.querySelectorAll('main, [role="main"]'),document.body]);for(const e of n)if(f(e,!0))return}},"50d2a204ba4c"(e,t,o){o.d(t,{le:()=>a});function i(e,t={}){const o=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach(([e,t])=>{null!=t&&""!==t&&o.setAttribute(e,String(t))}),o}const s=e=>Math.round(1e3*e)/1e3;function n(e={}){return function({width:e=24,height:t=24,stroke:o=2,dots:n=8,filled:a=3,dotRadius:r=null,direction:l="clockwise",pixel:d=!1}={}){const h=e/2,c=t/2,u=Math.min(e,t)/2,m=Math.max(1,u-o/2),f=i("svg",{class:"sf-loader-svg",viewBox:`0 0 ${e} ${t}`,width:d?e:null,height:d?t:null,"aria-hidden":"true",focusable:"false"}),p={cx:h,cy:c,r:s(m),fill:"none",stroke:"currentColor","stroke-width":o},g=i("circle",{class:"sf-loader-ring-filled",...p,opacity:"0.3"}),b=i("circle",{class:"sf-loader-ring-accent",...p,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"0 100",transform:`rotate(90 ${h} ${c})`}),y=i("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${h} ${c})`});for(let e=0;e<10;e+=1){const t=9===e;y.append(i("circle",{class:"sf-loader-comet-segment"+(t?" sf-loader-comet-head":""),...p,"stroke-linecap":t?"round":"butt",pathLength:100,"stroke-dasharray":`${s(4)} ${s(96)}`,"stroke-dashoffset":s(-4*e),opacity:s(((e+1)/10)**1.6)}))}const v=Math.max(3,Math.min(32,Math.floor(Number(n)||8))),C=Math.max(1,Math.min(v,Math.floor(Number(a)||3))),_=Math.min(o,.7*Math.PI*(u-o)/v),w=null==r||""===r?_:Math.max(1,Math.min(Number(r)||_,u/4)),S=Math.max(w,u-w),A=i("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${v}; --sf-loader-dot-filled:${C};`});for(let e=0;e<v;e+=1){const t=2*Math.PI/v*e-Math.PI/2,o="counterclockwise"===l?e:(v-e)%v;A.append(i("circle",{class:"sf-loader-dot"+(e<C?" sf-loader-dot--active":""),cx:s(h+S*Math.cos(t)),cy:s(c+S*Math.sin(t)),r:s(w),fill:"currentColor",style:`--sf-loader-dot-index:${e}; --sf-loader-dot-step:${o};`}))}return f.append(g,b,y,A),f}({...e,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}function a({className:e="",overlay:t=!1}={}){const o=document.createElement("span");o.className=["sf-loader-container","sf-loader--infinite",e,e&&t?`${e}--overlay`:""].filter(Boolean).join(" "),o.dataset.sfSpinnerBound="1",o.dataset.infinite="true",o.setAttribute("aria-hidden","true");const i=document.createElement("span");return i.className="sf-loader--loading-indicator",i.append(n()),o.append(i),o}},f98b7a216869(e,t,o){o.a(e,async(e,t)=>{try{var i=o("ddf1cdb42ecc"),s=o("7b69af8ef2e5"),n=o("fbe0570fcc69"),a=o("0d662e4d7d63"),r=o("e45eac6c719d"),l=o("c8d66dd2c299"),d=o("3f3a6e2680d5"),h=o("201fd0b17b8b"),c=o("ed3ae3576d0a"),u=o("50d2a204ba4c"),m=o("93025a68d8ab"),f=e([i,s,n,a,r]);[i,s,n,a,r]=f.then?(await f)():f;var p=o.n(n);const g="[data-sf-overlay-container], [data-sf-drawer-container]",b={en:{close:"Close",minimize:"Minimize",title:"Dialog"},ru:{close:"Закрыть",minimize:"Свернуть",title:"Окно"}};let y=0;function v(e){return["none","small","medium","large"].includes(String(e||"").trim().toLowerCase())}class C extends(p()){static registry=new Map;static globalBound=!1;static stack=[];static openCount=0;static lockState=null;static baseZIndex=9e3;static defaultTrueAttributes=new Set(["overlay","show-close","show-footer","close-on-esc","close-on-overlay","preserve-scroll-gap","preload"]);static getTopModal(){return(0,m.oN)()}static isTopModal(e){return C.getTopModal()===e}static getStackIndex(e){return(0,m.fI)(e)}static addToStack(e){e&&"inline"!==e.display&&(C.stack=C.stack.filter(t=>t!==e),C.stack.push(e),C.openCount=C.stack.length,e.hiddenState||(0,m.k8)(e,C))}static removeFromStack(e){e&&"inline"!==e.display&&(C.stack=C.stack.filter(t=>t!==e),C.openCount=C.stack.length,(0,m.ZT)(e))}static bringToFront(e){e&&"inline"!==e.display&&C.stack.includes(e)&&(C.stack=C.stack.filter(t=>t!==e),C.stack.push(e),(0,m.Rm)(e))}static updateStackStyles(){(0,m.rI)()}static get props(){return{templateName:{attribute:"template",default:"default"},modalId:{default:""},title:{default:""},ariaLabel:{attribute:"aria-label",default:""},text:{default:""},open:{type:Boolean,default:!1},autoload:{type:Boolean,default:!1},unclose:{type:Boolean,default:!1},hide:{type:Boolean,default:!1},hideModifier:{default:""},minimized:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},closeOnOverlay:{type:Boolean,default:!0},preserveScrollGap:{type:Boolean,default:!0},position:{default:"center",values:["center","left","right","inline-start","inline-end","top","bottom"]},mode:{default:"inline",values:["inline","ajax","iframe"]},display:{default:"modal",values:["modal","inline"]},src:{default:""},rootClass:{default:""},preload:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},width:{default:""},height:{default:""},blur:{default:""},blurType:{default:"medium",values:["none","small","medium","large"]},overlayPreset:{default:"default",values:["default","focus"]},overlayClass:{default:""},closeClass:{default:""},surfaceClass:{default:""},surfacePadding:{default:""},panelClass:{default:""},headerClass:{default:""},bodyClass:{default:""},contentClass:{default:""},footerClass:{default:""}}}constructor(){super(),this._modalId="",this._syncingOpenAttribute=!1,this._portalRoot=null,this._renderTarget=null,this._hostClearedForPortal=!1,this._slotEventHandlers=new Map,this._slotEventId=0,this._readyDetail=null,this._hasEmittedReady=!1,this._hasAutoloaded=!1,this._isOpen=!1,this._isHidden=!1,this._modalState="closed",this._animatePanel=!1,this._stackIndex=-1,this._closeTimer=null,this._closeTransitionAbort=null,this._lastActive=null,this._fetchController=null,this._remoteHtml="",this._remoteError="",this._isLoadingRemote=!1,this._remoteLoaded=!1,this.onKeyDown=this.onKeyDown.bind(this),this.handleOverlayClick=this.handleOverlayClick.bind(this),this.handleCloseClick=this.handleCloseClick.bind(this),this.handleHideClick=this.handleHideClick.bind(this)}connectedCallback(){this._modalId||(this._modalId=this.getAttribute("modal-id")||this.id||"sf-modal-"+ ++y),super.connectedCallback(),C.registry.set(this.modalId,this),C.bindGlobalEvents()}captureSlotTemplates(){const e=!this._slotTemplatesCaptured;if(super.captureSlotTemplates(),!e)return;const t=Array.from(this.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE?"template"!==e.tagName.toLowerCase():e.nodeType===Node.TEXT_NODE&&""!==e.textContent.trim());t.length&&(this._liveSlotNodes.has("content")||this._liveSlotNodes.set("content",[]),this._liveSlotNodes.get("content").push(...t),t.forEach(e=>e.remove()))}disconnectedCallback(){this.teardownModal(),C.registry.delete(this.modalId),super.disconnectedCallback()}get templateName(){return this.getAttribute("template")||"default"}get modalId(){return this.getAttribute("modal-id")||this._modalId||this.id||""}get title(){return this.getAttribute("title")||(0,a.pageText)(b,"title",this)}get ariaLabel(){return this.getAttribute("aria-label")||""}get text(){return this.getAttribute("text")||""}get openState(){return this._isOpen||this.hasAttribute("open")||"inline"===this.display&&!this._inlineClosed}get autoload(){return this.getBooleanAttr("autoload",!1)}get unclose(){return this.getBooleanAttr("unclose",!1)}get hideButton(){return this.getBooleanAttr("hide",!1)}get hideModifier(){return this.getAttribute("hide-modifier")||""}get hiddenState(){return"inline"!==this.display&&(this._isHidden||this.hasAttribute("minimized"))}get overlay(){return this.getBooleanAttr("overlay",!0)}get closeOnEsc(){return this.getBooleanAttr("close-on-esc",!0)}get showClose(){return this.getBooleanAttr("show-close",!0)&&!this.unclose}get showHeader(){return this.getBooleanAttr("show-header",!0)}get showFooter(){return this.getBooleanAttr("show-footer",!0)}get closeOnOverlay(){return this.getBooleanAttr("close-on-overlay",!0)}get preserveScrollGap(){return this.getBooleanAttr("preserve-scroll-gap",!0)}get position(){return this.getEnumAttr("position",["center","left","right","inline-start","inline-end","top","bottom"],"center")}get mode(){return this.getEnumAttr("mode",["inline","ajax","iframe"],"inline")}get display(){return this.getEnumAttr("display",["modal","inline"],"modal")}get src(){return this.getAttribute("src")||""}get preload(){return this.getBooleanAttr("preload",!0)}get fullscreen(){return this.getBooleanAttr("fullscreen",!1)}get width(){return this.getAttribute("width")||""}get height(){return this.getAttribute("height")||""}get blur(){return v(this.getAttribute("blur"))||this.getBooleanAttr("blur",!1)}get blurType(){const e=this.getAttribute("blur"),t=this.getAttribute("blur-type")||(v(e)?e:"medium");return this.normalizeEnum(t,["none","small","medium","large"],"medium")}get hasCustomBlurType(){return this.hasAttribute("blur-type")||v(this.getAttribute("blur"))}get overlayPreset(){return this.normalizeEnum(this.getAttribute("overlay-preset")||"default",["default","focus"],"default")}get headerClass(){return this.getAttribute("header-class")||""}get overlayClass(){return this.getAttribute("overlay-class")||""}get closeClass(){return this.getAttribute("close-class")||""}get surfaceClass(){return this.getAttribute("surface-class")||""}get surfacePadding(){return this.getAttribute("surface-padding")||""}get panelClass(){return this.getAttribute("panel-class")||""}get bodyClass(){return this.getAttribute("body-class")||""}get contentClass(){return this.getAttribute("content-class")||""}get footerClass(){return this.getAttribute("footer-class")||""}get modalRoot(){return this._renderTarget?.querySelector?.(".sf-modal")||null}get state(){return{modalId:this.modalId,title:this.title,ariaLabel:this.ariaLabel,text:this.text,open:this.openState,autoload:this.autoload,unclose:this.unclose,hide:this.hideButton,hideModifier:this.hideModifier,minimized:this.hiddenState,overlay:this.overlay,showHeader:this.showHeader,showClose:this.showClose,showFooter:this.showFooter,closeOnEsc:this.closeOnEsc,closeOnOverlay:this.closeOnOverlay,preserveScrollGap:this.preserveScrollGap,position:this.position,mode:this.mode,display:this.display,src:this.src,preload:this.preload,fullscreen:this.fullscreen,width:this.width,height:this.height,blur:this.blur,blurType:this.blurType,overlayPreset:this.overlayPreset,overlayClass:this.overlayClass,closeClass:this.closeClass,surfaceClass:this.surfaceClass,surfacePadding:this.surfacePadding,panelClass:this.panelClass,headerClass:this.headerClass,bodyClass:this.bodyClass,contentClass:this.contentClass,footerClass:this.footerClass,lifecycle:this.renderModalState,remote:{error:this._remoteError,status:this._isLoadingRemote?"loading":this._remoteError?"error":this._remoteLoaded?"success":"idle"},stackIndex:this._stackIndex}}get renderOpenState(){return this.openState||"closing"===this._modalState}get renderModalState(){return"inline"===this.display?this.openState?"open":"closed":this.renderOpenState&&"closed"===this._modalState?"open":this._modalState}get modalZIndex(){return"inline"===this.display||this._stackIndex<0?"":C.baseZIndex+2*this._stackIndex}get remoteContent(){return"iframe"===this.mode&&this.src?i.html`
1
+ (()=>{"use strict";var e={"3f3a6e2680d5"(e,t,o){function i(e,t=!1){if(!e)return()=>{};const o=new Set,i=()=>{for(const t of e.children)t.hasAttribute("inert")||(t.setAttribute("inert",""),o.add(t))};t&&e.focus({preventScroll:!0}),i();const s=new e.ownerDocument.defaultView.MutationObserver(i);return s.observe(e,{childList:!0}),()=>{s.disconnect();for(const e of o)""===e.getAttribute("inert")&&e.removeAttribute("inert");o.clear()}}o.d(t,{e:()=>i})},c8d66dd2c299(e,t,o){o.d(t,{Zg:()=>l,ro:()=>n});const i=["a[href]","area[href]","button","input","select","textarea","iframe","summary","audio[controls]","video[controls]","[contenteditable]","[tabindex]"].join(","),s=Symbol.for("simai.modal.focus-guards");function n(e){const t=e?.getModalRoot?.()||e?.template,o=t?.querySelector?.("[data-sf-modal-panel]"),i=document[s];if(i&&i.panel===o&&i.before.isConnected&&i.after.isConnected)return;if(i?.before.remove(),i?.after.remove(),delete document[s],!o?.parentNode)return;const n={panel:o,relaying:!1};for(const e of["before","after"]){const i=o.ownerDocument.createElement("span");i.tabIndex=0,i.className="sf-modal-focus-guard",i.setAttribute("aria-hidden","true"),i.addEventListener("focus",()=>{if(n.relaying||!o.isConnected||t.inert||"true"===t.getAttribute("aria-hidden"))return;const i="before"===e,s=r(o,i),a=i?s.at(-1):s[0];a&&"IFRAME"!==a.tagName?a.focus({preventScroll:!0}):o.focus({preventScroll:!0})}),n[e]=i}o.before(n.before),o.after(n.after),document[s]=n}function a(e,t){return"INPUT"===e?.tagName&&"INPUT"===t?.tagName&&"radio"===e.type&&"radio"===t.type&&!!e.name&&e.name===t.name&&e.form===t.form&&e.getRootNode()===t.getRootNode()}function r(e,t=!1){const o=e.ownerDocument.defaultView,s=Array.from(e.querySelectorAll(i)).filter(e=>e.tabIndex>=0&&!e.matches(":disabled")&&!e.closest("[inert]")&&e.getClientRects().length>0&&"visible"===o.getComputedStyle(e).visibility).sort((e,t)=>(e.tabIndex||1/0)-(t.tabIndex||1/0));return s.filter(e=>{if(!a(e,e))return!0;const o=s.filter(t=>a(e,t)),i=o.find(e=>e.checked);return e===(i||o.at(t?-1:0))})}function l(e,t){if(!e)return;const o=r(e,t.shiftKey),i=e.ownerDocument.activeElement;if(!o.length)return t.preventDefault(),void e.focus();const n=o[0],l=o[o.length-1],d=t.shiftKey?n:l;if(!e.contains(i)||i===e||i===d||a(i,d)){const o=t.shiftKey?l:n,i=e.ownerDocument[s];if("IFRAME"===o.tagName&&i?.panel===e){i.relaying=!0;try{(t.shiftKey?i.after:i.before).focus({preventScroll:!0})}finally{i.relaying=!1}return}t.preventDefault(),o.focus()}}},"201fd0b17b8b"(e,t,o){o.d(t,{Gp:()=>s,ju:()=>n});const i=e=>{const t=Number.parseFloat(e);return Number.isFinite(t)?t*(e.trim().endsWith("ms")?1:1e3):0};function s(e,t=window){let o=!1,i=null,s=null;const n=()=>{o||(o=!0,null!==i&&(t.cancelAnimationFrame(i),i=null),null!==s&&(t.clearTimeout(s),s=null),e())};return i=t.requestAnimationFrame(n),s=t.setTimeout(n,50),"function"==typeof t.queueMicrotask&&t.queueMicrotask(n),()=>{o=!0,null!==i&&t.cancelAnimationFrame(i),null!==s&&t.clearTimeout(s)}}function n(e,t,o=window){let n=null,a=!1;const r=s(()=>{if(a)return;const s=e(),r=s?.querySelectorAll("[data-sf-modal-panel], [data-sf-modal-overlay]")||[],l=Math.max(0,...Array.from(r,e=>{const t=o.getComputedStyle(e);return"none"===t.display?0:function(e){const t=e.transitionProperty.split(",").map(e=>e.trim()),o=e.transitionDuration.split(",").map(i),s=e.transitionDelay.split(",").map(i);return Math.max(0,...t.map((e,t)=>["all","opacity","transform","-webkit-transform"].includes(e)?Math.max(0,o[t%o.length])+s[t%s.length]:0))}(t)}));n=o.setTimeout(()=>{a||t()},l)},o);return()=>{a=!0,r(),null!==n&&o.clearTimeout(n)}}},ed3ae3576d0a(e,t,o){function i(e=!0){const t=document.documentElement,o=document.body;if(!t||!o)return null;const i=Math.max(0,window.innerWidth-t.clientWidth),s=parseFloat(window.getComputedStyle(o).paddingInlineEnd)||0,n={docEl:t,body:o,htmlLocked:t.classList.contains("overflow-hidden"),bodyLocked:o.classList.contains("overflow-hidden"),bodyPaddingInlineEnd:o.style.getPropertyValue("padding-inline-end"),paddingPriority:o.style.getPropertyPriority("padding-inline-end"),appliedPadding:null};return t.classList.add("overflow-hidden"),o.classList.add("overflow-hidden"),e&&i>0&&(o.style.setProperty("padding-inline-end",`${s+i}px`,n.paddingPriority),n.appliedPadding=o.style.getPropertyValue("padding-inline-end")),n}function s(e){if(!e)return;const{docEl:t,body:o}=e;e.htmlLocked||t.classList.remove("overflow-hidden"),e.bodyLocked||o.classList.remove("overflow-hidden"),null!==e.appliedPadding&&o.style.getPropertyValue("padding-inline-end")===e.appliedPadding&&o.style.getPropertyPriority("padding-inline-end")===e.paddingPriority&&(e.bodyPaddingInlineEnd?o.style.setProperty("padding-inline-end",e.bodyPaddingInlineEnd,e.paddingPriority):o.style.removeProperty("padding-inline-end"))}o.d(t,{i:()=>i,l:()=>s})},"93025a68d8ab"(e,t,o){o.d(t,{BK:()=>p,M$:()=>m,Rm:()=>u,ZT:()=>c,fI:()=>r,k8:()=>h,oN:()=>a,rI:()=>l});var i=o("c8d66dd2c299");const s=Symbol.for("simai.modal.document-stack");function n(){return document[s]||Object.defineProperty(document,s,{value:{items:[],lockOwner:null},configurable:!0}),document[s]}function a(){return n().items.at(-1)||null}function r(e){return n().items.indexOf(e)}function l(){n().items.forEach((e,t)=>e.applyStackPosition(t)),(0,i.ro)(a())}const d=e=>!e.inContainer;function h(e,t){const o=n();o.items.includes(e)||(d(e)&&!o.lockOwner&&(o.lockOwner=t,t.lockPage(e.preserveScrollGap)),o.items.push(e),l())}function c(e){const t=n(),o=t.items.indexOf(e);o<0||(t.items.splice(o,1),t.lockOwner&&!t.items.some(d)&&(t.lockOwner.unlockPage(),t.lockOwner=null),l())}function u(e){const t=n(),o=t.items.indexOf(e);o<0||(t.items.splice(o,1),t.items.push(e),l())}function m(e){const t=[];for(let o=e?.parentElement;o;o=o.parentElement)o.matches('main, section, article, [role="main"], [role="region"]')&&t.push(o);return t}function f(e,t=!1){if(!e?.isConnected||"function"!=typeof e.focus||e.matches(":disabled")||e.closest('[inert], [hidden], [aria-hidden="true"]')||!e.getClientRects().length||"visible"!==e.ownerDocument.defaultView.getComputedStyle(e).visibility)return!1;const o=t&&!e.hasAttribute("tabindex");let i;const s=()=>{i?.disconnect(),e.removeEventListener("blur",s),o&&"-1"===e.getAttribute("tabindex")&&e.removeAttribute("tabindex")};o&&(e.setAttribute("tabindex","-1"),e.addEventListener("blur",s,{once:!0}),i=new e.ownerDocument.defaultView.MutationObserver(()=>{e.isConnected||s()}),i.observe(e.ownerDocument.documentElement,{childList:!0,subtree:!0}));let n=!1;try{return e.focus({preventScroll:!0}),n=e.ownerDocument.activeElement===e,n}catch{return!1}finally{o&&!n&&s()}}function p(e,t,o=[]){if(!e)return;const i=a(),s=i?.getModalRoot?.()||i?.template;if((!i||s?.contains(t))&&f(t))return;if(i)return void i.focusFirst();const n=new Set([...o,...document.querySelectorAll('main, [role="main"]'),document.body]);for(const e of n)if(f(e,!0))return}},"50d2a204ba4c"(e,t,o){o.d(t,{le:()=>a});function i(e,t={}){const o=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach(([e,t])=>{null!=t&&""!==t&&o.setAttribute(e,String(t))}),o}const s=e=>Math.round(1e3*e)/1e3;function n(e={}){return function({width:e=24,height:t=24,stroke:o=2,dots:n=8,filled:a=3,dotRadius:r=null,direction:l="clockwise",pixel:d=!1}={}){const h=e/2,c=t/2,u=Math.min(e,t)/2,m=Math.max(1,u-o/2),f=i("svg",{class:"sf-loader-svg",viewBox:`0 0 ${e} ${t}`,width:d?e:null,height:d?t:null,"aria-hidden":"true",focusable:"false"}),p={cx:h,cy:c,r:s(m),fill:"none",stroke:"currentColor","stroke-width":o},g=i("circle",{class:"sf-loader-ring-filled",...p,opacity:"0.3"}),b=i("circle",{class:"sf-loader-ring-accent",...p,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${h} ${c})`}),y=i("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${h} ${c})`});for(let e=0;e<10;e+=1){const t=9===e;y.append(i("circle",{class:"sf-loader-comet-segment"+(t?" sf-loader-comet-head":""),...p,"stroke-linecap":t?"round":"butt",pathLength:100,"stroke-dasharray":`${s(4)} ${s(96)}`,"stroke-dashoffset":s(-4*e),opacity:s(((e+1)/10)**1.6)}))}const v=Math.max(3,Math.min(32,Math.floor(Number(n)||8))),C=Math.max(1,Math.min(v,Math.floor(Number(a)||3))),_=Math.min(o,.7*Math.PI*(u-o)/v),w=null==r||""===r?_:Math.max(1,Math.min(Number(r)||_,u/4)),S=Math.max(w,u-w),A=i("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${v}; --sf-loader-dot-filled:${C};`});for(let e=0;e<v;e+=1){const t=2*Math.PI/v*e-Math.PI/2,o="counterclockwise"===l?e:(v-e)%v;A.append(i("circle",{class:"sf-loader-dot"+(e<C?" sf-loader-dot--active":""),cx:s(h+S*Math.cos(t)),cy:s(c+S*Math.sin(t)),r:s(w),fill:"currentColor",style:`--sf-loader-dot-index:${e}; --sf-loader-dot-step:${o};`}))}return f.append(g,b,y,A),f}({...e,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}function a({className:e="",overlay:t=!1}={}){const o=document.createElement("span");o.className=["sf-loader-container","sf-loader--infinite",e,e&&t?`${e}--overlay`:""].filter(Boolean).join(" "),o.dataset.sfSpinnerBound="1",o.dataset.infinite="true",o.setAttribute("aria-hidden","true");const i=document.createElement("span");return i.className="sf-loader--loading-indicator",i.append(n()),o.append(i),o}},f98b7a216869(e,t,o){o.a(e,async(e,t)=>{try{var i=o("ddf1cdb42ecc"),s=o("7b69af8ef2e5"),n=o("fbe0570fcc69"),a=o("0d662e4d7d63"),r=o("e45eac6c719d"),l=o("c8d66dd2c299"),d=o("3f3a6e2680d5"),h=o("201fd0b17b8b"),c=o("ed3ae3576d0a"),u=o("50d2a204ba4c"),m=o("93025a68d8ab"),f=e([i,s,n,a,r]);[i,s,n,a,r]=f.then?(await f)():f;var p=o.n(n);const g="[data-sf-overlay-container], [data-sf-drawer-container]",b={en:{close:"Close",minimize:"Minimize",title:"Dialog",loading:"Loading…",loadFailed:"Failed to load content",frameFailed:"Failed to load iframe content"},ru:{close:"Закрыть",minimize:"Свернуть",title:"Окно",loading:"Загрузка…",loadFailed:"Не удалось загрузить содержимое",frameFailed:"Не удалось загрузить встроенную страницу"}};let y=0;function v(e){return["none","small","medium","large"].includes(String(e||"").trim().toLowerCase())}class C extends(p()){static registry=new Map;static globalBound=!1;static stack=[];static openCount=0;static lockState=null;static baseZIndex=9e3;static defaultTrueAttributes=new Set(["overlay","show-close","show-footer","close-on-esc","close-on-overlay","preserve-scroll-gap","preload"]);static getTopModal(){return(0,m.oN)()}static isTopModal(e){return C.getTopModal()===e}static getStackIndex(e){return(0,m.fI)(e)}static addToStack(e){e&&"inline"!==e.display&&(C.stack=C.stack.filter(t=>t!==e),C.stack.push(e),C.openCount=C.stack.length,e.hiddenState||(0,m.k8)(e,C))}static removeFromStack(e){e&&"inline"!==e.display&&(C.stack=C.stack.filter(t=>t!==e),C.openCount=C.stack.length,(0,m.ZT)(e))}static bringToFront(e){e&&"inline"!==e.display&&C.stack.includes(e)&&(C.stack=C.stack.filter(t=>t!==e),C.stack.push(e),(0,m.Rm)(e))}static updateStackStyles(){(0,m.rI)()}static get props(){return{templateName:{attribute:"template",default:"default"},modalId:{default:""},title:{default:""},ariaLabel:{attribute:"aria-label",default:""},text:{default:""},open:{type:Boolean,default:!1},autoload:{type:Boolean,default:!1},unclose:{type:Boolean,default:!1},hide:{type:Boolean,default:!1},hideModifier:{default:""},minimized:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},closeOnOverlay:{type:Boolean,default:!0},preserveScrollGap:{type:Boolean,default:!0},position:{default:"center",values:["center","left","right","inline-start","inline-end","top","bottom"]},mode:{default:"inline",values:["inline","ajax","iframe"]},display:{default:"modal",values:["modal","inline"]},src:{default:""},rootClass:{default:""},preload:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},width:{default:""},height:{default:""},blur:{default:""},blurType:{default:"medium",values:["none","small","medium","large"]},overlayPreset:{default:"default",values:["default","focus"]},overlayClass:{default:""},closeClass:{default:""},surfaceClass:{default:""},surfacePadding:{default:""},panelClass:{default:""},headerClass:{default:""},bodyClass:{default:""},contentClass:{default:""},footerClass:{default:""}}}constructor(){super(),this._modalId="",this._syncingOpenAttribute=!1,this._portalRoot=null,this._renderTarget=null,this._hostClearedForPortal=!1,this._slotEventHandlers=new Map,this._slotEventId=0,this._readyDetail=null,this._hasEmittedReady=!1,this._hasAutoloaded=!1,this._isOpen=!1,this._isHidden=!1,this._modalState="closed",this._animatePanel=!1,this._stackIndex=-1,this._closeTimer=null,this._closeTransitionAbort=null,this._lastActive=null,this._fetchController=null,this._remoteHtml="",this._remoteError="",this._isLoadingRemote=!1,this._remoteLoaded=!1,this.onKeyDown=this.onKeyDown.bind(this),this.handleOverlayClick=this.handleOverlayClick.bind(this),this.handleCloseClick=this.handleCloseClick.bind(this),this.handleHideClick=this.handleHideClick.bind(this)}connectedCallback(){this._modalId||(this._modalId=this.getAttribute("modal-id")||this.id||"sf-modal-"+ ++y),super.connectedCallback(),C.registry.set(this.modalId,this),C.bindGlobalEvents()}captureSlotTemplates(){const e=!this._slotTemplatesCaptured;if(super.captureSlotTemplates(),!e)return;const t=Array.from(this.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE?"template"!==e.tagName.toLowerCase():e.nodeType===Node.TEXT_NODE&&""!==e.textContent.trim());t.length&&(this._liveSlotNodes.has("content")||this._liveSlotNodes.set("content",[]),this._liveSlotNodes.get("content").push(...t),t.forEach(e=>e.remove()))}disconnectedCallback(){this.teardownModal(),C.registry.delete(this.modalId),super.disconnectedCallback()}get templateName(){return this.getAttribute("template")||"default"}get modalId(){return this.getAttribute("modal-id")||this._modalId||this.id||""}get title(){return this.getAttribute("title")||(0,a.pageText)(b,"title",this)}get ariaLabel(){return this.getAttribute("aria-label")||""}get text(){return this.getAttribute("text")||""}get openState(){return this._isOpen||this.hasAttribute("open")||"inline"===this.display&&!this._inlineClosed}get autoload(){return this.getBooleanAttr("autoload",!1)}get unclose(){return this.getBooleanAttr("unclose",!1)}get hideButton(){return this.getBooleanAttr("hide",!1)}get hideModifier(){return this.getAttribute("hide-modifier")||""}get hiddenState(){return"inline"!==this.display&&(this._isHidden||this.hasAttribute("minimized"))}get overlay(){return this.getBooleanAttr("overlay",!0)}get closeOnEsc(){return this.getBooleanAttr("close-on-esc",!0)}get showClose(){return this.getBooleanAttr("show-close",!0)&&!this.unclose}get showHeader(){return this.getBooleanAttr("show-header",!0)}get showFooter(){return this.getBooleanAttr("show-footer",!0)}get closeOnOverlay(){return this.getBooleanAttr("close-on-overlay",!0)}get preserveScrollGap(){return this.getBooleanAttr("preserve-scroll-gap",!0)}get position(){return this.getEnumAttr("position",["center","left","right","inline-start","inline-end","top","bottom"],"center")}get mode(){return this.getEnumAttr("mode",["inline","ajax","iframe"],"inline")}get display(){return this.getEnumAttr("display",["modal","inline"],"modal")}get src(){return this.getAttribute("src")||""}get preload(){return this.getBooleanAttr("preload",!0)}get fullscreen(){return this.getBooleanAttr("fullscreen",!1)}get width(){return this.getAttribute("width")||""}get height(){return this.getAttribute("height")||""}get blur(){return v(this.getAttribute("blur"))||this.getBooleanAttr("blur",!1)}get blurType(){const e=this.getAttribute("blur"),t=this.getAttribute("blur-type")||(v(e)?e:"medium");return this.normalizeEnum(t,["none","small","medium","large"],"medium")}get hasCustomBlurType(){return this.hasAttribute("blur-type")||v(this.getAttribute("blur"))}get overlayPreset(){return this.normalizeEnum(this.getAttribute("overlay-preset")||"default",["default","focus"],"default")}get headerClass(){return this.getAttribute("header-class")||""}get overlayClass(){return this.getAttribute("overlay-class")||""}get closeClass(){return this.getAttribute("close-class")||""}get surfaceClass(){return this.getAttribute("surface-class")||""}get surfacePadding(){return this.getAttribute("surface-padding")||""}get panelClass(){return this.getAttribute("panel-class")||""}get bodyClass(){return this.getAttribute("body-class")||""}get contentClass(){return this.getAttribute("content-class")||""}get footerClass(){return this.getAttribute("footer-class")||""}get modalRoot(){return this._renderTarget?.querySelector?.(".sf-modal")||null}get state(){return{modalId:this.modalId,title:this.title,ariaLabel:this.ariaLabel,text:this.text,open:this.openState,autoload:this.autoload,unclose:this.unclose,hide:this.hideButton,hideModifier:this.hideModifier,minimized:this.hiddenState,overlay:this.overlay,showHeader:this.showHeader,showClose:this.showClose,showFooter:this.showFooter,closeOnEsc:this.closeOnEsc,closeOnOverlay:this.closeOnOverlay,preserveScrollGap:this.preserveScrollGap,position:this.position,mode:this.mode,display:this.display,src:this.src,preload:this.preload,fullscreen:this.fullscreen,width:this.width,height:this.height,blur:this.blur,blurType:this.blurType,overlayPreset:this.overlayPreset,overlayClass:this.overlayClass,closeClass:this.closeClass,surfaceClass:this.surfaceClass,surfacePadding:this.surfacePadding,panelClass:this.panelClass,headerClass:this.headerClass,bodyClass:this.bodyClass,contentClass:this.contentClass,footerClass:this.footerClass,lifecycle:this.renderModalState,remote:{error:this._remoteError,status:this._isLoadingRemote?"loading":this._remoteError?"error":this._remoteLoaded?"success":"idle"},stackIndex:this._stackIndex}}get renderOpenState(){return this.openState||"closing"===this._modalState}get renderModalState(){return"inline"===this.display?this.openState?"open":"closed":this.renderOpenState&&"closed"===this._modalState?"open":this._modalState}get modalZIndex(){return"inline"===this.display||this._stackIndex<0?"":C.baseZIndex+2*this._stackIndex}get remoteContent(){if("iframe"===this.mode&&this.src)return i.html`
2
2
  <iframe
3
3
  class="sf-modal-iframe w-full border-0 radius-surface"
4
4
  src=${this.src}
@@ -8,7 +8,7 @@
8
8
  @load=${this.handleIframeLoad}
9
9
  @error=${this.handleIframeError}
10
10
  ></iframe>
11
- `:this._remoteError?i.html`
11
+ `;if(this._remoteError)return i.html`
12
12
  <div
13
13
  class="sf-modal-error flex flex-col gap-2 items-cross-center content-main-center p-4"
14
14
  data-sf-modal-state="error"
@@ -18,17 +18,19 @@
18
18
  ${this._remoteError}
19
19
  </p>
20
20
  </div>
21
- `:this._remoteHtml?i.html`<div class="sf-modal-content flex flex-col gap-2">
21
+ `;if(this._remoteHtml)return i.html`<div class="sf-modal-content flex flex-col gap-2">
22
22
  ${(0,s.unsafeHTML)(this._remoteHtml)}
23
- </div>`:this._isLoadingRemote?i.html`
23
+ </div>`;if(this._isLoadingRemote){const e=(0,a.pageText)(b,"loading",this);return i.html`
24
24
  <div
25
25
  class="sf-modal-loading flex flex-col gap-2 items-cross-center content-main-center p-4"
26
26
  data-sf-modal-state="loading"
27
+ role="status"
28
+ aria-label=${e}
27
29
  >
28
30
  ${this._loadingSpinnerNode()}
29
- <p class="m-0 text-2 color-on-surface-variant">Loading...</p>
31
+ <p class="m-0 text-2 color-on-surface-variant">${e}</p>
30
32
  </div>
31
- `:i.nothing}_loadingSpinnerNode(){return this._loadingSpinner||(this._loadingSpinner=(0,u.le)({className:"sf-modal-spinner"})),this._loadingSpinner}templateContext(){this._slotEventHandlers.clear(),this._slotEventId=0;const e=this.getPropsContext();return this.createTemplateContext({...e,component:this,closeText:(0,a.pageText)(b,"close",this),minimizeText:(0,a.pageText)(b,"minimize",this),title:this.title,modalId:this.modalId,open:this.renderOpenState,modalState:this.renderModalState,animate:this._animatePanel&&"inline"!==this.display,modalZIndex:this.modalZIndex,hide:this.hideButton,minimized:this.hiddenState,showClose:this.showClose,blur:this.blur,blurType:this.blurType,hasCustomBlurType:this.hasCustomBlurType,hasHeaderContent:this.hasSlotContent("header"),hasContentContent:this.hasSlotContent("content"),hasFooterContent:this.hasSlotContent("footer"),headerContent:(0,s.unsafeHTML)(this.getSlotHtml("header")),contentContent:(0,s.unsafeHTML)(this.getSlotHtml("content")),footerContent:(0,s.unsafeHTML)(this.getSlotHtml("footer")),remoteContent:this.remoteContent,onCloseClick:this.handleCloseClick,onHideClick:this.handleHideClick})}getSlotHtml(e){return[...this._liveSlotNodes.get(e)||[],...this._slotTemplates.get(e)||[]].map(e=>{if(e instanceof HTMLElement){const t=e.cloneNode(!0);return this.copyRuntimeData(e,t),this.assignSlotEventIds(t),this.cleanNestedSmartComponentRender(t),t.outerHTML}return e.textContent||""}).join("")}assignSlotEventIds(e){[e,...Array.from(e.querySelectorAll?.("*")||[])].forEach(e=>{if(!e.__sfCreateEventHandlers?.length)return;const t="sf-modal-slot-event-"+ ++this._slotEventId;e.setAttribute("data-sf-runtime-event-id",t),this._slotEventHandlers.set(t,e.__sfCreateEventHandlers.slice())})}cleanNestedSmartComponentRender(e){[e,...Array.from(e.querySelectorAll?.("*")||[])].forEach(e=>{(e.tagName?.toLowerCase?.()||"").startsWith("sf-")&&Array.from(e.childNodes).forEach(e=>{e instanceof HTMLElement&&(e.hasAttribute("slot")||"slot"===e.tagName.toLowerCase()||e.tagName.toLowerCase().startsWith("sf-"))||e.remove()})})}template(){return(0,r.Q)(this.templateContext())}async renderComponent(e=[]){const t=++this._renderToken;if(!this._isMounted)return;this.beforeRender(e),this.emitComponentEvent("before-render",{changedAttributes:e}),this.runExternalHook("beforeRender",{changedAttributes:e,root:this});const o=await this.resolveTemplateResult(e);this._isMounted&&t===this._renderToken&&((0,i.render)(o,this.resolveRenderTarget()),this.afterRender(e),this.runExternalHook("afterRender",{changedAttributes:e,root:this}),this.emitComponentEvent("after-render",{changedAttributes:e}))}resolveRenderTarget(){return"inline"===this.display?(this.clearPortal(),this._hostClearedForPortal=!1,this._renderTarget=this,this):(this._hostClearedForPortal||((0,i.render)(i.nothing,this),this._hostClearedForPortal=!0),this._portalRoot||(this._portalRoot=this.resolvePortalRoot()),this.dedupePortalRoots(),this._renderTarget=this._portalRoot,this._portalRoot)}get overlayHome(){return this.closest(g)||document.body}get inContainer(){return this.overlayHome!==document.body}resolvePortalRoot(){const e=this.overlayHome,t=e.querySelector(`[data-sf-modal-portal="${this.modalId}"]`);if(t)return t;const o=document.createElement("div");return o.setAttribute("data-sf-modal-portal",this.modalId),e.append(o),o}dedupePortalRoots(){Array.from(document.querySelectorAll(`[data-sf-modal-portal="${this.modalId}"]`)).forEach(e=>{e!==this._portalRoot&&((0,i.render)(i.nothing,e),e.remove())}),this._portalRoot.isConnected||(this._portalRoot.setAttribute("data-sf-modal-portal",this.modalId),this.overlayHome.append(this._portalRoot))}applyStackPosition(e=C.getStackIndex(this)){this._stackIndex=e;const t=this.getModalRoot();return t&&"inline"!==this.display?e<0?(t.style.removeProperty("z-index"),t.style.removeProperty("--sf-modal-stack-index"),this):(t.style.setProperty("--sf-modal-stack-index",String(e)),t.style.zIndex=String(this.modalZIndex),this):this}open(e={}){const{animate:t=!0}="boolean"==typeof e?{animate:e}:e,o="closing"===this._modalState;return(this._isOpen||"inline"===this.display&&this.openState)&&!o?(this.cancelCloseTransition(),C.bringToFront(this),this):this.emitBeforeOpen()?(o||(this._lastActive=document.activeElement,this._focusReturnAncestors=(0,m.M$)(this._lastActive)),o&&(this.cancelCloseTransition(),this._releaseClosingContent?.(),this._releaseClosingContent=null),this._isOpen=!0,this._inlineClosed=!1,this._animatePanel=Boolean(t),this._modalState=t&&"inline"!==this.display?"opening":"open",this.syncOpenAttribute(!0),"inline"===this.display||o?"inline"!==this.display&&C.bringToFront(this):C.addToStack(this),this.requestComponentUpdate("open"),(0,h.Gp)(()=>{if(!this._isOpen||"closing"===this._modalState)return;this._modalState="open";const e=new Promise(e=>{const t=o=>{o.detail?.changedAttributes?.includes("open-state")&&(this.removeEventListener("sf-updated",t),e())};this.addEventListener("sf-updated",t)});this.requestComponentUpdate("open-state"),e.then(()=>{this._isOpen&&"open"===this._modalState&&(this.focusFirst(),this.emitAfterOpen(),this.loadRemoteContentIfNeeded())})}),this):this}close(){if(!this.openState||"closing"===this._modalState)return this;if(!this.emitBeforeClose())return this;if("inline"===this.display)return this.finishClose(),this;this._modalState="closing",this._isOpen=!1,this.requestComponentUpdate("close");const e=this.getModalRoot()?.querySelector("[data-sf-modal-panel]");return this._releaseClosingContent=(0,d.e)(e,C.isTopModal(this)),this._closeTransitionAbort=(0,h.ju)(()=>this.getModalRoot(),()=>this.finishClose()),this}hide(){return!this.openState||"inline"===this.display||this.hiddenState?this:this.emitBeforeHide()?(this._isHidden=!0,this.setAttribute("minimized",""),this.requestComponentUpdate("hide"),this.emitAfterHide(),this):this}show(){return this.openState&&"inline"!==this.display&&this.hiddenState&&this.emitBeforeShow()?(this._isHidden=!1,this.removeAttribute("minimized"),this.requestComponentUpdate("show"),this.emitAfterShow(),this):this}syncMinimizedLayer(){if(!this._isMounted||!this.openState||"inline"===this.display||"closed"===this._modalState||"closing"===this._modalState)return;const e=this.getModalRoot();if(this.hiddenState){const t=C.isTopModal(this);(0,m.ZT)(this),this.applyStackPosition(),(0,m.BK)(t,this._lastActive,this._focusReturnAncestors),e&&(e.inert=!0,e.setAttribute("aria-hidden","true"))}else e&&(e.inert=!1,e.setAttribute("aria-hidden","false")),(0,m.k8)(this,C),C.bringToFront(this),requestAnimationFrame(()=>this.focusFirst())}toggle(){return this.openState?this.close():this.open()}finishClose(){if("inline"!==this.display&&"closing"!==this._modalState)return this;const e=C.isTopModal(this);this.cancelCloseTransition(),this._isOpen=!1,"inline"===this.display&&(this._inlineClosed=!0),this._isHidden=!1,this._modalState="closed",this.removeAttribute("minimized"),this.syncOpenAttribute(!1);const t=this.getModalRoot();return t&&(t.inert=!0,t.setAttribute("aria-hidden","true")),this._releaseClosingContent?.(),this._releaseClosingContent=null,"inline"!==this.display&&C.removeFromStack(this),"inline"!==this.display&&(0,m.BK)(e,this._lastActive,this._focusReturnAncestors),this.requestComponentUpdate("after-close"),this.emitAfterClose(),this}cancelCloseTransition(){this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),this._closeTransitionAbort&&(this._closeTransitionAbort(),this._closeTransitionAbort=null)}setSrc(e){return this.setAttribute("src",e||""),this.resetRemoteContent(),this.loadRemoteContentIfNeeded(),this}reloadContent(){return this.resetRemoteContent(),this.loadRemoteContentIfNeeded(!0),this}getModalRoot(){return this.modalRoot}afterRender(){this.bindRenderedEvents(),this.bindSlotEventHandlers(),"closing"===this._modalState&&(this._releaseClosingContent?.(),this._releaseClosingContent=(0,d.e)(this.getModalRoot()?.querySelector("[data-sf-modal-panel]"),C.isTopModal(this))),this._readyDetail={component:this,modal:this,modalId:this.modalId,root:this.getModalRoot()},this._hasEmittedReady?this.dispatchEvent(new CustomEvent("modal:update",{bubbles:!0,composed:!0,detail:this._readyDetail})):(this._hasEmittedReady=!0,this.dispatchEvent(new CustomEvent("modal:ready",{bubbles:!0,composed:!0,detail:this._readyDetail}))),this.hasAttribute("open")&&!this._isOpen&&"closing"!==this._modalState&&(this._isOpen=!0,this._modalState="open","inline"!==this.display&&C.addToStack(this),this.focusFirst(),this.loadRemoteContentIfNeeded()),this.applyStackPosition(),(0,m.rI)(),!this.autoload||this.openState||this._hasAutoloaded||(this._hasAutoloaded=!0,requestAnimationFrame(()=>this.open({animate:!1})))}bindRenderedEvents(){const e=this.getModalRoot();e&&(e.removeEventListener("click",this.handleOverlayClick),e.addEventListener("click",this.handleOverlayClick),document.removeEventListener("keydown",this.onKeyDown),document.addEventListener("keydown",this.onKeyDown))}bindSlotEventHandlers(){const e=this.getModalRoot();e&&this._slotEventHandlers.size&&this._slotEventHandlers.forEach((t,o)=>{const i=e.querySelector(`[data-sf-runtime-event-id="${o}"]`);i&&t.forEach(({eventName:e,handler:t})=>{i.addEventListener(e,t)})})}handleOverlayClick(e){e.target===this.getModalRoot()?.querySelector("[data-sf-modal-overlay]")&&this.closeOnOverlay&&!this.unclose&&this.close()}handleCloseClick(e){e.preventDefault(),this.unclose||this.close()}handleHideClick(e){e.preventDefault(),this.hide()}onKeyDown(e){if((this.openState||"closing"===this._modalState)&&"inline"!==this.display&&C.isTopModal(this)&&!this.hiddenState)return"Escape"!==e.key||!this.closeOnEsc||this.unclose||"closing"===this._modalState||e.defaultPrevented||document.documentElement?.dataset?.sfPopoverOpen?void("Tab"===e.key&&this.trapFocus(e)):(e.preventDefault(),e.stopImmediatePropagation(),void this.close())}trapFocus(e){if(!C.isTopModal(this))return;if(this.hiddenState)return;const t=this.getModalRoot()?.querySelector("[data-sf-modal-panel]");(0,l.Zg)(t,e)}focusFirst(){if("inline"===this.display)return;if("inline"!==this.display&&!C.isTopModal(this))return;if(this.hiddenState)return;const e=this.getModalRoot()?.querySelector("[data-sf-modal-panel]");e&&e.focus()}resetRemoteContent(){this._remoteHtml="",this._remoteError="",this._remoteLoaded=!1,this._isLoadingRemote=!1,this.abortRemoteContent()}abortRemoteContent(){this._fetchController&&(this._fetchController.abort(),this._fetchController=null)}loadRemoteContentIfNeeded(e=!1){if(this.src&&("ajax"===this.mode||"iframe"===this.mode)&&(this.preload||this.openState||e))return"iframe"===this.mode?(this._remoteLoaded=!0,void this.requestComponentUpdate("remote-content")):void(this._remoteLoaded&&!e||this.loadAjaxContent())}async loadAjaxContent(){this.abortRemoteContent(),this._isLoadingRemote=!0,this._remoteError="";let e=!1;this.requestComponentUpdate("remote-loading"),this.emitContentEvent("modal:before-content-upload"),this._fetchController=new AbortController;try{if(this.src.startsWith("#")){const e=document.querySelector(this.src);if(!e)throw new Error(`Element not found: ${this.src}`);this._remoteHtml=e.innerHTML}else{const e=await fetch(this.src,{signal:this._fetchController.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);this._remoteHtml=await e.text()}this._remoteLoaded=!0}catch(t){"AbortError"===t.name?e=!0:this._remoteError=t.message||"Failed to load content"}finally{this._fetchController=null,this._isLoadingRemote=!1,this.requestComponentUpdate("remote-content"),e||this.emitContentEvent("modal:after-content-upload")}}handleIframeLoad=()=>{this._remoteLoaded=!0,this.emitContentEvent("modal:after-content-upload")};handleIframeError=()=>{this._remoteError="Failed to load iframe content",this.requestComponentUpdate("remote-content")};emitContentEvent(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:{component:this,modal:this,modalId:this.modalId,src:this.src,remote:this.state.remote}}))}emitModalEvent(e,{cancelable:t=!1,detail:o={}}={}){const i=new CustomEvent(e,{bubbles:!0,composed:!0,cancelable:t,detail:{component:this,modal:this,modalId:this.modalId,root:this.getModalRoot(),...o}});return this.dispatchEvent(i),!i.defaultPrevented}emitBeforeOpen(){return this.emitModalEvent("modal:before-open",{cancelable:!0,detail:{phase:"before-open"}})}emitAfterOpen(){this.emitModalEvent("modal:after-open",{detail:{phase:"after-open"}})}emitBeforeClose(){return this.emitModalEvent("modal:before-close",{cancelable:!0,detail:{phase:"before-close"}})}emitAfterClose(){this.emitModalEvent("modal:after-close",{detail:{phase:"after-close"}})}emitBeforeHide(){return this.emitModalEvent("modal:before-hide",{cancelable:!0,detail:{phase:"before-hide"}})}emitAfterHide(){this.emitModalEvent("modal:after-hide",{detail:{phase:"after-hide"}})}emitBeforeShow(){return this.emitModalEvent("modal:before-show",{cancelable:!0,detail:{phase:"before-show"}})}emitAfterShow(){this.emitModalEvent("modal:after-show",{detail:{phase:"after-show"}})}syncOpenAttribute(e){this._syncingOpenAttribute=!0,e?this.setAttribute("open",""):this.removeAttribute("open"),this._syncingOpenAttribute=!1}attributeChangedCallback(e,t,o){if(!this._syncingOpenAttribute||"open"!==e){if("open"===e&&t!==o)return this._isMounted?void(null===o?(this.close(),this.requestComponentUpdate("open-attribute")):this.open()):void super.attributeChangedCallback(e,t,o);["src","mode","preload"].includes(e)&&t!==o&&this.resetRemoteContent(),"minimized"===e&&t!==o&&(this._isHidden=null!==o,this.syncMinimizedLayer()),super.attributeChangedCallback(e,t,o)}}teardownModal(){const e=C.isTopModal(this);this.abortRemoteContent(),this.cancelCloseTransition(),document.removeEventListener("keydown",this.onKeyDown),"inline"!==this.display&&C.removeFromStack(this),this._isOpen=!1,this._modalState="closed",this.clearPortal(),this._releaseClosingContent?.(),this._releaseClosingContent=null,(0,m.BK)(e,this._lastActive,this._focusReturnAncestors)}clearPortal(){this._portalRoot&&((0,i.render)(i.nothing,this._portalRoot),this._portalRoot.remove(),this._portalRoot=null)}ownModalHandler(e){return t=>{t.detail?.modal===this&&e.call(this,t)}}onBeforeOpen(e,t){return"function"==typeof e&&this.addEventListener("modal:before-open",this.ownModalHandler(e),t),this}onAfterOpen(e,t){return"function"==typeof e&&this.addEventListener("modal:after-open",this.ownModalHandler(e),t),this}onBeforeClose(e,t){return"function"==typeof e&&this.addEventListener("modal:before-close",this.ownModalHandler(e),t),this}onAfterClose(e,t){return"function"==typeof e&&this.addEventListener("modal:after-close",this.ownModalHandler(e),t),this}onBeforeHide(e,t){return"function"==typeof e&&this.addEventListener("modal:before-hide",this.ownModalHandler(e),t),this}onAfterHide(e,t){return"function"==typeof e&&this.addEventListener("modal:after-hide",this.ownModalHandler(e),t),this}onBeforeShow(e,t){return"function"==typeof e&&this.addEventListener("modal:before-show",this.ownModalHandler(e),t),this}onAfterShow(e,t){return"function"==typeof e&&this.addEventListener("modal:after-show",this.ownModalHandler(e),t),this}onModalReady(e,t){return"function"!=typeof e?this:this._readyDetail?(e(new CustomEvent("modal:ready",{detail:this._readyDetail})),this):(this.addEventListener("modal:ready",this.ownModalHandler(e),t),this)}onModalUpdate(e,t){return"function"==typeof e&&this.addEventListener("modal:update",this.ownModalHandler(e),t),this}static bindGlobalEvents(){C.globalBound||"undefined"==typeof document||(document.addEventListener("click",e=>{const t=e.target.closest("[data-sf-modal-open]");if(t)return void C.registry.get(t.getAttribute("data-sf-modal-open"))?.open();const o=e.target.closest("[data-sf-modal-show]");if(o)return void C.registry.get(o.getAttribute("data-sf-modal-show"))?.show();const i=e.target.closest("[data-sf-modal-hide]");if(i)return void C.registry.get(i.getAttribute("data-sf-modal-hide"))?.hide();const s=e.target.closest("[data-sf-modal-close]");if(!s)return;const n=s.getAttribute("data-sf-modal-close")||s.closest(".sf-modal")?.getAttribute("data-sf-modal-id");C.registry.get(n)?.close()}),C.globalBound=!0)}static lockPage(e=!0){C.lockState||(C.lockState=(0,c.i)(e))}static unlockPage(){(0,c.l)(C.lockState),C.lockState=null}}C.define("sf-modal"),t()}catch(_){t(_)}})},e45eac6c719d(e,t,o){o.a(e,async(e,i)=>{try{o.d(t,{Q:()=>d});var s=o("ddf1cdb42ecc"),n=e([s]),a=n.then?(await n)():n;s=a[0];function r(...e){return e.filter(Boolean).join(" ").trim()}function l(e){const t=e.blur?`backdrop-blur-${e.blurType}`:"focus"===e.overlayPreset?"backdrop-blur-small":"";return r(`sf-modal-overlay--${e.overlayPreset}`,t)}function d(e){const t="inline"===e.display,o=Boolean(e.src)&&("ajax"===e.mode||"iframe"===e.mode),i=!1!==e.showHeader,n=e.hasHeaderContent,a=`${e.modalId}-title`,d=e.ariaLabel||(n||!i?e.title:""),h=e.hasContentContent,c=e.hasFooterContent&&e.showFooter,u=[e.width?`--sf-modal-width:${e.width}`:"",e.height?`--sf-modal-height:${e.height}`:""].filter(Boolean).join(";"),m=[e.surfacePadding?`--sf-modal-surface-padding:${e.surfacePadding}`:""].filter(Boolean).join(";"),f=[e.modalZIndex?`z-index:${e.modalZIndex}`:""].filter(Boolean).join(";");return s.html`
33
+ `}return i.nothing}_loadingSpinnerNode(){return this._loadingSpinner||(this._loadingSpinner=(0,u.le)({className:"sf-modal-spinner"})),this._loadingSpinner}templateContext(){this._slotEventHandlers.clear(),this._slotEventId=0;const e=this.getPropsContext();return this.createTemplateContext({...e,component:this,closeText:(0,a.pageText)(b,"close",this),minimizeText:(0,a.pageText)(b,"minimize",this),title:this.title,modalId:this.modalId,open:this.renderOpenState,modalState:this.renderModalState,animate:this._animatePanel&&"inline"!==this.display,modalZIndex:this.modalZIndex,hide:this.hideButton,minimized:this.hiddenState,showClose:this.showClose,blur:this.blur,blurType:this.blurType,hasCustomBlurType:this.hasCustomBlurType,hasHeaderContent:this.hasSlotContent("header"),hasContentContent:this.hasSlotContent("content"),hasFooterContent:this.hasSlotContent("footer"),headerContent:(0,s.unsafeHTML)(this.getSlotHtml("header")),contentContent:(0,s.unsafeHTML)(this.getSlotHtml("content")),footerContent:(0,s.unsafeHTML)(this.getSlotHtml("footer")),remoteContent:this.remoteContent,onCloseClick:this.handleCloseClick,onHideClick:this.handleHideClick})}getSlotHtml(e){return[...this._liveSlotNodes.get(e)||[],...this._slotTemplates.get(e)||[]].map(e=>{if(e instanceof HTMLElement){const t=e.cloneNode(!0);return this.copyRuntimeData(e,t),this.assignSlotEventIds(t),this.cleanNestedSmartComponentRender(t),t.outerHTML}return e.textContent||""}).join("")}assignSlotEventIds(e){[e,...Array.from(e.querySelectorAll?.("*")||[])].forEach(e=>{if(!e.__sfCreateEventHandlers?.length)return;const t="sf-modal-slot-event-"+ ++this._slotEventId;e.setAttribute("data-sf-runtime-event-id",t),this._slotEventHandlers.set(t,e.__sfCreateEventHandlers.slice())})}cleanNestedSmartComponentRender(e){[e,...Array.from(e.querySelectorAll?.("*")||[])].forEach(e=>{(e.tagName?.toLowerCase?.()||"").startsWith("sf-")&&Array.from(e.childNodes).forEach(e=>{e instanceof HTMLElement&&(e.hasAttribute("slot")||"slot"===e.tagName.toLowerCase()||e.tagName.toLowerCase().startsWith("sf-"))||e.remove()})})}template(){return(0,r.Q)(this.templateContext())}async renderComponent(e=[]){const t=++this._renderToken;if(!this._isMounted)return;this.beforeRender(e),this.emitComponentEvent("before-render",{changedAttributes:e}),this.runExternalHook("beforeRender",{changedAttributes:e,root:this});const o=await this.resolveTemplateResult(e);this._isMounted&&t===this._renderToken&&((0,i.render)(o,this.resolveRenderTarget()),this.afterRender(e),this.runExternalHook("afterRender",{changedAttributes:e,root:this}),this.emitComponentEvent("after-render",{changedAttributes:e}))}resolveRenderTarget(){return"inline"===this.display?(this.clearPortal(),this._hostClearedForPortal=!1,this._renderTarget=this,this):(this._hostClearedForPortal||((0,i.render)(i.nothing,this),this._hostClearedForPortal=!0),this._portalRoot||(this._portalRoot=this.resolvePortalRoot()),this.dedupePortalRoots(),this._renderTarget=this._portalRoot,this._portalRoot)}get overlayHome(){return this.closest(g)||document.body}get inContainer(){return this.overlayHome!==document.body}resolvePortalRoot(){const e=this.overlayHome,t=e.querySelector(`[data-sf-modal-portal="${this.modalId}"]`);if(t)return t;const o=document.createElement("div");return o.setAttribute("data-sf-modal-portal",this.modalId),e.append(o),o}dedupePortalRoots(){Array.from(document.querySelectorAll(`[data-sf-modal-portal="${this.modalId}"]`)).forEach(e=>{e!==this._portalRoot&&((0,i.render)(i.nothing,e),e.remove())}),this._portalRoot.isConnected||(this._portalRoot.setAttribute("data-sf-modal-portal",this.modalId),this.overlayHome.append(this._portalRoot))}applyStackPosition(e=C.getStackIndex(this)){this._stackIndex=e;const t=this.getModalRoot();return t&&"inline"!==this.display?e<0?(t.style.removeProperty("z-index"),t.style.removeProperty("--sf-modal-stack-index"),this):(t.style.setProperty("--sf-modal-stack-index",String(e)),t.style.zIndex=String(this.modalZIndex),this):this}open(e={}){const{animate:t=!0}="boolean"==typeof e?{animate:e}:e,o="closing"===this._modalState;return(this._isOpen||"inline"===this.display&&this.openState)&&!o?(this.cancelCloseTransition(),C.bringToFront(this),this):this.emitBeforeOpen()?(o||(this._lastActive=document.activeElement,this._focusReturnAncestors=(0,m.M$)(this._lastActive)),o&&(this.cancelCloseTransition(),this._releaseClosingContent?.(),this._releaseClosingContent=null),this._isOpen=!0,this._inlineClosed=!1,this._animatePanel=Boolean(t),this._modalState=t&&"inline"!==this.display?"opening":"open",this.syncOpenAttribute(!0),"inline"===this.display||o?"inline"!==this.display&&C.bringToFront(this):C.addToStack(this),this.requestComponentUpdate("open"),(0,h.Gp)(()=>{if(!this._isOpen||"closing"===this._modalState)return;this._modalState="open";const e=new Promise(e=>{const t=o=>{o.detail?.changedAttributes?.includes("open-state")&&(this.removeEventListener("sf-updated",t),e())};this.addEventListener("sf-updated",t)});this.requestComponentUpdate("open-state"),e.then(()=>{this._isOpen&&"open"===this._modalState&&(this.focusFirst(),this.emitAfterOpen(),this.loadRemoteContentIfNeeded())})}),this):this}close(){if(!this.openState||"closing"===this._modalState)return this;if(!this.emitBeforeClose())return this;if("inline"===this.display)return this.finishClose(),this;this._modalState="closing",this._isOpen=!1,this.requestComponentUpdate("close");const e=this.getModalRoot()?.querySelector("[data-sf-modal-panel]");return this._releaseClosingContent=(0,d.e)(e,C.isTopModal(this)),this._closeTransitionAbort=(0,h.ju)(()=>this.getModalRoot(),()=>this.finishClose()),this}hide(){return!this.openState||"inline"===this.display||this.hiddenState?this:this.emitBeforeHide()?(this._isHidden=!0,this.setAttribute("minimized",""),this.requestComponentUpdate("hide"),this.emitAfterHide(),this):this}show(){return this.openState&&"inline"!==this.display&&this.hiddenState&&this.emitBeforeShow()?(this._isHidden=!1,this.removeAttribute("minimized"),this.requestComponentUpdate("show"),this.emitAfterShow(),this):this}syncMinimizedLayer(){if(!this._isMounted||!this.openState||"inline"===this.display||"closed"===this._modalState||"closing"===this._modalState)return;const e=this.getModalRoot();if(this.hiddenState){const t=C.isTopModal(this);(0,m.ZT)(this),this.applyStackPosition(),(0,m.BK)(t,this._lastActive,this._focusReturnAncestors),e&&(e.inert=!0,e.setAttribute("aria-hidden","true"))}else e&&(e.inert=!1,e.setAttribute("aria-hidden","false")),(0,m.k8)(this,C),C.bringToFront(this),requestAnimationFrame(()=>this.focusFirst())}toggle(){return this.openState?this.close():this.open()}finishClose(){if("inline"!==this.display&&"closing"!==this._modalState)return this;const e=C.isTopModal(this);this.cancelCloseTransition(),this._isOpen=!1,"inline"===this.display&&(this._inlineClosed=!0),this._isHidden=!1,this._modalState="closed",this.removeAttribute("minimized"),this.syncOpenAttribute(!1);const t=this.getModalRoot();return t&&(t.inert=!0,t.setAttribute("aria-hidden","true")),this._releaseClosingContent?.(),this._releaseClosingContent=null,"inline"!==this.display&&C.removeFromStack(this),"inline"!==this.display&&(0,m.BK)(e,this._lastActive,this._focusReturnAncestors),this.requestComponentUpdate("after-close"),this.emitAfterClose(),this}cancelCloseTransition(){this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),this._closeTransitionAbort&&(this._closeTransitionAbort(),this._closeTransitionAbort=null)}setSrc(e){return this.setAttribute("src",e||""),this.resetRemoteContent(),this.loadRemoteContentIfNeeded(),this}reloadContent(){return this.resetRemoteContent(),this.loadRemoteContentIfNeeded(!0),this}getModalRoot(){return this.modalRoot}afterRender(){this.bindRenderedEvents(),this.bindSlotEventHandlers(),"closing"===this._modalState&&(this._releaseClosingContent?.(),this._releaseClosingContent=(0,d.e)(this.getModalRoot()?.querySelector("[data-sf-modal-panel]"),C.isTopModal(this))),this._readyDetail={component:this,modal:this,modalId:this.modalId,root:this.getModalRoot()},this._hasEmittedReady?this.dispatchEvent(new CustomEvent("modal:update",{bubbles:!0,composed:!0,detail:this._readyDetail})):(this._hasEmittedReady=!0,this.dispatchEvent(new CustomEvent("modal:ready",{bubbles:!0,composed:!0,detail:this._readyDetail}))),this.hasAttribute("open")&&!this._isOpen&&"closing"!==this._modalState&&(this._isOpen=!0,this._modalState="open","inline"!==this.display&&C.addToStack(this),this.focusFirst(),this.loadRemoteContentIfNeeded()),this.applyStackPosition(),(0,m.rI)(),!this.autoload||this.openState||this._hasAutoloaded||(this._hasAutoloaded=!0,requestAnimationFrame(()=>this.open({animate:!1})))}bindRenderedEvents(){const e=this.getModalRoot();e&&(e.removeEventListener("click",this.handleOverlayClick),e.addEventListener("click",this.handleOverlayClick),document.removeEventListener("keydown",this.onKeyDown),document.addEventListener("keydown",this.onKeyDown))}bindSlotEventHandlers(){const e=this.getModalRoot();e&&this._slotEventHandlers.size&&this._slotEventHandlers.forEach((t,o)=>{const i=e.querySelector(`[data-sf-runtime-event-id="${o}"]`);i&&t.forEach(({eventName:e,handler:t})=>{i.addEventListener(e,t)})})}handleOverlayClick(e){e.target===this.getModalRoot()?.querySelector("[data-sf-modal-overlay]")&&this.closeOnOverlay&&!this.unclose&&this.close()}handleCloseClick(e){e.preventDefault(),this.unclose||this.close()}handleHideClick(e){e.preventDefault(),this.hide()}onKeyDown(e){if((this.openState||"closing"===this._modalState)&&"inline"!==this.display&&C.isTopModal(this)&&!this.hiddenState)return"Escape"!==e.key||!this.closeOnEsc||this.unclose||"closing"===this._modalState||e.defaultPrevented||document.documentElement?.dataset?.sfPopoverOpen?void("Tab"===e.key&&this.trapFocus(e)):(e.preventDefault(),e.stopImmediatePropagation(),void this.close())}trapFocus(e){if(!C.isTopModal(this))return;if(this.hiddenState)return;const t=this.getModalRoot()?.querySelector("[data-sf-modal-panel]");(0,l.Zg)(t,e)}focusFirst(){if("inline"===this.display)return;if("inline"!==this.display&&!C.isTopModal(this))return;if(this.hiddenState)return;const e=this.getModalRoot()?.querySelector("[data-sf-modal-panel]");e&&e.focus()}resetRemoteContent(){this._remoteHtml="",this._remoteError="",this._remoteLoaded=!1,this._isLoadingRemote=!1,this.abortRemoteContent()}abortRemoteContent(){this._fetchController&&(this._fetchController.abort(),this._fetchController=null)}loadRemoteContentIfNeeded(e=!1){if(this.src&&("ajax"===this.mode||"iframe"===this.mode)&&(this.preload||this.openState||e))return"iframe"===this.mode?(this._remoteLoaded=!0,void this.requestComponentUpdate("remote-content")):void(this._remoteLoaded&&!e||this.loadAjaxContent())}async loadAjaxContent(){this.abortRemoteContent(),this._isLoadingRemote=!0,this._remoteError="";let e=!1;this.requestComponentUpdate("remote-loading"),this.emitContentEvent("modal:before-content-upload");const t=new AbortController;this._fetchController=t;try{if(this.src.startsWith("#")){const e=document.querySelector(this.src);if(!e)throw new Error(`Element not found: ${this.src}`);this._remoteHtml=e.innerHTML}else{const e=await fetch(this.src,{signal:t.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);this._remoteHtml=await e.text()}this._remoteLoaded=!0}catch(t){"AbortError"===t.name?e=!0:this._remoteError=t.message||(0,a.pageText)(b,"loadFailed",this)}finally{e&&this._fetchController&&this._fetchController!==t||(this._fetchController=null,this._isLoadingRemote=!1,this.requestComponentUpdate("remote-content"),e||this.emitContentEvent("modal:after-content-upload"))}}handleIframeLoad=()=>{this._remoteLoaded=!0,this.emitContentEvent("modal:after-content-upload")};handleIframeError=()=>{this._remoteError=(0,a.pageText)(b,"frameFailed",this),this.requestComponentUpdate("remote-content")};emitContentEvent(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:{component:this,modal:this,modalId:this.modalId,src:this.src,remote:this.state.remote}}))}emitModalEvent(e,{cancelable:t=!1,detail:o={}}={}){const i=new CustomEvent(e,{bubbles:!0,composed:!0,cancelable:t,detail:{component:this,modal:this,modalId:this.modalId,root:this.getModalRoot(),...o}});return this.dispatchEvent(i),!i.defaultPrevented}emitBeforeOpen(){return this.emitModalEvent("modal:before-open",{cancelable:!0,detail:{phase:"before-open"}})}emitAfterOpen(){this.emitModalEvent("modal:after-open",{detail:{phase:"after-open"}})}emitBeforeClose(){return this.emitModalEvent("modal:before-close",{cancelable:!0,detail:{phase:"before-close"}})}emitAfterClose(){this.emitModalEvent("modal:after-close",{detail:{phase:"after-close"}})}emitBeforeHide(){return this.emitModalEvent("modal:before-hide",{cancelable:!0,detail:{phase:"before-hide"}})}emitAfterHide(){this.emitModalEvent("modal:after-hide",{detail:{phase:"after-hide"}})}emitBeforeShow(){return this.emitModalEvent("modal:before-show",{cancelable:!0,detail:{phase:"before-show"}})}emitAfterShow(){this.emitModalEvent("modal:after-show",{detail:{phase:"after-show"}})}syncOpenAttribute(e){this._syncingOpenAttribute=!0,e?this.setAttribute("open",""):this.removeAttribute("open"),this._syncingOpenAttribute=!1}attributeChangedCallback(e,t,o){if(!this._syncingOpenAttribute||"open"!==e){if("open"===e&&t!==o)return this._isMounted?void(null===o?(this.close(),this.requestComponentUpdate("open-attribute")):this.open()):void super.attributeChangedCallback(e,t,o);["src","mode","preload"].includes(e)&&t!==o&&this.resetRemoteContent(),"minimized"===e&&t!==o&&(this._isHidden=null!==o,this.syncMinimizedLayer()),super.attributeChangedCallback(e,t,o)}}teardownModal(){const e=C.isTopModal(this);this.abortRemoteContent(),this.cancelCloseTransition(),document.removeEventListener("keydown",this.onKeyDown),"inline"!==this.display&&C.removeFromStack(this),this._isOpen=!1,this._modalState="closed",this.clearPortal(),this._releaseClosingContent?.(),this._releaseClosingContent=null,(0,m.BK)(e,this._lastActive,this._focusReturnAncestors)}clearPortal(){this._portalRoot&&((0,i.render)(i.nothing,this._portalRoot),this._portalRoot.remove(),this._portalRoot=null)}ownModalHandler(e){return t=>{t.detail?.modal===this&&e.call(this,t)}}onBeforeOpen(e,t){return"function"==typeof e&&this.addEventListener("modal:before-open",this.ownModalHandler(e),t),this}onAfterOpen(e,t){return"function"==typeof e&&this.addEventListener("modal:after-open",this.ownModalHandler(e),t),this}onBeforeClose(e,t){return"function"==typeof e&&this.addEventListener("modal:before-close",this.ownModalHandler(e),t),this}onAfterClose(e,t){return"function"==typeof e&&this.addEventListener("modal:after-close",this.ownModalHandler(e),t),this}onBeforeHide(e,t){return"function"==typeof e&&this.addEventListener("modal:before-hide",this.ownModalHandler(e),t),this}onAfterHide(e,t){return"function"==typeof e&&this.addEventListener("modal:after-hide",this.ownModalHandler(e),t),this}onBeforeShow(e,t){return"function"==typeof e&&this.addEventListener("modal:before-show",this.ownModalHandler(e),t),this}onAfterShow(e,t){return"function"==typeof e&&this.addEventListener("modal:after-show",this.ownModalHandler(e),t),this}onModalReady(e,t){return"function"!=typeof e?this:this._readyDetail?(e(new CustomEvent("modal:ready",{detail:this._readyDetail})),this):(this.addEventListener("modal:ready",this.ownModalHandler(e),t),this)}onModalUpdate(e,t){return"function"==typeof e&&this.addEventListener("modal:update",this.ownModalHandler(e),t),this}static bindGlobalEvents(){C.globalBound||"undefined"==typeof document||(document.addEventListener("click",e=>{const t=e.target.closest("[data-sf-modal-open]");if(t)return void C.registry.get(t.getAttribute("data-sf-modal-open"))?.open();const o=e.target.closest("[data-sf-modal-show]");if(o)return void C.registry.get(o.getAttribute("data-sf-modal-show"))?.show();const i=e.target.closest("[data-sf-modal-hide]");if(i)return void C.registry.get(i.getAttribute("data-sf-modal-hide"))?.hide();const s=e.target.closest("[data-sf-modal-close]");if(!s)return;const n=s.getAttribute("data-sf-modal-close")||s.closest(".sf-modal")?.getAttribute("data-sf-modal-id");C.registry.get(n)?.close()}),C.globalBound=!0)}static lockPage(e=!0){C.lockState||(C.lockState=(0,c.i)(e))}static unlockPage(){(0,c.l)(C.lockState),C.lockState=null}}C.define("sf-modal"),t()}catch(_){t(_)}})},e45eac6c719d(e,t,o){o.a(e,async(e,i)=>{try{o.d(t,{Q:()=>d});var s=o("ddf1cdb42ecc"),n=e([s]),a=n.then?(await n)():n;s=a[0];function r(...e){return e.filter(Boolean).join(" ").trim()}function l(e){const t=e.blur?`backdrop-blur-${e.blurType}`:"focus"===e.overlayPreset?"backdrop-blur-small":"";return r(`sf-modal-overlay--${e.overlayPreset}`,t)}function d(e){const t="inline"===e.display,o=Boolean(e.src)&&("ajax"===e.mode||"iframe"===e.mode),i=!1!==e.showHeader,n=e.hasHeaderContent,a=`${e.modalId}-title`,d=e.ariaLabel||(n||!i?e.title:""),h=e.hasContentContent,c=e.hasFooterContent&&e.showFooter,u=[e.width?`--sf-modal-width:${e.width}`:"",e.height?`--sf-modal-height:${e.height}`:""].filter(Boolean).join(";"),m=[e.surfacePadding?`--sf-modal-surface-padding:${e.surfacePadding}`:""].filter(Boolean).join(";"),f=[e.modalZIndex?`z-index:${e.modalZIndex}`:""].filter(Boolean).join(";");return s.html`
32
34
  <div
33
35
  id=${e.modalId}
34
36
  class=${r("sf-modal",`sf-modal--position-${e.position}`,`sf-modal--positon-${e.position}`,t?"sf-modal--inline inline-block w-full":"fixed top-0 inline-start-0 w-full h-full z-9 p-3 items-cross-center content-main-center",e.open?"flex":"hidden",!t&&e.animate&&"animate",e.rootClass)}
@@ -1030,7 +1030,7 @@
1030
1030
  "source_artifacts": [
1031
1031
  {
1032
1032
  "path": "src/smart/modal/index.js",
1033
- "sha256": "2aa3f439ec0ffdedaa8d53bc65125445f7607a335ba7fd676720195aa03c7e2f"
1033
+ "sha256": "1c5ccb019f5a18101b1ada5399e6c014a2dcdd75277cf0aa819b17b22138ecd5"
1034
1034
  }
1035
1035
  ],
1036
1036
  "generated_runtime": [
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var t={"58661bec99a6"(t,e,i){const n=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)};i.d(e,["A",0,n])},"50d2a204ba4c"(t,e,i){i.d(e,{Gw:()=>r,_E:()=>s,l8:()=>a});const n=["arc","breathing","comet","dots"];function a(t,e={}){const i=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&i.setAttribute(t,String(e))}),i}const o=t=>Math.round(1e3*t)/1e3;function r({width:t=24,height:e=24,stroke:i=2,dots:n=8,filled:r=3,dotRadius:s=null,direction:l="clockwise",pixel:d=!1}={}){const c=t/2,h=e/2,u=Math.min(t,e)/2,f=Math.max(1,u-i/2),p=a("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:d?t:null,height:d?e:null,"aria-hidden":"true",focusable:"false"}),m={cx:c,cy:h,r:o(f),fill:"none",stroke:"currentColor","stroke-width":i},g=a("circle",{class:"sf-loader-ring-filled",...m,opacity:"0.3"}),b=a("circle",{class:"sf-loader-ring-accent",...m,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"0 100",transform:`rotate(90 ${c} ${h})`}),w=a("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${c} ${h})`});for(let t=0;t<10;t+=1){const e=9===t;w.append(a("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...m,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${o(4)} ${o(96)}`,"stroke-dashoffset":o(-4*t),opacity:o(((t+1)/10)**1.6)}))}const y=Math.max(3,Math.min(32,Math.floor(Number(n)||8))),S=Math.max(1,Math.min(y,Math.floor(Number(r)||3))),v=Math.min(i,.7*Math.PI*(u-i)/y),M=null==s||""===s?v:Math.max(1,Math.min(Number(s)||v,u/4)),k=Math.max(M,u-M),x=a("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${y}; --sf-loader-dot-filled:${S};`});for(let t=0;t<y;t+=1){const e=2*Math.PI/y*t-Math.PI/2,i="counterclockwise"===l?t:(y-t)%y;x.append(a("circle",{class:"sf-loader-dot"+(t<S?" sf-loader-dot--active":""),cx:o(c+k*Math.cos(e)),cy:o(h+k*Math.sin(e)),r:o(M),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${i};`}))}return p.append(g,b,w,x),p}function s(t={}){return r({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}i.d(e,["vv",0,n])},eecc41af23fd(t,e,i){i.a(t,async(t,n)=>{try{i.d(e,{AM:()=>_,KH:()=>E,t7:()=>$});var a=i("d7f974466839"),o=i("58661bec99a6"),r=i("0d662e4d7d63"),s=i("06e8cd089f28"),l=i("50d2a204ba4c"),d=t([r]),c=d.then?(await d)():d;r=c[0];const h={en:{label:"Loading…"},ru:{label:"Загрузка…"}},u=".sf-loader-container",f="sfSpinnerBound";function p(t,e){const i=Number.parseFloat(String(t??""));return Number.isFinite(i)?i:e}function m(t,e,i){return Math.min(Math.max(t,e),i)}function g(t,e,i){const n=String(t||"").trim().toLowerCase();return e.includes(n)?n:i}const b=[["width","data-width","width"],["w","data-w","width"],["height","data-height","height"],["h","data-h","height"],["strokeWidth","data-stroke-width","stroke-width"],["dotRadius","data-dot-radius","dot-radius"]];function w(t){const e=t.closest?.("sf-spinner"),i=b.filter(([e])=>{const i=t.dataset[e];return void 0!==i&&""!==i});return i.forEach(([,t,i])=>{(0,s.YB)({component:e?"sf-spinner":"spinner",kind:"attribute",from:e?i:t,to:e?"size":null})}),i.length>0}function y(t={}){return["width","height","strokeWidth"].some(e=>{const i=t?.[e];return null!=i&&""!==i})?S(t):(0,l._E)(t)}function S({width:t=58,height:e=58,strokeWidth:i=4,dots:n=8,filled:a=3,dotRadius:o=null,direction:r="clockwise"}={}){const s=m(p(t,58),16,256),d=m(p(e,s),16,256),c=m(p(i,4),1,Math.min(s,d)/2);return(0,l.Gw)({width:s,height:d,stroke:c,dots:n,filled:a,dotRadius:o,direction:r,pixel:!0})}function v({width:t=58,height:e=58,dots:i=16,filled:n=6,dotRadius:a=null,direction:o="clockwise"}={}){const r=m(p(t,58),16,256),s=m(p(e,r),16,256),d=m(Math.floor(p(i,16)),3,32),c=m(Math.floor(p(n,6)),1,d),h=null===a?Math.max(1.5,.06*Math.min(r,s)):m(p(a,1),1,Math.min(r,s)/4),u=Math.max(h,Math.min(r,s)/2-h-1),f=r/2,g=s/2,b=(0,l.l8)("svg",{class:"sf-loader-svg",viewBox:`0 0 ${r} ${s}`,width:r,height:s,"aria-hidden":"true",style:`--sf-loader-dot-count:${d}; --sf-loader-dot-filled:${c};`});for(let t=0;t<d;t+=1){const e=2*Math.PI/d*t-Math.PI/2,i=f+u*Math.cos(e),n=g+u*Math.sin(e),a="counterclockwise"===o?t:(d-t)%d,r=(0,l.l8)("circle",{class:"sf-loader-dot"+(t<c?" sf-loader-dot--active":""),cx:i,cy:n,r:h,style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${a};`});b.append(r)}return b}function M(t){const e=t.querySelector(".sf-loader--loading-indicator"),i=t.querySelector(".sf-loader--circles"),n=t.querySelector(".sf-loader--text"),a=Object.prototype.hasOwnProperty.call(t.dataset,"width")||Object.prototype.hasOwnProperty.call(t.dataset,"w"),o=Object.prototype.hasOwnProperty.call(t.dataset,"height")||Object.prototype.hasOwnProperty.call(t.dataset,"h"),r=w(t),s=m(p(t.dataset.width,p(t.dataset.w,58)),16,256),d=m(p(t.dataset.height,p(t.dataset.h,s)),16,256),c=t.dataset.strokeWidth?m(p(t.dataset.strokeWidth,4),1,Math.min(s,d)/2):null,h=m(Math.floor(p(t.dataset.dots,8)),3,32);return{pixel:r,width:s,height:d,strokeWidth:c,dots:h,filled:m(Math.floor(p(t.dataset.filled,3)),1,h),dotRadius:t.dataset.dotRadius?m(p(t.dataset.dotRadius,1),1,Math.min(s,d)/4):null,direction:g(t.dataset.direction,["clockwise","counterclockwise"],"clockwise"),variant:t.dataset.variant?g(t.dataset.variant,l.vv,"arc"):i?"dots":"",hasExplicitWidth:a,hasExplicitHeight:o,infinite:"true"===t.dataset.infinite,announce:"true"===t.dataset.announce,label:void 0!==t.dataset.label?t.dataset.label:n?.textContent?.trim?.()||"",indicator:e,circles:i,labelNode:n}}function k(t,e){const i=Boolean(e.label);if(t.toggleAttribute("aria-hidden",!i),e.announce&&i)return t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),void(t.dataset.sfSpinnerSemantics="status");"status"===t.dataset.sfSpinnerSemantics&&(t.removeAttribute("role"),t.removeAttribute("aria-live"),t.removeAttribute("aria-atomic"),delete t.dataset.sfSpinnerSemantics)}function x(t,e,i){let n=t.querySelector(e);return n?(n.innerHTML="",n):(n=document.createElement("div"),n.className=i,n.dataset.sfSpinnerPart=i,t.append(n),n)}function E(t){if(!(t instanceof HTMLElement))return t;const e=M(t);t.classList.add("sf-loader-container"),e.infinite?t.classList.add("sf-loader--infinite"):t.classList.remove("sf-loader--infinite"),e.pixel&&e.hasExplicitWidth?t.style.setProperty("--sf-loader-svg-width",`${e.width}px`):t.style.removeProperty("--sf-loader-svg-width"),e.pixel&&(e.hasExplicitHeight||e.hasExplicitWidth)?t.style.setProperty("--sf-loader-svg-height",`${e.height}px`):t.style.removeProperty("--sf-loader-svg-height"),null!==e.strokeWidth?t.style.setProperty("--sf-loader-stroke-width",`${e.strokeWidth}px`):t.style.removeProperty("--sf-loader-stroke-width"),t.classList.toggle("sf-loader--pixel-geometry",e.pixel),e.variant&&t.dataset.variant!==e.variant&&(t.dataset.variant=e.variant);const i=t.querySelector(".sf-loader--circles");if(i&&!t.querySelector(".sf-loader--loading-indicator")){const t=document.createElement("div");t.className="sf-loader--loading-indicator",t.dataset.sfSpinnerPart="sf-loader--loading-indicator",i.replaceWith(t)}const n=x(t,".sf-loader--loading-indicator","sf-loader--loading-indicator"),a=e.label||e.labelNode?x(t,".sf-loader--text","sf-loader--text"):null,o=e.pixel?S({...e,strokeWidth:e.strokeWidth??4}):(0,l._E)(e);return n.append(o),a&&(a.textContent=e.label||""),k(t,e),t}function $(t){return t instanceof HTMLElement&&"1"!==t.dataset[f]?(E(t),t.dataset[f]="1",t):t}function _(t){t instanceof HTMLElement&&delete t.dataset[f]}function F(t){(t instanceof Element||t===document)&&(t instanceof Element&&t.matches?.(u)&&$(t),t.querySelectorAll?.(u).forEach($))}class A extends a.y{static componentName="Spinner";constructor(t){super(t);const{width:e,height:i,label:n=(0,r.pageText)(h,"label",t?.root??document.documentElement),variant:a,dots:o=8,filled:s=3,strokeWidth:l=null,dotRadius:d=null,infinite:c=!1,announce:u=!1,direction:f="clockwise"}=this.params||{},p=this.attrs.class||this.attrs.className;this.template=document.createElement("div"),this.id&&(this.template.id=this.id),this.template.classList.add("sf-loader-container"),p&&this.template.classList.add(...`${p}`.split(" ").filter(Boolean)),Object.entries(this.attrs).filter(([t])=>!["class","className"].includes(t)).forEach(([t,e])=>{null!=e&&this.template.setAttribute(t,e)}),null!=e&&""!==e&&(this.template.dataset.width=String(e)),null!=i&&""!==i&&(this.template.dataset.height=String(i)),this.template.dataset.label=String(n??""),null!=a&&""!==a&&(this.template.dataset.variant=String(a)),this.template.dataset.dots=String(o),this.template.dataset.filled=String(s),null!=l&&""!==l&&(this.template.dataset.strokeWidth=String(l)),this.template.dataset.infinite=String(c),this.template.dataset.announce=String(u),this.template.dataset.direction=String(f),null!=d&&(this.template.dataset.dotRadius=String(d))}init(){$(this.template)}destroyInternal(){_(this.template)}}(0,o.A)("Spinner",A),"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.Spinner=window.SF.Spinner||{},window.SF.Spinner.bind=$,window.SF.Spinner.render=E,window.SF.Spinner.unbind=_,window.SF.Spinner.createArcSvg=y,window.SF.Spinner.createDotsSvg=v),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>F(document)):F(document);new MutationObserver(t=>{t.forEach(t=>{t.addedNodes.forEach(t=>{t instanceof Element&&F(t)})})}).observe(document.documentElement,{childList:!0,subtree:!0}),n()}catch(T){n(T)}})},d7f974466839(t,e,i){i.d(e,{y:()=>n});class n{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const i=t.match(/\(([^)]+)\)/g);i&&i.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const i=this.getUtilityMap();if(!i||!i[e])return;this.extractUtilityClasses(i[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}},"06e8cd089f28"(t,e,i){function n(){const t=globalThis.SF=globalThis.SF||{};return t.__deprecationNotes instanceof Map||Object.defineProperty(t,"__deprecationNotes",{value:new Map,configurable:!0}),t.__deprecationNotes}function a({component:t="",kind:e="attribute",attribute:i="",from:a,to:o=null}={}){if(!a)return;const r=[t,e,i,a].join("|"),s=n(),l=s.get(r);if(l)l.count+=1;else if(s.set(r,{component:t,kind:e,attribute:i,from:a,to:o,count:1}),function(){const t=globalThis.document?.documentElement;return"warn"===t?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const n=t?`${t}: `:"",r="value"===e?`${i}="${a}"`:`${e} ${a}`;globalThis.console?.warn?.(`[SIMAI Framework] ${n}${r} is a legacy name${o?`; write ${o}`:""}. See contracts/changes/journal.json.`)}}if(i.d(e,{YB:()=>a}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const t=globalThis.SF.deprecations||{};t.list=function(){return[...n().values()].map(t=>({...t}))},t.clear=function(){n().clear()},t.note=a,globalThis.SF.deprecations=t}},"100381bfa317"(t,e,i){i.a(t,async(t,e)=>{try{var n=i("fbe0570fcc69"),a=i("eecc41af23fd"),o=i("50d2a204ba4c"),r=i("f4cc1d3fd22e"),s=i("0d662e4d7d63"),l=t([n,a,r,s]);[n,a,r,s]=l.then?(await l)():l;var d=i.n(n);const c={en:{label:"Loading..."},ru:{label:"Загрузка…"}};class h extends(d()){static get props(){return{size:{default:"1"},width:{default:""},height:{default:""},label:{default:""},kind:{default:"",values:["",...o.vv],aliases:["variant"]},dots:{default:String(8)},filled:{default:String(3)},strokeWidth:{default:""},dotRadius:{default:""},infinite:{type:Boolean,default:!1},announce:{type:Boolean,default:!1},direction:{default:"clockwise"},rootClass:{default:""}}}constructor(){super(),this._boundRoot=null}get size(){return this.getAttribute("size")||"1"}get width(){return this.getAttribute("width")||""}get height(){return this.getAttribute("height")||""}get label(){return this.hasAttribute("label")?this.getAttribute("label"):(0,s.pageText)(c,"label",this)}get kind(){return this.getProp("kind")}get variant(){return this.kind}get dots(){return this.getAttribute("dots")||String(8)}get filled(){return this.getAttribute("filled")||String(3)}get strokeWidth(){return this.getAttribute("stroke-width")||""}get dotRadius(){return this.getAttribute("dot-radius")||""}get infinite(){return this.getBooleanAttr("infinite",!1)}get announce(){return this.getBooleanAttr("announce",!1)}get direction(){return this.getAttribute("direction")||"clockwise"}templateContext(){const t=this.getPropsContext();return this.createTemplateContext({...t,label:this.label,component:this,rootClass:this.getRootClass()})}template(){return(0,r.a)(this.templateContext())}afterRender(){this._boundRoot&&((0,a.AM)(this._boundRoot),this._boundRoot=null),this._boundRoot=this.getSpinnerRoot(),this._boundRoot&&(0,a.t7)(this._boundRoot)}afterUpdate(){this._boundRoot&&(0,a.KH)(this._boundRoot)}onDisconnected(){this._boundRoot&&((0,a.AM)(this._boundRoot),this._boundRoot=null)}getSpinnerRoot(){return this.querySelector(".sf-loader-container")}refreshSpinner(){return this._boundRoot&&(0,a.KH)(this._boundRoot),this}}h.define("sf-spinner"),e()}catch(t){e(t)}})},f4cc1d3fd22e(t,e,i){i.a(t,async(t,n)=>{try{i.d(e,{a:()=>c});var a=i("ddf1cdb42ecc"),o=t([a]),r=o.then?(await o)():o;a=r[0];function s(...t){return t.flat().filter(Boolean).join(" ")}function l(t){return""===t||null==t?a.nothing:String(t)}function d(t,e,i){const n=String(t||"").trim().toLowerCase();return e.includes(n)?n:i}function c(t){const e=s("sf-loader-container",`sf-loader--size-${d(t.size,["1/3","1/2","1","2","3"],"1")}`,t.rootClass);return a.html`
1
+ (()=>{"use strict";var t={"58661bec99a6"(t,e,i){const n=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)};i.d(e,["A",0,n])},"50d2a204ba4c"(t,e,i){i.d(e,{Gw:()=>r,_E:()=>s,l8:()=>a});const n=["arc","breathing","comet","dots"];function a(t,e={}){const i=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&i.setAttribute(t,String(e))}),i}const o=t=>Math.round(1e3*t)/1e3;function r({width:t=24,height:e=24,stroke:i=2,dots:n=8,filled:r=3,dotRadius:s=null,direction:l="clockwise",pixel:d=!1}={}){const c=t/2,h=e/2,u=Math.min(t,e)/2,f=Math.max(1,u-i/2),p=a("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:d?t:null,height:d?e:null,"aria-hidden":"true",focusable:"false"}),m={cx:c,cy:h,r:o(f),fill:"none",stroke:"currentColor","stroke-width":i},g=a("circle",{class:"sf-loader-ring-filled",...m,opacity:"0.3"}),b=a("circle",{class:"sf-loader-ring-accent",...m,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${c} ${h})`}),w=a("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${c} ${h})`});for(let t=0;t<10;t+=1){const e=9===t;w.append(a("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...m,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${o(4)} ${o(96)}`,"stroke-dashoffset":o(-4*t),opacity:o(((t+1)/10)**1.6)}))}const y=Math.max(3,Math.min(32,Math.floor(Number(n)||8))),S=Math.max(1,Math.min(y,Math.floor(Number(r)||3))),v=Math.min(i,.7*Math.PI*(u-i)/y),M=null==s||""===s?v:Math.max(1,Math.min(Number(s)||v,u/4)),k=Math.max(M,u-M),x=a("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${y}; --sf-loader-dot-filled:${S};`});for(let t=0;t<y;t+=1){const e=2*Math.PI/y*t-Math.PI/2,i="counterclockwise"===l?t:(y-t)%y;x.append(a("circle",{class:"sf-loader-dot"+(t<S?" sf-loader-dot--active":""),cx:o(c+k*Math.cos(e)),cy:o(h+k*Math.sin(e)),r:o(M),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${i};`}))}return p.append(g,b,w,x),p}function s(t={}){return r({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}i.d(e,["vv",0,n])},eecc41af23fd(t,e,i){i.a(t,async(t,n)=>{try{i.d(e,{AM:()=>_,KH:()=>E,t7:()=>$});var a=i("d7f974466839"),o=i("58661bec99a6"),r=i("0d662e4d7d63"),s=i("06e8cd089f28"),l=i("50d2a204ba4c"),d=t([r]),c=d.then?(await d)():d;r=c[0];const h={en:{label:"Loading…"},ru:{label:"Загрузка…"}},u=".sf-loader-container",f="sfSpinnerBound";function p(t,e){const i=Number.parseFloat(String(t??""));return Number.isFinite(i)?i:e}function m(t,e,i){return Math.min(Math.max(t,e),i)}function g(t,e,i){const n=String(t||"").trim().toLowerCase();return e.includes(n)?n:i}const b=[["width","data-width","width"],["w","data-w","width"],["height","data-height","height"],["h","data-h","height"],["strokeWidth","data-stroke-width","stroke-width"],["dotRadius","data-dot-radius","dot-radius"]];function w(t){const e=t.closest?.("sf-spinner"),i=b.filter(([e])=>{const i=t.dataset[e];return void 0!==i&&""!==i});return i.forEach(([,t,i])=>{(0,s.YB)({component:e?"sf-spinner":"spinner",kind:"attribute",from:e?i:t,to:e?"size":null})}),i.length>0}function y(t={}){return["width","height","strokeWidth"].some(e=>{const i=t?.[e];return null!=i&&""!==i})?S(t):(0,l._E)(t)}function S({width:t=58,height:e=58,strokeWidth:i=4,dots:n=8,filled:a=3,dotRadius:o=null,direction:r="clockwise"}={}){const s=m(p(t,58),16,256),d=m(p(e,s),16,256),c=m(p(i,4),1,Math.min(s,d)/2);return(0,l.Gw)({width:s,height:d,stroke:c,dots:n,filled:a,dotRadius:o,direction:r,pixel:!0})}function v({width:t=58,height:e=58,dots:i=16,filled:n=6,dotRadius:a=null,direction:o="clockwise"}={}){const r=m(p(t,58),16,256),s=m(p(e,r),16,256),d=m(Math.floor(p(i,16)),3,32),c=m(Math.floor(p(n,6)),1,d),h=null===a?Math.max(1.5,.06*Math.min(r,s)):m(p(a,1),1,Math.min(r,s)/4),u=Math.max(h,Math.min(r,s)/2-h-1),f=r/2,g=s/2,b=(0,l.l8)("svg",{class:"sf-loader-svg",viewBox:`0 0 ${r} ${s}`,width:r,height:s,"aria-hidden":"true",style:`--sf-loader-dot-count:${d}; --sf-loader-dot-filled:${c};`});for(let t=0;t<d;t+=1){const e=2*Math.PI/d*t-Math.PI/2,i=f+u*Math.cos(e),n=g+u*Math.sin(e),a="counterclockwise"===o?t:(d-t)%d,r=(0,l.l8)("circle",{class:"sf-loader-dot"+(t<c?" sf-loader-dot--active":""),cx:i,cy:n,r:h,style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${a};`});b.append(r)}return b}function M(t){const e=t.querySelector(".sf-loader--loading-indicator"),i=t.querySelector(".sf-loader--circles"),n=t.querySelector(".sf-loader--text"),a=Object.prototype.hasOwnProperty.call(t.dataset,"width")||Object.prototype.hasOwnProperty.call(t.dataset,"w"),o=Object.prototype.hasOwnProperty.call(t.dataset,"height")||Object.prototype.hasOwnProperty.call(t.dataset,"h"),r=w(t),s=m(p(t.dataset.width,p(t.dataset.w,58)),16,256),d=m(p(t.dataset.height,p(t.dataset.h,s)),16,256),c=t.dataset.strokeWidth?m(p(t.dataset.strokeWidth,4),1,Math.min(s,d)/2):null,h=m(Math.floor(p(t.dataset.dots,8)),3,32);return{pixel:r,width:s,height:d,strokeWidth:c,dots:h,filled:m(Math.floor(p(t.dataset.filled,3)),1,h),dotRadius:t.dataset.dotRadius?m(p(t.dataset.dotRadius,1),1,Math.min(s,d)/4):null,direction:g(t.dataset.direction,["clockwise","counterclockwise"],"clockwise"),variant:t.dataset.variant?g(t.dataset.variant,l.vv,"arc"):i?"dots":"",hasExplicitWidth:a,hasExplicitHeight:o,infinite:"true"===t.dataset.infinite,announce:"true"===t.dataset.announce,label:void 0!==t.dataset.label?t.dataset.label:n?.textContent?.trim?.()||"",indicator:e,circles:i,labelNode:n}}function k(t,e){const i=Boolean(e.label);if(t.toggleAttribute("aria-hidden",!i),e.announce&&i)return t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),void(t.dataset.sfSpinnerSemantics="status");"status"===t.dataset.sfSpinnerSemantics&&(t.removeAttribute("role"),t.removeAttribute("aria-live"),t.removeAttribute("aria-atomic"),delete t.dataset.sfSpinnerSemantics)}function x(t,e,i){let n=t.querySelector(e);return n?(n.innerHTML="",n):(n=document.createElement("div"),n.className=i,n.dataset.sfSpinnerPart=i,t.append(n),n)}function E(t){if(!(t instanceof HTMLElement))return t;const e=M(t);t.classList.add("sf-loader-container"),e.infinite?t.classList.add("sf-loader--infinite"):t.classList.remove("sf-loader--infinite"),e.pixel&&e.hasExplicitWidth?t.style.setProperty("--sf-loader-svg-width",`${e.width}px`):t.style.removeProperty("--sf-loader-svg-width"),e.pixel&&(e.hasExplicitHeight||e.hasExplicitWidth)?t.style.setProperty("--sf-loader-svg-height",`${e.height}px`):t.style.removeProperty("--sf-loader-svg-height"),null!==e.strokeWidth?t.style.setProperty("--sf-loader-stroke-width",`${e.strokeWidth}px`):t.style.removeProperty("--sf-loader-stroke-width"),t.classList.toggle("sf-loader--pixel-geometry",e.pixel),e.variant&&t.dataset.variant!==e.variant&&(t.dataset.variant=e.variant);const i=t.querySelector(".sf-loader--circles");if(i&&!t.querySelector(".sf-loader--loading-indicator")){const t=document.createElement("div");t.className="sf-loader--loading-indicator",t.dataset.sfSpinnerPart="sf-loader--loading-indicator",i.replaceWith(t)}const n=x(t,".sf-loader--loading-indicator","sf-loader--loading-indicator"),a=e.label||e.labelNode?x(t,".sf-loader--text","sf-loader--text"):null,o=e.pixel?S({...e,strokeWidth:e.strokeWidth??4}):(0,l._E)(e);return n.append(o),a&&(a.textContent=e.label||""),k(t,e),t}function $(t){return t instanceof HTMLElement&&"1"!==t.dataset[f]?(E(t),t.dataset[f]="1",t):t}function _(t){t instanceof HTMLElement&&delete t.dataset[f]}function F(t){(t instanceof Element||t===document)&&(t instanceof Element&&t.matches?.(u)&&$(t),t.querySelectorAll?.(u).forEach($))}class A extends a.y{static componentName="Spinner";constructor(t){super(t);const{width:e,height:i,label:n=(0,r.pageText)(h,"label",t?.root??document.documentElement),variant:a,dots:o=8,filled:s=3,strokeWidth:l=null,dotRadius:d=null,infinite:c=!1,announce:u=!1,direction:f="clockwise"}=this.params||{},p=this.attrs.class||this.attrs.className;this.template=document.createElement("div"),this.id&&(this.template.id=this.id),this.template.classList.add("sf-loader-container"),p&&this.template.classList.add(...`${p}`.split(" ").filter(Boolean)),Object.entries(this.attrs).filter(([t])=>!["class","className"].includes(t)).forEach(([t,e])=>{null!=e&&this.template.setAttribute(t,e)}),null!=e&&""!==e&&(this.template.dataset.width=String(e)),null!=i&&""!==i&&(this.template.dataset.height=String(i)),this.template.dataset.label=String(n??""),null!=a&&""!==a&&(this.template.dataset.variant=String(a)),this.template.dataset.dots=String(o),this.template.dataset.filled=String(s),null!=l&&""!==l&&(this.template.dataset.strokeWidth=String(l)),this.template.dataset.infinite=String(c),this.template.dataset.announce=String(u),this.template.dataset.direction=String(f),null!=d&&(this.template.dataset.dotRadius=String(d))}init(){$(this.template)}destroyInternal(){_(this.template)}}(0,o.A)("Spinner",A),"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.Spinner=window.SF.Spinner||{},window.SF.Spinner.bind=$,window.SF.Spinner.render=E,window.SF.Spinner.unbind=_,window.SF.Spinner.createArcSvg=y,window.SF.Spinner.createDotsSvg=v),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>F(document)):F(document);new MutationObserver(t=>{t.forEach(t=>{t.addedNodes.forEach(t=>{t instanceof Element&&F(t)})})}).observe(document.documentElement,{childList:!0,subtree:!0}),n()}catch(T){n(T)}})},d7f974466839(t,e,i){i.d(e,{y:()=>n});class n{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const i=t.match(/\(([^)]+)\)/g);i&&i.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const i=this.getUtilityMap();if(!i||!i[e])return;this.extractUtilityClasses(i[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}},"06e8cd089f28"(t,e,i){function n(){const t=globalThis.SF=globalThis.SF||{};return t.__deprecationNotes instanceof Map||Object.defineProperty(t,"__deprecationNotes",{value:new Map,configurable:!0}),t.__deprecationNotes}function a({component:t="",kind:e="attribute",attribute:i="",from:a,to:o=null}={}){if(!a)return;const r=[t,e,i,a].join("|"),s=n(),l=s.get(r);if(l)l.count+=1;else if(s.set(r,{component:t,kind:e,attribute:i,from:a,to:o,count:1}),function(){const t=globalThis.document?.documentElement;return"warn"===t?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const n=t?`${t}: `:"",r="value"===e?`${i}="${a}"`:`${e} ${a}`;globalThis.console?.warn?.(`[SIMAI Framework] ${n}${r} is a legacy name${o?`; write ${o}`:""}. See contracts/changes/journal.json.`)}}if(i.d(e,{YB:()=>a}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const t=globalThis.SF.deprecations||{};t.list=function(){return[...n().values()].map(t=>({...t}))},t.clear=function(){n().clear()},t.note=a,globalThis.SF.deprecations=t}},"100381bfa317"(t,e,i){i.a(t,async(t,e)=>{try{var n=i("fbe0570fcc69"),a=i("eecc41af23fd"),o=i("50d2a204ba4c"),r=i("f4cc1d3fd22e"),s=i("0d662e4d7d63"),l=t([n,a,r,s]);[n,a,r,s]=l.then?(await l)():l;var d=i.n(n);const c={en:{label:"Loading…"},ru:{label:"Загрузка…"}};class h extends(d()){static get props(){return{size:{default:"1"},width:{default:""},height:{default:""},label:{default:""},kind:{default:"",values:["",...o.vv],aliases:["variant"]},dots:{default:String(8)},filled:{default:String(3)},strokeWidth:{default:""},dotRadius:{default:""},infinite:{type:Boolean,default:!1},announce:{type:Boolean,default:!1},direction:{default:"clockwise"},rootClass:{default:""}}}constructor(){super(),this._boundRoot=null}get size(){return this.getAttribute("size")||"1"}get width(){return this.getAttribute("width")||""}get height(){return this.getAttribute("height")||""}get label(){return this.hasAttribute("label")?this.getAttribute("label"):(0,s.pageText)(c,"label",this)}get kind(){return this.getProp("kind")}get variant(){return this.kind}get dots(){return this.getAttribute("dots")||String(8)}get filled(){return this.getAttribute("filled")||String(3)}get strokeWidth(){return this.getAttribute("stroke-width")||""}get dotRadius(){return this.getAttribute("dot-radius")||""}get infinite(){return this.getBooleanAttr("infinite",!1)}get announce(){return this.getBooleanAttr("announce",!1)}get direction(){return this.getAttribute("direction")||"clockwise"}templateContext(){const t=this.getPropsContext();return this.createTemplateContext({...t,label:this.label,component:this,rootClass:this.getRootClass()})}template(){return(0,r.a)(this.templateContext())}afterRender(){this._boundRoot&&((0,a.AM)(this._boundRoot),this._boundRoot=null),this._boundRoot=this.getSpinnerRoot(),this._boundRoot&&(0,a.t7)(this._boundRoot)}afterUpdate(){this._boundRoot&&(0,a.KH)(this._boundRoot)}onDisconnected(){this._boundRoot&&((0,a.AM)(this._boundRoot),this._boundRoot=null)}getSpinnerRoot(){return this.querySelector(".sf-loader-container")}refreshSpinner(){return this._boundRoot&&(0,a.KH)(this._boundRoot),this}}h.define("sf-spinner"),e()}catch(t){e(t)}})},f4cc1d3fd22e(t,e,i){i.a(t,async(t,n)=>{try{i.d(e,{a:()=>c});var a=i("ddf1cdb42ecc"),o=t([a]),r=o.then?(await o)():o;a=r[0];function s(...t){return t.flat().filter(Boolean).join(" ")}function l(t){return""===t||null==t?a.nothing:String(t)}function d(t,e,i){const n=String(t||"").trim().toLowerCase();return e.includes(n)?n:i}function c(t){const e=s("sf-loader-container",`sf-loader--size-${d(t.size,["1/3","1/2","1","2","3"],"1")}`,t.rootClass);return a.html`
2
2
  <div
3
3
  class=${e}
4
4
  style=${t.rootStyle||a.nothing}
@@ -56,7 +56,7 @@
56
56
  "label": {
57
57
  "type": "string",
58
58
  "default": "",
59
- "description": "Empty: the text of the page's language (\"Loading...\" in English)."
59
+ "description": "Empty: the text of the page's language (\"Loading…\" in English)."
60
60
  },
61
61
  "kind": {
62
62
  "type": "string",
@@ -272,7 +272,7 @@
272
272
  "source_artifacts": [
273
273
  {
274
274
  "path": "src/smart/spinner/index.js",
275
- "sha256": "8052232930cf7e38d5cc50096a145e33f430d5e7dcc34a1016daa8bb8c2589ca"
275
+ "sha256": "39528a07fd66a5afd26eeab0e80f6e558dd9c6c205f60272c6093f04a3900f7b"
276
276
  },
277
277
  {
278
278
  "path": "src/smart/spinner/js/templates/default.js",
@@ -284,7 +284,7 @@
284
284
  },
285
285
  {
286
286
  "path": "src/smart/spinner/docs/docs.md",
287
- "sha256": "3e92794659fbd5bf75de08cd59f89be32ed00864beed4d868e3e4c58a3c83dce"
287
+ "sha256": "74ae4fe0d02ea97e7b0632d0e0071d2a09dfceb969c050dd3b6b97cc40a5234f"
288
288
  }
289
289
  ],
290
290
  "generated_runtime": [
@@ -1,7 +1,7 @@
1
1
  {
2
- "release": "ui-16caec9d7fff",
3
- "commit": "16caec9d7fff1902140eca352eeddb61c08ace55",
4
- "version": "5.20261020.1647",
2
+ "release": "ui-d985d7cc2e2d",
3
+ "commit": "d985d7cc2e2d2529f4e18e211f05f8c66ac3a655",
4
+ "version": "5.20261020.2008",
5
5
  "files": {
6
6
  "distr/component/accordion/css/accordion.min.css": "sha256-Sn5M6q2XskfMvRHwMFgraYLTGk0vOUDCRFJGQfCsZ4Y=",
7
7
  "distr/component/accordion/js/accordion.min.js": "sha256-HiHgZKWDDIOVBjMwOgKFlJqGKvZWwN3NeJluAWwE6ck=",
@@ -25,7 +25,7 @@
25
25
  "distr/component/button-group/js/button-group.min.js": "sha256-vXsdehcJEAMjGVdEQ6qGcdvvCPQr1LtdGYI+Eu+I3/I=",
26
26
  "distr/component/button-group/json/button-group.utility.json": "sha256-uJuGkVLg3hGH03eSEeCBN9posNuyuWWcSJi1bVRv/Lk=",
27
27
  "distr/component/buttons/css/buttons.min.css": "sha256-b22pBYIlhpKVgmvN9KGzXEmPVLIj38gR2PO2OHdruW0=",
28
- "distr/component/buttons/js/buttons.min.js": "sha256-jEXWHrLtRAAkWRVnL4X4dJVu3b23ssruHbuQCRJL6xE=",
28
+ "distr/component/buttons/js/buttons.min.js": "sha256-W2CvxcUMmNBGKyI7sGiRhPzj8HUUDt0foWHqVqNqPgw=",
29
29
  "distr/component/buttons/json/button.utility.json": "sha256-dIhIS9ZzmbhTm5byz00SCGtVkzizG3l5Gv/j2ptJF8I=",
30
30
  "distr/component/carousel/css/carousel.min.css": "sha256-Ss+m63545IdrzpdLVJetj+ok/ISVqqW+Ndt2KLoptHg=",
31
31
  "distr/component/carousel/js/carousel.min.js": "sha256-6hKv4gX+Jp1jrfWmj2sUEsBPdY5DeNA+3DMZfWF5hSo=",
@@ -566,7 +566,7 @@
566
566
  "distr/component/highlight/css/highlight.min.css": "sha256-CkzUdEq3Bb7pTsKxuWQopMUxgjlxXUpEVemVra/GsXI=",
567
567
  "distr/component/highlight/js/highlight.min.js": "sha256-FPhnC3Q21r7KG9dfTXi59TP4LpTXfcMkIhJaMI74JSI=",
568
568
  "distr/component/icon-buttons/css/icon-buttons.min.css": "sha256-pIONzg0H+2jwy36fAfCZqCePzyHHaBMEQhRp5R81zNg=",
569
- "distr/component/icon-buttons/js/icon-buttons.min.js": "sha256-m7jZ51DrRk/kirSM7OZ3B92crOQWGmtFfMNFaryQlhw=",
569
+ "distr/component/icon-buttons/js/icon-buttons.min.js": "sha256-ZCCf81aKXuNsHG17hNGt3bVXEZUbnYvhQ62MOI4R8MQ=",
570
570
  "distr/component/icon-buttons/json/icon-button.utility.json": "sha256-DD61rN5Kd//tcoqrq//RVB3eX264Lz+I5+amZn6ZnWg=",
571
571
  "distr/component/icons/a5f1f832a64baed42867.woff2": "sha256-C5ovR0BWktPf9YpfV5f0jFCExYCGIEI+BHPrVniXr74=",
572
572
  "distr/component/icons/css/icons.min.css": "sha256-fLUJsyfZ+P1SAvkxbo+aMw3UbrZRFUo9gnZaaZgBBi8=",
@@ -588,7 +588,7 @@
588
588
  "distr/component/menu/js/menu.min.js": "sha256-UKCL7nLHHRnR45VU5B8P2NKxafYzv8lSNPQNcB1wFK8=",
589
589
  "distr/component/menu/json/menu.utility.json": "sha256-ULonFm8I+Yez31D8MtkIF5VG/IZlo9VXgqkcz4eF1Dk=",
590
590
  "distr/component/modal/css/modal.min.css": "sha256-F7K7x/b/IQZ5QqmoZUv/jTFh1JrdrwcxsH7iqYhK64A=",
591
- "distr/component/modal/js/modal.min.js": "sha256-e94xCzIuF6r7lrGxUW3v2QyuzZsGtzu6lRyOMgFOEEY=",
591
+ "distr/component/modal/js/modal.min.js": "sha256-cD9n3KpHIVogZBOfjkwKPxfaUjpPudaTcZYy+MdlFRc=",
592
592
  "distr/component/outline/css/outline.min.css": "sha256-HPcK6/vQK/kgpEh70HAsfED0mi+5z7XO6hZtFKw8Q2M=",
593
593
  "distr/component/outline/js/outline.min.js": "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=",
594
594
  "distr/component/overbox/css/overbox.min.css": "sha256-Q05DaW/du6OpcxUsSNj5pTyT5s1m/AEJDnlxbpRiQas=",
@@ -622,8 +622,8 @@
622
622
  "distr/component/slider/js/slider.min.js": "sha256-OCivyckysZ+Ok7j2wSITdDs4xB5EFJNcfo+p7uNk2FE=",
623
623
  "distr/component/special/css/special.min.css": "sha256-LyuJufcTSokkXcTtk04ZPZABQbzUbMesietxkvhbMWc=",
624
624
  "distr/component/special/js/special.min.js": "sha256-DrPBDCpuQIaV5nGPIJg3SKfaHWAwrEtpTW4cuH1m1ps=",
625
- "distr/component/spinner/css/spinner.min.css": "sha256-VDZ/teljjA/LkMmssPATqND9yJTwzRKwJYruG+ViU/U=",
626
- "distr/component/spinner/js/spinner.min.js": "sha256-ggVCk0QeWS5KeK8q7GjF/N3m05veFYVi2sb+AhBrH4w=",
625
+ "distr/component/spinner/css/spinner.min.css": "sha256-KyPpkIjIePrxb/pNALJHifjnPRqAP/Dz/fMnU2fONxs=",
626
+ "distr/component/spinner/js/spinner.min.js": "sha256-+hYP5WTeJCFoOTjHEWgnDK8fgTszofWJ/97xvUiCACU=",
627
627
  "distr/component/step/css/step.min.css": "sha256-EqYffAqUsMIYmknyrGYRtH2AsjAbresxU+QgMrh7gK0=",
628
628
  "distr/component/step/js/step.min.js": "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=",
629
629
  "distr/component/swiper/css/swiper.min.css": "sha256-gGSyNwjR+d+ouJTh8MJlmcZx61C2NzTamzUFMgiXcX4=",
@@ -1606,12 +1606,12 @@
1606
1606
  "distr/smart/breadcrumbs/studio.fixture.json": "sha256-QRDugNCfdC/0p/RpRlI4Cz8ASQJ1i3YwBr5Kw/ZXAPE=",
1607
1607
  "distr/smart/breadcrumbs/studio.scenario.json": "sha256-HdTNDqxlL+ZCbBQd7k0Fu53cjYWdOaAJHftm5yTFPeg=",
1608
1608
  "distr/smart/breadcrumbs/template/default.js": "sha256-vGd/ykvgOuzmHRNBjz4nkJS89kn8JUkC106QsTM+X2U=",
1609
- "distr/smart/button-group/js/button-group.min.js": "sha256-4VF8iwYVV/z3QOmhEmE6Hl3qgZLVaqIqUf72+dPPx78=",
1609
+ "distr/smart/button-group/js/button-group.min.js": "sha256-o/F7QGy2hxE/FW6WTLINTJqOhxbpVnwUGPMT2nuj2IQ=",
1610
1610
  "distr/smart/button-group/smart.manifest.json": "sha256-WGXqUUc/71I8JKEQ1k6PHv9ep25EbtOTVOubg3fDIG4=",
1611
1611
  "distr/smart/button-group/studio.fixture.json": "sha256-rJ/uRxQgxyNRFI1zCfG5yIl6tKqMXaWoZBxb3AlW6wE=",
1612
1612
  "distr/smart/button-group/studio.scenario.json": "sha256-lOK6oz/lGuP3xbbaHZFU1KNH1P/ALI8Gg4ACocAwUH4=",
1613
1613
  "distr/smart/button-group/template/default.js": "sha256-1kShck1HW/+re/cCUvaHVwLLfXJQviWxNMTW9Zg3mmY=",
1614
- "distr/smart/buttons/js/buttons.min.js": "sha256-2DDyx/XPvOMERgBlkUP6Ecj1TDozImHUcmh+xgOprrg=",
1614
+ "distr/smart/buttons/js/buttons.min.js": "sha256-KF/arhZlmwjZq+B5OHRTbMQVQ5yZpwWx9HEol35V5Rg=",
1615
1615
  "distr/smart/buttons/smart.manifest.json": "sha256-RGK54bJr++dH0FBSQY53BSDEu6N3s6ezdm7zrZGZBIg=",
1616
1616
  "distr/smart/buttons/studio.fixture.json": "sha256-a98vkqYFlyIJNAhQMKA5tdlWJCmtP6z4rl019PoLrHw=",
1617
1617
  "distr/smart/buttons/studio.scenario.json": "sha256-YnipuyuoGQRtDBGOFrKHyiRv0SOHgN9F/gtJ/X50JrA=",
@@ -1706,7 +1706,7 @@
1706
1706
  "distr/smart/help-mark/studio.scenario.json": "sha256-mMUXYRyV4Eu4uJqzI1LmjUy8BdQHGSWuQpXc/IfKans=",
1707
1707
  "distr/smart/help-mark/template/default.js": "sha256-+cw7nkpfXmVUpvoQSZGx5byhH8VBsSCmGXcpH4mOAx0=",
1708
1708
  "distr/smart/icon-buttons/css/icon-buttons.min.css": "sha256-HPdh7dNrw76hmHy69Q/tX2k91f6XGlLXZw323/CeR1w=",
1709
- "distr/smart/icon-buttons/js/icon-buttons.min.js": "sha256-/JluvBaaZyk1eUw4hEeH1Gmqah9sw673RCZxVu+092M=",
1709
+ "distr/smart/icon-buttons/js/icon-buttons.min.js": "sha256-OB/qGng+wWiOsfAO48Fs7qxpnEHsVfRgZlj/LUwvuoQ=",
1710
1710
  "distr/smart/icon-buttons/smart.manifest.json": "sha256-2wpYwDbiT/QERcKlLsMUAOhj0hlu+9HhYbueOWQqTww=",
1711
1711
  "distr/smart/icon-buttons/studio.fixture.json": "sha256-qe0jlTL4VljC1mDUwqQM5WkZt2veUVZXIv4wBHGBhss=",
1712
1712
  "distr/smart/icon-buttons/studio.scenario.json": "sha256-Xm9bpPkbPBgpZSRHWEVHTxKWfbGatevxlSRXqyGD4eA=",
@@ -1735,8 +1735,8 @@
1735
1735
  "distr/smart/list-item/studio.scenario.json": "sha256-QV96Pj3s2y5VrEQS+5NTJGPB4kBTSuDfnyLu5+ntF18=",
1736
1736
  "distr/smart/list-item/template/default.js": "sha256-vsUITMMOuTviBpd9UiGbeS2HJP7GgiFzPvCcE4Y+8uI=",
1737
1737
  "distr/smart/modal/contract.json": "sha256-GDaaHGEkDYDATpFEuU9kaORWORJ0kjtIEZoZaUbTJOs=",
1738
- "distr/smart/modal/js/modal.min.js": "sha256-4dZ2xzbna0Hf+wRkdl6ZPdm9+r9bzwX8Sme8apJoJPc=",
1739
- "distr/smart/modal/smart.manifest.json": "sha256-Y1I1dzc7qwyl16ZazRtdC5I0cKZXUlrwnjkeqqN2g2Y=",
1738
+ "distr/smart/modal/js/modal.min.js": "sha256-WtBGhev1+0O2Hy919YVZUF1DiUE27JWKqUN7HOmE870=",
1739
+ "distr/smart/modal/smart.manifest.json": "sha256-WgHy1b0t1Wmh9ZWOKxRUoDkR2XVVUPaHLaTCfEh52jU=",
1740
1740
  "distr/smart/modal/studio.fixture.json": "sha256-jzGT/qtAlMGv5qNfVRoAvSV0Y9cqZv/PcQZ8699NAbQ=",
1741
1741
  "distr/smart/modal/studio.scenario.json": "sha256-Xl5opdE1PhytliQt++Cr5Uk9MGImk/t/EPCkAxXCNl0=",
1742
1742
  "distr/smart/modal/template/default.js": "sha256-hFV4VaW3Le7pOwq1jdD1fkstWWxOTItQXpfoPlapP0w=",
@@ -1807,8 +1807,8 @@
1807
1807
  "distr/smart/sortable/smart.manifest.json": "sha256-Y+QqmaZN0Dz5WQrVhd1OE/yy0vmFDr4xAjhnPDum6Pk=",
1808
1808
  "distr/smart/sortable/studio.fixture.json": "sha256-jyS0j3s74TnL9aeUmVj3Usd3PLIswNZu01R0fZPdGHQ=",
1809
1809
  "distr/smart/sortable/studio.scenario.json": "sha256-5/a9AnHKFp7NxNEOd5Dnl+9IpLIBl0QKXywfNA1tGnc=",
1810
- "distr/smart/spinner/js/spinner.min.js": "sha256-NDCk7t/aG6+Ba0741+rzp6S+pqQVlqsSUUeVDmad1QQ=",
1811
- "distr/smart/spinner/smart.manifest.json": "sha256-vZSrseSObXH6fCaXwcff3CKHp3MMwSLGUDr5h+XvsmE=",
1810
+ "distr/smart/spinner/js/spinner.min.js": "sha256-idNxCmOzkN4lvwpWAZ6X2WaWB8dX534PWADNBcbFIJY=",
1811
+ "distr/smart/spinner/smart.manifest.json": "sha256-ZEpGaWJM1eEjK0ONU4YyV97cSenr4wTaC9U/XP1MJyo=",
1812
1812
  "distr/smart/spinner/studio.fixture.json": "sha256-obxROVRecLp7BXSERF4lHEgTnPrf3yAHrxsGwHatAyA=",
1813
1813
  "distr/smart/spinner/studio.scenario.json": "sha256-cjLxETLt4toOqem1SNv5lC9iVHfcncywCWnxtFJUTls=",
1814
1814
  "distr/smart/spinner/template/default.js": "sha256-JX/HWpKeWEMl5GBdp2QwoBLTRxLnMiZ3VOa13o4DOF4=",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@simai-studio/ui",
3
- "version": "5.20261020.1647",
4
- "description": "SIMAI Framework distribution, release ui-16caec9d7fff: Core, the Loader, components, utilities and Smart Components, ready to serve from distr/.",
3
+ "version": "5.20261020.2008",
4
+ "description": "SIMAI Framework distribution, release ui-d985d7cc2e2d: Core, the Loader, components, utilities and Smart Components, ready to serve from distr/.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://ui.simai.io/",
7
7
  "repository": {
@@ -17,7 +17,7 @@
17
17
  "README.md"
18
18
  ],
19
19
  "simai": {
20
- "release": "ui-16caec9d7fff",
21
- "commit": "16caec9d7fff1902140eca352eeddb61c08ace55"
20
+ "release": "ui-d985d7cc2e2d",
21
+ "commit": "d985d7cc2e2d2529f4e18e211f05f8c66ac3a655"
22
22
  }
23
23
  }