PageSourceSearch

https://www.ahti.at/_next/static/chunks/0c2b67vs0_fnv.js?dpl=dpl_HyoiosZZBckkQR68GPFQHdJLTJbP

js ahti.at collected 2026-10-09 22:59:01 UTC 31,297 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,111369,e=>{"use strict";var t=e.i(830182),a=e.i(511737),n=e.i(543836),s=e.i(464503),r=e.i(76440),i=e.i(587114),l=e.i(976173),o=e.i(156316),d=e.i(911681),c=e.i(244726),u=Object.defineProperty,p=(e,t)=>u(e,"name",{value:t,configurable:!0}),m="Collapsible",[h,x]=(0,s.createContextScope)(m),[f,g]=h(m),b=a.forwardRef(p(function(e,n){let{__scopeCollapsible:s,open:i,defaultOpen:l,disabled:d,onOpenChange:u,...p}=e,[h,x]=(0,r.useControllableState)({prop:i,defaultProp:l??!1,onChange:u,caller:m});return(0,t.jsx)(f,{scope:s,disabled:d,contentId:(0,c.useId)(),open:h,onOpenToggle:a.useCallback(()=>x(e=>!e),[x]),children:(0,t.jsx)(o.Primitive.div,{"data-state":k(h),"data-disabled":d?"":void 0,...p,ref:n})})},"Collapsible")),v=a.forwardRef(p(function(e,a){let{__scopeCollapsible:s,...r}=e,i=g("CollapsibleTrigger",s);return(0,t.jsx)(o.Primitive.button,{type:"button","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":k(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:a,onClick:(0,n.composeEventHandlers)(e.onClick,i.onOpenToggle)})},"CollapsibleTrigger")),y="CollapsibleContent",j=a.forwardRef(p(function(e,a){let{forceMount:n,...s}=e,r=g(y,e.__scopeCollapsible);return(0,t.jsx)(d.Presence,{present:n||r.open,children:({present:e})=>(0,t.jsx)(w,{...s,ref:a,present:e})})},"CollapsibleContent")),w=a.forwardRef(p(function(e,n){let{__scopeCollapsible:s,present:r,children:d,...c}=e,u=g(y,s),[p,m]=a.useState(r),h=a.useRef(null),x=(0,l.useComposedRefs)(n,h),f=a.useRef(0),b=f.current,v=a.useRef(0),j=v.current,w=u.open||p,N=a.useRef(w),C=a.useRef(void 0);return a.useEffect(()=>{let e=requestAnimationFrame(()=>N.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,i.useLayoutEffect)(()=>{let e=h.current;if(e){C.current=C.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();f.current=t.height,v.current=t.width,N.current||(e.style.transitionDuration=C.current.transitionDuration,e.style.animationName=C.current.animationName),m(r)}},[u.open,r]),(0,t.jsx)(o.Primitive.div,{"data-state":k(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!w,...c,ref:x,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...e.style},children:w&&d})},"CollapsibleContentImpl"));function k(e){return e?"open":"closed"}p(k,"getState"),e.s(["Collapsible",0,function({...e}){return(0,t.jsx)(b,{"data-slot":"collapsible",...e})},"CollapsibleContent",0,function({...e}){return(0,t.jsx)(j,{"data-slot":"collapsible-content",...e})},"CollapsibleTrigger",0,function({...e}){return(0,t.jsx)(v,{"data-slot":"collapsible-trigger",...e})}],111369)},277987,e=>{"use strict";let t=(0,e.i(236066).default)("shopping-cart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);e.s(["ShoppingCart",0,t],277987)},606996,384415,e=>{"use strict";var t=e.i(236066);let a=(0,t.default)("factory",[["path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"159hny"}],["path",{d:"M17 18h1",key:"uldtlt"}],["path",{d:"M12 18h1",key:"s9uhes"}],["path",{d:"M7 18h1",key:"1neino"}]]);e.s(["Factory",0,a],606996);let n=(0,t.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["Layers",0,n],384415)},149416,e=>{"use strict";let t=(0,e.i(236066).default)("file-spreadsheet",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);e.s(["FileSpreadsheet",0,t],149416)},306207,e=>{"use strict";let t=(0,e.i(236066).default)("shopping-bag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);e.s(["ShoppingBag",0,t],306207)},297775,e=>{"use strict";let t=(0,e.i(236066).default)("calendar-clock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}
1],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);e.s(["CalendarClock",0,t],297775)},532428,e=>{"use strict";var t=e.i(830182),a=e.i(511737),n=e.i(74261),s=e.i(167881),r=e.i(187448),i=e.i(952268),l=e.i(533772);let o=(0,a.createContext)(!1);e.s(["InlineSubmitRailContext",0,o,"SubmitRail",0,function({summary:e,summaryDetail:d,primaryLabel:c,primaryAriaLabel:u,onSubmit:p,disabled:m=!1,invalidReason:h,submitting:x=!1,submittingLabel:f,secondary:g,secondaryAction:b,saveStatus:v,onBack:y,backLabel:j}){let w=(0,a.useId)(),k=(0,a.useContext)(o),N=m&&!x&&!!h,C=v?.error??null,L=!!v?.saving,S=!!v?.saved&&!L&&!C,[I,T]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(T(!1),!S)return;let e=window.setTimeout(()=>T(!0),l.SAVED_VISIBLE_MS);return()=>window.clearTimeout(e)},[S]);let R=S&&!I,E=(0,a.useRef)(null);(0,a.useEffect)(()=>{C&&E.current?.focus()},[C]);let M=(0,a.useRef)(!1);(0,a.useEffect)(()=>{M.current&&!L&&document.activeElement===document.body&&E.current?.focus(),M.current=L},[L]);let A=!!b?.pending,D=C?null:L?(0,t.jsx)("span",{className:"font-medium",children:v?.savingLabel}):R?(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium text-sea-glass-ink",children:[(0,t.jsx)(r.StatusDot,{tone:"progress",decorative:!0}),v?.savedLabel]}):N?h:e,B=N&&!C&&!L&&!R,z=C?(0,t.jsx)("div",{role:"alert",className:"font-medium text-lingon-ink",children:C}):null,P=x&&f?(0,t.jsx)("span",{className:"sr-only",children:f}):null,F=b?(0,t.jsx)(s.Button,{ref:E,type:"button",variant:"secondary",size:k?"xl":void 0,onClick:b.onClick,disabled:b.disabled||x,pending:A,className:k?"w-full":"shrink-0",children:b.label}):null;return k?(0,t.jsxs)("div",{className:"sticky bottom-0 z-sticky -mx-6 mt-2 flex flex-col gap-2 bg-surface px-6 pb-2 pt-3",children:[(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsxs)("div",{id:w,"aria-live":"polite",className:B?"text-lingon-ink":"text-ink-muted",children:[D,P]}),z,B?null:d]}),(0,t.jsx)(s.Button,{ref:b?void 0:E,type:"button",size:"xl",onClick:p,disabled:m||A,pending:x,"aria-label":u,"aria-describedby":w,className:"w-full",children:c}),F,g]}):(0,t.jsx)(i.ActionRail,{className:"z-rail border-t border-line bg-surface px-4 py-3 sm:px-6",children:(0,t.jsxs)("div",{className:"mx-auto flex min-h-10 w-full max-w-4xl flex-wrap items-center gap-3",children:[y?(0,t.jsxs)(s.Button,{type:"button",variant:"quiet",onClick:y,disabled:x||A,children:[(0,t.jsx)(n.ChevronLeft,{"aria-hidden":"true"}),j]}):null,(0,t.jsxs)("div",{className:"min-w-40 flex-1 text-sm",children:[(0,t.jsxs)("div",{id:w,"aria-live":"polite",className:B?"text-lingon-ink":"text-ink",children:[D,P]}),z,B?null:d]}),(0,t.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto",children:[g,F,(0,t.jsx)(s.Button,{ref:b?void 0:E,type:"button",onClick:p,disabled:m||A,pending:x,"aria-label":u,"aria-describedby":w,className:"flex-1 sm:min-w-[200px] sm:flex-none",children:c})]})]})})}])},372662,e=>{"use strict";var t=e.i(830182),a=e.i(511737),n=e.i(961120),s=e.i(167881),r=e.i(749218),i=e.i(647163);e.s(["PrepareSteps",0,function({title:e,subject:l="rows",state:o,entries:d,failure:c,onCancel:u,onRetry:p,density:m="default","data-testid":h}){let x=(0,n.useTranslations)("fileIntake"),f=(0,n.useTranslations)("fileIntake.steps"),g=(0,a.useRef)(null),b=(0,r.useProgressSteps)(d),v=(0,r.readSteps)(b,f("file"===l?"readingFile":"readingRows"),"failed"===o?c||x("file"===l?"readFailed":"readRowsFailed"):null),y="compact"===m;return(0,a.useEffect)(()=>{"reading"!==o&&g.current?.focus()},[o]),(0,t.jsxs)("section",{"data-testid":h,"data-state":o,"aria-label":e,className:(0,i.cn)("flex flex-col",y?"gap-2":"min-h-36 gap-3 rounded-xl bg-surface p-4"),children:[e||"reading"===o&&u?(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("p",{className:(0,i.cn)("min-w-0 flex-1 truncate",y?"text-sm font-medium":"text-section"),children:e}),"reading"===o&&u?(0,t.jsx)(s.Button,{type:"button",variant:"quiet",size:"sm",className:"shrink-0",onClick:u,children:x("cancel")}):null]}):null,"cancelled"===o?(0,t.jsx)("p",{role:"status",className:"text-meta text-ink-muted",children:x("cancelled")}):(0,t.jsx)(r.StepList,{steps:v,density:m}),"reading"!==o&&p?(0,t.jsx)(s.Button,{ref:g,type:"button",variant:"secondary",size:"sm",className:(0,i.cn)("self-start",!y&&"mt-auto"),onClick:p,children:x("tryAgain")}):null]})},"focusReviewHeading",0,function(e){e?.focus()}])},616267,e=>{"use strict";let t=(0,e.i(236066).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],616267)},505124,e=>{"use strict";let t=(0,e.i(236066).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,t],505124)}
1,939098,197610,575356,973329,83890,677520,e=>{"use strict";var t=e.i(830182),a=e.i(961120),n=e.i(167881),s=e.i(628854);e.s(["CollapsedSelection",0,function({label:e,value:r,onEdit:i,disabled:l=!1}){let o=(0,a.useTranslations)("actions.shared.collapsedSelection");return(0,t.jsxs)("div",{className:"flex items-center justify-between py-2 px-3 bg-muted/50 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e,":"]}),(0,t.jsx)("span",{className:"font-medium",children:r})]}),(0,t.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:i,disabled:l,className:"h-7 px-2 text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(s.Pencil,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"sr-only",children:o("edit",{label:e})})]})]})}],197610);var r=e.i(511737),i=e.i(23750),l=e.i(471435),o=e.i(59377),d=e.i(683223),c=e.i(349091),u=e.i(634716),p=e.i(647163);e.s(["VendorCombobox",0,function({vendors:e,value:a,onChange:s,placeholder:m="Search vendor...",disabled:h=!1,ariaLabel:x,emptyLabel:f="No vendors found.",clearLabel:g="Clear vendor"}){let[b,v]=(0,r.useState)(!1),[y,j]=(0,r.useState)(""),[w,k]=(0,r.useState)(-1),N=(0,r.useRef)(null),C=(0,r.useMemo)(()=>e.find(e=>e.internalId===a)??null,[e,a]),L=(0,r.useMemo)(()=>{if(!y)return e;let t=y.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t)||e.vendorId.toLowerCase().includes(t))},[e,y]);(0,r.useEffect)(()=>{k(-1)},[L.length,y]);let S=(0,r.useCallback)(e=>{s(e),v(!1),j(""),k(-1)},[s]),I=(0,r.useCallback)(e=>{if(0!==L.length)switch(e.key){case"ArrowDown":e.preventDefault(),k(e=>e<L.length-1?e+1:0);break;case"ArrowUp":e.preventDefault(),k(e=>e>0?e-1:L.length-1);break;case"Enter":e.preventDefault(),w>=0&&w<L.length&&S(L[w]);break;case"Escape":v(!1)}},[L,w,S]);return(0,r.useEffect)(()=>{if(w<0||!N.current)return;let e=N.current.querySelectorAll("[data-vendor-item]");e[w]?.scrollIntoView({block:"nearest"})},[w]),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(o.Popover,{open:b,onOpenChange:v,children:[(0,t.jsx)(o.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)(n.Button,{variant:"outline",role:"combobox","aria-label":x??m,"aria-expanded":b,className:"h-9 min-w-0 flex-1 justify-between font-normal",disabled:h,children:[(0,t.jsx)("span",{className:"truncate",children:C?.name||m}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-1",children:(0,t.jsx)(c.ChevronsUpDown,{className:"h-4 w-4 opacity-50"})})]})}),(0,t.jsxs)(o.PopoverContent,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:[(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)(i.Input,{placeholder:m,value:y,onChange:e=>j(e.target.value),onKeyDown:I,className:"h-9",autoFocus:!0})}),(0,t.jsx)(l.ScrollArea,{className:"h-[250px]",children:(0,t.jsx)("div",{className:"p-2",ref:N,children:0===L.length?(0,t.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:f}):L.map((e,n)=>(0,t.jsxs)("button",{type:"button","data-vendor-item":!0,onClick:()=>S(e),className:(0,p.cn)("flex w-full items-center gap-2 rounded-xs px-2 py-1.5 text-left text-sm hover:bg-accent",a===e.internalId&&"bg-accent",w===n&&"bg-accent"),children:[(0,t.jsx)(d.Check,{className:(0,p.cn)("h-4 w-4 shrink-0",a===e.internalId?"opacity-100":"opacity-0")}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"truncate font-medium",children:e.name}),e.vendorId&&(0,t.jsx)("div",{className:"truncate text-xs text-muted-foreground",children:e.vendorId})]})]},e.internalId||n))})})]})]}),C?(0,t.jsx)(n.Button,{type:"button",variant:"ghost",size:"icon",className:"rounded-lg","aria-label":g,onClick:()=>{s(null),j("")},children:(0,t.jsx)(u.X,{"aria-hidden":"true"})}):null]})}],575356);var m=e.i(563177);let h=(0,e.i(236066).default)("file-check-2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m3 15 2 2 4-4",key:"1lhrkk"}]]);var x=e.i(172300),f=e.i(991366),g=e.i(157292),b=e.i(243484),v=e.i(950216),y=e.i(184762),j=e.i(6
155155);function w(e,t){return e.replace("{fileName}",t)}function k(e,t){let a=t.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean);if(0===a.length)return!0;let n=e.name.toLowerCase(),s=e.type.toLowerCase();return a.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}e.s(["ActionIntentIntake",0,function({actionId:e,draft:a,onDraftChange:s,copy:i,suggestions:l=[],suggestionsStatus:o="ready",accept:d,maxSizeBytes:c,allowAttachment:u=!0,disabled:N=!1,busy:C=!1,hydration:L,focusUploadOnMount:S=!1,autoAdvanceSuggestions:I=!1,autoAdvanceAttachment:T=!1,globalDrop:R=!1,hideIntent:E=!1,onContinue:M,onManual:A,className:D}){let B=(0,r.useId)(),z=`action-intake-${B.replace(/:/g,"")}`,P=`${z}-upload-control`,[F,O]=(0,r.useState)(null),[q,H]=(0,r.useState)(a.attachment?"ready":"idle"),[V,$]=(0,r.useState)(null),[Z,K]=(0,r.useState)(!1),U=(0,r.useRef)(null),W=(0,r.useRef)(null),_=(0,r.useRef)(a);_.current=a;let X=(0,r.useRef)(!1),G=(0,r.useRef)(null),J=(0,r.useRef)(null),Q=(0,r.useRef)(!1),Y=(0,r.useCallback)(()=>{Q.current=!0},[]);(0,r.useEffect)(()=>{Q.current&&(Q.current=!1,document.getElementById(P)?.focus())},[F,P,q]),(0,r.useEffect)(()=>{S&&document.getElementById(P)?.focus()},[S,P]);let ee=(0,r.useCallback)(t=>{U.current?.controller.abort();let a=new AbortController;W.current=t,H("uploading"),$(null);let n=(0,j.uploadActionIntakeAttachment)(t,{actionId:e,signal:a.signal});return U.current={file:t,controller:a,promise:n},n.then(e=>{W.current!==t||a.signal.aborted||(U.current=null,H("ready"),s({..._.current,attachment:e}))}).catch(e=>{W.current!==t||a.signal.aborted||(U.current=null,H("error"),$(e instanceof Error?e.message:i.failedLabel))}),n},[e,i.failedLabel,s]),et=(0,r.useCallback)(e=>{if(!k(e,d)){U.current?.controller.abort(),W.current=e,O(e),H("error"),$(i.unsupportedType),s({...a,attachment:void 0});return}if(e.size>c){U.current?.controller.abort(),W.current=e,O(e),H("error"),$(i.fileTooLarge),s({...a,attachment:void 0});return}O(e),s({...a,attachment:void 0}),ee(e)},[d,ee,i.fileTooLarge,i.unsupportedType,a,c,s]);(0,r.useEffect)(()=>{if(!R||!u||N||C)return;let e=0,t=e=>Array.from(e.dataTransfer?.types??[]).includes("Files"),a=a=>{t(a)&&(a.preventDefault(),e+=1,K(!0))},n=e=>{t(e)&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy"))},s=a=>{t(a)&&0===(e=Math.max(0,e-1))&&K(!1)},r=a=>{if(!t(a))return;a.preventDefault(),e=0,K(!1);let n=a.dataTransfer?.files?.[0];n&&et(n)},i=t=>{"Escape"===t.key&&(e=0,K(!1))};return window.addEventListener("dragenter",a),window.addEventListener("dragover",n),window.addEventListener("dragleave",s),window.addEventListener("drop",r),window.addEventListener("keydown",i),()=>{window.removeEventListener("dragenter",a),window.removeEventListener("dragover",n),window.removeEventListener("dragleave",s),window.removeEventListener("drop",r),window.removeEventListener("keydown",i)}},[u,C,N,R,et]);let ea=(0,r.useCallback)(()=>{U.current?.controller.abort(),U.current=null,W.current=null,O(null),H("idle"),$(null),s({...a,attachment:void 0}),Y()},[a,s,Y]),en=(0,r.useCallback)(async()=>{if(u){if(!F)return a.attachment;if(!k(F,d))throw Error(i.unsupportedType);if(F.size>c)throw Error(i.fileTooLarge);return a.attachment&&"ready"===q?a.attachment:U.current?.file===F?U.current.promise:ee(F)}},[d,u,ee,i.fileTooLarge,i.unsupportedType,a.attachment,F,c,q]),es=(0,r.useCallback)(async(e=a)=>{if(!X.current&&!N&&!C){X.current=!0;try{let t=await en();await M({text:e.text.trim(),...e.suggestionId?{suggestionId:e.suggestionId}:{},...t?{attachment:t}:{}})}catch(e){e instanceof DOMException&&"AbortError"===e.name||(H("error"),$(e instanceof Error?e.message:i.failedLabel))}finally{X.current=!1}}},[C,i.failedLabel,N,a,en,M]);(0,r.useEffect)(()=>()=>{U.current?.controller.abort()},[]),(0,r.useEffect)(()=>{let e=a.attachment?.attachmentId;T&&e&&"ready"===q&&J.current!==e&&(J.current=e,es({..._.current}))},[T,es,a.attachment?.attachmentId,q]),(0,r.useEffect)(()=>{if(!L||G.current===L.id)return;G.current=L.id;let t={text:a.text.trim()?a.text:L.draft.text,...a.suggestionId||L.draft.suggestionId?{suggestionId:a.suggestionId??L.draft.suggestionId}:{},...a.attachment||L.draft.attachment?{attachment:a.attachment??L.draft.attachment}:{}};if(s(t),!L.advance)return;let n=`ahti:action-intake:advanced:${e}:${L.id}`;window.sessionStorage.getItem(n)||(window.sessionStorage.setItem(n,"1"),M(t))},[e,a,L,M,s]);let er="ready"===o?l.slice(0,3):[],ei=N||C,el=F?"uploading"===q?w(i.uploadingLabel,F.name):"ready"===q?w(i.readyLabel,F.name):"error"===q?V===i.unsupportedType||V===i.fileTooLarge?V:w(i.failedLabel,F.name):"":"",eo=Z?(0,t.jsx)("div",{role:"status","aria-live":"polite",className:"pointer-events-none fixed inset-3 z-50 grid place-items-center rounded-xl border-2 border-dashed border-sea-glass bg-card/95 p-6 text-center",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{className:"block text-xl",children:i.globalDropLabel??i.uploadLabel}),i.globalDropHint?(0,t.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:i.globalDropHint}):null]})}):null;return E?(0,t.jsxs)("div",{className:(0,p.cn)("space-y-4",D),children:[(0,t.jsx)(m.FileDropZone,{id:z,
1surfaceId:P,accept:d,disabled:ei,fileSelectionDisabled:!u,file:F,onFileSelect:et,emptyText:i.dropFileLabel??i.uploadLabel,supportedText:i.unsupportedType,surfaceAriaLabel:i.dropAriaLabel,inputAriaLabel:i.attachmentAriaLabel,surfaceClassName:"min-h-36 bg-card motion-reduce:transition-none"}),F&&"error"!==q&&(0,t.jsx)("p",{role:"status","aria-live":"polite",className:"text-sm text-muted-foreground",children:el}),F&&"error"===q&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:el}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[F&&"error"===q&&k(F,d)&&F.size<=c&&(0,t.jsxs)(n.Button,{type:"button",variant:"outline",size:"sm",onClick:()=>ee(F),children:[(0,t.jsx)(g.RotateCcw,{className:"h-4 w-4"}),i.retryLabel]}),F&&(0,t.jsxs)(n.Button,{type:"button",variant:"ghost",size:"sm",onClick:ea,children:[(0,t.jsx)(b.Trash2,{className:"h-4 w-4"}),i.removeLabel]}),(0,t.jsxs)(n.Button,{type:"button",disabled:ei||!F&&!a.attachment,onClick:()=>void es(),children:[C&&(0,t.jsx)(x.Loader2,{className:"h-4 w-4 animate-spin motion-reduce:animate-none"}),i.continueLabel]})]}),eo]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.FileDropZone,{id:z,accept:d,disabled:ei,fileSelectionDisabled:!u,file:F,onFileSelect:et,activateOnClick:!1,surfaceAriaLabel:u?i.dropAriaLabel:i.intentAriaLabel,inputAriaLabel:u?i.attachmentAriaLabel:void 0,surfaceClassName:(0,p.cn)("p-4 sm:p-5 motion-reduce:transition-none",D),children:(0,t.jsxs)("div",{className:"space-y-4",children:[!E&&(0,t.jsx)(y.Textarea,{"aria-label":i.intentAriaLabel,placeholder:i.placeholder,value:a.text,disabled:ei,onChange:e=>s({...a,text:e.target.value,suggestionId:void 0}),className:"min-h-24 resize-y border-0 bg-transparent px-0 text-xl font-semibold shadow-none focus-visible:ring-0"}),!E&&(0,t.jsx)("div",{"data-testid":"action-intake-suggestions",className:"flex min-h-16 flex-wrap content-start gap-2","aria-live":"polite","aria-busy":"loading"===o,children:er.map(e=>(0,t.jsx)(n.Button,{type:"button",variant:a.suggestionId===e.id?"secondary":"outline",size:"sm",disabled:ei,"data-testid":"action-intake-suggestion",onClick:()=>{let t={...a,text:e.text,suggestionId:e.id};s(t),I&&es(t)},children:e.label},e.id))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 border-t border-border pt-4 sm:flex-row sm:items-center sm:justify-between",children:[u?(0,t.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,t.jsxs)(n.Button,{id:P,type:"button",variant:"outline",size:"sm",disabled:ei,onClick:()=>document.getElementById(z)?.click(),children:[(0,t.jsx)(f.Paperclip,{className:"h-4 w-4"}),F?i.replaceLabel:i.uploadLabel]}),F&&(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 text-sm",children:["uploading"===q&&(0,t.jsx)(v.Spinner,{}),"ready"===q&&(0,t.jsx)(h,{className:"h-4 w-4 text-success"}),(0,t.jsx)("span",{className:"max-w-56 truncate font-medium",children:F.name}),"error"===q&&k(F,d)&&F.size<=c&&(0,t.jsxs)(n.Button,{type:"button",variant:"ghost",size:"sm",onClick:()=>{ee(F),Y()},children:[(0,t.jsx)(g.RotateCcw,{className:"h-4 w-4"}),i.retryLabel]}),(0,t.jsx)(n.Button,{type:"button",variant:"ghost",size:"icon","aria-label":i.removeLabel,onClick:ea,children:(0,t.jsx)(b.Trash2,{className:"h-4 w-4"})})]})]}):(0,t.jsx)("div",{}),(0,t.jsxs)("div",{className:"flex flex-col-reverse gap-2 sm:flex-row",children:[A&&(0,t.jsx)(n.Button,{type:"button",variant:"ghost",disabled:ei,onClick:A,children:i.manualLabel}),(0,t.jsxs)(n.Button,{type:"button",disabled:ei||!a.text.trim()&&!F&&!a.attachment,onClick:()=>void es(),children:[C&&(0,t.jsx)(x.Loader2,{className:"h-4 w-4 animate-spin motion-reduce:animate-none"}),i.continueLabel]})]})]}),F&&"error"!==q&&(0,t.jsx)("p",{role:"status","aria-live":"polite",className:"text-sm text-muted-foreground",children:el}),F&&"error"===q&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:el})]})}),eo]})},"acceptsFile",0,k],973329);var N=e.i(970065);e.s(["AlternativeModeTiles",0,function({tiles:e,onSelect:a,ariaLabel:n}){return 0===e.length?null:(0,t.jsx)("div",{role:"group","aria-label":n,className:"grid grid-cols-1 gap-3",children:e.map(e=>{let n=!1!==e.enabled;return(0,t.jsx)(N.Card,{role:"button",tabIndex:n?0:-1,"aria-disabled":!n||void 0,onClick:n?()=>a(e.mode):void 0,onKeyDown:n?t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),a(e.mode))}:void 0,className:(0,p.cn)("transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",n?"cursor-pointer hover:border-primary/50":"cursor-not-allowed opacity-50"),children:(0,t.jsxs)(N.CardHeader,{children:[(0,t.jsxs)(N.CardTitle,{className:"text-base flex items-center gap-2",children:[e.icon,e.label]}),e.description&&(0,t.jsx)(N.CardDescription,{children:e.description})]})},e.mode)})})}],83890);var C=e.i(338412),L=e.i(762069),S=e.i(111369),I=e.i(398232),T=e.i(665990),R=e.i(532428),E=e.i(124466),M=e.i(156075);let A={purchaseOrder:"fieldPurchaseOrder",deliveryDate:"fieldDeliveryDate",shippingMethod:"fieldShippingMethod",deliveryTerms:"fieldDeliveryTerms",paymentTerms:"fieldPaymentTerms",memo:"fieldMemo",status:"fieldStatus"},D={"line-add":"operationLineAdd","line-remove":"operationLineRemove","line-change":"operationLineChange","line-preserve":"operationLinePreserve"};function B(e){return e.operations.filter(e=>"line-preserve"!==e.kind).length}function z(e,t){return t(e.field?A[e.field]:"line-add"===e.kind||"line-remove"===e.kind||"line-change"===e.kind?D[e.kind]:D["line-preserve"])}function P(e,t,a){return null==e||""===e?t("notSet"):"object"==typeof e?e.sku?`${e.sku} \xb7 ${a.number(e.quantity??0)}${null!=e.rate?` \xb7 ${a.number(e.rate)}`:""}`:t("set"):String(e)}function F(e){let t=e.responseData??e.response??e.rawResponse;if(!t||"object"!=typeof t)return[];let a=t.results;return Array.isArray(a)?a:[]}function O(e){return e?.receipt?.status==="drifted"?"drifted":e?.receipt?.status==="partial"?"partial":e?.receipt?.status==="failed"?"failed":e?.receipt?.operations?.some(e=>"partially-applied"===e.status)?"partial":e?.success===!0?"complete":e?"failed":void 0}e.s(["SalesOrderChangeSetReview",0,function({actionId:e,actionTitle:s,workflowId:i="update-sales-orders",previewId:l,items:o,isSubmitting:d=!1,createResult:c,onBack:u,onReplan:p,onComplete:m}){let h=(0,a.useTranslations)("actions.shared.changeSetReview"),x=(0,M.useFormat)(),[f,g]=(0,r.useState)(()=>new Set(o.map((e,t)=>t))),b=(0,E.useTemplateSubmission)({actionId:e}),v=(0,r.useMemo)(()=>o.reduce((e,t)=>
1e+B(t.changeSet),0),[o]),y=async()=>{if(b.isSubmitting||d||0===v)return;let e=await b.submit({previewId:l},{execution:"sync"}),t=new Map(F(e).map(e=>[e.orderIdentifier,e]));g(new Set(o.flatMap((e,a)=>t.get(e.orderIdentifier)?.success===!0?[]:[a]))),e.success&&await m?.(e)};if(b.isSubmitting&&b.showProgressLog)return(0,t.jsx)(b.ProgressLog,{});let j=b.submitResult;if(j){let a=F(j),r=new Map(a.map(e=>[e.orderIdentifier,e])),l=a.map(O).includes("drifted");return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(T.ActionResponseDisplay,{result:j,actionTitle:s,actionId:e,workflowId:i,inputPayload:b.lastInputPayload,onStartNew:b.reset}),(0,t.jsxs)("div",{className:"mx-auto max-w-2xl space-y-4","aria-live":"polite",children:[c&&(0,t.jsx)(I.Notice,{tone:"neutral",title:h("createResultTitle"),description:c.message??(c.success?h("createCompleted"):h("createReturned"))}),l&&(0,t.jsx)(I.Notice,{tone:"attention",title:h("driftedTitle"),description:h("driftedDescription")}),(0,t.jsx)("div",{className:"space-y-2",children:o.map((e,a)=>{let s=r.get(e.orderIdentifier),i=s?.receipt?.operations??[];return(0,t.jsxs)(S.Collapsible,{open:f.has(a),onOpenChange:e=>g(t=>{let n=new Set(t);return e?n.add(a):n.delete(a),n}),children:[(0,t.jsx)(S.CollapsibleTrigger,{asChild:!0,children:(0,t.jsxs)(n.Button,{type:"button",variant:"secondary",className:"w-full justify-start","aria-label":h("resultAria",{order:e.orderIdentifier}),children:[f.has(a)?(0,t.jsx)(C.ChevronDown,{"aria-hidden":"true"}):(0,t.jsx)(L.ChevronRight,{"aria-hidden":"true"}),(0,t.jsx)("span",{children:e.changeSet.orderReference}),(0,t.jsx)("span",{className:"ml-2 font-mono text-xs text-ink-muted",children:e.orderIdentifier}),(0,t.jsx)("span",{className:"ml-auto text-xs text-ink-muted",children:h("changeCount",{count:B(e.changeSet)})})]})}),(0,t.jsx)(S.CollapsibleContent,{className:"px-3 py-2",children:0===B(e.changeSet)?(0,t.jsx)("p",{className:"py-2 text-sm text-ink-muted",children:h("noChanges")}):e.changeSet.operations.filter(e=>"line-preserve"!==e.kind).map(e=>{let a=i.find(t=>t.operationId===e.operationId),n=a?.status==="applied"?h("receiptApplied"):a?.status==="partially-applied"?h("receiptPartiallyApplied"):h("receiptFailed");return(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 border-b border-line py-2 text-sm last:border-b-0 sm:grid-cols-2 sm:gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:z(e,h)}),(0,t.jsxs)("p",{className:"text-xs text-ink-muted",children:[n,a?.message?` \xb7 ${a.message}`:""]})]}),(0,t.jsxs)("div",{className:"text-left text-xs sm:text-right",children:[(0,t.jsx)("p",{children:h("current",{value:P(e.current,h,x)})}),(0,t.jsx)("p",{children:h("proposed",{value:P(e.proposed,h,x)})})]})]},e.operationId)})})]},e.changeSet.changeSetId)})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(l||!j.success)&&(0,t.jsx)(n.Button,{type:"button",onClick:p,disabled:!p,children:h("replan")}),u&&(0,t.jsx)(n.Button,{type:"button",variant:"secondary",onClick:u,children:h("backToResults")})]})]})]})}let w={summary:h("summary",{orders:o.length,changes:v}),primaryLabel:0===v?h("noChanges"):h("apply",{count:v}),onSubmit:()=>{y()},disabled:d||0===v,submitting:b.isSubmitting,submittingLabel:h("applying")};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)(N.Card,{children:[(0,t.jsxs)(N.CardHeader,{children:[(0,t.jsx)(N.CardTitle,{children:h("title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:h("summary",{orders:o.length,changes:v})})]}),(0,t.jsx)(N.CardContent,{className:"space-y-3",children:o.map((e,a)=>{let n=B(e.changeSet),s=f.has(a),r=e.changeSet.operations.filter(e=>"line-preserve"!==e.kind);return(0,t.jsx)(S.Collapsible,{open:s,onOpenChange:e=>g(t=>{let n=new Set(t);return e?n.add(a):n.delete(a),n}),children:(0,t.jsxs)(N.Card,{className:"rounded-xl",children:[(0,t.jsx)(N.CardHeader,{className:"py-3",children:(0,t.jsxs)(S.CollapsibleTrigger,{className:"w-full rounded-lg text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s?(0,t.jsx)(C.ChevronDown,{className:"h-4 w-4","aria-hidden":"true"}):(0,t.jsx)(L.ChevronRight,{className:"h-4 w-4","aria-hidden":"true"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:h("salesOrder",{reference:e.changeSet.orderReference})}),(0,t.jsx)("span",{className:"ml-auto text-xs text-muted-foreground",children:h("changeCount",{count:n})})]}),(0,t.jsx)("span",{className:"mt-1 block pl-6 font-mono text-xs text-muted-foreground",children:e.orderIdentifier})]})}),(0,t.jsx)(S.CollapsibleContent,{children:(0,t.jsxs)(N.CardContent,{className:"space-y-1.5 pt-0",children:[0===n&&(0,t.jsxs)("div",{className:"rounded-lg border border-dashed p-3 text-sm",children:[(0,t.jsx)("p",{className:"font-medium",children:h("noChanges")}
1),(0,t.jsx)("p",{className:"text-muted-foreground",children:h("alreadyMatches")})]}),r.map(e=>(0,t.jsxs)("div",{className:"rounded-lg border border-border/60 px-3 py-2 text-sm",children:[(0,t.jsx)("p",{className:"font-medium",children:z(e,h)}),(0,t.jsxs)("p",{className:"mt-1 flex flex-wrap items-baseline gap-x-2 gap-y-1 text-xs",children:[(0,t.jsx)("span",{className:"break-words text-muted-foreground",children:P(e.current,h,x)}),(0,t.jsxs)("span",{className:"sr-only",children:[" ",h("changesTo")," "]}),(0,t.jsx)("span",{"aria-hidden":"true",className:"text-muted-foreground",children:"→"}),(0,t.jsx)("span",{className:"break-words",children:P(e.proposed,h,x)})]})]},e.operationId))]})})]})},e.changeSet.changeSetId)})})]}),u?(0,t.jsx)(R.SubmitRail,{...w,onBack:u,backLabel:h("backToResults")}):(0,t.jsx)(R.SubmitRail,{...w})]})}],677520),e.i(952268),e.s([],939098)}]);

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.