1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8289],{329:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(55729);function o(){var t=(0,n.useRef)(!1),e=(0,n.useCallback)(function(){return t.current},[]);return(0,n.useEffect)(function(){return t.current=!0,function(){t.current=!1}},[]),e}},9366:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(55729),o=function(){return(o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var a=r(329);function i(t,e){void 0===e&&(e=[]);var r,i,c,s,u,d,l,f,p=(i={loading:!0},void 0===(r=e)&&(r=[]),void 0===i&&(i={loading:!1}),c=(0,n.useRef)(0),s=(0,a.A)(),d=(u=(0,n.useState)(i))[0],l=u[1],f=(0,n.useCallback)(function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=++c.current;return d.loading||l(function(t){return o(o({},t),{loading:!0})}),t.apply(void 0,e).then(function(t){return s()&&n===c.current&&l({value:t,loading:!1}),t},function(t){return s()&&n===c.current&&l({error:t,loading:!1}),t})},r),[d,f]),w=p[0],h=p[1];return(0,n.useEffect)(function(){h()}
1,[h]),w}},11712:(t,e,r)=>{"use strict";r.d(e,{Q:()=>o});var n=r(57103);let o=t=>{let e=(t instanceof Error?t.message:"string"==typeof t?t:"")||"unknown error";n.A.error(e,{toastId:e}),console.error(t)}},13257:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>c});var n=r(48252),o=r(61796),a=r(81278),i=r(9366);let c=()=>{let{query:t,replace:e}=(0,a.useRouter)();return(0,i.A)(async()=>{t.docId&&await e((0,o.nz)()+"vendors/".concat(n.A.vendor.id,"/documents/").concat(t.docId)).catch(console.error)},[e,t.docId]),null}},61796:(t,e,r)=>{"use strict";r.d(e,{AB:()=>w,B2:()=>b,Jo:()=>f,PQ:()=>p,RG:()=>g,Ze:()=>m,bn:()=>y,dp:()=>h,nz:()=>u,t0:()=>l,xz:()=>d});var n=r(87011),o=r(93096),a=r(66717),i=r(46217),c=r(11712),s=r(95882);let u=()=>"https://".concat("us-central1","-").concat("propcart-dev",".cloudfunctions.net/api/v1/"),d="https://dash.propcart.com",l=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=await (0,s.Py)()||"";return f((0,o._)((0,n._)({},t),{Authorization:"Bearer "+e}))},f=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{appCheck:e}=(0,s.rf)();(0,i.v)(e,"appCheck undefined");let r=await (0,a.gf)(e);return{method:"GET",headers:(0,o._)((0,n._)({},t),{"X-Firebase-AppCheck":r.token})}},p=t=>{let{userAgent:e}=globalThis.window.navigator,r=e.includes("Safari")&&!e.includes("Chrome")&&!e.includes("Firefox"),n=r?window.open():null;r?n.location=t:window.open(t,"_blank","noopener,noreferrer")},w=async t=>{let[,e,,r]=t.split("/"),n=u()+"vendors/".concat(e,"/users/").concat(r,"/signed-path"),o=await l({Accept:"application/json","Content-Type":"application/json"});o.method="POST",o.body=JSON.stringify({path:t});let a=await fetch(n,o);a.ok||await m(a);let{signedPath:i}=await a.json();return u()+i},h=async(t,e,r)=>{let n=u()+"vendors/".concat(t,"/docs/").concat(e,"/signed-path"),o=await f({Accept:"application/json","Content-Type":"application/json"});o.method="POST",o.body=JSON.stringify({path:r});let a=await fetch(n,o);a.ok||await m(a);let{signedPath:i}=await a.json();return u()+i},y=async t=>{try{let e=u()+t,r=await l({Accept:"text/csv"}),n=await fetch(e,r);await g(n)}catch(t){(0,c.Q)(t)}},g=async t=>{if(204===t.status)throw Error("No documents found");t.ok||await m(t);let e=t.headers.get("Content-Disposition"),r=t.headers.get("Content-Type"),n=(null==r?void 0:r.split("/")[1])||"",o=(t=>{if(!t)return null;let e=t.match(/filename\*=utf-8''([^;]+)|filename="?([^"]+)"?/i);if(e){if(e[1])return decodeURIComponent(e[1]);if(e[2])return decodeURIComponent(e[2])}return null})(e)||"download"+n;v(await t.blob(),o)},v=(t,e)=>{let r=window.URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(r)},m=async t=>{if("function"!=typeof t.json)throw Error("".concat(t.status," - ").concat(t.statusText));let e=await t.json();if("string"==typeof e.error)throw Error(e.error);if("object"==typeof e.error&&"string"==typeof e.error.message)throw Error(e.error.message);if("object"==typeof e.error&&"string"==typeof e.error.details)throw Error(e.error.details);if("string"==typeof e.message)throw Error(e.message)},b=async(t,e)=>{let r=await f({Accept:"application/json","Content-Type":"application/json"});r.method="POST",r.body=JSON.stringify(e);let n=await fetch(t,r);if(!n.ok)throw await m(n),Error("Something went wrong. Please reload the page and try again.");return n.json()}},87495:(t,e,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/[docId]",function(){return r(13257)}])}},t=>{t.O(0,[636,6593,8792],()=>t(t.s=87495)),_N_E=t.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.