1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5314],{59537:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_embed/[formid]",function(){return a(57689)}])},86903:function(e,t,a){"use strict";a.d(t,{W:function(){return o}});var n=a(50959),i=a(7242);let o=()=>{let{t:e,i18n:t}=(0,i.$G)("pickaxe"),a=t.resolvedLanguage||t.language;return(0,n.useMemo)(()=>({...Object.fromEntries(Object.entries(a&&t.hasResourceBundle(a,"pickaxe")?t.getResourceBundle(a,"pickaxe"):{}).filter(e=>{let[,t]=e;return"string"==typeof t})),"new-chat":e("new-chat",{defaultValue:"New chat"}),"see-history":e("see-history",{defaultValue:"See history"}),"see-input":e("see-input",{defaultValue:"See input"}),"hide-input":e("hide-input",{defaultValue:"Hide input"}),processing:e("processing",{defaultValue:"Processing..."}),uploading:e("uploading",{defaultValue:"Uploading..."}),loading:e("loading",{defaultValue:"Loading..."}),"powered-by-pickaxe":e("powered-by-pickaxe",{defaultValue:"Powered by Pickaxe"}),"form-doc-placeholder":e("form-doc-placeholder",{defaultValue:"Paste a website/video link or drag a file"}),website:e("website",{defaultValue:"Website"}),"file-limit-reached":e("file-limit-reached",{defaultValue:"You have reached the file limit."}),copy:e("copy",{defaultValue:"Copy"}),save:e("save",{defaultValue:"Save"}),"save-as":e("save-as",{defaultValue:"Save as"}),"please-enter-email-to-continue":e("please-enter-email-to-continue",{defaultValue:"Please enter your email to continue:"}),"enter-email-to-continue":e("enter-email-to-continue",{defaultValue:"Enter here your email to continue"}),submit:e("submit",{defaultValue:"Submit"}),sending:e("sending",{defaultValue:"Sending"}),"check-your-inbox":e("check-your-inbox",{defaultValue:"Check your inbox"}),"we-sent-your-an-activation-link":e("we-sent-your-an-activation-link",{defaultValue:"We sent you an activation link. Please be sure to check your spam folder too."}),resend:e("resend",{defaultValue:"Resend"}),resending:e("resending",{defaultValue:"Resending..."}),"chat-history":e("chat-history",{defaultValue:"Chat History"}),"exit-chat-history":e("exit-chat-history",{defaultValue:"Exit Chat History"}),"no-history":e("no-history",{defaultValue:"No history yet."}),"feedback-dislike-title":e("feedback-dislike-title",{defaultValue:"What went wrong?"}),"feedback-dislike-message":e("feedback-dislike-message",{defaultValue:"Help us improve our answers"}),"feedback-like-title":e("feedback-like-title",{defaultValue:"What went right?"}),"feedback-dislike-reason-1":e("feedback-dislike-reason-1",{defaultValue:"Not factually correct"}),"feedback-dislike-reason-2":e("feedback-dislike-reason-2",{defaultValue:"Didn't follow instructions"}),"feedback-dislike-reason-3":e("feedback-dislike-reason-3",{defaultValue:"Offensive/Unsafe"}),"feedback-dislike-reason-4":e("feedback-dislike-reason-4",{defaultValue:"Wrong language"}),"feedback-dislike-reason-5":e("feedback-dislike-reason-5",{defaultValue:"Poorly formatted"}),"feedback-dislike-reason-6":e("feedback-dislike-reason-6",{defaultValue:"Generic/Bland"}),"feedback-dislike-reason-other":e("feedback-dislike-reason-other",{defaultValue:"Other"}),"feedback-dislike-input-placeholder":e("feedback-dislike-input-placeholder",{defaultValue:"Write here..."}),"feedback-submit":e("feedback-submit",{defaultValue:"Submit"}),"feedback-thanks":e("feedback-thanks",{defaultValue:"Thanks for the feedback!"}),"clear-form":e("clear-form",{defaultValue:"Clear form"}),"form.clear-form":e("form.clear-form",{defaultValue:"Clear form"}),"log-out":e("log-out",{defaultValue:"Log Out"}),other:e("other",{defaultValue:"Other"}),"select-options":e("select-options",{defaultValue:"Select option(s)"}),"select-an-option":e("select-an-option",{defaultValue:"Select an option"}),"type-your-answer":e("type-your-answer",{defaultValue:"Type your answer..."})}),[t,a,e])}},28015:function(e,t,a){"use strict";let n=a(90334).Z.create({baseURL:"".concat("https://pickaxe.co/api/utils")});t.Z=n},57689:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return w},default:function(){return g}});var n,i=a(11527),o=a(50959),l=a(86903),r=a(81474),s=a(28015);a(70399),a(77626),a(12450);var u=a(5934),d=a(2538),c=a(69849),f=a(60524),h=a(7242);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}var m=function(e){return o.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 22 22"},e),n||(n=o.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 1C5.477 1 1 5.477 1 11s4.477 10 10 10 10-4.477 10-10S16.523 1 11 1M11 7v4M11 15h-.01"})))};let k=()=>
1{if("undefined"==typeof document||!document.referrer)return"";try{return new URL(document.referrer).origin}catch(e){return""}};var w=!0,g=e=>{let{formId:t,deploymentId:a,styles:n,colors:p,limits:w,misc:g,domains:b,studioId:y,locale:x}=e;(0,f.w)(x);let{t:V}=(0,h.$G)("popup"),v=(0,l.W)(),[S,E]=(0,o.useState)(null),[j,O]=(0,o.useState)(null),[_,N]=(0,o.useState)(""),[I,P]=(0,o.useState)(!1),[C,D]=(0,o.useState)(0===b.length);return((0,o.useEffect)(()=>{if(!b.length){P(!1),D(!0);return}try{let e="";if(window.parent!==window&&(e=new URL(document.referrer).hostname),e||(e=window.parent.location.hostname),!e)throw Error("Parent domain is empty");let t=(0,r.hh)(e);N(e);let a=b.some(e=>t===e);P(!a)}catch(e){console.error("[pickaxe/embed] Unable to validate parent domain:",e),P(!0)}finally{D(!0)}},[b]),(0,o.useEffect)(()=>{if(S)return;let e="".concat("PXE-uid","-").concat(null!=y?y:""),t=(0,r.Ox)(21),a=localStorage.getItem(e);a?t=a:localStorage.setItem(e,t),E(t)},[S]),(0,o.useEffect)(()=>{if(window.parent===window||!a||!y||!t||!C||I||j)return;let e=(0,r.Ox)(16),n=k(),i=n||"*",o=!1,l=()=>{window.parent.postMessage({type:"pickaxe:sso:request",requestId:e,deploymentId:a,studioId:y,pickaxeId:t},i)},u=async t=>{let i=t.data||{};if(t.source===window.parent&&(!n||t.origin===n)&&i.requestId===e&&(!i.deploymentId||i.deploymentId===a)){if("pickaxe:sso:error"===i.type){o=!0,console.warn("[pickaxe/embed] parent SSO request failed",i);return}if("pickaxe:sso:response"!==i.type||"string"!=typeof i.jwt)return;o=!0;try{let e="string"==typeof i.origin&&i.origin?i.origin:t.origin,n=await s.Z.post("/pickaxe/sso/exchange",{deploymentId:a,jwt:i.jwt,origin:e});n.data.success&&n.data.token?(y&&localStorage.setItem("".concat("PXE-token","-").concat(y),n.data.token),O(n.data.token)):n.data.reason&&console.warn("[pickaxe/embed] SSO exchange did not return a token",{reason:n.data.reason,error:n.data.error})}catch(e){console.warn("[pickaxe/embed] SSO exchange failed",e)}}};window.addEventListener("message",u),l();let d=1,c=window.setInterval(()=>{if(o||d>=10){window.clearInterval(c);return}
1d+=1,l()},1e3);return()=>{o=!0,window.clearInterval(c),window.removeEventListener("message",u)}},[a,t,C,I,j,y]),I)?(0,i.jsxs)("div",{className:"flex h-[100%] min-h-screen items-center justify-center gap-6 p-4 supports-[height:100cqh]:min-h-[100cqh] supports-[height:100svh]:min-h-[100svh] max-[899px]:flex-col",style:{backgroundColor:p.primary,color:p.text},children:[(0,i.jsx)(m,{className:"h-12 w-12"}),(0,i.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,i.jsx)("h1",{className:"text-2xl font-bold",children:V("embed.invalidDomain.title",{defaultValue:"Invalid Domain"})}),(0,i.jsx)("p",{className:"text-sm",children:V("embed.invalidDomain.description",{defaultValue:"This tool is not embedded on the correct domain ({{domain}}). Try checking out {{allowedDomains}}.",domain:_||V("embed.invalidDomain.unknownDomain",{defaultValue:"unknown"}),allowedDomains:b.join(", ")})})]})]}):(0,i.jsx)(u.e,{origin:"EMBED",...S&&!j&&{sender:S},senderType:"STUDIO_USER",deploymentId:a,styles:n,colors:p,limits:w,misc:g,locale:x,translations:v,artifact:{popupType:"inline"},isEmbed:!0,children:(0,i.jsxs)("div",{className:"flex h-screen min-h-screen flex-col supports-[height:100cqh]:min-h-[100cqh] supports-[height:100svh]:min-h-[100svh]",children:[(0,i.jsx)(d.U,{pickaxeId:t}),(0,i.jsx)(c.S,{})]})},j?"sso-".concat(y):"anonymous")}},91054:function(){}},function(e){e.O(0,[9774,5408,7475,386,124,1695,1079,6789,304,1599,5659,5859,9167,2888,179],function(){return e(e.s=59537)}),_N_E=e.O()}]);
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.