1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`4a90e623c04e03fcc12f12c2da5b5d478a5d36a1`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`a50daabe-7507-4fbb-b825-59b91ce26847`,e._sentryDebugIdIdentifier=`sentry-dbid-a50daabe-7507-4fbb-b825-59b91ce26847`)}catch{}})();import{i as e,n as t}from"./common-BvBdBLQ1.js";import{r as n}from"./common-UuMT5vD4.js";import{j as r}from"./codeGroups.queries-Djr4MG_s.js";import{t as i}from"./FileSaver.min-DMjzOT6S.js";var a=function(){let e=!0;return function(t,n){let r=e?function(){if(n){let e=n.apply(t,arguments);return n=null,e}}:function(){};return e=!1,r}}();a(void 0,function(){let e;try{e=Function(`return (function() {}.constructor("return this")( ));`)()}catch{e=window}let t=e.console=e.console||{},n=[`log`,`warn`,`info`,`error`,`exception`,`table`,`trace`];for(let e=0;e<n.length;e++){let r=a.constructor.prototype.bind(a),i=n[e],o=t[i]||r;r.__proto__=a.bind(a),r.toString=o.toString.bind(o),t[i]=r}})();var o=[`;`,`,`,` `,`|`],s=[`pdf`,`png`,`jpg`,`tif`];function c(e){return(e.lanes??1)>1||!!e.sequence?.enabled}function l(e,t=3){let n=0;for(let t=0;t<e.length;t++)n=n*31+e.charCodeAt(t)>>>0;let r=``;for(let e=0;e<Math.max(1,t);e++)r+=`ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`[n%36],n=Math.floor(n/36);return r}function u(e){return(e??``).toUpperCase().replace(/[^A-Z0-9]/g,``).slice(0,3)}function d(e,t){return t<=1?e:Math.ceil(e/t)}function f(e){let t=(e??``).replace(/[\r\n]/g,``).slice(0,4);return t===``?`;`:t}function p(e){return(e??``).trim().replace(/^\.+/,``).replace(/[/\\:*?"<>|\s]/g,``).slice(0,8)}function m(e,t){return t===``?e:e+`.`+t}function h(e,t={}){let{lanes:n=1,separator:r=`;`,extension:i=`pdf`,sequence:a}=t,o=Math.min(50,Math.max(1,Number.isFinite(n)?Math.trunc(n):1)),s=p(i),c=f(r),l=d(e.length,o),h=!!a?.enabled,g=a?.radix===16?16:10,_=h?u(a?.prefix??``):``,v=Math.max(1,l.toString(g).length),y=e=>_+(e+1).toString(g).toUpperCase().padStart(v,`0`),b=[];for(let t=0,n=0;t<e.length;t+=o,n++){let r=e.slice(t,t+o).map(e=>m(e,s));h&&r.push(y(n)),b.push(r.join(c))}return b.join(` 2`)}var g=i(),_=function(){let e=!0;return function(t,n){let r=e?function(){if(n){let e=n.apply(t,arguments);return n=null,e}}:function(){};return e=!1,r}}();_(void 0,function(){let e=function(){let e;try{e=Function(`return (function() {}.constructor("return this")( ));`)()}catch{e=window}return e}(),t=e.console=e.console||{},n=[`log`,`warn`,`info`,`error`,`exception`,`table`,`trace`];for(let e=0;e<n.length;e++){let r=_.constructor.prototype.bind(_),i=n[e],a=t[i]||r;r.__proto__=_.bind(_),r.toString=a.toString.bind(a),t[i]=r}})();function v(e){let{shortDomain:t,code:n,codeTemplate:r}=e;return r?.encoding===`alphanumeric`?`HTTPS://`+t.toUpperCase()+`/`+n.toUpperCase():`https://`+t+`/`+n}var y=async(e,{t:r,notification:i})=>{let a=await t().getAccessTokenSilently();try{let t={};t[`Content-Type`]=`application/json`,t.Authorization=`Bearer `+a;let o={};o.groupId=e.groupId,o.limit=5e4;let s={};s.data=o;let c=await fetch(n+`/api/v1/get-code-group-redirects`,{method:`POST`,headers:t,body:JSON.stringify(s)});if(!c.ok)throw console.error(`Network response was not ok`),Error(`Network response was not ok`);if(!c.body)throw console.error(`The server returned an empty response.`),Error(`The server returned an empty response.`);let l=c.headers.get(`content-disposition`)?.match(/filename="(.+)"/)?.[1];if(`showSaveFilePicker`in window){let e;try{let t={};t[`application/zip`]=[`.zip`];let n={};n.description=`ZIP files`,n.accept=t;let r={};r.suggestedName=l,r.types=[n],e=await window.showSaveFilePicker(r)}catch(e){if(!e.message.includes(`Must be handling a user gesture to show a file picker`))throw e}if(e){let t=await e.createWritable();if(c.body.pipeTo)await c.body.pipeTo(t);else{let e=c.body.getReader(),n=t.getWriter(),r;for(;!(r=await e.read()).done;){let{value:e}=r;await n.write(e)}await n.close()}i({type:`success`,message:r(`qrCodeGroup.download.urlsAndRedirects.success.value`,`File downloaded successfully`)});return}}i({type:`info`,message:r(`qrCodeGroup.download.urlsAndRedirects.preparing.value`,`Preparing file for download...`)});let u=c.body.getReader(),d=[],f;for(;!(f=await u.read()).done;){let{value:e}=f;d.push(e)}let p={};p.type=`application/zip`;let m=new Blob(d,p),h=URL.createObjectURL(m),g=document.createElement(`a`);g.style.display=`none`,g.href=h,g.download=l,document.body.appendChild(g),g.click(),URL.revokeObjectURL(h),document.body.removeChild(g)}catch(e){console.error(`Error downloading CSV:`,e),i({type:`error`,message:r(`qrCodeGroup.download.urlsAndRedirects.error.value`,`Error downloading URLs & Redirects CSV`)})}},b=async t=>{let n={};n.groupId=t.groupId,n.limit=10**7;let r=await e.getCodeGroupEntries(n),i=`codeTemplate`in t?t.codeTemplate:void 0,a=`sourceUrl 3`+r.data.map(({code:e})=>{let n={};return n.shortDomain=t.shortDomain,n.code=e,n.codeTemplate=i,v(n)}).join(` 4`),o={};return o.type=`text/plain`,(0,g.saveAs)(new Blob([a],o),(t.projectId+`_`+(t.name||t.groupId)+`_`+r.data.length+`_urls`).replace(/[/\\:*?"<>|]/g,`-`)+`.txt`),r.data.length},x=async e=>{let t=await r(e.groupId),n=t.headers.get(`content-disposition`)?.match(/filename="(.+)"/)?.[1]||(e.projectId+`_`+(e.name||e.groupId)+`_`+e.totalCodesCount+`_source_urls_verification_codes.csv`).replace(/[/\\:*?"<>|]/g,`-`);(0,g.saveAs)(await t.blob(),n)},S=async(t,n={})=>{let{lanes:r=1}=n,i={};i.groupId=t.groupId,i.limit=10**7;let a=await e.getCodeGroupEntries(i),o=h(a.data.map(({code:e})=>e),n),s={};s.type=`text/plain`;let c=new Blob([o],s),l=r>1?`_`+r+`lanes`:``;return(0,g.saveAs)(c,(t.projectId+`_`+(t.name||t.groupId)+`_`+a.data.length+`_data`+l).replace(/[/\\:*?"<>|]/g,`-`)+`.csv`),a.data.length};function C(e){let t=document.createElement(`a`);t.href=e,t.target=`_blank`,document.body.appendChild(t),t.click(),document.body.removeChild(t)}export{C as a,l as c,p as d,f,x as i,d as l,S as n,s as o,u as p,b as r,o as s,y as t,c as u}; 5//# sourceMappingURL=common-51YgxqvZ2.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.