@abtnode/webapp 1.16.26-beta-bdd2d7c0 → 1.16.26-beta-346cba92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/build/asset-manifest.json +36 -34
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/css/{6472.b61738f8.chunk.css → 4804.c723f709.chunk.css} +1 -1
- package/build/static/js/1059.1a6ea93b.chunk.js +1 -0
- package/build/static/js/1294.03fe6694.chunk.js +1 -0
- package/build/static/js/1575.0fc4b91c.chunk.js +1 -0
- package/build/static/js/2019.72e51f47.chunk.js +1 -0
- package/build/static/js/233.9c8f8925.chunk.js +1 -0
- package/build/static/js/2365.a3571172.chunk.js +1 -0
- package/build/static/js/3803.1a824a3f.chunk.js +1 -0
- package/build/static/js/3930.ecf693c5.chunk.js +1 -0
- package/build/static/js/4423.a301fac7.chunk.js +1 -0
- package/build/static/js/4465.fd6a50cf.chunk.js +1 -0
- package/build/static/js/4550.2818aacf.chunk.js +1 -0
- package/build/static/js/4804.3833bc57.chunk.js +2 -0
- package/build/static/js/{4852.5c585b9f.chunk.js → 4852.f41ccaf2.chunk.js} +1 -1
- package/build/static/js/{4906.9b6bdc77.chunk.js → 4906.89c01125.chunk.js} +1 -1
- package/build/static/js/{4930.fa6304c9.chunk.js → 4930.a556409d.chunk.js} +1 -1
- package/build/static/js/{5059.af256250.chunk.js → 5059.b4303ef8.chunk.js} +1 -1
- package/build/static/js/5748.d4be1a47.chunk.js +1 -0
- package/build/static/js/6179.f2c7bcb4.chunk.js +1 -0
- package/build/static/js/{6230.4c0db690.chunk.js → 6230.648419c5.chunk.js} +1 -1
- package/build/static/js/6511.b9d588f3.chunk.js +1 -0
- package/build/static/js/6906.5a662b34.chunk.js +1 -0
- package/build/static/js/6944.a02a8420.chunk.js +1 -0
- package/build/static/js/7327.b271984c.chunk.js +1 -0
- package/build/static/js/8167.6f5f3c09.chunk.js +1 -0
- package/build/static/js/8170.957decb2.chunk.js +1 -0
- package/build/static/js/8427.4a662c59.chunk.js +2 -0
- package/build/static/js/{9484.1660aee4.chunk.js → 8542.9ee442f2.chunk.js} +1 -1
- package/build/static/js/8590.7584fa62.chunk.js +1 -0
- package/build/static/js/8646.a93fb6cc.chunk.js +1 -0
- package/build/static/js/8656.b42c647d.chunk.js +1 -0
- package/build/static/js/{9237.82494039.chunk.js → 9237.0eb04d60.chunk.js} +2 -2
- package/build/static/js/9450.5a43999b.chunk.js +1 -0
- package/build/static/js/9586.d6ce4ebb.chunk.js +1 -0
- package/build/static/js/main.c04b4af6.js +2 -0
- package/package.json +1 -1
- package/build/static/js/1059.cd52ca65.chunk.js +0 -1
- package/build/static/js/1294.0d2e94ed.chunk.js +0 -1
- package/build/static/js/1575.eebd3dd7.chunk.js +0 -1
- package/build/static/js/2019.2d3a40ae.chunk.js +0 -1
- package/build/static/js/2264.f2eb6130.chunk.js +0 -1
- package/build/static/js/233.a4c19158.chunk.js +0 -1
- package/build/static/js/2960.ba10b91c.chunk.js +0 -1
- package/build/static/js/3803.df3cb936.chunk.js +0 -1
- package/build/static/js/3930.31250151.chunk.js +0 -1
- package/build/static/js/4423.0b4a3962.chunk.js +0 -1
- package/build/static/js/4465.d622f2c2.chunk.js +0 -1
- package/build/static/js/4550.b2afea4a.chunk.js +0 -1
- package/build/static/js/5748.12e93155.chunk.js +0 -1
- package/build/static/js/5973.7e97d6d8.chunk.js +0 -1
- package/build/static/js/6471.cc995637.chunk.js +0 -1
- package/build/static/js/6472.b1c703d4.chunk.js +0 -2
- package/build/static/js/6511.94eda291.chunk.js +0 -1
- package/build/static/js/6906.244f97fe.chunk.js +0 -1
- package/build/static/js/6931.3b4c19d0.chunk.js +0 -1
- package/build/static/js/6944.d847d48d.chunk.js +0 -1
- package/build/static/js/8170.38d0b64e.chunk.js +0 -1
- package/build/static/js/8427.b510fa70.chunk.js +0 -2
- package/build/static/js/8590.f59207df.chunk.js +0 -1
- package/build/static/js/9586.efb66311.chunk.js +0 -1
- package/build/static/js/main.914d9380.js +0 -2
- /package/build/static/js/{6472.b1c703d4.chunk.js.LICENSE.txt → 4804.3833bc57.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{8427.b510fa70.chunk.js.LICENSE.txt → 8427.4a662c59.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{9237.82494039.chunk.js.LICENSE.txt → 9237.0eb04d60.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.914d9380.js.LICENSE.txt → main.c04b4af6.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4852],{39646:(e,t,o)=>{"use strict";o.d(t,{Z:()=>re});var n=o(29218),a=o(7896),r=o(5057),i=o(9978),l=o(41366),c=o(83026),s=o(17821),p=o(48272),u=o(10252);function d(e){return"undefined"!==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function g(e,t){for(let o=0;o<e.length;o+=1)if(t(e[o]))return o;return-1}const f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{ignoreAccents:t=!0,ignoreCase:o=!0,limit:n,matchFrom:a="any",stringify:r,trim:i=!1}=e;return(e,l)=>{let{inputValue:c,getOptionLabel:s}=l,p=i?c.trim():c;o&&(p=p.toLowerCase()),t&&(p=d(p));const u=p?e.filter((e=>{let n=(r||s)(e);return o&&(n=n.toLowerCase()),t&&(n=d(n)),"start"===a?0===n.indexOf(p):n.indexOf(p)>-1})):e;return"number"===typeof n?u.slice(0,n):u}}(),h=e=>{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))};function m(e){const{unstable_isActiveElementInListbox:t=h,unstable_classNamePrefix:o="Mui",autoComplete:n=!1,autoHighlight:i=!1,autoSelect:d=!1,blurOnSelect:m=!1,clearOnBlur:b=!e.freeSolo,clearOnEscape:v=!1,componentName:x="useAutocomplete",defaultValue:Z=(e.multiple?[]:null),disableClearable:y=!1,disableCloseOnSelect:O=!1,disabled:I,disabledItemsFocusable:S=!1,disableListWrap:P=!1,filterOptions:C=f,filterSelectedOptions:k=!1,freeSolo:L=!1,getOptionDisabled:w,getOptionKey:A,getOptionLabel:T=(e=>{var t;return null!=(t=e.label)?t:e}),groupBy:R,handleHomeEndKeys:M=!e.freeSolo,id:N,includeInputInList:D=!1,inputValue:E,isOptionEqualToValue:z=((e,t)=>e===t),multiple:F=!1,onChange:H,onClose:W,onHighlightChange:V,onInputChange:j,onOpen:B,open:q,openOnFocus:G=!1,options:K,readOnly:U=!1,selectOnFocus:_=!e.freeSolo,value:J}=e,Q=(0,l.Z)(N);let X=T;X=e=>{const t=T(e);return"string"!==typeof t?String(t):t};const Y=r.useRef(!1),$=r.useRef(!0),ee=r.useRef(null),te=r.useRef(null),[oe,ne]=r.useState(null),[ae,re]=r.useState(-1),ie=i?0:-1,le=r.useRef(ie),[ce,se]=(0,c.Z)({controlled:J,default:Z,name:x}),[pe,ue]=(0,c.Z)({controlled:E,default:"",name:x,state:"inputValue"}),[de,ge]=r.useState(!1),fe=r.useCallback(((e,t)=>{if(!(F?ce.length<t.length:null!==t)&&!b)return;let o;if(F)o="";else if(null==t)o="";else{const e=X(t);o="string"===typeof e?e:""}pe!==o&&(ue(o),j&&j(e,o,"reset"))}),[X,pe,F,j,ue,b,ce]),[he,me]=(0,c.Z)({controlled:q,default:!1,name:x,state:"open"}),[be,ve]=r.useState(!0),xe=!F&&null!=ce&&pe===X(ce),Ze=he&&!U,ye=Ze?C(K.filter((e=>!k||!(F?ce:[ce]).some((t=>null!==t&&z(e,t))))),{inputValue:xe&&be?"":pe,getOptionLabel:X}):[],Oe=(0,s.Z)({filteredOptions:ye,value:ce,inputValue:pe});r.useEffect((()=>{const e=ce!==Oe.value;de&&!e||L&&!e||fe(null,ce)}),[ce,fe,de,Oe.value,L]);const Ie=he&&ye.length>0&&!U;const Se=(0,p.Z)((e=>{-1===e?ee.current.focus():oe.querySelector('[data-tag-index="'.concat(e,'"]')).focus()}));r.useEffect((()=>{F&&ae>ce.length-1&&(re(-1),Se(-1))}),[ce,F,ae,Se]);const Pe=(0,p.Z)((e=>{let{event:t,index:n,reason:a="auto"}=e;if(le.current=n,-1===n?ee.current.removeAttribute("aria-activedescendant"):ee.current.setAttribute("aria-activedescendant","".concat(Q,"-option-").concat(n)),V&&V(t,-1===n?null:ye[n],a),!te.current)return;const r=te.current.querySelector('[role="option"].'.concat(o,"-focused"));r&&(r.classList.remove("".concat(o,"-focused")),r.classList.remove("".concat(o,"-focusVisible")));let i=te.current;if("listbox"!==te.current.getAttribute("role")&&(i=te.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===n)return void(i.scrollTop=0);const l=te.current.querySelector('[data-option-index="'.concat(n,'"]'));if(l&&(l.classList.add("".concat(o,"-focused")),"keyboard"===a&&l.classList.add("".concat(o,"-focusVisible")),i.scrollHeight>i.clientHeight&&"mouse"!==a&&"touch"!==a)){const e=l,t=i.clientHeight+i.scrollTop,o=e.offsetTop+e.offsetHeight;o>t?i.scrollTop=o-i.clientHeight:e.offsetTop-e.offsetHeight*(R?1.3:0)<i.scrollTop&&(i.scrollTop=e.offsetTop-e.offsetHeight*(R?1.3:0))}})),Ce=(0,p.Z)((e=>{let{event:t,diff:o,direction:a="next",reason:r="auto"}=e;if(!Ze)return;const i=function(e,t){if(!te.current||e<0||e>=ye.length)return-1;let o=e;for(;;){const n=te.current.querySelector('[data-option-index="'.concat(o,'"]')),a=!S&&(!n||n.disabled||"true"===n.getAttribute("aria-disabled"));if(n&&n.hasAttribute("tabindex")&&!a)return o;if(o="next"===t?(o+1)%ye.length:(o-1+ye.length)%ye.length,o===e)return-1}}((()=>{const e=ye.length-1;if("reset"===o)return ie;if("start"===o)return 0;if("end"===o)return e;const t=le.current+o;return t<0?-1===t&&D?-1:P&&-1!==le.current||Math.abs(o)>1?0:e:t>e?t===e+1&&D?-1:P||Math.abs(o)>1?e:0:t})(),a);if(Pe({index:i,reason:r,event:t}),n&&"reset"!==o)if(-1===i)ee.current.value=pe;else{const e=X(ye[i]);ee.current.value=e;0===e.toLowerCase().indexOf(pe.toLowerCase())&&pe.length>0&&ee.current.setSelectionRange(pe.length,e.length)}})),ke=r.useCallback((()=>{if(!Ze)return;const e=(()=>{if(-1!==le.current&&Oe.filteredOptions&&Oe.filteredOptions.length!==ye.length&&Oe.inputValue===pe&&(F?ce.length===Oe.value.length&&Oe.value.every(((e,t)=>X(ce[t])===X(e))):(e=Oe.value,t=ce,(e?X(e):"")===(t?X(t):"")))){const e=Oe.filteredOptions[le.current];if(e)return g(ye,(t=>X(t)===X(e)))}var e,t;return-1})();if(-1!==e)return void(le.current=e);const t=F?ce[0]:ce;if(0!==ye.length&&null!=t){if(te.current)if(null==t)le.current>=ye.length-1?Pe({index:ye.length-1}):Pe({index:le.current});else{const e=ye[le.current];if(F&&e&&-1!==g(ce,(t=>z(e,t))))return;const o=g(ye,(e=>z(e,t)));-1===o?Ce({diff:"reset"}):Pe({index:o})}}else Ce({diff:"reset"})}),[ye.length,!F&&ce,k,Ce,Pe,Ze,pe,F]),Le=(0,p.Z)((e=>{(0,u.Z)(te,e),e&&ke()}));r.useEffect((()=>{ke()}),[ke]);const we=e=>{he||(me(!0),ve(!0),B&&B(e))},Ae=(e,t)=>{he&&(me(!1),W&&W(e,t))},Te=(e,t,o,n)=>{if(F){if(ce.length===t.length&&ce.every(((e,o)=>e===t[o])))return}else if(ce===t)return;H&&H(e,t,o,n),se(t)},Re=r.useRef(!1),Me=function(e,t){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"selectOption",a=t;if(F){a=Array.isArray(ce)?ce.slice():[];const e=g(a,(e=>z(t,e)));-1===e?a.push(t):"freeSolo"!==o&&(a.splice(e,1),n="removeOption")}fe(e,a),Te(e,a,n,{option:t}),O||e&&(e.ctrlKey||e.metaKey)||Ae(e,n),(!0===m||"touch"===m&&Re.current||"mouse"===m&&!Re.current)&&ee.current.blur()};const Ne=(e,t)=>{if(!F)return;""===pe&&Ae(e,"toggleInput");let o=ae;-1===ae?""===pe&&"previous"===t&&(o=ce.length-1):(o+="next"===t?1:-1,o<0&&(o=0),o===ce.length&&(o=-1)),o=function(e,t){if(-1===e)return-1;let o=e;for(;;){if("next"===t&&o===ce.length||"previous"===t&&-1===o)return-1;const e=oe.querySelector('[data-tag-index="'.concat(o,'"]'));if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return o;o+="next"===t?1:-1}}(o,t),re(o),Se(o)},De=e=>{Y.current=!0,ue(""),j&&j(e,"","clear"),Te(e,F?[]:null,"clear")},Ee=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==ae&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(re(-1),Se(-1)),229!==t.which))switch(t.key){case"Home":Ze&&M&&(t.preventDefault(),Ce({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":Ze&&M&&(t.preventDefault(),Ce({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Ce({diff:-5,direction:"previous",reason:"keyboard",event:t}),we(t);break;case"PageDown":t.preventDefault(),Ce({diff:5,direction:"next",reason:"keyboard",event:t}),we(t);break;case"ArrowDown":t.preventDefault(),Ce({diff:1,direction:"next",reason:"keyboard",event:t}),we(t);break;case"ArrowUp":t.preventDefault(),Ce({diff:-1,direction:"previous",reason:"keyboard",event:t}),we(t);break;case"ArrowLeft":Ne(t,"previous");break;case"ArrowRight":Ne(t,"next");break;case"Enter":if(-1!==le.current&&Ze){const e=ye[le.current],o=!!w&&w(e);if(t.preventDefault(),o)return;Me(t,e,"selectOption"),n&&ee.current.setSelectionRange(ee.current.value.length,ee.current.value.length)}else L&&""!==pe&&!1===xe&&(F&&t.preventDefault(),Me(t,pe,"createOption","freeSolo"));break;case"Escape":Ze?(t.preventDefault(),t.stopPropagation(),Ae(t,"escape")):v&&(""!==pe||F&&ce.length>0)&&(t.preventDefault(),t.stopPropagation(),De(t));break;case"Backspace":if(F&&!U&&""===pe&&ce.length>0){const e=-1===ae?ce.length-1:ae,o=ce.slice();o.splice(e,1),Te(t,o,"removeOption",{option:ce[e]})}break;case"Delete":if(F&&!U&&""===pe&&ce.length>0&&-1!==ae){const e=ae,o=ce.slice();o.splice(e,1),Te(t,o,"removeOption",{option:ce[e]})}}},ze=e=>{ge(!0),G&&!Y.current&&we(e)},Fe=e=>{t(te)?ee.current.focus():(ge(!1),$.current=!0,Y.current=!1,d&&-1!==le.current&&Ze?Me(e,ye[le.current],"blur"):d&&L&&""!==pe?Me(e,pe,"blur","freeSolo"):b&&fe(e,ce),Ae(e,"blur"))},He=e=>{const t=e.target.value;pe!==t&&(ue(t),ve(!1),j&&j(e,t,"input")),""===t?y||F||Te(e,null,"clear"):we(e)},We=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));le.current!==t&&Pe({event:e,index:t,reason:"mouse"})},Ve=e=>{Pe({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Re.current=!0},je=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Me(e,ye[t],"selectOption"),Re.current=!1},Be=e=>t=>{const o=ce.slice();o.splice(e,1),Te(t,o,"removeOption",{option:ce[e]})},qe=e=>{he?Ae(e,"toggleInput"):we(e)},Ge=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==Q&&e.preventDefault()},Ke=e=>{e.currentTarget.contains(e.target)&&(ee.current.focus(),_&&$.current&&ee.current.selectionEnd-ee.current.selectionStart===0&&ee.current.select(),$.current=!1)},Ue=e=>{I||""!==pe&&he||qe(e)};let _e=L&&pe.length>0;_e=_e||(F?ce.length>0:null!==ce);let Je=ye;if(R){new Map;Je=ye.reduce(((e,t,o)=>{const n=R(t);return e.length>0&&e[e.length-1].group===n?e[e.length-1].options.push(t):e.push({key:o,index:o,group:n,options:[t]}),e}),[])}return I&&de&&Fe(),{getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({"aria-owns":Ie?"".concat(Q,"-listbox"):null},e,{onKeyDown:Ee(e),onMouseDown:Ge,onClick:Ke})},getInputLabelProps:()=>({id:"".concat(Q,"-label"),htmlFor:Q}),getInputProps:()=>({id:Q,value:pe,onBlur:Fe,onFocus:ze,onChange:He,onMouseDown:Ue,"aria-activedescendant":Ze?"":null,"aria-autocomplete":n?"both":"list","aria-controls":Ie?"".concat(Q,"-listbox"):void 0,"aria-expanded":Ie,autoComplete:"off",ref:ee,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:I}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:De}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:qe}),getTagProps:e=>{let{index:t}=e;return(0,a.Z)({key:t,"data-tag-index":t,tabIndex:-1},!U&&{onDelete:Be(t)})},getListboxProps:()=>({role:"listbox",id:"".concat(Q,"-listbox"),"aria-labelledby":"".concat(Q,"-label"),ref:Le,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:e=>{let{index:t,option:o}=e;var n;const a=(F?ce:[ce]).some((e=>null!=e&&z(o,e))),r=!!w&&w(o);return{key:null!=(n=null==A?void 0:A(o))?n:X(o),tabIndex:-1,role:"option",id:"".concat(Q,"-option-").concat(t),onMouseMove:We,onClick:je,onTouchStart:Ve,"data-option-index":t,"aria-disabled":r,"aria-selected":a}},id:Q,inputValue:pe,value:ce,dirty:_e,expanded:Ze&&oe,popupOpen:Ze,focused:de||-1!==ae,anchorEl:oe,setAnchorEl:ne,focusedTag:ae,groupedOptions:Je}}var b=o(82261),v=o(96295),x=o(49020),Z=o(62773),y=o(42908),O=o(6285),I=o(46849),S=o(96036);function P(e){return(0,S.ZP)("MuiListSubheader",e)}(0,I.Z)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var C=o(96266);const k=["className","color","component","disableGutters","disableSticky","inset"],L=(0,Z.ZP)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,"default"!==o.color&&t["color".concat((0,O.Z)(o.color))],!o.disableGutters&&t.gutters,o.inset&&t.inset,!o.disableSticky&&t.sticky]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.Z)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},"primary"===o.color&&{color:(t.vars||t).palette.primary.main},"inherit"===o.color&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})})),w=r.forwardRef((function(e,t){const o=(0,y.Z)({props:e,name:"MuiListSubheader"}),{className:r,color:l="default",component:c="li",disableGutters:s=!1,disableSticky:p=!1,inset:u=!1}=o,d=(0,n.Z)(o,k),g=(0,a.Z)({},o,{color:l,component:c,disableGutters:s,disableSticky:p,inset:u}),f=(e=>{const{classes:t,color:o,disableGutters:n,inset:a,disableSticky:r}=e,i={root:["root","default"!==o&&"color".concat((0,O.Z)(o)),!n&&"gutters",a&&"inset",!r&&"sticky"]};return(0,b.Z)(i,P,t)})(g);return(0,C.jsx)(L,(0,a.Z)({as:c,className:(0,i.Z)(f.root,r),ref:t,ownerState:g},d))}));w.muiSkipListHighlight=!0;const A=w;var T,R,M=o(25228),N=o(67680),D=o(19654),E=o(46234),z=o(9243),F=o(82226),H=o(75623),W=o(74235),V=o(60473),j=o(36809),B=o(43897),q=o(2286);const G=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],K=["ref"],U=(0,j.U)("MuiAutocomplete"),_=(0,Z.ZP)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e,{fullWidth:n,hasClearIcon:a,hasPopupIcon:r,inputFocused:i,size:l}=o;return[{["& .".concat(B.Z.tag)]:t.tag},{["& .".concat(B.Z.tag)]:t["tagSize".concat((0,O.Z)(l))]},{["& .".concat(B.Z.inputRoot)]:t.inputRoot},{["& .".concat(B.Z.input)]:t.input},{["& .".concat(B.Z.input)]:i&&t.inputFocused},t.root,n&&t.fullWidth,r&&t.hasPopupIcon,a&&t.hasClearIcon]}})({["&.".concat(B.Z.focused," .").concat(B.Z.clearIndicator)]:{visibility:"visible"},"@media (pointer: fine)":{["&:hover .".concat(B.Z.clearIndicator)]:{visibility:"visible"}},["& .".concat(B.Z.tag)]:{margin:3,maxWidth:"calc(100% - 6px)"},["& .".concat(B.Z.inputRoot)]:{flexWrap:"wrap",[".".concat(B.Z.hasPopupIcon,"&, .").concat(B.Z.hasClearIcon,"&")]:{paddingRight:30},[".".concat(B.Z.hasPopupIcon,".").concat(B.Z.hasClearIcon,"&")]:{paddingRight:56},["& .".concat(B.Z.input)]:{width:0,minWidth:30}},["& .".concat(E.Z.root)]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},["& .".concat(E.Z.root,".").concat(z.Z.sizeSmall)]:{["& .".concat(E.Z.input)]:{padding:"2px 4px 3px 0"}},["& .".concat(F.Z.root)]:{padding:9,[".".concat(B.Z.hasPopupIcon,"&, .").concat(B.Z.hasClearIcon,"&")]:{paddingRight:39},[".".concat(B.Z.hasPopupIcon,".").concat(B.Z.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(B.Z.input)]:{padding:"7.5px 4px 7.5px 5px"},["& .".concat(B.Z.endAdornment)]:{right:9}},["& .".concat(F.Z.root,".").concat(z.Z.sizeSmall)]:{paddingTop:6,paddingBottom:6,paddingLeft:6,["& .".concat(B.Z.input)]:{padding:"2.5px 4px 2.5px 8px"}},["& .".concat(H.Z.root)]:{paddingTop:19,paddingLeft:8,[".".concat(B.Z.hasPopupIcon,"&, .").concat(B.Z.hasClearIcon,"&")]:{paddingRight:39},[".".concat(B.Z.hasPopupIcon,".").concat(B.Z.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(H.Z.input)]:{padding:"7px 4px"},["& .".concat(B.Z.endAdornment)]:{right:9}},["& .".concat(H.Z.root,".").concat(z.Z.sizeSmall)]:{paddingBottom:1,["& .".concat(H.Z.input)]:{padding:"2.5px 4px"}},["& .".concat(z.Z.hiddenLabel)]:{paddingTop:8},["& .".concat(H.Z.root,".").concat(z.Z.hiddenLabel)]:{paddingTop:0,paddingBottom:0,["& .".concat(B.Z.input)]:{paddingTop:16,paddingBottom:17}},["& .".concat(H.Z.root,".").concat(z.Z.hiddenLabel,".").concat(z.Z.sizeSmall)]:{["& .".concat(B.Z.input)]:{paddingTop:8,paddingBottom:9}},["& .".concat(B.Z.input)]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{["& .".concat(B.Z.tag)]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{["& .".concat(B.Z.input)]:{opacity:1}}}]}),J=(0,Z.ZP)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Q=(0,Z.ZP)(N.Z,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),X=(0,Z.ZP)(N.Z,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{let{ownerState:o}=e;return(0,a.Z)({},t.popupIndicator,o.popupOpen&&t.popupIndicatorOpen)}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Y=(0,Z.ZP)(x.Z,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(B.Z.option)]:t.option},t.popper,o.disablePortal&&t.popperDisablePortal]}})((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}})),$=(0,Z.ZP)(M.Z,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{theme:t}=e;return(0,a.Z)({},t.typography.body1,{overflow:"auto"})})),ee=(0,Z.ZP)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}})),te=(0,Z.ZP)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}})),oe=(0,Z.ZP)("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((e=>{let{theme:t}=e;return{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",["& .".concat(B.Z.option)]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},["&.".concat(B.Z.focused)]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["&.".concat(B.Z.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,v.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(B.Z.focused)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,v.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(B.Z.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,v.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}}})),ne=(0,Z.ZP)(A,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,top:-8}})),ae=(0,Z.ZP)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,["& .".concat(B.Z.option)]:{paddingLeft:24}}),re=r.forwardRef((function(e,t){var o,l,c,s;const p=U({props:e,name:"MuiAutocomplete"}),{autoComplete:u=!1,autoHighlight:d=!1,autoSelect:g=!1,blurOnSelect:f=!1,ChipProps:h,className:v,clearIcon:Z=T||(T=(0,C.jsx)(W.Z,{fontSize:"small"})),clearOnBlur:y=!p.freeSolo,clearOnEscape:I=!1,clearText:S="Clear",closeText:P="Close",componentsProps:k={},defaultValue:L=(p.multiple?[]:null),disableClearable:w=!1,disableCloseOnSelect:A=!1,disabled:N=!1,disabledItemsFocusable:E=!1,disableListWrap:z=!1,disablePortal:F=!1,filterSelectedOptions:H=!1,forcePopupIcon:j="auto",freeSolo:re=!1,fullWidth:ie=!1,getLimitTagsText:le=(e=>"+".concat(e)),getOptionLabel:ce,groupBy:se,handleHomeEndKeys:pe=!p.freeSolo,includeInputInList:ue=!1,limitTags:de=-1,ListboxComponent:ge="ul",ListboxProps:fe,loading:he=!1,loadingText:me="Loading\u2026",multiple:be=!1,noOptionsText:ve="No options",openOnFocus:xe=!1,openText:Ze="Open",PaperComponent:ye=M.Z,PopperComponent:Oe=x.Z,popupIcon:Ie=R||(R=(0,C.jsx)(V.Z,{})),readOnly:Se=!1,renderGroup:Pe,renderInput:Ce,renderOption:ke,renderTags:Le,selectOnFocus:we=!p.freeSolo,size:Ae="medium",slotProps:Te={}}=p,Re=(0,n.Z)(p,G),{getRootProps:Me,getInputProps:Ne,getInputLabelProps:De,getPopupIndicatorProps:Ee,getClearProps:ze,getTagProps:Fe,getListboxProps:He,getOptionProps:We,value:Ve,dirty:je,expanded:Be,id:qe,popupOpen:Ge,focused:Ke,focusedTag:Ue,anchorEl:_e,setAnchorEl:Je,inputValue:Qe,groupedOptions:Xe}=m((0,a.Z)({},p,{componentName:"Autocomplete"})),Ye=!w&&!N&&je&&!Se,$e=(!re||!0===j)&&!1!==j,{onMouseDown:et}=Ne(),{ref:tt}=null!=fe?fe:{},ot=He(),{ref:nt}=ot,at=(0,n.Z)(ot,K),rt=(0,q.Z)(nt,tt),it=ce||(e=>{var t;return null!=(t=e.label)?t:e}),lt=(0,a.Z)({},p,{disablePortal:F,expanded:Be,focused:Ke,fullWidth:ie,getOptionLabel:it,hasClearIcon:Ye,hasPopupIcon:$e,inputFocused:-1===Ue,popupOpen:Ge,size:Ae}),ct=(e=>{const{classes:t,disablePortal:o,expanded:n,focused:a,fullWidth:r,hasClearIcon:i,hasPopupIcon:l,inputFocused:c,popupOpen:s,size:p}=e,u={root:["root",n&&"expanded",a&&"focused",r&&"fullWidth",i&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",c&&"inputFocused"],tag:["tag","tagSize".concat((0,O.Z)(p))],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",s&&"popupIndicatorOpen"],popper:["popper",o&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,b.Z)(u,B.q,t)})(lt);let st;if(be&&Ve.length>0){const e=e=>(0,a.Z)({className:ct.tag,disabled:N},Fe(e));st=Le?Le(Ve,e,lt):Ve.map(((t,o)=>(0,C.jsx)(D.Z,(0,a.Z)({label:it(t),size:Ae},e({index:o}),h))))}if(de>-1&&Array.isArray(st)){const e=st.length-de;!Ke&&e>0&&(st=st.splice(0,de),st.push((0,C.jsx)("span",{className:ct.tag,children:le(e)},st.length)))}const pt=Pe||(e=>(0,C.jsxs)("li",{children:[(0,C.jsx)(ne,{className:ct.groupLabel,ownerState:lt,component:"div",children:e.group}),(0,C.jsx)(ae,{className:ct.groupUl,ownerState:lt,children:e.children})]},e.key)),ut=ke||((e,t)=>(0,r.createElement)("li",(0,a.Z)({},e,{key:e.key}),it(t))),dt=(e,t)=>{const o=We({option:e,index:t});return ut((0,a.Z)({},o,{className:ct.option}),e,{selected:o["aria-selected"],index:t,inputValue:Qe},lt)},gt=null!=(o=Te.clearIndicator)?o:k.clearIndicator,ft=null!=(l=Te.paper)?l:k.paper,ht=null!=(c=Te.popper)?c:k.popper,mt=null!=(s=Te.popupIndicator)?s:k.popupIndicator,bt=e=>(0,C.jsx)(Y,(0,a.Z)({as:Oe,disablePortal:F,style:{width:_e?_e.clientWidth:null},ownerState:lt,role:"presentation",anchorEl:_e,open:Ge},ht,{className:(0,i.Z)(ct.popper,null==ht?void 0:ht.className),children:(0,C.jsx)($,(0,a.Z)({ownerState:lt,as:ye},ft,{className:(0,i.Z)(ct.paper,null==ft?void 0:ft.className),children:e}))}));let vt=null;return!he&&Xe.length>0?vt=bt((0,C.jsx)(oe,(0,a.Z)({as:ge,className:ct.listbox,ownerState:lt},at,fe,{ref:rt,children:Xe.map(((e,t)=>se?pt({key:e.key,group:e.group,children:e.options.map(((t,o)=>dt(t,e.index+o)))}):dt(e,t)))}))):he&&0===Xe.length?vt=bt((0,C.jsx)(ee,{className:ct.loading,ownerState:lt,children:me})):0!==Xe.length||re||he||(vt=bt((0,C.jsx)(te,{className:ct.noOptions,ownerState:lt,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:ve}))),(0,C.jsxs)(r.Fragment,{children:[(0,C.jsx)(_,(0,a.Z)({ref:t,className:(0,i.Z)(ct.root,v),ownerState:lt},Me(Re),{children:Ce({id:qe,disabled:N,fullWidth:!0,size:"small"===Ae?"small":void 0,InputLabelProps:De(),InputProps:(0,a.Z)({ref:Je,className:ct.inputRoot,startAdornment:st,onClick:e=>{e.target===e.currentTarget&&et(e)}},(Ye||$e)&&{endAdornment:(0,C.jsxs)(J,{className:ct.endAdornment,ownerState:lt,children:[Ye?(0,C.jsx)(Q,(0,a.Z)({},ze(),{"aria-label":S,title:S,ownerState:lt},gt,{className:(0,i.Z)(ct.clearIndicator,null==gt?void 0:gt.className),children:Z})):null,$e?(0,C.jsx)(X,(0,a.Z)({},Ee(),{disabled:N,"aria-label":Ge?P:Ze,title:Ge?P:Ze,ownerState:lt},mt,{className:(0,i.Z)(ct.popupIndicator,null==mt?void 0:mt.className),children:Ie})):null]})}),inputProps:(0,a.Z)({className:ct.input,disabled:N,readOnly:Se},Ne())})})),_e?vt:null]})}))},43897:(e,t,o)=>{"use strict";o.d(t,{Z:()=>i,q:()=>r});var n=o(46849),a=o(96036);function r(e){return(0,a.ZP)("MuiAutocomplete",e)}const i=(0,n.Z)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"])},50482:(e,t,o)=>{var n=o(23800);e.exports=function(e,t){return n(e,t)}}}]);
|
|
1
|
+
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4852],{39646:(e,t,o)=>{"use strict";o.d(t,{Z:()=>re});var n=o(29218),a=o(7896),r=o(5057),i=o(9978),l=o(41366),c=o(83026),s=o(17821),p=o(48272),u=o(10252);function d(e){return"undefined"!==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function g(e,t){for(let o=0;o<e.length;o+=1)if(t(e[o]))return o;return-1}const f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{ignoreAccents:t=!0,ignoreCase:o=!0,limit:n,matchFrom:a="any",stringify:r,trim:i=!1}=e;return(e,l)=>{let{inputValue:c,getOptionLabel:s}=l,p=i?c.trim():c;o&&(p=p.toLowerCase()),t&&(p=d(p));const u=p?e.filter((e=>{let n=(r||s)(e);return o&&(n=n.toLowerCase()),t&&(n=d(n)),"start"===a?0===n.indexOf(p):n.indexOf(p)>-1})):e;return"number"===typeof n?u.slice(0,n):u}}(),h=e=>{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))};function m(e){const{unstable_isActiveElementInListbox:t=h,unstable_classNamePrefix:o="Mui",autoComplete:n=!1,autoHighlight:i=!1,autoSelect:d=!1,blurOnSelect:m=!1,clearOnBlur:b=!e.freeSolo,clearOnEscape:v=!1,componentName:x="useAutocomplete",defaultValue:Z=(e.multiple?[]:null),disableClearable:y=!1,disableCloseOnSelect:O=!1,disabled:I,disabledItemsFocusable:S=!1,disableListWrap:P=!1,filterOptions:C=f,filterSelectedOptions:k=!1,freeSolo:L=!1,getOptionDisabled:w,getOptionKey:A,getOptionLabel:T=(e=>{var t;return null!=(t=e.label)?t:e}),groupBy:R,handleHomeEndKeys:M=!e.freeSolo,id:N,includeInputInList:D=!1,inputValue:E,isOptionEqualToValue:z=((e,t)=>e===t),multiple:F=!1,onChange:H,onClose:W,onHighlightChange:V,onInputChange:j,onOpen:B,open:q,openOnFocus:G=!1,options:K,readOnly:U=!1,selectOnFocus:_=!e.freeSolo,value:J}=e,Q=(0,l.Z)(N);let X=T;X=e=>{const t=T(e);return"string"!==typeof t?String(t):t};const Y=r.useRef(!1),$=r.useRef(!0),ee=r.useRef(null),te=r.useRef(null),[oe,ne]=r.useState(null),[ae,re]=r.useState(-1),ie=i?0:-1,le=r.useRef(ie),[ce,se]=(0,c.Z)({controlled:J,default:Z,name:x}),[pe,ue]=(0,c.Z)({controlled:E,default:"",name:x,state:"inputValue"}),[de,ge]=r.useState(!1),fe=r.useCallback(((e,t)=>{if(!(F?ce.length<t.length:null!==t)&&!b)return;let o;if(F)o="";else if(null==t)o="";else{const e=X(t);o="string"===typeof e?e:""}pe!==o&&(ue(o),j&&j(e,o,"reset"))}),[X,pe,F,j,ue,b,ce]),[he,me]=(0,c.Z)({controlled:q,default:!1,name:x,state:"open"}),[be,ve]=r.useState(!0),xe=!F&&null!=ce&&pe===X(ce),Ze=he&&!U,ye=Ze?C(K.filter((e=>!k||!(F?ce:[ce]).some((t=>null!==t&&z(e,t))))),{inputValue:xe&&be?"":pe,getOptionLabel:X}):[],Oe=(0,s.Z)({filteredOptions:ye,value:ce,inputValue:pe});r.useEffect((()=>{const e=ce!==Oe.value;de&&!e||L&&!e||fe(null,ce)}),[ce,fe,de,Oe.value,L]);const Ie=he&&ye.length>0&&!U;const Se=(0,p.Z)((e=>{-1===e?ee.current.focus():oe.querySelector('[data-tag-index="'.concat(e,'"]')).focus()}));r.useEffect((()=>{F&&ae>ce.length-1&&(re(-1),Se(-1))}),[ce,F,ae,Se]);const Pe=(0,p.Z)((e=>{let{event:t,index:n,reason:a="auto"}=e;if(le.current=n,-1===n?ee.current.removeAttribute("aria-activedescendant"):ee.current.setAttribute("aria-activedescendant","".concat(Q,"-option-").concat(n)),V&&V(t,-1===n?null:ye[n],a),!te.current)return;const r=te.current.querySelector('[role="option"].'.concat(o,"-focused"));r&&(r.classList.remove("".concat(o,"-focused")),r.classList.remove("".concat(o,"-focusVisible")));let i=te.current;if("listbox"!==te.current.getAttribute("role")&&(i=te.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===n)return void(i.scrollTop=0);const l=te.current.querySelector('[data-option-index="'.concat(n,'"]'));if(l&&(l.classList.add("".concat(o,"-focused")),"keyboard"===a&&l.classList.add("".concat(o,"-focusVisible")),i.scrollHeight>i.clientHeight&&"mouse"!==a&&"touch"!==a)){const e=l,t=i.clientHeight+i.scrollTop,o=e.offsetTop+e.offsetHeight;o>t?i.scrollTop=o-i.clientHeight:e.offsetTop-e.offsetHeight*(R?1.3:0)<i.scrollTop&&(i.scrollTop=e.offsetTop-e.offsetHeight*(R?1.3:0))}})),Ce=(0,p.Z)((e=>{let{event:t,diff:o,direction:a="next",reason:r="auto"}=e;if(!Ze)return;const i=function(e,t){if(!te.current||e<0||e>=ye.length)return-1;let o=e;for(;;){const n=te.current.querySelector('[data-option-index="'.concat(o,'"]')),a=!S&&(!n||n.disabled||"true"===n.getAttribute("aria-disabled"));if(n&&n.hasAttribute("tabindex")&&!a)return o;if(o="next"===t?(o+1)%ye.length:(o-1+ye.length)%ye.length,o===e)return-1}}((()=>{const e=ye.length-1;if("reset"===o)return ie;if("start"===o)return 0;if("end"===o)return e;const t=le.current+o;return t<0?-1===t&&D?-1:P&&-1!==le.current||Math.abs(o)>1?0:e:t>e?t===e+1&&D?-1:P||Math.abs(o)>1?e:0:t})(),a);if(Pe({index:i,reason:r,event:t}),n&&"reset"!==o)if(-1===i)ee.current.value=pe;else{const e=X(ye[i]);ee.current.value=e;0===e.toLowerCase().indexOf(pe.toLowerCase())&&pe.length>0&&ee.current.setSelectionRange(pe.length,e.length)}})),ke=r.useCallback((()=>{if(!Ze)return;const e=(()=>{if(-1!==le.current&&Oe.filteredOptions&&Oe.filteredOptions.length!==ye.length&&Oe.inputValue===pe&&(F?ce.length===Oe.value.length&&Oe.value.every(((e,t)=>X(ce[t])===X(e))):(e=Oe.value,t=ce,(e?X(e):"")===(t?X(t):"")))){const e=Oe.filteredOptions[le.current];if(e)return g(ye,(t=>X(t)===X(e)))}var e,t;return-1})();if(-1!==e)return void(le.current=e);const t=F?ce[0]:ce;if(0!==ye.length&&null!=t){if(te.current)if(null==t)le.current>=ye.length-1?Pe({index:ye.length-1}):Pe({index:le.current});else{const e=ye[le.current];if(F&&e&&-1!==g(ce,(t=>z(e,t))))return;const o=g(ye,(e=>z(e,t)));-1===o?Ce({diff:"reset"}):Pe({index:o})}}else Ce({diff:"reset"})}),[ye.length,!F&&ce,k,Ce,Pe,Ze,pe,F]),Le=(0,p.Z)((e=>{(0,u.Z)(te,e),e&&ke()}));r.useEffect((()=>{ke()}),[ke]);const we=e=>{he||(me(!0),ve(!0),B&&B(e))},Ae=(e,t)=>{he&&(me(!1),W&&W(e,t))},Te=(e,t,o,n)=>{if(F){if(ce.length===t.length&&ce.every(((e,o)=>e===t[o])))return}else if(ce===t)return;H&&H(e,t,o,n),se(t)},Re=r.useRef(!1),Me=function(e,t){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"selectOption",a=t;if(F){a=Array.isArray(ce)?ce.slice():[];const e=g(a,(e=>z(t,e)));-1===e?a.push(t):"freeSolo"!==o&&(a.splice(e,1),n="removeOption")}fe(e,a),Te(e,a,n,{option:t}),O||e&&(e.ctrlKey||e.metaKey)||Ae(e,n),(!0===m||"touch"===m&&Re.current||"mouse"===m&&!Re.current)&&ee.current.blur()};const Ne=(e,t)=>{if(!F)return;""===pe&&Ae(e,"toggleInput");let o=ae;-1===ae?""===pe&&"previous"===t&&(o=ce.length-1):(o+="next"===t?1:-1,o<0&&(o=0),o===ce.length&&(o=-1)),o=function(e,t){if(-1===e)return-1;let o=e;for(;;){if("next"===t&&o===ce.length||"previous"===t&&-1===o)return-1;const e=oe.querySelector('[data-tag-index="'.concat(o,'"]'));if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return o;o+="next"===t?1:-1}}(o,t),re(o),Se(o)},De=e=>{Y.current=!0,ue(""),j&&j(e,"","clear"),Te(e,F?[]:null,"clear")},Ee=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==ae&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(re(-1),Se(-1)),229!==t.which))switch(t.key){case"Home":Ze&&M&&(t.preventDefault(),Ce({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":Ze&&M&&(t.preventDefault(),Ce({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Ce({diff:-5,direction:"previous",reason:"keyboard",event:t}),we(t);break;case"PageDown":t.preventDefault(),Ce({diff:5,direction:"next",reason:"keyboard",event:t}),we(t);break;case"ArrowDown":t.preventDefault(),Ce({diff:1,direction:"next",reason:"keyboard",event:t}),we(t);break;case"ArrowUp":t.preventDefault(),Ce({diff:-1,direction:"previous",reason:"keyboard",event:t}),we(t);break;case"ArrowLeft":Ne(t,"previous");break;case"ArrowRight":Ne(t,"next");break;case"Enter":if(-1!==le.current&&Ze){const e=ye[le.current],o=!!w&&w(e);if(t.preventDefault(),o)return;Me(t,e,"selectOption"),n&&ee.current.setSelectionRange(ee.current.value.length,ee.current.value.length)}else L&&""!==pe&&!1===xe&&(F&&t.preventDefault(),Me(t,pe,"createOption","freeSolo"));break;case"Escape":Ze?(t.preventDefault(),t.stopPropagation(),Ae(t,"escape")):v&&(""!==pe||F&&ce.length>0)&&(t.preventDefault(),t.stopPropagation(),De(t));break;case"Backspace":if(F&&!U&&""===pe&&ce.length>0){const e=-1===ae?ce.length-1:ae,o=ce.slice();o.splice(e,1),Te(t,o,"removeOption",{option:ce[e]})}break;case"Delete":if(F&&!U&&""===pe&&ce.length>0&&-1!==ae){const e=ae,o=ce.slice();o.splice(e,1),Te(t,o,"removeOption",{option:ce[e]})}}},ze=e=>{ge(!0),G&&!Y.current&&we(e)},Fe=e=>{t(te)?ee.current.focus():(ge(!1),$.current=!0,Y.current=!1,d&&-1!==le.current&&Ze?Me(e,ye[le.current],"blur"):d&&L&&""!==pe?Me(e,pe,"blur","freeSolo"):b&&fe(e,ce),Ae(e,"blur"))},He=e=>{const t=e.target.value;pe!==t&&(ue(t),ve(!1),j&&j(e,t,"input")),""===t?y||F||Te(e,null,"clear"):we(e)},We=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));le.current!==t&&Pe({event:e,index:t,reason:"mouse"})},Ve=e=>{Pe({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Re.current=!0},je=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Me(e,ye[t],"selectOption"),Re.current=!1},Be=e=>t=>{const o=ce.slice();o.splice(e,1),Te(t,o,"removeOption",{option:ce[e]})},qe=e=>{he?Ae(e,"toggleInput"):we(e)},Ge=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==Q&&e.preventDefault()},Ke=e=>{e.currentTarget.contains(e.target)&&(ee.current.focus(),_&&$.current&&ee.current.selectionEnd-ee.current.selectionStart===0&&ee.current.select(),$.current=!1)},Ue=e=>{I||""!==pe&&he||qe(e)};let _e=L&&pe.length>0;_e=_e||(F?ce.length>0:null!==ce);let Je=ye;if(R){new Map;Je=ye.reduce(((e,t,o)=>{const n=R(t);return e.length>0&&e[e.length-1].group===n?e[e.length-1].options.push(t):e.push({key:o,index:o,group:n,options:[t]}),e}),[])}return I&&de&&Fe(),{getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({"aria-owns":Ie?"".concat(Q,"-listbox"):null},e,{onKeyDown:Ee(e),onMouseDown:Ge,onClick:Ke})},getInputLabelProps:()=>({id:"".concat(Q,"-label"),htmlFor:Q}),getInputProps:()=>({id:Q,value:pe,onBlur:Fe,onFocus:ze,onChange:He,onMouseDown:Ue,"aria-activedescendant":Ze?"":null,"aria-autocomplete":n?"both":"list","aria-controls":Ie?"".concat(Q,"-listbox"):void 0,"aria-expanded":Ie,autoComplete:"off",ref:ee,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:I}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:De}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:qe}),getTagProps:e=>{let{index:t}=e;return(0,a.Z)({key:t,"data-tag-index":t,tabIndex:-1},!U&&{onDelete:Be(t)})},getListboxProps:()=>({role:"listbox",id:"".concat(Q,"-listbox"),"aria-labelledby":"".concat(Q,"-label"),ref:Le,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:e=>{let{index:t,option:o}=e;var n;const a=(F?ce:[ce]).some((e=>null!=e&&z(o,e))),r=!!w&&w(o);return{key:null!=(n=null==A?void 0:A(o))?n:X(o),tabIndex:-1,role:"option",id:"".concat(Q,"-option-").concat(t),onMouseMove:We,onClick:je,onTouchStart:Ve,"data-option-index":t,"aria-disabled":r,"aria-selected":a}},id:Q,inputValue:pe,value:ce,dirty:_e,expanded:Ze&&oe,popupOpen:Ze,focused:de||-1!==ae,anchorEl:oe,setAnchorEl:ne,focusedTag:ae,groupedOptions:Je}}var b=o(82261),v=o(96295),x=o(49020),Z=o(62773),y=o(42908),O=o(6285),I=o(46849),S=o(96036);function P(e){return(0,S.ZP)("MuiListSubheader",e)}(0,I.Z)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var C=o(96266);const k=["className","color","component","disableGutters","disableSticky","inset"],L=(0,Z.ZP)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,"default"!==o.color&&t["color".concat((0,O.Z)(o.color))],!o.disableGutters&&t.gutters,o.inset&&t.inset,!o.disableSticky&&t.sticky]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.Z)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},"primary"===o.color&&{color:(t.vars||t).palette.primary.main},"inherit"===o.color&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})})),w=r.forwardRef((function(e,t){const o=(0,y.Z)({props:e,name:"MuiListSubheader"}),{className:r,color:l="default",component:c="li",disableGutters:s=!1,disableSticky:p=!1,inset:u=!1}=o,d=(0,n.Z)(o,k),g=(0,a.Z)({},o,{color:l,component:c,disableGutters:s,disableSticky:p,inset:u}),f=(e=>{const{classes:t,color:o,disableGutters:n,inset:a,disableSticky:r}=e,i={root:["root","default"!==o&&"color".concat((0,O.Z)(o)),!n&&"gutters",a&&"inset",!r&&"sticky"]};return(0,b.Z)(i,P,t)})(g);return(0,C.jsx)(L,(0,a.Z)({as:c,className:(0,i.Z)(f.root,r),ref:t,ownerState:g},d))}));w.muiSkipListHighlight=!0;const A=w;var T,R,M=o(25228),N=o(67680),D=o(19654),E=o(46234),z=o(9243),F=o(82226),H=o(75623),W=o(74235),V=o(60473),j=o(36809),B=o(43897),q=o(2286);const G=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],K=["ref"],U=(0,j.U)("MuiAutocomplete"),_=(0,Z.ZP)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e,{fullWidth:n,hasClearIcon:a,hasPopupIcon:r,inputFocused:i,size:l}=o;return[{["& .".concat(B.Z.tag)]:t.tag},{["& .".concat(B.Z.tag)]:t["tagSize".concat((0,O.Z)(l))]},{["& .".concat(B.Z.inputRoot)]:t.inputRoot},{["& .".concat(B.Z.input)]:t.input},{["& .".concat(B.Z.input)]:i&&t.inputFocused},t.root,n&&t.fullWidth,r&&t.hasPopupIcon,a&&t.hasClearIcon]}})({["&.".concat(B.Z.focused," .").concat(B.Z.clearIndicator)]:{visibility:"visible"},"@media (pointer: fine)":{["&:hover .".concat(B.Z.clearIndicator)]:{visibility:"visible"}},["& .".concat(B.Z.tag)]:{margin:3,maxWidth:"calc(100% - 6px)"},["& .".concat(B.Z.inputRoot)]:{flexWrap:"wrap",[".".concat(B.Z.hasPopupIcon,"&, .").concat(B.Z.hasClearIcon,"&")]:{paddingRight:30},[".".concat(B.Z.hasPopupIcon,".").concat(B.Z.hasClearIcon,"&")]:{paddingRight:56},["& .".concat(B.Z.input)]:{width:0,minWidth:30}},["& .".concat(E.Z.root)]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},["& .".concat(E.Z.root,".").concat(z.Z.sizeSmall)]:{["& .".concat(E.Z.input)]:{padding:"2px 4px 3px 0"}},["& .".concat(F.Z.root)]:{padding:9,[".".concat(B.Z.hasPopupIcon,"&, .").concat(B.Z.hasClearIcon,"&")]:{paddingRight:39},[".".concat(B.Z.hasPopupIcon,".").concat(B.Z.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(B.Z.input)]:{padding:"7.5px 4px 7.5px 5px"},["& .".concat(B.Z.endAdornment)]:{right:9}},["& .".concat(F.Z.root,".").concat(z.Z.sizeSmall)]:{paddingTop:6,paddingBottom:6,paddingLeft:6,["& .".concat(B.Z.input)]:{padding:"2.5px 4px 2.5px 8px"}},["& .".concat(H.Z.root)]:{paddingTop:19,paddingLeft:8,[".".concat(B.Z.hasPopupIcon,"&, .").concat(B.Z.hasClearIcon,"&")]:{paddingRight:39},[".".concat(B.Z.hasPopupIcon,".").concat(B.Z.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(H.Z.input)]:{padding:"7px 4px"},["& .".concat(B.Z.endAdornment)]:{right:9}},["& .".concat(H.Z.root,".").concat(z.Z.sizeSmall)]:{paddingBottom:1,["& .".concat(H.Z.input)]:{padding:"2.5px 4px"}},["& .".concat(z.Z.hiddenLabel)]:{paddingTop:8},["& .".concat(H.Z.root,".").concat(z.Z.hiddenLabel)]:{paddingTop:0,paddingBottom:0,["& .".concat(B.Z.input)]:{paddingTop:16,paddingBottom:17}},["& .".concat(H.Z.root,".").concat(z.Z.hiddenLabel,".").concat(z.Z.sizeSmall)]:{["& .".concat(B.Z.input)]:{paddingTop:8,paddingBottom:9}},["& .".concat(B.Z.input)]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{["& .".concat(B.Z.tag)]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{["& .".concat(B.Z.input)]:{opacity:1}}}]}),J=(0,Z.ZP)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Q=(0,Z.ZP)(N.Z,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),X=(0,Z.ZP)(N.Z,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{let{ownerState:o}=e;return(0,a.Z)({},t.popupIndicator,o.popupOpen&&t.popupIndicatorOpen)}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Y=(0,Z.ZP)(x.Z,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(B.Z.option)]:t.option},t.popper,o.disablePortal&&t.popperDisablePortal]}})((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}})),$=(0,Z.ZP)(M.Z,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{theme:t}=e;return(0,a.Z)({},t.typography.body1,{overflow:"auto"})})),ee=(0,Z.ZP)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}})),te=(0,Z.ZP)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}})),oe=(0,Z.ZP)("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((e=>{let{theme:t}=e;return{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",["& .".concat(B.Z.option)]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},["&.".concat(B.Z.focused)]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["&.".concat(B.Z.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,v.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(B.Z.focused)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,v.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(B.Z.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,v.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}}})),ne=(0,Z.ZP)(A,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,top:-8}})),ae=(0,Z.ZP)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,["& .".concat(B.Z.option)]:{paddingLeft:24}}),re=r.forwardRef((function(e,t){var o,l,c,s;const p=U({props:e,name:"MuiAutocomplete"}),{autoComplete:u=!1,autoHighlight:d=!1,autoSelect:g=!1,blurOnSelect:f=!1,ChipProps:h,className:v,clearIcon:Z=T||(T=(0,C.jsx)(W.Z,{fontSize:"small"})),clearOnBlur:y=!p.freeSolo,clearOnEscape:I=!1,clearText:S="Clear",closeText:P="Close",componentsProps:k={},defaultValue:L=(p.multiple?[]:null),disableClearable:w=!1,disableCloseOnSelect:A=!1,disabled:N=!1,disabledItemsFocusable:E=!1,disableListWrap:z=!1,disablePortal:F=!1,filterSelectedOptions:H=!1,forcePopupIcon:j="auto",freeSolo:re=!1,fullWidth:ie=!1,getLimitTagsText:le=(e=>"+".concat(e)),getOptionLabel:ce,groupBy:se,handleHomeEndKeys:pe=!p.freeSolo,includeInputInList:ue=!1,limitTags:de=-1,ListboxComponent:ge="ul",ListboxProps:fe,loading:he=!1,loadingText:me="Loading\u2026",multiple:be=!1,noOptionsText:ve="No options",openOnFocus:xe=!1,openText:Ze="Open",PaperComponent:ye=M.Z,PopperComponent:Oe=x.Z,popupIcon:Ie=R||(R=(0,C.jsx)(V.Z,{})),readOnly:Se=!1,renderGroup:Pe,renderInput:Ce,renderOption:ke,renderTags:Le,selectOnFocus:we=!p.freeSolo,size:Ae="medium",slotProps:Te={}}=p,Re=(0,n.Z)(p,G),{getRootProps:Me,getInputProps:Ne,getInputLabelProps:De,getPopupIndicatorProps:Ee,getClearProps:ze,getTagProps:Fe,getListboxProps:He,getOptionProps:We,value:Ve,dirty:je,expanded:Be,id:qe,popupOpen:Ge,focused:Ke,focusedTag:Ue,anchorEl:_e,setAnchorEl:Je,inputValue:Qe,groupedOptions:Xe}=m((0,a.Z)({},p,{componentName:"Autocomplete"})),Ye=!w&&!N&&je&&!Se,$e=(!re||!0===j)&&!1!==j,{onMouseDown:et}=Ne(),{ref:tt}=null!=fe?fe:{},ot=He(),{ref:nt}=ot,at=(0,n.Z)(ot,K),rt=(0,q.Z)(nt,tt),it=ce||(e=>{var t;return null!=(t=e.label)?t:e}),lt=(0,a.Z)({},p,{disablePortal:F,expanded:Be,focused:Ke,fullWidth:ie,getOptionLabel:it,hasClearIcon:Ye,hasPopupIcon:$e,inputFocused:-1===Ue,popupOpen:Ge,size:Ae}),ct=(e=>{const{classes:t,disablePortal:o,expanded:n,focused:a,fullWidth:r,hasClearIcon:i,hasPopupIcon:l,inputFocused:c,popupOpen:s,size:p}=e,u={root:["root",n&&"expanded",a&&"focused",r&&"fullWidth",i&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",c&&"inputFocused"],tag:["tag","tagSize".concat((0,O.Z)(p))],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",s&&"popupIndicatorOpen"],popper:["popper",o&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,b.Z)(u,B.q,t)})(lt);let st;if(be&&Ve.length>0){const e=e=>(0,a.Z)({className:ct.tag,disabled:N},Fe(e));st=Le?Le(Ve,e,lt):Ve.map(((t,o)=>(0,C.jsx)(D.Z,(0,a.Z)({label:it(t),size:Ae},e({index:o}),h))))}if(de>-1&&Array.isArray(st)){const e=st.length-de;!Ke&&e>0&&(st=st.splice(0,de),st.push((0,C.jsx)("span",{className:ct.tag,children:le(e)},st.length)))}const pt=Pe||(e=>(0,C.jsxs)("li",{children:[(0,C.jsx)(ne,{className:ct.groupLabel,ownerState:lt,component:"div",children:e.group}),(0,C.jsx)(ae,{className:ct.groupUl,ownerState:lt,children:e.children})]},e.key)),ut=ke||((e,t)=>(0,r.createElement)("li",(0,a.Z)({},e,{key:e.key}),it(t))),dt=(e,t)=>{const o=We({option:e,index:t});return ut((0,a.Z)({},o,{className:ct.option}),e,{selected:o["aria-selected"],index:t,inputValue:Qe},lt)},gt=null!=(o=Te.clearIndicator)?o:k.clearIndicator,ft=null!=(l=Te.paper)?l:k.paper,ht=null!=(c=Te.popper)?c:k.popper,mt=null!=(s=Te.popupIndicator)?s:k.popupIndicator,bt=e=>(0,C.jsx)(Y,(0,a.Z)({as:Oe,disablePortal:F,style:{width:_e?_e.clientWidth:null},ownerState:lt,role:"presentation",anchorEl:_e,open:Ge},ht,{className:(0,i.Z)(ct.popper,null==ht?void 0:ht.className),children:(0,C.jsx)($,(0,a.Z)({ownerState:lt,as:ye},ft,{className:(0,i.Z)(ct.paper,null==ft?void 0:ft.className),children:e}))}));let vt=null;return Xe.length>0?vt=bt((0,C.jsx)(oe,(0,a.Z)({as:ge,className:ct.listbox,ownerState:lt},at,fe,{ref:rt,children:Xe.map(((e,t)=>se?pt({key:e.key,group:e.group,children:e.options.map(((t,o)=>dt(t,e.index+o)))}):dt(e,t)))}))):he&&0===Xe.length?vt=bt((0,C.jsx)(ee,{className:ct.loading,ownerState:lt,children:me})):0!==Xe.length||re||he||(vt=bt((0,C.jsx)(te,{className:ct.noOptions,ownerState:lt,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:ve}))),(0,C.jsxs)(r.Fragment,{children:[(0,C.jsx)(_,(0,a.Z)({ref:t,className:(0,i.Z)(ct.root,v),ownerState:lt},Me(Re),{children:Ce({id:qe,disabled:N,fullWidth:!0,size:"small"===Ae?"small":void 0,InputLabelProps:De(),InputProps:(0,a.Z)({ref:Je,className:ct.inputRoot,startAdornment:st,onClick:e=>{e.target===e.currentTarget&&et(e)}},(Ye||$e)&&{endAdornment:(0,C.jsxs)(J,{className:ct.endAdornment,ownerState:lt,children:[Ye?(0,C.jsx)(Q,(0,a.Z)({},ze(),{"aria-label":S,title:S,ownerState:lt},gt,{className:(0,i.Z)(ct.clearIndicator,null==gt?void 0:gt.className),children:Z})):null,$e?(0,C.jsx)(X,(0,a.Z)({},Ee(),{disabled:N,"aria-label":Ge?P:Ze,title:Ge?P:Ze,ownerState:lt},mt,{className:(0,i.Z)(ct.popupIndicator,null==mt?void 0:mt.className),children:Ie})):null]})}),inputProps:(0,a.Z)({className:ct.input,disabled:N,readOnly:Se},Ne())})})),_e?vt:null]})}))},43897:(e,t,o)=>{"use strict";o.d(t,{Z:()=>i,q:()=>r});var n=o(46849),a=o(96036);function r(e){return(0,a.ZP)("MuiAutocomplete",e)}const i=(0,n.Z)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"])},50482:(e,t,o)=>{var n=o(23800);e.exports=function(e,t){return n(e,t)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4906],{7199:(e,t,n)=>{n.d(t,{V:()=>s.V,Z:()=>s.Z});var s=n(63406)},44906:(e,t,n)=>{n.r(t),n.d(t,{default:()=>re});var s=n(71171),o=n(5057),a=n(6352),r=n.n(a),l=n(33518),i=n(67654),c=n(11750),d=n(39948),u=n(39434),h=n(68420),m=n(5952),p=n(75793),f=n(38898),x=n(52439),b=n(71569),g=n(44040),k=n(35432),v=n(44727),y=n(4651),j=n(74094),Z=n(85493),w=n(38242),P=n(44846),S=n(28726),R=n(22425),C=n(86229),D=n(77277),E=n(23484),U=n(34937);var F=n(7199),L=n(10458),N=n.n(L),T=n(13128),_=n(73170),B=n(96266);function M(e){let{meta:t,onCancel:n,handlePaySuccess:s,storeUrl:a}=e;const{t:l}=(0,h.PE)(),{info:i}=(0,p.h6)(),[d,u]=(0,o.useState)("both"),[m,f]=(0,o.useState)(1),x=(0,j.yP)(i),b=(0,y.FM)(t,i,a),g=()=>{s(b)},k=(0,w.getDisplayName)({meta:t});if("purchase"===d&&2===m)return(0,B.jsx)(R.Z,{open:!0,popup:!0,baseUrl:a,action:"acquire-asset",checkFn:N().create({baseURL:r()(a,"/store")}).get,onSuccess:g,onClose:n,checkTimeout:3e5,extraParams:{factory:t.nftFactory},webWalletUrl:x,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:l("store.purchase.auth.title",{name:k}),scan:l("store.purchase.auth.scan"),confirm:l("store.purchase.auth.confirm"),success:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(c.Z,{gutterBottom:!0,children:l("store.purchase.auth.success")}),(0,B.jsxs)(c.Z,{variant:"subtitle2",children:[" ",l("store.purchase.autoLaunch",{name:k})]})]})}});const v=T.ZP;return(0,B.jsx)(v,{title:l("store.purchase.title",{name:k}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:(e,t)=>{"backdropClick"!==t&&n()},children:(0,B.jsx)("div",{style:{marginBottom:16},children:(0,B.jsx)(_.AP,{action:d,onNext:()=>{d&&(f(2),"verify"===d&&(window.location.href=b))},onSelect:e=>{e!==d&&u(e)}})})})}M.defaultProps={handlePaySuccess:e=>{setTimeout((()=>{window.location.href=e}),1e3)}};const W=M;var I,A=n(25339);function K(e){let{meta:t,buttonText:n,storeUrl:s}=e;const{t:a}=(0,h.PE)(),r=(0,Z.useNavigate)(),{info:l}=(0,p.h6)(),{api:c}=(0,A.Tt)(),d=!1===(0,w.isFreeBlocklet)(t),[u,m]=(0,o.useState)(!1),{hasPurchased:f}=function(e){const t=(0,E.Z)(),n=(0,Z.useNavigate)(),[s,a]=(0,i.Z)("sid:blocklet:purchase:".concat(e)),[r,l]=(0,o.useState)(!1),[c,d]=(0,o.useState)(null),u=()=>{const{pathname:e,searchParams:t}=new URL(window.location.href),s=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";t.get("sid")&&(a(""),n(e.replace(s,"/"),{replace:!0}))},h=!(!t.get("assetDid")||!s||t.get("sid")!==s);return(0,U.mU)(D.BlockletEvents.purchaseChange,(t=>{t.did===e&&(d(t.session),["declined","confirmed","error"].includes(t.session.status)&&(l(!0),setTimeout(u,2e3)))})),(0,o.useEffect)((()=>{c&&c.id!==s&&a(c.id)}),[c]),{hasCompleted:r,hasPurchased:h,session:c,setSession:d,doRedirect:u}}(t.did),[x,b]=(0,o.useState)(!1),[g]=(0,i.Z)("instant-blocklet-install",!1),[k,L]=(0,o.useState)(!1),N=(0,o.useMemo)((()=>u?a(d?"blocklet.status.purchasing":"blocklet.status.waiting"):""),[u,a,d]),T=(0,o.useMemo)((()=>d?n.purchase:n.launch),[d,n]),_=e=>{e.preventDefault(),e.stopPropagation();try{if(m(!0),d)return void b(!0);if(g)return void L(!0);if(!d){const e=(0,y.FM)(t,l,s);return void(window.location.href=e)}}catch(n){C.Z.error((0,j.Z)(n),{autoHideDuration:5e3}),console.error("Blocklet installed failed",n)}finally{m(!1)}};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(v.Kk,{children:(0,B.jsx)(F.Z,{permission:"mutate_blocklets",children:e=>(0,B.jsx)(S.Z,{onClick:_,size:"small",disabled:Boolean(N||!e),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:N?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(P.Z,{size:16,style:{marginRight:3}}),N]}):T},t.did)})}),(f||x)&&(0,B.jsx)(W,{method:"launch",meta:t,mode:"both",onCancel:()=>{m(!1),b(!1)},storeUrl:s}),k&&(0,B.jsx)(R.Z,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:c.get,checkTimeout:3e5,onSuccess:e=>{m(!1),L(!1),r("/blocklets/".concat(e.appDid,"/components"))},extraParams:{title:t.title,blockletMetaUrl:decodeURIComponent((0,j.Rn)(s,t.did).trim())},messages:{title:a("setup.keyPair.title"),scan:a("setup.keyPair.scan"),confirm:a("setup.keyPair.confirm"),success:a("setup.keyPair.success")},onClose:()=>{m(!1),L(!1)}})]})}K.defaultProps={};const O=(e,t,n)=>{const s=(0,y.RU)(t);return r()(n,"/blocklets/".concat(e.did,"/?server-url=").concat(s))},V=e=>{let{meta:t,attribute:n,value:s}=e;return t._formatted?t._formatted[n]:s};function z(e){let{blocklet:t,endpoint:n}=e;const{t:s}=(0,h.PE)(),o=(0,p.h6)();let a=r()(o.imgPrefix,"blocklet.png");const l=n;if(l.startsWith("http")&&t.logo)a=r()(l,(0,j.lk)(t.did,t.logo));else{let e=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");e&&(e="/".concat(e)),a=r()(e,"/blocklet/logo/".concat(t.did))}try{const e=new URL(a);e.searchParams.set("v",t.version||+new Date),a=e.href}catch{}const i=(null===o||void 0===o?void 0:o.info.mode)!==k.NODE_MODES.SERVERLESS,c={meta:t,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:l};return(0,B.jsx)(f.Z,{href:O(t,o.info,n),style:{color:"initial",textDecoration:"none"},onClick:e=>!!e.currentTarget.contains(e.target)||(e.preventDefault(),!1),target:"_blank",children:(0,B.jsx)(q,{title:V({meta:t,attribute:"title",value:t.title||t.name}),did:t.did,description:V({meta:t,attribute:"description",value:t.description}),cover:t.logo?a:"",version:t.version,button:i?(0,B.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,B.jsx)(K,{...c})}):null})})}function H(e){var t;let{storeUrl:n,handleSearchSelect:s,extraFilter:a,...r}=e;const{locale:l}=(0,h.PE)(),i=(0,p.h6)(),[c,d]=(0,o.useState)({}),u=n,m=null===i||void 0===i||null===(t=i.info)||void 0===t?void 0:t.version;return(0,o.useEffect)((()=>{d({})}),[u]),(0,B.jsx)(x.ErrorBoundary,{FallbackComponent:b.H,resetKeys:[u],children:(0,B.jsx)("div",{...r,children:(0,B.jsx)(g.Z,{blockletRender:e=>{const t={...e,endpoint:u};return(0,B.jsx)(z,{...t})},baseSearch:!0,endpoint:u,locale:l,onFilterChange:e=>{d(e)},onSearchSelect:s,filters:c,extraFilter:a,serverVersion:m})})})}z.defaultProps={endpoint:""},H.defaultProps={handleSearchSelect:null,extraFilter:void 0};const q=(0,l.Z)(v.ZP)(I||(I=(0,s.Z)(["\n .ms-highlight {\n color: ",";\n }\n"])),(e=>e.theme.palette.primary.main));var $=n(92877),G=n(19577),J=n(2478),Q=n(44067),X=n(46954),Y=n(49390),ee=n(22714),te=n(
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4906],{7199:(e,t,n)=>{n.d(t,{V:()=>s.V,Z:()=>s.Z});var s=n(63406)},44906:(e,t,n)=>{n.r(t),n.d(t,{default:()=>re});var s=n(71171),o=n(5057),a=n(6352),r=n.n(a),l=n(33518),i=n(67654),c=n(11750),d=n(39948),u=n(39434),h=n(68420),m=n(5952),p=n(75793),f=n(38898),x=n(52439),b=n(71569),g=n(44040),k=n(35432),v=n(44727),y=n(4651),j=n(74094),Z=n(85493),w=n(38242),P=n(44846),S=n(28726),R=n(22425),C=n(86229),D=n(77277),E=n(23484),U=n(34937);var F=n(7199),L=n(10458),N=n.n(L),T=n(13128),_=n(73170),B=n(96266);function M(e){let{meta:t,onCancel:n,handlePaySuccess:s,storeUrl:a}=e;const{t:l}=(0,h.PE)(),{info:i}=(0,p.h6)(),[d,u]=(0,o.useState)("both"),[m,f]=(0,o.useState)(1),x=(0,j.yP)(i),b=(0,y.FM)(t,i,a),g=()=>{s(b)},k=(0,w.getDisplayName)({meta:t});if("purchase"===d&&2===m)return(0,B.jsx)(R.Z,{open:!0,popup:!0,baseUrl:a,action:"acquire-asset",checkFn:N().create({baseURL:r()(a,"/store")}).get,onSuccess:g,onClose:n,checkTimeout:3e5,extraParams:{factory:t.nftFactory},webWalletUrl:x,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:l("store.purchase.auth.title",{name:k}),scan:l("store.purchase.auth.scan"),confirm:l("store.purchase.auth.confirm"),success:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(c.Z,{gutterBottom:!0,children:l("store.purchase.auth.success")}),(0,B.jsxs)(c.Z,{variant:"subtitle2",children:[" ",l("store.purchase.autoLaunch",{name:k})]})]})}});const v=T.ZP;return(0,B.jsx)(v,{title:l("store.purchase.title",{name:k}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:(e,t)=>{"backdropClick"!==t&&n()},children:(0,B.jsx)("div",{style:{marginBottom:16},children:(0,B.jsx)(_.AP,{action:d,onNext:()=>{d&&(f(2),"verify"===d&&(window.location.href=b))},onSelect:e=>{e!==d&&u(e)}})})})}M.defaultProps={handlePaySuccess:e=>{setTimeout((()=>{window.location.href=e}),1e3)}};const W=M;var I,A=n(25339);function K(e){let{meta:t,buttonText:n,storeUrl:s}=e;const{t:a}=(0,h.PE)(),r=(0,Z.useNavigate)(),{info:l}=(0,p.h6)(),{api:c}=(0,A.Tt)(),d=!1===(0,w.isFreeBlocklet)(t),[u,m]=(0,o.useState)(!1),{hasPurchased:f}=function(e){const t=(0,E.Z)(),n=(0,Z.useNavigate)(),[s,a]=(0,i.Z)("sid:blocklet:purchase:".concat(e)),[r,l]=(0,o.useState)(!1),[c,d]=(0,o.useState)(null),u=()=>{const{pathname:e,searchParams:t}=new URL(window.location.href),s=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";t.get("sid")&&(a(""),n(e.replace(s,"/"),{replace:!0}))},h=!(!t.get("assetDid")||!s||t.get("sid")!==s);return(0,U.mU)(D.BlockletEvents.purchaseChange,(t=>{t.did===e&&(d(t.session),["declined","confirmed","error"].includes(t.session.status)&&(l(!0),setTimeout(u,2e3)))})),(0,o.useEffect)((()=>{c&&c.id!==s&&a(c.id)}),[c]),{hasCompleted:r,hasPurchased:h,session:c,setSession:d,doRedirect:u}}(t.did),[x,b]=(0,o.useState)(!1),[g]=(0,i.Z)("instant-blocklet-install",!1),[k,L]=(0,o.useState)(!1),N=(0,o.useMemo)((()=>u?a(d?"blocklet.status.purchasing":"blocklet.status.waiting"):""),[u,a,d]),T=(0,o.useMemo)((()=>d?n.purchase:n.launch),[d,n]),_=e=>{e.preventDefault(),e.stopPropagation();try{if(m(!0),d)return void b(!0);if(g)return void L(!0);if(!d){const e=(0,y.FM)(t,l,s);return void(window.location.href=e)}}catch(n){C.Z.error((0,j.Z)(n),{autoHideDuration:5e3}),console.error("Blocklet installed failed",n)}finally{m(!1)}};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(v.Kk,{children:(0,B.jsx)(F.Z,{permission:"mutate_blocklets",children:e=>(0,B.jsx)(S.Z,{onClick:_,size:"small",disabled:Boolean(N||!e),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:N?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(P.Z,{size:16,style:{marginRight:3}}),N]}):T},t.did)})}),(f||x)&&(0,B.jsx)(W,{method:"launch",meta:t,mode:"both",onCancel:()=>{m(!1),b(!1)},storeUrl:s}),k&&(0,B.jsx)(R.Z,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:c.get,checkTimeout:3e5,onSuccess:e=>{m(!1),L(!1),r("/blocklets/".concat(e.appDid,"/components"))},extraParams:{title:t.title,blockletMetaUrl:decodeURIComponent((0,j.Rn)(s,t.did).trim())},messages:{title:a("setup.keyPair.title"),scan:a("setup.keyPair.scan"),confirm:a("setup.keyPair.confirm"),success:a("setup.keyPair.success")},onClose:()=>{m(!1),L(!1)}})]})}K.defaultProps={};const O=(e,t,n)=>{const s=(0,y.RU)(t);return r()(n,"/blocklets/".concat(e.did,"/?server-url=").concat(s))},V=e=>{let{meta:t,attribute:n,value:s}=e;return t._formatted?t._formatted[n]:s};function z(e){let{blocklet:t,endpoint:n}=e;const{t:s}=(0,h.PE)(),o=(0,p.h6)();let a=r()(o.imgPrefix,"blocklet.png");const l=n;if(l.startsWith("http")&&t.logo)a=r()(l,(0,j.lk)(t.did,t.logo));else{let e=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");e&&(e="/".concat(e)),a=r()(e,"/blocklet/logo/".concat(t.did))}try{const e=new URL(a);e.searchParams.set("v",t.version||+new Date),a=e.href}catch{}const i=(null===o||void 0===o?void 0:o.info.mode)!==k.NODE_MODES.SERVERLESS,c={meta:t,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:l};return(0,B.jsx)(f.Z,{href:O(t,o.info,n),style:{color:"initial",textDecoration:"none"},onClick:e=>!!e.currentTarget.contains(e.target)||(e.preventDefault(),!1),target:"_blank",children:(0,B.jsx)(q,{title:V({meta:t,attribute:"title",value:t.title||t.name}),did:t.did,description:V({meta:t,attribute:"description",value:t.description}),cover:t.logo?a:"",version:t.version,button:i?(0,B.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,B.jsx)(K,{...c})}):null})})}function H(e){var t;let{storeUrl:n,handleSearchSelect:s,extraFilter:a,...r}=e;const{locale:l}=(0,h.PE)(),i=(0,p.h6)(),[c,d]=(0,o.useState)({}),u=n,m=null===i||void 0===i||null===(t=i.info)||void 0===t?void 0:t.version;return(0,o.useEffect)((()=>{d({})}),[u]),(0,B.jsx)(x.ErrorBoundary,{FallbackComponent:b.H,resetKeys:[u],children:(0,B.jsx)("div",{...r,children:(0,B.jsx)(g.Z,{blockletRender:e=>{const t={...e,endpoint:u};return(0,B.jsx)(z,{...t})},baseSearch:!0,endpoint:u,locale:l,onFilterChange:e=>{d(e)},onSearchSelect:s,filters:c,extraFilter:a,serverVersion:m})})})}z.defaultProps={endpoint:""},H.defaultProps={handleSearchSelect:null,extraFilter:void 0};const q=(0,l.Z)(v.ZP)(I||(I=(0,s.Z)(["\n .ms-highlight {\n color: ",";\n }\n"])),(e=>e.theme.palette.primary.main));var $=n(92877),G=n(19577),J=n(2478),Q=n(44067),X=n(46954),Y=n(49390),ee=n(22714),te=n(80678);const ne=(0,$.Z)((()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}))),se=(0,o.forwardRef)(((e,t)=>{let{onChange:n,onDelete:s}=e;const{info:a}=(0,p.h6)(),{t:r}=(0,h.PE)(),[l,d]=(0,o.useState)(!1),[u,f]=(0,o.useState)(!1),[x,b]=(0,o.useState)(-1),g=ne(),[k,v]=(0,i.Z)(m.WC),y=Math.max(a.blockletRegistryList.findIndex((e=>e.url===k)),0);return(0,o.useImperativeHandle)(t,(()=>({setOpen:f}))),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(F.Z,{permission:"mutate_node",children:e=>(0,B.jsx)(S.Z,{disabled:!e,classes:{text:g.buttonText},color:"secondary","data-cy":"store-toggle",onClick:()=>{f(!0)},endIcon:(0,B.jsx)(Y.Z,{}),children:(0,B.jsx)(c.Z,{color:"secondary",children:a.blockletRegistryList[y].name})})}),(0,B.jsx)(T.ZP,{title:r("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:u,onClose:()=>f(!1),children:(0,B.jsxs)(G.Z,{className:g.tabPanel,children:[a.blockletRegistryList.map(((e,t)=>(0,B.jsxs)(J.ZP,{button:!0,disabled:l,selected:y===t,"data-cy":"store-switch",onClick:()=>{l||(t!==y?(e=>{try{d(!0),b(e);const t=a.blockletRegistryList[e];v(t.url),n(t.url),f(!1)}catch(t){console.error(t),C.Z.error("".concat(r("store.blockletRegistry.changeFailed")," ").concat((0,j.Z)(t)))}finally{d(!1)}})(t):f(!1))},children:[x===t&&l&&(0,B.jsx)(X.Z,{className:g.iconRoot,children:(0,B.jsx)(P.Z,{size:16})}),(0,B.jsx)(Q.Z,{children:(0,B.jsx)(te.Z,{teamDid:a.did,store:e,onDelete:()=>s(e.url)})})]},e.url))),(0,B.jsx)(ee.Z,{disabled:l,onAdd:n,teamDid:a.did,blockletRegistryList:a.blockletRegistryList})]})})]})}));se.defaultProps={onChange:()=>{},onDelete:()=>{}};const oe=se;var ae;function re(){const{t:e}=(0,h.PE)(),{info:t}=(0,p.h6)(),[n]=(0,i.Z)(m.WC),{blockletRegistryList:s}=t,a=s.find((e=>n===e.url))||s[0],[l,f]=(0,o.useState)(a.url),x=t.routing.adminPath,b=r()(window.location.origin,x),g=(0,o.useRef)(null);return(0,B.jsxs)(le,{children:[(0,B.jsxs)(u.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,B.jsx)(c.Z,{color:"textPrimary",children:e("common.store")}),(0,B.jsx)(oe,{ref:g,onChange:e=>f(e),onDelete:e=>{var n;l===e&&f(null===(n=t.blockletRegistryList[0])||void 0===n?void 0:n.url)}})]}),(0,B.jsx)(d.Z,{className:"store-header",display:"flex",justifyContent:"space-between",p:0,m:0,children:(0,B.jsx)(c.Z,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:e("store.headerDescription")})}),(0,B.jsx)(H,{className:"blocklet-list",handleSearchSelect:e=>{let{detailUrl:t}=e;const n=new URL(t);n.searchParams.set("server-url",b);const s=document.createElement("a");s.setAttribute("target","_blank"),s.setAttribute("href",n.href),s.click()},storeUrl:l})]})}const le=l.Z.main(ae||(ae=(0,s.Z)(["\n @media (max-width: ","px) {\n .store-header {\n flex-direction: column;\n margin-bottom: 32px !important;\n }\n\n .page-header {\n margin-bottom: 16px !important;\n }\n }\n .blocklet-list {\n aside:hover {\n height: calc(100vh - 235px);\n }\n }\n"])),(e=>e.theme.breakpoints.values.sm))}}]);
|