/*! For license information please see client.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PageConstructorClient=t():e.PageConstructorClient=t()}(self,()=>(()=>{var e,t,n,r,a={197:()=>{},251:(e,t)=>{t.read=function(e,t,n,r,a){var i,o,l=8*a-r-1,s=(1<>1,u=-7,d=n?a-1:0,p=n?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-u)-1,h>>=-u,u+=l;u>0;i=256*i+e[t+d],d+=p,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=p,u-=8);if(0===i)i=1-c;else{if(i===s)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),i-=c}return(h?-1:1)*o*Math.pow(2,i-r)},t.write=function(e,t,n,r,a,i){var o,l,s,c=8*i-a-1,u=(1<>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-o))<1&&(o--,s*=2),(t+=o+d>=1?p/s:p*Math.pow(2,1-d))*s>=2&&(o++,s/=2),o+d>=u?(l=0,o=u):o+d>=1?(l=(t*s-1)*Math.pow(2,a),o+=d):(l=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[n+h]=255&l,h+=f,l/=256,a-=8);for(o=o<0;e[n+h]=255&o,h+=f,o/=256,c-=8);e[n+h-f]|=128*m}},659:(e,t,n)=>{var r=n(51873),a=Object.prototype,i=a.hasOwnProperty,o=a.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var a=o.call(e);return r&&(t?e[l]=n:delete e[l]),a}},773:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Dots=void 0;var a=l(n(96540)),i=l(n(46942)),o=n(29445);function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){for(var n=0;n=C&&f<=y:f===C}),S={message:"dots",index:w,slidesToScroll:d,currentSlide:f},A=this.clickHandler.bind(this,S);g=g.concat(a.default.createElement("li",{key:w,className:E},a.default.cloneElement(this.props.customPaging(w),{onClick:A})))}return a.default.cloneElement(this.props.appendDots(g),function(e){for(var t=1;t{e.exports=function(e){return e&&e.length?e[0]:void 0}},920:(e,t,n)=>{"use strict";var r=n(69675),a=n(58859),i=n(14803),o=n(80507),l=n(72271)||o||i;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r("Side channel does not contain "+a(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||(e=l()),e.set(t,n)}};return t}},1733:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},1882:(e,t,n)=>{var r=n(72552),a=n(23805);e.exports=function(e){if(!a(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},2404:(e,t,n)=>{var r=n(60270);e.exports=function(e,t){return r(e,t)}},2523:e=>{e.exports=function(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i{"use strict";var r=n(6925);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},2795:(e,t,n)=>{"use strict";n.d(t,{$D:()=>s,If:()=>c,zm:()=>l});var r=n(51009),a=n(54699),i=n(27783);let o=1;function l(){return`${a.CU}uniq-${o++}`}const s=(0,i.g)("svg"),c=(0,i.g)(r.I)},3089:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});const r=n(96540).createContext(void 0);r.displayName="ThemeSettingsContext"},3119:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.03 1.97a.75.75 0 0 0-1.06 1.06l.83.83A8.2 8.2 0 0 0 .5 6.876l-.26.585a1.33 1.33 0 0 0 0 1.079l.26.585a8.21 8.21 0 0 0 11.434 3.87l1.036 1.035a.75.75 0 1 0 1.06-1.06zm7.788 9.908-1.294-1.293a3 3 0 0 1-4.109-4.109L3.866 4.927A6.7 6.7 0 0 0 1.87 7.486L1.641 8l.23.515a6.71 6.71 0 0 0 8.947 3.363M6.55 7.611A1.502 1.502 0 0 0 8.389 9.45zm1.658-2.604 2.784 2.784a3 3 0 0 0-2.784-2.784m5.92 3.508a6.7 6.7 0 0 1-.915 1.496l1.065 1.066A8.2 8.2 0 0 0 15.5 9.125l.26-.585a1.33 1.33 0 0 0 0-1.08l-.26-.584A8.21 8.21 0 0 0 5.572 2.37L6.81 3.61a6.71 6.71 0 0 1 7.32 3.877l.228.514z",clipRule:"evenodd"}))},3650:(e,t,n)=>{var r=n(74335)(Object.keys,Object);e.exports=r},3656:(e,t,n)=>{e=n.nmd(e);var r=n(9325),a=n(89935),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,l=o&&o.exports===i?r.Buffer:void 0,s=(l?l.isBuffer:void 0)||a;e.exports=s},4509:(e,t,n)=>{var r=n(12651);e.exports=function(e){return r(this,e).has(e)}},4589:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=((r=n(38120))&&r.__esModule?r:{default:r}).default;t.default=a},4664:(e,t,n)=>{var r=n(79770),a=n(63345),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,l=o?function(e){return null==e?[]:(e=Object(e),r(o(e),function(t){return i.call(e,t)}))}:a;e.exports=l},4777:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AVATAR_SIZES:()=>Un,Accordion:()=>Ie,ActionTooltip:()=>pt,ActionsPanel:()=>sn,Alert:()=>qn,ArrowToggle:()=>fe,Avatar:()=>Xn,AvatarStack:()=>dr,Box:()=>gn,Breadcrumbs:()=>Rr,BreadcrumbsItem:()=>kr,Button:()=>ft.$,ButtonIcon:()=>jr.a,Card:()=>bn,Checkbox:()=>Br,ClipboardButton:()=>Gr,ClipboardIcon:()=>_r.u,Col:()=>lb,Container:()=>pb,CopyToClipboard:()=>Dr.$,DEFAULT_AVATAR_SIZE:()=>$n,DEFAULT_RENDER_POPUP:()=>Zh,DEFAULT_USER_LABEL_SIZE:()=>Dw,DEFAULT_USER_SIZE:()=>Tw,DefinitionList:()=>ha,DefinitionListItem:()=>pa,Dialog:()=>La,DialogBody:()=>Sa,DialogDivider:()=>ka,DialogFooter:()=>Ra,DialogHeader:()=>Oa,Disclosure:()=>xe,DisclosureQa:()=>ce,Divider:()=>Ta,Drawer:()=>Fa,DropdownMenu:()=>Xt,EventBroker:()=>Ot.a,FilePreview:()=>vp,Flex:()=>En,HelpMark:()=>oa,Hotkey:()=>Ge,Icon:()=>pe.I,Label:()=>gp.J,Lang:()=>r.JA,Link:()=>ud.N,List:()=>Xd,ListItem:()=>Wd,ListQa:()=>Vd,Loader:()=>Bd,Menu:()=>Tt,MenuGroup:()=>jt,MenuItem:()=>Lt,MobileContext:()=>l,MobileProvider:()=>d,Modal:()=>ma.a,NumberInput:()=>Tp,Overlay:()=>Pp,Pagination:()=>tf,Palette:()=>rf,PasswordInput:()=>ib,PinInput:()=>df,PlaceholderContainer:()=>ff,Platform:()=>i.O,Popover:()=>ra,Popup:()=>Dt.z,Portal:()=>tt.Z,PortalProvider:()=>_b.G,Progress:()=>Ef,Radio:()=>kf,RadioGroup:()=>jf,Row:()=>cb,SegmentedRadioGroup:()=>Tf,SegmentedRadioGroupOption:()=>Lf,Select:()=>Yh,SelectItem:()=>Gh,SelectItemGroup:()=>Kh,SelectQa:()=>sh,Sheet:()=>ip,Skeleton:()=>Pf,Slider:()=>qm,Spin:()=>Qm.t,Stepper:()=>Ym,Switch:()=>Jm,TEXT_COLORS:()=>vt,TEXT_VARIANTS:()=>bt,Tab:()=>Zg,TabList:()=>Kg,TabPanel:()=>Yg,TabProvider:()=>Dg,Table:()=>cv,TableColumnSetup:()=>Bg,TableSortIndicator:()=>Tv,Text:()=>xt,TextArea:()=>Xw,TextInput:()=>zd,ThemeContext:()=>g.D,ThemeProvider:()=>w.N,ThemeSettingsContext:()=>b.y,Toast:()=>uw,Toaster:()=>tw,ToasterComponent:()=>kw,ToasterProvider:()=>Mw,Toc:()=>zw,Tooltip:()=>st,User:()=>_w,UserLabel:()=>Kw,UserQa:()=>Pw,colorText:()=>gt,configure:()=>r.jK,copyTextToClipboard:()=>Kr.D,defaultRenderItem:()=>Ud,eventBroker:()=>Ot.o,formatClass:()=>fb,generateColor:()=>Ob,generateCustomColor:()=>Nb,getAvatarDisplayText:()=>Yn,getComponentName:()=>f,getConfig:()=>r.zj,getElementRef:()=>nt,getFileType:()=>hp,getLayersCount:()=>gb.m,getSelectFilteredOptions:()=>$h,getThemeType:()=>A,getUniqId:()=>Td.zm,getXpath:()=>Eb,isSelectGroupTitle:()=>vh,isTouchDevice:()=>Ub,layerManager:()=>gb.F,listDefaultProps:()=>Yd,mergeRefs:()=>Tb.P,parseClass:()=>hb,parseHotkeys:()=>Ke,prepareSliderInnerState:()=>Vm,rootMobileClassName:()=>i.w,setRef:()=>Ib.c,sp:()=>mn,spacing:()=>fn,text:()=>yt,useActionHandlers:()=>Et.N,useAsyncActionHandler:()=>Sb,useColorGenerator:()=>Lb,useControlledState:()=>L,useDirection:()=>M,useEventBroker:()=>mb,useFileInput:()=>zb,useFocusWithin:()=>eh,useForkRef:()=>Xe.N,useIntersection:()=>Id,useLang:()=>N.uU,useLayer:()=>wb.Z,useLayoutContext:()=>xn,useLayoutEffect:()=>It.N,useListNavigation:()=>_t,useMobile:()=>p,useOutsideClick:()=>Pb,usePlatform:()=>h,usePortalContainer:()=>Bb.P,useResizeObserver:()=>pr.w,useSelect:()=>Xp,useSelectOptions:()=>Wh,useTheme:()=>x,useThemeSettings:()=>E,useThemeType:()=>k,useThemeValue:()=>C,useTimeout:()=>nw,useToaster:()=>pw,useUniqId:()=>P.u,useViewportSize:()=>Hb,useVirtualElement:()=>qb,useVirtualElementRef:()=>Fb,withDirection:()=>O,withEventBrokerDomHandlers:()=>vb,withMobile:()=>v,withPlatform:()=>m,withTableActions:()=>Mv,withTableCopy:()=>jv,withTableSelection:()=>vv,withTableSettings:()=>Lg,withTableSorting:()=>Pv,withTheme:()=>R,withThemeValue:()=>j,withToaster:()=>hw,withoutClassMods:()=>yb});var r=n(34975),a=n(96540),i=n(89992);const o={mobile:!1,platform:i.O.BROWSER,useHistory:()=>({action:"",replace(){},push(){},goBack(){}}),useLocation:()=>({pathname:"",search:"",hash:""})},l=a.createContext(o);var s=n(74848);function c(){return{action:"",replace(){},push(){},goBack(){}}}function u(){return{pathname:"",search:"",hash:""}}function d({mobile:e=!1,platform:t=i.O.BROWSER,useHistory:n=c,useLocation:r=u,children:o}){const d=a.useCallback(function(){const{goBack:e,back:t,...r}=n();let a;return a="function"==typeof e?e:"function"==typeof t?t:()=>{},{...r,goBack:a}},[n]);a.useEffect(()=>{document.body.classList.toggle(i.w,e)},[i.w,e]);const p=a.useMemo(()=>({mobile:e,platform:t,useLocation:r,useHistory:d}),[e,t,r,d]);return(0,s.jsx)(l.Provider,{value:p,children:o})}function p(){return a.useContext(l).mobile}function h(){return a.useContext(l).platform}function f(e){return e.displayName||e.name||"Component"}function m(e){const t=f(e);return class extends a.Component{static displayName=`withPlatform(${t})`;static contextType=l;render(){return(0,s.jsx)(e,{...this.props,platform:this.context.platform})}}}function v(e){const t=f(e);return class extends a.Component{static displayName=`withMobile(${t})`;static contextType=l;render(){return(0,s.jsx)(e,{...this.props,mobile:this.context.mobile,platform:this.context.platform,useHistory:this.context.useHistory,useLocation:this.context.useLocation})}}}var g=n(35870),w=n(69709),b=n(3089),y=n(35663);function x(){return(0,y.w)().theme}function C(){return(0,y.w)().themeValue}function E(){const e=a.useContext(b.y);if(void 0===e)throw new Error("useThemeSettings must be used within ThemeProvider");return e}var S=n(63613);function A(e){return S.Qp.includes(e)?"dark":"light"}function k(){return A(C())}function M(){return(0,y.w)().direction}function R(e){const t=f(e),n=function(t){const n=x();return(0,s.jsx)(e,{...t,theme:n})};return n.displayName=`withTheme(${t})`,n}function j(e){const t=f(e),n=function(t){const n=C();return(0,s.jsx)(e,{...t,themeValue:n})};return n.displayName=`withThemeValue(${t})`,n}function O(e){const t=f(e),n=function(t){const n=M();return(0,s.jsx)(e,{...t,direction:n})};return n.displayName=`withDirection(${t})`,n}var N=n(79711);function L(e,t,n){const[r,i]=a.useState(e??t),o=a.useRef(void 0!==e),l=void 0!==e;a.useEffect(()=>{const e=o.current;e!==l&&console.error(`[useControlledState] A component changed from ${e?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),o.current=l},[l]);let s=l?e:r;const c=a.useCallback((e,...t)=>{Object.is(s,e)||n?.(e,...t),l||(s=e,i(e))},[l,n,s]);return[s,c]}const z=a.createContext({size:"m",view:"solid",multiple:!1,arrowPosition:"start",ariaLevel:3,items:null,updateItems:()=>{},registerSummary:()=>{},unregisterSummary:()=>{},getSummaryRefs:()=>[]});function T(e){const{ariaLevel:t,children:n,arrowPosition:r,size:i,view:o,multiple:l,defaultValue:c,onUpdate:u,value:d}=e,[p,h]=L(d,void 0!==c?c:l?[]:null,u),f=a.useRef(new Map);a.useEffect(()=>{Array.isArray(p)||!l||h(p?[p]:[])},[l]);const m=a.useCallback((e,t)=>{f.current.set(e,t)},[]),v=a.useCallback(e=>{f.current.delete(e)},[]),g=a.useCallback(()=>Array.from(f.current.values()).filter(e=>!e.disabled),[]);return(0,s.jsx)(z.Provider,{value:{ariaLevel:t,arrowPosition:r,size:i,view:o,multiple:l,items:p,updateItems:e=>{if(l){const t=p||[];let n=[];return n=t.includes(e)?t.filter(t=>t!==e):[...t,e],void h(n)}let t=e;e===p&&(t=null),h(t)},registerSummary:m,unregisterSummary:v,getSummaryRefs:g},children:n})}function I(){return a.useContext(z)}var P=n(53681),B=n(27783);const _=a.createContext(void 0),D=a.createContext(void 0);function H(e){const{size:t,disabled:n,defaultExpanded:r,arrowPosition:i,summary:o,keepMounted:l,onUpdate:c,onSummaryKeyDown:u,expanded:d}=e,[p,h]=a.useState(()=>Boolean(r)),f=void 0!==d,m=(0,P.u)(),v=`disclosure${m}`;return(0,s.jsx)(_.Provider,{value:{size:t,disabled:n,summary:o,arrowPosition:i,keepMounted:l,expanded:f?d:p,ariaControls:m,ariaLabelledby:v,onSummaryKeyDown:u},children:(0,s.jsx)(D.Provider,{value:()=>{h(e=>!e),c(f?!d:!p)},children:e.children})})}function V(){const e=a.useContext(_);if(void 0===e)throw new Error("useDisclosureAttributes must be used within DisclosureProvider");return e}function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.current?.addEventListener("animationend",e),classNames:le(se),mountOnEnter:!l,unmountOnExit:!l,appear:!0,children:(0,s.jsx)("div",{ref:r,id:i,role:"region","aria-labelledby":o,className:se("content",{visible:c},n),"data-qa":t||ce.DETAILS,children:e})})}ue.displayName="DisclosureDetails";var de=n(88786),pe=n(51009);const he=(0,oe.om)("arrow-toggle");function fe({size:e=16,direction:t="bottom",className:n,qa:r}){return(0,s.jsx)("span",{style:{width:e,height:e},className:he({direction:t},n),"data-qa":r,children:(0,s.jsx)(pe.I,{data:de.A,size:e})})}var me=n(47954);const ve={m:14,l:16,xl:20};function ge(){(0,me.m)('[Disclosure] Physical values (left, right) of "arrowPosition" property are deprecated. Use logical values (start, end) instead.')}function we({children:e,qa:t}){const n=function(){const e=a.useContext(D);if(void 0===e)throw new Error("useToggleDisclosure must be used within DisclosureProvider");return e}(),{ariaControls:r,ariaLabelledby:i,expanded:o,disabled:l,onSummaryKeyDown:c}=V(),u={onClick:n,ariaControls:r,id:i,expanded:o,disabled:l,qa:t,onKeyDown:c};return e(u,(0,s.jsx)(be,{...u}))}const be=a.forwardRef(function({onClick:e,ariaControls:t,id:n,expanded:r,disabled:a,qa:i,onKeyDown:o,className:l},c){const{size:u,summary:d,arrowPosition:p}=V();let h=p;return"left"===h&&(ge(),h="start"),"right"===h&&(ge(),h="end"),(0,s.jsxs)("button",{type:"button","aria-expanded":r,className:se("trigger",{disabled:a,arrow:h},l),"aria-controls":t,id:n,onClick:e,disabled:a,"data-qa":i||ce.SUMMARY,onKeyDown:o,ref:c,children:[(0,s.jsx)(fe,{size:ve[u],direction:r?"top":"bottom"}),d]})});we.displayName="DisclosureSummary";const ye=(0,B.g)(we),xe=a.forwardRef(function(e,t){const{size:n="m",disabled:r=!1,defaultExpanded:i=!1,arrowPosition:o="start",summary:l="",className:c,keepMounted:u=!0,children:d,onUpdate:p=()=>{},onSummaryKeyDown:h,expanded:f,qa:m}=e,[v,g]=function(e,{disclosureQa:t}){const n=a.Children.toArray(e);let r,i;const o=[];for(const e of n)if(ye(e)){if(r)throw new Error("Only one component is allowed");r=e}else o.push(e);return o.length>0&&(i=(0,s.jsx)(ue,{qa:t&&`${t}-details`,children:o})),r||(r=(0,s.jsx)(we,{qa:t&&`${t}-summary`,children:e=>(0,s.jsx)(be,{...e})})),[r,i]}(d,{disclosureQa:m});return(0,s.jsx)(H,{disabled:r,defaultExpanded:i,expanded:f,keepMounted:u,size:n,summary:l,arrowPosition:o,onUpdate:p,onSummaryKeyDown:h,children:(0,s.jsxs)("section",{ref:t,className:se({size:n},c),"data-qa":m,children:[v,g]})})});xe.Summary=we,xe.Details=ue,xe.displayName="Disclosure";var Ce=n(95100);const Ee=(0,oe.om)("accordion"),Se=(0,oe.om)("accordion-item"),Ae=(0,oe.om)("accordion-summary"),ke=Ae("trigger"),Me=Se("details");function Re(e){const{children:t,qa:n}=e,{registerSummary:r,unregisterSummary:i,getSummaryRefs:o,arrowPosition:l,size:c,ariaLevel:u}=I(),d=(0,P.u)(),[p,h]=a.useState(null);return a.useEffect(()=>{if(p){const e={element:p,disabled:p.disabled};r(d,e)}return()=>{i(d)}},[d,p,r,i]),(0,s.jsx)("div",{role:"heading","aria-level":u,className:Ae({size:c,arrow_position:l}),children:(0,s.jsx)(xe.Summary,{qa:n,children:(e,n)=>{const r={...e,onKeyDown:t=>{(e=>{if(e.key===Ce.D.ARROW_DOWN||e.key===Ce.D.ARROW_UP||e.key===Ce.D.HOME||e.key===Ce.D.END){e.preventDefault();const t=o();if(0===t.length)return;if(e.key===Ce.D.HOME)return void t[0]?.element.focus();if(e.key===Ce.D.END)return void t[t.length-1]?.element.focus();const n=t.findIndex(t=>t.element===e.currentTarget);if(-1===n)return;const r=e.key===Ce.D.ARROW_DOWN?(n+1)%t.length:(n-1+t.length)%t.length;t?.[r]?.element.focus()}})(t),e.onKeyDown&&e.onKeyDown(t)},ref:e=>{h(e)}};return t(r,n)}})})}const je=(0,B.g)(Re);Re.displayName="DisclosureSummary";const Oe=a.forwardRef(function(e,t){const{children:n,expanded:r,defaultExpanded:i,disabled:o,keepMounted:l,value:c,summary:u,onUpdate:d,qa:p}=e,h=I(),{id:f,isExpanded:m,handleUpdate:v}=function({expanded:e,defaultExpanded:t,value:n,onUpdate:r}){const i=(0,P.u)(),{items:o,updateItems:l}=I(),s=void 0!==e,c=void 0!==t,u=a.useMemo(()=>s?e:!c&&(Array.isArray(o)?o.includes(n??i):o===(n??i)),[s,e,c,o,n,i]),d=a.useCallback(e=>{r?.(e),s||c||l(n??i)},[r,s,c,l,n,i]);return{id:i,isExpanded:u,handleUpdate:d}}({expanded:r,defaultExpanded:i,value:c,onUpdate:d}),[g,w]=a.useMemo(()=>function(e,t){const n=a.Children.toArray(e);let r,i;const o=[];for(const e of n)if(je(e)){if(r)throw new Error("Only one component is allowed");r=e}else o.push(e);o.length>0&&(i=(0,s.jsx)(a.Fragment,{children:o}));const l=t?`${t}-summary`:void 0;return r||(r=(0,s.jsx)(Re,{children:e=>(0,s.jsx)(be,{...e,qa:l,className:ke})})),[r,i]}(n,p),[n,p]);return(0,s.jsxs)(xe,{arrowPosition:h?.arrowPosition,keepMounted:l,onUpdate:v,expanded:i?void 0:m,defaultExpanded:i,summary:u,disabled:o,qa:p,className:Se({size:h?.size,view:h?.view,disabled:o}),children:[g,(0,s.jsx)(xe.Details,{className:Me,children:w})]},c??f)});var Ne=n(22744);const Le=JSON.parse('{"label":"Accordion"}'),ze=JSON.parse('{"label":"Аккордеон"}'),Te=(0,Ne.N)({en:Le,ru:ze},"Accordion"),Ie=a.forwardRef(function(e,t){const{t:n}=Te.useTranslation(),{size:r="m",view:a="solid",multiple:i=!1,className:o,arrowPosition:l="end",qa:c,defaultValue:u,onUpdate:d=()=>{},children:p,ariaLevel:h=3,value:f,ariaLabel:m=n("label")}=e;return(0,s.jsx)(T,{size:r,view:a,multiple:i,arrowPosition:l,onUpdate:d,defaultValue:u,value:f,ariaLevel:h,children:(0,s.jsx)("div",{className:Ee({size:r,view:a},o),"data-qa":c,ref:t,role:"region","aria-label":m,children:p})})});Ie.Item=Oe,Ie.Summary=Re,Ie.displayName="Accordion";var Pe=n(37242);const Be={pc:{NormalizeMap:{arrowup:"up",arrowdown:"down",arrowleft:"left",arrowright:"right",esc:"escape",return:"enter",mod:"ctrl",control:"ctrl",opt:"alt",option:"alt",cmd:"ctrl",command:"ctrl"},Priority:{shift:200,alt:300,ctrl:400},DisplayName:{up:"↑",down:"↓",left:"←",right:"→",escape:"Esc",plus:"+",minus:"-",enter:"Enter",ctrl:"Ctrl",alt:"Alt",shift:"Shift",tab:"Tab",backspace:"Backspace"}},mac:{NormalizeMap:{arrowup:"up",arrowdown:"down",arrowleft:"left",arrowright:"right",esc:"escape",enter:"return",mod:"command",ctrl:"control",alt:"option",opt:"option",cmd:"command"},Priority:{command:100,shift:200,option:300,control:400},DisplayName:{up:"▲",down:"▼",left:"◀",right:"▶",escape:"esc",plus:"+",minus:"-",return:"⏎",command:"⌘",option:"⌥",control:"⌃",shift:"⇧",backspace:"⌫",tab:"⇥"}}};var _e=n(14792),De=n(50014);const He=()=>"undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Ve(e,t){return e.trim().split(t).filter(Boolean)}const Fe=/\s/,qe="+";function Ue(e){return e.displayName??_e(e.id)}const $e=(0,oe.om)("hotkey"),We={BetweenGroups:String.fromCharCode(160),BetweenKeys:String.fromCharCode(8239)},Ge=a.forwardRef(function(e,t){const{value:n,platform:r,view:a="light",qa:i,style:o,className:l,...c}=e,u=Ke(n,{platform:r}),d=[];let p=!1;return u.forEach((e,t)=>{0!==e.length&&(p?d.push(We.BetweenGroups):p=!0,e.forEach((e,n)=>{0===n||d.push(We.BetweenKeys,(0,s.jsx)("span",{className:$e("plus"),children:"+"},`${e}_${t}_${n}_plus`),We.BetweenKeys),d.push((0,s.jsx)("kbd",{children:e},`${e}_${t}_${n}`))}))}),0===d.length?null:(0,s.jsx)("kbd",{...(0,Pe.$)(c,{labelable:!0}),ref:t,style:o,"data-qa":i,className:$e({view:a},l),children:d})});function Ke(e,t){const n=t.platform??(He()?"mac":"pc");return function(e,t){return Ve(t,Fe).map(t=>De(Ve(t,qe).map(function(e){return function(t){const n=function(e,t){return t=t.toLowerCase(),e.NormalizeMap[t]??t}(e,t);return{raw:t,id:n,priority:e.Priority[n]??0,displayName:e.DisplayName[n]}}}(e)).sort((e,t)=>t.priority-e.priority),e=>e.id).map(Ue))}(Be[n],e)}var Ze=n(83505),Ye=n(34743),Qe=n(46885),Xe=n(43791),Je=n(85558),et=n(27790),tt=n(82667);function nt(e){return e.props.ref??e.ref}const rt=(0,oe.om)("tooltip"),at=1e3,it=0,ot="bottom",lt=4;function st({children:e,open:t,onOpenChange:n,strategy:r,placement:i=ot,offset:o=lt,disabled:l,content:c,trigger:u,role:d="tooltip",openDelay:p=at,closeDelay:h=it,container:f,disablePortal:m,className:v,style:g,qa:w,...b}){const[y,x]=a.useState(null),{placement:C,middleware:E}=(0,et.QT)(i,!1),[S,A]=L(t,!1,n),{refs:k,floatingStyles:M,context:R}=(0,Ze.we)({open:S,onOpenChange:A,strategy:r,placement:C,middleware:[(0,Ye.cY)(o),(0,Ye.BN)({padding:Je.Nw,limiter:(0,Ye.ER)()}),E],whileElementsMounted:Qe.ll,elements:{reference:y}}),j=(0,Ze.Mk)(R,{enabled:"focus"!==u,delay:{open:p,close:h},move:!1}),O=(0,Ze.iQ)(R),N=(0,Ze.It)(R,{role:d}),z=(0,Ze.s9)(R,{outsidePress:!1,ancestorScroll:!0}),{getReferenceProps:T,getFloatingProps:I}=(0,Ze.bv)([j,O,N,z]),P=(0,Xe.N)(x,a.isValidElement(e)?nt(e):void 0),B=a.isValidElement(e)?T(e.props):T(),_=a.isValidElement(e)?a.cloneElement(e,{...B,ref:P}):e(B,P);return(0,s.jsxs)(a.Fragment,{children:[_,S&&!l?(0,s.jsx)(tt.Z,{container:f,disablePortal:m,children:(0,s.jsx)("div",{ref:k.setFloating,style:{position:"absolute",top:0,left:0,zIndex:1e4,width:"max-content",...M},...I(),children:(0,s.jsx)("div",{className:rt(null,v),style:g,"data-qa":w,...(0,Pe.$)(b,{labelable:!0}),children:c})})}):null]})}const ct=(0,oe.om)("action-tooltip"),ut=500,dt=0;function pt({title:e,description:t,hotkey:n,openDelay:r=ut,closeDelay:i=dt,className:o,...l}){const c=a.useMemo(()=>(0,s.jsxs)(a.Fragment,{children:[(0,s.jsxs)("div",{className:ct("heading"),children:[(0,s.jsx)("div",{className:ct("title"),children:e}),n&&(0,s.jsx)(Ge,{view:"dark",value:n,className:ct("hotkey")})]}),t&&(0,s.jsx)("div",{className:ct("description"),children:t})]}),[e,t,n]);return(0,s.jsx)(st,{...l,role:"label",content:c,openDelay:r,closeDelay:i,className:ct(null,o)})}var ht=n(43168),ft=n(52599);const mt=(0,oe.om)("color-text"),vt=["primary","complementary","secondary","hint","info","info-heavy","positive","positive-heavy","warning","warning-heavy","danger","danger-heavy","utility","utility-heavy","misc","misc-heavy","brand","link","link-hover","link-visited","link-visited-hover","dark-primary","dark-complementary","dark-secondary","light-primary","light-complementary","light-secondary","light-hint","inverted-primary","inverted-complementary","inverted-secondary","inverted-hint"],gt=({color:e},t)=>mt({color:e},t),wt=(0,oe.om)("text"),bt=["display-4","display-3","display-2","display-1","header-2","header-1","subheader-3","subheader-2","subheader-1","body-3","body-2","body-1","body-short","caption-2","caption-1","code-3","code-inline-3","code-2","code-inline-2","code-1","code-inline-1"],yt=({variant:e="body-1",ellipsis:t,ellipsisLines:n,whiteSpace:r,wordBreak:a},i)=>wt({variant:e,ellipsis:t,ws:r,wb:a,"ellipsis-lines":n},i),xt=a.forwardRef(function({as:e,children:t,variant:n,className:r,ellipsis:a,color:i,whiteSpace:o,wordBreak:l,ellipsisLines:c,style:u,qa:d,...p},h){const f=e||"span",m={...u};return"number"==typeof c&&(m.WebkitLineClamp=c),(0,s.jsx)(f,{ref:h,className:yt({variant:n,ellipsis:a,whiteSpace:o,wordBreak:l,ellipsisLines:"number"==typeof c},i?gt({color:i},r):r),style:m,"data-qa":d,...p,children:t})});xt.displayName="Text";var Ct=n(97634),Et=n(61885);const St=(0,oe.om)("dropdown-menu"),At=a.createContext({toggle(){},data:void 0});At.displayName="DropdownMenu.Context";var kt=n(36635),Mt=n(90594);const Rt=(0,oe.om)("menu"),jt=a.forwardRef(function({label:e,children:t,style:n,className:r,qa:a},i){const o=(0,P.u)();return(0,s.jsx)("li",{ref:i,className:Rt("list-group-item"),children:(0,s.jsxs)("div",{style:n,className:Rt("group",r),"data-qa":a,children:[e&&(0,s.jsx)("div",{id:o,className:Rt("group-label"),children:e}),(0,s.jsx)("ul",{role:"group","aria-labelledby":o,className:Rt("group-list"),children:t})]})})});var Ot=n(30142);const Nt=(0,oe.om)("menu"),Lt=a.forwardRef(function({iconStart:e,iconEnd:t,title:n,disabled:r,active:i,selected:o,href:l,target:c,rel:u,onClick:d,style:p,className:h,contentClassName:f,theme:m,extraProps:v,children:g,qa:w},b){const{onKeyDown:y}=(0,Et.N)(d),x=a.useCallback(e=>{Ot.o.publish({componentId:"MenuItem",eventId:"click",domEvent:e})},[]),C={role:"menuitem",onKeyDown:d&&!r?y:void 0},E={title:n,onClick:r?void 0:d,onClickCapture:r?void 0:x,style:p,tabIndex:r?-1:0,className:Nt("item",{disabled:r,active:i,selected:o,theme:m,interactive:Boolean(d)||Boolean(l)},h),"data-qa":w},S=[e&&(0,s.jsx)("div",{className:Nt("item-icon"),children:e},"icon-start"),(0,s.jsx)("div",{className:Nt("item-content",f),children:g},"content"),t&&(0,s.jsx)("div",{className:Nt("item-icon-end"),children:t},"icon-end")];let A;return A=l?(0,s.jsx)("a",{...C,...v,...E,href:l,target:c,rel:u,children:S}):(0,s.jsx)("div",{...C,...v,...E,children:S}),(0,s.jsx)("li",{ref:b,className:Nt("list-item"),role:"none",children:A})}),zt=(0,oe.om)("menu"),Tt=a.forwardRef(function({size:e="m",children:t,style:n,className:r,qa:a,...i},o){return(0,s.jsx)("ul",{...(0,Pe.$)(i,{labelable:!0}),ref:o,role:"menu",style:n,className:zt({size:e},r),"data-qa":a,children:t})});Tt.Item=Lt,Tt.Group=jt;var It=n(56841);function Pt(e,t,n=1,r){const a=(e.length+t-n%e.length)%e.length;return r&&r(e[a])?Pt(e,a,1,r):a}function Bt(e,t,n=1,r){const a=(t+n)%e.length;return r&&r(e[a])?Bt(e,a,1,r):a}function _t({items:e,skip:t,pageSize:n,processHomeKey:r=!0,processEndKey:i=!0,anchorRef:o,disabled:l=!1,initialValue:s=-1,onAnchorKeyDown:c}){const[u,d]=a.useState(s),p=a.useCallback(()=>{d(s)},[s]);return a.useEffect(()=>{e&&p()},[e,p]),(0,It.N)(()=>{if(l)return;if(!e.some(e=>!t?.(e)))return;const a=o?.current;if(!a)return;const s=a=>{const o=c?.(u,a);if(!1!==o)switch(a.key){case Ce.D.ARROW_DOWN:a.preventDefault(),d(n=>Bt(e,n,1,t));break;case Ce.D.ARROW_UP:a.preventDefault(),d(n=>Pt(e,n,1,t));break;case Ce.D.PAGE_DOWN:if(!n)return;a.preventDefault(),d(r=>Bt(e,r,n,t));break;case Ce.D.PAGE_UP:if(!n)return;a.preventDefault(),d(r=>Pt(e,r,n,t));break;case Ce.D.HOME:if(!r)return;a.preventDefault(),d(n=>Pt(e,n,n,t));break;case Ce.D.END:if(!i)return;a.preventDefault(),d(n=>Pt(e,n,n+1,t))}};return a.addEventListener("keydown",s),()=>{a.removeEventListener("keydown",s)}},[u,o,l,e,c,n,i,r,t]),{activeItemIndex:u,setActiveItemIndex:d,reset:p}}var Dt=n(30567);const Ht=[],Vt=a.createContext({activeMenuPath:Ht,setActiveMenuPath:()=>{},anchorRef:{current:null}}),Ft=({anchorRef:e,children:t,disabled:n})=>{const[r,i]=a.useState(Ht);a.useEffect(()=>{n&&i(Ht)},[n]);const o=a.useMemo(()=>({activeMenuPath:r,setActiveMenuPath:i,anchorRef:e}),[r,e]);return(0,s.jsx)(Vt.Provider,{value:o,children:t})},qt={text:"",action:()=>{},path:[]};function Ut(e){return e===qt}function $t(e){return e.disabled||Ut(e)}function Wt(e){return e?.join(" ")??""}const Gt=({items:e,open:t,anchorRef:n,onClose:r,size:i,menuProps:o,children:l,popupProps:c,path:u=[]})=>{const{toggle:d,data:p}=a.useContext(At),{activeMenuPath:h,setActiveMenuPath:f,anchorRef:m}=a.useContext(Vt),v=u.length>0,g=a.useCallback(()=>{f(u.slice(0,u.length-1))},[f,u]),w=a.useCallback(()=>{f(u)},[u,f]),b=a.useCallback(()=>{g()},[g]),y=a.useCallback((e,t)=>{e.items&&e.path?f(e.path):(e.action?.(t,p),d(!1))},[p,f,d]),x=a.useCallback((t,n)=>{switch(n.key){case Ce.D.ESCAPE:return v&&(n.stopPropagation(),g?.()),!1;case Ce.D.ENTER:case Ce.D.SPACEBAR:{const r=e[t],a=r?.items;return(v||a)&&(n.stopPropagation(),n.preventDefault()),r&&y(r,n),!1}}return!0},[g,y,v,e]),C=t&&Wt(u)===Wt(h),{activeItemIndex:E,setActiveItemIndex:S,reset:A}=_t({items:e,skip:$t,anchorRef:m,onAnchorKeyDown:x,disabled:!C,initialValue:v?0:-1});return a.useEffect(()=>{t||A()},[t,A]),(0,s.jsx)(Dt.z,{open:t,anchorRef:n,onClose:r,placement:"bottom-start",...c,children:(0,s.jsx)("div",{onMouseEnter:w,onMouseLeave:b,className:St("popup-content"),children:l||(0,s.jsx)(Tt,{className:St("menu"),size:i,...o,children:e.map((e,n)=>{const a=C&&E===n,o=()=>S(n),l=t&&!a&&0!==h.length&&Wt(e.path)===Wt(h.slice(0,e.path.length)),u={...e.extraProps,onClick:o,onMouseEnter:o};return(0,s.jsx)(Yt,{size:i,className:St("menu-item",{separator:Ut(e),"active-parent":l,"with-submenu":Boolean(e.items?.length)},e.className),selected:a,popupProps:c,closeMenu:r,...e,extraProps:u},n)})})})})};function Kt(e,t){return e?.every((e,n)=>e===t?.[n])??!1}function Zt({items:e,path:t}){const{activeMenuPath:n,setActiveMenuPath:r}=a.useContext(Vt),i=Boolean(t)&&Boolean(e?.length),o=a.useCallback(()=>{t&&r(t.slice(0,t.length-1))},[t,r]),l=a.useCallback(()=>{t&&r(t)},[t,r]);return{hasSubmenu:i,isSubmenuOpen:Kt(t,n),openSubmenu:l,closeSubmenu:o}}const Yt=({text:e,action:t,items:n,popupProps:r,closeMenu:i,children:o,path:l,size:c,...u})=>{const{toggle:d,data:p}=a.useContext(At),h=a.useRef(null),f=M(),{hasSubmenu:m,isSubmenuOpen:v,closeSubmenu:g,openSubmenu:w}=Zt({items:n,path:l}),b=a.useCallback(()=>{const e=()=>{i?i():d(!1)};m?(g(),requestAnimationFrame(e)):e()},[i,g,m,d]),y=a.useCallback(e=>{u.extraProps?.onClick?.(e),m?v?g():w():(t?.(e,p),b())},[t,p,b,m,v,w,g,u.extraProps]),x=a.useMemo(()=>({...u.extraProps,onMouseEnter:e=>{u.extraProps?.onMouseEnter?.(e),m&&w()},onMouseLeave:e=>{u.extraProps?.onMouseLeave?.(e),m&&g()}}),[u.extraProps,g,m,w]),C=a.useMemo(()=>"rtl"===f?["left-start","right-start"]:["right-start","left-start"],[f]),E=a.useMemo(()=>m?(0,s.jsx)(pe.I,{data:"rtl"===f?kt.A:Mt.A,size:10,className:St("sub-menu-arrow")}):u.iconEnd,[m,f,u.iconEnd]);return(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(Tt.Item,{ref:h,...u,extraProps:x,onClick:y,iconEnd:E,children:e||o}),m&&n&&(0,s.jsx)(Gt,{popupProps:{...r,className:St("sub-menu",r?.className),placement:C},size:c,items:n,path:l,open:v,anchorRef:h,onClose:b})]})};function Qt(e,t,n=[],r=0){const a=[];let i=!1,o=r;for(const r of e)if(Array.isArray(r)){const e=Qt(r,t,n,o);0!==a.length&&0!==e.length&&a.push(t),a.push(...e),o+=e.length,i=!0}else{if(r.hidden)continue;i&&a.push(t);const e={...r,path:[...n,o++]};r.items&&(e.items=Qt(r.items,t,e.path)),a.push(e),i=!1}return a}const Xt=Object.assign(({items:e=[],size:t="m",icon:n=(0,s.jsx)(pe.I,{data:Ct.A}),open:r,onOpenToggle:i,hideOnScroll:o=!0,data:l,disabled:c,switcher:u,renderSwitcher:d,switcherWrapperClassName:p,defaultSwitcherProps:h,defaultSwitcherClassName:f,onSwitcherClick:m,menuProps:v,popupProps:g,children:w})=>{const b=a.useRef(null),{isPopupShown:y,togglePopup:x,closePopup:C}=function(e,t,n){const[r,i]=function(e,t,n,r=void 0!==e&&void 0!==t){const i=function(e,t){const[n,r]=a.useState(e);return[n,a.useCallback(e=>{"function"==typeof e?r(n=>{const r=e(n);return t?.(r),r}):(t?.(e),r(e))},[t])]}(e||n,t);return r?[e,t]:i}(e,t,!1),o=a.useCallback(e=>{i(t=>"boolean"==typeof e?e:!t)},[i]),l=a.useCallback(()=>{i(!1)},[i]);return a.useEffect(()=>{n&&r&&l()},[l,n,r]),{isPopupShown:r,togglePopup:o,closePopup:l}}(r,i,c);!function(e,t,n){a.useEffect(()=>{if(n)return;const r=n=>{n.target.contains(t.current)&&e(n)};return document.addEventListener("scroll",r,!0),()=>{document.removeEventListener("scroll",r,!0)}},[t,e,n])}(C,b,!y||!o);const E=a.useMemo(()=>({toggle:x,data:l}),[l,x]),S=a.useMemo(()=>Qt(e,qt),[e]),A=a.useCallback(e=>{c||(m?.(e),x())},[c,m,x]),{onKeyDown:k}=(0,Et.N)(A),M=a.useMemo(()=>({onClick:A,onKeyDown:k}),[A,k]);return(0,s.jsxs)(At.Provider,{value:E,children:[(0,s.jsx)("div",{ref:b,className:St("switcher-wrapper",p),...d?{}:M,children:d?.(M)||u||(0,s.jsx)(ft.$,{view:"flat",size:t,...h,className:St("switcher-button",f),disabled:c,children:n})}),(0,s.jsx)(Ft,{anchorRef:b,disabled:!y,children:(0,s.jsx)(Gt,{items:S,open:y,size:t,menuProps:v,anchorRef:b,onClose:C,popupProps:g,children:w})})]})},{Item:Yt}),Jt=JSON.parse('{"label_close":"Close","label_more":"Show more"}'),en=JSON.parse('{"label_close":"Закрыть","label_more":"Показать больше"}'),tn=(0,Ne.N)({en:Jt,ru:en},"ActionsPanel");var nn=n(94394);const rn="data-observer-id",an=(0,oe.om)("actions-panel-collapse"),on=({actions:e,maxRowActions:t})=>{const{buttonActions:n,dropdownItems:r,parentRef:i,offset:o,visibilityMap:l,showDropdown:c}=((e,t)=>{const n=Math.max(0,void 0===t?4:t),r=a.useMemo(()=>e.every(e=>e.collapsed),[e]),i=a.useMemo(()=>e.map(({id:e})=>e).join("/")+n,[e,n]),[o,l]=a.useMemo(()=>{const t=[],r=[];return e.forEach(e=>{t.length{const t=M(),n=a.useRef(null),[r,i]=a.useState({}),[o,l]=a.useState(0),s=a.useCallback(e=>{const r={};let a,o,s=0;e.forEach(e=>{const t=e.target.getAttribute(rn);t&&(e.isIntersecting?(a=e,r[t]=!0):(o||(o=e),r[t]=!1))});const c=n.current?.getBoundingClientRect();if(c&&o){const e=o.target.getBoundingClientRect();s="ltr"===t?e.left-c.left:c.right-e.right}else if(c&&a){const e=a.target.getBoundingClientRect();s="ltr"===t?e.right-c.left+4:c.right-e.left+4}i(e=>({...e,...r})),l(s)},[t]);return a.useEffect(()=>{i({});const e=new IntersectionObserver(s,{root:n.current,threshold:1});return Array.from(n.current?.children||[]).forEach(t=>{t.hasAttribute(rn)&&e.observe(t)}),()=>e.disconnect()},[s,e]),{parentRef:n,visibilityMap:r,offset:o}})(i),d=(({buttonActions:e,restActions:t,visibilityMap:n})=>{const r=[...e.filter(e=>!n[e.id]),...t],a=nn(r,e=>e.dropdown.group),i=new Set,o=[];for(const e of r){const t=e.dropdown.group;void 0!==t?i.has(t)||(i.add(t),o.push(a[t].map(e=>e.dropdown.item))):o.push(e.dropdown.item)}return o})({buttonActions:o,restActions:l,visibilityMap:c}),p=r||0===n;return{buttonActions:o,dropdownItems:d,parentRef:s,offset:p?0:u,visibilityMap:c,showDropdown:(Object.keys(c).length>0||p)&&d.length>0}})(e,t),{t:u}=tn.useTranslation();return(0,s.jsxs)("div",{className:an(),children:[(0,s.jsx)("div",{className:an("container"),ref:i,children:n.map(e=>{const{id:t}=e,n={[rn]:t},r=!1===l[t],i=Array.isArray(e.dropdown.item.items)?(0,s.jsx)(Xt,{size:"s",items:e.dropdown.item.items,renderSwitcher:({onClick:t})=>(0,s.jsx)(ft.$,{view:"flat-contrast",size:"m",...e.button.props,onClick:t}),onSwitcherClick:e.button.props.onClick}):(0,s.jsx)(ft.$,{view:"flat-contrast",size:"m",...e.button.props});return(0,a.createElement)("div",{className:an("button-action-wrapper",{invisible:r}),...n,key:t},i)})}),c&&(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("div",{className:an("menu-placeholder")}),(0,s.jsx)("div",{className:an("menu-wrapper"),style:{insetInlineStart:o},children:(0,s.jsx)(Xt,{size:"s",items:r,renderSwitcher:({onClick:e})=>(0,s.jsx)(ft.$,{view:"flat-contrast",size:"m","aria-label":u("label_more"),onClick:e,children:(0,s.jsx)(pe.I,{data:Ct.A})})})})]})]})},ln=(0,oe.om)("actions-panel"),sn=({className:e,actions:t,onClose:n,renderNote:r,noteClassName:a,qa:i,maxRowActions:o})=>{const{t:l}=tn.useTranslation();return(0,s.jsxs)("div",{className:ln(null,e),"data-qa":i,children:["function"==typeof r&&(0,s.jsx)(xt,{className:ln("note-wrapper",a),as:"div",color:"light-primary",variant:"subheader-2",ellipsis:!0,children:r()}),(0,s.jsx)(on,{actions:t,maxRowActions:o}),"function"==typeof n&&(0,s.jsx)(ft.$,{view:"flat-contrast",size:"m",onClick:n,className:ln("button-close"),"aria-label":l("label_close"),children:(0,s.jsx)(pe.I,{data:ht.A},"icon")})]})};var cn=n(43636);const un={xs:0,s:1,m:2,l:3,xl:4,xxl:5,xxxl:6},dn=["xs","s","m","l","xl","xxl","xxxl"],pn=e=>e in cn.W?cn.W[e]:String(e),hn=(0,oe.om)("s"),fn=(e,t)=>{const n=[];for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];void 0!==r&&n.push(hn(`${t}_${pn(r)}`))}return t&&n.push(t),n.join(" ")},mn=fn,vn=(0,oe.om)("box"),gn=a.forwardRef(function({as:e,children:t,qa:n,className:r,width:a,height:i,minWidth:o,minHeight:l,maxHeight:c,maxWidth:u,position:d,style:p,spacing:h,overflow:f,...m},v){const g=e||"div",w={width:a,height:i,minWidth:o,minHeight:l,maxHeight:c,maxWidth:u,position:d,...p};return(0,s.jsx)(g,{...m,"data-qa":n,style:w,ref:v,className:vn({overflow:f},h?mn(h,r):r),children:t})}),wn=(0,oe.om)("card"),bn=a.forwardRef(function(e,t){const{type:n="container",theme:r,view:a,size:i="m",children:o,className:l,onClick:c,disabled:u,selected:d,...p}=e,h="selection"===n,f="container"===n,m=("action"===n||h)&&Boolean(c)&&!u,v=f?"normal":void 0,g=f||h?"outlined":void 0,w=m?c:void 0,{onKeyDown:b}=(0,Et.N)(c);return(0,s.jsx)(gn,{ref:t,role:m?"button":void 0,className:wn({theme:r||v,view:a||g,type:n,selected:d,size:i,disabled:u,clickable:m},l),onClick:w,onKeyDown:m?b:void 0,tabIndex:m?0:void 0,...p,children:o})});var yn=n(88783);const xn=()=>{const{activeMediaQuery:e,theme:t}=a.useContext(yn.M),{isMediaActive:n,getClosestMediaProps:r}=a.useMemo(()=>{return{isMediaActive:(n=e,e=>n in un&&un[n]-un[e]>=0),getClosestMediaProps:(t=e,(e={})=>{if(!t)return;let n=t;for(;n;){if(void 0!==e[n])return e[n];n=dn[un[n]-1]}})};var t,n},[e]);return{theme:t,activeMediaQuery:e,isMediaActive:n,getClosestMediaProps:r}},Cn=(0,oe.om)("flex"),En=a.forwardRef(function(e,t){const{as:n,direction:r,grow:i,basis:o,children:l,style:c,alignContent:u,alignItems:d,alignSelf:p,justifyContent:h,justifyItems:f,justifySelf:m,shrink:v,wrap:g,inline:w,gap:b,gapRow:y,className:x,space:C,centerContent:E,...S}=e,A=n||"div",{getClosestMediaProps:k,theme:{spaceBaseSize:M}}=xn(),R=e=>"object"==typeof e&&null!==e?k(e):e,j=R(b),O=void 0===j?void 0:M*Number(j),N=R(y)||j,L=void 0===N?void 0:M*Number(N),z=R(C),T=void 0===b&&void 0===y&&void 0!==z?pn(z):void 0;return(0,s.jsx)(gn,{as:A,className:Cn({"center-content":E,inline:w,s:T},x),ref:t,style:{flexDirection:R(r),flexGrow:!0===i?1:i,flexWrap:!0===g?"wrap":g,flexBasis:o,flexShrink:v,columnGap:O,rowGap:L,alignContent:R(u),alignItems:R(d),alignSelf:R(p),justifyContent:R(h),justifyItems:R(f),justifySelf:R(m),...c},...S,children:C?a.Children.map(l,e=>e?(0,s.jsx)("div",{className:Cn("wr"),children:e}):e):l})}),Sn=a.createContext(null),An=()=>{const e=a.useContext(Sn);if(!e)throw new Error('Alert: `useAlertContext` hook is used out of "AlertContext"');return e},kn=e=>{const{view:t}=An();return(0,s.jsx)(ft.$,{view:"filled"===t?"normal-contrast":void 0,...e})},Mn=(0,oe.om)("alert"),Rn=({layout:e,view:t,children:n})=>(0,s.jsx)(Sn.Provider,{value:{layout:e,view:t},children:n});var jn=n(17453),On=n(66840),Nn=n(63584),Ln=n(29817),zn=n(83544),Tn=n(11169),In=n(75561),Pn=n(14204),Bn=n(16017),_n=n(33844);const Dn={danger:{filled:jn.A,outlined:On.A},info:{filled:Nn.A,outlined:Ln.A},success:{filled:zn.A,outlined:Tn.A},warning:{filled:In.A,outlined:Pn.A},utility:{filled:Bn.A,outlined:_n.A},normal:null,clear:null},Hn=JSON.parse('{"label_close":"Close"}'),Vn=JSON.parse('{"label_close":"Закрыть"}'),Fn=(0,Ne.N)({en:Hn,ru:Vn},"Alert"),qn=e=>{const{theme:t="normal",view:n="filled",layout:r="vertical",message:a,className:i,corners:o,style:l,onClose:c,align:u,qa:d}=e,p={style:l,className:Mn({corners:o},fn({py:4,px:5},i)),qa:d},{t:h}=Fn.useTranslation(),f=(0,s.jsxs)(En,{gap:"3",alignItems:u,children:[void 0===e.icon?(0,s.jsx)(qn.Icon,{theme:t,view:n}):e.icon,(0,s.jsxs)(En,{direction:"vertical"===r?"column":"row",gap:"5",grow:!0,children:[(0,s.jsx)(En,{gap:"2",grow:!0,className:Mn("text-content"),children:(0,s.jsxs)(En,{direction:"column",gap:"1",grow:!0,justifyContent:u,children:["string"==typeof e.title?(0,s.jsx)(qn.Title,{text:e.title}):e.title,a]})}),Array.isArray(e.actions)?(0,s.jsx)(qn.Actions,{items:e.actions}):e.actions]}),c&&(0,s.jsx)(ft.$,{view:"flat",className:Mn("close-btn"),onClick:c,"aria-label":h("label_close"),children:(0,s.jsx)(pe.I,{data:ht.A,size:18,className:gt({color:"secondary"})})})]});return(0,s.jsx)(Rn,{layout:r,view:n,children:"clear"===t?(0,s.jsx)("div",{...p,children:f}):(0,s.jsx)(bn,{...p,theme:t,view:n,children:f})})};qn.Icon=({className:e,theme:t,view:n="filled",size:r=18})=>{const a=Dn[t];if(!a)return null;let i;return"success"===t?i="positive":"normal"!==t&&"clear"!==t&&(i=t),(0,s.jsx)("div",{className:Mn("icon",gt({color:i},e)),children:(0,s.jsx)(pe.I,{data:a[n],size:r})})},qn.Title=({text:e,className:t})=>(0,s.jsx)(xt,{variant:"subheader-2",className:Mn("title",t),children:e}),qn.Actions=({items:e,children:t,className:n})=>{const{layout:r}=An();return(0,s.jsx)(En,{className:Mn("actions",{minContent:"horizontal"===r},n),direction:"row",gap:"3",wrap:!0,alignItems:"horizontal"===r?"center":"flex-start",children:e?.map(({handler:e,text:t},n)=>(0,s.jsx)(kn,{onClick:e,children:t},n))||t})},qn.Action=kn;const Un={"3xs":16,"2xs":20,xs:24,s:28,m:32,l:42,xl:50},$n="m",Wn=(0,oe.om)("avatar"),Gn={"3xs":10,"2xs":12,xs:14,s:16,m:16,l:20,xl:24},Kn=({icon:e,color:t,size:n})=>{const r={color:t};return(0,s.jsx)("div",{className:Wn("icon"),style:r,children:(0,s.jsx)(pe.I,{data:e,size:Gn[n]})})},Zn=({imgUrl:e,fallbackImgUrl:t,sizes:n,srcSet:r,alt:i,loading:o,withImageBorder:l,size:c})=>{const[u,d]=a.useState(!1),p=a.useCallback(()=>{d(!0)},[]);return a.useEffect(()=>{d(!1)},[e]),(0,s.jsx)("img",{className:Wn("image",{"with-border":l}),loading:o,width:Un[c],height:Un[c],src:t&&u?t:e,sizes:n,srcSet:r,alt:i,onError:p})},Yn=(e,t)=>{if("3xs"===t)return e[0].toUpperCase();const n=e.split(/[^\p{L}]+/u).filter(e=>e.length>0);return n.length<=1?e.slice(0,2).toUpperCase():[n[0][0],n[1][0]].filter(Boolean).join("").toUpperCase()},Qn=({text:e,color:t,size:n})=>{const r={color:t},a=Yn(e,n);return(0,s.jsx)("div",{className:Wn("text"),style:r,children:a})},Xn=a.forwardRef((e,t)=>{const{size:n=$n,theme:r="normal",view:a="filled",shape:i="circle",backgroundColor:o,borderColor:l,title:c,className:u,style:d,qa:p}=e,h={backgroundColor:o,color:l,...d};return(0,s.jsx)("div",{className:Wn({size:n,theme:r,view:a,shape:i,"with-border":Boolean(l)},u),title:c,role:"img",style:h,"data-qa":p,ref:t,...(0,Pe.$)(e,{labelable:!0}),children:"imgUrl"in e&&e.imgUrl?(0,s.jsx)(Zn,{imgUrl:e.imgUrl,fallbackImgUrl:e.fallbackImgUrl,sizes:e.sizes,srcSet:e.srcSet,alt:e.alt||c,loading:e.loading,withImageBorder:e.withImageBorder,size:n}):"icon"in e&&e.icon?(0,s.jsx)(Kn,{icon:e.icon,color:e.color,size:n}):"text"in e&&e.text?(0,s.jsx)(Qn,{text:e.text,color:e.color,size:n}):null})});Xn.displayName="Avatar";const Jn=(0,oe.om)("avatar-stack"),er=({children:e,style:t})=>(0,s.jsx)("li",{className:Jn("item"),style:t,children:e});er.displayName="AvatarStack.Item";const tr=JSON.parse('{"more":["and {{count}} more","and {{count}} more","and {{count}} more"]}'),nr=JSON.parse('{"more":["И eщё {{count}}","И eщё {{count}}","И eщё {{count}}"]}'),rr=(0,Ne.N)({en:tr,ru:nr},"AvatarStack"),ar=(0,oe.om)("avatar-stack"),ir=a.forwardRef(({className:e,count:t,"aria-label":n,borderColor:r="var(--g-color-line-generic-solid)",size:a=$n},i)=>{const{t:o}=rr.useTranslation();return(0,s.jsxs)("div",{ref:i,className:ar("more",{size:a,"has-border":Boolean(r)},e),"aria-label":n||o("more",{count:t}),style:{borderColor:r},children:["+",t]})});ir.displayName="AvatarStack.More";const or=(0,oe.om)("avatar-stack"),lr=a.forwardRef(({className:e,badgeClassName:t,size:n=$n,onClick:r,count:a,"aria-label":i,borderColor:o},l)=>(0,s.jsx)("button",{ref:l,type:"button",className:or("more-button",{size:n},e),onClick:r,children:(0,s.jsx)(ir,{className:t,size:n,count:a,"aria-label":i,borderColor:o})}));lr.displayName="AvatarStack.MoreButton";const sr=(0,oe.om)("avatar-stack"),cr={zIndex:0},ur=a.forwardRef(({max:e=3,total:t,overlapSize:n="s",size:r,children:i,className:o,renderMore:l},c)=>{const u=[],d=t?Math.max(t,e):a.Children.count(i);let p=e<1?1:e;p=d-p>1?p:d;const h=d-p;a.Children.forEach(i,e=>{if(!a.isValidElement(e))return;const t=(0,s.jsx)(er,{style:{zIndex:p-u.length},children:e},u.length);u.length0;return(0,s.jsxs)("ul",{className:sr({"overlap-size":n},o),role:"list",ref:c,children:[u,f?(0,s.jsx)(er,{style:cr,children:l?l({count:h}):(0,s.jsx)(ir,{count:h,size:r})},"more-button"):null]})});ur.displayName="AvatarStack";const dr=Object.assign(ur,{More:ir,MoreButton:lr});var pr=n(47257);const hr=JSON.parse('{"breadcrumbs":"Breadcrumbs","label_more":"Show more"}'),fr=JSON.parse('{"breadcrumbs":"Навигация","label_more":"Показать больше"}'),mr=(0,Ne.N)({en:hr,ru:fr},"lab/Breadcrumbs"),vr=(0,oe.om)("breadcrumbs"),gr=a.createContext({isMenu:!1,activeIndex:null,getItemProps:(e={})=>e,listItemsRef:{current:[]},popupStyle:void 0});function wr({children:e,disabled:t,popupPlacement:n,popupStyle:r}){const[i,o]=a.useState(null),[l,c]=a.useState(null),[u,d]=a.useState(null),[p,h]=a.useState(!1),f=(0,Ze.P7)({open:p,onOpenChange:h,elements:{reference:i,floating:l}}),m=a.useRef([]),v=(0,Ze.C1)(f,{enabled:!t,listRef:m,activeIndex:u,onNavigate:d,loop:!0}),g=(0,Ze.s9)(f,{enabled:!t}),w=[(0,Ze.kp)(f,{enabled:!t}),g,v,(0,Ze.It)(f,{role:"menu"})],{getReferenceProps:b,getItemProps:y}=(0,Ze.bv)(w),{t:x}=mr.useTranslation();return(0,s.jsxs)("div",{className:vr("menu"),children:[(0,s.jsx)(ft.$,{ref:o,...b(),title:x("label_more"),"aria-label":x("label_more"),size:"s",view:"flat",disabled:t,children:(0,s.jsx)(ft.$.Icon,{children:"..."})}),(0,s.jsx)(Dt.z,{floatingContext:f,floatingRef:c,floatingInteractions:w,placement:n,className:vr("menu-popup"),children:(0,s.jsx)(gr.Provider,{value:{isMenu:!0,getItemProps:y,listItemsRef:m,activeIndex:u,popupStyle:r},children:e})})]})}var br=n(5273),yr=n(49054);const xr=(0,oe.om)("lab-list-item-view"),Cr=a.forwardRef(function(e,t){const{size:n,active:r,selected:i,hovered:o,disabled:l,onClick:c,selectionStyle:u,className:d,style:p,collapsed:h,onCollapseChange:f,children:m,isContainer:v=!1,component:g="div",componentProps:w,collapsible:b,description:y,draggable:x,startContent:C,endContent:E,nestedLevel:S}=e,A=a.useRef(null),k=(0,Xe.N)(A,t);return(0,s.jsx)(g,{ref:k,...w,...(0,Pe.$)(e),className:xr({size:n,selected:i&&"highlight"===u,disabled:l,active:r,hovered:"boolean"==typeof o&&(o?"yes":"no"),"is-container":v,"has-description":Boolean(y)},w?.className??d),style:w?.style??p,onClick:e=>{if(l)return void e.preventDefault();const t=e.target;t instanceof Element&&A.current&&(0,yr.nq)(A.current).some(e=>e.contains(t))||("function"==typeof c||"function"==typeof w?.onClick?(c?.(e),w?.onClick?.(e)):"function"==typeof f&&f(!h))},children:v?m:(0,s.jsx)(Er,{...e,children:m})})});function Er({selected:e,disabled:t,selectionStyle:n,draggable:r,nestedLevel:i,collapsible:o,collapsed:l,onCollapseChange:c,startContent:u,children:d,description:p,endContent:h}){return(0,s.jsxs)(a.Fragment,{children:[r?(0,s.jsx)(Sr,{name:"drag-handle"}):null,i?(0,s.jsx)(Sr,{name:"spacer",style:{"--_--nested-level":i}}):null,o?(0,s.jsx)(Sr,{name:"collapsed-toggle",children:(0,s.jsx)(ft.$,{className:xr("collapsible"),view:"flat",tabIndex:-1,disabled:t,onClick:()=>{c?.(!l)},"aria-hidden":"true",children:(0,s.jsx)(ft.$.Icon,{children:(0,s.jsx)(fe,{className:xr("arrow",{direction:l?"bottom":"top"})})})})}):null,"check"===n&&(0,s.jsx)(Sr,{name:"checked",children:(0,s.jsx)("div",{className:xr("checked"),children:e?(0,s.jsx)(pe.I,{data:br.A,className:xr("icon")}):null})}),u?(0,s.jsx)(Sr,{name:"start-content",children:u}):null,(0,s.jsx)(Sr,{name:"content",children:d}),p?(0,s.jsx)(Sr,{name:"description",children:p}):null,h?(0,s.jsx)(Sr,{name:"end-content",children:h}):null]})}function Sr({name:e,children:t,className:n,style:r}){return(0,s.jsx)("div",{className:xr("slot",{name:e},n),style:r,children:t})}function Ar(e,t){const n=(0,Pe.$)(e,{labelable:!0}),{href:r,hrefLang:i,target:o,rel:l,download:c,ping:u,referrerPolicy:d,children:p,disabled:h,__disabled:f,__current:m,__onAction:v,__index:g,...w}=e,b=f||h,y={onClick:e=>{b?e.preventDefault():("function"==typeof w.onClick&&w.onClick(e),"function"==typeof v&&v())},"aria-disabled":!!b||void 0};r?(y.href=r,y.hrefLang=i,y.target=o,y.rel="_blank"!==o||l?l:"noopener noreferrer",y.download=c,y.ping=u,y.referrerPolicy=d,y.tabIndex=b?-1:void 0):(y.role="link",y.tabIndex=b?void 0:0,y.onKeyDown=e=>{b?e.preventDefault():("function"==typeof w.onKeyDown&&w.onKeyDown(e),e.key===Ce.D.ENTER&&"function"==typeof v&&v())}),m&&(y["aria-current"]=e["aria-current"]??"page");const x=r?"a":"span",{isMenu:C,getItemProps:E,listItemsRef:S,activeIndex:A,popupStyle:k}=a.useContext(gr);if(C){const t=!b&&A===g;return(0,s.jsx)(Cr,{ref:e=>{S.current[g??0]=e},nestedLevel:"staircase"===k?g:void 0,active:t,size:"m",className:vr("menu-link",e.className),component:x,componentProps:E({...w,...n,...y,role:"menuitem",tabIndex:t?0:-1}),disabled:b,children:p})}return(0,s.jsx)(x,{...w,...n,...y,ref:t,className:vr("link",{"is-current":m,"is-disabled":b&&!m},e.className),children:p})}Ar.displayName="Breadcrumbs.Item";const kr=a.forwardRef(Ar);function Mr({separator:e}){return(0,s.jsx)("div",{"aria-hidden":!0,className:vr("divider"),children:e??"/"})}Mr.displayName="Breadcrumbs.Separator";const Rr=a.forwardRef(function(e,t){const n=a.useRef(null),r=(0,Xe.N)(t,n),i=a.useRef(null),o=[];a.Children.forEach(e.children,(e,t)=>{a.isValidElement(e)&&(void 0!==e.key&&null!==e.key||(e=a.cloneElement(e,{key:t})),o.push(e))});const[l,c]=a.useState(o.length),[u,d]=a.useState(!1),p=a.useCallback(()=>{c(o.length),d(!1)},[o.length]);(0,pr.w)({ref:n,onResize:p}),(0,pr.w)({ref:e.endContent?i:void 0,onResize:p});const h=a.useRef(null);(0,It.N)(()=>{u&&e.children!==h.current&&(h.current=e.children,c(o.length),d(!1))},[u,o.length,e.children]),(0,It.N)(()=>{u||(t=>{const r=n.current;if(!r)return;const a=Array.from(r.children),s=i.current;if(s&&a.pop(),0===a.length)return void d(!0);const u=r.offsetWidth-(s?.offsetWidth??0);let p=0,h=0,f=e.maxItems||1/0,m=0;if(e.showRoot){const e=a.shift();e&&(m=e.offsetWidth,h+=m),p++}if(o.length>t){const e=a.shift();e&&(h+=e.offsetWidth),f--}e.showRoot&&h>=u&&(h-=m,p--);const v=a.pop();v&&(h+=Math.min(v.offsetWidth,200),h=0&&(h+=a[e].offsetWidth,!(h>=u));e--)p++;p=Math.max(Math.min(f,p),1),p===l?d(!0):c(p)})(l)});let f=o;if(o.length>l){f=[];const t=[...o];let n=l;if(e.showRoot&&l>1){const e=t.shift();e&&f.push(e),n--}const r=t.slice(0,-n),i=(0,s.jsx)(wr,{disabled:e.disabled,popupPlacement:e.popupPlacement,popupStyle:e.popupStyle,"data-breadcrumbs-menu-item":!0,children:r.map((t,n)=>{const r=e.itemComponent??kr,i=t.key??n,o={__index:n,__disabled:e.disabled||t.props.disabled,__onAction:()=>{"function"==typeof e.onAction&&e.onAction(i)}};return(0,a.createElement)(r,{...t.props,key:i,...o},t.props.children)})});f.push(i),f.push(...t.slice(-n))}const m=f.length-1,v=f.map((t,n)=>{const r=n===m,i=t.key??n,{"data-breadcrumbs-menu-item":o,...l}=t.props;let c;if(o)c=t;else{const t=e.itemComponent??kr,n=()=>{"function"==typeof e.onAction&&e.onAction(i)},o={__current:r,__disabled:e.disabled||l.disabled,__onAction:n};c=(0,a.createElement)(t,{...l,key:i,...o},l.children)}return(0,s.jsxs)("li",{className:vr("item",{calculating:r&&!u,current:r}),children:[c,r?null:(0,s.jsx)(Mr,{separator:e.separator})]},o?"menu":`item-${i}`)});return e.endContent&&v.push((0,s.jsx)("li",{ref:i,className:vr("item"),children:e.endContent},"end-content")),(0,s.jsx)("ol",{ref:r,...(0,Pe.$)(e,{labelable:!0}),"data-qa":e.qa,className:vr(null,e.className),style:e.style,children:v})});Rr.Item=kr,Rr.displayName="Breadcrumbs";var jr=n(61502);function Or({initialValue:e,onReset:t}){const[n,r]=a.useState(null),i=a.useRef(e);return a.useEffect(()=>{if(!n)return;const e=()=>{t(i.current)};return n.addEventListener("reset",e),()=>{n.removeEventListener("reset",e)}},[n,t]),a.useCallback(e=>{r(e?.form??null)},[])}function Nr({name:e,value:t,id:n,defaultChecked:r,checked:i,indeterminate:o,onUpdate:l,onChange:s,controlRef:c,controlProps:u,onFocus:d,onBlur:p,disabled:h}){const f=a.useRef(null),[m,v]=L(i,r??!1,l),g=!o&&i,w=Or({initialValue:m,onReset:v}),b=(0,Xe.N)(c,f,w);return(0,It.N)(()=>{f.current&&(f.current.indeterminate=Boolean(o))},[o]),{checked:m,inputProps:{...u,name:e,value:t,id:n,onFocus:d,onBlur:p,disabled:h,type:"checkbox",onChange:e=>{v(e.target.checked),s&&s(e)},onClickCapture:a.useCallback(e=>{Ot.o.publish({componentId:"Checkbox",eventId:"click",domEvent:e,meta:{checked:e.target.checked}})},[]),defaultChecked:r,checked:g,ref:b}}}const Lr=(0,oe.om)("control-label"),zr=a.forwardRef(({children:e,className:t,labelClassName:n,title:r,style:i,disabled:o=!1,control:l,size:c="m",qa:u},d)=>{const p=a.cloneElement(l,{className:Lr("indicator",l.props.className)});return(0,s.jsxs)("label",{ref:d,title:r,style:i,className:Lr({size:c,disabled:o},t),"data-qa":u,children:[p,e?(0,s.jsx)("span",{className:Lr("text",n),children:e}):null]})});function Tr(e){return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 17",width:"16",height:"16",fill:"currentColor",...e,children:(0,s.jsx)("path",{d:"M4 7h9v3H4z"})})}function Ir(e){return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",width:"16",height:"16",fill:"currentColor",...e,children:(0,s.jsx)("path",{d:"M.49 5.385l1.644-1.644 4.385 4.385L4.874 9.77.49 5.385zm4.384 1.096L10.356 1 12 2.644 6.519 8.126 4.874 6.48v.001z"})})}zr.displayName="ControlLabel";const Pr=(0,oe.om)("checkbox"),Br=a.forwardRef(function(e,t){const{size:n="m",indeterminate:r,disabled:a=!1,content:i,children:o,title:l,style:c,className:u,qa:d}=e,{checked:p,inputProps:h}=Nr(e),f=i||o,m=(0,s.jsxs)("span",{className:Pr("indicator"),children:[(0,s.jsx)("span",{className:Pr("icon"),"aria-hidden":!0,children:r?(0,s.jsx)(Tr,{className:Pr("icon-svg",{type:"dash"})}):(0,s.jsx)(Ir,{className:Pr("icon-svg",{type:"tick"})})}),(0,s.jsx)("input",{...h,className:Pr("control")}),(0,s.jsx)("span",{className:Pr("outline")})]});return(0,s.jsx)(zr,{ref:t,title:l,style:c,size:n,disabled:a,className:Pr({size:n,disabled:a,indeterminate:r,checked:p},u),qa:d,control:m,children:f})});var _r=n(49741),Dr=n(44529);const Hr=JSON.parse('{"startCopy":"Copy","endCopy":"Copied"}'),Vr=JSON.parse('{"startCopy":"Копировать","endCopy":"Скопировано"}'),Fr=(0,Ne.N)({en:Hr,ru:Vr},"ClipboardButton"),qr=(0,oe.om)("clipboard-button"),Ur=1200,$r={xs:12,s:16,m:16,l:16,xl:20},Wr=e=>{const{t}=Fr.useTranslation(),{size:n="m",hasTooltip:r=!0,tooltipInitialText:a=t("startCopy"),tooltipSuccessText:i=t("endCopy"),status:o,view:l="flat",children:c,iconPosition:u="start",closeDelay:d,icon:p,...h}=e,f=(0,s.jsx)(ft.$.Icon,{className:qr("icon"),children:p??(0,s.jsx)(_r.u,{size:$r[n],status:o})});return(0,s.jsx)(pt,{title:"success"===o?i:a,disabled:!r,closeDelay:d,children:(0,s.jsxs)(ft.$,{view:l,size:n,"aria-label":a,...h,children:["start"===u?f:null,c,"end"===u?f:null]})})};function Gr(e){const{text:t,timeout:n=Ur,onCopy:r,hasTooltip:i=!0,onMouseEnter:o,onFocus:l,...c}=e,u=a.useRef(),[d,p]=a.useState(void 0),[h,f]=a.useState(!1);a.useEffect(()=>window.clearTimeout(u.current),[]);const m=a.useCallback((e,t)=>{r?.(e,t),f(!1),p(n),window.clearTimeout(u.current),u.current=window.setTimeout(()=>{f(!0)},n)},[r,n]),v=a.useCallback(()=>{h&&(f(!1),p(void 0))},[h]),g=a.useCallback(e=>{o?.(e),v()},[o,v]),w=a.useCallback(e=>{l?.(e),v()},[l,v]);return(0,s.jsx)(Dr.$,{text:t,timeout:n,onCopy:m,children:e=>(0,s.jsx)(Wr,{...c,closeDelay:d,hasTooltip:i&&!h,status:e,onMouseEnter:g,onFocus:w})})}var Kr=n(10037);const Zr=a.createContext(void 0);function Yr({direction:e,contentMaxWidth:t,nameMaxWidth:n,children:r}){const a=n?{maxWidth:n,width:n}:{},i="number"==typeof t?{width:t,maxWidth:t}:{};return(0,s.jsx)(Zr.Provider,{value:{keyStyle:a,valueStyle:i,direction:e},children:r})}const Qr=(0,oe.om)("definition-list");function Xr({copyText:e,children:t}){const n=t??"—";return e?(0,s.jsxs)("div",{className:Qr("copy-container"),children:[n,(0,s.jsx)(Gr,{size:"s",text:e,className:Qr("copy-button"),view:"flat-secondary"})]}):n}var Jr=n(11545);const ea=(0,oe.om)("popover"),ta=500,na=250;function ra({children:e,open:t,onOpenChange:n,disabled:r,content:i,trigger:o,openDelay:l=ta,closeDelay:c=na,enableSafePolygon:u,className:d,...p}){const[h,f]=a.useState(null),[m,v]=a.useState(null),[g,w]=L(t,!1,n),b=(0,Ze.P7)({open:g&&!r,onOpenChange:w,elements:{reference:h,floating:m}}),y="click"!==o,x=[(0,Ze.Mk)(b,{enabled:y,delay:{open:l,close:c},move:!1,handleClose:u?(0,Ze.iB)():void 0}),(0,Ze.kp)(b,{ignoreMouse:y}),(0,Ze.It)(b,{role:"dialog"}),(0,Ze.s9)(b)],{getReferenceProps:C}=(0,Ze.bv)(x),E=(0,Xe.N)(f,a.isValidElement(e)?nt(e):void 0),S=a.isValidElement(e)?C(e.props):C(),A=a.isValidElement(e)?a.cloneElement(e,{...S,ref:E}):e(S,E);return(0,s.jsxs)(a.Fragment,{children:[A,(0,s.jsx)(Dt.z,{...p,open:b.open,floatingContext:b,floatingRef:v,floatingInteractions:x,className:ea(null,d),children:i})]})}const aa={s:14,m:16,l:18,xl:20},ia=(0,oe.om)("help-mark"),oa=a.forwardRef(function({children:e,qa:t,className:n,iconSize:r="m",popoverProps:a,...i},o){return(0,s.jsx)(ra,{content:(0,s.jsx)("div",{className:ia("popover"),children:e}),hasArrow:!0,...a,children:(0,s.jsx)("button",{...i,ref:o,type:"button",className:ia({size:r},n),"data-qa":t,children:(0,s.jsx)(pe.I,{data:Jr.A,size:aa[r],className:ia("icon")})})})}),la=JSON.parse('{"label_note":"Note"}'),sa=JSON.parse('{"label_note":"Справка"}'),ca=(0,Ne.N)({en:la,ru:sa},"DefinitionList");function ua({note:e}){const{t}=ca.useTranslation();return e?"string"==typeof e?(0,s.jsx)(oa,{className:Qr("note"),popoverProps:{placement:["bottom","top"]},"aria-label":t("label_note"),children:e}):"object"==typeof e?(0,s.jsx)(oa,{...e,className:Qr("note",e.className),popoverProps:{placement:["bottom","top"],...e.popoverProps},"aria-label":t("label_note")}):null:null}function da({note:e,name:t,direction:n}){const r=e?(0,s.jsxs)(a.Fragment,{children:[" ",(0,s.jsx)(ua,{note:e})]}):null;return(0,s.jsxs)(a.Fragment,{children:[(0,s.jsxs)("div",{className:Qr("term-wrapper"),children:[t,r]}),"horizontal"===n&&(0,s.jsx)("div",{className:Qr("dots")})]})}function pa({name:e,children:t,copyText:n,note:r,qa:i}){const{direction:o,keyStyle:l,valueStyle:c}=function(){const e=a.useContext(Zr);if(void 0===e)throw new Error("useDefinitionListAttributes must be used within DefinitionListProvider");return e}();return(0,s.jsxs)("div",{className:Qr("item"),"data-qa":i,children:[(0,s.jsx)("dt",{className:Qr("term-container"),style:l,children:(0,s.jsx)(da,{direction:o,name:e,note:r})}),(0,s.jsx)("dd",{className:Qr("definition"),style:{...c,lineBreak:"string"==typeof t&&function(e){return e.split(/\s+/).some(e=>e.length>20)}(t)?"anywhere":void 0},children:(0,s.jsx)(Xr,{copyText:n,children:t})})]})}function ha({responsive:e,direction:t="horizontal",nameMaxWidth:n,contentMaxWidth:r,className:i,children:o,qa:l,...c}){const u=function(e){const t=a.Children.toArray(e),n=[];for(const e of t)fa(e)?n.push(e):(0,me.m)("[DefinitionList] Only components is allowed as children");return n}(o),d=u.some(e=>e.props.copyText);return(0,s.jsx)(Yr,{direction:t,nameMaxWidth:n,contentMaxWidth:r,children:(0,s.jsx)("dl",{...(0,Pe.$)(c,{labelable:!0}),className:Qr({responsive:e,vertical:"vertical"===t,"with-copy":d},i),"data-qa":l,children:u})})}pa.displayName="DefinitionListItem";const fa=(0,B.g)(pa);ha.Item=pa,ha.displayName="DefinitionList";var ma=n(91587);const va=JSON.parse('{"close":"Close dialog"}'),ga=JSON.parse('{"close":"Закрыть диалоговое окно"}'),wa=(0,Ne.N)({en:va,ru:ga},"Dialog"),ba=(0,oe.om)("dialog-btn-close");function ya({onClose:e}){const{t}=wa.useTranslation();return(0,s.jsx)("div",{className:ba(),children:(0,s.jsx)(ft.$,{view:"flat",size:"l",className:ba("btn"),onClick:t=>e(t,{isOutsideClick:!1}),"aria-label":t("close"),children:(0,s.jsx)(pe.I,{data:ht.A,size:20})})})}var xa=n(84548);const Ca=a.createContext({disableHeightTransition:!1}),Ea=(0,oe.om)("dialog-body");function Sa(e){const{className:t,hasBorders:n=!1}=e,r=a.useRef(null),{disableHeightTransition:i}=a.useContext(Ca);return(0,xa.e)({ref:r,enabled:!i}),(0,s.jsx)("div",{ref:r,className:Ea({"has-borders":n},t),children:e.children})}const Aa=(0,oe.om)("dialog-divider");function ka({className:e}){return(0,s.jsx)("div",{className:Aa(null,e)})}const Ma=(0,oe.om)("dialog-footer");function Ra(e){const{onClickButtonCancel:t,onClickButtonApply:n,loading:r,textButtonCancel:i,textButtonApply:o,propsButtonCancel:l,propsButtonApply:c,preset:u="default",children:d,errorText:p,showError:h=!1,renderButtons:f,className:m}=e,{initialFocusRef:v,initialFocusAction:g,onTooltipEscapeKeyDown:w}=a.useContext(Ca),b=a.useRef(null),y=(0,Xe.N)(b,"apply"===g?v:null),x=(0,Xe.N)("cancel"===g?v:null),C=(0,s.jsx)("div",{className:Ma("button",{action:"cancel"}),children:(0,s.jsx)(ft.$,{ref:x,view:o?"flat":"normal",size:"l",width:"max",onClick:t,disabled:r,...l,children:i})}),E=a.useCallback((e,t,n)=>{!e&&t&&"escape-key"===n&&w?.(t)},[w]),S=(0,s.jsxs)("div",{className:Ma("button",{action:"apply"}),children:[(0,s.jsx)(ft.$,{ref:y,type:"submit",view:"action",size:"l",width:"max",onClick:n,loading:r,className:Ma("button-apply",{preset:u}),...c,children:o}),p&&(0,s.jsx)(Dt.z,{open:h,onOpenChange:E,anchorRef:b,placement:"top",disablePortal:!0,hasArrow:!0,children:(0,s.jsx)("div",{className:Ma("error"),children:p})})]});return(0,s.jsxs)("div",{className:Ma(null,m),children:[(0,s.jsx)("div",{className:Ma("children"),children:d}),(0,s.jsx)("div",{className:Ma("bts-wrapper"),children:f?f(S,C):(0,s.jsxs)(a.Fragment,{children:[i&&C,o&&S]})})]})}const ja=(0,oe.om)("dialog-header");function Oa(e){const{caption:t="",insertBefore:n,insertAfter:r,className:a,id:i}=e;return(0,s.jsxs)("div",{className:ja(null,a),children:[n,(0,s.jsx)("div",{className:ja("caption"),id:i,children:t}),r]})}const Na=(0,oe.om)("dialog");function La({container:e,children:t,open:n,disableBodyScrollLock:r=!1,disableEscapeKeyDown:i=!1,disableOutsideClick:o=!1,initialFocus:l,returnFocus:c,keepMounted:u=!1,size:d,contentOverflow:p="visible",className:h,modalClassName:f,hasCloseButton:m=!0,disableHeightTransition:v=!1,onEscapeKeyDown:g,onEnterKeyDown:w,onOpenChange:b,onOutsideClick:y,onClose:x,onTransitionIn:C,onTransitionInComplete:E,onTransitionOut:S,onTransitionOutComplete:A,qa:k,...M}){const R=a.useCallback(e=>{x(e.nativeEvent,"closeButtonClick")},[x]),j=a.useRef(null),O=a.useMemo(()=>{const e={onTooltipEscapeKeyDown:e=>{b?.(!1,e,"escape-key"),g?.(e),x?.(e,"escapeKeyDown")},disableHeightTransition:v||!n};return"string"==typeof l&&(e.initialFocusRef=j,e.initialFocusAction=l),e},[l,g,x,b,n,v]);let N;return N="string"==typeof l?j:l,(0,s.jsx)(ma.a,{...(0,Pe.$)(M,{labelable:!0}),open:n,contentOverflow:p,disableBodyScrollLock:r,disableEscapeKeyDown:i,disableOutsideClick:o,disableVisuallyHiddenDismiss:m,initialFocus:N,returnFocus:c,keepMounted:u,onEscapeKeyDown:g,onOutsideClick:y,onClose:x,onEnterKeyDown:w,onTransitionIn:C,onTransitionInComplete:E,onTransitionOut:S,onTransitionOutComplete:A,className:Na("modal",f),container:e,qa:k,disableHeightTransition:!0,children:(0,s.jsxs)("div",{className:Na({size:d,"has-close":m,"has-scroll":"auto"===p},h),children:[(0,s.jsx)(Ca.Provider,{value:O,children:t}),m&&(0,s.jsx)(ya,{onClose:R})]})})}La.Footer=Ra,La.Header=Oa,La.Body=Sa,La.Divider=ka;const za=(0,oe.om)("divider"),Ta=a.forwardRef(function(e,t){const{orientation:n="horizontal",className:r,style:a,qa:i,children:o,align:l="start",...c}=e;return(0,s.jsx)("div",{...(0,Pe.$)(c,{labelable:!0}),className:za({orientation:n,align:l},r),ref:t,style:a,"data-qa":i,role:"separator","aria-orientation":"vertical"===n?"vertical":void 0,children:o})});var Ia=n(11253);const Pa=200,Ba=800,_a=(0,Ne.N)({en:{close:"Close"},ru:{close:"Закрыть"}},"Drawer");const Da=(0,oe.om)("drawer"),Ha=a.forwardRef(function(e,t){const{open:n,children:r,placement:i="left",className:o,resizable:l,size:c,minSize:u,maxSize:d,onResizeStart:p,onResizeEnd:h,onResize:f,style:m={},overlayRef:v,...g}=e,{currentSize:w,onResizerPointerDown:b}=function(e){const{placement:t="left",size:n,minSize:r=Pa,maxSize:i=Ba,onResizeStart:o,onResizeEnd:l,onResize:s,overlayRef:c}=e,u=["left","right"].includes(t),d=a.useCallback(()=>u?c.current?.clientWidth??0:c.current?.clientHeight??0,[u,c]),[p,h]=a.useState(!1),[f,m]=a.useState(0),[v,g]=a.useState(n??400),w=a.useCallback(e=>Math.min(Math.max(e,r),i),[r,i]),b=a.useCallback(e=>{const n=["right","bottom"].includes(t)?e:-e,r=d(),a=Math.min(v+n,r);return w(a)},[v,t,w,d]),y=a.useCallback(()=>{h(!0),m(0),o?.(b(0))},[o,b]),x=a.useCallback(e=>{m(e),s?.(b(e))},[b,s]),C=a.useCallback(e=>{const t=b(e);h(!1),g(t),l?.(t)},[b,l]),E=p?b(f):w(n??v),{onPointerDown:S}=function({onStart:e,onMove:t,onEnd:n,arrangement:r="horizontal"}){const i=a.useRef(0),o=a.useCallback(e=>{const n="horizontal"===r?e.clientX:e.clientY;t(i.current-n)},[r,t]),l=a.useCallback(e=>{window.removeEventListener("pointermove",o),n(i.current-("horizontal"===r?e.clientX:e.clientY),e)},[r,o,n]),s=a.useCallback(t=>{t.preventDefault();const n="horizontal"===r?t.clientX:t.clientY;i.current=n,e(),window.addEventListener("pointermove",o),window.addEventListener("pointerup",l,{once:!0})},[e,r,o,l]);return a.useEffect(()=>()=>{window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",l)},[o,l]),{onPointerDown:s}}({onStart:y,onMove:x,onEnd:C,arrangement:u?"horizontal":"vertical"}),A=a.useCallback(()=>{const e=d();e>=v||(g(Math.max(r,e)),s?.(e),l?.(e))},[d,r,v,s,l]);return a.useEffect(()=>(window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}),[A]),{currentSize:E,onResizerPointerDown:S}}({placement:i,size:c,minSize:u,maxSize:d,onResizeStart:p,onResizeEnd:h,onResize:f,overlayRef:v}),y=["left","right"].includes(i),x=!y,C=u??Pa,E=l?(0,s.jsx)("div",{className:Da("resizer"),onPointerDown:n&&l?b:void 0,children:(0,s.jsx)("div",{className:Da("resizer-handle")})}):null;return(0,s.jsxs)("div",{ref:t,className:Da("item",{resizable:l,hidden:!n},o),style:{...m,minWidth:y?`${C}px`:void 0,minHeight:x?`${C}px`:void 0,width:y?`${w}px`:void 0,height:x?`${w}px`:void 0},...g,children:[E,r]})}),Va=(0,oe.om)("drawer"),Fa=({open:e,onOpenChange:t,placement:n="left",children:r,contentClassName:i,resizable:o=!1,size:l,minSize:c,maxSize:u,onResizeStart:d,onResizeEnd:p,onResize:h,className:f,style:m,qa:v,disableEscapeKeyDown:g,disableOutsideClick:w,initialFocus:b,returnFocus:y,disableBodyScrollLock:x=!1,disableVisuallyHiddenDismiss:C,onTransitionIn:E,onTransitionInComplete:S,onTransitionOut:A,onTransitionOutComplete:k,floatingRef:M,disablePortal:R,keepMounted:j=!1,container:O,...N})=>{const L=(0,Ze.fI)(),{refs:z,context:T}=(0,Ze.we)({nodeId:L,open:e,onOpenChange:t}),I=a.useRef(null),{isMounted:P,status:B}=(0,Ia.B)({context:T,duration:300,onTransitionIn:E,onTransitionInComplete:S,onTransitionOut:A,onTransitionOutComplete:k}),_=(0,Ze.s9)(T,{enabled:!g||!w,outsidePress:e=>!w&&!(e.target.closest(`.${Va()}`)!==I.current),escapeKey:!g}),D=(0,Ze.It)(T,{role:"dialog"}),{getFloatingProps:H}=(0,Ze.bv)([_,D]),V=(0,Xe.N)(z.setFloating,M),F=P||j?(0,s.jsx)(tt.Z,{container:O,disablePortal:R,children:(0,s.jsx)(Ze.zR,{style:m,ref:I,className:Va({open:e,placement:n},f),"data-qa":v,"data-floating-ui-status":B,lockScroll:!x,children:(0,s.jsx)(Ze.s3,{context:T,disabled:!P,modal:P,initialFocus:b??z.floating,returnFocus:y,visuallyHiddenDismiss:!C&&_a("close"),restoreFocus:!0,children:(0,s.jsx)(Ha,{ref:V,open:e,placement:n,className:i,resizable:o,size:l,onResize:h,onResizeStart:d,onResizeEnd:p,minSize:c,maxSize:u,overlayRef:I,...(0,Pe.$)(N,{labelable:!0}),...H(),children:r})})})}):null;return(0,s.jsx)(Ze.$c,{id:L,children:F})};var qa=n(17115),Ua=n(83131),$a=n(58617),Wa=n(48448),Ga=n(16721),Ka=n(58454),Za=n(10480),Ya=n(88822),Qa=n(22302);const Xa=(0,oe.om)("file-preview-actions-desktop"),Ja=({actions:e,hoverabelPanelClassName:t})=>{const n=(0,P.u)();return(0,s.jsx)("div",{className:Xa(null,t),children:e.map(({title:e,icon:t,onClick:r,disabled:a,tooltipExtraProps:i,...o},l)=>{const c=o.href?{...o.extraProps,href:o.href}:o.extraProps;return(0,s.jsx)(pt,{title:e,...i,children:(0,s.jsx)(ft.$,{onClick:r,"aria-describedby":`${n}-${l}`,view:"raised",pin:"circle-circle",disabled:a,size:"s",className:Xa("action-button"),"aria-label":e,...c,children:(0,s.jsx)("div",{className:Xa("action-icon-wrapper"),children:t})})},`${n}-${l}`)})})};var ei=n(7020);function ti(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ni=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),ri=()=>Math.random().toString(36).substring(7).split("").join("."),ai={INIT:`@@redux/INIT${ri()}`,REPLACE:`@@redux/REPLACE${ri()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ri()}`};function ii(e,t,n){if("function"!=typeof e)throw new Error(ti(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(ti(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(ti(1));return n(ii)(e,t)}let r=e,a=t,i=new Map,o=i,l=0,s=!1;function c(){o===i&&(o=new Map,i.forEach((e,t)=>{o.set(t,e)}))}function u(){if(s)throw new Error(ti(3));return a}function d(e){if("function"!=typeof e)throw new Error(ti(4));if(s)throw new Error(ti(5));let t=!0;c();const n=l++;return o.set(n,e),function(){if(t){if(s)throw new Error(ti(6));t=!1,c(),o.delete(n),i=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(ti(7));if(void 0===e.type)throw new Error(ti(8));if("string"!=typeof e.type)throw new Error(ti(17));if(s)throw new Error(ti(9));try{s=!0,a=r(a,e)}finally{s=!1}return(i=o).forEach(e=>{e()}),e}return p({type:ai.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(ti(10));r=e,p({type:ai.REPLACE})},[ni]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(ti(11));function n(){const e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[ni](){return this}}}}}function oi(e,t){return function(...n){return t(e.apply(this,n))}}function li(e,t){if("function"==typeof e)return oi(e,t);if("object"!=typeof e||null===e)throw new Error(ti(16));const n={};for(const r in e){const a=e[r];"function"==typeof a&&(n[r]=oi(a,t))}return n}function si(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}n(78418);var ci=a.version.startsWith("19"),ui=Symbol.for(ci?"react.transitional.element":"react.element"),di=Symbol.for("react.portal"),pi=Symbol.for("react.fragment"),hi=Symbol.for("react.strict_mode"),fi=Symbol.for("react.profiler"),mi=Symbol.for("react.consumer"),vi=Symbol.for("react.context"),gi=Symbol.for("react.forward_ref"),wi=Symbol.for("react.suspense"),bi=Symbol.for("react.suspense_list"),yi=Symbol.for("react.memo"),xi=Symbol.for("react.lazy"),Ci=gi,Ei=yi;function Si(e,t,n,r,{areStatesEqual:a,areOwnPropsEqual:i,areStatePropsEqual:o}){let l,s,c,u,d,p=!1;return function(h,f){return p?function(p,h){const f=!i(h,s),m=!a(p,l,h,s);return l=p,s=h,f&&m?(c=e(l,s),t.dependsOnOwnProps&&(u=t(r,s)),d=n(c,u,s),d):f?(e.dependsOnOwnProps&&(c=e(l,s)),t.dependsOnOwnProps&&(u=t(r,s)),d=n(c,u,s),d):m?function(){const t=e(l,s),r=!o(t,c);return c=t,r&&(d=n(c,u,s)),d}():d}(h,f):(l=h,s=f,c=e(l,s),u=t(r,s),d=n(c,u,s),p=!0,d)}}function Ai(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function ki(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Mi(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=ki(e);let a=r(t,n);return"function"==typeof a&&(r.mapToProps=a,r.dependsOnOwnProps=ki(a),a=r(t,n)),a},r}}function Ri(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function ji(e,t,n){return{...n,...e,...t}}var Oi={notify(){},get:()=>[]};function Ni(e,t){let n,r=Oi,a=0,i=!1;function o(){c.onStateChange&&c.onStateChange()}function l(){a++,n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const a=t={callback:n,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){r&&null!==e&&(r=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}())}function s(){a--,n&&0===a&&(n(),n=void 0,r.clear(),r=Oi)}const c={addNestedSub:function(e){l();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),s())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,l())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>r};return c}var Li=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),zi=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),Ti=(()=>Li||zi?a.useLayoutEffect:a.useEffect)();function Ii(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Pi(e,t){if(Ii(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r({}))}(e),h=function(e){return e&&"object"==typeof e?Ai(t=>function(e,t){const n={};for(const r in e){const a=e[r];"function"==typeof a&&(n[r]=(...e)=>t(a(...e)))}return n}(e,t)):e?"function"==typeof e?Mi(e):Ri(e,"mapDispatchToProps"):Ai(e=>({dispatch:e}))}(t),f=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let a,i=!1;return function(t,n,o){const l=e(t,n,o);return i?r(l,a)||(a=l):(i=!0,a=l),a}}}(e):Ri(e,"mergeProps"):()=>ji}(n),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:m,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:h,initMergeProps:f,areStatesEqual:i,areStatePropsEqual:l,areOwnPropsEqual:o,areMergedPropsEqual:s};function u(t){const[n,i,o]=a.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),l=a.useMemo(()=>d,[n,d]),s=a.useContext(l),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(s)&&Boolean(s.store),p=c?t.store:s.store,h=u?s.getServerState:p.getState,f=a.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...a}){return Si(t(e,a),n(e,a),r(e,a),e,a)}(p.dispatch,r),[p]),[v,g]=a.useMemo(()=>{if(!m)return Ji;const e=Ni(p,c?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[p,c,s]),w=a.useMemo(()=>c?s:{...s,subscription:v},[c,s,v]),b=a.useRef(void 0),y=a.useRef(o),x=a.useRef(void 0),C=a.useRef(!1),E=a.useRef(!1),S=a.useRef(void 0);Ti(()=>(E.current=!0,()=>{E.current=!1}),[]);const A=a.useMemo(()=>()=>x.current&&o===y.current?x.current:f(p.getState(),o),[p,o]),k=a.useMemo(()=>e=>v?function(e,t,n,r,a,i,o,l,s,c,u){if(!e)return()=>{};let d=!1,p=null;const h=()=>{if(d||!l.current)return;const e=t.getState();let n,h;try{n=r(e,a.current)}catch(e){h=e,p=e}h||(p=null),n===i.current?o.current||c():(i.current=n,s.current=n,o.current=!0,u())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(m,p,v,f,y,b,C,E,x,g,e):()=>{},[v]);var M,R;let j;M=eo,R=[y,b,C,o,x,g],Ti(()=>M(...R),undefined);try{j=a.useSyncExternalStore(k,A,h?()=>f(h(),o):A)}catch(e){throw S.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${S.current.stack}\n\n`),e}Ti(()=>{S.current=void 0,x.current=void 0,b.current=j});const O=a.useMemo(()=>a.createElement(e,{...j,ref:i}),[i,e,j]);return a.useMemo(()=>m?a.createElement(l.Provider,{value:w},O):O,[l,O,w])}const v=a.memo(u);if(v.WrappedComponent=e,v.displayName=u.displayName=n,c){const t=a.forwardRef(function(e,t){return a.createElement(v,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,Ki(t,e)}return Ki(v,e)}},ro=function(e){const{children:t,context:n,serverState:r,store:i}=e,o=a.useMemo(()=>{const e=Ni(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}},[i,r]),l=a.useMemo(()=>i.getState(),[i]);Ti(()=>{const{subscription:e}=o;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),l!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[o,l]);const s=n||Xi;return a.createElement(s.Provider,{value:o},t)},ao=function(e){var t=e.top,n=e.right,r=e.bottom,a=e.left;return{top:t,right:n,bottom:r,left:a,width:n-a,height:r-t,x:a,y:t,center:{x:(n+a)/2,y:(r+t)/2}}},io=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},oo=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},lo={top:0,right:0,bottom:0,left:0},so=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?lo:n,a=e.border,i=void 0===a?lo:a,o=e.padding,l=void 0===o?lo:o,s=ao(io(t,r)),c=ao(oo(t,i)),u=ao(oo(c,l));return{marginBox:s,borderBox:ao(t),paddingBox:c,contentBox:u,margin:r,border:i,padding:l}},co=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(){throw new Error("Invariant failed")}(),n},uo=function(e,t){var n,r,a=e.borderBox,i=e.border,o=e.margin,l=e.padding,s=(r=t,{top:(n=a).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return so({borderBox:s,border:i,margin:o,padding:l})},po=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),uo(e,t)},ho=function(e,t){var n={top:co(t.marginTop),right:co(t.marginRight),bottom:co(t.marginBottom),left:co(t.marginLeft)},r={top:co(t.paddingTop),right:co(t.paddingRight),bottom:co(t.paddingBottom),left:co(t.paddingLeft)},a={top:co(t.borderTopWidth),right:co(t.borderRightWidth),bottom:co(t.borderBottomWidth),left:co(t.borderLeftWidth)};return so({borderBox:e,margin:n,padding:r,border:a})},fo=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return ho(t,n)};const mo=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,a=new Array(r),i=0;i{const r=(a=n,i=t.options,{...a,...i});var a,i;return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(e=>{e()})}}vo.bind(null,"warn"),vo.bind(null,"error");class bo extends Error{}function yo(e,t){throw new bo("Invariant failed")}bo.prototype.toString=function(){return this.message};class xo extends a.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=go,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof bo&&e.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in ");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=wo(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof bo))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const Co=e=>e+1,Eo=(e,t)=>{const n=e.droppableId===t.droppableId,r=Co(e.index),a=Co(t.index);return n?`\n You have moved the item from position ${r}\n to position ${a}\n `:`\n You have moved the item from position ${r}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${a}\n `},So=(e,t,n)=>t.droppableId===n.droppableId?`\n The item ${e}\n has been combined with ${n.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${n.draggableId}\n in list ${n.droppableId}\n `,Ao=e=>`\n The item has returned to its starting position\n of ${Co(e.index)}\n`,ko="\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",Mo=e=>`\n You have lifted an item in position ${Co(e.source.index)}\n`,Ro=e=>{const t=e.destination;if(t)return Eo(e.source,t);const n=e.combine;return n?So(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},jo=e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${Ao(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${Eo(e.source,t)}\n `:n?`\n You have dropped the item.\n ${So(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${Ao(e.source)}\n `};function Oo(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function No(e,t){if(e.length!==t.length)return!1;for(let n=0;n({inputs:t,result:e()}))[0],r=(0,a.useRef)(!0),i=(0,a.useRef)(n),o=r.current||Boolean(t&&i.current.inputs&&No(t,i.current.inputs))?i.current:{inputs:t,result:e()};return(0,a.useEffect)(()=>{r.current=!1,i.current=o},[o]),o.result}function zo(e,t){return Lo(()=>e,t)}const To={x:0,y:0},Io=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Po=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Bo=(e,t)=>e.x===t.x&&e.y===t.y,_o=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),Do=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},Ho=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Vo=(e,t)=>Math.min(...t.map(t=>Ho(e,t))),Fo=e=>t=>({x:e(t.x),y:e(t.y)}),qo=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Uo=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],$o=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=ao({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n})(t.pageMarginBox,e):ao(e);var Wo=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const a=((e,t)=>t?qo(e,t.scroll.diff.displacement):e)(e.marginBox,r),i=((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e)(a,n,t);return{page:e,withPlaceholder:t,active:$o(i,r)}},Go=(e,t)=>{e.frame||yo();const n=e.frame,r=Po(t,n.scroll.initial),a=_o(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}},o=Wo({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:o}};function Ko(e,t=No){let n=null;function r(...r){if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;const a=e.apply(this,r);return n={lastResult:a,lastArgs:r,lastThis:this},a}return r.clear=function(){n=null},r}const Zo=Ko(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),Yo=Ko(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),Qo=Ko(e=>Object.values(e)),Xo=Ko(e=>Object.values(e));var Jo=Ko((e,t)=>{const n=Xo(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index);return n});function el(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function tl(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var nl=Ko((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),rl=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const al={point:To,value:0},il={invisible:{},visible:{},all:[]},ol={displaced:il,displacedBy:al,at:null};var ll=(e,t)=>n=>e<=n&&n<=t,sl=e=>{const t=ll(e.top,e.bottom),n=ll(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const a=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(a&&i)return!0;const o=r.tope.bottom,l=r.lefte.right;return!(!o||!l)||(o&&i||l&&a)}},cl=e=>{const t=ll(e.top,e.bottom),n=ll(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const ul={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},dl={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},pl=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:a})=>{const i=r?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:To;return qo(e,n)})(e,t):e;return((e,t,n)=>!!t.subject.active&&n(t.subject.active)(e))(i,t,a)&&((e,t,n)=>n(t)(e))(i,n,a)},hl=e=>pl({...e,isVisibleThroughFrameFn:cl});function fl({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:a,last:i}){return e.reduce(function(e,o){const l=function(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return ao(io(n,r))}(o,n),s=o.descriptor.id;var c;if(e.all.push(s),c={target:l,destination:t,viewport:r,withDroppableDisplacement:!0},!pl({...c,isVisibleThroughFrameFn:sl}))return e.invisible[o.descriptor.id]=!0,e;const u=((e,t,n)=>{if("boolean"==typeof n)return n;if(!t)return!0;const{invisible:r,visible:a}=t;if(r[e])return!1;const i=a[e];return!i||i.shouldAnimate})(s,i,a),d={draggableId:s,shouldAnimate:u};return e.visible[s]=d,e},{all:[],visible:{},invisible:{}})}function ml({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const a=function(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(e,{inHomeList:t});return{displaced:il,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function vl({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:a,last:i,index:o,forceShouldAnimate:l}){const s=rl(e,n);if(null==o)return ml({insideDestination:t,inHomeList:s,displacedBy:a,destination:n});const c=t.find(e=>e.descriptor.index===o);if(!c)return ml({insideDestination:t,inHomeList:s,displacedBy:a,destination:n});const u=nl(e,t),d=t.indexOf(c);return{displaced:fl({afterDragging:u.slice(d),destination:n,displacedBy:a,last:i,viewport:r.frame,forceShouldAnimate:l}),displacedBy:a,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function gl(e,t){return Boolean(t.effected[e])}const wl=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,bl=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,yl=({axis:e,moveRelativeTo:t,isMoving:n})=>Do(e.line,t.marginBox[e.end]+wl(e,n),bl(e,t.marginBox,n)),xl=({axis:e,moveRelativeTo:t,isMoving:n})=>Do(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),bl(e,t.marginBox,n));var Cl=(e,t)=>{const n=e.frame;return n?Io(t,n.scroll.diff.displacement):t},El=e=>{const t=(({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:a})=>{const i=t.page.borderBox.center,o=e.at;return n&&o?"REORDER"===o.type?(({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:a})=>{const i=Jo(r.descriptor.id,n),o=t.page,l=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>Do(e.line,t.contentBox[e.start]+wl(e,n),bl(e,t.contentBox,n)))({axis:l,moveInto:r.page,isMoving:o});const{displaced:s,displacedBy:c}=e,u=s.all[0];if(u){const e=n[u];if(gl(u,a))return xl({axis:l,moveRelativeTo:e.page,isMoving:o});const t=uo(e.page,c.point);return xl({axis:l,moveRelativeTo:t,isMoving:o})}const d=i[i.length-1];if(d.descriptor.id===t.descriptor.id)return o.borderBox.center;if(gl(d.descriptor.id,a)){const e=uo(d.page,_o(a.displacedBy.point));return yl({axis:l,moveRelativeTo:e,isMoving:o})}return yl({axis:l,moveRelativeTo:d.page,isMoving:o})})({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:a}):(({afterCritical:e,impact:t,draggables:n})=>{const r=tl(t);r||yo();const a=r.draggableId,i=n[a].page.borderBox.center,o=(({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const a=Boolean(e.visible[n]||e.invisible[n]);return gl(n,t)?a?To:_o(r.point):a?r.point:To})({displaced:t.displaced,afterCritical:e,combineWith:a,displacedBy:t.displacedBy});return Io(i,o)})({impact:e,draggables:r,afterCritical:a}):i})(e),n=e.droppable;return n?Cl(n,t):t},Sl=(e,t)=>{const n=Po(t,e.scroll.initial),r=_o(n);return{frame:ao({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function Al(e,t){return e.map(e=>t[e])}var kl=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>Io(e.scroll.diff.displacement,t))(n,e),a=Po(r,t.page.borderBox.center);return Io(t.client.borderBox.center,a)},Ml=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:a,onlyOnMainAxis:i=!1})=>{const o=Po(n,e.page.borderBox.center),l={target:qo(e.page.borderBox,o),destination:t,withDroppableDisplacement:a,viewport:r};return i?(e=>{return pl({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=ll(e.top,e.bottom),r=ll(e.left,e.right);return e=>t===ul?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(l):hl(l)},Rl=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:a,viewport:i,previousPageBorderBoxCenter:o,previousClientSelection:l,afterCritical:s})=>{if(!n.isEnabled)return null;const c=Jo(n.descriptor.id,r),u=rl(t,n),d=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:a})=>{if(!n.isCombineEnabled)return null;if(!el(a))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return{...a,at:t}}const o=a.displaced.all,l=o.length?o[0]:null;if(e)return l?i(l):null;const s=nl(t,r);if(!l)return s.length?i(s[s.length-1].descriptor.id):null;const c=s.findIndex(e=>e.descriptor.id===l);-1===c&&yo();const u=c-1;return u<0?null:i(s[u].descriptor.id)})({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:a})||(({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:a,insideDestination:i,previousImpact:o,viewport:l,afterCritical:s})=>{const c=o.at;if(c||yo(),"REORDER"===c.type){const r=(({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const a=r.index,i=e?a+1:a-1,o=n[0].descriptor.index,l=n[n.length-1].descriptor.index;return i(t?l:l+1)?null:i})({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return null==r?null:vl({draggable:n,insideDestination:i,destination:a,viewport:l,last:o.displaced,displacedBy:o.displacedBy,index:r})}const u=(({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:a})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,o=n[i].descriptor.index;return gl(i,a)?e?o:o-1:e?o+1:o})({isMovingForward:e,destination:a,displaced:o.displaced,draggables:r,combine:c.combine,afterCritical:s});return null==u?null:vl({draggable:n,insideDestination:i,destination:a,viewport:l,last:o.displaced,displacedBy:o.displacedBy,index:u})})({isMovingForward:e,isInHomeList:u,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:a,viewport:i,afterCritical:s});if(!d)return null;const p=El({impact:d,draggable:t,droppable:n,draggables:r,afterCritical:s});if(Ml({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:kl({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:d,scrollJumpRequest:null};const h=Po(p,o),f=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:a})=>{const i=Sl(t,Io(t.scroll.current,a)),o=n.frame?Go(n,Io(n.frame.scroll.current,a)):n,l=e.displaced,s=fl({afterDragging:Al(l.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:l,forceShouldAnimate:!1}),c=fl({afterDragging:Al(l.all,r),destination:o,displacedBy:e.displacedBy,viewport:t.frame,last:l,forceShouldAnimate:!1}),u={},d={},p=[l,s,c];return l.all.forEach(e=>{const t=function(e,t){for(let n=0;n{const t=e.subject.active;return t||yo(),t},Ol=(e,t)=>{const n=e.page.borderBox.center;return gl(e.descriptor.id,t)?Po(n,t.displacedBy.point):n},Nl=(e,t)=>{const n=e.page.borderBox;return gl(e.descriptor.id,t)?qo(n,_o(t.displacedBy.point)):n};var Ll=Ko(function(e,t){const n=t[e.line];return{value:n,point:Do(e.line,n)}});const zl=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),Tl=(e,t,n)=>{const r=e.frame;rl(t,e)&&yo(),e.subject.withPlaceholder&&yo();const a=Ll(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return Do(r.line,t[r.line]);const a=e.subject.page.contentBox[r.size],i=Jo(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-a;return i<=0?null:Do(r.line,i)})(e,a,n),o={placeholderSize:a,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=Wo({page:e.subject.page,withPlaceholder:o,axis:e.axis,frame:e.frame});return{...e,subject:t}}const l=i?Io(r.scroll.max,i):r.scroll.max,s=zl(r,l),c=Wo({page:e.subject.page,withPlaceholder:o,axis:e.axis,frame:s});return{...e,subject:c,frame:s}};var Il=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},Pl=({state:e,type:t})=>{const n=((e,t)=>{const n=Il(e);return n?t[n]:null})(e.impact,e.dimensions.droppables),r=Boolean(n),a=e.dimensions.droppables[e.critical.droppable.id],i=n||a,o=i.axis.direction,l="vertical"===o&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===o&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(l&&!r)return null;const s="MOVE_DOWN"===t||"MOVE_RIGHT"===t,c=e.dimensions.draggables[e.critical.draggable.id],u=e.current.page.borderBoxCenter,{draggables:d,droppables:p}=e.dimensions;return l?Rl({isMovingForward:s,previousPageBorderBoxCenter:u,draggable:c,destination:i,draggables:d,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):(({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:a,droppables:i,viewport:o,afterCritical:l})=>{const s=(({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:a})=>{const i=n.subject.active;if(!i)return null;const o=n.axis,l=ll(i[o.start],i[o.end]),s=Qo(r).filter(e=>e!==n).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>sl(a.frame)(jl(e))).filter(t=>{const n=jl(t);return e?i[o.crossAxisEnd]{const t=jl(e),n=ll(t[o.start],t[o.end]);return l(t[o.start])||l(t[o.end])||n(i[o.start])||n(i[o.end])}).sort((t,n)=>{const r=jl(t)[o.crossAxisStart],a=jl(n)[o.crossAxisStart];return e?r-a:a-r}).filter((e,t,n)=>jl(e)[o.crossAxisStart]===jl(n[0])[o.crossAxisStart]);if(!s.length)return null;if(1===s.length)return s[0];const c=s.filter(e=>ll(jl(e)[o.start],jl(e)[o.end])(t[o.line]));return 1===c.length?c[0]:c.length>1?c.sort((e,t)=>jl(e)[o.start]-jl(t)[o.start])[0]:s.sort((e,n)=>{const r=Vo(t,Uo(jl(e))),a=Vo(t,Uo(jl(n)));return r!==a?r-a:jl(e)[o.start]-jl(n)[o.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:o});if(!s)return null;const c=Jo(s.descriptor.id,a),u=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:a})=>{const i=r.filter(e=>hl({target:Nl(e,a),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,r)=>{const i=Ho(e,Cl(n,Ol(t,a))),o=Ho(e,Cl(n,Ol(r,a)));return i{if(!t){if(n.length)return null;const e={displaced:il,displacedBy:al,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=El({impact:e,draggable:r,droppable:i,draggables:a,afterCritical:l}),s=rl(r,i)?i:Tl(i,r,a);return Ml({draggable:r,destination:s,newPageBorderBoxCenter:t,viewport:o.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const s=Boolean(e[i.axis.line]<=t.page.borderBox.center[i.axis.line]),c=(()=>{const e=t.descriptor.index;return t.descriptor.id===r.descriptor.id||s?e:e+1})(),u=Ll(i.axis,r.displaceBy);return vl({draggable:r,insideDestination:n,destination:i,viewport:o,displacedBy:u,last:il,index:c})})({previousPageBorderBoxCenter:t,destination:s,draggable:n,draggables:a,moveRelativeTo:u,insideDestination:c,viewport:o,afterCritical:l});if(!d)return null;const p=El({impact:d,draggable:n,droppable:s,draggables:a,afterCritical:l});return{clientSelection:kl({pageBorderBoxCenter:p,draggable:n,viewport:o}),impact:d,scrollJumpRequest:null}})({isMovingForward:s,previousPageBorderBoxCenter:u,draggable:c,isOver:i,draggables:d,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function Bl(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function _l(e){const t=ll(e.top,e.bottom),n=ll(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}const Dl=(e,t)=>ao(qo(e,t));function Hl({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var Vl=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:a,viewport:i,afterCritical:o})=>{const l=Dl(t.page.borderBox,e),s=function({pageBorderBox:e,draggable:t,droppables:n}){const r=Qo(n).filter(t=>{if(!t.isEnabled)return!1;const n=t.subject.active;if(!n)return!1;if(a=n,!((r=e).lefta.left&&r.topa.top))return!1;var r,a;if(_l(n)(e.center))return!0;const i=t.axis,o=n.center[i.crossAxisLine],l=e[i.crossAxisStart],s=e[i.crossAxisEnd],c=ll(n[i.crossAxisStart],n[i.crossAxisEnd]),u=c(l),d=c(s);return!u&&!d||(u?lo)});return r.length?1===r.length?r[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,a=n.map(t=>{const n=t.axis,a=Do(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:Ho(r,a)}}).sort((e,t)=>t.distance-e.distance);return a[0]?a[0].id:null}({pageBorderBox:e,draggable:t,candidates:r}):null}({pageBorderBox:l,draggable:t,droppables:r});if(!s)return ol;const c=r[s],u=Jo(c.descriptor.id,n),d=((e,t)=>{const n=e.frame;return n?Dl(t,n.scroll.diff.value):t})(c,l);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:a,afterCritical:i})=>{if(!r.isCombineEnabled)return null;const o=r.axis,l=Ll(r.axis,e.displaceBy),s=l.value,c=t[o.start],u=t[o.end],d=nl(e,a).find(e=>{const t=e.descriptor.id,r=e.page.borderBox,a=r[o.size]/4,l=gl(t,i),d=Hl({displaced:n.displaced,id:t});return l?d?u>r[o.start]+a&&ur[o.start]-s+a&&cr[o.start]+s+a&&ur[o.start]+a&&c{const l=n.axis,s=Ll(n.axis,t.displaceBy),c=s.value,u=e[l.start],d=e[l.end],p=function({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:nl(t,r).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[l.line],r=gl(t,o),i=Hl({displaced:a,id:t});return r?i?d<=n:u({...e,[t.descriptor.id]:t});var ql=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:a,scrollJumpRequest:i})=>{const o=r||e.viewport,l=n||e.dimensions,s=t||e.current.client.selection,c=Po(s,e.initial.client.selection),u={offset:c,selection:s,borderBoxCenter:Io(e.initial.client.borderBoxCenter,c)},d={selection:Io(u.selection,o.scroll.current),borderBoxCenter:Io(u.borderBoxCenter,o.scroll.current),offset:Io(u.offset,o.scroll.diff.value)},p={client:u,page:d};if("COLLECTING"===e.phase)return{...e,dimensions:l,viewport:o,current:p};const h=l.draggables[e.critical.draggable.id],f=a||Vl({pageOffset:d.offset,draggable:h,draggables:l.draggables,droppables:l.droppables,previousImpact:e.impact,viewport:o,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:a})=>{const i=(({previousImpact:e,impact:t,droppables:n})=>{const r=Il(e),a=Il(t);if(!r)return n;if(r===a)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const o=(e=>{const t=e.subject.withPlaceholder;t||yo();const n=e.frame;if(!n){const t=Wo({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||yo();const a=zl(n,r),i=Wo({page:e.subject.page,axis:e.axis,frame:a,withPlaceholder:null});return{...e,subject:i,frame:a}})(i);return Fl(n,o)})({previousImpact:r,impact:a,droppables:n}),o=Il(a);if(!o)return i;const l=n[o];if(rl(e,l))return i;if(l.subject.withPlaceholder)return i;const s=Tl(l,e,t);return Fl(i,s)})({draggable:h,impact:f,previousImpact:e.impact,draggables:l.draggables,droppables:l.droppables});return{...e,current:p,dimensions:{draggables:l.draggables,droppables:m},impact:f,viewport:o,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}},Ul=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:a})=>{const i=e.displaced,o=function(e,t){return e.map(e=>t[e])}(i.all,n),l=fl({afterDragging:o,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:a,last:i});return{...e,displaced:l}},$l=({impact:e,draggable:t,droppable:n,draggables:r,viewport:a,afterCritical:i})=>{const o=El({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return kl({pageBorderBoxCenter:o,draggable:t,viewport:a})},Wl=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&yo();const r=e.impact,a=n||e.viewport,i=t||e.dimensions,{draggables:o,droppables:l}=i,s=o[e.critical.draggable.id],c=Il(r);c||yo();const u=l[c],d=Ul({impact:r,viewport:a,destination:u,draggables:o}),p=$l({impact:d,draggable:s,droppable:u,draggables:o,viewport:a,afterCritical:e.afterCritical});return ql({impact:d,clientSelection:p,state:e,dimensions:i,viewport:a})},Gl=({draggable:e,home:t,draggables:n,viewport:r})=>{const a=Ll(t.axis,e.displaceBy),i=Jo(t.descriptor.id,n),o=i.indexOf(e);-1===o&&yo();const l=i.slice(o+1),s=l.reduce((e,t)=>(e[t.descriptor.id]=!0,e),{}),c={inVirtualList:"virtual"===t.descriptor.mode,displacedBy:a,effected:s};var u;return{impact:{displaced:fl({afterDragging:l,destination:t,displacedBy:a,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:a,at:{type:"REORDER",destination:(u=e.descriptor,{index:u.index,droppableId:u.droppableId})}},afterCritical:c}};const Kl=e=>"SNAP"===e.movementMode,Zl=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:Fl(e.droppables,t)}))(e.dimensions,t);return!Kl(e)||n?ql({state:e,dimensions:r}):Wl({state:e,dimensions:r})};function Yl(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const Ql={phase:"IDLE",completed:null,shouldFlush:!1};var Xl=(e=Ql,t)=>{if("FLUSH"===t.type)return{...Ql,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&yo();const{critical:n,clientSelection:r,viewport:a,dimensions:i,movementMode:o}=t.payload,l=i.draggables[n.draggable.id],s=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:l.client.borderBox.center,offset:To},u={client:c,page:{selection:Io(c.selection,a.scroll.initial),borderBoxCenter:Io(c.selection,a.scroll.initial),offset:Io(c.selection,a.scroll.diff.value)}},d=Qo(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:h}=Gl({draggable:l,home:s,draggables:i.draggables,viewport:a});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:o,dimensions:i,initial:u,current:u,isWindowScrollAllowed:d,impact:p,afterCritical:h,onLiftImpact:p,viewport:a,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&yo(),{...e,phase:"COLLECTING"});if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&yo(),(({state:e,published:t})=>{const n=t.modified.map(t=>{const n=e.dimensions.droppables[t.droppableId];return Go(n,t.scroll)}),r={...e.dimensions.droppables,...Zo(n)},a=Yo((({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(e=>{const a=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||yo(),t})(t[a]),o=i.scroll.diff.value,l=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=uo(e.client,t),a=po(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:a}})({draggable:e,offset:Io(r,o),initialWindowScroll:n.scroll.initial});return l})})({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...a};t.removals.forEach(e=>{delete i[e]});const o={droppables:r,draggables:i},l=Il(e.impact),s=l?o.droppables[l]:null,c=o.draggables[e.critical.draggable.id],u=o.droppables[e.critical.droppable.id],{impact:d,afterCritical:p}=Gl({draggable:c,home:u,draggables:i,viewport:e.viewport}),h=s&&s.isCombineEnabled?e.impact:d,f=Vl({pageOffset:e.current.page.offset,draggable:o.draggables[e.critical.draggable.id],draggables:o.draggables,droppables:o.droppables,previousImpact:h,viewport:e.viewport,afterCritical:p}),m={...e,phase:"DRAGGING",impact:f,onLiftImpact:d,dimensions:o,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;Bl(e)||yo();const{client:n}=t.payload;return Bo(n,e.current.client.selection)?e:ql({state:e,clientSelection:n,impact:Kl(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return Yl(e);if("COLLECTING"===e.phase)return Yl(e);Bl(e)||yo();const{id:n,newScroll:r}=t.payload,a=e.dimensions.droppables[n];if(!a)return e;const i=Go(a,r);return Zl(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Bl(e)||yo();const{id:n,isEnabled:r}=t.payload,a=e.dimensions.droppables[n];a||yo(),a.isEnabled===r&&yo();const i={...a,isEnabled:r};return Zl(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Bl(e)||yo();const{id:n,isCombineEnabled:r}=t.payload,a=e.dimensions.droppables[n];a||yo(),a.isCombineEnabled===r&&yo();const i={...a,isCombineEnabled:r};return Zl(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;Bl(e)||yo(),e.isWindowScrollAllowed||yo();const n=t.payload.newScroll;if(Bo(e.viewport.scroll.current,n))return Yl(e);const r=Sl(e.viewport,n);return Kl(e)?Wl({state:e,viewport:r}):ql({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!Bl(e))return e;const n=t.payload.maxScroll;if(Bo(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&yo();const n=Pl({state:e,type:t.type});return n?ql({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;return"COLLECTING"!==e.phase&&yo(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:a}=t.payload;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&yo(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:a,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};function Jl(e,t){return e instanceof Object&&"type"in e&&e.type===t}const es=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),ts=()=>({type:"COLLECTION_STARTING",payload:null}),ns=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),rs=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),as=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),is=e=>({type:"MOVE",payload:e}),os=()=>({type:"MOVE_UP",payload:null}),ls=()=>({type:"MOVE_DOWN",payload:null}),ss=()=>({type:"MOVE_RIGHT",payload:null}),cs=()=>({type:"MOVE_LEFT",payload:null}),us=e=>({type:"DROP_COMPLETE",payload:e}),ds=e=>({type:"DROP",payload:e}),ps="cubic-bezier(.2,1,.1,1)",hs=0,fs=.7,ms=.75,vs={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},gs=`${vs.outOfTheWay}s cubic-bezier(0.2, 0, 0, 1)`,ws={fluid:`opacity ${gs}`,snap:`transform ${gs}, opacity ${gs}`,drop:e=>{const t=`${e}s ${ps}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${gs}`,placeholder:`height ${gs}, width ${gs}, margin ${gs}`},bs=e=>Bo(e,To)?void 0:`translate(${e.x}px, ${e.y}px)`,ys=bs,{minDropTime:xs,maxDropTime:Cs}=vs,Es=Cs-xs,Ss=({getState:e,dispatch:t})=>n=>r=>{if(!Jl(r,"DROP"))return void n(r);const a=e(),i=r.payload.reason;if("COLLECTING"===a.phase)return void t((o={reason:i},{type:"DROP_PENDING",payload:o}));var o;if("IDLE"===a.phase)return;"DROP_PENDING"===a.phase&&a.isWaiting&&yo(),"DRAGGING"!==a.phase&&"DROP_PENDING"!==a.phase&&yo();const l=a.critical,s=a.dimensions,c=s.draggables[a.critical.draggable.id],{impact:u,didDropInsideDroppable:d}=(({draggables:e,reason:t,lastImpact:n,home:r,viewport:a,onLiftImpact:i})=>n.at&&"DROP"===t?"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:il},didDropInsideDroppable:!0}:{impact:Ul({draggables:e,impact:i,destination:r,viewport:a,forceShouldAnimate:!0}),didDropInsideDroppable:!1})({reason:i,lastImpact:a.impact,afterCritical:a.afterCritical,onLiftImpact:a.onLiftImpact,home:a.dimensions.droppables[a.critical.droppable.id],viewport:a.viewport,draggables:a.dimensions.draggables}),p=d?el(u):null,h=d?tl(u):null,f={index:l.draggable.index,droppableId:l.droppable.id},m={draggableId:c.descriptor.id,type:c.descriptor.type,source:f,reason:i,mode:a.movementMode,destination:p,combine:h},v=(({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:a})=>{const{draggables:i,droppables:o}=n,l=Il(e),s=l?o[l]:null,c=o[t.descriptor.droppableId],u=$l({impact:e,draggable:t,draggables:i,afterCritical:a,droppable:s||c,viewport:r});return Po(u,t.client.borderBox.center)})({impact:u,draggable:c,dimensions:s,viewport:a.viewport,afterCritical:a.afterCritical}),g={critical:a.critical,afterCritical:a.afterCritical,result:m,impact:u};if(Bo(a.current.client.offset,v)&&!Boolean(m.combine))return void t(us({completed:g}));const w=(({current:e,destination:t,reason:n})=>{const r=Ho(e,t);if(r<=0)return xs;if(r>=1500)return Cs;const a=xs+Es*(r/1500);return Number(("CANCEL"===n?.6*a:a).toFixed(2))})({current:a.current.client.offset,destination:v,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:v,dropDuration:w,completed:g}))};var As=()=>({x:window.pageXOffset,y:window.pageYOffset});const ks=e=>{const t=function({onWindowScroll:e}){const t=mo(function(){e(As())}),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let r=go;function a(){return r!==go}return{start:function(){a()&&yo(),r=wo(window,[n])},stop:function(){a()||yo(),t.cancel(),r(),r=go},isActive:a}}({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{!t.isActive()&&Jl(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>Jl(e,"DROP_COMPLETE")||Jl(e,"DROP_ANIMATE")||Jl(e,"FLUSH"))(n)&&t.stop(),e(n)}};const Ms=(e,t)=>{t()},Rs=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function js(e,t,n,r){if(!e)return void n(r(t));const a=(e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),a=a=>{t||n||(t=!0,e(a),clearTimeout(r))};return a.wasCalled=()=>t,a})(n);e(t,{announce:a}),a.wasCalled()||n(r(t))}var Os=(e,t)=>{const n=((e,t)=>{const n=(()=>{const e=[];return{add:t=>{const n=setTimeout(()=>(t=>{const n=e.findIndex(e=>e.timerId===t);-1===n&&yo();const[r]=e.splice(n,1);r.callback()})(n)),r={timerId:n,callback:t};e.push(r)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}})();let r=null;const a=n=>{r||yo(),r=null,Ms(0,()=>js(e().onDragEnd,n,t,jo))};return{beforeCapture:(t,n)=>{r&&yo(),Ms(0,()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:(t,n)=>{r&&yo(),Ms(0,()=>{const r=e().onBeforeDragStart;r&&r(Rs(t,n))})},start:(a,i)=>{r&&yo();const o=Rs(a,i);r={mode:i,lastCritical:a,lastLocation:o.source,lastCombine:null},n.add(()=>{Ms(0,()=>js(e().onDragStart,o,t,Mo))})},update:(a,i)=>{const o=el(i),l=tl(i);r||yo();const s=!((e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r})(a,r.lastCritical);s&&(r.lastCritical=a);const c=(d=o,!(null==(u=r.lastLocation)&&null==d||null!=u&&null!=d&&u.droppableId===d.droppableId&&u.index===d.index));var u,d;c&&(r.lastLocation=o);const p=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(r.lastCombine,l);if(p&&(r.lastCombine=l),!s&&!c&&!p)return;const h={...Rs(a,r.mode),combine:l,destination:o};n.add(()=>{Ms(0,()=>js(e().onDragUpdate,h,t,Ro))})},flush:()=>{r||yo(),n.flush()},drop:a,abort:()=>{if(!r)return;const e={...Rs(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};a(e)}}})(e,t);return e=>t=>r=>{if(Jl(r,"BEFORE_INITIAL_CAPTURE"))return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(Jl(r,"INITIAL_PUBLISH")){const e=r.payload.critical;return n.beforeStart(e,r.payload.movementMode),t(r),void n.start(e,r.payload.movementMode)}if(Jl(r,"DROP_COMPLETE")){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),Jl(r,"FLUSH"))return void n.abort();const a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}};const Ns=e=>t=>n=>{if(!Jl(n,"DROP_ANIMATION_FINISHED"))return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&yo(),e.dispatch(us({completed:r.completed}))},Ls=e=>{let t=null,n=null;return r=>a=>{if((Jl(a,"FLUSH")||Jl(a,"DROP_COMPLETE")||Jl(a,"DROP_ANIMATION_FINISHED"))&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(a),!Jl(a,"DROP_ANIMATE"))return;const i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame(()=>{n=null,t=wo(window,[i])})}};const zs=e=>t=>n=>{if(t(n),!Jl(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(ds({reason:r.reason})))},Ts=si;var Is=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:a,autoScroller:i})=>{return ii(Xl,Ts(function(...e){return t=>(n,r)=>{const a=t(n,r);let i=()=>{throw new Error(ti(15))};const o={getState:a.getState,dispatch:(e,...t)=>i(e,...t)},l=e.map(e=>e(o));return i=si(...l)(a.dispatch),{...a,dispatch:i}}}((o=n,()=>e=>t=>{Jl(t,"INITIAL_PUBLISH")&&o.dragging(),Jl(t,"DROP_ANIMATE")&&o.dropping(t.payload.completed.result.reason),(Jl(t,"FLUSH")||Jl(t,"DROP_COMPLETE"))&&o.resting(),e(t)}),(e=>()=>t=>n=>{(Jl(n,"DROP_COMPLETE")||Jl(n,"FLUSH")||Jl(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>a=>{if(!Jl(a,"LIFT"))return void r(a);const{id:i,clientSelection:o,movementMode:l}=a.payload,s=t();"DROP_ANIMATING"===s.phase&&n(us({completed:s.completed})),"IDLE"!==t().phase&&yo(),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:l}});const c={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===l}},{critical:u,dimensions:d,viewport:p}=e.startPublishing(c);n({type:"INITIAL_PUBLISH",payload:{critical:u,dimensions:d,clientSelection:o,movementMode:l,viewport:p}})})(e),Ss,Ns,Ls,zs,(e=>t=>n=>r=>{if((e=>Jl(e,"DROP_COMPLETE")||Jl(e,"DROP_ANIMATE")||Jl(e,"FLUSH"))(r))return e.stop(),void n(r);if(Jl(r,"INITIAL_PUBLISH")){n(r);const a=t.getState();return"DRAGGING"!==a.phase&&yo(),void e.start(a)}n(r),e.scroll(t.getState())})(i),ks,(e=>{let t=!1;return()=>n=>r=>{if(Jl(r,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if(Jl(r,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(Jl(r,"DROP_COMPLETE")){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),Os(r,a))));var o},Ps=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const a=Po({x:t,y:e},{x:r,y:n});return{x:Math.max(0,a.x),y:Math.max(0,a.y)}},Bs=()=>{const e=document.documentElement;return e||yo(),e},_s=()=>{const e=Bs();return Ps({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function Ds(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var Hs=(e,t)=>{let n=null;const r=function({registry:e,callbacks:t}){let n={additions:{},removals:{},modified:{}},r=null;const a=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:a,removals:i,modified:o}=n,l=Object.keys(a).map(t=>e.draggable.getById(t).getDimension(To)).sort((e,t)=>e.descriptor.index-t.descriptor.index),s=Object.keys(o).map(t=>({droppableId:t,scroll:e.droppable.getById(t).callbacks.getScrollWhileDragging()})),c={additions:l,removals:Object.keys(i),modified:s};n={additions:{},removals:{},modified:{}},t.publish(c)}))};return{add:e=>{const t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],a()},remove:e=>{const t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],a()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),a=t=>{n||yo();const a=n.critical.draggable;"ADDITION"===t.type&&Ds(e,a,t.value)&&r.add(t.value),"REMOVAL"===t.type&&Ds(e,a,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:(r,a)=>{e.droppable.exists(r)||yo(),n&&t.updateDroppableIsEnabled({id:r,isEnabled:a})},updateDroppableIsCombineEnabled:(r,a)=>{n&&(e.droppable.exists(r)||yo(),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:a}))},scrollDroppable:(t,r)=>{n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(r,a)=>{n&&(e.droppable.exists(r)||yo(),t.updateDroppableScroll({id:r,newScroll:a}))},startPublishing:t=>{n&&yo();const r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),o={draggable:r.descriptor,droppable:i.descriptor},l=e.subscribe(a);return n={critical:o,unsubscribe:l},(({critical:e,scrollOptions:t,registry:n})=>{const r=(()=>{const e=As(),t=_s(),n=e.y,r=e.x,a=Bs(),i=a.clientWidth,o=a.clientHeight;return{frame:ao({top:n,left:r,right:r+i,bottom:n+o}),scroll:{initial:e,current:e,max:t,diff:{value:To,displacement:To}}}})(),a=r.scroll.current,i=e.droppable,o=n.droppable.getAllByType(i.type).map(e=>e.callbacks.getDimensionAndWatchScroll(a,t)),l=n.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(a));return{dimensions:{draggables:Yo(l),droppables:Zo(o)},critical:e,viewport:r}})({critical:o,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!n)return;r.stop();const t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach(e=>e.callbacks.dragStopped()),n.unsubscribe(),n=null}};return i},Vs=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason,Fs=e=>{window.scrollBy(e.x,e.y)};const qs=Ko(e=>Qo(e).filter(e=>!!e.isEnabled&&!!e.frame));const Us={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var $s=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return 0===r?0:(n-e)/r},Ws=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:a})=>{const i=((e,t,n=()=>Us)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const a=1-$s({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=r.maxPixelScroll*r.ease(a);return Math.ceil(i)})(e,t,a);return 0===i?0:r?Math.max(((e,t,n)=>{const r=n(),a=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,o=t,l=i,s=Date.now()-o;if(s>=i)return e;if(s{const o=((e,t,n=()=>Us)=>{const r=n();return{startScrollingFrom:e[t.size]*r.startFromPercentage,maxScrollValueAt:e[t.size]*r.maxScrollAtPercentage}})(e,r,i);return t[r.end]0===e?0:e);var Zs=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:a,getAutoScrollerOptions:i})=>{const o={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},l=Gs({container:t,distanceToEdges:o,dragStartTime:e,axis:ul,shouldUseTimeDampening:a,getAutoScrollerOptions:i}),s=Gs({container:t,distanceToEdges:o,dragStartTime:e,axis:dl,shouldUseTimeDampening:a,getAutoScrollerOptions:i}),c=Ks({x:s,y:l});if(Bo(c,To))return null;const u=(({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,a=t.width>e.width;return a||r?a&&r?null:{x:a?0:n.x,y:r?0:n.y}:n})({container:t,subject:n,proposedScroll:c});return u?Bo(u,To)?null:u:null};const Ys=Fo(e=>0===e?0:e>0?1:-1),Qs=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const a=Io(t,r),i={x:e(a.x,n.x),y:e(a.y,n.y)};return Bo(i,To)?null:i}})(),Xs=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},a=Ys(n),i=Qs({max:r,current:t,change:a});return!i||0!==a.x&&0===i.x||0!==a.y&&0===i.y},Js=(e,t)=>Xs({current:e.scroll.current,max:e.scroll.max,change:t}),ec=(e,t)=>{const n=e.frame;return!!n&&Xs({current:n.scroll.current,max:n.scroll.max,change:t})};var tc=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:a,getAutoScrollerOptions:i})=>{const o=e.current.page.borderBoxCenter,l=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const a=(({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:a,getAutoScrollerOptions:i})=>{const o=Zs({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:a,getAutoScrollerOptions:i});return o&&Js(e,o)?o:null})({dragStartTime:t,viewport:e.viewport,subject:l,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(a)return void r(a)}const s=(({center:e,destination:t,droppables:n})=>{if(t){const e=n[t];return e.frame?e:null}const r=((e,t)=>{const n=qs(t).find(t=>(t.frame||yo(),_l(t.frame.pageMarginBox)(e)))||null;return n})(e,n);return r})({center:o,destination:Il(e.impact),droppables:e.dimensions.droppables});if(!s)return;const c=(({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:a,getAutoScrollerOptions:i})=>{const o=e.frame;if(!o)return null;const l=Zs({dragStartTime:r,container:o.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:a,getAutoScrollerOptions:i});return l&&ec(e,l)?l:null})({dragStartTime:t,droppable:s,subject:l,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:i});c&&a(s.descriptor.id,c)},nc=({move:e,scrollDroppable:t,scrollWindow:n})=>r=>{const a=r.scrollJumpRequest;if(!a)return;const i=Il(r.impact);i||yo();const o=((e,n)=>{if(!ec(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&ec(e,t)?Qs({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const a=Po(n,r);return t(e.descriptor.id,a),Po(n,a)})(r.dimensions.droppables[i],a);if(!o)return;const l=r.viewport,s=((e,t,r)=>{if(!e)return r;if(!Js(t,r))return r;const a=((e,t)=>{if(!Js(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return Qs({current:r,max:n,change:t})})(t,r);if(!a)return n(r),null;const i=Po(r,a);return n(i),Po(r,i)})(r.isWindowScrollAllowed,l,o);s&&((t,n)=>{const r=Io(t.current.client.selection,n);e({client:r})})(r,s)};const rc="data-rfd",ac=(()=>{const e=`${rc}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),ic=(()=>{const e=`${rc}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),oc=(()=>{const e=`${rc}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),lc={contextId:`${rc}-scroll-container-context-id`},sc=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" "),cc="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?a.useLayoutEffect:a.useEffect,uc=()=>{const e=document.querySelector("head");return e||yo(),e},dc=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function pc(e,t){return Array.from(e.querySelectorAll(t))}var hc=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function fc(e){return e instanceof hc(e).HTMLElement}function mc(){const e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach(t=>t(e))}function r(t){return e.draggables[t]||null}function a(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:(t,n)=>{const r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const a=t.descriptor.id,i=r(a);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[a],e.droppables[t.descriptor.droppableId]&&n({type:"REMOVAL",value:t}))},getById:function(e){const t=r(e);return t||yo(),t},findById:r,exists:e=>Boolean(r(e)),getAllByType:t=>Object.values(e.draggables).filter(e=>e.descriptor.type===t)},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const n=a(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=a(e);return t||yo(),t},findById:a,exists:e=>Boolean(a(e)),getAllByType:t=>Object.values(e.droppables).filter(e=>e.descriptor.type===t)},subscribe:function(e){return t.push(e),function(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var vc=a.createContext(null),gc=()=>{const e=document.body;return e||yo(),e};const wc={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},bc={separator:"::"};function yc(e,t=bc){const n=a.useId();return Lo(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}var xc=a.createContext(null);function Cc(e){const t=(0,a.useRef)(e);return(0,a.useEffect)(()=>{t.current=e}),t}function Ec(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const Sc=9,Ac=13,kc=33,Mc=34,Rc=35,jc=36,Oc={[Ac]:!0,[Sc]:!0};var Nc=e=>{Oc[e.keyCode]&&e.preventDefault()};const Lc=(()=>{const e="visibilitychange";return"undefined"==typeof document?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})(),zc={type:"IDLE"};function Tc(){}const Ic={[Mc]:!0,[kc]:!0,[jc]:!0,[Rc]:!0};const Pc={type:"IDLE"},Bc=["input","button","textarea","select","option","optgroup","video","audio"];function _c(e,t){if(null==t)return!1;if(Bc.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&_c(e,t.parentElement)}function Dc(e,t){const n=t.target;return!!fc(n)&&_c(e,n)}var Hc=e=>ao(e.getBoundingClientRect()).center;const Vc=(()=>{const e="matches";return"undefined"==typeof document?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function Fc(e,t){return null==e?null:e[Vc](t)?e:Fc(e.parentElement,t)}function qc(e,t){return e.closest?e.closest(t):Fc(e,t)}function Uc(e){e.preventDefault()}function $c({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!!n()&&e===t}function Wc({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const a=n.draggable.findById(r);return!!a&&!!a.options.isEnabled&&!!Vs(t.getState(),r)}const Gc=[function(e){const t=(0,a.useRef)(zc),n=(0,a.useRef)(go),r=Lo(()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const r=e.findClosestDraggableId(t);if(!r)return;const a=e.tryGetLock(r,l,{sourceEvent:t});if(!a)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};n.current(),u(a,i)}}),[e]),i=Lo(()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}),[e]),o=zo(function(){n.current=wo(window,[i,r],{passive:!1,capture:!0})},[i,r]),l=zo(()=>{"IDLE"!==t.current.type&&(t.current=zc,n.current(),o())},[o]),s=zo(()=>{const e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[l]),c=zo(function(){const e=function({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:a,clientY:i}=e;if(0!==t)return;const o={x:a,y:i},l=n();if("DRAGGING"===l.type)return e.preventDefault(),void l.actions.move(o);if("PENDING"!==l.type&&yo(),s=l.point,c=o,!(Math.abs(c.x-s.x)>=5||Math.abs(c.y-s.y)>=5))return;var s,c;e.preventDefault();const u=l.actions.fluidLift(o);r({type:"DRAGGING",actions:u})}},{eventName:"mouseup",fn:r=>{const a=n();"DRAGGING"===a.type?(r.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===n().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==n().type)return 27===t.keyCode?(t.preventDefault(),void e()):void Nc(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===n().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const r=n();"IDLE"===r.type&&yo(),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:Lc,fn:e}]}({cancel:s,completed:l,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=wo(window,e,{capture:!0,passive:!1})},[s,l]),u=zo(function(e,n){"IDLE"!==t.current.type&&yo(),t.current={type:"PENDING",point:n,actions:e},c()},[c]);cc(function(){return o(),function(){n.current()}},[o])},function(e){const t=(0,a.useRef)(Tc),n=Lo(()=>({eventName:"keydown",fn:function(n){if(n.defaultPrevented)return;if(32!==n.keyCode)return;const a=e.findClosestDraggableId(n);if(!a)return;const i=e.tryGetLock(a,s,{sourceEvent:n});if(!i)return;n.preventDefault();let o=!0;const l=i.snapLift();function s(){o||yo(),o=!1,t.current(),r()}t.current(),t.current=wo(window,function(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:r=>27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(Ic[r.keyCode]?r.preventDefault():Nc(r))},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Lc,fn:n}]}(l,s),{capture:!0,passive:!1})}}),[e]),r=zo(function(){t.current=wo(window,[n],{passive:!1,capture:!0})},[n]);cc(function(){return r(),function(){t.current()}},[r])},function(e){const t=(0,a.useRef)(Pc),n=(0,a.useRef)(go),r=zo(function(){return t.current},[]),i=zo(function(e){t.current=e},[]),o=Lo(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const a=e.tryGetLock(r,s,{sourceEvent:t});if(!a)return;const i=t.touches[0],{clientX:o,clientY:l}=i,c={x:o,y:l};n.current(),p(a,c)}}),[e]),l=zo(function(){n.current=wo(window,[o],{capture:!0,passive:!1})},[o]),s=zo(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(Pc),n.current(),l())},[l,i]),c=zo(()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),u=zo(function(){const e={capture:!0,passive:!1},t={cancel:c,completed:s,getPhase:r},a=wo(window,function({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const r=n();if("DRAGGING"!==r.type)return void e();r.hasMoved=!0;const{clientX:a,clientY:i}=t.touches[0],o={x:a,y:i};t.preventDefault(),r.actions.move(o)}},{eventName:"touchend",fn:r=>{const a=n();"DRAGGING"===a.type?(r.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===n().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const r=n();"IDLE"===r.type&&yo();const a=t.touches[0];if(!a)return;if(!(a.force>=.15))return;const i=r.actions.shouldRespectForcePress();if("PENDING"!==r.type)return i?r.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:Lc,fn:e}]}(t),e),i=wo(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:n=>{"DRAGGING"===t().type?(27===n.keyCode&&n.preventDefault(),e()):e()}},{eventName:Lc,fn:e}]}(t),e);n.current=function(){a(),i()}},[c,r,s]),d=zo(function(){const e=r();"PENDING"!==e.type&&yo();const t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})},[r,i]),p=zo(function(e,t){"IDLE"!==r().type&&yo();const n=setTimeout(d,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),u()},[u,r,i,d]);cc(function(){return l(),function(){n.current();const e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(Pc))}},[r,l,i]),cc(function(){return wo(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function Kc({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:i}){const o=[...i?Gc:[],...r||[]],l=(0,a.useState)(()=>function(){let e=null;function t(){e||yo(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&yo();const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],s=zo(function(e,t){Ec(e)&&!Ec(t)&&l.tryAbandon()},[l]);cc(function(){let e=t.getState();return t.subscribe(()=>{const n=t.getState();s(e,n),e=n})},[l,t,s]),cc(()=>l.tryAbandon,[l.tryAbandon]);const c=zo(e=>Wc({lockAPI:l,registry:n,store:t,draggableId:e}),[l,n,t]),u=zo((r,a,i)=>function({lockAPI:e,contextId:t,store:n,registry:r,draggableId:a,forceSensorStop:i,sourceEvent:o}){if(!Wc({lockAPI:e,store:n,registry:r,draggableId:a}))return null;const l=r.draggable.getById(a),s=function(e,t){const n=`[${ic.contextId}="${e}"]`,r=pc(document,n).find(e=>e.getAttribute(ic.id)===t);return r&&fc(r)?r:null}(t,l.descriptor.id);if(!s)return null;if(o&&!l.options.canDragInteractiveElements&&Dc(s,o))return null;const c=e.claim(i||go);let u="PRE_DRAG";function d(){return l.options.shouldRespectForcePress}function p(){return e.isActive(c)}const h=function(e,t){$c({expected:e,phase:u,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function f(t){function r(){e.release(),u="COMPLETED"}function a(e,a={shouldBlockNextClick:!1}){if(t.cleanup(),a.shouldBlockNextClick){const e=wo(window,[{eventName:"click",fn:Uc,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(ds({reason:e}))}return"PRE_DRAG"!==u&&(r(),yo()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),u="DRAGGING",{isActive:()=>$c({expected:"DRAGGING",phase:u,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:d,drop:e=>a("DROP",e),cancel:e=>a("CANCEL",e),...t.actions}}return{isActive:()=>$c({expected:"PRE_DRAG",phase:u,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:d,fluidLift:function(e){const t=mo(e=>{h(()=>is({client:e}))});return{...f({liftActionArgs:{id:a,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>h(os),moveRight:()=>h(ss),moveDown:()=>h(ls),moveLeft:()=>h(cs)};return f({liftActionArgs:{id:a,clientSelection:Hc(s),movementMode:"SNAP"},cleanup:go,actions:e})},abort:function(){$c({expected:"PRE_DRAG",phase:u,isLockActive:p,shouldWarn:!0})&&e.release()}}}({lockAPI:l,registry:n,contextId:e,store:t,draggableId:r,forceSensorStop:a||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,l,n,t]),d=zo(t=>function(e,t){const n=function(e,t){const n=t.target;if(!((r=n)instanceof hc(r).Element))return null;var r;const a=function(e){return`[${ac.contextId}="${e}"]`}(e),i=qc(n,a);return i&&fc(i)?i:null}(e,t);return n?n.getAttribute(ac.draggableId):null}(e,t),[e]),p=zo(e=>{const t=n.draggable.findById(e);return t?t.options:null},[n.draggable]),h=zo(function(){l.isClaimed()&&(l.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))},[l,t]),f=zo(()=>l.isClaimed(),[l]),m=Lo(()=>({canGetLock:c,tryGetLock:u,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:h,isLockClaimed:f}),[c,u,d,p,h,f]);for(let e=0;e(e=>({onBeforeCapture:t=>{(0,W.flushSync)(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(s.current),[s]),u=zo(()=>(e=>({...Us,...e.autoScrollerOptions,durationDampening:{...Us.durationDampening,...e.autoScrollerOptions}}))(s.current),[s]),d=function(e){const t=Lo(()=>(e=>`rfd-announcement-${e}`)(e),[e]),n=(0,a.useRef)(null);return(0,a.useEffect)(function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),F(e.style,wc),gc().appendChild(e),function(){setTimeout(function(){const t=gc();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)})}},[t]),zo(e=>{const t=n.current;t&&(t.textContent=e)},[])}(t),p=function({contextId:e,text:t}){const n=yc("hidden-text",{separator:"-"}),r=Lo(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n}),[n,e]);return(0,a.useEffect)(function(){const e=document.createElement("div");return e.id=r,e.textContent=t,e.style.display="none",gc().appendChild(e),function(){const t=gc();t.contains(e)&&t.removeChild(e)}},[r,t]),r}({contextId:t,text:o}),h=function(e,t){const n=Lo(()=>(e=>{const t=(n=e,e=>`[${e}="${n}"]`);var n;const r=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(ac.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),a=[(()=>{const e=`\n transition: ${ws.outOfTheWay};\n `;return{selector:t(ic.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(oc.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:sc(a,"always"),resting:sc(a,"resting"),dragging:sc(a,"dragging"),dropAnimating:sc(a,"dropAnimating"),userCancel:sc(a,"userCancel")}})(e),[e]),r=(0,a.useRef)(null),i=(0,a.useRef)(null),o=zo(Ko(e=>{const t=i.current;t||yo(),t.textContent=e}),[]),l=zo(e=>{const t=r.current;t||yo(),t.textContent=e},[]);cc(()=>{(r.current||i.current)&&yo();const a=dc(t),s=dc(t);return r.current=a,i.current=s,a.setAttribute(`${rc}-always`,e),s.setAttribute(`${rc}-dynamic`,e),uc().appendChild(a),uc().appendChild(s),l(n.always),o(n.resting),()=>{const e=e=>{const t=e.current;t||yo(),uc().removeChild(t),e.current=null};e(r),e(i)}},[t,l,o,n.always,n.resting,e]);const s=zo(()=>o(n.dragging),[o,n.dragging]),c=zo(e=>{o("DROP"!==e?n.userCancel:n.dropAnimating)},[o,n.dropAnimating,n.userCancel]),u=zo(()=>{i.current&&o(n.resting)},[o,n.resting]);return Lo(()=>({dragging:s,dropping:c,resting:u}),[s,c,u])}(t,i),f=zo(e=>{Zc(l).dispatch(e)},[]),m=Lo(()=>li({publishWhileDragging:es,updateDroppableScroll:ns,updateDroppableIsEnabled:rs,updateDroppableIsCombineEnabled:as,collectionStarting:ts},f),[f]),v=function(){const e=Lo(mc,[]);return(0,a.useEffect)(()=>function(){e.clean()},[e]),e}(),g=Lo(()=>Hs(v,m),[v,m]),w=Lo(()=>(({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const a=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>Us})=>{const r=mo(e),a=mo(t);let i=null;const o=e=>{i||yo();const{shouldUseTimeDampening:t,dragStartTime:o}=i;tc({state:e,scrollWindow:r,scrollDroppable:a,dragStartTime:o,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{i&&yo();const t=Date.now();let r=!1;const a=()=>{r=!0};tc({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:a,scrollDroppable:a,getAutoScrollerOptions:n}),i={dragStartTime:t,shouldUseTimeDampening:r},r&&o(e)},stop:()=>{i&&(r.cancel(),a.cancel(),i=null)},scroll:o}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=nc({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{r().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):a.scroll(e))},start:a.start,stop:a.stop}})({scrollWindow:Fs,scrollDroppable:g.scrollDroppable,getAutoScrollerOptions:u,...li({move:is},f)}),[g.scrollDroppable,f,u]),b=function(e){const t=(0,a.useRef)({}),n=(0,a.useRef)(null),r=(0,a.useRef)(null),i=(0,a.useRef)(!1),o=zo(function(e,n){const r={id:e,focus:n};return t.current[e]=r,function(){const n=t.current;n[e]!==r&&delete n[e]}},[]),l=zo(function(t){const n=function(e,t){const n=`[${ac.contextId}="${e}"]`,r=pc(document,n);if(!r.length)return null;const a=r.find(e=>e.getAttribute(ac.draggableId)===t);return a&&fc(a)?a:null}(e,t);n&&n!==document.activeElement&&n.focus()},[e]),s=zo(function(e,t){n.current===e&&(n.current=t)},[]),c=zo(function(){r.current||i.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const e=n.current;e&&l(e)}))},[l]),u=zo(function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(ac.draggableId)===e&&(n.current=e)},[]);return cc(()=>(i.current=!0,function(){i.current=!1;const e=r.current;e&&cancelAnimationFrame(e)}),[]),Lo(()=>({register:o,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:s}),[o,u,c,s])}(t),y=Lo(()=>Is({announce:d,autoScroller:w,dimensionMarshal:g,focusMarshal:b,getResponders:c,styleMarshal:h}),[d,w,g,b,c,h]);l.current=y;const x=zo(()=>{const e=Zc(l);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),C=zo(()=>{const e=Zc(l).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);n(Lo(()=>({isDragging:C,tryAbort:x}),[C,x]));const E=zo(e=>Vs(Zc(l).getState(),e),[]),S=zo(()=>Bl(Zc(l).getState()),[]),A=Lo(()=>({marshal:g,focus:b,contextId:t,canLift:E,isMovementAllowed:S,dragHandleUsageInstructionsId:p,registry:v}),[t,g,p,b,E,S,v]);return Kc({contextId:t,store:y,registry:v,customSensors:r||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,a.useEffect)(()=>x,[x]),a.createElement(xc.Provider,{value:A},a.createElement(ro,{context:vc,store:y},e.children))}function Qc(e){const t=a.useId(),n=e.dragHandleUsageInstructions||ko;return a.createElement(xo,null,r=>a.createElement(Yc,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const Xc=(e,t)=>t?ws.drop(t.duration):e?ws.snap:ws.fluid,Jc=(e,t)=>{if(e)return t?hs:fs};function eu(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:n,combineWith:r,dropping:a}=e,i=Boolean(r),o=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),l=Boolean(a),s=l?((e,t)=>{const n=bs(e);if(n)return t?`${n} scale(${ms})`:n})(n,i):ys(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Xc(o,a),transform:s,opacity:Jc(i,l),zIndex:l?4500:5e3,pointerEvents:"none"}}(e):{transform:ys((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}var tu=a.createContext(null);function nu(e){const t=(0,a.useContext)(e);return t||yo(),t}function ru(e){e.preventDefault()}var au=(e,t)=>e===t,iu=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function ou(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const lu={mapped:{type:"SECONDARY",offset:To,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:ou(null)}},su=no(()=>{const e=function(){const e=Ko((e,t)=>({x:e,y:t})),t=Ko((e,t,n=null,r=null,a=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(a),dropAnimation:a,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null})),n=Ko((e,n,r,a,i=null,o=null,l=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:o,mode:n,offset:e,dimension:r,forceShouldAnimate:l,snapshot:t(n,a,i,o,null)}}));return(r,a)=>{if(Ec(r)){if(r.critical.draggable.id!==a.draggableId)return null;const t=r.current.client.offset,o=r.dimensions.draggables[a.draggableId],l=Il(r.impact),s=(i=r.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(t.x,t.y),r.movementMode,o,a.isClone,l,s,c)}var i;if("DROP_ANIMATING"===r.phase){const e=r.completed;if(e.result.draggableId!==a.draggableId)return null;const n=a.isClone,i=r.dimensions.draggables[a.draggableId],o=e.result,l=o.mode,s=iu(o),c=(e=>e.combine?e.combine.draggableId:null)(o),u={duration:r.dropDuration,curve:ps,moveTo:r.newHomeClientOffset,opacity:c?hs:null,scale:c?ms:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:i,dropping:u,draggingOver:s,combineWith:c,mode:l,forceShouldAnimate:null,snapshot:t(l,n,s,c,u)}}}return null}}(),t=function(){const e=Ko((e,t)=>({x:e,y:t})),t=Ko(ou),n=Ko((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}})),r=e=>e?n(To,e,!0):null,a=(t,a,i,o)=>{const l=i.displaced.visible[t],s=Boolean(o.inVirtualList&&o.effected[t]),c=tl(i),u=c&&c.draggableId===t?a:null;if(!l){if(!s)return r(u);if(i.displaced.invisible[t])return null;const a=_o(o.displacedBy.point),l=e(a.x,a.y);return n(l,u,!0)}if(s)return r(u);const d=i.displacedBy.point,p=e(d.x,d.y);return n(p,u,l.shouldAnimate)};return(e,t)=>{if(Ec(e))return e.critical.draggable.id===t.draggableId?null:a(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const n=e.completed;return n.result.draggableId===t.draggableId?null:a(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return(n,r)=>e(n,r)||t(n,r)||lu},{dropAnimationFinished:()=>({type:"DROP_ANIMATION_FINISHED",payload:null})},null,{context:vc,areStatePropsEqual:au})(e=>{const t=(0,a.useRef)(null),n=zo((e=null)=>{t.current=e},[]),r=zo(()=>t.current,[]),{contextId:i,dragHandleUsageInstructionsId:o,registry:l}=nu(xc),{type:s,droppableId:c}=nu(tu),u=Lo(()=>({id:e.draggableId,index:e.index,type:s,droppableId:c}),[e.draggableId,e.index,s,c]),{children:d,draggableId:p,isEnabled:h,shouldRespectForcePress:f,canDragInteractiveElements:m,isClone:v,mapped:g,dropAnimationFinished:w}=e;v||function(e){const t=yc("draggable"),{descriptor:n,registry:r,getDraggableRef:i,canDragInteractiveElements:o,shouldRespectForcePress:l,isEnabled:s}=e,c=Lo(()=>({canDragInteractiveElements:o,shouldRespectForcePress:l,isEnabled:s}),[o,s,l]),u=zo(e=>{const t=i();return t||yo(),function(e,t,n=To){const r=window.getComputedStyle(t),a=t.getBoundingClientRect(),i=ho(a,r),o=po(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:o}}(n,t,e)},[n,i]),d=Lo(()=>({uniqueId:t,descriptor:n,options:c,getDimension:u}),[n,u,c,t]),p=(0,a.useRef)(d),h=(0,a.useRef)(!0);cc(()=>(r.draggable.register(p.current),()=>r.draggable.unregister(p.current)),[r.draggable]),cc(()=>{if(h.current)return void(h.current=!1);const e=p.current;p.current=d,r.draggable.update(d,e)},[d,r.draggable])}(Lo(()=>({descriptor:u,registry:l,getDraggableRef:r,canDragInteractiveElements:m,shouldRespectForcePress:f,isEnabled:h}),[u,l,r,m,f,h]));const b=Lo(()=>h?{tabIndex:0,role:"button","aria-describedby":o,"data-rfd-drag-handle-draggable-id":p,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:ru}:null,[i,o,p,h]),y=zo(e=>{"DRAGGING"===g.type&&g.dropping&&"transform"===e.propertyName&&(0,W.flushSync)(w)},[w,g]),x=Lo(()=>{const e=eu(g),t="DRAGGING"===g.type&&g.dropping?y:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":p,style:e,onTransitionEnd:t},dragHandleProps:b}},[i,b,p,g,y,n]),C=Lo(()=>({draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}),[u.droppableId,u.id,u.index,u.type]);return a.createElement(a.Fragment,null,d(x,g.snapshot,C))});function cu(e){return nu(tu).isUsingCloneFor!==e.draggableId||e.isClone?a.createElement(su,e):null}function uu(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return a.createElement(cu,F({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const du=e=>t=>e===t,pu=du("scroll"),hu=du("auto"),fu=(du("visible"),(e,t)=>t(e.overflowX)||t(e.overflowY)),mu=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return fu(n,pu)||fu(n,hu)})(e)?e:mu(e.parentElement);var vu=e=>({x:e.scrollLeft,y:e.scrollTop});const gu=e=>!!e&&("fixed"===window.getComputedStyle(e).position||gu(e.parentElement));const wu={passive:!1},bu={passive:!0};var yu=e=>e.shouldPublishImmediately?wu:bu;const xu=e=>e&&e.env.closestScrollable||null;function Cu(e){const t=(0,a.useRef)(null),n=nu(xc),r=yc("droppable"),{registry:i,marshal:o}=n,l=Cc(e),s=Lo(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),c=(0,a.useRef)(s),u=Lo(()=>Ko((e,n)=>{t.current||yo();const r={x:e,y:n};o.updateDroppableScroll(s.id,r)}),[s.id,o]),d=zo(()=>{const e=t.current;return e&&e.env.closestScrollable?vu(e.env.closestScrollable):To},[]),p=zo(()=>{const e=d();u(e.x,e.y)},[d,u]),h=Lo(()=>mo(p),[p]),f=zo(()=>{const e=t.current,n=xu(e);e&&n||yo(),e.scrollOptions.shouldPublishImmediately?p():h()},[h,p]),m=zo((e,r)=>{t.current&&yo();const a=l.current,i=a.getDroppableRef();i||yo();const o=(e=>({closestScrollable:mu(e),isFixedOnPage:gu(e)}))(i),c={ref:i,descriptor:s,env:o,scrollOptions:r};t.current=c;const u=(({ref:e,descriptor:t,env:n,windowScroll:r,direction:a,isDropDisabled:i,isCombineEnabled:o,shouldClipSubject:l})=>{const s=n.closestScrollable,c=((e,t)=>{const n=fo(e);if(!t)return n;if(e!==t)return n;const r=n.paddingBox.top-t.scrollTop,a=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,o=a+t.scrollWidth,l=io({top:r,right:o,bottom:i,left:a},n.border);return so({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})})(e,s),u=po(c,r),d=(()=>{if(!s)return null;const e=fo(s),t={scrollHeight:s.scrollHeight,scrollWidth:s.scrollWidth};return{client:e,page:po(e,r),scroll:vu(s),scrollSize:t,shouldClipSubject:l}})(),p=(({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:a,client:i,page:o,closest:l})=>{const s=(()=>{if(!l)return null;const{scrollSize:e,client:t}=l,n=Ps({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:n,diff:{value:To,displacement:To}}}})(),c="vertical"===a?ul:dl;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:o,frame:s,subject:Wo({page:o,withPlaceholder:null,axis:c,frame:s})}})({descriptor:t,isEnabled:!i,isCombineEnabled:o,isFixedOnPage:n.isFixedOnPage,direction:a,client:c,page:u,closest:d});return p})({ref:i,descriptor:s,env:o,windowScroll:e,direction:a.direction,isDropDisabled:a.isDropDisabled,isCombineEnabled:a.isCombineEnabled,shouldClipSubject:!a.ignoreContainerClipping}),d=o.closestScrollable;return d&&(d.setAttribute(lc.contextId,n.contextId),d.addEventListener("scroll",f,yu(c.scrollOptions))),u},[n.contextId,s,f,l]),v=zo(()=>{const e=t.current,n=xu(e);return e&&n||yo(),vu(n)},[]),g=zo(()=>{const e=t.current;e||yo();const n=xu(e);t.current=null,n&&(h.cancel(),n.removeAttribute(lc.contextId),n.removeEventListener("scroll",f,yu(e.scrollOptions)))},[f,h]),w=zo(e=>{const n=t.current;n||yo();const r=xu(n);r||yo(),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),b=Lo(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:v,dragStopped:g,scroll:w}),[g,m,v,w]),y=Lo(()=>({uniqueId:r,descriptor:s,callbacks:b}),[b,s,r]);cc(()=>(c.current=y.descriptor,i.droppable.register(y),()=>{t.current&&g(),i.droppable.unregister(y)}),[b,s,g,y,o,i.droppable]),cc(()=>{t.current&&o.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),cc(()=>{t.current&&o.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}function Eu(){}const Su={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};var Au=a.memo(e=>{const t=(0,a.useRef)(null),n=zo(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:i,onClose:o,contextId:l}=e,[s,c]=(0,a.useState)("open"===e.animate);(0,a.useEffect)(()=>s?"open"!==r?(n(),c(!1),Eu):t.current?Eu:(t.current=setTimeout(()=>{t.current=null,c(!1)}),n):Eu,[r,s,n]);const u=zo(e=>{"height"===e.propertyName&&(i(),"close"===r&&o())},[r,o,i]),d=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||"close"===n?Su:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?ws.placeholder:null}})({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return a.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":l,onTransitionEnd:u,ref:e.innerRef})});class ku extends a.PureComponent{constructor(...e){super(...e),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}const Mu={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||yo(),document.body}},Ru=e=>{let t,n={...e};for(t in Mu)void 0===e[t]&&(n={...n,[t]:Mu[t]});return n},ju=(e,t)=>e===t.droppable.type,Ou=(e,t)=>t.draggables[e.draggable.id],Nu=no(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=Ko(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=Ko((r,a,i,o,l,s)=>{const c=l.descriptor.id;if(l.descriptor.droppableId===r){const e=s?{render:s,dragging:n(l.descriptor)}:null,t={isDraggingOver:i,draggingOverWith:i?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!a)return t;if(!o)return e;const u={isDraggingOver:i,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!0,snapshot:u,useClone:null}});return(n,a)=>{const i=Ru(a),o=i.droppableId,l=i.type,s=!i.isDropDisabled,c=i.renderClone;if(Ec(n)){const e=n.critical;if(!ju(l,e))return t;const a=Ou(e,n.dimensions),i=Il(n.impact)===o;return r(o,s,i,i,a,c)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!ju(l,e.critical))return t;const a=Ou(e.critical,n.dimensions);return r(o,s,iu(e.result)===o,Il(e.impact)===o,a,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!ju(l,r.critical))return t;const a=Il(r.impact)===o,i=Boolean(r.impact.at&&"COMBINE"===r.impact.at.type),s=r.critical.droppable.id===o;return a?i?e:t:s?e:t}return t}},{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},(e,t,n)=>({...Ru(n),...e,...t}),{context:vc,areStatePropsEqual:au})(e=>{const t=(0,a.useContext)(xc);t||yo();const{contextId:n,isMovementAllowed:r}=t,i=(0,a.useRef)(null),o=(0,a.useRef)(null),{children:l,droppableId:s,type:c,mode:u,direction:d,ignoreContainerClipping:p,isDropDisabled:h,isCombineEnabled:f,snapshot:m,useClone:v,updateViewportMaxScroll:g,getContainerForClone:w}=e,b=zo(()=>i.current,[]),y=zo((e=null)=>{i.current=e},[]),x=(zo(()=>o.current,[]),zo((e=null)=>{o.current=e},[])),C=zo(()=>{r()&&g({maxScroll:_s()})},[r,g]);Cu({droppableId:s,type:c,mode:u,direction:d,isDropDisabled:h,isCombineEnabled:f,ignoreContainerClipping:p,getDroppableRef:b});const E=Lo(()=>a.createElement(ku,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:r})=>a.createElement(Au,{placeholder:t,onClose:e,innerRef:x,animate:r,contextId:n,onTransitionEnd:C})),[n,C,e.placeholder,e.shouldAnimatePlaceholder,x]),S=Lo(()=>({innerRef:y,placeholder:E,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,E,y]),A=v?v.dragging.draggableId:null,k=Lo(()=>({droppableId:s,type:c,isUsingCloneFor:A}),[s,A,c]);return a.createElement(tu.Provider,{value:k},l(S,m),function(){if(!v)return null;const{dragging:e,render:t}=v,n=a.createElement(cu,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,r)=>t(n,r,e));return W.createPortal(n,w())}())});var Lu=n(2404),zu=n(23805);let Tu;Tu="undefined"!=typeof window?window:"undefined"!=typeof self?self:n.g;let Iu=null,Pu=null;const Bu=Tu.clearTimeout,_u=Tu.setTimeout,Du=Tu.cancelAnimationFrame||Tu.mozCancelAnimationFrame||Tu.webkitCancelAnimationFrame,Hu=Tu.requestAnimationFrame||Tu.mozRequestAnimationFrame||Tu.webkitRequestAnimationFrame;null==Du||null==Hu?(Iu=Bu,Pu=function(e){return _u(e,20)}):(Iu=function([e,t]){Du(e),Bu(t)},Pu=function(e){const t=Hu(function(){Bu(n),e()}),n=_u(function(){Du(t),e()},20);return[t,n]});class Vu extends a.Component{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._didLogDeprecationWarning=!1,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){const r=window.getComputedStyle(this._parentNode)||{},a=parseFloat(r.paddingLeft||"0"),i=parseFloat(r.paddingRight||"0"),o=parseFloat(r.paddingTop||"0"),l=parseFloat(r.paddingBottom||"0"),s=this._parentNode.getBoundingClientRect(),c=s.height-o-l,u=s.width-a-i;if(!e&&this.state.height!==c||!t&&this.state.width!==u){this.setState({height:c,width:u});const e=()=>{this._didLogDeprecationWarning||(this._didLogDeprecationWarning=!0,console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"))};"function"==typeof n&&n({height:c,width:u,get scaledHeight(){return e(),c},get scaledWidth(){return e(),u}})}}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){const{nonce:e}=this.props,t=this._autoSizer?this._autoSizer.parentNode:null;if(null!=t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){this._parentNode=t;const n=t.ownerDocument.defaultView.ResizeObserver;null!=n?(this._resizeObserver=new n(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(t)):(this._detectElementResize=function(e){let t,n,r,a,i,o,l;const s="undefined"!=typeof document&&document.attachEvent;if(!s){o=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,a=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,a.style.width=n.offsetWidth+1+"px",a.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},l=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;o(this),this.__resizeRAF__&&Iu(this.__resizeRAF__),this.__resizeRAF__=Pu(function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(n){n.call(t,e)}))})};let e=!1,s="";r="animationstart";const c="Webkit Moz O ms".split(" ");let u="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),d="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],o=n.createElement("style");o.id="detectElementResize",o.type="text/css",null!=e&&o.setAttribute("nonce",e),o.styleSheet?o.styleSheet.cssText=r:o.appendChild(n.createTextNode(r)),i.appendChild(o)}}(s),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=s.createElement("div")).className="resize-triggers";const u=s.createElement("div");u.className="expand-trigger",u.appendChild(s.createElement("div"));const d=s.createElement("div");d.className="contract-trigger",i.__resizeTriggers__.appendChild(u),i.__resizeTriggers__.appendChild(d),i.appendChild(i.__resizeTriggers__),o(i),i.addEventListener("scroll",l,!0),r&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&o(i)},i.__resizeTriggers__.addEventListener(r,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(s)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",l,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}(e),this._detectElementResize.addResizeListener(t,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r=!1,disableWidth:i=!1,doNotBailOutOnEmptyChildren:o=!1,nonce:l,onResize:s,style:c={},tagName:u="div",...d}=this.props,{height:p,width:h}=this.state,f={overflow:"visible"},m={};let v=!1;return r||(0===p&&(v=!0),f.height=0,m.height=p,m.scaledHeight=p),i||(0===h&&(v=!0),f.width=0,m.width=h,m.scaledWidth=h),o&&(v=!1),(0,a.createElement)(u,{ref:this._setRef,style:{...f,...c},...d},!v&&e(m))}}function Fu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var qu=n(41811),Uu="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function $u(e){cancelAnimationFrame(e.id)}var Wu=-1;function Gu(e){if(void 0===e&&(e=!1),-1===Wu||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),Wu=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Wu}var Ku=null;function Zu(e){if(void 0===e&&(e=!1),null===Ku||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),a=r.style;return a.width="100px",a.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Ku="positive-descending":(t.scrollLeft=1,Ku=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Ku}return Ku}var Yu=function(e,t){return e};function Qu(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,o=e.getOffsetForIndexAndAlignment,l=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,Fu(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Fu(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=(0,qu.default)(function(e,t,n,a){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:a})}),r._callOnScroll=void 0,r._callOnScroll=(0,qu.default)(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,a=r.props,o=a.direction,l=a.itemSize,s=a.layout,c=r._getItemStyleCache(u&&l,u&&s,u&&o);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),h="horizontal"===o||"horizontal"===s,f="rtl"===o,m=h?d:0;c[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:d,height:h?"100%":p,width:h?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=(0,qu.default)(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,a=t.scrollLeft,i=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===a)return null;var t=r.props.direction,o=a;if("rtl"===t)switch(Zu()){case"negative":o=-a;break;case"positive-descending":o=i-n-a}return o=Math.max(0,Math.min(o,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset=t?e.call(null):r.id=requestAnimationFrame(a)})};return r}(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}(0,U.A)(t,e),t.getDerivedStateFromProps=function(e,t){return Xu(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffsets.clientWidth?Gu():0:s.scrollHeight>s.clientHeight?Gu():0}this.scrollTo(o(this.props,e,t,i,this._instanceProps,l))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var a=this._outerRef;"horizontal"===t||"horizontal"===r?a.scrollLeft=n:a.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,a=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(Zu()){case"negative":i.scrollLeft=-a;break;case"positive-ascending":i.scrollLeft=a;break;default:var o=i.clientWidth,l=i.scrollWidth;i.scrollLeft=l-o-a}else i.scrollLeft=a;else i.scrollTop=a}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&$u(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,o=e.height,l=e.innerRef,s=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,h=void 0===p?Yu:p,f=e.layout,m=e.outerElementType,v=e.outerTagName,g=e.style,w=e.useIsScrolling,b=e.width,y=this.state.isScrolling,x="horizontal"===i||"horizontal"===f,C=x?this._onScrollHorizontal:this._onScrollVertical,E=this._getRangeToRender(),S=E[0],A=E[1],k=[];if(u>0)for(var M=S;M<=A;M++)k.push((0,a.createElement)(t,{data:d,key:h(M,d),index:M,isScrolling:w?y:void 0,style:this._getItemStyle(M)}));var R=r(this.props,this._instanceProps);return(0,a.createElement)(m||v||"div",{className:n,onScroll:C,ref:this._outerRefSetter,style:F({position:"relative",height:o,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},g)},(0,a.createElement)(s||c||"div",{children:k,ref:l,style:{height:x?"100%":R,pointerEvents:y?"none":void 0,width:x?R:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],a=e[3];this._callOnItemsRendered(t,n,r,a)}if("function"==typeof this.props.onScroll){var i=this.state,o=i.scrollDirection,l=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(o,l,s)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,a=r.isScrolling,i=r.scrollDirection,o=r.scrollOffset;if(0===t)return[0,0,0,0];var c=l(this.props,o,this._instanceProps),u=s(this.props,c,o,this._instanceProps),d=a&&"backward"!==i?1:Math.max(1,n),p=a&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(a.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Xu=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Ju=function(e,t,n){var r=e.itemSize,a=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var o=0;if(i>=0){var l=a[i];o=l.offset+l.size}for(var s=i+1;s<=t;s++){var c=r(s);a[s]={offset:o,size:c},o+=c}n.lastMeasuredIndex=t}return a[t]},ed=function(e,t,n,r,a){for(;r<=n;){var i=r+Math.floor((n-r)/2),o=Ju(e,i,t).offset;if(o===a)return i;oa&&(n=i-1)}return r>0?r-1:0},td=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,a=t.estimatedItemSize,i=t.lastMeasuredIndex,o=0;if(i>=n&&(i=n-1),i>=0){var l=r[i];o=l.offset+l.size}return o+(n-i-1)*a},nd=Qu({getItemOffset:function(e,t,n){return Ju(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:td,getOffsetForIndexAndAlignment:function(e,t,n,r,a,i){var o=e.direction,l=e.height,s=e.layout,c=e.width,u="horizontal"===o||"horizontal"===s?c:l,d=Ju(e,t,a),p=td(e,a),h=Math.max(0,Math.min(p-u,d.offset)),f=Math.max(0,d.offset-u+d.size+i);switch("smart"===n&&(n=r>=f-u&&r<=h+u?"auto":"center"),n){case"start":return h;case"end":return f;case"center":return Math.round(f+(h-f)/2);default:return r>=f&&r<=h?r:r0?r[a].offset:0)>=n?ed(e,t,a,0,n):function(e,t,n,r){for(var a=e.itemCount,i=1;n{const t=e?.current;if(!t)return;r({width:rd(t.offsetWidth,2),height:rd(t.offsetHeight,2)});const n=new ResizeObserver(ad(e=>{if(!Array.isArray(e))return;const t=e[0];if(t.borderBoxSize){const e=t.borderBoxSize[0]?t.borderBoxSize[0]:t.borderBoxSize;r({width:rd(e.inlineSize,2),height:rd(e.blockSize,2)})}else{const e=t.target;r({width:rd(e.offsetWidth,2),height:rd(e.offsetHeight,2)})}},16));return n.observe(t),()=>{n.disconnect()}},[e,t]),n}const od=(0,oe.om)("popover-legacy"),ld=(e,t=!1)=>{switch(e){case"special":return t?"normal-contrast":"flat-contrast";case"announcement":return t?"normal-contrast":"outlined";default:return t?"normal":"flat"}},sd=({theme:e,tooltipActionButton:t,tooltipCancelButton:n})=>t||n?(0,s.jsxs)("div",{className:od("tooltip-buttons"),children:[t&&(0,s.jsx)(ft.$,{view:ld(e,!0),width:"max",onClick:t.onClick,className:od("tooltip-button"),children:t.text}),n&&(0,s.jsx)(ft.$,{view:ld(e,!1),width:"max",onClick:n.onClick,className:od("tooltip-button"),children:n.text})]}):null,cd=({secondary:e,htmlContent:t,content:n,className:r})=>t||n?t?(0,s.jsx)("div",{className:od("tooltip-content",{secondary:e},r),dangerouslySetInnerHTML:{__html:t}}):n?(0,s.jsx)("div",{className:od("tooltip-content",{secondary:e},r),children:n}):null:null;var ud=n(68291);const dd=({links:e})=>0===e.length?null:(0,s.jsx)("div",{className:od("tooltip-links"),children:e.map((e,t)=>{const{text:n,href:r,target:i="_blank",onClick:o}=e;return(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(ud.N,{href:r,target:i,onClick:o,className:od("tooltip-link"),children:n}),(0,s.jsx)("br",{})]},`link-${t}`)})}),pd=({open:e,openOnHover:t,disabled:n,className:r,openTooltip:i,closeTooltip:o,closedManually:l,onClick:c,children:u})=>{const d=async r=>{n||e&&t||c&&!await c(r)||(e?(o(),l.current=!0):(i(),l.current=!1))},{onKeyDown:p}=(0,Et.N)(d);return"function"==typeof u?(0,s.jsx)(a.Fragment,{children:u({onClick:d,onKeyDown:p,open:e})}):(0,s.jsx)("div",{className:r,onClick:d,onKeyDown:c?p:void 0,children:u})};var hd;!function(e){e.Immediate="immediate",e.Delayed="delayed",e.DelayedClosing="delayedClosing"}(hd||(hd={}));const fd={[hd.Immediate]:[0,0],[hd.Delayed]:[300,300],[hd.DelayedClosing]:[0,300]},md=({initialOpen:e,disabled:t,autoclosable:n,onOpenChange:r,delayOpening:i,delayClosing:o,behavior:l,shouldBeOpen:s})=>{const c=a.useRef(null),u=a.useRef(null),[d,p]=a.useState(e),h=a.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null)},[]),f=a.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]);a.useEffect(()=>()=>{h(),f()},[f,h]);const m=a.useCallback(e=>{p(e),s.current=e,r?.(e)},[r,s]),v=a.useCallback(()=>{h(),m(!0)},[m,h]),g=a.useCallback(()=>{f(),m(!1)},[m,f]);a.useEffect(()=>{t&&g()},[t,g]),((e,t)=>{const r=a.useRef(!0);a.useEffect(()=>{r.current?r.current=!1:n&&!s.current&&g()},t)})(0,[n,g,s]);const[w,b]=fd[l],y=a.useCallback(()=>{c.current=setTimeout(()=>{c.current=null,v()},i??w)},[w,i,v]),x=a.useCallback(()=>{u.current=setTimeout(()=>{u.current=null,g()},o??b)},[g,b,o]);return{isOpen:d,closingTimeout:u,openTooltip:v,openTooltipDelayed:y,unsetOpeningTimeout:h,closeTooltip:g,closeTooltipDelayed:x,unsetClosingTimeout:f}},vd=a.forwardRef(function({initialOpen:e=!1,disabled:t=!1,autoclosable:n=!0,openOnHover:r=!0,delayOpening:i,delayClosing:o,behavior:l=hd.Delayed,placement:c,offset:u={},tooltipOffset:d,tooltipClassName:p,theme:h="info",size:f="s",hasArrow:m=!0,hasClose:v=!1,className:g,children:w,title:b,content:y,htmlContent:x,contentClassName:C,links:E,forceLinksAppearance:S=!1,tooltipActionButton:A,tooltipCancelButton:k,onOpenChange:R,onCloseClick:j,onClick:O,anchorRef:N,anchorElement:L,strategy:z,qa:T,disablePortal:I=!1,tooltipId:B,focusTrap:_,autoFocus:D,restoreFocusRef:H},V){const F=M(),q=a.useRef(null),U=a.useRef(!1),$=a.useRef(e),{isOpen:W,closingTimeout:G,openTooltip:K,openTooltipDelayed:Z,unsetOpeningTimeout:Y,closeTooltip:Q,closeTooltipDelayed:X,unsetClosingTimeout:J}=md({initialOpen:e,disabled:t,autoclosable:n,onOpenChange:R,delayOpening:i,delayClosing:o,behavior:l,shouldBeOpen:$}),ee=a.useMemo(()=>c||("rtl"===F?["left","bottom"]:["right","bottom"]),[F,c]);a.useImperativeHandle(V,()=>({openTooltip:K,closeTooltip:Q}),[K,Q]);const te=Boolean(b),ne=Boolean(N||L),re=`popover-${B??""}-title-${(0,P.u)()}`,ae=(0,s.jsx)(Dt.z,{id:B,role:r?"tooltip":"dialog",strategy:z,anchorElement:L,anchorRef:N||q,className:od("tooltip",{theme:h,size:f,"with-close":v,"force-links-appearance":S},p),open:W,placement:ee,hasArrow:m,offset:d,onClose:ne?void 0:Q,qa:T?`${T}-tooltip`:"",disablePortal:I,initialFocus:D?0:void 0,modal:_,returnFocus:H,"aria-labelledby":b?re:void 0,children:(0,s.jsxs)(a.Fragment,{children:[b&&(0,s.jsx)("h3",{id:re,className:od("tooltip-title"),children:b}),(0,s.jsx)(cd,{secondary:!!te&&"announcement"!==h,content:y,htmlContent:x,className:C}),E&&(0,s.jsx)(dd,{links:E}),(0,s.jsx)(sd,{theme:h,tooltipActionButton:A,tooltipCancelButton:k}),v&&(0,s.jsx)("div",{className:od("tooltip-close"),children:(0,s.jsx)(ft.$,{size:"s",view:"flat-secondary",onClick:async e=>{Q(),j?.(e)},"aria-label":"Close",children:(0,s.jsx)(pe.I,{data:ht.A,size:16})})})]})});if(ne)return ae;const ie=()=>{J(),W||t||U.current?$.current=!0:Z()},oe=()=>{!n||U.current||G.current?$.current=!1:(Y(),X()),U.current=!1};return!u||"number"!=typeof u.top&&"number"!=typeof u.left||(0,me.m)('[Popover] Physical names (top, left) of "offset" property are deprecated. Use logical names (block, inline) instead.'),(0,s.jsxs)("div",{ref:q,className:od({disabled:t},g),onMouseEnter:r?ie:void 0,onMouseLeave:r?oe:void 0,onFocus:r?ie:void 0,onBlur:r?oe:void 0,style:{top:u.top,left:u.left,insetBlockStart:u.block,insetInlineStart:u.inline},"data-qa":T,children:[(0,s.jsx)(pd,{closeTooltip:Q,openTooltip:K,open:W,openOnHover:r,className:od("handler"),disabled:t,onClick:O,closedManually:U,children:w}),ae]})});vd.displayName="Popover";const gd=JSON.parse('{"label_clear-button":"Clear"}'),wd=JSON.parse('{"label_clear-button":"Очистить"}'),bd=(0,Ne.N)({en:gd,ru:wd},`${oe.CU}clear-button`),yd=(0,oe.om)("clear-button"),xd=e=>{switch(e){case"s":return"xs";case"m":return"s";case"l":return"m";case"xl":return"l";default:throw new Error(`Unknown text input size "${e}"`)}},Cd=e=>{const{size:t,className:n,onClick:r}=e,{t:a}=bd.useTranslation();return(0,s.jsx)(ft.$,{size:t,className:yd(null,n),onClick:r,onMouseDown:e=>{e.preventDefault()},"aria-label":a("label_clear-button"),children:(0,s.jsx)(pe.I,{data:ht.A,size:16})})},Ed=e=>"boolean"==typeof e?e?"on":"off":e,Sd=e=>"invalid"===e?"error":void 0,Ad=e=>{const{error:t,errorMessage:n,errorPlacement:r,validationState:a}=e;let i,o;return"string"==typeof t&&(i=t),n&&(i=n),("invalid"===a||Boolean(t))&&(o="invalid"),{errorMessage:i,errorPlacement:r,validationState:o}},kd=(0,oe.om)("outer-additional-content"),Md=({errorMessage:e,note:t,noteId:n,errorMessageId:r})=>e||t?(0,s.jsxs)("div",{className:kd(),children:[e&&(0,s.jsx)("div",{className:kd("error"),id:r,"data-qa":"control-error-message-qa",children:e}),t&&(0,s.jsx)("div",{className:kd("note"),id:n,children:t})]}):null,Rd=(0,oe.om)("text-input"),jd=a.forwardRef(function({placement:e,children:t,onClick:n},r){return t?(0,s.jsx)("div",{ref:r,className:Rd("additional-content",{placement:e}),onClick:n,children:t}):null}),Od=(0,oe.om)("text-input");function Nd(e){const{controlProps:t,controlRef:n,type:r,name:a,id:i,tabIndex:o,autoComplete:l,placeholder:c,value:u,defaultValue:d,autoFocus:p,disabled:h,readOnly:f,onChange:m,onFocus:v,onBlur:g,onKeyDown:w,onKeyUp:b,onKeyPress:y}=e;return(0,s.jsx)("input",{...t,ref:n,className:Od("control",{type:"input"},t.className),type:r,name:a,id:i,tabIndex:o,placeholder:c,value:u,defaultValue:d,autoFocus:p,autoComplete:l,onChange:m,onFocus:v,onBlur:g,onKeyDown:w,onKeyUp:b,onKeyPress:y,disabled:h??t.disabled,readOnly:f??t.readOnly})}const Ld=(0,oe.om)("text-input"),zd=a.forwardRef(function(e,t){const{view:n="normal",size:r="m",pin:i="round-round",name:o,value:l,defaultValue:c,label:u,disabled:d,readOnly:p,hasClear:h=!1,error:f,errorMessage:m,errorPlacement:v="outside",validationState:g,autoComplete:w,id:b,tabIndex:y,style:x,className:C,qa:E,controlProps:S,startContent:A,endContent:k,note:M,onUpdate:R,onChange:j}=e,{errorMessage:O,errorPlacement:N,validationState:z}=Ad({error:f,errorMessage:m,errorPlacement:v,validationState:g}),[T,I]=L(l,c??"",R),B=a.useRef(null),_=Or({initialValue:T,onReset:I}),D=(0,Xe.N)(e.controlRef,B,_),H=a.useRef(null),V=a.useRef(null),F=Sd(z),q=Boolean(u),U="invalid"===z&&Boolean(O)&&"outside"===N,$="invalid"===z&&Boolean(O)&&"inside"===N,W=Boolean(h&&!d&&!p&&T),G=Boolean(A),K=Boolean(k),Z=q&&!b&&!o&&void 0===w,Y=(0,P.u)(),Q=q?b||Y:b,X=id(q?H:null,r),J=id(G?V:null,r),ee=(0,P.u)(),te=(0,P.u)(),ne=[S?.["aria-describedby"],M?te:void 0,U?ee:void 0].filter(Boolean).join(" "),re={...S,style:{...S?.style,...q&&X.width?{paddingInlineStart:`${X.width}px`}:{}},"aria-invalid":"invalid"===z||void 0,"aria-describedby":ne||void 0},ae={id:Q,tabIndex:y,name:o,onChange(e){I(e.target.value),j&&j(e)},autoComplete:Z?"off":Ed(w),controlProps:re},ie=e=>{const t=!e.currentTarget.contains(document.activeElement)&&e.currentTarget.contains(e.target),n=Boolean(document.getSelection()?.toString());t&&!n&&B.current?.focus()};return(0,s.jsxs)("span",{ref:t,style:x,className:Ld({view:n,size:r,disabled:d,state:F,pin:"clear"===n?void 0:i,"has-clear":W,"has-start-content":G,"has-end-content":K},C),"data-qa":E,children:[(0,s.jsxs)("span",{className:Ld("content"),children:[G&&(0,s.jsx)(jd,{ref:V,placement:"start",onClick:ie,children:A}),q&&(0,s.jsx)("label",{ref:H,style:{insetInlineStart:G?J.width:void 0,maxWidth:`calc(50% - ${J.width}px)`},className:Ld("label"),title:u,htmlFor:Q,children:`${u}`}),(0,s.jsx)(Nd,{...e,...ae,controlRef:D}),W&&(0,s.jsx)(Cd,{size:xd(r),onClick:e=>{I("");const t=B.current;if(t){const n=Object.create(e);n.target=t,n.currentTarget=t,t.value="",j&&j(n)}},className:Ld("clear",{size:r})}),$&&(0,s.jsx)(vd,{content:O,children:(0,s.jsx)("span",{"data-qa":"control-error-icon-qa",children:(0,s.jsx)(pe.I,{data:Pn.A,className:Ld("error-icon"),size:"s"===r?12:16})})}),K&&(0,s.jsx)(jd,{placement:"end",onClick:ie,children:k})]}),(0,s.jsx)(Md,{note:M,errorMessage:U?O:null,noteId:te,errorMessageId:ee})]})});var Td=n(2795);const Id=({element:e,options:t,onIntersect:n})=>{a.useEffect(()=>{const r=new IntersectionObserver(([e])=>{e.isIntersecting&&n?.()},t);return e&&r.observe(e),()=>null===e?void 0:r.unobserve(e)},[e,t,n])},Pd=(0,oe.om)("loader");function Bd({size:e="s",className:t,qa:n}){return(0,s.jsxs)("div",{className:Pd({size:e},t),"data-qa":n,children:[(0,s.jsx)("div",{className:Pd("left")}),(0,s.jsx)("div",{className:Pd("center")}),(0,s.jsx)("div",{className:Pd("right")})]})}const _d=(0,oe.om)("list"),Dd=e=>{const t=a.useRef(null);return Id({element:t.current,onIntersect:e?.onIntersect}),(0,s.jsx)("div",{ref:t,className:_d("loading-indicator"),children:(0,s.jsx)(Bd,{qa:"list-loader"})})};var Hd=n(52605);const Vd={ACTIVE_ITEM:"list-active-item"},Fd=[Ce.D.TAB],qd=(0,oe.om)("list"),Ud=e=>String(e);function $d(e,t){return t?{...e?.draggableProps.style,...t}:e?.draggableProps.style}class Wd extends a.Component{static publishEvent=Ot.o.withEventPublisher("List");node=null;render(){const{item:e,height:t,style:n,sortable:r,sortHandleAlign:a,itemClassName:i,selected:o,active:l,role:c="listitem",isDragging:u=!1}=this.props,d={height:t,...n,right:void 0};return(0,s.jsxs)("div",{role:c,"aria-selected":o,"aria-disabled":e.disabled,"data-qa":l?Vd.ACTIVE_ITEM:void 0,className:qd("item",{sortable:r,active:l,selected:o,inactive:e.disabled,"sort-handle-align":a,dragging:u},i),...this.props.provided?.draggableProps,style:$d(this.props.provided,d),onClick:e.disabled?void 0:this.onClick,onClickCapture:e.disabled?void 0:this.onClickCapture,onMouseEnter:this.onMouseEnter,ref:this.setRef,id:`${this.props.listId}-item-${this.props.itemIndex}`,children:[this.renderSortIcon(),this.renderContent()]})}getNode=()=>this.node;setRef=e=>{this.node=e,this.props.provided?.innerRef(e)};renderSortIcon(){const{sortable:e}=this.props;return e?(0,s.jsx)("div",{...this.props.provided?.dragHandleProps,className:qd("item-sort-icon"),children:(0,s.jsx)(pe.I,{data:Hd.A,size:12})}):null}renderContent(){const{renderItem:e=Ud,item:t,active:n,itemIndex:r}=this.props;return(0,s.jsx)("div",{className:qd("item-content"),children:e(t,n,r)})}onClick=e=>{this.props.onClick&&this.props.onClick(this.props.item,this.props.itemIndex,!1,e)};onClickCapture=e=>{Wd.publishEvent({domEvent:e,eventId:"click"})};onMouseEnter=()=>!this.props.item.disabled&&this.props.onActivate(this.props.itemIndex)}function Gd(e){return Array.from({length:e}).reduce((e,t,n)=>(e[n]=a.createRef(),e),{})}class Kd extends a.Component{static getDerivedStateFromProps({itemCount:e},t){return e===Object.keys(t.refsList).length?t:{refsList:Gd(e)}}node=null;constructor(e){super(e),this.state={refsList:Gd(e.itemCount)}}render(){const e=a.Children.map(this.props.children,(e,t)=>a.cloneElement(e,{ref:this.state.refsList[t]}));return(0,s.jsx)("div",{ref:this.setRef,children:e})}scrollToItem(e){const t=this.state.refsList[e]?.current;if(t&&"function"==typeof t.getNode){const e=t.getNode();e&&(this.props.onScrollToItem?.(e)||e.scrollIntoView?.({block:"nearest"}))}}setRef=e=>{this.node=e,this.props.provided?.innerRef(e)}}const Zd=(0,oe.om)("list"),Yd={items:[],itemClassName:"",filterable:!0,sortable:!1,virtualized:!0,deactivateOnLeave:!0},Qd=a.forwardRef((e,t)=>(0,s.jsx)(nd,{ref:t,...e,direction:M()}));Qd.displayName="ListContainer";class Xd extends a.Component{static defaultProps=Yd;static moveListElement(e,t,n){if(t!==n){const[r]=e.splice(t,1);e.splice(n,0,r)}return e}static findNextIndex(e,t,n){const r=e.length;let a=(t+r)%r;for(let t=0;t(0,s.jsxs)("div",{className:Zd({mobile:l},r),"data-qa":i,tabIndex:-1,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.onKeyDown,children:[this.renderFilter(),(0,s.jsxs)("div",{id:e,className:Zd("items",{virtualized:n},a),style:this.getItemsStyle(),onMouseLeave:this.onMouseLeave,role:o,children:[this.renderItems(),0===c.length&&Boolean(t)&&(0,s.jsx)("div",{className:Zd("empty-placeholder"),children:t})]})]})})}getItems(){return this.state.items}getItemsWithLoading(){return this.props.sortable?this.getItems():this.props.loading?[...this.state.items,this.loadingItem]:this.getItems()}getActiveItem(){return"number"==typeof this.state.activeItem?this.state.activeItem:null}activateItem(e,t=!0){this.setState({activeItem:e},()=>{"number"==typeof e&&t&&this.scrollToIndex(e)})}onKeyDown=e=>{const{activeItem:t,pageSize:n}=this.state;if(Fd.includes(e.key))return;const r=e.target instanceof HTMLInputElement;switch(e.key){case Ce.D.ARROW_DOWN:this.handleKeyMove(e,1,-1);break;case Ce.D.ARROW_UP:this.handleKeyMove(e,-1);break;case Ce.D.PAGE_DOWN:this.handleKeyMove(e,n??10);break;case Ce.D.PAGE_UP:this.handleKeyMove(e,-(n??10));break;case Ce.D.HOME:if(r)return;this.handleKeyMove(e,this.state.items.length-(t||0));break;case Ce.D.END:if(r)return;this.handleKeyMove(e,-(t||0)-1);break;case Ce.D.ENTER:"number"==typeof t&&this.props.onItemClick&&this.props.onItemClick(this.state.items[t],t,!0,e);break;default:this.refFilter.current&&this.refFilter.current.focus()}};renderItemContent=(e,t,n)=>{const{onLoadMore:r}=this.props;return zu(e)&&"value"in e&&e.value===this.loadingItem.value?(0,s.jsx)(Dd,{onIntersect:0===n?void 0:r}):this.props.renderItem?this.props.renderItem(e,t,n):Ud(e)};renderItem=({index:e,style:t,height:n,provided:r,isDragging:a})=>{const{sortHandleAlign:i,role:o}=this.props,{items:l,activeItem:c}=this.state,u=this.getItemsWithLoading()[e],d=this.props.sortable&&l.length>1&&!this.getFilter(),p=e===c||e===this.props.activeItemIndex,h=Array.isArray(this.props.selectedItemIndex)?this.props.selectedItemIndex.includes(e):e===this.props.selectedItemIndex;return(0,s.jsx)(Wd,{style:t,height:n,itemIndex:e,item:u,sortable:d,sortHandleAlign:i,renderItem:this.renderItemContent,itemClassName:this.props.itemClassName,active:p,selected:h,onActivate:this.onItemActivate,onClick:this.props.onItemClick,role:"listbox"===o?"option":"listitem",listId:this.props.id??this.uniqId,provided:r,isDragging:a},e)};renderVirtualizedItem=({index:e,style:t})=>(0,s.jsx)(uu,{draggableId:String(e),index:e,children:n=>this.renderItem({index:e,style:t,provided:n})},`item-key-${e}`);renderFilter(){const{size:e,filterable:t,filter:n=this.state.filter,filterPlaceholder:r,filterClassName:a="",autoFocus:i}=this.props;return t?(0,s.jsx)("div",{className:Zd("filter",a),children:(0,s.jsx)(zd,{controlRef:this.refFilter,size:e,placeholder:r,value:n,hasClear:!0,onUpdate:this.onFilterUpdate,autoFocus:i})}):null}renderSimpleContainer(){const{sortable:e}=this.props,t=this.getItemsWithLoading();return e?(0,s.jsx)(Qc,{onDragStart:this.onSortStart,onDragEnd:this.onSortEnd,children:(0,s.jsx)(Nu,{droppableId:"droppable",renderClone:(e,t,n)=>this.renderItem({index:n.source.index,provided:e,isDragging:t.isDragging}),children:e=>(0,s.jsx)(Kd,{ref:this.refContainer,itemCount:t.length,provided:e,onScrollToItem:this.props.onScrollToItem,children:t.map((e,t)=>(0,s.jsx)(uu,{draggableId:String(t),index:t,children:(e,n)=>this.renderItem({index:t,isDragging:n.isDragging,provided:e,height:this.getItemHeight(t)})},`item-key-${t}`))})})}):(0,s.jsx)(Kd,{itemCount:t.length,ref:this.refContainer,onScrollToItem:this.props.onScrollToItem,children:t.map((e,t)=>this.renderItem({index:t,height:this.getItemHeight(t)}))})}renderVirtualizedContainer(){const e=[...this.getItemsWithLoading()];return this.props.sortable?(0,s.jsx)(Qc,{onDragStart:this.onSortStart,onDragEnd:this.onSortEnd,children:(0,s.jsx)(Nu,{droppableId:"droppable",mode:"virtual",renderClone:(e,t,n)=>this.renderItem({index:n.source.index,provided:e,isDragging:t.isDragging}),children:t=>(0,s.jsx)(Vu,{children:({width:n,height:r})=>(0,s.jsx)(Qd,{ref:this.refContainer,outerRef:t.innerRef,width:n,height:r,itemSize:this.getVirtualizedItemHeight,itemData:e,itemCount:e.length,overscanCount:10,onItemsRendered:this.onItemsRendered,activeItem:this.state.activeItem,children:this.renderVirtualizedItem})})})}):(0,s.jsx)(Vu,{children:({width:t,height:n})=>(0,s.jsx)(Qd,{ref:this.refContainer,width:t,height:n,itemSize:this.getVirtualizedItemHeight,itemData:e,itemCount:e.length,overscanCount:10,onItemsRendered:this.onItemsRendered,activeItem:this.state.activeItem,children:this.renderItem})})}renderItems(){return this.props.virtualized?this.renderVirtualizedContainer():this.renderSimpleContainer()}filterItem=e=>t=>String(t).includes(e);getFilter(){const{filter:e=this.state.filter}=this.props;return e}getItemsStyle(){let{itemsHeight:e}=this.props;return"function"==typeof e&&(e=e(this.state.items)),e?{height:e}:void 0}scrollToIndex=e=>{const t=this.refContainer.current;t&&t.scrollToItem(e)};deactivate=()=>{this.blurTimer&&(this.blurTimer=null,this.props.deactivateOnLeave&&this.setState({activeItem:void 0}))};handleKeyMove(e,t,n=0){const{activeItem:r=n}=this.state;e.preventDefault();const a=this.getItemsWithLoading();this.activateItem(Xd.findNextIndex(a,r+t,Math.sign(t)))}handleFocus=()=>{this.blurTimer&&(clearTimeout(this.blurTimer),this.blurTimer=null)};handleBlur=()=>{this.blurTimer||(this.blurTimer=setTimeout(this.deactivate,50))};onUpdateFilterInternal=e=>{const{items:t,filterItem:n=this.filterItem,onFilterEnd:r}=this.props;this.setState({filter:e,items:e?t.filter(n(e)):t},()=>{r&&r({items:this.state.items})})};onFilterUpdate=e=>{this.props.onFilterUpdate?this.props.onFilterUpdate(e):this.onUpdateFilterInternal(e)};onItemsRendered=({visibleStartIndex:e,visibleStopIndex:t})=>{this.setState({pageSize:t-e})};onItemActivate=e=>{this.state.sorting||this.activateItem(e,!1)};onMouseLeave=()=>{this.handleBlur()};onSortStart=()=>{this.setState({sorting:!0})};onSortEnd=e=>{if(!e.destination)return void this.setState({sorting:!1});if(e.source.index===e.destination.index)return void this.setState({sorting:!1});const t=e.source.index,n=e.destination.index;this.props.onSortEnd&&this.props.onSortEnd({oldIndex:t,newIndex:n});const r=((e,t,n)=>{const r=Array.from(e),[a]=r.splice(t,1);return r.splice(n,0,a),r})(this.getItems(),t,n);this.setState({activeItem:n,items:r,sorting:!1})};getItemHeight=e=>{const{itemHeight:t}=this.props;if("function"==typeof t){const{items:n}=this.state;return t(n[e],e)}return t};getVirtualizedItemHeight=e=>this.getItemHeight(e)||28}const Jd=(0,oe.om)("sheet");class ep{x;y;timeStamp;constructor(e,t){this.x=e,this.y=t,this.timeStamp=Date.now()}}class tp{pointsLen;points=[];constructor(e=5){this.pointsLen=e,this.clear()}clear(){this.points=new Array(this.pointsLen)}addMovement({x:e,y:t}){this.points.pop(),this.points.unshift(new ep(e,t))}getYAcceleration(e=1){const t=this.points[0],n=this.points[e];return t&&n?(t.y-n.y)/Math.pow(t.timeStamp-n.timeStamp,2):0}}let np=[];class rp extends a.Component{static defaultProps={id:"sheet",allowHideOnContentScroll:!0};veilRef=a.createRef();sheetRef=a.createRef();sheetTopRef=a.createRef();sheetMarginBoxRef=a.createRef();sheetScrollContainerRef=a.createRef();velocityTracker=new tp;observer=null;resizeWindowTimer=null;state={startScrollTop:0,startY:0,deltaY:0,prevSheetHeight:0,swipeAreaTouched:!1,contentTouched:!1,veilTouched:!1,isAnimating:!1,inWindowResizeScope:!1,delayedResize:!1};componentDidMount(){this.addListeners(),this.show();const e=this.getAvailableContentHeight(this.sheetContentHeight);this.setInitialStyles(e),this.setState({prevSheetHeight:e})}componentDidUpdate(e){const{visible:t,location:n}=this.props;!e.visible&&t&&this.show(),(e.visible&&!t||this.shouldClose(e))&&this.hide(),e.location.pathname!==n.pathname&&(np=[])}componentWillUnmount(){this.removeListeners()}render(){const{content:e,contentClassName:t,swipeAreaClassName:n,hideTopBar:r,title:i}=this.props,{deltaY:o,swipeAreaTouched:l,contentTouched:c,veilTouched:u}=this.state,d={"with-transition":!o||u},p={"with-transition":d["with-transition"]},h={"without-scroll":o>0&&c||l},f={"always-full-height":this.props.alwaysFullHeight};return(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("div",{ref:this.veilRef,className:Jd("veil",d),onClick:this.onVeilClick,onTransitionEnd:this.onVeilTransitionEnd,role:"presentation","data-qa":"sheet-veil"}),(0,s.jsxs)("div",{ref:this.sheetRef,className:Jd("sheet",p),role:"dialog","aria-modal":"true","aria-label":i,children:[!r&&(0,s.jsx)("div",{ref:this.sheetTopRef,className:Jd("sheet-top"),children:(0,s.jsx)("div",{className:Jd("sheet-top-resizer")})}),(0,s.jsx)("div",{className:Jd("sheet-swipe-area",n),onTouchStart:this.onSwipeAreaTouchStart,onTouchMove:this.onSwipeAriaTouchMove,onTouchEnd:this.onSwipeAriaTouchEnd}),(0,s.jsx)("div",{ref:this.sheetScrollContainerRef,className:Jd("sheet-scroll-container",h),onTouchStart:this.onContentTouchStart,onTouchMove:this.onContentTouchMove,onTouchEnd:this.onContentTouchEnd,onTransitionEnd:this.onContentTransitionEnd,children:(0,s.jsx)("div",{ref:this.sheetMarginBoxRef,className:Jd("sheet-margin-box",f),children:(0,s.jsx)("div",{className:Jd("sheet-margin-box-border-compensation"),children:(0,s.jsxs)("div",{className:Jd("sheet-content",t),children:[i&&(0,s.jsx)("div",{className:Jd("sheet-content-title"),children:i}),e]})})})})]})]})}get veilOpacity(){return this.veilRef.current?.style.opacity||0}get sheetTopHeight(){return this.sheetTopRef.current?.getBoundingClientRect().height||0}get sheetHeight(){return this.sheetRef.current?.getBoundingClientRect().height||0}get sheetScrollTop(){return this.sheetScrollContainerRef.current?.scrollTop||0}get sheetContentHeight(){return this.sheetMarginBoxRef.current?.getBoundingClientRect().height||0}setInitialStyles(e){this.sheetScrollContainerRef.current&&this.sheetMarginBoxRef.current&&(this.sheetScrollContainerRef.current.style.height=`${e}px`)}setStyles=({status:e,deltaHeight:t=0})=>{if(!this.sheetRef.current||!this.veilRef.current)return;const n=this.sheetHeight-t,r="showing"===e?`translate3d(0, -${n}px, 0)`:"translate3d(0, 0, 0)";let a=0;"showing"===e&&(a=0===t?1:n/this.sheetHeight),this.veilRef.current.style.opacity=String(a),this.sheetRef.current.style.transform=r,this.isPrefersReducedMotion&&(this.sheetRef.current.style.opacity=String(a),this.sheetRef.current.style.transform=`translate3d(0, -${n}px, 0)`)};getAvailableContentHeight=e=>{let t=.9;"number"==typeof this.props.maxContentHeightCoefficient&&this.props.maxContentHeightCoefficient>=0&&this.props.maxContentHeightCoefficient<=1?t=this.props.maxContentHeightCoefficient:"number"==typeof this.props.maxContentHeightCoefficient&&(0,me.m)('[Sheet] The value of the "maxContentHeightCoefficient" property must be between 0 and 1');const n=window.innerHeight*t-this.sheetTopHeight;return this.props.alwaysFullHeight||e>=n?n:e};show=()=>{this.setState({isAnimating:!0},()=>{this.setStyles({status:"showing"}),this.setHash()})};hide=()=>{this.setState({isAnimating:!0},()=>{this.setStyles({status:"hiding"}),this.removeHash()})};onSwipeAreaTouchStart=e=>{this.velocityTracker.clear(),this.setState({startY:e.nativeEvent.touches[0].clientY,swipeAreaTouched:!0})};onContentTouchStart=e=>{this.props.allowHideOnContentScroll&&!this.state.swipeAreaTouched&&(this.velocityTracker.clear(),this.setState({startY:e.nativeEvent.touches[0].clientY,startScrollTop:this.sheetScrollTop,contentTouched:!0}))};onSwipeAriaTouchMove=e=>{const t=e.nativeEvent.touches[0].clientY-this.state.startY;this.velocityTracker.addMovement({x:e.nativeEvent.touches[0].clientX,y:e.nativeEvent.touches[0].clientY}),this.setState({deltaY:t}),t<=0||this.setStyles({status:"showing",deltaHeight:t})};onContentTouchMove=e=>{if(!this.props.allowHideOnContentScroll)return;if(!this.state.startY)return void this.onContentTouchStart(e);const{startScrollTop:t,swipeAreaTouched:n}=this.state;if(n||this.sheetScrollTop>0||t>0&&t!==this.sheetScrollTop)return;const r=e.nativeEvent.touches[0].clientY-this.state.startY;this.velocityTracker.addMovement({x:e.nativeEvent.touches[0].clientX,y:e.nativeEvent.touches[0].clientY}),r<=0?this.setState({deltaY:0}):(this.setState({deltaY:r}),this.setStyles({status:"showing",deltaHeight:r}))};onTouchEndAction=e=>{const t=this.velocityTracker.getYAcceleration();this.sheetHeight<=e?this.props.hideSheet():e>50&&t<=.08&&t>=-.02||t>.08?this.hide():0!==e&&this.show()};onSwipeAriaTouchEnd=()=>{const{deltaY:e}=this.state;this.onTouchEndAction(e),this.setState({startY:0,deltaY:0,swipeAreaTouched:!1})};onContentTouchEnd=()=>{const{deltaY:e,swipeAreaTouched:t}=this.state;this.props.allowHideOnContentScroll&&!t&&(this.onTouchEndAction(e),this.setState({startY:0,deltaY:0,contentTouched:!1}))};onVeilClick=()=>{this.state.isAnimating||(this.setState({veilTouched:!0}),this.hide())};onVeilTransitionEnd=()=>{this.setState({isAnimating:!1}),"0"!==this.veilOpacity?this.state.delayedResize&&(this.onResizeWindow(),this.setState({delayedResize:!1})):this.props.hideSheet()};onContentTransitionEnd=e=>{"height"===e.propertyName&&this.sheetScrollContainerRef.current&&(this.sheetScrollContainerRef.current.style.transition="none")};onResizeWindow=()=>{this.state.isAnimating?this.setState({delayedResize:!0}):(this.setState({inWindowResizeScope:!0}),this.resizeWindowTimer&&window.clearTimeout(this.resizeWindowTimer),this.resizeWindowTimer=window.setTimeout(()=>{this.onResize()},50))};onResize=()=>{if(!this.sheetRef.current||!this.sheetScrollContainerRef.current)return;const e=this.sheetContentHeight;if(e===this.state.prevSheetHeight&&!this.state.inWindowResizeScope)return;const t=this.getAvailableContentHeight(e);this.sheetScrollContainerRef.current.style.transition=this.state.prevSheetHeight>e?"height 0s ease 0.3s":"none",this.sheetScrollContainerRef.current.style.height=`${t}px`,this.sheetRef.current.style.transform=`translate3d(0, -${t+this.sheetTopHeight}px, 0)`,this.setState({prevSheetHeight:e,inWindowResizeScope:!1})};addListeners(){window.addEventListener("resize",this.onResizeWindow),this.sheetMarginBoxRef.current&&(this.observer=new ResizeObserver(()=>{this.state.inWindowResizeScope||this.onResize()}),this.observer.observe(this.sheetMarginBoxRef.current))}removeListeners(){window.removeEventListener("resize",this.onResizeWindow),this.observer&&this.observer.disconnect()}setHash(){const{id:e,platform:t,location:n,history:r}=this.props;if(t===i.O.BROWSER)return;const a={...n,hash:e};switch(t){case i.O.IOS:n.hash&&np.push(n.hash),r.replace(a);break;case i.O.ANDROID:r.push(a)}}removeHash(){const{id:e,platform:t,location:n,history:r}=this.props;if(t!==i.O.BROWSER&&n.hash===`#${e}`)switch(t){case i.O.IOS:r.replace({...n,hash:np.pop()??""});break;case i.O.ANDROID:r.goBack()}}shouldClose(e){const{id:t,platform:n,location:r,history:a}=this.props;return n!==i.O.BROWSER&&"POP"===a.action&&e.location.hash!==r.hash&&r.hash!==`#${t}`}get isPrefersReducedMotion(){return Boolean(window?.matchMedia("(prefers-reduced-motion: reduce)").matches)}}const ap=v(function(e){const t=t=>{const{useHistory:n,useLocation:r,...a}=t;return(0,s.jsx)(e,{...a,history:n(),location:r()})};return t.displayName=`withRouterWrapper(${e.displayName||e.name||"Component"})`,t}(rp)),ip=({children:e,onClose:t,visible:n,id:r,title:i,className:o,contentClassName:l,swipeAreaClassName:c,allowHideOnContentScroll:u,hideTopBar:d,maxContentHeightCoefficient:p,alwaysFullHeight:h,container:f,disablePortal:m,qa:v})=>{const[g,w]=a.useState(n),[b,y]=a.useState(n);return!b&&n&&w(!0),n!==b&&y(n),g?(0,s.jsx)(tt.Z,{container:f,disablePortal:m,children:(0,s.jsx)(Ze.zR,{"data-qa":v,className:Jd(null,o),lockScroll:g,style:{overflow:void 0},children:(0,s.jsx)(ap,{id:r,content:e,contentClassName:l,swipeAreaClassName:c,title:i,visible:n,allowHideOnContentScroll:u,hideTopBar:d,hideSheet:()=>{t&&t(),w(!1)},maxContentHeightCoefficient:p,alwaysFullHeight:h})})}):null},op=(0,oe.om)("file-preview-actions-mobile"),lp=e=>(0,s.jsxs)("div",{className:op("list-item"),children:[e.icon,(0,s.jsx)(xt,{variant:"body-2",title:e.title,ellipsis:!0,children:e.title})]}),sp=({actions:e,fileName:t,isCustomImage:n})=>{const[r,i]=a.useState(!1),o=a.useCallback(()=>{i(!1)},[]),l=a.useCallback((e,t,n,r)=>{r&&e.onClick?.(r),i(!1)},[]),c=n?"raised":"flat";return(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(ft.$,{view:c,className:op("actions-menu"),onClick:()=>{i(!0)},size:"s",children:(0,s.jsx)(pe.I,{data:ei.A,height:16,width:16})}),(0,s.jsx)(ip,{className:op("sheet"),visible:r,onClose:o,title:t,children:(0,s.jsx)(Xd,{items:e,filterable:!1,renderItem:lp,itemHeight:44,virtualized:!1,onItemClick:l})})]})},cp=({actions:e,fileName:t,hoverabelPanelClassName:n,isCustomImage:r})=>p()?(0,s.jsx)(sp,{actions:e,fileName:t,isCustomImage:r}):(0,s.jsx)(Ja,{actions:e,hoverabelPanelClassName:n}),up=["default","image","video","code","archive","music","audio","text","pdf","table"],dp=e=>up.includes(e.toLowerCase()),pp={"application/x-compressed":"archive","application/x-troff-msvideo":"video","application/macbinary":"code","application/mac-binary":"code","application/x-binary":"code","application/x-macbinary":"code","application/bmp":"image","application/x-bmp":"image","application/x-win-bitmap":"image","application/vnd.msexcel":"image","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"text","application/x-msdownload":"code","application/x-gzip":"archive","application/java-archive":"code","application/x-java-application":"code","application/x-jar":"code","application/x-javascript":"code","application/json":"code","application/ogg":"audio","application/pdf":"pdf","application/octet-stream":"pdf","application/x-httpd-php":"code","application/php":"code","application/x-php":"code","application/x-httpd-php-source":"code","application/msword":"text","application/x-rar":"archive","application/rar":"archive","application/x-rar-compressed":"archive","application/x-tar":"archive","application/x-gzip-compressed":"archive","application/xhtml+xml":"code","application/excel":"table","application/msexcel":"table","application/x-msexcel":"table","application/x-ms-excel":"table","application/x-excel":"table","application/x-dos_ms_excel":"table","application/xls":"table","application/x-xls":"table","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"table","application/vnd.ms-excel":"table","application/xml":"code","application/x-zip":"archive","application/zip":"archive","application/x-zip-compressed":"archive","application/s-compressed":"archive","multipart/x-zip":"archive"};function hp(e){const t="string"==typeof e?e:e.type;if(dp(t))return t;const n=t.split("/")[0];return dp(n)?n:pp[t]||"default"}const fp=(0,oe.om)("file-preview"),mp={default:qa.A,image:Ua.A,video:$a.A,code:Wa.A,archive:Ga.A,audio:Ka.A,music:Ka.A,text:Za.A,pdf:Ya.A,table:Qa.A};function vp(e){const{className:t,qa:n,file:r,imageSrc:i,description:o,onClick:l,view:c="default",selected:u}=e,d="default"===c&&"actions"in e?e.actions:void 0,[h,f]=a.useState(i),m=hp(r),v=p(),{onKeyDown:g}=(0,Et.N)(l);a.useEffect(()=>{if(!i&&"image"===m)try{const e=URL.createObjectURL(r);return f(e),()=>{URL.revokeObjectURL(e)}}catch{return}},[r,i,m]);const w=Boolean(l),b=Boolean(d?.length),y="string"==typeof h,x="compact"===c;return(0,s.jsxs)("div",{className:fp({mobile:v,view:c},t),"data-qa":n,children:[(0,s.jsxs)("div",{className:fp("card",{clickable:w,hoverable:!u&&(w||b),selected:u}),role:w?"button":void 0,onKeyDown:w?g:void 0,tabIndex:w?0:void 0,onClick:l,children:[y?(0,s.jsx)("div",{className:fp("image-container"),children:(0,s.jsx)("img",{className:fp("image"),src:h,alt:r.name})}):(0,s.jsx)("div",{className:fp("icon-container"),children:(0,s.jsx)("div",{className:fp("icon",{type:m}),children:(0,s.jsx)(pe.I,{className:fp("icon-svg"),data:mp[m],size:20})})}),!x&&(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(xt,{className:fp("name"),color:"secondary",ellipsis:!0,title:r.name,children:r.name}),Boolean(o)&&(0,s.jsx)(xt,{className:fp("description"),color:"secondary",ellipsis:!0,title:o,children:o})]})]}),d?.length&&(0,s.jsx)(cp,{hoverabelPanelClassName:fp("actions-panel"),fileName:r.name,isCustomImage:y,actions:d})]})}vp.displayName="FilePreview";var gp=n(23672),wp=n(48171);const bp=JSON.parse('{"label_increment":"Increment","label_decrement":"Decrement"}'),yp=JSON.parse('{"label_increment":"Увеличить","label_decrement":"Уменьшить"}'),xp=(0,Ne.N)({en:bp,ru:yp},"NumberInput");function Cp(e,t=!1){return`^([${t?"":"\\-"}\\+]?\\d+${e?"":"(?:(?:.|,)?\\d+)?"})+$`}const Ep=/^([-+]?)(?:\D*)(\d*)(\.|,)?(\d*)(?:\D*)$/;function Sp(e,t){const n=function(e){return e.replace(",",".").replace(/\s/g,"").replace(/[^\d.+-]/g,"")}(e),r=Ep.exec(n);if(r&&!(e.length>0&&0===n.length))return[r[1],r[2],t?r[3]:void 0,r[4]].filter(Boolean).join("")}function Ap(e){if(void 0===e||""===e)return{valid:!0,value:null};const t=Number(e),n=!Number.isNaN(t);return{valid:n,value:n?t:null}}function kp(e,t){return t?e:Math.floor(e)}function Mp({value:e,step:t,min:n,max:r=Number.MAX_SAFE_INTEGER,direction:a}){const i=n||0,o=n??Number.MIN_SAFE_INTEGER;let l=jp(e,t);if(l>r?l=r:lr||(a?"up"===a:n-l>l-e))&&e>=o)return e;if(n<=r)return n}return jp(l,t)}function Rp(e,t="",n=""){const r=e.current?.selectionEnd??t.length;if(t!==n){const a=t.slice(0,r),i=t.length-a.length,o=n.slice(0,n.length-i);e.current?.setRangeText(o,0,a.length,"end")}}function jp(e,t){const n=t.toString().split(".")[1]?.length||0;return parseFloat(e.toFixed(n))}const Op=(0,oe.om)("numeric-arrows");function Np({className:e,size:t,disabled:n,onUpClick:r,onDownClick:a,...i}){const o={size:"s",pin:"brick-brick",view:"flat-secondary",disabled:n,tabIndex:-1,width:"max","aria-hidden":"true"},{t:l}=xp.useTranslation();return(0,s.jsxs)(En,{direction:"column",className:Op({size:t},e),qa:"control-buttons-qa",...i,children:[(0,s.jsx)(ft.$,{className:Op("arrow-btn"),qa:"increment-button-qa",...o,onClick:r,"aria-label":l("label_increment"),children:(0,s.jsx)(pe.I,{data:wp.A,size:12})}),(0,s.jsx)("span",{className:Op("separator")}),(0,s.jsx)(ft.$,{className:Op("arrow-btn"),qa:"decrement-button-qa",...o,onClick:a,"aria-label":l("label_decrement"),children:(0,s.jsx)(pe.I,{data:de.A,size:12})})]})}const Lp=(0,oe.om)("number-input");function zp(e){return null===e?"":String(e)}const Tp=a.forwardRef(function({endContent:e,defaultValue:t,...n},r){const{value:i,onChange:o,onUpdate:l,min:c,max:u,shiftMultiplier:d=10,step:p,size:h="m",view:f="normal",disabled:m,hiddenControls:v,validationState:g,onBlur:w,onKeyDown:b,allowDecimal:y=!1,className:x}=n,{min:C,max:E,step:S,value:A,defaultValue:k,shiftMultiplier:M}=function(e){const{min:t,max:n,step:r=1,shiftMultiplier:a,value:i,allowDecimal:o,defaultValue:l}=e,{min:s,max:c}=t&&n&&t>n?{min:n,max:t}:{min:t,max:n};return{min:void 0!==s&&s>=Number.MIN_SAFE_INTEGER?s:void 0,max:void 0!==c&&c<=Number.MAX_SAFE_INTEGER?c:void 0,step:kp(Math.abs(r),o)||1,shiftMultiplier:kp(a,o)||10,value:i?kp(i,o):i,defaultValue:l?kp(l,o):l}}({min:c,max:u,step:p,shiftMultiplier:d,allowDecimal:y,value:i,defaultValue:t}),[R,j]=L(A,k??null,l),[O,N]=a.useState(zp(R));a.useEffect(()=>{const e=zp(R);(function(e,t){if(e===t)return!0;const{valid:n,value:r}=Ap(e),{valid:a,value:i}=Ap(t);if(n&&a)return r===i;const o=e.replace(/\D/g,""),l=t.replace(/\D/g,"");return o.length===l.length&&0===o.length})(O,e)||N(e)},[R,O]);const z=!(y&&!p),T=R??0,I=Sd(g),P=T<(E??Number.MAX_SAFE_INTEGER),B=T>(C??Number.MIN_SAFE_INTEGER),_=a.useRef(null),D=Or({initialValue:R,onReset:j}),H=(0,Xe.N)(n.controlRef,_,D),V=(e,t)=>{const n=e.shiftKey?M*S:S;if("up"===t?P:B){const e=Mp({value:T+("up"===t?n:-n),step:S,min:C,max:E,direction:t});j?.(e),N(e.toString())}};return(0,s.jsx)(zd,{...n,className:Lp({size:h,view:f,state:I},x),controlProps:{...n.controlProps,onInput:e=>{const t=Sp(e.currentTarget.value,y);Rp(_,e.currentTarget.value,t)},role:"spinbutton",inputMode:y?"decimal":"numeric",pattern:n.controlProps?.pattern??Cp(!y,!1),"aria-valuemin":n.min,"aria-valuemax":n.max,"aria-valuenow":null===R?void 0:R},controlRef:H,value:O,onChange:o,onUpdate:e=>{N(e);const t=Sp(e,y);Rp(_,e,t);const{valid:n,value:r}=Ap(t);n&&r!==R&&j?.(r)},onKeyDown:e=>{if(e.key===Ce.D.ARROW_DOWN)e.preventDefault(),V(e,"down");else if(e.key===Ce.D.ARROW_UP)e.preventDefault(),V(e,"up");else if(e.key===Ce.D.HOME)e.preventDefault(),void 0!==C&&(j?.(C),N(C.toString()));else if(e.key===Ce.D.END&&(e.preventDefault(),void 0!==E)){const e=Mp({value:E,step:S,min:C,max:E});j?.(e),N(e.toString())}b?.(e)},onBlur:e=>{if(z&&null!==R){const e=Mp({value:R,step:S,min:C,max:E});R!==e&&j?.(e),N(e.toString())}w?.(e)},ref:r,endContent:(0,s.jsxs)(a.Fragment,{children:[e,v?null:(0,s.jsx)(Np,{className:Lp("arrows"),size:h,disabled:m,onUpClick:e=>{_.current?.focus(),V(e,"up")},onDownClick:e=>{_.current?.focus(),V(e,"down")}})]})})}),Ip=(0,oe.om)("overlay");function Pp({className:e,background:t="base",visible:n=!1,children:r}){return(0,s.jsxs)("div",{className:Ip({visible:n},e),children:[(0,s.jsx)("div",{className:Ip("background",{style:t})}),r&&(0,s.jsx)("div",{className:Ip("children"),children:r})]})}const Bp=e=>`pagination-page-sizer-option-${e}`,_p=(0,oe.om)("pagination-page"),Dp=({item:e,size:t,pageSize:n,className:r,onUpdate:a})=>{const i=`pagination-page-${e.page}`;if(e.simple)return(0,s.jsx)("div",{"data-qa":i,className:_p("simple",{size:t},r),children:e.page});const o=e.current?"normal":"flat";return(0,s.jsx)(ft.$,{size:t,view:o,selected:e.current,className:r,onClick:()=>a(e.page,n),qa:i,children:e.page},o)},Hp=(0,oe.om)("pagination-ellipsis"),Vp=({size:e,className:t})=>(0,s.jsx)("div",{className:Hp({size:e},t),children:"..."}),Fp=JSON.parse('{"button_previous":"Previous","button_next":"Next","button_first":"First","label_input-placeholder":"Page #","label_page-of":"of","label_select_size":"Select page size"}'),qp=JSON.parse('{"button_previous":"Предыдущая","button_next":"Следующая","button_first":"Первая","label_input-placeholder":"Стр.","label_page-of":"из","label_select_size":"Выбрать размер страницы"}'),Up=(0,Ne.N)({en:Fp,ru:qp},"Pagination"),$p=(0,oe.om)("pagination-page-of"),Wp=({size:e,className:t})=>{const{t:n}=Up.useTranslation();return(0,s.jsx)("div",{className:$p({size:e},t),children:n("label_page-of")})};var Gp=n(99496);const Kp=({item:e,size:t,className:n,page:r,pageSize:a,onUpdate:i,compact:o})=>{let l=null;const{disabled:c}=e,{t:u}=Up.useTranslation();switch(e.action){case"first":l=(0,s.jsxs)(ft.$,{size:t,view:"outlined",className:n,onClick:()=>i(1,a),title:o?u("button_first"):void 0,disabled:c,qa:"pagination-button-first",children:[(0,s.jsx)(pe.I,{data:Gp.A,size:"16"}),o?void 0:u("button_first")]});break;case"previous":l=(0,s.jsxs)(ft.$,{size:t,view:"outlined",className:n,onClick:()=>i(r-1,a),title:o?u("button_previous"):void 0,disabled:c,qa:"pagination-button-previous",children:[(0,s.jsx)(pe.I,{data:kt.A,size:"16"}),o?void 0:u("button_previous")]});break;case"next":l=(0,s.jsxs)(ft.$,{size:t,view:"outlined",className:n,onClick:()=>i(r+1,a),title:o?u("button_next"):void 0,disabled:c,qa:"pagination-button-next",children:[(0,s.jsx)(pe.I,{data:Mt.A,size:"16"}),o?void 0:u("button_next")]})}return l},Zp=(0,oe.om)("pagination-input"),Yp=({numberOfPages:e,size:t,pageSize:n,onUpdate:r,className:i})=>{const[o,l]=a.useState(""),c=t=>{if(!t)return;let a=Number(t);Number.isInteger(a)?(a>e?a=e>0?e:a:a<1&&(a=1),l(""),r(a,n)):l("")},{t:u}=Up.useTranslation();return(0,s.jsx)(zd,{className:Zp({size:t},i),placeholder:u("label_input-placeholder"),size:t,value:o,onUpdate:e=>{(""===e||/^[1-9][0-9]*$/.test(e))&&l(e)},onBlur:e=>c(e.currentTarget.value),onKeyUp:e=>{e.key===Ce.D.ENTER&&c(e.currentTarget.value)},qa:"pagination-input"})},Qp=e=>{const{onOpenChange:t,onClose:n}=e,r=a.useCallback(e=>{t?.(e),!1===e&&n&&n()},[t,n]),[i,o]=L(e.open,e.defaultOpen??!1,r),l=a.useCallback(e=>{o("boolean"==typeof e?e:!i)},[i,o]);return{open:i,toggleOpen:l}},Xp=({defaultOpen:e,onClose:t,onOpenChange:n,open:r,value:i,defaultValue:o=[],multiple:l,onUpdate:s,disabled:c})=>{const[u,d]=L(i,o,s),[p,h]=a.useState(),{toggleOpen:f,...m}=Qp({defaultOpen:e,onClose:t,onOpenChange:n,open:r}),v=a.useCallback(e=>{c||d(e)},[d,c]),g=a.useCallback(e=>{if(!u.includes(e.value)){const t=[e.value];v(t)}f(!1)},[u,v,f]),w=a.useCallback(e=>{const t=u.includes(e.value)?u.filter(t=>t!==e.value):[...u,e.value];v(t)},[u,v]),b=a.useCallback(e=>{l?w(e):g(e)},[l,g,w]),y=a.useCallback(()=>{v([])},[v]);return{value:u,activeIndex:p,setValue:v,handleSelection:b,handleClearValue:y,toggleOpen:f,setActiveIndex:h,...m}};class Jp{nativeEvent;target;currentTarget;relatedTarget;bubbles;cancelable;defaultPrevented;eventPhase;isTrusted;timeStamp;type;constructor(e,t,n={}){this.nativeEvent=t,this.target=n.target??t.target,this.currentTarget=n.currentTarget??t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}}function eh(e){const{onFocusWithin:t,onBlurWithin:n,onFocusWithinChange:r,isDisabled:i}=e,o=a.useRef(!1),l=a.useCallback(e=>{o.current||document.activeElement!==e.target||(o.current=!0,t&&t(e),r&&r(!0))},[t,r]),s=a.useCallback(e=>{o.current&&(o.current=!1,n&&n(e),r&&r(!1))},[n,r]),{onBlur:c,onFocus:u}=function({onFocus:e,onBlur:t,isDisabled:n}){const r=a.useRef(!1),i=a.useRef(null);a.useEffect(()=>{if(n)return;const e=function(){r.current=!1},a=function(e){if(!r.current&&i.current){const n=new FocusEvent("blur",{...e,relatedTarget:e.target,bubbles:!1,cancelable:!1});t(new Jp("blur",n,{target:i.current,currentTarget:i.current})),i.current=null}};return window.addEventListener("focus",e,{capture:!0}),window.addEventListener("focusin",a),()=>{window.removeEventListener("focus",e,{capture:!0}),window.removeEventListener("focusin",a)}},[n,t]);const o=a.useCallback(e=>{document.activeElement===e.target||null!==e.relatedTarget&&e.relatedTarget!==document.body&&e.relatedTarget!==document||(t(e),i.current=null)},[t]),l=function(e){const t=a.useRef({isFocused:!1,observer:null});return a.useEffect(()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),a.useCallback(n=>{const r=n.target;if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){t.current.isFocused=!0;const n=n=>{t.current.isFocused=!1,r.disabled&&e?.(new Jp("blur",n)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",n,{once:!0});const a=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){a.disconnect(),t.current.observer=null;const e=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),r.dispatchEvent(new FocusEvent("focusout",{relatedTarget:e,bubbles:!0}))}});a.observe(r,{attributes:!0,attributeFilter:["disabled"]}),t.current.observer=a}},[e])}(t);return{onBlur:o,onFocus:a.useCallback(t=>{r.current=!0,i.current=t.target,l(t),e(t)},[l,e])}}({onFocus:l,onBlur:s,isDisabled:i});return i?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:c}}}const th=(0,oe.om)("select"),nh=(0,oe.om)("select-control"),rh=(0,oe.om)("select-control__button"),ah=(0,oe.om)("select-list"),ih=(0,oe.om)("select-clear"),oh={s:28,m:28,l:32,xl:36},lh=50,sh={LIST:"select-list",POPUP:"select-popup",SHEET:"select-sheet",CLEAR:"select-clear",FILTER_INPUT:"select-filter-input",COUNTER:"select-counter"},ch=Symbol("flatten"),uh=JSON.parse('{"label_clear":"Clear","label_show-error-info":"Show popup with error info","label_filter":"Filter"}'),dh=JSON.parse('{"label_clear":"Очистить","label_show-error-info":"Показать попап с информацей об ошибке","label_filter":"Фильтр"}'),ph=(0,Ne.N)({en:uh,ru:dh},"Select"),hh=(0,oe.om)("select-filter"),fh={padding:"4px 4px 0"},mh=a.forwardRef((e,t)=>{const{onChange:n,onKeyDown:r,renderFilter:i,size:o,value:l,placeholder:c,popupId:u,activeIndex:d}=e,p=a.useRef(null);a.useImperativeHandle(t,()=>({focus:()=>p.current?.focus({preventScroll:!0})}),[]);const{t:h}=ph.useTranslation(),f={value:l,placeholder:c,size:1,onKeyDown:r,onChange:e=>{n(e.target.value)},"aria-label":h("label_filter"),"aria-controls":u,"aria-activedescendant":void 0===d?void 0:`${u}-item-${d}`};return i?i({onChange:n,onKeyDown:r,value:l,ref:p,style:fh,inputProps:f}):(0,s.jsx)("div",{className:hh(),style:fh,children:(0,s.jsx)(zd,{controlRef:p,controlProps:{className:hh("input"),size:1,"aria-label":f["aria-label"],"aria-controls":f["aria-controls"],"aria-activedescendant":f["aria-activedescendant"]},size:o,value:l,placeholder:c,onUpdate:n,onKeyDown:r,qa:sh.FILTER_INPUT})})});mh.displayName="SelectFilter";const vh=e=>Boolean(e&&"label"in e),gh=e=>{const t=e.reduce((e,t)=>("label"in t?(e.push({label:t.label,disabled:!0,data:t.data}),e.push(...t.options||[])):e.push(t),e),[]);return Object.defineProperty(t,ch,{enumerable:!1,value:{}}),t},wh=e=>{const{getOptionHeight:t,getOptionGroupHeight:n,size:r,option:a,index:i,mobile:o}=e;let l=o?32:oh[r];if(vh(a)){const e=0===i?0:5;return l=""===a.label?0:l,n?n(a,i):l+e}return t?t(a,i):l},bh=e=>"string"==typeof e.content?e.content:"string"==typeof e.children?e.children:e.text?e.text:e.value,yh=e=>e?.current?.getItems()||[],xh=e=>{const{options:t,filter:n,filterOption:r}=e,a=t.filter(e=>!!vh(e)||(r?r(e,n):((e,t)=>{const n=bh(e).toLocaleLowerCase(),r=t.toLocaleLowerCase();return-1!==n.indexOf(r)})(e,n)));return a.reduce((e,t,n)=>{const r=vh(t),i=vh(e[e.length-1]),o=n===a.length-1;return r&&i&&e.pop(),(!r||r&&!o)&&e.push(t),e},[])};function Ch(e){const t=e.offsetParent;if(t instanceof HTMLElement){const n=t.offsetHeight,r=t.scrollTop,a=e.offsetTop;a+e.offsetHeight>=r+n?t.scrollTo({top:a-n+e.offsetHeight}):a<=r&&t.scrollTo({top:a})}return!0}const Eh=(0,oe.om)("select-list"),Sh=({option:e,renderOptionGroup:t})=>t?(0,s.jsx)("div",{className:Eh("group-label-custom"),children:t(e)}):(0,s.jsx)("div",{className:Eh("group-label",{empty:""===e.label}),children:(0,s.jsx)("div",{className:Eh("group-label-content"),children:e.label})}),Ah=(0,oe.om)("select-list"),kh=({option:e})=>{const{content:t,children:n,disabled:r,title:a}=e;return(0,s.jsx)("span",{title:a,className:Ah("option-default-label",{disabled:r}),children:t||n})},Mh=e=>{const{renderOption:t,value:n,option:r,multiple:a}=e,i=-1!==n.indexOf(r.value),o=t?t(r):(0,s.jsx)(kh,{option:r});return(0,s.jsxs)("div",{"data-qa":r.qa,className:Ah("option",{colored:i&&!a,disabled:r.disabled}),children:[a&&(0,s.jsx)(pe.I,{className:Ah("tick-icon",{shown:i&&a}),data:br.A}),o]})},Rh=e=>{const t=a.useRef(null);return Id({element:t.current,onIntersect:e?.onIntersect}),(0,s.jsx)("div",{ref:t,className:ah("loading-indicator"),children:(0,s.jsx)(Bd,{})})},jh={value:"__SELECT_LIST_ITEM_LOADING__",disabled:!0},Oh=a.forwardRef((e,t)=>{const{onOptionClick:n,renderOption:r,renderOptionGroup:i,getOptionHeight:o,getOptionGroupHeight:l,size:c,flattenOptions:u,value:d,multiple:p,virtualized:h,mobile:f,loading:m,onLoadMore:v,id:g,activeIndex:w,onChangeActive:b}=e,y=a.useMemo(()=>m?[...u,jh]:u,[u,m]),x=a.useMemo(()=>{if(0===d.length)return[];const e=new Set(d);return u.reduce((t,n,r)=>("value"in n&&e.has(n.value)&&t.push(r),t),[])},[u,d]),C=(e=>{const{getOptionHeight:t,getOptionGroupHeight:n,size:r,options:a,mobile:i}=e;return a.reduce((e,a,o)=>e+wh({getOptionHeight:t,getOptionGroupHeight:n,size:r,option:a,index:o,mobile:i}),0)})({options:y,getOptionHeight:o,getOptionGroupHeight:l,size:c,mobile:f}),E=a.useCallback((e,t)=>wh({getOptionHeight:o,getOptionGroupHeight:l,size:c,option:e,index:t,mobile:f}),[o,l,f,c]),S=a.useCallback((e,t,n)=>{if("label"in e){const t=i?e=>i(e,{itemHeight:E(e,n)}):void 0;return(0,s.jsx)(Sh,{option:e,renderOptionGroup:t})}if(e.value===jh.value)return(0,s.jsx)(Rh,{onIntersect:0===n?void 0:v});const a=r?e=>r(e,{itemHeight:E(e,n)}):void 0;return(0,s.jsx)(Mh,{option:e,value:d,multiple:p,renderOption:a})},[r,i,d,p,E,v]);return(0,s.jsx)(Xd,{ref:t,className:ah({size:c,virtualized:h,mobile:f}),qa:sh.LIST,itemClassName:ah("item"),itemHeight:E,itemsHeight:h?C:void 0,items:y,filterable:!1,virtualized:h,renderItem:S,onItemClick:n,selectedItemIndex:x,id:g,role:"listbox",activeItemIndex:w,onChangeActive:b,deactivateOnLeave:!1,onScrollToItem:Ch})});Oh.displayName="SelectList";const Nh=(0,oe.om)("select-empty-placeholder"),Lh=({renderEmptyOptions:e,filter:t})=>(0,s.jsx)("div",{className:Nh({empty:!e}),children:e?.({filter:t})}),zh=e=>{const{size:t,onClick:n,onMouseEnter:r,onMouseLeave:a,renderIcon:i}=e,{t:o}=ph.useTranslation(),l=i?i():(0,s.jsx)(pe.I,{className:ih("clear"),data:ht.A});return(0,s.jsx)("button",{className:ih({size:t}),"aria-label":o("label_clear"),onClick:n,onMouseEnter:r,onMouseLeave:a,"data-qa":sh.CLEAR,type:"button",children:l})};zh.displayName="SelectClear";const Th=(0,oe.om)("select-counter");function Ih({count:e,size:t,disabled:n}){return(0,s.jsx)("div",{className:Th({size:t}),children:(0,s.jsx)(xt,{variant:"xl"===t?"body-2":"body-1",color:n?"hint":"primary",className:Th("text"),qa:sh.COUNTER,children:e})})}const Ph=a.forwardRef((e,t)=>{const{toggleOpen:n,clearValue:r,onKeyDown:i,renderControl:o,view:l,size:c,pin:u,selectedOptionsContent:d,className:p,qa:h,label:f,placeholder:m,isErrorVisible:v,errorMessage:g,open:w,disabled:b,value:y,hasClear:x,popupId:C,selectId:E,activeIndex:S,renderCounter:A,hasCounter:k,title:M}=e,R=Boolean(d),j=Boolean(m&&!R),O=Array.isArray(y)&&y.filter(Boolean).length>0,N=(0,P.u)(),[L,z]=a.useState(!1),T={open:w,size:c,pin:u,disabled:b,error:v,"has-clear":x,"no-active":L,"has-value":O},I={open:w,size:c,view:l,pin:u,disabled:b,error:v},B=a.useCallback(e=>{e&&e.currentTarget!==document.activeElement&&"focus"in e.currentTarget&&e.currentTarget.focus(),n()},[n]),_=a.useCallback(()=>{z(!0)},[]),D=a.useCallback(()=>{z(!1)},[]),H=a.useCallback(()=>{z(!1),r()},[r]),V=()=>{if(!k)return null;const e=y.length,t=(0,s.jsx)(Ih,{count:e,size:c,disabled:b});return A?A(t,{count:e,size:c,disabled:b}):t},F=e=>{const t=0===y.length;return!x||t||b?null:(0,s.jsx)(zh,{size:c,onClick:H,onMouseEnter:_,onMouseLeave:D,renderIcon:e.renderIcon})},q={...(0,Pe.$)(e,{labelable:!0}),id:E,role:"combobox","aria-controls":w?C:void 0,"aria-haspopup":"listbox","aria-expanded":w,"aria-activedescendant":void 0===S?void 0:`${C}-item-${S}`,onClick:B,onKeyDown:i,disabled:b},{t:U}=ph.useTranslation();return o?o({onClear:r,renderClear:F,renderCounter:V,ref:t,open:w,disabled:b,triggerProps:q},{value:y}):(0,s.jsx)(a.Fragment,{children:(0,s.jsxs)("div",{className:nh(T),role:"group",children:[(0,s.jsxs)("button",{ref:t,className:rh(I,p),type:"button","data-qa":h,title:M,tabIndex:0,...q,children:[f&&(0,s.jsx)("span",{className:nh("label"),children:f}),j&&(0,s.jsx)("span",{className:nh("placeholder"),children:m}),R&&(0,s.jsx)("span",{className:nh("option-text"),children:d})]}),V(),F({}),g&&(0,s.jsx)(vd,{content:g,tooltipId:N,children:(0,s.jsx)("button",{"aria-label":U("label_show-error-info"),"aria-describedby":N,type:"button",className:nh("error-icon"),children:(0,s.jsx)(pe.I,{data:Pn.A,size:"s"===c?12:16})})}),(0,s.jsx)(pe.I,{className:nh("chevron-icon",{disabled:b}),data:de.A,"aria-hidden":"true"})]})})});Ph.displayName="SelectControl";const Bh=e=>e-2;function _h(e){const{width:t,virtualized:n}=e;return(0,Ye.Ej)({apply(e){if("number"!=typeof t&&Boolean(e.elements.floating.style.maxWidth))return;const r=((e,t,n)=>{let r=t;return r="number"==typeof e?e:"fit"===e?Bh(t):((e,t)=>t?e>100?e:100:Bh(e))(t,n),`${r}px`})(t,e.rects.reference.width,n),a={};"number"!=typeof t&&"fit"!==t?(a.minWidth=r,a.width=void 0):(a.minWidth=r,a.width=r),a.maxWidth=`max(90vw, ${Bh(e.rects.reference.width)}px)`,Object.assign(e.elements.floating.style,a)}})}const Dh=(0,oe.om)("select-popup"),Hh=["bottom-start","bottom-end","top-start","top-end"],Vh=a.forwardRef(({handleClose:e,onAfterOpen:t,onAfterClose:n,width:r,open:a,placement:i=Hh,controlRef:o,children:l,className:c,disablePortal:u,virtualized:d,mobile:p,id:h},f)=>{return p?(0,s.jsx)(ip,{qa:sh.SHEET,className:c,visible:Boolean(a),onClose:e,children:l}):(0,s.jsx)(Dt.z,{className:Dh(null,c),qa:sh.POPUP,anchorRef:f,placement:i,open:a,onClose:e,disablePortal:u,returnFocus:o,floatingMiddlewares:(m={width:r,disablePortal:u,virtualized:d},[(0,Ye.cY)({mainAxis:1,crossAxis:1}),(0,Ye.UU)({altBoundary:m.disablePortal}),(0,Ye.BN)({limiter:(0,Ye.ER)(),crossAxis:!0,padding:10,altBoundary:m.disablePortal}),_h(m)]),id:h,onTransitionIn:t,onTransitionOutComplete:n,children:l});var m});function Fh(e){const{name:t,value:n,disabled:r,form:i,onReset:o}=e,l=Or({onReset:o,initialValue:n});return!t||r?null:0===n.length?(0,s.jsx)("input",{ref:l,type:"hidden",name:t,value:n,form:i,disabled:r}):(0,s.jsx)(a.Fragment,{children:n.map((e,n)=>(0,s.jsx)("input",{ref:0===n?l:void 0,value:e,type:"hidden",name:t,form:i,disabled:r},e))})}Vh.displayName="SelectPopup";function qh(e,t){let n=-1;return t.length>0&&(n=e.findIndex(e=>"value"in e&&t.includes(e.value)&&!e.disabled)),-1===n&&(n=e.findIndex(e=>"value"in e&&!e.disabled)),-1===n?void 0:n}function Uh(e){return Boolean(e[ch])}function $h(e){if(!Uh(e))throw Error("You should use options generated by useSelectOptions hook");return e[ch].filteredOptions}function Wh(e){const{filter:t="",filterable:n,filterOption:r}=e,i=a.useMemo(()=>Uh(e.options)?e.options:gh(e.options),[e.options]),o=a.useMemo(()=>n?xh({options:i,filter:t,filterOption:r}):i,[t,n,r,i]);return i[ch].filteredOptions=o,i}const Gh=e=>null,Kh=e=>null,Zh=({renderFilter:e,renderList:t})=>(0,s.jsxs)(a.Fragment,{children:[e(),t()]}),Yh=a.forwardRef(function(e,t){const{onUpdate:n,onOpenChange:r,onFilterChange:i,renderControl:o,renderFilter:l,renderOption:c,renderOptionGroup:u,renderSelectedOption:d,renderEmptyOptions:h,renderPopup:f=Zh,getOptionHeight:m,getOptionGroupHeight:v,filterOption:g,name:w,form:b,className:y,controlClassName:x,popupClassName:C,qa:E,value:S,defaultValue:A,defaultOpen:k,open:M,label:R,placeholder:j,filterPlaceholder:O,width:N,popupWidth:z,popupPlacement:T,error:I,virtualizationThreshold:B=lh,view:_="normal",size:D="m",pin:H="round-round",multiple:V=!1,disabled:F=!1,filterable:q=!1,filter:U,disablePortal:$,hasClear:W=!1,onClose:G,id:K,hasCounter:Z,renderCounter:Y,title:Q}=e,X=p(),[J,ee]=L(U,"",i),te=a.useRef(null),ne=a.useRef(null),re=a.useRef(null),ae=a.useRef(null),ie=(0,Xe.N)(t,ne),{value:oe,open:le,toggleOpen:se,setValue:ce,handleSelection:ue,handleClearValue:de}=Xp({onUpdate:n,value:S,defaultValue:A,defaultOpen:k,multiple:V,open:M,onClose:G,onOpenChange:r,disabled:F});a.useEffect(()=>{!le&&q&&X&&setTimeout(()=>{ee("")},300)},[le,q,ee,X]);const pe=Wh({options:e.options||(Me=e.children,(e=>a.Children.toArray(e))(Me).reduce((e,{props:t})=>{if("label"in t){const n=t.options||(e=>a.Children.toArray(e).reduce((e,{props:t})=>("value"in t&&e.push(t),e),[]))(t.children);e.push({options:n,label:t.label})}return"value"in t&&e.push({...t}),e},[])),filter:J,filterable:q,filterOption:g}),he=$h(pe),fe=a.useMemo(()=>((e,t,n)=>{if(0===t.length)return null;const r=e.filter(e=>!vh(e)),i=new Map(r.map(e=>[e.value,e])),o=t.map(e=>i.get(e)||{value:e});return n?o.map((e,t)=>(0,s.jsx)(a.Fragment,{children:n(e,t)},e.value)):o.map(e=>bh(e)).join(", ")})(pe,oe,d),[pe,oe,d]),me=he.length>=B,{errorMessage:ve,errorPlacement:ge,validationState:we}=Ad({error:I,errorMessage:e.errorMessage,errorPlacement:e.errorPlacement||"outside",validationState:e.validationState}),be=(0,P.u)(),ye="invalid"===we,xe=ye&&Boolean(ve)&&"outside"===ge,Ee=ye&&Boolean(ve)&&"inside"===ge,Se=a.useCallback(e=>{if(e&&!e?.disabled&&!("label"in e)){if(V){const e=ae?.current?.getActiveItem();X||re.current?.focus(),"number"==typeof e&&setTimeout(()=>{ae?.current?.activateItem(e,!0)},50)}ue(e)}},[ue,X,V]),Ae=a.useCallback(e=>{[Ce.D.ENTER,Ce.D.SPACEBAR].includes(e.key)&&le&&(e.preventDefault(),e.key===Ce.D.SPACEBAR&&Se((e=>{const t=yh(e),n=e?.current?.getActiveItem();return"number"==typeof n?t[n]:void 0})(ae))),[Ce.D.ARROW_DOWN,Ce.D.ARROW_UP].includes(e.key)&&!le&&(e.preventDefault(),se()),e.key===Ce.D.ESCAPE&&le&&se(!1),ae?.current?.onKeyDown(e)},[Se,le,se]),ke=a.useCallback(e=>{ae?.current?.onKeyDown(e)},[]);var Me;(e=>{const{onChange:t,open:n,disabled:r}=e,[i,o]=a.useState(""),[l,s]=a.useState(),c=a.useCallback(e=>{if(clearTimeout(l),e){const e=window.setTimeout(()=>o(""),2e3);s(e)}},[l]),u=a.useCallback(e=>{e.stopPropagation();const t=((e,t)=>{const n=1===e.length;let r="";return e===Ce.D.BACKSPACE&&t.length?r=t.slice(0,t.length-1):n&&(r=(t+e).trim()),r})(e.key,i);i!==t&&(c(t),o(t))},[c,i]);a.useEffect(()=>(n&&!r?document.addEventListener("keydown",u):n||r||o(""),()=>{n&&!r&&document.removeEventListener("keydown",u)}),[u,n,r]),a.useEffect(()=>(n||clearTimeout(l),()=>clearTimeout(l)),[n,l]),a.useEffect(()=>{t(i)},[t,i])})({onChange:a.useCallback(e=>{if(e){const r=(t=e,(n=yh(ae))?n.findIndex(e=>{if(vh(e))return!1;if(e.disabled)return!1;const n=bh(e);return(r=t,new RegExp(r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"i")).test(n);var r}):-1);"number"==typeof r&&-1!==r&&ae?.current?.activateItem(r,!0)}var t,n},[]),open:le,disabled:q});const Re={..."max"===N&&{width:N}},je={};"number"==typeof N&&(je.width=N);const Oe=a.useCallback(()=>se(!1),[se]),{onFocus:Ne,onBlur:Le}=e,{focusWithinProps:ze}=eh({onFocusWithin:Ne,onBlurWithin:a.useCallback(e=>{Le?.(e),X||Oe()},[Oe,X,Le])}),Te=(0,P.u)(),Ie=K??Te,Be=`select-popup-${Ie}`,[_e,De]=function({options:e,value:t,open:n}){const[r,i]=a.useState(()=>{if(n)return qh(e,t)}),[o,l]=a.useState(n);return o!==n&&(l(n),n&&i(qh(e,t))),[n&&void 0!==r&&r{re.current?.focus()}:void 0,onAfterClose:q?()=>{ee("")}:void 0,children:f({renderFilter:()=>q?(0,s.jsx)(mh,{ref:re,size:D,value:J,placeholder:O,onChange:ee,onKeyDown:ke,renderFilter:l,popupId:Be,activeIndex:_e}):null,renderList:()=>he.length||e.loading?(0,s.jsx)(Oh,{ref:ae,size:D,value:oe,mobile:X,flattenOptions:he,multiple:V,virtualized:me,onOptionClick:Se,renderOption:c,renderOptionGroup:u,getOptionHeight:m,getOptionGroupHeight:v,loading:e.loading,onLoadMore:e.onLoadMore,id:Be,activeIndex:_e,onChangeActive:De}):(0,s.jsx)(Lh,{filter:J,renderEmptyOptions:h})})}),(0,s.jsx)(Md,{errorMessage:xe?ve:null,errorMessageId:be}),(0,s.jsx)(Fh,{name:w,value:oe,disabled:F,form:b,onReset:ce})]})});Yh.Option=Gh,Yh.OptionGroup=Kh;var Qh=n(63375);function Xh(e,t=0){return Math.floor((t-1)/e)+1}const Jh=({onUpdate:e,pageSize:t,size:n,page:r,pageSizeOptions:a,total:i,className:o})=>{const l=a.map(e=>({value:String(e),content:e,qa:Bp(e)})),{t:c}=Up.useTranslation();return(0,s.jsx)(Yh,{qa:"pagination-page-sizer",className:o,size:n,onUpdate:([t])=>{const n=Number(t),a=Xh(n,i);e(a>0?r>a?a:r:1,n)},options:l,value:[String(t)],title:c("label_select_size")})},ef=(0,oe.om)("pagination"),tf=({page:e,pageSize:t,total:n,size:r,onUpdate:a,compact:i=!0,pageSizeOptions:o,showPages:l=!0,showInput:c=!1,className:u,qa:d})=>{const h=p(),f=function({propSize:e,mobile:t}){return e||(t?"l":"m")}({propSize:r,mobile:h}),m=!!h||i,v=function(e){return void 0===e||e>0?e:1}(n),g=function({page:e,total:t,pageSize:n}){return e>0&&(void 0===t||e<=Xh(n,t))?e:1}({page:e,total:v,pageSize:t}),{items:w,numberOfPages:b}=function({page:e,pageSize:t,total:n,mobile:r}){const a=Xh(t,n),i=0!==a,o=i&&e===a||0===n;let l;return l=i?function({page:e,numberOfPages:t,mobile:n}){return n?function(e,t){return[e,"pageOf",t]}(e,t):function(e,t){const n=Math.max(e-1,1);let r=Math.min(e+1,t);const a=[n,e,r];return 1===e&&(r=Math.min(r+1,t),a.push(r)),t-r>=2&&a.push("ellipsis"),t-e===1&&a.unshift(Math.max(e-2,1)),e===t&&(a.unshift(Math.max(e-2,1)),a.unshift(Math.max(e-3,1))),a.push(t),Qh(a)}(e,t)}({page:e,numberOfPages:a,mobile:r}).map((t,n)=>{if("ellipsis"===t)return{type:"ellipsis"};if("pageOf"===t)return{type:"pageOf"};const a=t===e;return{type:"page",current:a,page:t,simple:!!r&&a,key:r?t+n:t}}):[{type:"page",current:!0,page:e,simple:!0,key:e}],l.unshift({type:"button",action:"previous",disabled:e<=1}),l.unshift({type:"button",action:"first",disabled:e<=1}),l.push({type:"button",action:"next",disabled:o}),{items:l,numberOfPages:a}}({page:g,pageSize:t,total:v,mobile:h}),y=w.map(e=>{switch(e.type){case"page":return l&&(0,s.jsx)(Dp,{size:f,pageSize:t,item:e,onUpdate:a,className:ef("pagination-item")},e.key);case"ellipsis":return l&&(0,s.jsx)(Vp,{size:f,className:ef("pagination-item")},e.type);case"pageOf":return l&&(0,s.jsx)(Wp,{className:ef("pagination-item"),size:f},e.type);case"button":return(0,s.jsx)(Kp,{size:f,item:e,page:g,pageSize:t,onUpdate:a,compact:m,className:ef("pagination-item")},e.action);default:return null}}).filter(Boolean);return(0,s.jsxs)("div",{className:ef(null,u),"data-qa":d,children:[y,c&&(0,s.jsx)(Yp,{numberOfPages:b,pageSize:t,size:f,onUpdate:a,className:ef("input")}),o&&(0,s.jsx)(Jh,{onUpdate:a,page:g,pageSize:t,pageSizeOptions:o,size:f,total:v,className:ef("page-sizer")})]})},nf=(0,oe.om)("palette"),rf=a.forwardRef(function(e,t){const{size:n="m",multiple:r=!0,options:i=[],columns:o=6,disabled:l,style:c,className:u,rowClassName:d,optionClassName:p,qa:h,onFocus:f,onBlur:m}=e,[v,g]=a.useState(void 0),w=void 0===v?void 0:i[v],b=a.useRef(null),y=(0,Xe.N)(t,b),{value:x,handleSelection:C}=Xp({value:e.value,defaultValue:e.defaultValue,multiple:r,onUpdate:e.onUpdate}),E=a.useMemo(()=>function(e,t){if(t<=0)throw new Error("Palette.getPaletteRows: number of columns must greater than 0");const n=[];let r=[],a=0;for(const i of e)r.push(i),a+=1,a>=t&&(n.push(r),r=[],a=0);return r.length>0&&n.push(r),n}(i,o),[o,i]),S=a.useCallback(e=>{if(!b.current)return;const t=Array.from(b.current.querySelectorAll(`.${nf("option")}`));t[e]&&(t[e].focus(),g(e))},[]),A=e=>{e===v||e<0||e>=i.length||S(e)},k=function(e){const t=M(),{focusWithinProps:n}=eh({onFocusWithin:t=>e.onFocus?.(t),onBlurWithin:t=>e.onBlur?.(t)}),r=e.whenFocused,a={role:"grid","aria-disabled":e.disabled,"aria-readonly":e.disabled,tabIndex:r?-1:0,...n};return r?{...a,onKeyDown:e=>{e.code===Ce.D.ARROW_RIGHT?(e.preventDefault(),"ltr"===t?r.nextItem():r.previousItem()):e.code===Ce.D.ARROW_LEFT?(e.preventDefault(),"ltr"===t?r.previousItem():r.nextItem()):e.code===Ce.D.ARROW_DOWN?(e.preventDefault(),r.nextRow()):e.code===Ce.D.ARROW_UP?(e.preventDefault(),r.previousRow()):e.code!==Ce.D.SPACE&&e.code!==Ce.D.ENTER||(e.preventDefault(),r.selectItem())}}:a}({disabled:l,onFocus:e=>{S(0),f?.(e)},onBlur:e=>{g(void 0),m?.(e)},whenFocused:void 0!==v&&w?{selectItem:()=>C(w),nextItem:()=>A(v+1),previousItem:()=>A(v-1),nextRow:()=>A(v+o),previousRow:()=>A(v-o)}:void 0});return(0,s.jsx)("div",{...(0,Pe.$)(e,{labelable:!0}),...k,ref:y,className:nf({size:n},u),style:c,"data-qa":h,children:E.map((e,t)=>(0,s.jsx)("div",{className:nf("row",d),role:"row",children:e.map(e=>{const t=Boolean(x.includes(e.value)),r=e===w;return(0,s.jsx)("div",{role:"gridcell","aria-selected":r?"true":void 0,"aria-readonly":e.disabled,children:(0,s.jsx)(ft.$,{className:nf("option",p),tabIndex:-1,style:c,disabled:l||e.disabled,title:e.title,view:t?"normal":"flat",selected:t,value:e.value,size:n,onClick:()=>C(e),children:(0,s.jsx)(ft.$.Icon,{children:e.content??e.value})})},e.value)})},`row-${t}`))})});rf.displayName="Palette";const af=JSON.parse('{"label_one-of":"{{number}} of {{count}}, "}'),of=JSON.parse('{"label_one-of":"{{number}} из {{count}}, "}'),lf=(0,Ne.N)({en:af,ru:of},"PinInput"),sf=(0,oe.om)("pin-input"),cf=/[0-9]+/,uf=/[0-9a-z]+/i,df=a.forwardRef((e,t)=>{const{value:n,defaultValue:r,onUpdate:i,onUpdateComplete:o,onFocus:l,onBlur:c,length:u=4,size:d="m",type:p="numeric",id:h,name:f,form:m,placeholder:v,disabled:g,autoFocus:w,otp:b,mask:y,responsive:x,note:C,validationState:E,errorMessage:S,apiRef:A,className:k,style:R,qa:j,...O}=e,N=a.useRef({}),[z,T]=a.useState(0),[I,B]=a.useState(-1),_=a.useCallback(e=>{i&&i(e),o&&e.every(e=>Boolean(e))&&o(e)},[i,o]),[D,H]=L(n,r??Array.from({length:u},()=>""),_),V=M(),F=(0,P.u)(),q=(0,P.u)(),U="invalid"===E&&S,$=[e?.["aria-describedby"],C?q:void 0,U?F:void 0].filter(Boolean).join(" "),W=(e,t)=>{N.current[e]=t},G=e=>{T(e),N.current[e]?.focus()},K=e=>{e>0&&G(e-1)},Z=e=>{e{const n=Array.from({length:u},(e,t)=>D[t]??"");if(t.length>0)for(let r=0;rn[t]===D[t])||H(n)},Q=(e,t)=>{let n=t.currentTarget.value;const r=D[e];r&&(r===n[0]?n=n.slice(1):r===n[n.length-1]&&(n=n.slice(0,-1))),((e,t)=>"numeric"===e?cf.test(t):uf.test(t))(p,n)&&(n.length>1?(Y(0,n),Z(n.length-1)):(Y(e,n),Z(e)))},X=(e,t)=>{switch(t.code){case Ce.D.BACKSPACE:t.preventDefault(),t.currentTarget.value?Y(e,""):e>0&&(Y(e-1,""),K(e));break;case Ce.D.ARROW_LEFT:case Ce.D.ARROW_UP:t.preventDefault(),"rtl"===V&&t.code===Ce.D.ARROW_LEFT?Z(e):K(e);break;case Ce.D.ARROW_RIGHT:case Ce.D.ARROW_DOWN:t.preventDefault(),"rtl"===V&&t.code===Ce.D.ARROW_RIGHT?K(e):Z(e)}},J=e=>{B(e),T(e)},ee=()=>{B(-1)};a.useEffect(()=>{w&&G(0)},[]),a.useImperativeHandle(A,()=>({focus:()=>{N.current[z]?.focus()}}),[z]);const te=Or({initialValue:D,onReset:H}),{focusWithinProps:ne}=eh({onFocusWithin:l,onBlurWithin:c});let re=(0,P.u)();h&&(re=h);const{t:ae}=lf.useTranslation();return(0,s.jsxs)("div",{ref:t,...(0,Pe.$)(O,{labelable:!0}),...ne,className:sf({size:d,responsive:x},k),style:R,"data-qa":j,role:"group",id:re,"aria-describedby":$,children:[(0,s.jsxs)("div",{className:sf("items"),children:[Array.from({length:u}).map((t,n)=>{const r=`${re}-${n}`,a=e["aria-labelledby"]||e["aria-label"]?[r,e["aria-labelledby"]||re].join(" "):void 0;return(0,s.jsx)("div",{className:sf("item"),children:(0,s.jsx)(zd,{value:D[n]?.[0]??"",tabIndex:z===n?0:-1,type:y?"password":"text",size:d,id:r,disabled:g,placeholder:I===n?void 0:v,autoComplete:b?"one-time-code":"off",validationState:E,controlProps:{inputMode:"numeric"===p?"numeric":"text",pattern:"numeric"===p?"[0-9]*":"[0-9a-zA-Z]*",className:sf("control"),autoCapitalize:"none","aria-label":ae("label_one-of",{number:n+1,count:u}),"aria-labelledby":a,"aria-describedby":$,"aria-details":e["aria-details"],"aria-invalid":"invalid"===E||void 0},controlRef:W.bind(null,n),onChange:Q.bind(null,n),onKeyDown:X.bind(null,n),onFocus:J.bind(null,n),onBlur:ee})},n)}),f?(0,s.jsx)("input",{ref:te,type:"hidden",name:f,form:m,value:D.join(""),disabled:g}):null]}),(0,s.jsx)(Md,{note:C,errorMessage:U?S:null,noteId:q,errorMessageId:F})]})});df.displayName="PinInput";const pf=(0,oe.om)("placeholder-container"),hf=({text:e,...t})=>(0,s.jsx)("div",{className:pf("action"),children:(0,s.jsx)(ft.$,{...t,className:pf("action-btn"),children:e})}),ff=({direction:e="row",align:t="center",size:n="l",className:r,title:i,description:o,image:l,content:c,actions:u,maxWidth:d,qa:p})=>(0,s.jsx)("div",{className:pf({direction:e,align:t,size:n},r||""),"data-qa":p,children:(0,s.jsxs)("div",{className:pf("body"),style:d?{maxWidth:d}:void 0,children:[(0,s.jsx)("div",{className:pf("image",{size:n}),children:"object"==typeof l&&"src"in l?(0,s.jsx)("img",{src:l.src,alt:l.alt||""}):l}),(()=>{const e=c||(0,s.jsxs)(a.Fragment,{children:[i?(0,s.jsx)("div",{className:pf("title"),children:i}):null,o?(0,s.jsx)("div",{className:pf("description"),children:o}):null]});return(0,s.jsxs)("div",{className:pf("content",{size:n}),children:[e,u&&(a.isValidElement(u)||Array.isArray(u))?a.isValidElement(u)?(0,s.jsx)(a.Fragment,{children:u}):(0,s.jsx)("div",{className:pf("actions"),children:u.map(e=>(0,s.jsx)(hf,{...e},e.text))}):null]})})()]})}),mf=(0,oe.om)("progress");function vf(e){const{text:t,offset:n=0}=e;return t?(0,s.jsx)("div",{className:mf("text-inner"),style:{transform:`translateX(calc(var(--g-flow-direction) * ${-n}%))`},children:t}):null}function gf({item:e}){const{value:t,color:n,className:r,theme:a,title:i,content:o,loading:l}=e,c={loading:l};return void 0===n&&(c.theme=a||"default"),Number.isFinite(t)?(0,s.jsx)("div",{className:mf("item",c,r),style:{width:`${t}%`,backgroundColor:n},title:i,children:o}):null}function wf(e){return e<100?e-100:0}function bf(e){const{theme:t,colorStops:n,colorStopsValue:r,value:a}=e;if(n){const e=n.find((e,t)=>{const i="number"==typeof r?r:a,o=t>1?n[t-1].stop:0,l=t=o&&i<=l});return e?e.theme:t}return t}function yf(e){const{stack:t,stackClassName:n,value:r,text:a}=e,i=wf(r||function(e){return e.reduce((e,{value:t})=>e+t,0)}(t));return(0,s.jsxs)("div",{className:mf("stack",n),style:{transform:`translateX(calc(var(--g-flow-direction) * ${i}%))`},children:[(0,s.jsx)("div",{className:mf("item"),style:{width:-i+"%"}}),t.map((e,t)=>(0,s.jsx)(gf,{item:e},t)),(0,s.jsx)(vf,{offset:i,text:a})]})}function xf(e){const{value:t,loading:n,text:r}=e,a=wf(t);return Number.isFinite(t)?(0,s.jsx)("div",{className:mf("item",{theme:bf(e),loading:n}),style:{transform:`translateX(calc(var(--g-flow-direction) * ${a}%))`},children:(0,s.jsx)(vf,{offset:a,text:r})}):null}function Cf(e){return void 0!==e.stack}const Ef=a.forwardRef(function(e,t){const{text:n="",theme:r="default",size:a="m",loading:i=!1,className:o,qa:l}=e,c={...e,text:n,theme:r,size:a,loading:i};return(0,s.jsxs)("div",{ref:t,className:mf({size:a},o),"data-qa":l,children:[(0,s.jsx)("div",{className:mf("text"),children:n}),Cf(c)?(0,s.jsx)(yf,{...c}):(0,s.jsx)(xf,{...c})]})});function Sf({name:e,value:t,checked:n,defaultChecked:r,disabled:i,controlRef:o,controlProps:l,onUpdate:s,onChange:c,onFocus:u,onBlur:d,id:p}){const h=(0,P.u)(),f=a.useRef(null),[m,v]=L(n,r??!1,s),g=Or({initialValue:m,onReset:v});return{checked:m,inputProps:{...l,name:e||h,value:t,id:p,onFocus:u,onBlur:d,disabled:i,type:"radio",onChange:e=>{v(e.target.checked),c&&c(e)},onChangeCapture:e=>{Ot.o.publish({componentId:"Radio",eventId:"click",domEvent:e})},checked:n,defaultChecked:r,ref:(0,Xe.N)(o,f,g)}}}const Af=(0,oe.om)("radio"),kf=a.forwardRef(function(e,t){const{size:n="m",disabled:r=!1,content:a,children:i,title:o,style:l,className:c,qa:u}=e,{checked:d,inputProps:p}=Sf(e),h=a||i,f=(0,s.jsxs)("span",{className:Af("indicator"),children:[(0,s.jsx)("span",{className:Af("disc")}),(0,s.jsx)("input",{...p,className:Af("control")}),(0,s.jsx)("span",{className:Af("outline")})]});return(0,s.jsx)(zr,{ref:t,title:o,style:l,size:n,disabled:r,className:Af({size:n,disabled:r,checked:d},c),qa:u,control:f,children:h})});function Mf(e){const{name:t,value:n,defaultValue:r,options:i=[],disabled:o,onUpdate:l,onChange:s,onFocus:c,onBlur:u}=e,d=(0,P.u)(),[p,h]=L(n,r??null,l),f=Or({initialValue:p,onReset:h}),{focusWithinProps:m}=eh({onFocusWithin:c,onBlurWithin:u}),v=a.useCallback(e=>{h(e.target.value),s&&s(e)},[s,h]),g=a.useMemo(()=>({name:t||d,currentValue:p,disabled:Boolean(o),ref:f,onChange:v}),[d,p,o,f,v,t]);return{containerProps:{...(0,Pe.$)(e,{labelable:!0}),...m,role:"radiogroup","aria-disabled":o},optionsProps:i.map(e=>({name:t||d,value:e.value,content:e.content,title:e.title,checked:p===String(e.value),disabled:o||e.disabled,onChange:v,ref:f})),contextProps:g}}const Rf=(0,oe.om)("radio-group"),jf=a.forwardRef(function(e,t){const{size:n="m",direction:r="horizontal",style:i,className:o,optionClassName:l,qa:c,children:u}=e;let d=e.options;d||(d=a.Children.toArray(u).map(({props:e})=>({value:e.value,content:e.content||e.children,disabled:e.disabled,qa:e.qa})));const{containerProps:p,optionsProps:h}=Mf({...e,options:d});return(0,s.jsx)("div",{...p,ref:t,style:i,className:Rf({size:n,direction:r},o),"data-qa":c,children:h.map(e=>(0,a.createElement)(kf,{...e,key:e.value,className:Rf("option",l),size:n}))})});jf.Option=kf;const Of=a.createContext(null);Of.displayName="RadioGroup.Context";const Nf=(0,oe.om)("segmented-radio-group"),Lf=a.forwardRef(function(e,t){const n=a.useContext(Of);if(!n)throw new Error(" must be used within ");const{name:r,currentValue:i,disabled:o,onChange:l}=n,{disabled:c,content:u,children:d,title:p,value:h}=e,f=o||c,{checked:m,inputProps:v}=Sf({...e,name:r,disabled:f,checked:h===i,onChange:l}),g=u||d,w=(0,Td.If)(g)||(0,Td.$D)(g);return(0,s.jsxs)("label",{className:Nf("option",{disabled:f,checked:m}),ref:t,title:p,children:[(0,s.jsx)("input",{...v,className:Nf("option-control")}),g&&(0,s.jsx)("span",{className:Nf("option-text",{icon:w}),children:g})]})}),zf=(0,oe.om)("segmented-radio-group"),Tf=a.forwardRef(function(e,t){const{size:n="m",width:r,style:i,className:o,qa:l,children:c}=e,u=e.options,{containerProps:d,optionsProps:p,contextProps:h}=Mf({...e,options:u});return(0,s.jsx)(Of.Provider,{value:h,children:(0,s.jsx)("div",{...d,ref:t,style:i,className:zf({size:n,width:r},o),"data-qa":l,children:c||p?.map(e=>(0,a.createElement)(Lf,{...e,key:e.value}))})})});Tf.Option=Lf;const If=(0,oe.om)("skeleton");function Pf({className:e,style:t,qa:n,animation:r="gradient"}){return(0,s.jsx)("div",{className:If({animation:r},e),style:t,"data-qa":n})}function Bf(e){return Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bf(e)}function _f(e,t,n){return(t=function(e){var t=function(e){if("object"!=Bf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Df(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hf(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=dm.F1&&t<=dm.F12)return!1;switch(t){case dm.ALT:case dm.CAPS_LOCK:case dm.CONTEXT_MENU:case dm.CTRL:case dm.DOWN:case dm.END:case dm.ESC:case dm.HOME:case dm.INSERT:case dm.LEFT:case dm.MAC_FF_META:case dm.META:case dm.NUMLOCK:case dm.NUM_CENTER:case dm.PAGE_DOWN:case dm.PAGE_UP:case dm.PAUSE:case dm.PRINT_SCREEN:case dm.RIGHT:case dm.SHIFT:case dm.UP:case dm.WIN_KEY:case dm.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=dm.ZERO&&e<=dm.NINE)return!0;if(e>=dm.NUM_ZERO&&e<=dm.NUM_MULTIPLY)return!0;if(e>=dm.A&&e<=dm.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case dm.SPACE:case dm.QUESTION_MARK:case dm.NUM_PLUS:case dm.NUM_MINUS:case dm.NUM_PERIOD:case dm.NUM_DIVISION:case dm.SEMICOLON:case dm.DASH:case dm.EQUALS:case dm.COMMA:case dm.PERIOD:case dm.SLASH:case dm.APOSTROPHE:case dm.SINGLE_QUOTE:case dm.OPEN_SQUARE_BRACKET:case dm.BACKSLASH:case dm.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const pm=dm,hm=a.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}});var fm=a.createContext({}),mm=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],vm=a.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.value,o=e.valueIndex,l=e.onStartMove,s=e.onDelete,c=e.style,u=e.render,d=e.dragging,p=e.draggingDelete,h=e.onOffsetChange,f=e.onChangeComplete,m=e.onFocus,v=e.onMouseEnter,g=lm(e,mm),w=a.useContext(hm),b=w.min,y=w.max,x=w.direction,C=w.disabled,E=w.keyboard,S=w.range,A=w.tabIndex,k=w.ariaLabelForHandle,M=w.ariaLabelledByForHandle,R=w.ariaRequired,j=w.ariaValueTextFormatterForHandle,O=w.styles,N=w.classNames,L="".concat(r,"-handle"),z=function(e){C||l(e,o)},T=cm(x,i,b,y),I={};null!==o&&(I={tabIndex:C?null:um(A,o),role:"slider","aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":i,"aria-disabled":C,"aria-label":um(k,o),"aria-labelledby":um(M,o),"aria-required":um(R,o),"aria-valuetext":null===(n=um(j,o))||void 0===n?void 0:n(i),"aria-orientation":"ltr"===x||"rtl"===x?"horizontal":"vertical",onMouseDown:z,onTouchStart:z,onFocus:function(e){null==m||m(e,o)},onMouseEnter:function(e){v(e,o)},onKeyDown:function(e){if(!C&&E){var t=null;switch(e.which||e.keyCode){case pm.LEFT:t="ltr"===x||"btt"===x?-1:1;break;case pm.RIGHT:t="ltr"===x||"btt"===x?1:-1;break;case pm.UP:t="ttb"!==x?1:-1;break;case pm.DOWN:t="ttb"!==x?-1:1;break;case pm.HOME:t="min";break;case pm.END:t="max";break;case pm.PAGE_UP:t=2;break;case pm.PAGE_DOWN:t=-2;break;case pm.BACKSPACE:case pm.DELETE:null==s||s(o)}null!==t&&(e.preventDefault(),h(t,o))}},onKeyUp:function(e){switch(e.which||e.keyCode){case pm.LEFT:case pm.RIGHT:case pm.UP:case pm.DOWN:case pm.HOME:case pm.END:case pm.PAGE_UP:case pm.PAGE_DOWN:null==f||f()}}});var P=a.createElement("div",F({ref:t,className:Wf()(L,_f(_f(_f({},"".concat(L,"-").concat(o+1),null!==o&&S),"".concat(L,"-dragging"),d),"".concat(L,"-dragging-delete"),p),N.handle),style:Hf(Hf(Hf({},T),c),O.handle)},I,g));return u&&(P=u(P,{index:o,prefixCls:r,value:i,dragging:d,draggingDelete:p})),P});const gm=vm;var wm=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],bm=a.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,o=e.onOffsetChange,l=e.values,s=e.handleRender,c=e.activeHandleRender,u=e.draggingIndex,d=e.draggingDelete,p=e.onFocus,h=lm(e,wm),f=a.useRef({}),m=Uf(a.useState(!1),2),v=m[0],g=m[1],w=Uf(a.useState(-1),2),b=w[0],y=w[1],x=function(e){y(e),g(!0)};a.useImperativeHandle(t,function(){return{focus:function(e){var t;null===(t=f.current[e])||void 0===t||t.focus()},hideHelp:function(){(0,W.flushSync)(function(){g(!1)})}}});var C=Hf({prefixCls:n,onStartMove:i,onOffsetChange:o,render:s,onFocus:function(e,t){x(t),null==p||p(e)},onMouseEnter:function(e,t){x(t)}},h);return a.createElement(a.Fragment,null,l.map(function(e,t){var n=u===t;return a.createElement(gm,F({ref:function(e){e?f.current[t]=e:delete f.current[t]},dragging:n,draggingDelete:n&&d,style:um(r,t),key:t,value:e,valueIndex:t},C))}),c&&v&&a.createElement(gm,F({key:"a11y"},C,{value:l[b],valueIndex:null,dragging:-1!==u,draggingDelete:d,render:c,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});const ym=bm,xm=function(e){var t=e.prefixCls,n=e.style,r=e.children,i=e.value,o=e.onClick,l=a.useContext(hm),s=l.min,c=l.max,u=l.direction,d=l.includedStart,p=l.includedEnd,h=l.included,f="".concat(t,"-text"),m=cm(u,i,s,c);return a.createElement("span",{className:Wf()(f,_f({},"".concat(f,"-active"),h&&d<=i&&i<=p)),style:Hf(Hf({},m),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){o(i)}},r)},Cm=function(e){var t=e.prefixCls,n=e.marks,r=e.onClick,i="".concat(t,"-mark");return n.length?a.createElement("div",{className:i},n.map(function(e){var t=e.value,n=e.style,o=e.label;return a.createElement(xm,{key:t,prefixCls:i,style:n,value:t,onClick:r},o)})):null},Em=function(e){var t=e.prefixCls,n=e.value,r=e.style,i=e.activeStyle,o=a.useContext(hm),l=o.min,s=o.max,c=o.direction,u=o.included,d=o.includedStart,p=o.includedEnd,h="".concat(t,"-dot"),f=u&&d<=n&&n<=p,m=Hf(Hf({},cm(c,n,l,s)),"function"==typeof r?r(n):r);return f&&(m=Hf(Hf({},m),"function"==typeof i?i(n):i)),a.createElement("span",{className:Wf()(h,_f({},"".concat(h,"-active"),f)),style:m})},Sm=function(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,o=e.activeStyle,l=a.useContext(hm),s=l.min,c=l.max,u=l.step,d=a.useMemo(function(){var e=new Set;if(n.forEach(function(t){e.add(t.value)}),r&&null!==u)for(var t=s;t<=c;)e.add(t),t+=u;return Array.from(e)},[s,c,u,r,n]);return a.createElement("div",{className:"".concat(t,"-step")},d.map(function(e){return a.createElement(Em,{prefixCls:t,key:e,value:e,style:i,activeStyle:o})}))},Am=function(e){var t=e.prefixCls,n=e.style,r=e.start,i=e.end,o=e.index,l=e.onStartMove,s=e.replaceCls,c=a.useContext(hm),u=c.direction,d=c.min,p=c.max,h=c.disabled,f=c.range,m=c.classNames,v="".concat(t,"-track"),g=sm(r,d,p),w=sm(i,d,p),b=function(e){!h&&l&&l(e,-1)},y={};switch(u){case"rtl":y.right="".concat(100*g,"%"),y.width="".concat(100*w-100*g,"%");break;case"btt":y.bottom="".concat(100*g,"%"),y.height="".concat(100*w-100*g,"%");break;case"ttb":y.top="".concat(100*g,"%"),y.height="".concat(100*w-100*g,"%");break;default:y.left="".concat(100*g,"%"),y.width="".concat(100*w-100*g,"%")}var x=s||Wf()(v,_f(_f({},"".concat(v,"-").concat(o+1),null!==o&&f),"".concat(t,"-track-draggable"),l),m.track);return a.createElement("div",{className:x,style:Hf(Hf({},y),n),onMouseDown:b,onTouchStart:b})},km=function(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,o=e.onStartMove,l=a.useContext(hm),s=l.included,c=l.range,u=l.min,d=l.styles,p=l.classNames,h=a.useMemo(function(){if(!c){if(0===r.length)return[];var e=null!=i?i:u,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],a=0;a=0&&T},[T,fe]),ve=a.useMemo(function(){return Object.keys($||{}).map(function(e){var t=$[e],n={value:Number(e)};return t&&"object"===Bf(t)&&!a.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n}).filter(function(e){var t=e.label;return t||"number"==typeof t}).sort(function(e,t){return e.value-t.value})},[$]),ge=function(e,t,n,r,i,o){var l=a.useCallback(function(n){return Math.max(e,Math.min(t,n))},[e,t]),s=a.useCallback(function(r){if(null!==n){var a=e+Math.round((l(r)-e)/n)*n,i=function(e){return(String(e).split(".")[1]||"").length},o=Math.max(i(n),i(t),i(e)),s=Number(a.toFixed(o));return e<=s&&s<=t?s:null}return null},[n,e,t,l]),c=a.useCallback(function(a){var i=l(a),o=r.map(function(e){return e.value});null!==n&&o.push(s(a)),o.push(e,t);var c=o[0],u=t-e;return o.forEach(function(e){var t=Math.abs(i-e);t<=u&&(c=e,u=t)}),c},[e,t,r,n,l,s]),u=function a(i,o,l){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof o){var u,d=i[l],p=d+o,h=[];r.forEach(function(e){h.push(e.value)}),h.push(e,t),h.push(s(d));var f=o>0?1:-1;"unit"===c?h.push(s(d+f*n)):h.push(s(p)),h=h.filter(function(e){return null!==e}).filter(function(e){return o<0?e<=d:e>=d}),"unit"===c&&(h=h.filter(function(e){return e!==d}));var m="unit"===c?d:p;u=h[0];var v=Math.abs(u-m);if(h.forEach(function(e){var t=Math.abs(e-m);t1){var g=qf(i);return g[l]=u,a(g,o-f,l,c)}return u}return"min"===o?e:"max"===o?t:void 0},d=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",a=e[n],i=u(e,t,n,r);return{value:i,changed:i!==a}},p=function(e){return null===o&&0===e||"number"==typeof o&&e3&&void 0!==arguments[3]?arguments[3]:"unit",a=e.map(c),l=a[n],s=u(a,t,n,r);if(a[n]=s,!1===i){var h=o||0;n>0&&a[n-1]!==l&&(a[n]=Math.max(a[n],a[n-1]+h)),n0;g-=1)for(var w=!0;p(a[g]-a[g-1])&&w;){var b=d(a,-1,g-1);a[g-1]=b.value,w=b.changed}for(var y=a.length-1;y>0;y-=1)for(var x=!0;p(a[y]-a[y-1])&&x;){var C=d(a,-1,y-1);a[y-1]=C.value,x=C.changed}for(var E=0;E=0?k+1:2;for(n=n.slice(0,r);n.length2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=r.has(t);if(om(!o,"Warning: There may be circular references"),o)return!1;if(t===a)return!0;if(n&&i>1)return!1;r.add(t);var l=i+1;if(Array.isArray(t)){if(!Array.isArray(a)||t.length!==a.length)return!1;for(var s=0;s130&&d=0&&ne.current.focus(e)}_e(null)},[Be]);var De=a.useMemo(function(){return(!ce||null!==fe)&&ce},[ce,fe]),He=Gf(function(e,t){Te(e,t),null==R||R(ke(Ae))}),Ve=-1!==Oe;a.useEffect(function(){if(!Ve){var e=Ae.lastIndexOf(Ne);ne.current.focus(e)}},[Ve]);var Fe=a.useMemo(function(){return qf(ze).sort(function(e,t){return e-t})},[ze]),qe=Uf(a.useMemo(function(){return le?[Fe[0],Fe[Fe.length-1]]:[pe,Fe[0]]},[Fe,le,pe]),2),Ue=qe[0],$e=qe[1];a.useImperativeHandle(t,function(){return{focus:function(){ne.current.focus(0)},blur:function(){var e,t=document.activeElement;null!==(e=re.current)&&void 0!==e&&e.contains(t)&&(null==t||t.blur())}}}),a.useEffect(function(){f&&ne.current.focus(0)},[]);var We=a.useMemo(function(){return{min:pe,max:he,direction:ae,disabled:d,keyboard:h,step:fe,included:_,includedStart:Ue,includedEnd:$e,range:le,tabIndex:Q,ariaLabelForHandle:X,ariaLabelledByForHandle:J,ariaRequired:ee,ariaValueTextFormatterForHandle:te,styles:s||{},classNames:l||{}}},[pe,he,ae,d,h,fe,_,Ue,$e,le,Q,X,J,ee,te,s,l]);return a.createElement(hm.Provider,{value:We},a.createElement("div",{ref:re,className:Wf()(r,i,_f(_f(_f(_f({},"".concat(r,"-disabled"),d),"".concat(r,"-vertical"),P),"".concat(r,"-horizontal"),!P),"".concat(r,"-with-marks"),ve.length)),style:o,onMouseDown:function(e){e.preventDefault();var t,n=re.current.getBoundingClientRect(),r=n.width,a=n.height,i=n.left,o=n.top,l=n.bottom,s=n.right,c=e.clientX,u=e.clientY;switch(ae){case"btt":t=(l-u)/a;break;case"ttb":t=(u-o)/a;break;case"rtl":t=(s-c)/r;break;default:t=(c-i)/r}Ie(be(pe+t*(he-pe)),e)},id:c},a.createElement("div",{className:Wf()("".concat(r,"-rail"),null==l?void 0:l.rail),style:Hf(Hf({},F),null==s?void 0:s.rail)}),!1!==Z&&a.createElement(km,{prefixCls:r,style:H,values:Ae,startPoint:D,onStartMove:De?He:void 0}),a.createElement(Sm,{prefixCls:r,marks:ve,dots:W,style:q,activeStyle:U}),a.createElement(ym,{ref:ne,prefixCls:r,style:V,values:ze,draggingIndex:Oe,draggingDelete:Le,onStartMove:He,onOffsetChange:function(e,t){if(!d){var n=ye(Ae,e,t);null==R||R(ke(Ae)),Me(n.values),_e(n.value)}},onFocus:m,onBlur:v,handleRender:G,activeHandleRender:K,onChangeComplete:Re,onDelete:se?function(e){if(!(d||!se||Ae.length<=ue)){var t=qf(Ae);t.splice(e,1),null==R||R(ke(t)),Me(t);var n=Math.max(0,e-1);ne.current.hideHelp(),ne.current.focus(n)}}:void 0}),a.createElement(Cm,{prefixCls:r,marks:ve,onClick:Ie})))});const jm=Rm,Om=(0,oe.om)("base-slider"),Nm=a.forwardRef(function({stateModifiers:e,...t},n){return(0,s.jsx)(jm,{...t,ref:n,className:Om(e),classNames:{handle:Om("handle",e),rail:Om("rail",e),track:Om("track",e)},pushable:!1,dots:!1,keyboard:!0})}),Lm=({className:e})=>(0,s.jsx)("span",{className:e,children:(0,s.jsx)("svg",{width:"12",height:"6",viewBox:"0 0 12 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M5.99996 5.02325C5.99996 5.02325 7.7674 -1.90735e-06 11.3023 -1.90735e-06H0.697632C4.23252 -1.90735e-06 5.99996 5.02325 5.99996 5.02325Z",fill:"currentColor"})})}),zm=(0,oe.om)("slider-tooltip"),Tm=({className:e,style:t,stateModifiers:n,children:r})=>(0,s.jsx)("div",{className:zm(n,e),style:t,children:(0,s.jsxs)("div",{className:zm("card",n),children:[r,n.disabled&&(0,s.jsx)(Lm,{className:zm("pin",{background:!0})}),(0,s.jsx)(Lm,{className:zm("pin")})]})}),Im=({originHandle:e,originHandleProps:t,stateModifiers:n,tooltipFormat:r,className:i})=>{const o="auto"===n["tooltip-display"],l="on"===n["tooltip-display"],[c,u]=a.useState(!1),[d,p]=a.useState(!1),[h,f]=a.useState(!1);l&&!c&&u(!0),o&&!c&&t.dragging&&u(!0);const m=n.rtl?"right":"left",v=r?r(t.value):t.value,g=({currentHovered:e,currentFocused:t})=>{o&&u((void 0===e?h:e)||(void 0===t?d:t))},w=l?e:a.cloneElement(e,{onMouseEnter:t=>{e.props.onMouseEnter?.(t),f(!0),g({currentHovered:!0})},onMouseLeave:t=>{e.props.onMouseLeave?.(t),f(!1),g({currentHovered:!1})},onFocus:t=>{e.props.onFocus?.(t),p(!0),g({currentFocused:!0})},onBlur:t=>{e.props.onBlur?.(t),p(!1),g({currentFocused:!1})}});return(0,s.jsxs)(a.Fragment,{children:[w,c&&(0,s.jsx)(Tm,{className:i,style:{insetInlineStart:e.props.style?.[m]},stateModifiers:n,children:v})]})},Pm={left:"",right:"",transform:""};function Bm({value:e,min:t,max:n}){return void 0===e||en?n:e}function _m({value:e=[],min:t=0,max:n=100}){return[Bm({max:n,min:t,value:e[0]}),Bm({max:n,min:t,value:e[1]})].sort((e,t)=>e-t)}function Dm({count:e=0,max:t,min:n}){if(!e)return[];if(t===n)return[n];if(1===e){const e=Math.abs(t-n)/2;return[Math.round(100*(n+e))/100]}if(e>2){const r=[],a=Math.abs(t-n)/(e-1);for(let t=0;t{const i=t?t(e):e;a[e]=e===n||e===r?{label:i,style:Pm}:i}),a}function Vm({max:e=100,min:t=0,defaultValue:n,step:r,value:a,markFormat:i,marks:o,tooltipDisplay:l,tooltipFormat:s,startPoint:c}){const u={value:a,defaultValue:n??t,range:!1,max:e,min:t,step:r,tooltipDisplay:l};if(u.tooltipFormat=s||i,e{_(e),b?.(e)},[b,_])}),H={size:n,error:"invalid"===h&&!f,disabled:f,"tooltip-display":P.tooltipDisplay,rtl:"rtl"===I,"no-marks":Array.isArray(c)?0===c.length:0===c,inverted:P.startPoint===P.max&&!P.range,"with-start-point":Boolean(P.startPoint&&!P.range&&P.startPoint!==P.max&&P.startPoint!==P.min)};return(0,s.jsxs)("div",{...(0,Pe.$)(z),className:Fm(null,E),style:S,ref:T,children:[(0,s.jsx)("div",{className:Fm("top",{size:n,"tooltip-display":u})}),(0,s.jsx)(Nm,{ref:k,value:B,min:P.min,max:P.max,step:P.step,range:P.range,disabled:f,marks:P.marks,startPoint:P.startPoint,onBlur:g,onFocus:y,onChange:_,onChangeComplete:b,stateModifiers:H,autoFocus:x,tabIndex:C,"data-qa":A,handleRender:(e,t)=>{const n="off"===P.tooltipDisplay?e:(0,s.jsx)(Im,{originHandle:e,originHandleProps:t,stateModifiers:H,className:Fm("tooltip"),tooltipFormat:P.tooltipFormat});return(0,s.jsxs)(a.Fragment,{children:[n,(0,s.jsx)("input",{ref:D,type:"hidden",name:O,form:N,value:t.value,disabled:f})]})},reverse:H.rtl,ariaLabelForHandle:R,ariaLabelledByForHandle:j}),H.error&&p&&(0,s.jsx)("div",{className:Fm("error",{size:n}),children:p})]})});var Um=n(81908),$m=n(21852);const Wm=a.createContext({size:"m",onUpdate:void 0,value:void 0}),Gm=(0,oe.om)("stepper"),Km=a.forwardRef((e,t)=>{const{id:n,children:r,view:i="idle",disabled:o=!1,className:l,icon:c,...u}=e,{onUpdate:d,value:p,size:h}=a.useContext(Wm),f=a.useMemo(()=>{if(c)return c;switch(i){case"idle":default:return Um.A;case"error":return $m.A;case"success":return Tn.A}},[i,c]),m=void 0!==n&&n===p;return(0,s.jsxs)(ft.$,{ref:t,title:"string"==typeof r?r:void 0,...u,width:"auto",className:Gm("item",{view:i,disabled:o,selected:m,size:h},l),onClick:t=>{e.onClick?.(t),d?.(n)},disabled:o,size:h,view:"outlined",children:[(0,s.jsx)(pe.I,{data:f,className:Gm("item-icon",{view:i})}),r]})});Km.displayName="StepperItem";const Zm=({separator:e})=>{const t=M();return(0,s.jsx)("div",{className:Gm("separator"),"aria-hidden":!0,children:e??(0,s.jsx)(pe.I,{data:"rtl"===t?kt.A:Mt.A})})},Ym=e=>{const{children:t,value:n,size:r="s",className:i,onUpdate:o,separator:l}=e,c=a.useMemo(()=>a.Children.map(t,(e,n)=>{const r=e.props?.id||n,i=a.cloneElement(e,{id:r});return(0,s.jsxs)("li",{className:Gm("list-item"),children:[i,Boolean(n!==a.Children.count(t)-1)&&(0,s.jsx)(Zm,{separator:l})]},r)}),[t,l]);return(0,s.jsx)(Wm.Provider,{value:{size:r,onUpdate:o,value:n},children:(0,s.jsx)("ol",{...(0,Pe.$)(e,{labelable:!0}),className:Gm(null,i),style:e.style,"data-qa":e.qa,children:c})})};Ym.Item=Km,Ym.displayName="Stepper";var Qm=n(37029);const Xm=(0,oe.om)("switch"),Jm=a.forwardRef(function(e,t){const{size:n="m",disabled:r=!1,loading:a=!1,content:i,children:o,title:l,style:c,className:u,qa:d}=e,{checked:p,inputProps:h}=Nr({...e,controlProps:{...e.controlProps,role:"switch"}}),f=i||o,m=(0,s.jsxs)("span",{className:Xm("indicator"),children:[(0,s.jsx)("input",{...h,className:Xm("control")}),(0,s.jsx)("span",{className:Xm("outline")}),(0,s.jsx)("span",{className:Xm("slider")})]});return(0,s.jsx)(zr,{ref:t,title:l,style:c,size:n,disabled:r,className:Xm({size:n,disabled:r,checked:p,loading:a},u),labelClassName:Xm("text"),qa:d,control:m,children:f})});var ev=n(58156),tv=n(61448);const nv=JSON.parse('{"label_empty":"No data","label-actions":"Actions","label-row-select":"Select"}'),rv=JSON.parse('{"label_empty":"Нет данных","label-actions":"Действия","label-row-select":"Выбрать"}'),av=(0,Ne.N)({en:nv,ru:rv},"Table");function iv(e){(0,me.m)(`[Table] Physical values (left, right) of "${e}" property are deprecated. Use logical values (start, end) instead.`)}function ov(e,t){return"left"===e?(iv(t),"start"):"right"===e?(iv(t),"end"):e}const lv=(0,oe.om)("table"),sv=[void 0,null,""];class cv extends a.Component{static defaultProps={edgePadding:!0};static getRowId(e,t,n){const{data:r,getRowId:a,getRowDescriptor:i}=e,o=n??r.indexOf(t),l=i?.(t,o);return void 0!==l?.id?l.id:"function"==typeof a?a(t,o):String(a&&a in t?t[a]:o)}static getHeadCellContent(e){const{id:t,name:n}=e;let r;return r="function"==typeof n?n():"string"==typeof n?n:t,r}static getBodyCellContent(e,t,n){const{id:r,template:a,placeholder:i}=e;let o,l;return o="function"==typeof i?i(t,n):i??"—","function"==typeof a?l=a(t,n):"string"==typeof a?l=ev(t,a):tv(t,r)&&(l=ev(t,r)),sv.includes(l)&&o?o:l}static getDerivedStateFromProps(e,t){return e.columns.length===t.columnHeaderRefs.length?null:{columnHeaderRefs:Array.from(e.columns,()=>a.createRef())}}state={activeScrollElement:"scrollContainer",columnsStyles:Array.from(this.props.columns,()=>({})),columnHeaderRefs:Array.from(this.props.columns,()=>a.createRef())};tableRef=a.createRef();scrollContainerRef=a.createRef();horizontalScrollBarRef=a.createRef();horizontalScrollBarInnerRef=a.createRef();tableResizeObserver;columnsResizeObserver;componentDidMount(){this.props.stickyHorizontalScroll&&(this.tableResizeObserver=new ResizeObserver(e=>{const{contentRect:t}=e[0];this.horizontalScrollBarInnerRef.current?.style.setProperty("width",`${t.width}px`)}),this.tableRef.current&&this.tableResizeObserver.observe(this.tableRef.current),this.scrollContainerRef.current&&(this.scrollContainerRef.current.addEventListener("scroll",this.handleScrollContainerScroll),this.scrollContainerRef.current.addEventListener("mouseenter",this.handleScrollContainerMouseenter)),this.horizontalScrollBarRef.current&&(this.horizontalScrollBarRef.current.addEventListener("scroll",this.handleHorizontalScrollBarScroll),this.horizontalScrollBarRef.current.addEventListener("mouseenter",this.handleHorizontalScrollBarMouseenter))),this.columnsResizeObserver=new ResizeObserver(e=>{window.requestAnimationFrame(()=>{Array.isArray(e)&&e.length&&this.updateColumnStyles()})}),this.tableRef.current&&this.columnsResizeObserver.observe(this.tableRef.current),this.updateColumnStyles()}componentDidUpdate(e){this.props.columns!==e.columns&&this.updateColumnStyles()}componentWillUnmount(){this.props.stickyHorizontalScroll&&(this.tableResizeObserver&&this.tableResizeObserver.disconnect(),this.scrollContainerRef.current&&(this.scrollContainerRef.current.removeEventListener("scroll",this.handleScrollContainerScroll),this.scrollContainerRef.current.removeEventListener("mouseenter",this.handleScrollContainerMouseenter)),this.horizontalScrollBarRef.current&&(this.horizontalScrollBarRef.current.removeEventListener("scroll",this.handleHorizontalScrollBarScroll),this.horizontalScrollBarRef.current.removeEventListener("mouseenter",this.handleHorizontalScrollBarMouseenter))),this.columnsResizeObserver&&this.columnsResizeObserver.disconnect()}render(){const{columns:e,stickyHorizontalScroll:t,className:n,qa:r}=this.props,i=e.some(({primary:e})=>e);return(0,s.jsx)("div",{className:lv({"with-primary":i,"with-sticky-scroll":t},n),"data-qa":r,children:t?(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("div",{ref:this.scrollContainerRef,className:lv("scroll-container"),children:this.renderTable()}),this.renderHorizontalScrollBar()]}):this.renderTable()})}renderHead(){const{columns:e,edgePadding:t,wordWrap:n}=this.props,{columnsStyles:r}=this.state;return(0,s.jsx)("thead",{className:lv("head"),children:(0,s.jsx)("tr",{className:lv("row"),children:e.map((e,a)=>{const{id:i,align:o,primary:l,sticky:c,className:u}=e,d=ov(o,"column.align"),p=ov(c,"column.sticky"),h=cv.getHeadCellContent(e);return(0,s.jsx)("th",{ref:this.state.columnHeaderRefs[a],style:r[a],className:lv("cell",{align:d,primary:l,sticky:p,"edge-padding":t,"word-wrap":n},u),children:h},i)})})})}renderBody(){const{data:e}=this.props;return(0,s.jsx)("tbody",{className:lv("body"),children:e.length>0?e.map(this.renderRow):this.renderEmptyRow()})}renderTable(){const{width:e="auto"}=this.props;return(0,s.jsxs)("table",{...(0,Pe.$)(this.props,{labelable:!0}),ref:this.tableRef,className:lv("table",{width:e}),children:[this.renderHead(),this.renderBody()]})}renderRow=(e,t)=>{const{columns:n,isRowDisabled:r,onRowClick:a,onRowMouseEnter:i,onRowMouseLeave:o,onRowMouseDown:l,getRowClassNames:c,verticalAlign:u,edgePadding:d,wordWrap:p,getRowDescriptor:h,qa:f}=this.props,{columnsStyles:m}=this.state,v=h?.(e,t),g=v?.disabled||r?.(e,t)||!1,w=v?.classNames||c?.(e,t)||[],b=Boolean(!g&&(v?.interactive||a));return(0,s.jsx)("tr",{onClick:!g&&a?a.bind(null,e,t):void 0,onMouseEnter:!g&&i?i.bind(null,e,t):void 0,onMouseLeave:!g&&o?o.bind(null,e,t):void 0,onMouseDown:!g&&l?l.bind(null,e,t):void 0,className:lv("row",{disabled:g,interactive:b,"vertical-align":u},w.join(" ")),"data-qa":f&&`${f}-row-${t}`,children:n.map((n,r)=>{const{id:a,align:i,primary:o,className:l,sticky:c}=n,u=cv.getBodyCellContent(n,e,t),h=ov(i,"column.align"),f=ov(c,"column.sticky");return(0,s.jsx)("td",{style:m[r],className:lv("cell",{align:h,primary:o,sticky:f,"edge-padding":d,"word-wrap":p},l),children:u},a)})},cv.getRowId(this.props,e,t))};renderEmptyRow(){const{columns:e,emptyMessage:t}=this.props;return(0,s.jsx)("tr",{className:lv("row",{empty:!0}),children:(0,s.jsx)("td",{className:lv("cell"),colSpan:e.length,children:(0,s.jsx)(av.Translation,{children:({t:e})=>t||e("label_empty")})})})}renderHorizontalScrollBar(){const{stickyHorizontalScroll:e,stickyHorizontalScrollBreakpoint:t=0}=this.props;return(0,s.jsx)("div",{ref:this.horizontalScrollBarRef,className:lv("horizontal-scroll-bar",{"sticky-horizontal-scroll":e}),style:{bottom:`${t}px`},"data-qa":"sticky-horizontal-scroll-breakpoint-qa",children:(0,s.jsx)("div",{ref:this.horizontalScrollBarInnerRef,className:lv("horizontal-scroll-bar-inner")})})}updateColumnStyles(){this.setState(e=>{const t=e.columnHeaderRefs.map(e=>null===e.current?void 0:e.current.getBoundingClientRect().width);return{columnsStyles:this.props.columns.map((e,n)=>this.getColumnStyles(n,t))}})}getColumnStyles(e,t){const{columns:n}=this.props,r=n[e],a={};if("string"==typeof r.width)return{maxWidth:0,width:r.width};if(void 0!==r.width&&(a.width=r.width),!r.sticky)return a;const i="left"===r.sticky||"start"===r.sticky?t.slice(0,e):t.slice(e+1);return a["left"===r.sticky||"start"===r.sticky?"insetInlineStart":"insetInlineEnd"]=i.reduce((e,t)=>"number"==typeof t?e+t:e,0),a}handleScrollContainerMouseenter=()=>{this.setState({activeScrollElement:"scrollContainer"})};handleScrollContainerScroll=()=>{"scrollContainer"===this.state.activeScrollElement&&this.horizontalScrollBarRef.current&&this.scrollContainerRef.current&&(this.horizontalScrollBarRef.current.scrollLeft=this.scrollContainerRef.current.scrollLeft)};handleHorizontalScrollBarMouseenter=()=>{this.setState({activeScrollElement:"scrollBar"})};handleHorizontalScrollBarScroll=()=>{"scrollBar"===this.state.activeScrollElement&&this.horizontalScrollBarRef.current&&this.scrollContainerRef.current&&(this.scrollContainerRef.current.scrollLeft=this.horizontalScrollBarRef.current.scrollLeft)}}var uv=n(66245),dv=n(50104),pv=n(80299),hv=n(91648);const fv=(0,oe.om)("table"),mv="_selection";function vv(e){const t=`withTableSelection(${f(e)})`;return class extends a.Component{static displayName=t;lastCheckedIndex;render(){const{selectedIds:t,onSelectionChange:n,columns:r,onRowClick:a,getRowDescriptor:i,...o}=this.props;return(0,s.jsx)(e,{...o,columns:this.enhanceColumns(r),onRowClick:this.enhanceOnRowClick(a),getRowDescriptor:this.enhanceGetRowDescriptor(i)})}renderHeadCell=()=>{const{data:e,selectedIds:t}=this.props;let n=!0,r=!1,a=!0;return e.forEach((e,i)=>{if(this.isDisabled(e,i))return;n=!1;const o=cv.getRowId(this.props,e,i);t.includes(o)?r=!0:a=!1}),a&&(r=!1),n&&(a=!1,r=!1),this.renderCheckBox({disabled:n,checked:a,handler:this.handleAllCheckBoxUpdate,indeterminate:r})};renderBodyCell=(e,t)=>{const{selectedIds:n}=this.props,r=cv.getRowId(this.props,e,t),a=n.includes(r);return this.renderCheckBox({disabled:this.isDisabled(e,t),checked:a,handler:this.handleCheckBoxUpdate.bind(this,r,t)})};renderCheckBox({disabled:e,checked:t,handler:n,indeterminate:r}){return(0,s.jsx)(av.Translation,{children:({t:a})=>(0,s.jsx)(Br,{size:"l",checked:t,indeterminate:r,disabled:e,onChange:n,className:fv("selection-checkbox",{"vertical-align":this.props.verticalAlign}),controlProps:{"aria-label":a("label-row-select")}})})}handleCheckBoxUpdate=(e,t,n)=>{const{checked:r}=n.target,a=n.nativeEvent.shiftKey,{data:i,selectedIds:o,onSelectionChange:l}=this.props;if(a&&void 0!==this.lastCheckedIndex&&this.lastCheckedIndex>=0){const e=Math.min(this.lastCheckedIndex,t),n=Math.max(this.lastCheckedIndex,t),a=i.map((e,t)=>cv.getRowId(this.props,e,t)).filter((t,r)=>e<=r&&r<=n&&!this.isDisabled(i[r],r));l(r?pv(o,a):hv(o,...a))}else l(r?[...o,e]:hv(o,e));this.lastCheckedIndex=t};handleAllCheckBoxUpdate=e=>{const{checked:t}=e.target,{data:n,selectedIds:r,onSelectionChange:a}=this.props,i=n.map((e,t)=>cv.getRowId(this.props,e,t)),o=i.filter((e,t)=>!this.isDisabled(n[t],t));a(t?pv(r,o):uv(r,i))};enhanceColumns=dv(e=>[{id:mv,name:this.renderHeadCell,template:this.renderBodyCell,className:fv("checkbox_cell"),sticky:"start"===e?.[0]?.sticky?"start":void 0},...e]);enhanceOnRowClick=dv(e=>e?(t,n,r)=>{const a=fv("selection-checkbox");if(!r.nativeEvent.target.matches(`.${a}, .${a} *`))return e(t,n,r)}:e);enhanceGetRowDescriptor=dv(e=>(t,n)=>{const{selectedIds:r,getRowClassNames:a}=this.props,i=e?.(t,n)||{};void 0===i.classNames&&(i.classNames=a?.(t,n)||[]);const o=cv.getRowId(this.props,t,n),l=r.includes(o);return i.classNames.push(fv("row",{selected:l})),i});isDisabled=(e,t)=>{const{isRowDisabled:n,isRowSelectionDisabled:r,getRowDescriptor:a}=this.props;return!(!r||!r(e,t))||a?.(e,t)?.disabled||n?.(e,t)||!1}}}const gv="_actions";function wv(e,t){const n=e.find(({id:e})=>e===gv),r=n||{id:gv,name:"",sticky:"end",width:28,placeholder:""};return t(r),n?e:[...e,r]}const bv=(0,oe.om)("table"),yv=bv("actions"),xv=bv("actions-button"),Cv=(0,oe.om)("table-action-popup"),Ev=Cv("menu"),Sv=Cv("menu-item"),Av=["bottom-end","top-end"],kv=({index:e,item:t,getRowActions:n,getRowDescriptor:r,rowActionsSize:i,rowActionsIcon:o,isRowDisabled:l,tableQa:c})=>{const[u,,d,p]=function(){const[e,t]=a.useState(!1);return[e,a.useCallback(()=>t(!0),[]),a.useCallback(()=>t(!1),[]),a.useCallback(()=>t(e=>!e),[])]}(),h=a.useRef(null),f=(0,P.u)(),{t:m}=av.useTranslation();if(void 0===n)return null;const v=(e,n)=>{if(r=e,Array.isArray(r.items))return(0,s.jsx)(Tt.Group,{label:e.title,children:e.items.map(v)},n);var r;const{text:a,icon:i,handler:o,href:l,...c}=e;return(0,s.jsx)(Tt.Item,{onClick:e=>{e.stopPropagation(),o(t,n,e),d()},href:"function"==typeof l?l(t,n):l,iconStart:i,contentClassName:Sv,...c,children:a},n)},g=r?.(t,e)?.disabled||l?.(t,e),w=n(t,e);return 0===w.length?null:(0,s.jsxs)("div",{className:yv,children:[(0,s.jsx)(Dt.z,{open:u,anchorRef:h,placement:Av,onOutsideClick:d,id:f,qa:c&&`${c}-actions-popup`,children:(0,s.jsx)(Tt,{className:Ev,size:i,children:w.map(v)})}),(0,s.jsx)(ft.$,{view:"flat-secondary",className:xv,onClick:p,size:i,ref:h,disabled:g,qa:c&&`${c}-actions-trigger-${e}`,"aria-label":m("label-actions"),"aria-expanded":u,"aria-controls":f,children:o??(0,s.jsx)(pe.I,{data:Ct.A})})]})};function Mv(e){const t=`withTableActions(${f(e)})`;return class extends a.Component{static displayName=t;state={popupOpen:!1,popupData:null};render(){const{renderRowActions:t,getRowActions:n,columns:r,onRowClick:a,...i}=this.props;return(0,s.jsx)(e,{...i,columns:this.enhanceColumns(r),onRowClick:this.enhanceOnRowClick(a)})}renderBodyCell=(e,t)=>{const{getRowActions:n,rowActionsSize:r,renderRowActions:a,rowActionsIcon:i,isRowDisabled:o,getRowDescriptor:l,qa:c}=this.props;return a?a({item:e,index:t}):(0,s.jsx)(kv,{index:t,item:e,getRowActions:n,rowActionsSize:r,rowActionsIcon:i,getRowDescriptor:l,isRowDisabled:o,tableQa:c})};enhanceColumns=dv(e=>wv(e,e=>{e.template=this.renderBodyCell}));enhanceOnRowClick=dv(e=>e?(t,n,r)=>{if(!r.nativeEvent.target.closest(`.${Ev}`)&&!r.nativeEvent.target.matches(`.${xv}, .${xv} *`))return e(t,n,r)}:e)}}const Rv=(0,oe.om)("table");function jv(e){const t=`withTableCopy(${f(e)})`;return class extends a.Component{static displayName=t;render(){const{columns:t,onRowClick:n,...r}=this.props;return(0,s.jsx)(e,{...r,columns:this.enhanceColumns(t),onRowClick:this.enhanceOnRowClick(n)})}enhanceColumns=dv(e=>e.map(e=>{const t=e.meta;return t&&t.copy?{...e,template:(n,r)=>{const a=cv.getBodyCellContent({...e,placeholder:""},n,r);if(!a)return a;let i;return"function"==typeof t.copy?i=String(t.copy(n,r)):"string"!=typeof a&&"number"!=typeof a||(i=String(a)),i?(0,s.jsxs)("div",{className:Rv("copy"),children:[(0,s.jsx)("div",{className:Rv("copy-content"),children:a}),(0,s.jsx)("div",{className:Rv("copy-button"),children:(0,s.jsx)(Gr,{text:i,size:"xs"})})]}):a}}:e}));enhanceOnRowClick=dv(e=>e?(t,n,r)=>{const a=Rv("copy-button");if(!r.nativeEvent.target.matches(`.${a}, .${a} *`))return e(t,n,r)}:e)}}var Ov=n(34529),Nv=n(64404),Lv=n(97804);function zv({order:e}){let t;switch(e){case"asc":t=Ov.A;break;case"desc":t=Nv.A;break;default:t=Lv.A}return(0,s.jsx)(pe.I,{data:t,size:14})}const Tv=zv,Iv=(0,oe.om)("table");function Pv(e){const t=`withTableSorting(${f(e)})`;function n(e,t,n){return ev(e,n)===ev(t,n)?0:ev(e,n)>ev(t,n)?1:-1}return class extends a.Component{static displayName=t;state={sort:this.props.defaultSortState??[]};render(){const{columns:t,...n}=this.props;return(0,s.jsx)(e,{...n,data:this.getSortedData(),columns:this.enhanceColumns(t)})}getSortedData(){const{data:e,columns:t,disableDataSorting:r=this.isControlledState()}=this.props,a=this.getSortState();return r||0===a.length?e:e.slice().sort((e,r)=>{let i=0;for(;ie.id===o.column),s=l?.meta?.sort;if(!s)continue;const c="function"==typeof s?s(e,r):n(e,r,o.column);if(0!==c)return"asc"===o.order?c:-c}return 0})}enhanceColumns=dv(e=>e.map(e=>{const t=e.meta;return t&&t.sort?{...e,meta:{...e.meta,_originalName:e.name},name:()=>{const t=this.getSortState();let n;if(t.length>0){const r=t.find(t=>t.column===e.id);r&&(n=r.order)}const r=cv.getHeadCellContent(e),a=[(0,s.jsx)("div",{className:Iv("sort-content"),children:r},"content"),(0,s.jsx)("div",{className:Iv("sort-indicator"),children:(0,s.jsx)(zv,{order:n})},"indicator")];"right"!==e.align&&"end"!==e.align||a.reverse();const i=this.handleColumnSortClick.bind(this,e),o=(0,Et.h)(i);return(0,s.jsx)("div",{role:"button",tabIndex:0,className:Iv("sort",{active:Boolean(n)}),onClick:i,onKeyDown:o,children:a})}}:e}));handleColumnSortClick=(e,t)=>{const n=this.getSortState(),r=n.findIndex(t=>t.column===e.id),a=n[r],i=this.getNextSortForColumn(e,a);t.shiftKey?a?this.handleSortStateChange([...n.slice(0,r),...n.slice(r+1),...i]):this.handleSortStateChange([...n,...i]):this.handleSortStateChange(i)};getSortState(){const{sortState:e}=this.props,{sort:t}=this.state;return this.isControlledState()?e:t}handleSortStateChange(e){const{onSortStateChange:t}=this.props;this.isControlledState()||this.setState({sort:e}),t&&t(e)}isControlledState(){const{sortState:e,onSortStateChange:t}=this.props;return Boolean(e&&t)}getColumnDefaultSortOrder(e){return e.meta?.defaultSortOrder||"asc"}getNextSortForColumn(e,t){const n="desc"===this.getColumnDefaultSortOrder(e)?["desc","asc",void 0]:["asc","desc",void 0],r=n.indexOf(t?.order),a=n[(r+1)%n.length];return a?[{column:e.id,order:a}]:[]}}}var Bv=n(64482),_v=n(92482);const Dv=(0,oe.om)("list-container-view"),Hv=a.forwardRef(function({as:e="div",role:t="listbox",children:n,id:r,className:a,fixedHeight:i,extraProps:o,qa:l,style:c},u){return(0,s.jsx)(En,{qa:l,as:e,direction:"column",ref:u,grow:!0,tabIndex:-1,id:r,role:t,style:c,className:Dv({"fixed-height":i},a),...o,children:n})}),Vv=e=>null!==e&&"object"==typeof e&&"data"in e,Fv=(0,oe.om)("list-recursive-renderer");function qv({id:e,itemSchema:t,list:n,...r}){const a=r.children(e,n.structure.idToFlattenIndex[e]);if(Vv(t)&&t.children){const i=!n.state.expandedById||!(e in n.state.expandedById)||n.state.expandedById[e];return(0,s.jsxs)("ul",{style:r.style,className:Fv(null,r.className),role:"group",children:[a,i&&Boolean(n.structure.groupsState[e]?.childrenIds)&&t.children.map((t,a)=>(0,s.jsx)(qv,{list:n,id:n.structure.groupsState[e].childrenIds[a],itemSchema:t,...r},a))]})}return a}function Uv({containerRef:e,renderItem:t,list:n,...r}){return(0,s.jsx)(Hv,{ref:e,...r,children:n.structure.items.map((e,r)=>(0,s.jsx)(qv,{itemSchema:e,id:n.structure.rootIds[r],list:n,children:t},r))})}const $v=({list:e,multiple:t})=>({id:n})=>{e.state.disabledById[n]||(e.state.setActiveItemId(n),e.state.expandedById&&n in e.state.expandedById&&e.state.setExpanded?e.state.setExpanded(e=>({...e,[n]:!e[n]})):e.state.setSelected(e=>({...t?e:{},[n]:!t||!e[n]})))},Wv="data-list-item",Gv={s:[22,44],m:[26,44],l:[34,52],xl:[44,62]},Kv=(0,oe.om)("list-item-expand-icon"),Zv=({expanded:e,behavior:t="action",disabled:n})=>(0,s.jsx)(fe,{direction:Yv({behavior:t,expanded:e}),className:Kv(null,gt({color:n?"hint":void 0})),size:16});function Yv({behavior:e,expanded:t}){return t&&"action"===e?"top":t&&"state"===e||t&&"state-inverse"===e||"action"===e?"bottom":"state"===e?"right":"state-inverse"===e?"left":"bottom"}const Qv=(0,oe.om)("list-item-view"),Xv=e=>"object"==typeof e&&null!==e&&"title"in e,Jv=({children:e,indentation:t=1,className:n,...r})=>(0,s.jsx)(En,{width:16*t,className:Qv("slot",n),...r,children:e}),eg=e=>e&&e>=1?(0,s.jsx)(Jv,{indentation:Math.floor(e)}):null,tg=({startSlot:e,subtitle:t,endSlot:n,disabled:r,hasSelectionIcon:a,isGroup:i,indentation:o,expanded:l,selected:c,title:u,expandIconPlacement:d="start",renderExpandIcon:p=Zv})=>{const h=i?(0,s.jsx)(p,{behavior:"start"===d?"state":"action",expanded:l,disabled:r}):null;return(0,s.jsxs)(En,{alignItems:"center",justifyContent:"space-between",gap:"4",className:Qv("content"),children:[(0,s.jsxs)(En,{gap:"2",alignItems:"center",grow:!0,children:[a&&(0,s.jsx)(Jv,{children:c?(0,s.jsx)(pe.I,{data:br.A,size:16,className:gt({color:"info"})}):null}),eg(o),"start"===d&&h,e,(0,s.jsxs)("div",{className:Qv("main-content"),children:["string"==typeof u?(0,s.jsx)(xt,{ellipsis:!0,color:r?"hint":void 0,variant:i?"subheader-1":void 0,children:u}):u,"string"==typeof t?(0,s.jsx)(xt,{ellipsis:!0,color:r?"hint":"secondary",children:t}):t]})]}),(0,s.jsxs)(En,{gap:"2",children:["end"===d&&h,n]})]})},ng=a.forwardRef(function({id:e,as:t,size:n="m",active:r,selected:a,disabled:i,selectionViewType:o="multiple",activeOnHover:l,className:c,height:u,dragging:d,style:p,content:h,role:f="option",onClick:m,...v},g){const w=t||"li",b=i?void 0:m,y="boolean"==typeof l?l:Boolean(b),x={minHeight:`var(--g-list-item-height, ${u??Gv[n][Number(Boolean(!!Xv(h)&&h?.subtitle))]}px)`,...p};return(0,s.jsx)(w,{[Wv]:e,role:f,"aria-selected":a,onClick:b,className:Qv({active:d||r,selected:a&&"single"===o,activeOnHover:y,radius:n,size:n,dragging:d,clickable:Boolean(b)},fn({px:2},c)),style:x,ref:g,...v,children:Xv(h)?(0,s.jsx)(tg,{...h,hasSelectionIcon:"multiple"===o,selected:a,disabled:i}):h})}),rg=(0,oe.om)("tree-list"),ag=({qa:e,id:t,size:n="m",className:r,list:i,multiple:o,containerRef:l,renderItem:c,renderContainer:u=Uv,onItemClick:d,mapItemDataToContentProps:p})=>{const h=(0,P.u)(),f=t??h,m=a.useRef(null),v=l??m,g=a.useMemo(()=>{if(null!==d)return(e,t)=>{const n={id:e.id,list:i};d?d?.(n,t):$v({list:i,multiple:o})(n,t)}},[d,i,o]);return(({containerRef:e,onItemClick:t,enabled:n,list:r})=>{const i=a.useCallback((t,n=!0)=>{"number"==typeof t&&r.structure.visibleFlattenIds[t]&&(n&&((e,t)=>{if(document){const n=(t||document).querySelector(`[${Wv}="${e}"]`);n&&n.scrollIntoView?.({block:"nearest"})}})(r.structure.visibleFlattenIds[t],e?.current),r.state.setActiveItemId?.(r.structure.visibleFlattenIds[t]))},[r.structure.visibleFlattenIds,r.state,e]),o=a.useCallback((e,t,n=0)=>{e.preventDefault();const a="string"==typeof r.state.activeItemId?r.structure.visibleFlattenIds.findIndex(e=>e===r.state.activeItemId):-1,o=(({list:e,index:t,step:n,disabledItemsById:r={}})=>{const a=e.length;let i=(t+a)%a;for(let t=0;t-1?a:n)+t,step:Math.sign(t),disabledItemsById:r.state.disabledById});i(o)},[i,r.state.activeItemId,r.state.disabledById,r.structure.visibleFlattenIds]);(0,It.N)(()=>{const a=e?.current;if(n||!a)return;const i=e=>{switch(e.key){case Ce.D.ARROW_DOWN:o(e,1,-1);break;case Ce.D.ARROW_UP:o(e,-1);break;case Ce.D.SPACEBAR:case Ce.D.ENTER:r.state.activeItemId&&!r.state.disabledById[r.state.activeItemId]&&(e.preventDefault(),t?.({id:r.state.activeItemId}))}};return a.addEventListener("keydown",i),()=>{a.removeEventListener("keydown",i)}},[e,n,o,r.state.activeItemId,r.state.disabledById,t])})({containerRef:v,onItemClick:g,list:i}),u({qa:e,id:`list-${f}`,size:n,containerRef:v,className:rg(null,r),list:i,renderItem:(t,r,a)=>{const l=(({qa:e,list:t,onItemClick:n,mapItemDataToContentProps:r,size:a="m",multiple:i=!1,id:o})=>{const l={...t.structure.itemsState[o],...t.structure.groupsState[o],isLastItem:o===t.structure.visibleFlattenIds[t.structure.visibleFlattenIds.length-1]},s={id:o,size:a,selected:Boolean(t.state.selectedById[o]),disabled:Boolean(t.state.disabledById?.[o]),active:o===t.state.activeItemId,onClick:n?e=>n({id:o},e):void 0,selectionViewType:Boolean(i)&&!l.childrenIds?"multiple":"single",content:{expanded:t.state.expandedById?.[o],indentation:l.indentation,isGroup:t.state.expandedById&&o in t.state.expandedById,...r(t.structure.itemsById[o])}};return e&&(s.qa=((e,t)=>`${e}-${t}`)(e,o)),{data:t.structure.itemsById[o],props:s,context:l}})({qa:e,id:t,size:n,multiple:o,mapItemDataToContentProps:p,onItemClick:g,list:i});return c?c({id:t,data:l.data,props:l.props,context:l.context,index:r,renderContainerProps:a,list:i}):(0,s.jsx)(ng,{...l.props,...a})}})},ig=({item:e,groupedId:t,getItemId:n})=>{let r=t;return"function"==typeof n?r=n(Vv(e)?e.data:e):e&&"object"==typeof e&&"id"in e&&e.id&&(r=e.id),r},og=(e,t)=>t?`${t}-${e}`:`${e}`;const lg=({items:e,getItemId:t,defaultExpandedState:n="expanded",withExpandedState:r=!0,initialState:i,controlledState:o})=>{const{itemsById:l,groupsState:s,itemsState:c,initialState:u}=function({items:e,getItemId:t,defaultExpandedState:n}){const r=a.useRef(t).current;return a.useMemo(()=>function({items:e,defaultExpandedState:t="expanded",getItemId:n}){const r={itemsById:{},groupsState:{},itemsState:{},initialState:{disabledById:{},selectedById:{},expandedById:{}}},a=({item:e,index:i,parentGroupedId:o,parentId:l})=>{const s=og(i,o),c=ig({groupedId:s,item:e,getItemId:n});l&&r.groupsState[l].childrenIds.push(c),r.itemsById[c]=e.data,r.itemsState[c]||(r.itemsState[c]={indentation:0}),void 0!==l&&(r.itemsState[c].parentId=l),void 0!==e.selected&&(r.initialState.selectedById[c]=e.selected),void 0!==e.disabled&&(r.initialState.disabledById[c]=e.disabled),s&&(r.itemsState[c].indentation=(e=>e.split("-"))(s).length-1),e.children&&(r.groupsState[c]={childrenIds:[]},r.initialState.expandedById&&(void 0===e.expanded?r.initialState.expandedById[c]="expanded"===t:r.initialState.expandedById[c]=e.expanded),e.children.forEach((e,t)=>{a({item:e,index:t,parentGroupedId:s,parentId:c})}))};return e.forEach((e,t)=>Vv(e)?a({item:e,index:t}):(({item:e,index:t})=>{const a=ig({groupedId:String(t),item:e,getItemId:n});r.itemsById[a]=e,r.itemsState[a]||(r.itemsState[a]={indentation:0}),e&&"object"==typeof e&&("selected"in e&&"boolean"==typeof e.selected&&(r.initialState.selectedById[a]=e.selected),"disabled"in e&&"boolean"==typeof e.disabled&&(r.initialState.disabledById[a]=e.disabled))})({item:e,index:t})),r}({items:e,getItemId:r,defaultExpandedState:n}),[r,n,e])}({items:e,getItemId:t,defaultExpandedState:n}),d=(({initialState:e,withExpandedState:t})=>{const n=a.useRef(e),r=n.current!==e;n.current=e;const[i,o]=a.useState(()=>e?.disabledById??{}),[l,s]=a.useState(()=>e?.selectedById??{}),[c,u]=a.useState(()=>e?.expandedById??{}),[d,p]=a.useState(()=>e?.activeItemId);r&&(e?.disabledById&&o(t=>({...e.disabledById,...t})),e?.selectedById&&s(t=>({...e.selectedById,...t})),e?.expandedById&&u(t=>({...e.expandedById,...t})),p(t=>t??e?.activeItemId));const h={disabledById:i,selectedById:l,activeItemId:d,setDisabled:o,setSelected:s,setActiveItemId:p};return t&&(h.expandedById=c,h.setExpanded=u),h})({initialState:a.useMemo(()=>({expandedById:{...u.expandedById,...i?.expandedById},selectedById:{...u.selectedById,...i?.selectedById},disabledById:{...u.disabledById,...i?.disabledById},activeItemId:i?.activeItemId}),[u.disabledById,u.expandedById,u.selectedById,i?.activeItemId,i?.disabledById,i?.expandedById,i?.selectedById]),withExpandedState:r}),p=a.useMemo(()=>o?{...d,...o}:d,[o,d]),{visibleFlattenIds:h,idToFlattenIndex:f,rootIds:m}=function({items:e,expandedById:t,getItemId:n}){const r=a.useMemo(()=>function({items:e,getItemId:t,expandedById:n={}}){const r=[],a=(e,i,o,l)=>{const s=og(o,l),c=ig({groupedId:s,item:i,getItemId:t});return l||r.push(c),e.push(c),Vv(i)&&i.children&&(c in n&&!n[c]||e.push(...i.children.reduce((e,t,n)=>a(e,t,n,c),[]))),e},i=e.reduce((e,t,n)=>a(e,t,n),[]),o={};for(const[e,t]of i.entries())o[t]=e;return{rootIds:r,visibleFlattenIds:i,idToFlattenIndex:o}}({items:e,expandedById:t,getItemId:n}),[e,t,n]);return r}({items:e,expandedById:p.expandedById,getItemId:t});return{state:p,structure:{rootIds:m,items:e,visibleFlattenIds:h,idToFlattenIndex:f,itemsById:l,groupsState:s,itemsState:c}}},sg=(0,oe.om)("tree-select"),cg=e=>(0,s.jsx)(ng,{...e.props,...e.renderContainerProps}),ug=a.forwardRef(function({id:e,qa:t,title:n,placement:r,slotBeforeListBody:i,slotAfterListBody:o,size:l="m",defaultOpen:c,width:u,containerRef:d,className:h,containerClassName:f,popupClassName:m,open:v,multiple:g,popupWidth:w,popupDisablePortal:b,items:y,value:x,defaultValue:C,placeholder:E,disabled:S=!1,withExpandedState:A=!0,defaultExpandedState:k="expanded",hasClear:M,errorMessage:R,errorPlacement:j,validationState:O,onClose:N,onOpenChange:L,onUpdate:z,renderControl:T,renderItem:I=cg,renderContainer:B,mapItemDataToContentProps:_,onFocus:D,onBlur:H,getItemId:V,onItemClick:F},q){const U=p(),$=(0,P.u)(),W=e??$,G=`tree-select-popup-${W}`,K=a.useRef(null),Z=a.useRef(null),Y=a.useRef(null),Q=d??Y,{errorMessage:X,errorPlacement:J,validationState:ee}=Ad({errorMessage:R,errorPlacement:j||"outside",validationState:O}),te=(0,P.u)(),ne="invalid"===ee,re=ne&&Boolean(X)&&"outside"===J,ae=ne&&Boolean(X)&&"inside"===J,ie=(0,Xe.N)(q,Z),{toggleOpen:oe,open:le}=Qp({defaultOpen:c,onClose:N,onOpenChange:L,open:v}),{value:se,selectedById:ce,setSelected:ue}=(({defaultValue:e=[],value:t,onUpdate:n})=>{const[r,i]=a.useState(e),o=t??r,l=!t;return a.useMemo(()=>{const e=o.reduce((e,t)=>(e[t]=!0,e),{});return{value:o,selectedById:e,setSelected:t=>{const r=(e=>Object.entries(e).reduce((e,[t,n])=>(n&&e.push(t),e),[]))("function"==typeof t?t(e):t);l?i(r):n?.(r)},setInnerValue:l?i:void 0}},[n,l,o])})({value:x,defaultValue:C,onUpdate:z}),de=lg({controlledState:{selectedById:ce,setSelected:ue},items:y,getItemId:V,defaultExpandedState:k,withExpandedState:A}),pe=a.useMemo(()=>{if(null!==F)return(e,t)=>{const n={id:e.id,list:de};if(F)F?.(n,t);else{$v({list:de,multiple:g})(n,t);const r=de.state.expandedById&&e.id in de.state.expandedById;g||r||oe(!1)}}},[F,de,g,oe]);(0,It.N)(()=>(le&&Q.current?.focus({preventScroll:!0}),()=>de.state.setActiveItemId(void 0)),[le]);const he=a.useCallback(()=>oe(!1),[oe]),{focusWithinProps:fe}=eh({onFocusWithin:D,onBlurWithin:a.useCallback(e=>{H?.(e),he()},[he,H])}),me={list:de,open:le,placeholder:E,toggleOpen:oe,clearValue:()=>de.state.setSelected({}),ref:ie,size:l,value:se,disabled:S,id:W,activeItemId:de.state.activeItemId,title:n,errorMessage:ae?X:void 0,errorPlacement:J,validationState:ee,hasClear:M,isErrorVisible:ne},ve=T?T(me):(0,s.jsx)(Ph,{...me,selectedOptionsContent:a.Children.toArray(se.map(e=>e in de.structure.itemsById?_(de.structure.itemsById[e]).title:"")).join(", "),view:"normal",pin:"round-round",popupId:G,selectId:W}),ge={..."max"===u&&{width:u}},we={};return"number"==typeof u&&(we.width=u),(0,s.jsxs)("div",{ref:K,...fe,className:sg(ge,h),style:we,children:[ve,(0,s.jsxs)(Vh,{ref:K,className:sg("popup",{size:l},m),controlRef:Z,width:w,placement:r,open:le,handleClose:he,disablePortal:b,mobile:U,id:G,children:[i,(0,s.jsx)(ag,{list:de,size:l,className:sg("list",f),qa:t,multiple:g,id:`list-${W}`,containerRef:Q,onItemClick:pe,renderContainer:B,mapItemDataToContentProps:_,renderItem:I??cg}),o]}),(0,s.jsx)(Md,{errorMessage:re?X:null,errorMessageId:te})]})});var dg=n(38221);function pg(e,t){return!t||"object"!=typeof t||!("title"in t)||"string"!=typeof t.title||t.title.toLowerCase().includes((e||"").toLowerCase())}const hg=JSON.parse('{"button_apply":"Apply","button_reset":"Reset","button_switcher":"Columns"}'),fg=JSON.parse('{"button_apply":"Применить","button_reset":"Сбросить","button_switcher":"Колонки"}'),mg=(0,Ne.N)({en:hg,ru:fg},"TableColumnSetupInner"),vg=(0,oe.om)("inner-table-column-setup"),gg=vg("controls"),wg=vg("filter-input"),bg=vg("empty-placeholder"),yg={isDragDisabled:!0},xg=e=>({title:e.title}),Cg=(e,t)=>"string"!=typeof t.title||t.title.toLowerCase().includes(e.trim().toLowerCase()),Eg=e=>{const{renderSwitcher:t,popupWidth:n,popupPlacement:r,items:i,onUpdate:o,sortable:l,renderControls:c,className:u,defaultItems:d=i,showResetButton:p,filterable:h,filterPlaceholder:f,filterEmptyMessage:m,filterSettings:v=Cg,hideApplyButton:g}=e,[w,b]=a.useState(!1),[y,x]=a.useState(l),[C,E]=a.useState(l);l!==C&&(E(l),x(l));const[S,A]=L(g?i:void 0,i,g?o:void 0),[k,M]=a.useState(i);i!==k&&(M(i),g||A(i));const{t:R}=mg.useTranslation(),j=function({items:e,initialFilterValue:t="",filterItem:n,onFilterChange:r,filterItems:i,debounceTimeout:o=300}){const l=a.useRef(null),[s,c]=a.useState(t),[u,d]=a.useState(e),[p,h]=a.useState(e),f=a.useCallback((e,t)=>{if(i)return()=>i(e,t);if(e){const r=n||pg;return()=>function(e,t){const n=(e,r)=>{if(Vv(r)&&r.children){const a=r.children.reduce(n,[]);a.length?e.push({...r,data:r.data,children:a}):t(r.data)&&e.push({...r,data:r.data,children:[]})}else if(Vv(r)&&t(r.data)){const{children:t,...n}=r;e.push(n)}else!Vv(r)&&t(r)&&e.push(r);return e};return e.reduce(n,[])}(t,t=>r(e,t))}return()=>t},[n,i]);e!==u&&(h(f(s,e)),d(e));const m=a.useCallback(dg(t=>h(f(t,e)),o),[h,f,e,o]),{onFilterUpdate:v,reset:g}=a.useMemo(()=>({reset:()=>{c(t),r?.(t),m(t)},onFilterUpdate:e=>{c(e),r?.(e),m(e)}}),[m,t,r]);return{filterRef:l,filter:s,reset:g,items:p,onFilterUpdate:v}}({items:S,filterItem:v,debounceTimeout:0}),O=()=>{const e=S.map(({id:e,isSelected:t})=>({id:e,isSelected:t}));o(e),B(!1)},N=()=>(0,s.jsx)(ft.$,{view:"action",width:"max",onClick:O,children:R("button_apply")}),z="function"==typeof p?p(S):p,T=(({onDragEnd:e,renderControls:t})=>{const n=(0,P.u)();return({renderItem:r,list:i,containerRef:o,id:l,className:c})=>{const{stickyStartItemIdList:u,sortableItemIdList:d,stickyEndItemIdList:p}=((e,t)=>{let n=0;for(;n!==t.length;n++){const r=e[t[n]];if("left"!==r?.sticky&&"start"!==r?.sticky)break}let r=t.length;for(;0!==r;r--){const n=e[t[r-1]];if("right"!==n?.sticky&&"end"!==n?.sticky)break}return{stickyStartItemIdList:t.slice(0,n),sortableItemIdList:t.slice(n,r),stickyEndItemIdList:t.slice(r)}})(i.structure.itemsById,i.structure.visibleFlattenIds),h=u.map((e,t)=>r(e,t,yg)),f=d.map((e,t)=>r(e,t+u.length)),m=p.map((e,t)=>r(e,h.length+f.length+t,yg));return(0,s.jsxs)(a.Fragment,{children:[(0,s.jsxs)(Hv,{ref:o,id:l,className:c,children:[h,(0,s.jsx)(Qc,{onDragEnd:e,children:(0,s.jsx)(Nu,{droppableId:n,renderClone:(e,t,n)=>{const a={provided:e,snapshot:t};return r(i.structure.visibleFlattenIds[n.source.index],n.source.index,a)},children:e=>(0,s.jsxs)("div",{...e.droppableProps,ref:e.innerRef,children:[f,e.placeholder]})})}),m]}),(0,s.jsx)("div",{className:gg,children:t()})]})}})({onDragEnd:({destination:e,source:t})=>{if(void 0!==e?.index&&e?.index!==t.index){const n=((e,t,n)=>{const r=[...e],[a]=r.splice(t,1);return r.splice(n,0,a),r})(S,t.index,e.index);A(n)}},renderControls:()=>c?c({DefaultApplyButton:N,onApply:O}):(0,s.jsxs)(En,{gapRow:1,direction:"column",className:gg,children:[z&&(0,s.jsx)(ft.$,{onClick:()=>{g&&o(d),A(d)},width:"max",children:R("button_reset")}),!g&&(0,s.jsx)(N,{})]})}),I=(e=>({data:t,props:n,index:r,renderContainerProps:i})=>{const o=!1===e||!0===i?.isDragDisabled,l=o?void 0:(0,s.jsx)(pe.I,{data:Hd.A,size:16}),c=t.isRequired?(0,s.jsx)(pe.I,{data:_v.A}):void 0,u=!t.isRequired&&n.selected,d={...n,selected:u,selectionViewType:t.isRequired?"single":"multiple",content:{...n.content,startSlot:c,endSlot:l}};if(o)return(0,a.createElement)(ng,{...d,key:d.id});const p=(e,t)=>(0,s.jsx)(ng,{...d,...e.draggableProps,...e.dragHandleProps,ref:e.innerRef,dragging:t.isDragging});return i?.provided&&i.snapshot?p(i.provided,i.snapshot):(0,s.jsx)(uu,{draggableId:n.id,index:r,isDragDisabled:o,children:p},`item-key-${n.id}`)})(y),B=e=>{b(e),!1===e&&(A(i),x(l),j.reset())},_=a.useMemo(()=>(e=>{const t=[];return e.forEach(({id:e,isSelected:n})=>{n&&t.push(e)}),t})(S),[S]),D=(H=m,()=>(0,s.jsx)(xt,{className:bg,children:H}));var H;const V=h?(0,s.jsx)(zd,{size:"m",view:"clear",placeholder:f,value:j.filter,className:wg,onUpdate:e=>{j.onFilterUpdate(e),x(!e.length)},hasClear:!0}):null,F=j.filter&&!j.items.length?D:T;return(0,s.jsx)(ug,{className:vg(null,u),mapItemDataToContentProps:xg,multiple:!0,size:"l",open:w,value:_,items:j.filter?j.items:S,onUpdate:e=>{const t=S.map(t=>({...t,isSelected:t.isRequired||e.includes(t.id)}));A(t)},popupWidth:n,onOpenChange:B,placement:r,slotBeforeListBody:V,renderContainer:F,renderControl:({toggleOpen:e})=>{const n=(0,Et.h)(e);return t?.({onClick:e,onKeyDown:n})||(0,s.jsxs)(ft.$,{onClick:e,onKeyDown:n,children:[(0,s.jsx)(pe.I,{data:Bv.A}),R("button_switcher")]})},renderItem:I})},Sg=JSON.parse('{"label_settings":"Table settings"}'),Ag=JSON.parse('{"label_settings":"Настройки таблицы"}'),kg=(0,Ne.N)({en:Sg,ru:Ag},"withTableSettings");function Mg(e){const t=e.meta?.displayName;if("string"==typeof t)return t;if("string"==typeof e.name)return e.name;const n=e.meta?._originalName;return"string"==typeof n?n:e.id}const Rg=(e,t,n)=>{const r=Boolean(n?.meta?.selectedAlways);return{id:e,isSelected:!!r||t,isRequired:r,title:n?Mg(n):e,sticky:n?.sticky}};function jg(e,t){const n=[];return t.forEach(({id:t,isSelected:r})=>{const a=e.find(e=>t===e.id);a&&n.push(Rg(t,r,a))}),e.forEach(e=>{if(e.id!==gv&&e.id!==mv&&t.every(t=>t.id!==e.id)){const t=!1!==e.meta?.selectedByDefault;n.push(Rg(e.id,t,e))}}),n}const Og=(0,oe.om)("table"),Ng=["bottom-end","bottom","top-end","top"];function Lg(e){function t(e,{width:t,sortable:n,filterable:r}={}){const i=f(e);function o({updateSettings:i,settings:o,columns:l,settingsPopupWidth:c,renderControls:u,defaultSettings:d,showResetButton:p,settingsFilterPlaceholder:h,settingsFilterEmptyMessage:f,filterSettings:m,...v}){const g=a.useMemo(()=>{if(d)return jg(l,d)},[l,d]),{t:w}=kg.useTranslation(),b=a.useMemo(()=>{const e=jg(l,o||[]);return wv(function(e,t){const n=t.map(({id:t,isSelected:n})=>({isSelected:n,columnSettings:e.find(e=>t===e.id)})).filter(({isSelected:e,columnSettings:t})=>e&&t).map(({columnSettings:e})=>e);e[0]&&e[0].id===mv&&n.unshift(e[0]);const r=e.at(-1);return r&&r.id===gv&&n.push(r),n}(l,e),a=>{a.name=()=>(0,s.jsx)("div",{className:Og("settings"),children:(0,s.jsx)(Eg,{popupWidth:c||t,popupPlacement:Ng,sortable:n,filterable:r,filterPlaceholder:h,filterEmptyMessage:f,filterSettings:m,onUpdate:i,items:e,renderSwitcher:({onClick:e})=>(0,s.jsx)(ft.$,{view:"flat",className:Og("settings-button"),"aria-label":w("label_settings"),onClick:e,children:(0,s.jsx)(pe.I,{data:Bv.A})}),renderControls:u,defaultItems:g,showResetButton:p})})})},[l,o,c,h,f,m,i,u,g,p,w]);return(0,s.jsx)(a.Fragment,{children:(0,s.jsx)(e,{...v,columns:b})})}return o.displayName=`withTableSettings(${i})`,o}return"function"==typeof e?t(e):n=>t(n,e)}const zg=JSON.parse('{"button_switcher":"Columns"}'),Tg=JSON.parse('{"button_switcher":"Колонки"}'),Ig=(0,Ne.N)({en:zg,ru:Tg},"TableColumnSetup"),Pg=(0,oe.om)("table-column-setup"),Bg=e=>{const{switcher:t,renderSwitcher:n,disabled:r,popupWidth:a,popupPlacement:i,className:o,items:l,sortable:c=!0,showStatus:u,onUpdate:d,hideApplyButton:p}=e,{t:h}=Ig.useTranslation(),f=()=>{if(!u)return null;const e=`${l.reduce((e,t)=>t.selected?e+1:e,0)}/${l.length}`;return(0,s.jsx)("span",{className:Pg("status"),children:e})},m=l.map(({id:e,title:t,required:n,selected:r,sticky:a})=>({id:e,title:t,isRequired:n,isSelected:r,sticky:a}));return(0,s.jsx)(Eg,{hideApplyButton:p,items:m,onUpdate:e=>{d(e.map(({id:e,isSelected:t})=>{const n=l.find(t=>t.id===e);return{id:e,selected:t,title:n?.title,required:n?.required}}))},popupPlacement:i,popupWidth:a,renderSwitcher:e=>n?.(e)||t||(0,s.jsxs)(ft.$,{disabled:r,onClick:e.onClick,children:[(0,s.jsx)(pe.I,{data:Bv.A}),h("button_switcher"),f()]}),sortable:c,className:Pg(null,o)})},_g=a.createContext(void 0);_g.displayName="TabContext";const Dg=({value:e,onUpdate:t,children:n})=>{const r=(0,P.u)(),i=a.useMemo(()=>({value:e,onUpdate:t,id:r,isProvider:!0}),[e,t,r]);return(0,s.jsx)(_g.Provider,{value:i,children:n})},Hg=(0,oe.om)("tab-list"),Vg=(0,oe.om)("tab"),Fg=(0,oe.om)("tab-panel"),qg="data-tab",Ug=e=>[...e.closest('[role="tablist"]')?.querySelectorAll(`[${qg}]`)??[]],$g=e=>Boolean(e.getAttribute("aria-disabled")),Wg=(e,t,n)=>{const r=e.target,a=Ug(r),i=a.indexOf(r);let o=1;for(;o{const n=e.target,r=Ug(n),a=t?0:r.length-1;let i=r.indexOf(n),o=n;for(;i!==a;){i+=t?-1:1;const e=r.at(i);e&&!$g(e)&&(o=e)}return o.focus(),o};const Kg=a.forwardRef((e,t)=>{const n=a.useContext(_g),r=(0,P.u)(),i=function(e){const t=a.useContext(_g),n="rtl"===M(),r=n=>{const r=(e=>e.getAttribute(qg))(n);e.activateOnFocus&&r&&(e.onUpdate?.(r),t?.onUpdate?.(r))},{value:i,onUpdate:o,size:l,activateOnFocus:s,qa:c,...u}=e;return{...u,role:"tablist","aria-orientation":"horizontal",onKeyDown:t=>{switch(t.code){case Ce.D.ARROW_LEFT:t.preventDefault(),r(Wg(t,!0,n));break;case Ce.D.ARROW_RIGHT:t.preventDefault(),r(Wg(t,!1,n));break;case Ce.D.HOME:t.preventDefault(),r(Gg(t,!0));break;case Ce.D.END:t.preventDefault(),r(Gg(t,!1))}e.onKeyDown?.(t)},className:Hg({size:e.size??"m"},e.className),"data-qa":e.qa}}(e),[o,l]=a.useState(!1),{focusWithinProps:c}=eh({onFocusWithinChange:l}),u=a.useMemo(()=>({value:n?.value??e.value,onUpdate:n?.onUpdate??e.onUpdate,id:n?.id??r,isProvider:n?.isProvider??!1,isFocused:o}),[n,e.value,e.onUpdate,r,o]);return(0,s.jsx)(_g.Provider,{value:u,children:(0,s.jsx)("div",{ref:t,...i,...c,children:e.children})})});Kg.displayName="TabList";const Zg=a.forwardRef(function(e,t){const n=function(e){const t=a.useContext(_g);if(!t)throw new Error(" must be used within ");const n=t.value,r=`${t.id}:t:${e.value}`,i=t.isProvider?`${t.id}:p:${e.value}`:void 0,o=n===e.value,l=e.disabled,s=t.isFocused,{value:c,icon:u,counter:d,label:p,disabled:h,href:f,component:m,qa:v,...g}=e;return{...g,role:"tab","aria-selected":o,"aria-disabled":l,"aria-controls":i,id:r,tabIndex:!o||l||s?-1:0,onClick:n=>{e.disabled||(e.onClick&&e.onClick(n),n.defaultPrevented||t.onUpdate?.(e.value))},onKeyDown:n=>{e.disabled||(e.onKeyDown&&e.onKeyDown(n),n.defaultPrevented||n.key!==Ce.D.SPACEBAR&&n.key!==Ce.D.ENTER||t.onUpdate?.(e.value))},className:Vg({active:o,disabled:l},e.className),"data-qa":e.qa,[qg]:e.value}}(e),r=(0,s.jsxs)("div",{className:Vg("content"),children:[e.icon&&(0,s.jsx)("div",{className:Vg("icon"),children:e.icon}),(0,s.jsx)("div",{className:Vg("title"),children:e.children||e.value}),void 0!==e.counter&&(0,s.jsx)("div",{className:Vg("counter"),children:e.counter}),e.label&&(0,s.jsx)(gp.J,{className:Vg("label"),theme:e.label.theme,children:e.label.content})]});return void 0!==e.component?a.createElement(e.component,{...n,ref:t}):void 0!==e.href?(0,s.jsx)("a",{...n,ref:t,href:e.href,rel:"_blank"!==e.target||e.rel?e.rel:"noopener noreferrer",children:r}):(0,s.jsx)("button",{...n,ref:t,type:e.type||"button",children:r})});Zg.displayName="Tab";const Yg=a.forwardRef((e,t)=>{const n=function(e){const t=a.useContext(_g);if(!t)throw new Error(" must be used within ");const n=t.value,r=t.id,i=`${r}:t:${e.value}`,o=`${r}:p:${e.value}`,l=n===e.value,{value:s,qa:c,...u}=e;return{...u,role:"tabpanel","aria-labelledby":i,id:o,className:Fg({hidden:!l},e.className),"data-qa":e.qa}}(e);return(0,s.jsx)(_g.Provider,{value:void 0,children:(0,s.jsx)("div",{ref:t,...n,children:e.children})})});Yg.displayName="TabPanel";class Qg{listeners;constructor(){this.listeners={}}destroy(){this.listeners={}}subscribe(e,t){return"function"==typeof t&&(this.listeners[e]=(this.listeners[e]||[]).concat(t)),()=>{this.listeners[e]=this.listeners[e]?.filter(e=>t!==e)}}notify(e,t){if(!this.listeners[e]?.length)return!1;for(const n of this.listeners[e])n(...t);return!0}}function Xg(e,t){return e.findIndex(e=>e.name===t)}function Jg(e,t){return-1!==Xg(e,t)}function ew(e,t){return Jg(e,t)?e.filter(e=>e.name!==t):e}class tw{hasUndelivered=!1;toasts=[];eventEmitter=new Qg;destroy(){this.removeAll(),this.eventEmitter.destroy()}add(e){let t=this.toasts;Jg(t,e.name)&&(t=ew(t,e.name)),this.toasts=[...t,{...e,addedAt:Date.now(),ref:{current:null}}],this.notify()}remove(e){this.toasts=ew(this.toasts,e),this.notify()}removeAll(){this.toasts=[],this.notify()}update(e,t){if(!Jg(this.toasts,e))return;const n=Xg(this.toasts,e);this.toasts=[...this.toasts.slice(0,n),{...this.toasts[n],...t},...this.toasts.slice(n+1)],this.notify()}has(e){return Jg(this.toasts,e)}subscribe(e){const t=this.eventEmitter.subscribe("toasts-change",e);return this.hasUndelivered&&this.notify(),t}notify(){const e=this.eventEmitter.notify("toasts-change",[this.toasts]);this.hasUndelivered=!e}}function nw(e,t){a.useEffect(()=>{if("number"!=typeof t)return;const n=setTimeout(()=>{e()},t);return()=>{clearTimeout(n)}},[e,t])}const rw=JSON.parse('{"label_close-button":"Close"}'),aw=JSON.parse('{"label_close-button":"Закрыть"}'),iw=(0,Ne.N)({en:rw,ru:aw},"Toaster"),ow=(0,oe.om)("toast"),lw=5e3,sw={normal:null,info:Ln.A,success:Tn.A,warning:Pn.A,danger:Pn.A,utility:_n.A};function cw({actions:e,onClose:t}){let n;if(Array.isArray(e)){if(n=e.map(({label:e,onClick:n,view:r="outlined",removeAfterClick:a=!0},i)=>(0,s.jsx)(ft.$,{onClick:()=>{n(),a&&t()},type:"button",size:"l",view:r,width:"auto",children:e},`${e}__${i}`)),!e.length)return null}else if(n=e?.(),!n)return null;return(0,s.jsx)("div",{className:ow("actions"),children:n})}const uw=a.forwardRef(function(e,t){const{name:n,content:r,actions:i,title:o,className:l,theme:c="normal",renderIcon:u,autoHiding:d=lw,isClosable:p=!0,mobile:h=!1,onClose:f,removeCallback:m}=e,v=a.useCallback(()=>{m(n),f&&f()},[m,f,n]),g=function({onClose:e,timeout:t}){const[n,r,i]=function(){const[e,t]=a.useState(!1);return[a.useCallback(()=>{t(!0)},[]),a.useCallback(()=>{t(!1)},[]),e]}();return nw(e,i?null:t),{onMouseOver:n,onMouseLeave:r}}({onClose:v,timeout:"number"==typeof d?d:void 0}),w={mobile:h,theme:c},b=Boolean(o),y=Boolean(r),{t:x}=iw.useTranslation(),C=u?u(e):function({theme:e}){return e&&sw[e]?(0,s.jsx)(pe.I,{data:sw[e],size:20,className:ow("icon",{[e]:!0})}):null}({theme:c});return(0,s.jsxs)("div",{ref:t,className:ow(w,l),...g,"data-toast":!0,children:[C&&(0,s.jsx)("div",{className:ow("icon-container"),children:C}),(0,s.jsxs)("div",{className:ow("container"),children:[b&&(0,s.jsx)("h3",{className:ow("title"),children:o}),p&&(0,s.jsx)(ft.$,{size:"s",view:"flat",className:ow("btn-close"),onClick:v,"aria-label":x("label_close-button"),children:(0,s.jsx)(pe.I,{data:ht.A})}),y&&(0,s.jsx)("div",{className:ow("content",{"without-title":!b}),children:r}),cw({actions:i,onClose:v})]})]})}),dw=a.createContext(null);function pw(){const e=a.useContext(dw);if(null===e)throw new Error("Toaster: `useToaster` hook is used out of context");return a.useMemo(()=>({add:e.add.bind(e),remove:e.remove.bind(e),removeAll:e.removeAll.bind(e),update:e.update.bind(e),has:e.has.bind(e)}),[e])}function hw(){return function(e){function t(t){const n=pw();return(0,s.jsx)(e,{...t,toaster:n})}return t.displayName=`WithToaster(${f(e)})`,t}}dw.displayName="ToasterContext";const fw=a.createContext([]);function mw(e,t){var n=Object.create(null);return e&&a.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,a.isValidElement)(e)?t(e):e}(e)}),n}function vw(e,t,n){return null!=n[t]?n[t]:e.props[t]}function gw(e,t,n){var r=mw(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,a=Object.create(null),i=[];for(var o in e)o in t?i.length&&(a[o]=i,i=[]):i.push(o);var l={};for(var s in t){if(a[s])for(r=0;r(0,s.jsx)(ie,{nodeRef:e.ref,classNames:n?Cw:xw,addEndListener:t=>e.ref?.current?.addEventListener("animationend",t),onEnter:()=>Sw(e),onExit:()=>Sw(e),children:(0,s.jsx)(uw,{...e,mobile:n,removeCallback:r})},`${e.name}_${e.addedAt}`))})}function Sw(e){e.ref?.current&&e.ref.current.style.setProperty("--_--item-height",`${e.ref.current.offsetHeight}px`)}const Aw=(0,oe.om)("toaster");function kw({className:e,mobile:t,hasPortal:n=!0}){const r=p(),{remove:i}=pw(),o=a.useContext(fw),l=(0,s.jsx)(Ew,{toasts:o,removeCallback:i,mobile:t??r});return n?(0,s.jsx)(tt.Z,{children:(0,s.jsx)("div",{className:Aw({mobile:t??r},e),"aria-live":"assertive",children:l})}):l}kw.displayName="ToasterComponent";const Mw=({toaster:e,children:t})=>{const[n,r]=a.useState([]);return a.useEffect(()=>{const t=e.subscribe(r);return()=>{t()}},[e]),(0,s.jsx)(dw.Provider,{value:e,children:(0,s.jsx)(fw.Provider,{value:n,children:t})})};Mw.displayName="ToasterProvider";const Rw=(0,oe.om)("toc-item"),jw=e=>{const{active:t=!1,childItem:n=!1,content:r,href:a,onClick:i,depth:o}=e,{onKeyDown:l}=(0,Et.N)(i),c=void 0===a?(0,s.jsx)("div",{role:"button",tabIndex:0,className:Rw("section-link"),onClick:i,onKeyDown:l,children:r}):(0,s.jsx)("a",{href:a,onClick:i,className:Rw("section-link"),children:r});return(0,s.jsx)("div",{className:Rw("section",{child:n,depth:o,active:t}),children:c})},Ow=(0,oe.om)("toc");function Nw(e){const{value:t,items:n,onUpdate:r,childItem:a,depth:i=1,onItemClick:o}=e;return i>6?null:(0,s.jsx)("ul",{className:Ow("sections"),children:n.map(({value:e,content:n,href:l,items:c})=>(0,s.jsxs)("li",{"aria-current":t===e,children:[(0,s.jsx)(jw,{content:n,href:l,active:t===e,onClick:t=>{o?.(t),void 0!==e&&r&&r?.(e)},childItem:a,depth:i}),c&&c.length>0&&(0,s.jsx)(Nw,{items:c,onUpdate:r,childItem:!0,depth:i+1,value:t})]},e??l))})}const Lw=(0,oe.om)("toc"),zw=a.forwardRef(function(e,t){const{value:n,items:r,className:a,onUpdate:i,qa:o,onItemClick:l}=e;return(0,s.jsx)("nav",{className:Lw(null,a),ref:t,"data-qa":o,children:(0,s.jsx)(Nw,{items:r,value:n,onUpdate:i,depth:1,onItemClick:l})})}),Tw="m",Iw=new Set(["xs","2xs","3xs"]),Pw={NAME:"user-name",DESCRIPTION:"user-description"},Bw=(0,oe.om)("user"),_w=a.forwardRef((e,t)=>{const{avatar:n,name:r,description:i,size:o=Tw,className:l,style:c,qa:u}=e,d="string"==typeof r?r:void 0,p="string"==typeof i?i:void 0;let h=null;"string"==typeof n?h=(0,s.jsx)(Xn,{imgUrl:n,size:o,title:d}):a.isValidElement(n)?h=n:n&&(h=(0,s.jsx)(Xn,{...n,size:o,title:n.title||d}));const f=Boolean(i&&!Iw.has(o));return(0,s.jsxs)("div",{className:Bw({size:o},l),style:c,"data-qa":u,ref:t,...(0,Pe.$)(e,{labelable:!0}),children:[h?(0,s.jsx)("div",{className:Bw("avatar"),children:h}):null,r||f?(0,s.jsxs)("div",{className:Bw("info"),children:[r?(0,s.jsx)("span",{className:Bw("name"),title:d,"data-qa":Pw.NAME,children:r}):null,f?(0,s.jsx)("span",{className:Bw("description"),title:p,"data-qa":Pw.DESCRIPTION,children:i}):null]}):null]})});_w.displayName="User";const Dw="s",Hw=new Set(["m","s","xs","2xs","3xs"]),Vw="var(--g-color-line-generic-solid)",Fw={"3xs":12,"2xs":12,xs:12,s:16,m:16,l:16,xl:16};var qw=n(37881);const Uw=JSON.parse('{"label_remove-button":"Remove"}'),$w=JSON.parse('{"label_remove-button":"Удалить"}'),Ww=(0,Ne.N)({en:Uw,ru:$w},`${oe.CU}user-label`),Gw=(0,oe.om)("user-label"),Kw=a.forwardRef(({type:e="person",view:t="outlined",size:n=Dw,avatar:r,text:i,description:o,onClick:l,onCloseClick:c,className:u,style:d,qa:p},h)=>{const f=Boolean(l),m=Boolean(c),v=f?"button":"div";let g,w=null;switch("string"==typeof r?g={imgUrl:r}:r&&!a.isValidElement(r)?"imgUrl"in r&&r.imgUrl||"icon"in r&&r.icon||"text"in r&&r.text?g=r:"string"==typeof i&&(g={text:i,borderColor:Vw,...r}):r||"string"!=typeof i||(g={text:i,borderColor:Vw}),e){case"email":w=(0,s.jsx)(Xn,{icon:qw.A,...g,size:n});break;case"empty":w=null;break;default:a.isValidElement(r)?w=r:g&&(w=(0,s.jsx)(Xn,{...g,size:n}))}const b=Boolean(o&&!Hw.has(n)),{t:y}=Ww.useTranslation();return(0,s.jsxs)("div",{className:Gw({view:t,size:n,empty:!w,clickable:f,closeable:m},u),style:d,"data-qa":p,ref:h,children:[(0,s.jsxs)(v,{className:Gw("main"),type:f?"button":void 0,onClick:l,children:[w?(0,s.jsx)("div",{className:Gw("avatar"),children:w}):null,(0,s.jsxs)("div",{className:Gw("info"),children:[(0,s.jsx)("span",{className:Gw("text"),children:i}),b?(0,s.jsx)("span",{className:Gw("description"),children:o}):null]})]}),c?(0,s.jsx)("button",{className:Gw("close"),type:"button","aria-label":y("label_remove-button"),onClick:c,children:(0,s.jsx)(pe.I,{className:Gw("close-icon"),data:ht.A,size:Fw[n]})}):null]})});Kw.displayName="UserLabel";const Zw=(0,oe.om)("text-area");function Yw(e){const{name:t,id:n,tabIndex:r,autoComplete:i,placeholder:o,value:l,defaultValue:c,controlRef:u,controlProps:d,size:p,rows:h,minRows:f=1,maxRows:m,autoFocus:v,disabled:g,readOnly:w,onChange:b,onFocus:y,onBlur:x,onKeyDown:C,onKeyUp:E,onKeyPress:S}=e,A=a.useRef(null),k=(0,Xe.N)(u,A),M=Math.max(h||f,1),R=l||A?.current?.value,j=a.useCallback(()=>{const e=A?.current,t=e?.parentElement;if(e&&t&&!h){const n=getComputedStyle(e),r=parseInt(n.getPropertyValue("line-height"),10),a=parseInt(n.getPropertyValue("padding-top"),10),i=parseInt(n.getPropertyValue("padding-bottom"),10),o=(R?.match(/\n/g)||[]).length+1,l=t.style.height;t.style.height=`${t.offsetHeight}px`,e.style.height=`${r+a+i}px`;const s=e.style.overflow;e.style.overflow="hidden";const c=(e=>{const{height:t,lineHeight:n}=e;return(t-(Number.isNaN(e.paddingTop)?0:e.paddingTop)-(Number.isNaN(e.paddingBottom)?0:e.paddingBottom))/n})({height:e.scrollHeight,paddingTop:a,paddingBottom:i,lineHeight:r}),u=Math.max(c,o);e.style.height=m&&mu?`${Math.min(f,m||1/0)*r+a+i}px`:`${e.scrollHeight}px`,e.style.overflow=s,t.style.height=l}},[h,m,f,R]);return(0,pr.w)({ref:h?void 0:A,onResize:j}),a.useEffect(()=>{j()},[j,p,l]),(0,s.jsx)("textarea",{...d,ref:k,style:{...d.style,height:h?"auto":void 0},className:Zw("control",d.className),name:t,id:n,tabIndex:r,placeholder:o,value:l,defaultValue:c,rows:M,autoFocus:v,autoComplete:i,onChange:b,onFocus:y,onBlur:x,onKeyDown:C,onKeyUp:E,onKeyPress:S,disabled:g??d.disabled,readOnly:w??d.readOnly})}const Qw=(0,oe.om)("text-area"),Xw=a.forwardRef(function(e,t){const{view:n="normal",size:r="m",pin:i="round-round",name:o,value:l,defaultValue:c,disabled:u,readOnly:d,hasClear:p=!1,error:h,errorMessage:f,validationState:m,autoComplete:v,id:g,tabIndex:w,style:b,className:y,qa:x,controlProps:C,note:E,onUpdate:S,onChange:A}=e,{errorMessage:k,validationState:M}=Ad({error:h,errorMessage:f,validationState:m}),[R,j]=L(l,c??"",S),O=a.useRef(null),N=Or({initialValue:R,onReset:j}),z=(0,Xe.N)(e.controlRef,O,N),[T,I]=a.useState(!1),B=Sd(M),_=(0,P.u)(),D="invalid"===M&&Boolean(k),H=Boolean(p&&!u&&!d&&R),V=g||_,F=(0,P.u)(),q=(0,P.u)(),U=[C?.["aria-describedby"],E?q:void 0,D?F:void 0].filter(Boolean).join(" "),$={id:V,tabIndex:w,name:o,onChange(e){j(e.target.value),A&&A(e)},autoComplete:Ed(v),controlProps:{...C,"aria-describedby":U||void 0,"aria-invalid":"invalid"===M||void 0}};return a.useEffect(()=>{const e=O.current;if(e){const t=e.scrollHeight>e.clientHeight;T!==t&&I(t)}},[R,T]),(0,s.jsxs)("span",{ref:t,style:b,className:Qw({view:n,size:r,disabled:u,state:B,pin:"clear"===n?void 0:i,"has-clear":H,"has-scrollbar":T},y),"data-qa":x,children:[(0,s.jsxs)("span",{className:Qw("content"),children:[(0,s.jsx)(Yw,{...e,...$,controlRef:z}),H&&(0,s.jsx)(Cd,{className:Qw("clear",{size:r}),size:xd(r),onClick:e=>{const t=O.current;if(t){t.focus();const n=Object.create(e);n.target=t,n.currentTarget=t,t.value="",A&&A(n)}j("")}})]}),(0,s.jsx)(Md,{errorMessage:D?k:null,errorMessageId:F,note:E,noteId:q})]})});var Jw=n(3119),eb=n(59164);const tb=JSON.parse('{"label_show-password":"Show password","label_hide-password":"Hide password"}'),nb=JSON.parse('{"label_show-password":"Показать пароль","label_hide-password":"Скрыть пароль"}'),rb=(0,Ne.N)({en:tb,ru:nb},"PasswordInput"),ab=(0,oe.om)("password-input"),ib=e=>{const{autoComplete:t,controlProps:n,endContent:r,hideCopyButton:i=!1,hideRevealButton:o=!1,showCopyTooltip:l=!1,showRevealTooltip:c=!1,size:u="m"}=e,[d,p]=L(e.value,e.defaultValue??"",e.onUpdate),[h,f]=L(e.revealValue,!1,e.onRevealValueUpdate),{actionButtonSize:m,iconSize:v}=(e=>{let t="s",n=16;switch(e){case"s":t="xs",n=12;break;case"l":t="m";break;case"xl":t="l"}return{actionButtonSize:t,iconSize:n}})(u),{t:g}=rb.useTranslation(),w=(0,s.jsxs)(a.Fragment,{children:[r,!d||i||e.disabled?null:(0,s.jsx)(Gr,{view:"flat-secondary",text:d,hasTooltip:l,size:m,className:ab("copy-button"),qa:"copy-button"}),o?null:(0,s.jsx)(pt,{disabled:!c,title:g(h?"label_hide-password":"label_show-password"),children:(0,s.jsx)(ft.$,{qa:"reveal-button",view:"flat-secondary",disabled:e.disabled,onClick:()=>f(!h),size:m,onMouseDown:e=>e.preventDefault(),"aria-label":g(h?"label_hide-password":"label_show-password"),children:(0,s.jsx)(pe.I,{data:h?Jw.A:eb.A,size:v})})})]});return(0,s.jsx)(zd,{...e,type:h?"text":"password",endContent:w,autoComplete:t||"new-password",controlProps:{...n,className:ab("input-control",n?.className)},value:d,onUpdate:p})},ob=(0,oe.om)("col"),lb=({size:e,children:t,style:n,className:r,qa:a,...i})=>{const{getClosestMediaProps:o}=xn();let l,c;Array.isArray(e)?[c,l]=e:"object"==typeof e?l=e||i:(c=e,l=i);const u=o(l);return(0,s.jsx)("div",{style:n,className:ob({size:void 0===u?c:pn(u)},r),"data-qa":a,children:t})},sb=(0,oe.om)("row"),cb=({children:e,style:t,className:n,space:r,spaceRow:a,qa:i})=>{const{getClosestMediaProps:o}=xn();let l,c;if("object"==typeof r){const e=o(r);void 0!==e&&(l=pn(e))}else void 0!==r&&(l=pn(r));if("object"==typeof a){const e=o(a);void 0!==e&&(c=pn(e))}else void 0!==a&&(c=String(a));return(0,s.jsx)("div",{style:t,className:sb({s:l,sr:c},n),"data-qa":i,children:e})},ub=({gutters:e,spaceRow:t,space:n}={})=>{const r={};return e&&(r.gutters=e),(t||n)&&(r.spaceRow=t||n),r},db=(0,oe.om)("container"),pb=({children:e,style:t,as:n="div",className:r,maxWidth:i,gutters:o,spaceRow:l,qa:c})=>{const{getClosestMediaProps:u,containerThemeProps:d,breakpoints:p}=(()=>{const{theme:e,getClosestMediaProps:t}=xn(),n=a.useMemo(()=>({...ub(e.components?.container),...ub(t(e.components?.container?.media))}),[t,e]);return{getClosestMediaProps:t,containerThemeProps:n,breakpoints:e.breakpoints}})(),h={...i?{maxWidth:p[i]}:{},...t};let f;if("object"==typeof l){const e=u(l);e&&(f=pn(e))}else void 0!==l&&(f=pn(l));return(0,s.jsx)(n,{style:h,className:db({sr:f},!1===o?r:mn({px:o??d.gutters},r)),"data-qa":c,children:e})};function hb(e){const t=e.split("_").filter(e=>e);return e.includes("__")?{block:t[0],element:t[1],mod:t[2]?{key:t[2],value:!t[3]||t[3]}:void 0}:{block:t[0],mod:t[1]?{key:t[1],value:!t[2]||t[2]}:void 0}}function fb(e){let t=e.block;return e.element&&(t=`${t}__${e.element}`),e.mod?.value&&(t=`${t}_${e.mod.key}`,"string"==typeof e.mod.value&&(t=`${t}_${e.mod.value}`)),t}function mb(e,t=Ot.o){a.useEffect(()=>(t.subscribe(e),()=>t.unsubscribe(e)),[t,e])}function vb(e,t,n){const r=`withEventBroker(${f(e)})`,i=a.forwardRef((r,a)=>{const i=t.reduce((e,t)=>{const a=r[t];return{...e,[t]:e=>(Ot.o.publish({eventId:t.replace(/^on/,"").toLowerCase(),domEvent:e,...n}),a&&a(e))}},{});return(0,s.jsx)(e,{...r,...i,ref:a})});return i.displayName=r,i}var gb=n(10774),wb=n(88506),bb=n(18922);function yb(e=e=>e){return(t,n)=>t.mod?void 0:e(t,n)}function xb(e,t){if(!e||!function(e){return e.nodeType===Node.ELEMENT_NODE}(e))return"";const n=e.tagName.toLowerCase();let r=`/${n}`;const a=e.id&&!t.withoutId?t.idConverter(e.id):void 0;if(a)r+=`[@id='${a}']`;else{const a=[];e.classList.forEach(e=>{const r=t.classConverter({...hb(e),tag:n},e);r&&a.push(fb(r))}),a.length&&(r+=`[@class='${a.join(" ")}']`)}return xb(e.parentElement,t)+r}const Cb={classConverter:e=>e,idConverter:e=>e,withoutId:!1};function Eb(e,t){const n={...Cb,...t||{}},r=xb(e.currentTarget||e.target,n);return{xpath:r,hash:bb(r)}}function Sb({handler:e}){const[t,n]=a.useState(!1);return{isLoading:t,handler:a.useCallback(async(...t)=>{n(!0);try{return await e(...t)}finally{n(!1)}},[e])}}const Ab={light:{lightness:[55,60],chroma:[20,25]},dark:{lightness:[75,80],chroma:[12,17]}},kb=(e,t,n)=>{const r=Math.abs(e);return Math.floor(r%(n-t+1)+t)},Mb=(e,t)=>{let n=e^2654435769*t;return n^=n>>>16,n=Math.imul(n,2246822507),n^=n>>>13,n=Math.imul(n,3266489909),n^=n>>>16,n>>>0},Rb=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,jb=(e,t,n)=>{const r=(e=>{let t=2166136261;const n=e.length;t^=n,t=Math.imul(t,16777619);for(let r=0;r>>16,t=Math.imul(t,2246822507),t^=t>>>13,t=Math.imul(t,3266489909),t^=t>>>16,t=Math.imul(t,668265261),t^=t>>>15,0|t})(e),a=(e=>Math.abs(e)%36e3/100)(r),i=Mb(r,0),o=Mb(r,1),l=kb(i,n[0],n[1]),s=kb(o,t[0],t[1]),[c,u,d]=((e,t,n)=>{const r=n*Math.PI/180,a=t*Math.cos(r),i=t*Math.sin(r),o=e+.3963377774*a+.2158037573*i,l=e-.1055613458*a-.0638541728*i,s=e-.0894841775*a-1.291485548*i,c=o*o*o,u=l*l*l,d=s*s*s,p=4.0767416621*c-3.3077115913*u+.2309699292*d,h=-1.2684380046*c+2.6097574011*u-.3413193965*d,f=-.0041960863*c-.7034186147*u+1.707614701*d;return[Math.max(0,Math.min(255,Math.round(255*Rb(p)))),Math.max(0,Math.min(255,Math.round(255*Rb(h)))),Math.max(0,Math.min(255,Math.round(255*Rb(f))))]})(s/100,l/100,a);return{hash:r,oklch:{l:s,c:l,h:a},rgb:{r:c,g:u,b:d},textColor:"var(--g-color-text-inverted-primary)"}},Ob=({seed:e,theme:t})=>{const{lightness:n,chroma:r}=Ab[t];return jb(e,n,r)},Nb=({seed:e,lightnessRange:t,chromaRange:n})=>jb(e,t,n);function Lb({seed:e}){const t=k();return a.useMemo(()=>Ob({seed:e,theme:t}),[e,t])}function zb({onUpdate:e,onChange:t}){const n=a.useRef(null),r=a.useCallback(n=>{t?.(n),e?.(Array.from(n.target.files||[])),n.target.value=""},[t,e]),i=a.useCallback(()=>{n.current?.click()},[]);return a.useMemo(()=>({controlProps:{ref:n,type:"file",tabIndex:-1,style:{opacity:0,position:"absolute",width:1,height:1},onChange:r,"aria-hidden":!0},triggerProps:{onClick:i}}),[r,i])}var Tb=n(61185),Ib=n(87030);const Pb=({ref:e,handler:t})=>{a.useEffect(()=>{const n=n=>{const r=e?.current;r&&!r.contains(n.target)&&t&&t(n)};return window.addEventListener("mouseup",n,{capture:!0}),window.addEventListener("touchend",n,{capture:!0}),()=>{window.removeEventListener("mouseup",n,{capture:!0}),window.removeEventListener("touchend",n,{capture:!0})}},[t,e])};var Bb=n(39731),_b=n(47048);const Db=()=>({width:window?.visualViewport?.width??window?.innerWidth??void 0,height:window?.visualViewport?.height??window?.innerHeight??void 0}),Hb=()=>{const[e,t]=a.useState(Db());return a.useEffect(()=>{const n=()=>{let n=Db();n.width===e?.width&&n.height===e?.height&&(n=e),t(n)};return(window.visualViewport??window).addEventListener("resize",n),()=>{(window.visualViewport??window).removeEventListener("resize",n)}},[e]),e},Vb={top:0,right:0,bottom:0,left:0};function Fb(e={}){const{rect:t,contextElement:n}=e,r=a.useRef(Vb),i=a.useRef({contextElement:n,getBoundingClientRect(){const{top:e,right:t,bottom:n,left:a}=r.current;return{top:e,right:t,bottom:n,left:a,width:t-a,height:n-e}}});if(i.current.contextElement=n,t){const{top:e=0,left:n=0,right:a=n,bottom:i=e}=t;r.current={top:e,right:a,bottom:i,left:n}}else r.current=Vb;return i}function qb(e){const t=a.useRef(e),[n,r]=a.useState({getBoundingClientRect(){const{top:e=0,left:n=0,right:r=n,bottom:a=e}=t.current;return{top:e,left:n,bottom:a,right:r,width:r-n,height:a-e}},contextElement:void 0}),i=a.useCallback(e=>{r({getBoundingClientRect(){const{top:e=0,left:n=0,right:r=n,bottom:a=e}=t.current;return{top:e,left:n,bottom:a,right:r,width:r-n,height:a-e}},contextElement:e??void 0})},[]),{top:o,left:l,bottom:s,right:c}=e;return a.useEffect(()=>{t.current={top:o,left:l,bottom:s,right:c}},[o,l,s,c]),{anchor:n,setContextElement:i}}function Ub(){return"undefined"!=typeof window&&("undefined"!=typeof navigator&&navigator.maxTouchPoints>0||!(!window.matchMedia||!window.matchMedia("(any-pointer:coarse)").matches)||"ontouchstart"in window)}},4901:(e,t,n)=>{var r=n(72552),a=n(30294),i=n(40346),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&a(e.length)&&!!o[r(e)]}},5273:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.488 3.43a.75.75 0 0 1 .081 1.058l-6 7a.75.75 0 0 1-1.1.042l-3.5-3.5A.75.75 0 0 1 4.03 6.97l2.928 2.927 5.473-6.385a.75.75 0 0 1 1.057-.081",clipRule:"evenodd"}))},5338:(e,t,n)=>{"use strict";var r=n(40961);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},5556:(e,t,n)=>{e.exports=n(2694)()},5861:(e,t,n)=>{var r=n(55580),a=n(68223),i=n(32804),o=n(76545),l=n(28303),s=n(72552),c=n(47473),u="[object Map]",d="[object Promise]",p="[object Set]",h="[object WeakMap]",f="[object DataView]",m=c(r),v=c(a),g=c(i),w=c(o),b=c(l),y=s;(r&&y(new r(new ArrayBuffer(1)))!=f||a&&y(new a)!=u||i&&y(i.resolve())!=d||o&&y(new o)!=p||l&&y(new l)!=h)&&(y=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case m:return f;case v:return u;case g:return d;case w:return p;case b:return h}return t}),e.exports=y},6147:e=>{function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function n(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,r,a){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");"function"==typeof r&&(a=r,r={}),r=r||{},a=a||function(){},o.type=r.type||"text/javascript",o.charset=r.charset||"utf8",o.async=!("async"in r)||!!r.async,o.src=e,r.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(o,r.attrs),r.text&&(o.text=""+r.text),("onload"in o?t:n)(o,a),o.onload||t(o,a),i.appendChild(o)}},6156:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},6188:e=>{"use strict";e.exports=Math.max},6549:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},6754:(e,t,n)=>{"use strict";n.r(t)},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7020:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 4.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M9.5 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0 5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0",clipRule:"evenodd"}))},7176:(e,t,n)=>{"use strict";var r,a=n(73126),i=n(75795);try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var o=!!r&&i&&i(Object.prototype,"__proto__"),l=Object,s=l.getPrototypeOf;e.exports=o&&"function"==typeof o.get?a([o.get]):"function"==typeof s&&function(e){return s(null==e?e:l(e))}},7350:(e,t,n)=>{var r=n(38221),a=n(23805);e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return a(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),r(e,t,{leading:i,maxWait:t,trailing:o})}},7463:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,a=e[r];if(!(0>>1;ri(s,n))ci(u,s)?(e[r]=u,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else{if(!(ci(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var c=[],u=[],d=1,p=null,h=3,f=!1,m=!1,v=!1,g="function"==typeof setTimeout?setTimeout:null,w="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var t=r(u);null!==t;){if(null===t.callback)a(u);else{if(!(t.startTime<=e))break;a(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function x(e){if(v=!1,y(e),!m)if(null!==r(c))m=!0,z(C);else{var t=r(u);null!==t&&T(x,t.startTime-e)}}function C(e,n){m=!1,v&&(v=!1,w(k),k=-1),f=!0;var i=h;try{for(y(n),p=r(c);null!==p&&(!(p.expirationTime>n)||e&&!j());){var o=p.callback;if("function"==typeof o){p.callback=null,h=p.priorityLevel;var l=o(p.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?p.callback=l:p===r(c)&&a(c),y(n)}else a(c);p=r(c)}if(null!==p)var s=!0;else{var d=r(u);null!==d&&T(x,d.startTime-n),s=!1}return s}finally{p=null,h=i,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,A=null,k=-1,M=5,R=-1;function j(){return!(t.unstable_now()-Re||125o?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(v?(w(k),k=-1):v=!0,T(x,i-o))):(e.sortIndex=l,n(c,e),m||f||(m=!0,z(C))),e},t.unstable_shouldYield=j,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},7604:(e,t,n)=>{var r,a=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,u=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of l(t))c.call(e,a)||a===n||i(e,a,{get:()=>t[a],enumerable:!(r=o(t,a))||r.enumerable});return e},d={};((e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})})(d,{defaultProps:()=>S,propTypes:()=>C}),e.exports=(r=d,u(i({},"__esModule",{value:!0}),r));var p=((e,t,n)=>(n=null!=e?a(s(e)):{},u(e&&e.__esModule?n:i(n,"default",{value:e,enumerable:!0}),e)))(n(5556));const{string:h,bool:f,number:m,array:v,oneOfType:g,shape:w,object:b,func:y,node:x}=p.default,C={url:g([h,v,b]),playing:f,loop:f,controls:f,volume:m,muted:f,playbackRate:m,width:g([h,m]),height:g([h,m]),style:b,progressInterval:m,playsinline:f,pip:f,stopOnUnmount:f,light:g([f,h,b]),playIcon:x,previewTabIndex:m,previewAriaLabel:h,fallback:x,oEmbedUrl:h,wrapper:g([h,y,w({render:y.isRequired})]),config:w({soundcloud:w({options:b}),youtube:w({playerVars:b,embedOptions:b,onUnstarted:y}),facebook:w({appId:h,version:h,playerId:h,attributes:b}),dailymotion:w({params:b}),vimeo:w({playerOptions:b,title:h}),mux:w({attributes:b,version:h}),file:w({attributes:b,tracks:v,forceVideo:f,forceAudio:f,forceHLS:f,forceSafariHLS:f,forceDisableHls:f,forceDASH:f,forceFLV:f,hlsOptions:b,hlsVersion:h,dashVersion:h,flvVersion:h}),wistia:w({options:b,playerId:h,customControls:v}),mixcloud:w({options:b}),twitch:w({options:b,playerId:h}),vidyard:w({options:b})}),onReady:y,onStart:y,onPlay:y,onPause:y,onBuffer:y,onBufferEnd:y,onEnded:y,onError:y,onDuration:y,onSeek:y,onPlaybackRateChange:y,onPlaybackQualityChange:y,onProgress:y,onClickPreview:y,onEnablePIP:y,onDisablePIP:y},E=()=>{},S={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,previewAriaLabel:"",oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:E},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},mux:{attributes:{},version:"2"},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:E,onStart:E,onPlay:E,onPause:E,onBuffer:E,onBufferEnd:E,onEnded:E,onError:E,onDuration:E,onSeek:E,onPlaybackRateChange:E,onPlaybackQualityChange:E,onProgress:E,onClickPreview:E,onEnablePIP:E,onDisablePIP:E}},8423:(e,t,n)=>{"use strict";n.r(t),n.d(t,{customAlphabet:()=>r,nanoid:()=>a});let r=(e,t=21)=>(n=t)=>{let r="",a=0|n;for(;a--;)r+=e[Math.random()*e.length|0];return r},a=(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}},9325:(e,t,n)=>{var r=n(34840),a="object"==typeof self&&self&&self.Object===Object&&self,i=r||a||Function("return this")();e.exports=i},9655:function(e,t,n){var r;e=n.nmd(e),function(){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof n.g&&n.g;a.global!==a&&a.window!==a&&a.self;var i,o=2147483647,l=36,s=/^xn--/,c=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,h=String.fromCharCode;function f(e){throw new RangeError(d[e])}function m(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function v(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+m((e=e.replace(u,".")).split("."),t).join(".")}function g(e){for(var t,n,r=[],a=0,i=e.length;a=55296&&t<=56319&&a65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+h(e)}).join("")}function b(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:l}function y(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=l)e=p(e/35);return p(r+36*e/(e+38))}function C(e){var t,n,r,a,i,s,c,u,d,h,m=[],v=e.length,g=0,y=128,C=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&f("not-basic"),m.push(e.charCodeAt(r));for(a=n>0?n+1:0;a=v&&f("invalid-input"),((u=b(e.charCodeAt(a++)))>=l||u>p((o-g)/s))&&f("overflow"),g+=u*s,!(u<(d=c<=C?1:c>=C+26?26:c-C));c+=l)s>p(o/(h=l-d))&&f("overflow"),s*=h;C=x(g-i,t=m.length+1,0==i),p(g/t)>o-y&&f("overflow"),y+=p(g/t),g%=t,m.splice(g++,0,y)}return w(m)}function E(e){var t,n,r,a,i,s,c,u,d,m,v,w,b,C,E,S=[];for(w=(e=g(e)).length,t=128,n=0,i=72,s=0;s=t&&vp((o-n)/(b=r+1))&&f("overflow"),n+=(c-t)*b,t=c,s=0;so&&f("overflow"),v==t){for(u=n,d=l;!(u<(m=d<=i?1:d>=i+26?26:d-i));d+=l)E=u-m,C=l-m,S.push(h(y(m+E%C,0))),u=p(E/C);S.push(h(y(u,0))),i=x(n,b,r==a),n=0,++r}++n,++t}return S.join("")}i={version:"1.4.1",ucs2:{decode:g,encode:w},decode:C,encode:E,toASCII:function(e){return v(e,function(e){return c.test(e)?"xn--"+E(e):e})},toUnicode:function(e){return v(e,function(e){return s.test(e)?C(e.slice(4).toLowerCase()):e})}},void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},9957:(e,t,n)=>{"use strict";var r=Function.prototype.call,a=Object.prototype.hasOwnProperty,i=n(66743);e.exports=i.call(r,a)},9999:(e,t,n)=>{var r=n(37217),a=n(83729),i=n(16547),o=n(74733),l=n(43838),s=n(93290),c=n(23007),u=n(92271),d=n(48948),p=n(50002),h=n(83349),f=n(5861),m=n(76189),v=n(77199),g=n(35529),w=n(56449),b=n(3656),y=n(87730),x=n(23805),C=n(38440),E=n(95950),S=n(37241),A="[object Arguments]",k="[object Function]",M="[object Object]",R={};R[A]=R["[object Array]"]=R["[object ArrayBuffer]"]=R["[object DataView]"]=R["[object Boolean]"]=R["[object Date]"]=R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Map]"]=R["[object Number]"]=R[M]=R["[object RegExp]"]=R["[object Set]"]=R["[object String]"]=R["[object Symbol]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R["[object Error]"]=R[k]=R["[object WeakMap]"]=!1,e.exports=function e(t,n,j,O,N,L){var z,T=1&n,I=2&n,P=4&n;if(j&&(z=N?j(t,O,N,L):j(t)),void 0!==z)return z;if(!x(t))return t;var B=w(t);if(B){if(z=m(t),!T)return c(t,z)}else{var _=f(t),D=_==k||"[object GeneratorFunction]"==_;if(b(t))return s(t,T);if(_==M||_==A||D&&!N){if(z=I||D?{}:g(t),!T)return I?d(t,l(z,t)):u(t,o(z,t))}else{if(!R[_])return N?t:{};z=v(t,_,T)}}L||(L=new r);var H=L.get(t);if(H)return H;L.set(t,z),C(t)?t.forEach(function(r){z.add(e(r,n,j,r,t,L))}):y(t)&&t.forEach(function(r,a){z.set(a,e(r,n,j,a,t,L))});var V=B?void 0:(P?I?h:p:I?S:E)(t);return a(V||t,function(r,a){V&&(r=t[a=r]),i(z,a,e(r,n,j,a,t,L))}),z}},10037:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof navigator&&navigator.clipboard?.writeText)try{return navigator.clipboard.writeText(e)}catch(t){return"undefined"==typeof document?Promise.reject(t):a(e)}return"undefined"!=typeof document?a(e):Promise.reject(new Error("Neither navigator.clipboard nor document is available"))}async function a(e){const t=document.activeElement;try{const t=document.createElement("textarea");if(t.setAttribute("aria-hidden","true"),t.style.all="unset",t.style.position="absolute",t.style.left="1000%",t.style.whiteSpace="pre",t.style.userSelect="text",t.value=e,document.body.append(t),t.select(),!document.execCommand("copy"))throw new Error('Failed to copy text with document.execCommand("copy")');document.body.removeChild(t)}finally{t&&"focus"in t&&"function"==typeof t.focus&&t.focus()}}n.d(t,{D:()=>r})},10076:e=>{"use strict";e.exports=Function.prototype.call},10124:(e,t,n)=>{var r=n(9325);e.exports=function(){return r.Date.now()}},10392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},10480:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.75 2a.75.75 0 0 0 0 1.5h10.5a.75.75 0 0 0 0-1.5zm0 7a.75.75 0 0 0 0 1.5h10.5a.75.75 0 0 0 0-1.5zm0 3.5a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5zM2 6.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 2 6.25",clipRule:"evenodd"}))},10774:(e,t,n)=>{"use strict";n.d(t,{F:()=>i,m:()=>o});var r=n(95100),a=n(30142);const i=new class{stack=[];mouseDownLayerTarget;add(e){this.stack.push(e),1===this.stack.length&&this.addListeners(),this.notifyLayersChange()}remove(e){const t=this.stack.indexOf(e);this.stack.splice(t,1),0===this.stack.length&&this.removeListeners(),this.notifyLayersChange()}getLayersCount(){return this.stack.length}getLayers(){return this.stack.map(({type:e})=>({type:e}))}addListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("click",this.handleDocumentClick,!0),document.addEventListener("mousedown",this.handleDocumentMouseDown,!0)}removeListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("click",this.handleDocumentClick,!0),document.removeEventListener("mousedown",this.handleDocumentMouseDown,!0)}notifyLayersChange(){a.o.publish({componentId:"LayerManager",eventId:"layerschange",meta:{layersCount:this.getLayersCount(),layers:this.getLayers()}})}handleDocumentKeyDown=e=>{if(e.code===r.D.ESCAPE){const t=this.getTopLayer();t.disableEscapeKeyDown||(t.onEscapeKeyDown?.(e),t.onClose?.(e,"escapeKeyDown"))}if(e.code===r.D.ENTER){const t=this.getTopLayer();t.onEnterKeyDown?.(e)}};handleDocumentClick=e=>{if(this.isToastClick(e))return;let t,n=null;if(this.mouseDownLayerTarget){if(t=this.mouseDownLayerTarget.layer,n=this.mouseDownLayerTarget.target,this.mouseDownLayerTarget=void 0,!this.stack.includes(t))return}else t=this.getTopLayer();!t.disableOutsideClick&&this.isOutsideClick(t,e,n)&&(t.onOutsideClick?.(e),t.onClose?.(e,"outsideClick"))};handleDocumentMouseDown=e=>{const t=this.getTopLayer();t&&(this.mouseDownLayerTarget={layer:t,target:e.target})};getTopLayer(){return this.stack[this.stack.length-1]}isOutsideClick(e,t,n=null){const r=e.contentRefs||[],{target:a}=t,i="function"==typeof t.composedPath?t.composedPath():[];return r.length>0&&!r.some(e=>e?.current?.contains?.(a)||e?.current?.contains?.(n)||i.includes(e?.current))}isToastClick(e){return("function"==typeof e.composedPath?e.composedPath():[]).some(e=>Boolean(e?.dataset?.toast))}},o=()=>i.getLayersCount()},10776:(e,t,n)=>{var r=n(30756),a=n(95950);e.exports=function(e){for(var t=a(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,r(o)]}return t}},11002:e=>{"use strict";e.exports=Function.prototype.apply},11169:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858 6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",clipRule:"evenodd"}))},11253:(e,t,n)=>{"use strict";n.d(t,{B:()=>i});var r=n(96540),a=n(83505);function i({context:e,duration:t,onTransitionIn:n,onTransitionInComplete:i,onTransitionOut:o,onTransitionOutComplete:l}){const{isMounted:s,status:c}=(0,a.$X)(e,{duration:t}),u=function(e){const t=r.useRef();return r.useEffect(()=>{t.current=e}),t.current}(c),d=("number"==typeof t?t:t.open)??0,p=r.useRef(null);return r.useEffect(()=>{"open"===c&&"initial"===u&&(n?.(),p.current=setTimeout(()=>{i?.(),p.current=null},d)),"close"===c&&"open"===u&&(p.current&&(clearTimeout(p.current),p.current=null),o?.()),"unmounted"===c&&"close"===u&&l?.()},[c,u,d,n,i,o,l]),r.useEffect(()=>()=>{p.current&&(clearTimeout(p.current),p.current=null)},[]),{isMounted:s,status:c}}},11331:(e,t,n)=>{var r=n(72552),a=n(28879),i=n(40346),o=Function.prototype,l=Object.prototype,s=o.toString,c=l.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=a(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},11441:(e,t,n)=>{var r=n(28028),a=function(e){var t="",n=Object.keys(e);return n.forEach(function(a,i){var o=e[a];(function(e){return/[height|width]$/.test(e)})(a=r(a))&&"number"==typeof o&&(o+="px"),t+=!0===o?a:!1===o?"not "+a:"("+a+": "+o+")",i{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14M6.44 4.54c.43-.354.994-.565 1.56-.565 1.217 0 2.34.82 2.34 2.14 0 .377-.078.745-.298 1.1-.208.339-.513.614-.875.867-.217.153-.325.257-.379.328-.038.052-.038.07-.038.089a.75.75 0 0 1-1.5 0c0-.794.544-1.286 1.057-1.645.28-.196.4-.332.458-.426a.54.54 0 0 0 .075-.312c0-.3-.244-.641-.84-.641a1 1 0 0 0-.608.223c-.167.138-.231.287-.231.418a.75.75 0 0 1-1.5 0c0-.674.345-1.22.78-1.577M8 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"}))},12507:(e,t,n)=>{var r=n(28754),a=n(49698),i=n(63912),o=n(13222);e.exports=function(e){return function(t){t=o(t);var n=a(t)?i(t):void 0,l=n?n[0]:t.charAt(0),s=n?r(n,1).join(""):t.slice(1);return l[e]()+s}}},12651:(e,t,n)=>{var r=n(74218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},12749:(e,t,n)=>{var r=n(81042),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},12895:(e,t,n)=>{"use strict";var r=n(65606);let a=n(40396),i=n(49371),o=n(77793),l=n(53614),s=n(35238),c=n(40145),u=n(33438),d=n(61106),p=n(96966),h=n(81752),f=n(63152),m=n(69577),v=n(96846),g=n(33717),w=n(25644),b=n(61534),y=n(83303),x=n(60038);function C(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new v(e)}C.plugin=function(e,t){let n,a=!1;function i(...n){console&&console.warn&&!a&&(a=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),r.env.LANG&&r.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...n);return i.postcssPlugin=e,i.postcssVersion=(new v).version,i}return Object.defineProperty(i,"postcss",{get:()=>(n||(n=i()),n)}),i.process=function(e,t,n){return C([i(n)]).process(e,t)},i},C.stringify=y,C.parse=m,C.fromJSON=u,C.list=h,C.comment=e=>new i(e),C.atRule=e=>new a(e),C.decl=e=>new s(e),C.rule=e=>new b(e),C.root=e=>new w(e),C.document=e=>new c(e),C.CssSyntaxError=l,C.Declaration=s,C.Container=o,C.Processor=v,C.Document=c,C.Comment=i,C.Warning=x,C.AtRule=a,C.Result=g,C.Input=d,C.Rule=b,C.Root=w,C.Node=f,p.registerPostcss(C),e.exports=C,C.default=C},13144:(e,t,n)=>{"use strict";var r=n(66743),a=n(11002),i=n(10076),o=n(47119);e.exports=o||r.call(i,a)},13222:(e,t,n)=>{var r=n(77556);e.exports=function(e){return null==e?"":r(e)}},13554:(e,t,n)=>{var r,a=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,u=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of l(t))c.call(e,a)||a===n||i(e,a,{get:()=>t[a],enumerable:!(r=o(t,a))||r.enumerable});return e},d={};((e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})})(d,{default:()=>m}),e.exports=(r=d,u(i({},"__esModule",{value:!0}),r));var p=((e,t,n)=>(n=null!=e?a(s(e)):{},u(e&&e.__esModule?n:i(n,"default",{value:e,enumerable:!0}),e)))(n(97015)),h=n(15580);const f=p.default[p.default.length-1];var m=(0,h.createReactPlayer)(p.default,f)},13604:(e,t,n)=>{"use strict";var r=n(48287).hp;let{dirname:a,relative:i,resolve:o,sep:l}=n(197),{SourceMapConsumer:s,SourceMapGenerator:c}=n(21866),{pathToFileURL:u}=n(52739),d=n(61106),p=Boolean(s&&c),h=Boolean(a&&o&&i&&l);e.exports=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||a(e.file);!1===this.mapOpts.sourcesContent?(t=new s(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),h&&p&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=c.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new c({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new c({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,r=1,a="",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,l,s)=>{if(this.css+=o,l&&"end"!==s&&(i.generated.line=n,i.generated.column=r-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=a,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=o.match(/\n/g),t?(n+=t.length,e=o.lastIndexOf("\n"),r=o.length-e):r+=o.length,l&&"start"!==s){let e=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===e.last&&!e.raws.semicolon||(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=n,i.generated.column=r-2,this.map.addMapping(i)):(i.source=a,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?a(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=a(o(n,this.mapOpts.annotation)));let r=i(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new d(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return r?r.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(u){let t=u(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===l&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},14204:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.134 2.994 2.217 11.5a1 1 0 0 0 .866 1.5h9.834a1 1 0 0 0 .866-1.5L8.866 2.993a1 1 0 0 0-1.732 0m3.03-.75c-.962-1.665-3.366-1.665-4.329 0L.918 10.749c-.963 1.666.24 3.751 2.165 3.751h9.834c1.925 0 3.128-2.085 2.164-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"}))},14248:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=t.length,a=e.length;++n{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function a(e,t,n){return e.concat(t).map(function(e){return r(e,n)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function l(e,n,s){(s=s||{}).arrayMerge=s.arrayMerge||a,s.isMergeableObject=s.isMergeableObject||t,s.cloneUnlessOtherwiseSpecified=r;var c=Array.isArray(n);return c===Array.isArray(e)?c?s.arrayMerge(e,n,s):function(e,t,n){var a={};return n.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=r(e[t],n)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&n.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(i,n)(e[i],t[i],n):a[i]=r(t[i],n))}),a}(e,n,s):r(n,s)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})};var s=l;e.exports=s},14792:(e,t,n)=>{var r=n(13222),a=n(55808);e.exports=function(e){return a(r(e).toLowerCase())}},14803:(e,t,n)=>{"use strict";var r=n(58859),a=n(69675),i=function(e,t,n){for(var r,a=e;null!=(r=a.next);a=r)if(r.key===t)return a.next=r.next,n||(r.next=e.next,e.next=r),r};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new a("Side channel does not contain "+r(e))},delete:function(t){var n=e&&e.next,r=function(e,t){if(e)return i(e,t,!0)}(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return function(e,t){if(e){var n=i(e,t);return n&&n.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!i(e,t)}(e,t)},set:function(t,n){e||(e={next:void 0}),function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(e,t,n)}};return t}},14974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},15287:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator,f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||f}function w(){}function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||f}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=g.prototype;var y=b.prototype=new w;y.constructor=b,m(y,g.prototype),y.isPureReactComponent=!0;var x=Array.isArray,C=Object.prototype.hasOwnProperty,E={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,r){var a,i={},o=null,l=null;if(null!=t)for(a in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(o=""+t.key),t)C.call(t,a)&&!S.hasOwnProperty(a)&&(i[a]=t[a]);var s=arguments.length-2;if(1===s)i.children=r;else if(1{var r=n(96131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},15389:(e,t,n)=>{var r=n(93663),a=n(87978),i=n(83488),o=n(56449),l=n(50583);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?o(e)?a(e[0],e[1]):r(e):l(e)}},15580:(e,t,n)=>{var r,a=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,u=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of l(t))c.call(e,a)||a===n||i(e,a,{get:()=>t[a],enumerable:!(r=o(t,a))||r.enumerable});return e},d=(e,t,n)=>(n=null!=e?a(s(e)):{},u(!t&&e&&e.__esModule?n:i(n,"default",{value:e,enumerable:!0}),e)),p=(e,t,n)=>(((e,t,n)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),h={};((e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})})(h,{createReactPlayer:()=>M}),e.exports=(r=h,u(i({},"__esModule",{value:!0}),r));var f=d(n(96540)),m=d(n(14744)),v=d(n(41811)),g=d(n(30115)),w=n(7604),b=n(75635),y=d(n(88021));const x=(0,b.lazy)(()=>n.e(353).then(n.t.bind(n,66734,23))),C="undefined"!=typeof window&&window.document&&"undefined"!=typeof document,E=void 0!==n.g&&n.g.window&&n.g.window.document,S=Object.keys(w.propTypes),A=C||E?f.Suspense:()=>null,k=[],M=(e,t)=>{var n;return n=class extends f.Component{constructor(){super(...arguments),p(this,"state",{showPreview:!!this.props.light}),p(this,"references",{wrapper:e=>{this.wrapper=e},player:e=>{this.player=e}}),p(this,"handleClickPreview",e=>{this.setState({showPreview:!1}),this.props.onClickPreview(e)}),p(this,"showPreview",()=>{this.setState({showPreview:!0})}),p(this,"getDuration",()=>this.player?this.player.getDuration():null),p(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),p(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),p(this,"getInternalPlayer",(e="player")=>this.player?this.player.getInternalPlayer(e):null),p(this,"seekTo",(e,t,n)=>{if(!this.player)return null;this.player.seekTo(e,t,n)}),p(this,"handleReady",()=>{this.props.onReady(this)}),p(this,"getActivePlayer",(0,v.default)(n=>{for(const t of[...k,...e])if(t.canPlay(n))return t;return t||null})),p(this,"getConfig",(0,v.default)((e,t)=>{const{config:n}=this.props;return m.default.all([w.defaultProps.config,w.defaultProps.config[t]||{},n,n[t]||{}])})),p(this,"getAttributes",(0,v.default)(e=>(0,b.omit)(this.props,S))),p(this,"renderActivePlayer",e=>{if(!e)return null;const t=this.getActivePlayer(e);if(!t)return null;const n=this.getConfig(e,t.key);return f.default.createElement(y.default,{...this.props,key:t.key,ref:this.references.player,config:n,activePlayer:t.lazyPlayer||t,onReady:this.handleReady})})}shouldComponentUpdate(e,t){return!(0,g.default)(this.props,e)||!(0,g.default)(this.state,t)}componentDidUpdate(e){const{light:t}=this.props;!e.light&&t&&this.setState({showPreview:!0}),e.light&&!t&&this.setState({showPreview:!1})}renderPreview(e){if(!e)return null;const{light:t,playIcon:n,previewTabIndex:r,oEmbedUrl:a,previewAriaLabel:i}=this.props;return f.default.createElement(x,{url:e,light:t,playIcon:n,previewTabIndex:r,previewAriaLabel:i,oEmbedUrl:a,onClick:this.handleClickPreview})}render(){const{url:e,style:t,width:n,height:r,fallback:a,wrapper:i}=this.props,{showPreview:o}=this.state,l=this.getAttributes(e),s="string"==typeof i?this.references.wrapper:void 0;return f.default.createElement(i,{ref:s,style:{...t,width:n,height:r},...l},f.default.createElement(A,{fallback:a},o?this.renderPreview(e):this.renderActivePlayer(e)))}},p(n,"displayName","ReactPlayer"),p(n,"propTypes",w.propTypes),p(n,"defaultProps",w.defaultProps),p(n,"addCustomPlayer",e=>{k.push(e)}),p(n,"removeCustomPlayers",()=>{k.length=0}),p(n,"canPlay",t=>{for(const n of[...k,...e])if(n.canPlay(t))return!0;return!1}),p(n,"canEnablePIP",t=>{for(const n of[...k,...e])if(n.canEnablePIP&&n.canEnablePIP(t))return!0;return!1}),n}},16017:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",d:"m14.61 6.914-7.632 8.08a1.614 1.614 0 0 1-2.69-1.66L5.5 10H2.677A1.677 1.677 0 0 1 1.12 7.7l2.323-5.807A2.22 2.22 0 0 1 5.5.5h4c.968 0 1.637.967 1.298 1.873L10 4.5h3.569a1.431 1.431 0 0 1 1.04 2.414"}))},16038:(e,t,n)=>{var r=n(5861),a=n(40346);e.exports=function(e){return a(e)&&"[object Set]"==r(e)}},16400:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 2.5H8A1.5 1.5 0 0 0 6.5 4v1H8a3 3 0 0 1 3 3v1.5h1A1.5 1.5 0 0 0 13.5 8V4A1.5 1.5 0 0 0 12 2.5M11 11h1a3 3 0 0 0 3-3V4a3 3 0 0 0-3-3H8a3 3 0 0 0-3 3v1H4a3 3 0 0 0-3 3v4a3 3 0 0 0 3 3h4a3 3 0 0 0 3-3zM4 6.5h4A1.5 1.5 0 0 1 9.5 8v4A1.5 1.5 0 0 1 8 13.5H4A1.5 1.5 0 0 1 2.5 12V8A1.5 1.5 0 0 1 4 6.5",clipRule:"evenodd"}))},16547:(e,t,n)=>{var r=n(43360),a=n(75288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];i.call(e,t)&&a(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},16721:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11 13.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h.5v.75c0 .414.336.75.75.75H7v2h-.75a.75.75 0 0 0-.75.75v.5c0 .414.336.75.75.75H7v2h-.75a.75.75 0 0 0-.75.75v.5c0 .414.336.75.75.75H7v-2h.75a.75.75 0 0 0 .75-.75v-.5A.75.75 0 0 0 7.75 8H7V6h.75a.75.75 0 0 0 .75-.75v-.5A.75.75 0 0 0 7.75 4H7V2.5h.757a1.5 1.5 0 0 1 1.061.44l3.243 3.242a1.5 1.5 0 0 1 .439 1.06V12a1.5 1.5 0 0 1-1.5 1.5m2.121-8.379A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879z",clipRule:"evenodd"}))},17115:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11 13.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h2.757a1.5 1.5 0 0 1 1.061.44l3.243 3.242a1.5 1.5 0 0 1 .439 1.06V12a1.5 1.5 0 0 1-1.5 1.5m2.121-8.379A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879zm-6.533.388C6.978 5.19 7.488 5 8 5c1.092 0 2.125.736 2.125 1.947 0 .34-.07.678-.273 1.004-.19.308-.467.554-.785.776-.185.129-.269.211-.305.26l-.012.017A.75.75 0 0 1 7.25 9c0-.741.512-1.192.959-1.503.236-.165.329-.273.368-.336.028-.046.048-.097.048-.214a.37.37 0 0 0-.133-.292C8.398 6.575 8.235 6.5 8 6.5a.77.77 0 0 0-.463.17c-.126.104-.162.204-.162.277a.75.75 0 1 1-1.5 0c0-.618.32-1.116.713-1.438M9 11.25a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"}))},17255:(e,t,n)=>{var r=n(47422);e.exports=function(e){return function(t){return r(t,e)}}},17400:(e,t,n)=>{var r=n(99374),a=1/0;e.exports=function(e){return e?(e=r(e))===a||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},17453:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14M6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94z",clipRule:"evenodd"}))},17670:(e,t,n)=>{var r=n(12651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},18922:function(e,t,n){var r;!function(){"use strict";function a(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function i(e,t,n,r,i,o){return a((l=a(a(t,e),a(r,o)))<<(s=i)|l>>>32-s,n);var l,s}function o(e,t,n,r,a,o,l){return i(t&n|~t&r,e,t,a,o,l)}function l(e,t,n,r,a,o,l){return i(t&r|n&~r,e,t,a,o,l)}function s(e,t,n,r,a,o,l){return i(t^n^r,e,t,a,o,l)}function c(e,t,n,r,a,o,l){return i(n^(t|~r),e,t,a,o,l)}function u(e,t){var n,r,i,u,d;e[t>>5]|=128<>>9<<4)]=t;var p=1732584193,h=-271733879,f=-1732584194,m=271733878;for(n=0;n>5]>>>t%32&255);return n}function p(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return a}function f(e){return unescape(encodeURIComponent(e))}function m(e){return function(e){return d(u(p(e),8*e.length))}(f(e))}function v(e,t){return function(e,t){var n,r,a=p(e),i=[],o=[];for(i[15]=o[15]=void 0,a.length>16&&(a=u(a,8*e.length)),n=0;n<16;n+=1)i[n]=909522486^a[n],o[n]=1549556828^a[n];return r=u(i.concat(p(t)),512+8*t.length),d(u(o.concat(r),640))}(f(e),f(t))}function g(e,t,n){return t?n?v(t,e):h(v(t,e)):n?m(e):h(m(e))}void 0===(r=function(){return g}.call(t,n,t,e))||(e.exports=r)}()},19219:e=>{e.exports=function(e,t){return e.has(t)}},19570:(e,t,n)=>{var r=n(37334),a=n(93243),i=n(83488),o=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=o},19888:(e,t,n)=>{"use strict";e.exports=n(58493)},19931:(e,t,n)=>{var r=n(31769),a=n(68090),i=n(68969),o=n(77797);e.exports=function(e,t){return t=r(t,e),null==(e=i(e,t))||delete e[o(a(t))]}},19977:()=>{},20181:(e,t,n)=>{var r=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),d=Object.prototype.toString,p=Math.max,h=Math.min,f=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||o.test(e)?l(e.slice(2),n?2:8):a.test(e)?NaN:+e}e.exports=function(e,t,n){var r,a,i,o,l,s,c=0,u=!1,d=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var n=r,i=a;return r=a=void 0,c=t,o=e.apply(i,n)}function b(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=i}function y(){var e=f();if(b(e))return x(e);l=setTimeout(y,function(e){var n=t-(e-s);return d?h(n,i-(e-c)):n}(e))}function x(e){return l=void 0,g&&r?w(e):(r=a=void 0,o)}function C(){var e=f(),n=b(e);if(r=arguments,a=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(y,t),u?w(e):o}(s);if(d)return l=setTimeout(y,t),w(s)}return void 0===l&&(l=setTimeout(y,t)),o}return t=v(t)||0,m(n)&&(u=!!n.leading,i=(d="maxWait"in n)?p(v(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),C.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=a=l=void 0},C.flush=function(){return void 0===l?o:x(f())},C}},20317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},20426:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},20553:()=>{"use strict";(()=>{var e,t,n,r,a,i,o,l,s,c,u,d,p,h,f,m,v,g,w,b=Object.create,y=Object.defineProperty,x=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,E=Object.getOwnPropertySymbols,S=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,M=(e,t,n)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||(t={}))A.call(t,n)&&M(e,n,t[n]);if(E)for(var n of E(t))k.call(t,n)&&M(e,n,t[n]);return e},j=(e={"node_modules/get-root-node-polyfill/index.js"(e,t){function n(e){var t=r(e);return function(e){return"#document-fragment"===e.nodeName&&"ShadowRoot"===e.constructor.name}(t)?n(t.host):t}function r(e){return null!=e.parentNode?r(e.parentNode):e}"object"==typeof t&&t.exports&&(t.exports=function(e){return"object"==typeof e&&Boolean(e.composed)?n(this):r(this)})}},function(){return t||(0,e[C(e)[0]])((t={exports:{}}).exports,t),t.exports});n="yfm_cut",r="yfm-cut-highlight",typeof window<"u"&&!window[n]&&(window[n]=new class{constructor(){var e;M(this,"symbol"!=typeof(e="disposers")?e+"":e,[]),this.disposers.push(this.init())}init(){let e=!1,t=()=>{e=!0},n=()=>{e=!1},r=t=>{var n,r;"summary"===(null==(r=null==(n=t.target)?void 0:n.tagName)?void 0:r.toLowerCase())&&(null==n?void 0:n.classList.contains("yfm-cut-title"))&&!e&&this.focusActiveCut(t.target)};return document.addEventListener("mousedown",t),document.addEventListener("mouseup",n),document.addEventListener("focus",r,!0),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("mouseup",n),document.removeEventListener("focus",r,!0)}}dispose(){for(let e of this.disposers)e()}focusActiveCut(e){let t=e.parentNode;var n,a;"details"===(null==(a=null==(n=t)?void 0:n.tagName)?void 0:a.toLowerCase())&&(null==n?void 0:n.classList.contains("yfm-cut"))&&(setTimeout(()=>{t.classList.add(r)},70),setTimeout(()=>{t.classList.remove(r)},1e3))}}),i="yfm-tabs",o="yfm-tab-panel",l="active",s="data-diplodoc-group",c="data-diplodoc-key",u="data-diplodoc-variant",d="data-diplodoc-forced",(a=p||{}).Regular="regular",a.Radio="radio",a.Dropdown="dropdown",a.Accordion="accordion",p=a,h=Symbol.for("diplodocTabs"),f=e=>{let t=e.composedPath();return Array.isArray(t)&&t.length>0?t[0]:e.target},m=e=>{let t=f(e);return!t||!t.matches},v=e=>Math.abs(e.scrollHeight-e.clientHeight)>1?e:e.parentElement?v(e.parentElement):void 0,g=(e,t)=>{let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:n.top-r.top,left:n.left-r.left,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}},w={TABS:`.${i}`,TAB_LIST:".yfm-tab-list",TAB:".yfm-tab",TAB_PANEL:`.${o}`,VERTICAL_TABS:".yfm-tabs-vertical"},"undefined"!=typeof window&&"undefined"!=typeof document&&!window[h]&&(window[h]=new class{constructor(e,t={}){this._onSelectTabHandlers=new Set,this._currentPageTabGroups=[],this._isRestoringTabs=!1,this._document=e,this._options=Object.assign({saveTabsToLocalStorage:!1,saveTabsToQueryStateMode:"none"},t),this._document.addEventListener("click",e=>{let t=f(e);if(e.target&&this.hideAllDropdown(e.target),m(e))return;if(this.isElementDropdownSelect(t))return void t.classList.toggle(l);if(!this.isValidTabElement(t))return;let n=this.getTabDataFromHTMLElement(t);n&&this._selectTab(n,t)}),this._document.addEventListener("keydown",e=>{let t=null;switch(e.key){case"ArrowLeft":case"ArrowUp":t="left";break;case"ArrowRight":case"ArrowDown":t="right"}if(!t)return;let n=f(e);if(m(e)||!this.isValidTabElement(n))return;let{tabs:r,nodes:a}=this.getTabs(n),i=this.getTabDataFromHTMLElement(n),o=r.findIndex(({key:e})=>(null==i?void 0:i.key)&&e===i.key);if(!i||r.length<=1||-1===o)return;let l=(o+("left"===t?-1:1)+r.length)%r.length;this.selectTab(r[l]),a[l].focus()})}configure(e){this._options=Object.assign(this._options,e)}onSelectTab(e){return this._onSelectTabHandlers.add(e),()=>{this._onSelectTabHandlers.delete(e)}}selectTabById(e,t){let n=this._document.querySelector(`${w.TAB}[data-diplodoc-id="${e}"]`);if(!n||!this.isValidTabElement(n))return;let r=this.getTabDataFromHTMLElement(n);r&&this._selectTab(r,n),null!=t&&t.scrollToElement&&n.scrollIntoView()}selectTab(e){this._selectTab(e)}restoreTabs(e){this._isRestoringTabs=!0;try{for(let[t,n]of Object.entries(e))if(t){let e=R({group:t},n);this.selectTab(e)}}finally{this._isRestoringTabs=!1}}getTabsFromLocalStorage(){return JSON.parse(localStorage.getItem("tabsHistory")||"{}")}getTabsFromSearchQuery(){let e={},t=new URLSearchParams(window.location.search);return t.has("tabs")&&(t.get("tabs")||"").split(",").forEach(t=>{let n=t.split("_"),[r,a]=n,i="regular";if(3===n.length&&(i=n[2]),r&&a&&Object.values(p).includes(i)){let t=a;e[r]={key:t,variant:i}}}),e}updateLocalStorageWithTabs(e){this._options.saveTabsToLocalStorage&&(this._isRestoringTabs||localStorage.setItem("tabsHistory",JSON.stringify(e)))}updateQueryParamWithTabs(e){if(this._isRestoringTabs)return;let t=new URLSearchParams(window.location.search),n=Object.entries(e).map(([e,{key:t,variant:n}])=>"regular"===n?`${e}_${t}`:`${e}_${t}_${n}`);n.length>0?t.set("tabs",n.join(",")):t.delete("tabs");let r=history.state||{},a=new URL(window.location.href);a.search=t.toString(),window.history.replaceState(R({},r),document.title,a.href)}getCurrentPageTabHistory(e){return Object.fromEntries(Object.entries(e).filter(([e])=>this._currentPageTabGroups.includes(e)))}onPageChanged(){this._currentPageTabGroups=this.getCurrentPageTabGroups()}getCurrentPageTabGroups(){let e=this._document.getElementsByClassName(i),t=new Set;return Array.from(e).forEach(e=>{let n=e.getAttribute(s);n&&t.add(n)}),Array.from(t)}clearTabsPreferred(){localStorage.removeItem("tabsHistory"),this.updateQueryParamWithTabs({})}_selectTab(e,t){let{group:n,key:r,variant:a}=e;if(!n)return;this.saveTabPreferred({group:n,key:r,variant:a});let i=t&&v(t),o=i&&g(t,i);this.updateHTML({group:n,key:r,variant:a},t,a)>0&&(this.fireSelectTabEvent({group:n,key:r,variant:a},null==t?void 0:t.dataset.diplodocId),o&&this.resetScroll(t,i,o))}updateHTML(e,t,n){switch(n){case"radio":return this.updateHTMLRadio(e,t);case"accordion":return this.updateHTMLAccordion(e,t);case"regular":return this.updateHTMLRegular(e);case"dropdown":return this.updateHTMLDropdown(e);default:return 0}}saveTabPreferred(e){let t={};switch(this._options.saveTabsToLocalStorage&&(t=JSON.parse(localStorage.getItem("tabsHistory")||"{}")),t[e.group]={key:e.key,variant:e.variant},this._options.saveTabsToLocalStorage&&this.updateLocalStorageWithTabs(t),this._options.saveTabsToQueryStateMode){case"all":this.updateQueryParamWithTabs(t);break;case"page":this.updateQueryParamWithTabs(this.getCurrentPageTabHistory(t))}}updateHTMLRadio(e,t){let{group:n,key:r}=e,{isForced:a,root:i}=this.didTabOpenForce(t),o=a?`.yfm-vertical-tab[${d}="true"]`:"",l=this._document.querySelectorAll(`${w.TABS}[${s}="${n}"] ${w.TAB}[${c}="${r}"]${o}`);a&&(null==i||i.removeAttribute(d));let u=0;return l.forEach(e=>{let t=e.parentNode.children;for(let n=0;n{let t=e;if(!this.isValidTabElement(t)||"true"===t.dataset.diplodocIsActive)return;a++;let n=e,r=n.parentNode,i=null==r?void 0:r.parentNode,s=Array.from((null==r?void 0:r.querySelectorAll(w.TAB))||[]),c=Array.from((null==i?void 0:i.children)||[]).filter(e=>e.classList.contains(o)),u=s.indexOf(n);s.forEach((e,t)=>{let n=c[t],r=t===u;e.dataset.diplodocIsActive=r?"true":"false",e.classList.toggle(l,r),e.setAttribute("aria-selected",r.toString()),e.setAttribute("tabindex",r?"0":"-1"),n.classList.toggle(l,r)})}),a}updateHTMLDropdown(e){let{group:t,key:n}=e,r=this._document.querySelectorAll(`${w.TABS}[${s}="${t}"] ${w.TAB}[${c}="${n}"]`),a=0;return r.forEach(e=>{let t=e.closest(`[${u}=dropdown]`);if(null==t||!t.children)return;let n=t.children.item(0),r=t.children.item(1);null==n||n.classList.remove(l);let i=Array.from((null==r?void 0:r.children)||[]).indexOf(e)+2;for(let o=2;o{let t=e.closest(`[${u}=accordion]`);if(null!=t&&t.children)for(let n=0;n{t.scrollIntoView({block:"nearest"})}),i}checkVisible(e){let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)}hideAllDropdown(e){this._document.querySelectorAll(".yfm-tabs-dropdown-select.active").forEach(t=>{t.contains(e)||t.classList.remove(l)})}resetScroll(e,t,n){let r=g(e,t),a=r.top-n.top,i=r.left-n.left,o=r.scrollTop-n.scrollTop,l=r.scrollLeft-n.scrollLeft;t.scrollTo(t.scrollLeft+i-l,t.scrollTop+a-o)}didTabOpenForce(e){if(!e)return{};if(e.dataset.diplodocForced)return{root:e,isForced:!0};let t=e.dataset.diplodocVerticalTab?e:e.parentElement;return{root:t,isForced:void 0!==(null==t?void 0:t.dataset.diplodocForced)}}fireSelectTabEvent(e,t){let{group:n,key:r,variant:a}=e,i=n.startsWith("defaultTabsGroup-")?{key:r,variant:a}:e;this._onSelectTabHandlers.forEach(e=>{e({tab:i,currentTabId:t})})}getTabsType(e){let t=e.closest(`[${u}]`);if(t)return t.dataset.diplodocVariant}isValidTabElement(e){return!!this.getTabsType(e)}isElementDropdownSelect(e){return e.classList.contains("yfm-tabs-dropdown-select")}getTabDataFromHTMLElement(e){var t,n,r;let a=this.getTabsType(e);if("radio"===a){let n=e.dataset.diplodocVerticalTab?e:e.parentElement,r=n.dataset.diplodocKey,a=null==(t=n.closest(w.TABS))?void 0:t.dataset.diplodocGroup;return r&&a?{group:a,key:r,variant:"radio"}:null}if("dropdown"===a||"accordion"===a){let t=e.dataset.diplodocKey,r=null==(n=e.closest(w.TABS))?void 0:n.dataset.diplodocGroup;return t&&r?{group:r,key:t,variant:a}:null}let i=e.dataset.diplodocKey,o=null==(r=e.closest(w.TABS))?void 0:r.dataset.diplodocGroup;return i&&o?{group:o,key:i,variant:"regular"}:null}getTabs(e){var t,n;let r=null==(t=e.closest(w.TABS))?void 0:t.dataset.diplodocGroup,a=null==(n=e.closest(w.TAB_LIST))?void 0:n.querySelectorAll(w.TAB),i=[];return a.forEach(e=>{let t=null==e?void 0:e.dataset.diplodocKey;t&&i.push({group:r,key:t,variant:"regular"})}),{tabs:i,nodes:a}}}(document));var O=((e,t,n)=>(n=null!=e?b(S(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of C(t))A.call(e,n)||undefined===n||y(e,n,{get:()=>t[n],enumerable:!(r=x(t,n))||r.enumerable});return e})(e&&e.__esModule?n:y(n,"default",{value:e,enumerable:!0}),e)))(j());"undefined"!=typeof document&&function(e){const t=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector;e.matches=e.matchesSelector=t||function(t){const n=(e.getRootNode?e.getRootNode():O.default.call(e)).querySelectorAll(t),r=this;return Array.prototype.some.call(n,e=>e===r)}}(Element.prototype);var N=e=>{const t=e.composedPath();return Array.isArray(t)&&t.length>0?t[0]:e.target},L=e=>{const t=N(e);return!t||!t.matches},z=e=>{return t=function*(){if(!e)return;if(navigator.clipboard&&(navigator.clipboard.writeText,1))return navigator.clipboard.writeText(e);const t=document.createElement("textarea");t.setAttribute("style","position: absolute; left: 1000%"),t.textContent=e,document.body.append(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},new Promise((e,n)=>{var r=e=>{try{i(t.next(e))}catch(e){n(e)}},a=e=>{try{i(t.throw(e))}catch(e){n(e)}},i=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,a);i((t=t.apply(undefined,null)).next())});var t};"undefined"!=typeof document&&document.addEventListener("click",e=>{const t=N(e),n=t.matches(".yfm-clipboard-button");!L(e)&&n&&function(e){const t=e.parentNode;if(!t)return;const n=t.querySelector("pre code");if(!n)return;const r=Array.from(n.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains("yfm-line-number"))).map(e=>e.textContent).join("");z(r.trim()).then(()=>{!function(e){if(!e)return;const t=e.getAttribute("data-animation"),n=e.getRootNode().getElementById(`visibileAnimation-${t}`);n&&n.beginElement()}(t.querySelector(".yfm-clipboard-icon")),setTimeout(()=>e.blur(),1500)})}(t)}),"undefined"!=typeof document&&document.addEventListener("click",e=>{const t=N(e);if(L(e)||!t.matches(".yfm-clipboard-anchor"))return;const n=t.getAttribute("data-href")||"",r=new URL(n,window.location.href).toString();z(r)});var T=".yfm-clipboard-inline-code",I="tooltip_inline_clipboard_dialog",P="open",B={ru:"Скопировано",en:"Copied",ar:"تم النسخ",cs:"Zkopírováno",fr:"Copié",es:"Copiado",he:"הועתק",bg:"Копирано",et:"Kopeeritud",el:"Αντιγράφηκε",pt:"Copiado",zh:"已复制","zh-tw":"已複製",kk:"Көшірілді",tr:"Kopyalandı",uz:"Nusxalandi"},_={TITLE:".yfm .yfm-term_title",CONTENT:".yfm .yfm-term_dfn"},D="open",H=_.CONTENT.replace(/\./g,"")+" "+D,V=!0;function F(e,t){const{x:n,y:r,right:a,left:i,width:o,height:l}=t.getBoundingClientRect(),s=U(t);if(!s)return;const{right:c,left:u}=s.getBoundingClientRect();if((ca)&&!V)return void W(e);V&&s&&(s.addEventListener("scroll",q),V=!1);const d=Number(e.getAttribute("relativeX")),p=Number(e.getAttribute("relativeY"));if(d===n&&p===r)return;e.setAttribute("relativeX",String(n)),e.setAttribute("relativeY",String(r));const h=l+5,f=e.parentElement;if(!f)return;const{width:m}=e.getBoundingClientRect(),{left:v}=f.getBoundingClientRect(),g=Number(G(t).left),w=m+g,b=g-m<0,y=w>document.body.clientWidth,x=!y&&"rtl"!==document.dir||b?0:m-o,C=G(f).top-f.offsetTop,E=y?w-document.body.clientWidth+5:0,S=G(t).left-v+f.offsetLeft-x,A=S+m>=document.body.clientWidth;e.style.top=Number(G(t).top+h-C)+"px",e.style.left=Number(S-(A?E:0))+"px"}function q(){const e=document.getElementsByClassName(H)[0];if(!e)return;const t=e.getAttribute("term-id")||"",n=document.getElementById(t);n&&F(e,n)}function U(e){return e?e.closest("table")||e.closest("code")||e.parentElement:null}function $(e){const t=document.getElementsByClassName(H)[0],n=e.getAttribute("id"),r=e.getAttribute("term-key"),a=document.getElementById(r+"_element");if(t&&n===t.getAttribute("term-id"))return void W(t);const i=e.closest([_.CONTENT.replace(" ",""),D].join("."));t&&!i&&W(t),e.matches(_.TITLE)&&a&&(function(e,t){const n=t.getAttribute("id")||Math.random().toString(36).substr(2,8);null==e||e.setAttribute("term-id",n)}(a,e),function(e,t){const n=t.getAttribute("aria-live")||"polite";null==e||e.setAttribute("aria-live",n),null==e||e.setAttribute("aria-modal","true")}(a,e),F(a,e),a.classList.toggle(D),function(e){const t=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),n=t[0],r=t[t.length-1];n&&n.focus(),e.addEventListener("keydown",function(e){("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?document.activeElement===n&&(r.focus(),e.preventDefault()):document.activeElement===r&&(n.focus(),e.preventDefault()))})}(a))}function W(e){e.classList.remove(D);const t=U(K(e));t&&(t.removeEventListener("scroll",q),V=!0)}function G(e){const t=e.getBoundingClientRect(),n=document.body,r=document.documentElement,a=window.pageYOffset||r.scrollTop||n.scrollTop,i=window.pageXOffset||r.scrollLeft||n.scrollLeft,o=r.clientTop||n.clientTop||0,l=r.clientLeft||n.clientLeft||0,s=t.top+a-o,c=t.left+i-l;return{top:Math.round(s),left:Math.round(c)}}function K(e){const t=e.getAttribute("term-id");return t?document.getElementById(t):null}var Z=null,Y=!0;function Q(){return document.getElementById(I)}function X(){Z&&(clearTimeout(Z),Z=null)}function J(e){return e?e.closest("table")||e.closest("code")||e.parentElement:null}function ee(){const e=Q();if(!e)return;const t=e.getAttribute("inline-id")||"",n=document.getElementById(t);n&&te(e,n)}function te(e,t){const{x:n,y:r,right:a,left:i,width:o,height:l}=t.getBoundingClientRect(),s=J(t);if(!s)return;const{right:c,left:u}=s.getBoundingClientRect();if((ca)&&!Y)return void re(e);Y&&s&&(s.addEventListener("scroll",ee),Y=!1);const d=Number(e.getAttribute("relativeX")),p=Number(e.getAttribute("relativeY"));if(d===n&&p===r)return;e.setAttribute("relativeX",String(n)),e.setAttribute("relativeY",String(r));const h=l+5,f=e.parentElement;if(!f)return;const{width:m}=e.getBoundingClientRect(),{left:v}=f.getBoundingClientRect(),g=Number(G(t).left),w=m+g,b=g-m<0,y=w>document.body.clientWidth,x=!y&&"rtl"!==document.dir||b?0:m-o,C=G(f).top-f.offsetTop,E=y?w-document.body.clientWidth+5:0,S=G(t).left-v+f.offsetLeft-x,A=S+m>=document.body.clientWidth;e.style.top=Number(G(t).top+h-C)+"px",e.style.left=Number(S-(A?E:0))+"px"}function ne(e){const t=e.getAttribute("inline-id");return t?document.getElementById(t):null}function re(e){X(),function(e){e.classList.remove(P);const t=J(ne(e)),n=J(e);e.removeAttribute("inline-id"),t&&n&&(n.removeChild(e),t.removeEventListener("scroll",ee),Y=!0)}(e)}function ae(e){const t=function(e){const t=function(){var e;let t=Q();if(!t){const n=document.querySelector(".dc-doc-page__content")||document.body,r=document.documentElement.lang||"en",a=null!=(e=B[r])?e:B.en,i=document.createElement("div");i.innerHTML=`\n \n `,t=i.firstElementChild,n.appendChild(t)}return t}();if(e.matches(T)&&t)return t.setAttribute("inline-id",e.getAttribute("id")||""),function(e,t){const n=t.getAttribute("aria-live")||"polite";null==e||e.setAttribute("aria-live",n),null==e||e.setAttribute("aria-modal","true")}(t,e),te(t,e),t.classList.contains(P)?(t.classList.remove(P),requestAnimationFrame(()=>{t.classList.add(P)})):t.classList.add(P),t}(e);t&&(X(),Z=setTimeout(()=>{re(t),Z=null},1e3))}"undefined"!=typeof document&&(document.addEventListener("click",e=>{const t=N(e),n=t.matches(T);!L(e)&&n&&function(e){const t=e.innerText;t&&z(t).then(()=>{ae(e)})}(t)}),document.addEventListener("keydown",e=>{var t;if("Enter"===e.key&&document.activeElement){const e=document.activeElement,t=T.replace(".","");if(!e.classList.contains(t))return;const n=e.innerText;if(!n)return;z(n).then(()=>{ae(e)})}const n=Q();"Escape"===e.key&&n&&(re(n),null==(t=ne(n))||t.focus())}),window.addEventListener("resize",()=>{const e=Q();if(!e)return;const t=e.getAttribute("inline-id")||"",n=document.getElementById(t);n?te(e,n):e.classList.toggle(P)})),"undefined"!=typeof document&&(document.addEventListener("click",e=>{!N(e)&&L(e)||$(N(e))}),document.addEventListener("keydown",e=>{var t;const n=document.getElementsByClassName(H)[0];"Enter"===e.key&&document.activeElement&&$(document.activeElement),"Escape"===e.key&&n&&(W(n),null==(t=K(n))||t.focus())}),window.addEventListener("resize",()=>{const e=document.getElementsByClassName(H)[0];if(!e)return;const t=e.getAttribute("term-id")||"",n=document.getElementById(t);n?F(e,n):e.classList.toggle(D)}));var ie=()=>{window.wideTemplate&&(window.wideTemplate.style.display="none",window.wideTemplate.content(void 0))},oe=e=>{const t=(()=>{if(window.wideTemplate)return window.wideTemplate;const e=document.createElement("div");e.classList.add("dc-doc-page","wide-container");const t=document.createElement("div");t.classList.add("wide-content-overlay"),t.addEventListener("click",ie);const n=document.createElement("div");n.classList.add("yfm","wide-content-wrapper");const r=document.createElement("div");r.classList.add("wide-toolbar");const a=document.createElement("div");a.classList.add("wide-actions"),a.addEventListener("click",ie),a.innerHTML='';const i=document.createElement("p");i.classList.add("wide-entity-name"),e.label=e=>{i.innerHTML=e||""};const o=document.createElement("div");return o.classList.add("wide-content"),e.content=e=>{var t;if(void 0===e)return void(o.innerHTML="");const n=e.cloneNode(!0),r=(e=>{if("TABLE"!==e.tagName)return;const t=Array.from(e.children);return t.find(e=>"THEAD"===e.tagName)?void 0:t.find(e=>"TBODY"===e.tagName)})(n);null==(t=null==r?void 0:r.classList)||t.add("wide-thead-content"),o.replaceChildren(n)},r.append(i,a),n.append(r,o),e.append(t,n),e.style.display="none",document.body.appendChild(e),window.wideTemplate=e,e})();t.label(e.title),t.content(e),t.style.display="flex"},le=e=>{var t;if(null==(t=e.parentElement)?void 0:t.classList.contains("wide-element-wrapper"))return;e.classList.add("wide-inner-element");const n=document.createElement("div");n.innerHTML='',n.classList.add("wide-content-viewer"),n.addEventListener("click",()=>oe(e));const r=document.createElement("div");r.classList.add("wide-element-wrapper"),e.before(r),r.appendChild(e),r.appendChild(n)},se=()=>{Array.from(document.querySelectorAll("[wide-content]")).forEach(le)};"undefined"!=typeof window&&"undefined"!=typeof document&&window.addEventListener("load",se),"undefined"!=typeof window&&(window.patchAfterRender=()=>{se()})})()},20999:(e,t,n)=>{var r=n(69302),a=n(36800);e.exports=function(e){return r(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,l&&a(n[0],n[1],l)&&(o=i<3?void 0:o,i=1),t=Object(t);++r{var r=n(25160),a=n(36800),i=n(61489),o=Math.ceil,l=Math.max;e.exports=function(e,t,n){t=(n?a(e,t,n):void 0===t)?1:l(i(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var c=0,u=0,d=Array(o(s/t));c{"use strict";var r=n(96540),a=Symbol.for("react.element"),i=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:a,type:e,key:c,ref:u,props:i,_owner:l.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},21549:(e,t,n)=>{var r=n(22032),a=n(63862),i=n(66721),o=n(12749),l=n(35749);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(16547),a=n(43360);e.exports=function(e,t,n,i){var o=!n;n||(n={});for(var l=-1,s=t.length;++l{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z",clipRule:"evenodd"}))},21866:()=>{},21986:(e,t,n)=>{var r=n(51873),a=n(37828),i=n(75288),o=n(25911),l=n(20317),s=n(84247),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=l;case"[object Set]":var f=1&r;if(h||(h=s),e.size!=t.size&&!f)return!1;var m=p.get(e);if(m)return m==t;r|=2,p.set(e,t);var v=o(h(e),h(t),r,c,d,p);return p.delete(e),v;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},22032:(e,t,n)=>{var r=n(81042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},22225:e=>{var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",a="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+i+"]",l="\\d+",s="["+n+"]",c="["+r+"]",u="[^"+t+i+l+n+r+a+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",h="["+a+"]",f="(?:"+c+"|"+u+")",m="(?:"+h+"|"+u+")",v="(?:['’](?:d|ll|m|re|s|t|ve))?",g="(?:['’](?:D|LL|M|RE|S|T|VE))?",w="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",b="[\\ufe0e\\ufe0f]?",y=b+w+"(?:\\u200d(?:"+["[^"+t+"]",d,p].join("|")+")"+b+w+")*",x="(?:"+[s,d,p].join("|")+")"+y,C=RegExp([h+"?"+c+"+"+v+"(?="+[o,h,"$"].join("|")+")",m+"+"+g+"(?="+[o,h+f,"$"].join("|")+")",h+"?"+f+"+"+v,h+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",l,x].join("|"),"g");e.exports=function(e){return e.match(C)||[]}},22302:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3.5h8A1.5 1.5 0 0 1 13.5 5v.5h-11V5A1.5 1.5 0 0 1 4 3.5m-1.5 7v.5A1.5 1.5 0 0 0 4 12.5h3.25v-2zm0-1.5h4.75V7H2.5zm6.25 1.5v2H12a1.5 1.5 0 0 0 1.5-1.5v-.5zM13.5 9H8.75V7h4.75zM1 5a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3z",clipRule:"evenodd"}))},22386:(e,t,n)=>{var r=n(51098);e.exports=new r},22524:e=>{e.exports={isFunction:function(e){return"function"==typeof e},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},each:function(e,t){for(var n=0,r=e.length;n{"use strict";var r=n(96540),a=n(69982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n