1"use strict";(self.webpackChunkbook_modoo_front=self.webpackChunkbook_modoo_front||[]).push([[3787],{68083:function(Ze,se,f){f.d(se,{D:function(){return Q},Z:function(){return fe}});var G=f(87462),d=f(89526),ie=f(53068),Z=f(90904),k=f(58426),ae=f(72536);function J(a){return typeof a.normalize!="undefined"?a.normalize("NFD").replace(/[\u0300-\u036f]/g,""):a}function Q(a={}){const{ignoreAccents:b=!0,ignoreCase:h=!0,limit:y,matchFrom:Y="any",stringify:P,trim:S=!1}=a;return(M,{inputValue:K,getOptionLabel:A})=>{let m=S?K.trim():K;h&&(m=m.toLowerCase()),b&&(m=J(m));const F=m?M.filter(W=>{let L=(P||A)(W);return h&&(L=L.toLowerCase()),b&&(L=J(L)),Y==="start"?L.indexOf(m)===0:L.indexOf(m)>-1}):M;return typeof y=="number"?F.slice(0,y):F}}function U(a,b){for(let h=0;h<a.length;h+=1)if(b(a[h]))return h;return-1}const ue=Q(),X=5,ce=a=>{var b;return a.current!==null&&((b=a.current.parentElement)==null?void 0:b.contains(document.activeElement))};function fe(a){const{unstable_isActiveElementInListbox:b=ce,unstable_classNamePrefix:h="Mui",autoComplete:y=!1,autoHighlight:Y=!1,autoSelect:P=!1,blurOnSelect:S=!1,clearOnBlur:M=!a.freeSolo,clearOnEscape:K=!1,componentName:A="useAutocomplete",defaultValue:m=a.multiple?[]:null,disableClearable:F=!1,disableCloseOnSelect:W=!1,disabled:L,disabledItemsFocusable:Ue=!1,disableListWrap:Oe=!1,filterOptions:We=ue,filterSelectedOptions:Ee=!1,freeSolo:H=!1,getOptionDisabled:q,getOptionLabel:De=t=>{var e;return(e=t.label)!=null?e:t},groupBy:ee,handleHomeEndKeys:Pe=!a.freeSolo,id:He,includeInputInList:Ie=!1,inputValue:Ve,isOptionEqualToValue:V=(t,e)=>t===e,multiple:i=!1,onChange:Ce,onClose:ye,onHighlightChange:Me,onInputChange:T,onOpen:Ae,open:Ne,openOnFocus:ze=!1,options:je,readOnly:N=!1,selectOnFocus:Ge=!a.freeSolo,value:Je}=a,x=(0,ie.Z)(He);let R=De;R=t=>{const e=De(t);return typeof e!="string"?String(e):e};const de=d.useRef(!1),pe=d.useRef(!0),p=d.useRef(null),I=d.useRef(null),[ge,Qe]=d.useState(null),[_,he]=d.useState(-1),Le=Y?0:-1,E=d.useRef(Le),[o,Xe]=(0,Z.Z)({controlled:Je,default:m,name:A}),[s,te]=(0,Z.Z)({controlled:Ve,default:"",name:A,state:"inputValue"}),[ne,Se]=d.useState(!1),re=d.useCallback((t,e)=>{if(!(i?o.length<e.length:e!==null)&&!M)return;let r;if(i)r="";else if(e==null)r="";else{const l=R(e);r=typeof l=="string"?l:""}s!==r&&(te(r),T&&T(t,r,"reset"))},[R,s,i,T,te,M,o]),be=d.useRef();d.useEffect(()=>{const t=o!==be.current;be.current=o,!(ne&&!t)&&(H&&!t||re(null,o))},[o,re,ne,be,H]);const[$,Te]=(0,Z.Z)({controlled:Ne,default:!1,name:A,state:"open"}),[Ye,Re]=d.useState(!0),Be=!i&&o!=null&&s===R(o),O=$&&!N,g=O?We(je.filter(t=>!(Ee&&(i?o:[o]).some(e=>e!==null&&V(t,e)))),{inputValue:Be&&Ye?"":s,getOptionLabel:R}):[],me=$&&g.length>0&&!N,oe=(0,k.Z)(t=>{t===-1?p.current.focus():ge.querySelector(`[data-tag-index="${t}"]`).focus()});d.useEffect(()=>{i&&_>o.length-1&&(he(-1),oe(-1))},[o,i,_,oe]);function qe(t,e){if(!I.current||t===-1)return-1;let n=t;for(;;){if(e==="next"&&n===g.length||e==="previous"&&n===-1)return-1;const r=I.current.querySelector(`[data-option-index="${n}"]`),l=Ue?!1:!r||r.disabled||r.getAttribute("aria-disabled")==="true";if(r&&!r.hasAttribute("tabindex")||l)n+=e==="next"?1:-1;else return n}}const v=(0,k.Z)(({event:t,index:e,reason:n="auto"})=>{if(E.current=e,e===-1?p.current.removeAttribute("aria-activedescendant"):p.current.setAttribute("aria-activedescendant",`${x}-option-${e}`),Me&&Me(t,e===-1?null:g[e],n),!I.current)return;const r=I.current.querySelector(`[role="option"].${h}-focused`);r&&(r.classList.remove(`${h}-focused`),r.classList.remove(`${h}-focusVisible`));const l=I.current.parentElement.querySelector('[role="listbox"]');if(!l)return;if(e===-1){l.scrollTop=0;return}const u=I.current.querySelector(`[data-option-index="${e}"]`);if(u&&(u.classList.add(`${h}-focused`),n==="keyboard"&&u.classList.add(`${h}-focusVisible`),l.scrollHeight>l.clientHeight&&n!=="mouse")){const c=u,D=l.clientHeight+l.scrollTop,we=c.offsetTop+c.offsetHeight;we>D?l.scrollTop=we-l.clientHeight:c.offsetTop-c.offsetHeight*(ee?1.3:0)<l.scrollTop&&(l.scrollTop=c.offsetTop-c.offsetHeight*(ee?1.3:0))}}),C=(0,k.Z)(({event:t,diff:e,direction:n="next",reason:r="auto"})=>{if(!O)return;const u=qe((()=>{const c=g.length-1;if(e==="reset")return Le;if(e==="start")return 0;if(e==="end")return c;const D=E.current+e;return D<0?D===-1&&Ie?-1:Oe&&E.current!==-1||Math.abs(e)>1?0:c:D>c?D===c+1&&Ie?-1:Oe||Math.abs(e)>1?c:0:D})(),n);if(v({index:u,reason:r,event:t}),y&&e!=="reset")if(u===-1)p.current.value=s;else{const c=R(g[u]);p.current.value=c,c.toLowerCase().indexOf(s.toLowerCase())===0&&s.length>0&&p.current.setSelectionRange(s.length,c.length)}}),xe=d.useCallback(()=>
1{if(!O)return;const t=i?o[0]:o;if(g.length===0||t==null){C({diff:"reset"});return}if(I.current){if(t!=null){const e=g[E.current];if(i&&e&&U(o,r=>V(e,r))!==-1)return;const n=U(g,r=>V(r,t));n===-1?C({diff:"reset"}):v({index:n});return}if(E.current>=g.length-1){v({index:g.length-1});return}v({index:E.current})}},[g.length,i?!1:o,Ee,C,v,O,s,i]),et=(0,k.Z)(t=>{(0,ae.Z)(I,t),t&&xe()});d.useEffect(()=>{xe()},[xe]);const B=t=>{$||(Te(!0),Re(!0),Ae&&Ae(t))},z=(t,e)=>{$&&(Te(!1),ye&&ye(t,e))},w=(t,e,n,r)=>{if(i){if(o.length===e.length&&o.every((l,u)=>l===e[u]))return}else if(o===e)return;Ce&&Ce(t,e,n,r),Xe(e)},le=d.useRef(!1),j=(t,e,n="selectOption",r="options")=>{let l=n,u=e;if(i){u=Array.isArray(o)?o.slice():[];const c=U(u,D=>V(e,D));c===-1?u.push(e):r!=="freeSolo"&&(u.splice(c,1),l="removeOption")}re(t,u),w(t,u,l,{option:e}),!W&&(!t||!t.ctrlKey&&!t.metaKey)&&z(t,l),(S===!0||S==="touch"&&le.current||S==="mouse"&&!le.current)&&p.current.blur()};function tt(t,e){if(t===-1)return-1;let n=t;for(;;){if(e==="next"&&n===o.length||e==="previous"&&n===-1)return-1;const r=ge.querySelector(`[data-tag-index="${n}"]`);if(!r||!r.hasAttribute("tabindex")||r.disabled||r.getAttribute("aria-disabled")==="true")n+=e==="next"?1:-1;else return n}}const ke=(t,e)=>{if(!i)return;s===""&&z(t,"toggleInput");let n=_;_===-1?s===""&&e==="previous"&&(n=o.length-1):(n+=e==="next"?1:-1,n<0&&(n=0),n===o.length&&(n=-1)),n=tt(n,e),he(n),oe(n)},Ke=t=>{de.current=!0,te(""),T&&T(t,"","clear"),w(t,i?[]:null,"clear")},nt=t=>e=>{if(t.onKeyDown&&t.onKeyDown(e),!e.defaultMuiPrevented&&(_!==-1&&["ArrowLeft","ArrowRight"].indexOf(e.key)===-1&&(he(-1),oe(-1)),e.which!==229))switch(e.key){case"Home":O&&Pe&&(e.preventDefault(),C({diff:"start",direction:"next",reason:"keyboard",event:e}));break;case"End":O&&Pe&&(e.preventDefault(),C({diff:"end",direction:"previous",reason:"keyboard",event:e}));break;case"PageUp":e.preventDefault(),C({diff:-X,direction:"previous",reason:"keyboard",event:e}),B(e);break;case"PageDown":e.preventDefault(),C({diff:X,direction:"next",reason:"keyboard",event:e}),B(e);break;case"ArrowDown":e.preventDefault(),C({diff:1,direction:"next",reason:"keyboard",event:e}),B(e);break;case"ArrowUp":e.preventDefault(),C({diff:-1,direction:"previous",reason:"keyboard",event:e}),B(e);break;case"ArrowLeft":ke(e,"previous");break;case"ArrowRight":ke(e,"next");break;case"Enter":if(E.current!==-1&&O){const n=g[E.current],r=q?q(n):!1;if(e.preventDefault(),r)return;j(e,n,"selectOption"),y&&p.current.setSelectionRange(p.current.value.length,p.current.value.length)}else H&&s!==""&&Be===!1&&(i&&e.preventDefault(),j(e,s,"createOption","freeSolo"));break;case"Escape":O?(e.preventDefault(),e.stopPropagation(),z(e,"escape")):K&&(s!==""||i&&o.length>0)&&(e.preventDefault(),e.stopPropagation(),Ke(e));break;case"Backspace":if(i&&!N&&s===""&&o.length>0){const n=_===-1?o.length-1:_,r=o.slice();r.splice(n,1),w(e,r,"removeOption",{option:o[n]})}break;case"Delete":if(i&&!N&&s===""&&o.length>0&&_!==-1){const n=_,r=o.slice();r.splice(n,1),w(e,r,"removeOption",{option:o[n]})}break;default:}},rt=t=>{Se(!0),ze&&!de.current&&B(t)},Fe=t=>{if(b(I)){p.current.focus();return}Se(!1),pe.current=!0,de.current=!1,P&&E.current!==-1&&O?j(t,g[E.current],"blur"):P&&H&&s!==""?j(t,s,"blur","freeSolo"):M&&re(t,o),z(t,"blur")},ot=t=>{const e=t.target.value;s!==e&&(te(e),Re(!1),T&&T(t,e,"input")),e===""?!F&&!i&&w(t,null,"clear"):B(t)},lt=t=>{v({event:t,index:Number(t.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},st=()=>{le.current=!0},it=t=>{const e=Number(t.currentTarget.getAttribute("data-option-index"));j(t,g[e],"selectOption"),le.current=!1},at=t=>e=>{const n=o.slice();n.splice(t,1),w(e,n,"removeOption",{option:o[t]})},$e=t=>{$?z(t,"toggleInput"):B(t)},ut=t=>{t.target.getAttribute("id")!==x&&t.preventDefault()},ct=()=>{p.current.focus(),Ge&&pe.current&&p.current.selectionEnd-p.current.selectionStart===0&&p.current.select(),pe.current=!1},ft=t=>{(s===""||!$)&&$e(t)};let _e=H&&s.length>0;_e=_e||(i?o.length>0:o!==null);let ve=g;if(ee){const t=new Map;let e=!1;ve=g.reduce((n,r,l)=>{const u=ee(r);return n.length>0&&n[n.length-1].group===u?n[n.length-1].options.push(r):n.push({key:l,index:l,group:u,options:[r]}),n},[])}return L&&ne&&Fe(),{getRootProps:(t={})=>(0,G.Z)({"aria-owns":me?`${x}-listbox`:null},t,{onKeyDown:nt(t),onMouseDown:ut,onClick:ct}),getInputLabelProps:()=>({id:`${x}-label`,htmlFor:x}),getInputProps:()=>
1({id:x,value:s,onBlur:Fe,onFocus:rt,onChange:ot,onMouseDown:ft,"aria-activedescendant":O?"":null,"aria-autocomplete":y?"both":"list","aria-controls":me?`${x}-listbox`:void 0,"aria-expanded":me,autoComplete:"off",ref:p,autoCapitalize:"none",spellCheck:"false",role:"combobox"}),getClearProps:()=>({tabIndex:-1,onClick:Ke}),getPopupIndicatorProps:()=>({tabIndex:-1,onClick:$e}),getTagProps:({index:t})=>(0,G.Z)({key:t,"data-tag-index":t,tabIndex:-1},!N&&{onDelete:at(t)}),getListboxProps:()=>({role:"listbox",id:`${x}-listbox`,"aria-labelledby":`${x}-label`,ref:et,onMouseDown:t=>{t.preventDefault()}}),getOptionProps:({index:t,option:e})=>{const n=(i?o:[o]).some(l=>l!=null&&V(e,l)),r=q?q(e):!1;return{key:R(e),tabIndex:-1,role:"option",id:`${x}-option-${t}`,onMouseOver:lt,onClick:it,onTouchStart:st,"data-option-index":t,"aria-disabled":r,"aria-selected":n}},id:x,inputValue:s,value:o,dirty:_e,popupOpen:O,focused:ne||_!==-1,anchorEl:ge,setAnchorEl:Qe,focusedTag:_,groupedOptions:ve}}},90536:function(Ze,se,f){f.d(se,{Z:function(){return X}});var G=f(87462),d=f(63366),ie=f(89526),Z=f(23060),k=f(31119),ae=f(92112),J=f(38368),Q=f(57468),U=f(67557);const ue=["className","component"];function X(ce={}){const{defaultTheme:fe,defaultClassName:a="MuiBox-root",generateClassName:b,styleFunctionSx:h=ae.Z}=ce,y=(0,k.ZP)("div",{shouldForwardProp:P=>P!=="theme"&&P!=="sx"&&P!=="as"})(h);return ie.forwardRef(function(S,M){const K=(0,Q.Z)(fe),A=(0,J.Z)(S),{className:m,component:F="div"}=A,W=(0,d.Z)(A,ue);return(0,U.jsx)(y,(0,G.Z)({as:F,ref:M,className:(0,Z.default)(m,b?b(a):a),theme:K},W))})}}}]); 2 3//# sourceMappingURL=3787.cb69b5d9.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.