PageSourceSearch

https://www.pix4d.com/component---src-pages-logout-tsx-61ba9babdcf12a4325ea.js

js pix4d.com collected 2026-09-24 08:48:43 UTC 6,102 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_pix4d_pix4d_com=self.webpackChunk_pix4d_pix4d_com||[]).push([[849],{8101:function(e,t,n){n.r(t);var o=n(6540),r=n(1467);const i=new r.uR;t.default=()=>(i.clear(),r.Bd&&(window.location.href="https://cloud.pix4d.com/logout?redirect_uri="+window.location.origin+"&client_id=fInUk8DbkMnixs8usr4XQ6iKdGcSDi9eCZ2lMmQ6"),o.createElement(o.Fragment,null))},1467:function(e,t,n){n.d(t,{uR:function(){return v},fx:function(){return y},Gn:function(){return b},Bd:function(){return l}});var o=n(2212);function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,i=0,s=0,a="";o=t.charAt(s++);~o&&(n=i%4?64*n+o:o,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return a};function s(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(i(e).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}(t)}catch(e){return i(t)}}function a(e){this.message=e}a.prototype=new Error,a.prototype.name="InvalidTokenError";var c=function(e,t){if("string"!=typeof e)throw new a("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(s(e.split(".")[n]))}catch(e){throw new a("Invalid token specified: "+e.message)}};const u=n(386),l="undefined"!=typeof window,f="https://cloud.pix4d.com/",d="fInUk8DbkMnixs8usr4XQ6iKdGcSDi9eCZ2lMmQ6",p=f+"user_account/api/v3/users/current/",h=f+"oauth2/authorize",g={en:"/welcome-to-pix4d",de:"/de/willkommen-bei-pix4d",es:"/es/bienvenido-a-pix4d",fr:"/fr/bienvenue-a-pix4d",pt:"/pt/bem-vindo-a-pix4d",it:"/it/benvenuto-a-pix4d"},m="pix4d-session",w="pix4d-user",y=function(e){void 0===e&&(e=!1);const{origin:t,href:n,pathname:o}=window.location;if(!t||!n)return"#";const r=(e=>{if("/"===e)return;const t=Object.keys(u.enabledLanguages).filter(e=>"en-US"!==e).reduce((e,t)=>e+(t+"|"),""),n=e.match(new RegExp("/(("+t+")+)/"));let o=n?n[1]:"";const r=u.enabledLanguages[o];return r===u.enabledLanguages.jp&&(o="ja"),r?o:void 0})(o),i=e?""+t+(e=>Object.keys(g).includes(e)?g[e]:g.en)(r||"en"):n,s=Math.random().toString(24).substring(2),a=h+"?redirect_uri="+encodeURIComponent(t+"/oauth-callback")+"&response_type=token&state="+encodeURIComponent(s+"-"+i)+"&client_id="+d;return r?((e,t)=>e+"&lang="+t)(a,r):a},b=function(e){void 0===e&&(e=!1);const{origin:t,href:n}=window.location;if(!t||!n)return"#";return f+"logout?redirect_uri="+(e?t:n)+"&client_id="+d};let v=function(){function e(){this.sessionFromFragment=e=>{const t=new URLSearchParams(e),n={};return["access_token","token_type","state"].forEach(e=>{const o=t.get(e);null!==o&&(n[e]=o)}),n},this.pathFromState=e=>{if(!e)return"";const t=e.match(/(^[^-]+)-(.*$)/);if(!t)return"";const n=new URL(t[2]);return n.origin!==window.location.origin?"":n.href},this.fetchUser=()=>{if(!this.session)return Promise.resolve(null);const e=this.session.accessToken;return fetch(""+p,{method:"GET",credentials:"include",headers:{Authorization:"Bearer "+e,"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{return{initial:(t=e).first_name[0],fullName:t.first_name+" "+t.last_name,firstName:t.first_name};var t})}}var t=e.prototype;return t.init=async function(){this.session=this.get(),this.user=this.getUser()},t.get=function(){var e;if(l)try{const t=window.localStorage.getItem(m);if(!t)return;return(e=>{const t=c(e.accessToken),n=new Date(0);return n.setUTCSeconds(t.exp),n.valueOf()>(new Date).valueOf()?e:void 0})({accessToken:(e=JSON.parse(t)).access_token,tokenType:e.token_type})}catch(r){return void console.log("unable to get session from storage",r)}},t.parse=function(e){const t=e.hash.substr(1),n=this.sessionFromFragment(t),o=this.pathFromState(n.state);this.set({accessToken:n.access_token,tokenType:n.token_type}),this.fetchUser().then(e=>{e&&(this.setUser(e),window.location.replace(o))}).catch(e=>{this.user=null,console.error(e)})},t.set=function(e){try{this.session=e,window.localStorage.setItem(m,JSON.stringify((e=>({access_token:e.accessToken,token_type:e.tokenType}))(e)))}catch(r){console.log("unable to persist session in storage",r)}},t.getUser=function(){if(l)try{const e=window.localStorage.getItem(w);if(!e)return;return JSON.parse(e)}catch(r){return void console.log("unable to get session from storage",r)}},t.setUser=function(e){try{this.user=e,window.localStorage.setItem(w,JSON.stringify(e))}catch(r){console.log("unable to persist session in storage",r)}},t.clear=function(){try{"undefined"!=typeof window&&(window.localStorage.removeItem(m),window.localStorage.removeItem(w))}catch(r){console.log("unable to remove session from storage",r)}},(0,o.A)(e,[{key:"isAuthenticated",get:function(){return Boolean(this.session)}}])}()},2212:function(e,t,n){function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function r(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}function s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{A:function(){return s}})}}]);
2//# sourceMappingURL=component---src-pages-logout-tsx-61ba9babdcf12a4325ea.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.