1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8079],{46378:(e,t,n)=>{n.d(t,{i:()=>r});function r(e){return"/bff/".concat(e.replace(/^\//,""))}},57418:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(95155),l=n(83101),i=n(73952),a=n(52619),s=n.n(a),o=n(5729),d=n(43605);let u=(0,l.F)("\n gap-1 cursor-pointer inline-flex items-center justify-center rounded-full transition-colors \n focus:outline-none focus:ring-2 focus:ring-offset-2 \n disabled:pointer-events-none",{variants:{variant:{primary:"\n text-mtp-white bg-mtp-blue-900 border-mtp-blue-900 \n hover:bg-mtp-blue-800 \n focus:ring-mtp-blue-300 \n disabled:bg-mtp-blue-600 disabled:border-mtp-blue-600",secondary:"\n text-mtp-blue-900 bg-mtp-blue-200 border-mtp-blue-900 \n hover:bg-mtp-blue-300 \n focus:ring-mtp-blue-300 \n disabled:text-mtp-blue-600 disabled:bg-mtp-blue-100 disabled:border-mtp-blue-300",tertiary:"\n text-mtp-blue-900 bg-mtp-white border-mtp-blue-900\n hover:bg-mtp-blue-300 \n focus:ring-mtp-blue-300 \n disabled:text-mtp-blue-600 disabled:bg-mtp-blue-100 disabled:border-mtp-blue-300",transparent:"\n text-mtp-white bg-transparent border-mtp-white\n hover:bg-mtp-white/10\n focus:ring-mtp-white/30\n disabled:text-mtp-white/50 disabled:border-mtp-white/50"},size:{xl:"px-8 h-12 body-lg font-semibold",lg:"px-6 h-10 body-md font-semibold",md:"px-3 h-8 body-sm font-semibold",sm:"px-2 h-7 body-xs font-semibold"}},defaultVariants:{variant:"primary",size:"md"}});function c(e){let{className:t,variant:n,size:l,bordered:a,dropdown:c,children:p,isActive:m,isLoading:b,noFocusRing:x,as:h,href:f,prefetch:g,replace:v,scroll:w,shallow:y,target:j,rel:N,...C}=e,k=f?s():h||"button",E=f?{href:f,prefetch:g,replace:v,scroll:w,shallow:y,target:j,rel:N,...C}:C;return(0,r.jsxs)(k,{className:(0,i.cn)(u({variant:n,size:l}),a||"transparent"===n?"border":void 0,c?"group gap-2":void 0,m?"bg-mtp-blue-400 text-mtp-blue":void 0,x?"focus:ring-0 focus:ring-offset-0":void 0,t),disabled:b||C.disabled,...E,onClick:e=>{var t;b||(e.stopPropagation(),null==(t=C.onClick)||t.call(C,e))},children:[b?(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsxs)("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),p]}):p,c&&(0,r.jsxs)("span",{className:"inline-flex items-center",children:[(0,r.jsx)(o.A,{className:"h-4 w-4 transition-opacity duration-150 group-hover:hidden","aria-hidden":"true"}),(0,r.jsx)(d.A,{className:"h-4 w-4 hidden transition-opacity duration-150 group-hover:inline","aria-hidden":"true"})]})]})}},73952:(e,t,n)=>{n.d(t,{cn:()=>i});var r=n(2821),l=n(75889);function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,l.QP)((0,r.$)(t))}},82987:(e,t,n)=>{n.d(t,{G:()=>c});var r=n(95155),l=n(73952),i=n(12115),a=n(13710),s=n(75663),o=n(89129),d=n(5729);function u(e){let{label:t,query:n}=e,l=n.trim();if(!l)return(0,r.jsx)("span",{children:t});let i=l.split(/\s+/).filter(Boolean),a=RegExp("(".concat(i.map(e=>e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|"),")"),"gi"),s=t.split(a),o=new Set(i.map(e=>e.toLowerCase()));return(0,r.jsx)("span",{children:s.map((e,t)=>o.has(e.toLowerCase())?(0,r.jsx)("span",{className:"font-bold text-mtp-dark-900",children:e},t):e)})}function c(e){var t,n;let{id:c,name:p,label:m,placeholder:b="Search...",disabled:x,required:h,helperText:f,error:g,value:v,onChange:w,options:y,minChars:j=2,showOnFocus:N=!1,hideIfSingleSelected:C=!1,isLoading:k=!1,placeholderIcon:E,showClearButton:L=!0,reserveMessageSpace:z=!0,className:S="",onQueryChange:A,debounceMs:B=300,dropdownPosition:G="bottom",autoFocus:F=!1,allowFreeText:T=!1,disableFiltering:M=!1}=e,[R,_]=(0,i.useState)(""),[V,$]=(0,i.useState)([]),[O,P]=(0,i.useState)(!1),[q,D]=(0,i.useState)(!1);(0,i.useEffect)(()=>
1{F&&H.current&&H.current.focus()},[F]),(0,i.useEffect)(()=>{v?_(v.label):_("")},[v]);let H=(0,i.useRef)(null),I=(0,i.useRef)(null),[Q,W]=(0,i.useState)(null),[Z,J]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(!O||!I.current)return;let e=()=>{if(I.current){let e=I.current.getBoundingClientRect();W(e.width),J({top:"top"===G?e.top:e.bottom,left:e.left})}};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[O,G]);let K=!!g,U=K&&"string"==typeof g?g:f,X=(0,i.useMemo)(()=>e=>{let t=null!=y?y:[];if(M)return t;let n=e.trim().toLowerCase();if(0===j&&(""===n||n===(null==v?void 0:v.label.toLowerCase())))return t;if(n.length<j)return[];let r=n.split(/\s+/).filter(Boolean);return 0===r.length?t:t.filter(e=>{let t=e.label.toLowerCase();return r.every(e=>t.includes(e))})},[y,j,v,M]);(0,i.useEffect)(()=>{$(X(R.trim()))},[R,X]),(0,i.useEffect)(()=>{if(!A)return;let e=setTimeout(()=>{A(R)},B);return()=>clearTimeout(e)},[R,A,B]);let Y=C&&v&&1===V.length&&V[0].id===v.id&&(!q||R===v.label);return(0,r.jsxs)("div",{className:(0,l.cn)("w-full",S),children:[m&&(0,r.jsxs)("label",{htmlFor:c,className:"mb-1 block text-sm font-normal",children:[m,h?(0,r.jsx)("span",{className:"text-error",children:"*"}):null]}),(0,r.jsx)(a.G3,{value:v,onChange:e=>{if(w(e),e){_(e.label),P(!1);return}P(!0)},nullable:!0,disabled:x,children:(0,r.jsxs)("div",{className:"relative",ref:I,children:[(0,r.jsxs)("div",{className:(0,l.cn)("flex items-center gap-2 rounded-lg border bg-white px-3 py-2.5 text-gray-900 focus-within:ring-2",g?"border-error focus-within:ring-error focus-within:border-error":"border-gray-300 focus-within:ring-blue-500 focus-within:border-blue-500",x?"opacity-50 cursor-not-allowed":""),"aria-busy":k||void 0,onMouseDown:e=>{if(x)return;let t=e.target;H.current&&t!==H.current&&setTimeout(()=>{var e;null==(e=H.current)||e.focus(),P(!0)},0)},children:[(null==v?void 0:v.icon)||!v&&E?(0,r.jsx)("span",{className:"shrink-0 text-gray-400",children:null!=(t=null==v?void 0:v.icon)?t:E}):null,(0,r.jsx)(a.G3.Input,{id:c,ref:H,"aria-invalid":K||void 0,className:"outline-none placeholder-mtp-dark-600 text-gray-900 w-full min-w-[40px]",displayValue:e=>{var t;return null!=(t=null==e?void 0:e.label)?t:""},onChange:e=>{let t=e.target.value;_(t),P(!0),T&&w(t?{id:"free-text:".concat(t),label:t}:null)},onFocus:()=>{if(D(!0),P(!0),!N)return;let e=R.trim();(e.length>=j||0===j)&&$(X(e))},onBlur:()=>{D(!1),setTimeout(()=>P(!1),200)},placeholder:b,inputMode:"search",autoComplete:"off",autoCapitalize:"none","aria-describedby":U?"".concat(c,"-desc"):void 0}),v&&L?(0,r.jsx)("button",{type:"button",className:"text-sm text-gray-500 hover:text-gray-800",onClick:()=>{w(null),_(""),$(X("")),P(!0)},"aria-label":"Clear selection",children:"â"}):null,k?(0,r.jsx)("span",{className:"shrink-0 inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-transparent align-middle","aria-label":"Loading"}):(0,r.jsx)(a.G3.Button,{className:"text-gray-700 text-xl pointer-events-none",children:(0,r.jsx)(d.A,{width:20,height:20})})]}),(0,r.jsx)(s.ZL,{children:(0,r.jsx)(o.e,{show:O&&!Y&&V.length>0,as:i.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,r.jsx)(a.G3.Options,{id:c?"".concat(c,"-options"):void 0,className:(0,l.cn)("fixed z-[2001] max-h-[200px] overflow-auto rounded-md border border-gray-200 bg-white p-1 shadow-lg focus:outline-none","top"===G&&"-translate-y-full"),style:{width:Q?"".concat(Q,"px"):"auto",top:Z?"".concat(Z.top+("top"===G?-4:4),"px"):void 0,left:Z?"".concat(Z.left,"px"):void 0},static:!0,children:k?(0,r.jsx)("div",{className:"p-3 text-sm text-gray-500",role:"status","aria-live":"polite",children:"Loadingâ¦"}):(0,r.jsxs)("div",{children:[0===V.length&&R.length>=j&&(0,r.jsx)("div",{className:"p-3 text-sm text-gray-500",role:"status","aria-live":"polite",children:"No results"}),V.map(e=>(0,r.jsxs)(a.G3.Option,{value:e,as:"div",className:t=>{let{active:n}=t;return"flex cursor-pointer items-center gap-2 rounded px-2 py-2 text-sm transition-colors ".concat(n?"bg-blue-100 text-blue-900":"text-gray-900"," ").concat((null==v?void 0:v.id)===e.id?"bg-blue-50/50 font-medium":"")},children:[e.icon?(0,r.jsx)("span",{className:"shrink-0 text-gray-500",children:e.icon}):null,(0,r.jsx)("span",{className:"flex-1 truncate",children:(0,r.jsx)(u,{label:e.label,query:R})}),(null==v?void 0:v.id)===e.id?(0,r.jsx)("span",{className:"text-blue-600",children:"â"}):null]},e.id))]})})})})]})}),z?(0,r.jsx)("p",{id:"".concat(c,"-desc"),className:"mt-1 text-xs ".concat(K?"text-error":"text-gray-500"),children:U||"\xa0"}):U?(0,r.jsx)("p",{id:"".concat(c,"-desc"),className:"mt-1 text-xs ".concat(K?"text-error":"text-gray-500"),children:U}):null,p&&(0,r.jsx)("input",{type:"hidden",name:p,value:null!=(n=null==v?void 0:v.id)?n:""})]})}}}]);
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.