1"use strict";(self.webpackChunkerasebg=self.webpackChunkerasebg||[]).push([[953],{50953:(e,t,a)=>{e=a.nmd(e);var o=a(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var i=o(a(27424));a(57658),a(74916),a(15306),a(33948),a(41637);var n,r=p(a(67294)),d=a(73727),c=p(a(91256)),s=o(a(8397)),l=o(a(15606));function p(e,t){if("function"==typeof WeakMap)var a=new WeakMap,o=new WeakMap;return(p=function(e,t){if(!t&&e&&e.__esModule)return e;var i,n,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(i=t?o:a){if(i.has(e))return i.get(e);i.set(e,r)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((n=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(n.get||n.set)?i(r,t,n):r[t]=e[t]);return r})(e,t)}(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e);var u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e};const f=(0,c.keyframes)(["from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}"]),m=c.default.div.withConfig({displayName:"Device__Wrapper",componentId:"sc-1meqfxa-0"})(["min-height:100%;width:100%;display:flex;align-items:center;justify-content:center;padding:32px 16px;background:var(--surface-5,#fafafa);"]),_=c.default.div.withConfig({displayName:"Device__Loader",componentId:"sc-1meqfxa-1"})(["display:flex;height:75%;align-items:center;justify-content:center;"]),g=c.default.div.withConfig({displayName:"Device__Card",componentId:"sc-1meqfxa-2"})(["width:100%;max-width:460px;background:#ffffff;border:1px solid var(--surface-20,#e9e9ee);border-radius:16px;padding:32px 28px 24px;box-shadow:0 1px 0 rgba(20,20,43,0.04),0 12px 36px rgba(20,20,43,0.08);display:flex;flex-direction:column;gap:18px;animation:"," 320ms ease-out both;"],f),x=c.default.h2.withConfig({displayName:"Device__Title",componentId:"sc-1meqfxa-3"})(["margin:0;text-align:center;font-size:22px;line-height:1.3;font-weight:650;color:var(--color-grey-100,#14143d);letter-spacing:-0.01em;"]),v=c.default.p.withConfig({displayName:"Device__Subtitle",componentId:"sc-1meqfxa-4"})(["margin:0;text-align:center;color:var(--color-grey-80,#57576a);font-size:14px;line-height:1.55;"]),h=c.default.input.withConfig({displayName:"Device__CodeInput",componentId:"sc-1meqfxa-5"})(['font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-size:22px;letter-spacing:0.18em;text-align:center;text-transform:uppercase;padding:14px 12px;border:1px solid var(--surface-20,#e9e9ee);border-radius:10px;outline:none;width:100%;color:var(--color-grey-100,#14143d);&:focus{border-color:var(--primary-60,#5a4fff);box-shadow:0 0 0 3px rgba(90,79,255,0.12);}']),y=c.default.p.withConfig({displayName:"Device__Hint",componentId:"sc-1meqfxa-6"})(["margin:0;color:var(--color-grey-70,#777788);font-size:12.5px;text-align:center;line-height:1.5;"]);function D(e){const t=(e||"").replace(/[^A-Za-z0-9]/g,"").toUpperCase();return 8!==t.length?t:"".concat(t.slice(0,4),"-").concat(t.slice(4))}function b(){const e=(0,d.useHistory)(),t=new URLSearchParams(window.location.search).get("user_code"),a=(0,r.useState)(""),o=(0,i.default)(a,2),n=o[0],c=o[1],p=(0,r.useState)(Boolean(t)),u=(0,i.default)(p,2),f=u[0],b=u[1];(0,r.useEffect)(()=>{if(!t)return;const a=D(t),o="device?user_code=".concat(encodeURIComponent(a));e.push("/choose-org?redirectTo=".concat(encodeURIComponent(o),"&utm_source=mcp-device"))},[t,e]);const C=t=>{t.preventDefault();const a=D(n);if(!a)return;b(!0);const o="".concat(window.location.pathname,"?user_code=").concat(encodeURIComponent(a));e.replace(o),e.push(o)};return f?r.default.createElement(m,{"data-test-id":"Automation_Id_Device_index_Wrapper"},r.default.createElement(_,{"data-test-id":"Automation_Id_Device_index_Loader"},r.default.createElement(l.default,{"data-test-id":"Automation_Id_Device_index_LoaderIcon"}))):r.default.createElement(m,{"data-test-id":"Automation_Id_Device_index_Wrapper"},r.default.createElement(g,{"data-test-id":"Automation_Id_Device_index_Card"},r.default.createElement(x,{"data-test-id":"Automation_Id_Device_index_Title"},"Connect your AI client to PixelBin"),r.default.createElement(v,{"data-test-id":"Automation_Id_Device_index_Subtitle"},"Enter the code your AI client showed you to finish setting up the connection."),r.default.createElement("form",{onSubmit:C,"data-test-id":"Automation_Id_Device_index_form"},r.default.createElement(h,{autoFocus:!0,autoComplete:"off",spellCheck:!1,placeholder:"XXXX-XXXX",value:n,onChange:e=>c(e.target.value),"data-testid":"device-user-code-input","data-test-id":"Automation_Id_Device_index_CodeInput"}),r.default.createElement("div",{style:{height:14},"data-test-id":"Automation_Id_Device_index_div"}),r.default.createElement(s.default,{onClick:C,disabled:!D(n),style:{width:"100%"},"data-testid":"device-continue","data-test-id":"Automation_Id_Device_index_Button"},"Continue")),r.default.createElement(y,{"data-test-id":"Automation_Id_Device_index_Hint"},"The code looks like ",r.default.createElement("strong",{"data-test-id":"Automation_Id_Device_index_strong"},"XXXX-XXXX"),". Dashes and case are optional.")))}var C,I;u(b,'useHistory{history}\nuseState{[draft, setDraft]("")}\nuseState{[redirecting, setRedirecting](Boolean(initialUserCode))}\nuseEffect{}',()=>[d.useHistory]),(C="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(C.register(f,"fadeUp","/app/src/pages/Device/index.js"),C.register(m,"Wrapper","/app/src/pages/Device/index.js"),C.register(_,"Loader","/app/src/pages/Device/index.js"),C.register(g,"Card","/app/src/pages/Device/index.js"),C.register(x,"Title","/app/src/pages/Device/index.js"),C.register(v,"Subtitle","/app/src/pages/Device/index.js"),C.register(h,"CodeInput","/app/src/pages/Device/index.js"),C.register(y,"Hint","/app/src/pages/Device/index.js"),C.register(D,"normaliseUserCode","/app/src/pages/Device/index.js"),C.register(b,"DeviceConnect","/app/src/pages/Device/index.js")),(I="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&I(e)}}]); 2//# sourceMappingURL=953.0baa83a69d327bf3dd18.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.