diff --git a/gulpfile.js b/gulpfile.js index 63a6e01..fa0582b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -8,6 +8,7 @@ const crypto = require("crypto"); const fs = require("fs"); const esbuild = require("esbuild"); const { compileTemplate } = require("vue/compiler-sfc"); +const { Script } = require("node:vm"); const { promisify } = require("node:util"); const coreJsFiles = [ @@ -67,7 +68,13 @@ function buildCoreJs(cb) { async function buildVendorJs() { const lazyAssets = {}; await Promise.all(Object.entries(lazyGroups).map(async ([name, files]) => { - await promisify(pipeline)(orderedSrc(files), concat(`${name}.min.js`), uglify(), dest("public/script")); + // PDF.js is already minified upstream. Re-minifying it breaks rendering + // for documents such as #857, even though page.render() resolves. + if (name === "pdf") { + for (const file of files) new Script(fs.readFileSync(file, "utf8"), { filename: file }); + } + const transforms = name === "pdf" ? [] : [uglify()]; + await promisify(pipeline)(orderedSrc(files), concat(`${name}.min.js`), ...transforms, dest("public/script")); lazyAssets[name] = `/script/${name}.${hashFile(`public/script/${name}.min.js`)}.min.js`; })); const app = await esbuild.build({ diff --git a/public/asset-manifest.json b/public/asset-manifest.json index e2c68a1..e10f604 100644 --- a/public/asset-manifest.json +++ b/public/asset-manifest.json @@ -1,10 +1,10 @@ { "core.min.js": "core.3b07189932.min.js", - "vendor.min.js": "vendor.f9925bc8f9.min.js", + "vendor.min.js": "vendor.7107f60347.min.js", "mermaid.min.js": "mermaid.f848a72d16.min.js", "all.min.css": "all.5fbafcda4e.min.css", "markdown.min.js": "markdown.44f2e93820.min.js", - "pdf.min.js": "pdf.0175d53d2f.min.js", + "pdf.min.js": "pdf.4d9cc6ff49.min.js", "notebook.min.js": "notebook.c3144c18ae.min.js", "org.min.js": "org.f61f262915.min.js", "editor.min.js": "editor.4f142d3adc.min.js" diff --git a/public/partials/connections.htm b/public/partials/connections.htm index 55bf92c..8c77769 100644 --- a/public/partials/connections.htm +++ b/public/partials/connections.htm @@ -44,12 +44,12 @@
{{ resource.name || resource.id }}{{ resource.type }} · {{ resource.id }}
{{ resource.connection === 'github-app' ? 'Read-only App' : 'Legacy OAuth' }} -
+
Access unavailable. Allow this repository on GitHub, then check again.
- +

Removing access stops new fetches from GitHub. Published content keeps its current expiration and removal settings.

diff --git a/public/script/pdf.min.js b/public/script/pdf.min.js index ab5b14a..1e2923b 100644 --- a/public/script/pdf.min.js +++ b/public/script/pdf.min.js @@ -1,2 +1,22 @@ -((t,e)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t.pdfjsLib=e():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],()=>t.pdfjsLib=e()):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=t.pdfjsLib=e():t["pdfjs-dist/build/pdf"]=t.pdfjsLib=e()})(globalThis,()=>(()=>{var __webpack_modules__=[,(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.VerbosityLevel=e.Util=e.UnknownErrorException=e.UnexpectedResponseException=e.TextRenderingMode=e.RenderingIntentFlag=e.PromiseCapability=e.PermissionFlag=e.PasswordResponses=e.PasswordException=e.PageActionEventType=e.OPS=e.MissingPDFException=e.MAX_IMAGE_SIZE_TO_CACHE=e.LINE_FACTOR=e.LINE_DESCENT_FACTOR=e.InvalidPDFException=e.ImageKind=e.IDENTITY_MATRIX=e.FormatError=e.FeatureTest=e.FONT_IDENTITY_MATRIX=e.DocumentActionEventType=e.CMapCompressionType=e.BaseException=e.BASELINE_FACTOR=e.AnnotationType=e.AnnotationReplyType=e.AnnotationPrefix=e.AnnotationMode=e.AnnotationFlag=e.AnnotationFieldFlag=e.AnnotationEditorType=e.AnnotationEditorPrefix=e.AnnotationEditorParamsType=e.AnnotationBorderStyleType=e.AnnotationActionEventType=e.AbortException=void 0,e.assert=function(t,e){t||a(e)},e.bytesToString=h,e.createValidAbsoluteUrl=function(e){let t=1{switch(t?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return 1;default:return}})(i))return i}catch{}return null},e.getModificationDate=function(){var t=0=i.INFOS&&console.log("Info: "+t)},e.isArrayBuffer=function(t){return"object"==typeof t&&void 0!==t?.byteLength},e.isArrayEqual=function(r,i){if(r.length!==i.length)return!1;for(let t=0,e=r.length;te?e.normalize("NFKC"):g.get(r))},e.objectFromMap=function(t){var e,r,i=Object.create(null);for([e,r]of t)i[e]=r;return i},e.objectSize=function(t){return Object.keys(t).length},e.setVerbosityLevel=function(t){Number.isInteger(t)&&(s=t)},e.shadow=o,e.string32=function(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)},e.stringToBytes=d,e.stringToPDFString=function(r){if("ï"<=r[0]){let t;if("þ"===r[0]&&"ÿ"===r[1]?t="utf-16be":"ÿ"===r[0]&&"þ"===r[1]?t="utf-16le":"ï"===r[0]&&"»"===r[1]&&"¿"===r[2]&&(t="utf-8"),t)try{var e=new TextDecoder(t,{fatal:!0}),i=d(r);return e.decode(i)}catch(r){n(`stringToPDFString: "${r}".`)}}var s=[];for(let t=0,e=r.length;t=i.WARNINGS&&console.log("Warning: "+t)}function a(t){throw new Error(t)}function o(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!(3{try{return new Function(""),!0}catch{return!1}})())}static get isOffscreenCanvasSupported(){return o(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get platform(){return"undefined"==typeof navigator?o(this,"platform",{isWin:!1,isMac:!1}):o(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){return o(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}};let c=[...Array(256).keys()].map(t=>t.toString(16).padStart(2,"0")),u=(e.Util=class{static makeHexColor(t,e,r){return"#"+c[t]+c[e]+c[r]}static scaleMinMax(t,e){let r;t[0]?(t[0]<0&&(r=e[0],e[0]=e[1],e[1]=r),e[0]*=t[0],e[1]*=t[0],t[3]<0&&(r=e[2],e[2]=e[3],e[3]=r),e[2]*=t[3],e[3]*=t[3]):(r=e[0],e[0]=e[2],e[2]=r,r=e[1],e[1]=e[3],e[3]=r,t[1]<0&&(r=e[2],e[2]=e[3],e[3]=r),e[2]*=t[1],e[3]*=t[1],t[2]<0&&(r=e[0],e[0]=e[1],e[1]=r),e[0]*=t[2],e[1]*=t[2]),e[0]+=t[4],e[1]+=t[4],e[2]+=t[5],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){return[t[0]*e[0]+t[1]*e[2]+e[4],t[0]*e[1]+t[1]*e[3]+e[5]]}static applyInverseTransform(t,e){var r=e[0]*e[3]-e[1]*e[2];return[(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/r,(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/r]}static getAxialAlignedBoundingBox(t,e){var r=this.applyTransform(t,e),i=this.applyTransform(t.slice(2,4),e),s=this.applyTransform([t[0],t[3]],e),t=this.applyTransform([t[2],t[1]],e);return[Math.min(r[0],i[0],s[0],t[0]),Math.min(r[1],i[1],s[1],t[1]),Math.max(r[0],i[0],s[0],t[0]),Math.max(r[1],i[1],s[1],t[1])]}static inverseTransform(t){var e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t){var e=[t[0],t[2],t[1],t[3]],r=t[0]*e[0]+t[1]*e[2],i=t[2]*e[1]+t[3]*e[3],s=(r+i)/2,r=Math.sqrt((r+i)**2-4*(r*i-(t[2]*e[0]+t[3]*e[2])*(t[0]*e[1]+t[1]*e[3])))/2,i=s-r||1;return[Math.sqrt(s+r||1),Math.sqrt(i)]}static normalizeRect(t){var e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[3]{this.resolve=t=>{this.#t=!0,e(t)},this.reject=t=>{this.#t=!0,r(t)}})}get settled(){return this.#t}};let f=null,g=null;e.AnnotationPrefix="pdfjs_internal_id_"},(t,e,r)=>{function i(t,e){var r={};r[t]=l(t,e,c),a({global:!0,constructor:!0,arity:1,forced:c},r)}function s(t,e){var r;d&&d[t]&&((r={})[t]=l(h+"."+t,e,c),a({target:h,stat:!0,constructor:!0,arity:1,forced:c},r))}var a=r(3),n=r(4),o=r(69),l=r(70),h="WebAssembly",d=n[h],c=7!==Error("e",{cause:7}).cause;i("Error",function(e){return function(t){return o(e,this,arguments)}}),i("EvalError",function(e){return function(t){return o(e,this,arguments)}}),i("RangeError",function(e){return function(t){return o(e,this,arguments)}}),i("ReferenceError",function(e){return function(t){return o(e,this,arguments)}}),i("SyntaxError",function(e){return function(t){return o(e,this,arguments)}}),i("TypeError",function(e){return function(t){return o(e,this,arguments)}}),i("URIError",function(e){return function(t){return o(e,this,arguments)}}),s("CompileError",function(e){return function(t){return o(e,this,arguments)}}),s("LinkError",function(e){return function(t){return o(e,this,arguments)}}),s("RuntimeError",function(e){return function(t){return o(e,this,arguments)}})},(t,e,r)=>{var h=r(4),d=r(5).f,c=r(44),u=r(48),p=r(38),f=r(56),g=r(68);t.exports=function(t,e){var r,i,s,a,n=t.target,o=t.global,l=t.stat;if(r=o?h:l?h[n]||p(n,{}):(h[n]||{}).prototype)for(i in e){if(s=e[i],a=t.dontCallGetSet?(a=d(r,i))&&a.value:r[i],!g(o?i:n+(l?".":"#")+i,t.forced)&&void 0!==a){if(typeof s==typeof a)continue;f(s,a)}(t.sham||a&&a.sham)&&c(s,"sham",!0),u(r,i,s,t)}}},function(t){function e(t){return t&&t.Math===Math&&t}t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},(t,e,r)=>{var i=r(6),s=r(8),a=r(10),n=r(11),o=r(12),l=r(18),h=r(39),d=r(42),c=Object.getOwnPropertyDescriptor;e.f=i?c:function(t,e){if(t=o(t),e=l(e),d)try{return c(t,e)}catch(t){}if(h(t,e))return n(!s(a.f,t,e),t[e])}},(t,e,r)=>{r=r(7);t.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},(t,e,r)=>{var r=r(9),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},(t,e,r)=>{r=r(7);t.exports=!r(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},(t,e)=>{var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,s=i&&!r.call({1:2},1);e.f=s?function(t){t=i(this,t);return!!t&&t.enumerable}:r},t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},(t,e,r)=>{var i=r(13),s=r(16);t.exports=function(t){return i(s(t))}},(t,e,r)=>{var i=r(14),s=r(7),a=r(15),n=Object,o=i("".split);t.exports=s(function(){return!n("z").propertyIsEnumerable(0)})?function(t){return"String"===a(t)?o(t,""):n(t)}:n},(t,e,r)=>{var r=r(9),i=Function.prototype,s=i.call,i=r&&i.bind.bind(s,s);t.exports=r?i:function(t){return function(){return s.apply(t,arguments)}}},(t,e,r)=>{var r=r(14),i=r({}.toString),s=r("".slice);t.exports=function(t){return s(i(t),8,-1)}},(t,e,r)=>{var i=r(17),s=TypeError;t.exports=function(t){if(i(t))throw s("Can't call method on "+t);return t}},t=>{t.exports=function(t){return null==t}},(t,e,r)=>{var i=r(19),s=r(23);t.exports=function(t){t=i(t,"string");return s(t)?t:t+""}},(t,e,r)=>{var i=r(8),s=r(20),a=r(23),n=r(30),o=r(33),r=r(34),l=TypeError,h=r("toPrimitive");t.exports=function(t,e){if(!s(t)||a(t))return t;var r=n(t,h);if(r){if(r=i(r,t,e=void 0===e?"default":e),!s(r)||a(r))return r;throw l("Can't convert object to primitive value")}return o(t,e=void 0===e?"number":e)}},(t,e,r)=>{var i=r(21),r=r(22),s=r.all;t.exports=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===s}:function(t){return"object"==typeof t?null!==t:i(t)}},(t,e,r)=>{var r=r(22),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},t=>{var e="object"==typeof document&&document.all;t.exports={all:e,IS_HTMLDDA:void 0===e&&void 0!==e}},(t,e,r)=>{var i=r(24),s=r(21),a=r(25),r=r(26),n=Object;t.exports=r?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return s(e)&&a(e.prototype,n(t))}},(t,e,r)=>{var i=r(4),s=r(21);t.exports=function(t,e){return arguments.length<2?(r=i[t],s(r)?r:void 0):i[t]&&i[t][e];var r}},(t,e,r)=>{r=r(14);t.exports=r({}.isPrototypeOf)},(t,e,r)=>{r=r(27);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,e,r)=>{var i=r(28),s=r(7),a=r(4).String;t.exports=!!Object.getOwnPropertySymbols&&!s(function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41})},(t,e,r)=>{var i,s,a=r(4),r=r(29),n=a.process,a=a.Deno,n=n&&n.versions||a&&a.version,a=n&&n.v8;!(s=a?0<(i=a.split("."))[0]&&i[0]<4?1:+(i[0]+i[1]):s)&&r&&(!(i=r.match(/Edge\/(\d+)/))||74<=i[1])&&(i=r.match(/Chrome\/(\d+)/))&&(s=+i[1]),t.exports=s},t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(t,e,r)=>{var i=r(31),s=r(17);t.exports=function(t,e){t=t[e];return s(t)?void 0:i(t)}},(t,e,r)=>{var i=r(21),s=r(32),a=TypeError;t.exports=function(t){if(i(t))return t;throw a(s(t)+" is not a function")}},t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},(t,e,r)=>{var s=r(8),a=r(21),n=r(20),o=TypeError;t.exports=function(t,e){var r,i;if("string"===e&&a(r=t.toString)&&!n(i=s(r,t)))return i;if(a(r=t.valueOf)&&!n(i=s(r,t)))return i;if("string"!==e&&a(r=t.toString)&&!n(i=s(r,t)))return i;throw o("Can't convert object to primitive value")}},(t,e,r)=>{var i=r(4),s=r(35),a=r(39),n=r(41),o=r(27),r=r(26),l=i.Symbol,h=s("wks"),d=r?l.for||l:l&&l.withoutSetter||n;t.exports=function(t){return a(h,t)||(h[t]=o&&a(l,t)?l[t]:d("Symbol."+t)),h[t]}},(t,e,r)=>{var i=r(36),s=r(37);(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.32.2",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE",source:"https://github.com/zloirock/core-js"})},t=>{t.exports=!1},(t,e,r)=>{var i=r(4),r=r(38),s="__core-js_shared__",i=i[s]||r(s,{});t.exports=i},(t,e,r)=>{var i=r(4),s=Object.defineProperty;t.exports=function(e,r){try{s(i,e,{value:r,configurable:!0,writable:!0})}catch(t){i[e]=r}return r}},(t,e,r)=>{var i=r(14),s=r(40),a=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(s(t),e)}},(t,e,r)=>{var i=r(16),s=Object;t.exports=function(t){return s(i(t))}},(t,e,r)=>{var r=r(14),i=0,s=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+s,36)}},(t,e,r)=>{var i=r(6),s=r(7),a=r(43);t.exports=!i&&!s(function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},(t,e,r)=>{var i=r(4),r=r(20),s=i.document,a=r(s)&&r(s.createElement);t.exports=function(t){return a?s.createElement(t):{}}},(t,e,r)=>{var i=r(6),s=r(45),a=r(11);t.exports=i?function(t,e,r){return s.f(t,e,a(1,r))}:function(t,e,r){return t[e]=r,t}},(t,e,r)=>{var i=r(6),s=r(42),a=r(46),n=r(47),o=r(18),l=TypeError,h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",p="writable";e.f=i?a?function(t,e,r){var i;return n(t),e=o(e),n(r),"function"==typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]&&(i=d(t,e))&&i[p]&&(t[e]=r.value,r={configurable:(u in r?r:i)[u],enumerable:(c in r?r:i)[c],writable:!1}),h(t,e,r)}:h:function(t,e,r){if(n(t),e=o(e),n(r),s)try{return h(t,e,r)}catch(t){}if("get"in r||"set"in r)throw l("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},(t,e,r)=>{var i=r(6),r=r(7);t.exports=i&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},(t,e,r)=>{var i=r(20),s=String,a=TypeError;t.exports=function(t){if(i(t))return t;throw a(s(t)+" is not an object")}},(t,e,r)=>{var n=r(21),o=r(45),l=r(49),h=r(38);t.exports=function(t,e,r,i){var s=(i=i||{}).enumerable,a=void 0!==i.name?i.name:e;if(n(r)&&l(r,a,i),i.global)s?t[e]=r:h(e,r);else{try{i.unsafe?t[e]&&(s=!0):delete t[e]}catch(t){}s?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t}},(t,e,r)=>{var i=r(14),s=r(7),a=r(21),n=r(39),o=r(6),l=r(50).CONFIGURABLE,h=r(51),r=r(52),d=r.enforce,c=r.get,u=String,p=Object.defineProperty,f=i("".slice),g=i("".replace),m=i([].join),v=o&&!s(function(){return 8!==p(function(){},"length",{value:8}).length}),_=String(String).split("String"),r=t.exports=function(t,e,r){"Symbol("===f(u(e),0,7)&&(e="["+g(u(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!n(t,"name")||l&&t.name!==e)&&(o?p(t,"name",{value:e,configurable:!0}):t.name=e),v&&r&&n(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&n(r,"constructor")&&r.constructor?o&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}r=d(t);return n(r,"source")||(r.source=m(_,"string"==typeof e?e:"")),t};Function.prototype.toString=r(function(){return a(this)&&c(this).source||h(this)},"toString")},(t,e,r)=>{var i=r(6),r=r(39),s=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,r=r(s,"name"),n=r&&"something"===function(){}.name,i=r&&(!i||a(s,"name").configurable);t.exports={EXISTS:r,PROPER:n,CONFIGURABLE:i}},(t,e,r)=>{var i=r(14),s=r(21),r=r(37),a=i(Function.toString);s(r.inspectSource)||(r.inspectSource=function(t){return a(t)}),t.exports=r.inspectSource},(t,e,r)=>{var i,s,a,n,o=r(53),l=r(4),h=r(20),d=r(44),c=r(39),u=r(37),p=r(54),r=r(55),f="Object already initialized",g=l.TypeError,l=l.WeakMap,m=o||u.state?((a=u.state||(u.state=new l)).get=a.get,a.has=a.has,a.set=a.set,i=function(t,e){if(a.has(t))throw g(f);return e.facade=t,a.set(t,e),e},s=function(t){return a.get(t)||{}},function(t){return a.has(t)}):(r[n=p("state")]=!0,i=function(t,e){if(c(t,n))throw g(f);return e.facade=t,d(t,n,e),e},s=function(t){return c(t,n)?t[n]:{}},function(t){return c(t,n)});t.exports={set:i,get:s,has:m,enforce:function(t){return m(t)?s(t):i(t,{})},getterFor:function(e){return function(t){if(h(t)&&(t=s(t)).type===e)return t;throw g("Incompatible receiver, "+e+" required")}}}},(t,e,r)=>{var i=r(4),r=r(21),i=i.WeakMap;t.exports=r(i)&&/native code/.test(String(i))},(t,e,r)=>{var i=r(35),s=r(41),a=i("keys");t.exports=function(t){return a[t]||(a[t]=s(t))}},t=>{t.exports={}},(t,e,r)=>{var l=r(39),h=r(57),d=r(5),c=r(45);t.exports=function(t,e,r){for(var i=h(e),s=c.f,a=d.f,n=0;n{var i=r(24),s=r(14),a=r(58),n=r(67),o=r(47),l=s([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=a.f(o(t)),r=n.f;return r?l(e,r(t)):e}},(t,e,r)=>{var i=r(59),s=r(66).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,s)}},(t,e,r)=>{var i=r(14),n=r(39),o=r(12),l=r(60).indexOf,h=r(55),d=i([].push);t.exports=function(t,e){var r,i=o(t),s=0,a=[];for(r in i)!n(h,r)&&n(i,r)&&d(a,r);for(;e.length>s;)!n(i,r=e[s++])||~l(a,r)||d(a,r);return a}},(t,e,r)=>{function i(o){return function(t,e,r){var i,s=l(t),a=d(s),n=h(r,a);if(o&&e!=e){for(;n{var i=r(62),s=Math.max,a=Math.min;t.exports=function(t,e){t=i(t);return t<0?s(t+e,0):a(t,e)}},(t,e,r)=>{var i=r(63);t.exports=function(t){t=+t;return t!=t||0==t?0:i(t)}},t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){t=+t;return(0{var i=r(65);t.exports=function(t){return i(t.length)}},(t,e,r)=>{var i=r(62),s=Math.min;t.exports=function(t){return 0{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,e)=>{e.f=Object.getOwnPropertySymbols},(t,e,r)=>{function i(t,e){return(t=l[o(t)])===d||t!==h&&(a(e)?s(e):!!e)}var s=r(7),a=r(21),n=/#|\.prototype\./,o=i.normalize=function(t){return String(t).replace(n,".").toLowerCase()},l=i.data={},h=i.NATIVE="N",d=i.POLYFILL="P";t.exports=i},(t,e,r)=>{var r=r(9),i=Function.prototype,s=i.apply,a=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(s):function(){return a.apply(s,arguments)})},(t,e,r)=>{var c=r(24),u=r(39),p=r(44),f=r(25),g=r(71),m=r(56),v=r(74),_=r(75),b=r(76),y=r(80),A=r(81),S=r(6),x=r(36);t.exports=function(t,e,r,i){var s="stackTraceLimit",a=i?2:1,n=t.split("."),o=n[n.length-1],l=c.apply(null,n);if(l){var h=l.prototype;if(!x&&u(h,"cause")&&delete h.cause,!r)return l;var n=c("Error"),d=e(function(t,e){e=b(i?e:t,void 0),t=i?new l(t):new l;return void 0!==e&&p(t,"message",e),A(t,d,t.stack,2),this&&f(h,this)&&_(t,this,d),a{var s=r(72),a=r(47),n=r(73);t.exports=Object.setPrototypeOf||("__proto__"in{}?(()=>{var r,i=!1,t={};try{(r=s(Object.prototype,"__proto__","set"))(t,[]),i=t instanceof Array}catch(r){}return function(t,e){return a(t),n(e),i?r(t,e):t.__proto__=e,t}})():void 0)},(t,e,r)=>{var i=r(14),s=r(31);t.exports=function(t,e,r){try{return i(s(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},(t,e,r)=>{var i=r(21),s=String,a=TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw a("Can't set "+s(t)+" as a prototype")}},(t,e,r)=>{var i=r(45).f;t.exports=function(t,e,r){r in t||i(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})}},(t,e,r)=>{var i=r(21),s=r(20),a=r(71);t.exports=function(t,e,r){return a&&i(e=e.constructor)&&e!==r&&s(e=e.prototype)&&e!==r.prototype&&a(t,e),t}},(t,e,r)=>{var i=r(77);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},(t,e,r)=>{var i=r(78),s=String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return s(t)}},(t,e,r)=>{var i=r(79),s=r(21),a=r(15),n=r(34)("toStringTag"),o=Object,l="Arguments"===a(function(){return arguments}());t.exports=i?a:function(t){var e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=((t,e)=>{try{return t[e]}catch(t){}})(t=o(t),n))?e:l?a(t):"Object"===(e=a(t))&&s(t.callee)?"Arguments":e}},(t,e,r)=>{var i={};i[r(34)("toStringTag")]="z",t.exports="[object z]"===String(i)},(t,e,r)=>{var i=r(20),s=r(44);t.exports=function(t,e){i(e)&&"cause"in e&&s(t,"cause",e.cause)}},(t,e,r)=>{var s=r(44),a=r(82),n=r(83),o=Error.captureStackTrace;t.exports=function(t,e,r,i){n&&(o?o(t,e):s(t,"stack",a(r,i)))}},(t,e,r)=>{var r=r(14),i=Error,s=r("".replace),r=String(i("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,n=a.test(r);t.exports=function(t,e){if(n&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=s(t,a,"");return t}},(t,e,r)=>{var i=r(7),s=r(11);t.exports=!i(function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",s(1,7)),7!==t.stack)})},(t,e,r)=>{var i=r(48),s=r(14),c=r(77),u=r(85),r=URLSearchParams,a=r.prototype,p=s(a.append),f=s(a.delete),g=s(a.forEach),m=s([].push),s=new r("a=1&a=2&b=3");s.delete("a",1),s.delete("b",void 0),s+""!="a=2"&&i(a,"delete",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return f(this,t);var i=[];g(this,function(t,e){m(i,{key:e,value:t})}),u(e,1);for(var s,a=c(t),n=c(r),o=0,l=0,h=!1,d=i.length;o{var r=TypeError;t.exports=function(t,e){if(t{var i=r(48),s=r(14),n=r(77),o=r(85),r=URLSearchParams,a=r.prototype,l=s(a.getAll),h=s(a.has),s=new r("a=1");!s.has("a",2)&&s.has("a",void 0)||i(a,"has",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return h(this,t);var i=l(this,t);o(e,1);for(var s=n(r),a=0;a{var i=r(6),s=r(14),r=r(88),a=URLSearchParams.prototype,n=s(a.forEach);!i||"size"in a||r(a,"size",{get:function(){var t=0;return n(this,function(){t++}),t},configurable:!0,enumerable:!0})},(t,e,r)=>{var i=r(49),s=r(45);t.exports=function(t,e,r){return r.get&&i(r.get,e,{getter:!0}),r.set&&i(r.set,e,{setter:!0}),s.f(t,e,r)}},(t,e,r)=>{var i=r(3),a=r(40),n=r(64),o=r(90),l=r(92);i({target:"Array",proto:!0,arity:1,forced:r(7)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!(()=>{try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}})()},{push:function(t){var e=a(this),r=n(e),i=arguments.length;l(r+i);for(var s=0;s{var i=r(6),s=r(91),a=TypeError,n=Object.getOwnPropertyDescriptor,r=i&&!function(){if(void 0!==this)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=r?function(t,e){if(s(t)&&!n(t,"length").writable)throw a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},(t,e,r)=>{var i=r(15);t.exports=Array.isArray||function(t){return"Array"===i(t)}},t=>{var e=TypeError;t.exports=function(t){if(9007199254740991{var i=r(94),s=r(98).findLast,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLast",function(t){return s(a(this),t,1{function i(t){var e,t=y(t);if(u(t))return(e=E(t))&&p(e,F)?e[F]:i(t)}function s(t){return!!u(t)&&(t=f(t),p(I,t)||p(O,t))}var a,n,o,l=r(95),h=r(6),d=r(4),c=r(21),u=r(20),p=r(39),f=r(78),g=r(32),m=r(44),v=r(48),_=r(88),b=r(25),y=r(96),A=r(71),S=r(34),x=r(41),r=r(52),w=r.enforce,E=r.get,r=d.Int8Array,T=r&&r.prototype,C=d.Uint8ClampedArray,C=C&&C.prototype,P=r&&y(r),k=T&&y(T),r=Object.prototype,M=d.TypeError,S=S("toStringTag"),R=x("TYPED_ARRAY_TAG"),F="TypedArrayConstructor",D=l&&!!A&&"Opera"!==f(d.opera),x=!1,I={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},O={BigInt64Array:8,BigUint64Array:8};for(a in I)(o=(n=d[a])&&n.prototype)?w(o)[F]=n:D=!1;for(a in O)(o=(n=d[a])&&n.prototype)&&(w(o)[F]=n);if((!D||!c(P)||P===Function.prototype)&&(P=function(){throw M("Incorrect invocation")},D))for(a in I)d[a]&&A(d[a],P);if((!D||!k||k===r)&&(k=P.prototype,D))for(a in I)d[a]&&A(d[a].prototype,k);if(D&&y(C)!==k&&A(C,k),h&&!p(k,S))for(a in _(k,S,{configurable:x=!0,get:function(){return u(this)?this[R]:void 0}}),I)d[a]&&m(d[a],R,a);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:x&&R,aTypedArray:function(t){if(s(t))return t;throw M("Target is not a typed array")},aTypedArrayConstructor:function(t){if(!c(t)||A&&!b(P,t))throw M(g(t)+" is not a typed array constructor");return t},exportTypedArrayMethod:function(t,e,r,i){if(h){if(r)for(var s in I){s=d[s];if(s&&p(s.prototype,t))try{delete s.prototype[t]}catch(r){try{s.prototype[t]=e}catch(t){}}}k[t]&&!r||v(k,t,!r&&D&&T[t]||e,i)}},exportTypedArrayStaticMethod:function(t,e,r){var i,s;if(h){if(A){if(r)for(i in I)if((s=d[i])&&p(s,t))try{delete s[t]}catch(t){}if(P[t]&&!r)return;try{return v(P,t,!r&&D&&P[t]||e)}catch(t){}}for(i in I)!(s=d[i])||s[t]&&!r||v(s,t,e)}},getTypedArrayConstructor:i,isView:function(t){return!!u(t)&&("DataView"===(t=f(t))||p(I,t)||p(O,t))},isTypedArray:s,TypedArray:P,TypedArrayPrototype:k}},t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(t,e,r)=>{var i=r(39),s=r(21),a=r(40),n=r(54),r=r(97),o=n("IE_PROTO"),l=Object,h=l.prototype;t.exports=r?l.getPrototypeOf:function(t){var e,t=a(t);return i(t,o)?t[o]:(e=t.constructor,s(e)&&t instanceof e?e.prototype:t instanceof l?h:null)}},(t,e,r)=>{r=r(7);t.exports=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},(t,e,r)=>{function i(l){var h=1===l;return function(t,e,r){for(var i,s=u(t),a=c(s),n=d(e,r),o=p(a);0{var i=r(100),s=r(31),a=r(9),n=i(i.bind);t.exports=function(t,e){return s(t),void 0===e?t:a?n(t,e):function(){return t.apply(e,arguments)}}},(t,e,r)=>{var i=r(15),s=r(14);t.exports=function(t){if("Function"===i(t))return s(t)}},(t,e,r)=>{var i=r(94),s=r(98).findLastIndex,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLastIndex",function(t){return s(a(this),t,1{var i=r(4),a=r(8),s=r(94),n=r(64),o=r(103),l=r(40),r=r(7),h=i.RangeError,d=i.Int8Array,i=d&&d.prototype,c=i&&i.set,u=s.aTypedArray,i=s.exportTypedArrayMethod,p=!r(function(){var t=new Uint8ClampedArray(2);return a(c,t,{length:1,0:3},1),3!==t[1]}),s=p&&s.NATIVE_ARRAY_BUFFER_VIEWS&&r(function(){var t=new d(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]});i("set",function(t){u(this);var e=o(1{var i=r(104),s=RangeError;t.exports=function(t,e){t=i(t);if(t%e)throw s("Wrong offset");return t}},(t,e,r)=>{var i=r(62),s=RangeError;t.exports=function(t){t=i(t);if(t<0)throw s("The argument can't be less than 0");return t}},(t,e,r)=>{var i=r(106),r=r(94),s=r.aTypedArray,a=r.exportTypedArrayMethod,n=r.getTypedArrayConstructor;a("toReversed",function(){return i(s(this),n(this))})},(t,e,r)=>{var a=r(64);t.exports=function(t,e){for(var r=a(t),i=new e(r),s=0;s{var i=r(94),s=r(14),a=r(31),n=r(108),o=i.aTypedArray,l=i.getTypedArrayConstructor,r=i.exportTypedArrayMethod,h=s(i.TypedArrayPrototype.sort);r("toSorted",function(t){void 0!==t&&a(t);var e=o(this),e=n(l(e),e);return h(e,t)})},(t,e,r)=>{var a=r(64);t.exports=function(t,e){for(var r=0,i=a(e),s=new t(i);r{var i=r(110),s=r(94),a=r(111),n=r(62),o=r(112),l=s.aTypedArray,h=s.getTypedArrayConstructor;(0,s.exportTypedArrayMethod)("with",function(t,e){var r=l(this),t=n(t),e=a(r)?o(e):+e;return i(r,h(r),t,e)},!!!(()=>{try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}})())},(t,e,r)=>{var l=r(64),h=r(62),d=RangeError;t.exports=function(t,e,r,i){var s=l(t),r=h(r),a=r<0?s+r:r;if(s<=a||a<0)throw d("Incorrect index");for(var n=new e(s),o=0;o{var i=r(78);t.exports=function(t){t=i(t);return"BigInt64Array"===t||"BigUint64Array"===t}},(t,e,r)=>{var i=r(19),s=TypeError;t.exports=function(t){t=i(t,"number");if("number"==typeof t)throw s("Can't convert number to bigint");return BigInt(t)}},(t,e,r)=>{var i=r(6),s=r(88),a=r(114),r=ArrayBuffer.prototype;!i||"detached"in r||s(r,"detached",{configurable:!0,get:function(){return a(this)}})},(t,e,r)=>{var i=r(14),s=r(115),a=i(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==s(t))return!1;try{return a(t,0,0),!1}catch(t){return!0}}},(t,e,r)=>{var i=r(72),s=r(15),a=TypeError;t.exports=i(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==s(t))throw a("ArrayBuffer expected");return t.byteLength}},(t,e,r)=>{var i=r(3),s=r(117);s&&i({target:"ArrayBuffer",proto:!0},{transfer:function(){return s(this,arguments.length?arguments[0]:void 0,!0)}})},(t,e,r)=>{var i=r(4),s=r(14),a=r(72),h=r(118),d=r(114),c=r(115),r=r(119),u=i.TypeError,p=i.structuredClone,f=i.ArrayBuffer,g=i.DataView,m=Math.min,i=f.prototype,n=g.prototype,v=s(i.slice),_=a(i,"resizable","get"),b=a(i,"maxByteLength","get"),y=s(n.getInt8),A=s(n.setInt8);t.exports=r&&function(t,e,r){var i=c(t),e=void 0===e?i:h(e),s=!_||!_(t);if(d(t))throw u("ArrayBuffer is detached");t=p(t,{transfer:[t]});if(i===e&&(r||s))return t;if(e<=i&&(!r||s))return v(t,0,e);for(var r=r&&!s&&b?{maxByteLength:b(t)}:void 0,s=new f(e,r),a=new g(t),n=new g(s),o=m(e,i),l=0;l{var i=r(62),s=r(65),a=RangeError;t.exports=function(t){if(void 0===t)return 0;var t=i(t),e=s(t);if(t!==e)throw a("Wrong length or index");return e}},(t,e,r)=>{var i=r(4),s=r(7),a=r(28),n=r(120),o=r(121),l=r(122),h=i.structuredClone;t.exports=!!h&&!s(function(){var t,e;return!(o&&92{var i=r(121),r=r(122);t.exports=!i&&!r&&"object"==typeof window&&"object"==typeof document},t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},(t,e,r)=>{var i=r(4),r=r(15);t.exports="process"===r(i.process)},(t,e,r)=>{var i=r(3),s=r(117);s&&i({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return s(this,arguments.length?arguments[0]:void 0,!1)}})},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0,__w_pdfjs_require__(84),__w_pdfjs_require__(86),__w_pdfjs_require__(87),__w_pdfjs_require__(2),__w_pdfjs_require__(93),__w_pdfjs_require__(101),__w_pdfjs_require__(102),__w_pdfjs_require__(105),__w_pdfjs_require__(107),__w_pdfjs_require__(109),__w_pdfjs_require__(113),__w_pdfjs_require__(116),__w_pdfjs_require__(123),__w_pdfjs_require__(89),__w_pdfjs_require__(125),__w_pdfjs_require__(136),__w_pdfjs_require__(138),__w_pdfjs_require__(141),__w_pdfjs_require__(143),__w_pdfjs_require__(145),__w_pdfjs_require__(147),__w_pdfjs_require__(149),__w_pdfjs_require__(152);var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(163),_display_utils=__w_pdfjs_require__(168),_font_loader=__w_pdfjs_require__(171),_displayNode_utils=__w_pdfjs_require__(172),_canvas=__w_pdfjs_require__(173),_worker_options=__w_pdfjs_require__(176),_message_handler=__w_pdfjs_require__(177),_metadata=__w_pdfjs_require__(178),_optional_content_config=__w_pdfjs_require__(179),_transport_stream=__w_pdfjs_require__(180),_displayFetch_stream=__w_pdfjs_require__(181),_displayNetwork=__w_pdfjs_require__(184),_displayNode_stream=__w_pdfjs_require__(185),_displaySvg=__w_pdfjs_require__(186),_xfa_text=__w_pdfjs_require__(194);let DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory,DefaultCMapReaderFactory=(exports.DefaultCanvasFactory=DefaultCanvasFactory,_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory),DefaultFilterFactory=(exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory,_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory),DefaultStandardFontDataFactory=(exports.DefaultFilterFactory=DefaultFilterFactory,_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory);function getDocument(t){if("string"==typeof t||t instanceof URL?t={url:t}:(0,_util.isArrayBuffer)(t)&&(t={data:t}),"object"!=typeof t)throw new Error("Invalid parameter in getDocument, need parameter object.");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");let r=new PDFDocumentLoadingTask,i=r.docId,s=t.url?getUrlProp(t.url):null,a=t.data?getDataProp(t.data):null,n=t.httpHeaders||null,o=!0===t.withCredentials,e=t.password??null,l=t.range instanceof PDFDataRangeTransport?t.range:null,h=Number.isInteger(t.rangeChunkSize)&&0{for(var t of this._progressListeners)t(e,r)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(var t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(var t of this._progressiveDoneListeners)t()})}transportReady(){this._readyCapability.resolve()}requestDataRange(t,e){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(t,e){this._pdfInfo=t,this._transport=e,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then(t=>{if(!t)return t;var e,r=[];for(e in t)r.push(...t[e]);return r}))})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){return this._transport.startCleanup(0{c.renderTasks.delete(f),(this._maybeCleanupAfterRender||u)&&(this.#i=!0),this.#s(!u),t?(f.capability.reject(t),this._abortOperatorList({intentState:c,reason:t instanceof Error?t:new Error(t)})):f.capability.resolve(),this._stats?.timeEnd("Rendering"),this._stats?.timeEnd("Overall")}),f=new InternalRenderTask({callback:p,params:{canvasContext:e,viewport:r,transform:a,background:n},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:c.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!u,pdfBug:this._pdfBug,pageColors:h});(c.renderTasks||=new Set).add(f);t=f.task;return Promise.all([c.displayReadyCapability.promise,o]).then(t=>{var[t,e]=t;this.destroyed?p():(this._stats?.time("Rendering"),f.initializeGraphics({transparency:t,optionalContentConfig:e}),f.operatorListChanged())}).catch(p),t}getOperatorList(){var{intent:t="display",annotationMode:e=_util.AnnotationMode.ENABLE,printAnnotationStorage:r=null}=0t.items.length})}getTextContent(){var t=0_xfa_text.XfaText.textContent(t));let r=this.streamTextContent(t);return new Promise(function(i,t){let e=r.getReader(),s={items:[],styles:Object.create(null)};!function r(){e.read().then(function(t){var{value:t,done:e}=t;e?i(s):(Object.assign(s.styles,t.styles),s.items.push(...t.items),r())},t)}()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;var t,e=[];for(t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(var r of t.renderTasks)e.push(r.completed),r.cancel();return this.objs.clear(),this.#i=!1,this.#r(),Promise.all(e)}cleanup(){var t=0{this.#n=null,this.#s(!1)},DELAYED_CLEANUP_TIMEOUT),!1;for(let{renderTasks:t,operatorList:e}of this._intentStates.values())if(0{a.read().then(t=>{var{value:t,done:e}=t;e?n.streamReader=null:this._transport.destroyed||(this._renderPageChunk(t,n),o())},t=>{if(n.streamReader=null,!this._transport.destroyed){if(n.operatorList){n.operatorList.lastChunk=!0;for(let t of n.renderTasks)t.operatorListChanged();this.#s(!0)}if(n.displayReadyCapability)n.displayReadyCapability.reject(t);else{if(!n.opListReadCapability)throw t;n.opListReadCapability.reject(t)}}})});o()}_abortOperatorList(t){let{intentState:r,reason:e,force:i=!1}=t;if(r.streamReader){if(r.streamReaderCancelTimeout&&(clearTimeout(r.streamReaderCancelTimeout),r.streamReaderCancelTimeout=null),!i){if(0{r.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:r,reason:e,force:!0})},t))}}if(r.streamReader.cancel(new _util.AbortException(e.message)).catch(()=>{}),r.streamReader=null,!this._transport.destroyed){for(let[t,e]of this._intentStates)if(e===r){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{#a=new Set;#o=Promise.resolve();postMessage(t,e){let r={data:structuredClone(t,null)};this.#o.then(()=>{for(var t of this.#a)t.call(this,r)})}addEventListener(t,e){this.#a.add(e)}removeEventListener(t,e){this.#a.delete(e)}terminate(){this.#a.clear()}}exports.LoopbackPort=LoopbackPort;let PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_util.isNodeJS&&"function"==typeof require)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document){let t=document?.currentScript?.src;t&&(PDFWorkerUtil.fallbackWorkerSrc=t.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(t,e){let r;try{if(!(r=new URL(t)).origin||"null"===r.origin)return!1}catch{return!1}t=new URL(e,r);return r.origin===t.origin},PDFWorkerUtil.createCDNWrapper=function(t){return URL.createObjectURL(new Blob([`importScripts("${t}");`]))};class PDFWorker{static#l;constructor(){var{name:t=null,port:e=null,verbosity:r=(0,_util.getVerbosityLevel)()}=0{e.removeEventListener("error",s),r.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},s=()=>{this._webWorker||i()},a=(e.addEventListener("error",s),r.on("test",t=>{e.removeEventListener("error",s),this.destroyed?i():t?(this._messageHandler=r,this._port=e,this._webWorker=e,this._readyCapability.resolve(),r.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),r.destroy(),e.terminate())}),r.on("ready",t=>{if(e.removeEventListener("error",s),this.destroyed)i();else try{a()}catch{this._setupFakeWorker()}}),()=>{var t=new Uint8Array;r.send("test",t,[t.buffer])});return void a()}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then(t=>{var e,r,i;this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):(e=new LoopbackPort,this._port=e,r="fake"+PDFWorkerUtil.fakeWorkerId++,i=new _message_handler.MessageHandler(r+"_worker",r,e),t.setup(i,e),t=new _message_handler.MessageHandler(r,r+"_worker",e),this._messageHandler=t,this._readyCapability.resolve(),t.send("configure",{verbosity:this.verbosity}))}).catch(t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker.#l?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){if(!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");var e=this.#l?.get(t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new PDFWorker(t)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){let loader=async()=>{let mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&"function"==typeof require){let worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}exports.PDFWorker=PDFWorker;class WorkerTransport{#c=new Map;#h=new Map;#d=new Map;#u=null;constructor(t,e,r,i,s){this.messageHandler=t,this.loadingTask=e,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this._params=i,this.canvasFactory=s.canvasFactory,this.filterFactory=s.filterFactory,this.cMapReaderFactory=s.cMapReaderFactory,this.standardFontDataFactory=s.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}#p(t){var e=1{this.commonObjs.clear(),this.fontLoader.clear(),this.#c.clear(),this.filterFactory.destroy(),this._networkStream?.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject)}return this.destroyCapability.promise}setupMessageHandler(){let{messageHandler:a,loadingTask:i}=this;a.on("GetReader",(t,r)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=t=>{this._lastProgress={loaded:t.loaded,total:t.total}},r.onPull=()=>{this._fullReader.read().then(function(t){var{value:t,done:e}=t;e?r.close():((0,_util.assert)(t instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))}).catch(t=>{r.error(t)})},r.onCancel=t=>{this._fullReader.cancel(t),r.ready.catch(t=>{if(!this.destroyed)throw t})}}),a.on("ReaderHeadersReady",t=>{let e=new _util.PromiseCapability,r=this._fullReader;return r.headersReady.then(()=>{r.isStreamingSupported&&r.isRangeSupported||(this._lastProgress&&i.onProgress?.(this._lastProgress),r.onProgress=t=>{i.onProgress?.({loaded:t.loaded,total:t.total})}),e.resolve({isStreamingSupported:r.isStreamingSupported,isRangeSupported:r.isRangeSupported,contentLength:r.contentLength})},e.reject),e.promise}),a.on("GetRangeReader",(t,r)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");let e=this._networkStream.getRangeReader(t.begin,t.end);e?(r.onPull=()=>{e.read().then(function(t){var{value:t,done:e}=t;e?r.close():((0,_util.assert)(t instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))}).catch(t=>{r.error(t)})},r.onCancel=t=>{e.cancel(t),r.ready.catch(t=>{if(!this.destroyed)throw t})}):r.close()}),a.on("GetDoc",t=>{t=t.pdfInfo;this._numPages=t.numPages,this._htmlForXfa=t.htmlForXfa,delete t.htmlForXfa,i._capability.resolve(new PDFDocumentProxy(t,this))}),a.on("DocException",function(t){let e;switch(t.name){case"PasswordException":e=new _util.PasswordException(t.message,t.code);break;case"InvalidPDFException":e=new _util.InvalidPDFException(t.message);break;case"MissingPDFException":e=new _util.MissingPDFException(t.message);break;case"UnexpectedResponseException":e=new _util.UnexpectedResponseException(t.message,t.status);break;case"UnknownErrorException":e=new _util.UnknownErrorException(t.message,t.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}i._capability.reject(e)}),a.on("PasswordRequest",t=>{if(this.#u=new _util.PromiseCapability,i.onPassword){var e=t=>{t instanceof Error?this.#u.reject(t):this.#u.resolve({password:t})};try{i.onPassword(e,t.code)}catch(t){this.#u.reject(t)}}else this.#u.reject(new _util.PasswordException(t.message,t.code));return this.#u.promise}),a.on("DataLoaded",t=>{i.onProgress?.({loaded:t.length,total:t.length}),this.downloadInfoCapability.resolve(t)}),a.on("StartRenderPage",t=>{this.destroyed||this.#h.get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)}),a.on("commonobj",t=>{let[i,e,s]=t;if(!this.destroyed&&!this.commonObjs.has(i))switch(e){case"Font":let r=this._params;if("error"in s){let t=s.error;(0,_util.warn)("Error during font loading: "+t),this.commonObjs.resolve(i,t)}else{let t=r.pdfBug&&globalThis.FontInspector?.enabled?(t,e)=>globalThis.FontInspector.fontAdded(t,e):null,e=new _font_loader.FontFaceObject(s,{isEvalSupported:r.isEvalSupported,disableFontFace:r.disableFontFace,ignoreErrors:r.ignoreErrors,inspectFont:t});this.fontLoader.bind(e).catch(t=>a.sendWithPromise("FontFallback",{id:i})).finally(()=>{!r.fontExtraProperties&&e.data&&(e.data=null),this.commonObjs.resolve(i,e)})}break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(i,s);break;default:throw new Error("Got unknown common object type "+e)}}),a.on("obj",t=>{let[e,r,i,s]=t;if(!this.destroyed){var a=this.#h.get(r);if(!a.objs.has(e))switch(i){case"Image":if(a.objs.resolve(e,s),s){let r;if(s.bitmap){let{width:t,height:e}=s;r=t*e*4}else r=s.data?.length||0;r>_util.MAX_IMAGE_SIZE_TO_CACHE&&(a._maybeCleanupAfterRender=!0)}break;case"Pattern":a.objs.resolve(e,s);break;default:throw new Error("Got unknown object type "+i)}}}),a.on("DocProgress",t=>{this.destroyed||i.onProgress?.({loaded:t.loaded,total:t.total})}),a.on("FetchBuiltInCMap",t=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(t):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),a.on("FetchStandardFontData",t=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(t):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");var{map:t,transfers:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:this._fullReader?.filename??null},e).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));let e=t-1,r=this.#d.get(e);return r||(t=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then(t=>{if(this.destroyed)throw new Error("Transport destroyed");t=new PDFPageProxy(e,t,this,this._params.pdfBug);return this.#h.set(e,t),t}),this.#d.set(e,t),t)}getPageIndex(t){return"object"!=typeof t||null===t||!Number.isInteger(t.num)||t.num<0||!Number.isInteger(t.gen)||t.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen})}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return this.#p("GetFieldObjects")}hasJSActions(){return this.#p("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return"string"!=typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#p("GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(t=>new _optional_content_config.OptionalContentConfig(t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){var t="GetMetadata",e=this.#c.get(t);return e||(e=this.messageHandler.sendWithPromise(t,null).then(t=>({info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null})),this.#c.set(t,e),e)}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let t=0r(t.data)),null}let t=this.#f[e];if(t?.capability.settled)return t.data;throw new Error(`Requesting object that isn't resolved yet ${e}.`)}has(t){return this.#f[t]?.capability.settled||!1}resolve(t){var e=1{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk)&&(this.gfx.endDrawing(),InternalRenderTask.#b.delete(this._canvas),this.callback()))}}let version="3.11.174",build=(exports.version=version,"ce8716743");exports.build=build},(t,e,r)=>{var i=r(3),s=r(126);i({target:"Set",proto:!0,real:!0,forced:!r(135)("difference")},{difference:s})},(t,e,r)=>{var s=r(127),i=r(128),a=r(129),n=r(132),o=r(133),l=r(130),h=r(131),d=i.has,c=i.remove;t.exports=function(t){var e=s(this),r=o(t),i=a(e);return n(e)<=r.size?l(e,function(t){r.includes(t)&&c(i,t)}):h(r.getIterator(),function(t){d(e,t)&&c(i,t)}),i}},(t,e,r)=>{var i=r(128).has;t.exports=function(t){return i(t),t}},(t,e,r)=>{var r=r(14),i=Set.prototype;t.exports={Set:Set,add:r(i.add),has:r(i.has),remove:r(i.delete),proto:i}},(t,e,r)=>{var i=r(128),s=r(130),a=i.Set,n=i.add;t.exports=function(t){var e=new a;return s(t,function(t){n(e,t)}),e}},(t,e,r)=>{var i=r(14),s=r(131),r=r(128),a=r.Set,r=r.proto,n=i(r.forEach),o=i(r.keys),l=o(new a).next;t.exports=function(t,e,r){return r?s({iterator:o(t),next:l},e):n(t,e)}},(t,e,r)=>{var n=r(8);t.exports=function(t,e,r){for(var i,s=r?t:t.iterator,a=t.next;!(i=n(a,s)).done;)if(void 0!==(i=e(i.value)))return i}},(t,e,r)=>{var i=r(72),r=r(128);t.exports=i(r.proto,"size","get")||function(t){return t.size}},(t,e,r)=>{function i(t,e,r,i){this.set=t,this.size=e,this.has=r,this.keys=i}var s=r(31),a=r(47),n=r(8),o=r(62),l=r(134),h="Invalid size",d=RangeError,c=TypeError,u=Math.max;i.prototype={getIterator:function(){return l(a(n(this.keys,this.set)))},includes:function(t){return n(this.has,this.set,t)}},t.exports=function(t){a(t);var e=+t.size;if(e!=e)throw c(h);e=o(e);if(e<0)throw d(h);return new i(t,u(e,0),s(t.has),s(t.keys))}},t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},(t,e,r)=>{function i(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}}var s=r(24);t.exports=function(t){var e=s("Set");try{(new e)[t](i(0));try{return(new e)[t](i(-1)),!1}catch(t){return!0}}catch(t){return!1}}},(t,e,r)=>{var i=r(3),s=r(7),a=r(137);i({target:"Set",proto:!0,real:!0,forced:!r(135)("intersection")||s(function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))})},{intersection:a})},(t,e,r)=>{var s=r(127),i=r(128),a=r(132),n=r(133),o=r(130),l=r(131),h=i.Set,d=i.add,c=i.has;t.exports=function(t){var e=s(this),r=n(t),i=new h;return a(e)>r.size?l(r.getIterator(),function(t){c(e,t)&&d(i,t)}):o(e,function(t){r.includes(t)&&d(i,t)}),i}},(t,e,r)=>{var i=r(3),s=r(139);i({target:"Set",proto:!0,real:!0,forced:!r(135)("isDisjointFrom")},{isDisjointFrom:s})},(t,e,r)=>{var s=r(127),a=r(128).has,n=r(132),o=r(133),l=r(130),h=r(131),d=r(140);t.exports=function(t){var e,r=s(this),i=o(t);return n(r)<=i.size?!1!==l(r,function(t){if(i.includes(t))return!1},!0):(e=i.getIterator(),!1!==h(e,function(t){if(a(r,t))return d(e,"normal",!1)}))}},(t,e,r)=>{var a=r(8),n=r(47),o=r(30);t.exports=function(t,e,r){var i,s;n(t);try{if(!(i=o(t,"return"))){if("throw"===e)throw r;return r}i=a(i,t)}catch(t){s=!0,i=t}if("throw"===e)throw r;if(s)throw i;return n(i),r}},(t,e,r)=>{var i=r(3),s=r(142);i({target:"Set",proto:!0,real:!0,forced:!r(135)("isSubsetOf")},{isSubsetOf:s})},(t,e,r)=>{var i=r(127),s=r(132),a=r(130),n=r(133);t.exports=function(t){var e=i(this),r=n(t);return!(s(e)>r.size)&&!1!==a(e,function(t){if(!r.includes(t))return!1},!0)}},(t,e,r)=>{var i=r(3),s=r(144);i({target:"Set",proto:!0,real:!0,forced:!r(135)("isSupersetOf")},{isSupersetOf:s})},(t,e,r)=>{var i=r(127),s=r(128).has,a=r(132),n=r(133),o=r(131),l=r(140);t.exports=function(t){var e,r=i(this),t=n(t);return!(a(r){var i=r(3),s=r(146);i({target:"Set",proto:!0,real:!0,forced:!r(135)("symmetricDifference")},{symmetricDifference:s})},(t,e,r)=>{var i=r(127),s=r(128),a=r(129),n=r(133),o=r(131),l=s.add,h=s.has,d=s.remove;t.exports=function(t){var e=i(this),t=n(t).getIterator(),r=a(e);return o(t,function(t){(h(e,t)?d:l)(r,t)}),r}},(t,e,r)=>{var i=r(3),s=r(148);i({target:"Set",proto:!0,real:!0,forced:!r(135)("union")},{union:s})},(t,e,r)=>{var i=r(127),s=r(128).add,a=r(129),n=r(133),o=r(131);t.exports=function(t){var e=i(this),t=n(t).getIterator(),r=a(e);return o(t,function(t){s(r,t)}),r}},(t,e,r)=>{function i(){c(this,y);var t=p((e=arguments.length)<1?void 0:arguments[0]),e=p(e<2?void 0:arguments[1],"Error"),e=new b(t,e);return(t=_(t)).name=v,h(e,"stack",l(1,g(t.stack,1))),u(e,this,i),e}var s,a=r(3),n=r(4),o=r(24),l=r(11),h=r(45).f,d=r(39),c=r(150),u=r(75),p=r(76),f=r(151),g=r(82),m=r(6),r=r(36),v="DOMException",_=o("Error"),b=o(v),y=i.prototype=b.prototype,A="stack"in _(v),S="stack"in new b(1,2),m=b&&m&&Object.getOwnPropertyDescriptor(n,v),n=!(!m||m.writable&&m.configurable),m=A&&!n&&!S,x=(a({global:!0,constructor:!0,forced:r||m},{DOMException:m?i:b}),o(v)),A=x.prototype;if(A.constructor!==x)for(var w in r||h(A,"constructor",l(1,x)),f)!d(f,w)||d(x,s=(w=f[w]).s)||h(x,s,l(6,w.c))},(t,e,r)=>{var i=r(25),s=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw s("Incorrect invocation")}},t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},(l,h,t)=>{function e(i){return!a(function(){var t=new v.Set([7]),e=i(t),r=i(T(7));return e===t||!e.has(7)||"object"!=typeof r||7!=+r})&&i}function r(r,i){return!a(function(){var t=new i,e=r({a:t,b:t});return!(e&&e.a===e.b&&e.a instanceof i&&e.a.stack===t.stack)})}function u(t){throw new P("Uncloneable type: "+t,D)}function p(t,e){return L||N(e),L(t)}function f(t,e,r,i,s){var a=v[e];return y(a)||N(e),new a(j(t.buffer,s),r,i)}function g(t,e,r){this.object=t,this.type=e,this.metadata=r}function m(t,r,i){if(q(t)&&u("Symbol"),!y(t))return t;if(r){if(M(r,t))return R(r,t)}else r=new k;var e,s,a,n,o,l,h,d,c=S(t);switch(c){case"Array":a=J(w(t));break;case"Object":a={};break;case"Map":a=new k;break;case"Set":a=new ht;break;case"RegExp":a=new RegExp(t.source,K(t));break;case"Error":switch(s=t.name){case"AggregateError":a=_("AggregateError")([]);break;case"EvalError":a=Z();break;case"RangeError":a=tt();break;case"ReferenceError":a=et();break;case"SyntaxError":a=rt();break;case"TypeError":a=it();break;case"URIError":a=st();break;case"CompileError":a=nt();break;case"LinkError":a=ot();break;case"RuntimeError":a=lt();break;default:a=C()}break;case"DOMException":a=new P(t.message,t.name);break;case"ArrayBuffer":case"SharedArrayBuffer":a=i?new g(t,c):j(t,r,c);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":l="DataView"===c?t.byteLength:t.length,a=i?new g(t,c,{offset:t.byteOffset,length:l}):f(t,c,t.byteOffset,l,r);break;case"DOMQuad":try{a=new DOMQuad(m(t.p1,r,i),m(t.p2,r,i),m(t.p3,r,i),m(t.p4,r,i))}catch(r){a=p(t,c)}break;case"File":if(L)try{a=L(t),S(a)!==c&&(a=void 0)}catch(t){}if(!a)try{a=new File([t],t.name,t)}catch(t){}a||N(c);break;case"FileList":if(n=(()=>{var e;try{e=new v.DataTransfer}catch(t){try{e=new v.ClipboardEvent("").clipboardData}catch(e){}}return e&&e.items&&e.files?e:null})()){for(o=0,l=w(t);o{if(!y(t))throw it("Transfer option cannot be converted to a sequence");var r=[];H(t,function(t){ut(r,A(t))});for(var i,s,a,n,o,l=0,h=w(r),d=[];l{function i(){}function s(t){if(!l(t))return!1;try{return p(i,u,t),!0}catch(t){return!1}}function a(t){if(!l(t))return!1;switch(h(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return m||!!g(f,c(t))}catch(t){return!0}}var n=r(14),o=r(7),l=r(21),h=r(78),d=r(24),c=r(51),u=[],p=d("Reflect","construct"),f=/^\s*(?:class|function)\b/,g=n(f.exec),m=!f.exec(i);a.sham=!0,t.exports=!p||o(function(){var t;return s(s.call)||!s(Object)||!s(function(){t=!0})||t})?a:s},(t,e,r)=>{function v(t,e){this.stopped=t,this.result=e}var _=r(99),b=r(8),y=r(47),A=r(32),S=r(155),x=r(64),w=r(25),E=r(157),T=r(158),C=r(140),P=TypeError,k=v.prototype;t.exports=function(t,e,r){function i(t){return a&&C(a,"normal",t),new v(!0,t)}function s(t){return u?(y(t),g?m(t[0],t[1],i):m(t[0],t[1])):g?m(t,i):m(t)}var a,n,o,l,h,d,c=r&&r.that,u=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),f=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),m=_(e,c);if(p)a=t.iterator;else if(f)a=t;else{if(!(r=T(t)))throw P(A(t)+" is not iterable");if(S(r)){for(n=0,o=x(t);n{var i=r(34),s=r(156),a=i("iterator"),n=Array.prototype;t.exports=function(t){return void 0!==t&&(s.Array===t||n[a]===t)}},t=>{t.exports={}},(t,e,r)=>{var i=r(8),s=r(31),a=r(47),n=r(32),o=r(158),l=TypeError;t.exports=function(t,e){e=arguments.length<2?o(t):e;if(s(e))return a(i(e,t));throw l(n(t)+" is not iterable")}},(t,e,r)=>{var i=r(78),s=r(30),a=r(17),n=r(156),o=r(34)("iterator");t.exports=function(t){if(!a(t))return s(t,o)||s(t,"@@iterator")||n[i(t)]}},(t,e,r)=>{var i=r(18),s=r(45),a=r(11);t.exports=function(t,e,r){e=i(e);e in t?s.f(t,e,a(0,r)):t[e]=r}},(t,e,r)=>{var i=r(8),s=r(39),a=r(25),n=r(161),o=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in o||s(t,"flags")||!a(o,t)?e:i(n,t)}},(t,e,r)=>{var i=r(47);t.exports=function(){var t=i(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},(t,e,r)=>{var r=r(14),i=Map.prototype;t.exports={Map:Map,set:r(i.set),get:r(i.get),has:r(i.has),remove:r(i.delete),proto:i}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SerializableEmpty=e.PrintAnnotationStorage=e.AnnotationStorage=void 0,r(89),r(149),r(152);var i=r(1),o=r(164),l=r(170);let h=Object.freeze({map:null,hash:"",transfers:void 0});e.SerializableEmpty=h;class s{#v=!1;#y=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,e){t=this.#y.get(t);return void 0===t?e:Object.assign(e,t)}getRawValue(t){return this.#y.get(t)}remove(t){if(this.#y.delete(t),0===this.#y.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(let t of this.#y.values())if(t instanceof o.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(t,r){var i=this.#y.get(t);let s=!1;if(void 0!==i)for(let[t,e]of Object.entries(r))i[t]!==e&&(s=!0,i[t]=e);else s=!0,this.#y.set(t,r);s&&this.#_(),r instanceof o.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(r.constructor._type)}has(t){return this.#y.has(t)}getAll(){return 0{Object.defineProperty(e,"__esModule",{value:!0}),e.AnnotationEditor=void 0,r(89),r(2);var i=r(165),n=r(1),s=r(168);class C{#S="";#E=!1;#x=null;#w=null;#C=null;#T=!1;#P=null;#k=this.focusin.bind(this);#M=this.focusout.bind(this);#F=!1;#R=!1;#D=!1;_initialOptions=Object.create(null);_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#I=!1;#O=C._zIndex++;static _borderLineWidth=-1;static _colorManager=new i.ColorManager;static _zIndex=1;static SMALL_EDITOR_SIZE=0;constructor(t){this.constructor===C&&(0,n.unreachable)("Cannot initialize AnnotationEditor."),this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;var{rotation:e,rawDims:{pageWidth:r,pageHeight:i,pageX:s,pageY:a}}=this.parent.viewport,[e,r]=(this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,i],this.pageTranslation=[s,a],this.parentDimensions);this.x=t.x/e,this.y=t.y/r,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,n.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){var e=new a({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(e){var r=1[t,e.get(t)])),r?.strings)for(let t of r.strings)C._l10nPromise.set(t,e.get(t));if(-1===C._borderLineWidth){let t=getComputedStyle(document.documentElement);C._borderLineWidth=parseFloat(t.getPropertyValue("--outline-width"))||0}}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){(0,n.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#I}set _isDraggable(t){this.#I=t,this.div?.classList.toggle("draggable",t)}center(){var[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(2*t),this.y+=this.width*t/(2*e);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(2*t),this.y-=this.width*t/(2*e);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#O}setParent(t){null!==t&&(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions),this.parent=t}focusin(t){this._focusEventsAllowed&&(this.#F?this.#F=!1:this.parent.setSelected(this))}focusout(t){this._focusEventsAllowed&&this.isAttachedToDOM&&!t.relatedTarget?.closest("#"+this.id)&&(t.preventDefault(),!this.parent?.isMultipleSelection)&&this.commitOrRemove()}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,r,i){var[s,a]=this.parentDimensions;[r,i]=this.screenToPageTranslation(r,i),this.x=(t+r)/s,this.y=(e+i)/a,this.fixAndSetPosition()}#L(t,e,r){var[t,i]=t;[e,r]=this.screenToPageTranslation(e,r),this.x+=e/t,this.y+=r/i,this.fixAndSetPosition()}translate(t,e){this.#L(this.parentDimensions,t,e)}translateInPage(t,e){this.#L(this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}drag(t,e){var[r,i]=this.parentDimensions;if(this.x+=t/r,this.y+=e/i,this.parent&&(this.x<0||1{this._isDraggable=e,window.removeEventListener("pointerup",p),window.removeEventListener("blur",p),window.removeEventListener("pointermove",t,n),this.parent.div.style.cursor=c,this.div.style.cursor=u;let r=this.x,i=this.y,s=this.width,a=this.height;r===o&&i===l&&s===h&&a===d||this.addCommands({cmd:()=>{this.width=s,this.height=a,this.x=r,this.y=i;var[t,e]=this.parentDimensions;this.setDims(t*s,e*a),this.fixAndSetPosition()},undo:()=>{this.width=h,this.height=d,this.x=o,this.y=l;var[t,e]=this.parentDimensions;this.setDims(t*h,e*d),this.fixAndSetPosition()},mustExec:!0})});window.addEventListener("pointerup",p),window.addEventListener("blur",p)}}#W(t,e){let[r,i]=this.parentDimensions,s=this.x,a=this.y,n=this.width,o=this.height,l=C.MIN_SIZE/r,h=C.MIN_SIZE/i,d=t=>Math.round(1e4*t)/1e4,c=this.#j(this.rotation),u=(t,e)=>[c[0]*t+c[2]*e,c[1]*t+c[3]*e],p=this.#j(360-this.rotation),f,g,m=!1,v=!1;switch(t){case"topLeft":m=!0,f=(t,e)=>[0,0],g=(t,e)=>[t,e];break;case"topMiddle":f=(t,e)=>[t/2,0],g=(t,e)=>[t/2,e];break;case"topRight":m=!0,f=(t,e)=>[t,0],g=(t,e)=>[0,e];break;case"middleRight":v=!0,f=(t,e)=>[t,e/2],g=(t,e)=>[0,e/2];break;case"bottomRight":m=!0,f=(t,e)=>[t,e],g=(t,e)=>[0,0];break;case"bottomMiddle":f=(t,e)=>[t/2,e],g=(t,e)=>[t/2,0];break;case"bottomLeft":m=!0,f=(t,e)=>[0,e],g=(t,e)=>[t,0];break;case"middleLeft":v=!0,f=(t,e)=>[0,e/2],g=(t,e)=>[t,e/2]}var _=f(n,o),b=g(n,o),t=u(...b),y=d(s+t[0]),A=d(a+t[1]);let S=1,x=1,[w,E]=this.screenToPageTranslation(e.movementX,e.movementY);if([w,E]=[p[0]*(e=w/r)+p[2]*(T=E/i),p[1]*e+p[3]*T],m){let t=Math.hypot(n,o);S=x=Math.max(Math.min(Math.hypot(b[0]-_[0]-w,b[1]-_[1]-E)/t,1/n,1/o),l/n,h/o)}else v?S=Math.max(l,Math.min(1,Math.abs(b[0]-_[0]-w)))/n:x=Math.max(h,Math.min(1,Math.abs(b[1]-_[1]-E)))/o;var e=d(n*S),T=d(o*x),b=y-(t=u(...g(e,T)))[0],_=A-t[1];this.width=e,this.height=T,this.x=b,this.y=_,this.setDims(r*e,i*T),this.fixAndSetPosition()}async addAltTextButton(){if(!this.#x){let e=this.#x=document.createElement("button"),t=(e.className="altText",await C._l10nPromise.get("editor_alt_text_button_label"));if(e.textContent=t,e.setAttribute("aria-label",t),e.tabIndex="0",e.addEventListener("contextmenu",s.noContextMenu),e.addEventListener("pointerdown",t=>t.stopPropagation()),e.addEventListener("click",t=>{t.preventDefault(),this._uiManager.editAltText(this)},{capture:!0}),e.addEventListener("keydown",t=>{t.target===e&&"Enter"===t.key&&(t.preventDefault(),this._uiManager.editAltText(this))}),this.#H(),this.div.append(e),!C.SMALL_EDITOR_SIZE)C.SMALL_EDITOR_SIZE=Math.min(128,Math.round(1.4*e.getBoundingClientRect().width))}}async#H(){let e=this.#x;if(e)if(this.#S||this.#E){C._l10nPromise.get("editor_alt_text_edit_button_label").then(t=>{e.setAttribute("aria-label",t)});let t=this.#w;if(!t){this.#w=t=document.createElement("span"),t.className="tooltip",t.setAttribute("role","tooltip");var r=t.id="alt-text-tooltip-"+this.id;e.setAttribute("aria-describedby",r);e.addEventListener("mouseenter",()=>{this.#C=setTimeout(()=>{this.#C=null,this.#w.classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})},100)}),e.addEventListener("mouseleave",()=>{clearTimeout(this.#C),this.#C=null,this.#w?.classList.remove("show")})}e.classList.add("done"),t.innerText=this.#E?await C._l10nPromise.get("editor_alt_text_decorative_tooltip"):this.#S,t.parentNode||e.append(t)}else e.classList.remove("done"),this.#w?.remove()}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:this.#S,decorative:this.#E}}set altTextData(t){var{altText:t,decorative:e}=t;this.#S===t&&this.#E===e||(this.#S=t,this.#E=e,this.#H())}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",this.#k),this.div.addEventListener("focusout",this.#M);var[t,e]=this.parentDimensions,[t,e]=(this.parentRotation%180!=0&&(this.div.style.maxWidth=(100*e/t).toFixed(2)+"%",this.div.style.maxHeight=(100*t/e).toFixed(2)+"%"),this.getInitialTranslation());return this.translate(t,e),(0,i.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(t){var e=n.FeatureTest.platform.isMac;0!==t.button||t.ctrlKey&&e?t.preventDefault():(this.#F=!0,this.#q(t))}#q(s){if(this._isDraggable){let t=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let e,r,i=(t&&(e={passive:!0,capture:!0},r=t=>{var[t,e]=this.screenToPageTranslation(t.movementX,t.movementY);this._uiManager.dragSelectedEditors(t,e)},window.addEventListener("pointermove",r,e)),()=>{if(window.removeEventListener("pointerup",i),window.removeEventListener("blur",i),t&&window.removeEventListener("pointermove",r,e),this.#F=!1,!this._uiManager.endDragSession()){let t=n.FeatureTest.platform.isMac;s.ctrlKey&&!t||s.shiftKey||s.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)}});window.addEventListener("pointerup",i),window.addEventListener("blur",i)}}moveInDOM(){this.parent?.moveEditorInDOM(this)}_setParentAndPosition(t,e,r){t.changeParent(this),this.x=e,this.y=r,this.fixAndSetPosition()}getRect(t,e){var r=this.parentScale,[i,s]=this.pageDimensions,[a,n]=this.pageTranslation,o=t/r,l=e/r,h=this.x*i,d=this.y*s,c=this.width*i,u=this.height*s;switch(this.rotation){case 0:return[h+o+a,s-d-l-u+n,h+o+c+a,s-d-l+n];case 90:return[h+l+a,s-d+o+n,h+l+u+a,s-d+o+c+n];case 180:return[h-o-c+a,s-d+l+n,h-o+a,s-d+l+u+n];case 270:return[h-l-u+a,s-d-o-c+n,h-l+a,s-d-o+n];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){var[r,i,s,a]=t,n=s-r,o=a-i;switch(this.rotation){case 0:return[r,e-a,n,o];case 90:return[r,e-i,o,n];case 180:return[s,e-i,n,o];case 270:return[s,e-a,o,n];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#D=!0}disableEditMode(){this.#D=!1}isInEditMode(){return this.#D}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){this.div?.addEventListener("focusin",this.#k),this.div?.addEventListener("focusout",this.#M)}serialize(){(0,n.unreachable)("An editor must be serializable")}static deserialize(t,e,r){var e=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:r}),[r,i]=(e.rotation=t.rotation,e.pageDimensions),[t,s,a,n]=e.getRectInCurrentCoords(t.rect,i);return e.x=t/r,e.y=s/i,e.width=a/r,e.height=n/i,e}remove(){this.div.removeEventListener("focusin",this.#k),this.div.removeEventListener("focusout",this.#M),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#x?.remove(),this.#x=null,this.#w=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#U(),this.#P.classList.remove("hidden"))}select(){this.makeResizable(),this.div?.classList.add("selectedEditor")}unselect(){this.#P?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(t,e){}disableEditing(){this.#x&&(this.#x.hidden=!0)}enableEditing(){this.#x&&(this.#x.hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return this.#R}set isEditing(t){this.#R=t,this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,e){this.#T=!0;var r=this.div.style;r.aspectRatio=t/e,r.height="auto"}static get MIN_SIZE(){return 16}}e.AnnotationEditor=C;class a extends C{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardManager=e.CommandManager=e.ColorManager=e.AnnotationEditorUIManager=void 0,e.bindEvents=function(t,e,r){for(var i of r)e.addEventListener(i,t[i].bind(t))},e.opacityToHex=function(t){return Math.round(Math.min(255,Math.max(1,255*t))).toString(16).padStart(2,"0")},r(93),r(101),r(102),r(105),r(107),r(109),r(113),r(116),r(123),r(2),r(89),r(125),r(136),r(138),r(141),r(143),r(145),r(147),r(166);var n=r(1),o=r(168);class i{#G=0;getId(){return""+n.AnnotationEditorPrefix+this.#G++}}class l{#V=(0,n.getUuid)();#G=0;#$=null;static get _isSVGFittingCanvas(){let t=new OffscreenCanvas(1,3).getContext("2d"),e=new Image;e.src='data:image/svg+xml;charset=UTF-8,';var r=e.decode().then(()=>(t.drawImage(e,0,0,1,1,0,0,1,3),0===new Uint32Array(t.getImageData(0,0,1,1).data.buffer)[0]));return(0,n.shadow)(this,"_isSVGFittingCanvas",r)}async#X(t,r){this.#$||=new Map;let a=this.#$.get(t);if(null===a)return null;if(a?.bitmap)a.refCounter+=1;else{try{a||={bitmap:null,id:`image_${this.#V}_`+this.#G++,refCounter:0,isSvg:!1};let e;if("string"==typeof r){a.url=r;var i=await fetch(r);if(!i.ok)throw new Error(i.statusText);e=await i.blob()}else e=a.file=r;if("image/svg+xml"===e.type){let r=l._isSVGFittingCanvas,i=new FileReader,s=new Image,t=new Promise((t,e)=>{s.onload=()=>{a.bitmap=s,a.isSvg=!0,t()},i.onload=async()=>{var t=a.svgUrl=i.result;s.src=await r?t+"#svgView(preserveAspectRatio(none))":t},s.onerror=i.onerror=e});i.readAsDataURL(e),await t}else a.bitmap=await createImageBitmap(e);a.refCounter=1}catch(t){console.error(t),a=null}this.#$.set(t,a),a&&this.#$.set(a.id,a)}return a}async getFromFile(t){var{lastModified:e,name:r,size:i,type:s}=t;return this.#X(e+`_${r}_${i}_`+s,t)}async getFromUrl(t){return this.#X(t,t)}async getFromId(t){this.#$||=new Map;t=this.#$.get(t);return t?t.bitmap?(t.refCounter+=1,t):t.file?this.getFromFile(t.file):this.getFromUrl(t.url):null}getSvgUrl(t){t=this.#$.get(t);return t?.isSvg?t.svgUrl:null}deleteId(t){this.#$||=new Map;t=this.#$.get(t);t&&(--t.refCounter,0===t.refCounter)&&(t.bitmap=null)}isValidId(t){return t.startsWith(`image_${this.#V}_`)}}class s{#K=[];#Y=!1;#J;#Q=-1;constructor(){this.#J=0t===r[e]))return h._colorsMapping.get(t);return r}getHexCode(t){var e=this._colors.get(t);return e?n.Util.makeHexColor(...e):t}}e.ColorManager=h;class d{#tt=null;#et=new Map;#nt=new Map;#it=null;#rt=null;#st=new s;#at=0;#ot=new Set;#lt=null;#ct=null;#ht=new Set;#dt=null;#ut=new i;#pt=!1;#ft=!1;#gt=null;#mt=n.AnnotationEditorType.NONE;#bt=new Set;#vt=null;#yt=this.blur.bind(this);#_t=this.focus.bind(this);#At=this.copy.bind(this);#St=this.cut.bind(this);#Et=this.paste.bind(this);#xt=this.keydown.bind(this);#wt=this.onEditingAction.bind(this);#Ct=this.onPageChanging.bind(this);#Tt=this.onScaleChanging.bind(this);#Pt=this.onRotationChanging.bind(this);#kt={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1};#Mt=[0,0];#Ft=null;#Rt=null;#Dt=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){var t=d.prototype,e=t=>{var e=document.activeElement;return e&&t.#Rt.contains(e)&&t.hasSomethingToControl()},r=this.TRANSLATE_SMALL,i=this.TRANSLATE_BIG;return(0,n.shadow)(this,"_keyboardManager",new a([[["ctrl+a","mac+meta+a"],t.selectAll],[["ctrl+z","mac+meta+z"],t.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:e}]]))}constructor(t,e,r,i,s,a){this.#Rt=t,this.#Dt=e,this.#it=r,this._eventBus=i,this._eventBus._on("editingaction",this.#wt),this._eventBus._on("pagechanging",this.#Ct),this._eventBus._on("scalechanging",this.#Tt),this._eventBus._on("rotationchanging",this.#Pt),this.#rt=s.annotationStorage,this.#dt=s.filterFactory,this.#vt=a,this.viewParameters={realScale:o.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){this.#It(),this.#Ot(),this._eventBus._off("editingaction",this.#wt),this._eventBus._off("pagechanging",this.#Ct),this._eventBus._off("scalechanging",this.#Tt),this._eventBus._off("rotationchanging",this.#Pt);for(var t of this.#nt.values())t.destroy();this.#nt.clear(),this.#et.clear(),this.#ht.clear(),this.#tt=null,this.#bt.clear(),this.#st.destroy(),this.#it.destroy()}get hcmFilter(){return(0,n.shadow)(this,"hcmFilter",this.#vt?this.#dt.addHCMFilter(this.#vt.foreground,this.#vt.background):"none")}get direction(){return(0,n.shadow)(this,"direction",getComputedStyle(this.#Rt).direction)}editAltText(t){this.#it?.editAltText(this,t)}onPageChanging(t){t=t.pageNumber;this.#at=t-1}focusMainContainer(){this.#Rt.focus()}findParent(t,e){for(var r of this.#nt.values()){var{x:i,y:s,width:a,height:n}=r.div.getBoundingClientRect();if(i<=t&&t<=i+a&&s<=e&&e<=s+n)return r}return null}disableUserSelect(){this.#Dt.classList.toggle("noUserSelect",0{t._focusEventsAllowed=!0},{once:!0}),e.focus()}}#Nt(){window.addEventListener("keydown",this.#xt,{capture:!0})}#It(){window.removeEventListener("keydown",this.#xt,{capture:!0})}#Bt(){document.addEventListener("copy",this.#At),document.addEventListener("cut",this.#St),document.addEventListener("paste",this.#Et)}#jt(){document.removeEventListener("copy",this.#At),document.removeEventListener("cut",this.#St),document.removeEventListener("paste",this.#Et)}addEditListeners(){this.#Nt(),this.#Bt()}removeEditListeners(){this.#It(),this.#jt()}copy(t){if(t.preventDefault(),this.#tt?.commitOrRemove(),this.hasSelection){var e=[];for(let t of this.#bt){var r=t.serialize(!0);r&&e.push(r)}0!==e.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}}cut(t){this.copy(t),this.delete()}paste(t){t.preventDefault();let r=t.clipboardData;for(let e of r.items)for(let t of this.#ct)if(t.isHandlingMimeForPasting(e.type))return void t.paste(e,this.currentLayer);let i=r.getData("application/pdfjs");if(i){try{i=JSON.parse(i)}catch(t){return void(0,n.warn)(`paste: "${t.message}".`)}if(Array.isArray(i)){this.unselectAll();var s=this.currentLayer;try{let r=[];for(let e of i){let t=s.deserialize(e);if(!t)return;r.push(t)}this.addCommands({cmd:()=>{for(var t of r)this.#Ut(t);this.#zt(r)},undo:()=>{for(var t of r)t.remove()},mustExec:!0})}catch(t){(0,n.warn)(`paste: "${t.message}".`)}}}}keydown(t){this.getActive()?.shouldGetKeyboardEvents()||d._keyboardManager.exec(this,t)}onEditingAction(t){["undo","redo","delete","selectAll"].includes(t.name)&&this[t.name]()}#Wt(t){Object.entries(t).some(t=>{var[t,e]=t;return this.#kt[t]!==e})&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#kt,t)})}#Ht(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){t?(this.#Lt(),this.#Nt(),this.#Bt(),this.#Wt({isEditing:this.#mt!==n.AnnotationEditorType.NONE,isEmpty:this.#qt(),hasSomethingToUndo:this.#st.hasSomethingToUndo(),hasSomethingToRedo:this.#st.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#Ot(),this.#It(),this.#jt(),this.#Wt({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!this.#ct){this.#ct=t;for(let t of this.#ct)this.#Ht(t.defaultPropertiesToUpdate)}}getId(){return this.#ut.getId()}get currentLayer(){return this.#nt.get(this.#at)}getLayer(t){return this.#nt.get(t)}get currentPageIndex(){return this.#at}addLayer(t){this.#nt.set(t.pageIndex,t),this.#pt?t.enable():t.disable()}removeLayer(t){this.#nt.delete(t.pageIndex)}updateMode(e){let r=1{for(var t of e)t.remove()},undo:()=>{for(var t of e)this.#Ut(t)},mustExec:!0})}}commitOrRemove(){this.#tt?.commitOrRemove()}hasSomethingToControl(){return this.#tt||this.hasSelection}#zt(t){this.#bt.clear();for(var e of t)e.isEmpty()||(this.#bt.add(e),e.select());this.#Wt({hasSelectedEditor:!0})}selectAll(){for(var t of this.#bt)t.commit();this.#zt(this.#et.values())}unselectAll(){if(this.#tt)this.#tt.commitOrRemove();else if(this.hasSelection){for(var t of this.#bt)t.unselect();this.#bt.clear(),this.#Wt({hasSelectedEditor:!1})}}translateSelectedEditors(s,a){if(2{this.#Ft=null,this.#Mt[0]=this.#Mt[1]=0,this.addCommands({cmd:()=>{for(var t of i)this.#et.has(t.id)&&t.translateInPage(e,r)},undo:()=>{for(var t of i)this.#et.has(t.id)&&t.translateInPage(-e,-r)},mustExec:!1})},1e3);for(let t of i)t.translateInPage(s,a)}}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#lt=new Map;for(var t of this.#bt)this.#lt.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#lt)return!1;this.disableUserSelect(!1);let s=this.#lt,t=(this.#lt=null,!1);for(var[{x:e,y:r,pageIndex:i},a]of s)a.newX=e,a.newY=r,a.newPageIndex=i,t||=e!==a.savedX||r!==a.savedY||i!==a.savedPageIndex;if(!t)return!1;let n=(t,e,r,i)=>{var s;this.#et.has(t.id)&&((s=this.#nt.get(i))?t._setParentAndPosition(s,e,r):(t.pageIndex=i,t.x=e,t.y=r))};return this.addCommands({cmd:()=>{for(var[t,{newX:e,newY:r,newPageIndex:i}]of s)n(t,e,r,i)},undo:()=>{for(var[t,{savedX:e,savedY:r,savedPageIndex:i}]of s)n(t,e,r,i)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(this.#lt)for(var r of this.#lt.keys())r.drag(t,e)}rebuild(t){var e;null===t.parent?(e=this.getLayer(t.pageIndex))?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild()):t.parent.addOrRebuild(t)}isActive(t){return this.#tt===t}getActive(){return this.#tt}getMode(){return this.#mt}get imageManager(){return(0,n.shadow)(this,"imageManager",new l)}}e.AnnotationEditorUIManager=d},(t,L,e)=>{function f(t,e,r,i){var s,a,n,o,l,h=t[e],d=i&&h===i.value,c=d&&"string"==typeof i.source?{source:i.source}:{};if(v(h)){var u=_(h),p=d?i.nodes:u?[]:{};if(u)for(s=p.length,n=y(h),o=0;o{var i=r(14),n=r(39),o=SyntaxError,l=parseInt,h=String.fromCharCode,d=i("".charAt),c=i("".slice),u=i(/./.exec),p={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},f=/^[\da-f]{4}$/i,g=/^[\u0000-\u001F]$/;t.exports=function(t,e){for(var r=!0,i="";e{Object.defineProperty(e,"__esModule",{value:!0}),e.StatTimer=e.RenderingCancelledException=e.PixelsPerInch=e.PageViewport=e.PDFDateString=e.DOMStandardFontDataFactory=e.DOMSVGFactory=e.DOMFilterFactory=e.DOMCanvasFactory=e.DOMCMapReaderFactory=void 0,e.deprecated=function(t){console.log("Deprecated API usage: "+t)},e.getColorValues=function(t){var e,r=document.createElement("span");r.style.visibility="hidden",document.body.append(r);for(e of t.keys()){r.style.color=e;var i=window.getComputedStyle(r).color;t.set(e,_(i))}r.remove()},e.getCurrentTransform=function(t){var{a:t,b:e,c:r,d:i,e:s,f:a}=t.getTransform();return[t,e,r,i,s,a]},e.getCurrentTransformInverse=function(t){var{a:t,b:e,c:r,d:i,e:s,f:a}=t.getTransform().invertSelf();return[t,e,r,i,s,a]},e.getFilenameFromUrl=function(t){return 1{let r=document.createElement("script");r.src=i,r.onload=function(t){s&&r.remove(),e(t)},r.onerror=function(){t(new Error("Cannot load script at: "+r.src))},(document.head||document.documentElement).append(r)})},e.noContextMenu=function(t){t.preventDefault()},e.setLayerDimensions=function(l,h){let d=2{var r=a[t]/255,i=n[t]/255,s=new Array(e+1);for(let t=0;t<=e;t++)s[t]=r+t/e*(i-r);return s.join(",")});this.#re(r(0,5),r(1,5),r(2,5),e),this.#Qt=`url(#${t})`}}return this.#Qt}addHighlightHCMFilter(r,i,s,a){var n=r+`-${i}-${s}-`+a;if(this.#te!==n&&(this.#te=n,this.#ee="none",this.#Zt?.remove(),r)&&i){var[n,r]=[r,i].map(this.#se.bind(this));let l=Math.round(.2126*n[0]+.7152*n[1]+.0722*n[2]),h=Math.round(.2126*r[0]+.7152*r[1]+.0722*r[2]),[t,e]=[s,a].map(this.#se.bind(this));h{var i=new Array(256),s=(h-l)/r,a=t/255,n=(e-t)/(255*r);let o=0;for(let t=0;t<=r;t++){let e=Math.round(l+t*s),r=a+t*n;for(let t=o;t<=e;t++)i[t]=r;o=e+1}for(let t=o;t<256;t++)i[t]=i[o-1];return i.join(",")},n=`g_${this.#e}_hcm_highlight_filter`,r=this.#Zt=this.#ie(n);this.#ae(r),this.#re(i(t[0],e[0],5),i(t[1],e[1],5),i(t[2],e[2],5),r),this.#ee=`url(#${n})`}return this.#ee}destroy(){0{let r=new XMLHttpRequest;r.open("GET",i,!0),s&&(r.responseType="arraybuffer"),r.onreadystatechange=()=>{if(r.readyState===XMLHttpRequest.DONE){if(200===r.status||0===r.status){let t;if(s&&r.response?t=new Uint8Array(r.response):!s&&r.responseText&&(t=(0,c.stringToBytes)(r.responseText)),t)return void e(t)}t(new Error(r.statusText))}},r.send(null)})}e.DOMCanvasFactory=o;class h extends i.BaseCMapReaderFactory{_fetchData(t,e){return l(t,this.isCompressed).then(t=>({cMapData:t,compressionType:e}))}}e.DOMCMapReaderFactory=h;class d extends i.BaseStandardFontDataFactory{_fetchData(t){return l(t,!0)}}e.DOMStandardFontDataFactory=d;class u extends i.BaseSVGFactory{_createSVG(t){return document.createElementNS(a,t)}}e.DOMSVGFactory=u;class p{constructor(t){let{viewBox:e,scale:r,rotation:i,offsetX:s=0,offsetY:a=0,dontFlip:n=!1}=t;this.viewBox=e,this.scale=r,this.rotation=i,this.offsetX=s,this.offsetY=a;var t=(e[2]+e[0])/2,o=(e[3]+e[1])/2;let l,h,d,c,u,p,f,g;switch((i%=360)<0&&(i+=360),i){case 180:l=-1,h=0,d=0,c=1;break;case 90:l=0,h=1,d=1,c=0;break;case 270:l=0,h=-1,d=-1,c=0;break;case 0:l=1,h=0,d=0,c=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}n&&(d=-d,c=-c),g=0===l?(u=Math.abs(o-e[1])*r+s,p=Math.abs(t-e[0])*r+a,f=(e[3]-e[1])*r,(e[2]-e[0])*r):(u=Math.abs(t-e[0])*r+s,p=Math.abs(o-e[1])*r+a,f=(e[2]-e[0])*r,(e[3]-e[1])*r),this.transform=[l*r,h*r,d*r,c*r,u-l*r*t-d*r*o,p-h*r*t-c*r*o],this.width=f,this.height=g}get rawDims(){var t=this.viewBox;return(0,c.shadow)(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone(){var{scale:t=this.scale,rotation:e=this.rotation,offsetX:r=this.offsetX,offsetY:i=this.offsetY,dontFlip:s=!1}=0>16,(65280&e)>>8,255&e]:t.startsWith("rgb(")?t.slice(4,-1).split(",").map(t=>parseInt(t)):t.startsWith("rgba(")?t.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):((0,c.warn)(`Not a valid color format: "${t}"`),[0,0,0])}e.PDFDateString=class{static toDateObject(t){if(!t||"string"!=typeof t)return null;t=(v||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?")).exec(t);if(!t)return null;var e=parseInt(t[1],10),r=1<=(r=parseInt(t[2],10))&&r<=12?r-1:0,i=1<=(i=parseInt(t[3],10))&&i<=31?i:1;let s=parseInt(t[4],10),a=(s=0<=s&&s<=23?s:0,parseInt(t[5],10));a=0<=a&&a<=59?a:0;var n=0<=(n=parseInt(t[6],10))&&n<=59?n:0,o=t[7]||"Z",l=0<=(l=parseInt(t[8],10))&&l<=23?l:0,t=0<=(t=parseInt(t[9],10)||0)&&t<=59?t:0;return"-"===o?(s+=l,a+=t):"+"===o&&(s-=l,a-=t),new Date(Date.UTC(e,r,i,s,a,n))}}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseStandardFontDataFactory=e.BaseSVGFactory=e.BaseFilterFactory=e.BaseCanvasFactory=e.BaseCMapReaderFactory=void 0,r(2);var i=r(1);e.BaseFilterFactory=class s{constructor(){this.constructor===s&&(0,i.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addHighlightHCMFilter(t,e,r,i){return"none"}destroy(){}};e.BaseCanvasFactory=class a{constructor(){this.constructor===a&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");return{canvas:t=this._createCanvas(t,e),context:t.getContext("2d")}}reset(t,e,r){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||r<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=r}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){(0,i.unreachable)("Abstract method `_createCanvas` called.")}};e.BaseCMapReaderFactory=class n{constructor(t){var{baseUrl:t=null,isCompressed:e=!0}=t;this.constructor===n&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=t,this.isCompressed=e}async fetch(t){if(t=t.name,!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!t)throw new Error("CMap name must be specified.");let e=this.baseUrl+t+(this.isCompressed?".bcmap":""),r=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE;return this._fetchData(e,r).catch(t=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: `+e)})}_fetchData(t,e){(0,i.unreachable)("Abstract method `_fetchData` called.")}};e.BaseStandardFontDataFactory=class o{constructor(t){var{baseUrl:t=null}=t;this.constructor===o&&(0,i.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=t}async fetch(t){if(t=t.filename,!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!t)throw new Error("Font filename must be specified.");let e=""+this.baseUrl+t;return this._fetchData(e).catch(t=>{throw new Error("Unable to load font data at: "+e)})}_fetchData(t){(0,i.unreachable)("Abstract method `_fetchData` called.")}};e.BaseSVGFactory=class l{constructor(){this.constructor===l&&(0,i.unreachable)("Cannot initialize BaseSVGFactory.")}create(t,e){var r=2{Object.defineProperty(e,"__esModule",{value:!0}),e.MurmurHash3_64=void 0,r(93),r(101),r(102),r(105),r(107),r(109),r(113),r(116),r(123),r(2);var u=r(1);let i=3285377520,p=4294901760,f=65535;e.MurmurHash3_64=class{constructor(t){this.h1=t?4294967295&t:i,this.h2=t?4294967295&t:i}update(r){let i,s;if("string"==typeof r){i=new Uint8Array(2*r.length);for(let e=s=0,t=r.length;e>>8,i[s++]=255&t)}}else{if(!(0,u.isArrayBuffer)(r))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");i=r.slice(),s=i.byteLength}let e=s>>2,t=s-4*e,a=new Uint32Array(i.buffer,0,e),n=0,o,l=this.h1,h=this.h2;var d=3432918353,c=461845907;for(let t=0;t>>17)*c&p|13715*n&f,l=5*(l=(l^=n)<<13|l>>>19)+3864292196):(o=(o=(o=(o=a[t])*d&p|11601*o&f)<<15|o>>>17)*c&p|13715*o&f,h=5*(h=(h^=o)<<13|h>>>19)+3864292196);switch(n=0,t){case 3:n^=i[4*e+2]<<16;case 2:n^=i[4*e+1]<<8;case 1:n=(n=(n=(n^=i[4*e])*d&p|11601*n&f)<<15|n>>>17)*c&p|13715*n&f,1&e?l^=n:h^=n}this.h1=l,this.h2=h}hexdigest(){var t=this.h1,e=this.h2,t=3981806797*(t^=e>>>1)&p|36045*t&f;return t=444984403*(t^=(e=4283543511*e&p|(2950163797*(e<<16|t>>>16)&p)>>>16)>>>1)&p|60499*t&f,((t^=(e=3301882366*e&p|(3120437893*(e<<16|t>>>16)&p)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FontLoader=e.FontFaceObject=void 0,r(125),r(136),r(138),r(141),r(143),r(145),r(147),r(89),r(149);var p=r(1);e.FontLoader=class{#le=new Set;constructor(t){var{ownerDocument:t=globalThis.document}=t;this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));var e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(var t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),this.#le.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(t){if(t&&!this.#le.has(t.loadedName))if((0,p.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){var{loadedName:e,src:r,style:i}=t,r=new FontFace(e,r,i);this.addNativeFontFace(r);try{await r.load(),this.#le.add(e)}catch{(0,p.warn)(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(r)}}else(0,p.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}async bind(r){if(!(r.attached||r.missingFile&&!r.systemFontInfo))if(r.attached=!0,r.systemFontInfo)await this.loadSystemFont(r.systemFontInfo);else if(this.isFontLoadingAPISupported){let e=r.createNativeFontFace();if(e){this.addNativeFontFace(e);try{await e.loaded}catch(t){throw(0,p.warn)(`Failed to load font '${e.family}': '${t}'.`),r.disableFontFace=!0,t}}}else{let t=r.createFontFaceRule();t&&(this.insertRule(t),this.isSyncFontLoadingSupported||await new Promise(t=>{t=this._queueLoadingCallback(t);this._prepareFontLoadEvent(r,t)}))}}get isFontLoadingAPISupported(){var t=!!this._document?.fonts;return(0,p.shadow)(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){let t=!1;return(p.isNodeJS||"undefined"!=typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0),(0,p.shadow)(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){let e=this.loadingRequests,r={done:!1,complete:function(){for((0,p.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;0{u.remove(),e.complete()})}},e.FontFaceObject=class{constructor(e,t){var{isEvalSupported:t=!0,disableFontFace:r=!1,ignoreErrors:i=!1,inspectFont:s=null}=t;this.compiledGlyphs=Object.create(null);for(let t in e)this[t]=e[t];this.isEvalSupported=!1!==t,this.disableFontFace=!0===r,this.ignoreErrors=!0===i,this._inspectFont=s}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let t;var e;return t=this.cssFontInfo?(e={weight:this.cssFontInfo.fontWeight},this.cssFontInfo.italicAngle&&(e.style=`oblique ${this.cssFontInfo.italicAngle}deg`),new FontFace(this.cssFontInfo.fontFamily,this.data,e)):new FontFace(this.loadedName,this.data,{}),this._inspectFont?.(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;var e=(0,p.bytesToString)(this.data),e=`url(data:${this.mimetype};base64,${btoa(e)});`;let r;if(this.cssFontInfo){let t=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(t+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),r=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${t}src:${e}}`}else r=`@font-face {font-family:"${this.loadedName}";src:${e}}`;return this._inspectFont?.(this,e),r}getPathGenerator(t,e){if(void 0!==this.compiledGlyphs[e])return this.compiledGlyphs[e];let i;try{i=t.get(this.loadedName+"_path_"+e)}catch(t){if(this.ignoreErrors)return(0,p.warn)(`getPathGenerator - ignoring character: "${t}".`),this.compiledGlyphs[e]=function(t,e){};throw t}if(this.isEvalSupported&&p.FeatureTest.isEvalSupported){let r=[];for(let e of i){let t=void 0!==e.args?e.args.join(","):"";r.push("c.",e.cmd,"(",t,");\n")}return this.compiledGlyphs[e]=new Function("c","size",r.join(""))}return this.compiledGlyphs[e]=function(t,e){for(var r of i)"scale"===r.cmd&&(r.args=[e,-e]),t[r.cmd].apply(t,r.args)}}}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NodeStandardFontDataFactory=e.NodeFilterFactory=e.NodeCanvasFactory=e.NodeCMapReaderFactory=void 0,r(2),r(93),r(101),r(102),r(105),r(107),r(109),r(113),r(116),r(123);var i=r(169),r=r(1);if(!globalThis.DOMMatrix&&r.isNodeJS)try{globalThis.DOMMatrix=require("canvas").DOMMatrix}catch(t){(0,r.warn)(`Cannot polyfill \`DOMMatrix\`, rendering may be broken: "${t}".`)}if(!globalThis.Path2D&&r.isNodeJS)try{var s=require("canvas").CanvasRenderingContext2D,a=require("path2d-polyfill").polyfillPath2D;globalThis.CanvasRenderingContext2D=s,a(globalThis)}catch(t){(0,r.warn)(`Cannot polyfill \`Path2D\`, rendering may be broken: "${t}".`)}function n(t){return new Promise((r,i)=>{require("fs").readFile(t,(t,e)=>{!t&&e?r(new Uint8Array(e)):i(new Error(t))})})}class o extends i.BaseFilterFactory{}e.NodeFilterFactory=o;class l extends i.BaseCanvasFactory{_createCanvas(t,e){return require("canvas").createCanvas(t,e)}}e.NodeCanvasFactory=l;class h extends i.BaseCMapReaderFactory{_fetchData(t,e){return n(t).then(t=>({cMapData:t,compressionType:e}))}}e.NodeCMapReaderFactory=h;class d extends i.BaseStandardFontDataFactory{_fetchData(t){return n(t)}}e.NodeStandardFontDataFactory=d},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasGraphics=void 0,r(2),r(93),r(101),r(102),r(105),r(107),r(109),r(113),r(116),r(123),r(89);var A=r(1),w=r(168),S=r(174),c=r(175);let u=4096;class h{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,e,r){let i;return void 0!==this.cache[t]?(i=this.cache[t],this.canvasFactory.reset(i,e,r)):(i=this.canvasFactory.create(e,r),this.cache[t]=i),i}delete(t){delete this.cache[t]}clear(){for(var t in this.cache){var e=this.cache[t];this.canvasFactory.destroy(e),delete this.cache[t]}}}function v(l,h,d,c,u,p,f,g,m,v){var[_,b,y,A,S,x]=(0,w.getCurrentTransform)(l);if(0===b&&0===y){let t=f*_+S,e=Math.round(t),r=g*A+x,i=Math.round(r),s=(f+m)*_+S,a=Math.abs(Math.round(s)-e)||1,n=(g+v)*A+x,o=Math.abs(Math.round(n)-i)||1;l.setTransform(Math.sign(_),0,0,Math.sign(A),e,i),l.drawImage(h,d,c,u,p,0,0,a,o),void l.setTransform(_,b,y,A,S,x)}else if(0===_&&0===A){let t=g*y+S,e=Math.round(t),r=f*b+x,i=Math.round(r),s=(g+v)*y+S,a=Math.abs(Math.round(s)-e)||1,n=(f+m)*b+x,o=Math.abs(Math.round(n)-i)||1;l.setTransform(0,Math.sign(b),Math.sign(y),0,e,i),l.drawImage(h,d,c,u,p,0,0,o,a),void l.setTransform(_,b,y,A,S,x)}else l.drawImage(h,d,c,u,p,f,g,m,v),Math.hypot(_,b),Math.hypot(y,A)}class p{constructor(t,e){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=A.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=A.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=A.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,t,e])}clone(){var t=Object.create(this);return t.clipBox=this.clipBox.slice(),t}setCurrentPoint(t,e){this.x=t,this.y=e}updatePathMinMax(t,e,r){[e,r]=A.Util.applyTransform([e,r],t),this.minX=Math.min(this.minX,e),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,e),this.maxY=Math.max(this.maxY,r)}updateRectMinMax(t,e){var r=A.Util.applyTransform(e,t),e=A.Util.applyTransform(e.slice(2),t);this.minX=Math.min(this.minX,r[0],e[0]),this.minY=Math.min(this.minY,r[1],e[1]),this.maxX=Math.max(this.maxX,r[0],e[0]),this.maxY=Math.max(this.maxY,r[1],e[1])}updateScalingPathMinMax(t,e){A.Util.scaleMinMax(t,e),this.minX=Math.min(this.minX,e[0]),this.maxX=Math.max(this.maxX,e[1]),this.minY=Math.min(this.minY,e[2]),this.maxY=Math.max(this.maxY,e[3])}updateCurvePathMinMax(t,e,r,i,s,a,n,o,l,h){e=A.Util.bezierBoundingBox(e,r,i,s,a,n,o,l);h?(h[0]=Math.min(h[0],e[0],e[2]),h[1]=Math.max(h[1],e[0],e[2]),h[2]=Math.min(h[2],e[1],e[3]),h[3]=Math.max(h[3],e[1],e[3])):this.updateRectMinMax(t,e)}getPathBoundingBox(){let t=0>2),t=o.length,l=c+7>>3,h=4294967295,d=A.FeatureTest.isLittleEndian?4278190080:255;for(a=0;al?c:8*t-7,i=-8&r,s=0,a=0;for(;e>=1}for(;u=r&&(g=e,n=c*g),u=0,f=n;f--;)_[u++]=v[p++],_[u++]=v[p++],_[u++]=v[p++],_[u++]=255;m.putImageData(s,0,16*a)}}}}function _(l,e){if(e.bitmap)l.drawImage(e.bitmap,0,0);else{let t=e.height,r=e.width,i=t%16,s=(t-i)/16,a=0==i?s:1+s,n=l.createImageData(r,16),o=0;var h=e.data,d=n.data;for(let e=0;e>8]>>8:i[e]*t>>16}}function b(t,e){var t=A.Util.singularValueDecompose2dScale(t),r=(t[0]=Math.fround(t[0]),t[1]=Math.fround(t[1]),Math.fround((globalThis.devicePixelRatio||1)*w.PixelsPerInch.PDF_TO_CSS_UNITS));return void 0!==e?e:t[0]<=r||t[1]<=r}let i=["butt","round","square"],s=["miter","round","bevel"],a={},o={};class l{constructor(t,e,r,i,s,a,n,o){var{optionalContentConfig:a,markedContentStack:l=null}=a;this.ctx=t,this.current=new p(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=e,this.objs=r,this.canvasFactory=i,this.filterFactory=s,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=l||[],this.optionalContentConfig=a,this.cachedCanvases=new h(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=n,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=o,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(t){var e=1h)return r(),n;d=0}}}#ce(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#ce(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(var t of this._cachedBitmapsMap.values()){for(var e of t.values())"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),this.#he()}#he(){var t,e;this.pageColors&&"none"!==(t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background))&&(e=this.ctx.filter,this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e)}_scaleImage(r,t){var e=r.width,i=r.height;let s,a,n=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),l=e,h=i,d="prescale1";for(;2{i.save=i.__originalSave,i.restore=i.__originalRestore,i.rotate=i.__originalRotate,i.scale=i.__originalScale,i.translate=i.__originalTranslate,i.transform=i.__originalTransform,i.setTransform=i.__originalSetTransform,i.resetTransform=i.__originalResetTransform,i.clip=i.__originalClip,i.moveTo=i.__originalMoveTo,i.lineTo=i.__originalLineTo,i.bezierCurveTo=i.__originalBezierCurveTo,i.rect=i.__originalRect,i.closePath=i.__originalClosePath,i.beginPath=i.__originalBeginPath,delete i._removeMirroring},i.save=function(){n.save(),this.__originalSave()},i.restore=function(){n.restore(),this.__originalRestore()},i.translate=function(t,e){n.translate(t,e),this.__originalTranslate(t,e)},i.scale=function(t,e){n.scale(t,e),this.__originalScale(t,e)},i.transform=function(t,e,r,i,s,a){n.transform(t,e,r,i,s,a),this.__originalTransform(t,e,r,i,s,a)},i.setTransform=function(t,e,r,i,s,a){n.setTransform(t,e,r,i,s,a),this.__originalSetTransform(t,e,r,i,s,a)},i.resetTransform=function(){n.resetTransform(),this.__originalResetTransform()},i.rotate=function(t){n.rotate(t),this.__originalRotate(t)},i.clip=function(t){n.clip(t),this.__originalClip(t)},i.moveTo=function(t,e){n.moveTo(t,e),this.__originalMoveTo(t,e)},i.lineTo=function(t,e){n.lineTo(t,e),this.__originalLineTo(t,e)},i.bezierCurveTo=function(t,e,r,i,s,a){n.bezierCurveTo(t,e,r,i,s,a),this.__originalBezierCurveTo(t,e,r,i,s,a)},i.rect=function(t,e,r,i){n.rect(t,e,r,i),this.__originalRect(t,e,r,i)},i.closePath=function(){n.closePath(),this.__originalClosePath()},i.beginPath=function(){n.beginPath(),this.__originalBeginPath()},this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),f(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(this.current.activeSMask){t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var e=this.current.activeSMask,r=this.suspendedCtx,i=this.ctx,s=(t=t)[0],a=t[1],n=t[2]-s,t=t[3]-a;if(0!=n&&0!=t){var o,l=e.context,h=i,d=n,c=t,n=e.subtype,u=e.backdrop,p=e.transferMap,f=s,g=a,m=e.offsetX,v=e.offsetY,_=!!u,b=_?u[0]:0,y=_?u[1]:0,A=_?u[2]:0,S="Luminosity"===n?k:P,x=Math.min(c,Math.ceil(1048576/d));for(let i=0;i>8,w[e-2]=w[e-2]*t+T*o>>8,w[e-1]=w[e-1]*t+C*o>>8)}}S(e.data,r.data,p),h.putImageData(r,f,i+g)}r.save(),r.globalAlpha=1,r.globalCompositeOperation="source-over",r.setTransform(1,0,0,1,0,0),r.drawImage(i.canvas,0,0),r.restore()}this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}}save(){(this.inSMaskMode?(f(this.ctx,this.suspendedCtx),this.suspendedCtx):this.ctx).save();var t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),f(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(t,e,r,i,s,a){this.ctx.transform(t,e,r,i,s,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(r,a,t){var n=this.ctx,o=this.current;let l,h,d=o.x,c=o.y;var u=(0,w.getCurrentTransform)(n),p=0===u[0]&&0===u[3]||0===u[1]&&0===u[2],f=p?t.slice(0):null;for(let t=0,s=0,e=r.length;tnew l(t,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})},i)):this._getPattern(t[1],t[2])}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t,e,r){t=A.Util.makeHexColor(t,e,r);this.ctx.strokeStyle=t,this.current.strokeColor=t}setFillRGBColor(t,e,r){t=A.Util.makeHexColor(t,e,r);this.ctx.fillStyle=t,this.current.fillColor=t,this.current.patternFill=!1}_getPattern(t){let e,r=1u&&(r=t/u,t=u),e>u&&(i=e/u,e=u),this.current.startNewPathAndClipBox([0,0,t,e]),"groupAt"+this.groupLevel);a.smask&&(s+="_smask_"+this.smaskCounter++%2);var l=this.cachedCanvases.getCanvas(s,t,e),c=l.context;c.scale(1/r,1/i),c.translate(-h,-d),c.transform(...o),a.smask?this.smaskStack.push({canvas:l.canvas,context:c,offsetX:h,offsetY:d,scaleX:r,scaleY:i,subtype:a.smask.subtype,backdrop:a.smask.backdrop,transferMap:a.smask.transferMap||null,startTransformInverse:null}):(n.setTransform(1,0,0,1,0,0),n.translate(h,d),n.scale(r,i),n.save()),f(n,c),this.ctx=c,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(n),this.groupLevel++}}endGroup(e){if(this.contentVisible){this.groupLevel--;let r=this.ctx,t=this.groupStack.pop();if(this.ctx=t,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();let t=(0,w.getCurrentTransform)(this.ctx),e=(this.restore(),this.ctx.save(),this.ctx.setTransform(...t),A.Util.getAxialAlignedBoundingBox([0,0,r.canvas.width,r.canvas.height],t));this.ctx.drawImage(r.canvas,0,0),this.ctx.restore(),this.compose(e)}}}beginAnnotation(o,l,h,t,e){if(this.#ce(),g(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(l)&&4===l.length){let a=l[2]-l[0],n=l[3]-l[1];if(e&&this.annotationCanvasMap){(h=h.slice())[4]-=l[0],h[5]-=l[1],(l=l.slice())[0]=l[1]=0,l[2]=a,l[3]=n;let[t,e]=A.Util.singularValueDecompose2dScale((0,w.getCurrentTransform)(this.ctx)),r=this.viewportScale,i=Math.ceil(a*this.outputScaleX*r),s=Math.ceil(n*this.outputScaleY*r);this.annotationCanvas=this.canvasFactory.create(i,s);var{canvas:d,context:c}=this.annotationCanvas;this.annotationCanvasMap.set(o,d),this.annotationCanvas.savedCtx=this.ctx,this.ctx=c,this.ctx.save(),this.ctx.setTransform(t,0,0,-e,0,n*e),g(this.ctx)}else g(this.ctx),this.ctx.rect(l[0],l[1],a,n),this.ctx.clip(),this.endPath()}this.current=new p(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...h),this.transform(...t)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#he(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){var e,r;this.contentVisible&&(e=t.count,(t=this.getObject(t.data,t)).count=e,e=this.ctx,(r=this.processingType3)&&(void 0===r.compiled&&(r.compiled=(t=>{let{width:e,height:r}=t;if(1e3>=1}let u=0;for((c=0)!==d[c]&&(l[0]=1,++u),n=1;n>2)+(d[c+1]?4:0)+(d[c-h+1]?8:0),i[t]&&(l[o+n]=i[t],++u),c++;if(d[c-h]!==d[c]&&(l[o+n]=d[c]?2:4,++u),1e3>4,l[i]&=r>>2|r<<2),f.lineTo(i%s,i/s|0),l[i]||--u}while(t!==i);--a}}return d=null,l=null,function(t){t.save(),t.scale(1/e,-1/r),t.translate(0,-r),t.fill(f),t.beginPath(),t.restore()}})(t)),r.compiled)?r.compiled(e):(t=(r=this._createMaskCanvas(t)).canvas,e.save(),e.setTransform(1,0,0,1,0,0),e.drawImage(t,r.offsetX,r.offsetY),e.restore(),this.compose()))}paintImageMaskXObjectRepeat(t,s){var a=2t/e)),r.lineDashOffset/=e}r.stroke(),t&&r.restore()}}isContentVisible(){for(let t=this.markedContentStack.length-1;0<=t;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}e.CanvasGraphics=l;for(let t in A.OPS)void 0!==l.prototype[t]&&(l.prototype[A.OPS[t]]=l.prototype[t])},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TilingPattern=e.PathType=void 0,e.getShadingPattern=function(t){switch(t[0]){case"RadialAxial":return new s(t);case"Mesh":return new a(t);case"Dummy":return new n}throw new Error("Unknown IR type: "+t[0])},r(2);var v=r(1),_=r(168);let d={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function c(t,e){var r,i,s;e&&(r=e[2]-e[0],i=e[3]-e[1],(s=new Path2D).rect(e[0],e[1],r,i),t.clip(s))}e.PathType=d;class i{constructor(){this.constructor===i&&(0,v.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,v.unreachable)("Abstract method `getPattern` called.")}}class s extends i{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let e;"axial"===this._type?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(let t of this._colorStops)e.addColorStop(t[0],t[1]);return e}getPattern(a,n,o,l){let h;if(l===d.STROKE||l===d.FILL){let t=n.current.getClippedPathBoundingBox(l,(0,_.getCurrentTransform)(a))||[0,0,0,0],e=Math.ceil(t[2]-t[0])||1,r=Math.ceil(t[3]-t[1])||1,i=n.cachedCanvases.getCanvas("pattern",e,r,!0),s=i.context;s.clearRect(0,0,s.canvas.width,s.canvas.height),s.beginPath(),s.rect(0,0,s.canvas.width,s.canvas.height),s.translate(-t[0],-t[1]),o=v.Util.transform(o,[1,0,0,1,t[0],t[1]]),s.transform(...n.baseTransform),this.matrix&&s.transform(...this.matrix),c(s,this._bbox),s.fillStyle=this._createGradient(s),s.fill(),h=a.createPattern(i.canvas,"no-repeat");l=new DOMMatrix(o);h.setTransform(l)}else c(a,this._bbox),h=this._createGradient(a);return h}}function b(t,e,r,i,s,a,f,g){var n=e.coords,m=e.colors,v=t.data,_=4*t.width;let o;n[r+1]>n[i+1]&&(o=r,r=i,i=o,o=a,a=f,f=o),n[s+1]w?1:S==w?0:(S-a)/(S-w);n=A-(A-x)*O,o=P-(P-R)*O,l=k-(k-F)*O,h=M-(M-D)*O}let e,r=(d=b-(b-x)*(e=aw?1:(y-a)/(y-w)),c=E-(E-R)*e,u=T-(T-F)*e,p=C-(C-D)*e,Math.round(Math.min(n,d))),i=Math.round(Math.max(n,d)),s=_*a+4*r;for(let t=r;t<=i;t++)(e=(n-t)/(n-d))<0?e=0:1=e?i=e:r=i/t,{scale:r,size:i}}clipBbox(t,e,r,i,s){t.ctx.rect(e,r,i-e,s-r),t.current.updateRectMinMax((0,_.getCurrentTransform)(t.ctx),[e,r,i,s]),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,e,r){var i=t.ctx,s=t.current;switch(e){case 1:let t=this.ctx;i.fillStyle=t.fillStyle,i.strokeStyle=t.strokeStyle,s.fillColor=t.fillStyle,s.strokeColor=t.strokeStyle;break;case 2:var a=v.Util.makeHexColor(r[0],r[1],r[2]);i.fillStyle=a,i.strokeStyle=a,s.fillColor=a,s.strokeColor=a;break;default:throw new v.FormatError("Unsupported paint type: "+e)}}getPattern(t,e,r,i){let s=r,a=(i!==d.SHADING&&(s=v.Util.transform(s,e.baseTransform),this.matrix)&&(s=v.Util.transform(s,this.matrix)),r=this.createPatternCanvas(e),new DOMMatrix(s));return a=(a=a.translate(r.offsetX,r.offsetY)).scale(1/r.scaleX,1/r.scaleY),(i=t.createPattern(r.canvas,"repeat")).setTransform(a),i}}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.convertBlackAndWhiteToRGBA=i,e.convertToRGBA=function(e){switch(e.kind){case f.ImageKind.GRAYSCALE_1BPP:return i(e);case f.ImageKind.RGB_24BPP:{var n=e;let{src:r,srcPos:t=0,dest:i,destPos:s=0}=n,a=0;var o=r.length>>2,l=new Uint32Array(r.buffer,t,o);if(f.FeatureTest.isLittleEndian){for(;a>>24|e<<8|4278190080,i[s+2]=e>>>16|r<<16|4278190080,i[s+3]=r>>>8|4278190080}for(let t=4*a,e=r.length;t>>8|255,i[s+2]=e<<16|r>>>16|255,i[s+3]=r<<8|255}for(let t=4*a,e=r.length;t>3,c=7&e,u=r.length;s=new Uint32Array(s.buffer);let p=0;for(let t=0;t{Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalWorkerOptions=void 0;var r=Object.create(null);(e.GlobalWorkerOptions=r).workerPort=null,r.workerSrc=""},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MessageHandler=void 0,r(2);var h=r(1);function d(t){switch(t instanceof Error||"object"==typeof t&&null!==t||(0,h.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),t.name){case"AbortException":return new h.AbortException(t.message);case"MissingPDFException":return new h.MissingPDFException(t.message);case"PasswordException":return new h.PasswordException(t.message,t.code);case"UnexpectedResponseException":return new h.UnexpectedResponseException(t.message,t.status);case"UnknownErrorException":return new h.UnknownErrorException(t.message,t.details);default:return new h.UnknownErrorException(t.message,t.toString())}}e.MessageHandler=class{constructor(t,e,a){this.sourceName=t,this.targetName=e,this.comObj=a,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=t=>{let s=t.data;if(s.targetName===this.sourceName)if(s.stream)this.#de(s);else if(s.callback){let t=s.callbackId,e=this.callbackCapabilities[t];if(!e)throw new Error("Cannot resolve callback "+t);if(delete this.callbackCapabilities[t],1===s.callback)e.resolve(s.data);else{if(2!==s.callback)throw new Error("Unexpected callback case");e.reject(d(s.reason))}}else{let i=this.actionHandler[s.action];if(!i)throw new Error("Unknown action from worker: "+s.action);if(s.callbackId){let e=this.sourceName,r=s.sourceName;new Promise(function(t){t(i(s.data))}).then(function(t){a.postMessage({sourceName:e,targetName:r,callback:1,callbackId:s.callbackId,data:t})},function(t){a.postMessage({sourceName:e,targetName:r,callback:2,callbackId:s.callbackId,reason:d(t)})})}else s.streamId?this.#ue(s):i(s.data)}},a.addEventListener("message",this._onComObjOnMessage)}on(t,e){var r=this.actionHandler;if(r[t])throw new Error(`There is already an actionName called "${t}"`);r[t]=e}send(t,e,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},r)}sendWithPromise(t,e,r){var i=this.callbackId++,s=new h.PromiseCapability;this.callbackCapabilities[i]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:i,data:e},r)}catch(t){s.reject(t)}return s.promise}sendWithStream(r,i,t,s){let a=this.streamId++,n=this.sourceName,o=this.targetName,l=this.comObj;return new ReadableStream({start:t=>{var e=new h.PromiseCapability;return this.streamControllers[a]={controller:t,startCall:e,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:n,targetName:o,action:r,streamId:a,data:i,desiredSize:t.desiredSize},s),e.promise},pull:t=>{var e=new h.PromiseCapability;return this.streamControllers[a].pullCall=e,l.postMessage({sourceName:n,targetName:o,stream:6,streamId:a,desiredSize:t.desiredSize}),e.promise},cancel:t=>{(0,h.assert)(t instanceof Error,"cancel must have a valid reason");var e=new h.PromiseCapability;return this.streamControllers[a].cancelCall=e,this.streamControllers[a].isClosed=!0,l.postMessage({sourceName:n,targetName:o,stream:1,streamId:a,reason:d(t)}),e.promise}},t)}#ue(e){let s=e.streamId,a=this.sourceName,n=e.sourceName,o=this.comObj,t=this,r=this.actionHandler[e.action],i={enqueue(t){var e,r=1{Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var i=r(1);e.Metadata=class{#fe;#ge;constructor(t){var{parsedData:t,rawData:e}=t;this.#fe=t,this.#ge=e}getRaw(){return this.#ge}get(t){return this.#fe.get(t)??null}getAll(){return(0,i.objectFromMap)(this.#fe)}has(t){return this.#fe.has(t)}}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.OptionalContentConfig=void 0;var a=r(1),i=r(170);let s=Symbol("INTERNAL");class n{#me=!0;constructor(t,e){this.name=t,this.intent=e}get visible(){return this.#me}_setVisible(t,e){t!==s&&(0,a.unreachable)("Internal method `_setVisible` called."),this.#me=e}}e.OptionalContentConfig=class{#be=null;#ve=new Map;#ye=null;#_e=null;constructor(t){if(this.name=null,(this.creator=null)!==t){this.name=t.name,this.creator=t.creator,this.#_e=t.order;for(var e of t.groups)this.#ve.set(e.id,new n(e.name,e.intent));if("OFF"===t.baseState)for(let t of this.#ve.values())t._setVisible(s,!1);for(var r of t.on)this.#ve.get(r)._setVisible(s,!0);for(var i of t.off)this.#ve.get(i)._setVisible(s,!1);this.#ye=this.getHash()}}#Ae(i){let t=i.length;if(t<2)return!0;var s=i[0];for(let r=1;r{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFDataTransportStream=void 0,r(93),r(101),r(102),r(105),r(107),r(109),r(113),r(116),r(123),r(89);var o=r(1),s=r(168);e.PDFDataTransportStream=class{constructor(t,e){var{length:t,initialData:r,progressiveDone:i=!1,contentDispositionFilename:s=null,disableRange:a=!1,disableStream:n=!1}=t;if((0,o.assert)(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=i,this._contentDispositionFilename=s,0{this._onReceiveData({begin:t,chunk:e})}),this._pdfDataRangeTransport.addProgressListener((t,e)=>{this._onProgress({loaded:t,total:e})}),this._pdfDataRangeTransport.addProgressiveReadListener(t=>{this._onReceiveData({chunk:t})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(t){let{begin:e,chunk:r}=t,i=(r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r:new Uint8Array(r)).buffer;if(void 0===e)this._fullRequestReader?this._fullRequestReader._enqueue(i):this._queuedChunks.push(i);else{let t=this._rangeReaders.some(function(t){return t._begin===e&&(t._enqueue(i),!0)});(0,o.assert)(t,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(t){void 0===t.total?this._rangeReaders[0]?.onProgress?.({loaded:t.loaded}):this._fullRequestReader?.onProgress?.({loaded:t.loaded,total:t.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){t=this._rangeReaders.indexOf(t);0<=t&&this._rangeReaders.splice(t,1)}getFullReader(){(0,o.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var t=this._queuedChunks;return this._queuedChunks=null,new i(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){var r;return e<=this._progressiveDataLength?null:(r=new a(this,t,e),this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(r),r)}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(var e of this._rangeReaders.slice(0))e.cancel(t);this._pdfDataRangeTransport.abort()}};class i{constructor(t,e){var r=2{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFetchStream=void 0,r(93),r(101),r(102),r(105),r(107),r(109),r(113),r(116),r(123),r(89);var a=r(1),n=r(182);function o(t,e,r){return{method:"GET",headers:t,signal:r.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function l(t){var e,r=new Headers;for(e in t){var i=t[e];void 0!==i&&r.append(e,i)}return r}function i(t){return t instanceof Uint8Array?t.buffer:t instanceof ArrayBuffer?t:((0,a.warn)("getArrayBuffer - unexpected data format: "+t),new Uint8Array(t).buffer)}e.PDFFetchStream=class{constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,a.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new s(this),this._fullRequestReader}getRangeReader(t,e){return e<=this._progressiveDataLength?null:(t=new h(this,t,e),this._rangeRequestReaders.push(t),t)}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(var e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class s{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;t=t.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=new a.PromiseCapability,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=l(this._stream.httpHeaders);let s=t.url;fetch(s,o(this._headers,this._withCredentials,this._abortController)).then(e=>{if(!(0,n.validateResponseStatus)(e.status))throw(0,n.createResponseStatusError)(e.status,s);this._reader=e.body.getReader(),this._headersCapability.resolve();var t=t=>e.headers.get(t),{allowRangeRequests:r,suggestedLength:i}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=r,this._contentLength=i||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new a.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;var{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:i(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}class h{constructor(t,e,r){this._stream=t,this._reader=null,this._loaded=0;t=t.source;this._withCredentials=t.withCredentials||!1,this._readCapability=new a.PromiseCapability,this._isStreamingSupported=!t.disableStream,this._abortController=new AbortController,this._headers=l(this._stream.httpHeaders),this._headers.append("Range",`bytes=${e}-`+(r-1));let i=t.url;fetch(i,o(this._headers,this._withCredentials,this._abortController)).then(t=>{if(!(0,n.validateResponseStatus)(t.status))throw(0,n.createResponseStatusError)(t.status,i);this._readCapability.resolve(),this._reader=t.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;var{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded}),{value:i(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createResponseStatusError=function(t,e){return 404===t||0===t&&e.startsWith("file:")?new i.MissingPDFException('Missing PDF "'+e+'".'):new i.UnexpectedResponseException(`Unexpected server response (${t}) while retrieving PDF "${e}".`,t)},e.extractFilenameFromHeader=function(e){e=e("Content-Disposition");if(e){let t=(0,s.getFilenameFromContentDispositionHeader)(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if((0,a.isPdfFile)(t))return t}return null},e.validateRangeRequestCapabilities=function(t){var{getResponseHeader:t,isHttp:e,rangeChunkSize:r,disableRange:i}=t,s={allowRangeRequests:!1,suggestedLength:void 0},a=parseInt(t("Content-Length"),10);return!Number.isInteger(a)||(s.suggestedLength=a)<=2*r||!i&&e&&"bytes"===t("Accept-Ranges")&&"identity"===(t("Content-Encoding")||"identity")&&(s.allowRangeRequests=!0),s},e.validateResponseStatus=function(t){return 200===t||206===t};var i=r(1),s=r(183),a=r(168)},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getFilenameFromContentDispositionHeader=function(t){let s=!0,e=o("filename\\*","i").exec(t);var r;return e?(r=l(e=e[1]),i(r=n(r=h(r=unescape(r))))):(e=(t=>{for(var i=[],e=o("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(r=e.exec(t));){var[,r,s,a]=r;if((r=parseInt(r,10))in i){if(0===r)break}else i[r]=[s,a]}var n=[];for(let r=0;r{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFNetworkStream=void 0,r(89);var a=r(1),n=r(182);class i{constructor(t){var e=1"string"!=typeof(t=t.response)?t:(0,a.stringToBytes)(t).buffer)(i);if(206===t){let t=i.getResponseHeader("Content-Range"),e=/bytes (\d+)-(\d+)\/(\d+)/.exec(t);r.onDone({begin:parseInt(e[1],10),chunk:s})}else s?r.onDone({begin:0,chunk:s}):r.onError?.(i.status)}else r.onError?.(i.status)}}}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){var e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}e.PDFNetworkStream=class{constructor(t){this._source=t,this._manager=new i(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){t=this._rangeRequestReaders.indexOf(t);0<=t&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,a.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new s(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){t=new o(this._manager,t,e);return t.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(t),t}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(var e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class s{constructor(t,e){this._manager=t;var r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._fullRequestId=t.requestFull(r),this._headersReceivedCapability=new a.PromiseCapability,this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){let t=this._fullRequestId,e=this._manager.getRequestXhr(t),r=t=>e.getResponseHeader(t),{allowRangeRequests:i,suggestedLength:s}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(t),this._headersReceivedCapability.resolve()}_onDone(t){if(t&&(0{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFNodeStream=void 0,r(89),r(93),r(101),r(102),r(105),r(107),r(109),r(113),r(116),r(123);var s=r(1),a=r(182);let n=/^file:\/\/\/[a-zA-Z]:\//;e.PDFNodeStream=class{constructor(t){this.source=t,this.url=(t=>{var e=require("url"),r=e.parse(t);if("file:"!==r.protocol&&!r.host){if(/^[a-z]:[/\\]/i.test(t))return e.parse("file:///"+t);r.host||(r.protocol="file:")}return r})(t.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new(this.isFsUrl?c:h)(this),this._fullRequestReader}getRangeReader(t,e){return e<=this._progressiveDataLength?null:(t=new(this.isFsUrl?u:d)(this,t,e),this._rangeRequestReaders.push(t),t)}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(var e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class i{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;t=t.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=new s.PromiseCapability,this._headersCapability=new s.PromiseCapability}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;var t=this._readableStream.read();return null===t?(this._readCapability=new s.PromiseCapability,this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){(this._readableStream=t).on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",t=>{this._error(t)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new s.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class o{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new s.PromiseCapability;t=t.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;var t=this._readableStream.read();return null===t?(this._readCapability=new s.PromiseCapability,this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){(this._readableStream=t).on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",t=>{this._error(t)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function l(t,e){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:e}}class h extends i{constructor(i){super(i);var t,e=t=>{if(404===t.statusCode){let t=new s.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=t,void this._headersCapability.reject(t)}else{this._headersCapability.resolve(),this._setReadableStream(t);var t=t=>this._readableStream.headers[t.toLowerCase()],{allowRangeRequests:e,suggestedLength:r}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:i.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=e,this._contentLength=r||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(t)}};this._request=null,"http:"===this._url.protocol?(t=require("http"),this._request=t.request(l(this._url,i.httpHeaders),e)):(t=require("https"),this._request=t.request(l(this._url,i.httpHeaders),e)),this._request.on("error",t=>{this._storedError=t,this._headersCapability.reject(t)}),this._request.end()}}class d extends o{constructor(r,e,t){super(r),this._httpHeaders={};for(let e in r.httpHeaders){let t=r.httpHeaders[e];void 0!==t&&(this._httpHeaders[e]=t)}this._httpHeaders.Range=`bytes=${e}-`+(t-1);e=t=>{if(404!==t.statusCode)this._setReadableStream(t);else{let t=new s.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=t}};if(this._request=null,"http:"===this._url.protocol){let t=require("http");this._request=t.request(l(this._url,this._httpHeaders),e)}else{let t=require("https");this._request=t.request(l(this._url,this._httpHeaders),e)}this._request.on("error",t=>{this._storedError=t}),this._request.end()}}class c extends i{constructor(t){super(t);let r=decodeURIComponent(this._url.path),i=(n.test(this._url.href)&&(r=r.replace(/^\//,"")),require("fs"));i.lstat(r,(t,e)=>{t?("ENOENT"===t.code&&(t=new s.MissingPDFException(`Missing PDF "${r}".`)),this._storedError=t,this._headersCapability.reject(t)):(this._contentLength=e.size,this._setReadableStream(i.createReadStream(r)),this._headersCapability.resolve())})}}class u extends o{constructor(t,e,r){super(t);let i=decodeURIComponent(this._url.path);n.test(this._url.href)&&(i=i.replace(/^\//,""));t=require("fs");this._setReadableStream(t.createReadStream(i,{start:e,end:r-1}))}}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SVGGraphics=void 0,r(84),r(86),r(87),r(93),r(101),r(102),r(105),r(107),r(109),r(113),r(116),r(123),r(2),r(89),r(187);var i=r(168),v=r(1);function _(r){var t=1>2]+i[(3&a)<<4|n>>4]+i[t+1>6:64]+i[t+2{let f=new Uint8Array([137,80,78,71,13,10,26,10]),n=new Int32Array(256);for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?3988292384^e>>1&2147483647:e>>1&2147483647;n[t]=e}function g(t,e,r,i){var s=i,a=e.length,a=(r[s]=a>>24&255,r[s+1]=a>>16&255,r[s+2]=a>>8&255,r[s+3]=255&a,r[s+=4]=255&t.charCodeAt(0),r[s+1]=255&t.charCodeAt(1),r[s+2]=255&t.charCodeAt(2),r[s+3]=255&t.charCodeAt(3),r.set(e,s+=4),((r,t,i)=>{let s=-1;for(let e=t;e>>8^n[t]}return-1^s})(r,i+4,s+=e.length));r[s]=a>>24&255,r[s+1]=a>>16&255,r[s+2]=a>>8&255,r[s+3]=255&a}function m(t){let e=t.length;var r=65535,i=Math.ceil(e/r),s=new Uint8Array(2+e+5*i+4);let a=0,n=(s[a++]=120,s[a++]=156,0);for(;e>r;)s[a++]=0,s[a++]=255,s[a++]=255,s[a++]=0,s[a++]=0,s.set(t.subarray(n,n+r),a),a+=r,n+=r,e-=r;s[a++]=1,s[a++]=255&e,s[a++]=e>>8&255,s[a++]=255&~e,s[a++]=(65535&~e)>>8&255,s.set(t.subarray(n),a),a+=t.length-n;i=((e,r,i)=>{let s=1,a=0;for(let t=r;t>24&255,s[a++]=i>>16&255,s[a++]=i>>8&255,s[a++]=255&i,s}function i(t,e,r,i){var s=t.width,a=t.height;let n,o,l;var h=t.data;switch(e){case v.ImageKind.GRAYSCALE_1BPP:o=0,n=1,l=s+7>>3;break;case v.ImageKind.RGB_24BPP:o=2,n=8,l=3*s;break;case v.ImageKind.RGBA_32BPP:o=6,n=8,l=4*s;break;default:throw new Error("invalid format")}var d=new Uint8Array((1+l)*a);let c=0,u=0;for(let t=0;t>24&255,s>>16&255,s>>8&255,255&s,a>>24&255,a>>16&255,a>>8&255,255&a,n,o,0,0,0]),e=(t=>{if(v.isNodeJS)try{var e=8<=parseInt(process.versions.node)?t:Buffer.from(t),r=require("zlib").deflateSync(e,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(t){(0,v.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+t)}return m(t)})(d),i=f.length+36+t.length+e.length,i=new Uint8Array(i),p=0;return i.set(f,0),g("IHDR",t,i,p+=f.length),g("IDATA",e,i,p+=12+t.length),p+=12+e.length,g("IEND",new Uint8Array(0),i,p),_(i,"image/png",r)}return function(t,e,r){return i(t,void 0===t.kind?v.ImageKind.GRAYSCALE_1BPP:t.kind,e,r)}})();class o{constructor(){this.fontSizeScale=1,this.fontWeight="normal",this.fontSize=0,this.textMatrix=v.IDENTITY_MATRIX,this.fontMatrix=v.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=v.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(t,e){this.x=t,this.y=e}}function b(t){if(Number.isInteger(t))return t.toString();var e=t.toFixed(10);let r=e.length-1;if("0"!==e[r])return e;for(;"0"===e[--r];);return e.substring(0,"."===e[r]?r:r+1)}function y(t){if(0===t[4]&&0===t[5]){if(0===t[1]&&0===t[2])return 1===t[0]&&1===t[3]?"":`scale(${b(t[0])} ${b(t[3])})`;if(t[0]===t[3]&&t[1]===-t[2])return`rotate(${b(180*Math.acos(t[0])/Math.PI)})`}else if(1===t[0]&&0===t[1]&&0===t[2]&&1===t[3])return`translate(${b(t[4])} ${b(t[5])})`;return`matrix(${b(t[0])} ${b(t[1])} ${b(t[2])} ${b(t[3])} ${b(t[4])} ${b(t[5])})`}let l=0,h=0,f=0;e.SVGGraphics=class{constructor(t,e){var r=2{e.get(r,t)});this.current.dependencies.push(t)}return Promise.all(this.current.dependencies)}transform(t,e,r,i,s,a){this.transformMatrix=v.Util.transform(this.transformMatrix,[t,e,r,i,s,a]),this.tgrp=null}getSVG(t,e){this.viewport=e;let r=this._initialize(e);return this.loadDependencies(t).then(()=>(this.transformMatrix=v.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(t)),r))}convertOpList(e){var r=this._operatorIdMapping,i=e.argsArray,s=e.fnArray,a=[];for(let t=0,e=s.length;t{var i=r(3),s=r(188),r=r(193);i({target:"Array",proto:!0},{group:function(t){return s(this,t,1{var p=r(99),i=r(14),f=r(13),g=r(40),m=r(18),v=r(64),_=r(189),b=r(108),y=Array,A=i([].push);t.exports=function(t,e,r,i){for(var s,a,n,o=g(t),l=f(o),h=p(e,r),d=_(null),c=v(l),u=0;u{function i(){}function s(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e}var a,n=r(47),o=r(190),l=r(66),h=r(55),d=r(192),c=r(43),r=r(54),u="prototype",p="script",f=r("IE_PROTO"),g=function(t){return"<"+p+">"+t+""},m=function(){try{a=new ActiveXObject("htmlfile")}catch(r){}var t,e;m="undefined"==typeof document||document.domain&&a?s(a):(t=c("iframe"),e="java"+p+":",t.style.display="none",d.appendChild(t),t.src=String(e),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F);for(var r=l.length;r--;)delete m[u][l[r]];return m()};h[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(i[u]=n(t),r=new i,i[u]=null,r[f]=t):r=m(),void 0===e?r:o.f(r,e)}},(t,e,r)=>{var i=r(6),s=r(46),o=r(45),l=r(47),h=r(12),d=r(191);e.f=i&&!s?Object.defineProperties:function(t,e){l(t);for(var r,i=h(e),s=d(e),a=s.length,n=0;n{var i=r(59),s=r(66);t.exports=Object.keys||function(t){return i(t,s)}},(t,e,r)=>{r=r(24);t.exports=r("document","documentElement")},(t,e,r)=>{var i=r(34),s=r(189),r=r(45).f,a=i("unscopables"),n=Array.prototype;void 0===n[a]&&r(n,a,{configurable:!0,value:s(null)}),t.exports=function(t){n[a][t]=!0}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XfaText=void 0,r(89);class a{static textContent(t){let s=[],e={items:s,styles:Object.create(null)};return function e(r){if(r){let t=null;var i=r.name;if("#text"===i)t=r.value;else{if(!a.shouldBuildText(i))return;r?.attributes?.textContent?t=r.attributes.textContent:r.value&&(t=r.value)}if(null!==t&&s.push({str:t}),r.children)for(let t of r.children)e(t)}}(t),e}static shouldBuildText(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}e.XfaText=a},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextLayerRenderTask=void 0,e.renderTextLayer=function(t){t.textContentSource||!t.textContent&&!t.textContentStream||((0,l.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),t.textContentSource=t.textContent||t.textContentStream);var{container:e,viewport:r}=t,e=getComputedStyle(e),i=e.getPropertyValue("visibility"),e=parseFloat(e.getPropertyValue("--scale-factor")),i=("visible"===i&&(!e||1e-5{var r=p.get(e);if(r)return r;(r=f(30,t)).font="30px "+e;let i=(t=r.measureText("")).fontBoundingBoxAscent,s=Math.abs(t.fontBoundingBoxDescent);if(i){let t=i/(i+s);return p.set(e,t),r.canvas.width=r.canvas.height=0,t}r.strokeStyle="red",r.clearRect(0,0,30,30),r.strokeText("g",0,0);let a=r.getImageData(0,0,30,30).data;s=0;for(let t=a.length-1-3;0<=t;t-=4)if(0{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new u.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new u.AbortException("TextLayer task cancelled."))}_processItems(t,e){for(var r of t)if(void 0!==r.str)this._textContentItemsStr.push(r.str),i(this,r,e);else if("beginMarkedContentProps"===r.type||"beginMarkedContent"===r.type){let t=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==r.id&&this._container.setAttribute("id",""+r.id),t.append(this._container)}else"endMarkedContent"===r.type&&(this._container=this._container.parentNode)}_layoutText(t){var e=this._layoutTextParams.properties=this._textDivProperties.get(t);if(this._layoutTextParams.div=t,h(this._layoutTextParams),e.hasText&&this._container.append(t),e.hasEOL){let t=document.createElement("br");t.setAttribute("role","presentation"),this._container.append(t)}}_render(){let i=new u.PromiseCapability,s=Object.create(null);if(this._isReadableStream){let r=()=>{this._reader.read().then(t=>{var{value:t,done:e}=t;e?i.resolve():(Object.assign(s,t.styles),this._processItems(t.items,s),r())},i.reject)};this._reader=this._textContentSource.getReader(),r()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{let{items:t,styles:e}=this._textContentSource;this._processItems(t,e),i.resolve()}}i.promise.then(()=>{s=null;var r=this;if(!r._canceled){let e=r._textDivs,t=r._capability;if(!(1e5{Object.defineProperty(e,"__esModule",{value:!0}),e.AnnotationEditorLayer=void 0,r(125),r(136),r(138),r(141),r(143),r(145),r(147);var i=r(1),s=r(164),l=r(197),h=r(202),a=r(168),d=r(203);class c{#Se;#Ee=!1;#xe=null;#we=this.pointerup.bind(this);#Ce=this.pointerdown.bind(this);#Te=new Map;#Pe=!1;#ke=!1;#Me=!1;#Fe;static _initialized=!1;constructor(t){var{uiManager:t,pageIndex:e,div:r,accessibilityManager:i,annotationLayer:s,viewport:a,l10n:n}=t,o=[l.FreeTextEditor,h.InkEditor,d.StampEditor];if(!c._initialized){c._initialized=!0;for(let t of o)t.initialize(n)}t.registerEditorTypes(o),this.#Fe=t,this.pageIndex=e,this.div=r,this.#Se=i,this.#xe=s,this.viewport=a,this.#Fe.addLayer(this)}get isEmpty(){return 0===this.#Te.size}updateToolbar(t){this.#Fe.updateToolbar(t)}updateMode(){var t=0{this.#Fe.focusMainContainer()},0),t.div.remove(),t.isAttachedToDOM=!1,this.#ke||this.addInkEditorIfNeeded(!1)}changeParent(t){t.parent!==this&&(t.annotationElementId&&(this.#Fe.addDeletedAnnotationElement(t.annotationElementId),s.AnnotationEditor.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),t.parent?.detach(t),t.setParent(this),t.div)&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div))}add(t){var e;this.changeParent(t),this.#Fe.addEditor(t),this.attach(t),t.isAttachedToDOM||(e=t.render(),this.div.append(e),t.isAttachedToDOM=!0),t.fixAndSetPosition(),t.onceAdded(),this.#Fe.addToAnnotationStorage(t)}moveEditorInDOM(e){if(e.isAttachedToDOM){let t=document.activeElement;e.div.contains(t)&&(e._focusEventsAllowed=!1,setTimeout(()=>{e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0}),t.focus())},0)),e._structTreeParentId=this.#Se?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}}addOrRebuild(t){t.needsToBeRebuilt()?t.rebuild():this.add(t)}addUndoableEditor(t){this.addCommands({cmd:()=>t._uiManager.rebuild(t),undo:()=>{t.remove()},mustExec:!1})}getNextId(){return this.#Fe.getId()}#Ie(t){switch(this.#Fe.getMode()){case i.AnnotationEditorType.FREETEXT:return new l.FreeTextEditor(t);case i.AnnotationEditorType.INK:return new h.InkEditor(t);case i.AnnotationEditorType.STAMP:return new d.StampEditor(t)}return null}pasteEditor(t,e){this.#Fe.updateToolbar(t),this.#Fe.updateMode(t);var{offsetX:t,offsetY:r}=this.#Oe(),i=this.getNextId(),i=this.#Ie({parent:this,id:i,x:t,y:r,uiManager:this.#Fe,isCentered:!0,...e});i&&this.add(i)}deserialize(t){switch(t.annotationType??t.annotationEditorType){case i.AnnotationEditorType.FREETEXT:return l.FreeTextEditor.deserialize(t,this,this.#Fe);case i.AnnotationEditorType.INK:return h.InkEditor.deserialize(t,this,this.#Fe);case i.AnnotationEditorType.STAMP:return d.StampEditor.deserialize(t,this,this.#Fe)}return null}#De(t,e){var r=this.getNextId(),r=this.#Ie({parent:this,id:r,x:t.offsetX,y:t.offsetY,uiManager:this.#Fe,isCentered:e});return r&&this.add(r),r}#Oe(){var{x:t,y:e,width:r,height:i}=this.div.getBoundingClientRect(),s=Math.max(0,t),a=Math.max(0,e),s=(s+Math.min(window.innerWidth,t+r))/2-t,r=(a+Math.min(window.innerHeight,e+i))/2-e,[t,a]=this.viewport.rotation%180==0?[s,r]:[r,s];return{offsetX:t,offsetY:a}}addNewEditor(){this.#De(this.#Oe(),!0)}setSelected(t){this.#Fe.setSelected(t)}toggleSelected(t){this.#Fe.toggleSelected(t)}isSelected(t){return this.#Fe.isSelected(t)}unselect(t){this.#Fe.unselect(t)}pointerup(t){var e=i.FeatureTest.platform.isMac;0!==t.button||t.ctrlKey&&e||t.target!==this.div||!this.#Pe||(this.#Pe=!1,this.#Ee?this.#Fe.getMode()!==i.AnnotationEditorType.STAMP?this.#De(t,!1):this.#Fe.unselectAll():this.#Ee=!0)}pointerdown(t){var e;this.#Pe?this.#Pe=!1:(e=i.FeatureTest.platform.isMac,0!==t.button||t.ctrlKey&&e||t.target===this.div&&(this.#Pe=!0,e=this.#Fe.getActive(),this.#Ee=!e||e.isEmpty()))}findNewParent(t,e,r){e=this.#Fe.findParent(e,r);return null!==e&&e!==this&&(e.changeParent(t),!0)}destroy(){this.#Fe.getActive()?.parent===this&&(this.#Fe.commitOrRemove(),this.#Fe.setActiveEditor(null));for(var t of this.#Te.values())this.#Se?.removePointerInTextLayer(t.contentDiv),t.setParent(null),t.isAttachedToDOM=!1,t.div.remove();this.div=null,this.#Te.clear(),this.#Fe.removeLayer(this)}#Re(){this.#ke=!0;for(var t of this.#Te.values())t.isEmpty()&&t.remove();this.#ke=!1}render(t){t=t.viewport;this.viewport=t,(0,a.setLayerDimensions)(this.div,t);for(let t of this.#Fe.getEditors(this.pageIndex))this.add(t);this.updateMode()}update(t){t=t.viewport;this.#Fe.commitOrRemove(),this.viewport=t,(0,a.setLayerDimensions)(this.div,{rotation:t.rotation}),this.updateMode()}get pageDimensions(){var{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}}e.AnnotationEditorLayer=c},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FreeTextEditor=void 0,r(89);var d=r(1),s=r(165),i=r(164),a=r(198);class n extends i.AnnotationEditor{#Le=this.editorDivBlur.bind(this);#Ne=this.editorDivFocus.bind(this);#Be=this.editorDivInput.bind(this);#je=this.editorDivKeydown.bind(this);#Ue;#ze="";#We=this.id+"-editor";#He;#qe=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){var t=n.prototype,e=t=>t.isEmpty(),r=s.AnnotationEditorUIManager.TRANSLATE_SMALL,i=s.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,d.shadow)(this,"_keyboardManager",new s.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-r,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[r,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[i,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-r],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:e}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,r],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,i],checker:e}]]))}static _type="freetext";constructor(t){super({...t,name:"freeTextEditor"}),this.#Ue=t.color||n._defaultColor||i.AnnotationEditor._defaultLineColor,this.#He=t.fontSize||n._defaultFontSize}static initialize(t){i.AnnotationEditor.initialize(t,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});t=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(t.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,e){switch(t){case d.AnnotationEditorParamsType.FREETEXT_SIZE:n._defaultFontSize=e;break;case d.AnnotationEditorParamsType.FREETEXT_COLOR:n._defaultColor=e}}updateParams(t,e){switch(t){case d.AnnotationEditorParamsType.FREETEXT_SIZE:this.#Ge(e);break;case d.AnnotationEditorParamsType.FREETEXT_COLOR:this.#Ve(e)}}static get defaultPropertiesToUpdate(){return[[d.AnnotationEditorParamsType.FREETEXT_SIZE,n._defaultFontSize],[d.AnnotationEditorParamsType.FREETEXT_COLOR,n._defaultColor||i.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[d.AnnotationEditorParamsType.FREETEXT_SIZE,this.#He],[d.AnnotationEditorParamsType.FREETEXT_COLOR,this.#Ue]]}#Ge(t){let e=t=>{this.editorDiv.style.fontSize=`calc(${t}px * var(--scale-factor))`,this.translate(0,-(t-this.#He)*this.parentScale),this.#He=t,this.#$e()},r=this.#He;this.addCommands({cmd:()=>{e(t)},undo:()=>{e(r)},mustExec:!0,type:d.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#Ve(t){let e=this.#Ue;this.addCommands({cmd:()=>{this.#Ue=this.editorDiv.style.color=t},undo:()=>{this.#Ue=this.editorDiv.style.color=e},mustExec:!0,type:d.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(t,e){this._uiManager.translateSelectedEditors(t,e,!0)}getInitialTranslation(){var t=this.parentScale;return[-n._internalPadding*t,-(n._internalPadding+this.#He)*t]}rebuild(){this.parent&&(super.rebuild(),null===this.div||this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(d.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",this.#je),this.editorDiv.addEventListener("focus",this.#Ne),this.editorDiv.addEventListener("blur",this.#Le),this.editorDiv.addEventListener("input",this.#Be))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#We),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",this.#je),this.editorDiv.removeEventListener("focus",this.#Ne),this.editorDiv.removeEventListener("blur",this.#Le),this.editorDiv.removeEventListener("input",this.#Be),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv)&&this.editorDiv.focus()}onceAdded(){this.width?this.#Xe():(this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}#Ke(){var t=this.editorDiv.getElementsByTagName("div");if(0===t.length)return this.editorDiv.innerText;var e,r=[];for(e of t)r.push(e.innerText.replace(/\r\n?|\n/,""));return r.join("\n")}#$e(){let[t,e]=this.parentDimensions,i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{let{currentLayer:t,div:e}=this,r=e.style.display;e.style.display="hidden",t.div.append(this.div),i=e.getBoundingClientRect(),e.remove(),e.style.display=r}this.rotation%180==this.parentRotation%180?(this.width=i.width/t,this.height=i.height/e):(this.width=i.height/t,this.height=i.width/e),this.fixAndSetPosition()}commit(){if(this.isInEditMode()){super.commit(),this.disableEditMode();let e=this.#ze,r=this.#ze=this.#Ke().trimEnd();if(e!==r){let t=t=>{(this.#ze=t)?(this.#Ye(),this._uiManager.rebuild(this),this.#$e()):this.remove()};this.addCommands({cmd:()=>{t(r)},undo:()=>{t(e)},mustExec:!1}),this.#$e()}}}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(t){this.enterInEditMode()}keydown(t){t.target===this.div&&"Enter"===t.key&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){n._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(!this.div){let o,l,t=(this.width&&(o=this.x,l=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#We),this.enableEditing(),i.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(t=>this.editorDiv?.setAttribute("aria-label",t)),i.AnnotationEditor._l10nPromise.get("free_text2_default_content").then(t=>this.editorDiv?.setAttribute("default-content",t)),this.editorDiv.contentEditable=!0,this.editorDiv).style;if(t.fontSize=`calc(${this.#He}px * var(--scale-factor))`,t.color=this.#Ue,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,s.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){let[a,n]=this.parentDimensions;if(this.annotationElementId){let t=this.#qe.position,[e,r]=this.getInitialTranslation();[e,r]=this.pageTranslationToScreen(e,r);var[h,d]=this.pageDimensions,[c,u]=this.pageTranslation;let i,s;switch(this.rotation){case 0:i=o+(t[0]-c)/h,s=l+this.height-(t[1]-u)/d;break;case 90:i=o+(t[0]-c)/h,s=l-(t[1]-u)/d,[e,r]=[r,-e];break;case 180:i=o-this.width+(t[0]-c)/h,s=l-(t[1]-u)/d,[e,r]=[-e,-r];break;case 270:i=o+(t[0]-c-this.height*d)/h,s=l+(t[1]-u-this.width*h)/d,[e,r]=[-r,e]}this.setAt(i*a,s*n,e,r)}else this.setAt(o*a,l*n,this.width*a,this.height*n);this.#Ye(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0}return this.div}#Ye(){if(this.editorDiv.replaceChildren(),this.#ze)for(var t of this.#ze.split("\n")){var e=document.createElement("div");e.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(e)}}get contentDiv(){return this.editorDiv}static deserialize(l,t,e){let h=null;if(l instanceof a.FreeTextAnnotationElement){let{data:{defaultAppearanceData:{fontSize:t,fontColor:e},rect:r,rotation:i,id:s},textContent:a,textPosition:n,parent:{page:{pageNumber:o}}}=l;if(!a||0===a.length)return null;h=l={annotationType:d.AnnotationEditorType.FREETEXT,color:Array.from(e),fontSize:t,value:a.join("\n"),position:n,pageIndex:o-1,rect:r,rotation:i,id:s,deleted:!1}}let r=super.deserialize(l,t,e);return r.#He=l.fontSize,r.#Ue=d.Util.makeHexColor(...l.color),r.#ze=l.value,r.annotationElementId=l.id||null,r.#qe=h,r}serialize(){var t=01<=Math.abs(t-s[e]))||t.color.some((t,e)=>t!==i[e])||t.pageIndex!==a}#Xe(){var t=0this.#Xe(!0),0))}}e.FreeTextEditor=n},(L,t,e)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StampAnnotationElement=t.InkAnnotationElement=t.FreeTextAnnotationElement=t.AnnotationLayer=void 0,e(89),e(125),e(136),e(138),e(141),e(143),e(145),e(147);var u=e(1),c=e(168),i=e(163),s=e(199),n=e(200),p=e(201);let f=new WeakSet;function g(t){return{width:t[2]-t[0],height:t[3]-t[1]}}class o{static create(t){switch(t.data.annotationType){case u.AnnotationType.LINK:return new r(t);case u.AnnotationType.TEXT:return new l(t);case u.AnnotationType.WIDGET:switch(t.data.fieldType){case"Tx":return new h(t);case"Btn":return new(t.data.radioButton?_:t.data.checkBox?v:b)(t);case"Ch":return new y(t);case"Sig":return new d(t)}return new m(t);case u.AnnotationType.POPUP:return new A(t);case u.AnnotationType.FREETEXT:return new x(t);case u.AnnotationType.LINE:return new w(t);case u.AnnotationType.SQUARE:return new E(t);case u.AnnotationType.CIRCLE:return new T(t);case u.AnnotationType.POLYLINE:return new C(t);case u.AnnotationType.CARET:return new k(t);case u.AnnotationType.INK:return new M(t);case u.AnnotationType.POLYGON:return new P(t);case u.AnnotationType.HIGHLIGHT:return new R(t);case u.AnnotationType.UNDERLINE:return new F(t);case u.AnnotationType.SQUIGGLY:return new D(t);case u.AnnotationType.STRIKEOUT:return new I(t);case u.AnnotationType.STAMP:return new O(t);case u.AnnotationType.FILEATTACHMENT:return new N(t);default:return new a(t)}}}class a{#Qe=!1;constructor(t){var{isRenderable:e=!1,ignoreBorder:r=!1,createQuadrilaterals:i=!1}=1{var t=r.detail[t],i=t[0],t=t.slice(1);r.target.style[e]=s.ColorConverters[i+"_HTML"](t),this.annotationStorage.setValue(this.data.id,{[e]:s.ColorConverters[i+"_rgb"](t)})};return(0,u.shadow)(this,"_commonActions",{display:t=>{var t=t.detail.display,e=t%2==1;this.container.style.visibility=e?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:e,noPrint:1===t||2===t})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{t=t.detail.hidden;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:t,noView:t})},focus:t=>{setTimeout(()=>t.target.focus({preventScroll:!1}),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:t=>{t=t.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(t,e){var r,i=this._commonActions;for(r of Object.keys(e.detail))(t[r]||i[r])?.(e)}_setDefaultPropertiesFromJS(t){if(this.enableScripting){var e=this.annotationStorage.getRawValue(this.data.id);if(e){var r,i,s=this._commonActions;for([r,i]of Object.entries(e)){var a=s[r];a&&(a({detail:{[r]:i},target:t}),delete e[r])}}}}_createQuadrilaterals(){if(this.container){let m=this.data.quadPoints;if(m){let[h,s,a,d]=this.data.rect;if(1===m.length){let[,{x:t,y:e},{x:r,y:i}]=m[0];if(a===t&&d===e&&h===r&&s===i)return}let r=this.container.style,c;if(this.#Qe){let{borderColor:t,borderWidth:e}=r;r.borderWidth=0,c=["url('data:image/svg+xml;utf8,",'',``],this.container.classList.add("hasBorder")}let u=a-h,p=d-s,f=this.svgFactory,t=f.createElement("svg"),e=(t.classList.add("quadrilateralsContainer"),t.setAttribute("width",0),t.setAttribute("height",0),f.createElement("defs")),g=(t.append(e),f.createElement("clipPath")),i="clippath_"+this.data.id;g.setAttribute("id",i),g.setAttribute("clipPathUnits","objectBoundingBox"),e.append(g);for(let[,{x:a,y:n},{x:o,y:l}]of m){let t=f.createElement("rect"),e=(o-h)/u,r=(d-n)/p,i=(a-o)/u,s=(n-l)/p;t.setAttribute("x",e),t.setAttribute("y",r),t.setAttribute("width",i),t.setAttribute("height",s),g.append(t),c?.push(``)}this.#Qe&&(c.push("')"),r.backgroundImage=c.join("")),this.container.append(t),this.container.style.clipPath=`url(#${i})`}}}_createPopup(){var{container:t,data:e}=this,t=(t.setAttribute("aria-haspopup","dialog"),new A({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:"popup_"+e.id,rotation:e.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(t.render())}render(){(0,u.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(t){var i=1{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e})})}}class r extends a{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!!(1(e&&this.linkService.goToDestination(e),!1),!e&&""!==e||this.#tn()}_bindNamedAction(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(e),!1),this.#tn()}_bindAttachment(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.downloadManager?.openOrDownloadData(this.container,e.content,e.filename),!1),this.#tn()}#Ze(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(e),!1),this.#tn()}_bindJSAction(e,r){e.href=this.linkService.getAnchorUrl("");var i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(let t of Object.keys(r.actions)){var s=i.get(t);s&&(e[s]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r.id,name:t}}),!1))}e.onclick||(e.onclick=()=>!1),this.#tn()}_bindResetFormAction(t,r){let o=t.onclick;o||(t.href=this.linkService.getAnchorUrl("")),this.#tn(),this._fieldObjects?t.onclick=()=>{o?.();let{fields:e,refs:t,include:i}=r,s=[];if(0!==e.length||0!==t.length){let r=new Set(t);for(let t of e){let e=this._fieldObjects[t]||[];for(let{id:t}of e)r.add(t)}for(let e of Object.values(this._fieldObjects))for(let t of e)r.has(t.id)===i&&s.push(t)}else for(let t of Object.values(this._fieldObjects))s.push(...t);var a=this.annotationStorage,n=[];for(let r of s){let e=r.id;switch(n.push(e),r.type){case"text":{let t=r.defaultValue||"";a.setValue(e,{value:t});break}case"checkbox":case"radiobutton":{let t=r.defaultValue===r.exportValues;a.setValue(e,{value:t});break}case"combobox":case"listbox":{let t=r.defaultValue||"";a.setValue(e,{value:t});break}default:continue}let t=document.querySelector(`[data-element-id="${e}"]`);t&&(f.has(t)?t.dispatchEvent(new Event("resetform")):(0,u.warn)("_bindResetFormAction - element not allowed: "+e))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:n,name:"ResetForm"}}),!1}:((0,u.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),o||(t.onclick=()=>!1))}}class l extends a{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");var t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.alt="[{{type}} Annotation]",t.dataset.l10nId="text_annotation_type",t.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class m extends a{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(t){this.data.hasOwnCanvas&&("CANVAS"===t.previousSibling?.nodeName&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){var{isWin:e,isMac:r}=u.FeatureTest.platform;return e&&t.ctrlKey||r&&t.metaKey}_setEventListener(t,e,r,i,s){r.includes("mouse")?t.addEventListener(r,t=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:s(t),shift:t.shiftKey,modifier:this._getKeyModifier(t)}})}):t.addEventListener(r,t=>{if("blur"===r){if(!e.focused||!t.relatedTarget)return;e.focused=!1}else if("focus"===r){if(e.focused)return;e.focused=!0}s&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:s(t)}})})}_setEventListeners(t,e,r,i){for(var[s,a]of r)"Action"!==a&&!this.data.actions?.[a]||("Focus"!==a&&"Blur"!==a||(e||={focused:!1}),this._setEventListener(t,e,s,a,i),"Focus"!==a||this.data.actions?.Blur?"Blur"!==a||this.data.actions?.Focus||this._setEventListener(t,e,"focus","Focus",null):this._setEventListener(t,e,"blur","Blur",null))}_setBackgroundColor(t){var e=this.data.backgroundColor||null;t.style.backgroundColor=null===e?"transparent":u.Util.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){let e=["left","center","right"],r=this.data.defaultAppearanceData.fontColor,i=this.data.defaultAppearanceData.fontSize||9,s=t.style,a;var n=t=>Math.round(10*t)/10;if(this.data.multiLine){let t=Math.abs(this.data.rect[3]-this.data.rect[1]-2),e=t/(Math.round(t/(u.LINE_FACTOR*i))||1);a=Math.min(i,n(e/u.LINE_FACTOR))}else{let t=Math.abs(this.data.rect[3]-this.data.rect[1]-2);a=Math.min(i,n(t/u.LINE_FACTOR))}s.fontSize=`calc(${a}px * var(--scale-factor))`,s.color=u.Util.makeHexColor(r[0],r[1],r[2]),null!==this.data.textAlignment&&(s.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class h extends m{constructor(t){super(t,{isRenderable:t.renderForms||!t.data.hasAppearance&&!!t.data.fieldValue})}setPropertyOnSiblings(t,e,r,i){var s,a=this.annotationStorage;for(s of this._getElementsByName(t.name,t.id))s.domElement&&(s.domElement[e]=r),a.setValue(s.id,{[i]:r})}render(){let s=this.annotationStorage,h=this.data.id,a=(this.container.classList.add("textWidgetAnnotation"),null);if(this.renderForms){var r=s.getValue(h,{value:this.data.fieldValue});let t=r.value||"";var n=s.getValue(h,{charLimit:this.data.maxLen}).charLimit;n&&t.length>n&&(t=t.slice(0,n));let e=r.formattedValue||this.data.textContent?.join("\n")||null,l=(e&&this.data.comb&&(e=e.replaceAll(/\s+/g,"")),{userValue:t,formattedValue:e,lastCommittedValue:null,commitKey:1,focused:!1}),i=(this.data.multiLine?((a=document.createElement("textarea")).textContent=e??t,this.data.doNotScroll&&(a.style.overflowY="hidden")):((a=document.createElement("input")).type="text",a.setAttribute("value",e??t),this.data.doNotScroll&&(a.style.overflowX="hidden")),this.data.hasOwnCanvas&&(a.hidden=!0),f.add(a),a.setAttribute("data-element-id",h),a.disabled=this.data.readOnly,a.name=this.data.fieldName,a.tabIndex=1e3,this._setRequired(a,this.data.required),n&&(a.maxLength=n),a.addEventListener("input",t=>{s.setValue(h,{value:t.target.value}),this.setPropertyOnSiblings(a,"value",t.target.value,"value"),l.formattedValue=null}),a.addEventListener("resetform",t=>{var e=this.data.defaultFieldValue??"";a.value=l.userValue=e,l.formattedValue=null}),t=>{var e=l.formattedValue;null!=e&&(t.target.value=e),t.target.scrollLeft=0});if(this.enableScripting&&this.hasJSActions){a.addEventListener("focus",t=>{l.focused||(t=t.target,l.userValue&&(t.value=l.userValue),l.lastCommittedValue=t.value,l.commitKey=1,l.focused=!0)}),a.addEventListener("updatefromsandbox",t=>{this.showElementAndHideCanvas(t.target),this._dispatchEventFromSandbox({value(t){l.userValue=t.detail.value??"",s.setValue(h,{value:l.userValue.toString()}),t.target.value=l.userValue},formattedValue(t){var e=t.detail.formattedValue;null!=(l.formattedValue=e)&&t.target!==document.activeElement&&(t.target.value=e),s.setValue(h,{formattedValue:e})},selRange(t){t.target.setSelectionRange(...t.detail.selRange)},charLimit:e=>{var r=e.detail.charLimit,e=e.target;if(0===r)e.removeAttribute("maxLength");else{e.setAttribute("maxLength",r);let t=l.userValue;!t||t.length<=r||(t=t.slice(0,r),e.value=l.userValue=t,s.setValue(h,{value:t}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:h,name:"Keystroke",value:t,willCommit:!0,commitKey:1,selStart:e.selectionStart,selEnd:e.selectionEnd}}))}}},t)}),a.addEventListener("keydown",t=>{let e=-(l.commitKey=1);var r;"Escape"===t.key?e=0:"Enter"!==t.key||this.data.multiLine?"Tab"===t.key&&(l.commitKey=3):e=2,-1!==e&&(r=t.target.value,l.lastCommittedValue!==r)&&(l.lastCommittedValue=r,l.userValue=r,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:h,name:"Keystroke",value:r,willCommit:!0,commitKey:e,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))});let r=i;i=null,a.addEventListener("blur",t=>{var e;l.focused&&t.relatedTarget&&(l.focused=!1,e=t.target.value,l.userValue=e,l.lastCommittedValue!==e&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:h,name:"Keystroke",value:e,willCommit:!0,commitKey:l.commitKey,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}),r(t))}),this.data.actions?.Keystroke&&a.addEventListener("beforeinput",t=>{l.lastCommittedValue=null;var{data:e,target:r}=t,{value:i,selectionStart:s,selectionEnd:a}=r;let n=s,o=a;switch(t.inputType){case"deleteWordBackward":{let t=i.substring(0,s).match(/\w*[^\w]*$/);t&&(n-=t[0].length);break}case"deleteWordForward":{let t=i.substring(s).match(/^[^\w]*\w*/);t&&(o+=t[0].length);break}case"deleteContentBackward":s===a&&--n;break;case"deleteContentForward":s===a&&(o+=1)}t.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:h,name:"Keystroke",value:i,change:e||"",willCommit:!1,selStart:n,selEnd:o}})}),this._setEventListeners(a,l,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],t=>t.target.value)}if(i&&a.addEventListener("blur",i),this.data.comb){let t=(this.data.rect[2]-this.data.rect[0])/n;a.classList.add("comb"),a.style.letterSpacing=`calc(${t}px * var(--scale-factor) - 1ch)`}}else(a=document.createElement("div")).textContent=this.data.fieldValue,a.style.verticalAlign="middle",a.style.display="table-cell";return this._setTextStyle(a),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class d extends m{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class v extends m{constructor(t){super(t,{isRenderable:t.renderForms})}render(){let s=this.annotationStorage,a=this.data,n=a.id,t=s.getValue(n,{value:a.exportValue===a.fieldValue}).value;"string"==typeof t&&(t="Off"!==t,s.setValue(n,{value:t})),this.container.classList.add("buttonWidgetAnnotation","checkBox");var e=document.createElement("input");return f.add(e),e.setAttribute("data-element-id",n),e.disabled=a.readOnly,this._setRequired(e,this.data.required),e.type="checkbox",e.name=a.fieldName,t&&e.setAttribute("checked",!0),e.setAttribute("exportValue",a.exportValue),e.tabIndex=1e3,e.addEventListener("change",t=>{var{name:r,checked:i}=t.target;for(let e of this._getElementsByName(r,n)){let t=i&&e.exportValue===a.exportValue;e.domElement&&(e.domElement.checked=t),s.setValue(e.id,{value:t})}s.setValue(n,{value:i})}),e.addEventListener("resetform",t=>{var e=a.defaultFieldValue||"Off";t.target.checked=e===a.exportValue}),this.enableScripting&&this.hasJSActions&&(e.addEventListener("updatefromsandbox",t=>{this._dispatchEventFromSandbox({value(t){t.target.checked="Off"!==t.detail.value,s.setValue(n,{value:t.target.checked})}},t)}),this._setEventListeners(e,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],t=>t.target.checked)),this._setBackgroundColor(e),this._setDefaultPropertiesFromJS(e),this.container.append(e),this.container}}class _ extends m{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");let i=this.annotationStorage,r=this.data,s=r.id,t=i.getValue(s,{value:r.fieldValue===r.buttonValue}).value;"string"==typeof t&&(t=t!==r.buttonValue,i.setValue(s,{value:t}));var a=document.createElement("input");if(f.add(a),a.setAttribute("data-element-id",s),a.disabled=r.readOnly,this._setRequired(a,this.data.required),a.type="radio",a.name=r.fieldName,t&&a.setAttribute("checked",!0),a.tabIndex=1e3,a.addEventListener("change",t=>{var{name:e,checked:t}=t.target;for(let t of this._getElementsByName(e,s))i.setValue(t.id,{value:!1});i.setValue(s,{value:t})}),a.addEventListener("resetform",t=>{var e=r.defaultFieldValue;t.target.checked=null!=e&&e===r.buttonValue}),this.enableScripting&&this.hasJSActions){let e=r.buttonValue;a.addEventListener("updatefromsandbox",t=>{this._dispatchEventFromSandbox({value:t=>{var r=e===t.detail.value;for(let e of this._getElementsByName(t.target.name)){let t=r&&e.id===s;e.domElement&&(e.domElement.checked=t),i.setValue(e.id,{value:t})}}},t)}),this._setEventListeners(a,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],t=>t.target.checked)}return this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class b extends r{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){var t=super.render(),e=(t.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(t.title=this.data.alternativeText),t.lastChild);return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",t=>{this._dispatchEventFromSandbox({},t)})),t}}class y extends m{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");let a=this.annotationStorage,n=this.data.id,r=a.getValue(n,{value:this.data.fieldValue}),o=document.createElement("select"),i=(f.add(o),o.setAttribute("data-element-id",n),o.disabled=this.data.readOnly,this._setRequired(o,this.data.required),o.name=this.data.fieldName,o.tabIndex=1e3,this.data.combo&&0{var e=this.data.defaultFieldValue;for(let t of o.options)t.selected=t.value===e});for(let e of this.data.options){let t=document.createElement("option");t.textContent=e.displayValue,t.value=e.exportValue,r.value.includes(e.exportValue)&&(t.setAttribute("selected",!0),i=!1),o.append(t)}let s=null;if(i){let t=document.createElement("option");t.value=" ",t.setAttribute("hidden",!0),t.setAttribute("selected",!0),o.prepend(t),s=()=>{t.remove(),o.removeEventListener("input",s),s=null},o.addEventListener("input",s)}let l=t=>{let e=t?"value":"textContent",{options:r,multiple:i}=o;return i?Array.prototype.filter.call(r,t=>t.selected).map(t=>t[e]):-1===r.selectedIndex?null:r[r.selectedIndex][e]},h=l(!1),d=t=>{t=t.target.options;return Array.prototype.map.call(t,t=>({displayValue:t.textContent,exportValue:t.value}))};return this.enableScripting&&this.hasJSActions?(o.addEventListener("updatefromsandbox",t=>{this._dispatchEventFromSandbox({value(t){s?.();var t=t.detail.value,e=new Set(Array.isArray(t)?t:[t]);for(let t of o.options)t.selected=e.has(t.value);a.setValue(n,{value:l(!0)}),h=l(!1)},multipleSelection(t){o.multiple=!0},remove(t){var e=o.options,r=t.detail.remove;e[r].selected=!1,o.remove(r),0t.selected)&&(e[0].selected=!0),a.setValue(n,{value:l(!0),items:d(t)}),h=l(!1)},clear(t){for(;0!==o.length;)o.remove(0);a.setValue(n,{value:null,items:[]}),h=l(!1)},insert(t){var{index:e,displayValue:r,exportValue:i}=t.detail.insert,e=o.children[e],s=document.createElement("option");s.textContent=r,s.value=i,e?e.before(s):o.append(s),a.setValue(n,{value:l(!0),items:d(t)}),h=l(!1)},items(t){let e=t.detail.items;for(;0!==o.length;)o.remove(0);for(let i of e){let{displayValue:t,exportValue:e}=i,r=document.createElement("option");r.textContent=t,r.value=e,o.append(r)}0{var e=l(!0);a.setValue(n,{value:e}),t.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:h,changeEx:e,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(o,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],t=>t.target.value)):o.addEventListener("input",function(t){a.setValue(n,{value:l(!0)})}),this.data.combo&&this._setTextStyle(o),this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.append(o),this.container}}class A extends a{constructor(t){var{data:e,elements:r}=t;super(t,{isRenderable:a._hasPopupData(e)}),this.elements=r}render(){this.container.classList.add("popupAnnotation");var t,e=new S({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),r=[];for(t of this.elements)t.popup=e,r.push(t.data.id),t.addHighlightArea();return this.container.setAttribute("aria-controls",r.map(t=>""+u.AnnotationPrefix+t).join(",")),this.container}}class S{#en=null;#nn=this.#in.bind(this);#rn=this.#sn.bind(this);#an=this.#on.bind(this);#ln=this.#cn.bind(this);#Ue=null;#Rt=null;#hn=null;#dn=null;#un=null;#pn=null;#fn=!1;#gn=null;#mn=null;#bn=null;#vn=null;#yn=!1;constructor(t){var{container:t,color:e,elements:r,titleObj:i,modificationDate:s,contentsObj:a,richText:n,parent:o,rect:l,parentRect:h,open:d}=t,t=(this.#Rt=t,this.#vn=i,this.#hn=a,this.#bn=n,this.#un=o,this.#Ue=e,this.#mn=l,this.#pn=h,this.#dn=r,c.PDFDateString.toDateObject(s));t&&(this.#en=o.l10n.get("annotation_date_string",{date:t.toLocaleDateString(),time:t.toLocaleTimeString()})),this.trigger=r.flatMap(t=>t.getElementsToTriggerPopup());for(let t of this.trigger)t.addEventListener("click",this.#ln),t.addEventListener("mouseenter",this.#an),t.addEventListener("mouseleave",this.#rn),t.classList.add("popupTriggerArea");for(let t of r)t.container?.addEventListener("keydown",this.#nn);this.#Rt.hidden=!0,d&&this.#cn()}render(){if(!this.#gn){let{page:{view:t},viewport:{rawDims:{pageWidth:e,pageHeight:r,pageX:i,pageY:s}}}=this.#un,a=this.#gn=document.createElement("div");if(a.className="popup",this.#Ue){let t=a.style.outlineColor=u.Util.makeHexColor(...this.#Ue);if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))a.style.backgroundColor=`color-mix(in srgb, ${t} 30%, white)`;else a.style.backgroundColor=u.Util.makeHexColor(...this.#Ue.map(t=>Math.floor(.7*(255-t)+t)))}var l=document.createElement("span"),h=(l.className="header",document.createElement("h1"));if(l.append(h),{dir:h.dir,str:h.textContent}=this.#vn,a.append(l),this.#en){let e=document.createElement("span");e.classList.add("popupDate"),this.#en.then(t=>{e.textContent=t}),l.append(e)}h=this.#hn,l=this.#bn;if(!l?.str||h?.str&&h.str!==l.str){let t=this._formatContents(h);a.append(t)}else p.XfaLayer.render({xfaHtml:l.html,intent:"richText",div:a}),a.lastChild.classList.add("richText","popupContent");let n=!!this.#pn,o=n?this.#pn:this.#mn;for(let t of this.#dn)if(!o||null!==u.Util.intersect(t.data.rect,o)){o=t.data.rect,n=!0;break}var h=u.Util.normalizeRect([o[0],t[3]-o[1]+t[1],o[2],t[3]-o[3]+t[1]]),l=n?o[2]-o[0]+5:0,l=h[0]+l,h=h[1],d=this.#Rt.style;d.left=100*(l-i)/e+"%",d.top=100*(h-s)/r+"%",this.#Rt.append(a)}}_formatContents(t){let{str:e,dir:r}=t;var i=document.createElement("p"),s=(i.classList.add("popupContent"),i.dir=r,e.split(/(?:\r\n?|\n)/));for(let e=0,r=s.length;e{"Enter"===t.key&&(i?t.metaKey:t.ctrlKey)&&this.#Cn()}),!e.popupRef&&this.hasPopupData?this._createPopup():r.classList.add("popupTriggerArea"),t.append(r),t}getElementsToTriggerPopup(){return this.#wn}addHighlightArea(){this.container.classList.add("highlightArea")}#Cn(){this.downloadManager?.openOrDownloadData(this.container,this.content,this.filename)}}t.AnnotationLayer=class{#Se=null;#Tn=null;#Pn=new Map;constructor(t){var{div:t,accessibilityManager:e,annotationCanvasMap:r,l10n:i,page:s,viewport:a}=t;this.div=t,this.#Se=e,this.#Tn=r,this.l10n=i,this.page=s,this.viewport=a,this.zIndex=0,this.l10n||=n.NullL10n}#kn(t,e){var r=t.firstChild||t;r.id=""+u.AnnotationPrefix+e,this.div.append(t),this.#Se?.moveElementInDOM(this.div,t,r,!1)}async render(t){let e=t.annotations,r=this.div;(0,c.setLayerDimensions)(r,this.viewport);var s=new Map,a={data:null,layer:r,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new c.DOMSVGFactory,annotationStorage:t.annotationStorage||new i.AnnotationStorage,enableScripting:!0===t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(let i of e)if(!i.noHTML){let e=i.annotationType===u.AnnotationType.POPUP;if(e){let t=s.get(i.id);if(!t)continue;a.elements=t}else{let{width:t,height:e}=g(i.rect);if(t<=0||e<=0)continue}a.data=i;let r=o.create(a);if(r.isRenderable){if(!e&&i.popupRef){let t=s.get(i.popupRef);t?t.push(r):s.set(i.popupRef,[r])}0{function r(t){return Math.floor(255*Math.max(0,Math.min(1,t))).toString(16).padStart(2,"0")}function s(t){return Math.max(0,Math.min(255,255*t))}Object.defineProperty(e,"__esModule",{value:!0}),e.ColorConverters=void 0,e.ColorConverters=class{static CMYK_G(t){var[t,e,r,i]=t;return["G",1-Math.min(1,.3*t+.59*r+.11*e+i)]}static G_CMYK(t){var[t]=t;return["CMYK",0,0,0,1-t]}static G_RGB(t){var[t]=t;return["RGB",t,t,t]}static G_rgb(t){var[t]=t;return[t=s(t),t,t]}static G_HTML(t){var[t]=t,t=r(t);return"#"+t+t+t}static RGB_G(t){var[t,e,r]=t;return["G",.3*t+.59*e+.11*r]}static RGB_rgb(t){return t.map(s)}static RGB_HTML(t){return"#"+t.map(r).join("")}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(t){var[t,e,r,i]=t;return["RGB",1-Math.min(1,t+i),1-Math.min(1,r+i),1-Math.min(1,e+i)]}static CMYK_rgb(t){var[t,e,r,i]=t;return[s(1-Math.min(1,t+i)),s(1-Math.min(1,r+i)),s(1-Math.min(1,e+i))]}static CMYK_HTML(t){t=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(t)}static RGB_CMYK(t){var[t,e,r]=t,t=1-t,e=1-e,r=1-r;return["CMYK",t,e,r,Math.min(t,e,r)]}}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NullL10n=void 0,e.getL10nFallback=i;let r={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative",print_progress_percent:"{{progress}}%"};function i(t,e){switch(t){case"find_match_count":t=`find_match_count[${1===e.total?"one":"other"}]`;break;case"find_match_count_limit":t=`find_match_count_limit[${1===e.limit?"one":"other"}]`}return r[t]||""}e.NullL10n={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",async get(t){var r,e=1e in r?r[e]:"{{"+e+"}}"):t},async translate(t){}}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XfaLayer=void 0,r(89);var c=r(194);e.XfaLayer=class{static setupStorage(t,e,r,i,s){var a=i.getValue(e,{value:null});switch(r.name){case"textarea":null!==a.value&&(t.textContent=a.value),"print"!==s&&t.addEventListener("input",t=>{i.setValue(e,{value:t.target.value})});break;case"input":if("radio"===r.attributes.type||"checkbox"===r.attributes.type){if(a.value===r.attributes.xfaOn?t.setAttribute("checked",!0):a.value===r.attributes.xfaOff&&t.removeAttribute("checked"),"print"===s)break;t.addEventListener("change",t=>{i.setValue(e,{value:t.target.checked?t.target.getAttribute("xfaOn"):t.target.getAttribute("xfaOff")})})}else{if(null!==a.value&&t.setAttribute("value",a.value),"print"===s)break;t.addEventListener("input",t=>{i.setValue(e,{value:t.target.value})})}break;case"select":if(null!==a.value){t.setAttribute("value",a.value);for(let t of r.children)t.attributes.value===a.value?t.attributes.selected=!0:t.attributes.hasOwnProperty("selected")&&delete t.attributes.selected}t.addEventListener("input",t=>{t=t.target.options,t=-1===t.selectedIndex?"":t[t.selectedIndex].value;i.setValue(e,{value:t})})}}static setAttributes(t){let{html:r,element:e,storage:i=null,intent:s,linkService:a}=t;var n=e.attributes,o=r instanceof HTMLAnchorElement;"radio"===n.type&&(n.name=n.name+"-"+s);for(let[t,e]of Object.entries(n))if(null!=e)switch(t){case"class":e.length&&r.setAttribute(t,e.join(" "));break;case"dataId":break;case"id":r.setAttribute("data-element-id",e);break;case"style":Object.assign(r.style,e);break;case"textContent":r.textContent=e;break;default:o&&("href"===t||"newWindow"===t)||r.setAttribute(t,e)}o&&a.addLinkAttributes(r,n.href,n.newWindow),i&&n.dataId&&this.setupStorage(r,n.dataId,e,i)}static render(e){let i=e.annotationStorage,s=e.linkService,t=e.xfaHtml,a=e.intent||"display",r=document.createElement(t.name),n=(t.attributes&&this.setAttributes({html:r,element:t,intent:a,linkService:s}),[[t,-1,r]]),o=e.div;if(o.append(r),e.viewport){let t=`matrix(${e.viewport.transform.join(",")})`;o.style.transform=t}"richText"!==a&&o.setAttribute("class","xfaLayer xfaFont");for(var l=[];0{Object.defineProperty(e,"__esModule",{value:!0}),e.InkEditor=void 0,r(89),r(2);var h=r(1),l=r(164),g=r(198),i=r(168),n=r(165);class _ extends l.AnnotationEditor{#Fn=0;#Rn=0;#Dn=this.canvasPointermove.bind(this);#In=this.canvasPointerleave.bind(this);#On=this.canvasPointerup.bind(this);#Ln=this.canvasPointerdown.bind(this);#Nn=new Path2D;#Bn=!1;#jn=!1;#Un=!1;#zn=null;#Wn=0;#Hn=0;#qn=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";constructor(t){super({...t,name:"inkEditor"}),this.color=t.color||null,this.thickness=t.thickness||null,this.opacity=t.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(t){l.AnnotationEditor.initialize(t,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(t,e){switch(t){case h.AnnotationEditorParamsType.INK_THICKNESS:_._defaultThickness=e;break;case h.AnnotationEditorParamsType.INK_COLOR:_._defaultColor=e;break;case h.AnnotationEditorParamsType.INK_OPACITY:_._defaultOpacity=e/100}}updateParams(t,e){switch(t){case h.AnnotationEditorParamsType.INK_THICKNESS:this.#Gn(e);break;case h.AnnotationEditorParamsType.INK_COLOR:this.#Ve(e);break;case h.AnnotationEditorParamsType.INK_OPACITY:this.#Vn(e)}}static get defaultPropertiesToUpdate(){return[[h.AnnotationEditorParamsType.INK_THICKNESS,_._defaultThickness],[h.AnnotationEditorParamsType.INK_COLOR,_._defaultColor||l.AnnotationEditor._defaultLineColor],[h.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*_._defaultOpacity)]]}get propertiesToUpdate(){return[[h.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||_._defaultThickness],[h.AnnotationEditorParamsType.INK_COLOR,this.color||_._defaultColor||l.AnnotationEditor._defaultLineColor],[h.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??_._defaultOpacity))]]}#Gn(t){let e=this.thickness;this.addCommands({cmd:()=>{this.thickness=t,this.#$n()},undo:()=>{this.thickness=e,this.#$n()},mustExec:!0,type:h.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#Ve(t){let e=this.color;this.addCommands({cmd:()=>{this.color=t,this.#Xn()},undo:()=>{this.color=e,this.#Xn()},mustExec:!0,type:h.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#Vn(t){t/=100;let e=this.opacity;this.addCommands({cmd:()=>{this.opacity=t,this.#Xn()},undo:()=>{this.opacity=e,this.#Xn()},mustExec:!0,type:h.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){this.parent&&(super.rebuild(),null!==this.div)&&(this.canvas||(this.#Kn(),this.#Yn()),this.isAttachedToDOM||(this.parent.add(this),this.#Jn()),this.#$n())}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#zn.disconnect(),this.#zn=null,super.remove())}setParent(t){!this.parent&&t?this._uiManager.removeShouldRescale(this):this.parent&&null===t&&this._uiManager.addShouldRescale(this),super.setParent(t)}onScaleChanging(){var[t,e]=this.parentDimensions,t=this.width*t,e=this.height*e;this.setDimensions(t,e)}enableEditMode(){this.#Bn||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",this.#Ln))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",this.#Ln))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}#Qn(){var{parentRotation:t,parentDimensions:[e,r]}=this;switch(t){case 90:return[0,r,r,e];case 180:return[e,r,e,r];case 270:return[e,0,r,e];default:return[0,0,e,r]}}#Zn(){var{ctx:t,color:e,opacity:r,thickness:i,parentScale:s,scaleFactor:a}=this;t.lineWidth=i*s/a,t.lineCap="round",t.lineJoin="round",t.miterLimit=10,t.strokeStyle=""+e+(0,n.opacityToHex)(r)}#ti(t,e){this.canvas.addEventListener("contextmenu",i.noContextMenu),this.canvas.addEventListener("pointerleave",this.#In),this.canvas.addEventListener("pointermove",this.#Dn),this.canvas.addEventListener("pointerup",this.#On),this.canvas.removeEventListener("pointerdown",this.#Ln),this.isEditing=!0,this.#Un||(this.#Un=!0,this.#Jn(),this.thickness||=_._defaultThickness,this.color||=_._defaultColor||l.AnnotationEditor._defaultLineColor,this.opacity??=_._defaultOpacity),this.currentPath.push([t,e]),this.#jn=!1,this.#Zn(),this.#qn=()=>{this.#ei(),this.#qn&&window.requestAnimationFrame(this.#qn)},window.requestAnimationFrame(this.#qn)}#ni(e,r){var[i,t]=this.currentPath.at(-1);if(!(1{this.allRawPaths.push(s),this.paths.push(i),this.bezierPath2D.push(t),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(this.#Kn(),this.#Yn()),this.#$n())},mustExec:!0})}#ei(){if(this.#jn){this.#jn=!1;let t=Math.ceil(this.thickness*this.parentScale),e=this.currentPath.slice(-3),r=e.map(t=>t[0]),i=e.map(t=>t[1]),s=(Math.min(...r),Math.max(...r),Math.min(...i),Math.max(...i),this).ctx;s.save(),s.clearRect(0,0,this.canvas.width,this.canvas.height);for(let t of this.bezierPath2D)s.stroke(t);s.stroke(this.#Nn),s.restore()}}#ii(t,e,r,i,s,a,n){e=(e+i)/2,r=(r+s)/2,a=(i+a)/2,n=(s+n)/2;t.bezierCurveTo(e+2*(i-e)/3,r+2*(s-r)/3,a+2*(i-a)/3,n+2*(s-n)/3,a,n)}#ai(){var l=this.currentPath;if(l.length<=2)return[[l[0],l[0],l.at(-1),l.at(-1)]];var h=[];let d,[c,u]=l[0];for(d=1;d{this.canvas.removeEventListener("contextmenu",i.noContextMenu)},10),this.#si(t.offsetX,t.offsetY),this.addToAnnotationStorage(),this.setInBackground()}#Kn(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",l.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(t=>this.canvas?.setAttribute("aria-label",t)),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#Yn(){this.#zn=new ResizeObserver(t=>{t=t[0].contentRect;t.width&&t.height&&this.setDimensions(t.width,t.height)}),this.#zn.observe(this.div)}get isResizable(){return!this.isEmpty()&&this.#Bn}render(){if(!this.div){let r,i,[t,e,s,a]=(this.width&&(r=this.x,i=this.y),super.render(),l.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(t=>this.div?.setAttribute("aria-label",t)),this.#Qn());if(this.setAt(t,e,0,0),this.setDims(s,a),this.#Kn(),this.width){let[t,e]=this.parentDimensions;this.setAspectRatio(this.width*t,this.height*e),this.setAt(r*t,i*e,this.width*t,this.height*e),this.#Un=!0,this.#Jn(),this.setDims(this.width*t,this.height*e),this.#Xn(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();this.#Yn()}return this.div}#Jn(){var t,e;this.#Un&&([t,e]=this.parentDimensions,this.canvas.width=Math.ceil(this.width*t),this.canvas.height=Math.ceil(this.height*e),this.#oi())}setDimensions(t,e){var r=Math.round(t),i=Math.round(e);this.#Wn===r&&this.#Hn===i||(this.#Wn=r,this.#Hn=i,this.canvas.style.visibility="hidden",[r,i]=this.parentDimensions,this.width=t/r,this.height=e/i,this.fixAndSetPosition(),this.#Bn&&this.#ci(t,e),this.#Jn(),this.#Xn(),this.canvas.style.visibility="visible",this.fixDims())}#ci(t,e){var r=this.#hi(),t=(t-r)/this.#Rn,e=(e-r)/this.#Fn;this.scaleFactor=Math.min(t,e)}#oi(){var t=this.#hi()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+t,this.translationY*this.scaleFactor+t)}static#di(r){var i=new Path2D;for(let t=0,e=r.length;t{Object.defineProperty(e,"__esModule",{value:!0}),e.StampEditor=void 0,r(149),r(152);var a=r(1),i=r(164),n=r(168),o=r(198);class s extends i.AnnotationEditor{#mi=null;#bi=null;#vi=null;#yi=null;#_i=null;#Ai=null;#zn=null;#Si=null;#Ei=!1;#xi=!1;static _type="stamp";constructor(t){super({...t,name:"stampEditor"}),this.#yi=t.bitmapUrl,this.#_i=t.bitmapFile}static initialize(t){i.AnnotationEditor.initialize(t)}static get supportedTypes(){return(0,a.shadow)(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map(t=>"image/"+t))}static get supportedTypesStr(){return(0,a.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(t){return this.supportedTypes.includes(t)}static paste(t,e){e.pasteEditor(a.AnnotationEditorType.STAMP,{bitmapFile:t.getAsFile()})}#wi(t){var e=1this.#wi(t,!0)).finally(()=>this.#Ci());else if(this.#yi){let t=this.#yi;this.#yi=null,this._uiManager.enableWaiting(!0),void(this.#vi=this._uiManager.imageManager.getFromUrl(t).then(t=>this.#wi(t)).finally(()=>this.#Ci()))}else if(this.#_i){let t=this.#_i;this.#_i=null,this._uiManager.enableWaiting(!0),void(this.#vi=this._uiManager.imageManager.getFromFile(t).then(t=>this.#wi(t)).finally(()=>this.#Ci()))}else{let e=document.createElement("input");e.type="file",e.accept=s.supportedTypesStr,this.#vi=new Promise(t=>{e.addEventListener("change",async()=>{if(e.files&&0!==e.files.length){this._uiManager.enableWaiting(!0);let t=await this._uiManager.imageManager.getFromFile(e.files[0]);this.#wi(t)}else this.remove();t()}),e.addEventListener("cancel",()=>{this.remove(),t()})}).finally(()=>this.#Ci()),e.click()}}remove(){this.#bi&&(this.#mi=null,this._uiManager.imageManager.deleteId(this.#bi),this.#Ai?.remove(),this.#Ai=null,this.#zn?.disconnect(),this.#zn=null),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(this.#bi&&this.#Ti(),this.isAttachedToDOM||this.parent.add(this))):this.#bi&&this.#Ti()}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(this.#vi||this.#mi||this.#yi||this.#_i)}get isResizable(){return!0}render(){if(!this.div){let t,e;var r,i;this.width&&(t=this.x,e=this.y),super.render(),this.div.hidden=!0,this.#mi?this.#Kn():this.#Ti(),this.width&&([r,i]=this.parentDimensions,this.setAt(t*r,e*i,this.width*r,this.height*i))}return this.div}#Kn(){let t=this.div,{width:e,height:r}=this.#mi;var[i,s]=this.pageDimensions;if(this.width)e=this.width*i,r=this.height*s;else if(e>.75*i||r>.75*s){let t=Math.min(.75*i/e,.75*s/r);e*=t,r*=t}var[a,n]=this.parentDimensions,a=(this.setDims(e*a/i,r*n/s),this._uiManager.enableWaiting(!1),this.#Ai=document.createElement("canvas"));t.append(a),t.hidden=!1,this.#Pi(e,r),this.#Yn(),this.#xi||(this.parent.addUndoableEditor(this),this.#xi=!0),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()}#ki(t,e){var[r,i]=this.parentDimensions;this.width=t/r,this.height=e/i,this.setDims(t,e),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),(this._initialOptions=null)!==this.#Si&&clearTimeout(this.#Si),this.#Si=setTimeout(()=>{this.#Si=null,this.#Pi(t,e)},200)}#Mi(r,i){let{width:t,height:e}=this.#mi,s=t,a=e,n=this.#mi;for(;s>2*r||a>2*i;){let t=s,e=a;s>2*r&&(s=16384<=s?Math.floor(s/2)-1:Math.ceil(s/2)),a>2*i&&(a=16384<=a?Math.floor(a/2)-1:Math.ceil(a/2));var o=new OffscreenCanvas(s,a);o.getContext("2d").drawImage(n,0,0,t,e,0,0,s,a),n=o.transferToImageBitmap()}return n}#Pi(t,e){t=Math.ceil(t),e=Math.ceil(e);var r,i=this.#Ai;!i||i.width===t&&i.height===e||(i.width=t,i.height=e,r=this.#Ei?this.#mi:this.#Mi(t,e),(i=i.getContext("2d")).filter=this._uiManager.hcmFilter,i.drawImage(r,0,0,r.width,r.height,0,0,t,e))}#Fi(t){if(t){if(this.#Ei){let t=this._uiManager.imageManager.getSvgUrl(this.#bi);if(t)return t}let t=document.createElement("canvas");return{width:t.width,height:t.height}=this.#mi,t.getContext("2d").drawImage(this.#mi,0,0),t.toDataURL()}if(this.#Ei){let[t,e]=this.pageDimensions,r=Math.round(this.width*t*n.PixelsPerInch.PDF_TO_CSS_UNITS),i=Math.round(this.height*e*n.PixelsPerInch.PDF_TO_CSS_UNITS),s=new OffscreenCanvas(r,i);return s.getContext("2d").drawImage(this.#mi,0,0,this.#mi.width,this.#mi.height,0,0,r,i),s.transferToImageBitmap()}return structuredClone(this.#mi)}#Yn(){this.#zn=new ResizeObserver(t=>{t=t[0].contentRect;t.width&&t.height&&this.#ki(t.width,t.height)}),this.#zn.observe(this.div)}static deserialize(t,e,r){var i,s,a,n;return t instanceof o.StampAnnotationElement?null:(e=super.deserialize(t,e,r),{rect:t,bitmapUrl:i,bitmapId:n,isSvg:s,accessibilityData:a}=t,[r,n]=(n&&r.imageManager.isValidId(n)?e.#bi=n:e.#yi=i,e.#Ei=s,e.pageDimensions),e.width=(t[2]-t[0])/r,e.height=(t[3]-t[1])/n,a&&(e.altTextData=a),e)}serialize(){let t=0t.area&&(t.area=i,t.serialized.bitmap.close(),t.serialized.bitmap=this.#Fi(!1))}}else e.stamps.set(this.#bi,{area:i,serialized:r}),r.bitmap=this.#Fi(!1)}}return r}}e.StampEditor=s}],__webpack_module_cache__={};function __w_pdfjs_require__(t){var e=__webpack_module_cache__[t];return void 0!==e||(e=__webpack_module_cache__[t]={exports:{}},__webpack_modules__[t].call(e.exports,e,e.exports,__w_pdfjs_require__)),e.exports}var __webpack_exports__={};return(()=>{var t=__webpack_exports__,e=(Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AbortException",{enumerable:!0,get:function(){return e.AbortException}}),Object.defineProperty(t,"AnnotationEditorLayer",{enumerable:!0,get:function(){return a.AnnotationEditorLayer}}),Object.defineProperty(t,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return e.AnnotationEditorParamsType}}),Object.defineProperty(t,"AnnotationEditorType",{enumerable:!0,get:function(){return e.AnnotationEditorType}}),Object.defineProperty(t,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return n.AnnotationEditorUIManager}}),Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}}),Object.defineProperty(t,"AnnotationMode",{enumerable:!0,get:function(){return e.AnnotationMode}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return e.CMapCompressionType}}),Object.defineProperty(t,"DOMSVGFactory",{enumerable:!0,get:function(){return i.DOMSVGFactory}}),Object.defineProperty(t,"FeatureTest",{enumerable:!0,get:function(){return e.FeatureTest}}),Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(t,"ImageKind",{enumerable:!0,get:function(){return e.ImageKind}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return e.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return e.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return e.OPS}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return i.PDFDateString}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return e.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return e.PermissionFlag}}),Object.defineProperty(t,"PixelsPerInch",{enumerable:!0,get:function(){return i.PixelsPerInch}}),Object.defineProperty(t,"PromiseCapability",{enumerable:!0,get:function(){return e.PromiseCapability}}),Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return i.RenderingCancelledException}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return r.SVGGraphics}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return e.UnexpectedResponseException}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return e.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return e.VerbosityLevel}}),Object.defineProperty(t,"XfaLayer",{enumerable:!0,get:function(){return h.XfaLayer}}),Object.defineProperty(t,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return e.createValidAbsoluteUrl}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return i.getFilenameFromUrl}}),Object.defineProperty(t,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return i.getPdfFilenameFromUrl}}),Object.defineProperty(t,"getXfaPageViewport",{enumerable:!0,get:function(){return i.getXfaPageViewport}}),Object.defineProperty(t,"isDataScheme",{enumerable:!0,get:function(){return i.isDataScheme}}),Object.defineProperty(t,"isPdfFile",{enumerable:!0,get:function(){return i.isPdfFile}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return i.loadScript}}),Object.defineProperty(t,"noContextMenu",{enumerable:!0,get:function(){return i.noContextMenu}}),Object.defineProperty(t,"normalizeUnicode",{enumerable:!0,get:function(){return e.normalizeUnicode}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return s.renderTextLayer}}),Object.defineProperty(t,"setLayerDimensions",{enumerable:!0,get:function(){return i.setLayerDimensions}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return e.shadow}}),Object.defineProperty(t,"updateTextLayer",{enumerable:!0,get:function(){return s.updateTextLayer}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return r.version}}),__w_pdfjs_require__(1)),r=__w_pdfjs_require__(124),i=__w_pdfjs_require__(168),s=__w_pdfjs_require__(195),a=__w_pdfjs_require__(196),n=__w_pdfjs_require__(165),o=__w_pdfjs_require__(198),l=__w_pdfjs_require__(176),h=__w_pdfjs_require__(201)})(),__webpack_exports__})()); \ No newline at end of file +/** + * @licstart The following is the entire license notice for the + * JavaScript code in this page + * + * Copyright 2023 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @licend The above is the entire license notice for the + * JavaScript code in this page + */ +!function webpackUniversalModuleDefinition(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=t.pdfjsLib=e():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],(()=>t.pdfjsLib=e())):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=t.pdfjsLib=e():t["pdfjs-dist/build/pdf"]=t.pdfjsLib=e()}(globalThis,(()=>(()=>{"use strict";var __webpack_modules__=[,(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.VerbosityLevel=e.Util=e.UnknownErrorException=e.UnexpectedResponseException=e.TextRenderingMode=e.RenderingIntentFlag=e.PromiseCapability=e.PermissionFlag=e.PasswordResponses=e.PasswordException=e.PageActionEventType=e.OPS=e.MissingPDFException=e.MAX_IMAGE_SIZE_TO_CACHE=e.LINE_FACTOR=e.LINE_DESCENT_FACTOR=e.InvalidPDFException=e.ImageKind=e.IDENTITY_MATRIX=e.FormatError=e.FeatureTest=e.FONT_IDENTITY_MATRIX=e.DocumentActionEventType=e.CMapCompressionType=e.BaseException=e.BASELINE_FACTOR=e.AnnotationType=e.AnnotationReplyType=e.AnnotationPrefix=e.AnnotationMode=e.AnnotationFlag=e.AnnotationFieldFlag=e.AnnotationEditorType=e.AnnotationEditorPrefix=e.AnnotationEditorParamsType=e.AnnotationBorderStyleType=e.AnnotationActionEventType=e.AbortException=void 0;e.assert=function assert(t,e){t||unreachable(e)};e.bytesToString=bytesToString;e.createValidAbsoluteUrl=function createValidAbsoluteUrl(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(n&&"string"==typeof t){if(n.addDefaultProtocol&&t.startsWith("www.")){const e=t.match(/\./g);e?.length>=2&&(t=`http://${t}`)}if(n.tryConvertEncoding)try{t=stringToUTF8String(t)}catch{}}const i=e?new URL(t,e):new URL(t);if(function _isValidProtocol(t){switch(t?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch{}return null};e.getModificationDate=function getModificationDate(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")].join("")};e.getUuid=function getUuid(){if("undefined"!=typeof crypto&&"function"==typeof crypto?.randomUUID)return crypto.randomUUID();const t=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof crypto?.getRandomValues)crypto.getRandomValues(t);else for(let e=0;e<32;e++)t[e]=Math.floor(255*Math.random());return bytesToString(t)};e.getVerbosityLevel=function getVerbosityLevel(){return s};e.info=function info(t){s>=r.INFOS&&console.log(`Info: ${t}`)};e.isArrayBuffer=function isArrayBuffer(t){return"object"==typeof t&&void 0!==t?.byteLength};e.isArrayEqual=function isArrayEqual(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;ne?e.normalize("NFKC"):h.get(n)))};e.objectFromMap=function objectFromMap(t){const e=Object.create(null);for(const[n,i]of t)e[n]=i;return e};e.objectSize=function objectSize(t){return Object.keys(t).length};e.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(s=t)};e.shadow=shadow;e.string32=function string32(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)};e.stringToBytes=stringToBytes;e.stringToPDFString=function stringToPDFString(t){if(t[0]>="ï"){let e;"þ"===t[0]&&"ÿ"===t[1]?e="utf-16be":"ÿ"===t[0]&&"þ"===t[1]?e="utf-16le":"ï"===t[0]&&"»"===t[1]&&"¿"===t[2]&&(e="utf-8");if(e)try{const n=new TextDecoder(e,{fatal:!0}),i=stringToBytes(t);return n.decode(i)}catch(t){warn(`stringToPDFString: "${t}".`)}}const e=[];for(let n=0,i=t.length;n=r.WARNINGS&&console.log(`Warning: ${t}`)}function unreachable(t){throw new Error(t)}function shadow(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,e,{value:n,enumerable:!i,configurable:!0,writable:!1});return n}const a=function BaseExceptionClosure(){function BaseException(t,e){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=e}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();e.BaseException=a;e.PasswordException=class PasswordException extends a{constructor(t,e){super(t,"PasswordException");this.code=e}};e.UnknownErrorException=class UnknownErrorException extends a{constructor(t,e){super(t,"UnknownErrorException");this.details=e}};e.InvalidPDFException=class InvalidPDFException extends a{constructor(t){super(t,"InvalidPDFException")}};e.MissingPDFException=class MissingPDFException extends a{constructor(t){super(t,"MissingPDFException")}};e.UnexpectedResponseException=class UnexpectedResponseException extends a{constructor(t,e){super(t,"UnexpectedResponseException");this.status=e}};e.FormatError=class FormatError extends a{constructor(t){super(t,"FormatError")}};e.AbortException=class AbortException extends a{constructor(t){super(t,"AbortException")}};function bytesToString(t){"object"==typeof t&&void 0!==t?.length||unreachable("Invalid argument for bytesToString");const e=t.length,n=8192;if(et.toString(16).padStart(2,"0")));e.Util=class Util{static makeHexColor(t,e,n){return`#${o[t]}${o[e]}${o[n]}`}static scaleMinMax(t,e){let n;if(t[0]){if(t[0]<0){n=e[0];e[0]=e[1];e[1]=n}e[0]*=t[0];e[1]*=t[0];if(t[3]<0){n=e[2];e[2]=e[3];e[3]=n}e[2]*=t[3];e[3]*=t[3]}else{n=e[0];e[0]=e[2];e[2]=n;n=e[1];e[1]=e[3];e[3]=n;if(t[1]<0){n=e[2];e[2]=e[3];e[3]=n}e[2]*=t[1];e[3]*=t[1];if(t[2]<0){n=e[0];e[0]=e[1];e[1]=n}e[0]*=t[2];e[1]*=t[2]}e[0]+=t[4];e[1]+=t[4];e[2]+=t[5];e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){return[t[0]*e[0]+t[1]*e[2]+e[4],t[0]*e[1]+t[1]*e[3]+e[5]]}static applyInverseTransform(t,e){const n=e[0]*e[3]-e[1]*e[2];return[(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/n,(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/n]}static getAxialAlignedBoundingBox(t,e){const n=this.applyTransform(t,e),i=this.applyTransform(t.slice(2,4),e),r=this.applyTransform([t[0],t[3]],e),s=this.applyTransform([t[2],t[1]],e);return[Math.min(n[0],i[0],r[0],s[0]),Math.min(n[1],i[1],r[1],s[1]),Math.max(n[0],i[0],r[0],s[0]),Math.max(n[1],i[1],r[1],s[1])]}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t){const e=[t[0],t[2],t[1],t[3]],n=t[0]*e[0]+t[1]*e[2],i=t[0]*e[1]+t[1]*e[3],r=t[2]*e[0]+t[3]*e[2],s=t[2]*e[1]+t[3]*e[3],a=(n+s)/2,o=Math.sqrt((n+s)**2-4*(n*s-r*i))/2,l=a+o||1,c=a-o||1;return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(t){const e=t.slice(0);if(t[0]>t[2]){e[0]=t[2];e[2]=t[0]}if(t[1]>t[3]){e[1]=t[3];e[3]=t[1]}return e}static intersect(t,e){const n=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(n>i)return null;const r=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),s=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return r>s?null:[n,r,i,s]}static bezierBoundingBox(t,e,n,i,r,s,a,o){const l=[],c=[[],[]];let h,d,u,p,f,g,m,b;for(let c=0;c<2;++c){if(0===c){d=6*t-12*n+6*r;h=-3*t+9*n-9*r+3*a;u=3*n-3*t}else{d=6*e-12*i+6*s;h=-3*e+9*i-9*s+3*o;u=3*i-3*e}if(Math.abs(h)<1e-12){if(Math.abs(d)<1e-12)continue;p=-u/d;0{this.resolve=e=>{this.#t=!0;t(e)};this.reject=t=>{this.#t=!0;e(t)}}))}get settled(){return this.#t}};let c=null,h=null;e.AnnotationPrefix="pdfjs_internal_id_"},(t,e,n)=>{var i=n(3),r=n(4),s=n(69),a=n(70),o="WebAssembly",l=r[o],c=7!==Error("e",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(t,e){var n={};n[t]=a(t,e,c);i({global:!0,constructor:!0,arity:1,forced:c},n)},exportWebAssemblyErrorCauseWrapper=function(t,e){if(l&&l[t]){var n={};n[t]=a(o+"."+t,e,c);i({target:o,stat:!0,constructor:!0,arity:1,forced:c},n)}};exportGlobalErrorCauseWrapper("Error",(function(t){return function Error(e){return s(t,this,arguments)}}));exportGlobalErrorCauseWrapper("EvalError",(function(t){return function EvalError(e){return s(t,this,arguments)}}));exportGlobalErrorCauseWrapper("RangeError",(function(t){return function RangeError(e){return s(t,this,arguments)}}));exportGlobalErrorCauseWrapper("ReferenceError",(function(t){return function ReferenceError(e){return s(t,this,arguments)}}));exportGlobalErrorCauseWrapper("SyntaxError",(function(t){return function SyntaxError(e){return s(t,this,arguments)}}));exportGlobalErrorCauseWrapper("TypeError",(function(t){return function TypeError(e){return s(t,this,arguments)}}));exportGlobalErrorCauseWrapper("URIError",(function(t){return function URIError(e){return s(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("CompileError",(function(t){return function CompileError(e){return s(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("LinkError",(function(t){return function LinkError(e){return s(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("RuntimeError",(function(t){return function RuntimeError(e){return s(t,this,arguments)}}))},(t,e,n)=>{var i=n(4),r=n(5).f,s=n(44),a=n(48),o=n(38),l=n(56),c=n(68);t.exports=function(t,e){var n,h,d,u,p,f=t.target,g=t.global,m=t.stat;if(n=g?i:m?i[f]||o(f,{}):(i[f]||{}).prototype)for(h in e){u=e[h];d=t.dontCallGetSet?(p=r(n,h))&&p.value:n[h];if(!c(g?h:f+(m?".":"#")+h,t.forced)&&void 0!==d){if(typeof u==typeof d)continue;l(u,d)}(t.sham||d&&d.sham)&&s(u,"sham",!0);a(n,h,u,t)}}},function(t){var check=function(t){return t&&t.Math===Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},(t,e,n)=>{var i=n(6),r=n(8),s=n(10),a=n(11),o=n(12),l=n(18),c=n(39),h=n(42),d=Object.getOwnPropertyDescriptor;e.f=i?d:function getOwnPropertyDescriptor(t,e){t=o(t);e=l(e);if(h)try{return d(t,e)}catch(t){}if(c(t,e))return a(!r(s.f,t,e),t[e])}},(t,e,n)=>{var i=n(7);t.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},(t,e,n)=>{var i=n(9),r=Function.prototype.call;t.exports=i?r.bind(r):function(){return r.apply(r,arguments)}},(t,e,n)=>{var i=n(7);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},(t,e)=>{var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function propertyIsEnumerable(t){var e=i(this,t);return!!e&&e.enumerable}:n},t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},(t,e,n)=>{var i=n(13),r=n(16);t.exports=function(t){return i(r(t))}},(t,e,n)=>{var i=n(14),r=n(7),s=n(15),a=Object,o=i("".split);t.exports=r((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===s(t)?o(t,""):a(t)}:a},(t,e,n)=>{var i=n(9),r=Function.prototype,s=r.call,a=i&&r.bind.bind(s,s);t.exports=i?a:function(t){return function(){return s.apply(t,arguments)}}},(t,e,n)=>{var i=n(14),r=i({}.toString),s=i("".slice);t.exports=function(t){return s(r(t),8,-1)}},(t,e,n)=>{var i=n(17),r=TypeError;t.exports=function(t){if(i(t))throw r("Can't call method on "+t);return t}},t=>{t.exports=function(t){return null==t}},(t,e,n)=>{var i=n(19),r=n(23);t.exports=function(t){var e=i(t,"string");return r(e)?e:e+""}},(t,e,n)=>{var i=n(8),r=n(20),s=n(23),a=n(30),o=n(33),l=n(34),c=TypeError,h=l("toPrimitive");t.exports=function(t,e){if(!r(t)||s(t))return t;var n,l=a(t,h);if(l){void 0===e&&(e="default");n=i(l,t,e);if(!r(n)||s(n))return n;throw c("Can't convert object to primitive value")}void 0===e&&(e="number");return o(t,e)}},(t,e,n)=>{var i=n(21),r=n(22),s=r.all;t.exports=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===s}:function(t){return"object"==typeof t?null!==t:i(t)}},(t,e,n)=>{var i=n(22),r=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},t=>{var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},(t,e,n)=>{var i=n(24),r=n(21),s=n(25),a=n(26),o=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return r(e)&&s(e.prototype,o(t))}},(t,e,n)=>{var i=n(4),r=n(21);t.exports=function(t,e){return arguments.length<2?(n=i[t],r(n)?n:void 0):i[t]&&i[t][e];var n}},(t,e,n)=>{var i=n(14);t.exports=i({}.isPrototypeOf)},(t,e,n)=>{var i=n(27);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,e,n)=>{var i=n(28),r=n(7),s=n(4).String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},(t,e,n)=>{var i,r,s=n(4),a=n(29),o=s.process,l=s.Deno,c=o&&o.versions||l&&l.version,h=c&&c.v8;h&&(r=(i=h.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1]));!r&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(r=+i[1]);t.exports=r},t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(t,e,n)=>{var i=n(31),r=n(17);t.exports=function(t,e){var n=t[e];return r(n)?void 0:i(n)}},(t,e,n)=>{var i=n(21),r=n(32),s=TypeError;t.exports=function(t){if(i(t))return t;throw s(r(t)+" is not a function")}},t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},(t,e,n)=>{var i=n(8),r=n(21),s=n(20),a=TypeError;t.exports=function(t,e){var n,o;if("string"===e&&r(n=t.toString)&&!s(o=i(n,t)))return o;if(r(n=t.valueOf)&&!s(o=i(n,t)))return o;if("string"!==e&&r(n=t.toString)&&!s(o=i(n,t)))return o;throw a("Can't convert object to primitive value")}},(t,e,n)=>{var i=n(4),r=n(35),s=n(39),a=n(41),o=n(27),l=n(26),c=i.Symbol,h=r("wks"),d=l?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){s(h,t)||(h[t]=o&&s(c,t)?c[t]:d("Symbol."+t));return h[t]}},(t,e,n)=>{var i=n(36),r=n(37);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.32.2",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE",source:"https://github.com/zloirock/core-js"})},t=>{t.exports=!1},(t,e,n)=>{var i=n(4),r=n(38),s="__core-js_shared__",a=i[s]||r(s,{});t.exports=a},(t,e,n)=>{var i=n(4),r=Object.defineProperty;t.exports=function(t,e){try{r(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},(t,e,n)=>{var i=n(14),r=n(40),s=i({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,e){return s(r(t),e)}},(t,e,n)=>{var i=n(16),r=Object;t.exports=function(t){return r(i(t))}},(t,e,n)=>{var i=n(14),r=0,s=Math.random(),a=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++r+s,36)}},(t,e,n)=>{var i=n(6),r=n(7),s=n(43);t.exports=!i&&!r((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},(t,e,n)=>{var i=n(4),r=n(20),s=i.document,a=r(s)&&r(s.createElement);t.exports=function(t){return a?s.createElement(t):{}}},(t,e,n)=>{var i=n(6),r=n(45),s=n(11);t.exports=i?function(t,e,n){return r.f(t,e,s(1,n))}:function(t,e,n){t[e]=n;return t}},(t,e,n)=>{var i=n(6),r=n(42),s=n(46),a=n(47),o=n(18),l=TypeError,c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,d="enumerable",u="configurable",p="writable";e.f=i?s?function defineProperty(t,e,n){a(t);e=o(e);a(n);if("function"==typeof t&&"prototype"===e&&"value"in n&&p in n&&!n[p]){var i=h(t,e);if(i&&i[p]){t[e]=n.value;n={configurable:u in n?n[u]:i[u],enumerable:d in n?n[d]:i[d],writable:!1}}}return c(t,e,n)}:c:function defineProperty(t,e,n){a(t);e=o(e);a(n);if(r)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw l("Accessors not supported");"value"in n&&(t[e]=n.value);return t}},(t,e,n)=>{var i=n(6),r=n(7);t.exports=i&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(t,e,n)=>{var i=n(20),r=String,s=TypeError;t.exports=function(t){if(i(t))return t;throw s(r(t)+" is not an object")}},(t,e,n)=>{var i=n(21),r=n(45),s=n(49),a=n(38);t.exports=function(t,e,n,o){o||(o={});var l=o.enumerable,c=void 0!==o.name?o.name:e;i(n)&&s(n,c,o);if(o.global)l?t[e]=n:a(e,n);else{try{o.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:r.f(t,e,{value:n,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return t}},(t,e,n)=>{var i=n(14),r=n(7),s=n(21),a=n(39),o=n(6),l=n(50).CONFIGURABLE,c=n(51),h=n(52),d=h.enforce,u=h.get,p=String,f=Object.defineProperty,g=i("".slice),m=i("".replace),b=i([].join),v=o&&!r((function(){return 8!==f((function(){}),"length",{value:8}).length})),y=String(String).split("String"),_=t.exports=function(t,e,n){"Symbol("===g(p(e),0,7)&&(e="["+m(p(e),/^Symbol\(([^)]*)\)/,"$1")+"]");n&&n.getter&&(e="get "+e);n&&n.setter&&(e="set "+e);(!a(t,"name")||l&&t.name!==e)&&(o?f(t,"name",{value:e,configurable:!0}):t.name=e);v&&n&&a(n,"arity")&&t.length!==n.arity&&f(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?o&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=d(t);a(i,"source")||(i.source=b(y,"string"==typeof e?e:""));return t};Function.prototype.toString=_((function toString(){return s(this)&&u(this).source||c(this)}),"toString")},(t,e,n)=>{var i=n(6),r=n(39),s=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,o=r(s,"name"),l=o&&"something"===function something(){}.name,c=o&&(!i||i&&a(s,"name").configurable);t.exports={EXISTS:o,PROPER:l,CONFIGURABLE:c}},(t,e,n)=>{var i=n(14),r=n(21),s=n(37),a=i(Function.toString);r(s.inspectSource)||(s.inspectSource=function(t){return a(t)});t.exports=s.inspectSource},(t,e,n)=>{var i,r,s,a=n(53),o=n(4),l=n(20),c=n(44),h=n(39),d=n(37),u=n(54),p=n(55),f="Object already initialized",g=o.TypeError,m=o.WeakMap;if(a||d.state){var b=d.state||(d.state=new m);b.get=b.get;b.has=b.has;b.set=b.set;i=function(t,e){if(b.has(t))throw g(f);e.facade=t;b.set(t,e);return e};r=function(t){return b.get(t)||{}};s=function(t){return b.has(t)}}else{var v=u("state");p[v]=!0;i=function(t,e){if(h(t,v))throw g(f);e.facade=t;c(t,v,e);return e};r=function(t){return h(t,v)?t[v]:{}};s=function(t){return h(t,v)}}t.exports={set:i,get:r,has:s,enforce:function(t){return s(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=r(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}}}},(t,e,n)=>{var i=n(4),r=n(21),s=i.WeakMap;t.exports=r(s)&&/native code/.test(String(s))},(t,e,n)=>{var i=n(35),r=n(41),s=i("keys");t.exports=function(t){return s[t]||(s[t]=r(t))}},t=>{t.exports={}},(t,e,n)=>{var i=n(39),r=n(57),s=n(5),a=n(45);t.exports=function(t,e,n){for(var o=r(e),l=a.f,c=s.f,h=0;h{var i=n(24),r=n(14),s=n(58),a=n(67),o=n(47),l=r([].concat);t.exports=i("Reflect","ownKeys")||function ownKeys(t){var e=s.f(o(t)),n=a.f;return n?l(e,n(t)):e}},(t,e,n)=>{var i=n(59),r=n(66).concat("length","prototype");e.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return i(t,r)}},(t,e,n)=>{var i=n(14),r=n(39),s=n(12),a=n(60).indexOf,o=n(55),l=i([].push);t.exports=function(t,e){var n,i=s(t),c=0,h=[];for(n in i)!r(o,n)&&r(i,n)&&l(h,n);for(;e.length>c;)r(i,n=e[c++])&&(~a(h,n)||l(h,n));return h}},(t,e,n)=>{var i=n(12),r=n(61),s=n(64),createMethod=function(t){return function(e,n,a){var o,l=i(e),c=s(l),h=r(a,c);if(t&&n!=n){for(;c>h;)if((o=l[h++])!=o)return!0}else for(;c>h;h++)if((t||h in l)&&l[h]===n)return t||h||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(t,e,n)=>{var i=n(62),r=Math.max,s=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):s(n,e)}},(t,e,n)=>{var i=n(63);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},t=>{var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function trunc(t){var i=+t;return(i>0?n:e)(i)}},(t,e,n)=>{var i=n(65);t.exports=function(t){return i(t.length)}},(t,e,n)=>{var i=n(62),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,e)=>{e.f=Object.getOwnPropertySymbols},(t,e,n)=>{var i=n(7),r=n(21),s=/#|\.prototype\./,isForced=function(t,e){var n=o[a(t)];return n===c||n!==l&&(r(e)?i(e):!!e)},a=isForced.normalize=function(t){return String(t).replace(s,".").toLowerCase()},o=isForced.data={},l=isForced.NATIVE="N",c=isForced.POLYFILL="P";t.exports=isForced},(t,e,n)=>{var i=n(9),r=Function.prototype,s=r.apply,a=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?a.bind(s):function(){return a.apply(s,arguments)})},(t,e,n)=>{var i=n(24),r=n(39),s=n(44),a=n(25),o=n(71),l=n(56),c=n(74),h=n(75),d=n(76),u=n(80),p=n(81),f=n(6),g=n(36);t.exports=function(t,e,n,m){var b="stackTraceLimit",v=m?2:1,y=t.split("."),_=y[y.length-1],A=i.apply(null,y);if(A){var S=A.prototype;!g&&r(S,"cause")&&delete S.cause;if(!n)return A;var E=i("Error"),x=e((function(t,e){var n=d(m?e:t,void 0),i=m?new A(t):new A;void 0!==n&&s(i,"message",n);p(i,x,i.stack,2);this&&a(S,this)&&h(i,this,x);arguments.length>v&&u(i,arguments[v]);return i}));x.prototype=S;if("Error"!==_)o?o(x,E):l(x,E,{name:!0});else if(f&&b in A){c(x,A,b);c(x,A,"prepareStackTrace")}l(x,A);if(!g)try{S.name!==_&&s(S,"name",_);S.constructor=x}catch(t){}return x}}},(t,e,n)=>{var i=n(72),r=n(47),s=n(73);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=i(Object.prototype,"__proto__","set"))(n,[]);e=n instanceof Array}catch(t){}return function setPrototypeOf(n,i){r(n);s(i);e?t(n,i):n.__proto__=i;return n}}():void 0)},(t,e,n)=>{var i=n(14),r=n(31);t.exports=function(t,e,n){try{return i(r(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},(t,e,n)=>{var i=n(21),r=String,s=TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw s("Can't set "+r(t)+" as a prototype")}},(t,e,n)=>{var i=n(45).f;t.exports=function(t,e,n){n in t||i(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},(t,e,n)=>{var i=n(21),r=n(20),s=n(71);t.exports=function(t,e,n){var a,o;s&&i(a=e.constructor)&&a!==n&&r(o=a.prototype)&&o!==n.prototype&&s(t,o);return t}},(t,e,n)=>{var i=n(77);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},(t,e,n)=>{var i=n(78),r=String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return r(t)}},(t,e,n)=>{var i=n(79),r=n(21),s=n(15),a=n(34)("toStringTag"),o=Object,l="Arguments"===s(function(){return arguments}());t.exports=i?s:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=o(t),a))?n:l?s(e):"Object"===(i=s(e))&&r(e.callee)?"Arguments":i}},(t,e,n)=>{var i={};i[n(34)("toStringTag")]="z";t.exports="[object z]"===String(i)},(t,e,n)=>{var i=n(20),r=n(44);t.exports=function(t,e){i(e)&&"cause"in e&&r(t,"cause",e.cause)}},(t,e,n)=>{var i=n(44),r=n(82),s=n(83),a=Error.captureStackTrace;t.exports=function(t,e,n,o){s&&(a?a(t,e):i(t,"stack",r(n,o)))}},(t,e,n)=>{var i=n(14),r=Error,s=i("".replace),a=String(r("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,l=o.test(a);t.exports=function(t,e){if(l&&"string"==typeof t&&!r.prepareStackTrace)for(;e--;)t=s(t,o,"");return t}},(t,e,n)=>{var i=n(7),r=n(11);t.exports=!i((function(){var t=Error("a");if(!("stack"in t))return!0;Object.defineProperty(t,"stack",r(1,7));return 7!==t.stack}))},(t,e,n)=>{var i=n(48),r=n(14),s=n(77),a=n(85),o=URLSearchParams,l=o.prototype,c=r(l.append),h=r(l.delete),d=r(l.forEach),u=r([].push),p=new o("a=1&a=2&b=3");p.delete("a",1);p.delete("b",void 0);p+""!="a=2"&&i(l,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return h(this,t);var i=[];d(this,(function(t,e){u(i,{key:e,value:t})}));a(e,1);for(var r,o=s(t),l=s(n),p=0,f=0,g=!1,m=i.length;p{var e=TypeError;t.exports=function(t,n){if(t{var i=n(48),r=n(14),s=n(77),a=n(85),o=URLSearchParams,l=o.prototype,c=r(l.getAll),h=r(l.has),d=new o("a=1");!d.has("a",2)&&d.has("a",void 0)||i(l,"has",(function has(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return h(this,t);var i=c(this,t);a(e,1);for(var r=s(n),o=0;o{var i=n(6),r=n(14),s=n(88),a=URLSearchParams.prototype,o=r(a.forEach);i&&!("size"in a)&&s(a,"size",{get:function size(){var t=0;o(this,(function(){t++}));return t},configurable:!0,enumerable:!0})},(t,e,n)=>{var i=n(49),r=n(45);t.exports=function(t,e,n){n.get&&i(n.get,e,{getter:!0});n.set&&i(n.set,e,{setter:!0});return r.f(t,e,n)}},(t,e,n)=>{var i=n(3),r=n(40),s=n(64),a=n(90),o=n(92);i({target:"Array",proto:!0,arity:1,forced:n(7)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function push(t){var e=r(this),n=s(e),i=arguments.length;o(n+i);for(var l=0;l{var i=n(6),r=n(91),s=TypeError,a=Object.getOwnPropertyDescriptor,o=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=o?function(t,e){if(r(t)&&!a(t,"length").writable)throw s("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},(t,e,n)=>{var i=n(15);t.exports=Array.isArray||function isArray(t){return"Array"===i(t)}},t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},(t,e,n)=>{var i=n(94),r=n(98).findLast,s=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLast",(function findLast(t){return r(s(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,e,n)=>{var i,r,s,a=n(95),o=n(6),l=n(4),c=n(21),h=n(20),d=n(39),u=n(78),p=n(32),f=n(44),g=n(48),m=n(88),b=n(25),v=n(96),y=n(71),_=n(34),A=n(41),S=n(52),E=S.enforce,x=S.get,w=l.Int8Array,C=w&&w.prototype,T=l.Uint8ClampedArray,P=T&&T.prototype,k=w&&v(w),M=C&&v(C),R=Object.prototype,D=l.TypeError,I=_("toStringTag"),O=A("TYPED_ARRAY_TAG"),L="TypedArrayConstructor",N=a&&!!y&&"Opera"!==u(l.opera),B=!1,j={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(t){var e=v(t);if(h(e)){var n=x(e);return n&&d(n,L)?n[L]:getTypedArrayConstructor(e)}},isTypedArray=function(t){if(!h(t))return!1;var e=u(t);return d(j,e)||d(U,e)};for(i in j)(s=(r=l[i])&&r.prototype)?E(s)[L]=r:N=!1;for(i in U)(s=(r=l[i])&&r.prototype)&&(E(s)[L]=r);if(!N||!c(k)||k===Function.prototype){k=function TypedArray(){throw D("Incorrect invocation")};if(N)for(i in j)l[i]&&y(l[i],k)}if(!N||!M||M===R){M=k.prototype;if(N)for(i in j)l[i]&&y(l[i].prototype,M)}N&&v(P)!==M&&y(P,M);if(o&&!d(M,I)){B=!0;m(M,I,{configurable:!0,get:function(){return h(this)?this[O]:void 0}});for(i in j)l[i]&&f(l[i],O,i)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:B&&O,aTypedArray:function(t){if(isTypedArray(t))return t;throw D("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!y||b(k,t)))return t;throw D(p(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,i){if(o){if(n)for(var r in j){var s=l[r];if(s&&d(s.prototype,t))try{delete s.prototype[t]}catch(n){try{s.prototype[t]=e}catch(t){}}}M[t]&&!n||g(M,t,n?e:N&&C[t]||e,i)}},exportTypedArrayStaticMethod:function(t,e,n){var i,r;if(o){if(y){if(n)for(i in j)if((r=l[i])&&d(r,t))try{delete r[t]}catch(t){}if(k[t]&&!n)return;try{return g(k,t,n?e:N&&k[t]||e)}catch(t){}}for(i in j)!(r=l[i])||r[t]&&!n||g(r,t,e)}},getTypedArrayConstructor:getTypedArrayConstructor,isView:function isView(t){if(!h(t))return!1;var e=u(t);return"DataView"===e||d(j,e)||d(U,e)},isTypedArray:isTypedArray,TypedArray:k,TypedArrayPrototype:M}},t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(t,e,n)=>{var i=n(39),r=n(21),s=n(40),a=n(54),o=n(97),l=a("IE_PROTO"),c=Object,h=c.prototype;t.exports=o?c.getPrototypeOf:function(t){var e=s(t);if(i(e,l))return e[l];var n=e.constructor;return r(n)&&e instanceof n?n.prototype:e instanceof c?h:null}},(t,e,n)=>{var i=n(7);t.exports=!i((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},(t,e,n)=>{var i=n(99),r=n(13),s=n(40),a=n(64),createMethod=function(t){var e=1===t;return function(n,o,l){for(var c,h=s(n),d=r(h),u=i(o,l),p=a(d);p-- >0;)if(u(c=d[p],p,h))switch(t){case 0:return c;case 1:return p}return e?-1:void 0}};t.exports={findLast:createMethod(0),findLastIndex:createMethod(1)}},(t,e,n)=>{var i=n(100),r=n(31),s=n(9),a=i(i.bind);t.exports=function(t,e){r(t);return void 0===e?t:s?a(t,e):function(){return t.apply(e,arguments)}}},(t,e,n)=>{var i=n(15),r=n(14);t.exports=function(t){if("Function"===i(t))return r(t)}},(t,e,n)=>{var i=n(94),r=n(98).findLastIndex,s=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLastIndex",(function findLastIndex(t){return r(s(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,e,n)=>{var i=n(4),r=n(8),s=n(94),a=n(64),o=n(103),l=n(40),c=n(7),h=i.RangeError,d=i.Int8Array,u=d&&d.prototype,p=u&&u.set,f=s.aTypedArray,g=s.exportTypedArrayMethod,m=!c((function(){var t=new Uint8ClampedArray(2);r(p,t,{length:1,0:3},1);return 3!==t[1]})),b=m&&s.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new d(2);t.set(1);t.set("2",1);return 0!==t[0]||2!==t[1]}));g("set",(function set(t){f(this);var e=o(arguments.length>1?arguments[1]:void 0,1),n=l(t);if(m)return r(p,this,n,e);var i=this.length,s=a(n),c=0;if(s+e>i)throw h("Wrong length");for(;c{var i=n(104),r=RangeError;t.exports=function(t,e){var n=i(t);if(n%e)throw r("Wrong offset");return n}},(t,e,n)=>{var i=n(62),r=RangeError;t.exports=function(t){var e=i(t);if(e<0)throw r("The argument can't be less than 0");return e}},(t,e,n)=>{var i=n(106),r=n(94),s=r.aTypedArray,a=r.exportTypedArrayMethod,o=r.getTypedArrayConstructor;a("toReversed",(function toReversed(){return i(s(this),o(this))}))},(t,e,n)=>{var i=n(64);t.exports=function(t,e){for(var n=i(t),r=new e(n),s=0;s{var i=n(94),r=n(14),s=n(31),a=n(108),o=i.aTypedArray,l=i.getTypedArrayConstructor,c=i.exportTypedArrayMethod,h=r(i.TypedArrayPrototype.sort);c("toSorted",(function toSorted(t){void 0!==t&&s(t);var e=o(this),n=a(l(e),e);return h(n,t)}))},(t,e,n)=>{var i=n(64);t.exports=function(t,e){for(var n=0,r=i(e),s=new t(r);r>n;)s[n]=e[n++];return s}},(t,e,n)=>{var i=n(110),r=n(94),s=n(111),a=n(62),o=n(112),l=r.aTypedArray,c=r.getTypedArrayConstructor,h=r.exportTypedArrayMethod,d=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();h("with",{with:function(t,e){var n=l(this),r=a(t),h=s(n)?o(e):+e;return i(n,c(n),r,h)}}.with,!d)},(t,e,n)=>{var i=n(64),r=n(62),s=RangeError;t.exports=function(t,e,n,a){var o=i(t),l=r(n),c=l<0?o+l:l;if(c>=o||c<0)throw s("Incorrect index");for(var h=new e(o),d=0;d{var i=n(78);t.exports=function(t){var e=i(t);return"BigInt64Array"===e||"BigUint64Array"===e}},(t,e,n)=>{var i=n(19),r=TypeError;t.exports=function(t){var e=i(t,"number");if("number"==typeof e)throw r("Can't convert number to bigint");return BigInt(e)}},(t,e,n)=>{var i=n(6),r=n(88),s=n(114),a=ArrayBuffer.prototype;i&&!("detached"in a)&&r(a,"detached",{configurable:!0,get:function detached(){return s(this)}})},(t,e,n)=>{var i=n(14),r=n(115),s=i(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==r(t))return!1;try{s(t,0,0);return!1}catch(t){return!0}}},(t,e,n)=>{var i=n(72),r=n(15),s=TypeError;t.exports=i(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==r(t))throw s("ArrayBuffer expected");return t.byteLength}},(t,e,n)=>{var i=n(3),r=n(117);r&&i({target:"ArrayBuffer",proto:!0},{transfer:function transfer(){return r(this,arguments.length?arguments[0]:void 0,!0)}})},(t,e,n)=>{var i=n(4),r=n(14),s=n(72),a=n(118),o=n(114),l=n(115),c=n(119),h=i.TypeError,d=i.structuredClone,u=i.ArrayBuffer,p=i.DataView,f=Math.min,g=u.prototype,m=p.prototype,b=r(g.slice),v=s(g,"resizable","get"),y=s(g,"maxByteLength","get"),_=r(m.getInt8),A=r(m.setInt8);t.exports=c&&function(t,e,n){var i=l(t),r=void 0===e?i:a(e),s=!v||!v(t);if(o(t))throw h("ArrayBuffer is detached");var c=d(t,{transfer:[t]});if(i===r&&(n||s))return c;if(i>=r&&(!n||s))return b(c,0,r);for(var g=n&&!s&&y?{maxByteLength:y(c)}:void 0,m=new u(r,g),S=new p(c),E=new p(m),x=f(r,i),w=0;w{var i=n(62),r=n(65),s=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw s("Wrong length or index");return n}},(t,e,n)=>{var i=n(4),r=n(7),s=n(28),a=n(120),o=n(121),l=n(122),c=i.structuredClone;t.exports=!!c&&!r((function(){if(o&&s>92||l&&s>94||a&&s>97)return!1;var t=new ArrayBuffer(8),e=c(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength}))},(t,e,n)=>{var i=n(121),r=n(122);t.exports=!i&&!r&&"object"==typeof window&&"object"==typeof document},t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},(t,e,n)=>{var i=n(4),r=n(15);t.exports="process"===r(i.process)},(t,e,n)=>{var i=n(3),r=n(117);r&&i({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function transferToFixedLength(){return r(this,arguments.length?arguments[0]:void 0,!1)}})},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0});exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0;Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}});exports.build=void 0;exports.getDocument=getDocument;exports.version=void 0;__w_pdfjs_require__(84);__w_pdfjs_require__(86);__w_pdfjs_require__(87);__w_pdfjs_require__(2);__w_pdfjs_require__(93);__w_pdfjs_require__(101);__w_pdfjs_require__(102);__w_pdfjs_require__(105);__w_pdfjs_require__(107);__w_pdfjs_require__(109);__w_pdfjs_require__(113);__w_pdfjs_require__(116);__w_pdfjs_require__(123);__w_pdfjs_require__(89);__w_pdfjs_require__(125);__w_pdfjs_require__(136);__w_pdfjs_require__(138);__w_pdfjs_require__(141);__w_pdfjs_require__(143);__w_pdfjs_require__(145);__w_pdfjs_require__(147);__w_pdfjs_require__(149);__w_pdfjs_require__(152);var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(163),_display_utils=__w_pdfjs_require__(168),_font_loader=__w_pdfjs_require__(171),_displayNode_utils=__w_pdfjs_require__(172),_canvas=__w_pdfjs_require__(173),_worker_options=__w_pdfjs_require__(176),_message_handler=__w_pdfjs_require__(177),_metadata=__w_pdfjs_require__(178),_optional_content_config=__w_pdfjs_require__(179),_transport_stream=__w_pdfjs_require__(180),_displayFetch_stream=__w_pdfjs_require__(181),_displayNetwork=__w_pdfjs_require__(184),_displayNode_stream=__w_pdfjs_require__(185),_displaySvg=__w_pdfjs_require__(186),_xfa_text=__w_pdfjs_require__(194);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;const DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;const DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;const DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(t){"string"==typeof t||t instanceof URL?t={url:t}:(0,_util.isArrayBuffer)(t)&&(t={data:t});if("object"!=typeof t)throw new Error("Invalid parameter in getDocument, need parameter object.");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const e=new PDFDocumentLoadingTask,{docId:n}=e,i=t.url?getUrlProp(t.url):null,r=t.data?getDataProp(t.data):null,s=t.httpHeaders||null,a=!0===t.withCredentials,o=t.password??null,l=t.range instanceof PDFDataRangeTransport?t.range:null,c=Number.isInteger(t.rangeChunkSize)&&t.rangeChunkSize>0?t.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let h=t.worker instanceof PDFWorker?t.worker:null;const d=t.verbosity,u="string"!=typeof t.docBaseUrl||(0,_display_utils.isDataScheme)(t.docBaseUrl)?null:t.docBaseUrl,p="string"==typeof t.cMapUrl?t.cMapUrl:null,f=!1!==t.cMapPacked,g=t.CMapReaderFactory||DefaultCMapReaderFactory,m="string"==typeof t.standardFontDataUrl?t.standardFontDataUrl:null,b=t.StandardFontDataFactory||DefaultStandardFontDataFactory,v=!0!==t.stopAtErrors,y=Number.isInteger(t.maxImageSize)&&t.maxImageSize>-1?t.maxImageSize:-1,_=!1!==t.isEvalSupported,A="boolean"==typeof t.isOffscreenCanvasSupported?t.isOffscreenCanvasSupported:!_util.isNodeJS,S=Number.isInteger(t.canvasMaxAreaInBytes)?t.canvasMaxAreaInBytes:-1,E="boolean"==typeof t.disableFontFace?t.disableFontFace:_util.isNodeJS,x=!0===t.fontExtraProperties,w=!0===t.enableXfa,C=t.ownerDocument||globalThis.document,T=!0===t.disableRange,P=!0===t.disableStream,k=!0===t.disableAutoFetch,M=!0===t.pdfBug,R=l?l.length:t.length??NaN,D="boolean"==typeof t.useSystemFonts?t.useSystemFonts:!_util.isNodeJS&&!E,I="boolean"==typeof t.useWorkerFetch?t.useWorkerFetch:g===_display_utils.DOMCMapReaderFactory&&b===_display_utils.DOMStandardFontDataFactory&&p&&m&&(0,_display_utils.isValidFetchUrl)(p,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(m,document.baseURI),O=t.canvasFactory||new DefaultCanvasFactory({ownerDocument:C}),L=t.filterFactory||new DefaultFilterFactory({docId:n,ownerDocument:C});(0,_util.setVerbosityLevel)(d);const N={canvasFactory:O,filterFactory:L};if(!I){N.cMapReaderFactory=new g({baseUrl:p,isCompressed:f});N.standardFontDataFactory=new b({baseUrl:m})}if(!h){const t={verbosity:d,port:_worker_options.GlobalWorkerOptions.workerPort};h=t.port?PDFWorker.fromPort(t):new PDFWorker(t);e._worker=h}const B={docId:n,apiVersion:"3.11.174",data:r,password:o,disableAutoFetch:k,rangeChunkSize:c,length:R,docBaseUrl:u,enableXfa:w,evaluatorOptions:{maxImageSize:y,disableFontFace:E,ignoreErrors:v,isEvalSupported:_,isOffscreenCanvasSupported:A,canvasMaxAreaInBytes:S,fontExtraProperties:x,useSystemFonts:D,cMapUrl:I?p:null,standardFontDataUrl:I?m:null}},j={ignoreErrors:v,isEvalSupported:_,disableFontFace:E,fontExtraProperties:x,enableXfa:w,ownerDocument:C,disableAutoFetch:k,pdfBug:M,styleElement:null};h.promise.then((function(){if(e.destroyed)throw new Error("Loading aborted");const t=_fetchDocument(h,B),o=new Promise((function(t){let e;if(l)e=new _transport_stream.PDFDataTransportStream({length:R,initialData:l.initialData,progressiveDone:l.progressiveDone,contentDispositionFilename:l.contentDispositionFilename,disableRange:T,disableStream:P},l);else if(!r){e=(t=>_util.isNodeJS?new _displayNode_stream.PDFNodeStream(t):(0,_display_utils.isValidFetchUrl)(t.url)?new _displayFetch_stream.PDFFetchStream(t):new _displayNetwork.PDFNetworkStream(t))({url:i,length:R,httpHeaders:s,withCredentials:a,rangeChunkSize:c,disableRange:T,disableStream:P})}t(e)}));return Promise.all([t,o]).then((function(t){let[i,r]=t;if(e.destroyed)throw new Error("Loading aborted");const s=new _message_handler.MessageHandler(n,i,h.port),a=new WorkerTransport(s,e,r,j,N);e._transport=a;s.send("Ready",null)}))})).catch(e._capability.reject);return e}async function _fetchDocument(t,e){if(t.destroyed)throw new Error("Worker was destroyed");const n=await t.messageHandler.sendWithPromise("GetDocRequest",e,e.data?[e.data.buffer]:null);if(t.destroyed)throw new Error("Worker was destroyed");return n}function getUrlProp(t){if(t instanceof URL)return t.href;try{return new URL(t,window.location).href}catch{if(_util.isNodeJS&&"string"==typeof t)return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(t){if(_util.isNodeJS&&"undefined"!=typeof Buffer&&t instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if("string"==typeof t)return(0,_util.stringToBytes)(t);if("object"==typeof t&&!isNaN(t?.length)||(0,_util.isArrayBuffer)(t))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}class PDFDocumentLoadingTask{static#e=0;constructor(){this._capability=new _util.PromiseCapability;this._transport=null;this._worker=null;this.docId="d"+PDFDocumentLoadingTask.#e++;this.destroyed=!1;this.onPassword=null;this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0);await(this._transport?.destroy())}catch(t){this._worker?.port&&delete this._worker._pendingDestroy;throw t}this._transport=null;if(this._worker){this._worker.destroy();this._worker=null}}}exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.length=t;this.initialData=e;this.progressiveDone=n;this.contentDispositionFilename=i;this._rangeListeners=[];this._progressListeners=[];this._progressiveReadListeners=[];this._progressiveDoneListeners=[];this._readyCapability=new _util.PromiseCapability}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,e){for(const n of this._rangeListeners)n(t,e)}onDataProgress(t,e){this._readyCapability.promise.then((()=>{for(const n of this._progressListeners)n(t,e)}))}onDataProgressiveRead(t){this._readyCapability.promise.then((()=>{for(const e of this._progressiveReadListeners)e(t)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const t of this._progressiveDoneListeners)t()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(t,e){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(t,e){this._pdfInfo=t;this._transport=e;Object.defineProperty(this,"getJavaScript",{value:()=>{(0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead.");return this.getJSActions().then((t=>{if(!t)return t;const e=[];for(const n in t)e.push(...t[n]);return e}))}})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{#n=null;#i=!1;constructor(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._pageIndex=t;this._pageInfo=e;this._transport=n;this._stats=i?new _display_utils.StatTimer:null;this._pdfBug=i;this.commonObjs=n.commonObjs;this.objs=new PDFObjects;this._maybeCleanupAfterRender=!1;this._intentStates=new Map;this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){let{scale:t,rotation:e=this.rotate,offsetX:n=0,offsetY:i=0,dontFlip:r=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:e,offsetX:n,offsetY:i,dontFlip:r})}getAnnotations(){let{intent:t="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render(t){let{canvasContext:e,viewport:n,intent:i="display",annotationMode:r=_util.AnnotationMode.ENABLE,transform:s=null,background:a=null,optionalContentConfigPromise:o=null,annotationCanvasMap:l=null,pageColors:c=null,printAnnotationStorage:h=null}=t;this._stats?.time("Overall");const d=this._transport.getRenderingIntent(i,r,h);this.#i=!1;this.#r();o||(o=this._transport.getOptionalContentConfig());let u=this._intentStates.get(d.cacheKey);if(!u){u=Object.create(null);this._intentStates.set(d.cacheKey,u)}if(u.streamReaderCancelTimeout){clearTimeout(u.streamReaderCancelTimeout);u.streamReaderCancelTimeout=null}const p=!!(d.renderingIntent&_util.RenderingIntentFlag.PRINT);if(!u.displayReadyCapability){u.displayReadyCapability=new _util.PromiseCapability;u.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null};this._stats?.time("Page Request");this._pumpOperatorList(d)}const complete=t=>{u.renderTasks.delete(f);(this._maybeCleanupAfterRender||p)&&(this.#i=!0);this.#s(!p);if(t){f.capability.reject(t);this._abortOperatorList({intentState:u,reason:t instanceof Error?t:new Error(t)})}else f.capability.resolve();this._stats?.timeEnd("Rendering");this._stats?.timeEnd("Overall")},f=new InternalRenderTask({callback:complete,params:{canvasContext:e,viewport:n,transform:s,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:u.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!p,pdfBug:this._pdfBug,pageColors:c});(u.renderTasks||=new Set).add(f);const g=f.task;Promise.all([u.displayReadyCapability.promise,o]).then((t=>{let[e,n]=t;if(this.destroyed)complete();else{this._stats?.time("Rendering");f.initializeGraphics({transparency:e,optionalContentConfig:n});f.operatorListChanged()}})).catch(complete);return g}getOperatorList(){let{intent:t="display",annotationMode:e=_util.AnnotationMode.ENABLE,printAnnotationStorage:n=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=this._transport.getRenderingIntent(t,e,n,!0);let r,s=this._intentStates.get(i.cacheKey);if(!s){s=Object.create(null);this._intentStates.set(i.cacheKey,s)}if(!s.opListReadCapability){r=Object.create(null);r.operatorListChanged=function operatorListChanged(){if(s.operatorList.lastChunk){s.opListReadCapability.resolve(s.operatorList);s.renderTasks.delete(r)}};s.opListReadCapability=new _util.PromiseCapability;(s.renderTasks||=new Set).add(r);s.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null};this._stats?.time("Page Request");this._pumpOperatorList(i)}return s.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:t=!1,disableNormalization:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===t,disableNormalization:!0===e},{highWaterMark:100,size:t=>t.items.length})}getTextContent(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((t=>_xfa_text.XfaText.textContent(t)));const e=this.streamTextContent(t);return new Promise((function(t,n){const i=e.getReader(),r={items:[],styles:Object.create(null)};!function pump(){i.read().then((function(e){let{value:n,done:i}=e;if(i)t(r);else{Object.assign(r.styles,n.styles);r.items.push(...n.items);pump()}}),n)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values()){this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0});if(!e.opListReadCapability)for(const n of e.renderTasks){t.push(n.completed);n.cancel()}}this.objs.clear();this.#i=!1;this.#r();return Promise.all(t)}cleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.#i=!0;const e=this.#s(!1);t&&e&&(this._stats&&=new _display_utils.StatTimer);return e}#s(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.#r();if(!this.#i||this.destroyed)return!1;if(t){this.#n=setTimeout((()=>{this.#n=null;this.#s(!1)}),DELAYED_CLEANUP_TIMEOUT);return!1}for(const{renderTasks:t,operatorList:e}of this._intentStates.values())if(t.size>0||!e.lastChunk)return!1;this._intentStates.clear();this.objs.clear();this.#i=!1;return!0}#r(){if(this.#n){clearTimeout(this.#n);this.#n=null}}_startRenderPage(t,e){const n=this._intentStates.get(e);if(n){this._stats?.timeEnd("Page Request");n.displayReadyCapability?.resolve(t)}}_renderPageChunk(t,e){for(let n=0,i=t.length;n{a.read().then((t=>{let{value:e,done:n}=t;if(n)o.streamReader=null;else if(!this._transport.destroyed){this._renderPageChunk(e,o);pump()}}),(t=>{o.streamReader=null;if(!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const t of o.renderTasks)t.operatorListChanged();this.#s(!0)}if(o.displayReadyCapability)o.displayReadyCapability.reject(t);else{if(!o.opListReadCapability)throw t;o.opListReadCapability.reject(t)}}}))};pump()}_abortOperatorList(t){let{intentState:e,reason:n,force:i=!1}=t;if(e.streamReader){if(e.streamReaderCancelTimeout){clearTimeout(e.streamReaderCancelTimeout);e.streamReaderCancelTimeout=null}if(!i){if(e.renderTasks.size>0)return;if(n instanceof _display_utils.RenderingCancelledException){let t=RENDERING_CANCELLED_TIMEOUT;n.extraDelay>0&&n.extraDelay<1e3&&(t+=n.extraDelay);e.streamReaderCancelTimeout=setTimeout((()=>{e.streamReaderCancelTimeout=null;this._abortOperatorList({intentState:e,reason:n,force:!0})}),t);return}}e.streamReader.cancel(new _util.AbortException(n.message)).catch((()=>{}));e.streamReader=null;if(!this._transport.destroyed){for(const[t,n]of this._intentStates)if(n===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{#a=new Set;#o=Promise.resolve();postMessage(t,e){const n={data:structuredClone(t,null)};this.#o.then((()=>{for(const t of this.#a)t.call(this,n)}))}addEventListener(t,e){this.#a.add(e)}removeEventListener(t,e){this.#a.delete(e)}terminate(){this.#a.clear()}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;if(_util.isNodeJS&&"function"==typeof require){PDFWorkerUtil.isWorkerDisabled=!0;PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js"}else if("object"==typeof document){const t=document?.currentScript?.src;t&&(PDFWorkerUtil.fallbackWorkerSrc=t.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(t,e){let n;try{n=new URL(t);if(!n.origin||"null"===n.origin)return!1}catch{return!1}const i=new URL(e,n);return n.origin===i.origin};PDFWorkerUtil.createCDNWrapper=function(t){const e=`importScripts("${t}");`;return URL.createObjectURL(new Blob([e]))};class PDFWorker{static#l;constructor(){let{name:t=null,port:e=null,verbosity:n=(0,_util.getVerbosityLevel)()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.name=t;this.destroyed=!1;this.verbosity=n;this._readyCapability=new _util.PromiseCapability;this._port=null;this._webWorker=null;this._messageHandler=null;if(e){if(PDFWorker.#l?.has(e))throw new Error("Cannot use more than one PDFWorker per port.");(PDFWorker.#l||=new WeakMap).set(e,this);this._initializeFromPort(e)}else this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(t){this._port=t;this._messageHandler=new _message_handler.MessageHandler("main","worker",t);this._messageHandler.on("ready",(function(){}));this._readyCapability.resolve();this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:t}=PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,t)||(t=PDFWorkerUtil.createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t),n=new _message_handler.MessageHandler("main","worker",e),terminateEarly=()=>{e.removeEventListener("error",onWorkerError);n.destroy();e.terminate();this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},onWorkerError=()=>{this._webWorker||terminateEarly()};e.addEventListener("error",onWorkerError);n.on("test",(t=>{e.removeEventListener("error",onWorkerError);if(this.destroyed)terminateEarly();else if(t){this._messageHandler=n;this._port=e;this._webWorker=e;this._readyCapability.resolve();n.send("configure",{verbosity:this.verbosity})}else{this._setupFakeWorker();n.destroy();e.terminate()}}));n.on("ready",(t=>{e.removeEventListener("error",onWorkerError);if(this.destroyed)terminateEarly();else try{sendTest()}catch{this._setupFakeWorker()}}));const sendTest=()=>{const t=new Uint8Array;n.send("test",t,[t.buffer])};sendTest();return}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){if(!PDFWorkerUtil.isWorkerDisabled){(0,_util.warn)("Setting up fake worker.");PDFWorkerUtil.isWorkerDisabled=!0}PDFWorker._setupFakeWorkerGlobal.then((t=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const e=new LoopbackPort;this._port=e;const n="fake"+PDFWorkerUtil.fakeWorkerId++,i=new _message_handler.MessageHandler(n+"_worker",n,e);t.setup(i,e);const r=new _message_handler.MessageHandler(n,n+"_worker",e);this._messageHandler=r;this._readyCapability.resolve();r.send("configure",{verbosity:this.verbosity})})).catch((t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))}))}destroy(){this.destroyed=!0;if(this._webWorker){this._webWorker.terminate();this._webWorker=null}PDFWorker.#l?.delete(this._port);this._port=null;if(this._messageHandler){this._messageHandler.destroy();this._messageHandler=null}}static fromPort(t){if(!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const e=this.#l?.get(t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new PDFWorker(t)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc){_util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.');return PDFWorkerUtil.fallbackWorkerSrc}throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&"function"==typeof require){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}await(0,_display_utils.loadScript)(this.workerSrc);return window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}exports.PDFWorker=PDFWorker;class WorkerTransport{#c=new Map;#h=new Map;#d=new Map;#u=null;constructor(t,e,n,i,r){this.messageHandler=t;this.loadingTask=e;this.commonObjs=new PDFObjects;this.fontLoader=new _font_loader.FontLoader({ownerDocument:i.ownerDocument,styleElement:i.styleElement});this._params=i;this.canvasFactory=r.canvasFactory;this.filterFactory=r.filterFactory;this.cMapReaderFactory=r.cMapReaderFactory;this.standardFontDataFactory=r.standardFontDataFactory;this.destroyed=!1;this.destroyCapability=null;this._networkStream=n;this._fullReader=null;this._lastProgress=null;this.downloadInfoCapability=new _util.PromiseCapability;this.setupMessageHandler()}#p(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=this.#c.get(t);if(n)return n;const i=this.messageHandler.sendWithPromise(t,e);this.#c.set(t,i);return i}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=_util.RenderingIntentFlag.DISPLAY,s=_annotation_storage.SerializableEmpty;switch(t){case"any":r=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":r=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${t}`)}switch(e){case _util.AnnotationMode.DISABLE:r+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:r+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:r+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE;s=(r&_util.RenderingIntentFlag.PRINT&&n instanceof _annotation_storage.PrintAnnotationStorage?n:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${e}`)}i&&(r+=_util.RenderingIntentFlag.OPLIST);return{renderingIntent:r,cacheKey:`${r}_${s.hash}`,annotationStorageSerializable:s}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0;this.destroyCapability=new _util.PromiseCapability;this.#u?.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const e of this.#h.values())t.push(e._destroy());this.#h.clear();this.#d.clear();this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);t.push(e);Promise.all(t).then((()=>{this.commonObjs.clear();this.fontLoader.clear();this.#c.clear();this.filterFactory.destroy();this._networkStream?.cancelAllRequests(new _util.AbortException("Worker was terminated."));if(this.messageHandler){this.messageHandler.destroy();this.messageHandler=null}this.destroyCapability.resolve()}),this.destroyCapability.reject);return this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",((t,e)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available.");this._fullReader=this._networkStream.getFullReader();this._fullReader.onProgress=t=>{this._lastProgress={loaded:t.loaded,total:t.total}};e.onPull=()=>{this._fullReader.read().then((function(t){let{value:n,done:i}=t;if(i)e.close();else{(0,_util.assert)(n instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer.");e.enqueue(new Uint8Array(n),1,[n])}})).catch((t=>{e.error(t)}))};e.onCancel=t=>{this._fullReader.cancel(t);e.ready.catch((t=>{if(!this.destroyed)throw t}))}}));t.on("ReaderHeadersReady",(t=>{const n=new _util.PromiseCapability,i=this._fullReader;i.headersReady.then((()=>{if(!i.isStreamingSupported||!i.isRangeSupported){this._lastProgress&&e.onProgress?.(this._lastProgress);i.onProgress=t=>{e.onProgress?.({loaded:t.loaded,total:t.total})}}n.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})}),n.reject);return n.promise}));t.on("GetRangeReader",((t,e)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const n=this._networkStream.getRangeReader(t.begin,t.end);if(n){e.onPull=()=>{n.read().then((function(t){let{value:n,done:i}=t;if(i)e.close();else{(0,_util.assert)(n instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer.");e.enqueue(new Uint8Array(n),1,[n])}})).catch((t=>{e.error(t)}))};e.onCancel=t=>{n.cancel(t);e.ready.catch((t=>{if(!this.destroyed)throw t}))}}else e.close()}));t.on("GetDoc",(t=>{let{pdfInfo:n}=t;this._numPages=n.numPages;this._htmlForXfa=n.htmlForXfa;delete n.htmlForXfa;e._capability.resolve(new PDFDocumentProxy(n,this))}));t.on("DocException",(function(t){let n;switch(t.name){case"PasswordException":n=new _util.PasswordException(t.message,t.code);break;case"InvalidPDFException":n=new _util.InvalidPDFException(t.message);break;case"MissingPDFException":n=new _util.MissingPDFException(t.message);break;case"UnexpectedResponseException":n=new _util.UnexpectedResponseException(t.message,t.status);break;case"UnknownErrorException":n=new _util.UnknownErrorException(t.message,t.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}e._capability.reject(n)}));t.on("PasswordRequest",(t=>{this.#u=new _util.PromiseCapability;if(e.onPassword){const updatePassword=t=>{t instanceof Error?this.#u.reject(t):this.#u.resolve({password:t})};try{e.onPassword(updatePassword,t.code)}catch(t){this.#u.reject(t)}}else this.#u.reject(new _util.PasswordException(t.message,t.code));return this.#u.promise}));t.on("DataLoaded",(t=>{e.onProgress?.({loaded:t.length,total:t.length});this.downloadInfoCapability.resolve(t)}));t.on("StartRenderPage",(t=>{if(this.destroyed)return;this.#h.get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)}));t.on("commonobj",(e=>{let[n,i,r]=e;if(!this.destroyed&&!this.commonObjs.has(n))switch(i){case"Font":const e=this._params;if("error"in r){const t=r.error;(0,_util.warn)(`Error during font loading: ${t}`);this.commonObjs.resolve(n,t);break}const s=e.pdfBug&&globalThis.FontInspector?.enabled?(t,e)=>globalThis.FontInspector.fontAdded(t,e):null,a=new _font_loader.FontFaceObject(r,{isEvalSupported:e.isEvalSupported,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,inspectFont:s});this.fontLoader.bind(a).catch((e=>t.sendWithPromise("FontFallback",{id:n}))).finally((()=>{!e.fontExtraProperties&&a.data&&(a.data=null);this.commonObjs.resolve(n,a)}));break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(n,r);break;default:throw new Error(`Got unknown common object type ${i}`)}}));t.on("obj",(t=>{let[e,n,i,r]=t;if(this.destroyed)return;const s=this.#h.get(n);if(!s.objs.has(e))switch(i){case"Image":s.objs.resolve(e,r);if(r){let t;if(r.bitmap){const{width:e,height:n}=r;t=e*n*4}else t=r.data?.length||0;t>_util.MAX_IMAGE_SIZE_TO_CACHE&&(s._maybeCleanupAfterRender=!0)}break;case"Pattern":s.objs.resolve(e,r);break;default:throw new Error(`Got unknown object type ${i}`)}}));t.on("DocProgress",(t=>{this.destroyed||e.onProgress?.({loaded:t.loaded,total:t.total})}));t.on("FetchBuiltInCMap",(t=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(t):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))));t.on("FetchStandardFontData",(t=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(t):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfers:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:this._fullReader?.filename??null},e).finally((()=>{this.annotationStorage.resetModified()}))}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const e=t-1,n=this.#d.get(e);if(n)return n;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then((t=>{if(this.destroyed)throw new Error("Transport destroyed");const n=new PDFPageProxy(e,t,this,this._params.pdfBug);this.#h.set(e,n);return n}));this.#d.set(e,i);return i}getPageIndex(t){return"object"!=typeof t||null===t||!Number.isInteger(t.num)||t.num<0||!Number.isInteger(t.gen)||t.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen})}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return this.#p("GetFieldObjects")}hasJSActions(){return this.#p("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return"string"!=typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#p("GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((t=>new _optional_content_config.OptionalContentConfig(t)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",e=this.#c.get(t);if(e)return e;const n=this.messageHandler.sendWithPromise(t,null).then((t=>({info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null})));this.#c.set(t,n);return n}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of this.#h.values()){if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`)}this.commonObjs.clear();t||this.fontLoader.clear();this.#c.clear();this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:t,enableXfa:e}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:t,enableXfa:e})}}class PDFObjects{#f=Object.create(null);#g(t){return this.#f[t]||={capability:new _util.PromiseCapability,data:null}}get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){const n=this.#g(t);n.capability.promise.then((()=>e(n.data)));return null}const n=this.#f[t];if(!n?.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return n.data}has(t){const e=this.#f[t];return e?.capability.settled||!1}resolve(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=this.#g(t);n.data=e;n.capability.resolve()}clear(){for(const t in this.#f){const{data:e}=this.#f[t];e?.bitmap?.close()}this.#f=Object.create(null)}}class RenderTask{#m=null;constructor(t){this.#m=t;this.onContinue=null}get promise(){return this.#m.capability.promise}cancel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.#m.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this.#m.operatorList;if(!t)return!1;const{annotationCanvasMap:e}=this.#m;return t.form||t.canvas&&e?.size>0}}exports.RenderTask=RenderTask;class InternalRenderTask{static#b=new WeakSet;constructor(t){let{callback:e,params:n,objs:i,commonObjs:r,annotationCanvasMap:s,operatorList:a,pageIndex:o,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:h=!1,pdfBug:d=!1,pageColors:u=null}=t;this.callback=e;this.params=n;this.objs=i;this.commonObjs=r;this.annotationCanvasMap=s;this.operatorListIdx=null;this.operatorList=a;this._pageIndex=o;this.canvasFactory=l;this.filterFactory=c;this._pdfBug=d;this.pageColors=u;this.running=!1;this.graphicsReadyCallback=null;this.graphicsReady=!1;this._useRequestAnimationFrame=!0===h&&"undefined"!=typeof window;this.cancelled=!1;this.capability=new _util.PromiseCapability;this.task=new RenderTask(this);this._cancelBound=this.cancel.bind(this);this._continueBound=this._continue.bind(this);this._scheduleNextBound=this._scheduleNext.bind(this);this._nextBound=this._next.bind(this);this._canvas=n.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics(t){let{transparency:e=!1,optionalContentConfig:n}=t;if(this.cancelled)return;if(this._canvas){if(InternalRenderTask.#b.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");InternalRenderTask.#b.add(this._canvas)}if(this._pdfBug&&globalThis.StepperManager?.enabled){this.stepper=globalThis.StepperManager.create(this._pageIndex);this.stepper.init(this.operatorList);this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint()}const{canvasContext:i,viewport:r,transform:s,background:a}=this.params;this.gfx=new _canvas.CanvasGraphics(i,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:n},this.annotationCanvasMap,this.pageColors);this.gfx.beginDrawing({transform:s,viewport:r,transparency:e,background:a});this.operatorListIdx=0;this.graphicsReady=!0;this.graphicsReadyCallback?.()}cancel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1;this.cancelled=!0;this.gfx?.endDrawing();InternalRenderTask.#b.delete(this._canvas);this.callback(t||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,e))}operatorListChanged(){if(this.graphicsReady){this.stepper?.updateOperatorList(this.operatorList);this.running||this._continue()}else this.graphicsReadyCallback||=this._continueBound}_continue(){this.running=!0;this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame((()=>{this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){if(!this.cancelled){this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper);if(this.operatorListIdx===this.operatorList.argsArray.length){this.running=!1;if(this.operatorList.lastChunk){this.gfx.endDrawing();InternalRenderTask.#b.delete(this._canvas);this.callback()}}}}}const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(t,e,n)=>{var i=n(3),r=n(126);i({target:"Set",proto:!0,real:!0,forced:!n(135)("difference")},{difference:r})},(t,e,n)=>{var i=n(127),r=n(128),s=n(129),a=n(132),o=n(133),l=n(130),c=n(131),h=r.has,d=r.remove;t.exports=function difference(t){var e=i(this),n=o(t),r=s(e);a(e)<=n.size?l(e,(function(t){n.includes(t)&&d(r,t)})):c(n.getIterator(),(function(t){h(e,t)&&d(r,t)}));return r}},(t,e,n)=>{var i=n(128).has;t.exports=function(t){i(t);return t}},(t,e,n)=>{var i=n(14),r=Set.prototype;t.exports={Set:Set,add:i(r.add),has:i(r.has),remove:i(r.delete),proto:r}},(t,e,n)=>{var i=n(128),r=n(130),s=i.Set,a=i.add;t.exports=function(t){var e=new s;r(t,(function(t){a(e,t)}));return e}},(t,e,n)=>{var i=n(14),r=n(131),s=n(128),a=s.Set,o=s.proto,l=i(o.forEach),c=i(o.keys),h=c(new a).next;t.exports=function(t,e,n){return n?r({iterator:c(t),next:h},e):l(t,e)}},(t,e,n)=>{var i=n(8);t.exports=function(t,e,n){for(var r,s,a=n?t:t.iterator,o=t.next;!(r=i(o,a)).done;)if(void 0!==(s=e(r.value)))return s}},(t,e,n)=>{var i=n(72),r=n(128);t.exports=i(r.proto,"size","get")||function(t){return t.size}},(t,e,n)=>{var i=n(31),r=n(47),s=n(8),a=n(62),o=n(134),l="Invalid size",c=RangeError,h=TypeError,d=Math.max,SetRecord=function(t,e,n,i){this.set=t;this.size=e;this.has=n;this.keys=i};SetRecord.prototype={getIterator:function(){return o(r(s(this.keys,this.set)))},includes:function(t){return s(this.has,this.set,t)}};t.exports=function(t){r(t);var e=+t.size;if(e!=e)throw h(l);var n=a(e);if(n<0)throw c(l);return new SetRecord(t,d(n,0),i(t.has),i(t.keys))}},t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},(t,e,n)=>{var i=n(24),createSetLike=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var e=i("Set");try{(new e)[t](createSetLike(0));try{(new e)[t](createSetLike(-1));return!1}catch(t){return!0}}catch(t){return!1}}},(t,e,n)=>{var i=n(3),r=n(7),s=n(137);i({target:"Set",proto:!0,real:!0,forced:!n(135)("intersection")||r((function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:s})},(t,e,n)=>{var i=n(127),r=n(128),s=n(132),a=n(133),o=n(130),l=n(131),c=r.Set,h=r.add,d=r.has;t.exports=function intersection(t){var e=i(this),n=a(t),r=new c;s(e)>n.size?l(n.getIterator(),(function(t){d(e,t)&&h(r,t)})):o(e,(function(t){n.includes(t)&&h(r,t)}));return r}},(t,e,n)=>{var i=n(3),r=n(139);i({target:"Set",proto:!0,real:!0,forced:!n(135)("isDisjointFrom")},{isDisjointFrom:r})},(t,e,n)=>{var i=n(127),r=n(128).has,s=n(132),a=n(133),o=n(130),l=n(131),c=n(140);t.exports=function isDisjointFrom(t){var e=i(this),n=a(t);if(s(e)<=n.size)return!1!==o(e,(function(t){if(n.includes(t))return!1}),!0);var h=n.getIterator();return!1!==l(h,(function(t){if(r(e,t))return c(h,"normal",!1)}))}},(t,e,n)=>{var i=n(8),r=n(47),s=n(30);t.exports=function(t,e,n){var a,o;r(t);try{if(!(a=s(t,"return"))){if("throw"===e)throw n;return n}a=i(a,t)}catch(t){o=!0;a=t}if("throw"===e)throw n;if(o)throw a;r(a);return n}},(t,e,n)=>{var i=n(3),r=n(142);i({target:"Set",proto:!0,real:!0,forced:!n(135)("isSubsetOf")},{isSubsetOf:r})},(t,e,n)=>{var i=n(127),r=n(132),s=n(130),a=n(133);t.exports=function isSubsetOf(t){var e=i(this),n=a(t);return!(r(e)>n.size)&&!1!==s(e,(function(t){if(!n.includes(t))return!1}),!0)}},(t,e,n)=>{var i=n(3),r=n(144);i({target:"Set",proto:!0,real:!0,forced:!n(135)("isSupersetOf")},{isSupersetOf:r})},(t,e,n)=>{var i=n(127),r=n(128).has,s=n(132),a=n(133),o=n(131),l=n(140);t.exports=function isSupersetOf(t){var e=i(this),n=a(t);if(s(e){var i=n(3),r=n(146);i({target:"Set",proto:!0,real:!0,forced:!n(135)("symmetricDifference")},{symmetricDifference:r})},(t,e,n)=>{var i=n(127),r=n(128),s=n(129),a=n(133),o=n(131),l=r.add,c=r.has,h=r.remove;t.exports=function symmetricDifference(t){var e=i(this),n=a(t).getIterator(),r=s(e);o(n,(function(t){c(e,t)?h(r,t):l(r,t)}));return r}},(t,e,n)=>{var i=n(3),r=n(148);i({target:"Set",proto:!0,real:!0,forced:!n(135)("union")},{union:r})},(t,e,n)=>{var i=n(127),r=n(128).add,s=n(129),a=n(133),o=n(131);t.exports=function union(t){var e=i(this),n=a(t).getIterator(),l=s(e);o(n,(function(t){r(l,t)}));return l}},(t,e,n)=>{var i=n(3),r=n(4),s=n(24),a=n(11),o=n(45).f,l=n(39),c=n(150),h=n(75),d=n(76),u=n(151),p=n(82),f=n(6),g=n(36),m="DOMException",b=s("Error"),v=s(m),y=function DOMException(){c(this,_);var t=arguments.length,e=d(t<1?void 0:arguments[0]),n=d(t<2?void 0:arguments[1],"Error"),i=new v(e,n),r=b(e);r.name=m;o(i,"stack",a(1,p(r.stack,1)));h(i,this,y);return i},_=y.prototype=v.prototype,A="stack"in b(m),S="stack"in new v(1,2),E=v&&f&&Object.getOwnPropertyDescriptor(r,m),x=!(!E||E.writable&&E.configurable),w=A&&!x&&!S;i({global:!0,constructor:!0,forced:g||w},{DOMException:w?y:v});var C=s(m),T=C.prototype;if(T.constructor!==C){g||o(T,"constructor",a(1,C));for(var P in u)if(l(u,P)){var k=u[P],M=k.s;l(C,M)||o(C,M,a(6,k.c))}}},(t,e,n)=>{var i=n(25),r=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw r("Incorrect invocation")}},t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},(t,e,n)=>{var i,r=n(36),s=n(3),a=n(4),o=n(24),l=n(14),c=n(7),h=n(41),d=n(21),u=n(153),p=n(17),f=n(20),g=n(23),m=n(154),b=n(47),v=n(78),y=n(39),_=n(159),A=n(44),S=n(64),E=n(85),x=n(160),w=n(162),C=n(128),T=n(83),P=n(119),k=a.Object,M=a.Array,R=a.Date,D=a.Error,I=a.EvalError,O=a.RangeError,L=a.ReferenceError,N=a.SyntaxError,B=a.TypeError,j=a.URIError,U=a.PerformanceMark,z=a.WebAssembly,W=z&&z.CompileError||D,H=z&&z.LinkError||D,q=z&&z.RuntimeError||D,G=o("DOMException"),V=w.Map,$=w.has,X=w.get,K=w.set,Y=C.Set,J=C.add,Q=o("Object","keys"),Z=l([].push),tt=l((!0).valueOf),et=l(1..valueOf),nt=l("".valueOf),it=l(R.prototype.getTime),rt=h("structuredClone"),st="DataCloneError",at="Transferring",checkBasicSemantic=function(t){return!c((function(){var e=new a.Set([7]),n=t(e),i=t(k(7));return n===e||!n.has(7)||"object"!=typeof i||7!=+i}))&&t},checkErrorsCloning=function(t,e){return!c((function(){var n=new e,i=t({a:n,b:n});return!(i&&i.a===i.b&&i.a instanceof e&&i.a.stack===n.stack)}))},ot=a.structuredClone,lt=r||!checkErrorsCloning(ot,D)||!checkErrorsCloning(ot,G)||!(i=ot,!c((function(){var t=i(new a.AggregateError([1],rt,{cause:3}));return"AggregateError"!==t.name||1!==t.errors[0]||t.message!==rt||3!==t.cause}))),ct=!ot&&checkBasicSemantic((function(t){return new U(rt,{detail:t}).detail})),ht=checkBasicSemantic(ot)||ct,throwUncloneable=function(t){throw new G("Uncloneable type: "+t,st)},throwUnpolyfillable=function(t,e){throw new G((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",st)},tryNativeRestrictedStructuredClone=function(t,e){ht||throwUnpolyfillable(e);return ht(t)},cloneBuffer=function(t,e,n){if($(e,t))return X(e,t);var i,r,s,o,l,c;if("SharedArrayBuffer"===(n||v(t)))i=ht?ht(t):t;else{var h=a.DataView;h||"function"==typeof t.slice||throwUnpolyfillable("ArrayBuffer");try{if("function"!=typeof t.slice||t.resizable){r=t.byteLength;s="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0;i=new ArrayBuffer(r,s);o=new h(t);l=new h(i);for(c=0;c1&&!p(arguments[1])?b(arguments[1]):void 0,r=i?i.transfer:void 0,s=!1;if(void 0!==r){n=function(t,e){if(!f(t))throw B("Transfer option cannot be converted to a sequence");var n=[];m(t,(function(t){Z(n,b(t))}));for(var i,r,s,o,l,c=0,h=S(n),p=[];c{var i=n(14),r=n(7),s=n(21),a=n(78),o=n(24),l=n(51),noop=function(){},c=[],h=o("Reflect","construct"),d=/^\s*(?:class|function)\b/,u=i(d.exec),p=!d.exec(noop),f=function isConstructor(t){if(!s(t))return!1;try{h(noop,c,t);return!0}catch(t){return!1}},g=function isConstructor(t){if(!s(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!u(d,l(t))}catch(t){return!0}};g.sham=!0;t.exports=!h||r((function(){var t;return f(f.call)||!f(Object)||!f((function(){t=!0}))||t}))?g:f},(t,e,n)=>{var i=n(99),r=n(8),s=n(47),a=n(32),o=n(155),l=n(64),c=n(25),h=n(157),d=n(158),u=n(140),p=TypeError,Result=function(t,e){this.stopped=t;this.result=e},f=Result.prototype;t.exports=function(t,e,n){var g,m,b,v,y,_,A,S=n&&n.that,E=!(!n||!n.AS_ENTRIES),x=!(!n||!n.IS_RECORD),w=!(!n||!n.IS_ITERATOR),C=!(!n||!n.INTERRUPTED),T=i(e,S),stop=function(t){g&&u(g,"normal",t);return new Result(!0,t)},callFn=function(t){if(E){s(t);return C?T(t[0],t[1],stop):T(t[0],t[1])}return C?T(t,stop):T(t)};if(x)g=t.iterator;else if(w)g=t;else{if(!(m=d(t)))throw p(a(t)+" is not iterable");if(o(m)){for(b=0,v=l(t);v>b;b++)if((y=callFn(t[b]))&&c(f,y))return y;return new Result(!1)}g=h(t,m)}_=x?t.next:g.next;for(;!(A=r(_,g)).done;){try{y=callFn(A.value)}catch(t){u(g,"throw",t)}if("object"==typeof y&&y&&c(f,y))return y}return new Result(!1)}},(t,e,n)=>{var i=n(34),r=n(156),s=i("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[s]===t)}},t=>{t.exports={}},(t,e,n)=>{var i=n(8),r=n(31),s=n(47),a=n(32),o=n(158),l=TypeError;t.exports=function(t,e){var n=arguments.length<2?o(t):e;if(r(n))return s(i(n,t));throw l(a(t)+" is not iterable")}},(t,e,n)=>{var i=n(78),r=n(30),s=n(17),a=n(156),o=n(34)("iterator");t.exports=function(t){if(!s(t))return r(t,o)||r(t,"@@iterator")||a[i(t)]}},(t,e,n)=>{var i=n(18),r=n(45),s=n(11);t.exports=function(t,e,n){var a=i(e);a in t?r.f(t,a,s(0,n)):t[a]=n}},(t,e,n)=>{var i=n(8),r=n(39),s=n(25),a=n(161),o=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in o||r(t,"flags")||!s(o,t)?e:i(a,t)}},(t,e,n)=>{var i=n(47);t.exports=function(){var t=i(this),e="";t.hasIndices&&(e+="d");t.global&&(e+="g");t.ignoreCase&&(e+="i");t.multiline&&(e+="m");t.dotAll&&(e+="s");t.unicode&&(e+="u");t.unicodeSets&&(e+="v");t.sticky&&(e+="y");return e}},(t,e,n)=>{var i=n(14),r=Map.prototype;t.exports={Map:Map,set:i(r.set),get:i(r.get),has:i(r.has),remove:i(r.delete),proto:r}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.SerializableEmpty=e.PrintAnnotationStorage=e.AnnotationStorage=void 0;n(89);n(149);n(152);var i=n(1),r=n(164),s=n(170);const a=Object.freeze({map:null,hash:"",transfers:void 0});e.SerializableEmpty=a;class AnnotationStorage{#v=!1;#y=new Map;constructor(){this.onSetModified=null;this.onResetModified=null;this.onAnnotationEditor=null}getValue(t,e){const n=this.#y.get(t);return void 0===n?e:Object.assign(e,n)}getRawValue(t){return this.#y.get(t)}remove(t){this.#y.delete(t);0===this.#y.size&&this.resetModified();if("function"==typeof this.onAnnotationEditor){for(const t of this.#y.values())if(t instanceof r.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(t,e){const n=this.#y.get(t);let i=!1;if(void 0!==n){for(const[t,r]of Object.entries(e))if(n[t]!==r){i=!0;n[t]=r}}else{i=!0;this.#y.set(t,e)}i&&this.#_();e instanceof r.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(e.constructor._type)}has(t){return this.#y.has(t)}getAll(){return this.#y.size>0?(0,i.objectFromMap)(this.#y):null}setAll(t){for(const[e,n]of Object.entries(t))this.setValue(e,n)}get size(){return this.#y.size}#_(){if(!this.#v){this.#v=!0;"function"==typeof this.onSetModified&&this.onSetModified()}}resetModified(){if(this.#v){this.#v=!1;"function"==typeof this.onResetModified&&this.onResetModified()}}get print(){return new PrintAnnotationStorage(this)}get serializable(){if(0===this.#y.size)return a;const t=new Map,e=new s.MurmurHash3_64,n=[],i=Object.create(null);let o=!1;for(const[n,s]of this.#y){const a=s instanceof r.AnnotationEditor?s.serialize(!1,i):s;if(a){t.set(n,a);e.update(`${n}:${JSON.stringify(a)}`);o||=!!a.bitmap}}if(o)for(const e of t.values())e.bitmap&&n.push(e.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfers:n}:a}}e.AnnotationStorage=AnnotationStorage;class PrintAnnotationStorage extends AnnotationStorage{#A;constructor(t){super();const{map:e,hash:n,transfers:i}=t.serializable,r=structuredClone(e,null);this.#A={map:r,hash:n,transfers:i}}get print(){(0,i.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#A}}e.PrintAnnotationStorage=PrintAnnotationStorage},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.AnnotationEditor=void 0;n(89);n(2);var i=n(165),r=n(1),s=n(168);class AnnotationEditor{#S="";#E=!1;#x=null;#w=null;#C=null;#T=!1;#P=null;#k=this.focusin.bind(this);#M=this.focusout.bind(this);#F=!1;#R=!1;#D=!1;_initialOptions=Object.create(null);_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#I=!1;#O=AnnotationEditor._zIndex++;static _borderLineWidth=-1;static _colorManager=new i.ColorManager;static _zIndex=1;static SMALL_EDITOR_SIZE=0;constructor(t){this.constructor===AnnotationEditor&&(0,r.unreachable)("Cannot initialize AnnotationEditor.");this.parent=t.parent;this.id=t.id;this.width=this.height=null;this.pageIndex=t.parent.pageIndex;this.name=t.name;this.div=null;this._uiManager=t.uiManager;this.annotationElementId=null;this._willKeepAspectRatio=!1;this._initialOptions.isCentered=t.isCentered;this._structTreeParentId=null;const{rotation:e,rawDims:{pageWidth:n,pageHeight:i,pageX:s,pageY:a}}=this.parent.viewport;this.rotation=e;this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360;this.pageDimensions=[n,i];this.pageTranslation=[s,a];const[o,l]=this.parentDimensions;this.x=t.x/o;this.y=t.y/l;this.isAttachedToDOM=!1;this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,r.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new FakeEditor({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId;e.deleted=!0;e._uiManager.addToAnnotationStorage(e)}static initialize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;AnnotationEditor._l10nPromise||=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map((e=>[e,t.get(e)])));if(e?.strings)for(const n of e.strings)AnnotationEditor._l10nPromise.set(n,t.get(n));if(-1!==AnnotationEditor._borderLineWidth)return;const n=getComputedStyle(document.documentElement);AnnotationEditor._borderLineWidth=parseFloat(n.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){(0,r.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#I}set _isDraggable(t){this.#I=t;this.div?.classList.toggle("draggable",t)}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(2*t);this.y+=this.width*t/(2*e);break;case 180:this.x+=this.width/2;this.y+=this.height/2;break;case 270:this.x+=this.height*e/(2*t);this.y-=this.width*t/(2*e);break;default:this.x-=this.width/2;this.y-=this.height/2}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#O}setParent(t){if(null!==t){this.pageIndex=t.pageIndex;this.pageDimensions=t.pageDimensions}this.parent=t}focusin(t){this._focusEventsAllowed&&(this.#F?this.#F=!1:this.parent.setSelected(this))}focusout(t){if(!this._focusEventsAllowed)return;if(!this.isAttachedToDOM)return;const e=t.relatedTarget;if(!e?.closest(`#${this.id}`)){t.preventDefault();this.parent?.isMultipleSelection||this.commitOrRemove()}}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,n,i){const[r,s]=this.parentDimensions;[n,i]=this.screenToPageTranslation(n,i);this.x=(t+n)/r;this.y=(e+i)/s;this.fixAndSetPosition()}#L(t,e,n){let[i,r]=t;[e,n]=this.screenToPageTranslation(e,n);this.x+=e/i;this.y+=n/r;this.fixAndSetPosition()}translate(t,e){this.#L(this.parentDimensions,t,e)}translateInPage(t,e){this.#L(this.pageDimensions,t,e);this.div.scrollIntoView({block:"nearest"})}drag(t,e){const[n,i]=this.parentDimensions;this.x+=t/n;this.y+=e/i;if(this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:t,y:e}=this.div.getBoundingClientRect();if(this.parent.findNewParent(this,t,e)){this.x-=Math.floor(this.x);this.y-=Math.floor(this.y)}}let{x:r,y:s}=this;const[a,o]=this.#N();r+=a;s+=o;this.div.style.left=`${(100*r).toFixed(2)}%`;this.div.style.top=`${(100*s).toFixed(2)}%`;this.div.scrollIntoView({block:"nearest"})}#N(){const[t,e]=this.parentDimensions,{_borderLineWidth:n}=AnnotationEditor,i=n/t,r=n/e;switch(this.rotation){case 90:return[-i,r];case 180:return[i,r];case 270:return[i,-r];default:return[-i,-r]}}fixAndSetPosition(){const[t,e]=this.pageDimensions;let{x:n,y:i,width:r,height:s}=this;r*=t;s*=e;n*=t;i*=e;switch(this.rotation){case 0:n=Math.max(0,Math.min(t-r,n));i=Math.max(0,Math.min(e-s,i));break;case 90:n=Math.max(0,Math.min(t-s,n));i=Math.min(e,Math.max(r,i));break;case 180:n=Math.min(t,Math.max(r,n));i=Math.min(e,Math.max(s,i));break;case 270:n=Math.min(t,Math.max(s,n));i=Math.max(0,Math.min(e-r,i))}this.x=n/=t;this.y=i/=e;const[a,o]=this.#N();n+=a;i+=o;const{style:l}=this.div;l.left=`${(100*n).toFixed(2)}%`;l.top=`${(100*i).toFixed(2)}%`;this.moveInDOM()}static#B(t,e,n){switch(n){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}}screenToPageTranslation(t,e){return AnnotationEditor.#B(t,e,this.parentRotation)}pageTranslationToScreen(t,e){return AnnotationEditor.#B(t,e,360-this.parentRotation)}#j(t){switch(t){case 90:{const[t,e]=this.pageDimensions;return[0,-t/e,e/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,e]=this.pageDimensions;return[0,t/e,-e/t,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,n]}=this,i=e*t,s=n*t;return r.FeatureTest.isCSSRoundSupported?[Math.round(i),Math.round(s)]:[i,s]}setDims(t,e){const[n,i]=this.parentDimensions;this.div.style.width=`${(100*t/n).toFixed(2)}%`;this.#T||(this.div.style.height=`${(100*e/i).toFixed(2)}%`);this.#x?.classList.toggle("small",t{this._isDraggable=s;window.removeEventListener("pointerup",pointerUpCallback);window.removeEventListener("blur",pointerUpCallback);window.removeEventListener("pointermove",i,a);this.parent.div.style.cursor=d;this.div.style.cursor=u;const t=this.x,e=this.y,n=this.width,r=this.height;t===o&&e===l&&n===c&&r===h||this.addCommands({cmd:()=>{this.width=n;this.height=r;this.x=t;this.y=e;const[i,s]=this.parentDimensions;this.setDims(i*n,s*r);this.fixAndSetPosition()},undo:()=>{this.width=c;this.height=h;this.x=o;this.y=l;const[t,e]=this.parentDimensions;this.setDims(t*c,e*h);this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",pointerUpCallback);window.addEventListener("blur",pointerUpCallback)}#W(t,e){const[n,i]=this.parentDimensions,r=this.x,s=this.y,a=this.width,o=this.height,l=AnnotationEditor.MIN_SIZE/n,c=AnnotationEditor.MIN_SIZE/i,round=t=>Math.round(1e4*t)/1e4,h=this.#j(this.rotation),transf=(t,e)=>[h[0]*t+h[2]*e,h[1]*t+h[3]*e],d=this.#j(360-this.rotation);let u,p,f=!1,g=!1;switch(t){case"topLeft":f=!0;u=(t,e)=>[0,0];p=(t,e)=>[t,e];break;case"topMiddle":u=(t,e)=>[t/2,0];p=(t,e)=>[t/2,e];break;case"topRight":f=!0;u=(t,e)=>[t,0];p=(t,e)=>[0,e];break;case"middleRight":g=!0;u=(t,e)=>[t,e/2];p=(t,e)=>[0,e/2];break;case"bottomRight":f=!0;u=(t,e)=>[t,e];p=(t,e)=>[0,0];break;case"bottomMiddle":u=(t,e)=>[t/2,e];p=(t,e)=>[t/2,0];break;case"bottomLeft":f=!0;u=(t,e)=>[0,e];p=(t,e)=>[t,0];break;case"middleLeft":g=!0;u=(t,e)=>[0,e/2];p=(t,e)=>[t,e/2]}const m=u(a,o),b=p(a,o);let v=transf(...b);const y=round(r+v[0]),_=round(s+v[1]);let A=1,S=1,[E,x]=this.screenToPageTranslation(e.movementX,e.movementY);[E,x]=(w=E/n,C=x/i,[d[0]*w+d[2]*C,d[1]*w+d[3]*C]);var w,C;if(f){const t=Math.hypot(a,o);A=S=Math.max(Math.min(Math.hypot(b[0]-m[0]-E,b[1]-m[1]-x)/t,1/a,1/o),l/a,c/o)}else g?A=Math.max(l,Math.min(1,Math.abs(b[0]-m[0]-E)))/a:S=Math.max(c,Math.min(1,Math.abs(b[1]-m[1]-x)))/o;const T=round(a*A),P=round(o*S);v=transf(...p(T,P));const k=y-v[0],M=_-v[1];this.width=T;this.height=P;this.x=k;this.y=M;this.setDims(n*T,i*P);this.fixAndSetPosition()}async addAltTextButton(){if(this.#x)return;const t=this.#x=document.createElement("button");t.className="altText";const e=await AnnotationEditor._l10nPromise.get("editor_alt_text_button_label");t.textContent=e;t.setAttribute("aria-label",e);t.tabIndex="0";t.addEventListener("contextmenu",s.noContextMenu);t.addEventListener("pointerdown",(t=>t.stopPropagation()));t.addEventListener("click",(t=>{t.preventDefault();this._uiManager.editAltText(this)}),{capture:!0});t.addEventListener("keydown",(e=>{if(e.target===t&&"Enter"===e.key){e.preventDefault();this._uiManager.editAltText(this)}}));this.#H();this.div.append(t);if(!AnnotationEditor.SMALL_EDITOR_SIZE){const e=40;AnnotationEditor.SMALL_EDITOR_SIZE=Math.min(128,Math.round(t.getBoundingClientRect().width*(1+e/100)))}}async#H(){const t=this.#x;if(!t)return;if(!this.#S&&!this.#E){t.classList.remove("done");this.#w?.remove();return}AnnotationEditor._l10nPromise.get("editor_alt_text_edit_button_label").then((e=>{t.setAttribute("aria-label",e)}));let e=this.#w;if(!e){this.#w=e=document.createElement("span");e.className="tooltip";e.setAttribute("role","tooltip");const n=e.id=`alt-text-tooltip-${this.id}`;t.setAttribute("aria-describedby",n);const i=100;t.addEventListener("mouseenter",(()=>{this.#C=setTimeout((()=>{this.#C=null;this.#w.classList.add("show");this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})}),i)}));t.addEventListener("mouseleave",(()=>{clearTimeout(this.#C);this.#C=null;this.#w?.classList.remove("show")}))}t.classList.add("done");e.innerText=this.#E?await AnnotationEditor._l10nPromise.get("editor_alt_text_decorative_tooltip"):this.#S;e.parentNode||t.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:this.#S,decorative:this.#E}}set altTextData(t){let{altText:e,decorative:n}=t;if(this.#S!==e||this.#E!==n){this.#S=e;this.#E=n;this.#H()}}render(){this.div=document.createElement("div");this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360);this.div.className=this.name;this.div.setAttribute("id",this.id);this.div.setAttribute("tabIndex",0);this.setInForeground();this.div.addEventListener("focusin",this.#k);this.div.addEventListener("focusout",this.#M);const[t,e]=this.parentDimensions;if(this.parentRotation%180!=0){this.div.style.maxWidth=`${(100*e/t).toFixed(2)}%`;this.div.style.maxHeight=`${(100*t/e).toFixed(2)}%`}const[n,r]=this.getInitialTranslation();this.translate(n,r);(0,i.bindEvents)(this,this.div,["pointerdown"]);return this.div}pointerdown(t){const{isMac:e}=r.FeatureTest.platform;if(0!==t.button||t.ctrlKey&&e)t.preventDefault();else{this.#F=!0;this.#q(t)}}#q(t){if(!this._isDraggable)return;const e=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let n,i;if(e){n={passive:!0,capture:!0};i=t=>{const[e,n]=this.screenToPageTranslation(t.movementX,t.movementY);this._uiManager.dragSelectedEditors(e,n)};window.addEventListener("pointermove",i,n)}const pointerUpCallback=()=>{window.removeEventListener("pointerup",pointerUpCallback);window.removeEventListener("blur",pointerUpCallback);e&&window.removeEventListener("pointermove",i,n);this.#F=!1;if(!this._uiManager.endDragSession()){const{isMac:e}=r.FeatureTest.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",pointerUpCallback);window.addEventListener("blur",pointerUpCallback)}moveInDOM(){this.parent?.moveEditorInDOM(this)}_setParentAndPosition(t,e,n){t.changeParent(this);this.x=e;this.y=n;this.fixAndSetPosition()}getRect(t,e){const n=this.parentScale,[i,r]=this.pageDimensions,[s,a]=this.pageTranslation,o=t/n,l=e/n,c=this.x*i,h=this.y*r,d=this.width*i,u=this.height*r;switch(this.rotation){case 0:return[c+o+s,r-h-l-u+a,c+o+d+s,r-h-l+a];case 90:return[c+l+s,r-h+o+a,c+l+u+s,r-h+o+d+a];case 180:return[c-o-d+s,r-h+l+a,c-o+s,r-h+l+u+a];case 270:return[c-l-u+s,r-h-o-d+a,c-l+s,r-h-o+a];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[n,i,r,s]=t,a=r-n,o=s-i;switch(this.rotation){case 0:return[n,e-s,a,o];case 90:return[n,e-i,o,a];case 180:return[r,e-i,a,o];case 270:return[r,e-s,o,a];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#D=!0}disableEditMode(){this.#D=!1}isInEditMode(){return this.#D}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){this.div?.addEventListener("focusin",this.#k);this.div?.addEventListener("focusout",this.#M)}serialize(){(0,r.unreachable)("An editor must be serializable")}static deserialize(t,e,n){const i=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:n});i.rotation=t.rotation;const[r,s]=i.pageDimensions,[a,o,l,c]=i.getRectInCurrentCoords(t.rect,s);i.x=a/r;i.y=o/s;i.width=l/r;i.height=c/s;return i}remove(){this.div.removeEventListener("focusin",this.#k);this.div.removeEventListener("focusout",this.#M);this.isEmpty()||this.commit();this.parent?this.parent.remove(this):this._uiManager.removeEditor(this);this.#x?.remove();this.#x=null;this.#w=null}get isResizable(){return!1}makeResizable(){if(this.isResizable){this.#U();this.#P.classList.remove("hidden")}}select(){this.makeResizable();this.div?.classList.add("selectedEditor")}unselect(){this.#P?.classList.add("hidden");this.div?.classList.remove("selectedEditor");this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(t,e){}disableEditing(){this.#x&&(this.#x.hidden=!0)}enableEditing(){this.#x&&(this.#x.hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return this.#R}set isEditing(t){this.#R=t;if(this.parent)if(t){this.parent.setSelected(this);this.parent.setActiveEditor(this)}else this.parent.setActiveEditor(null)}setAspectRatio(t,e){this.#T=!0;const n=t/e,{style:i}=this.div;i.aspectRatio=n;i.height="auto"}static get MIN_SIZE(){return 16}}e.AnnotationEditor=AnnotationEditor;class FakeEditor extends AnnotationEditor{constructor(t){super(t);this.annotationElementId=t.annotationElementId;this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.KeyboardManager=e.CommandManager=e.ColorManager=e.AnnotationEditorUIManager=void 0;e.bindEvents=function bindEvents(t,e,n){for(const i of n)e.addEventListener(i,t[i].bind(t))};e.opacityToHex=function opacityToHex(t){return Math.round(Math.min(255,Math.max(1,255*t))).toString(16).padStart(2,"0")};n(93);n(101);n(102);n(105);n(107);n(109);n(113);n(116);n(123);n(2);n(89);n(125);n(136);n(138);n(141);n(143);n(145);n(147);n(166);var i=n(1),r=n(168);class IdManager{#G=0;getId(){return`${i.AnnotationEditorPrefix}${this.#G++}`}}class ImageManager{#V=(0,i.getUuid)();#G=0;#$=null;static get _isSVGFittingCanvas(){const t=new OffscreenCanvas(1,3).getContext("2d"),e=new Image;e.src='data:image/svg+xml;charset=UTF-8,';const n=e.decode().then((()=>{t.drawImage(e,0,0,1,1,0,0,1,3);return 0===new Uint32Array(t.getImageData(0,0,1,1).data.buffer)[0]}));return(0,i.shadow)(this,"_isSVGFittingCanvas",n)}async#X(t,e){this.#$||=new Map;let n=this.#$.get(t);if(null===n)return null;if(n?.bitmap){n.refCounter+=1;return n}try{n||={bitmap:null,id:`image_${this.#V}_${this.#G++}`,refCounter:0,isSvg:!1};let t;if("string"==typeof e){n.url=e;const i=await fetch(e);if(!i.ok)throw new Error(i.statusText);t=await i.blob()}else t=n.file=e;if("image/svg+xml"===t.type){const e=ImageManager._isSVGFittingCanvas,i=new FileReader,r=new Image,s=new Promise(((t,s)=>{r.onload=()=>{n.bitmap=r;n.isSvg=!0;t()};i.onload=async()=>{const t=n.svgUrl=i.result;r.src=await e?`${t}#svgView(preserveAspectRatio(none))`:t};r.onerror=i.onerror=s}));i.readAsDataURL(t);await s}else n.bitmap=await createImageBitmap(t);n.refCounter=1}catch(t){console.error(t);n=null}this.#$.set(t,n);n&&this.#$.set(n.id,n);return n}async getFromFile(t){const{lastModified:e,name:n,size:i,type:r}=t;return this.#X(`${e}_${n}_${i}_${r}`,t)}async getFromUrl(t){return this.#X(t,t)}async getFromId(t){this.#$||=new Map;const e=this.#$.get(t);if(!e)return null;if(e.bitmap){e.refCounter+=1;return e}return e.file?this.getFromFile(e.file):this.getFromUrl(e.url)}getSvgUrl(t){const e=this.#$.get(t);return e?.isSvg?e.svgUrl:null}deleteId(t){this.#$||=new Map;const e=this.#$.get(t);if(e){e.refCounter-=1;0===e.refCounter&&(e.bitmap=null)}}isValidId(t){return t.startsWith(`image_${this.#V}_`)}}class CommandManager{#K=[];#Y=!1;#J;#Q=-1;constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;this.#J=t}add(t){let{cmd:e,undo:n,mustExec:i,type:r=NaN,overwriteIfSameType:s=!1,keepUndo:a=!1}=t;i&&e();if(this.#Y)return;const o={cmd:e,undo:n,type:r};if(-1===this.#Q){this.#K.length>0&&(this.#K.length=0);this.#Q=0;this.#K.push(o);return}if(s&&this.#K[this.#Q].type===r){a&&(o.undo=this.#K[this.#Q].undo);this.#K[this.#Q]=o;return}const l=this.#Q+1;if(l===this.#J)this.#K.splice(0,1);else{this.#Q=l;lt===e[n])))return ColorManager._colorsMapping.get(t);return e}getHexCode(t){const e=this._colors.get(t);return e?i.Util.makeHexColor(...e):t}}e.ColorManager=ColorManager;class AnnotationEditorUIManager{#tt=null;#et=new Map;#nt=new Map;#it=null;#rt=null;#st=new CommandManager;#at=0;#ot=new Set;#lt=null;#ct=null;#ht=new Set;#dt=null;#ut=new IdManager;#pt=!1;#ft=!1;#gt=null;#mt=i.AnnotationEditorType.NONE;#bt=new Set;#vt=null;#yt=this.blur.bind(this);#_t=this.focus.bind(this);#At=this.copy.bind(this);#St=this.cut.bind(this);#Et=this.paste.bind(this);#xt=this.keydown.bind(this);#wt=this.onEditingAction.bind(this);#Ct=this.onPageChanging.bind(this);#Tt=this.onScaleChanging.bind(this);#Pt=this.onRotationChanging.bind(this);#kt={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1};#Mt=[0,0];#Ft=null;#Rt=null;#Dt=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const t=AnnotationEditorUIManager.prototype,arrowChecker=t=>{const{activeElement:e}=document;return e&&t.#Rt.contains(e)&&t.hasSomethingToControl()},e=this.TRANSLATE_SMALL,n=this.TRANSLATE_BIG;return(0,i.shadow)(this,"_keyboardManager",new KeyboardManager([[["ctrl+a","mac+meta+a"],t.selectAll],[["ctrl+z","mac+meta+z"],t.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-e,0],checker:arrowChecker}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-n,0],checker:arrowChecker}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[e,0],checker:arrowChecker}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[n,0],checker:arrowChecker}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-e],checker:arrowChecker}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-n],checker:arrowChecker}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,e],checker:arrowChecker}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,n],checker:arrowChecker}]]))}constructor(t,e,n,i,s,a){this.#Rt=t;this.#Dt=e;this.#it=n;this._eventBus=i;this._eventBus._on("editingaction",this.#wt);this._eventBus._on("pagechanging",this.#Ct);this._eventBus._on("scalechanging",this.#Tt);this._eventBus._on("rotationchanging",this.#Pt);this.#rt=s.annotationStorage;this.#dt=s.filterFactory;this.#vt=a;this.viewParameters={realScale:r.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){this.#It();this.#Ot();this._eventBus._off("editingaction",this.#wt);this._eventBus._off("pagechanging",this.#Ct);this._eventBus._off("scalechanging",this.#Tt);this._eventBus._off("rotationchanging",this.#Pt);for(const t of this.#nt.values())t.destroy();this.#nt.clear();this.#et.clear();this.#ht.clear();this.#tt=null;this.#bt.clear();this.#st.destroy();this.#it.destroy()}get hcmFilter(){return(0,i.shadow)(this,"hcmFilter",this.#vt?this.#dt.addHCMFilter(this.#vt.foreground,this.#vt.background):"none")}get direction(){return(0,i.shadow)(this,"direction",getComputedStyle(this.#Rt).direction)}editAltText(t){this.#it?.editAltText(this,t)}onPageChanging(t){let{pageNumber:e}=t;this.#at=e-1}focusMainContainer(){this.#Rt.focus()}findParent(t,e){for(const n of this.#nt.values()){const{x:i,y:r,width:s,height:a}=n.div.getBoundingClientRect();if(t>=i&&t<=i+s&&e>=r&&e<=r+a)return n}return null}disableUserSelect(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.#Dt.classList.toggle("noUserSelect",t)}addShouldRescale(t){this.#ht.add(t)}removeShouldRescale(t){this.#ht.delete(t)}onScaleChanging(t){let{scale:e}=t;this.commitOrRemove();this.viewParameters.realScale=e*r.PixelsPerInch.PDF_TO_CSS_UNITS;for(const t of this.#ht)t.onScaleChanging()}onRotationChanging(t){let{pagesRotation:e}=t;this.commitOrRemove();this.viewParameters.rotation=e}addToAnnotationStorage(t){t.isEmpty()||!this.#rt||this.#rt.has(t.id)||this.#rt.setValue(t.id,t)}#Lt(){window.addEventListener("focus",this.#_t);window.addEventListener("blur",this.#yt)}#Ot(){window.removeEventListener("focus",this.#_t);window.removeEventListener("blur",this.#yt)}blur(){if(!this.hasSelection)return;const{activeElement:t}=document;for(const e of this.#bt)if(e.div.contains(t)){this.#gt=[e,t];e._focusEventsAllowed=!1;break}}focus(){if(!this.#gt)return;const[t,e]=this.#gt;this.#gt=null;e.addEventListener("focusin",(()=>{t._focusEventsAllowed=!0}),{once:!0});e.focus()}#Nt(){window.addEventListener("keydown",this.#xt,{capture:!0})}#It(){window.removeEventListener("keydown",this.#xt,{capture:!0})}#Bt(){document.addEventListener("copy",this.#At);document.addEventListener("cut",this.#St);document.addEventListener("paste",this.#Et)}#jt(){document.removeEventListener("copy",this.#At);document.removeEventListener("cut",this.#St);document.removeEventListener("paste",this.#Et)}addEditListeners(){this.#Nt();this.#Bt()}removeEditListeners(){this.#It();this.#jt()}copy(t){t.preventDefault();this.#tt?.commitOrRemove();if(!this.hasSelection)return;const e=[];for(const t of this.#bt){const n=t.serialize(!0);n&&e.push(n)}0!==e.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}cut(t){this.copy(t);this.delete()}paste(t){t.preventDefault();const{clipboardData:e}=t;for(const t of e.items)for(const e of this.#ct)if(e.isHandlingMimeForPasting(t.type)){e.paste(t,this.currentLayer);return}let n=e.getData("application/pdfjs");if(!n)return;try{n=JSON.parse(n)}catch(t){(0,i.warn)(`paste: "${t.message}".`);return}if(!Array.isArray(n))return;this.unselectAll();const r=this.currentLayer;try{const t=[];for(const e of n){const n=r.deserialize(e);if(!n)return;t.push(n)}const cmd=()=>{for(const e of t)this.#Ut(e);this.#zt(t)},undo=()=>{for(const e of t)e.remove()};this.addCommands({cmd:cmd,undo:undo,mustExec:!0})}catch(t){(0,i.warn)(`paste: "${t.message}".`)}}keydown(t){this.getActive()?.shouldGetKeyboardEvents()||AnnotationEditorUIManager._keyboardManager.exec(this,t)}onEditingAction(t){["undo","redo","delete","selectAll"].includes(t.name)&&this[t.name]()}#Wt(t){Object.entries(t).some((t=>{let[e,n]=t;return this.#kt[e]!==n}))&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#kt,t)})}#Ht(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){if(t){this.#Lt();this.#Nt();this.#Bt();this.#Wt({isEditing:this.#mt!==i.AnnotationEditorType.NONE,isEmpty:this.#qt(),hasSomethingToUndo:this.#st.hasSomethingToUndo(),hasSomethingToRedo:this.#st.hasSomethingToRedo(),hasSelectedEditor:!1})}else{this.#Ot();this.#It();this.#jt();this.#Wt({isEditing:!1});this.disableUserSelect(!1)}}registerEditorTypes(t){if(!this.#ct){this.#ct=t;for(const t of this.#ct)this.#Ht(t.defaultPropertiesToUpdate)}}getId(){return this.#ut.getId()}get currentLayer(){return this.#nt.get(this.#at)}getLayer(t){return this.#nt.get(t)}get currentPageIndex(){return this.#at}addLayer(t){this.#nt.set(t.pageIndex,t);this.#pt?t.enable():t.disable()}removeLayer(t){this.#nt.delete(t.pageIndex)}updateMode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.#mt!==t){this.#mt=t;if(t!==i.AnnotationEditorType.NONE){this.setEditingState(!0);this.#Gt();this.unselectAll();for(const e of this.#nt.values())e.updateMode(t);if(e)for(const t of this.#et.values())if(t.annotationElementId===e){this.setSelected(t);t.enterInEditMode();break}}else{this.setEditingState(!1);this.#Vt()}}}updateToolbar(t){t!==this.#mt&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}updateParams(t,e){if(this.#ct)if(t!==i.AnnotationEditorParamsType.CREATE){for(const n of this.#bt)n.updateParams(t,e);for(const n of this.#ct)n.updateDefaultParams(t,e)}else this.currentLayer.addNewEditor(t)}enableWaiting(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.#ft!==t){this.#ft=t;for(const e of this.#nt.values()){t?e.disableClick():e.enableClick();e.div.classList.toggle("waiting",t)}}}#Gt(){if(!this.#pt){this.#pt=!0;for(const t of this.#nt.values())t.enable()}}#Vt(){this.unselectAll();if(this.#pt){this.#pt=!1;for(const t of this.#nt.values())t.disable()}}getEditors(t){const e=[];for(const n of this.#et.values())n.pageIndex===t&&e.push(n);return e}getEditor(t){return this.#et.get(t)}addEditor(t){this.#et.set(t.id,t)}removeEditor(t){this.#et.delete(t.id);this.unselect(t);t.annotationElementId&&this.#ot.has(t.annotationElementId)||this.#rt?.remove(t.id)}addDeletedAnnotationElement(t){this.#ot.add(t.annotationElementId);t.deleted=!0}isDeletedAnnotationElement(t){return this.#ot.has(t)}removeDeletedAnnotationElement(t){this.#ot.delete(t.annotationElementId);t.deleted=!1}#Ut(t){const e=this.#nt.get(t.pageIndex);e?e.addOrRebuild(t):this.addEditor(t)}setActiveEditor(t){if(this.#tt!==t){this.#tt=t;t&&this.#Ht(t.propertiesToUpdate)}}toggleSelected(t){if(this.#bt.has(t)){this.#bt.delete(t);t.unselect();this.#Wt({hasSelectedEditor:this.hasSelection})}else{this.#bt.add(t);t.select();this.#Ht(t.propertiesToUpdate);this.#Wt({hasSelectedEditor:!0})}}setSelected(t){for(const e of this.#bt)e!==t&&e.unselect();this.#bt.clear();this.#bt.add(t);t.select();this.#Ht(t.propertiesToUpdate);this.#Wt({hasSelectedEditor:!0})}isSelected(t){return this.#bt.has(t)}unselect(t){t.unselect();this.#bt.delete(t);this.#Wt({hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==this.#bt.size}undo(){this.#st.undo();this.#Wt({hasSomethingToUndo:this.#st.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#qt()})}redo(){this.#st.redo();this.#Wt({hasSomethingToUndo:!0,hasSomethingToRedo:this.#st.hasSomethingToRedo(),isEmpty:this.#qt()})}addCommands(t){this.#st.add(t);this.#Wt({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#qt()})}#qt(){if(0===this.#et.size)return!0;if(1===this.#et.size)for(const t of this.#et.values())return t.isEmpty();return!1}delete(){this.commitOrRemove();if(!this.hasSelection)return;const t=[...this.#bt];this.addCommands({cmd:()=>{for(const e of t)e.remove()},undo:()=>{for(const e of t)this.#Ut(e)},mustExec:!0})}commitOrRemove(){this.#tt?.commitOrRemove()}hasSomethingToControl(){return this.#tt||this.hasSelection}#zt(t){this.#bt.clear();for(const e of t)if(!e.isEmpty()){this.#bt.add(e);e.select()}this.#Wt({hasSelectedEditor:!0})}selectAll(){for(const t of this.#bt)t.commit();this.#zt(this.#et.values())}unselectAll(){if(this.#tt)this.#tt.commitOrRemove();else if(this.hasSelection){for(const t of this.#bt)t.unselect();this.#bt.clear();this.#Wt({hasSelectedEditor:!1})}}translateSelectedEditors(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove();if(!this.hasSelection)return;this.#Mt[0]+=t;this.#Mt[1]+=e;const[n,i]=this.#Mt,r=[...this.#bt];this.#Ft&&clearTimeout(this.#Ft);this.#Ft=setTimeout((()=>{this.#Ft=null;this.#Mt[0]=this.#Mt[1]=0;this.addCommands({cmd:()=>{for(const t of r)this.#et.has(t.id)&&t.translateInPage(n,i)},undo:()=>{for(const t of r)this.#et.has(t.id)&&t.translateInPage(-n,-i)},mustExec:!1})}),1e3);for(const n of r)n.translateInPage(t,e)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0);this.#lt=new Map;for(const t of this.#bt)this.#lt.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#lt)return!1;this.disableUserSelect(!1);const t=this.#lt;this.#lt=null;let e=!1;for(const[{x:n,y:i,pageIndex:r},s]of t){s.newX=n;s.newY=i;s.newPageIndex=r;e||=n!==s.savedX||i!==s.savedY||r!==s.savedPageIndex}if(!e)return!1;const move=(t,e,n,i)=>{if(this.#et.has(t.id)){const r=this.#nt.get(i);if(r)t._setParentAndPosition(r,e,n);else{t.pageIndex=i;t.x=e;t.y=n}}};this.addCommands({cmd:()=>{for(const[e,{newX:n,newY:i,newPageIndex:r}]of t)move(e,n,i,r)},undo:()=>{for(const[e,{savedX:n,savedY:i,savedPageIndex:r}]of t)move(e,n,i,r)},mustExec:!0});return!0}dragSelectedEditors(t,e){if(this.#lt)for(const n of this.#lt.keys())n.drag(t,e)}rebuild(t){if(null===t.parent){const e=this.getLayer(t.pageIndex);if(e){e.changeParent(t);e.addOrRebuild(t)}else{this.addEditor(t);this.addToAnnotationStorage(t);t.rebuild()}}else t.parent.addOrRebuild(t)}isActive(t){return this.#tt===t}getActive(){return this.#tt}getMode(){return this.#mt}get imageManager(){return(0,i.shadow)(this,"imageManager",new ImageManager)}}e.AnnotationEditorUIManager=AnnotationEditorUIManager},(t,e,n)=>{var i=n(3),r=n(6),s=n(4),a=n(24),o=n(14),l=n(8),c=n(21),h=n(20),d=n(91),u=n(39),p=n(77),f=n(64),g=n(159),m=n(7),b=n(167),v=n(27),y=s.JSON,_=s.Number,A=s.SyntaxError,S=y&&y.parse,E=a("Object","keys"),x=Object.getOwnPropertyDescriptor,w=o("".charAt),C=o("".slice),T=o(/./.exec),P=o([].push),k=/^\d$/,M=/^[1-9]$/,R=/^(?:-|\d)$/,D=/^[\t\n\r ]$/,internalize=function(t,e,n,i){var r,s,a,o,c,p=t[e],g=i&&p===i.value,m=g&&"string"==typeof i.source?{source:i.source}:{};if(h(p)){var b=d(p),v=g?i.nodes:b?[]:{};if(b){r=v.length;a=f(p);for(o=0;o{var i=n(14),r=n(39),s=SyntaxError,a=parseInt,o=String.fromCharCode,l=i("".charAt),c=i("".slice),h=i(/./.exec),d={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},u=/^[\da-f]{4}$/i,p=/^[\u0000-\u001F]$/;t.exports=function(t,e){for(var n=!0,i="";e{Object.defineProperty(e,"__esModule",{value:!0});e.StatTimer=e.RenderingCancelledException=e.PixelsPerInch=e.PageViewport=e.PDFDateString=e.DOMStandardFontDataFactory=e.DOMSVGFactory=e.DOMFilterFactory=e.DOMCanvasFactory=e.DOMCMapReaderFactory=void 0;e.deprecated=function deprecated(t){console.log("Deprecated API usage: "+t)};e.getColorValues=function getColorValues(t){const e=document.createElement("span");e.style.visibility="hidden";document.body.append(e);for(const n of t.keys()){e.style.color=n;const i=window.getComputedStyle(e).color;t.set(n,getRGB(i))}e.remove()};e.getCurrentTransform=function getCurrentTransform(t){const{a:e,b:n,c:i,d:r,e:s,f:a}=t.getTransform();return[e,n,i,r,s,a]};e.getCurrentTransformInverse=function getCurrentTransformInverse(t){const{a:e,b:n,c:i,d:r,e:s,f:a}=t.getTransform().invertSelf();return[e,n,i,r,s,a]};e.getFilenameFromUrl=function getFilenameFromUrl(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||([t]=t.split(/[#?]/,1));return t.substring(t.lastIndexOf("/")+1)};e.getPdfFilenameFromUrl=function getPdfFilenameFromUrl(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof t)return e;if(isDataScheme(t)){(0,r.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.');return e}const n=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(t);let s=n.exec(i[1])||n.exec(i[2])||n.exec(i[3]);if(s){s=s[0];if(s.includes("%"))try{s=n.exec(decodeURIComponent(s))[0]}catch{}}return s||e};e.getRGB=getRGB;e.getXfaPageViewport=function getXfaPageViewport(t,e){let{scale:n=1,rotation:i=0}=e;const{width:r,height:s}=t.attributes.style,a=[0,0,parseInt(r),parseInt(s)];return new PageViewport({viewBox:a,scale:n,rotation:i})};e.isDataScheme=isDataScheme;e.isPdfFile=function isPdfFile(t){return"string"==typeof t&&/\.pdf$/i.test(t)};e.isValidFetchUrl=isValidFetchUrl;e.loadScript=function loadScript(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(((n,i)=>{const r=document.createElement("script");r.src=t;r.onload=function(t){e&&r.remove();n(t)};r.onerror=function(){i(new Error(`Cannot load script at: ${r.src}`))};(document.head||document.documentElement).append(r)}))};e.noContextMenu=function noContextMenu(t){t.preventDefault()};e.setLayerDimensions=function setLayerDimensions(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e instanceof PageViewport){const{pageWidth:i,pageHeight:s}=e.rawDims,{style:a}=t,o=r.FeatureTest.isCSSRoundSupported,l=`var(--scale-factor) * ${i}px`,c=`var(--scale-factor) * ${s}px`,h=o?`round(${l}, 1px)`:`calc(${l})`,d=o?`round(${c}, 1px)`:`calc(${c})`;if(n&&e.rotation%180!=0){a.width=d;a.height=h}else{a.width=h;a.height=d}}i&&t.setAttribute("data-main-rotation",e.rotation)};n(2);n(93);n(101);n(102);n(105);n(107);n(109);n(113);n(116);n(123);n(89);n(84);n(86);n(87);var i=n(169),r=n(1);const s="http://www.w3.org/2000/svg";class PixelsPerInch{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}e.PixelsPerInch=PixelsPerInch;class DOMFilterFactory extends i.BaseFilterFactory{#$t;#Xt;#e;#Kt;#Yt;#Jt;#Qt;#Zt;#te;#ee;#G=0;constructor(){let{docId:t,ownerDocument:e=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super();this.#e=t;this.#Kt=e}get#$(){return this.#$t||=new Map}get#ne(){if(!this.#Xt){const t=this.#Kt.createElement("div"),{style:e}=t;e.visibility="hidden";e.contain="strict";e.width=e.height=0;e.position="absolute";e.top=e.left=0;e.zIndex=-1;const n=this.#Kt.createElementNS(s,"svg");n.setAttribute("width",0);n.setAttribute("height",0);this.#Xt=this.#Kt.createElementNS(s,"defs");t.append(n);n.append(this.#Xt);this.#Kt.body.append(t)}return this.#Xt}addFilter(t){if(!t)return"none";let e,n,i,r,s=this.#$.get(t);if(s)return s;if(1===t.length){const s=t[0],a=new Array(256);for(let t=0;t<256;t++)a[t]=s[t]/255;r=e=n=i=a.join(",")}else{const[s,a,o]=t,l=new Array(256),c=new Array(256),h=new Array(256);for(let t=0;t<256;t++){l[t]=s[t]/255;c[t]=a[t]/255;h[t]=o[t]/255}e=l.join(",");n=c.join(",");i=h.join(",");r=`${e}${n}${i}`}s=this.#$.get(r);if(s){this.#$.set(t,s);return s}const a=`g_${this.#e}_transfer_map_${this.#G++}`,o=`url(#${a})`;this.#$.set(t,o);this.#$.set(r,o);const l=this.#ie(a);this.#re(e,n,i,l);return o}addHCMFilter(t,e){const n=`${t}-${e}`;if(this.#Jt===n)return this.#Qt;this.#Jt=n;this.#Qt="none";this.#Yt?.remove();if(!t||!e)return this.#Qt;const i=this.#se(t);t=r.Util.makeHexColor(...i);const s=this.#se(e);e=r.Util.makeHexColor(...s);this.#ne.style.color="";if("#000000"===t&&"#ffffff"===e||t===e)return this.#Qt;const a=new Array(256);for(let t=0;t<=255;t++){const e=t/255;a[t]=e<=.03928?e/12.92:((e+.055)/1.055)**2.4}const o=a.join(","),l=`g_${this.#e}_hcm_filter`,c=this.#Zt=this.#ie(l);this.#re(o,o,o,c);this.#ae(c);const getSteps=(t,e)=>{const n=i[t]/255,r=s[t]/255,a=new Array(e+1);for(let t=0;t<=e;t++)a[t]=n+t/e*(r-n);return a.join(",")};this.#re(getSteps(0,5),getSteps(1,5),getSteps(2,5),c);this.#Qt=`url(#${l})`;return this.#Qt}addHighlightHCMFilter(t,e,n,i){const r=`${t}-${e}-${n}-${i}`;if(this.#te===r)return this.#ee;this.#te=r;this.#ee="none";this.#Zt?.remove();if(!t||!e)return this.#ee;const[s,a]=[t,e].map(this.#se.bind(this));let o=Math.round(.2126*s[0]+.7152*s[1]+.0722*s[2]),l=Math.round(.2126*a[0]+.7152*a[1]+.0722*a[2]),[c,h]=[n,i].map(this.#se.bind(this));l{const i=new Array(256),r=(l-o)/n,s=t/255,a=(e-t)/(255*n);let c=0;for(let t=0;t<=n;t++){const e=Math.round(o+t*r),n=s+t*a;for(let t=c;t<=e;t++)i[t]=n;c=e+1}for(let t=c;t<256;t++)i[t]=i[c-1];return i.join(",")},d=`g_${this.#e}_hcm_highlight_filter`,u=this.#Zt=this.#ie(d);this.#ae(u);this.#re(getSteps(c[0],h[0],5),getSteps(c[1],h[1],5),getSteps(c[2],h[2],5),u);this.#ee=`url(#${d})`;return this.#ee}destroy(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])||!this.#Qt&&!this.#ee){if(this.#Xt){this.#Xt.parentNode.parentNode.remove();this.#Xt=null}if(this.#$t){this.#$t.clear();this.#$t=null}this.#G=0}}#ae(t){const e=this.#Kt.createElementNS(s,"feColorMatrix");e.setAttribute("type","matrix");e.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0");t.append(e)}#ie(t){const e=this.#Kt.createElementNS(s,"filter");e.setAttribute("color-interpolation-filters","sRGB");e.setAttribute("id",t);this.#ne.append(e);return e}#oe(t,e,n){const i=this.#Kt.createElementNS(s,e);i.setAttribute("type","discrete");i.setAttribute("tableValues",n);t.append(i)}#re(t,e,n,i){const r=this.#Kt.createElementNS(s,"feComponentTransfer");i.append(r);this.#oe(r,"feFuncR",t);this.#oe(r,"feFuncG",e);this.#oe(r,"feFuncB",n)}#se(t){this.#ne.style.color=t;return getRGB(getComputedStyle(this.#ne).getPropertyValue("color"))}}e.DOMFilterFactory=DOMFilterFactory;class DOMCanvasFactory extends i.BaseCanvasFactory{constructor(){let{ownerDocument:t=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super();this._document=t}_createCanvas(t,e){const n=this._document.createElement("canvas");n.width=t;n.height=e;return n}}e.DOMCanvasFactory=DOMCanvasFactory;async function fetchData(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(isValidFetchUrl(t,document.baseURI)){const n=await fetch(t);if(!n.ok)throw new Error(n.statusText);return e?new Uint8Array(await n.arrayBuffer()):(0,r.stringToBytes)(await n.text())}return new Promise(((n,i)=>{const s=new XMLHttpRequest;s.open("GET",t,!0);e&&(s.responseType="arraybuffer");s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE){if(200===s.status||0===s.status){let t;e&&s.response?t=new Uint8Array(s.response):!e&&s.responseText&&(t=(0,r.stringToBytes)(s.responseText));if(t){n(t);return}}i(new Error(s.statusText))}};s.send(null)}))}class DOMCMapReaderFactory extends i.BaseCMapReaderFactory{_fetchData(t,e){return fetchData(t,this.isCompressed).then((t=>({cMapData:t,compressionType:e})))}}e.DOMCMapReaderFactory=DOMCMapReaderFactory;class DOMStandardFontDataFactory extends i.BaseStandardFontDataFactory{_fetchData(t){return fetchData(t,!0)}}e.DOMStandardFontDataFactory=DOMStandardFontDataFactory;class DOMSVGFactory extends i.BaseSVGFactory{_createSVG(t){return document.createElementNS(s,t)}}e.DOMSVGFactory=DOMSVGFactory;class PageViewport{constructor(t){let{viewBox:e,scale:n,rotation:i,offsetX:r=0,offsetY:s=0,dontFlip:a=!1}=t;this.viewBox=e;this.scale=n;this.rotation=i;this.offsetX=r;this.offsetY=s;const o=(e[2]+e[0])/2,l=(e[3]+e[1])/2;let c,h,d,u,p,f,g,m;i%=360;i<0&&(i+=360);switch(i){case 180:c=-1;h=0;d=0;u=1;break;case 90:c=0;h=1;d=1;u=0;break;case 270:c=0;h=-1;d=-1;u=0;break;case 0:c=1;h=0;d=0;u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}if(a){d=-d;u=-u}if(0===c){p=Math.abs(l-e[1])*n+r;f=Math.abs(o-e[0])*n+s;g=(e[3]-e[1])*n;m=(e[2]-e[0])*n}else{p=Math.abs(o-e[0])*n+r;f=Math.abs(l-e[1])*n+s;g=(e[2]-e[0])*n;m=(e[3]-e[1])*n}this.transform=[c*n,h*n,d*n,u*n,p-c*n*o-d*n*l,f-h*n*o-u*n*l];this.width=g;this.height=m}get rawDims(){const{viewBox:t}=this;return(0,r.shadow)(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone(){let{scale:t=this.scale,rotation:e=this.rotation,offsetX:n=this.offsetX,offsetY:i=this.offsetY,dontFlip:r=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new PageViewport({viewBox:this.viewBox.slice(),scale:t,rotation:e,offsetX:n,offsetY:i,dontFlip:r})}convertToViewportPoint(t,e){return r.Util.applyTransform([t,e],this.transform)}convertToViewportRectangle(t){const e=r.Util.applyTransform([t[0],t[1]],this.transform),n=r.Util.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],n[0],n[1]]}convertToPdfPoint(t,e){return r.Util.applyInverseTransform([t,e],this.transform)}}e.PageViewport=PageViewport;class RenderingCancelledException extends r.BaseException{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;super(t,"RenderingCancelledException");this.extraDelay=e}}e.RenderingCancelledException=RenderingCancelledException;function isDataScheme(t){const e=t.length;let n=0;for(;n=1&&i<=12?i-1:0;let r=parseInt(e[3],10);r=r>=1&&r<=31?r:1;let s=parseInt(e[4],10);s=s>=0&&s<=23?s:0;let o=parseInt(e[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(e[6],10);l=l>=0&&l<=59?l:0;const c=e[7]||"Z";let h=parseInt(e[8],10);h=h>=0&&h<=23?h:0;let d=parseInt(e[9],10)||0;d=d>=0&&d<=59?d:0;if("-"===c){s+=h;o+=d}else if("+"===c){s-=h;o-=d}return new Date(Date.UTC(n,i,r,s,o,l))}};function getRGB(t){if(t.startsWith("#")){const e=parseInt(t.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}if(t.startsWith("rgb("))return t.slice(4,-1).split(",").map((t=>parseInt(t)));if(t.startsWith("rgba("))return t.slice(5,-1).split(",").map((t=>parseInt(t))).slice(0,3);(0,r.warn)(`Not a valid color format: "${t}"`);return[0,0,0]}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.BaseStandardFontDataFactory=e.BaseSVGFactory=e.BaseFilterFactory=e.BaseCanvasFactory=e.BaseCMapReaderFactory=void 0;n(2);var i=n(1);class BaseFilterFactory{constructor(){this.constructor===BaseFilterFactory&&(0,i.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addHighlightHCMFilter(t,e,n,i){return"none"}destroy(){}}e.BaseFilterFactory=BaseFilterFactory;class BaseCanvasFactory{constructor(){this.constructor===BaseCanvasFactory&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const n=this._createCanvas(t,e);return{canvas:n,context:n.getContext("2d")}}reset(t,e,n){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||n<=0)throw new Error("Invalid canvas size");t.canvas.width=e;t.canvas.height=n}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0;t.canvas.height=0;t.canvas=null;t.context=null}_createCanvas(t,e){(0,i.unreachable)("Abstract method `_createCanvas` called.")}}e.BaseCanvasFactory=BaseCanvasFactory;class BaseCMapReaderFactory{constructor(t){let{baseUrl:e=null,isCompressed:n=!0}=t;this.constructor===BaseCMapReaderFactory&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory.");this.baseUrl=e;this.isCompressed=n}async fetch(t){let{name:e}=t;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw new Error("CMap name must be specified.");const n=this.baseUrl+e+(this.isCompressed?".bcmap":""),r=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE;return this._fetchData(n,r).catch((t=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${n}`)}))}_fetchData(t,e){(0,i.unreachable)("Abstract method `_fetchData` called.")}}e.BaseCMapReaderFactory=BaseCMapReaderFactory;class BaseStandardFontDataFactory{constructor(t){let{baseUrl:e=null}=t;this.constructor===BaseStandardFontDataFactory&&(0,i.unreachable)("Cannot initialize BaseStandardFontDataFactory.");this.baseUrl=e}async fetch(t){let{filename:e}=t;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!e)throw new Error("Font filename must be specified.");const n=`${this.baseUrl}${e}`;return this._fetchData(n).catch((t=>{throw new Error(`Unable to load font data at: ${n}`)}))}_fetchData(t){(0,i.unreachable)("Abstract method `_fetchData` called.")}}e.BaseStandardFontDataFactory=BaseStandardFontDataFactory;class BaseSVGFactory{constructor(){this.constructor===BaseSVGFactory&&(0,i.unreachable)("Cannot initialize BaseSVGFactory.")}create(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");i.setAttribute("version","1.1");if(!n){i.setAttribute("width",`${t}px`);i.setAttribute("height",`${e}px`)}i.setAttribute("preserveAspectRatio","none");i.setAttribute("viewBox",`0 0 ${t} ${e}`);return i}createElement(t){if("string"!=typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){(0,i.unreachable)("Abstract method `_createSVG` called.")}}e.BaseSVGFactory=BaseSVGFactory},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.MurmurHash3_64=void 0;n(93);n(101);n(102);n(105);n(107);n(109);n(113);n(116);n(123);n(2);var i=n(1);const r=3285377520,s=4294901760,a=65535;e.MurmurHash3_64=class MurmurHash3_64{constructor(t){this.h1=t?4294967295&t:r;this.h2=t?4294967295&t:r}update(t){let e,n;if("string"==typeof t){e=new Uint8Array(2*t.length);n=0;for(let i=0,r=t.length;i>>8;e[n++]=255&r}}}else{if(!(0,i.isArrayBuffer)(t))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");e=t.slice();n=e.byteLength}const r=n>>2,o=n-4*r,l=new Uint32Array(e.buffer,0,r);let c=0,h=0,d=this.h1,u=this.h2;const p=3432918353,f=461845907,g=11601,m=13715;for(let t=0;t>>17;c=c*f&s|c*m&a;d^=c;d=d<<13|d>>>19;d=5*d+3864292196}else{h=l[t];h=h*p&s|h*g&a;h=h<<15|h>>>17;h=h*f&s|h*m&a;u^=h;u=u<<13|u>>>19;u=5*u+3864292196}c=0;switch(o){case 3:c^=e[4*r+2]<<16;case 2:c^=e[4*r+1]<<8;case 1:c^=e[4*r];c=c*p&s|c*g&a;c=c<<15|c>>>17;c=c*f&s|c*m&a;1&r?d^=c:u^=c}this.h1=d;this.h2=u}hexdigest(){let t=this.h1,e=this.h2;t^=e>>>1;t=3981806797*t&s|36045*t&a;e=4283543511*e&s|(2950163797*(e<<16|t>>>16)&s)>>>16;t^=e>>>1;t=444984403*t&s|60499*t&a;e=3301882366*e&s|(3120437893*(e<<16|t>>>16)&s)>>>16;t^=e>>>1;return(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.FontLoader=e.FontFaceObject=void 0;n(125);n(136);n(138);n(141);n(143);n(145);n(147);n(89);n(149);var i=n(1);e.FontLoader=class FontLoader{#le=new Set;constructor(t){let{ownerDocument:e=globalThis.document,styleElement:n=null}=t;this._document=e;this.nativeFontFaces=new Set;this.styleElement=null;this.loadingRequests=[];this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t);this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t);this._document.fonts.delete(t)}insertRule(t){if(!this.styleElement){this.styleElement=this._document.createElement("style");this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement)}const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear();this.#le.clear();if(this.styleElement){this.styleElement.remove();this.styleElement=null}}async loadSystemFont(t){if(t&&!this.#le.has(t.loadedName)){(0,i.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set.");if(this.isFontLoadingAPISupported){const{loadedName:e,src:n,style:r}=t,s=new FontFace(e,n,r);this.addNativeFontFace(s);try{await s.load();this.#le.add(e)}catch{(0,i.warn)(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`);this.removeNativeFontFace(s)}}else(0,i.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;t.attached=!0;if(t.systemFontInfo){await this.loadSystemFont(t.systemFontInfo);return}if(this.isFontLoadingAPISupported){const e=t.createNativeFontFace();if(e){this.addNativeFontFace(e);try{await e.loaded}catch(n){(0,i.warn)(`Failed to load font '${e.family}': '${n}'.`);t.disableFontFace=!0;throw n}}return}const e=t.createFontFaceRule();if(e){this.insertRule(e);if(this.isSyncFontLoadingSupported)return;await new Promise((e=>{const n=this._queueLoadingCallback(e);this._prepareFontLoadEvent(t,n)}))}}get isFontLoadingAPISupported(){const t=!!this._document?.fonts;return(0,i.shadow)(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){let t=!1;(i.isNodeJS||"undefined"!=typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0);return(0,i.shadow)(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){const{loadingRequests:e}=this,n={done:!1,complete:function completeRequest(){(0,i.assert)(!n.done,"completeRequest() cannot be called twice.");n.done=!0;for(;e.length>0&&e[0].done;){const t=e.shift();setTimeout(t.callback,0)}},callback:t};e.push(n);return n}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,i.shadow)(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,e){function int32(t,e){return t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|255&t.charCodeAt(e+3)}function spliceString(t,e,n,i){return t.substring(0,e)+i+t.substring(e+n)}let n,r;const s=this._document.createElement("canvas");s.width=1;s.height=1;const a=s.getContext("2d");let o=0;const l=`lt${Date.now()}${this.loadTestFontId++}`;let c=this._loadTestFont;c=spliceString(c,976,l.length,l);const h=1482184792;let d=int32(c,16);for(n=0,r=l.length-3;n30){(0,i.warn)("Load test font never loaded.");e();return}a.font="30px "+t;a.fillText(".",0,20);a.getImageData(0,0,1,1).data[3]>0?e():setTimeout(isFontReady.bind(null,t,e))}(l,(()=>{p.remove();e.complete()}))}};e.FontFaceObject=class FontFaceObject{constructor(t,e){let{isEvalSupported:n=!0,disableFontFace:i=!1,ignoreErrors:r=!1,inspectFont:s=null}=e;this.compiledGlyphs=Object.create(null);for(const e in t)this[e]=t[e];this.isEvalSupported=!1!==n;this.disableFontFace=!0===i;this.ignoreErrors=!0===r;this._inspectFont=s}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let t;if(this.cssFontInfo){const e={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(e.style=`oblique ${this.cssFontInfo.italicAngle}deg`);t=new FontFace(this.cssFontInfo.fontFamily,this.data,e)}else t=new FontFace(this.loadedName,this.data,{});this._inspectFont?.(this);return t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=(0,i.bytesToString)(this.data),e=`url(data:${this.mimetype};base64,${btoa(t)});`;let n;if(this.cssFontInfo){let t=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(t+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`);n=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${t}src:${e}}`}else n=`@font-face {font-family:"${this.loadedName}";src:${e}}`;this._inspectFont?.(this,e);return n}getPathGenerator(t,e){if(void 0!==this.compiledGlyphs[e])return this.compiledGlyphs[e];let n;try{n=t.get(this.loadedName+"_path_"+e)}catch(t){if(!this.ignoreErrors)throw t;(0,i.warn)(`getPathGenerator - ignoring character: "${t}".`);return this.compiledGlyphs[e]=function(t,e){}}if(this.isEvalSupported&&i.FeatureTest.isEvalSupported){const t=[];for(const e of n){const n=void 0!==e.args?e.args.join(","):"";t.push("c.",e.cmd,"(",n,");\n")}return this.compiledGlyphs[e]=new Function("c","size",t.join(""))}return this.compiledGlyphs[e]=function(t,e){for(const i of n){"scale"===i.cmd&&(i.args=[e,-e]);t[i.cmd].apply(t,i.args)}}}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.NodeStandardFontDataFactory=e.NodeFilterFactory=e.NodeCanvasFactory=e.NodeCMapReaderFactory=void 0;n(2);n(93);n(101);n(102);n(105);n(107);n(109);n(113);n(116);n(123);var i=n(169),r=n(1);!function checkDOMMatrix(){if(!globalThis.DOMMatrix&&r.isNodeJS)try{globalThis.DOMMatrix=require("canvas").DOMMatrix}catch(t){(0,r.warn)(`Cannot polyfill \`DOMMatrix\`, rendering may be broken: "${t}".`)}}();!function checkPath2D(){if(!globalThis.Path2D&&r.isNodeJS)try{const{CanvasRenderingContext2D:t}=require("canvas"),{polyfillPath2D:e}=require("path2d-polyfill");globalThis.CanvasRenderingContext2D=t;e(globalThis)}catch(t){(0,r.warn)(`Cannot polyfill \`Path2D\`, rendering may be broken: "${t}".`)}}();const fetchData=function(t){return new Promise(((e,n)=>{require("fs").readFile(t,((t,i)=>{!t&&i?e(new Uint8Array(i)):n(new Error(t))}))}))};class NodeFilterFactory extends i.BaseFilterFactory{}e.NodeFilterFactory=NodeFilterFactory;class NodeCanvasFactory extends i.BaseCanvasFactory{_createCanvas(t,e){return require("canvas").createCanvas(t,e)}}e.NodeCanvasFactory=NodeCanvasFactory;class NodeCMapReaderFactory extends i.BaseCMapReaderFactory{_fetchData(t,e){return fetchData(t).then((t=>({cMapData:t,compressionType:e})))}}e.NodeCMapReaderFactory=NodeCMapReaderFactory;class NodeStandardFontDataFactory extends i.BaseStandardFontDataFactory{_fetchData(t){return fetchData(t)}}e.NodeStandardFontDataFactory=NodeStandardFontDataFactory},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.CanvasGraphics=void 0;n(2);n(93);n(101);n(102);n(105);n(107);n(109);n(113);n(116);n(123);n(89);var i=n(1),r=n(168),s=n(174),a=n(175);const o=4096,l=16;class CachedCanvases{constructor(t){this.canvasFactory=t;this.cache=Object.create(null)}getCanvas(t,e,n){let i;if(void 0!==this.cache[t]){i=this.cache[t];this.canvasFactory.reset(i,e,n)}else{i=this.canvasFactory.create(e,n);this.cache[t]=i}return i}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const e=this.cache[t];this.canvasFactory.destroy(e);delete this.cache[t]}}}function drawImageAtIntegerCoords(t,e,n,i,s,a,o,l,c,h){const[d,u,p,f,g,m]=(0,r.getCurrentTransform)(t);if(0===u&&0===p){const r=o*d+g,b=Math.round(r),v=l*f+m,y=Math.round(v),_=(o+c)*d+g,A=Math.abs(Math.round(_)-b)||1,S=(l+h)*f+m,E=Math.abs(Math.round(S)-y)||1;t.setTransform(Math.sign(d),0,0,Math.sign(f),b,y);t.drawImage(e,n,i,s,a,0,0,A,E);t.setTransform(d,u,p,f,g,m);return[A,E]}if(0===d&&0===f){const r=l*p+g,b=Math.round(r),v=o*u+m,y=Math.round(v),_=(l+h)*p+g,A=Math.abs(Math.round(_)-b)||1,S=(o+c)*u+m,E=Math.abs(Math.round(S)-y)||1;t.setTransform(0,Math.sign(u),Math.sign(p),0,b,y);t.drawImage(e,n,i,s,a,0,0,E,A);t.setTransform(d,u,p,f,g,m);return[E,A]}t.drawImage(e,n,i,s,a,o,l,c,h);return[Math.hypot(d,u)*c,Math.hypot(p,f)*h]}class CanvasExtraState{constructor(t,e){this.alphaIsShape=!1;this.fontSize=0;this.fontSizeScale=1;this.textMatrix=i.IDENTITY_MATRIX;this.textMatrixScale=1;this.fontMatrix=i.FONT_IDENTITY_MATRIX;this.leading=0;this.x=0;this.y=0;this.lineX=0;this.lineY=0;this.charSpacing=0;this.wordSpacing=0;this.textHScale=1;this.textRenderingMode=i.TextRenderingMode.FILL;this.textRise=0;this.fillColor="#000000";this.strokeColor="#000000";this.patternFill=!1;this.fillAlpha=1;this.strokeAlpha=1;this.lineWidth=1;this.activeSMask=null;this.transferMaps="none";this.startNewPathAndClipBox([0,0,t,e])}clone(){const t=Object.create(this);t.clipBox=this.clipBox.slice();return t}setCurrentPoint(t,e){this.x=t;this.y=e}updatePathMinMax(t,e,n){[e,n]=i.Util.applyTransform([e,n],t);this.minX=Math.min(this.minX,e);this.minY=Math.min(this.minY,n);this.maxX=Math.max(this.maxX,e);this.maxY=Math.max(this.maxY,n)}updateRectMinMax(t,e){const n=i.Util.applyTransform(e,t),r=i.Util.applyTransform(e.slice(2),t);this.minX=Math.min(this.minX,n[0],r[0]);this.minY=Math.min(this.minY,n[1],r[1]);this.maxX=Math.max(this.maxX,n[0],r[0]);this.maxY=Math.max(this.maxY,n[1],r[1])}updateScalingPathMinMax(t,e){i.Util.scaleMinMax(t,e);this.minX=Math.min(this.minX,e[0]);this.maxX=Math.max(this.maxX,e[1]);this.minY=Math.min(this.minY,e[2]);this.maxY=Math.max(this.maxY,e[3])}updateCurvePathMinMax(t,e,n,r,s,a,o,l,c,h){const d=i.Util.bezierBoundingBox(e,n,r,s,a,o,l,c);if(h){h[0]=Math.min(h[0],d[0],d[2]);h[1]=Math.max(h[1],d[0],d[2]);h[2]=Math.min(h[2],d[1],d[3]);h[3]=Math.max(h[3],d[1],d[3])}else this.updateRectMinMax(t,d)}getPathBoundingBox(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.PathType.FILL,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[this.minX,this.minY,this.maxX,this.maxY];if(t===s.PathType.STROKE){e||(0,i.unreachable)("Stroke bounding box must include transform.");const t=i.Util.singularValueDecompose2dScale(e),r=t[0]*this.lineWidth/2,s=t[1]*this.lineWidth/2;n[0]-=r;n[1]-=s;n[2]+=r;n[3]+=s}return n}updateClipFromPath(){const t=i.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(t){this.clipBox=t;this.minX=1/0;this.minY=1/0;this.maxX=0;this.maxY=0}getClippedPathBoundingBox(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.PathType.FILL,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return i.Util.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function putBinaryImageData(t,e){if("undefined"!=typeof ImageData&&e instanceof ImageData){t.putImageData(e,0,0);return}const n=e.height,r=e.width,s=n%l,a=(n-s)/l,o=0===s?a:a+1,c=t.createImageData(r,l);let h,d=0;const u=e.data,p=c.data;let f,g,m,b;if(e.kind===i.ImageKind.GRAYSCALE_1BPP){const e=u.byteLength,n=new Uint32Array(p.buffer,0,p.byteLength>>2),b=n.length,v=r+7>>3,y=4294967295,_=i.FeatureTest.isLittleEndian?4278190080:255;for(f=0;fv?r:8*t-7,a=-8&s;let o=0,l=0;for(;i>=1}}for(;h=a){m=s;b=r*m}h=0;for(g=b;g--;){p[h++]=u[d++];p[h++]=u[d++];p[h++]=u[d++];p[h++]=255}t.putImageData(c,0,f*l)}}}function putBinaryImageMask(t,e){if(e.bitmap){t.drawImage(e.bitmap,0,0);return}const n=e.height,i=e.width,r=n%l,s=(n-r)/l,o=0===r?s:s+1,c=t.createImageData(i,l);let h=0;const d=e.data,u=c.data;for(let e=0;e>8;t[s-2]=t[s-2]*r+n*a>>8;t[s-1]=t[s-1]*r+i*a>>8}}}function composeSMaskAlpha(t,e,n){const i=t.length;for(let r=3;r>8]>>8:e[r]*i>>16}}function composeSMask(t,e,n,i){const r=i[0],s=i[1],a=i[2]-r,o=i[3]-s;if(0!==a&&0!==o){!function genericComposeSMask(t,e,n,i,r,s,a,o,l,c,h){const d=!!s,u=d?s[0]:0,p=d?s[1]:0,f=d?s[2]:0,g="Luminosity"===r?composeSMaskLuminosity:composeSMaskAlpha,m=Math.min(i,Math.ceil(1048576/n));for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):e}beginDrawing(t){let{transform:e,viewport:n,transparency:i=!1,background:s=null}=t;const a=this.ctx.canvas.width,o=this.ctx.canvas.height,l=this.ctx.fillStyle;this.ctx.fillStyle=s||"#ffffff";this.ctx.fillRect(0,0,a,o);this.ctx.fillStyle=l;if(i){const t=this.cachedCanvases.getCanvas("transparent",a,o);this.compositeCtx=this.ctx;this.transparentCanvas=t.canvas;this.ctx=t.context;this.ctx.save();this.ctx.transform(...(0,r.getCurrentTransform)(this.compositeCtx))}this.ctx.save();resetCtxToDefault(this.ctx);if(e){this.ctx.transform(...e);this.outputScaleX=e[0];this.outputScaleY=e[0]}this.ctx.transform(...n.transform);this.viewportScale=n.scale;this.baseTransform=(0,r.getCurrentTransform)(this.ctx)}executeOperatorList(t,e,n,r){const s=t.argsArray,a=t.fnArray;let o=e||0;const l=s.length;if(l===o)return o;const c=l-o>10&&"function"==typeof n,h=c?Date.now()+15:0;let d=0;const u=this.commonObjs,p=this.objs;let f;for(;;){if(void 0!==r&&o===r.nextBreakPoint){r.breakIt(o,n);return o}f=a[o];if(f!==i.OPS.dependency)this[f].apply(this,s[o]);else for(const t of s[o]){const e=t.startsWith("g_")?u:p;if(!e.has(t)){e.get(t,n);return o}}o++;if(o===l)return o;if(c&&++d>10){if(Date.now()>h){n();return o}d=0}}}#ce(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore();if(this.transparentCanvas){this.ctx=this.compositeCtx;this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.drawImage(this.transparentCanvas,0,0);this.ctx.restore();this.transparentCanvas=null}}endDrawing(){this.#ce();this.cachedCanvases.clear();this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear();this.#he()}#he(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==t){const e=this.ctx.filter;this.ctx.filter=t;this.ctx.drawImage(this.ctx.canvas,0,0);this.ctx.filter=e}}}_scaleImage(t,e){const n=t.width,i=t.height;let r,s,a=Math.max(Math.hypot(e[0],e[1]),1),o=Math.max(Math.hypot(e[2],e[3]),1),l=n,c=i,h="prescale1";for(;a>2&&l>1||o>2&&c>1;){let e=l,n=c;if(a>2&&l>1){e=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2);a/=l/e}if(o>2&&c>1){n=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2;o/=c/n}r=this.cachedCanvases.getCanvas(h,e,n);s=r.context;s.clearRect(0,0,e,n);s.drawImage(t,0,0,l,c,0,0,e,n);t=r.canvas;l=e;c=n;h="prescale1"===h?"prescale2":"prescale1"}return{img:t,paintWidth:l,paintHeight:c}}_createMaskCanvas(t){const e=this.ctx,{width:n,height:a}=t,o=this.current.fillColor,l=this.current.patternFill,c=(0,r.getCurrentTransform)(e);let h,d,u,p;if((t.bitmap||t.data)&&t.count>1){const e=t.bitmap||t.data.buffer;d=JSON.stringify(l?c:[c.slice(0,4),o]);h=this._cachedBitmapsMap.get(e);if(!h){h=new Map;this._cachedBitmapsMap.set(e,h)}const n=h.get(d);if(n&&!l){return{canvas:n,offsetX:Math.round(Math.min(c[0],c[2])+c[4]),offsetY:Math.round(Math.min(c[1],c[3])+c[5])}}u=n}if(!u){p=this.cachedCanvases.getCanvas("maskCanvas",n,a);putBinaryImageMask(p.context,t)}let f=i.Util.transform(c,[1/n,0,0,-1/a,0,0]);f=i.Util.transform(f,[1,0,0,1,0,-a]);const g=i.Util.applyTransform([0,0],f),m=i.Util.applyTransform([n,a],f),b=i.Util.normalizeRect([g[0],g[1],m[0],m[1]]),v=Math.round(b[2]-b[0])||1,y=Math.round(b[3]-b[1])||1,_=this.cachedCanvases.getCanvas("fillCanvas",v,y),A=_.context,S=Math.min(g[0],m[0]),E=Math.min(g[1],m[1]);A.translate(-S,-E);A.transform(...f);if(!u){u=this._scaleImage(p.canvas,(0,r.getCurrentTransformInverse)(A));u=u.img;h&&l&&h.set(d,u)}A.imageSmoothingEnabled=getImageSmoothingEnabled((0,r.getCurrentTransform)(A),t.interpolate);drawImageAtIntegerCoords(A,u,0,0,u.width,u.height,0,0,n,a);A.globalCompositeOperation="source-in";const x=i.Util.transform((0,r.getCurrentTransformInverse)(A),[1,0,0,1,-S,-E]);A.fillStyle=l?o.getPattern(e,this,x,s.PathType.FILL):o;A.fillRect(0,0,n,a);if(h&&!l){this.cachedCanvases.delete("fillCanvas");h.set(d,_.canvas)}return{canvas:_.canvas,offsetX:Math.round(S),offsetY:Math.round(E)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1);this.current.lineWidth=t;this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=c[t]}setLineJoin(t){this.ctx.lineJoin=h[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,e){const n=this.ctx;if(void 0!==n.setLineDash){n.setLineDash(t);n.lineDashOffset=e}}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,n]of t)switch(e){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n[0],n[1]);break;case"CA":this.current.strokeAlpha=n;break;case"ca":this.current.fillAlpha=n;this.ctx.globalAlpha=n;break;case"BM":this.ctx.globalCompositeOperation=n;break;case"SMask":this.current.activeSMask=n?this.tempSMask:null;this.tempSMask=null;this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(n)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,e=this.ctx.canvas.height,n="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(n,t,e);this.suspendedCtx=this.ctx;this.ctx=i.context;const s=this.ctx;s.setTransform(...(0,r.getCurrentTransform)(this.suspendedCtx));copyCtxState(this.suspendedCtx,s);!function mirrorContextOperations(t,e){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save;t.__originalRestore=t.restore;t.__originalRotate=t.rotate;t.__originalScale=t.scale;t.__originalTranslate=t.translate;t.__originalTransform=t.transform;t.__originalSetTransform=t.setTransform;t.__originalResetTransform=t.resetTransform;t.__originalClip=t.clip;t.__originalMoveTo=t.moveTo;t.__originalLineTo=t.lineTo;t.__originalBezierCurveTo=t.bezierCurveTo;t.__originalRect=t.rect;t.__originalClosePath=t.closePath;t.__originalBeginPath=t.beginPath;t._removeMirroring=()=>{t.save=t.__originalSave;t.restore=t.__originalRestore;t.rotate=t.__originalRotate;t.scale=t.__originalScale;t.translate=t.__originalTranslate;t.transform=t.__originalTransform;t.setTransform=t.__originalSetTransform;t.resetTransform=t.__originalResetTransform;t.clip=t.__originalClip;t.moveTo=t.__originalMoveTo;t.lineTo=t.__originalLineTo;t.bezierCurveTo=t.__originalBezierCurveTo;t.rect=t.__originalRect;t.closePath=t.__originalClosePath;t.beginPath=t.__originalBeginPath;delete t._removeMirroring};t.save=function ctxSave(){e.save();this.__originalSave()};t.restore=function ctxRestore(){e.restore();this.__originalRestore()};t.translate=function ctxTranslate(t,n){e.translate(t,n);this.__originalTranslate(t,n)};t.scale=function ctxScale(t,n){e.scale(t,n);this.__originalScale(t,n)};t.transform=function ctxTransform(t,n,i,r,s,a){e.transform(t,n,i,r,s,a);this.__originalTransform(t,n,i,r,s,a)};t.setTransform=function ctxSetTransform(t,n,i,r,s,a){e.setTransform(t,n,i,r,s,a);this.__originalSetTransform(t,n,i,r,s,a)};t.resetTransform=function ctxResetTransform(){e.resetTransform();this.__originalResetTransform()};t.rotate=function ctxRotate(t){e.rotate(t);this.__originalRotate(t)};t.clip=function ctxRotate(t){e.clip(t);this.__originalClip(t)};t.moveTo=function(t,n){e.moveTo(t,n);this.__originalMoveTo(t,n)};t.lineTo=function(t,n){e.lineTo(t,n);this.__originalLineTo(t,n)};t.bezierCurveTo=function(t,n,i,r,s,a){e.bezierCurveTo(t,n,i,r,s,a);this.__originalBezierCurveTo(t,n,i,r,s,a)};t.rect=function(t,n,i,r){e.rect(t,n,i,r);this.__originalRect(t,n,i,r)};t.closePath=function(){e.closePath();this.__originalClosePath()};t.beginPath=function(){e.beginPath();this.__originalBeginPath()}}(s,this.suspendedCtx);this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring();copyCtxState(this.ctx,this.suspendedCtx);this.ctx=this.suspendedCtx;this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;if(t){t[0]=Math.floor(t[0]);t[1]=Math.floor(t[1]);t[2]=Math.ceil(t[2]);t[3]=Math.ceil(t[3])}else t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask;composeSMask(this.suspendedCtx,e,this.ctx,t);this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height);this.ctx.restore()}save(){if(this.inSMaskMode){copyCtxState(this.ctx,this.suspendedCtx);this.suspendedCtx.save()}else this.ctx.save();const t=this.current;this.stateStack.push(t);this.current=t.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode();if(0!==this.stateStack.length){this.current=this.stateStack.pop();if(this.inSMaskMode){this.suspendedCtx.restore();copyCtxState(this.suspendedCtx,this.ctx)}else this.ctx.restore();this.checkSMaskState();this.pendingClip=null;this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null}}transform(t,e,n,i,r,s){this.ctx.transform(t,e,n,i,r,s);this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null}constructPath(t,e,n){const s=this.ctx,a=this.current;let o,l,c=a.x,h=a.y;const d=(0,r.getCurrentTransform)(s),u=0===d[0]&&0===d[3]||0===d[1]&&0===d[2],p=u?n.slice(0):null;for(let n=0,r=0,f=t.length;n0&&void 0!==arguments[0])||arguments[0];const e=this.ctx,n=this.current.strokeColor;e.globalAlpha=this.current.strokeAlpha;if(this.contentVisible)if("object"==typeof n&&n?.getPattern){e.save();e.strokeStyle=n.getPattern(e,this,(0,r.getCurrentTransformInverse)(e),s.PathType.STROKE);this.rescaleAndStroke(!1);e.restore()}else this.rescaleAndStroke(!0);t&&this.consumePath(this.current.getClippedPathBoundingBox());e.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath();this.stroke()}fill(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=this.ctx,n=this.current.fillColor;let i=!1;if(this.current.patternFill){e.save();e.fillStyle=n.getPattern(e,this,(0,r.getCurrentTransformInverse)(e),s.PathType.FILL);i=!0}const a=this.current.getClippedPathBoundingBox();if(this.contentVisible&&null!==a)if(this.pendingEOFill){e.fill("evenodd");this.pendingEOFill=!1}else e.fill();i&&e.restore();t&&this.consumePath(a)}eoFill(){this.pendingEOFill=!0;this.fill()}fillStroke(){this.fill(!1);this.stroke(!1);this.consumePath()}eoFillStroke(){this.pendingEOFill=!0;this.fillStroke()}closeFillStroke(){this.closePath();this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0;this.closePath();this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=d}eoClip(){this.pendingClip=u}beginText(){this.current.textMatrix=i.IDENTITY_MATRIX;this.current.textMatrixScale=1;this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}endText(){const t=this.pendingTextPaths,e=this.ctx;if(void 0!==t){e.save();e.beginPath();for(const n of t){e.setTransform(...n.transform);e.translate(n.x,n.y);n.addToPath(e,n.fontSize)}e.restore();e.clip();e.beginPath();delete this.pendingTextPaths}else e.beginPath()}setCharSpacing(t){this.current.charSpacing=t}setWordSpacing(t){this.current.wordSpacing=t}setHScale(t){this.current.textHScale=t/100}setLeading(t){this.current.leading=-t}setFont(t,e){const n=this.commonObjs.get(t),r=this.current;if(!n)throw new Error(`Can't find font for ${t}`);r.fontMatrix=n.fontMatrix||i.FONT_IDENTITY_MATRIX;0!==r.fontMatrix[0]&&0!==r.fontMatrix[3]||(0,i.warn)("Invalid font matrix for font "+t);if(e<0){e=-e;r.fontDirection=-1}else r.fontDirection=1;this.current.font=n;this.current.fontSize=e;if(n.isType3Font)return;const s=n.loadedName||"sans-serif",a=n.systemFontInfo?.css||`"${s}", ${n.fallbackName}`;let o="normal";n.black?o="900":n.bold&&(o="bold");const l=n.italic?"italic":"normal";let c=e;e<16?c=16:e>100&&(c=100);this.current.fontSizeScale=e/c;this.ctx.font=`${l} ${o} ${c}px ${a}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,e){this.current.x=this.current.lineX+=t;this.current.y=this.current.lineY+=e}setLeadingMoveText(t,e){this.setLeading(-e);this.moveText(t,e)}setTextMatrix(t,e,n,i,r,s){this.current.textMatrix=[t,e,n,i,r,s];this.current.textMatrixScale=Math.hypot(t,e);this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(t,e,n,s){const a=this.ctx,o=this.current,l=o.font,c=o.textRenderingMode,h=o.fontSize/o.fontSizeScale,d=c&i.TextRenderingMode.FILL_STROKE_MASK,u=!!(c&i.TextRenderingMode.ADD_TO_PATH_FLAG),p=o.patternFill&&!l.missingFile;let f;(l.disableFontFace||u||p)&&(f=l.getPathGenerator(this.commonObjs,t));if(l.disableFontFace||p){a.save();a.translate(e,n);a.beginPath();f(a,h);s&&a.setTransform(...s);d!==i.TextRenderingMode.FILL&&d!==i.TextRenderingMode.FILL_STROKE||a.fill();d!==i.TextRenderingMode.STROKE&&d!==i.TextRenderingMode.FILL_STROKE||a.stroke();a.restore()}else{d!==i.TextRenderingMode.FILL&&d!==i.TextRenderingMode.FILL_STROKE||a.fillText(t,e,n);d!==i.TextRenderingMode.STROKE&&d!==i.TextRenderingMode.FILL_STROKE||a.strokeText(t,e,n)}if(u){(this.pendingTextPaths||=[]).push({transform:(0,r.getCurrentTransform)(a),x:e,y:n,fontSize:h,addToPath:f})}}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1);t.fillText("I",0,10);const e=t.getImageData(0,0,10,10).data;let n=!1;for(let t=3;t0&&e[t]<255){n=!0;break}return(0,i.shadow)(this,"isFontSubpixelAAEnabled",n)}showText(t){const e=this.current,n=e.font;if(n.isType3Font)return this.showType3Text(t);const a=e.fontSize;if(0===a)return;const o=this.ctx,l=e.fontSizeScale,c=e.charSpacing,h=e.wordSpacing,d=e.fontDirection,u=e.textHScale*d,p=t.length,f=n.vertical,g=f?1:-1,m=n.defaultVMetrics,b=a*e.fontMatrix[0],v=e.textRenderingMode===i.TextRenderingMode.FILL&&!n.disableFontFace&&!e.patternFill;o.save();o.transform(...e.textMatrix);o.translate(e.x,e.y+e.textRise);d>0?o.scale(u,-1):o.scale(u,1);let y;if(e.patternFill){o.save();const t=e.fillColor.getPattern(o,this,(0,r.getCurrentTransformInverse)(o),s.PathType.FILL);y=(0,r.getCurrentTransform)(o);o.restore();o.fillStyle=t}let _=e.lineWidth;const A=e.textMatrixScale;if(0===A||0===_){const t=e.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;t!==i.TextRenderingMode.STROKE&&t!==i.TextRenderingMode.FILL_STROKE||(_=this.getSinglePixelWidth())}else _/=A;if(1!==l){o.scale(l,l);_/=l}o.lineWidth=_;if(n.isInvalidPDFjsFont){const n=[];let i=0;for(const e of t){n.push(e.unicode);i+=e.width}o.fillText(n.join(""),0,0);e.x+=i*b*u;o.restore();this.compose();return}let S,E=0;for(S=0;S0){const t=1e3*o.measureText(s).width/a*l;if(Anew CanvasGraphics(t,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};e=new s.TilingPattern(t,n,this.ctx,a,i)}else e=this._getPattern(t[1],t[2]);return e}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments);this.current.patternFill=!0}setStrokeRGBColor(t,e,n){const r=i.Util.makeHexColor(t,e,n);this.ctx.strokeStyle=r;this.current.strokeColor=r}setFillRGBColor(t,e,n){const r=i.Util.makeHexColor(t,e,n);this.ctx.fillStyle=r;this.current.fillColor=r;this.current.patternFill=!1}_getPattern(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.cachedPatterns.has(t))e=this.cachedPatterns.get(t);else{e=(0,s.getShadingPattern)(this.getObject(t));this.cachedPatterns.set(t,e)}n&&(e.matrix=n);return e}shadingFill(t){if(!this.contentVisible)return;const e=this.ctx;this.save();const n=this._getPattern(t);e.fillStyle=n.getPattern(e,this,(0,r.getCurrentTransformInverse)(e),s.PathType.SHADING);const a=(0,r.getCurrentTransformInverse)(e);if(a){const{width:t,height:n}=e.canvas,[r,s,o,l]=i.Util.getAxialAlignedBoundingBox([0,0,t,n],a);this.ctx.fillRect(r,s,o-r,l-s)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox());this.restore()}beginInlineImage(){(0,i.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,i.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(t,e){if(this.contentVisible){this.save();this.baseTransformStack.push(this.baseTransform);Array.isArray(t)&&6===t.length&&this.transform(...t);this.baseTransform=(0,r.getCurrentTransform)(this.ctx);if(e){const t=e[2]-e[0],n=e[3]-e[1];this.ctx.rect(e[0],e[1],t,n);this.current.updateRectMinMax((0,r.getCurrentTransform)(this.ctx),e);this.clip();this.endPath()}}}paintFormXObjectEnd(){if(this.contentVisible){this.restore();this.baseTransform=this.baseTransformStack.pop()}}beginGroup(t){if(!this.contentVisible)return;this.save();if(this.inSMaskMode){this.endSMaskMode();this.current.activeSMask=null}const e=this.ctx;t.isolated||(0,i.info)("TODO: Support non-isolated groups.");t.knockout&&(0,i.warn)("Knockout groups not supported.");const n=(0,r.getCurrentTransform)(e);t.matrix&&e.transform(...t.matrix);if(!t.bbox)throw new Error("Bounding box is required.");let s=i.Util.getAxialAlignedBoundingBox(t.bbox,(0,r.getCurrentTransform)(e));const a=[0,0,e.canvas.width,e.canvas.height];s=i.Util.intersect(s,a)||[0,0,0,0];const l=Math.floor(s[0]),c=Math.floor(s[1]);let h=Math.max(Math.ceil(s[2])-l,1),d=Math.max(Math.ceil(s[3])-c,1),u=1,p=1;if(h>o){u=h/o;h=o}if(d>o){p=d/o;d=o}this.current.startNewPathAndClipBox([0,0,h,d]);let f="groupAt"+this.groupLevel;t.smask&&(f+="_smask_"+this.smaskCounter++%2);const g=this.cachedCanvases.getCanvas(f,h,d),m=g.context;m.scale(1/u,1/p);m.translate(-l,-c);m.transform(...n);if(t.smask)this.smaskStack.push({canvas:g.canvas,context:m,offsetX:l,offsetY:c,scaleX:u,scaleY:p,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null});else{e.setTransform(1,0,0,1,0,0);e.translate(l,c);e.scale(u,p);e.save()}copyCtxState(e,m);this.ctx=m;this.setGState([["BM","source-over"],["ca",1],["CA",1]]);this.groupStack.push(e);this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const e=this.ctx,n=this.groupStack.pop();this.ctx=n;this.ctx.imageSmoothingEnabled=!1;if(t.smask){this.tempSMask=this.smaskStack.pop();this.restore()}else{this.ctx.restore();const t=(0,r.getCurrentTransform)(this.ctx);this.restore();this.ctx.save();this.ctx.setTransform(...t);const n=i.Util.getAxialAlignedBoundingBox([0,0,e.canvas.width,e.canvas.height],t);this.ctx.drawImage(e.canvas,0,0);this.ctx.restore();this.compose(n)}}beginAnnotation(t,e,n,s,a){this.#ce();resetCtxToDefault(this.ctx);this.ctx.save();this.save();this.baseTransform&&this.ctx.setTransform(...this.baseTransform);if(Array.isArray(e)&&4===e.length){const s=e[2]-e[0],o=e[3]-e[1];if(a&&this.annotationCanvasMap){(n=n.slice())[4]-=e[0];n[5]-=e[1];(e=e.slice())[0]=e[1]=0;e[2]=s;e[3]=o;const[a,l]=i.Util.singularValueDecompose2dScale((0,r.getCurrentTransform)(this.ctx)),{viewportScale:c}=this,h=Math.ceil(s*this.outputScaleX*c),d=Math.ceil(o*this.outputScaleY*c);this.annotationCanvas=this.canvasFactory.create(h,d);const{canvas:u,context:p}=this.annotationCanvas;this.annotationCanvasMap.set(t,u);this.annotationCanvas.savedCtx=this.ctx;this.ctx=p;this.ctx.save();this.ctx.setTransform(a,0,0,-l,0,o*l);resetCtxToDefault(this.ctx)}else{resetCtxToDefault(this.ctx);this.ctx.rect(e[0],e[1],s,o);this.ctx.clip();this.endPath()}}this.current=new CanvasExtraState(this.ctx.canvas.width,this.ctx.canvas.height);this.transform(...n);this.transform(...s)}endAnnotation(){if(this.annotationCanvas){this.ctx.restore();this.#he();this.ctx=this.annotationCanvas.savedCtx;delete this.annotationCanvas.savedCtx;delete this.annotationCanvas}}paintImageMaskXObject(t){if(!this.contentVisible)return;const e=t.count;(t=this.getObject(t.data,t)).count=e;const n=this.ctx,i=this.processingType3;if(i){void 0===i.compiled&&(i.compiled=function compileType3Glyph(t){const{width:e,height:n}=t;if(e>1e3||n>1e3)return null;const i=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),r=e+1;let s,a,o,l=new Uint8Array(r*(n+1));const c=e+7&-8;let h=new Uint8Array(c*n),d=0;for(const e of t.data){let t=128;for(;t>0;){h[d++]=e&t?0:255;t>>=1}}let u=0;d=0;if(0!==h[d]){l[0]=1;++u}for(a=1;a>2)+(h[d+1]?4:0)+(h[d-c+1]?8:0);if(i[t]){l[o+a]=i[t];++u}d++}if(h[d-c]!==h[d]){l[o+a]=h[d]?2:4;++u}if(u>1e3)return null}d=c*(n-1);o=s*r;if(0!==h[d]){l[o]=8;++u}for(a=1;a1e3)return null;const p=new Int32Array([0,r,-1,0,-r,0,0,0,1]),f=new Path2D;for(s=0;u&&s<=n;s++){let t=s*r;const n=t+e;for(;t>4;l[t]&=a>>2|a<<2}f.lineTo(t%r,t/r|0);l[t]||--u}while(i!==t);--s}h=null;l=null;return function(t){t.save();t.scale(1/e,-1/n);t.translate(0,-n);t.fill(f);t.beginPath();t.restore()}}(t));if(i.compiled){i.compiled(n);return}}const r=this._createMaskCanvas(t),s=r.canvas;n.save();n.setTransform(1,0,0,1,0,0);n.drawImage(s,r.offsetX,r.offsetY);n.restore();this.compose()}paintImageMaskXObjectRepeat(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;t=this.getObject(t.data,t);const l=this.ctx;l.save();const c=(0,r.getCurrentTransform)(l);l.transform(e,n,s,a,0,0);const h=this._createMaskCanvas(t);l.setTransform(1,0,0,1,h.offsetX-c[4],h.offsetY-c[5]);for(let t=0,r=o.length;te?c/e:1;a=l>e?l/e:1}}this._cachedScaleForStroking[0]=s;this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(t){const{ctx:e}=this,{lineWidth:n}=this.current,[i,r]=this.getScaleForStroking();e.lineWidth=n||1;if(1===i&&1===r){e.stroke();return}const s=e.getLineDash();t&&e.save();e.scale(i,r);if(s.length>0){const t=Math.max(i,r);e.setLineDash(s.map((e=>e/t)));e.lineDashOffset/=t}e.stroke();t&&e.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}e.CanvasGraphics=CanvasGraphics;for(const t in i.OPS)void 0!==CanvasGraphics.prototype[t]&&(CanvasGraphics.prototype[i.OPS[t]]=CanvasGraphics.prototype[t])},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.TilingPattern=e.PathType=void 0;e.getShadingPattern=function getShadingPattern(t){switch(t[0]){case"RadialAxial":return new RadialAxialShadingPattern(t);case"Mesh":return new MeshShadingPattern(t);case"Dummy":return new DummyShadingPattern}throw new Error(`Unknown IR type: ${t[0]}`)};n(2);var i=n(1),r=n(168);const s={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};e.PathType=s;function applyBoundingBox(t,e){if(!e)return;const n=e[2]-e[0],i=e[3]-e[1],r=new Path2D;r.rect(e[0],e[1],n,i);t.clip(r)}class BaseShadingPattern{constructor(){this.constructor===BaseShadingPattern&&(0,i.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,i.unreachable)("Abstract method `getPattern` called.")}}class RadialAxialShadingPattern extends BaseShadingPattern{constructor(t){super();this._type=t[1];this._bbox=t[2];this._colorStops=t[3];this._p0=t[4];this._p1=t[5];this._r0=t[6];this._r1=t[7];this.matrix=null}_createGradient(t){let e;"axial"===this._type?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const t of this._colorStops)e.addColorStop(t[0],t[1]);return e}getPattern(t,e,n,a){let o;if(a===s.STROKE||a===s.FILL){const s=e.current.getClippedPathBoundingBox(a,(0,r.getCurrentTransform)(t))||[0,0,0,0],l=Math.ceil(s[2]-s[0])||1,c=Math.ceil(s[3]-s[1])||1,h=e.cachedCanvases.getCanvas("pattern",l,c,!0),d=h.context;d.clearRect(0,0,d.canvas.width,d.canvas.height);d.beginPath();d.rect(0,0,d.canvas.width,d.canvas.height);d.translate(-s[0],-s[1]);n=i.Util.transform(n,[1,0,0,1,s[0],s[1]]);d.transform(...e.baseTransform);this.matrix&&d.transform(...this.matrix);applyBoundingBox(d,this._bbox);d.fillStyle=this._createGradient(d);d.fill();o=t.createPattern(h.canvas,"no-repeat");const u=new DOMMatrix(n);o.setTransform(u)}else{applyBoundingBox(t,this._bbox);o=this._createGradient(t)}return o}}function drawTriangle(t,e,n,i,r,s,a,o){const l=e.coords,c=e.colors,h=t.data,d=4*t.width;let u;if(l[n+1]>l[i+1]){u=n;n=i;i=u;u=s;s=a;a=u}if(l[i+1]>l[r+1]){u=i;i=r;r=u;u=a;a=o;o=u}if(l[n+1]>l[i+1]){u=n;n=i;i=u;u=s;s=a;a=u}const p=(l[n]+e.offsetX)*e.scaleX,f=(l[n+1]+e.offsetY)*e.scaleY,g=(l[i]+e.offsetX)*e.scaleX,m=(l[i+1]+e.offsetY)*e.scaleY,b=(l[r]+e.offsetX)*e.scaleX,v=(l[r+1]+e.offsetY)*e.scaleY;if(f>=v)return;const y=c[s],_=c[s+1],A=c[s+2],S=c[a],E=c[a+1],x=c[a+2],w=c[o],C=c[o+1],T=c[o+2],P=Math.round(f),k=Math.round(v);let M,R,D,I,O,L,N,B;for(let t=P;t<=k;t++){if(tv?1:m===v?0:(m-t)/(m-v);M=g-(g-b)*e;R=S-(S-w)*e;D=E-(E-C)*e;I=x-(x-T)*e}let e;e=tv?1:(f-t)/(f-v);O=p-(p-b)*e;L=y-(y-w)*e;N=_-(_-C)*e;B=A-(A-T)*e;const n=Math.round(Math.min(M,O)),i=Math.round(Math.max(M,O));let r=d*t+4*n;for(let t=n;t<=i;t++){e=(M-t)/(M-O);e<0?e=0:e>1&&(e=1);h[r++]=R-(R-L)*e|0;h[r++]=D-(D-N)*e|0;h[r++]=I-(I-B)*e|0;h[r++]=255}}}function drawFigure(t,e,n){const i=e.coords,r=e.colors;let s,a;switch(e.type){case"lattice":const o=e.verticesPerRow,l=Math.floor(i.length/o)-1,c=o-1;for(s=0;s=i?r=i:n=r/t;return{scale:n,size:r}}clipBbox(t,e,n,i,s){const a=i-e,o=s-n;t.ctx.rect(e,n,a,o);t.current.updateRectMinMax((0,r.getCurrentTransform)(t.ctx),[e,n,i,s]);t.clip();t.endPath()}setFillAndStrokeStyleToContext(t,e,n){const r=t.ctx,s=t.current;switch(e){case a:const t=this.ctx;r.fillStyle=t.fillStyle;r.strokeStyle=t.strokeStyle;s.fillColor=t.fillStyle;s.strokeColor=t.strokeStyle;break;case o:const l=i.Util.makeHexColor(n[0],n[1],n[2]);r.fillStyle=l;r.strokeStyle=l;s.fillColor=l;s.strokeColor=l;break;default:throw new i.FormatError(`Unsupported paint type: ${e}`)}}getPattern(t,e,n,r){let a=n;if(r!==s.SHADING){a=i.Util.transform(a,e.baseTransform);this.matrix&&(a=i.Util.transform(a,this.matrix))}const o=this.createPatternCanvas(e);let l=new DOMMatrix(a);l=l.translate(o.offsetX,o.offsetY);l=l.scale(1/o.scaleX,1/o.scaleY);const c=t.createPattern(o.canvas,"repeat");c.setTransform(l);return c}}e.TilingPattern=TilingPattern},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.convertBlackAndWhiteToRGBA=convertBlackAndWhiteToRGBA;e.convertToRGBA=function convertToRGBA(t){switch(t.kind){case i.ImageKind.GRAYSCALE_1BPP:return convertBlackAndWhiteToRGBA(t);case i.ImageKind.RGB_24BPP:return function convertRGBToRGBA(t){let{src:e,srcPos:n=0,dest:r,destPos:s=0,width:a,height:o}=t,l=0;const c=e.length>>2,h=new Uint32Array(e.buffer,n,c);if(i.FeatureTest.isLittleEndian){for(;l>>24|e<<8|4278190080;r[s+2]=e>>>16|n<<16|4278190080;r[s+3]=n>>>8|4278190080}for(let t=4*l,n=e.length;t>>8|255;r[s+2]=e<<16|n>>>16|255;r[s+3]=n<<8|255}for(let t=4*l,n=e.length;t>3,p=7&s,f=e.length;r=new Uint32Array(r.buffer);let g=0;for(let t=0;t{Object.defineProperty(e,"__esModule",{value:!0});e.GlobalWorkerOptions=void 0;const n=Object.create(null);e.GlobalWorkerOptions=n;n.workerPort=null;n.workerSrc=""},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.MessageHandler=void 0;n(2);var i=n(1);const r=1,s=2,a=1,o=2,l=3,c=4,h=5,d=6,u=7,p=8;function wrapReason(t){t instanceof Error||"object"==typeof t&&null!==t||(0,i.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.');switch(t.name){case"AbortException":return new i.AbortException(t.message);case"MissingPDFException":return new i.MissingPDFException(t.message);case"PasswordException":return new i.PasswordException(t.message,t.code);case"UnexpectedResponseException":return new i.UnexpectedResponseException(t.message,t.status);case"UnknownErrorException":return new i.UnknownErrorException(t.message,t.details);default:return new i.UnknownErrorException(t.message,t.toString())}}e.MessageHandler=class MessageHandler{constructor(t,e,n){this.sourceName=t;this.targetName=e;this.comObj=n;this.callbackId=1;this.streamId=1;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);this.callbackCapabilities=Object.create(null);this.actionHandler=Object.create(null);this._onComObjOnMessage=t=>{const e=t.data;if(e.targetName!==this.sourceName)return;if(e.stream){this.#de(e);return}if(e.callback){const t=e.callbackId,n=this.callbackCapabilities[t];if(!n)throw new Error(`Cannot resolve callback ${t}`);delete this.callbackCapabilities[t];if(e.callback===r)n.resolve(e.data);else{if(e.callback!==s)throw new Error("Unexpected callback case");n.reject(wrapReason(e.reason))}return}const i=this.actionHandler[e.action];if(!i)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const t=this.sourceName,a=e.sourceName;new Promise((function(t){t(i(e.data))})).then((function(i){n.postMessage({sourceName:t,targetName:a,callback:r,callbackId:e.callbackId,data:i})}),(function(i){n.postMessage({sourceName:t,targetName:a,callback:s,callbackId:e.callbackId,reason:wrapReason(i)})}))}else e.streamId?this.#ue(e):i(e.data)};n.addEventListener("message",this._onComObjOnMessage)}on(t,e){const n=this.actionHandler;if(n[t])throw new Error(`There is already an actionName called "${t}"`);n[t]=e}send(t,e,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},n)}sendWithPromise(t,e,n){const r=this.callbackId++,s=new i.PromiseCapability;this.callbackCapabilities[r]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:r,data:e},n)}catch(t){s.reject(t)}return s.promise}sendWithStream(t,e,n,r){const s=this.streamId++,o=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:n=>{const a=new i.PromiseCapability;this.streamControllers[s]={controller:n,startCall:a,pullCall:null,cancelCall:null,isClosed:!1};c.postMessage({sourceName:o,targetName:l,action:t,streamId:s,data:e,desiredSize:n.desiredSize},r);return a.promise},pull:t=>{const e=new i.PromiseCapability;this.streamControllers[s].pullCall=e;c.postMessage({sourceName:o,targetName:l,stream:d,streamId:s,desiredSize:t.desiredSize});return e.promise},cancel:t=>{(0,i.assert)(t instanceof Error,"cancel must have a valid reason");const e=new i.PromiseCapability;this.streamControllers[s].cancelCall=e;this.streamControllers[s].isClosed=!0;c.postMessage({sourceName:o,targetName:l,stream:a,streamId:s,reason:wrapReason(t)});return e.promise}},n)}#ue(t){const e=t.streamId,n=this.sourceName,r=t.sourceName,s=this.comObj,a=this,o=this.actionHandler[t.action],d={enqueue(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const l=this.desiredSize;this.desiredSize-=a;if(l>0&&this.desiredSize<=0){this.sinkCapability=new i.PromiseCapability;this.ready=this.sinkCapability.promise}s.postMessage({sourceName:n,targetName:r,stream:c,streamId:e,chunk:t},o)},close(){if(!this.isCancelled){this.isCancelled=!0;s.postMessage({sourceName:n,targetName:r,stream:l,streamId:e});delete a.streamSinks[e]}},error(t){(0,i.assert)(t instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;s.postMessage({sourceName:n,targetName:r,stream:h,streamId:e,reason:wrapReason(t)})}},sinkCapability:new i.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};d.sinkCapability.resolve();d.ready=d.sinkCapability.promise;this.streamSinks[e]=d;new Promise((function(e){e(o(t.data,d))})).then((function(){s.postMessage({sourceName:n,targetName:r,stream:p,streamId:e,success:!0})}),(function(t){s.postMessage({sourceName:n,targetName:r,stream:p,streamId:e,reason:wrapReason(t)})}))}#de(t){const e=t.streamId,n=this.sourceName,r=t.sourceName,s=this.comObj,f=this.streamControllers[e],g=this.streamSinks[e];switch(t.stream){case p:t.success?f.startCall.resolve():f.startCall.reject(wrapReason(t.reason));break;case u:t.success?f.pullCall.resolve():f.pullCall.reject(wrapReason(t.reason));break;case d:if(!g){s.postMessage({sourceName:n,targetName:r,stream:u,streamId:e,success:!0});break}g.desiredSize<=0&&t.desiredSize>0&&g.sinkCapability.resolve();g.desiredSize=t.desiredSize;new Promise((function(t){t(g.onPull?.())})).then((function(){s.postMessage({sourceName:n,targetName:r,stream:u,streamId:e,success:!0})}),(function(t){s.postMessage({sourceName:n,targetName:r,stream:u,streamId:e,reason:wrapReason(t)})}));break;case c:(0,i.assert)(f,"enqueue should have stream controller");if(f.isClosed)break;f.controller.enqueue(t.chunk);break;case l:(0,i.assert)(f,"close should have stream controller");if(f.isClosed)break;f.isClosed=!0;f.controller.close();this.#pe(f,e);break;case h:(0,i.assert)(f,"error should have stream controller");f.controller.error(wrapReason(t.reason));this.#pe(f,e);break;case o:t.success?f.cancelCall.resolve():f.cancelCall.reject(wrapReason(t.reason));this.#pe(f,e);break;case a:if(!g)break;new Promise((function(e){e(g.onCancel?.(wrapReason(t.reason)))})).then((function(){s.postMessage({sourceName:n,targetName:r,stream:o,streamId:e,success:!0})}),(function(t){s.postMessage({sourceName:n,targetName:r,stream:o,streamId:e,reason:wrapReason(t)})}));g.sinkCapability.reject(wrapReason(t.reason));g.isCancelled=!0;delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}async#pe(t,e){await Promise.allSettled([t.startCall?.promise,t.pullCall?.promise,t.cancelCall?.promise]);delete this.streamControllers[e]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.Metadata=void 0;var i=n(1);e.Metadata=class Metadata{#fe;#ge;constructor(t){let{parsedData:e,rawData:n}=t;this.#fe=e;this.#ge=n}getRaw(){return this.#ge}get(t){return this.#fe.get(t)??null}getAll(){return(0,i.objectFromMap)(this.#fe)}has(t){return this.#fe.has(t)}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.OptionalContentConfig=void 0;var i=n(1),r=n(170);const s=Symbol("INTERNAL");class OptionalContentGroup{#me=!0;constructor(t,e){this.name=t;this.intent=e}get visible(){return this.#me}_setVisible(t,e){t!==s&&(0,i.unreachable)("Internal method `_setVisible` called.");this.#me=e}}e.OptionalContentConfig=class OptionalContentConfig{#be=null;#ve=new Map;#ye=null;#_e=null;constructor(t){this.name=null;this.creator=null;if(null!==t){this.name=t.name;this.creator=t.creator;this.#_e=t.order;for(const e of t.groups)this.#ve.set(e.id,new OptionalContentGroup(e.name,e.intent));if("OFF"===t.baseState)for(const t of this.#ve.values())t._setVisible(s,!1);for(const e of t.on)this.#ve.get(e)._setVisible(s,!0);for(const e of t.off)this.#ve.get(e)._setVisible(s,!1);this.#ye=this.getHash()}}#Ae(t){const e=t.length;if(e<2)return!0;const n=t[0];for(let r=1;r1&&void 0!==arguments[1])||arguments[1];if(this.#ve.has(t)){this.#ve.get(t)._setVisible(s,!!e);this.#be=null}else(0,i.warn)(`Optional content group not found: ${t}`)}get hasInitialVisibility(){return null===this.#ye||this.getHash()===this.#ye}getOrder(){return this.#ve.size?this.#_e?this.#_e.slice():[...this.#ve.keys()]:null}getGroups(){return this.#ve.size>0?(0,i.objectFromMap)(this.#ve):null}getGroup(t){return this.#ve.get(t)||null}getHash(){if(null!==this.#be)return this.#be;const t=new r.MurmurHash3_64;for(const[e,n]of this.#ve)t.update(`${e}:${n.visible}`);return this.#be=t.hexdigest()}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.PDFDataTransportStream=void 0;n(93);n(101);n(102);n(105);n(107);n(109);n(113);n(116);n(123);n(89);var i=n(1),r=n(168);e.PDFDataTransportStream=class PDFDataTransportStream{constructor(t,e){let{length:n,initialData:r,progressiveDone:s=!1,contentDispositionFilename:a=null,disableRange:o=!1,disableStream:l=!1}=t;(0,i.assert)(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');this._queuedChunks=[];this._progressiveDone=s;this._contentDispositionFilename=a;if(r?.length>0){const t=r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer;this._queuedChunks.push(t)}this._pdfDataRangeTransport=e;this._isStreamingSupported=!l;this._isRangeSupported=!o;this._contentLength=n;this._fullRequestReader=null;this._rangeReaders=[];this._pdfDataRangeTransport.addRangeListener(((t,e)=>{this._onReceiveData({begin:t,chunk:e})}));this._pdfDataRangeTransport.addProgressListener(((t,e)=>{this._onProgress({loaded:t,total:e})}));this._pdfDataRangeTransport.addProgressiveReadListener((t=>{this._onReceiveData({chunk:t})}));this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()}));this._pdfDataRangeTransport.transportReady()}_onReceiveData(t){let{begin:e,chunk:n}=t;const r=n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength?n.buffer:new Uint8Array(n).buffer;if(void 0===e)this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r);else{const t=this._rangeReaders.some((function(t){if(t._begin!==e)return!1;t._enqueue(r);return!0}));(0,i.assert)(t,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(t){void 0===t.total?this._rangeReaders[0]?.onProgress?.({loaded:t.loaded}):this._fullRequestReader?.onProgress?.({loaded:t.loaded,total:t.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone();this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;this._queuedChunks=null;return new PDFDataTransportStreamReader(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const n=new PDFDataTransportStreamRangeReader(this,t,e);this._pdfDataRangeTransport.requestDataRange(t,e);this._rangeReaders.push(n);return n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeReaders.slice(0))e.cancel(t);this._pdfDataRangeTransport.abort()}};class PDFDataTransportStreamReader{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this._stream=t;this._done=n||!1;this._filename=(0,r.isPdfFile)(i)?i:null;this._queuedChunks=e||[];this._loaded=0;for(const t of this._queuedChunks)this._loaded+=t.byteLength;this._requests=[];this._headersReady=Promise.resolve();t._fullRequestReader=this;this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunks.push(t);this._loaded+=t.byteLength}}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0){return{value:this._queuedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const t=new i.PromiseCapability;this._requests.push(t);return t.promise}cancel(t){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class PDFDataTransportStreamRangeReader{constructor(t,e,n){this._stream=t;this._begin=e;this._end=n;this._queuedChunk=null;this._requests=[];this._done=!1;this.onProgress=null}_enqueue(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0;this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const t=this._queuedChunk;this._queuedChunk=null;return{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=new i.PromiseCapability;this._requests.push(t);return t.promise}cancel(t){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0;this._stream._removeRangeReader(this)}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.PDFFetchStream=void 0;n(93);n(101);n(102);n(105);n(107);n(109);n(113);n(116);n(123);n(89);var i=n(1),r=n(182);function createFetchOptions(t,e,n){return{method:"GET",headers:t,signal:n.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function createHeaders(t){const e=new Headers;for(const n in t){const i=t[n];void 0!==i&&e.append(n,i)}return e}function getArrayBuffer(t){if(t instanceof Uint8Array)return t.buffer;if(t instanceof ArrayBuffer)return t;(0,i.warn)(`getArrayBuffer - unexpected data format: ${t}`);return new Uint8Array(t).buffer}e.PDFFetchStream=class PDFFetchStream{constructor(t){this.source=t;this.isHttp=/^https?:/i.test(t.url);this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once.");this._fullRequestReader=new PDFFetchStreamReader(this);return this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const n=new PDFFetchStreamRangeReader(this,t,e);this._rangeRequestReaders.push(n);return n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class PDFFetchStreamReader{constructor(t){this._stream=t;this._reader=null;this._loaded=0;this._filename=null;const e=t.source;this._withCredentials=e.withCredentials||!1;this._contentLength=e.length;this._headersCapability=new i.PromiseCapability;this._disableRange=e.disableRange||!1;this._rangeChunkSize=e.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._abortController=new AbortController;this._isStreamingSupported=!e.disableStream;this._isRangeSupported=!e.disableRange;this._headers=createHeaders(this._stream.httpHeaders);const n=e.url;fetch(n,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((t=>{if(!(0,r.validateResponseStatus)(t.status))throw(0,r.createResponseStatusError)(t.status,n);this._reader=t.body.getReader();this._headersCapability.resolve();const getResponseHeader=e=>t.headers.get(e),{allowRangeRequests:e,suggestedLength:s}=(0,r.validateRangeRequestCapabilities)({getResponseHeader:getResponseHeader,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=e;this._contentLength=s||this._contentLength;this._filename=(0,r.extractFilenameFromHeader)(getResponseHeader);!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new i.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject);this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();if(e)return{value:t,done:e};this._loaded+=t.byteLength;this.onProgress?.({loaded:this._loaded,total:this._contentLength});return{value:getArrayBuffer(t),done:!1}}cancel(t){this._reader?.cancel(t);this._abortController.abort()}}class PDFFetchStreamRangeReader{constructor(t,e,n){this._stream=t;this._reader=null;this._loaded=0;const s=t.source;this._withCredentials=s.withCredentials||!1;this._readCapability=new i.PromiseCapability;this._isStreamingSupported=!s.disableStream;this._abortController=new AbortController;this._headers=createHeaders(this._stream.httpHeaders);this._headers.append("Range",`bytes=${e}-${n-1}`);const a=s.url;fetch(a,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((t=>{if(!(0,r.validateResponseStatus)(t.status))throw(0,r.createResponseStatusError)(t.status,a);this._readCapability.resolve();this._reader=t.body.getReader()})).catch(this._readCapability.reject);this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();if(e)return{value:t,done:e};this._loaded+=t.byteLength;this.onProgress?.({loaded:this._loaded});return{value:getArrayBuffer(t),done:!1}}cancel(t){this._reader?.cancel(t);this._abortController.abort()}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.createResponseStatusError=function createResponseStatusError(t,e){if(404===t||0===t&&e.startsWith("file:"))return new i.MissingPDFException('Missing PDF "'+e+'".');return new i.UnexpectedResponseException(`Unexpected server response (${t}) while retrieving PDF "${e}".`,t)};e.extractFilenameFromHeader=function extractFilenameFromHeader(t){const e=t("Content-Disposition");if(e){let t=(0,r.getFilenameFromContentDispositionHeader)(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if((0,s.isPdfFile)(t))return t}return null};e.validateRangeRequestCapabilities=function validateRangeRequestCapabilities(t){let{getResponseHeader:e,isHttp:n,rangeChunkSize:i,disableRange:r}=t;const s={allowRangeRequests:!1,suggestedLength:void 0},a=parseInt(e("Content-Length"),10);if(!Number.isInteger(a))return s;s.suggestedLength=a;if(a<=2*i)return s;if(r||!n)return s;if("bytes"!==e("Accept-Ranges"))return s;if("identity"!==(e("Content-Encoding")||"identity"))return s;s.allowRangeRequests=!0;return s};e.validateResponseStatus=function validateResponseStatus(t){return 200===t||206===t};var i=n(1),r=n(183),s=n(168)},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.getFilenameFromContentDispositionHeader=function getFilenameFromContentDispositionHeader(t){let e=!0,n=toParamRegExp("filename\\*","i").exec(t);if(n){n=n[1];let t=rfc2616unquote(n);t=unescape(t);t=rfc5987decode(t);t=rfc2047decode(t);return fixupEncoding(t)}n=function rfc2231getparam(t){const e=[];let n;const i=toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(n=i.exec(t));){let[,t,i,r]=n;t=parseInt(t,10);if(t in e){if(0===t)break}else e[t]=[i,r]}const r=[];for(let t=0;t{Object.defineProperty(e,"__esModule",{value:!0});e.PDFNetworkStream=void 0;n(89);var i=n(1),r=n(182);class NetworkManager{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.url=t;this.isHttp=/^https?:/i.test(t);this.httpHeaders=this.isHttp&&e.httpHeaders||Object.create(null);this.withCredentials=e.withCredentials||!1;this.currXhrId=0;this.pendingRequests=Object.create(null)}requestRange(t,e,n){const i={begin:t,end:e};for(const t in n)i[t]=n[t];return this.request(i)}requestFull(t){return this.request(t)}request(t){const e=new XMLHttpRequest,n=this.currXhrId++,i=this.pendingRequests[n]={xhr:e};e.open("GET",this.url);e.withCredentials=this.withCredentials;for(const t in this.httpHeaders){const n=this.httpHeaders[t];void 0!==n&&e.setRequestHeader(t,n)}if(this.isHttp&&"begin"in t&&"end"in t){e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`);i.expectedStatus=206}else i.expectedStatus=200;e.responseType="arraybuffer";t.onError&&(e.onerror=function(n){t.onError(e.status)});e.onreadystatechange=this.onStateChange.bind(this,n);e.onprogress=this.onProgress.bind(this,n);i.onHeadersReceived=t.onHeadersReceived;i.onDone=t.onDone;i.onError=t.onError;i.onProgress=t.onProgress;e.send(null);return n}onProgress(t,e){const n=this.pendingRequests[t];n&&n.onProgress?.(e)}onStateChange(t,e){const n=this.pendingRequests[t];if(!n)return;const r=n.xhr;if(r.readyState>=2&&n.onHeadersReceived){n.onHeadersReceived();delete n.onHeadersReceived}if(4!==r.readyState)return;if(!(t in this.pendingRequests))return;delete this.pendingRequests[t];if(0===r.status&&this.isHttp){n.onError?.(r.status);return}const s=r.status||200;if(!(200===s&&206===n.expectedStatus)&&s!==n.expectedStatus){n.onError?.(r.status);return}const a=function getArrayBuffer(t){const e=t.response;return"string"!=typeof e?e:(0,i.stringToBytes)(e).buffer}(r);if(206===s){const t=r.getResponseHeader("Content-Range"),e=/bytes (\d+)-(\d+)\/(\d+)/.exec(t);n.onDone({begin:parseInt(e[1],10),chunk:a})}else a?n.onDone({begin:0,chunk:a}):n.onError?.(r.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t];e.abort()}}e.PDFNetworkStream=class PDFNetworkStream{constructor(t){this._source=t;this._manager=new NetworkManager(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials});this._rangeChunkSize=t.rangeChunkSize;this._fullRequestReader=null;this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once.");this._fullRequestReader=new PDFNetworkStreamFullRequestReader(this._manager,this._source);return this._fullRequestReader}getRangeReader(t,e){const n=new PDFNetworkStreamRangeRequestReader(this._manager,t,e);n.onClosed=this._onRangeRequestReaderClosed.bind(this);this._rangeRequestReaders.push(n);return n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class PDFNetworkStreamFullRequestReader{constructor(t,e){this._manager=t;const n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url;this._fullRequestId=t.requestFull(n);this._headersReceivedCapability=new i.PromiseCapability;this._disableRange=e.disableRange||!1;this._contentLength=e.length;this._rangeChunkSize=e.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!1;this._isRangeSupported=!1;this._cachedChunks=[];this._requests=[];this._done=!1;this._storedError=void 0;this._filename=null;this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,e=this._manager.getRequestXhr(t),getResponseHeader=t=>e.getResponseHeader(t),{allowRangeRequests:n,suggestedLength:i}=(0,r.validateRangeRequestCapabilities)({getResponseHeader:getResponseHeader,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});n&&(this._isRangeSupported=!0);this._contentLength=i||this._contentLength;this._filename=(0,r.extractFilenameFromHeader)(getResponseHeader);this._isRangeSupported&&this._manager.abortRequest(t);this._headersReceivedCapability.resolve()}_onDone(t){if(t)if(this._requests.length>0){this._requests.shift().resolve({value:t.chunk,done:!1})}else this._cachedChunks.push(t.chunk);this._done=!0;if(!(this._cachedChunks.length>0)){for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=(0,r.createResponseStatusError)(t,this._url);this._headersReceivedCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0;this._cachedChunks.length=0}_onProgress(t){this.onProgress?.({loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0){return{value:this._cachedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const t=new i.PromiseCapability;this._requests.push(t);return t.promise}cancel(t){this._done=!0;this._headersReceivedCapability.reject(t);for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0;this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId);this._fullRequestReader=null}}class PDFNetworkStreamRangeRequestReader{constructor(t,e,n){this._manager=t;const i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url;this._requestId=t.requestRange(e,n,i);this._requests=[];this._queuedChunk=null;this._done=!1;this._storedError=void 0;this.onProgress=null;this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(t){const e=t.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:e,done:!1})}else this._queuedChunk=e;this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0;this._close()}_onError(t){this._storedError=(0,r.createResponseStatusError)(t,this._url);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0;this._queuedChunk=null}_onProgress(t){this.isStreamingSupported||this.onProgress?.({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const t=this._queuedChunk;this._queuedChunk=null;return{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=new i.PromiseCapability;this._requests.push(t);return t.promise}cancel(t){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0;this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId);this._close()}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.PDFNodeStream=void 0;n(89);n(93);n(101);n(102);n(105);n(107);n(109);n(113);n(116);n(123);var i=n(1),r=n(182);const s=/^file:\/\/\/[a-zA-Z]:\//;e.PDFNodeStream=class PDFNodeStream{constructor(t){this.source=t;this.url=function parseUrl(t){const e=require("url"),n=e.parse(t);if("file:"===n.protocol||n.host)return n;if(/^[a-z]:[/\\]/i.test(t))return e.parse(`file:///${t}`);n.host||(n.protocol="file:");return n}(t.url);this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol;this.isFsUrl="file:"===this.url.protocol;this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once.");this._fullRequestReader=this.isFsUrl?new PDFNodeStreamFsFullReader(this):new PDFNodeStreamFullReader(this);return this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const n=this.isFsUrl?new PDFNodeStreamFsRangeReader(this,t,e):new PDFNodeStreamRangeReader(this,t,e);this._rangeRequestReaders.push(n);return n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class BaseFullReader{constructor(t){this._url=t.url;this._done=!1;this._storedError=null;this.onProgress=null;const e=t.source;this._contentLength=e.length;this._loaded=0;this._filename=null;this._disableRange=e.disableRange||!1;this._rangeChunkSize=e.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!e.disableStream;this._isRangeSupported=!e.disableRange;this._readableStream=null;this._readCapability=new i.PromiseCapability;this._headersCapability=new i.PromiseCapability}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;if(this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();if(null===t){this._readCapability=new i.PromiseCapability;return this.read()}this._loaded+=t.length;this.onProgress?.({loaded:this._loaded,total:this._contentLength});return{value:new Uint8Array(t).buffer,done:!1}}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t;this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t;t.on("readable",(()=>{this._readCapability.resolve()}));t.on("end",(()=>{t.destroy();this._done=!0;this._readCapability.resolve()}));t.on("error",(t=>{this._error(t)}));!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i.AbortException("streaming is disabled"));this._storedError&&this._readableStream.destroy(this._storedError)}}class BaseRangeReader{constructor(t){this._url=t.url;this._done=!1;this._storedError=null;this.onProgress=null;this._loaded=0;this._readableStream=null;this._readCapability=new i.PromiseCapability;const e=t.source;this._isStreamingSupported=!e.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;if(this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();if(null===t){this._readCapability=new i.PromiseCapability;return this.read()}this._loaded+=t.length;this.onProgress?.({loaded:this._loaded});return{value:new Uint8Array(t).buffer,done:!1}}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t;this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t;t.on("readable",(()=>{this._readCapability.resolve()}));t.on("end",(()=>{t.destroy();this._done=!0;this._readCapability.resolve()}));t.on("error",(t=>{this._error(t)}));this._storedError&&this._readableStream.destroy(this._storedError)}}function createRequestOptions(t,e){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:e}}class PDFNodeStreamFullReader extends BaseFullReader{constructor(t){super(t);const handleResponse=e=>{if(404===e.statusCode){const t=new i.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=t;this._headersCapability.reject(t);return}this._headersCapability.resolve();this._setReadableStream(e);const getResponseHeader=t=>this._readableStream.headers[t.toLowerCase()],{allowRangeRequests:n,suggestedLength:s}=(0,r.validateRangeRequestCapabilities)({getResponseHeader:getResponseHeader,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=n;this._contentLength=s||this._contentLength;this._filename=(0,r.extractFilenameFromHeader)(getResponseHeader)};this._request=null;if("http:"===this._url.protocol){const e=require("http");this._request=e.request(createRequestOptions(this._url,t.httpHeaders),handleResponse)}else{const e=require("https");this._request=e.request(createRequestOptions(this._url,t.httpHeaders),handleResponse)}this._request.on("error",(t=>{this._storedError=t;this._headersCapability.reject(t)}));this._request.end()}}class PDFNodeStreamRangeReader extends BaseRangeReader{constructor(t,e,n){super(t);this._httpHeaders={};for(const e in t.httpHeaders){const n=t.httpHeaders[e];void 0!==n&&(this._httpHeaders[e]=n)}this._httpHeaders.Range=`bytes=${e}-${n-1}`;const handleResponse=t=>{if(404!==t.statusCode)this._setReadableStream(t);else{const t=new i.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=t}};this._request=null;if("http:"===this._url.protocol){const t=require("http");this._request=t.request(createRequestOptions(this._url,this._httpHeaders),handleResponse)}else{const t=require("https");this._request=t.request(createRequestOptions(this._url,this._httpHeaders),handleResponse)}this._request.on("error",(t=>{this._storedError=t}));this._request.end()}}class PDFNodeStreamFsFullReader extends BaseFullReader{constructor(t){super(t);let e=decodeURIComponent(this._url.path);s.test(this._url.href)&&(e=e.replace(/^\//,""));const n=require("fs");n.lstat(e,((t,r)=>{if(t){"ENOENT"===t.code&&(t=new i.MissingPDFException(`Missing PDF "${e}".`));this._storedError=t;this._headersCapability.reject(t)}else{this._contentLength=r.size;this._setReadableStream(n.createReadStream(e));this._headersCapability.resolve()}}))}}class PDFNodeStreamFsRangeReader extends BaseRangeReader{constructor(t,e,n){super(t);let i=decodeURIComponent(this._url.path);s.test(this._url.href)&&(i=i.replace(/^\//,""));const r=require("fs");this._setReadableStream(r.createReadStream(i,{start:e,end:n-1}))}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.SVGGraphics=void 0;n(84);n(86);n(87);n(93);n(101);n(102);n(105);n(107);n(109);n(113);n(116);n(123);n(2);n(89);n(187);var i=n(168),r=n(1);const s="normal",a="normal",o="#000000",l=["butt","round","square"],c=["miter","round","bevel"],createObjectURL=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!=typeof Blob&&!n)return URL.createObjectURL(new Blob([t],{type:e}));const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let r=`data:${e};base64,`;for(let e=0,n=t.length;e>2]+i[(3&s)<<4|a>>4]+i[e+1>6:64]+i[e+2>1&2147483647:n>>1&2147483647;e[t]=n}function writePngChunk(t,n,i,r){let s=r;const a=n.length;i[s]=a>>24&255;i[s+1]=a>>16&255;i[s+2]=a>>8&255;i[s+3]=255&a;s+=4;i[s]=255&t.charCodeAt(0);i[s+1]=255&t.charCodeAt(1);i[s+2]=255&t.charCodeAt(2);i[s+3]=255&t.charCodeAt(3);s+=4;i.set(n,s);s+=n.length;const o=function crc32(t,n,i){let r=-1;for(let s=n;s>>8^e[n]}return-1^r}(i,r+4,s);i[s]=o>>24&255;i[s+1]=o>>16&255;i[s+2]=o>>8&255;i[s+3]=255&o}function deflateSyncUncompressed(t){let e=t.length;const n=65535,i=Math.ceil(e/n),r=new Uint8Array(2+e+5*i+4);let s=0;r[s++]=120;r[s++]=156;let a=0;for(;e>n;){r[s++]=0;r[s++]=255;r[s++]=255;r[s++]=0;r[s++]=0;r.set(t.subarray(a,a+n),s);s+=n;a+=n;e-=n}r[s++]=1;r[s++]=255&e;r[s++]=e>>8&255;r[s++]=255&~e;r[s++]=(65535&~e)>>8&255;r.set(t.subarray(a),s);s+=t.length-a;const o=function adler32(t,e,n){let i=1,r=0;for(let s=e;s>24&255;r[s++]=o>>16&255;r[s++]=o>>8&255;r[s++]=255&o;return r}function encode(e,n,i,s){const a=e.width,o=e.height;let l,c,h;const d=e.data;switch(n){case r.ImageKind.GRAYSCALE_1BPP:c=0;l=1;h=a+7>>3;break;case r.ImageKind.RGB_24BPP:c=2;l=8;h=3*a;break;case r.ImageKind.RGBA_32BPP:c=6;l=8;h=4*a;break;default:throw new Error("invalid format")}const u=new Uint8Array((1+h)*o);let p=0,f=0;for(let t=0;t>24&255,a>>16&255,a>>8&255,255&a,o>>24&255,o>>16&255,o>>8&255,255&o,l,c,0,0,0]),m=function deflateSync(t){if(!r.isNodeJS)return deflateSyncUncompressed(t);try{const e=parseInt(process.versions.node)>=8?t:Buffer.from(t),n=require("zlib").deflateSync(e,{level:9});return n instanceof Uint8Array?n:new Uint8Array(n)}catch(t){(0,r.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+t)}return deflateSyncUncompressed(t)}(u),b=t.length+36+g.length+m.length,v=new Uint8Array(b);let y=0;v.set(t,y);y+=t.length;writePngChunk("IHDR",g,v,y);y+=12+g.length;writePngChunk("IDATA",m,v,y);y+=12+m.length;writePngChunk("IEND",new Uint8Array(0),v,y);return createObjectURL(v,"image/png",i)}return function convertImgDataToPng(t,e,n){return encode(t,void 0===t.kind?r.ImageKind.GRAYSCALE_1BPP:t.kind,e,n)}}();class SVGExtraState{constructor(){this.fontSizeScale=1;this.fontWeight=a;this.fontSize=0;this.textMatrix=r.IDENTITY_MATRIX;this.fontMatrix=r.FONT_IDENTITY_MATRIX;this.leading=0;this.textRenderingMode=r.TextRenderingMode.FILL;this.textMatrixScale=1;this.x=0;this.y=0;this.lineX=0;this.lineY=0;this.charSpacing=0;this.wordSpacing=0;this.textHScale=1;this.textRise=0;this.fillColor=o;this.strokeColor="#000000";this.fillAlpha=1;this.strokeAlpha=1;this.lineWidth=1;this.lineJoin="";this.lineCap="";this.miterLimit=0;this.dashArray=[];this.dashPhase=0;this.dependencies=[];this.activeClipUrl=null;this.clipGroup=null;this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(t,e){this.x=t;this.y=e}}function pf(t){if(Number.isInteger(t))return t.toString();const e=t.toFixed(10);let n=e.length-1;if("0"!==e[n])return e;do{n--}while("0"===e[n]);return e.substring(0,"."===e[n]?n:n+1)}function pm(t){if(0===t[4]&&0===t[5]){if(0===t[1]&&0===t[2])return 1===t[0]&&1===t[3]?"":`scale(${pf(t[0])} ${pf(t[3])})`;if(t[0]===t[3]&&t[1]===-t[2]){return`rotate(${pf(180*Math.acos(t[0])/Math.PI)})`}}else if(1===t[0]&&0===t[1]&&0===t[2]&&1===t[3])return`translate(${pf(t[4])} ${pf(t[5])})`;return`matrix(${pf(t[0])} ${pf(t[1])} ${pf(t[2])} ${pf(t[3])} ${pf(t[4])} ${pf(t[5])})`}let d=0,u=0,p=0;e.SVGGraphics=class SVGGraphics{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,i.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future.");this.svgFactory=new i.DOMSVGFactory;this.current=new SVGExtraState;this.transformMatrix=r.IDENTITY_MATRIX;this.transformStack=[];this.extraStack=[];this.commonObjs=t;this.objs=e;this.pendingClip=null;this.pendingEOFill=!1;this.embedFonts=!1;this.embeddedFonts=Object.create(null);this.cssStyle=null;this.forceDataSchema=!!n;this._operatorIdMapping=[];for(const t in r.OPS)this._operatorIdMapping[r.OPS[t]]=t}getObject(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):e}save(){this.transformStack.push(this.transformMatrix);const t=this.current;this.extraStack.push(t);this.current=t.clone()}restore(){this.transformMatrix=this.transformStack.pop();this.current=this.extraStack.pop();this.pendingClip=null;this.tgrp=null}group(t){this.save();this.executeOpTree(t);this.restore()}loadDependencies(t){const e=t.fnArray,n=t.argsArray;for(let t=0,i=e.length;t{t.get(e,n)}));this.current.dependencies.push(n)}return Promise.all(this.current.dependencies)}transform(t,e,n,i,s,a){const o=[t,e,n,i,s,a];this.transformMatrix=r.Util.transform(this.transformMatrix,o);this.tgrp=null}getSVG(t,e){this.viewport=e;const n=this._initialize(e);return this.loadDependencies(t).then((()=>{this.transformMatrix=r.IDENTITY_MATRIX;this.executeOpTree(this.convertOpList(t));return n}))}convertOpList(t){const e=this._operatorIdMapping,n=t.argsArray,i=t.fnArray,r=[];for(let t=0,s=i.length;t0&&(this.current.lineWidth=t)}setLineCap(t){this.current.lineCap=l[t]}setLineJoin(t){this.current.lineJoin=c[t]}setMiterLimit(t){this.current.miterLimit=t}setStrokeAlpha(t){this.current.strokeAlpha=t}setStrokeRGBColor(t,e,n){this.current.strokeColor=r.Util.makeHexColor(t,e,n)}setFillAlpha(t){this.current.fillAlpha=t}setFillRGBColor(t,e,n){this.current.fillColor=r.Util.makeHexColor(t,e,n);this.current.tspan=this.svgFactory.createElement("svg:tspan");this.current.xcoords=[];this.current.ycoords=[]}setStrokeColorN(t){this.current.strokeColor=this._makeColorN_Pattern(t)}setFillColorN(t){this.current.fillColor=this._makeColorN_Pattern(t)}shadingFill(t){const{width:e,height:n}=this.viewport,i=r.Util.inverseTransform(this.transformMatrix),[s,a,o,l]=r.Util.getAxialAlignedBoundingBox([0,0,e,n],i),c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x",s);c.setAttributeNS(null,"y",a);c.setAttributeNS(null,"width",o-s);c.setAttributeNS(null,"height",l-a);c.setAttributeNS(null,"fill",this._makeShadingPattern(t));this.current.fillAlpha<1&&c.setAttributeNS(null,"fill-opacity",this.current.fillAlpha);this._ensureTransformGroup().append(c)}_makeColorN_Pattern(t){return"TilingPattern"===t[0]?this._makeTilingPattern(t):this._makeShadingPattern(t)}_makeTilingPattern(t){const e=t[1],n=t[2],i=t[3]||r.IDENTITY_MATRIX,[s,a,o,l]=t[4],c=t[5],h=t[6],d=t[7],u="shading"+p++,[f,g,m,b]=r.Util.normalizeRect([...r.Util.applyTransform([s,a],i),...r.Util.applyTransform([o,l],i)]),[v,y]=r.Util.singularValueDecompose2dScale(i),_=c*v,A=h*y,S=this.svgFactory.createElement("svg:pattern");S.setAttributeNS(null,"id",u);S.setAttributeNS(null,"patternUnits","userSpaceOnUse");S.setAttributeNS(null,"width",_);S.setAttributeNS(null,"height",A);S.setAttributeNS(null,"x",`${f}`);S.setAttributeNS(null,"y",`${g}`);const E=this.svg,x=this.transformMatrix,w=this.current.fillColor,C=this.current.strokeColor,T=this.svgFactory.create(m-f,b-g);this.svg=T;this.transformMatrix=i;if(2===d){const t=r.Util.makeHexColor(...e);this.current.fillColor=t;this.current.strokeColor=t}this.executeOpTree(this.convertOpList(n));this.svg=E;this.transformMatrix=x;this.current.fillColor=w;this.current.strokeColor=C;S.append(T.childNodes[0]);this.defs.append(S);return`url(#${u})`}_makeShadingPattern(t){"string"==typeof t&&(t=this.objs.get(t));switch(t[0]){case"RadialAxial":const e="shading"+p++,n=t[3];let i;switch(t[1]){case"axial":const n=t[4],r=t[5];i=this.svgFactory.createElement("svg:linearGradient");i.setAttributeNS(null,"id",e);i.setAttributeNS(null,"gradientUnits","userSpaceOnUse");i.setAttributeNS(null,"x1",n[0]);i.setAttributeNS(null,"y1",n[1]);i.setAttributeNS(null,"x2",r[0]);i.setAttributeNS(null,"y2",r[1]);break;case"radial":const s=t[4],a=t[5],o=t[6],l=t[7];i=this.svgFactory.createElement("svg:radialGradient");i.setAttributeNS(null,"id",e);i.setAttributeNS(null,"gradientUnits","userSpaceOnUse");i.setAttributeNS(null,"cx",a[0]);i.setAttributeNS(null,"cy",a[1]);i.setAttributeNS(null,"r",l);i.setAttributeNS(null,"fx",s[0]);i.setAttributeNS(null,"fy",s[1]);i.setAttributeNS(null,"fr",o);break;default:throw new Error(`Unknown RadialAxial type: ${t[1]}`)}for(const t of n){const e=this.svgFactory.createElement("svg:stop");e.setAttributeNS(null,"offset",t[0]);e.setAttributeNS(null,"stop-color",t[1]);i.append(e)}this.defs.append(i);return`url(#${e})`;case"Mesh":(0,r.warn)("Unimplemented pattern Mesh");return null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${t[0]}`)}}setDash(t,e){this.current.dashArray=t;this.current.dashPhase=e}constructPath(t,e){const n=this.current;let i=n.x,s=n.y,a=[],o=0;for(const n of t)switch(0|n){case r.OPS.rectangle:i=e[o++];s=e[o++];const t=i+e[o++],n=s+e[o++];a.push("M",pf(i),pf(s),"L",pf(t),pf(s),"L",pf(t),pf(n),"L",pf(i),pf(n),"Z");break;case r.OPS.moveTo:i=e[o++];s=e[o++];a.push("M",pf(i),pf(s));break;case r.OPS.lineTo:i=e[o++];s=e[o++];a.push("L",pf(i),pf(s));break;case r.OPS.curveTo:i=e[o+4];s=e[o+5];a.push("C",pf(e[o]),pf(e[o+1]),pf(e[o+2]),pf(e[o+3]),pf(i),pf(s));o+=6;break;case r.OPS.curveTo2:a.push("C",pf(i),pf(s),pf(e[o]),pf(e[o+1]),pf(e[o+2]),pf(e[o+3]));i=e[o+2];s=e[o+3];o+=4;break;case r.OPS.curveTo3:i=e[o+2];s=e[o+3];a.push("C",pf(e[o]),pf(e[o+1]),pf(i),pf(s),pf(i),pf(s));o+=4;break;case r.OPS.closePath:a.push("Z")}a=a.join(" ");if(n.path&&t.length>0&&t[0]!==r.OPS.rectangle&&t[0]!==r.OPS.moveTo)a=n.path.getAttributeNS(null,"d")+a;else{n.path=this.svgFactory.createElement("svg:path");this._ensureTransformGroup().append(n.path)}n.path.setAttributeNS(null,"d",a);n.path.setAttributeNS(null,"fill","none");n.element=n.path;n.setCurrentPoint(i,s)}endPath(){const t=this.current;t.path=null;if(!this.pendingClip)return;if(!t.element){this.pendingClip=null;return}const e="clippath"+d++,n=this.svgFactory.createElement("svg:clipPath");n.setAttributeNS(null,"id",e);n.setAttributeNS(null,"transform",pm(this.transformMatrix));const i=t.element.cloneNode(!0);"evenodd"===this.pendingClip?i.setAttributeNS(null,"clip-rule","evenodd"):i.setAttributeNS(null,"clip-rule","nonzero");this.pendingClip=null;n.append(i);this.defs.append(n);if(t.activeClipUrl){t.clipGroup=null;for(const t of this.extraStack)t.clipGroup=null;n.setAttributeNS(null,"clip-path",t.activeClipUrl)}t.activeClipUrl=`url(#${e})`;this.tgrp=null}clip(t){this.pendingClip=t}closePath(){const t=this.current;if(t.path){const e=`${t.path.getAttributeNS(null,"d")}Z`;t.path.setAttributeNS(null,"d",e)}}setLeading(t){this.current.leading=-t}setTextRise(t){this.current.textRise=t}setTextRenderingMode(t){this.current.textRenderingMode=t}setHScale(t){this.current.textHScale=t/100}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,n]of t)switch(e){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n);break;case"CA":this.setStrokeAlpha(n);break;case"ca":this.setFillAlpha(n);break;default:(0,r.warn)(`Unimplemented graphic state operator ${e}`)}}fill(){const t=this.current;if(t.element){t.element.setAttributeNS(null,"fill",t.fillColor);t.element.setAttributeNS(null,"fill-opacity",t.fillAlpha);this.endPath()}}stroke(){const t=this.current;if(t.element){this._setStrokeAttributes(t.element);t.element.setAttributeNS(null,"fill","none");this.endPath()}}_setStrokeAttributes(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=this.current;let i=n.dashArray;1!==e&&i.length>0&&(i=i.map((function(t){return e*t})));t.setAttributeNS(null,"stroke",n.strokeColor);t.setAttributeNS(null,"stroke-opacity",n.strokeAlpha);t.setAttributeNS(null,"stroke-miterlimit",pf(n.miterLimit));t.setAttributeNS(null,"stroke-linecap",n.lineCap);t.setAttributeNS(null,"stroke-linejoin",n.lineJoin);t.setAttributeNS(null,"stroke-width",pf(e*n.lineWidth)+"px");t.setAttributeNS(null,"stroke-dasharray",i.map(pf).join(" "));t.setAttributeNS(null,"stroke-dashoffset",pf(e*n.dashPhase)+"px")}eoFill(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd");this.fill()}fillStroke(){this.stroke();this.fill()}eoFillStroke(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd");this.fillStroke()}closeStroke(){this.closePath();this.stroke()}closeFillStroke(){this.closePath();this.fillStroke()}closeEOFillStroke(){this.closePath();this.eoFillStroke()}paintSolidColorImageMask(){const t=this.svgFactory.createElement("svg:rect");t.setAttributeNS(null,"x","0");t.setAttributeNS(null,"y","0");t.setAttributeNS(null,"width","1px");t.setAttributeNS(null,"height","1px");t.setAttributeNS(null,"fill",this.current.fillColor);this._ensureTransformGroup().append(t)}paintImageXObject(t){const e=this.getObject(t);e?this.paintInlineImageXObject(e):(0,r.warn)(`Dependent image with object ID ${t} is not ready yet`)}paintInlineImageXObject(t,e){const n=t.width,i=t.height,r=h(t,this.forceDataSchema,!!e),s=this.svgFactory.createElement("svg:rect");s.setAttributeNS(null,"x","0");s.setAttributeNS(null,"y","0");s.setAttributeNS(null,"width",pf(n));s.setAttributeNS(null,"height",pf(i));this.current.element=s;this.clip("nonzero");const a=this.svgFactory.createElement("svg:image");a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);a.setAttributeNS(null,"x","0");a.setAttributeNS(null,"y",pf(-i));a.setAttributeNS(null,"width",pf(n)+"px");a.setAttributeNS(null,"height",pf(i)+"px");a.setAttributeNS(null,"transform",`scale(${pf(1/n)} ${pf(-1/i)})`);e?e.append(a):this._ensureTransformGroup().append(a)}paintImageMaskXObject(t){const e=this.getObject(t.data,t);if(e.bitmap){(0,r.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const n=this.current,i=e.width,s=e.height,a=n.fillColor;n.maskId="mask"+u++;const o=this.svgFactory.createElement("svg:mask");o.setAttributeNS(null,"id",n.maskId);const l=this.svgFactory.createElement("svg:rect");l.setAttributeNS(null,"x","0");l.setAttributeNS(null,"y","0");l.setAttributeNS(null,"width",pf(i));l.setAttributeNS(null,"height",pf(s));l.setAttributeNS(null,"fill",a);l.setAttributeNS(null,"mask",`url(#${n.maskId})`);this.defs.append(o);this._ensureTransformGroup().append(l);this.paintInlineImageXObject(e,o)}paintFormXObjectBegin(t,e){Array.isArray(t)&&6===t.length&&this.transform(t[0],t[1],t[2],t[3],t[4],t[5]);if(e){const t=e[2]-e[0],n=e[3]-e[1],i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x",e[0]);i.setAttributeNS(null,"y",e[1]);i.setAttributeNS(null,"width",pf(t));i.setAttributeNS(null,"height",pf(n));this.current.element=i;this.clip("nonzero");this.endPath()}}paintFormXObjectEnd(){}_initialize(t){const e=this.svgFactory.create(t.width,t.height),n=this.svgFactory.createElement("svg:defs");e.append(n);this.defs=n;const i=this.svgFactory.createElement("svg:g");i.setAttributeNS(null,"transform",pm(t.transform));e.append(i);this.svg=i;return e}_ensureClipGroup(){if(!this.current.clipGroup){const t=this.svgFactory.createElement("svg:g");t.setAttributeNS(null,"clip-path",this.current.activeClipUrl);this.svg.append(t);this.current.clipGroup=t}return this.current.clipGroup}_ensureTransformGroup(){if(!this.tgrp){this.tgrp=this.svgFactory.createElement("svg:g");this.tgrp.setAttributeNS(null,"transform",pm(this.transformMatrix));this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)}return this.tgrp}}},(t,e,n)=>{var i=n(3),r=n(188),s=n(193);i({target:"Array",proto:!0},{group:function group(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}});s("group")},(t,e,n)=>{var i=n(99),r=n(14),s=n(13),a=n(40),o=n(18),l=n(64),c=n(189),h=n(108),d=Array,u=r([].push);t.exports=function(t,e,n,r){for(var p,f,g,m=a(t),b=s(m),v=i(e,n),y=c(null),_=l(b),A=0;_>A;A++){g=b[A];(f=o(v(g,A,m)))in y?u(y[f],g):y[f]=[g]}if(r&&(p=r(m))!==d)for(f in y)y[f]=h(p,y[f]);return y}},(t,e,n)=>{var i,r=n(47),s=n(190),a=n(66),o=n(55),l=n(192),c=n(43),h=n(54),d="prototype",u="script",p=h("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<"+u+">"+t+""},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var e=t.parentWindow.Object;t=null;return e},NullProtoObject=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&i?NullProtoObjectViaActiveX(i):function(){var t,e=c("iframe"),n="java"+u+":";e.style.display="none";l.appendChild(e);e.src=String(n);(t=e.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(i);for(var t=a.length;t--;)delete NullProtoObject[d][a[t]];return NullProtoObject()};o[p]=!0;t.exports=Object.create||function create(t,e){var n;if(null!==t){EmptyConstructor[d]=r(t);n=new EmptyConstructor;EmptyConstructor[d]=null;n[p]=t}else n=NullProtoObject();return void 0===e?n:s.f(n,e)}},(t,e,n)=>{var i=n(6),r=n(46),s=n(45),a=n(47),o=n(12),l=n(191);e.f=i&&!r?Object.defineProperties:function defineProperties(t,e){a(t);for(var n,i=o(e),r=l(e),c=r.length,h=0;c>h;)s.f(t,n=r[h++],i[n]);return t}},(t,e,n)=>{var i=n(59),r=n(66);t.exports=Object.keys||function keys(t){return i(t,r)}},(t,e,n)=>{var i=n(24);t.exports=i("document","documentElement")},(t,e,n)=>{var i=n(34),r=n(189),s=n(45).f,a=i("unscopables"),o=Array.prototype;void 0===o[a]&&s(o,a,{configurable:!0,value:r(null)});t.exports=function(t){o[a][t]=!0}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.XfaText=void 0;n(89);class XfaText{static textContent(t){const e=[],n={items:e,styles:Object.create(null)};!function walk(t){if(!t)return;let n=null;const i=t.name;if("#text"===i)n=t.value;else{if(!XfaText.shouldBuildText(i))return;t?.attributes?.textContent?n=t.attributes.textContent:t.value&&(n=t.value)}null!==n&&e.push({str:n});if(t.children)for(const e of t.children)walk(e)}(t);return n}static shouldBuildText(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}e.XfaText=XfaText},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.TextLayerRenderTask=void 0;e.renderTextLayer=function renderTextLayer(t){if(!t.textContentSource&&(t.textContent||t.textContentStream)){(0,r.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead.");t.textContentSource=t.textContent||t.textContentStream}const{container:e,viewport:n}=t,i=getComputedStyle(e),s=i.getPropertyValue("visibility"),a=parseFloat(i.getPropertyValue("--scale-factor"));"visible"===s&&(!a||Math.abs(a-n.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");const o=new TextLayerRenderTask(t);o._render();return o};e.updateTextLayer=function updateTextLayer(t){let{container:e,viewport:n,textDivs:i,textDivProperties:s,isOffscreenCanvasSupported:a,mustRotate:o=!0,mustRescale:l=!0}=t;o&&(0,r.setLayerDimensions)(e,{rotation:n.rotation});if(l){const t=getCtx(0,a),e={prevFontSize:null,prevFontFamily:null,div:null,scale:n.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:t};for(const t of i){e.properties=s.get(t);e.div=t;layout(e)}}};n(89);n(2);var i=n(1),r=n(168);const s=30,a=.8,o=new Map;function getCtx(t,e){let n;if(e&&i.FeatureTest.isOffscreenCanvasSupported)n=new OffscreenCanvas(t,t).getContext("2d",{alpha:!1});else{const e=document.createElement("canvas");e.width=e.height=t;n=e.getContext("2d",{alpha:!1})}return n}function appendText(t,e,n){const r=document.createElement("span"),l={angle:0,canvasWidth:0,hasText:""!==e.str,hasEOL:e.hasEOL,fontSize:0};t._textDivs.push(r);const c=i.Util.transform(t._transform,e.transform);let h=Math.atan2(c[1],c[0]);const d=n[e.fontName];d.vertical&&(h+=Math.PI/2);const u=Math.hypot(c[2],c[3]),p=u*function getAscent(t,e){const n=o.get(t);if(n)return n;const i=getCtx(s,e);i.font=`${s}px ${t}`;const r=i.measureText("");let l=r.fontBoundingBoxAscent,c=Math.abs(r.fontBoundingBoxDescent);if(l){const e=l/(l+c);o.set(t,e);i.canvas.width=i.canvas.height=0;return e}i.strokeStyle="red";i.clearRect(0,0,s,s);i.strokeText("g",0,0);let h=i.getImageData(0,0,s,s).data;c=0;for(let t=h.length-1-3;t>=0;t-=4)if(h[t]>0){c=Math.ceil(t/4/s);break}i.clearRect(0,0,s,s);i.strokeText("A",0,s);h=i.getImageData(0,0,s,s).data;l=0;for(let t=0,e=h.length;t0){l=s-Math.floor(t/4/s);break}i.canvas.width=i.canvas.height=0;if(l){const e=l/(l+c);o.set(t,e);return e}o.set(t,a);return a}(d.fontFamily,t._isOffscreenCanvasSupported);let f,g;if(0===h){f=c[4];g=c[5]-p}else{f=c[4]+p*Math.sin(h);g=c[5]-p*Math.cos(h)}const m="calc(var(--scale-factor)*",b=r.style;if(t._container===t._rootContainer){b.left=`${(100*f/t._pageWidth).toFixed(2)}%`;b.top=`${(100*g/t._pageHeight).toFixed(2)}%`}else{b.left=`${m}${f.toFixed(2)}px)`;b.top=`${m}${g.toFixed(2)}px)`}b.fontSize=`${m}${u.toFixed(2)}px)`;b.fontFamily=d.fontFamily;l.fontSize=u;r.setAttribute("role","presentation");r.textContent=e.str;r.dir=e.dir;t._fontInspectorEnabled&&(r.dataset.fontName=e.fontName);0!==h&&(l.angle=h*(180/Math.PI));let v=!1;if(e.str.length>1)v=!0;else if(" "!==e.str&&e.transform[0]!==e.transform[3]){const t=Math.abs(e.transform[0]),n=Math.abs(e.transform[3]);t!==n&&Math.max(t,n)/Math.min(t,n)>1.5&&(v=!0)}v&&(l.canvasWidth=d.vertical?e.height:e.width);t._textDivProperties.set(r,l);t._isReadableStream&&t._layoutText(r)}function layout(t){const{div:e,scale:n,properties:i,ctx:r,prevFontSize:s,prevFontFamily:a}=t,{style:o}=e;let l="";if(0!==i.canvasWidth&&i.hasText){const{fontFamily:c}=o,{canvasWidth:h,fontSize:d}=i;if(s!==d||a!==c){r.font=`${d*n}px ${c}`;t.prevFontSize=d;t.prevFontFamily=c}const{width:u}=r.measureText(e.textContent);u>0&&(l=`scaleX(${h*n/u})`)}0!==i.angle&&(l=`rotate(${i.angle}deg) ${l}`);l.length>0&&(o.transform=l)}class TextLayerRenderTask{constructor(t){let{textContentSource:e,container:n,viewport:s,textDivs:a,textDivProperties:o,textContentItemsStr:l,isOffscreenCanvasSupported:c}=t;this._textContentSource=e;this._isReadableStream=e instanceof ReadableStream;this._container=this._rootContainer=n;this._textDivs=a||[];this._textContentItemsStr=l||[];this._isOffscreenCanvasSupported=c;this._fontInspectorEnabled=!!globalThis.FontInspector?.enabled;this._reader=null;this._textDivProperties=o||new WeakMap;this._canceled=!1;this._capability=new i.PromiseCapability;this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:s.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:getCtx(0,c)};const{pageWidth:h,pageHeight:d,pageX:u,pageY:p}=s.rawDims;this._transform=[1,0,0,-1,-u,p+d];this._pageWidth=h;this._pageHeight=d;(0,r.setLayerDimensions)(n,s);this._capability.promise.finally((()=>{this._layoutTextParams=null})).catch((()=>{}))}get promise(){return this._capability.promise}cancel(){this._canceled=!0;if(this._reader){this._reader.cancel(new i.AbortException("TextLayer task cancelled.")).catch((()=>{}));this._reader=null}this._capability.reject(new i.AbortException("TextLayer task cancelled."))}_processItems(t,e){for(const n of t)if(void 0!==n.str){this._textContentItemsStr.push(n.str);appendText(this,n,e)}else if("beginMarkedContentProps"===n.type||"beginMarkedContent"===n.type){const t=this._container;this._container=document.createElement("span");this._container.classList.add("markedContent");null!==n.id&&this._container.setAttribute("id",`${n.id}`);t.append(this._container)}else"endMarkedContent"===n.type&&(this._container=this._container.parentNode)}_layoutText(t){const e=this._layoutTextParams.properties=this._textDivProperties.get(t);this._layoutTextParams.div=t;layout(this._layoutTextParams);e.hasText&&this._container.append(t);if(e.hasEOL){const t=document.createElement("br");t.setAttribute("role","presentation");this._container.append(t)}}_render(){const t=new i.PromiseCapability;let e=Object.create(null);if(this._isReadableStream){const pump=()=>{this._reader.read().then((n=>{let{value:i,done:r}=n;if(r)t.resolve();else{Object.assign(e,i.styles);this._processItems(i.items,e);pump()}}),t.reject)};this._reader=this._textContentSource.getReader();pump()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{const{items:e,styles:n}=this._textContentSource;this._processItems(e,n);t.resolve()}}t.promise.then((()=>{e=null;!function render(t){if(t._canceled)return;const e=t._textDivs,n=t._capability;if(e.length>1e5)n.resolve();else{if(!t._isReadableStream)for(const n of e)t._layoutText(n);n.resolve()}}(this)}),this._capability.reject)}}e.TextLayerRenderTask=TextLayerRenderTask},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.AnnotationEditorLayer=void 0;n(125);n(136);n(138);n(141);n(143);n(145);n(147);var i=n(1),r=n(164),s=n(197),a=n(202),o=n(168),l=n(203);class AnnotationEditorLayer{#Se;#Ee=!1;#xe=null;#we=this.pointerup.bind(this);#Ce=this.pointerdown.bind(this);#Te=new Map;#Pe=!1;#ke=!1;#Me=!1;#Fe;static _initialized=!1;constructor(t){let{uiManager:e,pageIndex:n,div:i,accessibilityManager:r,annotationLayer:o,viewport:c,l10n:h}=t;const d=[s.FreeTextEditor,a.InkEditor,l.StampEditor];if(!AnnotationEditorLayer._initialized){AnnotationEditorLayer._initialized=!0;for(const t of d)t.initialize(h)}e.registerEditorTypes(d);this.#Fe=e;this.pageIndex=n;this.div=i;this.#Se=r;this.#xe=o;this.viewport=c;this.#Fe.addLayer(this)}get isEmpty(){return 0===this.#Te.size}updateToolbar(t){this.#Fe.updateToolbar(t)}updateMode(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.#Fe.getMode();this.#Re();if(t===i.AnnotationEditorType.INK){this.addInkEditorIfNeeded(!1);this.disableClick()}else this.enableClick();if(t!==i.AnnotationEditorType.NONE){this.div.classList.toggle("freeTextEditing",t===i.AnnotationEditorType.FREETEXT);this.div.classList.toggle("inkEditing",t===i.AnnotationEditorType.INK);this.div.classList.toggle("stampEditing",t===i.AnnotationEditorType.STAMP);this.div.hidden=!1}}addInkEditorIfNeeded(t){if(!t&&this.#Fe.getMode()!==i.AnnotationEditorType.INK)return;if(!t)for(const t of this.#Te.values())if(t.isEmpty()){t.setInBackground();return}this.#De({offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(t){this.#Fe.setEditingState(t)}addCommands(t){this.#Fe.addCommands(t)}enable(){this.div.style.pointerEvents="auto";const t=new Set;for(const e of this.#Te.values()){e.enableEditing();e.annotationElementId&&t.add(e.annotationElementId)}if(!this.#xe)return;const e=this.#xe.getEditableAnnotations();for(const n of e){n.hide();if(this.#Fe.isDeletedAnnotationElement(n.data.id))continue;if(t.has(n.data.id))continue;const e=this.deserialize(n);if(e){this.addOrRebuild(e);e.enableEditing()}}}disable(){this.#Me=!0;this.div.style.pointerEvents="none";const t=new Set;for(const e of this.#Te.values()){e.disableEditing();if(e.annotationElementId&&null===e.serialize()){this.getEditableAnnotation(e.annotationElementId)?.show();e.remove()}else t.add(e.annotationElementId)}if(this.#xe){const e=this.#xe.getEditableAnnotations();for(const n of e){const{id:e}=n.data;t.has(e)||this.#Fe.isDeletedAnnotationElement(e)||n.show()}}this.#Re();this.isEmpty&&(this.div.hidden=!0);this.#Me=!1}getEditableAnnotation(t){return this.#xe?.getEditableAnnotation(t)||null}setActiveEditor(t){this.#Fe.getActive()!==t&&this.#Fe.setActiveEditor(t)}enableClick(){this.div.addEventListener("pointerdown",this.#Ce);this.div.addEventListener("pointerup",this.#we)}disableClick(){this.div.removeEventListener("pointerdown",this.#Ce);this.div.removeEventListener("pointerup",this.#we)}attach(t){this.#Te.set(t.id,t);const{annotationElementId:e}=t;e&&this.#Fe.isDeletedAnnotationElement(e)&&this.#Fe.removeDeletedAnnotationElement(t)}detach(t){this.#Te.delete(t.id);this.#Se?.removePointerInTextLayer(t.contentDiv);!this.#Me&&t.annotationElementId&&this.#Fe.addDeletedAnnotationElement(t)}remove(t){this.detach(t);this.#Fe.removeEditor(t);t.div.contains(document.activeElement)&&setTimeout((()=>{this.#Fe.focusMainContainer()}),0);t.div.remove();t.isAttachedToDOM=!1;this.#ke||this.addInkEditorIfNeeded(!1)}changeParent(t){if(t.parent!==this){if(t.annotationElementId){this.#Fe.addDeletedAnnotationElement(t.annotationElementId);r.AnnotationEditor.deleteAnnotationElement(t);t.annotationElementId=null}this.attach(t);t.parent?.detach(t);t.setParent(this);if(t.div&&t.isAttachedToDOM){t.div.remove();this.div.append(t.div)}}}add(t){this.changeParent(t);this.#Fe.addEditor(t);this.attach(t);if(!t.isAttachedToDOM){const e=t.render();this.div.append(e);t.isAttachedToDOM=!0}t.fixAndSetPosition();t.onceAdded();this.#Fe.addToAnnotationStorage(t)}moveEditorInDOM(t){if(!t.isAttachedToDOM)return;const{activeElement:e}=document;if(t.div.contains(e)){t._focusEventsAllowed=!1;setTimeout((()=>{if(t.div.contains(document.activeElement))t._focusEventsAllowed=!0;else{t.div.addEventListener("focusin",(()=>{t._focusEventsAllowed=!0}),{once:!0});e.focus()}}),0)}t._structTreeParentId=this.#Se?.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?t.rebuild():this.add(t)}addUndoableEditor(t){this.addCommands({cmd:()=>t._uiManager.rebuild(t),undo:()=>{t.remove()},mustExec:!1})}getNextId(){return this.#Fe.getId()}#Ie(t){switch(this.#Fe.getMode()){case i.AnnotationEditorType.FREETEXT:return new s.FreeTextEditor(t);case i.AnnotationEditorType.INK:return new a.InkEditor(t);case i.AnnotationEditorType.STAMP:return new l.StampEditor(t)}return null}pasteEditor(t,e){this.#Fe.updateToolbar(t);this.#Fe.updateMode(t);const{offsetX:n,offsetY:i}=this.#Oe(),r=this.getNextId(),s=this.#Ie({parent:this,id:r,x:n,y:i,uiManager:this.#Fe,isCentered:!0,...e});s&&this.add(s)}deserialize(t){switch(t.annotationType??t.annotationEditorType){case i.AnnotationEditorType.FREETEXT:return s.FreeTextEditor.deserialize(t,this,this.#Fe);case i.AnnotationEditorType.INK:return a.InkEditor.deserialize(t,this,this.#Fe);case i.AnnotationEditorType.STAMP:return l.StampEditor.deserialize(t,this,this.#Fe)}return null}#De(t,e){const n=this.getNextId(),i=this.#Ie({parent:this,id:n,x:t.offsetX,y:t.offsetY,uiManager:this.#Fe,isCentered:e});i&&this.add(i);return i}#Oe(){const{x:t,y:e,width:n,height:i}=this.div.getBoundingClientRect(),r=Math.max(0,t),s=Math.max(0,e),a=(r+Math.min(window.innerWidth,t+n))/2-t,o=(s+Math.min(window.innerHeight,e+i))/2-e,[l,c]=this.viewport.rotation%180==0?[a,o]:[o,a];return{offsetX:l,offsetY:c}}addNewEditor(){this.#De(this.#Oe(),!0)}setSelected(t){this.#Fe.setSelected(t)}toggleSelected(t){this.#Fe.toggleSelected(t)}isSelected(t){return this.#Fe.isSelected(t)}unselect(t){this.#Fe.unselect(t)}pointerup(t){const{isMac:e}=i.FeatureTest.platform;if(!(0!==t.button||t.ctrlKey&&e)&&t.target===this.div&&this.#Pe){this.#Pe=!1;this.#Ee?this.#Fe.getMode()!==i.AnnotationEditorType.STAMP?this.#De(t,!1):this.#Fe.unselectAll():this.#Ee=!0}}pointerdown(t){if(this.#Pe){this.#Pe=!1;return}const{isMac:e}=i.FeatureTest.platform;if(0!==t.button||t.ctrlKey&&e)return;if(t.target!==this.div)return;this.#Pe=!0;const n=this.#Fe.getActive();this.#Ee=!n||n.isEmpty()}findNewParent(t,e,n){const i=this.#Fe.findParent(e,n);if(null===i||i===this)return!1;i.changeParent(t);return!0}destroy(){if(this.#Fe.getActive()?.parent===this){this.#Fe.commitOrRemove();this.#Fe.setActiveEditor(null)}for(const t of this.#Te.values()){this.#Se?.removePointerInTextLayer(t.contentDiv);t.setParent(null);t.isAttachedToDOM=!1;t.div.remove()}this.div=null;this.#Te.clear();this.#Fe.removeLayer(this)}#Re(){this.#ke=!0;for(const t of this.#Te.values())t.isEmpty()&&t.remove();this.#ke=!1}render(t){let{viewport:e}=t;this.viewport=e;(0,o.setLayerDimensions)(this.div,e);for(const t of this.#Fe.getEditors(this.pageIndex))this.add(t);this.updateMode()}update(t){let{viewport:e}=t;this.#Fe.commitOrRemove();this.viewport=e;(0,o.setLayerDimensions)(this.div,{rotation:e.rotation});this.updateMode()}get pageDimensions(){const{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}}e.AnnotationEditorLayer=AnnotationEditorLayer},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.FreeTextEditor=void 0;n(89);var i=n(1),r=n(165),s=n(164),a=n(198);class FreeTextEditor extends s.AnnotationEditor{#Le=this.editorDivBlur.bind(this);#Ne=this.editorDivFocus.bind(this);#Be=this.editorDivInput.bind(this);#je=this.editorDivKeydown.bind(this);#Ue;#ze="";#We=`${this.id}-editor`;#He;#qe=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const t=FreeTextEditor.prototype,arrowChecker=t=>t.isEmpty(),e=r.AnnotationEditorUIManager.TRANSLATE_SMALL,n=r.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,i.shadow)(this,"_keyboardManager",new r.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-e,0],checker:arrowChecker}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-n,0],checker:arrowChecker}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[e,0],checker:arrowChecker}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[n,0],checker:arrowChecker}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-e],checker:arrowChecker}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-n],checker:arrowChecker}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,e],checker:arrowChecker}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,n],checker:arrowChecker}]]))}static _type="freetext";constructor(t){super({...t,name:"freeTextEditor"});this.#Ue=t.color||FreeTextEditor._defaultColor||s.AnnotationEditor._defaultLineColor;this.#He=t.fontSize||FreeTextEditor._defaultFontSize}static initialize(t){s.AnnotationEditor.initialize(t,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const e=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(e.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,e){switch(t){case i.AnnotationEditorParamsType.FREETEXT_SIZE:FreeTextEditor._defaultFontSize=e;break;case i.AnnotationEditorParamsType.FREETEXT_COLOR:FreeTextEditor._defaultColor=e}}updateParams(t,e){switch(t){case i.AnnotationEditorParamsType.FREETEXT_SIZE:this.#Ge(e);break;case i.AnnotationEditorParamsType.FREETEXT_COLOR:this.#Ve(e)}}static get defaultPropertiesToUpdate(){return[[i.AnnotationEditorParamsType.FREETEXT_SIZE,FreeTextEditor._defaultFontSize],[i.AnnotationEditorParamsType.FREETEXT_COLOR,FreeTextEditor._defaultColor||s.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[i.AnnotationEditorParamsType.FREETEXT_SIZE,this.#He],[i.AnnotationEditorParamsType.FREETEXT_COLOR,this.#Ue]]}#Ge(t){const setFontsize=t=>{this.editorDiv.style.fontSize=`calc(${t}px * var(--scale-factor))`;this.translate(0,-(t-this.#He)*this.parentScale);this.#He=t;this.#$e()},e=this.#He;this.addCommands({cmd:()=>{setFontsize(t)},undo:()=>{setFontsize(e)},mustExec:!0,type:i.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#Ve(t){const e=this.#Ue;this.addCommands({cmd:()=>{this.#Ue=this.editorDiv.style.color=t},undo:()=>{this.#Ue=this.editorDiv.style.color=e},mustExec:!0,type:i.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(t,e){this._uiManager.translateSelectedEditors(t,e,!0)}getInitialTranslation(){const t=this.parentScale;return[-FreeTextEditor._internalPadding*t,-(FreeTextEditor._internalPadding+this.#He)*t]}rebuild(){if(this.parent){super.rebuild();null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}}enableEditMode(){if(!this.isInEditMode()){this.parent.setEditingState(!1);this.parent.updateToolbar(i.AnnotationEditorType.FREETEXT);super.enableEditMode();this.overlayDiv.classList.remove("enabled");this.editorDiv.contentEditable=!0;this._isDraggable=!1;this.div.removeAttribute("aria-activedescendant");this.editorDiv.addEventListener("keydown",this.#je);this.editorDiv.addEventListener("focus",this.#Ne);this.editorDiv.addEventListener("blur",this.#Le);this.editorDiv.addEventListener("input",this.#Be)}}disableEditMode(){if(this.isInEditMode()){this.parent.setEditingState(!0);super.disableEditMode();this.overlayDiv.classList.add("enabled");this.editorDiv.contentEditable=!1;this.div.setAttribute("aria-activedescendant",this.#We);this._isDraggable=!0;this.editorDiv.removeEventListener("keydown",this.#je);this.editorDiv.removeEventListener("focus",this.#Ne);this.editorDiv.removeEventListener("blur",this.#Le);this.editorDiv.removeEventListener("input",this.#Be);this.div.focus({preventScroll:!0});this.isEditing=!1;this.parent.div.classList.add("freeTextEditing")}}focusin(t){if(this._focusEventsAllowed){super.focusin(t);t.target!==this.editorDiv&&this.editorDiv.focus()}}onceAdded(){if(this.width)this.#Xe();else{this.enableEditMode();this.editorDiv.focus();this._initialOptions?.isCentered&&this.center();this._initialOptions=null}}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1;if(this.parent){this.parent.setEditingState(!0);this.parent.div.classList.add("freeTextEditing")}super.remove()}#Ke(){const t=this.editorDiv.getElementsByTagName("div");if(0===t.length)return this.editorDiv.innerText;const e=[];for(const n of t)e.push(n.innerText.replace(/\r\n?|\n/,""));return e.join("\n")}#$e(){const[t,e]=this.parentDimensions;let n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{const{currentLayer:t,div:e}=this,i=e.style.display;e.style.display="hidden";t.div.append(this.div);n=e.getBoundingClientRect();e.remove();e.style.display=i}if(this.rotation%180==this.parentRotation%180){this.width=n.width/t;this.height=n.height/e}else{this.width=n.height/t;this.height=n.width/e}this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit();this.disableEditMode();const t=this.#ze,e=this.#ze=this.#Ke().trimEnd();if(t===e)return;const setText=t=>{this.#ze=t;if(t){this.#Ye();this._uiManager.rebuild(this);this.#$e()}else this.remove()};this.addCommands({cmd:()=>{setText(e)},undo:()=>{setText(t)},mustExec:!1});this.#$e()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode();this.editorDiv.focus()}dblclick(t){this.enterInEditMode()}keydown(t){if(t.target===this.div&&"Enter"===t.key){this.enterInEditMode();t.preventDefault()}}editorDivKeydown(t){FreeTextEditor._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment");this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox");this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let t,e;if(this.width){t=this.x;e=this.y}super.render();this.editorDiv=document.createElement("div");this.editorDiv.className="internal";this.editorDiv.setAttribute("id",this.#We);this.enableEditing();s.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then((t=>this.editorDiv?.setAttribute("aria-label",t)));s.AnnotationEditor._l10nPromise.get("free_text2_default_content").then((t=>this.editorDiv?.setAttribute("default-content",t)));this.editorDiv.contentEditable=!0;const{style:n}=this.editorDiv;n.fontSize=`calc(${this.#He}px * var(--scale-factor))`;n.color=this.#Ue;this.div.append(this.editorDiv);this.overlayDiv=document.createElement("div");this.overlayDiv.classList.add("overlay","enabled");this.div.append(this.overlayDiv);(0,r.bindEvents)(this,this.div,["dblclick","keydown"]);if(this.width){const[n,i]=this.parentDimensions;if(this.annotationElementId){const{position:r}=this.#qe;let[s,a]=this.getInitialTranslation();[s,a]=this.pageTranslationToScreen(s,a);const[o,l]=this.pageDimensions,[c,h]=this.pageTranslation;let d,u;switch(this.rotation){case 0:d=t+(r[0]-c)/o;u=e+this.height-(r[1]-h)/l;break;case 90:d=t+(r[0]-c)/o;u=e-(r[1]-h)/l;[s,a]=[a,-s];break;case 180:d=t-this.width+(r[0]-c)/o;u=e-(r[1]-h)/l;[s,a]=[-s,-a];break;case 270:d=t+(r[0]-c-this.height*l)/o;u=e+(r[1]-h-this.width*o)/l;[s,a]=[-a,s]}this.setAt(d*n,u*i,s,a)}else this.setAt(t*n,e*i,this.width*n,this.height*i);this.#Ye();this._isDraggable=!0;this.editorDiv.contentEditable=!1}else{this._isDraggable=!1;this.editorDiv.contentEditable=!0}return this.div}#Ye(){this.editorDiv.replaceChildren();if(this.#ze)for(const t of this.#ze.split("\n")){const e=document.createElement("div");e.append(t?document.createTextNode(t):document.createElement("br"));this.editorDiv.append(e)}}get contentDiv(){return this.editorDiv}static deserialize(t,e,n){let r=null;if(t instanceof a.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:e,fontColor:n},rect:s,rotation:a,id:o},textContent:l,textPosition:c,parent:{page:{pageNumber:h}}}=t;if(!l||0===l.length)return null;r=t={annotationType:i.AnnotationEditorType.FREETEXT,color:Array.from(n),fontSize:e,value:l.join("\n"),position:c,pageIndex:h-1,rect:s,rotation:a,id:o,deleted:!1}}const s=super.deserialize(t,e,n);s.#He=t.fontSize;s.#Ue=i.Util.makeHexColor(...t.color);s.#ze=t.value;s.annotationElementId=t.id||null;s.#qe=r;return s}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const e=FreeTextEditor._internalPadding*this.parentScale,n=this.getRect(e,e),r=s.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#Ue),a={annotationType:i.AnnotationEditorType.FREETEXT,color:r,fontSize:this.#He,value:this.#ze,pageIndex:this.pageIndex,rect:n,rotation:this.rotation,structTreeParentId:this._structTreeParentId};if(t)return a;if(this.annotationElementId&&!this.#Je(a))return null;a.id=this.annotationElementId;return a}#Je(t){const{value:e,fontSize:n,color:i,rect:r,pageIndex:s}=this.#qe;return t.value!==e||t.fontSize!==n||t.rect.some(((t,e)=>Math.abs(t-r[e])>=1))||t.color.some(((t,e)=>t!==i[e]))||t.pageIndex!==s}#Xe(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.annotationElementId)return;this.#$e();if(!t&&(0===this.width||0===this.height)){setTimeout((()=>this.#Xe(!0)),0);return}const e=FreeTextEditor._internalPadding*this.parentScale;this.#qe.rect=this.getRect(e,e)}}e.FreeTextEditor=FreeTextEditor},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.StampAnnotationElement=e.InkAnnotationElement=e.FreeTextAnnotationElement=e.AnnotationLayer=void 0;n(89);n(125);n(136);n(138);n(141);n(143);n(145);n(147);var i=n(1),r=n(168),s=n(163),a=n(199),o=n(200),l=n(201);const c=1e3,h=new WeakSet;function getRectDims(t){return{width:t[2]-t[0],height:t[3]-t[1]}}class AnnotationElementFactory{static create(t){switch(t.data.annotationType){case i.AnnotationType.LINK:return new LinkAnnotationElement(t);case i.AnnotationType.TEXT:return new TextAnnotationElement(t);case i.AnnotationType.WIDGET:switch(t.data.fieldType){case"Tx":return new TextWidgetAnnotationElement(t);case"Btn":return t.data.radioButton?new RadioButtonWidgetAnnotationElement(t):t.data.checkBox?new CheckboxWidgetAnnotationElement(t):new PushButtonWidgetAnnotationElement(t);case"Ch":return new ChoiceWidgetAnnotationElement(t);case"Sig":return new SignatureWidgetAnnotationElement(t)}return new WidgetAnnotationElement(t);case i.AnnotationType.POPUP:return new PopupAnnotationElement(t);case i.AnnotationType.FREETEXT:return new FreeTextAnnotationElement(t);case i.AnnotationType.LINE:return new LineAnnotationElement(t);case i.AnnotationType.SQUARE:return new SquareAnnotationElement(t);case i.AnnotationType.CIRCLE:return new CircleAnnotationElement(t);case i.AnnotationType.POLYLINE:return new PolylineAnnotationElement(t);case i.AnnotationType.CARET:return new CaretAnnotationElement(t);case i.AnnotationType.INK:return new InkAnnotationElement(t);case i.AnnotationType.POLYGON:return new PolygonAnnotationElement(t);case i.AnnotationType.HIGHLIGHT:return new HighlightAnnotationElement(t);case i.AnnotationType.UNDERLINE:return new UnderlineAnnotationElement(t);case i.AnnotationType.SQUIGGLY:return new SquigglyAnnotationElement(t);case i.AnnotationType.STRIKEOUT:return new StrikeOutAnnotationElement(t);case i.AnnotationType.STAMP:return new StampAnnotationElement(t);case i.AnnotationType.FILEATTACHMENT:return new FileAttachmentAnnotationElement(t);default:return new AnnotationElement(t)}}}class AnnotationElement{#Qe=!1;constructor(t){let{isRenderable:e=!1,ignoreBorder:n=!1,createQuadrilaterals:i=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.isRenderable=e;this.data=t.data;this.layer=t.layer;this.linkService=t.linkService;this.downloadManager=t.downloadManager;this.imageResourcesPath=t.imageResourcesPath;this.renderForms=t.renderForms;this.svgFactory=t.svgFactory;this.annotationStorage=t.annotationStorage;this.enableScripting=t.enableScripting;this.hasJSActions=t.hasJSActions;this._fieldObjects=t.fieldObjects;this.parent=t.parent;e&&(this.container=this._createContainer(n));i&&this._createQuadrilaterals()}static _hasPopupData(t){let{titleObj:e,contentsObj:n,richText:i}=t;return!!(e?.str||n?.str||i?.str)}get hasPopupData(){return AnnotationElement._hasPopupData(this.data)}_createContainer(t){const{data:e,parent:{page:n,viewport:r}}=this,s=document.createElement("section");s.setAttribute("data-annotation-id",e.id);this instanceof WidgetAnnotationElement||(s.tabIndex=c);s.style.zIndex=this.parent.zIndex++;this.data.popupRef&&s.setAttribute("aria-haspopup","dialog");e.noRotate&&s.classList.add("norotate");const{pageWidth:a,pageHeight:o,pageX:l,pageY:h}=r.rawDims;if(!e.rect||this instanceof PopupAnnotationElement){const{rotation:t}=e;e.hasOwnCanvas||0===t||this.setRotation(t,s);return s}const{width:d,height:u}=getRectDims(e.rect),p=i.Util.normalizeRect([e.rect[0],n.view[3]-e.rect[1]+n.view[1],e.rect[2],n.view[3]-e.rect[3]+n.view[1]]);if(!t&&e.borderStyle.width>0){s.style.borderWidth=`${e.borderStyle.width}px`;const t=e.borderStyle.horizontalCornerRadius,n=e.borderStyle.verticalCornerRadius;if(t>0||n>0){const e=`calc(${t}px * var(--scale-factor)) / calc(${n}px * var(--scale-factor))`;s.style.borderRadius=e}else if(this instanceof RadioButtonWidgetAnnotationElement){const t=`calc(${d}px * var(--scale-factor)) / calc(${u}px * var(--scale-factor))`;s.style.borderRadius=t}switch(e.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:s.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:s.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:s.style.borderBottomStyle="solid"}const r=e.borderColor||null;if(r){this.#Qe=!0;s.style.borderColor=i.Util.makeHexColor(0|r[0],0|r[1],0|r[2])}else s.style.borderWidth=0}s.style.left=100*(p[0]-l)/a+"%";s.style.top=100*(p[1]-h)/o+"%";const{rotation:f}=e;if(e.hasOwnCanvas||0===f){s.style.width=100*d/a+"%";s.style.height=100*u/o+"%"}else this.setRotation(f,s);return s}setRotation(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;if(!this.data.rect)return;const{pageWidth:n,pageHeight:i}=this.parent.viewport.rawDims,{width:r,height:s}=getRectDims(this.data.rect);let a,o;if(t%180==0){a=100*r/n;o=100*s/i}else{a=100*s/n;o=100*r/i}e.style.width=`${a}%`;e.style.height=`${o}%`;e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const setColor=(t,e,n)=>{const i=n.detail[t],r=i[0],s=i.slice(1);n.target.style[e]=a.ColorConverters[`${r}_HTML`](s);this.annotationStorage.setValue(this.data.id,{[e]:a.ColorConverters[`${r}_rgb`](s)})};return(0,i.shadow)(this,"_commonActions",{display:t=>{const{display:e}=t.detail,n=e%2==1;this.container.style.visibility=n?"hidden":"visible";this.annotationStorage.setValue(this.data.id,{noView:n,noPrint:1===e||2===e})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:e}=t.detail;this.container.style.visibility=e?"hidden":"visible";this.annotationStorage.setValue(this.data.id,{noPrint:e,noView:e})},focus:t=>{setTimeout((()=>t.target.focus({preventScroll:!1})),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:t=>{setColor("bgColor","backgroundColor",t)},fillColor:t=>{setColor("fillColor","backgroundColor",t)},fgColor:t=>{setColor("fgColor","color",t)},textColor:t=>{setColor("textColor","color",t)},borderColor:t=>{setColor("borderColor","borderColor",t)},strokeColor:t=>{setColor("strokeColor","borderColor",t)},rotation:t=>{const e=t.detail.rotation;this.setRotation(e);this.annotationStorage.setValue(this.data.id,{rotation:e})}})}_dispatchEventFromSandbox(t,e){const n=this._commonActions;for(const i of Object.keys(e.detail)){const r=t[i]||n[i];r?.(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const n=this._commonActions;for(const[i,r]of Object.entries(e)){const s=n[i];if(s){s({detail:{[i]:r},target:t});delete e[i]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,n,i,r]=this.data.rect;if(1===t.length){const[,{x:s,y:a},{x:o,y:l}]=t[0];if(i===s&&r===a&&e===o&&n===l)return}const{style:s}=this.container;let a;if(this.#Qe){const{borderColor:t,borderWidth:e}=s;s.borderWidth=0;a=["url('data:image/svg+xml;utf8,",'',``];this.container.classList.add("hasBorder")}const o=i-e,l=r-n,{svgFactory:c}=this,h=c.createElement("svg");h.classList.add("quadrilateralsContainer");h.setAttribute("width",0);h.setAttribute("height",0);const d=c.createElement("defs");h.append(d);const u=c.createElement("clipPath"),p=`clippath_${this.data.id}`;u.setAttribute("id",p);u.setAttribute("clipPathUnits","objectBoundingBox");d.append(u);for(const[,{x:n,y:i},{x:s,y:h}]of t){const t=c.createElement("rect"),d=(s-e)/o,p=(r-i)/l,f=(n-s)/o,g=(i-h)/l;t.setAttribute("x",d);t.setAttribute("y",p);t.setAttribute("width",f);t.setAttribute("height",g);u.append(t);a?.push(``)}if(this.#Qe){a.push("')");s.backgroundImage=a.join("")}this.container.append(h);this.container.style.clipPath=`url(#${p})`}_createPopup(){const{container:t,data:e}=this;t.setAttribute("aria-haspopup","dialog");const n=new PopupAnnotationElement({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation},parent:this.parent,elements:[this]});this.parent.div.append(n.render())}render(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[];if(this._fieldObjects){const r=this._fieldObjects[t];if(r)for(const{page:t,id:s,exportValues:a}of r){if(-1===t)continue;if(s===e)continue;const r="string"==typeof a?a:null,o=document.querySelector(`[data-element-id="${s}"]`);!o||h.has(o)?n.push({id:s,exportValue:r,domElement:o}):(0,i.warn)(`_getElementsByName - element not allowed: ${s}`)}return n}for(const i of document.getElementsByName(t)){const{exportValue:t}=i,r=i.getAttribute("data-element-id");r!==e&&(h.has(i)&&n.push({id:r,exportValue:t,domElement:i}))}return n}show(){this.container&&(this.container.hidden=!1);this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0);this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",(()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e})}))}}class LinkAnnotationElement extends AnnotationElement{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(t,{isRenderable:!0,ignoreBorder:!!e?.ignoreBorder,createQuadrilaterals:!0});this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:e}=this,n=document.createElement("a");n.setAttribute("data-element-id",t.id);let i=!1;if(t.url){e.addLinkAttributes(n,t.url,t.newWindow);i=!0}else if(t.action){this._bindNamedAction(n,t.action);i=!0}else if(t.attachment){this._bindAttachment(n,t.attachment);i=!0}else if(t.setOCGState){this.#Ze(n,t.setOCGState);i=!0}else if(t.dest){this._bindLink(n,t.dest);i=!0}else{if(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions){this._bindJSAction(n,t);i=!0}if(t.resetForm){this._bindResetFormAction(n,t.resetForm);i=!0}else if(this.isTooltipOnly&&!i){this._bindLink(n,"");i=!0}}this.container.classList.add("linkAnnotation");i&&this.container.append(n);return this.container}#tn(){this.container.setAttribute("data-internal-link","")}_bindLink(t,e){t.href=this.linkService.getDestinationHash(e);t.onclick=()=>{e&&this.linkService.goToDestination(e);return!1};(e||""===e)&&this.#tn()}_bindNamedAction(t,e){t.href=this.linkService.getAnchorUrl("");t.onclick=()=>{this.linkService.executeNamedAction(e);return!1};this.#tn()}_bindAttachment(t,e){t.href=this.linkService.getAnchorUrl("");t.onclick=()=>{this.downloadManager?.openOrDownloadData(this.container,e.content,e.filename);return!1};this.#tn()}#Ze(t,e){t.href=this.linkService.getAnchorUrl("");t.onclick=()=>{this.linkService.executeSetOCGState(e);return!1};this.#tn()}_bindJSAction(t,e){t.href=this.linkService.getAnchorUrl("");const n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const i of Object.keys(e.actions)){const r=n.get(i);r&&(t[r]=()=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e.id,name:i}});return!1})}t.onclick||(t.onclick=()=>!1);this.#tn()}_bindResetFormAction(t,e){const n=t.onclick;n||(t.href=this.linkService.getAnchorUrl(""));this.#tn();if(this._fieldObjects)t.onclick=()=>{n?.();const{fields:t,refs:r,include:s}=e,a=[];if(0!==t.length||0!==r.length){const e=new Set(r);for(const n of t){const t=this._fieldObjects[n]||[];for(const{id:n}of t)e.add(n)}for(const t of Object.values(this._fieldObjects))for(const n of t)e.has(n.id)===s&&a.push(n)}else for(const t of Object.values(this._fieldObjects))a.push(...t);const o=this.annotationStorage,l=[];for(const t of a){const{id:e}=t;l.push(e);switch(t.type){case"text":{const n=t.defaultValue||"";o.setValue(e,{value:n});break}case"checkbox":case"radiobutton":{const n=t.defaultValue===t.exportValues;o.setValue(e,{value:n});break}case"combobox":case"listbox":{const n=t.defaultValue||"";o.setValue(e,{value:n});break}default:continue}const n=document.querySelector(`[data-element-id="${e}"]`);n&&(h.has(n)?n.dispatchEvent(new Event("resetform")):(0,i.warn)(`_bindResetFormAction - element not allowed: ${e}`))}this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:l,name:"ResetForm"}});return!1};else{(0,i.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.');n||(t.onclick=()=>!1)}}}class TextAnnotationElement extends AnnotationElement{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg";t.alt="[{{type}} Annotation]";t.dataset.l10nId="text_annotation_type";t.dataset.l10nArgs=JSON.stringify({type:this.data.name});!this.data.popupRef&&this.hasPopupData&&this._createPopup();this.container.append(t);return this.container}}class WidgetAnnotationElement extends AnnotationElement{render(){this.data.alternativeText&&(this.container.title=this.data.alternativeText);return this.container}showElementAndHideCanvas(t){if(this.data.hasOwnCanvas){"CANVAS"===t.previousSibling?.nodeName&&(t.previousSibling.hidden=!0);t.hidden=!1}}_getKeyModifier(t){const{isWin:e,isMac:n}=i.FeatureTest.platform;return e&&t.ctrlKey||n&&t.metaKey}_setEventListener(t,e,n,i,r){n.includes("mouse")?t.addEventListener(n,(t=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(t),shift:t.shiftKey,modifier:this._getKeyModifier(t)}})})):t.addEventListener(n,(t=>{if("blur"===n){if(!e.focused||!t.relatedTarget)return;e.focused=!1}else if("focus"===n){if(e.focused)return;e.focused=!0}r&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(t)}})}))}_setEventListeners(t,e,n,i){for(const[r,s]of n)if("Action"===s||this.data.actions?.[s]){"Focus"!==s&&"Blur"!==s||(e||={focused:!1});this._setEventListener(t,e,r,s,i);"Focus"!==s||this.data.actions?.Blur?"Blur"!==s||this.data.actions?.Focus||this._setEventListener(t,e,"focus","Focus",null):this._setEventListener(t,e,"blur","Blur",null)}}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=null===e?"transparent":i.Util.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){const e=["left","center","right"],{fontColor:n}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||9,s=t.style;let a;const roundToOneDecimal=t=>Math.round(10*t)/10;if(this.data.multiLine){const t=Math.abs(this.data.rect[3]-this.data.rect[1]-2),e=t/(Math.round(t/(i.LINE_FACTOR*r))||1);a=Math.min(r,roundToOneDecimal(e/i.LINE_FACTOR))}else{const t=Math.abs(this.data.rect[3]-this.data.rect[1]-2);a=Math.min(r,roundToOneDecimal(t/i.LINE_FACTOR))}s.fontSize=`calc(${a}px * var(--scale-factor))`;s.color=i.Util.makeHexColor(n[0],n[1],n[2]);null!==this.data.textAlignment&&(s.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required");t.setAttribute("aria-required",e)}}class TextWidgetAnnotationElement extends WidgetAnnotationElement{constructor(t){super(t,{isRenderable:t.renderForms||!t.data.hasAppearance&&!!t.data.fieldValue})}setPropertyOnSiblings(t,e,n,i){const r=this.annotationStorage;for(const s of this._getElementsByName(t.name,t.id)){s.domElement&&(s.domElement[e]=n);r.setValue(s.id,{[i]:n})}}render(){const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let n=null;if(this.renderForms){const i=t.getValue(e,{value:this.data.fieldValue});let r=i.value||"";const s=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;s&&r.length>s&&(r=r.slice(0,s));let a=i.formattedValue||this.data.textContent?.join("\n")||null;a&&this.data.comb&&(a=a.replaceAll(/\s+/g,""));const o={userValue:r,formattedValue:a,lastCommittedValue:null,commitKey:1,focused:!1};if(this.data.multiLine){n=document.createElement("textarea");n.textContent=a??r;this.data.doNotScroll&&(n.style.overflowY="hidden")}else{n=document.createElement("input");n.type="text";n.setAttribute("value",a??r);this.data.doNotScroll&&(n.style.overflowX="hidden")}this.data.hasOwnCanvas&&(n.hidden=!0);h.add(n);n.setAttribute("data-element-id",e);n.disabled=this.data.readOnly;n.name=this.data.fieldName;n.tabIndex=c;this._setRequired(n,this.data.required);s&&(n.maxLength=s);n.addEventListener("input",(i=>{t.setValue(e,{value:i.target.value});this.setPropertyOnSiblings(n,"value",i.target.value,"value");o.formattedValue=null}));n.addEventListener("resetform",(t=>{const e=this.data.defaultFieldValue??"";n.value=o.userValue=e;o.formattedValue=null}));let blurListener=t=>{const{formattedValue:e}=o;null!=e&&(t.target.value=e);t.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener("focus",(t=>{if(o.focused)return;const{target:e}=t;o.userValue&&(e.value=o.userValue);o.lastCommittedValue=e.value;o.commitKey=1;o.focused=!0}));n.addEventListener("updatefromsandbox",(n=>{this.showElementAndHideCanvas(n.target);const i={value(n){o.userValue=n.detail.value??"";t.setValue(e,{value:o.userValue.toString()});n.target.value=o.userValue},formattedValue(n){const{formattedValue:i}=n.detail;o.formattedValue=i;null!=i&&n.target!==document.activeElement&&(n.target.value=i);t.setValue(e,{formattedValue:i})},selRange(t){t.target.setSelectionRange(...t.detail.selRange)},charLimit:n=>{const{charLimit:i}=n.detail,{target:r}=n;if(0===i){r.removeAttribute("maxLength");return}r.setAttribute("maxLength",i);let s=o.userValue;if(s&&!(s.length<=i)){s=s.slice(0,i);r.value=o.userValue=s;t.setValue(e,{value:s});this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:s,willCommit:!0,commitKey:1,selStart:r.selectionStart,selEnd:r.selectionEnd}})}}};this._dispatchEventFromSandbox(i,n)}));n.addEventListener("keydown",(t=>{o.commitKey=1;let n=-1;"Escape"===t.key?n=0:"Enter"!==t.key||this.data.multiLine?"Tab"===t.key&&(o.commitKey=3):n=2;if(-1===n)return;const{value:i}=t.target;if(o.lastCommittedValue!==i){o.lastCommittedValue=i;o.userValue=i;this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:i,willCommit:!0,commitKey:n,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}})}}));const i=blurListener;blurListener=null;n.addEventListener("blur",(t=>{if(!o.focused||!t.relatedTarget)return;o.focused=!1;const{value:n}=t.target;o.userValue=n;o.lastCommittedValue!==n&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:n,willCommit:!0,commitKey:o.commitKey,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}});i(t)}));this.data.actions?.Keystroke&&n.addEventListener("beforeinput",(t=>{o.lastCommittedValue=null;const{data:n,target:i}=t,{value:r,selectionStart:s,selectionEnd:a}=i;let l=s,c=a;switch(t.inputType){case"deleteWordBackward":{const t=r.substring(0,s).match(/\w*[^\w]*$/);t&&(l-=t[0].length);break}case"deleteWordForward":{const t=r.substring(s).match(/^[^\w]*\w*/);t&&(c+=t[0].length);break}case"deleteContentBackward":s===a&&(l-=1);break;case"deleteContentForward":s===a&&(c+=1)}t.preventDefault();this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:r,change:n||"",willCommit:!1,selStart:l,selEnd:c}})}));this._setEventListeners(n,o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.value))}blurListener&&n.addEventListener("blur",blurListener);if(this.data.comb){const t=(this.data.rect[2]-this.data.rect[0])/s;n.classList.add("comb");n.style.letterSpacing=`calc(${t}px * var(--scale-factor) - 1ch)`}}else{n=document.createElement("div");n.textContent=this.data.fieldValue;n.style.verticalAlign="middle";n.style.display="table-cell"}this._setTextStyle(n);this._setBackgroundColor(n);this._setDefaultPropertiesFromJS(n);this.container.append(n);return this.container}}class SignatureWidgetAnnotationElement extends WidgetAnnotationElement{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,n=e.id;let i=t.getValue(n,{value:e.exportValue===e.fieldValue}).value;if("string"==typeof i){i="Off"!==i;t.setValue(n,{value:i})}this.container.classList.add("buttonWidgetAnnotation","checkBox");const r=document.createElement("input");h.add(r);r.setAttribute("data-element-id",n);r.disabled=e.readOnly;this._setRequired(r,this.data.required);r.type="checkbox";r.name=e.fieldName;i&&r.setAttribute("checked",!0);r.setAttribute("exportValue",e.exportValue);r.tabIndex=c;r.addEventListener("change",(i=>{const{name:r,checked:s}=i.target;for(const i of this._getElementsByName(r,n)){const n=s&&i.exportValue===e.exportValue;i.domElement&&(i.domElement.checked=n);t.setValue(i.id,{value:n})}t.setValue(n,{value:s})}));r.addEventListener("resetform",(t=>{const n=e.defaultFieldValue||"Off";t.target.checked=n===e.exportValue}));if(this.enableScripting&&this.hasJSActions){r.addEventListener("updatefromsandbox",(e=>{const i={value(e){e.target.checked="Off"!==e.detail.value;t.setValue(n,{value:e.target.checked})}};this._dispatchEventFromSandbox(i,e)}));this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.checked))}this._setBackgroundColor(r);this._setDefaultPropertiesFromJS(r);this.container.append(r);return this.container}}class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,n=e.id;let i=t.getValue(n,{value:e.fieldValue===e.buttonValue}).value;if("string"==typeof i){i=i!==e.buttonValue;t.setValue(n,{value:i})}const r=document.createElement("input");h.add(r);r.setAttribute("data-element-id",n);r.disabled=e.readOnly;this._setRequired(r,this.data.required);r.type="radio";r.name=e.fieldName;i&&r.setAttribute("checked",!0);r.tabIndex=c;r.addEventListener("change",(e=>{const{name:i,checked:r}=e.target;for(const e of this._getElementsByName(i,n))t.setValue(e.id,{value:!1});t.setValue(n,{value:r})}));r.addEventListener("resetform",(t=>{const n=e.defaultFieldValue;t.target.checked=null!=n&&n===e.buttonValue}));if(this.enableScripting&&this.hasJSActions){const i=e.buttonValue;r.addEventListener("updatefromsandbox",(e=>{const r={value:e=>{const r=i===e.detail.value;for(const i of this._getElementsByName(e.target.name)){const e=r&&i.id===n;i.domElement&&(i.domElement.checked=e);t.setValue(i.id,{value:e})}}};this._dispatchEventFromSandbox(r,e)}));this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.checked))}this._setBackgroundColor(r);this._setDefaultPropertiesFromJS(r);this.container.append(r);return this.container}}class PushButtonWidgetAnnotationElement extends LinkAnnotationElement{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");this.data.alternativeText&&(t.title=this.data.alternativeText);const e=t.lastChild;if(this.enableScripting&&this.hasJSActions&&e){this._setDefaultPropertiesFromJS(e);e.addEventListener("updatefromsandbox",(t=>{this._dispatchEventFromSandbox({},t)}))}return t}}class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,n=t.getValue(e,{value:this.data.fieldValue}),i=document.createElement("select");h.add(i);i.setAttribute("data-element-id",e);i.disabled=this.data.readOnly;this._setRequired(i,this.data.required);i.name=this.data.fieldName;i.tabIndex=c;let r=this.data.combo&&this.data.options.length>0;if(!this.data.combo){i.size=this.data.options.length;this.data.multiSelect&&(i.multiple=!0)}i.addEventListener("resetform",(t=>{const e=this.data.defaultFieldValue;for(const t of i.options)t.selected=t.value===e}));for(const t of this.data.options){const e=document.createElement("option");e.textContent=t.displayValue;e.value=t.exportValue;if(n.value.includes(t.exportValue)){e.setAttribute("selected",!0);r=!1}i.append(e)}let s=null;if(r){const t=document.createElement("option");t.value=" ";t.setAttribute("hidden",!0);t.setAttribute("selected",!0);i.prepend(t);s=()=>{t.remove();i.removeEventListener("input",s);s=null};i.addEventListener("input",s)}const getValue=t=>{const e=t?"value":"textContent",{options:n,multiple:r}=i;return r?Array.prototype.filter.call(n,(t=>t.selected)).map((t=>t[e])):-1===n.selectedIndex?null:n[n.selectedIndex][e]};let a=getValue(!1);const getItems=t=>{const e=t.target.options;return Array.prototype.map.call(e,(t=>({displayValue:t.textContent,exportValue:t.value})))};if(this.enableScripting&&this.hasJSActions){i.addEventListener("updatefromsandbox",(n=>{const r={value(n){s?.();const r=n.detail.value,o=new Set(Array.isArray(r)?r:[r]);for(const t of i.options)t.selected=o.has(t.value);t.setValue(e,{value:getValue(!0)});a=getValue(!1)},multipleSelection(t){i.multiple=!0},remove(n){const r=i.options,s=n.detail.remove;r[s].selected=!1;i.remove(s);if(r.length>0){-1===Array.prototype.findIndex.call(r,(t=>t.selected))&&(r[0].selected=!0)}t.setValue(e,{value:getValue(!0),items:getItems(n)});a=getValue(!1)},clear(n){for(;0!==i.length;)i.remove(0);t.setValue(e,{value:null,items:[]});a=getValue(!1)},insert(n){const{index:r,displayValue:s,exportValue:o}=n.detail.insert,l=i.children[r],c=document.createElement("option");c.textContent=s;c.value=o;l?l.before(c):i.append(c);t.setValue(e,{value:getValue(!0),items:getItems(n)});a=getValue(!1)},items(n){const{items:r}=n.detail;for(;0!==i.length;)i.remove(0);for(const t of r){const{displayValue:e,exportValue:n}=t,r=document.createElement("option");r.textContent=e;r.value=n;i.append(r)}i.options.length>0&&(i.options[0].selected=!0);t.setValue(e,{value:getValue(!0),items:getItems(n)});a=getValue(!1)},indices(n){const i=new Set(n.detail.indices);for(const t of n.target.options)t.selected=i.has(t.index);t.setValue(e,{value:getValue(!0)});a=getValue(!1)},editable(t){t.target.disabled=!t.detail.editable}};this._dispatchEventFromSandbox(r,n)}));i.addEventListener("input",(n=>{const i=getValue(!0);t.setValue(e,{value:i});n.preventDefault();this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:a,changeEx:i,willCommit:!1,commitKey:1,keyDown:!1}})}));this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(t=>t.target.value))}else i.addEventListener("input",(function(n){t.setValue(e,{value:getValue(!0)})}));this.data.combo&&this._setTextStyle(i);this._setBackgroundColor(i);this._setDefaultPropertiesFromJS(i);this.container.append(i);return this.container}}class PopupAnnotationElement extends AnnotationElement{constructor(t){const{data:e,elements:n}=t;super(t,{isRenderable:AnnotationElement._hasPopupData(e)});this.elements=n}render(){this.container.classList.add("popupAnnotation");const t=new PopupElement({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),e=[];for(const n of this.elements){n.popup=t;e.push(n.data.id);n.addHighlightArea()}this.container.setAttribute("aria-controls",e.map((t=>`${i.AnnotationPrefix}${t}`)).join(","));return this.container}}class PopupElement{#en=null;#nn=this.#in.bind(this);#rn=this.#sn.bind(this);#an=this.#on.bind(this);#ln=this.#cn.bind(this);#Ue=null;#Rt=null;#hn=null;#dn=null;#un=null;#pn=null;#fn=!1;#gn=null;#mn=null;#bn=null;#vn=null;#yn=!1;constructor(t){let{container:e,color:n,elements:i,titleObj:s,modificationDate:a,contentsObj:o,richText:l,parent:c,rect:h,parentRect:d,open:u}=t;this.#Rt=e;this.#vn=s;this.#hn=o;this.#bn=l;this.#un=c;this.#Ue=n;this.#mn=h;this.#pn=d;this.#dn=i;const p=r.PDFDateString.toDateObject(a);p&&(this.#en=c.l10n.get("annotation_date_string",{date:p.toLocaleDateString(),time:p.toLocaleTimeString()}));this.trigger=i.flatMap((t=>t.getElementsToTriggerPopup()));for(const t of this.trigger){t.addEventListener("click",this.#ln);t.addEventListener("mouseenter",this.#an);t.addEventListener("mouseleave",this.#rn);t.classList.add("popupTriggerArea")}for(const t of i)t.container?.addEventListener("keydown",this.#nn);this.#Rt.hidden=!0;u&&this.#cn()}render(){if(this.#gn)return;const{page:{view:t},viewport:{rawDims:{pageWidth:e,pageHeight:n,pageX:r,pageY:s}}}=this.#un,a=this.#gn=document.createElement("div");a.className="popup";if(this.#Ue){const t=a.style.outlineColor=i.Util.makeHexColor(...this.#Ue);if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))a.style.backgroundColor=`color-mix(in srgb, ${t} 30%, white)`;else{const t=.7;a.style.backgroundColor=i.Util.makeHexColor(...this.#Ue.map((e=>Math.floor(t*(255-e)+e))))}}const o=document.createElement("span");o.className="header";const c=document.createElement("h1");o.append(c);({dir:c.dir,str:c.textContent}=this.#vn);a.append(o);if(this.#en){const t=document.createElement("span");t.classList.add("popupDate");this.#en.then((e=>{t.textContent=e}));o.append(t)}const h=this.#hn,d=this.#bn;if(!d?.str||h?.str&&h.str!==d.str){const t=this._formatContents(h);a.append(t)}else{l.XfaLayer.render({xfaHtml:d.html,intent:"richText",div:a});a.lastChild.classList.add("richText","popupContent")}let u=!!this.#pn,p=u?this.#pn:this.#mn;for(const t of this.#dn)if(!p||null!==i.Util.intersect(t.data.rect,p)){p=t.data.rect;u=!0;break}const f=i.Util.normalizeRect([p[0],t[3]-p[1]+t[1],p[2],t[3]-p[3]+t[1]]),g=u?p[2]-p[0]+5:0,m=f[0]+g,b=f[1],{style:v}=this.#Rt;v.left=100*(m-r)/e+"%";v.top=100*(b-s)/n+"%";this.#Rt.append(a)}_formatContents(t){let{str:e,dir:n}=t;const i=document.createElement("p");i.classList.add("popupContent");i.dir=n;const r=e.split(/(?:\r\n?|\n)/);for(let t=0,e=r.length;t{"Enter"===t.key&&(r?t.metaKey:t.ctrlKey)&&this.#Cn()}));!e.popupRef&&this.hasPopupData?this._createPopup():n.classList.add("popupTriggerArea");t.append(n);return t}getElementsToTriggerPopup(){return this.#wn}addHighlightArea(){this.container.classList.add("highlightArea")}#Cn(){this.downloadManager?.openOrDownloadData(this.container,this.content,this.filename)}}e.AnnotationLayer=class AnnotationLayer{#Se=null;#Tn=null;#Pn=new Map;constructor(t){let{div:e,accessibilityManager:n,annotationCanvasMap:i,l10n:r,page:s,viewport:a}=t;this.div=e;this.#Se=n;this.#Tn=i;this.l10n=r;this.page=s;this.viewport=a;this.zIndex=0;this.l10n||=o.NullL10n}#kn(t,e){const n=t.firstChild||t;n.id=`${i.AnnotationPrefix}${e}`;this.div.append(t);this.#Se?.moveElementInDOM(this.div,t,n,!1)}async render(t){const{annotations:e}=t,n=this.div;(0,r.setLayerDimensions)(n,this.viewport);const a=new Map,o={data:null,layer:n,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new r.DOMSVGFactory,annotationStorage:t.annotationStorage||new s.AnnotationStorage,enableScripting:!0===t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const t of e){if(t.noHTML)continue;const e=t.annotationType===i.AnnotationType.POPUP;if(e){const e=a.get(t.id);if(!e)continue;o.elements=e}else{const{width:e,height:n}=getRectDims(t.rect);if(e<=0||n<=0)continue}o.data=t;const n=AnnotationElementFactory.create(o);if(!n.isRenderable)continue;if(!e&&t.popupRef){const e=a.get(t.popupRef);e?e.push(n):a.set(t.popupRef,[n])}n.annotationEditorType>0&&this.#Pn.set(n.data.id,n);const r=n.render();t.hidden&&(r.style.visibility="hidden");this.#kn(r,t.id)}this.#Mn();await this.l10n.translate(n)}update(t){let{viewport:e}=t;const n=this.div;this.viewport=e;(0,r.setLayerDimensions)(n,{rotation:e.rotation});this.#Mn();n.hidden=!1}#Mn(){if(!this.#Tn)return;const t=this.div;for(const[e,n]of this.#Tn){const i=t.querySelector(`[data-annotation-id="${e}"]`);if(!i)continue;const{firstChild:r}=i;r?"CANVAS"===r.nodeName?r.replaceWith(n):r.before(n):i.append(n)}this.#Tn.clear()}getEditableAnnotations(){return Array.from(this.#Pn.values())}getEditableAnnotation(t){return this.#Pn.get(t)}}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0});e.ColorConverters=void 0;function makeColorComp(t){return Math.floor(255*Math.max(0,Math.min(1,t))).toString(16).padStart(2,"0")}function scaleAndClamp(t){return Math.max(0,Math.min(255,255*t))}e.ColorConverters=class ColorConverters{static CMYK_G(t){let[e,n,i,r]=t;return["G",1-Math.min(1,.3*e+.59*i+.11*n+r)]}static G_CMYK(t){let[e]=t;return["CMYK",0,0,0,1-e]}static G_RGB(t){let[e]=t;return["RGB",e,e,e]}static G_rgb(t){let[e]=t;e=scaleAndClamp(e);return[e,e,e]}static G_HTML(t){let[e]=t;const n=makeColorComp(e);return`#${n}${n}${n}`}static RGB_G(t){let[e,n,i]=t;return["G",.3*e+.59*n+.11*i]}static RGB_rgb(t){return t.map(scaleAndClamp)}static RGB_HTML(t){return`#${t.map(makeColorComp).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(t){let[e,n,i,r]=t;return["RGB",1-Math.min(1,e+r),1-Math.min(1,i+r),1-Math.min(1,n+r)]}static CMYK_rgb(t){let[e,n,i,r]=t;return[scaleAndClamp(1-Math.min(1,e+r)),scaleAndClamp(1-Math.min(1,i+r)),scaleAndClamp(1-Math.min(1,n+r))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK(t){let[e,n,i]=t;const r=1-e,s=1-n,a=1-i;return["CMYK",r,s,a,Math.min(r,s,a)]}}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0});e.NullL10n=void 0;e.getL10nFallback=getL10nFallback;const n={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative",print_progress_percent:"{{progress}}%"};function getL10nFallback(t,e){switch(t){case"find_match_count":t=`find_match_count[${1===e.total?"one":"other"}]`;break;case"find_match_count_limit":t=`find_match_count_limit[${1===e.limit?"one":"other"}]`}return n[t]||""}const i={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",async get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function formatL10nValue(t,e){return e?t.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,((t,n)=>n in e?e[n]:"{{"+n+"}}")):t}(arguments.length>2&&void 0!==arguments[2]?arguments[2]:getL10nFallback(t,e),e)},async translate(t){}};e.NullL10n=i},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.XfaLayer=void 0;n(89);var i=n(194);e.XfaLayer=class XfaLayer{static setupStorage(t,e,n,i,r){const s=i.getValue(e,{value:null});switch(n.name){case"textarea":null!==s.value&&(t.textContent=s.value);if("print"===r)break;t.addEventListener("input",(t=>{i.setValue(e,{value:t.target.value})}));break;case"input":if("radio"===n.attributes.type||"checkbox"===n.attributes.type){s.value===n.attributes.xfaOn?t.setAttribute("checked",!0):s.value===n.attributes.xfaOff&&t.removeAttribute("checked");if("print"===r)break;t.addEventListener("change",(t=>{i.setValue(e,{value:t.target.checked?t.target.getAttribute("xfaOn"):t.target.getAttribute("xfaOff")})}))}else{null!==s.value&&t.setAttribute("value",s.value);if("print"===r)break;t.addEventListener("input",(t=>{i.setValue(e,{value:t.target.value})}))}break;case"select":if(null!==s.value){t.setAttribute("value",s.value);for(const t of n.children)t.attributes.value===s.value?t.attributes.selected=!0:t.attributes.hasOwnProperty("selected")&&delete t.attributes.selected}t.addEventListener("input",(t=>{const n=t.target.options,r=-1===n.selectedIndex?"":n[n.selectedIndex].value;i.setValue(e,{value:r})}))}}static setAttributes(t){let{html:e,element:n,storage:i=null,intent:r,linkService:s}=t;const{attributes:a}=n,o=e instanceof HTMLAnchorElement;"radio"===a.type&&(a.name=`${a.name}-${r}`);for(const[t,n]of Object.entries(a))if(null!=n)switch(t){case"class":n.length&&e.setAttribute(t,n.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",n);break;case"style":Object.assign(e.style,n);break;case"textContent":e.textContent=n;break;default:(!o||"href"!==t&&"newWindow"!==t)&&e.setAttribute(t,n)}o&&s.addLinkAttributes(e,a.href,a.newWindow);i&&a.dataId&&this.setupStorage(e,a.dataId,n,i)}static render(t){const e=t.annotationStorage,n=t.linkService,r=t.xfaHtml,s=t.intent||"display",a=document.createElement(r.name);r.attributes&&this.setAttributes({html:a,element:r,intent:s,linkService:n});const o=[[r,-1,a]],l=t.div;l.append(a);if(t.viewport){const e=`matrix(${t.viewport.transform.join(",")})`;l.style.transform=e}"richText"!==s&&l.setAttribute("class","xfaLayer xfaFont");const c=[];for(;o.length>0;){const[t,r,a]=o.at(-1);if(r+1===t.children.length){o.pop();continue}const l=t.children[++o.at(-1)[1]];if(null===l)continue;const{name:h}=l;if("#text"===h){const t=document.createTextNode(l.value);c.push(t);a.append(t);continue}const d=l?.attributes?.xmlns?document.createElementNS(l.attributes.xmlns,h):document.createElement(h);a.append(d);l.attributes&&this.setAttributes({html:d,element:l,storage:e,intent:s,linkService:n});if(l.children&&l.children.length>0)o.push([l,-1,d]);else if(l.value){const t=document.createTextNode(l.value);i.XfaText.shouldBuildText(h)&&c.push(t);d.append(t)}}for(const t of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))t.setAttribute("readOnly",!0);return{textDivs:c}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e;t.div.hidden=!1}}},(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});e.InkEditor=void 0;n(89);n(2);var i=n(1),r=n(164),s=n(198),a=n(168),o=n(165);class InkEditor extends r.AnnotationEditor{#Fn=0;#Rn=0;#Dn=this.canvasPointermove.bind(this);#In=this.canvasPointerleave.bind(this);#On=this.canvasPointerup.bind(this);#Ln=this.canvasPointerdown.bind(this);#Nn=new Path2D;#Bn=!1;#jn=!1;#Un=!1;#zn=null;#Wn=0;#Hn=0;#qn=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";constructor(t){super({...t,name:"inkEditor"});this.color=t.color||null;this.thickness=t.thickness||null;this.opacity=t.opacity||null;this.paths=[];this.bezierPath2D=[];this.allRawPaths=[];this.currentPath=[];this.scaleFactor=1;this.translationX=this.translationY=0;this.x=0;this.y=0;this._willKeepAspectRatio=!0}static initialize(t){r.AnnotationEditor.initialize(t,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(t,e){switch(t){case i.AnnotationEditorParamsType.INK_THICKNESS:InkEditor._defaultThickness=e;break;case i.AnnotationEditorParamsType.INK_COLOR:InkEditor._defaultColor=e;break;case i.AnnotationEditorParamsType.INK_OPACITY:InkEditor._defaultOpacity=e/100}}updateParams(t,e){switch(t){case i.AnnotationEditorParamsType.INK_THICKNESS:this.#Gn(e);break;case i.AnnotationEditorParamsType.INK_COLOR:this.#Ve(e);break;case i.AnnotationEditorParamsType.INK_OPACITY:this.#Vn(e)}}static get defaultPropertiesToUpdate(){return[[i.AnnotationEditorParamsType.INK_THICKNESS,InkEditor._defaultThickness],[i.AnnotationEditorParamsType.INK_COLOR,InkEditor._defaultColor||r.AnnotationEditor._defaultLineColor],[i.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*InkEditor._defaultOpacity)]]}get propertiesToUpdate(){return[[i.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||InkEditor._defaultThickness],[i.AnnotationEditorParamsType.INK_COLOR,this.color||InkEditor._defaultColor||r.AnnotationEditor._defaultLineColor],[i.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??InkEditor._defaultOpacity))]]}#Gn(t){const e=this.thickness;this.addCommands({cmd:()=>{this.thickness=t;this.#$n()},undo:()=>{this.thickness=e;this.#$n()},mustExec:!0,type:i.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#Ve(t){const e=this.color;this.addCommands({cmd:()=>{this.color=t;this.#Xn()},undo:()=>{this.color=e;this.#Xn()},mustExec:!0,type:i.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#Vn(t){t/=100;const e=this.opacity;this.addCommands({cmd:()=>{this.opacity=t;this.#Xn()},undo:()=>{this.opacity=e;this.#Xn()},mustExec:!0,type:i.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){if(this.parent){super.rebuild();if(null!==this.div){if(!this.canvas){this.#Kn();this.#Yn()}if(!this.isAttachedToDOM){this.parent.add(this);this.#Jn()}this.#$n()}}}remove(){if(null!==this.canvas){this.isEmpty()||this.commit();this.canvas.width=this.canvas.height=0;this.canvas.remove();this.canvas=null;this.#zn.disconnect();this.#zn=null;super.remove()}}setParent(t){!this.parent&&t?this._uiManager.removeShouldRescale(this):this.parent&&null===t&&this._uiManager.addShouldRescale(this);super.setParent(t)}onScaleChanging(){const[t,e]=this.parentDimensions,n=this.width*t,i=this.height*e;this.setDimensions(n,i)}enableEditMode(){if(!this.#Bn&&null!==this.canvas){super.enableEditMode();this._isDraggable=!1;this.canvas.addEventListener("pointerdown",this.#Ln)}}disableEditMode(){if(this.isInEditMode()&&null!==this.canvas){super.disableEditMode();this._isDraggable=!this.isEmpty();this.div.classList.remove("editing");this.canvas.removeEventListener("pointerdown",this.#Ln)}}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}#Qn(){const{parentRotation:t,parentDimensions:[e,n]}=this;switch(t){case 90:return[0,n,n,e];case 180:return[e,n,e,n];case 270:return[e,0,n,e];default:return[0,0,e,n]}}#Zn(){const{ctx:t,color:e,opacity:n,thickness:i,parentScale:r,scaleFactor:s}=this;t.lineWidth=i*r/s;t.lineCap="round";t.lineJoin="round";t.miterLimit=10;t.strokeStyle=`${e}${(0,o.opacityToHex)(n)}`}#ti(t,e){this.canvas.addEventListener("contextmenu",a.noContextMenu);this.canvas.addEventListener("pointerleave",this.#In);this.canvas.addEventListener("pointermove",this.#Dn);this.canvas.addEventListener("pointerup",this.#On);this.canvas.removeEventListener("pointerdown",this.#Ln);this.isEditing=!0;if(!this.#Un){this.#Un=!0;this.#Jn();this.thickness||=InkEditor._defaultThickness;this.color||=InkEditor._defaultColor||r.AnnotationEditor._defaultLineColor;this.opacity??=InkEditor._defaultOpacity}this.currentPath.push([t,e]);this.#jn=!1;this.#Zn();this.#qn=()=>{this.#ei();this.#qn&&window.requestAnimationFrame(this.#qn)};window.requestAnimationFrame(this.#qn)}#ni(t,e){const[n,i]=this.currentPath.at(-1);if(this.currentPath.length>1&&t===n&&e===i)return;const r=this.currentPath;let s=this.#Nn;r.push([t,e]);this.#jn=!0;if(r.length<=2){s.moveTo(...r[0]);s.lineTo(t,e)}else{if(3===r.length){this.#Nn=s=new Path2D;s.moveTo(...r[0])}this.#ii(s,...r.at(-3),...r.at(-2),t,e)}}#ri(){if(0===this.currentPath.length)return;const t=this.currentPath.at(-1);this.#Nn.lineTo(...t)}#si(t,e){this.#qn=null;t=Math.min(Math.max(t,0),this.canvas.width);e=Math.min(Math.max(e,0),this.canvas.height);this.#ni(t,e);this.#ri();let n;if(1!==this.currentPath.length)n=this.#ai();else{const i=[t,e];n=[[i,i.slice(),i.slice(),i]]}const i=this.#Nn,r=this.currentPath;this.currentPath=[];this.#Nn=new Path2D;this.addCommands({cmd:()=>{this.allRawPaths.push(r);this.paths.push(n);this.bezierPath2D.push(i);this.rebuild()},undo:()=>{this.allRawPaths.pop();this.paths.pop();this.bezierPath2D.pop();if(0===this.paths.length)this.remove();else{if(!this.canvas){this.#Kn();this.#Yn()}this.#$n()}},mustExec:!0})}#ei(){if(!this.#jn)return;this.#jn=!1;const t=Math.ceil(this.thickness*this.parentScale),e=this.currentPath.slice(-3),n=e.map((t=>t[0])),i=e.map((t=>t[1])),{ctx:r}=(Math.min(...n),Math.max(...n),Math.min(...i),Math.max(...i),this);r.save();r.clearRect(0,0,this.canvas.width,this.canvas.height);for(const t of this.bezierPath2D)r.stroke(t);r.stroke(this.#Nn);r.restore()}#ii(t,e,n,i,r,s,a){const o=(e+i)/2,l=(n+r)/2,c=(i+s)/2,h=(r+a)/2;t.bezierCurveTo(o+2*(i-o)/3,l+2*(r-l)/3,c+2*(i-c)/3,h+2*(r-h)/3,c,h)}#ai(){const t=this.currentPath;if(t.length<=2)return[[t[0],t[0],t.at(-1),t.at(-1)]];const e=[];let n,[i,r]=t[0];for(n=1;n{this.canvas.removeEventListener("contextmenu",a.noContextMenu)}),10);this.#si(t.offsetX,t.offsetY);this.addToAnnotationStorage();this.setInBackground()}#Kn(){this.canvas=document.createElement("canvas");this.canvas.width=this.canvas.height=0;this.canvas.className="inkEditorCanvas";r.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then((t=>this.canvas?.setAttribute("aria-label",t)));this.div.append(this.canvas);this.ctx=this.canvas.getContext("2d")}#Yn(){this.#zn=new ResizeObserver((t=>{const e=t[0].contentRect;e.width&&e.height&&this.setDimensions(e.width,e.height)}));this.#zn.observe(this.div)}get isResizable(){return!this.isEmpty()&&this.#Bn}render(){if(this.div)return this.div;let t,e;if(this.width){t=this.x;e=this.y}super.render();r.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then((t=>this.div?.setAttribute("aria-label",t)));const[n,i,s,a]=this.#Qn();this.setAt(n,i,0,0);this.setDims(s,a);this.#Kn();if(this.width){const[n,i]=this.parentDimensions;this.setAspectRatio(this.width*n,this.height*i);this.setAt(t*n,e*i,this.width*n,this.height*i);this.#Un=!0;this.#Jn();this.setDims(this.width*n,this.height*i);this.#Xn();this.div.classList.add("disabled")}else{this.div.classList.add("editing");this.enableEditMode()}this.#Yn();return this.div}#Jn(){if(!this.#Un)return;const[t,e]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*t);this.canvas.height=Math.ceil(this.height*e);this.#oi()}setDimensions(t,e){const n=Math.round(t),i=Math.round(e);if(this.#Wn===n&&this.#Hn===i)return;this.#Wn=n;this.#Hn=i;this.canvas.style.visibility="hidden";const[r,s]=this.parentDimensions;this.width=t/r;this.height=e/s;this.fixAndSetPosition();this.#Bn&&this.#ci(t,e);this.#Jn();this.#Xn();this.canvas.style.visibility="visible";this.fixDims()}#ci(t,e){const n=this.#hi(),i=(t-n)/this.#Rn,r=(e-n)/this.#Fn;this.scaleFactor=Math.min(i,r)}#oi(){const t=this.#hi()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+t,this.translationY*this.scaleFactor+t)}static#di(t){const e=new Path2D;for(let n=0,i=t.length;n0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return;if(!this.#Bn){this.#Xn();return}const e=this.#gi(),n=this.#hi();this.#Rn=Math.max(r.AnnotationEditor.MIN_SIZE,e[2]-e[0]);this.#Fn=Math.max(r.AnnotationEditor.MIN_SIZE,e[3]-e[1]);const i=Math.ceil(n+this.#Rn*this.scaleFactor),s=Math.ceil(n+this.#Fn*this.scaleFactor),[a,o]=this.parentDimensions;this.width=i/a;this.height=s/o;this.setAspectRatio(i,s);const l=this.translationX,c=this.translationY;this.translationX=-e[0];this.translationY=-e[1];this.#Jn();this.#Xn();this.#Wn=i;this.#Hn=s;this.setDims(i,s);const h=t?n/this.scaleFactor/2:0;this.translate(l-this.translationX-h,c-this.translationY-h)}static deserialize(t,e,n){if(t instanceof s.InkAnnotationElement)return null;const a=super.deserialize(t,e,n);a.thickness=t.thickness;a.color=i.Util.makeHexColor(...t.color);a.opacity=t.opacity;const[o,l]=a.pageDimensions,c=a.width*o,h=a.height*l,d=a.parentScale,u=t.thickness/2;a.#Bn=!0;a.#Wn=Math.round(c);a.#Hn=Math.round(h);const{paths:p,rect:f,rotation:g}=t;for(let{bezier:t}of p){t=InkEditor.#pi(t,f,g);const e=[];a.paths.push(e);let n=d*(t[0]-u),i=d*(t[1]-u);for(let r=2,s=t.length;r{Object.defineProperty(e,"__esModule",{value:!0});e.StampEditor=void 0;n(149);n(152);var i=n(1),r=n(164),s=n(168),a=n(198);class StampEditor extends r.AnnotationEditor{#mi=null;#bi=null;#vi=null;#yi=null;#_i=null;#Ai=null;#zn=null;#Si=null;#Ei=!1;#xi=!1;static _type="stamp";constructor(t){super({...t,name:"stampEditor"});this.#yi=t.bitmapUrl;this.#_i=t.bitmapFile}static initialize(t){r.AnnotationEditor.initialize(t)}static get supportedTypes(){return(0,i.shadow)(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((t=>`image/${t}`)))}static get supportedTypesStr(){return(0,i.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(t){return this.supportedTypes.includes(t)}static paste(t,e){e.pasteEditor(i.AnnotationEditorType.STAMP,{bitmapFile:t.getAsFile()})}#wi(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){this.#mi=t.bitmap;if(!e){this.#bi=t.id;this.#Ei=t.isSvg}this.#Kn()}else this.remove()}#Ci(){this.#vi=null;this._uiManager.enableWaiting(!1);this.#Ai&&this.div.focus()}#Ti(){if(this.#bi){this._uiManager.enableWaiting(!0);this._uiManager.imageManager.getFromId(this.#bi).then((t=>this.#wi(t,!0))).finally((()=>this.#Ci()));return}if(this.#yi){const t=this.#yi;this.#yi=null;this._uiManager.enableWaiting(!0);this.#vi=this._uiManager.imageManager.getFromUrl(t).then((t=>this.#wi(t))).finally((()=>this.#Ci()));return}if(this.#_i){const t=this.#_i;this.#_i=null;this._uiManager.enableWaiting(!0);this.#vi=this._uiManager.imageManager.getFromFile(t).then((t=>this.#wi(t))).finally((()=>this.#Ci()));return}const t=document.createElement("input");t.type="file";t.accept=StampEditor.supportedTypesStr;this.#vi=new Promise((e=>{t.addEventListener("change",(async()=>{if(t.files&&0!==t.files.length){this._uiManager.enableWaiting(!0);const e=await this._uiManager.imageManager.getFromFile(t.files[0]);this.#wi(e)}else this.remove();e()}));t.addEventListener("cancel",(()=>{this.remove();e()}))})).finally((()=>this.#Ci()));t.click()}remove(){if(this.#bi){this.#mi=null;this._uiManager.imageManager.deleteId(this.#bi);this.#Ai?.remove();this.#Ai=null;this.#zn?.disconnect();this.#zn=null}super.remove()}rebuild(){if(this.parent){super.rebuild();if(null!==this.div){this.#bi&&this.#Ti();this.isAttachedToDOM||this.parent.add(this)}}else this.#bi&&this.#Ti()}onceAdded(){this._isDraggable=!0;this.div.focus()}isEmpty(){return!(this.#vi||this.#mi||this.#yi||this.#_i)}get isResizable(){return!0}render(){if(this.div)return this.div;let t,e;if(this.width){t=this.x;e=this.y}super.render();this.div.hidden=!0;this.#mi?this.#Kn():this.#Ti();if(this.width){const[n,i]=this.parentDimensions;this.setAt(t*n,e*i,this.width*n,this.height*i)}return this.div}#Kn(){const{div:t}=this;let{width:e,height:n}=this.#mi;const[i,r]=this.pageDimensions,s=.75;if(this.width){e=this.width*i;n=this.height*r}else if(e>s*i||n>s*r){const t=Math.min(s*i/e,s*r/n);e*=t;n*=t}const[a,o]=this.parentDimensions;this.setDims(e*a/i,n*o/r);this._uiManager.enableWaiting(!1);const l=this.#Ai=document.createElement("canvas");t.append(l);t.hidden=!1;this.#Pi(e,n);this.#Yn();if(!this.#xi){this.parent.addUndoableEditor(this);this.#xi=!0}this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}});this.addAltTextButton()}#ki(t,e){const[n,i]=this.parentDimensions;this.width=t/n;this.height=e/i;this.setDims(t,e);this._initialOptions?.isCentered?this.center():this.fixAndSetPosition();this._initialOptions=null;null!==this.#Si&&clearTimeout(this.#Si);this.#Si=setTimeout((()=>{this.#Si=null;this.#Pi(t,e)}),200)}#Mi(t,e){const{width:n,height:i}=this.#mi;let r=n,s=i,a=this.#mi;for(;r>2*t||s>2*e;){const n=r,i=s;r>2*t&&(r=r>=16384?Math.floor(r/2)-1:Math.ceil(r/2));s>2*e&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2));const o=new OffscreenCanvas(r,s);o.getContext("2d").drawImage(a,0,0,n,i,0,0,r,s);a=o.transferToImageBitmap()}return a}#Pi(t,e){t=Math.ceil(t);e=Math.ceil(e);const n=this.#Ai;if(!n||n.width===t&&n.height===e)return;n.width=t;n.height=e;const i=this.#Ei?this.#mi:this.#Mi(t,e),r=n.getContext("2d");r.filter=this._uiManager.hcmFilter;r.drawImage(i,0,0,i.width,i.height,0,0,t,e)}#Fi(t){if(t){if(this.#Ei){const t=this._uiManager.imageManager.getSvgUrl(this.#bi);if(t)return t}const t=document.createElement("canvas");({width:t.width,height:t.height}=this.#mi);t.getContext("2d").drawImage(this.#mi,0,0);return t.toDataURL()}if(this.#Ei){const[t,e]=this.pageDimensions,n=Math.round(this.width*t*s.PixelsPerInch.PDF_TO_CSS_UNITS),i=Math.round(this.height*e*s.PixelsPerInch.PDF_TO_CSS_UNITS),r=new OffscreenCanvas(n,i);r.getContext("2d").drawImage(this.#mi,0,0,this.#mi.width,this.#mi.height,0,0,n,i);return r.transferToImageBitmap()}return structuredClone(this.#mi)}#Yn(){this.#zn=new ResizeObserver((t=>{const e=t[0].contentRect;e.width&&e.height&&this.#ki(e.width,e.height)}));this.#zn.observe(this.div)}static deserialize(t,e,n){if(t instanceof a.StampAnnotationElement)return null;const i=super.deserialize(t,e,n),{rect:r,bitmapUrl:s,bitmapId:o,isSvg:l,accessibilityData:c}=t;o&&n.imageManager.isValidId(o)?i.#bi=o:i.#yi=s;i.#Ei=l;const[h,d]=i.pageDimensions;i.width=(r[2]-r[0])/h;i.height=(r[3]-r[1])/d;c&&(i.altTextData=c);return i}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;const n={annotationType:i.AnnotationEditorType.STAMP,bitmapId:this.#bi,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#Ei,structTreeParentId:this._structTreeParentId};if(t){n.bitmapUrl=this.#Fi(!0);n.accessibilityData=this.altTextData;return n}const{decorative:r,altText:s}=this.altTextData;!r&&s&&(n.accessibilityData={type:"Figure",alt:s});if(null===e)return n;e.stamps||=new Map;const a=this.#Ei?(n.rect[2]-n.rect[0])*(n.rect[3]-n.rect[1]):null;if(e.stamps.has(this.#bi)){if(this.#Ei){const t=e.stamps.get(this.#bi);if(a>t.area){t.area=a;t.serialized.bitmap.close();t.serialized.bitmap=this.#Fi(!1)}}}else{e.stamps.set(this.#bi,{area:a,serialized:n});n.bitmap=this.#Fi(!1)}return n}}e.StampEditor=StampEditor}],__webpack_module_cache__={};function __w_pdfjs_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};__webpack_modules__[t].call(n.exports,n,n.exports,__w_pdfjs_require__);return n.exports}var __webpack_exports__={};(()=>{var t=__webpack_exports__;Object.defineProperty(t,"__esModule",{value:!0});Object.defineProperty(t,"AbortException",{enumerable:!0,get:function(){return e.AbortException}});Object.defineProperty(t,"AnnotationEditorLayer",{enumerable:!0,get:function(){return s.AnnotationEditorLayer}});Object.defineProperty(t,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return e.AnnotationEditorParamsType}});Object.defineProperty(t,"AnnotationEditorType",{enumerable:!0,get:function(){return e.AnnotationEditorType}});Object.defineProperty(t,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return a.AnnotationEditorUIManager}});Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}});Object.defineProperty(t,"AnnotationMode",{enumerable:!0,get:function(){return e.AnnotationMode}});Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return e.CMapCompressionType}});Object.defineProperty(t,"DOMSVGFactory",{enumerable:!0,get:function(){return i.DOMSVGFactory}});Object.defineProperty(t,"FeatureTest",{enumerable:!0,get:function(){return e.FeatureTest}});Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}});Object.defineProperty(t,"ImageKind",{enumerable:!0,get:function(){return e.ImageKind}});Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return e.InvalidPDFException}});Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return e.MissingPDFException}});Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return e.OPS}});Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return n.PDFDataRangeTransport}});Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return i.PDFDateString}});Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return n.PDFWorker}});Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return e.PasswordResponses}});Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return e.PermissionFlag}});Object.defineProperty(t,"PixelsPerInch",{enumerable:!0,get:function(){return i.PixelsPerInch}});Object.defineProperty(t,"PromiseCapability",{enumerable:!0,get:function(){return e.PromiseCapability}});Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return i.RenderingCancelledException}});Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return n.SVGGraphics}});Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return e.UnexpectedResponseException}});Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return e.Util}});Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return e.VerbosityLevel}});Object.defineProperty(t,"XfaLayer",{enumerable:!0,get:function(){return c.XfaLayer}});Object.defineProperty(t,"build",{enumerable:!0,get:function(){return n.build}});Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return e.createValidAbsoluteUrl}});Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return n.getDocument}});Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return i.getFilenameFromUrl}});Object.defineProperty(t,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return i.getPdfFilenameFromUrl}});Object.defineProperty(t,"getXfaPageViewport",{enumerable:!0,get:function(){return i.getXfaPageViewport}});Object.defineProperty(t,"isDataScheme",{enumerable:!0,get:function(){return i.isDataScheme}});Object.defineProperty(t,"isPdfFile",{enumerable:!0,get:function(){return i.isPdfFile}});Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return i.loadScript}});Object.defineProperty(t,"noContextMenu",{enumerable:!0,get:function(){return i.noContextMenu}});Object.defineProperty(t,"normalizeUnicode",{enumerable:!0,get:function(){return e.normalizeUnicode}});Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return r.renderTextLayer}});Object.defineProperty(t,"setLayerDimensions",{enumerable:!0,get:function(){return i.setLayerDimensions}});Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return e.shadow}});Object.defineProperty(t,"updateTextLayer",{enumerable:!0,get:function(){return r.updateTextLayer}});Object.defineProperty(t,"version",{enumerable:!0,get:function(){return n.version}});var e=__w_pdfjs_require__(1),n=__w_pdfjs_require__(124),i=__w_pdfjs_require__(168),r=__w_pdfjs_require__(195),s=__w_pdfjs_require__(196),a=__w_pdfjs_require__(165),o=__w_pdfjs_require__(198),l=__w_pdfjs_require__(176),c=__w_pdfjs_require__(201)})();return __webpack_exports__})())); \ No newline at end of file diff --git a/public/script/vendor.min.js b/public/script/vendor.min.js index 3d3ec51..7147c21 100644 --- a/public/script/vendor.min.js +++ b/public/script/vendor.min.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var zl=Object.defineProperty;var Hl=(e,t)=>{for(var o in t)zl(e,o,{get:t[o],enumerable:!0})};var ye={notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",markdown:"/script/markdown.44f2e93820.min.js",pdf:"/script/pdf.0175d53d2f.min.js",editor:"/script/editor.4f142d3adc.min.js"};var rn=new Map,Gl=ye;function Wt(e){if(!rn.has(e)){let t=document.createElement("script");t.src=Gl[e];let o=new Promise((r,n)=>{t.onload=r,t.onerror=()=>{rn.delete(e),t.remove(),n(new Error(`Unable to load ${e}. Please retry.`))}});rn.set(e,o),document.head.appendChild(t)}return rn.get(e)}async function tr(){await Wt("editor"),ace.config.set("basePath","/script/external/ace/")}function ds(e){let t=Object.create(null);for(let o of e.split(","))t[o]=1;return o=>o in t}var Me={},Kt=[],rt=()=>{},Xn=()=>!1,us=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cs=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Ss=(e,t)=>{let o=e.indexOf(t);o>-1&&e.splice(o,1)},jl=Object.prototype.hasOwnProperty,Ae=(e,t)=>jl.call(e,t),Ee=Array.isArray,Pt=e=>Ds(e)==="[object Map]",ls=e=>Ds(e)==="[object Set]",sr=e=>Ds(e)==="[object Date]";var _e=e=>typeof e=="function",Fe=e=>typeof e=="string",ct=e=>typeof e=="symbol",Ve=e=>e!==null&&typeof e=="object",Zn=e=>(Ve(e)||_e(e))&&_e(e.then)&&_e(e.catch),rr=Object.prototype.toString,Ds=e=>rr.call(e),xn=e=>Ds(e).slice(8,-1),an=e=>Ds(e)==="[object Object]",ln=e=>Fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ps=ds(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var dn=e=>{let t=Object.create(null);return(o=>t[o]||(t[o]=e(o)))},Wl=/-\w/g,Ke=dn(e=>e.replace(Wl,t=>t.slice(1).toUpperCase())),Kl=/\B([A-Z])/g,qt=dn(e=>e.replace(Kl,"-$1").toLowerCase()),Yt=dn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=dn(e=>e?`on${Yt(e)}`:""),ht=(e,t)=>!Object.is(e,t),Ts=(e,...t)=>{for(let o=0;o{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:o})},eo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var nr,Os=()=>nr||(nr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pe(e){if(Ee(e)){let t={};for(let o=0;o{if(o){let r=o.split(Jl);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function O(e){let t="";if(Fe(e))t=e;else if(Ee(e))for(let o=0;o!!(e&&e.__v_isRef===!0),c=e=>Fe(e)?e:e==null?"":Ee(e)||Ve(e)&&(e.toString===rr||!_e(e.toString))?lr(e)?c(e.value):JSON.stringify(e,dr,2):String(e),dr=(e,t)=>lr(t)?dr(e,t.value):Pt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,n],i)=>(o[Qn(r,i)+" =>"]=n,o),{})}:ls(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>Qn(o))}:ct(t)?Qn(t):Ve(t)&&!Ee(t)&&!an(t)?String(t):t,Qn=(e,t="")=>{var o;return ct(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};function ed(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var Ye,Ps=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ye&&(Ye.active?(this.parent=Ye,this.index=(Ye.scopes||(Ye.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes){let r=this.scopes.slice();for(t=0,o=r.length;t0&&--this._on===0){if(Ye===this)Ye=this.prevScope;else{let t=Ye;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let o,r;for(o=0,r=this.effects.length;o0)return;if(Vs){let t=Vs;for(Vs=void 0;t;){let o=t.next;t.next=void 0,t.flags&=-9,t=o}}let e;for(;Is;){let t=Is;for(Is=void 0;t;){let o=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=o}}if(e)throw e}function hr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function vr(e){let t,o=e.depsTail,r=o;for(;r;){let n=r.prevDep;r.version===-1?(r===o&&(o=n),ho(r),td(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=n}e.deps=t,e.depsTail=o}function oo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(yr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function yr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qs)||(e.globalVersion=qs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!oo(e))))return;e.flags|=2;let t=e.dep,o=Le,r=wt;Le=e,wt=!0;try{hr(e);let n=e.fn(e._value);(t.version===0||ht(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(n){throw t.version++,n}finally{Le=o,wt=r,vr(e),e.flags&=-3}}function ho(e,t=!1){let{dep:o,prevSub:r,nextSub:n}=e;if(r&&(r.nextSub=n,e.prevSub=void 0),n&&(n.prevSub=r,e.nextSub=void 0),o.subs===e&&(o.subs=r,!r&&o.computed)){o.computed.flags&=-5;for(let i=o.computed.deps;i;i=i.nextDep)ho(i,!0)}!t&&!--o.sc&&o.map&&o.map.delete(o.key)}function td(e){let{prevDep:t,nextDep:o}=e;t&&(t.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=t,e.nextDep=void 0)}var wt=!0,gr=[];function Dt(){gr.push(wt),wt=!1}function Rt(){let e=gr.pop();wt=e===void 0?!0:e}function ur(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let o=Le;Le=void 0;try{t()}finally{Le=o}}}var qs=0,ro=class{constructor(t,o){this.sub=t,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Ms=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Le||!wt||Le===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==Le)o=this.activeLink=new ro(Le,this),Le.deps?(o.prevDep=Le.depsTail,Le.depsTail.nextDep=o,Le.depsTail=o):Le.deps=Le.depsTail=o,br(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){let r=o.nextDep;r.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=r),o.prevDep=Le.depsTail,o.nextDep=void 0,Le.depsTail.nextDep=o,Le.depsTail=o,Le.deps===o&&(Le.deps=r)}return o}trigger(t){this.version++,qs++,this.notify(t)}notify(t){fo();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{mo()}}};function br(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)br(r)}let o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}var io=new WeakMap,Qt=Symbol(""),ao=Symbol(""),$s=Symbol("");function Xe(e,t,o){if(wt&&Le){let r=io.get(e);r||io.set(e,r=new Map);let n=r.get(o);n||(r.set(o,n=new Ms),n.map=r,n.key=o),n.track()}}function Nt(e,t,o,r,n,i){let a=io.get(e);if(!a){qs++;return}let u=m=>{m&&m.trigger()};if(fo(),t==="clear")a.forEach(u);else{let m=Ee(e),h=m&&ln(o);if(m&&o==="length"){let v=Number(r);a.forEach((k,p)=>{(p==="length"||p===$s||!ct(p)&&p>=v)&&u(k)})}else switch((o!==void 0||a.has(void 0))&&u(a.get(o)),h&&u(a.get($s)),t){case"add":m?h&&u(a.get("length")):(u(a.get(Qt)),Pt(e)&&u(a.get(ao)));break;case"delete":m||(u(a.get(Qt)),Pt(e)&&u(a.get(ao)));break;case"set":Pt(e)&&u(a.get(Qt));break}}mo()}function ms(e){let t=Ie(e);return t===e?t:(Xe(t,"iterate",$s),it(e)?t:t.map(vt))}function Ls(e){return Xe(e=Ie(e),"iterate",$s),e}function Ct(e,t){return kt(e)?Xt($t(e)?vt(t):t):vt(t)}var sd={__proto__:null,[Symbol.iterator](){return so(this,Symbol.iterator,e=>Ct(this,e))},concat(...e){return ms(this).concat(...e.map(t=>Ee(t)?ms(t):t))},entries(){return so(this,"entries",e=>(e[1]=Ct(this,e[1]),e))},every(e,t){return Mt(this,"every",e,t,void 0,arguments)},filter(e,t){return Mt(this,"filter",e,t,o=>o.map(r=>Ct(this,r)),arguments)},find(e,t){return Mt(this,"find",e,t,o=>Ct(this,o),arguments)},findIndex(e,t){return Mt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Mt(this,"findLast",e,t,o=>Ct(this,o),arguments)},findLastIndex(e,t){return Mt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Mt(this,"forEach",e,t,void 0,arguments)},includes(...e){return no(this,"includes",e)},indexOf(...e){return no(this,"indexOf",e)},join(e){return ms(this).join(e)},lastIndexOf(...e){return no(this,"lastIndexOf",e)},map(e,t){return Mt(this,"map",e,t,void 0,arguments)},pop(){return As(this,"pop")},push(...e){return As(this,"push",e)},reduce(e,...t){return cr(this,"reduce",e,t)},reduceRight(e,...t){return cr(this,"reduceRight",e,t)},shift(){return As(this,"shift")},some(e,t){return Mt(this,"some",e,t,void 0,arguments)},splice(...e){return As(this,"splice",e)},toReversed(){return ms(this).toReversed()},toSorted(e){return ms(this).toSorted(e)},toSpliced(...e){return ms(this).toSpliced(...e)},unshift(...e){return As(this,"unshift",e)},values(){return so(this,"values",e=>Ct(this,e))}};function so(e,t,o){let r=Ls(e),n=r[t]();return r!==e&&!it(e)&&(n._next=n.next,n.next=()=>{let i=n._next();return i.done||(i.value=o(i.value)),i}),n}var nd=Array.prototype;function Mt(e,t,o,r,n,i){let a=Ls(e),u=a!==e&&!it(e),m=a[t];if(m!==nd[t]){let k=m.apply(e,i);return u?vt(k):k}let h=o;a!==e&&(u?h=function(k,p){return o.call(this,Ct(e,k),p,e)}:o.length>2&&(h=function(k,p){return o.call(this,k,p,e)}));let v=m.call(a,h,r);return u&&n?n(v):v}function cr(e,t,o,r){let n=Ls(e),i=n!==e&&!it(e),a=o,u=!1;n!==e&&(i?(u=r.length===0,a=function(h,v,k){return u&&(u=!1,h=Ct(e,h)),o.call(this,h,Ct(e,v),k,e)}):o.length>3&&(a=function(h,v,k){return o.call(this,h,v,k,e)}));let m=n[t](a,...r);return u?Ct(e,m):m}function no(e,t,o){let r=Ie(e);Xe(r,"iterate",$s);let n=r[t](...o);return(n===-1||n===!1)&&zs(o[0])?(o[0]=Ie(o[0]),r[t](...o)):n}function As(e,t,o=[]){Dt(),fo();let r=Ie(e)[t].apply(e,o);return mo(),Rt(),r}var od=ds("__proto__,__v_isRef,__isVue"),wr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ct));function rd(e){ct(e)||(e=String(e));let t=Ie(this);return Xe(t,"has",e),t.hasOwnProperty(e)}var hn=class{constructor(t=!1,o=!1){this._isReadonly=t,this._isShallow=o}get(t,o,r){if(o==="__v_skip")return t.__v_skip;let n=this._isReadonly,i=this._isShallow;if(o==="__v_isReactive")return!n;if(o==="__v_isReadonly")return n;if(o==="__v_isShallow")return i;if(o==="__v_raw")return r===(n?i?md:Er:i?_r:kr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;let a=Ee(t);if(!n){let m;if(a&&(m=sd[o]))return m;if(o==="hasOwnProperty")return rd}let u=Reflect.get(t,o,Qe(t)?t:r);if((ct(o)?wr.has(o):od(o))||(n||Xe(t,"get",o),i))return u;if(Qe(u)){let m=a&&ln(o)?u:u.value;return n&&Ve(m)?yn(m):m}return Ve(u)?n?yn(u):ze(u):u}},vn=class extends hn{constructor(t=!1){super(!1,t)}set(t,o,r,n){let i=t[o],a=Ee(t)&&ln(o);if(!this._isShallow){let h=kt(i);if(!it(r)&&!kt(r)&&(i=Ie(i),r=Ie(r)),!a&&Qe(i)&&!Qe(r))return h||(i.value=r),!0}let u=a?Number(o)e,pn=e=>Reflect.getPrototypeOf(e);function dd(e,t,o){return function(...r){let n=this.__v_raw,i=Ie(n),a=Pt(i),u=e==="entries"||e===Symbol.iterator&&a,m=e==="keys"&&a,h=n[e](...r),v=o?uo:t?Xt:vt;return!t&&Xe(i,"iterate",m?ao:Qt),Ge(Object.create(h),{next(){let{value:k,done:p}=h.next();return p?{value:k,done:p}:{value:u?[v(k[0]),v(k[1])]:v(k),done:p}}})}}function fn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ud(e,t){let o={get(n){let i=this.__v_raw,a=Ie(i),u=Ie(n);e||(ht(n,u)&&Xe(a,"get",n),Xe(a,"get",u));let{has:m}=pn(a),h=t?uo:e?Xt:vt;if(m.call(a,n))return h(i.get(n));if(m.call(a,u))return h(i.get(u));i!==a&&i.get(n)},get size(){let n=this.__v_raw;return!e&&Xe(Ie(n),"iterate",Qt),n.size},has(n){let i=this.__v_raw,a=Ie(i),u=Ie(n);return e||(ht(n,u)&&Xe(a,"has",n),Xe(a,"has",u)),n===u?i.has(n):i.has(n)||i.has(u)},forEach(n,i){let a=this,u=a.__v_raw,m=Ie(u),h=t?uo:e?Xt:vt;return!e&&Xe(m,"iterate",Qt),u.forEach((v,k)=>n.call(i,h(v),h(k),a))}};return Ge(o,e?{add:fn("add"),set:fn("set"),delete:fn("delete"),clear:fn("clear")}:{add(n){let i=Ie(this),a=pn(i),u=Ie(n),m=!t&&!it(n)&&!kt(n)?u:n;return a.has.call(i,m)||ht(n,m)&&a.has.call(i,n)||ht(u,m)&&a.has.call(i,u)||(i.add(m),Nt(i,"add",m,m)),this},set(n,i){!t&&!it(i)&&!kt(i)&&(i=Ie(i));let a=Ie(this),{has:u,get:m}=pn(a),h=u.call(a,n);h||(n=Ie(n),h=u.call(a,n));let v=m.call(a,n);return a.set(n,i),h?ht(i,v)&&Nt(a,"set",n,i,v):Nt(a,"add",n,i),this},delete(n){let i=Ie(this),{has:a,get:u}=pn(i),m=a.call(i,n);m||(n=Ie(n),m=a.call(i,n));let h=u?u.call(i,n):void 0,v=i.delete(n);return m&&Nt(i,"delete",n,void 0,h),v},clear(){let n=Ie(this),i=n.size!==0,a=void 0,u=n.clear();return i&&Nt(n,"clear",void 0,void 0,a),u}}),["keys","values","entries",Symbol.iterator].forEach(n=>{o[n]=dd(n,e,t)}),o}function vo(e,t){let o=ud(e,t);return(r,n,i)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?r:Reflect.get(Ae(o,n)&&n in r?o:r,n,i)}var cd={get:vo(!1,!1)},pd={get:vo(!1,!0)},fd={get:vo(!0,!1)};var kr=new WeakMap,_r=new WeakMap,Er=new WeakMap,md=new WeakMap;function hd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ze(e){return kt(e)?e:yo(e,!1,id,cd,kr)}function Fs(e){return yo(e,!1,ld,pd,_r)}function yn(e){return yo(e,!0,ad,fd,Er)}function yo(e,t,o,r,n){if(!Ve(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let i=n.get(e);if(i)return i;let a=hd(xn(e));if(a===0)return e;let u=new Proxy(e,a===2?r:o);return n.set(e,u),u}function $t(e){return kt(e)?$t(e.__v_raw):!!(e&&e.__v_isReactive)}function kt(e){return!!(e&&e.__v_isReadonly)}function it(e){return!!(e&&e.__v_isShallow)}function zs(e){return e?!!e.__v_raw:!1}function Ie(e){let t=e&&e.__v_raw;return t?Ie(t):e}function go(e){return!Ae(e,"__v_skip")&&Object.isExtensible(e)&&un(e,"__v_skip",!0),e}var vt=e=>Ve(e)?ze(e):e,Xt=e=>Ve(e)?yn(e):e;function Qe(e){return e?e.__v_isRef===!0:!1}function Ze(e){return Cr(e,!1)}function bn(e){return Cr(e,!0)}function Cr(e,t){return Qe(e)?e:new co(e,t)}var co=class{constructor(t,o){this.dep=new Ms,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?t:Ie(t),this._value=o?t:vt(t),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(t){let o=this._rawValue,r=this.__v_isShallow||it(t)||kt(t);t=r?t:Ie(t),ht(t,o)&&(this._rawValue=t,this._value=r?t:vt(t),this.dep.trigger())}};function Ut(e){return Qe(e)?e.value:e}var vd={get:(e,t,o)=>t==="__v_raw"?e:Ut(Reflect.get(e,t,o)),set:(e,t,o,r)=>{let n=e[t];return Qe(n)&&!Qe(o)?(n.value=o,!0):Reflect.set(e,t,o,r)}};function wn(e){return $t(e)?e:new Proxy(e,vd)}var po=class{constructor(t,o,r){this.fn=t,this.setter=o,this._value=void 0,this.dep=new Ms(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Le!==this)return mr(this,!0),!0}get value(){let t=this.dep.track();return yr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};function Nr(e,t,o=!1){let r,n;return _e(e)?r=e:(r=e.get,n=e.set),new po(r,n,o)}var mn={},gn=new WeakMap,Jt;function Sr(e,t=!1,o=Jt){if(o){let r=gn.get(o);r||gn.set(o,r=[]),r.push(e)}}function Dr(e,t,o=Me){let{immediate:r,deep:n,once:i,scheduler:a,augmentJob:u,call:m}=o,h=A=>{(o.onWarn||ed)("Invalid watch source: ",A,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},v=A=>n?A:it(A)||n===!1||n===0?St(A,1):St(A),k,p,g,w,b=!1,T=!1;if(Qe(e)?(p=()=>e.value,b=it(e)):$t(e)?(p=()=>v(e),b=!0):Ee(e)?(T=!0,b=e.some(A=>$t(A)||it(A)),p=()=>e.map(A=>{if(Qe(A))return A.value;if($t(A))return v(A);if(_e(A))return m?m(A,2):A()})):_e(e)?t?p=m?()=>m(e,2):e:p=()=>{if(g){Dt();try{g()}finally{Rt()}}let A=Jt;Jt=k;try{return m?m(e,3,[w]):e(w)}finally{Jt=A}}:p=rt,t&&n){let A=p,P=n===!0?1/0:n;p=()=>St(A(),P)}let N=pr(),R=()=>{k.stop(),N&&N.active&&Ss(N.effects,k)};if(i&&t){let A=t;t=(...P)=>{let Z=A(...P);return R(),Z}}let I=T?new Array(e.length).fill(mn):mn,C=A=>{if(!(!(k.flags&1)||!k.dirty&&!A))if(t){let P=k.run();if(A||n||b||(T?P.some((Z,Y)=>ht(Z,I[Y])):ht(P,I))){g&&g();let Z=Jt;Jt=k;try{let Y=[P,I===mn?void 0:T&&I[0]===mn?[]:I,w];I=P,m?m(t,3,Y):t(...Y)}finally{Jt=Z}}}else k.run()};return u&&u(C),k=new hs(p),k.scheduler=a?()=>a(C,!1):C,w=A=>Sr(A,!1,k),g=k.onStop=()=>{let A=gn.get(k);if(A){if(m)m(A,4);else for(let P of A)P();gn.delete(k)}},t?r?C(!0):I=k.run():a?a(C.bind(null,!0),!0):k.run(),R.pause=k.pause.bind(k),R.resume=k.resume.bind(k),R.stop=R,R}function St(e,t=1/0,o){if(t<=0||!Ve(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=t))return e;if(o.set(e,t),t--,Qe(e))St(e.value,t,o);else if(Ee(e))for(let r=0;r{St(r,t,o)});else if(an(e)){for(let r in e)St(e[r],t,o);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&St(e[r],t,o)}return e}function Xs(e,t,o,r){try{return r?e(...r):e()}catch(n){Zs(n,t,o)}}function yt(e,t,o,r){if(_e(e)){let n=Xs(e,t,o,r);return n&&Zn(n)&&n.catch(i=>{Zs(i,t,o)}),n}if(Ee(e)){let n=[];for(let i=0;i>>1,n=nt[r],i=Ys(n);i=Ys(o)?nt.push(e):nt.splice(kd(t),0,e),e.flags|=1,jr()}}function jr(){En||(En=Gr.then(Yr))}function Wr(e){if(!Ee(e))jt&&e.id===-1?jt.splice(vs+1,0,e):e.flags&1||(ys.push(e),e.flags|=1);else for(let t=0;tYs(o)-Ys(r));if(ys.length=0,jt){for(let o=0;oe.id==null?e.flags&2?-1:1/0:e.id;function Yr(e){let t=rt;try{for(Ot=0;Ot{r._d&&Dn(-1);let i=Cn(t),a=es.length,u;try{u=e(...n)}finally{for(let m=es.length;m>a;m--)Ci();Cn(i),r._d&&Dn(1)}return u};return r._n=!0,r._c=!0,r._d=!0,r}function E(e,t){if(pt===null)return e;let o=$n(pt),r=e.dirs||(e.dirs=[]);for(let n=0;n1)return o&&_e(t)?t.call(r&&r.proxy):t}}var Ed=Symbol.for("v-scx"),Cd=()=>{{let e=lt(Ed);return e}};function He(e,t,o){return Qr(e,t,o)}function Qr(e,t,o=Me){let{immediate:r,deep:n,flush:i,once:a}=o,u=Ge({},o),m=t&&r||!t&&i!=="post",h;if(ws){if(i==="sync"){let g=Cd();h=g.__watcherHandles||(g.__watcherHandles=[])}else if(!m){let g=()=>{};return g.stop=rt,g.resume=rt,g.pause=rt,g}}let v=xe;u.call=(g,w,b)=>yt(g,v,w,b);let k=!1;i==="post"?u.scheduler=g=>{at(g,v&&v.suspense)}:i!=="sync"&&(k=!0,u.scheduler=(g,w)=>{w?g():Do(g)}),u.augmentJob=g=>{t&&(g.flags|=4),k&&(g.flags|=2,v&&(g.id=v.uid,g.i=v))};let p=Dr(e,t,u);return ws&&(h?h.push(p):m&&p()),p}function Nd(e,t,o){let r=this.proxy,n=Fe(e)?e.includes(".")?Xr(r,e):()=>r[e]:e.bind(r,r),i;_e(t)?i=t:(i=t.handler,o=t);let a=tn(this),u=Qr(n,i.bind(r),o);return a(),u}function Xr(e,t){let o=t.split(".");return()=>{let r=e;for(let n=0;ne.__isTeleport;var bo=Symbol("_leaveCb");function Dd(e){let t=e[0];if(e.length>1){let o=!1;for(let r of e)if(r.type!==Ft){t=r,o=!0;break}}return t}function Zr(e){if(!Vn(e))return An(e.type)&&e.children?Dd(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:o}=e;if(o){if(t&16)return o[0];if(t&32&&_e(o.default))return o.default()}}function In(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let o=e.component.subTree;In(An(o.type)&&Zr(o)||o,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function xs(e,t){return _e(e)?Ge({name:e.name},t,{setup:e}):e}function Ro(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Tr(e,t){let o;return!!((o=Object.getOwnPropertyDescriptor(e,t))&&!o.configurable)}var Nn=new WeakMap;function Gs(e,t,o,r,n=!1){if(Ee(e)){e.forEach((b,T)=>Gs(b,t&&(Ee(t)?t[T]:t),o,r,n));return}if(js(r)&&!n){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Gs(e,t,o,r.component.subTree);return}let i=r.shapeFlag&4?$n(r.component):r.el,a=n?null:i,{i:u,r:m}=e,h=t&&t.r,v=u.refs===Me?u.refs={}:u.refs,k=u.setupState,p=Ie(k),g=k===Me?Xn:b=>Tr(v,b)?!1:Ae(p,b),w=(b,T)=>!(T&&Tr(v,T));if(h!=null&&h!==m){if(Or(t),Fe(h))v[h]=null,g(h)&&(k[h]=null);else if(Qe(h)){let b=t;w(h,b.k)&&(h.value=null),b.k&&(v[b.k]=null)}}if(_e(m))Xs(m,u,12,[a,v]);else{let b=Fe(m),T=Qe(m);if(b||T){let N=()=>{if(e.f){let R=b?g(m)?k[m]:v[m]:w(m)||!e.k?m.value:v[e.k];if(n)Ee(R)&&Ss(R,i);else if(Ee(R))R.includes(i)||R.push(i);else if(b)v[m]=[i],g(m)&&(k[m]=v[m]);else{let I=[i];w(m,e.k)&&(m.value=I),e.k&&(v[e.k]=I)}}else b?(v[m]=a,g(m)&&(k[m]=a)):T&&(w(m,e.k)&&(m.value=a),e.k&&(v[e.k]=a))};if(a){let R=()=>{N(),Nn.delete(e)};R.id=-1,Nn.set(e,R),at(R,o)}else Or(e),N()}}}function Or(e){let t=Nn.get(e);t&&(t.flags|=8,Nn.delete(e))}var Ar=e=>e.nodeType===8;var q4=Os().requestIdleCallback||(e=>setTimeout(e,1)),M4=Os().cancelIdleCallback||(e=>clearTimeout(e));function Rd(e,t){if(Ar(e)&&e.data==="["){let o=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Ar(r))if(r.data==="]"){if(--o===0)break}else r.data==="["&&o++;r=r.nextSibling}}else t(e)}var js=e=>!!e.type.__asyncLoader;function xr(e){_e(e)&&(e={loader:e});let{loader:t,loadingComponent:o,errorComponent:r,delay:n=200,hydrate:i,timeout:a,suspensible:u=!0,onError:m}=e,h=null,v,k=0,p=()=>(k++,h=null,g()),g=()=>{let w;return h||(w=h=t().catch(b=>{if(b=b instanceof Error?b:new Error(String(b)),m)return new Promise((T,N)=>{m(b,()=>T(p()),()=>N(b),k+1)});throw b}).then(b=>w!==h&&h?h:(b&&(b.__esModule||b[Symbol.toStringTag]==="Module")&&(b=b.default),v=b,b)))};return xs({name:"AsyncComponentWrapper",__asyncLoader:g,__asyncHydrate(w,b,T){let N=w.isConnected,R=!1;(b.bu||(b.bu=[])).push(()=>R=!0);let I=()=>{R||!w.parentNode||N&&!w.isConnected||T()},C=i?()=>{let A=i(I,P=>Rd(w,P));A&&(b.bum||(b.bum=[])).push(A)}:I;v?C():g().then(()=>!b.isUnmounted&&C())},get __asyncResolved(){return v},setup(){let w=xe;if(Ro(w),v)return()=>kn(v,w);let b=A=>{h=null,Zs(A,w,13,!r)};if(u&&w.suspense||ws)return g().then(A=>()=>kn(A,w)).catch(A=>(b(A),()=>r?De(r,{error:A}):null));let T=Ze(!1),N=Ze(),R=Ze(!!n),I,C;return en(()=>{I!=null&&clearTimeout(I),C!=null&&clearTimeout(C)}),n&&(C=setTimeout(()=>{w.isUnmounted||(R.value=!1)},n)),a!=null&&(I=setTimeout(()=>{if(!w.isUnmounted&&!T.value&&!N.value){let A=new Error(`Async component timed out after ${a}ms.`);b(A),N.value=A}},a)),g().then(()=>{w.isUnmounted||(T.value=!0,w.parent&&Vn(w.parent.vnode)&&w.parent.update())}).catch(A=>{if(w.isUnmounted){h=null;return}b(A),N.value=A}),()=>{if(T.value&&v)return kn(v,w);if(N.value&&r)return De(r,{error:N.value});if(o&&!R.value)return kn(o,w)}}})}function kn(e,t){let{ref:o,props:r,children:n,ce:i}=t.vnode,a=De(e,r,n);return a.ref=o,a.ce=i,delete t.vnode.ce,a}var Vn=e=>e.type.__isKeepAlive;function ei(e,t){si(e,"a",t)}function ti(e,t){si(e,"da",t)}function si(e,t,o=xe){let r=e.__wdc||(e.__wdc=()=>{let n=o;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Pn(t,r,o),o){let n=o.parent;for(;n&&n.parent;)Vn(n.parent.vnode)&&Td(r,t,o,n),n=n.parent}}function Td(e,t,o,r){let n=Pn(t,e,r,!0);en(()=>{Ss(r[t],n)},o)}function Pn(e,t,o=xe,r=!1){if(o){let n=o[e]||(o[e]=[]),i=t.__weh||(t.__weh=(...a)=>{Dt();let u=tn(o),m=yt(t,o,e,a);return u(),Rt(),m});return r?n.unshift(i):n.push(i),i}}var zt=e=>(t,o=xe)=>{(!ws||e==="sp")&&Pn(e,(...r)=>t(...r),o)},Od=zt("bm"),It=zt("m"),ni=zt("bu"),oi=zt("u"),ss=zt("bum"),en=zt("um"),Ad=zt("sp"),Id=zt("rtg"),Vd=zt("rtc");function Pd(e,t=xe){Pn("ec",e,t)}var ri="components",qd="directives";function et(e,t){return ii(ri,e,!0,t)||e}var Md=Symbol.for("v-ndc");function be(e){return ii(qd,e)}function ii(e,t,o=!0,r=!1){let n=pt||xe;if(n){let i=n.type;if(e===ri){let u=bu(i,!1);if(u&&(u===t||u===Ke(t)||u===Yt(Ke(t))))return i}let a=Ir(n[e]||i[e],t)||Ir(n.appContext[e],t);return!a&&r?i:a}}function Ir(e,t){return e&&(e[t]||e[Ke(t)]||e[Yt(Ke(t))])}function ne(e,t,o,r){let n,i=o&&o[r],a=Ee(e);if(a||Fe(e)){let u=a&&$t(e),m=!1,h=!1;u&&(m=!it(e),h=kt(e),e=Ls(e)),n=new Array(e.length);for(let v=0,k=e.length;vt(u,m,void 0,i&&i[m]));else{let u=Object.keys(e);n=new Array(u.length);for(let m=0,h=u.length;me?Di(e)?$n(e):Eo(e.parent):null;var Ws=Ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Eo(e.parent),$root:e=>Eo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>To(e),$forceUpdate:e=>e.f||(e.f=()=>{Do(e.update)}),$nextTick:e=>e.n||(e.n=_t.bind(e.proxy)),$watch:e=>Nd.bind(e)});var wo=(e,t)=>e!==Me&&!e.__isScriptSetup&&Ae(e,t),$d={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:o,setupState:r,data:n,props:i,accessCache:a,type:u,appContext:m}=e;if(t[0]!=="$"){let p=a[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return n[t];case 4:return o[t];case 3:return i[t]}else{if(wo(r,t))return a[t]=1,r[t];if(n!==Me&&Ae(n,t))return a[t]=2,n[t];if(Ae(i,t))return a[t]=3,i[t];if(o!==Me&&Ae(o,t))return a[t]=4,o[t];Co&&(a[t]=0)}}let h=Ws[t],v,k;if(h)return t==="$attrs"&&Xe(e.attrs,"get",""),h(e);if((v=u.__cssModules)&&(v=v[t]))return v;if(o!==Me&&Ae(o,t))return a[t]=4,o[t];if(k=m.config.globalProperties,Ae(k,t))return k[t]},set({_:e},t,o){let{data:r,setupState:n,ctx:i}=e;return wo(n,t)?(n[t]=o,!0):r!==Me&&Ae(r,t)?(r[t]=o,!0):Ae(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:r,appContext:n,props:i,type:a}},u){let m;return!!(o[u]||e!==Me&&u[0]!=="$"&&Ae(e,u)||wo(t,u)||Ae(i,u)||Ae(r,u)||Ae(Ws,u)||Ae(n.config.globalProperties,u)||(m=a.__cssModules)&&m[u])},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:Ae(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};function Vr(e){return Ee(e)?e.reduce((t,o)=>(t[o]=null,t),{}):e}var Co=!0;function Ud(e){let t=To(e),o=e.proxy,r=e.ctx;Co=!1,t.beforeCreate&&Pr(t.beforeCreate,e,"bc");let{data:n,computed:i,methods:a,watch:u,provide:m,inject:h,created:v,beforeMount:k,mounted:p,beforeUpdate:g,updated:w,activated:b,deactivated:T,beforeDestroy:N,beforeUnmount:R,destroyed:I,unmounted:C,render:A,renderTracked:P,renderTriggered:Z,errorCaptured:Y,serverPrefetch:j,expose:z,inheritAttrs:ae,components:se,directives:re,filters:ue}=t;if(h&&Ld(h,r,null),a)for(let me in a){let pe=a[me];_e(pe)&&(r[me]=pe.bind(o))}if(n){let me=n.call(o,o);Ve(me)&&(e.data=ze(me))}if(Co=!0,i)for(let me in i){let pe=i[me],Te=_e(pe)?pe.bind(o,o):_e(pe.get)?pe.get.bind(o,o):rt,Re=!_e(pe)&&_e(pe.set)?pe.set.bind(o):rt,Se=tt({get:Te,set:Re});Object.defineProperty(r,me,{enumerable:!0,configurable:!0,get:()=>Se.value,set:D=>Se.value=D})}if(u)for(let me in u)ai(u[me],r,o,me);if(m){let me=_e(m)?m.call(o):m;Reflect.ownKeys(me).forEach(pe=>{ts(pe,me[pe])})}v&&Pr(v,e,"c");function he(me,pe){Ee(pe)?pe.forEach(Te=>me(Te.bind(o))):pe&&me(pe.bind(o))}if(he(Od,k),he(It,p),he(ni,g),he(oi,w),he(ei,b),he(ti,T),he(Pd,Y),he(Vd,P),he(Id,Z),he(ss,R),he(en,C),he(Ad,j),Ee(z))if(z.length){let me=e.exposed||(e.exposed={});z.forEach(pe=>{Object.defineProperty(me,pe,{get:()=>o[pe],set:Te=>o[pe]=Te,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===rt&&(e.render=A),ae!=null&&(e.inheritAttrs=ae),se&&(e.components=se),re&&(e.directives=re),j&&Ro(e)}function Ld(e,t,o=rt){Ee(e)&&(e=No(e));for(let r in e){let n=e[r],i;Ve(n)?"default"in n?i=lt(n.from||r,n.default,!0):i=lt(n.from||r):i=lt(n),Qe(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):t[r]=i}}function Pr(e,t,o){yt(Ee(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,o)}function ai(e,t,o,r){let n=r.includes(".")?Xr(o,r):()=>o[r];if(Fe(e)){let i=t[e];_e(i)&&He(n,i)}else if(_e(e))He(n,e.bind(o));else if(Ve(e))if(Ee(e))e.forEach(i=>ai(i,t,o,r));else{let i=_e(e.handler)?e.handler.bind(o):t[e.handler];_e(i)&&He(n,i,e)}}function To(e){let t=e.type,{mixins:o,extends:r}=t,{mixins:n,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,u=i.get(t),m;return u?m=u:!n.length&&!o&&!r?m=t:(m={},n.length&&n.forEach(h=>Sn(m,h,a,!0)),Sn(m,t,a)),Ve(t)&&i.set(t,m),m}function Sn(e,t,o,r=!1){let{mixins:n,extends:i}=t;i&&Sn(e,i,o,!0),n&&n.forEach(a=>Sn(e,a,o,!0));for(let a in t)if(!(r&&a==="expose")){let u=Fd[a]||o&&o[a];e[a]=u?u(e[a],t[a]):t[a]}return e}var Fd={data:qr,props:Mr,emits:Mr,methods:Bs,computed:Bs,beforeCreate:st,created:st,beforeMount:st,mounted:st,beforeUpdate:st,updated:st,beforeDestroy:st,beforeUnmount:st,destroyed:st,unmounted:st,activated:st,deactivated:st,errorCaptured:st,serverPrefetch:st,components:Bs,directives:Bs,watch:Hd,provide:qr,inject:zd};function qr(e,t){return t?e?function(){return Ge(_e(e)?e.call(this,this):e,_e(t)?t.call(this,this):t)}:t:e}function zd(e,t){return Bs(No(e),No(t))}function No(e){if(Ee(e)){let t={};for(let o=0;ot==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ke(t)}Modifiers`]||e[`${qt(t)}Modifiers`];function Wd(e,t,...o){if(e.isUnmounted)return;let r=e.vnode.props||Me,n=o,i=t.startsWith("update:"),a=i&&jd(r,t.slice(7));a&&(a.trim&&(n=o.map(v=>Fe(v)?v.trim():v)),a.number&&(n=n.map(eo)));let u,m=r[u=Rs(t)]||r[u=Rs(Ke(t))];!m&&i&&(m=r[u=Rs(qt(t))]),m&&yt(m,e,6,n);let h=r[u+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,yt(h,e,6,n)}}var Kd=new WeakMap;function di(e,t,o=!1){let r=o?Kd:t.emitsCache,n=r.get(e);if(n!==void 0)return n;let i=e.emits,a={},u=!1;if(!_e(e)){let m=h=>{let v=di(h,t,!0);v&&(u=!0,Ge(a,v))};!o&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}return!i&&!u?(Ve(e)&&r.set(e,null),null):(Ee(i)?i.forEach(m=>a[m]=null):Ge(a,i),Ve(e)&&r.set(e,a),a)}function qn(e,t){return!e||!us(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ae(e,t[0].toLowerCase()+t.slice(1))||Ae(e,qt(t))||Ae(e,t))}function ko(e){let{type:t,vnode:o,proxy:r,withProxy:n,propsOptions:[i],slots:a,attrs:u,emit:m,render:h,renderCache:v,props:k,data:p,setupState:g,ctx:w,inheritAttrs:b}=e,T=Cn(e),N,R;try{if(o.shapeFlag&4){let A=n||r,P=A;N=At(h.call(P,A,v,k,g,p,w)),R=u}else{let A=t;N=At(A.length>1?A(k,{attrs:u,slots:a,emit:m}):A(k,null)),R=t.props?u:Yd(u)}}catch(A){es.length=0,Zs(A,e,1),N=De(Ft)}let I=N,C;if(R&&b!==!1){let A=Object.keys(R),{shapeFlag:P}=I;A.length&&P&7&&(i&&A.some(cs)&&(R=Jd(R,i)),I=bs(I,R,!1,!0))}if(o.dirs&&(I=bs(I,null,!1,!0),I.dirs=I.dirs?I.dirs.concat(o.dirs):o.dirs),o.transition){let A=An(I.type)&&Zr(I)||I;In(A,o.transition)}return N=I,Cn(T),N}var Yd=e=>{let t;for(let o in e)(o==="class"||o==="style"||us(o))&&((t||(t={}))[o]=e[o]);return t},Jd=(e,t)=>{let o={};for(let r in e)(!cs(r)||!(r.slice(9)in t))&&(o[r]=e[r]);return o};function Qd(e,t,o){let{props:r,children:n,component:i}=e,{props:a,children:u,patchFlag:m}=t,h=i.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&m>=0){if(m&1024)return!0;if(m&16)return r?$r(r,a,h):!!a;if(m&8){let v=t.dynamicProps;for(let k=0;kObject.create(ci),fi=e=>Object.getPrototypeOf(e)===ci;function Zd(e,t,o,r=!1){let n={},i=pi();e.propsDefaults=Object.create(null),mi(e,t,n,i);for(let a in e.propsOptions[0])a in n||(n[a]=void 0);o?e.props=r?n:Fs(n):e.type.props?e.props=n:e.props=i,e.attrs=i}function xd(e,t,o,r){let{props:n,attrs:i,vnode:{patchFlag:a}}=e,u=Ie(n),[m]=e.propsOptions,h=!1;if((r||a>0)&&!(a&16)){if(a&8){let v=e.vnode.dynamicProps;for(let k=0;k{m=!0;let[p,g]=hi(k,t,!0);Ge(a,p),g&&u.push(...g)};!o&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}if(!i&&!m)return Ve(e)&&r.set(e,Kt),Kt;if(Ee(i))for(let v=0;ve==="_"||e==="_ctx"||e==="$stable",Ao=e=>Ee(e)?e.map(At):[At(e)],tu=(e,t,o)=>{if(t._n)return t;let r=_d((...n)=>Ao(t(...n)),o);return r._c=!1,r},vi=(e,t,o)=>{let r=e._ctx;for(let n in e){if(Oo(n))continue;let i=e[n];if(_e(i))t[n]=tu(n,i,r);else if(i!=null){let a=Ao(i);t[n]=()=>a}}},yi=(e,t)=>{let o=Ao(t);e.slots.default=()=>o},gi=(e,t,o)=>{for(let r in t)(o||!Oo(r))&&(e[r]=t[r])},su=(e,t,o)=>{let r=e.slots=pi();if(e.vnode.shapeFlag&32){let n=t._;n?(gi(r,t,o),o&&un(r,"_",n,!0)):vi(t,r)}else t&&yi(e,t)},nu=(e,t,o)=>{let{vnode:r,slots:n}=e,i=!0,a=Me;if(r.shapeFlag&32){let u=t._;u?o&&u===1?i=!1:gi(n,t,o):(i=!t.$stable,vi(t,n)),a=t}else t&&(yi(e,t),a={default:1});if(i)for(let u in n)!Oo(u)&&a[u]==null&&delete n[u]};function ou(){let e=[]}var at=lu;function bi(e){return ru(e)}function ru(e,t){ou();let o=Os();o.__VUE__=!0;let{insert:r,remove:n,patchProp:i,createElement:a,createText:u,createComment:m,setText:h,setElementText:v,parentNode:k,nextSibling:p,setScopeId:g=rt,insertStaticContent:w}=e,b=(_,S,q,F=null,G=null,M=null,Q=void 0,x=null,X=!!S.dynamicChildren)=>{if(_===S)return;_&&!Hs(_,S)&&(F=te(_),V(_,G,M,!0),_=null),S.patchFlag===-2&&(X=!1,S.dynamicChildren=null);let{type:H,ref:de,shapeFlag:ee}=S;switch(H){case Mn:T(_,S,q,F);break;case Ft:N(_,S,q,F);break;case Ks:_==null&&R(S,q,F,Q);break;case J:re(_,S,q,F,G,M,Q,x,X);break;default:ee&1?P(_,S,q,F,G,M,Q,x,X):ee&6?ue(_,S,q,F,G,M,Q,x,X):(ee&64||ee&128)&&H.process(_,S,q,F,G,M,Q,x,X,fe)}de!=null&&G?Gs(de,_&&_.ref,M,S||_,!S):de==null&&_&&_.ref!=null&&Gs(_.ref,null,M,_,!0)},T=(_,S,q,F)=>{if(_==null)r(S.el=u(S.children),q,F);else{let G=S.el=_.el;S.children!==_.children&&h(G,S.children)}},N=(_,S,q,F)=>{_==null?r(S.el=m(S.children||""),q,F):S.el=_.el},R=(_,S,q,F)=>{[_.el,_.anchor]=w(_.children,S,q,F,_.el,_.anchor)},I=(_,S,q,F)=>{if(S.children!==_.children){let G=p(_.anchor);A(_),[S.el,S.anchor]=w(S.children,q,G,F)}else S.el=_.el,S.anchor=_.anchor},C=({el:_,anchor:S},q,F)=>{let G;for(;_&&_!==S;)G=p(_),r(_,q,F),_=G;r(S,q,F)},A=({el:_,anchor:S})=>{let q;for(;_&&_!==S;)q=p(_),n(_),_=q;n(S)},P=(_,S,q,F,G,M,Q,x,X)=>{if(S.type==="svg"?Q="svg":S.type==="math"&&(Q="mathml"),_==null)Z(S,q,F,G,M,Q,x,X);else{let H=_.el&&_.el._isVueCE?_.el:null;try{H&&H._beginPatch(),z(_,S,G,M,Q,x,X)}finally{H&&H._endPatch()}}},Z=(_,S,q,F,G,M,Q,x)=>{let X,H,{props:de,shapeFlag:ee,transition:ie,dirs:ve}=_;if(X=_.el=a(_.type,M,de&&de.is,de),ee&8?v(X,_.children):ee&16&&j(_.children,X,null,F,G,_o(_,M),Q,x),ve&&Zt(_,null,F,"created"),Y(X,_,_.scopeId,Q,F),de){for(let Ue in de)Ue!=="value"&&!ps(Ue)&&i(X,Ue,null,de[Ue],M,F);"value"in de&&i(X,"value",null,de.value,M),(H=de.onVnodeBeforeMount)&&Tt(H,F,_)}ve&&Zt(_,null,F,"beforeMount");let Oe=iu(G,ie);Oe&&ie.beforeEnter(X),r(X,S,q),((H=de&&de.onVnodeMounted)||Oe||ve)&&at(()=>{let $e;try{H&&Tt(H,F,_),Oe&&ie.enter(X),ve&&Zt(_,null,F,"mounted")}finally{}},G)},Y=(_,S,q,F,G)=>{if(q&&g(_,q),F)for(let M=0;M{for(let H=X;H<_.length;H++){let de=_[H]=x?Lt(_[H]):At(_[H]);b(null,de,S,q,F,G,M,Q,x)}},z=(_,S,q,F,G,M,Q)=>{let x=S.el=_.el,{patchFlag:X,dynamicChildren:H,dirs:de}=S;X|=_.patchFlag&16;let ee=_.props||Me,ie=S.props||Me,ve;if(q&&xt(q,!1),(ve=ie.onVnodeBeforeUpdate)&&Tt(ve,q,S,_),de&&Zt(S,_,q,"beforeUpdate"),q&&xt(q,!0),H&&(!_.dynamicChildren||_.dynamicChildren.length!==H.length)&&(X=0,Q=!1,H=null),(ee.innerHTML&&ie.innerHTML==null||ee.textContent&&ie.textContent==null)&&v(x,""),H?ae(_.dynamicChildren,H,x,q,F,_o(S,G),M):Q||Te(_,S,x,null,q,F,_o(S,G),M,!1),X>0){if(X&16)se(x,ee,ie,q,G);else if(X&2&&ee.class!==ie.class&&i(x,"class",null,ie.class,G),X&4&&i(x,"style",ee.style,ie.style,G),X&8){let Oe=S.dynamicProps;for(let Ue=0;Ue{ve&&Tt(ve,q,S,_),de&&Zt(S,_,q,"updated")},F)},ae=(_,S,q,F,G,M,Q)=>{for(let x=0;x{if(S!==q){if(S!==Me)for(let M in S)!ps(M)&&!(M in q)&&i(_,M,S[M],null,G,F);for(let M in q){if(ps(M))continue;let Q=q[M],x=S[M];Q!==x&&M!=="value"&&i(_,M,x,Q,G,F)}"value"in q&&i(_,"value",S.value,q.value,G)}},re=(_,S,q,F,G,M,Q,x,X)=>{let H=S.el=_?_.el:u(""),de=S.anchor=_?_.anchor:u(""),{patchFlag:ee,dynamicChildren:ie,slotScopeIds:ve}=S;ve&&(x=x?x.concat(ve):ve),_==null?(r(H,q,F),r(de,q,F),j(S.children||[],q,de,G,M,Q,x,X)):ee>0&&ee&64&&ie&&_.dynamicChildren&&_.dynamicChildren.length===ie.length?(ae(_.dynamicChildren,ie,q,G,M,Q,x),(S.key!=null||G&&S===G.subTree)&&wi(_,S,!0)):Te(_,S,q,de,G,M,Q,x,X)},ue=(_,S,q,F,G,M,Q,x,X)=>{S.slotScopeIds=x,_==null?S.shapeFlag&512?G.ctx.activate(S,q,F,Q,X):ke(S,q,F,G,M,Q,X):he(_,S,X)},ke=(_,S,q,F,G,M,Q)=>{let x=_.component=mu(_,F,G);if(Vn(_)&&(x.ctx.renderer=fe),hu(x,!1,Q),x.asyncDep){if(G&&G.registerDep(x,me,Q),!_.el){let X=x.subTree=De(Ft);N(null,X,S,q),_.placeholder=X.el}}else me(x,_,S,q,G,M,Q)},he=(_,S,q)=>{let F=S.component=_.component;if(Qd(_,S,q))if(F.asyncDep&&!F.asyncResolved){pe(F,S,q);return}else F.next=S,F.update();else S.el=_.el,F.vnode=S},me=(_,S,q,F,G,M,Q)=>{let x=()=>{if(_.isMounted){let{next:ee,bu:ie,u:ve,parent:Oe,vnode:Ue}=_;{let dt=ki(_);if(dt){ee&&(ee.el=Ue.el,pe(_,ee,Q)),dt.asyncDep.then(()=>{at(()=>{_.isUnmounted||H()},G)});return}}let $e=ee,je;xt(_,!1),ee?(ee.el=Ue.el,pe(_,ee,Q)):ee=Ue,ie&&Ts(ie),(je=ee.props&&ee.props.onVnodeBeforeUpdate)&&Tt(je,Oe,ee,Ue),xt(_,!0);let We=ko(_),bt=_.subTree;_.subTree=We,b(bt,We,k(bt.el),te(bt),_,G,M),ee.el=We.el,$e===null&&Xd(_,We.el),ve&&at(ve,G),(je=ee.props&&ee.props.onVnodeUpdated)&&at(()=>Tt(je,Oe,ee,Ue),G)}else{let ee,{el:ie,props:ve}=S,{bm:Oe,m:Ue,parent:$e,root:je,type:We}=_,bt=js(S);if(xt(_,!1),Oe&&Ts(Oe),!bt&&(ee=ve&&ve.onVnodeBeforeMount)&&Tt(ee,$e,S),xt(_,!0),ie&&ce){let dt=()=>{_.subTree=ko(_),ce(ie,_.subTree,_,G,null)};bt&&We.__asyncHydrate?We.__asyncHydrate(ie,_,dt):dt()}else{je.ce&&je.ce._hasShadowRoot()&&je.ce._injectChildStyle(We,_.parent?_.parent.type:void 0);let dt=_.subTree=ko(_);b(null,dt,q,F,_,G,M),S.el=dt.el}if(Ue&&at(Ue,G),!bt&&(ee=ve&&ve.onVnodeMounted)){let dt=S;at(()=>Tt(ee,$e,dt),G)}(S.shapeFlag&256||$e&&js($e.vnode)&&$e.vnode.shapeFlag&256)&&_.a&&at(_.a,G),_.isMounted=!0,S=q=F=null}};_.scope.on();let X=_.effect=new hs(x);_.scope.off();let H=_.update=X.run.bind(X),de=_.job=X.runIfDirty.bind(X);de.i=_,de.id=_.uid,X.scheduler=()=>Do(de),xt(_,!0),H()},pe=(_,S,q)=>{S.component=_;let F=_.vnode.props;_.vnode=S,_.next=null,xd(_,S.props,F,q),nu(_,S.children,q),Dt(),Rr(_),Rt()},Te=(_,S,q,F,G,M,Q,x,X=!1)=>{let H=_&&_.children,de=_?_.shapeFlag:0,ee=S.children,{patchFlag:ie,shapeFlag:ve}=S;if(ie>0){if(ie&128){Se(H,ee,q,F,G,M,Q,x,X);return}else if(ie&256){Re(H,ee,q,F,G,M,Q,x,X);return}}ve&8?(de&16&&U(H,G,M),ee!==H&&v(q,ee)):de&16?ve&16?Se(H,ee,q,F,G,M,Q,x,X):U(H,G,M,!0):(de&8&&v(q,""),ve&16&&j(ee,q,F,G,M,Q,x,X))},Re=(_,S,q,F,G,M,Q,x,X)=>{_=_||Kt,S=S||Kt;let H=_.length,de=S.length,ee=Math.min(H,de),ie;for(ie=0;iede?U(_,G,M,!0,!1,ee):j(S,q,F,G,M,Q,x,X,ee)},Se=(_,S,q,F,G,M,Q,x,X)=>{let H=0,de=S.length,ee=_.length-1,ie=de-1;for(;H<=ee&&H<=ie;){let ve=_[H],Oe=S[H]=X?Lt(S[H]):At(S[H]);if(Hs(ve,Oe))b(ve,Oe,q,null,G,M,Q,x,X);else break;H++}for(;H<=ee&&H<=ie;){let ve=_[ee],Oe=S[ie]=X?Lt(S[ie]):At(S[ie]);if(Hs(ve,Oe))b(ve,Oe,q,null,G,M,Q,x,X);else break;ee--,ie--}if(H>ee){if(H<=ie){let ve=ie+1,Oe=veie)for(;H<=ee;)V(_[H],G,M,!0),H++;else{let ve=H,Oe=H,Ue=new Map;for(H=Oe;H<=ie;H++){let ut=S[H]=X?Lt(S[H]):At(S[H]);ut.key!=null&&Ue.set(ut.key,H)}let $e,je=0,We=ie-Oe+1,bt=!1,dt=0,Ns=new Array(We);for(H=0;H=We){V(ut,G,M,!0);continue}let Et;if(ut.key!=null)Et=Ue.get(ut.key);else for($e=Oe;$e<=ie;$e++)if(Ns[$e-Oe]===0&&Hs(ut,S[$e])){Et=$e;break}Et===void 0?V(ut,G,M,!0):(Ns[Et-Oe]=H+1,Et>=dt?dt=Et:bt=!0,b(ut,S[Et],q,null,G,M,Q,x,X),je++)}let Zo=bt?au(Ns):Kt;for($e=Zo.length-1,H=We-1;H>=0;H--){let ut=Oe+H,Et=S[ut],xo=S[ut+1],er=ut+1{let{el:M,type:Q,transition:x,children:X,shapeFlag:H}=_;if(H&6){D(_.component.subTree,S,q,F);return}if(H&128){_.suspense.move(S,q,F);return}if(H&64){Q.move(_,S,q,fe);return}if(Q===J){r(M,S,q);for(let ee=0;eex.enter(M),G));else{let{leave:ee,delayLeave:ie,afterLeave:ve}=x,Oe=()=>{_.ctx.isUnmounted?n(M):r(M,S,q)},Ue=()=>{let $e=M._isLeaving||!!M[bo];M._isLeaving&&M[bo](!0),x.persisted&&!$e?Oe():ee(M,()=>{Oe(),ve&&ve()})};ie?ie(M,Oe,Ue):Ue()}else r(M,S,q)},V=(_,S,q,F=!1,G=!1)=>{let{type:M,props:Q,ref:x,children:X,dynamicChildren:H,shapeFlag:de,patchFlag:ee,dirs:ie,cacheIndex:ve,memo:Oe}=_;if(ee===-2&&(G=!1),x!=null&&(Dt(),Gs(x,null,q,_,!0),Rt()),ve!=null&&(S.renderCache[ve]=void 0),de&256){S.ctx.deactivate(_);return}let Ue=de&1&&ie,$e=!js(_),je;if($e&&(je=Q&&Q.onVnodeBeforeUnmount)&&Tt(je,S,_),de&6)le(_.component,q,F);else{if(de&128){_.suspense.unmount(q,F);return}Ue&&Zt(_,null,S,"beforeUnmount"),de&64?_.type.remove(_,S,q,fe,F):H&&!H.hasOnce&&(M!==J||ee>0&&ee&64)?U(H,S,q,!1,!0):(M===J&&ee&384||!G&&de&16)&&U(X,S,q),F&&W(_)}let We=Oe!=null&&ve==null;($e&&(je=Q&&Q.onVnodeUnmounted)||Ue||We)&&at(()=>{je&&Tt(je,S,_),Ue&&Zt(_,null,S,"unmounted"),We&&(_.el=null)},q)},W=_=>{let{type:S,el:q,anchor:F,transition:G}=_;if(S===J){oe(q,F);return}if(S===Ks){A(_);return}let M=()=>{n(q),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(_.shapeFlag&1&&G&&!G.persisted){let{leave:Q,delayLeave:x}=G,X=()=>Q(q,M);x?x(_.el,M,X):X()}else M()},oe=(_,S)=>{let q;for(;_!==S;)q=p(_),n(_),_=q;n(S)},le=(_,S,q)=>{let{bum:F,scope:G,job:M,subTree:Q,um:x,m:X,a:H}=_;Lr(X),Lr(H),F&&Ts(F),G.stop(),M&&(M.flags|=8,V(Q,_,S,q)),x&&at(x,S),at(()=>{_.isUnmounted=!0},S)},U=(_,S,q,F=!1,G=!1,M=0)=>{for(let Q=M;Q<_.length;Q++)V(_[Q],S,q,F,G)},te=_=>{if(_.shapeFlag&6)return te(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();let S=p(_.anchor||_.el),q=S&&S[Sd];return q?p(q):S},L=!1,K=(_,S,q)=>{let F;_==null?S._vnode&&(V(S._vnode,null,null,!0),F=S._vnode.component):b(S._vnode||null,_,S,null,null,null,q),S._vnode=_,L||(L=!0,Rr(F),Kr(),L=!1)},fe={p:b,um:V,m:D,r:W,mt:ke,mc:j,pc:Te,pbc:ae,n:te,o:e},Ce,ce;return t&&([Ce,ce]=t(fe)),{render:K,hydrate:Ce,createApp:Gd(K,Ce)}}function _o({type:e,props:t},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:o}function xt({effect:e,job:t},o){o?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function iu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function wi(e,t,o=!1){let r=e.children,n=t.children;if(Ee(r)&&Ee(n))for(let i=0;i>1,e[o[u]]0&&(t[r]=o[i-1]),o[i]=r)}}for(i=o.length,a=o[i-1];i-- >0;)o[i]=a,a=t[a];return o}function ki(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ki(t)}function Lr(e){if(e)for(let t=0;te.__isSuspense;function lu(e,t){t&&t.pendingBranch?Ee(e)?t.effects.push(...e):t.effects.push(e):Wr(e)}var J=Symbol.for("v-fgt"),Mn=Symbol.for("v-txt"),Ft=Symbol.for("v-cmt"),Ks=Symbol.for("v-stc"),es=[],ft=null;function l(e=!1){es.push(ft=e?null:[])}function Ci(){es.pop(),ft=es[es.length-1]||null}var Js=1;function Dn(e,t=!1){Js+=e,e<0&&ft&&t&&(ft.hasOnce=!0)}function Ni(e){return e.dynamicChildren=Js>0?ft||Kt:null,Ci(),Js>0&&ft&&ft.push(e),e}function d(e,t,o,r,n,i){return Ni(s(e,t,o,r,n,i,!0))}function ks(e,t,o,r,n){return Ni(De(e,t,o,r,n,!0))}function Rn(e){return e?e.__v_isVNode===!0:!1}function Hs(e,t){return e.type===t.type&&e.key===t.key}var Si=({key:e})=>e??null,_n=({ref:e,ref_key:t,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?Fe(e)||Qe(e)||_e(e)?{i:pt,r:e,k:t,f:!!o}:e:null);function s(e,t=null,o=null,r=0,n=null,i=e===J?0:1,a=!1,u=!1){let m={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Si(t),ref:t&&_n(t),scopeId:Jr,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:pt};return u?(Tn(m,o),i&128&&e.normalize(m)):o&&(m.shapeFlag|=Fe(o)?8:16),Js>0&&!a&&ft&&(m.patchFlag>0||i&6)&&m.patchFlag!==32&&ft.push(m),m}var De=du;function du(e,t=null,o=null,r=0,n=null,i=!1){if((!e||e===Md)&&(e=Ft),Rn(e)){let u=bs(e,t,!0);return o&&Tn(u,o),Js>0&&!i&&ft&&(u.shapeFlag&6?ft[ft.indexOf(e)]=u:ft.push(u)),u.patchFlag=-2,u}if(wu(e)&&(e=e.__vccOpts),t){t=uu(t);let{class:u,style:m}=t;u&&!Fe(u)&&(t.class=O(u)),Ve(m)&&(zs(m)&&!Ee(m)&&(m=Ge({},m)),t.style=Pe(m))}let a=Fe(e)?1:Ei(e)?128:An(e)?64:Ve(e)?4:_e(e)?2:0;return s(e,t,o,r,n,a,i,!0)}function uu(e){return e?zs(e)||fi(e)?Ge({},e):e:null}function bs(e,t,o=!1,r=!1){let{props:n,ref:i,patchFlag:a,children:u,transition:m}=e,h=t?cu(n||{},t):n,v={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&Si(h),ref:t&&t.ref?o&&i?Ee(i)?i.concat(_n(t)):[i,_n(t)]:_n(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==J?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:m,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&bs(e.ssContent),ssFallback:e.ssFallback&&bs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return m&&r&&In(v,m.clone(v)),v}function y(e=" ",t=0){return De(Mn,null,e,t)}function ge(e,t){let o=De(Ks,null,e);return o.staticCount=t,o}function f(e="",t=!1){return t?(l(),ks(Ft,null,e)):De(Ft,null,e)}function At(e){return e==null||typeof e=="boolean"?De(Ft):Ee(e)?De(J,null,e.slice()):Rn(e)?Lt(e):De(Mn,null,String(e))}function Lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:bs(e)}function Tn(e,t){let o=0,{shapeFlag:r}=e;if(t==null)t=null;else if(Ee(t))o=16;else if(typeof t=="object")if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Tn(e,n()),n._c&&(n._d=!0));return}else{o=32;let n=t._;!n&&!fi(t)?t._ctx=pt:n===3&&pt&&(pt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(_e(t)){if(r&65){Tn(e,{default:t});return}t={default:t,_ctx:pt},o=32}else t=String(t),r&64?(o=16,t=[y(t)]):o=8;e.children=t,e.shapeFlag|=o}function cu(...e){let t={};for(let o=0;oxe||pt,On,Qs;{let e=Os(),t=(o,r)=>{let n;return(n=e[o])||(n=e[o]=[]),n.push(r),i=>{n.length>1?n.forEach(a=>a(i)):n[0](i)}};On=t("__VUE_INSTANCE_SETTERS__",o=>xe=o),Qs=t("__VUE_SSR_SETTERS__",o=>ws=o)}var tn=e=>{let t=xe;return On(e),e.scope.on(),()=>{e.scope.off(),On(t)}},Fr=()=>{xe&&xe.scope.off(),On(null)};function Di(e){return e.vnode.shapeFlag&4}var ws=!1;function hu(e,t=!1,o=!1){t&&Qs(t);let{props:r,children:n}=e.vnode,i=Di(e);Zd(e,r,i,t),su(e,n,o||t);let a=i?vu(e,t):void 0;return t&&Qs(!1),a}function vu(e,t){let o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,$d);let{setup:r}=o;if(r){Dt();let n=e.setupContext=r.length>1?gu(e):null,i=tn(e),a=Xs(r,e,0,[e.props,n]),u=Zn(a);if(Rt(),i(),(u||e.sp)&&!js(e)&&Ro(e),u){if(a.then(Fr,Fr),t)return a.then(m=>{Qs(!0);try{zr(e,m,t)}finally{Qs(!1)}}).catch(m=>{Zs(m,e,0)});e.asyncDep=a}else zr(e,a,t)}else Ri(e,t)}function zr(e,t,o){_e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ve(t)&&(e.setupState=wn(t)),Ri(e,o)}var Hr,Br;function Ri(e,t,o){let r=e.type;if(!e.render){if(!t&&Hr&&!r.render){let n=r.template||To(e).template;if(n){let{isCustomElement:i,compilerOptions:a}=e.appContext.config,{delimiters:u,compilerOptions:m}=r,h=Ge(Ge({isCustomElement:i,delimiters:u},a),m);r.render=Hr(n,h)}}e.render=r.render||rt,Br&&Br(e)}{let n=tn(e);Dt();try{Ud(e)}finally{Rt(),n()}}}var yu={get(e,t){return Xe(e,"get",""),e[t]}};function gu(e){let t=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,yu),slots:e.slots,emit:e.emit,expose:t}}function $n(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(wn(go(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in Ws)return Ws[o](e)},has(t,o){return o in t||o in Ws}})):e.proxy}function bu(e,t=!0){return _e(e)?e.displayName||e.name:e.name||t&&e.__name}function wu(e){return _e(e)&&"__vccOpts"in e}var tt=(e,t)=>Nr(e,t,ws);function Ne(e,t,o){try{Dn(-1);let r=arguments.length;return r===2?Ve(t)&&!Ee(t)?Rn(t)?De(e,null,[t]):De(e,t):De(e,null,t):(r>3?o=Array.prototype.slice.call(arguments,2):r===3&&Rn(o)&&(o=[o]),De(e,t,o))}finally{Dn(1)}}var ku="3.5.42";var qo,Ti=typeof window<"u"&&window.trustedTypes;if(Ti)try{qo=Ti.createPolicy("vue",{createHTML:e=>e})}catch{}var Ui=qo?e=>qo.createHTML(e):e=>e,_u="http://www.w3.org/2000/svg",Eu="http://www.w3.org/1998/Math/MathML",Ht=typeof document<"u"?document:null,Oi=Ht&&Ht.createElement("template"),Cu={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,r)=>{let n=t==="svg"?Ht.createElementNS(_u,e):t==="mathml"?Ht.createElementNS(Eu,e):o?Ht.createElement(e,{is:o}):Ht.createElement(e);return e==="select"&&r&&r.multiple!=null&&n.setAttribute("multiple",r.multiple),n},createText:e=>Ht.createTextNode(e),createComment:e=>Ht.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ht.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,r,n,i){let a=o?o.previousSibling:t.lastChild;if(n&&(n===i||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),o),!(n===i||!(n=n.nextSibling)););else{Oi.innerHTML=Ui(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);let u=Oi.content;if(r==="svg"||r==="mathml"){let m=u.firstChild;for(;m.firstChild;)u.appendChild(m.firstChild);u.removeChild(m)}t.insertBefore(u,o)}return[a?a.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}};var Nu=Symbol("_vtc");function Su(e,t,o){let r=e[Nu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}var Ln=Symbol("_vod"),Li=Symbol("_vsh"),B={name:"show",beforeMount(e,{value:t},{transition:o}){e[Ln]=e.style.display==="none"?"":e.style.display,o&&t?o.beforeEnter(e):sn(e,t)},mounted(e,{value:t},{transition:o}){o&&t&&o.enter(e)},updated(e,{value:t,oldValue:o},{transition:r}){!t!=!o&&(r?t?(r.beforeEnter(e),sn(e,!0),r.enter(e)):r.leave(e,()=>{sn(e,!1)}):sn(e,t))},beforeUnmount(e,{value:t}){sn(e,t)}};function sn(e,t){e.style.display=t?e[Ln]:"none",e[Li]=!t}var Du=Symbol("");var Ru=/(?:^|;)\s*display\s*:/;function Tu(e,t,o){let r=e.style,n=Fe(o),i=!1;if(o&&!n){if(t)if(Fe(t))for(let a of t.split(";")){let u=a.slice(0,a.indexOf(":")).trim();o[u]==null&&nn(r,u,"")}else for(let a in t)o[a]==null&&nn(r,a,"");for(let a in o){a==="display"&&(i=!0);let u=o[a];u!=null?Au(e,a,!Fe(t)&&t?t[a]:void 0,u)||nn(r,a,u):nn(r,a,"")}}else if(n){if(t!==o){let a=r[Du];a&&(o+=";"+a),r.cssText=o,i=Ru.test(o)}}else t&&e.removeAttribute("style");Ln in e&&(e[Ln]=i?r.display:"",e[Li]&&(r.display="none"))}var Un=/\s*!important$/;function nn(e,t,o){if(Ee(o))o.forEach(r=>nn(e,t,r));else if(o==null&&(o=""),t.startsWith("--"))Un.test(o)?e.setProperty(t,o.replace(Un,""),"important"):e.setProperty(t,o);else{let r=Ou(e,t);Un.test(o)?e.setProperty(qt(r),o.replace(Un,""),"important"):e[r]=o}}var Ai=["Webkit","Moz","ms"],Vo={};function Ou(e,t){let o=Vo[t];if(o)return o;let r=Ke(t);if(r!=="filter"&&r in e)return Vo[t]=r;r=Yt(r);for(let n=0;nPo||(Uu.then(()=>Po=0),Po=Date.now());function Fu(e,t){let o=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=o.attached)return;let n=o.value;if(Ee(n)){let i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};let a=n.slice(),u=[r];for(let m=0;me.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,zu=(e,t,o,r,n,i)=>{let a=n==="svg";t==="class"?Su(e,r,a):t==="style"?Tu(e,o,r):us(t)?cs(t)||Pu(e,t,o,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Hu(e,t,r,a))?(Pi(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Vi(e,t,r,a,i,t!=="value")):e._isVueCE&&(Bu(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Fe(r)))?Pi(e,Ke(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Vi(e,t,r,a))};function Hu(e,t,o,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Mi(t)&&_e(o));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let n=e.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return Mi(t)&&Fe(o)?!1:t in e}function Bu(e,t){let o=e._def.props;if(!o)return!1;let r=Ke(t);return Array.isArray(o)?o.some(n=>Ke(n)===r):Object.keys(o).some(n=>Ke(n)===r)}var Gu=["ctrl","shift","alt","meta"],ju={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Gu.some(o=>e[`${o}Key`]&&!t.includes(o))},we=(e,t)=>{if(!e)return e;let o=e._withMods||(e._withMods={}),r=t.join(".");return o[r]||(o[r]=((n,...i)=>{for(let a=0;a{let t=Ku().createApp(...e),{mount:o}=t;return t.mount=r=>{let n=Ju(r);if(!n)return;let i=t._component;!_e(i)&&!i.render&&!i.template&&(i.template=n.innerHTML),n.nodeType===1&&(n.textContent="");let a=o(n,!1,Yu(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},t});function Yu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ju(e){return Fe(e)?document.querySelector(e):e}var rs=typeof document<"u";function Hi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Qu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Hi(e.default)}var qe=Object.assign;function Fn(e,t){let o={};for(let r in t){let n=t[r];o[r]=gt(n)?n.map(e):e(n)}return o}var Es=()=>{},gt=Array.isArray;function Uo(e,t){let o={};for(let r in e)o[r]=r in t?t[r]:e[r];return o}var Bi=/#/g,Xu=/&/g,Zu=/\//g,xu=/=/g,ec=/\?/g,Gi=/\+/g,tc=/%5B/g,sc=/%5D/g,ji=/%5E/g,nc=/%60/g,Wi=/%7B/g,oc=/%7C/g,Ki=/%7D/g,rc=/%20/g;function Lo(e){return e==null?"":encodeURI(""+e).replace(oc,"|").replace(tc,"[").replace(sc,"]")}function Yi(e){return Lo(e).replace(Wi,"{").replace(Ki,"}").replace(ji,"^")}function Mo(e){return Lo(e).replace(Gi,"%2B").replace(rc,"+").replace(Bi,"%23").replace(Xu,"%26").replace(nc,"`").replace(Wi,"{").replace(Ki,"}").replace(ji,"^")}function ic(e){return Mo(e).replace(xu,"%3D")}function ac(e){return Lo(e).replace(Bi,"%23").replace(ec,"%3F")}function Ji(e){return ac(e).replace(Zu,"%2F")}function _s(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var lc=/\/$/,dc=e=>e.replace(lc,"");function zn(e,t,o="/"){let r,n={},i="",a="",u=t.indexOf("#"),m=t.indexOf("?");return m=u>=0&&m>u?-1:m,m>=0&&(r=t.slice(0,m),i=t.slice(m,u>0?u:t.length),n=e(i.slice(1))),u>=0&&(r=r||t.slice(0,u),a=t.slice(u,t.length)),r=cc(r??t,o),{fullPath:r+i+a,path:r,query:n,hash:_s(a)}}function Qi(e,t){let o=t.query?e(t.query):"";return t.path+(o&&"?")+o+(t.hash||"")}function Fo(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Xi(e,t,o){let r=t.matched.length-1,n=o.matched.length-1;return r>-1&&r===n&&ns(t.matched[r],o.matched[n])&&zo(t.params,o.params)&&e(t.query)===e(o.query)&&t.hash===o.hash}function ns(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function zo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var o in e)if(!uc(e[o],t[o]))return!1;return!0}function uc(e,t){return gt(e)?zi(e,t):gt(t)?zi(t,e):e?.valueOf()===t?.valueOf()}function zi(e,t){return gt(t)?e.length===t.length&&e.every((o,r)=>o===t[r]):e.length===1&&e[0]===t}function cc(e,t){if(e.startsWith("/"))return e;if(!e)return t;let o=t.split("/"),r=e.split("/"),n=r[r.length-1];(n===".."||n===".")&&r.push("");let i=o.length-1,a,u;for(a=0;a1&&i--;else break;return o.slice(0,i).join("/")+"/"+r.slice(a).join("/")}var Gt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Hn=(function(e){return e.pop="pop",e.push="push",e})({}),Bn=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Zi(e){if(!e)if(rs){let t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),dc(e)}var pc=/^[^#]+#/;function xi(e,t){return e.replace(pc,"#")+t}function fc(e,t){let o=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-o.left-(t.left||0),top:r.top-o.top-(t.top||0)}}var on=()=>({left:window.scrollX,top:window.scrollY});function ea(e){let t;if("el"in e){let o=e.el,r=typeof o=="string"&&o.startsWith("#"),n=typeof o=="string"?r?document.getElementById(o.slice(1)):document.querySelector(o):o;if(!n)return;t=fc(n,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Ho(e,t){return(history.state?history.state.position-t:-1)+e}var $o=new Map;function ta(e,t){$o.set(e,t)}function sa(e){let t=$o.get(e);return $o.delete(e),t}function mc(e){return typeof e=="string"||e&&typeof e=="object"}function Bo(e){return typeof e=="string"||typeof e=="symbol"}var Be=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({}),na=Symbol("");var c5={[Be.MATCHER_NOT_FOUND]({location:e,currentLocation:t}){return`No match for +"use strict";(()=>{var zl=Object.defineProperty;var Hl=(e,t)=>{for(var o in t)zl(e,o,{get:t[o],enumerable:!0})};var ye={notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",markdown:"/script/markdown.44f2e93820.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};var rn=new Map,Gl=ye;function Wt(e){if(!rn.has(e)){let t=document.createElement("script");t.src=Gl[e];let o=new Promise((r,n)=>{t.onload=r,t.onerror=()=>{rn.delete(e),t.remove(),n(new Error(`Unable to load ${e}. Please retry.`))}});rn.set(e,o),document.head.appendChild(t)}return rn.get(e)}async function tr(){await Wt("editor"),ace.config.set("basePath","/script/external/ace/")}function ds(e){let t=Object.create(null);for(let o of e.split(","))t[o]=1;return o=>o in t}var Me={},Kt=[],rt=()=>{},Xn=()=>!1,us=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cs=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Ss=(e,t)=>{let o=e.indexOf(t);o>-1&&e.splice(o,1)},jl=Object.prototype.hasOwnProperty,Ae=(e,t)=>jl.call(e,t),Ee=Array.isArray,Pt=e=>Ds(e)==="[object Map]",ls=e=>Ds(e)==="[object Set]",sr=e=>Ds(e)==="[object Date]";var _e=e=>typeof e=="function",Fe=e=>typeof e=="string",ct=e=>typeof e=="symbol",Ve=e=>e!==null&&typeof e=="object",Zn=e=>(Ve(e)||_e(e))&&_e(e.then)&&_e(e.catch),rr=Object.prototype.toString,Ds=e=>rr.call(e),xn=e=>Ds(e).slice(8,-1),an=e=>Ds(e)==="[object Object]",ln=e=>Fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ps=ds(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var dn=e=>{let t=Object.create(null);return(o=>t[o]||(t[o]=e(o)))},Wl=/-\w/g,Ke=dn(e=>e.replace(Wl,t=>t.slice(1).toUpperCase())),Kl=/\B([A-Z])/g,qt=dn(e=>e.replace(Kl,"-$1").toLowerCase()),Yt=dn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=dn(e=>e?`on${Yt(e)}`:""),ht=(e,t)=>!Object.is(e,t),Ts=(e,...t)=>{for(let o=0;o{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:o})},eo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var nr,Os=()=>nr||(nr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pe(e){if(Ee(e)){let t={};for(let o=0;o{if(o){let r=o.split(Jl);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function O(e){let t="";if(Fe(e))t=e;else if(Ee(e))for(let o=0;o!!(e&&e.__v_isRef===!0),c=e=>Fe(e)?e:e==null?"":Ee(e)||Ve(e)&&(e.toString===rr||!_e(e.toString))?lr(e)?c(e.value):JSON.stringify(e,dr,2):String(e),dr=(e,t)=>lr(t)?dr(e,t.value):Pt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,n],i)=>(o[Qn(r,i)+" =>"]=n,o),{})}:ls(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>Qn(o))}:ct(t)?Qn(t):Ve(t)&&!Ee(t)&&!an(t)?String(t):t,Qn=(e,t="")=>{var o;return ct(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};function ed(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var Ye,Ps=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ye&&(Ye.active?(this.parent=Ye,this.index=(Ye.scopes||(Ye.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes){let r=this.scopes.slice();for(t=0,o=r.length;t0&&--this._on===0){if(Ye===this)Ye=this.prevScope;else{let t=Ye;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let o,r;for(o=0,r=this.effects.length;o0)return;if(Vs){let t=Vs;for(Vs=void 0;t;){let o=t.next;t.next=void 0,t.flags&=-9,t=o}}let e;for(;Is;){let t=Is;for(Is=void 0;t;){let o=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=o}}if(e)throw e}function hr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function vr(e){let t,o=e.depsTail,r=o;for(;r;){let n=r.prevDep;r.version===-1?(r===o&&(o=n),ho(r),td(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=n}e.deps=t,e.depsTail=o}function oo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(yr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function yr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qs)||(e.globalVersion=qs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!oo(e))))return;e.flags|=2;let t=e.dep,o=Le,r=wt;Le=e,wt=!0;try{hr(e);let n=e.fn(e._value);(t.version===0||ht(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(n){throw t.version++,n}finally{Le=o,wt=r,vr(e),e.flags&=-3}}function ho(e,t=!1){let{dep:o,prevSub:r,nextSub:n}=e;if(r&&(r.nextSub=n,e.prevSub=void 0),n&&(n.prevSub=r,e.nextSub=void 0),o.subs===e&&(o.subs=r,!r&&o.computed)){o.computed.flags&=-5;for(let i=o.computed.deps;i;i=i.nextDep)ho(i,!0)}!t&&!--o.sc&&o.map&&o.map.delete(o.key)}function td(e){let{prevDep:t,nextDep:o}=e;t&&(t.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=t,e.nextDep=void 0)}var wt=!0,gr=[];function Dt(){gr.push(wt),wt=!1}function Rt(){let e=gr.pop();wt=e===void 0?!0:e}function ur(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let o=Le;Le=void 0;try{t()}finally{Le=o}}}var qs=0,ro=class{constructor(t,o){this.sub=t,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Ms=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Le||!wt||Le===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==Le)o=this.activeLink=new ro(Le,this),Le.deps?(o.prevDep=Le.depsTail,Le.depsTail.nextDep=o,Le.depsTail=o):Le.deps=Le.depsTail=o,br(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){let r=o.nextDep;r.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=r),o.prevDep=Le.depsTail,o.nextDep=void 0,Le.depsTail.nextDep=o,Le.depsTail=o,Le.deps===o&&(Le.deps=r)}return o}trigger(t){this.version++,qs++,this.notify(t)}notify(t){fo();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{mo()}}};function br(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)br(r)}let o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}var io=new WeakMap,Qt=Symbol(""),ao=Symbol(""),$s=Symbol("");function Xe(e,t,o){if(wt&&Le){let r=io.get(e);r||io.set(e,r=new Map);let n=r.get(o);n||(r.set(o,n=new Ms),n.map=r,n.key=o),n.track()}}function Nt(e,t,o,r,n,i){let a=io.get(e);if(!a){qs++;return}let u=m=>{m&&m.trigger()};if(fo(),t==="clear")a.forEach(u);else{let m=Ee(e),h=m&&ln(o);if(m&&o==="length"){let v=Number(r);a.forEach((k,p)=>{(p==="length"||p===$s||!ct(p)&&p>=v)&&u(k)})}else switch((o!==void 0||a.has(void 0))&&u(a.get(o)),h&&u(a.get($s)),t){case"add":m?h&&u(a.get("length")):(u(a.get(Qt)),Pt(e)&&u(a.get(ao)));break;case"delete":m||(u(a.get(Qt)),Pt(e)&&u(a.get(ao)));break;case"set":Pt(e)&&u(a.get(Qt));break}}mo()}function ms(e){let t=Ie(e);return t===e?t:(Xe(t,"iterate",$s),it(e)?t:t.map(vt))}function Ls(e){return Xe(e=Ie(e),"iterate",$s),e}function Ct(e,t){return kt(e)?Xt($t(e)?vt(t):t):vt(t)}var sd={__proto__:null,[Symbol.iterator](){return so(this,Symbol.iterator,e=>Ct(this,e))},concat(...e){return ms(this).concat(...e.map(t=>Ee(t)?ms(t):t))},entries(){return so(this,"entries",e=>(e[1]=Ct(this,e[1]),e))},every(e,t){return Mt(this,"every",e,t,void 0,arguments)},filter(e,t){return Mt(this,"filter",e,t,o=>o.map(r=>Ct(this,r)),arguments)},find(e,t){return Mt(this,"find",e,t,o=>Ct(this,o),arguments)},findIndex(e,t){return Mt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Mt(this,"findLast",e,t,o=>Ct(this,o),arguments)},findLastIndex(e,t){return Mt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Mt(this,"forEach",e,t,void 0,arguments)},includes(...e){return no(this,"includes",e)},indexOf(...e){return no(this,"indexOf",e)},join(e){return ms(this).join(e)},lastIndexOf(...e){return no(this,"lastIndexOf",e)},map(e,t){return Mt(this,"map",e,t,void 0,arguments)},pop(){return As(this,"pop")},push(...e){return As(this,"push",e)},reduce(e,...t){return cr(this,"reduce",e,t)},reduceRight(e,...t){return cr(this,"reduceRight",e,t)},shift(){return As(this,"shift")},some(e,t){return Mt(this,"some",e,t,void 0,arguments)},splice(...e){return As(this,"splice",e)},toReversed(){return ms(this).toReversed()},toSorted(e){return ms(this).toSorted(e)},toSpliced(...e){return ms(this).toSpliced(...e)},unshift(...e){return As(this,"unshift",e)},values(){return so(this,"values",e=>Ct(this,e))}};function so(e,t,o){let r=Ls(e),n=r[t]();return r!==e&&!it(e)&&(n._next=n.next,n.next=()=>{let i=n._next();return i.done||(i.value=o(i.value)),i}),n}var nd=Array.prototype;function Mt(e,t,o,r,n,i){let a=Ls(e),u=a!==e&&!it(e),m=a[t];if(m!==nd[t]){let k=m.apply(e,i);return u?vt(k):k}let h=o;a!==e&&(u?h=function(k,p){return o.call(this,Ct(e,k),p,e)}:o.length>2&&(h=function(k,p){return o.call(this,k,p,e)}));let v=m.call(a,h,r);return u&&n?n(v):v}function cr(e,t,o,r){let n=Ls(e),i=n!==e&&!it(e),a=o,u=!1;n!==e&&(i?(u=r.length===0,a=function(h,v,k){return u&&(u=!1,h=Ct(e,h)),o.call(this,h,Ct(e,v),k,e)}):o.length>3&&(a=function(h,v,k){return o.call(this,h,v,k,e)}));let m=n[t](a,...r);return u?Ct(e,m):m}function no(e,t,o){let r=Ie(e);Xe(r,"iterate",$s);let n=r[t](...o);return(n===-1||n===!1)&&zs(o[0])?(o[0]=Ie(o[0]),r[t](...o)):n}function As(e,t,o=[]){Dt(),fo();let r=Ie(e)[t].apply(e,o);return mo(),Rt(),r}var od=ds("__proto__,__v_isRef,__isVue"),wr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ct));function rd(e){ct(e)||(e=String(e));let t=Ie(this);return Xe(t,"has",e),t.hasOwnProperty(e)}var hn=class{constructor(t=!1,o=!1){this._isReadonly=t,this._isShallow=o}get(t,o,r){if(o==="__v_skip")return t.__v_skip;let n=this._isReadonly,i=this._isShallow;if(o==="__v_isReactive")return!n;if(o==="__v_isReadonly")return n;if(o==="__v_isShallow")return i;if(o==="__v_raw")return r===(n?i?md:Er:i?_r:kr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;let a=Ee(t);if(!n){let m;if(a&&(m=sd[o]))return m;if(o==="hasOwnProperty")return rd}let u=Reflect.get(t,o,Qe(t)?t:r);if((ct(o)?wr.has(o):od(o))||(n||Xe(t,"get",o),i))return u;if(Qe(u)){let m=a&&ln(o)?u:u.value;return n&&Ve(m)?yn(m):m}return Ve(u)?n?yn(u):ze(u):u}},vn=class extends hn{constructor(t=!1){super(!1,t)}set(t,o,r,n){let i=t[o],a=Ee(t)&&ln(o);if(!this._isShallow){let h=kt(i);if(!it(r)&&!kt(r)&&(i=Ie(i),r=Ie(r)),!a&&Qe(i)&&!Qe(r))return h||(i.value=r),!0}let u=a?Number(o)e,pn=e=>Reflect.getPrototypeOf(e);function dd(e,t,o){return function(...r){let n=this.__v_raw,i=Ie(n),a=Pt(i),u=e==="entries"||e===Symbol.iterator&&a,m=e==="keys"&&a,h=n[e](...r),v=o?uo:t?Xt:vt;return!t&&Xe(i,"iterate",m?ao:Qt),Ge(Object.create(h),{next(){let{value:k,done:p}=h.next();return p?{value:k,done:p}:{value:u?[v(k[0]),v(k[1])]:v(k),done:p}}})}}function fn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ud(e,t){let o={get(n){let i=this.__v_raw,a=Ie(i),u=Ie(n);e||(ht(n,u)&&Xe(a,"get",n),Xe(a,"get",u));let{has:m}=pn(a),h=t?uo:e?Xt:vt;if(m.call(a,n))return h(i.get(n));if(m.call(a,u))return h(i.get(u));i!==a&&i.get(n)},get size(){let n=this.__v_raw;return!e&&Xe(Ie(n),"iterate",Qt),n.size},has(n){let i=this.__v_raw,a=Ie(i),u=Ie(n);return e||(ht(n,u)&&Xe(a,"has",n),Xe(a,"has",u)),n===u?i.has(n):i.has(n)||i.has(u)},forEach(n,i){let a=this,u=a.__v_raw,m=Ie(u),h=t?uo:e?Xt:vt;return!e&&Xe(m,"iterate",Qt),u.forEach((v,k)=>n.call(i,h(v),h(k),a))}};return Ge(o,e?{add:fn("add"),set:fn("set"),delete:fn("delete"),clear:fn("clear")}:{add(n){let i=Ie(this),a=pn(i),u=Ie(n),m=!t&&!it(n)&&!kt(n)?u:n;return a.has.call(i,m)||ht(n,m)&&a.has.call(i,n)||ht(u,m)&&a.has.call(i,u)||(i.add(m),Nt(i,"add",m,m)),this},set(n,i){!t&&!it(i)&&!kt(i)&&(i=Ie(i));let a=Ie(this),{has:u,get:m}=pn(a),h=u.call(a,n);h||(n=Ie(n),h=u.call(a,n));let v=m.call(a,n);return a.set(n,i),h?ht(i,v)&&Nt(a,"set",n,i,v):Nt(a,"add",n,i),this},delete(n){let i=Ie(this),{has:a,get:u}=pn(i),m=a.call(i,n);m||(n=Ie(n),m=a.call(i,n));let h=u?u.call(i,n):void 0,v=i.delete(n);return m&&Nt(i,"delete",n,void 0,h),v},clear(){let n=Ie(this),i=n.size!==0,a=void 0,u=n.clear();return i&&Nt(n,"clear",void 0,void 0,a),u}}),["keys","values","entries",Symbol.iterator].forEach(n=>{o[n]=dd(n,e,t)}),o}function vo(e,t){let o=ud(e,t);return(r,n,i)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?r:Reflect.get(Ae(o,n)&&n in r?o:r,n,i)}var cd={get:vo(!1,!1)},pd={get:vo(!1,!0)},fd={get:vo(!0,!1)};var kr=new WeakMap,_r=new WeakMap,Er=new WeakMap,md=new WeakMap;function hd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ze(e){return kt(e)?e:yo(e,!1,id,cd,kr)}function Fs(e){return yo(e,!1,ld,pd,_r)}function yn(e){return yo(e,!0,ad,fd,Er)}function yo(e,t,o,r,n){if(!Ve(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let i=n.get(e);if(i)return i;let a=hd(xn(e));if(a===0)return e;let u=new Proxy(e,a===2?r:o);return n.set(e,u),u}function $t(e){return kt(e)?$t(e.__v_raw):!!(e&&e.__v_isReactive)}function kt(e){return!!(e&&e.__v_isReadonly)}function it(e){return!!(e&&e.__v_isShallow)}function zs(e){return e?!!e.__v_raw:!1}function Ie(e){let t=e&&e.__v_raw;return t?Ie(t):e}function go(e){return!Ae(e,"__v_skip")&&Object.isExtensible(e)&&un(e,"__v_skip",!0),e}var vt=e=>Ve(e)?ze(e):e,Xt=e=>Ve(e)?yn(e):e;function Qe(e){return e?e.__v_isRef===!0:!1}function Ze(e){return Cr(e,!1)}function bn(e){return Cr(e,!0)}function Cr(e,t){return Qe(e)?e:new co(e,t)}var co=class{constructor(t,o){this.dep=new Ms,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?t:Ie(t),this._value=o?t:vt(t),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(t){let o=this._rawValue,r=this.__v_isShallow||it(t)||kt(t);t=r?t:Ie(t),ht(t,o)&&(this._rawValue=t,this._value=r?t:vt(t),this.dep.trigger())}};function Ut(e){return Qe(e)?e.value:e}var vd={get:(e,t,o)=>t==="__v_raw"?e:Ut(Reflect.get(e,t,o)),set:(e,t,o,r)=>{let n=e[t];return Qe(n)&&!Qe(o)?(n.value=o,!0):Reflect.set(e,t,o,r)}};function wn(e){return $t(e)?e:new Proxy(e,vd)}var po=class{constructor(t,o,r){this.fn=t,this.setter=o,this._value=void 0,this.dep=new Ms(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Le!==this)return mr(this,!0),!0}get value(){let t=this.dep.track();return yr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};function Nr(e,t,o=!1){let r,n;return _e(e)?r=e:(r=e.get,n=e.set),new po(r,n,o)}var mn={},gn=new WeakMap,Jt;function Sr(e,t=!1,o=Jt){if(o){let r=gn.get(o);r||gn.set(o,r=[]),r.push(e)}}function Dr(e,t,o=Me){let{immediate:r,deep:n,once:i,scheduler:a,augmentJob:u,call:m}=o,h=A=>{(o.onWarn||ed)("Invalid watch source: ",A,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},v=A=>n?A:it(A)||n===!1||n===0?St(A,1):St(A),k,p,g,w,b=!1,T=!1;if(Qe(e)?(p=()=>e.value,b=it(e)):$t(e)?(p=()=>v(e),b=!0):Ee(e)?(T=!0,b=e.some(A=>$t(A)||it(A)),p=()=>e.map(A=>{if(Qe(A))return A.value;if($t(A))return v(A);if(_e(A))return m?m(A,2):A()})):_e(e)?t?p=m?()=>m(e,2):e:p=()=>{if(g){Dt();try{g()}finally{Rt()}}let A=Jt;Jt=k;try{return m?m(e,3,[w]):e(w)}finally{Jt=A}}:p=rt,t&&n){let A=p,P=n===!0?1/0:n;p=()=>St(A(),P)}let N=pr(),R=()=>{k.stop(),N&&N.active&&Ss(N.effects,k)};if(i&&t){let A=t;t=(...P)=>{let Z=A(...P);return R(),Z}}let I=T?new Array(e.length).fill(mn):mn,C=A=>{if(!(!(k.flags&1)||!k.dirty&&!A))if(t){let P=k.run();if(A||n||b||(T?P.some((Z,Y)=>ht(Z,I[Y])):ht(P,I))){g&&g();let Z=Jt;Jt=k;try{let Y=[P,I===mn?void 0:T&&I[0]===mn?[]:I,w];I=P,m?m(t,3,Y):t(...Y)}finally{Jt=Z}}}else k.run()};return u&&u(C),k=new hs(p),k.scheduler=a?()=>a(C,!1):C,w=A=>Sr(A,!1,k),g=k.onStop=()=>{let A=gn.get(k);if(A){if(m)m(A,4);else for(let P of A)P();gn.delete(k)}},t?r?C(!0):I=k.run():a?a(C.bind(null,!0),!0):k.run(),R.pause=k.pause.bind(k),R.resume=k.resume.bind(k),R.stop=R,R}function St(e,t=1/0,o){if(t<=0||!Ve(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=t))return e;if(o.set(e,t),t--,Qe(e))St(e.value,t,o);else if(Ee(e))for(let r=0;r{St(r,t,o)});else if(an(e)){for(let r in e)St(e[r],t,o);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&St(e[r],t,o)}return e}function Xs(e,t,o,r){try{return r?e(...r):e()}catch(n){Zs(n,t,o)}}function yt(e,t,o,r){if(_e(e)){let n=Xs(e,t,o,r);return n&&Zn(n)&&n.catch(i=>{Zs(i,t,o)}),n}if(Ee(e)){let n=[];for(let i=0;i>>1,n=nt[r],i=Ys(n);i=Ys(o)?nt.push(e):nt.splice(kd(t),0,e),e.flags|=1,jr()}}function jr(){En||(En=Gr.then(Yr))}function Wr(e){if(!Ee(e))jt&&e.id===-1?jt.splice(vs+1,0,e):e.flags&1||(ys.push(e),e.flags|=1);else for(let t=0;tYs(o)-Ys(r));if(ys.length=0,jt){for(let o=0;oe.id==null?e.flags&2?-1:1/0:e.id;function Yr(e){let t=rt;try{for(Ot=0;Ot{r._d&&Dn(-1);let i=Cn(t),a=es.length,u;try{u=e(...n)}finally{for(let m=es.length;m>a;m--)Ci();Cn(i),r._d&&Dn(1)}return u};return r._n=!0,r._c=!0,r._d=!0,r}function E(e,t){if(pt===null)return e;let o=$n(pt),r=e.dirs||(e.dirs=[]);for(let n=0;n1)return o&&_e(t)?t.call(r&&r.proxy):t}}var Ed=Symbol.for("v-scx"),Cd=()=>{{let e=lt(Ed);return e}};function He(e,t,o){return Qr(e,t,o)}function Qr(e,t,o=Me){let{immediate:r,deep:n,flush:i,once:a}=o,u=Ge({},o),m=t&&r||!t&&i!=="post",h;if(ws){if(i==="sync"){let g=Cd();h=g.__watcherHandles||(g.__watcherHandles=[])}else if(!m){let g=()=>{};return g.stop=rt,g.resume=rt,g.pause=rt,g}}let v=xe;u.call=(g,w,b)=>yt(g,v,w,b);let k=!1;i==="post"?u.scheduler=g=>{at(g,v&&v.suspense)}:i!=="sync"&&(k=!0,u.scheduler=(g,w)=>{w?g():Do(g)}),u.augmentJob=g=>{t&&(g.flags|=4),k&&(g.flags|=2,v&&(g.id=v.uid,g.i=v))};let p=Dr(e,t,u);return ws&&(h?h.push(p):m&&p()),p}function Nd(e,t,o){let r=this.proxy,n=Fe(e)?e.includes(".")?Xr(r,e):()=>r[e]:e.bind(r,r),i;_e(t)?i=t:(i=t.handler,o=t);let a=tn(this),u=Qr(n,i.bind(r),o);return a(),u}function Xr(e,t){let o=t.split(".");return()=>{let r=e;for(let n=0;ne.__isTeleport;var bo=Symbol("_leaveCb");function Dd(e){let t=e[0];if(e.length>1){let o=!1;for(let r of e)if(r.type!==Ft){t=r,o=!0;break}}return t}function Zr(e){if(!Vn(e))return An(e.type)&&e.children?Dd(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:o}=e;if(o){if(t&16)return o[0];if(t&32&&_e(o.default))return o.default()}}function In(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let o=e.component.subTree;In(An(o.type)&&Zr(o)||o,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function xs(e,t){return _e(e)?Ge({name:e.name},t,{setup:e}):e}function Ro(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Tr(e,t){let o;return!!((o=Object.getOwnPropertyDescriptor(e,t))&&!o.configurable)}var Nn=new WeakMap;function Gs(e,t,o,r,n=!1){if(Ee(e)){e.forEach((b,T)=>Gs(b,t&&(Ee(t)?t[T]:t),o,r,n));return}if(js(r)&&!n){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Gs(e,t,o,r.component.subTree);return}let i=r.shapeFlag&4?$n(r.component):r.el,a=n?null:i,{i:u,r:m}=e,h=t&&t.r,v=u.refs===Me?u.refs={}:u.refs,k=u.setupState,p=Ie(k),g=k===Me?Xn:b=>Tr(v,b)?!1:Ae(p,b),w=(b,T)=>!(T&&Tr(v,T));if(h!=null&&h!==m){if(Or(t),Fe(h))v[h]=null,g(h)&&(k[h]=null);else if(Qe(h)){let b=t;w(h,b.k)&&(h.value=null),b.k&&(v[b.k]=null)}}if(_e(m))Xs(m,u,12,[a,v]);else{let b=Fe(m),T=Qe(m);if(b||T){let N=()=>{if(e.f){let R=b?g(m)?k[m]:v[m]:w(m)||!e.k?m.value:v[e.k];if(n)Ee(R)&&Ss(R,i);else if(Ee(R))R.includes(i)||R.push(i);else if(b)v[m]=[i],g(m)&&(k[m]=v[m]);else{let I=[i];w(m,e.k)&&(m.value=I),e.k&&(v[e.k]=I)}}else b?(v[m]=a,g(m)&&(k[m]=a)):T&&(w(m,e.k)&&(m.value=a),e.k&&(v[e.k]=a))};if(a){let R=()=>{N(),Nn.delete(e)};R.id=-1,Nn.set(e,R),at(R,o)}else Or(e),N()}}}function Or(e){let t=Nn.get(e);t&&(t.flags|=8,Nn.delete(e))}var Ar=e=>e.nodeType===8;var q4=Os().requestIdleCallback||(e=>setTimeout(e,1)),M4=Os().cancelIdleCallback||(e=>clearTimeout(e));function Rd(e,t){if(Ar(e)&&e.data==="["){let o=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Ar(r))if(r.data==="]"){if(--o===0)break}else r.data==="["&&o++;r=r.nextSibling}}else t(e)}var js=e=>!!e.type.__asyncLoader;function xr(e){_e(e)&&(e={loader:e});let{loader:t,loadingComponent:o,errorComponent:r,delay:n=200,hydrate:i,timeout:a,suspensible:u=!0,onError:m}=e,h=null,v,k=0,p=()=>(k++,h=null,g()),g=()=>{let w;return h||(w=h=t().catch(b=>{if(b=b instanceof Error?b:new Error(String(b)),m)return new Promise((T,N)=>{m(b,()=>T(p()),()=>N(b),k+1)});throw b}).then(b=>w!==h&&h?h:(b&&(b.__esModule||b[Symbol.toStringTag]==="Module")&&(b=b.default),v=b,b)))};return xs({name:"AsyncComponentWrapper",__asyncLoader:g,__asyncHydrate(w,b,T){let N=w.isConnected,R=!1;(b.bu||(b.bu=[])).push(()=>R=!0);let I=()=>{R||!w.parentNode||N&&!w.isConnected||T()},C=i?()=>{let A=i(I,P=>Rd(w,P));A&&(b.bum||(b.bum=[])).push(A)}:I;v?C():g().then(()=>!b.isUnmounted&&C())},get __asyncResolved(){return v},setup(){let w=xe;if(Ro(w),v)return()=>kn(v,w);let b=A=>{h=null,Zs(A,w,13,!r)};if(u&&w.suspense||ws)return g().then(A=>()=>kn(A,w)).catch(A=>(b(A),()=>r?De(r,{error:A}):null));let T=Ze(!1),N=Ze(),R=Ze(!!n),I,C;return en(()=>{I!=null&&clearTimeout(I),C!=null&&clearTimeout(C)}),n&&(C=setTimeout(()=>{w.isUnmounted||(R.value=!1)},n)),a!=null&&(I=setTimeout(()=>{if(!w.isUnmounted&&!T.value&&!N.value){let A=new Error(`Async component timed out after ${a}ms.`);b(A),N.value=A}},a)),g().then(()=>{w.isUnmounted||(T.value=!0,w.parent&&Vn(w.parent.vnode)&&w.parent.update())}).catch(A=>{if(w.isUnmounted){h=null;return}b(A),N.value=A}),()=>{if(T.value&&v)return kn(v,w);if(N.value&&r)return De(r,{error:N.value});if(o&&!R.value)return kn(o,w)}}})}function kn(e,t){let{ref:o,props:r,children:n,ce:i}=t.vnode,a=De(e,r,n);return a.ref=o,a.ce=i,delete t.vnode.ce,a}var Vn=e=>e.type.__isKeepAlive;function ei(e,t){si(e,"a",t)}function ti(e,t){si(e,"da",t)}function si(e,t,o=xe){let r=e.__wdc||(e.__wdc=()=>{let n=o;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Pn(t,r,o),o){let n=o.parent;for(;n&&n.parent;)Vn(n.parent.vnode)&&Td(r,t,o,n),n=n.parent}}function Td(e,t,o,r){let n=Pn(t,e,r,!0);en(()=>{Ss(r[t],n)},o)}function Pn(e,t,o=xe,r=!1){if(o){let n=o[e]||(o[e]=[]),i=t.__weh||(t.__weh=(...a)=>{Dt();let u=tn(o),m=yt(t,o,e,a);return u(),Rt(),m});return r?n.unshift(i):n.push(i),i}}var zt=e=>(t,o=xe)=>{(!ws||e==="sp")&&Pn(e,(...r)=>t(...r),o)},Od=zt("bm"),It=zt("m"),ni=zt("bu"),oi=zt("u"),ss=zt("bum"),en=zt("um"),Ad=zt("sp"),Id=zt("rtg"),Vd=zt("rtc");function Pd(e,t=xe){Pn("ec",e,t)}var ri="components",qd="directives";function et(e,t){return ii(ri,e,!0,t)||e}var Md=Symbol.for("v-ndc");function be(e){return ii(qd,e)}function ii(e,t,o=!0,r=!1){let n=pt||xe;if(n){let i=n.type;if(e===ri){let u=bu(i,!1);if(u&&(u===t||u===Ke(t)||u===Yt(Ke(t))))return i}let a=Ir(n[e]||i[e],t)||Ir(n.appContext[e],t);return!a&&r?i:a}}function Ir(e,t){return e&&(e[t]||e[Ke(t)]||e[Yt(Ke(t))])}function ne(e,t,o,r){let n,i=o&&o[r],a=Ee(e);if(a||Fe(e)){let u=a&&$t(e),m=!1,h=!1;u&&(m=!it(e),h=kt(e),e=Ls(e)),n=new Array(e.length);for(let v=0,k=e.length;vt(u,m,void 0,i&&i[m]));else{let u=Object.keys(e);n=new Array(u.length);for(let m=0,h=u.length;me?Di(e)?$n(e):Eo(e.parent):null;var Ws=Ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Eo(e.parent),$root:e=>Eo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>To(e),$forceUpdate:e=>e.f||(e.f=()=>{Do(e.update)}),$nextTick:e=>e.n||(e.n=_t.bind(e.proxy)),$watch:e=>Nd.bind(e)});var wo=(e,t)=>e!==Me&&!e.__isScriptSetup&&Ae(e,t),$d={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:o,setupState:r,data:n,props:i,accessCache:a,type:u,appContext:m}=e;if(t[0]!=="$"){let p=a[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return n[t];case 4:return o[t];case 3:return i[t]}else{if(wo(r,t))return a[t]=1,r[t];if(n!==Me&&Ae(n,t))return a[t]=2,n[t];if(Ae(i,t))return a[t]=3,i[t];if(o!==Me&&Ae(o,t))return a[t]=4,o[t];Co&&(a[t]=0)}}let h=Ws[t],v,k;if(h)return t==="$attrs"&&Xe(e.attrs,"get",""),h(e);if((v=u.__cssModules)&&(v=v[t]))return v;if(o!==Me&&Ae(o,t))return a[t]=4,o[t];if(k=m.config.globalProperties,Ae(k,t))return k[t]},set({_:e},t,o){let{data:r,setupState:n,ctx:i}=e;return wo(n,t)?(n[t]=o,!0):r!==Me&&Ae(r,t)?(r[t]=o,!0):Ae(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:r,appContext:n,props:i,type:a}},u){let m;return!!(o[u]||e!==Me&&u[0]!=="$"&&Ae(e,u)||wo(t,u)||Ae(i,u)||Ae(r,u)||Ae(Ws,u)||Ae(n.config.globalProperties,u)||(m=a.__cssModules)&&m[u])},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:Ae(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};function Vr(e){return Ee(e)?e.reduce((t,o)=>(t[o]=null,t),{}):e}var Co=!0;function Ud(e){let t=To(e),o=e.proxy,r=e.ctx;Co=!1,t.beforeCreate&&Pr(t.beforeCreate,e,"bc");let{data:n,computed:i,methods:a,watch:u,provide:m,inject:h,created:v,beforeMount:k,mounted:p,beforeUpdate:g,updated:w,activated:b,deactivated:T,beforeDestroy:N,beforeUnmount:R,destroyed:I,unmounted:C,render:A,renderTracked:P,renderTriggered:Z,errorCaptured:Y,serverPrefetch:j,expose:z,inheritAttrs:ae,components:se,directives:re,filters:ue}=t;if(h&&Ld(h,r,null),a)for(let me in a){let pe=a[me];_e(pe)&&(r[me]=pe.bind(o))}if(n){let me=n.call(o,o);Ve(me)&&(e.data=ze(me))}if(Co=!0,i)for(let me in i){let pe=i[me],Te=_e(pe)?pe.bind(o,o):_e(pe.get)?pe.get.bind(o,o):rt,Re=!_e(pe)&&_e(pe.set)?pe.set.bind(o):rt,Se=tt({get:Te,set:Re});Object.defineProperty(r,me,{enumerable:!0,configurable:!0,get:()=>Se.value,set:D=>Se.value=D})}if(u)for(let me in u)ai(u[me],r,o,me);if(m){let me=_e(m)?m.call(o):m;Reflect.ownKeys(me).forEach(pe=>{ts(pe,me[pe])})}v&&Pr(v,e,"c");function he(me,pe){Ee(pe)?pe.forEach(Te=>me(Te.bind(o))):pe&&me(pe.bind(o))}if(he(Od,k),he(It,p),he(ni,g),he(oi,w),he(ei,b),he(ti,T),he(Pd,Y),he(Vd,P),he(Id,Z),he(ss,R),he(en,C),he(Ad,j),Ee(z))if(z.length){let me=e.exposed||(e.exposed={});z.forEach(pe=>{Object.defineProperty(me,pe,{get:()=>o[pe],set:Te=>o[pe]=Te,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===rt&&(e.render=A),ae!=null&&(e.inheritAttrs=ae),se&&(e.components=se),re&&(e.directives=re),j&&Ro(e)}function Ld(e,t,o=rt){Ee(e)&&(e=No(e));for(let r in e){let n=e[r],i;Ve(n)?"default"in n?i=lt(n.from||r,n.default,!0):i=lt(n.from||r):i=lt(n),Qe(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):t[r]=i}}function Pr(e,t,o){yt(Ee(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,o)}function ai(e,t,o,r){let n=r.includes(".")?Xr(o,r):()=>o[r];if(Fe(e)){let i=t[e];_e(i)&&He(n,i)}else if(_e(e))He(n,e.bind(o));else if(Ve(e))if(Ee(e))e.forEach(i=>ai(i,t,o,r));else{let i=_e(e.handler)?e.handler.bind(o):t[e.handler];_e(i)&&He(n,i,e)}}function To(e){let t=e.type,{mixins:o,extends:r}=t,{mixins:n,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,u=i.get(t),m;return u?m=u:!n.length&&!o&&!r?m=t:(m={},n.length&&n.forEach(h=>Sn(m,h,a,!0)),Sn(m,t,a)),Ve(t)&&i.set(t,m),m}function Sn(e,t,o,r=!1){let{mixins:n,extends:i}=t;i&&Sn(e,i,o,!0),n&&n.forEach(a=>Sn(e,a,o,!0));for(let a in t)if(!(r&&a==="expose")){let u=Fd[a]||o&&o[a];e[a]=u?u(e[a],t[a]):t[a]}return e}var Fd={data:qr,props:Mr,emits:Mr,methods:Bs,computed:Bs,beforeCreate:st,created:st,beforeMount:st,mounted:st,beforeUpdate:st,updated:st,beforeDestroy:st,beforeUnmount:st,destroyed:st,unmounted:st,activated:st,deactivated:st,errorCaptured:st,serverPrefetch:st,components:Bs,directives:Bs,watch:Hd,provide:qr,inject:zd};function qr(e,t){return t?e?function(){return Ge(_e(e)?e.call(this,this):e,_e(t)?t.call(this,this):t)}:t:e}function zd(e,t){return Bs(No(e),No(t))}function No(e){if(Ee(e)){let t={};for(let o=0;ot==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ke(t)}Modifiers`]||e[`${qt(t)}Modifiers`];function Wd(e,t,...o){if(e.isUnmounted)return;let r=e.vnode.props||Me,n=o,i=t.startsWith("update:"),a=i&&jd(r,t.slice(7));a&&(a.trim&&(n=o.map(v=>Fe(v)?v.trim():v)),a.number&&(n=n.map(eo)));let u,m=r[u=Rs(t)]||r[u=Rs(Ke(t))];!m&&i&&(m=r[u=Rs(qt(t))]),m&&yt(m,e,6,n);let h=r[u+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,yt(h,e,6,n)}}var Kd=new WeakMap;function di(e,t,o=!1){let r=o?Kd:t.emitsCache,n=r.get(e);if(n!==void 0)return n;let i=e.emits,a={},u=!1;if(!_e(e)){let m=h=>{let v=di(h,t,!0);v&&(u=!0,Ge(a,v))};!o&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}return!i&&!u?(Ve(e)&&r.set(e,null),null):(Ee(i)?i.forEach(m=>a[m]=null):Ge(a,i),Ve(e)&&r.set(e,a),a)}function qn(e,t){return!e||!us(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ae(e,t[0].toLowerCase()+t.slice(1))||Ae(e,qt(t))||Ae(e,t))}function ko(e){let{type:t,vnode:o,proxy:r,withProxy:n,propsOptions:[i],slots:a,attrs:u,emit:m,render:h,renderCache:v,props:k,data:p,setupState:g,ctx:w,inheritAttrs:b}=e,T=Cn(e),N,R;try{if(o.shapeFlag&4){let A=n||r,P=A;N=At(h.call(P,A,v,k,g,p,w)),R=u}else{let A=t;N=At(A.length>1?A(k,{attrs:u,slots:a,emit:m}):A(k,null)),R=t.props?u:Yd(u)}}catch(A){es.length=0,Zs(A,e,1),N=De(Ft)}let I=N,C;if(R&&b!==!1){let A=Object.keys(R),{shapeFlag:P}=I;A.length&&P&7&&(i&&A.some(cs)&&(R=Jd(R,i)),I=bs(I,R,!1,!0))}if(o.dirs&&(I=bs(I,null,!1,!0),I.dirs=I.dirs?I.dirs.concat(o.dirs):o.dirs),o.transition){let A=An(I.type)&&Zr(I)||I;In(A,o.transition)}return N=I,Cn(T),N}var Yd=e=>{let t;for(let o in e)(o==="class"||o==="style"||us(o))&&((t||(t={}))[o]=e[o]);return t},Jd=(e,t)=>{let o={};for(let r in e)(!cs(r)||!(r.slice(9)in t))&&(o[r]=e[r]);return o};function Qd(e,t,o){let{props:r,children:n,component:i}=e,{props:a,children:u,patchFlag:m}=t,h=i.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&m>=0){if(m&1024)return!0;if(m&16)return r?$r(r,a,h):!!a;if(m&8){let v=t.dynamicProps;for(let k=0;kObject.create(ci),fi=e=>Object.getPrototypeOf(e)===ci;function Zd(e,t,o,r=!1){let n={},i=pi();e.propsDefaults=Object.create(null),mi(e,t,n,i);for(let a in e.propsOptions[0])a in n||(n[a]=void 0);o?e.props=r?n:Fs(n):e.type.props?e.props=n:e.props=i,e.attrs=i}function xd(e,t,o,r){let{props:n,attrs:i,vnode:{patchFlag:a}}=e,u=Ie(n),[m]=e.propsOptions,h=!1;if((r||a>0)&&!(a&16)){if(a&8){let v=e.vnode.dynamicProps;for(let k=0;k{m=!0;let[p,g]=hi(k,t,!0);Ge(a,p),g&&u.push(...g)};!o&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}if(!i&&!m)return Ve(e)&&r.set(e,Kt),Kt;if(Ee(i))for(let v=0;ve==="_"||e==="_ctx"||e==="$stable",Ao=e=>Ee(e)?e.map(At):[At(e)],tu=(e,t,o)=>{if(t._n)return t;let r=_d((...n)=>Ao(t(...n)),o);return r._c=!1,r},vi=(e,t,o)=>{let r=e._ctx;for(let n in e){if(Oo(n))continue;let i=e[n];if(_e(i))t[n]=tu(n,i,r);else if(i!=null){let a=Ao(i);t[n]=()=>a}}},yi=(e,t)=>{let o=Ao(t);e.slots.default=()=>o},gi=(e,t,o)=>{for(let r in t)(o||!Oo(r))&&(e[r]=t[r])},su=(e,t,o)=>{let r=e.slots=pi();if(e.vnode.shapeFlag&32){let n=t._;n?(gi(r,t,o),o&&un(r,"_",n,!0)):vi(t,r)}else t&&yi(e,t)},nu=(e,t,o)=>{let{vnode:r,slots:n}=e,i=!0,a=Me;if(r.shapeFlag&32){let u=t._;u?o&&u===1?i=!1:gi(n,t,o):(i=!t.$stable,vi(t,n)),a=t}else t&&(yi(e,t),a={default:1});if(i)for(let u in n)!Oo(u)&&a[u]==null&&delete n[u]};function ou(){let e=[]}var at=lu;function bi(e){return ru(e)}function ru(e,t){ou();let o=Os();o.__VUE__=!0;let{insert:r,remove:n,patchProp:i,createElement:a,createText:u,createComment:m,setText:h,setElementText:v,parentNode:k,nextSibling:p,setScopeId:g=rt,insertStaticContent:w}=e,b=(_,S,q,F=null,G=null,M=null,Q=void 0,x=null,X=!!S.dynamicChildren)=>{if(_===S)return;_&&!Hs(_,S)&&(F=te(_),V(_,G,M,!0),_=null),S.patchFlag===-2&&(X=!1,S.dynamicChildren=null);let{type:H,ref:de,shapeFlag:ee}=S;switch(H){case Mn:T(_,S,q,F);break;case Ft:N(_,S,q,F);break;case Ks:_==null&&R(S,q,F,Q);break;case J:re(_,S,q,F,G,M,Q,x,X);break;default:ee&1?P(_,S,q,F,G,M,Q,x,X):ee&6?ue(_,S,q,F,G,M,Q,x,X):(ee&64||ee&128)&&H.process(_,S,q,F,G,M,Q,x,X,fe)}de!=null&&G?Gs(de,_&&_.ref,M,S||_,!S):de==null&&_&&_.ref!=null&&Gs(_.ref,null,M,_,!0)},T=(_,S,q,F)=>{if(_==null)r(S.el=u(S.children),q,F);else{let G=S.el=_.el;S.children!==_.children&&h(G,S.children)}},N=(_,S,q,F)=>{_==null?r(S.el=m(S.children||""),q,F):S.el=_.el},R=(_,S,q,F)=>{[_.el,_.anchor]=w(_.children,S,q,F,_.el,_.anchor)},I=(_,S,q,F)=>{if(S.children!==_.children){let G=p(_.anchor);A(_),[S.el,S.anchor]=w(S.children,q,G,F)}else S.el=_.el,S.anchor=_.anchor},C=({el:_,anchor:S},q,F)=>{let G;for(;_&&_!==S;)G=p(_),r(_,q,F),_=G;r(S,q,F)},A=({el:_,anchor:S})=>{let q;for(;_&&_!==S;)q=p(_),n(_),_=q;n(S)},P=(_,S,q,F,G,M,Q,x,X)=>{if(S.type==="svg"?Q="svg":S.type==="math"&&(Q="mathml"),_==null)Z(S,q,F,G,M,Q,x,X);else{let H=_.el&&_.el._isVueCE?_.el:null;try{H&&H._beginPatch(),z(_,S,G,M,Q,x,X)}finally{H&&H._endPatch()}}},Z=(_,S,q,F,G,M,Q,x)=>{let X,H,{props:de,shapeFlag:ee,transition:ie,dirs:ve}=_;if(X=_.el=a(_.type,M,de&&de.is,de),ee&8?v(X,_.children):ee&16&&j(_.children,X,null,F,G,_o(_,M),Q,x),ve&&Zt(_,null,F,"created"),Y(X,_,_.scopeId,Q,F),de){for(let Ue in de)Ue!=="value"&&!ps(Ue)&&i(X,Ue,null,de[Ue],M,F);"value"in de&&i(X,"value",null,de.value,M),(H=de.onVnodeBeforeMount)&&Tt(H,F,_)}ve&&Zt(_,null,F,"beforeMount");let Oe=iu(G,ie);Oe&&ie.beforeEnter(X),r(X,S,q),((H=de&&de.onVnodeMounted)||Oe||ve)&&at(()=>{let $e;try{H&&Tt(H,F,_),Oe&&ie.enter(X),ve&&Zt(_,null,F,"mounted")}finally{}},G)},Y=(_,S,q,F,G)=>{if(q&&g(_,q),F)for(let M=0;M{for(let H=X;H<_.length;H++){let de=_[H]=x?Lt(_[H]):At(_[H]);b(null,de,S,q,F,G,M,Q,x)}},z=(_,S,q,F,G,M,Q)=>{let x=S.el=_.el,{patchFlag:X,dynamicChildren:H,dirs:de}=S;X|=_.patchFlag&16;let ee=_.props||Me,ie=S.props||Me,ve;if(q&&xt(q,!1),(ve=ie.onVnodeBeforeUpdate)&&Tt(ve,q,S,_),de&&Zt(S,_,q,"beforeUpdate"),q&&xt(q,!0),H&&(!_.dynamicChildren||_.dynamicChildren.length!==H.length)&&(X=0,Q=!1,H=null),(ee.innerHTML&&ie.innerHTML==null||ee.textContent&&ie.textContent==null)&&v(x,""),H?ae(_.dynamicChildren,H,x,q,F,_o(S,G),M):Q||Te(_,S,x,null,q,F,_o(S,G),M,!1),X>0){if(X&16)se(x,ee,ie,q,G);else if(X&2&&ee.class!==ie.class&&i(x,"class",null,ie.class,G),X&4&&i(x,"style",ee.style,ie.style,G),X&8){let Oe=S.dynamicProps;for(let Ue=0;Ue{ve&&Tt(ve,q,S,_),de&&Zt(S,_,q,"updated")},F)},ae=(_,S,q,F,G,M,Q)=>{for(let x=0;x{if(S!==q){if(S!==Me)for(let M in S)!ps(M)&&!(M in q)&&i(_,M,S[M],null,G,F);for(let M in q){if(ps(M))continue;let Q=q[M],x=S[M];Q!==x&&M!=="value"&&i(_,M,x,Q,G,F)}"value"in q&&i(_,"value",S.value,q.value,G)}},re=(_,S,q,F,G,M,Q,x,X)=>{let H=S.el=_?_.el:u(""),de=S.anchor=_?_.anchor:u(""),{patchFlag:ee,dynamicChildren:ie,slotScopeIds:ve}=S;ve&&(x=x?x.concat(ve):ve),_==null?(r(H,q,F),r(de,q,F),j(S.children||[],q,de,G,M,Q,x,X)):ee>0&&ee&64&&ie&&_.dynamicChildren&&_.dynamicChildren.length===ie.length?(ae(_.dynamicChildren,ie,q,G,M,Q,x),(S.key!=null||G&&S===G.subTree)&&wi(_,S,!0)):Te(_,S,q,de,G,M,Q,x,X)},ue=(_,S,q,F,G,M,Q,x,X)=>{S.slotScopeIds=x,_==null?S.shapeFlag&512?G.ctx.activate(S,q,F,Q,X):ke(S,q,F,G,M,Q,X):he(_,S,X)},ke=(_,S,q,F,G,M,Q)=>{let x=_.component=mu(_,F,G);if(Vn(_)&&(x.ctx.renderer=fe),hu(x,!1,Q),x.asyncDep){if(G&&G.registerDep(x,me,Q),!_.el){let X=x.subTree=De(Ft);N(null,X,S,q),_.placeholder=X.el}}else me(x,_,S,q,G,M,Q)},he=(_,S,q)=>{let F=S.component=_.component;if(Qd(_,S,q))if(F.asyncDep&&!F.asyncResolved){pe(F,S,q);return}else F.next=S,F.update();else S.el=_.el,F.vnode=S},me=(_,S,q,F,G,M,Q)=>{let x=()=>{if(_.isMounted){let{next:ee,bu:ie,u:ve,parent:Oe,vnode:Ue}=_;{let dt=ki(_);if(dt){ee&&(ee.el=Ue.el,pe(_,ee,Q)),dt.asyncDep.then(()=>{at(()=>{_.isUnmounted||H()},G)});return}}let $e=ee,je;xt(_,!1),ee?(ee.el=Ue.el,pe(_,ee,Q)):ee=Ue,ie&&Ts(ie),(je=ee.props&&ee.props.onVnodeBeforeUpdate)&&Tt(je,Oe,ee,Ue),xt(_,!0);let We=ko(_),bt=_.subTree;_.subTree=We,b(bt,We,k(bt.el),te(bt),_,G,M),ee.el=We.el,$e===null&&Xd(_,We.el),ve&&at(ve,G),(je=ee.props&&ee.props.onVnodeUpdated)&&at(()=>Tt(je,Oe,ee,Ue),G)}else{let ee,{el:ie,props:ve}=S,{bm:Oe,m:Ue,parent:$e,root:je,type:We}=_,bt=js(S);if(xt(_,!1),Oe&&Ts(Oe),!bt&&(ee=ve&&ve.onVnodeBeforeMount)&&Tt(ee,$e,S),xt(_,!0),ie&&ce){let dt=()=>{_.subTree=ko(_),ce(ie,_.subTree,_,G,null)};bt&&We.__asyncHydrate?We.__asyncHydrate(ie,_,dt):dt()}else{je.ce&&je.ce._hasShadowRoot()&&je.ce._injectChildStyle(We,_.parent?_.parent.type:void 0);let dt=_.subTree=ko(_);b(null,dt,q,F,_,G,M),S.el=dt.el}if(Ue&&at(Ue,G),!bt&&(ee=ve&&ve.onVnodeMounted)){let dt=S;at(()=>Tt(ee,$e,dt),G)}(S.shapeFlag&256||$e&&js($e.vnode)&&$e.vnode.shapeFlag&256)&&_.a&&at(_.a,G),_.isMounted=!0,S=q=F=null}};_.scope.on();let X=_.effect=new hs(x);_.scope.off();let H=_.update=X.run.bind(X),de=_.job=X.runIfDirty.bind(X);de.i=_,de.id=_.uid,X.scheduler=()=>Do(de),xt(_,!0),H()},pe=(_,S,q)=>{S.component=_;let F=_.vnode.props;_.vnode=S,_.next=null,xd(_,S.props,F,q),nu(_,S.children,q),Dt(),Rr(_),Rt()},Te=(_,S,q,F,G,M,Q,x,X=!1)=>{let H=_&&_.children,de=_?_.shapeFlag:0,ee=S.children,{patchFlag:ie,shapeFlag:ve}=S;if(ie>0){if(ie&128){Se(H,ee,q,F,G,M,Q,x,X);return}else if(ie&256){Re(H,ee,q,F,G,M,Q,x,X);return}}ve&8?(de&16&&U(H,G,M),ee!==H&&v(q,ee)):de&16?ve&16?Se(H,ee,q,F,G,M,Q,x,X):U(H,G,M,!0):(de&8&&v(q,""),ve&16&&j(ee,q,F,G,M,Q,x,X))},Re=(_,S,q,F,G,M,Q,x,X)=>{_=_||Kt,S=S||Kt;let H=_.length,de=S.length,ee=Math.min(H,de),ie;for(ie=0;iede?U(_,G,M,!0,!1,ee):j(S,q,F,G,M,Q,x,X,ee)},Se=(_,S,q,F,G,M,Q,x,X)=>{let H=0,de=S.length,ee=_.length-1,ie=de-1;for(;H<=ee&&H<=ie;){let ve=_[H],Oe=S[H]=X?Lt(S[H]):At(S[H]);if(Hs(ve,Oe))b(ve,Oe,q,null,G,M,Q,x,X);else break;H++}for(;H<=ee&&H<=ie;){let ve=_[ee],Oe=S[ie]=X?Lt(S[ie]):At(S[ie]);if(Hs(ve,Oe))b(ve,Oe,q,null,G,M,Q,x,X);else break;ee--,ie--}if(H>ee){if(H<=ie){let ve=ie+1,Oe=veie)for(;H<=ee;)V(_[H],G,M,!0),H++;else{let ve=H,Oe=H,Ue=new Map;for(H=Oe;H<=ie;H++){let ut=S[H]=X?Lt(S[H]):At(S[H]);ut.key!=null&&Ue.set(ut.key,H)}let $e,je=0,We=ie-Oe+1,bt=!1,dt=0,Ns=new Array(We);for(H=0;H=We){V(ut,G,M,!0);continue}let Et;if(ut.key!=null)Et=Ue.get(ut.key);else for($e=Oe;$e<=ie;$e++)if(Ns[$e-Oe]===0&&Hs(ut,S[$e])){Et=$e;break}Et===void 0?V(ut,G,M,!0):(Ns[Et-Oe]=H+1,Et>=dt?dt=Et:bt=!0,b(ut,S[Et],q,null,G,M,Q,x,X),je++)}let Zo=bt?au(Ns):Kt;for($e=Zo.length-1,H=We-1;H>=0;H--){let ut=Oe+H,Et=S[ut],xo=S[ut+1],er=ut+1{let{el:M,type:Q,transition:x,children:X,shapeFlag:H}=_;if(H&6){D(_.component.subTree,S,q,F);return}if(H&128){_.suspense.move(S,q,F);return}if(H&64){Q.move(_,S,q,fe);return}if(Q===J){r(M,S,q);for(let ee=0;eex.enter(M),G));else{let{leave:ee,delayLeave:ie,afterLeave:ve}=x,Oe=()=>{_.ctx.isUnmounted?n(M):r(M,S,q)},Ue=()=>{let $e=M._isLeaving||!!M[bo];M._isLeaving&&M[bo](!0),x.persisted&&!$e?Oe():ee(M,()=>{Oe(),ve&&ve()})};ie?ie(M,Oe,Ue):Ue()}else r(M,S,q)},V=(_,S,q,F=!1,G=!1)=>{let{type:M,props:Q,ref:x,children:X,dynamicChildren:H,shapeFlag:de,patchFlag:ee,dirs:ie,cacheIndex:ve,memo:Oe}=_;if(ee===-2&&(G=!1),x!=null&&(Dt(),Gs(x,null,q,_,!0),Rt()),ve!=null&&(S.renderCache[ve]=void 0),de&256){S.ctx.deactivate(_);return}let Ue=de&1&&ie,$e=!js(_),je;if($e&&(je=Q&&Q.onVnodeBeforeUnmount)&&Tt(je,S,_),de&6)le(_.component,q,F);else{if(de&128){_.suspense.unmount(q,F);return}Ue&&Zt(_,null,S,"beforeUnmount"),de&64?_.type.remove(_,S,q,fe,F):H&&!H.hasOnce&&(M!==J||ee>0&&ee&64)?U(H,S,q,!1,!0):(M===J&&ee&384||!G&&de&16)&&U(X,S,q),F&&W(_)}let We=Oe!=null&&ve==null;($e&&(je=Q&&Q.onVnodeUnmounted)||Ue||We)&&at(()=>{je&&Tt(je,S,_),Ue&&Zt(_,null,S,"unmounted"),We&&(_.el=null)},q)},W=_=>{let{type:S,el:q,anchor:F,transition:G}=_;if(S===J){oe(q,F);return}if(S===Ks){A(_);return}let M=()=>{n(q),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(_.shapeFlag&1&&G&&!G.persisted){let{leave:Q,delayLeave:x}=G,X=()=>Q(q,M);x?x(_.el,M,X):X()}else M()},oe=(_,S)=>{let q;for(;_!==S;)q=p(_),n(_),_=q;n(S)},le=(_,S,q)=>{let{bum:F,scope:G,job:M,subTree:Q,um:x,m:X,a:H}=_;Lr(X),Lr(H),F&&Ts(F),G.stop(),M&&(M.flags|=8,V(Q,_,S,q)),x&&at(x,S),at(()=>{_.isUnmounted=!0},S)},U=(_,S,q,F=!1,G=!1,M=0)=>{for(let Q=M;Q<_.length;Q++)V(_[Q],S,q,F,G)},te=_=>{if(_.shapeFlag&6)return te(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();let S=p(_.anchor||_.el),q=S&&S[Sd];return q?p(q):S},L=!1,K=(_,S,q)=>{let F;_==null?S._vnode&&(V(S._vnode,null,null,!0),F=S._vnode.component):b(S._vnode||null,_,S,null,null,null,q),S._vnode=_,L||(L=!0,Rr(F),Kr(),L=!1)},fe={p:b,um:V,m:D,r:W,mt:ke,mc:j,pc:Te,pbc:ae,n:te,o:e},Ce,ce;return t&&([Ce,ce]=t(fe)),{render:K,hydrate:Ce,createApp:Gd(K,Ce)}}function _o({type:e,props:t},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:o}function xt({effect:e,job:t},o){o?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function iu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function wi(e,t,o=!1){let r=e.children,n=t.children;if(Ee(r)&&Ee(n))for(let i=0;i>1,e[o[u]]0&&(t[r]=o[i-1]),o[i]=r)}}for(i=o.length,a=o[i-1];i-- >0;)o[i]=a,a=t[a];return o}function ki(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ki(t)}function Lr(e){if(e)for(let t=0;te.__isSuspense;function lu(e,t){t&&t.pendingBranch?Ee(e)?t.effects.push(...e):t.effects.push(e):Wr(e)}var J=Symbol.for("v-fgt"),Mn=Symbol.for("v-txt"),Ft=Symbol.for("v-cmt"),Ks=Symbol.for("v-stc"),es=[],ft=null;function l(e=!1){es.push(ft=e?null:[])}function Ci(){es.pop(),ft=es[es.length-1]||null}var Js=1;function Dn(e,t=!1){Js+=e,e<0&&ft&&t&&(ft.hasOnce=!0)}function Ni(e){return e.dynamicChildren=Js>0?ft||Kt:null,Ci(),Js>0&&ft&&ft.push(e),e}function d(e,t,o,r,n,i){return Ni(s(e,t,o,r,n,i,!0))}function ks(e,t,o,r,n){return Ni(De(e,t,o,r,n,!0))}function Rn(e){return e?e.__v_isVNode===!0:!1}function Hs(e,t){return e.type===t.type&&e.key===t.key}var Si=({key:e})=>e??null,_n=({ref:e,ref_key:t,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?Fe(e)||Qe(e)||_e(e)?{i:pt,r:e,k:t,f:!!o}:e:null);function s(e,t=null,o=null,r=0,n=null,i=e===J?0:1,a=!1,u=!1){let m={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Si(t),ref:t&&_n(t),scopeId:Jr,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:pt};return u?(Tn(m,o),i&128&&e.normalize(m)):o&&(m.shapeFlag|=Fe(o)?8:16),Js>0&&!a&&ft&&(m.patchFlag>0||i&6)&&m.patchFlag!==32&&ft.push(m),m}var De=du;function du(e,t=null,o=null,r=0,n=null,i=!1){if((!e||e===Md)&&(e=Ft),Rn(e)){let u=bs(e,t,!0);return o&&Tn(u,o),Js>0&&!i&&ft&&(u.shapeFlag&6?ft[ft.indexOf(e)]=u:ft.push(u)),u.patchFlag=-2,u}if(wu(e)&&(e=e.__vccOpts),t){t=uu(t);let{class:u,style:m}=t;u&&!Fe(u)&&(t.class=O(u)),Ve(m)&&(zs(m)&&!Ee(m)&&(m=Ge({},m)),t.style=Pe(m))}let a=Fe(e)?1:Ei(e)?128:An(e)?64:Ve(e)?4:_e(e)?2:0;return s(e,t,o,r,n,a,i,!0)}function uu(e){return e?zs(e)||fi(e)?Ge({},e):e:null}function bs(e,t,o=!1,r=!1){let{props:n,ref:i,patchFlag:a,children:u,transition:m}=e,h=t?cu(n||{},t):n,v={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&Si(h),ref:t&&t.ref?o&&i?Ee(i)?i.concat(_n(t)):[i,_n(t)]:_n(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==J?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:m,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&bs(e.ssContent),ssFallback:e.ssFallback&&bs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return m&&r&&In(v,m.clone(v)),v}function y(e=" ",t=0){return De(Mn,null,e,t)}function ge(e,t){let o=De(Ks,null,e);return o.staticCount=t,o}function f(e="",t=!1){return t?(l(),ks(Ft,null,e)):De(Ft,null,e)}function At(e){return e==null||typeof e=="boolean"?De(Ft):Ee(e)?De(J,null,e.slice()):Rn(e)?Lt(e):De(Mn,null,String(e))}function Lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:bs(e)}function Tn(e,t){let o=0,{shapeFlag:r}=e;if(t==null)t=null;else if(Ee(t))o=16;else if(typeof t=="object")if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Tn(e,n()),n._c&&(n._d=!0));return}else{o=32;let n=t._;!n&&!fi(t)?t._ctx=pt:n===3&&pt&&(pt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(_e(t)){if(r&65){Tn(e,{default:t});return}t={default:t,_ctx:pt},o=32}else t=String(t),r&64?(o=16,t=[y(t)]):o=8;e.children=t,e.shapeFlag|=o}function cu(...e){let t={};for(let o=0;oxe||pt,On,Qs;{let e=Os(),t=(o,r)=>{let n;return(n=e[o])||(n=e[o]=[]),n.push(r),i=>{n.length>1?n.forEach(a=>a(i)):n[0](i)}};On=t("__VUE_INSTANCE_SETTERS__",o=>xe=o),Qs=t("__VUE_SSR_SETTERS__",o=>ws=o)}var tn=e=>{let t=xe;return On(e),e.scope.on(),()=>{e.scope.off(),On(t)}},Fr=()=>{xe&&xe.scope.off(),On(null)};function Di(e){return e.vnode.shapeFlag&4}var ws=!1;function hu(e,t=!1,o=!1){t&&Qs(t);let{props:r,children:n}=e.vnode,i=Di(e);Zd(e,r,i,t),su(e,n,o||t);let a=i?vu(e,t):void 0;return t&&Qs(!1),a}function vu(e,t){let o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,$d);let{setup:r}=o;if(r){Dt();let n=e.setupContext=r.length>1?gu(e):null,i=tn(e),a=Xs(r,e,0,[e.props,n]),u=Zn(a);if(Rt(),i(),(u||e.sp)&&!js(e)&&Ro(e),u){if(a.then(Fr,Fr),t)return a.then(m=>{Qs(!0);try{zr(e,m,t)}finally{Qs(!1)}}).catch(m=>{Zs(m,e,0)});e.asyncDep=a}else zr(e,a,t)}else Ri(e,t)}function zr(e,t,o){_e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ve(t)&&(e.setupState=wn(t)),Ri(e,o)}var Hr,Br;function Ri(e,t,o){let r=e.type;if(!e.render){if(!t&&Hr&&!r.render){let n=r.template||To(e).template;if(n){let{isCustomElement:i,compilerOptions:a}=e.appContext.config,{delimiters:u,compilerOptions:m}=r,h=Ge(Ge({isCustomElement:i,delimiters:u},a),m);r.render=Hr(n,h)}}e.render=r.render||rt,Br&&Br(e)}{let n=tn(e);Dt();try{Ud(e)}finally{Rt(),n()}}}var yu={get(e,t){return Xe(e,"get",""),e[t]}};function gu(e){let t=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,yu),slots:e.slots,emit:e.emit,expose:t}}function $n(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(wn(go(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in Ws)return Ws[o](e)},has(t,o){return o in t||o in Ws}})):e.proxy}function bu(e,t=!0){return _e(e)?e.displayName||e.name:e.name||t&&e.__name}function wu(e){return _e(e)&&"__vccOpts"in e}var tt=(e,t)=>Nr(e,t,ws);function Ne(e,t,o){try{Dn(-1);let r=arguments.length;return r===2?Ve(t)&&!Ee(t)?Rn(t)?De(e,null,[t]):De(e,t):De(e,null,t):(r>3?o=Array.prototype.slice.call(arguments,2):r===3&&Rn(o)&&(o=[o]),De(e,t,o))}finally{Dn(1)}}var ku="3.5.42";var qo,Ti=typeof window<"u"&&window.trustedTypes;if(Ti)try{qo=Ti.createPolicy("vue",{createHTML:e=>e})}catch{}var Ui=qo?e=>qo.createHTML(e):e=>e,_u="http://www.w3.org/2000/svg",Eu="http://www.w3.org/1998/Math/MathML",Ht=typeof document<"u"?document:null,Oi=Ht&&Ht.createElement("template"),Cu={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,r)=>{let n=t==="svg"?Ht.createElementNS(_u,e):t==="mathml"?Ht.createElementNS(Eu,e):o?Ht.createElement(e,{is:o}):Ht.createElement(e);return e==="select"&&r&&r.multiple!=null&&n.setAttribute("multiple",r.multiple),n},createText:e=>Ht.createTextNode(e),createComment:e=>Ht.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ht.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,r,n,i){let a=o?o.previousSibling:t.lastChild;if(n&&(n===i||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),o),!(n===i||!(n=n.nextSibling)););else{Oi.innerHTML=Ui(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);let u=Oi.content;if(r==="svg"||r==="mathml"){let m=u.firstChild;for(;m.firstChild;)u.appendChild(m.firstChild);u.removeChild(m)}t.insertBefore(u,o)}return[a?a.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}};var Nu=Symbol("_vtc");function Su(e,t,o){let r=e[Nu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}var Ln=Symbol("_vod"),Li=Symbol("_vsh"),B={name:"show",beforeMount(e,{value:t},{transition:o}){e[Ln]=e.style.display==="none"?"":e.style.display,o&&t?o.beforeEnter(e):sn(e,t)},mounted(e,{value:t},{transition:o}){o&&t&&o.enter(e)},updated(e,{value:t,oldValue:o},{transition:r}){!t!=!o&&(r?t?(r.beforeEnter(e),sn(e,!0),r.enter(e)):r.leave(e,()=>{sn(e,!1)}):sn(e,t))},beforeUnmount(e,{value:t}){sn(e,t)}};function sn(e,t){e.style.display=t?e[Ln]:"none",e[Li]=!t}var Du=Symbol("");var Ru=/(?:^|;)\s*display\s*:/;function Tu(e,t,o){let r=e.style,n=Fe(o),i=!1;if(o&&!n){if(t)if(Fe(t))for(let a of t.split(";")){let u=a.slice(0,a.indexOf(":")).trim();o[u]==null&&nn(r,u,"")}else for(let a in t)o[a]==null&&nn(r,a,"");for(let a in o){a==="display"&&(i=!0);let u=o[a];u!=null?Au(e,a,!Fe(t)&&t?t[a]:void 0,u)||nn(r,a,u):nn(r,a,"")}}else if(n){if(t!==o){let a=r[Du];a&&(o+=";"+a),r.cssText=o,i=Ru.test(o)}}else t&&e.removeAttribute("style");Ln in e&&(e[Ln]=i?r.display:"",e[Li]&&(r.display="none"))}var Un=/\s*!important$/;function nn(e,t,o){if(Ee(o))o.forEach(r=>nn(e,t,r));else if(o==null&&(o=""),t.startsWith("--"))Un.test(o)?e.setProperty(t,o.replace(Un,""),"important"):e.setProperty(t,o);else{let r=Ou(e,t);Un.test(o)?e.setProperty(qt(r),o.replace(Un,""),"important"):e[r]=o}}var Ai=["Webkit","Moz","ms"],Vo={};function Ou(e,t){let o=Vo[t];if(o)return o;let r=Ke(t);if(r!=="filter"&&r in e)return Vo[t]=r;r=Yt(r);for(let n=0;nPo||(Uu.then(()=>Po=0),Po=Date.now());function Fu(e,t){let o=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=o.attached)return;let n=o.value;if(Ee(n)){let i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};let a=n.slice(),u=[r];for(let m=0;me.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,zu=(e,t,o,r,n,i)=>{let a=n==="svg";t==="class"?Su(e,r,a):t==="style"?Tu(e,o,r):us(t)?cs(t)||Pu(e,t,o,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Hu(e,t,r,a))?(Pi(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Vi(e,t,r,a,i,t!=="value")):e._isVueCE&&(Bu(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Fe(r)))?Pi(e,Ke(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Vi(e,t,r,a))};function Hu(e,t,o,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Mi(t)&&_e(o));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let n=e.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return Mi(t)&&Fe(o)?!1:t in e}function Bu(e,t){let o=e._def.props;if(!o)return!1;let r=Ke(t);return Array.isArray(o)?o.some(n=>Ke(n)===r):Object.keys(o).some(n=>Ke(n)===r)}var Gu=["ctrl","shift","alt","meta"],ju={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Gu.some(o=>e[`${o}Key`]&&!t.includes(o))},we=(e,t)=>{if(!e)return e;let o=e._withMods||(e._withMods={}),r=t.join(".");return o[r]||(o[r]=((n,...i)=>{for(let a=0;a{let t=Ku().createApp(...e),{mount:o}=t;return t.mount=r=>{let n=Ju(r);if(!n)return;let i=t._component;!_e(i)&&!i.render&&!i.template&&(i.template=n.innerHTML),n.nodeType===1&&(n.textContent="");let a=o(n,!1,Yu(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},t});function Yu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ju(e){return Fe(e)?document.querySelector(e):e}var rs=typeof document<"u";function Hi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Qu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Hi(e.default)}var qe=Object.assign;function Fn(e,t){let o={};for(let r in t){let n=t[r];o[r]=gt(n)?n.map(e):e(n)}return o}var Es=()=>{},gt=Array.isArray;function Uo(e,t){let o={};for(let r in e)o[r]=r in t?t[r]:e[r];return o}var Bi=/#/g,Xu=/&/g,Zu=/\//g,xu=/=/g,ec=/\?/g,Gi=/\+/g,tc=/%5B/g,sc=/%5D/g,ji=/%5E/g,nc=/%60/g,Wi=/%7B/g,oc=/%7C/g,Ki=/%7D/g,rc=/%20/g;function Lo(e){return e==null?"":encodeURI(""+e).replace(oc,"|").replace(tc,"[").replace(sc,"]")}function Yi(e){return Lo(e).replace(Wi,"{").replace(Ki,"}").replace(ji,"^")}function Mo(e){return Lo(e).replace(Gi,"%2B").replace(rc,"+").replace(Bi,"%23").replace(Xu,"%26").replace(nc,"`").replace(Wi,"{").replace(Ki,"}").replace(ji,"^")}function ic(e){return Mo(e).replace(xu,"%3D")}function ac(e){return Lo(e).replace(Bi,"%23").replace(ec,"%3F")}function Ji(e){return ac(e).replace(Zu,"%2F")}function _s(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var lc=/\/$/,dc=e=>e.replace(lc,"");function zn(e,t,o="/"){let r,n={},i="",a="",u=t.indexOf("#"),m=t.indexOf("?");return m=u>=0&&m>u?-1:m,m>=0&&(r=t.slice(0,m),i=t.slice(m,u>0?u:t.length),n=e(i.slice(1))),u>=0&&(r=r||t.slice(0,u),a=t.slice(u,t.length)),r=cc(r??t,o),{fullPath:r+i+a,path:r,query:n,hash:_s(a)}}function Qi(e,t){let o=t.query?e(t.query):"";return t.path+(o&&"?")+o+(t.hash||"")}function Fo(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Xi(e,t,o){let r=t.matched.length-1,n=o.matched.length-1;return r>-1&&r===n&&ns(t.matched[r],o.matched[n])&&zo(t.params,o.params)&&e(t.query)===e(o.query)&&t.hash===o.hash}function ns(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function zo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var o in e)if(!uc(e[o],t[o]))return!1;return!0}function uc(e,t){return gt(e)?zi(e,t):gt(t)?zi(t,e):e?.valueOf()===t?.valueOf()}function zi(e,t){return gt(t)?e.length===t.length&&e.every((o,r)=>o===t[r]):e.length===1&&e[0]===t}function cc(e,t){if(e.startsWith("/"))return e;if(!e)return t;let o=t.split("/"),r=e.split("/"),n=r[r.length-1];(n===".."||n===".")&&r.push("");let i=o.length-1,a,u;for(a=0;a1&&i--;else break;return o.slice(0,i).join("/")+"/"+r.slice(a).join("/")}var Gt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Hn=(function(e){return e.pop="pop",e.push="push",e})({}),Bn=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Zi(e){if(!e)if(rs){let t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),dc(e)}var pc=/^[^#]+#/;function xi(e,t){return e.replace(pc,"#")+t}function fc(e,t){let o=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-o.left-(t.left||0),top:r.top-o.top-(t.top||0)}}var on=()=>({left:window.scrollX,top:window.scrollY});function ea(e){let t;if("el"in e){let o=e.el,r=typeof o=="string"&&o.startsWith("#"),n=typeof o=="string"?r?document.getElementById(o.slice(1)):document.querySelector(o):o;if(!n)return;t=fc(n,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Ho(e,t){return(history.state?history.state.position-t:-1)+e}var $o=new Map;function ta(e,t){$o.set(e,t)}function sa(e){let t=$o.get(e);return $o.delete(e),t}function mc(e){return typeof e=="string"||e&&typeof e=="object"}function Bo(e){return typeof e=="string"||typeof e=="symbol"}var Be=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({}),na=Symbol("");var c5={[Be.MATCHER_NOT_FOUND]({location:e,currentLocation:t}){return`No match for ${JSON.stringify(e)}${t?` while being at `+JSON.stringify(t):""}`},[Be.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${vc(t)}" via a navigation guard.`},[Be.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[Be.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[Be.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function os(e,t){return qe(new Error,{type:e,[na]:!0},t)}function Vt(e,t){return e instanceof Error&&na in e&&(t==null||!!(e.type&t))}var hc=["params","query","hash"];function vc(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of hc)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function oa(e){let t={};if(e===""||e==="?")return t;let o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;rn&&Mo(n)):[r&&Mo(r)]).forEach(n=>{n!==void 0&&(t+=(t.length?"&":"")+o,n!=null&&(t+="="+n))})}return t}function ra(e){let t={};for(let o in e){let r=e[o];r!==void 0&&(t[o]=gt(r)?r.map(n=>n==null?null:""+n):r==null?r:""+r)}return t}var ia=Symbol(""),jo=Symbol(""),Gn=Symbol(""),jn=Symbol(""),Wn=Symbol("");function Cs(){let e=[];function t(r){return e.push(r),()=>{let n=e.indexOf(r);n>-1&&e.splice(n,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Bt(e,t,o,r,n,i=a=>a()){let a=r&&(r.enterCallbacks[n]=r.enterCallbacks[n]||[]);return()=>new Promise((u,m)=>{let h=p=>{p===!1?m(os(Be.NAVIGATION_ABORTED,{from:o,to:t})):p instanceof Error?m(p):mc(p)?m(os(Be.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(a&&r.enterCallbacks[n]===a&&typeof p=="function"&&a.push(p),u())},v=i(()=>e.call(r&&r.instances[n],t,o,h)),k=Promise.resolve(v);e.length<3&&(k=k.then(h)),k.catch(p=>m(p))})}function Kn(e,t,o,r,n=i=>i()){let i=[];for(let a of e)for(let u in a.components){let m=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(Hi(m)){let h=(m.__vccOpts||m)[t];h&&i.push(Bt(h,o,r,a,u,n))}else{let h=m();i.push(()=>h.then(v=>{if(!v)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let k=Qu(v)?v.default:v;a.mods[u]=v,a.components[u]=k;let p=(k.__vccOpts||k)[t];return p&&Bt(p,o,r,a,u,n)()}))}}return i}function aa(e,t){let o=[],r=[],n=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;ans(h,u))?r.push(u):o.push(u));let m=e.matched[a];m&&(t.matched.find(h=>ns(h,m))||n.push(m))}return[o,r,n]}var yc=()=>location.protocol+"//"+location.host;function ga(e,t){let{pathname:o,search:r,hash:n}=t,i=e.indexOf("#");if(i>-1){let a=n.includes(e.slice(i))?e.slice(i).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),Fo(u,"")}return Fo(o,e)+r+n}function gc(e,t,o,r){let n=[],i=[],a=null,u=({state:p})=>{let g=ga(e,location),w=o.value,b=t.value,T=0;if(p){if(o.value=g,t.value=p,a&&a===w){a=null;return}T=b?p.position-b.position:0}else r(g);n.forEach(N=>{N(o.value,w,{delta:T,type:Hn.pop,direction:T?T>0?Bn.forward:Bn.back:Bn.unknown})})};function m(){a=o.value}function h(p){n.push(p);let g=()=>{let w=n.indexOf(p);w>-1&&n.splice(w,1)};return i.push(g),g}function v(){if(document.visibilityState==="hidden"){let{history:p}=window;if(!p.state)return;p.replaceState(qe({},p.state,{scroll:on()}),"")}}function k(){for(let p of i)p();i=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",v)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",v),document.addEventListener("visibilitychange",v),{pauseListeners:m,listen:h,destroy:k}}function la(e,t,o,r=!1,n=!1){return{back:e,current:t,forward:o,replaced:r,position:window.history.length,scroll:n?on():null}}function bc(e){let{history:t,location:o}=window,r={value:ga(e,o)},n={value:t.state};n.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(m,h,v){let k=e.indexOf("#"),p=k>-1?(o.host&&document.querySelector("base")?e:e.slice(k))+m:yc()+e+m;try{t[v?"replaceState":"pushState"](h,"",p),n.value=h}catch(g){console.error(g),o[v?"replace":"assign"](p)}}function a(m,h){i(m,qe({},t.state,la(n.value.back,m,n.value.forward,!0),h,{position:n.value.position}),!0),r.value=m}function u(m,h){let v=qe({},n.value,t.state,{forward:m,scroll:on()});i(v.current,v,!0),i(m,qe({},la(r.value,m,null),{position:v.position+1},h),!1),r.value=m}return{location:r,state:n,push:u,replace:a}}function ba(e){e=Zi(e);let t=bc(e),o=gc(e,t.state,t.location,t.replace);function r(i,a=!0){a||o.pauseListeners(),history.go(i)}let n=qe({location:"",base:e,go:r,createHref:xi.bind(null,e)},t,o);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>t.state.value}),n}var is=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({}),Je=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Je||{}),wc={type:is.Static,value:""},kc=/[a-zA-Z0-9_]/;function _c(e){if(!e)return[[]];if(e==="/")return[[wc]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${o})/"${h}": ${g}`)}let o=Je.Static,r=o,n=[],i;function a(){i&&n.push(i),i=[]}let u=0,m,h="",v="";function k(){h&&(o===Je.Static?i.push({type:is.Static,value:h}):o===Je.Param||o===Je.ParamRegExp||o===Je.ParamRegExpEnd?(i.length>1&&(m==="*"||m==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),i.push({type:is.Param,value:h,regexp:v,repeatable:m==="*"||m==="+",optional:m==="*"||m==="?"})):t("Invalid state to consume buffer"),h="")}function p(){h+=m}for(;ut.length?t.length===1&&t[0]===ot.Static+ot.Segment?1:-1:0}function wa(e,t){let o=0,r=e.score,n=t.score;for(;o0&&t[t.length-1]<0}var Dc={strict:!1,end:!0,sensitive:!1};function Rc(e,t,o){let r=Nc(_c(e.path),o),n=qe(r,{record:e,parent:t,children:[],alias:[]});return t&&!n.record.aliasOf==!t.record.aliasOf&&t.children.push(n),n}function Tc(e,t){let o=[],r=new Map;t=Uo(Dc,t);function n(k){return r.get(k)}function i(k,p,g){let w=!g,b=pa(k);b.aliasOf=g&&g.record;let T=Uo(t,k),N=[b];if("alias"in k){let C=typeof k.alias=="string"?[k.alias]:k.alias;for(let A of C)N.push(pa(qe({},b,{components:g?g.record.components:b.components,path:A,aliasOf:g?g.record:b})))}let R,I;for(let C of N){let{path:A}=C;if(p&&A[0]!=="/"){let P=p.record.path,Z=P[P.length-1]==="/"?"":"/";C.path=p.record.path+(A&&Z+A)}if(R=Rc(C,p,T),g?g.alias.push(R):(I=I||R,I!==R&&I.alias.push(R),w&&k.name&&!fa(R)&&a(k.name)),ka(R)&&m(R),b.children){let P=b.children;for(let Z=0;Z{a(I)}:Es}function a(k){if(Bo(k)){let p=r.get(k);p&&(r.delete(k),o.splice(o.indexOf(p),1),p.children.forEach(a),p.alias.forEach(a))}else{let p=o.indexOf(k);p>-1&&(o.splice(p,1),k.record.name&&r.delete(k.record.name),k.children.forEach(a),k.alias.forEach(a))}}function u(){return o}function m(k){let p=Ic(k,o);o.splice(p,0,k),k.record.name&&!fa(k)&&r.set(k.record.name,k)}function h(k,p){let g,w={},b,T;if("name"in k&&k.name){if(g=r.get(k.name),!g)throw os(Be.MATCHER_NOT_FOUND,{location:k});T=g.record.name,w=qe(ca(p.params,g.keys.filter(I=>!I.optional).concat(g.parent?g.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),k.params&&ca(k.params,g.keys.map(I=>I.name))),b=g.stringify(w)}else if(k.path!=null)b=k.path,g=o.find(I=>I.re.test(b)),g&&(w=g.parse(b),T=g.record.name);else{if(g=p.name?r.get(p.name):o.find(I=>I.re.test(p.path)),!g)throw os(Be.MATCHER_NOT_FOUND,{location:k,currentLocation:p});T=g.record.name,w=qe({},p.params,k.params),b=g.stringify(w)}let N=[],R=g;for(;R;)N.unshift(R.record),R=R.parent;return{name:T,path:b,params:w,matched:N,meta:Ac(N)}}e.forEach(k=>i(k));function v(){o.length=0,r.clear()}return{addRoute:i,resolve:h,removeRoute:a,clearRoutes:v,getRoutes:u,getRecordMatcher:n}}function ca(e,t){let o={};for(let r of t)r in e&&(o[r]=e[r]);return o}function pa(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Oc(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Oc(e){let t={},o=e.props||!1;if("component"in e)t.default=o;else for(let r in e.components)t[r]=typeof o=="object"?o[r]:o;return t}function fa(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ac(e){return e.reduce((t,o)=>qe(t,o.meta),{})}function Ic(e,t){let o=0,r=t.length;for(;o!==r;){let i=o+r>>1;wa(e,t[i])<0?r=i:o=i+1}let n=Vc(e);return n&&(r=t.lastIndexOf(n,r-1)),r}function Vc(e){let t=e;for(;t=t.parent;)if(ka(t)&&wa(e,t)===0)return t}function ka({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ma(e){let t=lt(Gn),o=lt(jn),r=!1,n=null,i=tt(()=>{let v=Ut(e.to);return t.resolve(v)}),a=tt(()=>{let{matched:v}=i.value,{length:k}=v,p=v[k-1],g=o.matched;if(!p||!g.length)return-1;let w=g.findIndex(ns.bind(null,p));if(w>-1)return w;let b=ha(v[k-2]);return k>1&&ha(p)===b&&g[g.length-1].path!==b?g.findIndex(ns.bind(null,v[k-2])):w}),u=tt(()=>a.value>-1&&Uc(o.params,i.value.params)),m=tt(()=>a.value>-1&&a.value===o.matched.length-1&&zo(o.params,i.value.params));function h(v={}){if($c(v)){let k=t[Ut(e.replace)?"replace":"push"](Ut(e.to)).catch(Es);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>k),k}return Promise.resolve()}return{route:i,href:tt(()=>i.value.href),isActive:u,isExactActive:m,navigate:h}}function Pc(e){return e.length===1?e[0]:e}var qc=xs({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:ma,setup(e,{slots:t}){let o=ze(ma(e)),{options:r}=lt(Gn),n=tt(()=>({[va(e.activeClass,r.linkActiveClass,"router-link-active")]:o.isActive,[va(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:o.isExactActive}));return()=>{let i=t.default&&Pc(t.default(o));return e.custom?i:Ne("a",{"aria-current":o.isExactActive?e.ariaCurrentValue:null,href:o.href,onClick:o.navigate,class:n.value},i)}}}),Mc=qc;function $c(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Uc(e,t){for(let o in t){let r=t[o],n=e[o];if(typeof r=="string"){if(r!==n)return!1}else if(!gt(n)||n.length!==r.length||r.some((i,a)=>i.valueOf()!==n[a].valueOf()))return!1}return!0}function ha(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}var va=(e,t,o)=>e??t??o,Lc=xs({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:o}){let r=lt(Wn),n=tt(()=>e.route||r.value),i=lt(jo,0),a=tt(()=>{let h=Ut(i),{matched:v}=n.value,k;for(;(k=v[h])&&!k.components;)h++;return h}),u=tt(()=>n.value.matched[a.value]);ts(jo,tt(()=>a.value+1)),ts(ia,u),ts(Wn,n);let m=Ze();return He(()=>[m.value,u.value,e.name],([h,v,k],[p,g,w])=>{v&&(v.instances[k]=h,g&&g!==v&&h&&h===p&&(v.leaveGuards.size||(v.leaveGuards=g.leaveGuards),v.updateGuards.size||(v.updateGuards=g.updateGuards))),h&&v&&(!g||!ns(v,g)||!p)&&(v.enterCallbacks[k]||[]).forEach(b=>b(h))},{flush:"post"}),()=>{let h=n.value,v=e.name,k=u.value,p=k&&k.components[v];if(!p)return ya(o.default,{Component:p,route:h});let g=k.props[v],w=g?g===!0?h.params:typeof g=="function"?g(h):g:null,T=Ne(p,qe({},w,t,{onVnodeUnmounted:N=>{N.component.isUnmounted&&(k.instances[v]=null)},ref:m}));return ya(o.default,{Component:T,route:h})||T}}});function ya(e,t){if(!e)return null;let o=e(t);return o.length===1?o[0]:o}var Wo=Lc;function _a(e){let t=Tc(e.routes,e),o=e.parseQuery||oa,r=e.stringifyQuery||Go,n=e.history,i=Cs(),a=Cs(),u=Cs(),m=bn(Gt),h=Gt;rs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");let v=Fn.bind(null,U=>""+U),k=Fn.bind(null,Ji),p=Fn.bind(null,_s);function g(U,te){let L,K;return Bo(U)?(L=t.getRecordMatcher(U),K=te):K=U,t.addRoute(K,L)}function w(U){let te=t.getRecordMatcher(U);te&&t.removeRoute(te)}function b(){return t.getRoutes().map(U=>U.record)}function T(U){return!!t.getRecordMatcher(U)}function N(U,te){if(te=qe({},te||m.value),typeof U=="string"){let _=zn(o,U,te.path),S=t.resolve({path:_.path},te),q=n.createHref(_.fullPath);return qe(_,S,{params:p(S.params),hash:_s(_.hash),redirectedFrom:void 0,href:q})}let L;if(U.path!=null)L=qe({},U,{path:zn(o,U.path,te.path).path});else{let _=qe({},U.params);for(let S in _)_[S]==null&&delete _[S];L=qe({},U,{params:k(_)}),te.params=k(te.params)}let K=t.resolve(L,te),fe=U.hash||"";K.params=v(p(K.params));let Ce=Qi(r,qe({},U,{hash:Yi(fe),path:K.path})),ce=n.createHref(Ce);return qe({fullPath:Ce,hash:fe,query:r===Go?ra(U.query):U.query||{}},K,{redirectedFrom:void 0,href:ce})}function R(U){return typeof U=="string"?zn(o,U,m.value.path):qe({},U)}function I(U,te){if(h!==U)return os(Be.NAVIGATION_CANCELLED,{from:te,to:U})}function C(U){return Z(U)}function A(U){return C(qe(R(U),{replace:!0}))}function P(U,te){let L=U.matched[U.matched.length-1];if(L&&L.redirect){let{redirect:K}=L,fe=typeof K=="function"?K(U,te):K;return typeof fe=="string"&&(fe=fe.includes("?")||fe.includes("#")?fe=R(fe):{path:fe},fe.params={}),qe({query:U.query,hash:U.hash,params:fe.path!=null?{}:U.params},fe)}}function Z(U,te){let L=h=N(U),K=m.value,fe=U.state,Ce=U.force,ce=U.replace===!0,_=P(L,K);if(_)return Z(qe(R(_),{state:typeof _=="object"?qe({},fe,_.state):fe,force:Ce,replace:ce}),te||L);let S=L;S.redirectedFrom=te;let q;return!Ce&&Xi(r,K,L)&&(q=os(Be.NAVIGATION_DUPLICATED,{to:S,from:K}),Se(K,K,!0,!1)),(q?Promise.resolve(q):z(S,K)).catch(F=>Vt(F)?Vt(F,Be.NAVIGATION_GUARD_REDIRECT)?F:Re(F):pe(F,S,K)).then(F=>{if(F){if(Vt(F,Be.NAVIGATION_GUARD_REDIRECT))return Z(qe({replace:ce},R(F.to),{state:typeof F.to=="object"?qe({},fe,F.to.state):fe,force:Ce}),te||S)}else F=se(S,K,!0,ce,fe);return ae(S,K,F),F})}function Y(U,te){let L=I(U,te);return L?Promise.reject(L):Promise.resolve()}function j(U){let te=W.values().next().value;return te&&typeof te.runWithContext=="function"?te.runWithContext(U):U()}function z(U,te){let L,[K,fe,Ce]=aa(U,te);L=Kn(K.reverse(),"beforeRouteLeave",U,te);for(let _ of K)_.leaveGuards.forEach(S=>{L.push(Bt(S,U,te))});let ce=Y.bind(null,U,te);return L.push(ce),le(L).then(()=>{L=[];for(let _ of i.list())L.push(Bt(_,U,te));return L.push(ce),le(L)}).then(()=>{L=Kn(fe,"beforeRouteUpdate",U,te);for(let _ of fe)_.updateGuards.forEach(S=>{L.push(Bt(S,U,te))});return L.push(ce),le(L)}).then(()=>{L=[];for(let _ of Ce)if(_.beforeEnter)if(gt(_.beforeEnter))for(let S of _.beforeEnter)L.push(Bt(S,U,te));else L.push(Bt(_.beforeEnter,U,te));return L.push(ce),le(L)}).then(()=>(U.matched.forEach(_=>_.enterCallbacks={}),L=Kn(Ce,"beforeRouteEnter",U,te,j),L.push(ce),le(L))).then(()=>{L=[];for(let _ of a.list())L.push(Bt(_,U,te));return L.push(ce),le(L)}).catch(_=>Vt(_,Be.NAVIGATION_CANCELLED)?_:Promise.reject(_))}function ae(U,te,L){u.list().forEach(K=>j(()=>K(U,te,L)))}function se(U,te,L,K,fe){let Ce=I(U,te);if(Ce)return Ce;let ce=te===Gt,_=rs?history.state:{};L&&(K||ce?n.replace(U.fullPath,qe({scroll:ce&&_&&_.scroll},fe)):n.push(U.fullPath,fe)),m.value=U,Se(U,te,L,ce),Re()}let re;function ue(){re||(re=n.listen((U,te,L)=>{if(!oe.listening)return;let K=N(U),fe=P(K,oe.currentRoute.value);if(fe){Z(qe(fe,{replace:!0,force:!0}),K).catch(Es);return}h=K;let Ce=m.value;rs&&ta(Ho(Ce.fullPath,L.delta),on()),z(K,Ce).catch(ce=>Vt(ce,Be.NAVIGATION_ABORTED|Be.NAVIGATION_CANCELLED)?ce:Vt(ce,Be.NAVIGATION_GUARD_REDIRECT)?(Z(qe(R(ce.to),{force:!0}),K).then(_=>{Vt(_,Be.NAVIGATION_ABORTED|Be.NAVIGATION_DUPLICATED)&&!L.delta&&L.type===Hn.pop&&n.go(-1,!1)}).catch(Es),Promise.reject()):(L.delta&&n.go(-L.delta,!1),pe(ce,K,Ce))).then(ce=>{ce=ce||se(K,Ce,!1),ce&&(L.delta&&!Vt(ce,Be.NAVIGATION_CANCELLED)?n.go(-L.delta,!1):L.type===Hn.pop&&Vt(ce,Be.NAVIGATION_ABORTED|Be.NAVIGATION_DUPLICATED)&&n.go(-1,!1)),ae(K,Ce,ce)}).catch(Es)}))}let ke=Cs(),he=Cs(),me;function pe(U,te,L){Re(U);let K=he.list();return K.length?K.forEach(fe=>fe(U,te,L)):console.error(U),Promise.reject(U)}function Te(){return me&&m.value!==Gt?Promise.resolve():new Promise((U,te)=>{ke.add([U,te])})}function Re(U){return me||(me=!U,ue(),ke.list().forEach(([te,L])=>U?L(U):te()),ke.reset()),U}function Se(U,te,L,K){let{scrollBehavior:fe}=e;if(!rs||!fe)return Promise.resolve();let Ce=!L&&sa(Ho(U.fullPath,0))||(K||!L)&&history.state&&history.state.scroll||null;return _t().then(()=>fe(U,te,Ce)).then(ce=>ce&&ea(ce)).catch(ce=>pe(ce,U,te))}let D=U=>n.go(U),V,W=new Set,oe={currentRoute:m,listening:!0,addRoute:g,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:T,getRoutes:b,resolve:N,options:e,push:C,replace:A,go:D,back:()=>D(-1),forward:()=>D(1),beforeEach:i.add,beforeResolve:a.add,afterEach:u.add,onError:he.add,isReady:Te,install(U){U.component("RouterLink",Mc),U.component("RouterView",Wo),U.config.globalProperties.$router=oe,Object.defineProperty(U.config.globalProperties,"$route",{enumerable:!0,get:()=>Ut(m)}),rs&&!V&&m.value===Gt&&(V=!0,C(n.location).catch(K=>{}));let te={};for(let K in Gt)Object.defineProperty(te,K,{get:()=>m.value[K],enumerable:!0});U.provide(Gn,oe),U.provide(jn,Fs(te)),U.provide(Wn,m);let L=U.unmount;W.add(U),U.unmount=function(){W.delete(U),W.size<1&&(h=Gt,re&&re(),re=null,m.value=Gt,V=!1,me=!1),L()}}};function le(U){return U.reduce((te,L)=>te.then(()=>j(L)),Promise.resolve())}return oe}function Ea(e){return lt(jn)}function Ca(e,t){return t?.split(".").reduce((o,r)=>o?.[r],e)}function Ko(e=null,t=new Map){let o=ze({}),r=[],n=!1,i=new Proxy(o,{get(a,u){return typeof u=="string"&&u.startsWith("__v_")||Reflect.has(a,u)?Reflect.get(a,u):e?.[u]}});return Object.defineProperty(o,"parent",{value:e,configurable:!0}),Object.defineProperty(o,"viewState",{get:()=>i}),i.watch=(a,u,m=!1)=>{let h=typeof a=="function"?()=>a(i):()=>Ca(i,a),v=He(h,u,{deep:m,flush:"post"});return r.push(v),_t(()=>{n||u(h(),h())}),v},i.watchGroup=(a,u)=>i.watch(()=>a.map(m=>Ca(i,m)),u,!0),i.on=(a,u)=>{if(a==="dispose")return r.push(u),()=>{};t.has(a)||t.set(a,new Set),t.get(a).add(u);let m=()=>t.get(a)?.delete(u);return r.push(m),m},i.emit=(a,...u)=>{for(let m of[...t.get(a)||[]])m({},...u)},i.dispose=()=>{n=!0,r.splice(0).reverse().forEach(a=>a())},Us(i.dispose),i}function mt(){let e=new Set,t=new Set,o=!1,r=(i,a=0)=>{if(o)return;let u=setTimeout(()=>{e.delete(u),i()},a);return e.add(u),u};r.cancel=i=>{clearTimeout(i),e.delete(i)};let n=(i,a)=>{if(o)return;let u=setInterval(i,a);return t.add(u),u};return n.cancel=i=>{clearInterval(i),t.delete(i)},Us(()=>{o=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:r,interval:n}}function as(){let e=[];return Us(()=>e.forEach(t=>t())),(t,o,r,n)=>{t.addEventListener(o,r,n),e.push(()=>t.removeEventListener(o,r,n))}}var Na=function(e,t,o,r){e.title="Main",e.user={status:"connection"},e.site_options,e.toasts=[],e.removeToast=function(m){let h=e.toasts.indexOf(m);h!==-1&&e.toasts.splice(h,1)},e.addToast=function(m){return e.toasts.push(m),r(function(){e.removeToast(m)},8e3),m},e.path=o.url(),e.paths=o.path().substring(1).split("/"),e.darkMode=function(m){localStorage.setItem("darkMode",m),e.isDarkMode=m;let h="/css/prism-okaidia.css",v="/css/prism.css";if(m){$("body").addClass("dark-mode");let p=document.createElement("link");p.href=h,p.rel="stylesheet",document.head.append(p),$(`link[href='${v}']`).remove()}else{$("body").removeClass("dark-mode");let p=document.createElement("link");p.href=v,p.rel="stylesheet",document.head.append(p),$(`link[href='${h}']`).remove()}var k=document.querySelector(".floatingchat-container-wrap-mo498 .floating-chat-kofi-text-container-wrap");k&&(k.style.backgroundColor=m?"#FAF9F6":"#1A1815",k.style.color=m?"#1A1815":"#FAF9F6"),e.emit("dark-mode",m)},e.darkMode(localStorage.getItem("darkMode")=="true");function n(){t.get("/api/user").then(m=>{m&&(e.user=m.data)},()=>{e.user=null})}n();function i(){t.get("/api/options").then(m=>{m&&(e.site_options=m.data)},()=>{e.site_options=null})}i();function a(){t.get("/api/message").then(m=>{m&&(e.generalMessage=m.data)},()=>{e.generalMessage=null})}a();function u(m,h){h&&(e.title=h.title),e.path=o.url(),e.paths=o.path().substring(1).split("/")}e.on("routeChange",u),e.on("routeUpdate",u)},Sa=function(e,t){let o=as()},Da=function(e,t,o,r,n){e.terms="",e.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},e.saving=!1,e.message=null,e.error=null,n.load().then(u=>{e.quota=u},console.error);function i(){t.get("/api/user/default").then(u=>{let m=u.data||{};m.terms&&(e.terms=m.terms.join(` @@ -17,7 +17,7 @@ while being at `).map((he,me)=>me===0?he:ke+he).join(` `)}else typeof j=="number"||typeof j=="boolean"?ue=String(j):ue=JSON.stringify(j);Z.push(`${se}${ue}${re}`)}),Z.push("}"),Z.join(` `)}function h(N){let R=[],I="",C=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,A=0,P;for(;P=C.exec(N);)I+=N.slice(A,P.index),A=C.lastIndex,R.push({key:P[1],op:P[2]||"=",val:P[3]});return I+=N.slice(A),{filters:R,free:I.trim().toLowerCase()}}function v(N,R){for(let I of R.filters){let C=(P,Z,Y)=>{let j=parseFloat(P),z=parseFloat(Z);return Y==="="?String(P)===String(Z):Y==="!="?String(P)!==String(Z):Y===">="?j>=z:Y==="<="?j<=z:Y===">"?j>z:Y==="<"?jR&&A._bucket!==R?!1:v(A,N)),C=e.query.group;if(C){let A=Y=>C==="module"?Y.module:Y.displayMessage||Y.message||"_",P=new Map;for(let Y of I){let j=A(Y);if(P.has(j)){let z=P.get(j);z.count++,z._related.push(Y),new Date(Y.ts)>new Date(z.ts)&&(z.ts=Y.ts,z._url=Y._url,z._status=Y._status),new Date(Y.ts)new Date(j.ts).getTime()>=Z).length;I=Array.from(P.values())}else I=I.map((A,P)=>(A._key="row:"+P+":"+A.ts,A._related=[A],A._firstSeen=A.ts,A._lastHourCount=0,A.count=1,A));e.query.sort==="count"?I.sort((A,P)=>P.count-A.count||new Date(P.ts)-new Date(A.ts)):I.sort((A,P)=>new Date(P.ts)-new Date(A.ts)),e.visible=I}function p(N){let R=N?e.entries.length:0,I=N?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:R,limit:I}}).then(C=>{let A=(C.data.entries||[]).map(u);e.entries=N?e.entries.concat(A):A,e.available=!!C.data.available,e.cap=C.data.max||e.cap,e.total=C.data.total||e.entries.length,k()},C=>console.error(C))}e.loadMore=()=>p(!0),e.canLoadMore=()=>e.entries.length{let R=N.data||{},I=R.prev24h?Math.round((R.last24h-R.prev24h)/R.prev24h*100):0;e.stats={last24h:R.last24h||0,prev24h:R.prev24h||0,delta:I,severity:R.severity||{error:0,warn:0,info:0},unique:R.unique||{error:0,warn:0,info:0},buckets:R.buckets||[],dropped:R.dropped||0}},N=>console.error(N))}function w(){p(),g()}e.barPx=(N,R)=>{let I=e.stats.buckets||[],C=0;for(let Y of I)C=Math.max(C,(Y.error||0)+(Y.warn||0)+(Y.info||0));if(!C)return 0;let A=(N.error||0)+(N.warn||0)+(N.info||0);if(!A)return 0;let P=Math.round(A/C*60),Z=N[R]||0;return Math.round(Z/A*P)},e.bucketTitle=N=>`${new Date(N.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${N.error||0} err \xB7 ${N.warn||0} warn \xB7 ${N.info||0} info`,e.toggle=N=>{e.expanded[N._key]=!e.expanded[N._key]},e.setBucket=N=>{e.query.bucket=N},e.refreshNow=w,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(w,N=>console.error(N))},e.exportCsv=()=>{let N=["ts","level","module","displayMessage","_status","_url","_repoId"],R=[N.join(",")];for(let P of e.visible)R.push(N.map(Z=>{let Y=P[Z]==null?"":String(P[Z]);return/[",\n]/.test(Y)?`"${Y.replace(/"/g,'""')}"`:Y}).join(","));let I=new Blob([R.join(` -`)],{type:"text/csv;charset=utf-8"}),C=URL.createObjectURL(I),A=document.createElement("a");A.href=C,A.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(C)};function b(N){e.copyHint=`${N} copied`,n.timeout(()=>{e.copyHint=""},1500)}e.copyJson=N=>{navigator.clipboard.writeText(N._detailJson).then(()=>b("JSON"))},e.copyCurl=N=>{if(!N._url)return;let I=`curl -X ${N._method||"GET"} '${window.location.origin}${N._url}'`;navigator.clipboard.writeText(I).then(()=>b("curl"))},w();let T=r(()=>{e.query.autoRefresh&&w()},15e3);e.on("dispose",()=>r.cancel(T)),e.watch("query.search",k),e.watch("query.bucket",k),e.watch("query.sort",k),e.watch("query.group",k)},Ga=function(e,t,o,r){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null;function n(p){if(p==null)return"\u2014";for(var g=["B","KB","MB","GB","TB"],w=0,b=p;b>=1024&&w0?1:0)+" "+g[w]}e.humanBytes=n;function i(p){if(!p)return"\u2014";var g=Math.floor(p/86400),w=Math.floor(p%86400/3600),b=Math.floor(p%3600/60);return g>0?g+"d "+(w<10?"0":"")+w+"h":w>0?w+"h "+(b<10?"0":"")+b+"m":b+"m"}e.humanDuration=i;function a(p){return p==null?"\u2014":p>=1e6?(p/1e6).toFixed(1)+"M":p>=1e3?(p/1e3).toFixed(1)+"K":String(p)}e.humanNum=a,e.queueTotal=function(p){return p?(p.waiting||0)+(p.active||0)+(p.delayed||0)+(p.failed||0):0},e.statusCount=function(p){if(!e.data||!e.data.repos)return 0;for(var g=e.data.repos.statusBreakdown||[],w=0;wh[w])&&(h[w]=g[w])})})},function(p){e.loading=!1,e.error=p.data&&p.data.error||"Failed to load overview"})}v();var k=r(v,3e4);e.on("dispose",function(){r.cancel(k)})};var ja=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ma(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>$a(e,t.http)},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>Ta(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Oa(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Aa(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Pa(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Jo(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Jo(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId",template:"partials/conference.htm",title:"Conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>qa(e,t.http,t.location,t.params)},{path:"/faq",template:"partials/faq.htm",title:"FAQ \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Sa(e,t.http)},{path:"/profile",template:"partials/profile.htm",title:"Your settings \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Da(e,t.http,t.translate,t.timeout,t.quotaService)},{path:"/claim",template:"partials/claim.htm",title:"Claim an anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ra(e,t.http,t.location)},{path:"/pr/:pullRequestId/:path(.*)*",template:"partials/pullRequest.htm",title:"Anonymous pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ia(e,t.http,t.location,t.params,t.html)},{path:"/gist/:gistId/:path(.*)*",template:"partials/gist.htm",title:"Anonymous gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Va(e,t.http,t.location,t.params,t.html)},{path:"/r/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Yo(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/repository/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Yo(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/admin/",template:"partials/admin/overview.htm",title:"Admin \xB7 Overview \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ga(e,t.http,t.location,t.interval)},{path:"/admin/repositories",template:"partials/admin/repositories.htm",title:"Admin \xB7 Repositories \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ua(e,t.http,t.location)},{path:"/admin/users",template:"partials/admin/users.htm",title:"Admin \xB7 Users \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>La(e,t.http,t.location)},{path:"/admin/users/:username",template:"partials/admin/user.htm",title:"Admin \xB7 User details \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Fa(e,t.http,t.location,t.params)},{path:"/admin/conferences",template:"partials/admin/conferences.htm",title:"Admin \xB7 Conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>za(e,t.http,t.location)},{path:"/admin/queues",template:"partials/admin/queues.htm",title:"Admin \xB7 Queues \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ha(e,t.http,t.location,t.interval,t.timeout)},{path:"/admin/errors",template:"partials/admin/errors.htm",title:"Admin \xB7 Errors \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ba(e,t.http,t.location,t.interval)},{path:"/404",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/:pathMatch(.*)*",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",setup:()=>{}}];var Hc={class:"container paper-page connections-page"},Bc={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},Gc={key:1,role:"status"},jc=["disabled"],Wc={key:3},Kc={class:"connections-grid"},Yc={key:0},Jc={class:"connection-title"},Qc={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},Xc={class:"connection-actions"},Zc={key:0,class:"btn btn-ink",target:"_self",href:"/github/app/install"},xc={key:1,class:"connection-installations"},ep={key:0},tp=["href"],sp={class:"sr-only"},np=["disabled"],op={class:"connection-title"},rp={key:0,target:"_self",href:"/github/login",class:"btn btn-outline-ink"},ip={key:1,class:"connection-revoke"},ap={key:0},lp=["disabled"],dp={class:"connection-resources"},up={class:"connection-title"},cp={class:"connection-count"},pp={key:0,class:"connection-empty"},fp={class:"connection-resource-name"},mp={key:0,class:"connection-resource-actions"},hp=["disabled","onClick"],vp=["disabled","onClick"],yp={key:1,class:"connection-help",role:"status"},gp=["disabled","onClick"];function Wa(e,t){return l(),d("div",Hc,[t[20]||(t[20]=ge('
My work / GitHub connections

GitHub connections

Manage how GitHub shares your code. Your anonymizations and URLs stay the same.

',2)),e.connectionError?(l(),d("p",Bc,c(e.connectionError),1)):f("v-if",!0),!e.connections&&!e.connectionError?(l(),d("p",Gc,"Loading your connections\u2026")):f("v-if",!0),!e.connections&&e.connectionError?(l(),d("button",{key:2,class:"btn btn-outline-ink",disabled:e.busy,onClick:t[0]||(t[0]=o=>e.loadConnections())},"Try again",8,jc)):f("v-if",!0),e.connections?(l(),d("div",Wc,[s("div",Kc,[e.connections.appEnabled?(l(),d("section",Yc,[t[8]||(t[8]=s("div",{class:"connection-top"},[s("i",{class:"fab fa-github","aria-hidden":"true"}),s("span",{class:"connection-badge"},"Recommended")],-1)),s("div",Jc,[t[3]||(t[3]=s("h2",null,"GitHub App",-1)),s("span",{class:O(["connection-status",{"is-connected":e.connections.appConnected&&!e.connections.appError}])},c(e.connections.appError?"Needs attention":e.connections.appConnected?"Connected":"Not connected"),3)]),t[9]||(t[9]=s("p",null,"Read-only access to the repositories you choose.",-1)),e.connections.appError?(l(),d("p",Qc,c(e.connections.appError)+". Reconnect to restore access.",1)):f("v-if",!0),s("div",Xc,[e.connections.appConnected&&!e.connections.appError?(l(),d("a",Zc,[...t[4]||(t[4]=[y("Manage repository access ",-1),s("i",{class:"fas fa-external-link-alt","aria-hidden":"true"},null,-1)])])):f("v-if",!0),s("a",{class:O(e.connections.appConnected&&!e.connections.appError?"connection-link":"btn btn-ink"),target:"_self",href:"/github/app/login"},c(e.connections.appConnected?"Reconnect account":"Connect GitHub account"),3)]),t[10]||(t[10]=s("p",{class:"connection-help"},"Choose repositories on GitHub. Organization access may need an administrator's approval.",-1)),e.connections.installations?.length?(l(),d("ul",xc,[(l(!0),d(J,null,ne(e.connections.installations,o=>(l(),d("li",{key:o.id},[s("div",null,[s("strong",null,c(o.account),1),o.suspended?(l(),d("span",ep," \xB7 Suspended")):f("v-if",!0)]),s("a",{target:"_self",href:"/github/app/install?installationId="+o.id},[t[5]||(t[5]=y("Manage access ",-1)),s("span",sp,"for "+c(o.account),1),t[6]||(t[6]=y(" \u2192",-1))],8,tp)]))),128))])):f("v-if",!0),s("button",{class:"connection-link",disabled:e.busy,onClick:t[1]||(t[1]=o=>e.loadConnections())},[...t[7]||(t[7]=[s("i",{class:"fas fa-sync-alt","aria-hidden":"true"},null,-1),y(" Refresh access",-1)])],8,np)])):f("v-if",!0),s("section",null,[t[13]||(t[13]=s("div",{class:"connection-top"},[s("i",{class:"fas fa-key","aria-hidden":"true"}),s("span",{class:"connection-badge connection-badge-muted"},"Legacy")],-1)),s("div",op,[t[11]||(t[11]=s("h2",null,"GitHub OAuth",-1)),s("span",{class:O(["connection-status",{"is-connected":e.connections.oauthConnected}])},c(e.connections.oauthConnected?"Connected":"Not connected"),3)]),t[14]||(t[14]=s("p",null,"For existing OAuth anonymizations and gists.",-1)),t[15]||(t[15]=s("p",{class:"connection-help"},"This connection uses GitHub's broader repository permissions. Existing work keeps using it until you switch below.",-1)),e.connections.oauthEnabled?(l(),d("a",rp,c(e.connections.oauthConnected?"Reconnect OAuth":"Connect legacy OAuth"),1)):f("v-if",!0),e.connections.oauthConnected?(l(),d("div",ip,[e.connections.gistCount?(l(),d("p",ap,c(e.connections.gistCount)+" gist(s) still require OAuth.",1)):f("v-if",!0),t[12]||(t[12]=s("p",null,"Switch all dependent repositories before revoking access. Gists still require OAuth.",-1)),e.connections.appConnected?(l(),d("button",{key:1,class:"connection-link connection-danger",disabled:e.busy||e.connections.gistCount||e.connections.resources.some(o=>o.connection==="oauth"),onClick:t[2]||(t[2]=o=>e.disconnectOAuth())},"Revoke OAuth access",8,lp)):f("v-if",!0)])):f("v-if",!0)])]),s("section",dp,[s("div",up,[t[16]||(t[16]=s("h2",null,"Repository connections",-1)),s("span",cp,c(e.connections.resources?.length||0)+" resources",1)]),t[18]||(t[18]=s("p",null,"Check access, then switch each resource to the GitHub App. After reinstalling the App, reconnect existing resources here to keep their anonymous URLs and published snapshots.",-1)),e.connections.resources?.length?f("v-if",!0):(l(),d("div",pp,[...t[17]||(t[17]=[s("i",{class:"fas fa-code-branch","aria-hidden":"true"},null,-1),s("div",null,[s("h3",null,"No repository connections yet"),s("p",null,"Your repositories and pull requests will appear here once you anonymize them.")],-1),s("a",{class:"connection-link",href:"/anonymize"},"New anonymization \u2192",-1)])])),(l(!0),d(J,null,ne(e.connections.resources,o=>(l(),d("div",{class:"connection-resource",key:o.type+o.id},[s("div",fp,[s("strong",null,c(o.name||o.id),1),s("small",null,c(o.type)+" \xB7 "+c(o.id),1)]),s("span",{class:O(["connection-badge",{"connection-badge-muted":o.connection==="oauth"}])},c(o.connection==="github-app"?"Read-only App":"Legacy OAuth"),3),o.status!=="archived"&&e.connections.appEnabled&&e.connections.appConnected?(l(),d("div",mp,[s("button",{class:"btn btn-outline-ink",disabled:e.busy,onClick:r=>e.changeConnection(o,"github-app",!0)},"Check read-only access",8,hp),o.eligible?(l(),d("button",{key:0,class:"btn btn-ink",disabled:e.busy,onClick:r=>e.changeConnection(o,"github-app",!1)},c(o.connection==="github-app"?"Reconnect read-only access":"Switch to read-only access"),9,vp)):f("v-if",!0),o.eligible===!1?(l(),d("span",yp,"Access unavailable. Allow this repository on GitHub, then check again.")):f("v-if",!0)])):f("v-if",!0),o.status!=="archived"&&o.connection==="github-app"&&e.connections.oauthConnected?(l(),d("button",{key:1,class:"connection-link",disabled:e.busy,onClick:r=>e.changeConnection(o,"oauth",!1)},"Use OAuth",8,gp)):f("v-if",!0)]))),128)),t[19]||(t[19]=s("p",{class:"connection-footnote"},[s("i",{class:"fas fa-info-circle","aria-hidden":"true"}),y(" Removing access stops new fetches from GitHub. Published content keeps its current expiration and removal settings.")],-1))])])):f("v-if",!0)])}var bp={class:"container paper-page auth-page"},wp={class:"auth-layout"},kp={class:"auth-options"},_p={key:0},Ep={key:0,class:"btn btn-ink auth-continue",target:"_self",href:"/github/login?recover=1"},Cp={key:1},Np={key:1},Sp={key:2,class:"auth-legacy"},Dp={key:3,role:"status"};function Ka(e,t){return l(),d("div",bp,[t[5]||(t[5]=s("a",{class:"auth-back",href:"/"},[s("i",{class:"fas fa-arrow-left","aria-hidden":"true"}),y(" Anonymous GitHub")],-1)),s("div",wp,[t[4]||(t[4]=ge('
Your research, ready for review

Your code.
Your identity,
protected.
Sign in to GitHub

Sign in to create and manage your anonymizations.

',1)),s("div",kp,[e.accountRecovery?(l(),d("section",_p,[t[0]||(t[0]=s("h2",null,"Verify your existing account",-1)),t[1]||(t[1]=s("p",null,"We found an existing account. Verify it with your previous GitHub connection to keep your anonymizations. Future sign-ins will use the GitHub App.",-1)),e.site_options?.GITHUB_OAUTH_ENABLED?(l(),d("a",Ep,"Verify with previous GitHub connection")):(l(),d("p",Cp,"Account verification is currently unavailable. Please try again later."))])):f("v-if",!0),e.site_options?.GITHUB_APP_ENABLED&&!e.accountRecovery?(l(),d("section",Np,[...t[2]||(t[2]=[ge('
Read-only access

Continue with GitHub

Connect through the GitHub App with read-only repository access.

  • You choose which repositories to share
  • No permission to write to your code
Sign in with GitHub Your existing anonymizations and connections stay with your account.',6)])])):f("v-if",!0),!e.site_options?.GITHUB_APP_ENABLED&&e.site_options?.GITHUB_OAUTH_ENABLED&&!e.accountRecovery?(l(),d("section",Sp,[...t[3]||(t[3]=[s("div",{class:"connection-title"},[s("h2",null,"Continue with GitHub")],-1),s("p",null,"Sign in to access your account. GitHub OAuth includes write access to private repositories.",-1),s("a",{class:"connection-link",target:"_self",href:"/github/login"},[y("Sign in with GitHub "),s("i",{class:"fas fa-arrow-right","aria-hidden":"true"})],-1)])])):f("v-if",!0),e.site_options&&!e.site_options.GITHUB_APP_ENABLED&&!e.site_options.GITHUB_OAUTH_ENABLED?(l(),d("p",Dp,"GitHub sign-in is currently unavailable. Please try again later.")):f("v-if",!0)])])])}var Rp={class:"paper-empty"};function Ya(e,t){return l(),d("div",Rp,[...t[0]||(t[0]=[ge('
Error \xB7 404

This link
isn\u2019t here.

The anonymous mirror you\u2019re looking for has expired, been removed by its owner, or never existed. If you received this URL from an author, ask them to re-issue it.

',1)])])}var Tp={class:"container paper-page admin-page"},Op={class:"admin-summary"},Ap={class:"summary-total"},Ip={class:"count"},Vp={class:"count"},Pp={class:"count"},qp={class:"count"},Mp={class:"count"},$p={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},Up={class:"w-100 admin-filter-toolbar","aria-label":"Conferences","accept-charset":"UTF-8"},Lp={class:"admin-filter-row"},Fp={class:"search-wrap"},zp={type:"search",class:"form-control",placeholder:"Search conferences\u2026",autocomplete:"off"},Hp={key:0,class:"admin-search-hint"},Bp={class:"admin-filter-inline","aria-label":"Pagination"},Gp=["disabled"],jp={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},Wp=["disabled"],Kp={key:0,class:"admin-filter-row"},Yp={class:"admin-active-chips"},Jp={class:"key"},Qp=["onClick"],Xp={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},Zp={class:"paper-table-head",role:"row"},xp={role:"columnheader"},ef={role:"columnheader"},tf={role:"columnheader"},sf={class:"paper-table-row",role:"row"},nf={class:"cell-anon",role:"cell"},of={class:"anon-text"},rf=["textContent","href"],af={class:"anon-sub"},lf={class:"cell-status",role:"cell"},df=["textContent"],uf={class:"cell-views num",role:"cell"},cf=["textContent","href"],pf={class:"cell-expires",role:"cell"},ff={class:"cell-actions",role:"cell"},mf={class:"dropdown"},hf={class:"dropdown-menu dropdown-menu-right"},vf=["href"],yf=["href"],gf=["href"],bf=["onClick"],wf={key:0,class:"paper-table-empty"},kf={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},_f={style:{"font-size":"12px",color:"var(--ink-muted)"}},Ef={key:0,class:"pagination-compact"},Cf=["disabled"],Nf=["max"],Sf=["disabled"],Df={class:"admin-filter-inline"},Rf={class:"form-control form-control-sm"};function Ja(e,t){let o=be("field"),r=be("form");return l(),d("div",Tp,[t[42]||(t[42]=ge('
Admin \xA0/\xA0 Conferences

Conferences

',3)),s("div",Op,[s("span",Ap,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),s("span",{class:O(["summary-pill ok",{active:e.query?.ready}]),title:"Toggle ready filter",onClick:t[0]||(t[0]=n=>{e.query.ready=!e.query.ready,e.query.page=1})},[t[13]||(t[13]=y("Ready ",-1)),s("span",Ip,c(e.fmt?.number(e.statusCountFor("ready"))),1)],2),s("span",{class:O(["summary-pill warn",{active:e.query?.preparing}]),title:"Toggle preparing filter",onClick:t[1]||(t[1]=n=>{e.query.preparing=!e.query.preparing,e.query.page=1})},[t[14]||(t[14]=y("Preparing ",-1)),s("span",Vp,c(e.fmt?.number(e.statusCountFor("preparing"))),1)],2),s("span",{class:O(["summary-pill error",{active:e.query?.error}]),title:"Toggle errored filter",onClick:t[2]||(t[2]=n=>{e.query.error=!e.query.error,e.query.page=1})},[t[15]||(t[15]=y("Errored ",-1)),s("span",Pp,c(e.fmt?.number(e.statusCountFor("error"))),1)],2),s("span",{class:O(["summary-pill",{active:e.query?.expired}]),title:"Toggle expired filter",onClick:t[3]||(t[3]=n=>{e.query.expired=!e.query.expired,e.query.page=1})},[t[16]||(t[16]=y("Expired ",-1)),s("span",qp,c(e.fmt?.number(e.statusCountFor("expired"))),1)],2),s("span",{class:O(["summary-pill",{active:e.query?.removed}]),title:"Toggle removed filter",onClick:t[4]||(t[4]=n=>{e.query.removed=!e.query.removed,e.query.page=1})},[t[17]||(t[17]=y("Removed ",-1)),s("span",Mp,c(e.fmt?.number(e.statusCountFor("removed"))),1)],2)]),e.fetchError?(l(),d("div",$p,[t[18]||(t[18]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fetchError),1)])):f("v-if",!0),E((l(),d("form",Up,[s("div",Lp,[s("div",Fp,[E(s("input",zp,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(l(),d("span",Hp,"/"))]),t[22]||(t[22]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",onClick:t[5]||(t[5]=n=>e.exportCsv())},[...t[19]||(t[19]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])]),s("span",Bp,[s("button",{class:"btn btn-sm",type:"button",onClick:t[6]||(t[6]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[20]||(t[20]=[s("i",{class:"fas fa-chevron-left"},null,-1)])],8,Gp),s("span",jp,c(e.query?.page)+"/"+c(e.totalPage||1),1),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[21]||(t[21]=[s("i",{class:"fas fa-chevron-right"},null,-1)])],8,Wp)])]),e.chips?.length?(l(),d("div",Kp,[s("div",Yp,[(l(!0),d(J,null,ne(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[s("span",Jp,c(n?.label),1),s("span",null,c(n?.value),1),s("button",{type:"button",onClick:a=>e.clearFilter(n.key)},[...t[23]||(t[23]=[s("i",{class:"fas fa-times"},null,-1)])],8,Qp)]))),128))])])):f("v-if",!0)])),[[r,e.viewState]]),s("div",Xp,[s("div",Zp,[s("div",xp,[s("span",{class:O(["sortable",{active:e.query?.sort=="name"}]),onClick:t[8]||(t[8]=n=>e.sortBy("name"))},[t[24]||(t[24]=y("Conference ",-1)),s("i",{class:O(["fas",e.sortIcon("name")])},null,2)],2)]),s("div",ef,[s("span",{class:O(["sortable",{active:e.query?.sort=="status"}]),onClick:t[9]||(t[9]=n=>e.sortBy("status"))},[t[25]||(t[25]=y("Status ",-1)),s("i",{class:O(["fas",e.sortIcon("status")])},null,2)],2)]),t[27]||(t[27]=s("div",{role:"columnheader",class:"num"},"Repos",-1)),s("div",tf,[s("span",{class:O(["sortable",{active:e.query?.sort=="startDate"}]),onClick:t[10]||(t[10]=n=>e.sortBy("startDate"))},[t[26]||(t[26]=y("Window ",-1)),s("i",{class:O(["fas",e.sortIcon("startDate")])},null,2)],2)]),t[28]||(t[28]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(J,null,ne(e.filteredConferences,(n,i)=>(l(),d("div",sf,[s("div",nf,[t[30]||(t[30]=s("span",{class:"type-badge type-repo"},"Conf",-1)),s("div",of,[s("a",{class:"repo-name",textContent:c(n?.name),href:e.safeUrl("/conference/"+n?.conferenceID)},null,8,rf),s("div",af,[s("span",null,c(n?.conferenceID),1),t[29]||(t[29]=y("\xA0\xB7\xA0",-1)),s("span",null,c(e.fmt?.number(n?.price||0))+" \u20AC",1)])])]),s("div",lf,[s("span",{class:O(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,df)]),s("div",uf,[s("a",{title:"Show repositories in this conference",textContent:c(e.fmt?.number(n?.repositories?.length||0)),href:e.safeUrl("/admin/?conference="+n?.conferenceID)},null,8,cf)]),s("div",pf,c(e.fmt?.date(n?.startDate))+" \u2013 "+c(e.fmt?.date(n?.endDate)),1),s("div",ff,[s("div",mf,[t[36]||(t[36]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",hf,[s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/edit")},[...t[31]||(t[31]=[s("i",{class:"far fa-edit"},null,-1),y(" Edit",-1)])],8,vf),s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/")},[...t[32]||(t[32]=[s("i",{class:"fa fa-eye"},null,-1),y(" View",-1)])],8,yf),s("a",{class:"dropdown-item",href:e.safeUrl("/admin/?conference="+n?.conferenceID)},[...t[33]||(t[33]=[s("i",{class:"fas fa-code-branch"},null,-1),y(" View repositories",-1)])],8,gf),t[35]||(t[35]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:we(a=>e.removeConference(n),["prevent"])},[...t[34]||(t[34]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,bf),[[B,n?.status!="removed"]])])])])]))),256)),e.filteredConferences?.length==0?(l(),d("div",wf,[...t[37]||(t[37]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No conferences match the current filters.",-1)])])):f("v-if",!0)]),s("div",kf,[s("span",_f,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",Ef,[s("button",{class:"btn btn-sm",onClick:t[11]||(t[11]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[38]||(t[38]=[s("i",{class:"fas fa-chevron-left"},null,-1),y(" Previous",-1)])],8,Cf),E(s("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,Nf),[[o,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),s("span",null,"of "+c(e.totalPage),1),s("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[39]||(t[39]=[y("Next ",-1),s("i",{class:"fas fa-chevron-right"},null,-1)])],8,Sf)])):f("v-if",!0),s("span",Df,[t[41]||(t[41]=s("label",null,"Per page",-1)),E((l(),d("select",Rf,[...t[40]||(t[40]=[ge('',5)])])),[[o,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var Tf={class:"container paper-page admin-page errors-page"},Of={class:"errors-header"},Af={class:"errors-actions"},If={class:"kpi-grid"},Vf={class:"kpi-card"},Pf={class:"kpi-value"},qf={key:0},Mf={key:1},$f={class:"kpi-card kpi-error"},Uf={class:"kpi-value"},Lf={class:"kpi-sub"},Ff={class:"kpi-card kpi-warn"},zf={class:"kpi-value"},Hf={class:"kpi-sub"},Bf={class:"kpi-card kpi-info"},Gf={class:"kpi-value"},jf={class:"kpi-sub"},Wf={class:"kpi-value"},Kf={class:"kpi-sub"},Yf={key:0,class:"dropped-warn"},Jf={class:"volume-chart"},Qf={class:"volume-bars"},Xf=["title"],Zf={class:"errors-toolbar","aria-label":"Error filters"},xf={class:"seg-tabs"},em={class:"search-wrap"},tm={type:"search",class:"form-control",placeholder:"code:repo_not_found module:route status:>=400",autocomplete:"off"},sm={key:0,class:"filter-count"},nm={class:"select-wrap"},om={class:"form-control form-control-sm"},rm={class:"select-wrap"},im={class:"form-control form-control-sm"},am={class:"autoref"},lm={type:"checkbox"},dm={key:0,class:"admin-empty"},um={key:1,class:"errors-pager"},cm={key:2,class:"errors-list"},pm=["onClick"],fm={class:"col-when"},mm={class:"when-rel"},hm={class:"when-abs"},vm={class:"col-sev"},ym={class:"sev-label"},gm={class:"col-mod"},bm={class:"pill pill-module"},wm={class:"col-msg"},km={class:"msg-code"},_m={key:0,class:"msg-context"},Em={key:1,class:"msg-detail"},Cm={key:2,class:"msg-url"},Nm={class:"col-count"},Sm={key:0,class:"count-pill"},Dm={key:1,class:"count-pill count-pill-muted"},Rm={class:"col-status"},Tm={key:0,class:"errors-row-detail"},Om={class:"detail-tabs"},Am=["onClick"],Im=["onClick"],Vm=["onClick"],Pm={class:"detail-body"},qm={class:"detail-main"},Mm={key:0},$m={key:1,class:"stack-pre"},Um={key:2,class:"related-list"},Lm={class:"when-abs"},Fm={class:"msg-url"},zm={class:"detail-actions"},Hm=["onClick"],Bm=["onClick"],Gm={key:0,class:"copy-hint"},jm={class:"detail-aside"},Wm={class:"aside-block"},Km=["title"],Ym={class:"aside-block"},Jm=["title"],Qm={class:"aside-block"},Xm={class:"aside-value"},Zm={key:0,class:"aside-sub"},xm={key:0,class:"aside-block"},eh=["href"],th={key:1,class:"aside-block"},sh={class:"aside-value mono"};function Qa(e,t){let o=be("field"),r=be("form");return l(),d("div",Tf,[t[32]||(t[32]=s("div",{class:"paper-crumbs"},[y("Admin \xA0/\xA0 "),s("span",{class:"here"},"Errors")],-1)),s("header",Of,[t[10]||(t[10]=s("h1",{class:"paper-page-title"},"Errors",-1)),s("div",Af,[s("button",{class:"btn btn-sm",type:"button",onClick:t[0]||(t[0]=n=>e.exportCsv())},[...t[8]||(t[8]=[s("i",{class:"fas fa-file-export"},null,-1),y(" Export CSV",-1)])]),s("button",{class:"btn btn-sm btn-danger",type:"button",onClick:t[1]||(t[1]=n=>e.clearAll())},[...t[9]||(t[9]=[s("i",{class:"fas fa-trash"},null,-1),y(" Clear all",-1)])])])]),t[33]||(t[33]=ge('',1)),s("section",If,[s("div",Vf,[t[11]||(t[11]=s("div",{class:"kpi-label"},"Last 24h",-1)),s("div",Pf,c(e.stats?.last24h),1),s("div",{class:O(["kpi-sub",{up:e.stats?.delta>0,down:e.stats?.delta<0}])},[e.stats?.prev24h?(l(),d("span",qf,c(e.stats?.delta>0?"+":"")+c(e.stats?.delta)+"% vs yesterday",1)):f("v-if",!0),e.stats?.prev24h?f("v-if",!0):(l(),d("span",Mf,"no prior baseline"))],2)]),s("div",$f,[t[12]||(t[12]=s("div",{class:"kpi-label"},"Errors (5xx)",-1)),s("div",Uf,c(e.stats?.severity?.error),1),s("div",Lf,c(e.stats?.unique?.error)+" unique",1)]),s("div",Ff,[t[13]||(t[13]=s("div",{class:"kpi-label"},"Warnings (4xx)",-1)),s("div",zf,c(e.stats?.severity?.warn),1),s("div",Hf,c(e.stats?.unique?.warn)+" unique",1)]),s("div",Bf,[t[14]||(t[14]=s("div",{class:"kpi-label"},"Info (auth, 404)",-1)),s("div",Gf,c(e.stats?.severity?.info),1),s("div",jf,c(e.stats?.unique?.info)+" unique",1)]),s("div",{class:O(["kpi-card",{"kpi-error":e.stats?.dropped>0}])},[t[15]||(t[15]=s("div",{class:"kpi-label"},"Captured",-1)),s("div",Wf,c(e.total),1),s("div",Kf,[y(" cap "+c(e.cap)+" \xB7 "+c(e.available?"live":"redis off")+" ",1),e.stats?.dropped>0?(l(),d("span",Yf," \xB7 "+c(e.stats?.dropped)+" dropped",1)):f("v-if",!0)])],2)]),s("section",Jf,[t[16]||(t[16]=ge('
Volume \xB7 24h \xB7 1h bucketserror warn info
',1)),s("div",Qf,[(l(!0),d(J,null,ne(e.stats?.buckets,(n,i)=>(l(),d("div",{class:"volume-bar",key:i,title:e.bucketTitle(n)},[s("span",{class:"seg seg-error",style:Pe({height:e.barPx(n,"error")+"px"})},null,4),s("span",{class:"seg seg-warn",style:Pe({height:e.barPx(n,"warn")+"px"})},null,4),s("span",{class:"seg seg-info",style:Pe({height:e.barPx(n,"info")+"px"})},null,4)],8,Xf))),128))])]),E((l(),d("form",Zf,[s("div",xf,[s("button",{type:"button",class:O({active:e.query?.bucket===""}),onClick:t[2]||(t[2]=n=>e.setBucket(""))},"All",2),s("button",{type:"button",class:O({active:e.query?.bucket==="error"}),onClick:t[3]||(t[3]=n=>e.setBucket("error"))},"5xx",2),s("button",{type:"button",class:O({active:e.query?.bucket==="warn"}),onClick:t[4]||(t[4]=n=>e.setBucket("warn"))},"4xx",2),s("button",{type:"button",class:O({active:e.query?.bucket==="info"}),onClick:t[5]||(t[5]=n=>e.setBucket("info"))},"Info",2)]),s("div",em,[t[17]||(t[17]=s("i",{class:"fas fa-search search-icon"},null,-1)),E(s("input",tm,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.parsedFilterCount?(l(),d("span",sm,c(e.parsedFilterCount)+" filter"+c(e.parsedFilterCount>1?"s":""),1)):f("v-if",!0)]),s("div",nm,[t[19]||(t[19]=s("label",null,"Sort",-1)),E((l(),d("select",om,[...t[18]||(t[18]=[s("option",{value:"recent"},"Most recent",-1),s("option",{value:"count"},"Most frequent",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.sort=n},value:e.query?.sort,form:null,options:{}}]])]),s("div",rm,[t[21]||(t[21]=s("label",null,"Group",-1)),E((l(),d("select",im,[...t[20]||(t[20]=[s("option",{value:""},"Off",-1),s("option",{value:"code"},"By code",-1),s("option",{value:"module"},"By module",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.group=n},value:e.query?.group,form:null,options:{}}]])]),s("label",am,[E(s("input",lm,null,512),[[o,{state:e.viewState,set:n=>{e.query.autoRefresh=n},value:e.query?.autoRefresh,form:null,options:{}}]]),t[22]||(t[22]=y(" Auto-refresh ",-1))]),s("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[6]||(t[6]=n=>e.refreshNow())},[...t[23]||(t[23]=[s("i",{class:"fas fa-sync"},null,-1)])])])),[[r,e.viewState]]),e.visible?.length?f("v-if",!0):(l(),d("div",dm,"No errors captured.")),e.canLoadMore()&&e.visible?.length?(l(),d("div",um,[s("span",null,"Showing "+c(e.entries?.length)+" of "+c(e.total)+" captured",1),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>e.loadMore())},"Load older")])):f("v-if",!0),e.visible?.length?(l(),d("div",cm,[t[31]||(t[31]=ge('
WhenSeverityModuleMessageCountStatus
',1)),(l(!0),d(J,null,ne(e.visible,(n,i)=>(l(),d("div",{class:O(["errors-row",{open:e.expanded[n?._key]}]),key:n?._key},[s("div",{class:"errors-row-main",onClick:a=>e.toggle(n)},[s("div",fm,[s("div",mm,c(e.relTime(n?.ts)),1),s("div",hm,c(e.absTimeShort(n?.ts)),1)]),s("div",vm,[s("span",{class:O(["sev-dot","sev-"+n?._bucket])},null,2),s("span",ym,c(e.fmt?.uppercase(n?._bucket)),1)]),s("div",gm,[s("span",bm,c(n?.module),1)]),s("div",wm,[s("strong",km,c(n?.displayMessage),1),n?.displayContext&&n?.displayContext!==n?.displayMessage?(l(),d("span",_m,c(n?.displayContext),1)):f("v-if",!0),n?._detail?(l(),d("span",Em,c(n?._detail),1)):f("v-if",!0),n?._url?(l(),d("div",Cm,c(n?._url),1)):f("v-if",!0)]),s("div",Nm,[n?.count>1?(l(),d("span",Sm,"\xD7"+c(n?.count),1)):f("v-if",!0),n?.count===1?(l(),d("span",Dm,"\xD71")):f("v-if",!0)]),s("div",Rm,[n?._status?(l(),d("span",{key:0,class:O(["status-pill","status-"+n?._bucket])},c(n?._status),3)):f("v-if",!0)])],8,pm),e.expanded[n?._key]?(l(),d("div",Tm,[s("div",Om,[s("button",{type:"button",class:O({active:e.detailTab[n?._key]==="raw"||!e.detailTab[n?._key]}),onClick:a=>e.detailTab[n._key]="raw"},"Raw",10,Am),n?._stack?(l(),d("button",{key:0,type:"button",class:O({active:e.detailTab[n?._key]==="stack"}),onClick:a=>e.detailTab[n._key]="stack"},"Stack",10,Im)):f("v-if",!0),n?.count>1?(l(),d("button",{key:1,type:"button",class:O({active:e.detailTab[n?._key]==="related"}),onClick:a=>e.detailTab[n._key]="related"},"Related ("+c(n?.count)+")",11,Vm)):f("v-if",!0)]),s("div",Pm,[s("div",qm,[(e.detailTab[n?._key]||"raw")==="raw"?(l(),d("pre",Mm,c(n?._detailJson),1)):f("v-if",!0),e.detailTab[n?._key]==="stack"?(l(),d("pre",$m,c(n?._stack),1)):f("v-if",!0),e.detailTab[n?._key]==="related"?(l(),d("div",Um,[(l(!0),d(J,null,ne(n?._related,(a,u)=>(l(),d("div",{class:"related-row",key:u},[s("span",Lm,c(e.absTimeShort(a?.ts)),1),s("span",Fm,c(a?._url),1),a?._status?(l(),d("span",{key:0,class:O(["status-pill","status-"+a?._bucket])},c(a?._status),3)):f("v-if",!0)]))),128))])):f("v-if",!0),s("div",zm,[s("button",{class:"btn btn-sm",type:"button",title:"Copy a curl that reproduces the request",onClick:a=>e.copyCurl(n)},[...t[24]||(t[24]=[s("i",{class:"fas fa-terminal"},null,-1),y(" Copy curl",-1)])],8,Hm),s("button",{class:"btn btn-sm",type:"button",onClick:a=>e.copyJson(n)},[...t[25]||(t[25]=[s("i",{class:"fas fa-clipboard"},null,-1),y(" Copy JSON",-1)])],8,Bm),e.copyHint?(l(),d("span",Gm,c(e.copyHint),1)):f("v-if",!0)])]),s("aside",jm,[s("div",Wm,[t[26]||(t[26]=s("div",{class:"aside-label"},"First seen",-1)),s("div",{class:"aside-value",title:e.absTime(n?._firstSeen)},c(e.relTime(n?._firstSeen)),9,Km)]),s("div",Ym,[t[27]||(t[27]=s("div",{class:"aside-label"},"Last seen",-1)),s("div",{class:"aside-value",title:e.absTime(n?.ts)},c(e.relTime(n?.ts)),9,Jm)]),s("div",Qm,[t[28]||(t[28]=s("div",{class:"aside-label"},"Occurrences",-1)),s("div",Xm,[y(c(n?.count),1),n?._lastHourCount?(l(),d("span",Zm," \xB7 "+c(n?._lastHourCount)+" this hour",1)):f("v-if",!0)])]),n?._repoId?(l(),d("div",xm,[t[29]||(t[29]=s("div",{class:"aside-label"},"Repository",-1)),s("a",{class:"aside-value",href:e.safeUrl("/r/"+n?._repoId)},c(n?._repoId),9,eh)])):f("v-if",!0),n?._url?(l(),d("div",th,[t[30]||(t[30]=s("div",{class:"aside-label"},"URL",-1)),s("div",sh,c(n?._url),1)])):f("v-if",!0)])])])):f("v-if",!0)],2))),128))])):f("v-if",!0)])}var nh={class:"container paper-page admin-page overview-page"},oh={key:0,class:"admin-empty"},rh={key:1,class:"alert alert-danger",style:{margin:"12px 0"}},ih={key:2},ah={class:"ov-kpi-row"},lh={class:"ov-kpi-card"},dh={class:"ov-kpi-value"},uh={class:"ov-kpi-sub"},ch={class:"ov-kpi-card"},ph={class:"ov-kpi-sub"},fh={class:"ov-kpi-card"},mh={class:"ov-kpi-sub"},hh={class:"ov-kpi-card"},vh={class:"ov-kpi-sub"},yh={class:"ov-kpi-card"},gh={class:"ov-kpi-value"},bh={class:"ov-kpi-sub"},wh={class:"ov-daily-row"},kh={class:"ov-daily-card"},_h={class:"ov-daily-value"},Eh={class:"ov-daily-card"},Ch={class:"ov-daily-value"},Nh={class:"ov-daily-sub"},Sh={class:"ov-daily-card"},Dh={class:"ov-daily-value"},Rh={class:"ov-chart-row"},Th={class:"ov-chart-card"},Oh={key:0,class:"ov-spark-bars"},Ah=["data-tip","aria-label"],Ih={key:1,class:"ov-spark-x"},Vh={class:"ov-chart-card"},Ph={key:0,class:"ov-spark-bars"},qh=["data-tip","aria-label"],Mh={key:1,class:"ov-spark-x"},$h={class:"ov-chart-card"},Uh={key:0,class:"ov-spark-bars"},Lh=["data-tip","aria-label"],Fh={key:1,class:"ov-spark-x"},zh={class:"ov-chart-card"},Hh={key:0,class:"ov-spark-bars"},Bh=["data-tip","aria-label"],Gh={key:1,class:"ov-spark-x"},jh={class:"ov-triple-row"},Wh={class:"ov-panel-card"},Kh={class:"ov-panel-head"},Yh={class:"ov-panel-meta"},Jh={class:"ov-stacked-bar"},Qh={class:"ov-bar-legend"},Xh={href:"/admin/repositories",class:"ov-legend-item"},Zh={class:"ov-legend-n"},xh={href:"/admin/repositories",class:"ov-legend-item"},ev={class:"ov-legend-n"},tv={href:"/admin/repositories",class:"ov-legend-item"},sv={class:"ov-legend-n"},nv={href:"/admin/repositories",class:"ov-legend-item"},ov={class:"ov-legend-n"},rv={href:"/admin/repositories",class:"ov-legend-item"},iv={class:"ov-legend-n"},av={class:"ov-panel-card"},lv={class:"ov-panel-head"},dv={class:"ov-panel-meta"},uv={class:"ov-error-bars"},cv={class:"ov-ebar-row"},pv={class:"ov-ebar-track"},fv={class:"ov-ebar-n"},mv={class:"ov-ebar-row"},hv={class:"ov-ebar-track"},vv={class:"ov-ebar-n"},yv={class:"ov-ebar-row"},gv={class:"ov-ebar-track"},bv={class:"ov-ebar-n"},wv={key:0,class:"ov-panel-foot"},kv={href:"/admin/errors"},_v={class:"ov-panel-card"},Ev={class:"ov-routes-table"},Cv={class:"ov-route-row",href:"/admin/queues"},Nv={class:"ov-route-n"},Sv={class:"ov-route-n"},Dv={class:"ov-route-row",href:"/admin/queues"},Rv={class:"ov-route-n"},Tv={class:"ov-route-n"},Ov={class:"ov-route-row",href:"/admin/queues"},Av={class:"ov-route-n"},Iv={class:"ov-route-n"},Vv={class:"ov-services-card"},Pv={class:"ov-services-head"},qv={class:"ov-panel-meta"},Mv={class:"ov-services-grid"},$v={class:"ov-svc"},Uv={class:"ov-svc-info"},Lv={class:"ov-svc-meta"},Fv={class:"ov-svc-detail"},zv={class:"ov-svc"},Hv={class:"ov-svc-info"},Bv={key:0,class:"ov-svc-meta"},Gv={key:1,class:"ov-svc-meta"},jv={class:"ov-svc"},Wv={class:"ov-svc-info"},Kv={key:0,class:"ov-svc-meta"},Yv={key:1,class:"ov-svc-meta"},Jv={class:"ov-svc"},Qv={class:"ov-svc-info"},Xv={key:0,class:"ov-svc-meta"},Zv={key:1,class:"ov-svc-meta"},xv={class:"ov-svc"},ey={class:"ov-svc-info"},ty={class:"ov-svc-meta"};function Xa(e,t){return l(),d("div",nh,[t[42]||(t[42]=ge('
Admin \xB7 System Health

Overview

',3)),e.loading?(l(),d("div",oh,"Loading overview\u2026")):f("v-if",!0),e.error?(l(),d("div",rh,[t[0]||(t[0]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.error),1)])):f("v-if",!0),e.data?(l(),d("div",ih,[f(" \u2500\u2500 Top KPI row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",ah,[s("div",lh,[t[1]||(t[1]=s("div",{class:"ov-kpi-label"},[y("Repositories "),s("span",{class:"ov-dot ov-dot-ok"})],-1)),s("div",dh,c(e.humanNum(e.data?.repos?.total)),1),s("div",uh,"+"+c(e.data?.repos?.newRepos24h)+" \xB7 last 24h",1)]),s("div",ch,[t[2]||(t[2]=s("div",{class:"ov-kpi-label"},"CPU",-1)),s("div",{class:O(["ov-kpi-value",{"ov-val-warn":e.data?.system?.cpuPercent>80}])},c(e.data?.system?.cpuPercent)+"%",3),s("div",ph,c(e.data?.system?.cpuCount)+" cores \xB7 load "+c(e.data?.system?.loadAvg?.[0]?.toFixed(1)),1)]),s("div",fh,[t[3]||(t[3]=s("div",{class:"ov-kpi-label"},"Memory",-1)),s("div",{class:O(["ov-kpi-value",{"ov-val-warn":e.data?.system?.memPercent>85}])},c(e.data?.system?.memPercent)+"%",3),s("div",mh,c(e.humanBytes(e.data?.system?.memUsed))+" / "+c(e.humanBytes(e.data?.system?.memTotal)),1)]),s("div",hh,[t[4]||(t[4]=s("div",{class:"ov-kpi-label"},"Disk",-1)),s("div",{class:O(["ov-kpi-value",{"ov-val-warn":e.data?.system?.diskPercent>85}])},c(e.data?.system?.diskPercent)+"%",3),s("div",vh,c(e.humanBytes(e.data?.system?.diskUsed))+" / "+c(e.humanBytes(e.data?.system?.diskTotal))+" \xB7 "+c(e.data?.system?.diskMount),1)]),s("div",yh,[t[5]||(t[5]=s("div",{class:"ov-kpi-label"},"Uptime",-1)),s("div",gh,c(e.humanDuration(e.data?.system?.uptime)),1),s("div",bh,c(e.data?.system?.nodeVersion)+" \xB7 "+c(e.data?.system?.platform),1)])]),f(" \u2500\u2500 Daily activity highlights \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",wh,[s("div",kh,[t[6]||(t[6]=s("div",{class:"ov-daily-label"},"New repos today",-1)),s("div",_h,"+"+c(e.fmt?.number(e.data?.daily?.today?.repositories)),1),t[7]||(t[7]=s("div",{class:"ov-daily-sub"},"since yesterday",-1))]),s("div",Eh,[t[8]||(t[8]=s("div",{class:"ov-daily-label"},"New users today",-1)),s("div",Ch,"+"+c(e.fmt?.number(e.data?.daily?.today?.users)),1),s("div",Nh,c(e.fmt?.number(e.data?.users?.total))+" total users",1)]),s("div",Sh,[t[9]||(t[9]=s("div",{class:"ov-daily-label"},"Page views today",-1)),s("div",Dh,"+"+c(e.fmt?.number(e.data?.daily?.today?.pageViews)),1),t[10]||(t[10]=s("div",{class:"ov-daily-sub"},"since yesterday",-1))])]),f(" \u2500\u2500 Daily charts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",Rh,[s("div",Th,[t[11]||(t[11]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"Daily page views \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-accent"}),y("views/day")])],-1)),e.data?.history?.length?(l(),d("div",Oh,[(l(!0),d(J,null,ne(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyPageViews)+" views","aria-label":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyPageViews)+" views"},[s("span",{class:"ov-spark-fill",style:Pe({height:e.historyBarH(o,"dailyPageViews")+"px"})},null,4)],8,Ah))),128))])):f("v-if",!0),e.data?.history?.length?(l(),d("div",Ih,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),s("div",Vh,[t[12]||(t[12]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"New repos \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-ok-fill"}),y("repos/day")])],-1)),e.data?.history?.length?(l(),d("div",Ph,[(l(!0),d(J,null,ne(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyRepositories)+" repos","aria-label":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyRepositories)+" repos"},[s("span",{class:"ov-spark-fill ov-spark-fill-alt",style:Pe({height:e.historyBarH(o,"dailyRepositories")+"px"})},null,4)],8,qh))),128))])):f("v-if",!0),e.data?.history?.length?(l(),d("div",Mh,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),s("div",$h,[t[13]||(t[13]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"Users \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-user-fill"}),y("total users")])],-1)),e.data?.history?.length?(l(),d("div",Uh,[(l(!0),d(J,null,ne(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": "+e.fmt?.number(o?.nbUsers)+" users","aria-label":e.historyLabel(o)+": "+e.fmt?.number(o?.nbUsers)+" users"},[s("span",{class:"ov-spark-fill ov-spark-fill-user",style:Pe({height:e.historyBarH(o,"nbUsers")+"px"})},null,4)],8,Lh))),128))])):f("v-if",!0),e.data?.history?.length?(l(),d("div",Fh,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),s("div",zh,[t[14]||(t[14]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"New users \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-new-user-fill"}),y("users/day")])],-1)),e.data?.history?.length?(l(),d("div",Hh,[(l(!0),d(J,null,ne(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyUsers)+" users","aria-label":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyUsers)+" users"},[s("span",{class:"ov-spark-fill ov-spark-fill-new-user",style:Pe({height:e.historyBarH(o,"dailyUsers")+"px"})},null,4)],8,Bh))),128))])):f("v-if",!0),e.data?.history?.length?(l(),d("div",Gh,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)])]),f(" \u2500\u2500 Three-panel row: Status / Errors / Queues \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",jh,[f(" Repo status breakdown "),s("div",Wh,[s("div",Kh,[t[15]||(t[15]=s("span",{class:"ov-panel-title"},"Repo status",-1)),s("span",Yh,c(e.fmt?.number(e.data?.repos?.total))+" total",1)]),s("div",Jh,[s("span",{class:"ov-bar-seg ov-bar-ready",title:"Ready",style:Pe({width:e.barPct("ready")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-preparing",title:"Preparing",style:Pe({width:e.barPct("preparing")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-error",title:"Error",style:Pe({width:e.barPct("error")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-expired",title:"Expired",style:Pe({width:e.barPct("expired")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-removed",title:"Removed",style:Pe({width:e.barPct("removed")+"%"})},null,4)]),s("div",Qh,[s("a",Xh,[t[16]||(t[16]=s("span",{class:"ov-swatch ov-bar-ready"},null,-1)),t[17]||(t[17]=y(" ready ",-1)),s("span",Zh,c(e.fmt?.number(e.statusCount("ready"))),1)]),s("a",xh,[t[18]||(t[18]=s("span",{class:"ov-swatch ov-bar-preparing"},null,-1)),t[19]||(t[19]=y(" preparing ",-1)),s("span",ev,c(e.fmt?.number(e.statusCount("preparing")+e.statusCount("download"))),1)]),s("a",tv,[t[20]||(t[20]=s("span",{class:"ov-swatch ov-bar-error"},null,-1)),t[21]||(t[21]=y(" error ",-1)),s("span",sv,c(e.fmt?.number(e.statusCount("error"))),1)]),s("a",nv,[t[22]||(t[22]=s("span",{class:"ov-swatch ov-bar-expired"},null,-1)),t[23]||(t[23]=y(" expired ",-1)),s("span",ov,c(e.fmt?.number(e.statusCount("expired")+e.statusCount("expiring"))),1)]),s("a",rv,[t[24]||(t[24]=s("span",{class:"ov-swatch ov-bar-removed"},null,-1)),t[25]||(t[25]=y(" removed ",-1)),s("span",iv,c(e.fmt?.number(e.statusCount("removed")+e.statusCount("removing"))),1)])])]),f(" Error breakdown "),s("div",av,[s("div",lv,[t[26]||(t[26]=s("span",{class:"ov-panel-title"},"Errors \xB7 24h",-1)),s("span",dv,c(e.data?.errors?.last24h)+" total",1)]),s("div",uv,[s("div",cv,[t[27]||(t[27]=s("span",{class:"ov-ebar-label"},"5xx",-1)),s("span",pv,[s("span",{class:"ov-ebar-fill ov-ebar-error",style:Pe({width:e.errPct("error")+"%"})},null,4)]),s("span",fv,c(e.data?.errors?.severity?.error),1)]),s("div",mv,[t[28]||(t[28]=s("span",{class:"ov-ebar-label"},"4xx",-1)),s("span",hv,[s("span",{class:"ov-ebar-fill ov-ebar-warn",style:Pe({width:e.errPct("warn")+"%"})},null,4)]),s("span",vv,c(e.data?.errors?.severity?.warn),1)]),s("div",yv,[t[29]||(t[29]=s("span",{class:"ov-ebar-label"},"Info",-1)),s("span",gv,[s("span",{class:"ov-ebar-fill ov-ebar-info",style:Pe({width:e.errPct("info")+"%"})},null,4)]),s("span",bv,c(e.data?.errors?.severity?.info),1)])]),e.data?.repos?.recentErrors24h?(l(),d("div",wv,[s("a",kv,c(e.data?.repos?.recentErrors24h)+" repos in error state \u2192",1)])):f("v-if",!0)]),f(" Top routes / queues "),s("div",_v,[t[34]||(t[34]=s("div",{class:"ov-panel-head"},[s("span",{class:"ov-panel-title"},"Queues"),s("span",{class:"ov-panel-meta"},"by state")],-1)),s("div",Ev,[t[33]||(t[33]=ge('
QueueActiveWaitFailed
',1)),s("a",Cv,[t[30]||(t[30]=s("span",{class:"ov-route-name"},"download",-1)),s("span",Nv,c(e.data?.queues?.download?.active),1),s("span",Sv,c(e.data?.queues?.download?.waiting),1),s("span",{class:O(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.download?.failed>0}])},c(e.data?.queues?.download?.failed),3)]),s("a",Dv,[t[31]||(t[31]=s("span",{class:"ov-route-name"},"remove",-1)),s("span",Rv,c(e.data?.queues?.remove?.active),1),s("span",Tv,c(e.data?.queues?.remove?.waiting),1),s("span",{class:O(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.remove?.failed>0}])},c(e.data?.queues?.remove?.failed),3)]),s("a",Ov,[t[32]||(t[32]=s("span",{class:"ov-route-name"},"cache",-1)),s("span",Av,c(e.data?.queues?.cache?.active),1),s("span",Iv,c(e.data?.queues?.cache?.waiting),1),s("span",{class:O(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.cache?.failed>0}])},c(e.data?.queues?.cache?.failed),3)])])])]),f(" \u2500\u2500 Services bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",Vv,[s("div",Pv,[t[35]||(t[35]=s("span",{class:"ov-panel-title"},"Services",-1)),s("span",qv,c(e.fmt?.number(e.data?.users?.total))+" users \xB7 "+c(e.data?.conferences?.total)+" conferences",1)]),s("div",Mv,[s("div",$v,[t[37]||(t[37]=s("span",{class:"ov-svc-dot ov-dot-ok"},null,-1)),s("div",Uv,[t[36]||(t[36]=s("span",{class:"ov-svc-name"},"web",-1)),s("span",Lv,c(e.data?.system?.nodeVersion),1)]),s("span",Fv,"uptime "+c(e.humanDuration(e.data?.system?.uptime)),1)]),s("div",zv,[s("span",{class:O(["ov-svc-dot",e.queueTotal(e.data?.queues?.download)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),s("div",Hv,[t[38]||(t[38]=s("span",{class:"ov-svc-name"},"download",-1)),e.queueTotal(e.data?.queues?.download)?(l(),d("span",Bv,c(e.queueTotal(e.data?.queues?.download))+" jobs",1)):f("v-if",!0),e.queueTotal(e.data?.queues?.download)?f("v-if",!0):(l(),d("span",Gv,"idle"))])]),s("div",jv,[s("span",{class:O(["ov-svc-dot",e.queueTotal(e.data?.queues?.cache)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),s("div",Wv,[t[39]||(t[39]=s("span",{class:"ov-svc-name"},"cache",-1)),e.queueTotal(e.data?.queues?.cache)?(l(),d("span",Kv,c(e.queueTotal(e.data?.queues?.cache))+" jobs",1)):f("v-if",!0),e.queueTotal(e.data?.queues?.cache)?f("v-if",!0):(l(),d("span",Yv,"idle"))])]),s("div",Jv,[s("span",{class:O(["ov-svc-dot",e.queueTotal(e.data?.queues?.remove)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),s("div",Qv,[t[40]||(t[40]=s("span",{class:"ov-svc-name"},"remove",-1)),e.queueTotal(e.data?.queues?.remove)?(l(),d("span",Xv,c(e.queueTotal(e.data?.queues?.remove))+" jobs",1)):f("v-if",!0),e.queueTotal(e.data?.queues?.remove)?f("v-if",!0):(l(),d("span",Zv,"idle"))])]),s("div",xv,[s("span",{class:O(["ov-svc-dot",e.data?.repos?.recentErrors24h>10?"ov-dot-warn":"ov-dot-ok"])},null,2),s("div",ey,[t[41]||(t[41]=s("span",{class:"ov-svc-name"},"errors",-1)),s("span",ty,c(e.data?.errors?.last24h)+" / 24h",1)])])])])])):f("v-if",!0)])}var sy={class:"container paper-page admin-page"},ny={class:"q-header"},oy={class:"q-header-actions"},ry={class:"q-range-btns"},iy={class:"q-cards"},ay=["onClick"],ly={class:"q-card-head"},dy=["textContent"],uy=["textContent"],cy={class:"q-card-sub"},py={key:0,class:"q-card-bar"},fy={key:0,class:"q-detail"},my={class:"q-throughput"},hy={class:"q-section-label"},vy={class:"q-section-right"},yy={class:"q-stats-panel"},gy={class:"q-section-label"},by={class:"q-stats-grid"},wy={class:"q-stat"},ky=["textContent"],_y={class:"q-stat"},Ey=["textContent"],Cy={class:"q-stat"},Ny=["textContent"],Sy={class:"q-stat"},Dy=["textContent"],Ry={class:"q-stat"},Ty=["textContent"],Oy={class:"q-stat"},Ay=["textContent"],Iy={class:"q-stats-actions"},Vy=["disabled"],Py={class:"q-jobs"},qy={class:"q-jobs-header"},My={class:"q-section-label"},$y={class:"q-state-filters"},Uy={class:"q-state-toggle"},Ly={type:"checkbox"},Fy={class:"q-search-row"},zy={type:"search",class:"form-control",placeholder:"Search by job/repo id\u2026",autocomplete:"off"},Hy={class:"q-auto-refresh"},By={type:"checkbox"},Gy={key:0,class:"q-table"},jy=["onClick"],Wy={class:"q-cell-state"},Ky=["textContent"],Yy=["textContent"],Jy={class:"q-cell-id"},Qy=["textContent","href"],Xy={class:"q-cell-payload"},Zy=["textContent"],xy={key:0,class:"q-payload-detail"},eg=["textContent"],tg=["textContent"],sg={class:"q-cell-progress"},ng={key:0,class:"q-progress-wrap"},og=["textContent"],rg={class:"q-cell-actions"},ig=["onClick"],ag=["onClick"],lg={key:0,class:"q-detail-row"},dg={colspan:"7"},ug={class:"q-job-detail"},cg={class:"q-job-detail-grid"},pg={class:"q-job-detail-item"},fg={class:"q-job-detail-value"},mg=["textContent","href"],hg={class:"q-job-detail-item"},vg={class:"q-job-detail-value"},yg=["textContent"],gg={key:0,class:"q-job-detail-item"},bg=["textContent"],wg={key:1,class:"q-job-detail-item"},kg=["textContent"],_g={key:2,class:"q-job-detail-item"},Eg={class:"q-job-detail-value"},Cg={key:3,class:"q-job-detail-item"},Ng=["textContent"],Sg={key:4,class:"q-job-detail-item"},Dg=["textContent"],Rg={key:5,class:"q-job-detail-item"},Tg=["textContent"],Og={key:6,class:"q-job-detail-item"},Ag=["textContent"],Ig={key:7,class:"q-job-detail-item"},Vg=["textContent"],Pg={key:0,class:"q-job-detail-error"},qg=["textContent"],Mg={key:1},$g=["textContent"],Ug={class:"q-job-detail-actions"},Lg=["onClick"],Fg=["onClick"],zg=["href"],Hg={key:1,class:"paper-table-empty",style:{border:"1px solid var(--border-color)","border-radius":"10px",background:"var(--paper-card)"}},Bg={key:0},Gg={key:1};function Za(e,t){let o=be("field");return l(),d("div",sy,[t[47]||(t[47]=s("div",{class:"paper-crumbs"},[y("Admin \xA0/\xA0 "),s("span",{class:"here"},"Queues")],-1)),s("div",ny,[t[12]||(t[12]=s("h1",{class:"paper-page-title"},"Queues",-1)),s("div",oy,[s("div",ry,[s("button",{class:O(["btn btn-sm",{active:e.range=="1h"}]),onClick:t[0]||(t[0]=r=>e.setRange("1h"))},"1h",2),s("button",{class:O(["btn btn-sm",{active:e.range=="6h"}]),onClick:t[1]||(t[1]=r=>e.setRange("6h"))},"6h",2),s("button",{class:O(["btn btn-sm",{active:e.range=="24h"}]),onClick:t[2]||(t[2]=r=>e.setRange("24h"))},"24h",2),s("button",{class:O(["btn btn-sm",{active:e.range=="7d"}]),onClick:t[3]||(t[3]=r=>e.setRange("7d"))},"7d",2)]),s("button",{class:"btn btn-sm",onClick:t[4]||(t[4]=r=>e.pauseAll())},"Pause all"),s("button",{class:"btn btn-sm btn-dark",onClick:t[5]||(t[5]=r=>e.drainSelected())},"Drain "+c(e.selectedQueue),1)])]),t[48]||(t[48]=ge('',1)),f(" Queue overview cards "),s("div",iy,[(l(!0),d(J,null,ne(e.queueList,(r,n)=>(l(),d("div",{class:O(["q-card",{selected:e.selectedQueue==r?.key,paused:r?.paused}]),onClick:i=>e.selectQueue(r.key)},[s("div",ly,[s("span",{class:O(["q-dot",{"q-dot-red":r?.paused||r?.counts?.failed>0}])},null,2),s("span",{class:"q-card-name",textContent:c(r?.label)},null,8,dy)]),s("div",{class:"q-card-count",textContent:c((r?.counts?.waiting||0)+(r?.counts?.active||0)+(r?.counts?.delayed||0))},null,8,uy),s("div",cy,[s("span",null,"waiting \xB7 "+c(r?.counts?.active||0)+" active",1),r?.counts?.active?(l(),d("div",py,[s("div",{class:"q-card-bar-fill",style:Pe({width:r?.counts?.active/((r?.counts?.waiting||0)+(r?.counts?.active||0)+(r?.counts?.delayed||0)||1)*100+"%"})},null,4)])):f("v-if",!0)])],10,ay))),256))]),f(" Detail: throughput chart + stats panel "),e.selectedStats?(l(),d("div",fy,[s("div",my,[s("div",hy,[y(c(e.selectedQueue)+"\xB7throughput ",1),s("span",vy,[t[13]||(t[13]=s("span",{class:"q-legend-completed"},"\u25CF",-1)),t[14]||(t[14]=y(" completed ",-1)),t[15]||(t[15]=s("span",{class:"q-legend-failed"},"\u25CF",-1)),t[16]||(t[16]=y(" failed ",-1)),t[17]||(t[17]=s("span",{class:"q-legend-exec"},"- -",-1)),y(" avg time \xB7 "+c(e.fmt?.uppercase(e.range)),1)])]),t[18]||(t[18]=s("div",{class:"q-chart-wrap"},[s("canvas",{id:"q-throughput-chart",height:"180"}),s("div",{id:"q-chart-tooltip",class:"q-chart-tooltip",style:{display:"none"}}),s("div",{id:"q-chart-crosshair",class:"q-chart-crosshair",style:{display:"none"}})],-1))]),s("div",yy,[s("div",gy,c(e.selectedQueue)+"\xB7stats",1),s("div",by,[s("div",wy,[t[19]||(t[19]=s("div",{class:"q-stat-label"},"WAITING",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.waiting||0)},null,8,ky)]),s("div",_y,[t[20]||(t[20]=s("div",{class:"q-stat-label"},"ACTIVE",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.active||0)},null,8,Ey)]),s("div",Cy,[t[21]||(t[21]=s("div",{class:"q-stat-label"},"COMPLETED (24H)",-1)),s("div",{class:"q-stat-value",textContent:c(e.fmt?.number(e.selectedStats?.completed24h))},null,8,Ny)]),s("div",Sy,[t[22]||(t[22]=s("div",{class:"q-stat-label"},"FAILED (24H)",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.failed24h||0)},null,8,Dy)]),s("div",Ry,[t[23]||(t[23]=s("div",{class:"q-stat-label"},"DELAYED",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.delayed||0)},null,8,Ty)]),s("div",Oy,[t[24]||(t[24]=s("div",{class:"q-stat-label"},"WORKERS",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.workers||0)},null,8,Ay)])]),s("div",Iy,[s("button",{class:"btn btn-sm",onClick:t[6]||(t[6]=r=>e.togglePause())},c(e.selectedStats?.paused?"Resume":"Pause"),1),s("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=r=>e.retryFailed()),disabled:!e.selectedStats?.counts?.failed},"Retry failed",8,Vy),s("button",{class:"btn btn-sm",onClick:t[8]||(t[8]=r=>e.emptyQueue())},"Empty")])])])):f("v-if",!0),e.actionError?(l(),d("div",{key:1,class:"q-toast-error",onClick:t[9]||(t[9]=r=>e.actionError=null)},[t[25]||(t[25]=s("i",{class:"fas fa-exclamation-circle"},null,-1)),y(" "+c(e.actionError),1)])):f("v-if",!0),f(" Jobs table "),s("div",Py,[s("div",qy,[s("div",My,"ALL JOBS \xB7 "+c(e.fmt?.uppercase(e.selectedQueue)),1),s("div",$y,[(l(!0),d(J,null,ne(e.allStates,(r,n)=>(l(),d("label",Uy,[E(s("input",Ly,null,512),[[o,{state:e.viewState,set:i=>{e.stateFilter[r]=i},value:e.stateFilter[r],form:null,options:{}}]]),s("span",{class:O("q-state-chip q-state-"+r)},c(r),3)]))),256))])]),s("div",Fy,[E(s("input",zy,null,512),[[o,{state:e.viewState,set:r=>{e.query.search=r},value:e.query?.search,form:null,options:{}}]]),s("label",Hy,[E(s("input",By,null,512),[[o,{state:e.viewState,set:r=>{e.query.autoRefresh=r},value:e.query?.autoRefresh,form:null,options:{}}]]),t[26]||(t[26]=y(" Auto-refresh ",-1))]),s("button",{class:"btn btn-sm",type:"button",title:"Refresh now",onClick:t[10]||(t[10]=r=>e.refreshNow())},[...t[27]||(t[27]=[s("i",{class:"fas fa-sync"},null,-1)])])]),e.filteredJobs().length>0?(l(),d("table",Gy,[t[45]||(t[45]=s("thead",null,[s("tr",null,[s("th",null,"STATE"),s("th",null,"JOB ID"),s("th",null,"PAYLOAD"),s("th",null,"ATTEMPTS"),s("th",null,"DURATION"),s("th",null,"PROGRESS"),s("th")])],-1)),(l(!0),d(J,null,ne(e.filteredJobs(),(r,n)=>(l(),d("tbody",null,[s("tr",{style:{cursor:"pointer"},class:O({"q-row-failed":r?._state=="failed","q-row-expanded":e.expanded[r?.id]}),onClick:i=>e.toggleJob(r)},[s("td",Wy,[s("span",{textContent:c(r?._state),class:O("q-state-badge q-state-"+r?._state)},null,10,Ky),r?._state=="delayed"&&r?.delayUntil?(l(),d("span",{key:0,class:"q-delay-hint",textContent:c(e.delayCountdown(r?.delayUntil))},null,8,Yy)):f("v-if",!0)]),s("td",Jy,[s("i",{class:O(["fas fa-chevron-right q-chevron",{"q-chevron-open":e.expanded[r?.id]}])},null,2),s("a",{target:"_blank",textContent:c("job:"+e.fmt.limitTo(r?.id,6)),onClick:t[11]||(t[11]=i=>i.stopPropagation()),href:e.safeUrl("/r/"+r?.id)},null,8,Qy)]),s("td",Xy,[s("span",{textContent:c(r?.name||"anonymize")},null,8,Zy),r?.data?.repoId&&r?.data?.repoId!==r?.name?(l(),d("span",xy," \xB7 "+c(r?.data?.repoId),1)):f("v-if",!0)]),s("td",{class:"q-cell-num",textContent:c(r?.attemptsMade||1)},null,8,eg),s("td",{class:"q-cell-num",textContent:c(e.jobDuration(r))},null,8,tg),s("td",sg,[e.jobProgressPct(r)!==null?(l(),d("div",ng,[s("div",{class:"q-progress-bar",style:Pe({"--pct":e.jobProgressPct(r)+"%"})},null,4),s("span",{class:"q-progress-label",textContent:c(e.jobProgressPct(r)+"%")},null,8,og)])):f("v-if",!0)]),s("td",rg,[r?._state=="failed"?(l(),d("button",{key:0,class:"btn btn-sm",title:"Retry",onClick:i=>{e.retryJob(r),i.stopPropagation()}},[...t[28]||(t[28]=[s("i",{class:"fas fa-sync"},null,-1)])],8,ig)):f("v-if",!0),s("button",{class:"btn btn-sm",title:"Remove",onClick:i=>{e.removeJob(r),i.stopPropagation()}},[...t[29]||(t[29]=[s("i",{class:"fas fa-trash-alt"},null,-1)])],8,ag)])],10,jy),e.expanded[r?.id]?(l(),d("tr",lg,[s("td",dg,[s("div",ug,[s("div",cg,[s("div",pg,[t[30]||(t[30]=s("span",{class:"q-job-detail-label"},"JOB ID",-1)),s("span",fg,[s("a",{target:"_blank",textContent:c(r?.id),href:e.safeUrl("/r/"+r?.id)},null,8,mg)])]),s("div",hg,[t[31]||(t[31]=s("span",{class:"q-job-detail-label"},"STATE",-1)),s("span",vg,[s("span",{textContent:c(r?._state),class:O("q-state-badge q-state-"+r?._state)},null,10,yg)])]),r?.data?.repoId?(l(),d("div",gg,[t[32]||(t[32]=s("span",{class:"q-job-detail-label"},"REPO ID",-1)),s("span",{class:"q-job-detail-value",textContent:c(r?.data?.repoId)},null,8,bg)])):f("v-if",!0),r?.timestamp?(l(),d("div",wg,[t[33]||(t[33]=s("span",{class:"q-job-detail-label"},"CREATED",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.timestamp))},null,8,kg)])):f("v-if",!0),r?._state=="delayed"&&r?.delayUntil?(l(),d("div",_g,[t[34]||(t[34]=s("span",{class:"q-job-detail-label"},"RETRY AT",-1)),s("span",Eg,c(e.humanTime(r?.delayUntil))+" ("+c(e.delayCountdown(r?.delayUntil))+")",1)])):f("v-if",!0),r?.processedOn?(l(),d("div",Cg,[t[35]||(t[35]=s("span",{class:"q-job-detail-label"},"PROCESSED",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.processedOn))},null,8,Ng)])):f("v-if",!0),r?.finishedOn?(l(),d("div",Sg,[t[36]||(t[36]=s("span",{class:"q-job-detail-label"},"FINISHED",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.finishedOn))},null,8,Dg)])):f("v-if",!0),r?.attemptsMade?(l(),d("div",Rg,[t[37]||(t[37]=s("span",{class:"q-job-detail-label"},"ATTEMPTS",-1)),s("span",{class:"q-job-detail-value",textContent:c(r?.attemptsMade)},null,8,Tg)])):f("v-if",!0),r?.progress&&r?.progress?.status?(l(),d("div",Og,[t[38]||(t[38]=s("span",{class:"q-job-detail-label"},"STATUS",-1)),s("span",{class:"q-job-detail-value",textContent:c(r?.progress?.status)},null,8,Ag)])):f("v-if",!0),e.jobProgressPct(r)!==null?(l(),d("div",Ig,[t[39]||(t[39]=s("span",{class:"q-job-detail-label"},"PROGRESS",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.jobProgressPct(r)+"%")},null,8,Vg)])):f("v-if",!0)]),r?.failedReason?(l(),d("div",Pg,[t[40]||(t[40]=s("span",{class:"q-job-detail-label"},"ERROR",-1)),s("div",{class:"q-error-reason",textContent:c(r?.failedReason)},null,8,qg)])):f("v-if",!0),r?.stacktrace?.length?(l(),d("div",Mg,[t[41]||(t[41]=s("span",{class:"q-job-detail-label"},"STACKTRACE",-1)),(l(!0),d(J,null,ne(r?.stacktrace,(i,a)=>(l(),d("pre",{class:"q-error-stack",key:a},[s("code",{textContent:c(i)},null,8,$g)]))),128))])):f("v-if",!0),s("div",Ug,[r?._state=="failed"?(l(),d("button",{key:0,class:"btn btn-sm",onClick:i=>e.retryJob(r)},[...t[42]||(t[42]=[s("i",{class:"fas fa-sync"},null,-1),y(" Retry",-1)])],8,Lg)):f("v-if",!0),s("button",{class:"btn btn-sm",onClick:i=>e.removeJob(r)},[...t[43]||(t[43]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,Fg),s("a",{class:"btn btn-sm",target:"_blank",href:e.safeUrl("/r/"+r?.id)},[...t[44]||(t[44]=[s("i",{class:"fas fa-external-link-alt"},null,-1),y(" View repo",-1)])],8,zg)])])])])):f("v-if",!0)]))),256))])):f("v-if",!0),e.filteredJobs().length==0?(l(),d("div",Hg,[t[46]||(t[46]=s("i",{class:"fas fa-check-circle"},null,-1)),e.query?.search?f("v-if",!0):(l(),d("span",Bg,"No jobs in the "+c(e.selectedQueue)+" queue.",1)),e.query?.search?(l(),d("span",Gg,"No jobs match the current filters.")):f("v-if",!0)])):f("v-if",!0)])])}var jg={class:"container paper-page admin-page"},Wg={class:"admin-summary"},Kg={class:"summary-total"},Yg={class:"summary-meta"},Jg={class:"count"},Qg={class:"count"},Xg={class:"count"},Zg={class:"count"},xg={class:"count"},eb={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},tb={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},sb={class:"admin-filter-row"},ob={class:"search-wrap"},rb={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repoId, source repo, error message\u2026",autocomplete:"off"},ib={key:0,class:"admin-search-hint"},ab={class:"admin-filter-inline"},lb={type:"text",class:"form-control form-control-sm",placeholder:"username"},db={class:"admin-filter-inline"},ub={type:"text",class:"form-control form-control-sm",placeholder:"ID"},cb={class:"admin-filter-inline","aria-label":"Pagination"},pb=["disabled"],fb={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},mb=["disabled"],hb={key:0,class:"admin-filter-row"},vb={class:"admin-active-chips"},yb={class:"key"},gb=["onClick"],bb={key:1,class:"bulk-bar"},wb={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},kb={class:"paper-table-head",role:"row"},_b={role:"columnheader",style:{width:"28px"}},Eb=["checked"],Cb={role:"columnheader"},Nb={role:"columnheader"},Sb={role:"columnheader",class:"num"},Db={role:"columnheader"},Rb={role:"cell",style:{width:"28px"}},Tb={type:"checkbox","aria-label":"Select repository"},Ob={class:"cell-anon",role:"cell"},Ab={class:"anon-text"},Ib=["textContent","href"],Vb={class:"anon-sub"},Pb=["textContent","href"],qb={key:0},Mb=["textContent","href"],$b={key:1},Ub=["textContent","href"],Lb={key:2},Fb={class:"cell-status",role:"cell"},zb={class:"status-line"},Hb=["textContent"],Bb=["textContent","title"],Gb=["textContent"],jb=["textContent"],Wb={class:"cell-actions",role:"cell"},Kb={class:"dropdown"},Yb={class:"dropdown-menu dropdown-menu-right"},Jb=["href"],Qb=["href"],Xb=["href"],Zb=["onClick"],xb=["onClick"],e1=["onClick"],t1=["onClick"],s1=["onClick"],n1=["onClick"],o1={key:0,class:"paper-table-empty"},r1={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},i1={style:{"font-size":"12px",color:"var(--ink-muted)"}},a1={key:0,class:"pagination-compact"},l1=["disabled"],d1=["max"],u1=["disabled"],c1={class:"admin-filter-inline"},p1={class:"form-control form-control-sm"};function xa(e,t){let o=be("field"),r=be("form");return l(),d("div",jg,[t[61]||(t[61]=ge('
Admin \xA0/\xA0 Repositories

Repositories

',3)),s("div",Wg,[s("span",Kg,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),s("span",Yg,c(e.fmt?.humanFileSize(e.totalSize))+" on disk",1),s("span",{class:O(["summary-pill ok",{active:e.query?.ready}]),title:"Toggle ready filter",onClick:t[0]||(t[0]=n=>{e.query.ready=!e.query.ready,e.query.page=1})},[t[18]||(t[18]=y("Ready ",-1)),s("span",Jg,c(e.fmt?.number(e.statusCountFor("ready"))),1)],2),s("span",{class:O(["summary-pill warn",{active:e.query?.preparing}]),title:"Toggle preparing filter",onClick:t[1]||(t[1]=n=>{e.query.preparing=!e.query.preparing,e.query.page=1})},[t[19]||(t[19]=y("Preparing ",-1)),s("span",Qg,c(e.fmt?.number(e.statusCountFor("preparing")+e.statusCountFor("download"))),1)],2),s("span",{class:O(["summary-pill error",{active:e.query?.error}]),title:"Toggle errored filter",onClick:t[2]||(t[2]=n=>{e.query.error=!e.query.error,e.query.page=1})},[t[20]||(t[20]=y("Errored ",-1)),s("span",Xg,c(e.fmt?.number(e.statusCountFor("error"))),1)],2),s("span",{class:O(["summary-pill",{active:e.query?.expired}]),title:"Toggle expired filter",onClick:t[3]||(t[3]=n=>{e.query.expired=!e.query.expired,e.query.page=1})},[t[21]||(t[21]=y("Expired ",-1)),s("span",Zg,c(e.fmt?.number(e.statusCountFor("expired")+e.statusCountFor("expiring"))),1)],2),s("span",{class:O(["summary-pill",{active:e.query?.removed}]),title:"Toggle removed filter",onClick:t[4]||(t[4]=n=>{e.query.removed=!e.query.removed,e.query.page=1})},[t[22]||(t[22]=y("Removed ",-1)),s("span",xg,c(e.fmt?.number(e.statusCountFor("removed")+e.statusCountFor("removing"))),1)],2)]),e.fetchError?(l(),d("div",eb,[t[23]||(t[23]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fetchError),1)])):f("v-if",!0),E((l(),d("form",tb,[f(" Row 1: search + scoped inputs + headline actions "),s("div",sb,[s("div",ob,[E(s("input",rb,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(l(),d("span",ib,"/"))]),s("span",ab,[t[24]||(t[24]=s("label",null,"Owner",-1)),E(s("input",lb,null,512),[[o,{state:e.viewState,set:n=>{e.query.owner=n},value:e.query?.owner,form:null,options:{}}]])]),s("span",db,[t[25]||(t[25]=s("label",null,"Conference",-1)),E(s("input",ub,null,512),[[o,{state:e.viewState,set:n=>{e.query.conference=n},value:e.query?.conference,form:null,options:{}}]])]),t[29]||(t[29]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[5]||(t[5]=n=>e.exportCsv())},[...t[26]||(t[26]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])]),s("span",cb,[s("button",{class:"btn btn-sm",type:"button",onClick:t[6]||(t[6]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[27]||(t[27]=[s("i",{class:"fas fa-chevron-left"},null,-1)])],8,pb),s("span",fb,c(e.query?.page)+"/"+c(e.totalPage||1),1),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[28]||(t[28]=[s("i",{class:"fas fa-chevron-right"},null,-1)])],8,mb)])]),f(" Row 2: appears only when there are active filter chips "),e.chips?.length?(l(),d("div",hb,[s("div",vb,[(l(!0),d(J,null,ne(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[s("span",yb,c(n?.label),1),s("span",null,c(n?.value),1),s("button",{type:"button","aria-label":"Remove filter",onClick:a=>e.clearFilter(n.key)},[...t[30]||(t[30]=[s("i",{class:"fas fa-times"},null,-1)])],8,gb)]))),128))])])):f("v-if",!0)])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",bb,[s("span",null,[s("strong",null,c(e.selectedCount()),1),t[31]||(t[31]=y(" selected",-1))]),s("button",{class:"btn btn-sm",type:"button",onClick:t[8]||(t[8]=n=>e.bulkRefresh())},[...t[32]||(t[32]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force refresh",-1)])]),s("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[9]||(t[9]=n=>e.bulkRemoveCache())},[...t[33]||(t[33]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])]),s("button",{class:"btn btn-sm",type:"button",onClick:t[10]||(t[10]=n=>e.clearSelection())},"Clear")])):f("v-if",!0),s("div",wb,[s("div",kb,[s("div",_b,[s("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[11]||(t[11]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,Eb)]),s("div",Cb,[s("span",{class:O(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[12]||(t[12]=n=>e.sortBy("source.repositoryName"))},[t[34]||(t[34]=y("Repository ",-1)),s("i",{class:O(["fas",e.sortIcon("source.repositoryName")])},null,2)],2)]),s("div",Nb,[s("span",{class:O(["sortable",{active:e.query?.sort=="status"}]),onClick:t[13]||(t[13]=n=>e.sortBy("status"))},[t[35]||(t[35]=y("Status ",-1)),s("i",{class:O(["fas",e.sortIcon("status")])},null,2)],2)]),s("div",Sb,[s("span",{class:O(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[14]||(t[14]=n=>e.sortBy("pageView"))},[t[36]||(t[36]=y("Views ",-1)),s("i",{class:O(["fas",e.sortIcon("pageView")])},null,2)],2)]),s("div",Db,[s("span",{class:O(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[15]||(t[15]=n=>e.sortBy("anonymizeDate"))},[t[37]||(t[37]=y("Anonymized ",-1)),s("i",{class:O(["fas",e.sortIcon("anonymizeDate")])},null,2)],2)]),t[38]||(t[38]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(J,null,ne(e.filteredRepositories,(n,i)=>(l(),d("div",{class:O(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error","row-selected":e.selected[n?.repoId]}]),role:"row"},[s("div",Rb,[E(s("input",Tb,null,512),[[o,{state:e.viewState,set:a=>{e.selected[n.repoId]=a},value:e.selected[n?.repoId],form:null,options:{}}]])]),s("div",Ob,[t[43]||(t[43]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",Ab,[s("a",{class:"repo-name",target:"_blank",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId)},null,8,Ib),s("div",Vb,[s("a",{textContent:c(n?.source?.repositoryName),href:e.safeUrl("https://github.com/"+n?.source?.repositoryName+"/")},null,8,Pb),n?.options?.update?(l(),d("span",qb,[t[39]||(t[39]=y("\xA0\xB7\xA0",-1)),s("a",{textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,Mb)])):f("v-if",!0),n?.options?.update?f("v-if",!0):(l(),d("span",$b,[t[40]||(t[40]=y("\xA0\xB7\xA0@",-1)),s("a",{textContent:c(n?.source?.commit?.substring(0,8)),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},null,8,Ub)])),n?.conference?(l(),d("span",Lb,[t[41]||(t[41]=y("\xA0\xB7\xA0",-1)),t[42]||(t[42]=s("i",{class:"fas fa-chalkboard-teacher"},null,-1)),y(" "+c(n?.conference),1)])):f("v-if",!0),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.humanFileSize(n?.size?.storage)),1),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.number(n?.options?.terms?.length))+" terms",1)])])]),s("div",Fb,[s("span",zb,[s("span",{class:O(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,Hb)]),n?.statusMessage?(l(),d("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,Bb)):f("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView||0))},null,8,Gb),s("div",{class:"cell-expires",role:"cell",textContent:c(e.fmt?.humanTime(n?.anonymizeDate))},null,8,jb),s("div",Wb,[s("div",Kb,[t[55]||(t[55]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",Yb,[s("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[44]||(t[44]=[s("i",{class:"far fa-edit"},null,-1),y(" Edit",-1)])],8,Jb),s("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[45]||(t[45]=[s("i",{class:"fa fa-eye"},null,-1),y(" View repo",-1)])],8,Qb),n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[46]||(t[46]=[s("i",{class:"fas fa-globe"},null,-1),y(" View page",-1)])],8,Xb)):f("v-if",!0),s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.fetchGithubInfo(n),["prevent"])},[...t[47]||(t[47]=[s("i",{class:"fab fa-github"},null,-1),y(" Live GitHub info",-1)])],8,Zb),t[53]||(t[53]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.updateRepository(n),["prevent"])},[...t[48]||(t[48]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force update",-1)])],8,xb),[[B,n?.status=="ready"||n?.status=="error"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.updateRepository(n),["prevent"])},[...t[49]||(t[49]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Enable",-1)])],8,e1),[[B,n?.status=="removed"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.showStatusMessage(n),["prevent"])},[...t[50]||(t[50]=[s("i",{class:"fas fa-exclamation-triangle"},null,-1),y(" View status message",-1)])],8,t1),[[B,n?.statusMessage]]),t[54]||(t[54]=s("div",{class:"dropdown-divider"},null,-1)),s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.removeCache(n),["prevent"])},[...t[51]||(t[51]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])],8,s1),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:we(a=>e.removeRepository(n),["prevent"])},[...t[52]||(t[52]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,n1),[[B,n?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(l(),d("div",o1,[...t[56]||(t[56]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No repositories match the current filters.",-1)])])):f("v-if",!0)]),s("div",r1,[s("span",i1,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",a1,[s("button",{class:"btn btn-sm",onClick:t[16]||(t[16]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[57]||(t[57]=[s("i",{class:"fas fa-chevron-left"},null,-1),y(" Previous ",-1)])],8,l1),E(s("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,d1),[[o,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),s("span",null,"of "+c(e.totalPage),1),s("button",{class:"btn btn-sm",onClick:t[17]||(t[17]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[58]||(t[58]=[y(" Next ",-1),s("i",{class:"fas fa-chevron-right"},null,-1)])],8,u1)])):f("v-if",!0),s("span",c1,[t[60]||(t[60]=s("label",null,"Per page",-1)),E((l(),d("select",p1,[...t[59]||(t[59]=[ge('',5)])])),[[o,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var f1={class:"container paper-page admin-page"},m1={class:"paper-crumbs"},h1={class:"here"},v1={class:"paper-page-title"},y1={key:0,class:"user-detail-card"},g1={class:"user-header"},b1=["src"],w1={class:"status-dot-wrap"},k1=["textContent"],_1={key:0,class:"type-badge type-repo"},E1={class:"user-actions",style:{"margin-top":"4px"}},C1={class:"user-detail-grid"},N1={class:"detail-value"},S1={class:"detail-value"},D1={class:"detail-value",style:{"font-family":"var(--font-mono)","font-size":"0.85rem"}},R1={class:"detail-value"},T1=["href"],O1={class:"detail-value"},A1={class:"detail-value"},I1={key:0},V1={key:1,class:"text-muted"},P1={class:"detail-value"},q1={key:0,style:{"margin-top":"20px"}},M1={class:"paper-table w-100",style:{"margin-top":"10px"}},$1={class:"paper-table-row",style:{"grid-template-columns":"1fr 160px"}},U1={class:"cell-anon",role:"cell"},L1={class:"anon-text"},F1=["textContent"],z1={class:"cell-expires",role:"cell"},H1={key:1,class:"admin-section-header"},B1={class:"section-count"},G1={key:2,class:"user-detail-card"},j1={type:"text",class:"form-control",placeholder:"Token name (e.g. dev-laptop)",required:""},W1={key:0,class:"alert alert-warning",role:"alert"},K1={style:{"white-space":"pre-wrap","word-break":"break-all",margin:"8px 0 0","font-family":"var(--font-mono)","font-size":"0.85rem"}},Y1={key:1,class:"paper-table w-100"},J1={class:"paper-table-row",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},Q1=["textContent"],X1=["textContent"],Z1={role:"cell"},x1={key:0},ew={key:1,class:"text-muted"},tw={role:"cell"},sw=["onClick"],nw={key:2,class:"paper-table-empty"},ow={class:"admin-section-header"},rw={class:"section-count"},iw={class:"admin-summary"},aw={class:"summary-total"},lw={class:"count"},dw={class:"count"},uw={class:"count"},cw={class:"count"},pw={class:"count"},fw={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},mw={class:"admin-filter-row"},hw={class:"search-wrap"},vw={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repoId, source repo, error message\u2026",autocomplete:"off"},yw={key:3,class:"bulk-bar"},gw={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},bw={class:"paper-table-head",role:"row"},ww={role:"columnheader",style:{width:"28px"}},kw=["checked"],_w={role:"columnheader"},Ew={role:"columnheader"},Cw={role:"columnheader",class:"num"},Nw={role:"columnheader"},Sw={role:"cell",style:{width:"28px"}},Dw={type:"checkbox","aria-label":"Select repository"},Rw={class:"cell-anon",role:"cell"},Tw={class:"anon-text"},Ow=["textContent","href"],Aw={class:"anon-sub"},Iw=["textContent","href"],Vw={key:0},Pw=["textContent","href"],qw={key:1},Mw=["textContent","href"],$w={key:2},Uw={class:"cell-status",role:"cell"},Lw={class:"status-line"},Fw=["textContent"],zw=["textContent","title"],Hw=["textContent"],Bw=["textContent"],Gw={class:"cell-actions",role:"cell"},jw={class:"dropdown"},Ww={class:"dropdown-menu dropdown-menu-right"},Kw=["href"],Yw=["href"],Jw=["href"],Qw=["onClick"],Xw=["onClick"],Zw=["onClick"],xw=["onClick"],ek=["onClick"],tk=["onClick"],sk={key:0,class:"paper-table-empty"};function el(e,t){let o=be("field"),r=be("form");return l(),d("div",f1,[s("div",m1,[t[22]||(t[22]=s("a",{href:"/admin/users"},"Users",-1)),t[23]||(t[23]=y(" \xA0/\xA0 ",-1)),s("span",h1,c(e.userInfo?.username||"Profile"),1)]),s("h1",v1,c(e.userInfo?.username||"User"),1),t[81]||(t[81]=ge('',1)),e.userInfo?(l(),d("div",y1,[s("div",g1,[e.userInfo?.photo?(l(),d("img",{key:0,width:"56",height:"56",src:e.safeUrl(e.userInfo?.photo)},null,8,b1)):f("v-if",!0),s("div",null,[s("h1",null,[y(c(e.userInfo?.username)+" ",1),s("span",w1,[s("span",{class:O(["status-dot",{"status-ready":e.userInfo?.status=="active","status-removed":e.userInfo?.status!="active"}])},null,2),s("span",{textContent:c(e.fmt?.title(e.userInfo?.status))},null,8,k1)]),e.userInfo?.isAdmin?(l(),d("span",_1,"Admin")):f("v-if",!0)]),s("div",E1,[e.userInfo?.status!=="banned"?(l(),d("button",{key:0,class:"btn btn-sm text-danger",onClick:t[0]||(t[0]=n=>e.banUser())},[...t[24]||(t[24]=[s("i",{class:"fas fa-ban"},null,-1),y(" Ban",-1)])])):f("v-if",!0),e.userInfo?.status==="banned"||e.userInfo?.status==="removed"?(l(),d("button",{key:1,class:"btn btn-sm",onClick:t[1]||(t[1]=n=>e.activateUser())},[...t[25]||(t[25]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Activate",-1)])])):f("v-if",!0),e.userInfo?.isAdmin?f("v-if",!0):(l(),d("button",{key:2,class:"btn btn-sm",onClick:t[2]||(t[2]=n=>e.promoteUser())},[...t[26]||(t[26]=[s("i",{class:"fas fa-user-shield"},null,-1),y(" Promote to admin",-1)])])),e.userInfo?.isAdmin?(l(),d("button",{key:3,class:"btn btn-sm text-danger",onClick:t[3]||(t[3]=n=>e.demoteUser())},[...t[27]||(t[27]=[s("i",{class:"fas fa-user-minus"},null,-1),y(" Remove admin",-1)])])):f("v-if",!0)])])]),s("div",C1,[t[30]||(t[30]=s("div",{class:"detail-label"},"ID",-1)),s("div",N1,c(e.userInfo?._id),1),t[31]||(t[31]=s("div",{class:"detail-label"},"Email",-1)),s("div",S1,c(e.userInfo?.emails?.[0]?.email),1),t[32]||(t[32]=s("div",{class:"detail-label"},"Access token",-1)),s("div",D1,c(e.userInfo?.accessTokens?.github),1),t[33]||(t[33]=s("div",{class:"detail-label"},"GitHub",-1)),s("div",R1,[s("a",{target:"_blank",href:e.safeUrl("https://github.com/"+e.userInfo?.username)},[t[28]||(t[28]=s("i",{class:"fab fa-github"},null,-1)),y(" "+c(e.userInfo?.username),1)],8,T1)]),t[34]||(t[34]=s("div",{class:"detail-label"},"Created",-1)),s("div",O1,c(e.fmt?.humanTime(e.userInfo?.dateOfEntry)),1),t[35]||(t[35]=s("div",{class:"detail-label"},"Last connection",-1)),s("div",A1,[e.userInfo?.accessTokenDates?.github?(l(),d("span",I1,c(e.fmt?.humanTime(e.userInfo?.accessTokenDates?.github)),1)):f("v-if",!0),e.userInfo?.accessTokenDates?.github?f("v-if",!0):(l(),d("span",V1,"never"))]),t[36]||(t[36]=s("div",{class:"detail-label"},"GitHub repos",-1)),s("div",P1,[y(c(e.userInfo?.repositories?.length)+" repositories ",1),s("button",{class:"btn btn-sm ml-2",onClick:t[4]||(t[4]=n=>e.showRepos=!e.showRepos)},c(e.showRepos?"Hide":"Show"),1),s("button",{class:"btn btn-sm ml-1",onClick:t[5]||(t[5]=n=>e.getGitHubRepositories())},[...t[29]||(t[29]=[s("i",{class:"fas fa-sync"},null,-1),y(" Refresh ",-1)])])])]),e.showRepos?(l(),d("div",q1,[t[39]||(t[39]=s("div",{class:"paper-section-eyebrow"},"GitHub repositories",-1)),s("div",M1,[(l(!0),d(J,null,ne(e.userInfo?.repositories,(n,i)=>(l(),d("div",$1,[s("div",U1,[t[37]||(t[37]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",L1,[s("span",{class:"repo-name",textContent:c(n?.name)},null,8,F1)])]),s("div",z1,[t[38]||(t[38]=s("i",{class:"fas fa-database"},null,-1)),y(" "+c(e.fmt?.humanFileSize(n?.size)),1)])]))),256))])])):f("v-if",!0)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(l(),d("div",H1,[t[40]||(t[40]=s("h2",null,[s("i",{class:"fas fa-key"}),y(" API tokens")],-1)),s("span",B1,c(e.tokens?.length),1)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(l(),d("div",G1,[t[46]||(t[46]=s("p",{class:"paper-page-lede"},[y("Personal API tokens for this admin account. Send as "),s("code",null,"Authorization: Bearer "),y(" to authenticate without GitHub OAuth (useful for development).")],-1)),E((l(),d("form",{class:"d-flex",style:{gap:"8px","margin-bottom":"12px"},onSubmit:t[6]||(t[6]=we(n=>e.submitForm(n,()=>{e.createToken()}),["prevent"]))},[E(s("input",j1,null,512),[[o,{state:e.viewState,set:n=>{e.tokenForm.name=n},value:e.tokenForm?.name,form:null,options:{}}]]),t[41]||(t[41]=s("button",{type:"submit",class:"btn btn-primary"},[s("i",{class:"fas fa-plus"}),y(" Generate")],-1))],32)),[[r,e.viewState]]),e.tokenForm?.plaintext?(l(),d("div",W1,[t[42]||(t[42]=s("strong",null,"Copy this token now \u2014 it will not be shown again:",-1)),s("pre",K1,c(e.tokenForm?.plaintext),1),s("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=n=>e.tokenForm.plaintext=null)},"Dismiss")])):f("v-if",!0),e.tokens?.length?(l(),d("div",Y1,[t[44]||(t[44]=s("div",{class:"paper-table-head",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},[s("div",{role:"columnheader"},"Name"),s("div",{role:"columnheader"},"Created"),s("div",{role:"columnheader"},"Last used"),s("div",{role:"columnheader","aria-label":"Actions"})],-1)),(l(!0),d(J,null,ne(e.tokens,(n,i)=>(l(),d("div",J1,[s("div",{role:"cell",textContent:c(n?.name)},null,8,Q1),s("div",{role:"cell",textContent:c(e.fmt?.humanTime(n?.createdAt))},null,8,X1),s("div",Z1,[n?.lastUsedAt?(l(),d("span",x1,c(e.fmt?.humanTime(n?.lastUsedAt)),1)):f("v-if",!0),n?.lastUsedAt?f("v-if",!0):(l(),d("span",ew,"never"))]),s("div",tw,[s("button",{class:"btn btn-sm text-danger",title:"Revoke",onClick:a=>e.revokeToken(n)},[...t[43]||(t[43]=[s("i",{class:"fas fa-trash-alt"},null,-1)])],8,sw)])]))),256))])):f("v-if",!0),e.tokens?.length?f("v-if",!0):(l(),d("div",nw,[...t[45]||(t[45]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No tokens yet.",-1)])]))])):f("v-if",!0),s("div",ow,[t[47]||(t[47]=s("h2",null,[s("i",{class:"fas fa-code-branch"}),y(" Anonymized repositories")],-1)),s("span",rw,c(e.repositories?.length),1)]),s("div",iw,[s("span",aw,c(e.fmt?.number(e.repositories?.length)),1),s("span",{class:O(["summary-pill ok",{active:e.filters?.status?.ready===!1}]),title:"Toggle ready filter",onClick:t[8]||(t[8]=n=>e.filters.status.ready=!e.filters.status.ready)},[t[48]||(t[48]=y("Ready ",-1)),s("span",lw,c(e.fmt?.number(e.statusCountFor("ready"))),1)],2),s("span",{class:O(["summary-pill warn",{active:e.filters?.status?.preparing===!1}]),title:"Toggle preparing filter",onClick:t[9]||(t[9]=n=>e.filters.status.preparing=!e.filters.status.preparing)},[t[49]||(t[49]=y("Preparing ",-1)),s("span",dw,c(e.fmt?.number(e.statusCountFor("preparing"))),1)],2),s("span",{class:O(["summary-pill error",{active:e.filters?.status?.error===!1}]),title:"Toggle errored filter",onClick:t[10]||(t[10]=n=>e.filters.status.error=!e.filters.status.error)},[t[50]||(t[50]=y("Errored ",-1)),s("span",uw,c(e.fmt?.number(e.statusCountFor("error"))),1)],2),s("span",{class:O(["summary-pill",{active:e.filters?.status?.expired===!1}]),title:"Toggle expired filter",onClick:t[11]||(t[11]=n=>e.filters.status.expired=!e.filters.status.expired)},[t[51]||(t[51]=y("Expired ",-1)),s("span",cw,c(e.fmt?.number(e.statusCountFor("expired"))),1)],2),s("span",{class:O(["summary-pill",{active:e.filters?.status?.removed===!1}]),title:"Toggle removed filter",onClick:t[12]||(t[12]=n=>e.filters.status.removed=!e.filters.status.removed)},[t[52]||(t[52]=y("Removed ",-1)),s("span",pw,c(e.fmt?.number(e.statusCountFor("removed"))),1)],2)]),E((l(),d("form",fw,[s("div",mw,[s("div",hw,[E(s("input",vw,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),t[54]||(t[54]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[13]||(t[13]=n=>e.exportCsv())},[...t[53]||(t[53]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])])])])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",yw,[s("span",null,[s("strong",null,c(e.selectedCount()),1),t[55]||(t[55]=y(" selected",-1))]),s("button",{class:"btn btn-sm",type:"button",onClick:t[14]||(t[14]=n=>e.bulkRefresh())},[...t[56]||(t[56]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force refresh",-1)])]),s("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[15]||(t[15]=n=>e.bulkRemoveCache())},[...t[57]||(t[57]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])]),s("button",{class:"btn btn-sm",type:"button",onClick:t[16]||(t[16]=n=>e.clearSelection())},"Clear")])):f("v-if",!0),s("div",gw,[s("div",bw,[s("div",ww,[s("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[17]||(t[17]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,kw)]),s("div",_w,[s("span",{class:O(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[18]||(t[18]=n=>e.sortBy("source.repositoryName"))},[t[58]||(t[58]=y("Repository ",-1)),s("i",{class:O(["fas",e.sortIcon("source.repositoryName")])},null,2)],2)]),s("div",Ew,[s("span",{class:O(["sortable",{active:e.query?.sort=="status"}]),onClick:t[19]||(t[19]=n=>e.sortBy("status"))},[t[59]||(t[59]=y("Status ",-1)),s("i",{class:O(["fas",e.sortIcon("status")])},null,2)],2)]),s("div",Cw,[s("span",{class:O(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[20]||(t[20]=n=>e.sortBy("pageView"))},[t[60]||(t[60]=y("Views ",-1)),s("i",{class:O(["fas",e.sortIcon("pageView")])},null,2)],2)]),s("div",Nw,[s("span",{class:O(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[21]||(t[21]=n=>e.sortBy("anonymizeDate"))},[t[61]||(t[61]=y("Anonymized ",-1)),s("i",{class:O(["fas",e.sortIcon("anonymizeDate")])},null,2)],2)]),t[62]||(t[62]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(J,null,ne(e.filteredRepositories,(n,i)=>(l(),d("div",{class:O(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error","row-selected":e.selected[n?.repoId]}]),role:"row"},[s("div",Sw,[E(s("input",Dw,null,512),[[o,{state:e.viewState,set:a=>{e.selected[n.repoId]=a},value:e.selected[n?.repoId],form:null,options:{}}]])]),s("div",Rw,[t[67]||(t[67]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",Tw,[s("a",{class:"repo-name",target:"_blank",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId)},null,8,Ow),s("div",Aw,[s("a",{textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,Iw),n?.options?.update?(l(),d("span",Vw,[t[63]||(t[63]=y("\xA0\xB7\xA0",-1)),s("a",{textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,Pw)])):f("v-if",!0),n?.options?.update?f("v-if",!0):(l(),d("span",qw,[t[64]||(t[64]=y("\xA0\xB7\xA0@",-1)),s("a",{textContent:c(n?.source?.commit?.substring(0,8)),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},null,8,Mw)])),n?.conference?(l(),d("span",$w,[t[65]||(t[65]=y("\xA0\xB7\xA0",-1)),t[66]||(t[66]=s("i",{class:"fas fa-chalkboard-teacher"},null,-1)),y(" "+c(n?.conference),1)])):f("v-if",!0),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.humanFileSize(n?.size?.storage)),1),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.number(n?.options?.terms?.length))+" terms",1)])])]),s("div",Uw,[s("span",Lw,[s("span",{class:O(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,Fw)]),n?.statusMessage?(l(),d("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,zw)):f("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView||0))},null,8,Hw),s("div",{class:"cell-expires",role:"cell",textContent:c(e.fmt?.humanTime(n?.anonymizeDate))},null,8,Bw),s("div",Gw,[s("div",jw,[t[79]||(t[79]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",Ww,[s("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[68]||(t[68]=[s("i",{class:"far fa-edit"},null,-1),y(" Edit",-1)])],8,Kw),s("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[69]||(t[69]=[s("i",{class:"fa fa-eye"},null,-1),y(" View repo",-1)])],8,Yw),n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[70]||(t[70]=[s("i",{class:"fas fa-globe"},null,-1),y(" View page",-1)])],8,Jw)):f("v-if",!0),s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.fetchGithubInfo(n),["prevent"])},[...t[71]||(t[71]=[s("i",{class:"fab fa-github"},null,-1),y(" Live GitHub info",-1)])],8,Qw),t[77]||(t[77]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.updateRepository(n),["prevent"])},[...t[72]||(t[72]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force update",-1)])],8,Xw),[[B,n?.status=="ready"||n?.status=="error"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.updateRepository(n),["prevent"])},[...t[73]||(t[73]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Enable",-1)])],8,Zw),[[B,n?.status=="removed"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.showStatusMessage(n),["prevent"])},[...t[74]||(t[74]=[s("i",{class:"fas fa-exclamation-triangle"},null,-1),y(" View status message",-1)])],8,xw),[[B,n?.statusMessage]]),t[78]||(t[78]=s("div",{class:"dropdown-divider"},null,-1)),s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.removeCache(n),["prevent"])},[...t[75]||(t[75]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])],8,ek),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:we(a=>e.removeRepository(n),["prevent"])},[...t[76]||(t[76]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,tk),[[B,n?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(l(),d("div",sk,[...t[80]||(t[80]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No repositories match the current filters.",-1)])])):f("v-if",!0)])])}var nk={class:"container paper-page admin-page"},ok={class:"admin-summary"},rk={class:"summary-total"},ik={class:"count"},ak={class:"count"},lk={class:"count"},dk={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},uk={class:"w-100 admin-filter-toolbar","aria-label":"Users","accept-charset":"UTF-8"},ck={class:"admin-filter-row"},pk={class:"search-wrap"},fk={type:"search",class:"form-control","aria-label":"Search users",placeholder:"Search username or email\u2026",autocomplete:"off"},mk={key:0,class:"admin-search-hint"},hk={class:"admin-filter-inline"},vk={class:"form-control form-control-sm"},yk={class:"admin-filter-inline","aria-label":"Pagination"},gk=["disabled"],bk={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},wk=["disabled"],kk={key:0,class:"admin-filter-row"},_k={class:"admin-active-chips"},Ek={class:"key"},Ck=["onClick"],Nk={key:1,class:"bulk-bar"},Sk={class:"paper-table w-100",role:"table","aria-label":"Users",style:{"--cols":"28px minmax(280px, 2.4fr) 100px 140px 140px 52px"}},Dk={class:"paper-table-head admin-users-row",role:"row"},Rk={role:"columnheader",style:{width:"28px"}},Tk=["checked"],Ok={role:"columnheader"},Ak={role:"columnheader"},Ik={role:"cell",style:{width:"28px"}},Vk={type:"checkbox","aria-label":"Select user"},Pk={class:"cell-anon",role:"cell"},qk=["src"],Mk={class:"anon-text"},$k=["textContent","href"],Uk={class:"anon-sub"},Lk={key:0},Fk={key:1},zk=["href"],Hk={key:2},Bk={class:"cell-views num",role:"cell"},Gk=["textContent","href"],jk={class:"cell-status",role:"cell"},Wk=["textContent"],Kk={class:"cell-status",role:"cell"},Yk={key:0,class:"type-badge type-repo"},Jk={key:1,class:"empty-dash"},Qk={class:"cell-actions",role:"cell"},Xk={class:"dropdown"},Zk={class:"dropdown-menu dropdown-menu-right"},xk=["href"],e0=["href"],t0=["onClick"],s0=["onClick"],n0={key:0,class:"paper-table-empty"},o0={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},r0={style:{"font-size":"12px",color:"var(--ink-muted)"}},i0={key:0,class:"pagination-compact"},a0=["disabled"],l0=["max"],d0=["disabled"],u0={class:"admin-filter-inline"},c0={class:"form-control form-control-sm"};function tl(e,t){let o=be("field"),r=be("form");return l(),d("div",nk,[t[43]||(t[43]=ge('
Admin \xA0/\xA0 Users

Users

',3)),s("div",ok,[s("span",rk,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),s("span",{class:O(["summary-pill ok",{active:e.query?.status=="active"}]),onClick:t[0]||(t[0]=n=>{e.query.status=e.query.status=="active"?"":"active",e.query.page=1})},[t[13]||(t[13]=y("Active ",-1)),s("span",ik,c(e.fmt?.number(e.statusCountFor("active"))),1)],2),s("span",{class:O(["summary-pill error",{active:e.query?.status=="banned"}]),onClick:t[1]||(t[1]=n=>{e.query.status=e.query.status=="banned"?"":"banned",e.query.page=1})},[t[14]||(t[14]=y("Banned ",-1)),s("span",ak,c(e.fmt?.number(e.statusCountFor("banned"))),1)],2),s("span",{class:O(["summary-pill",{active:e.query?.status=="removed"}]),onClick:t[2]||(t[2]=n=>{e.query.status=e.query.status=="removed"?"":"removed",e.query.page=1})},[t[15]||(t[15]=y("Removed ",-1)),s("span",lk,c(e.fmt?.number(e.statusCountFor("removed"))),1)],2)]),e.fetchError?(l(),d("div",dk,[t[16]||(t[16]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fetchError),1)])):f("v-if",!0),E((l(),d("form",uk,[s("div",ck,[s("div",pk,[E(s("input",fk,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(l(),d("span",mk,"/"))]),s("span",hk,[t[18]||(t[18]=s("label",null,"Role",-1)),E((l(),d("select",vk,[...t[17]||(t[17]=[s("option",{value:""},"Any",-1),s("option",{value:"admin"},"Admin",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.role=n},value:e.query?.role,form:null,options:{}}]])]),t[22]||(t[22]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",onClick:t[3]||(t[3]=n=>e.exportCsv())},[...t[19]||(t[19]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])]),s("span",yk,[s("button",{class:"btn btn-sm",type:"button",onClick:t[4]||(t[4]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[20]||(t[20]=[s("i",{class:"fas fa-chevron-left"},null,-1)])],8,gk),s("span",bk,c(e.query?.page)+"/"+c(e.totalPage||1),1),s("button",{class:"btn btn-sm",type:"button",onClick:t[5]||(t[5]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[21]||(t[21]=[s("i",{class:"fas fa-chevron-right"},null,-1)])],8,wk)])]),e.chips?.length?(l(),d("div",kk,[s("div",_k,[(l(!0),d(J,null,ne(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[s("span",Ek,c(n?.label),1),s("span",null,c(n?.value),1),s("button",{type:"button",onClick:a=>e.clearFilter(n.key)},[...t[23]||(t[23]=[s("i",{class:"fas fa-times"},null,-1)])],8,Ck)]))),128))])])):f("v-if",!0)])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",Nk,[s("span",null,[s("strong",null,c(e.selectedCount()),1),t[24]||(t[24]=y(" selected",-1))]),s("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[6]||(t[6]=n=>e.bulkBan())},[...t[25]||(t[25]=[s("i",{class:"fas fa-ban"},null,-1),y(" Ban",-1)])]),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>{e.selected={},e.allSelected=!1})},"Clear")])):f("v-if",!0),s("div",Sk,[s("div",Dk,[s("div",Rk,[s("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[8]||(t[8]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,Tk)]),s("div",Ok,[s("span",{class:O(["sortable",{active:e.query?.sort=="username"}]),onClick:t[9]||(t[9]=n=>e.sortBy("username"))},[t[26]||(t[26]=y("User ",-1)),s("i",{class:O(["fas",e.sortIcon("username")])},null,2)],2)]),t[28]||(t[28]=s("div",{role:"columnheader",class:"num"},"Repos",-1)),s("div",Ak,[s("span",{class:O(["sortable",{active:e.query?.sort=="status"}]),onClick:t[10]||(t[10]=n=>e.sortBy("status"))},[t[27]||(t[27]=y("Status ",-1)),s("i",{class:O(["fas",e.sortIcon("status")])},null,2)],2)]),t[29]||(t[29]=s("div",{role:"columnheader"},"Role",-1)),t[30]||(t[30]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(J,null,ne(e.filteredUsers,(n,i)=>(l(),d("div",{class:O(["paper-table-row admin-users-row",{"row-selected":e.selected[n?.username]}]),role:"row"},[s("div",Ik,[E(s("input",Vk,null,512),[[o,{state:e.viewState,set:a=>{e.selected[n.username]=a},value:e.selected[n?.username],form:null,options:{}}]])]),s("div",Pk,[n?.photo?(l(),d("img",{key:0,width:"28",height:"28",class:"rounded-circle",style:{"flex-shrink":"0"},src:e.safeUrl(n?.photo)},null,8,qk)):f("v-if",!0),s("div",Mk,[s("a",{class:"repo-name",textContent:c(n?.username),href:e.safeUrl("/admin/users/"+n?.username)},null,8,$k),s("div",Uk,[n?.emails[0].email?(l(),d("span",Lk,c(n?.emails[0].email),1)):f("v-if",!0),n?.emails[0].email?(l(),d("span",Fk,"\xA0\xB7\xA0")):f("v-if",!0),s("a",{target:"_blank",href:e.safeUrl("https://github.com/"+n?.username)},[t[31]||(t[31]=s("i",{class:"fab fa-github"},null,-1)),y(" "+c(n?.username),1)],8,zk),n?.dateOfEntry?(l(),d("span",Hk,"\xA0\xB7\xA0Joined "+c(e.fmt?.humanTime(n?.dateOfEntry)),1)):f("v-if",!0)])])]),s("div",Bk,[s("a",{title:"Show this user's repositories",textContent:c(e.fmt?.number(n?.repoCount||0)),href:e.safeUrl("/admin/?owner="+n?.username)},null,8,Gk)]),s("div",jk,[s("span",{class:O(["status-dot",{"status-ready":n?.status=="active","status-removed":n?.status=="removed"||n?.status=="banned"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,Wk)]),s("div",Kk,[n?.isAdmin?(l(),d("span",Yk,"Admin")):f("v-if",!0),n?.isAdmin?f("v-if",!0):(l(),d("span",Jk,"\u2014"))]),s("div",Qk,[s("div",Xk,[t[37]||(t[37]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",Zk,[s("a",{class:"dropdown-item",href:e.safeUrl("/admin/users/"+n?.username)},[...t[32]||(t[32]=[s("i",{class:"far fa-eye"},null,-1),y(" View details",-1)])],8,xk),s("a",{class:"dropdown-item",href:e.safeUrl("/admin/?owner="+n?.username)},[...t[33]||(t[33]=[s("i",{class:"fas fa-code-branch"},null,-1),y(" View repositories",-1)])],8,e0),t[36]||(t[36]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:we(a=>e.banUser(n),["prevent"])},[...t[34]||(t[34]=[s("i",{class:"fas fa-ban"},null,-1),y(" Ban",-1)])],8,t0),[[B,n?.status=="active"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.activateUser(n),["prevent"])},[...t[35]||(t[35]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Activate",-1)])],8,s0),[[B,n?.status=="removed"||n?.status=="banned"]])])])])],2))),256)),e.filteredUsers?.length==0?(l(),d("div",n0,[...t[38]||(t[38]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No users match the current filters.",-1)])])):f("v-if",!0)]),s("div",o0,[s("span",r0,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",i0,[s("button",{class:"btn btn-sm",onClick:t[11]||(t[11]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[39]||(t[39]=[s("i",{class:"fas fa-chevron-left"},null,-1),y(" Previous",-1)])],8,a0),E(s("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,l0),[[o,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),s("span",null,"of "+c(e.totalPage),1),s("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[40]||(t[40]=[y("Next ",-1),s("i",{class:"fas fa-chevron-right"},null,-1)])],8,d0)])):f("v-if",!0),s("span",u0,[t[42]||(t[42]=s("label",null,"Per page",-1)),E((l(),d("select",c0,[...t[41]||(t[41]=[s("option",{value:"10"},"10",-1),s("option",{value:"25"},"25",-1),s("option",{value:"50"},"50",-1),s("option",{value:"100"},"100",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var p0={class:"anonymize-page h-100"},f0={class:"anonymize-landing"},m0={class:"anonymize-landing-inner"},h0={class:"form-group mt-4 mb-2"},v0={class:"source-url-label-row"},y0={key:0,class:"repo-access","aria-label":"GitHub access"},g0={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},b0=["aria-pressed","disabled"],w0=["aria-pressed","disabled"],k0={key:1,class:"connection-badge"},_0={id:"sourceUrl-landing",type:"text",class:"form-control form-control-lg",placeholder:"https://github.com/owner/repository"},E0={key:0,class:"alert alert-info",role:"status"},C0={key:1},N0={key:1,class:"repo-access-details","aria-label":"GitHub access"},S0={class:"repo-access-main"},D0={class:"repo-access-controls"},R0={key:1,class:"connection-link",href:"/connections"},T0={class:"repo-access-note"},O0={key:0},A0={class:"anonymize-workspace"},I0={class:"anonymize-topbar"},V0={class:"anonymize-topbar-inner"},P0={class:"paper-crumbs"},q0={class:"here"},M0={class:"anonymize-topbar-head"},$0={class:"paper-page-title anonymize-topbar-title"},U0={key:0},L0={key:1},F0={class:"anonymize-split"},z0={class:"anonymize-form-col overflow-auto"},H0={class:"form needs-validation paper-settings-main",name:"anonymize",novalidate:""},B0={class:"paper-settings-section"},G0={class:"form-group"},j0={class:"source-url-label-row"},W0={key:0,class:"repo-access","aria-label":"GitHub access"},K0={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},Y0=["aria-pressed","disabled"],J0=["aria-pressed","disabled"],Q0={key:1,class:"connection-badge"},X0=["disabled"],Z0={class:"invalid-feedback"},x0={class:"invalid-feedback"},e_={class:"invalid-feedback"},t_={class:"invalid-feedback"},s_={key:0,class:"repo-access-details","aria-label":"GitHub access"},n_={class:"repo-access-main"},o_={class:"repo-access-controls"},r_={key:1,class:"connection-link",href:"/connections"},i_={class:"repo-access-note"},a_={key:0},l_={key:1,class:"repo-access-details"},d_={key:0,role:"status"},u_={key:2,class:"form-grid-2"},c_={class:"form-group"},p_={class:"input-group"},f_={class:"form-control",id:"branch",name:"branch"},m_=["textContent","value"],h_={class:"input-group-append"},v_={class:"form-group"},y_=["disabled"],g_={class:"invalid-feedback"},b_={class:"invalid-feedback"},w_={class:"form-check"},k_={class:"form-check-input",type:"checkbox",id:"update",name:"update"},__={class:"paper-settings-section"},E_={class:"form-group"},C_=["disabled"],N_={class:"form-text text-muted"},S_={class:"invalid-feedback"},D_={class:"form-group"},R_=["disabled"],T_={class:"form-text text-muted"},O_={class:"invalid-feedback"},A_={class:"form-group"},I_=["disabled"],V_={class:"form-text text-muted"},P_={class:"invalid-feedback"},q_={class:"form-group"},M_={class:"form-text text-muted"},$_=["href"],U_={class:"invalid-feedback"},L_={class:"form-text text-muted"},F_={class:"paper-settings-section"},z_={class:"form-group"},H_={class:"form-text text-muted"},B_={class:"warning-feedback"},G_={class:"invalid-feedback"},j_={class:"paper-settings-section"},W_={class:"form-check"},K_={class:"form-check-input",type:"checkbox",id:"link",name:"link"},Y_={class:"form-check"},J_={class:"form-check-input",type:"checkbox",id:"image",name:"image"},Q_={class:"form-check"},X_={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},Z_={class:"form-check"},x_={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},eE={class:"form-check"},tE=["disabled"],sE={class:"form-check"},nE={class:"form-check-input",type:"checkbox",id:"title-gist",name:"title-gist"},oE={class:"form-check"},rE={class:"form-check-input",type:"checkbox",id:"content-gist",name:"content-gist"},iE={class:"form-check"},aE={class:"form-check-input",type:"checkbox",id:"comments-gist",name:"comments-gist"},lE={class:"form-check"},dE={class:"form-check-input",type:"checkbox",id:"username-gist",name:"username-gist"},uE={class:"form-check"},cE={class:"form-check-input",type:"checkbox",id:"date-gist",name:"date-gist"},pE={class:"form-check"},fE={class:"form-check-input",type:"checkbox",id:"origin-gist",name:"origin-gist"},mE={class:"form-check"},hE={class:"form-check-input",type:"checkbox",id:"title",name:"title"},vE={class:"form-check"},yE={class:"form-check-input",type:"checkbox",id:"body",name:"body"},gE={class:"form-check"},bE={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},wE={class:"form-check"},kE={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},_E={class:"form-check"},EE={class:"form-check-input",type:"checkbox",id:"username",name:"username"},CE={class:"form-check"},NE={class:"form-check-input",type:"checkbox",id:"date",name:"date"},SE={class:"form-check"},DE={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},RE={class:"paper-settings-section"},TE={class:"form-grid-2"},OE={class:"form-group"},AE={class:"form-control",id:"expiration",name:"expiration"},IE={class:"form-group"},VE=["min","max"],PE={class:"invalid-feedback"},qE={class:"invalid-feedback"},ME={class:"paper-settings-section"},$E={class:"form-group"},UE={style:{position:"relative"}},LE={type:"text",id:"coauthorSearch",class:"form-control",placeholder:"Search GitHub username\u2026",autocomplete:"off"},FE={class:"dropdown-menu show",style:{display:"block","max-height":"220px","overflow-y":"auto",width:"100%"}},zE=["onClick"],HE=["src"],BE=["textContent"],GE=["textContent"],jE={class:"coauthor-list"},WE={class:"coauthor-row d-flex align-items-center",style:{padding:"6px 0",gap:"8px"}},KE=["src"],YE=["textContent","href"],JE=["onClick"],QE={class:"form-text text-muted"},XE=["textContent"],ZE={class:"anonymize-submit-bar"},xE={key:0,class:"anonymize-preview-col"},eC=["innerHTML"],tC={key:1,class:"anonymize-preview-col"},sC={class:"anonymize-preview-body"},nC={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},oC={class:"pr-title mb-1"},rC={key:0},iC=["textContent"],aC={key:0},lC={key:1},dC={key:2},uC={class:"pr-comments mt-3"},cC={class:"pr-comment"},pC={class:"pr-comment-head"},fC=["textContent"],mC={key:0,class:"pr-comment-date"},hC={key:3},vC={class:"pr-comments"},yC={class:"pr-comment"},gC={class:"pr-comment-head"},bC={key:0,class:"pr-comment-author"},wC=["textContent"],kC=["textContent"],_C={key:0,class:"pr-comment-body"},EC={key:2,class:"anonymize-preview-col"},CC={class:"anonymize-preview-body"},NC={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},SC={class:"pr-title mb-1"},DC={key:0},RC=["textContent"],TC={key:0},OC={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--paper-bg-alt)"}},AC={key:2,class:"paper-tabs",role:"tablist"},IC=["textContent"],VC={class:"paper-tab-content"},PC={key:0},qC=["innerHTML"],MC={key:1},$C={class:"pr-comments"},UC={class:"pr-comment"},LC={class:"pr-comment-head"},FC={key:0,class:"pr-comment-author"},zC=["textContent"],HC=["textContent"],BC={key:0,class:"pr-comment-body"};function sl(e,t){let o=et("gist-file"),r=et("markdown"),n=be("field"),i=be("form");return l(),d("div",p0,[f(" ===== STATE 1: No URL \u2014 centered input ===== "),E(s("div",f0,[s("div",m0,[t[23]||(t[23]=s("div",{class:"paper-crumbs"},[y("My work \xA0/\xA0 "),s("span",{class:"here"},"New anonymization")],-1)),t[24]||(t[24]=s("h1",{class:"paper-page-title"},[y("New "),s("em",null,"anonymization")],-1)),t[25]||(t[25]=s("p",{class:"paper-page-lede"}," Paste a GitHub repository, pull-request, or gist URL. We\u2019ll fetch it, strip every trace of identity, and hand you back a stable link. ",-1)),s("div",h0,[s("div",v0,[t[18]||(t[18]=s("label",{class:"paper-field-label",for:"sourceUrl-landing"},"Source URL",-1)),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",y0,[!e.isUpdate&&e.detectedType!=="gist"?(l(),d("div",g0,[s("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[0]||(t[0]=a=>e.chooseGitHubConnection("github-app"))},[...t[17]||(t[17]=[s("i",{class:"fas fa-shield-alt","aria-hidden":"true"},null,-1),y(),s("span",{class:"sr-only"},"Read-only ",-1),y("GitHub App",-1)])],8,b0),s("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[1]||(t[1]=a=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,w0)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(l(),d("span",k0,c(e.detectedType!=="gist"&&e.githubConnection==="github-app"?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),E(s("input",_0,null,512),[[n,{state:e.viewState,set:a=>{e.sourceUrl=a},value:e.sourceUrl,form:null,options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]])]),t[26]||(t[26]=s("small",{class:"form-text",style:{color:"var(--ink-muted)"}}," Repository, pull request (\u2026/pull/42) and gist (gist.github.com/\u2026) URLs are all accepted. ",-1)),e.detectedType==="gist"&&e.gistOAuthRequired?(l(),d("aside",E0,[t[19]||(t[19]=s("p",null,"Connect GitHub OAuth to access gists. Your account and existing anonymizations stay the same, and your draft will be restored when you return.",-1)),t[20]||(t[20]=s("p",null,"GitHub's legacy OAuth connection includes write access to private repositories.",-1)),e.githubConnections?.oauthEnabled?(l(),d("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[2]||(t[2]=a=>e.connectGistOAuth())},"Connect GitHub OAuth to access gists")):(l(),d("p",C0,"GitHub OAuth is currently unavailable. Please try again later."))])):f("v-if",!0),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",N0,[s("div",S0,[s("div",D0,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=a=>e.grantGitHubAccess())},[...t[21]||(t[21]=[y("Manage access ",-1),s("i",{class:"fas fa-external-link-alt","aria-hidden":"true"},null,-1)])])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(l(),d("a",R0,c(e.isUpdate?"Change connection":"Manage connections")+" \u2192",1)):f("v-if",!0)])]),s("div",T0,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("span",O0,"Select repositories on GitHub, then return here.")):f("v-if",!0),t[22]||(t[22]=s("span",null,[s("i",{class:"fas fa-info-circle","aria-hidden":"true"}),y(" Selected content will be published, including content from private repositories.")],-1))])])):f("v-if",!0)])],512),[[B,!e.sourceUrl]]),f(" ===== STATE 2: URL provided \u2014 form (left) + preview (right) ===== "),E(s("div",A0,[s("header",I0,[s("div",V0,[s("div",P0,[t[27]||(t[27]=s("a",{href:"/dashboard"},"My work",-1)),t[28]||(t[28]=y(" \xA0/\xA0 ",-1)),s("span",q0,c(e.isUpdate?"Edit anonymization":"New anonymization"),1)]),s("div",M0,[s("h1",$0,[e.isUpdate?f("v-if",!0):(l(),d("span",U0,[...t[29]||(t[29]=[y("New ",-1),s("em",null,"anonymization",-1)])])),e.isUpdate?(l(),d("span",L0,[...t[30]||(t[30]=[y("Edit ",-1),s("em",null,"anonymization",-1)])])):f("v-if",!0)]),E(s("span",{class:O(["type-badge",{"type-repo":e.detectedType==="repo","type-pr":e.detectedType==="pr","type-gist":e.detectedType==="gist"}])},c(e.detectedType==="repo"?"Repo":e.detectedType==="pr"?"PR":"Gist"),3),[[B,e.detectedType]])])])]),s("div",F0,[f(" Form column (left) "),s("div",z0,[E((l(),d("form",H0,[s("section",B0,[t[41]||(t[41]=s("div",{class:"paper-section-eyebrow"},"Source",-1)),s("div",G0,[s("div",j0,[t[32]||(t[32]=s("label",{class:"paper-field-label",for:"sourceUrl"},"GitHub URL",-1)),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",W0,[!e.isUpdate&&e.detectedType!=="gist"?(l(),d("div",K0,[s("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[4]||(t[4]=a=>e.chooseGitHubConnection("github-app"))},[...t[31]||(t[31]=[s("i",{class:"fas fa-shield-alt","aria-hidden":"true"},null,-1),y(),s("span",{class:"sr-only"},"Read-only ",-1),y("GitHub App",-1)])],8,Y0),s("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[5]||(t[5]=a=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,J0)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(l(),d("span",Q0,c(e.detectedType!=="gist"&&e.githubConnection==="github-app"?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.sourceUrl?.invalid}]),name:"sourceUrl",id:"sourceUrl",disabled:e.isUpdate&&e.detectedType!=="repo",placeholder:"Paste a GitHub repo or pull request URL"},null,10,X0),[[n,{state:e.viewState,set:a=>{e.sourceUrl=a},value:e.sourceUrl,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),E(s("div",Z0," Please provide a valid GitHub URL. ",512),[[B,e.anonymize?.sourceUrl?.errors?.github]]),E(s("div",x0," Not accessible. The organization may restrict access. ",512),[[B,e.anonymize?.sourceUrl?.errors?.access]]),E(s("div",e_," Does not exist or is not accessible. ",512),[[B,e.anonymize?.sourceUrl?.errors?.missing]]),E(s("div",t_," Already anonymized. ",512),[[B,e.anonymize?.sourceUrl?.errors?.used]])]),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",s_,[s("div",n_,[s("div",o_,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[6]||(t[6]=a=>e.grantGitHubAccess())},[...t[33]||(t[33]=[y("Manage access ",-1),s("i",{class:"fas fa-external-link-alt","aria-hidden":"true"},null,-1)])])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(l(),d("a",r_,c(e.isUpdate?"Change connection":"Manage connections")+" \u2192",1)):f("v-if",!0)])]),s("div",i_,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("span",a_,"Select repositories on GitHub, then return here.")):f("v-if",!0),t[34]||(t[34]=s("span",null,[s("i",{class:"fas fa-info-circle","aria-hidden":"true"}),y(" Selected content will be published, including content from private repositories.")],-1))])])):f("v-if",!0),e.isUpdate&&e.detectedType==="repo"&&e.role==="owner"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(l(),d("aside",l_,[t[35]||(t[35]=s("p",null,"If you deleted and recreated this repository, reconnect it before choosing a branch.",-1)),s("button",{type:"button",class:"btn btn-outline-ink",onClick:t[7]||(t[7]=a=>e.reconnectSource())},"Reconnect source repository"),e.reconnectRepositoryId?(l(),d("p",d_,"Source reloaded. Review the branch, commit, and anonymization preview, then save to replace the published snapshot.")):f("v-if",!0)])):f("v-if",!0),e.detectedType==="repo"?(l(),d("div",u_,[s("div",c_,[t[37]||(t[37]=s("label",{class:"paper-field-label",for:"branch"},"Branch",-1)),s("div",p_,[E((l(),d("select",f_,[(l(!0),d(J,null,ne(e.branches,(a,u)=>(l(),d("option",{textContent:c(a?.name),value:a?.name},null,8,m_))),256))])),[[n,{state:e.viewState,set:a=>{e.source.branch=a},value:e.source?.branch,form:"anonymize",options:{}}]]),s("div",h_,[s("button",{class:"btn",type:"button",title:"Refresh","data-toggle":"tooltip","data-placement":"bottom",onClick:t[8]||(t[8]=a=>e.getBranches(!0))},[...t[36]||(t[36]=[s("i",{class:"fas fa-sync","aria-hidden":"true"},null,-1)])])])])]),s("div",v_,[t[38]||(t[38]=s("label",{class:"paper-field-label",for:"commit"},"Commit",-1)),E(s("input",{class:O(["form-control",{"is-invalid":e.anonymize?.commit?.invalid}]),id:"commit",disabled:e.options.update,name:"commit",pattern:"[a-fA-Z0-9]{6,}",required:""},null,10,y_),[[n,{state:e.viewState,set:a=>{e.source.commit=a},value:e.source?.commit,form:"anonymize",options:{}}]]),E(s("div",g_," The commit SHA is not valid. ",512),[[B,e.anonymize?.commit?.errors?.pattern||e.anonymize?.commit?.errors?.required]]),E(s("div",b_," This commit no longer exists in the repository. Click refresh to get the latest. ",512),[[B,e.anonymize?.commit?.errors?.exists]])])])):f("v-if",!0),E(s("div",w_,[E(s("input",k_,null,512),[[n,{state:e.viewState,set:a=>{e.options.update=a},value:e.options?.update,form:"anonymize",options:{}}]]),t[39]||(t[39]=s("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[40]||(t[40]=s("small",{class:"form-text text-muted"},"Follow the branch and pull the latest commit automatically, at most once an hour.",-1))],512),[[B,e.detectedType]])]),E(s("section",__,[t[52]||(t[52]=s("div",{class:"paper-section-eyebrow"},"Identity",-1)),E(s("div",E_,[t[44]||(t[44]=s("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.repoId?.invalid}]),name:"repoId",id:"repoId",disabled:e.isUpdate},null,10,C_),[[n,{state:e.viewState,set:a=>{e.repoId=a},value:e.repoId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",N_,[t[42]||(t[42]=y("Your share link will be ",-1)),s("code",null,"anonymous.4open.science/r/"+c(e.repoId),1),t[43]||(t[43]=y(".",-1))]),E(s("div",S_,"ID can only contain letters and numbers.",512),[[B,e.anonymize?.repoId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.repoId)+" is already used.",513),[[B,e.anonymize?.repoId?.errors?.used]])],512),[[B,e.detectedType==="repo"]]),E(s("div",D_,[t[47]||(t[47]=s("label",{class:"paper-field-label",for:"pullRequestId"},"Anonymized pull request ID",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId",disabled:e.isUpdate},null,10,R_),[[n,{state:e.viewState,set:a=>{e.pullRequestId=a},value:e.pullRequestId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",T_,[t[45]||(t[45]=y("Your share link will be ",-1)),s("code",null,"anonymous.4open.science/pr/"+c(e.pullRequestId),1),t[46]||(t[46]=y(".",-1))]),E(s("div",O_,"ID can only contain letters and numbers.",512),[[B,e.anonymize?.pullRequestId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used.",513),[[B,e.anonymize?.pullRequestId?.errors?.used]])],512),[[B,e.detectedType==="pr"]]),E(s("div",A_,[t[50]||(t[50]=s("label",{class:"paper-field-label",for:"gistId"},"Anonymized gist ID",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.gistId?.invalid}]),name:"gistId",id:"gistId",disabled:e.isUpdate},null,10,I_),[[n,{state:e.viewState,set:a=>{e.gistId=a},value:e.gistId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",V_,[t[48]||(t[48]=y("Your share link will be ",-1)),s("code",null,"anonymous.4open.science/gist/"+c(e.gistId),1),t[49]||(t[49]=y(".",-1))]),E(s("div",P_,"ID can only contain letters and numbers.",512),[[B,e.anonymize?.gistId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.gistId)+" is already used.",513),[[B,e.anonymize?.gistId?.errors?.used]])],512),[[B,e.detectedType==="gist"]]),s("div",q_,[t[51]||(t[51]=s("label",{class:"paper-field-label",for:"conference"},[y("Conference "),s("span",{class:"paper-optional"},"(optional)")],-1)),E(s("input",{class:O(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[n,{state:e.viewState,set:a=>{e.conference=a},value:e.conference,form:"anonymize",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),E(s("small",M_,[s("a",{target:"_blank",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,$_),y(" expires "+c(e.fmt?.date(e.conference_data?.endDate))+". ",1)],512),[[B,e.conference_data]]),E(s("div",U_,"The conference is not activated.",512),[[B,e.anonymize?.conference?.errors?.activated]]),E(s("small",L_,"Link to a conference to apply its shared defaults.",512),[[B,!e.conference_data]])])],512),[[B,e.detectedType]]),E(s("section",F_,[t[60]||(t[60]=s("div",{class:"paper-section-eyebrow"},"Anonymization",-1)),s("div",z_,[t[59]||(t[59]=s("label",{class:"paper-field-label",for:"terms"},"Terms to redact",-1)),E(s("textarea",{class:O(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"4"},null,2),[[n,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"anonymize",options:{debounce:250}}]]),s("small",H_,[t[53]||(t[53]=y("One term per line (regex allowed). Replaced by ",-1)),s("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[54]||(t[54]=y(", or use ",-1)),t[55]||(t[55]=s("code",null,"term=>replacement",-1)),t[56]||(t[56]=y(" to pick your own (e.g. ",-1)),t[57]||(t[57]=s("code",null,"Anonymous=>ABC",-1)),t[58]||(t[58]=y(").",-1))]),E(s("div",B_,"Regex characters detected. Escape them if unintentional.",512),[[B,e.termsRegexWarning]]),E(s("div",G_,"Terms are in an invalid format.",512),[[B,e.anonymize?.terms?.errors?.format]])])],512),[[B,e.detectedType]]),E(s("section",j_,[t[79]||(t[79]=s("div",{class:"paper-section-eyebrow"},"Display",-1)),E(s("div",null,[s("div",W_,[E(s("input",K_,null,512),[[n,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"anonymize",options:{}}]]),t[61]||(t[61]=s("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),s("div",Y_,[E(s("input",J_,null,512),[[n,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"anonymize",options:{}}]]),t[62]||(t[62]=s("label",{class:"form-check-label",for:"image"},"Display images",-1))]),s("div",Q_,[E(s("input",X_,null,512),[[n,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[63]||(t[63]=s("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),s("div",Z_,[E(s("input",x_,null,512),[[n,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[64]||(t[64]=s("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))]),s("div",eE,[E(s("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,tE),[[n,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"anonymize",options:{}}]]),t[65]||(t[65]=s("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),E(s("small",{class:"form-text text-muted d-block"},c(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),513),[[B,!e.details?.hasPage]]),E(s("small",{class:"form-text text-muted d-block"},c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),513),[[B,e.details?.hasPage&&e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch]])])],512),[[B,e.detectedType==="repo"]]),E(s("div",null,[s("div",sE,[E(s("input",nE,null,512),[[n,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[66]||(t[66]=s("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),s("div",oE,[E(s("input",rE,null,512),[[n,{state:e.viewState,set:a=>{e.options.content=a},value:e.options?.content,form:"anonymize",options:{}}]]),t[67]||(t[67]=s("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),s("div",iE,[E(s("input",aE,null,512),[[n,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[68]||(t[68]=s("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),s("div",lE,[E(s("input",dE,null,512),[[n,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[69]||(t[69]=s("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),s("div",uE,[E(s("input",cE,null,512),[[n,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[70]||(t[70]=s("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),s("div",pE,[E(s("input",fE,null,512),[[n,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[71]||(t[71]=s("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[B,e.detectedType==="gist"]]),E(s("div",null,[s("div",mE,[E(s("input",hE,null,512),[[n,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[72]||(t[72]=s("label",{class:"form-check-label",for:"title"},"PR title",-1))]),s("div",vE,[E(s("input",yE,null,512),[[n,{state:e.viewState,set:a=>{e.options.body=a},value:e.options?.body,form:"anonymize",options:{}}]]),t[73]||(t[73]=s("label",{class:"form-check-label",for:"body"},"PR body",-1))]),s("div",gE,[E(s("input",bE,null,512),[[n,{state:e.viewState,set:a=>{e.options.diff=a},value:e.options?.diff,form:"anonymize",options:{}}]]),t[74]||(t[74]=s("label",{class:"form-check-label",for:"diff"},"Diff",-1))]),s("div",wE,[E(s("input",kE,null,512),[[n,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[75]||(t[75]=s("label",{class:"form-check-label",for:"comments"},"Comments",-1))]),s("div",_E,[E(s("input",EE,null,512),[[n,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[76]||(t[76]=s("label",{class:"form-check-label",for:"username"},"Usernames",-1))]),s("div",CE,[E(s("input",NE,null,512),[[n,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[77]||(t[77]=s("label",{class:"form-check-label",for:"date"},"Dates",-1))]),s("div",SE,[E(s("input",DE,null,512),[[n,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[78]||(t[78]=s("label",{class:"form-check-label",for:"origin"},"Project name",-1))])],512),[[B,e.detectedType==="pr"]])],512),[[B,e.detectedType]]),E(s("section",RE,[t[83]||(t[83]=s("div",{class:"paper-section-eyebrow"},"Expiration",-1)),s("div",TE,[s("div",OE,[t[81]||(t[81]=s("label",{class:"paper-field-label",for:"expiration"},"Strategy",-1)),E((l(),d("select",AE,[...t[80]||(t[80]=[s("option",{value:"redirect"},"Redirect to GitHub when expired",-1),s("option",{value:"remove",selected:""},"Remove when expired",-1)])])),[[n,{state:e.viewState,set:a=>{e.options.expirationMode=a},value:e.options?.expirationMode,form:"anonymize",options:{}}]])]),s("div",IE,[t[82]||(t[82]=s("label",{class:"paper-field-label",for:"expirationDate"},"Expiration date",-1)),E(s("input",{class:O(["form-control",{"is-invalid":e.anonymize?.expirationDate?.invalid}]),type:"date",name:"expirationDate",id:"expirationDate",required:"",min:e.minExpirationDate,max:e.maxExpirationDate},null,10,VE),[[n,{state:e.viewState,set:a=>{e.options.expirationDate=a},value:e.options?.expirationDate,form:"anonymize",options:{}}]]),E(s("div",PE,"Pick a date in the future.",512),[[B,e.anonymize?.expirationDate?.errors?.min]]),E(s("div",{class:"invalid-feedback"},"Pick a date on or before "+c(e.fmt?.date(e.maxExpirationDate))+".",513),[[B,e.anonymize?.expirationDate?.errors?.max]]),E(s("div",qE,"Enter a valid expiration date.",512),[[B,e.anonymize?.expirationDate?.errors?.required||e.anonymize?.expirationDate?.errors?.date]])])]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the content will be removed.",513),[[B,e.options?.expirationMode=="remove"&&e.options?.expirationDate]]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", visitors will be redirected to GitHub.",513),[[B,e.options?.expirationMode=="redirect"&&e.options?.expirationDate]])],512),[[B,e.detectedType]]),E(s("section",ME,[t[87]||(t[87]=s("div",{class:"paper-section-eyebrow"},"Co-authors",-1)),t[88]||(t[88]=s("p",{class:"form-text text-muted",style:{"margin-bottom":"8px"}}," Co-authors can view and edit these settings. They cannot delete the anonymization or manage co-authors. ",-1)),E(s("div",$E,[t[84]||(t[84]=s("label",{class:"paper-field-label",for:"coauthorSearch"},"Add a GitHub user",-1)),s("div",UE,[E(s("input",LE,null,512),[[n,{state:e.viewState,set:a=>{e.coauthorSearch=a},value:e.coauthorSearch,form:"anonymize",options:{debounce:300},change:()=>{e.searchCoauthors()}}]]),E(s("div",FE,[(l(!0),d(J,null,ne(e.coauthorResults,(a,u)=>(l(),d("a",{href:"#",class:"dropdown-item d-flex align-items-center",onClick:we(m=>e.addCoauthor(a,m),["prevent"])},[s("img",{alt:"",style:{width:"22px",height:"22px","border-radius":"50%","margin-right":"8px"},src:e.safeUrl(a?.photo)},null,8,HE),s("span",{textContent:c(a?.username)},null,8,BE)],8,zE))),256))],512),[[B,e.coauthorResults?.length>0]])]),E(s("small",{class:"form-text text-muted",textContent:c(e.coauthorError)},null,8,GE),[[B,e.coauthorError]])],512),[[B,e.role==="owner"||e.role==="admin"]]),s("div",jE,[(l(!0),d(J,null,ne(e.coauthors,(a,u)=>(l(),d("div",WE,[a?.photo?(l(),d("img",{key:0,alt:"",style:{width:"24px",height:"24px","border-radius":"50%"},src:e.safeUrl(a?.photo)},null,8,KE)):f("v-if",!0),s("a",{target:"_blank",textContent:c(a?.username),href:e.safeUrl("https://github.com/"+a?.username)},null,8,YE),t[86]||(t[86]=s("span",{class:"type-badge type-coauthor"},"Co-author",-1)),E(s("button",{type:"button",class:"btn btn-sm",style:{"margin-left":"auto"},title:"Remove co-author",onClick:m=>e.removeCoauthor(a)},[...t[85]||(t[85]=[s("i",{class:"fas fa-times"},null,-1)])],8,JE),[[B,e.role==="owner"||e.role==="admin"]])]))),256)),E(s("div",QE," No co-authors yet. ",512),[[B,!e.coauthors||e.coauthors?.length===0]])])],512),[[B,e.isUpdate&&e.detectedType==="repo"]]),e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,XE)):f("v-if",!0),E(s("div",ZE,[e.detectedType==="repo"&&!e.isUpdate?(l(),d("button",{key:0,type:"submit",class:"btn btn-ink",onClick:t[9]||(t[9]=we(a=>e.submitForm(a,()=>{e.anonymizeRepo(a)}),["prevent"]))},[...t[89]||(t[89]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize Repository ",-1)])])):f("v-if",!0),e.detectedType==="repo"&&e.isUpdate?(l(),d("button",{key:1,type:"submit",class:"btn btn-ink",onClick:t[10]||(t[10]=we(a=>e.submitForm(a,()=>{e.anonymizeRepo(a)}),["prevent"]))},[...t[90]||(t[90]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update Repository ",-1)])])):f("v-if",!0),e.detectedType==="pr"&&!e.isUpdate?(l(),d("button",{key:2,type:"submit",class:"btn btn-ink",onClick:t[11]||(t[11]=we(a=>e.submitForm(a,()=>{e.anonymizePullRequest(a)}),["prevent"]))},[...t[91]||(t[91]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize Pull Request ",-1)])])):f("v-if",!0),e.detectedType==="pr"&&e.isUpdate?(l(),d("button",{key:3,type:"submit",class:"btn btn-ink",onClick:t[12]||(t[12]=we(a=>e.submitForm(a,()=>{e.anonymizePullRequest(a)}),["prevent"]))},[...t[92]||(t[92]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update Pull Request ",-1)])])):f("v-if",!0),e.detectedType==="gist"&&!e.isUpdate?(l(),d("button",{key:4,type:"submit",class:"btn btn-ink",onClick:t[13]||(t[13]=we(a=>e.submitForm(a,()=>{e.anonymizeGist(a)}),["prevent"]))},[...t[93]||(t[93]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize Gist ",-1)])])):f("v-if",!0),e.detectedType==="gist"&&e.isUpdate?(l(),d("button",{key:5,type:"submit",class:"btn btn-ink",onClick:t[14]||(t[14]=we(a=>e.submitForm(a,()=>{e.anonymizeGist(a)}),["prevent"]))},[...t[94]||(t[94]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update Gist ",-1)])])):f("v-if",!0)],512),[[B,e.detectedType]])])),[[i,e.viewState]])]),f(" Preview column (right) "),e.detectedType==="repo"&&e.html_readme?(l(),d("div",xE,[t[95]||(t[95]=s("div",{class:"anonymize-preview-head"},[s("span",{class:"paper-eyebrow"},"Live preview"),s("span",{class:"anonymize-preview-sub"},"README with redactions applied")],-1)),s("div",{class:"anonymize-preview-body markdown-body body",innerHTML:e.sanitize(e.html_readme)},null,8,eC)])):f("v-if",!0),e.detectedType==="gist"&&e.details?(l(),d("div",tC,[t[99]||(t[99]=s("div",{class:"anonymize-preview-head"},[s("span",{class:"paper-eyebrow"},"Live preview"),s("span",{class:"anonymize-preview-sub"},"Gist with redactions applied")],-1)),s("div",sC,[s("div",nC,[s("h2",oC,[e.options?.title?(l(),d("span",rC,c(e.anonymizeGistContent(e.details?.gist?.description)||"Untitled gist"),1)):f("v-if",!0),s("span",{class:O(["badge",{"badge-success":e.details?.gist?.isPublic,"badge-secondary":!e.details?.gist?.isPublic}])},c(e.details?.gist?.isPublic?"public":"secret"),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.gist?.updatedDate))},null,8,iC)):f("v-if",!0)]),e.options?.origin?(l(),d("small",aC,"Gist ID: "+c(e.details?.source?.gistId),1)):f("v-if",!0),e.options?.username&&e.details?.gist?.ownerLogin?(l(),d("small",lC,"By @"+c(e.anonymizeGistContent(e.details?.gist?.ownerLogin)),1)):f("v-if",!0),e.options?.content&&e.previewGistFiles?.length?(l(),d("div",dC,[s("ul",uC,[(l(!0),d(J,null,ne(e.previewGistFiles,(a,u)=>(l(),d("li",cC,[s("div",pC,[s("strong",{textContent:c(a?.filename)},null,8,fC),a?.language?(l(),d("span",mC,c(a?.language),1)):f("v-if",!0)]),De(o,{file:a,terms:e.terms,options:e.options},null,8,["file","terms","options"])]))),256))])])):f("v-if",!0),e.options?.comments&&e.details?.gist?.comments&&e.details?.gist?.comments?.length?(l(),d("div",hC,[t[98]||(t[98]=s("h3",{class:"paper-section-eyebrow mt-3"},"Comments",-1)),s("ul",vC,[(l(!0),d(J,null,ne(e.details?.gist?.comments,(a,u)=>(l(),d("li",yC,[s("div",gC,[e.options?.username?(l(),d("span",bC,[t[96]||(t[96]=s("i",{class:"far fa-user"},null,-1)),t[97]||(t[97]=y(" @",-1)),s("span",{textContent:c(e.anonymizeGistContent(a?.author))},null,8,wC)])):f("v-if",!0),e.options?.date?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(a?.updatedDate))},null,8,kC)):f("v-if",!0)]),e.options?.body?(l(),d("div",_C,[De(r,{content:e.anonymizeGistContent(a?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0)]))),256))])])):f("v-if",!0)])])):f("v-if",!0),e.detectedType==="pr"&&e.details?(l(),d("div",EC,[t[104]||(t[104]=s("div",{class:"anonymize-preview-head"},[s("span",{class:"paper-eyebrow"},"Live preview"),s("span",{class:"anonymize-preview-sub"},"Pull request with redactions applied")],-1)),s("div",CC,[s("div",NC,[s("h2",SC,[e.options?.title?(l(),d("span",DC,c(e.anonymizePrContent(e.details?.pullRequest?.title)),1)):f("v-if",!0),s("span",{class:O(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,RC)):f("v-if",!0)]),e.options?.origin?(l(),d("small",TC,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):f("v-if",!0),e.options?.body?(l(),d("div",OC,[De(r,{content:e.anonymizePrContent(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0),e.options?.diff||e.options?.comments?(l(),d("nav",AC,[e.options?.diff?(l(),d("button",{key:0,class:O(["paper-tab",{active:e.prTabState?.active=="diff"}]),type:"button",role:"tab",onClick:t[15]||(t[15]=a=>e.prTabState.active="diff")},[...t[100]||(t[100]=[s("i",{class:"fas fa-code"},null,-1),y(" Diff ",-1)])],2)):f("v-if",!0),e.options?.comments?(l(),d("button",{key:1,class:O(["paper-tab",{active:e.prTabState?.active=="comments"}]),type:"button",role:"tab",onClick:t[16]||(t[16]=a=>e.prTabState.active="comments")},[t[101]||(t[101]=s("i",{class:"far fa-comment-dots"},null,-1)),s("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,IC)],2)):f("v-if",!0)])):f("v-if",!0),s("div",VC,[e.options?.diff&&e.prTabState?.active=="diff"?(l(),d("div",PC,[s("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.anonymizePrContent(e.details?.pullRequest?.diff)))},null,8,qC)])):f("v-if",!0),e.options?.comments&&e.prTabState?.active=="comments"?(l(),d("div",MC,[s("ul",$C,[(l(!0),d(J,null,ne(e.details?.pullRequest?.comments,(a,u)=>(l(),d("li",UC,[s("div",LC,[e.options?.username?(l(),d("span",FC,[t[102]||(t[102]=s("i",{class:"far fa-user"},null,-1)),t[103]||(t[103]=y(" @",-1)),s("span",{textContent:c(e.anonymizePrContent(a?.author))},null,8,zC)])):f("v-if",!0),e.options?.date?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(a?.updatedDate))},null,8,HC)):f("v-if",!0)]),e.options?.body?(l(),d("div",BC,[De(r,{content:e.anonymizePrContent(a?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0)]))),256))])])):f("v-if",!0)])])])):f("v-if",!0)])],512),[[B,e.sourceUrl]])])}var GC={class:"container-fluid h-100 anonymize-page"},jC={class:"row h-100 flex-column flex-md-row"},WC={class:"col-md sidePanel shadow overflow-auto anonymize-form-col"},KC={class:"form-group"},YC={class:"form-group"},JC={class:"form-check"},QC={class:"form-check-input",type:"checkbox",id:"update",name:"update"},XC={class:"form-group"},ZC={class:"form-text text-muted"},xC=["href"],eN={class:"invalid-feedback"},tN={class:"form-text text-muted"},sN={class:"form-group"},nN={id:"idHelp",class:"form-text text-muted"},oN={class:"invalid-feedback"},rN={class:"form-group"},iN={class:"invalid-feedback"},aN={class:"form-group"},lN={class:"form-control",id:"expiration",name:"expiration"},dN={class:"form-group",id:"expiration-date-form"},uN={class:"form-control",type:"date",name:"expirationDate",id:"expirationDate"},cN={class:"accordion mb-3",id:"options"},pN={class:"card"},fN={id:"collapseOne",class:"collapse show","aria-labelledby":"headingOne","data-parent":"#options"},mN={class:"card-body"},hN={class:"form-group mb-0"},vN={class:"form-check"},yN={class:"form-check-input",type:"checkbox",id:"link",name:"link"},gN={class:"form-check"},bN={class:"form-check-input",type:"checkbox",id:"image",name:"image"},wN={class:"form-check"},kN={class:"form-check-input",type:"checkbox",id:"date",name:"date"},_N={class:"form-check"},EN={class:"form-check-input",type:"checkbox",id:"username",name:"username"},CN={class:"form-check"},NN={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},SN={class:"form-check"},DN={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},RN={class:"form-check"},TN={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},ON={class:"form-check"},AN={class:"form-check-input",type:"checkbox",id:"title",name:"title"},IN={class:"form-check"},VN={class:"form-check-input",type:"checkbox",id:"body",name:"body"},PN=["textContent"],qN={class:"anonymize-submit-bar"},MN={key:0,class:"col-md-8 p-2 overflow-auto anonymize-preview-col"},$N={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},UN={class:"pr-title mb-1"},LN={key:0},FN=["textContent"],zN={key:0},HN={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},BN={class:"nav nav-tabs",id:"myTab",role:"tablist"},GN={key:0,class:"nav-item",role:"presentation"},jN={key:1,class:"nav-item",role:"presentation"},WN=["textContent"],KN={class:"tab-content",id:"pills-tabContent"},YN={class:"tab-pane show active",id:"pills-diff",role:"tabpanel","aria-labelledby":"pills-diff-tab"},JN={key:0,class:"pr-diff shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},QN={style:{"overflow-x":"auto"}},XN=["innerHTML"],ZN={key:0,class:"pr-comments list-group"},xN={class:"pr-comment list-group-item"},eS={class:"d-flex w-100 justify-content-between flex-wrap"},tS={key:0,class:"mb-1"},sS=["textContent"],nS={class:"mb-1"};function nl(e,t){let o=et("markdown"),r=be("field"),n=be("form");return l(),d("div",GC,[s("div",jC,[s("div",WC,[s("div",{class:O(["p-0 py-2 m-auto",{card:!e.pullRequestUrl,container:e.pullRequestUrl}])},[E((l(),d("form",{class:O(["form needs-validation",{"card-body":!e.pullRequestUrl}]),name:"anonymizeForm",novalidate:""},[t[30]||(t[30]=ge('
Anonymize \xA0/\xA0 Pull request

Anonymize a pull request

Fill in the details \u2014 it only takes a minute.

Source
',4)),f(" pullRequestUrl "),s("div",KC,[t[2]||(t[2]=s("label",{for:"pullRequestUrl"},"URL of your pull request",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.pullRequestUrl?.invalid}]),name:"pullRequestUrl",id:"pullRequestUrl",placeholder:"https://github.com/owner/repo/pull/123"},null,2),[[r,{state:e.viewState,set:i=>{e.pullRequestUrl=i},value:e.pullRequestUrl,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.pullRequestSelected()}}]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is not accessible. Some organizations are restricting the access to the repositories. ",513),[[B,e.anonymize?.pullRequestUrl?.errors?.access]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" does not exist or is not accessible ",513),[[B,e.anonymize?.pullRequestUrl?.errors?.missing]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is already anonymized ",513),[[B,e.anonymize?.pullRequestUrl?.errors?.used]])]),E(s("div",null,[s("div",YC,[s("div",JC,[E(s("input",QC,null,512),[[r,{state:e.viewState,set:i=>{e.options.update=i},value:e.options?.update,form:"anonymizeForm",options:{}}]]),t[3]||(t[3]=s("label",{class:"form-check-label",for:"update"},"Auto update",-1)),t[4]||(t[4]=s("small",{id:"updateHelp",class:"form-text text-muted"},"Automatically update the anonymized pull request with the latest updates. The pull request is updated once per day maximum.",-1))])]),t[26]||(t[26]=s("div",{class:"paper-section-eyebrow anonymize-section-title"},[s("i",{class:"fas fa-chalkboard-teacher"}),y(" Conference ID ")],-1)),f(" Conference "),s("div",XC,[t[5]||(t[5]=s("label",{for:"conference"},[y("Conference ID "),s("span",{class:"text-muted"},"(Optional)")],-1)),E(s("input",{class:O(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[r,{state:e.viewState,set:i=>{e.conference=i},value:e.conference,form:"anonymizeForm",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),E(s("small",ZC,[s("a",{target:"_target",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,xC),y(" will expire on "+c(e.fmt?.date(e.conference_data?.endDate))+".",1)],512),[[B,e.conference_data]]),E(s("div",eN," The conference is not activated. ",512),[[B,e.anonymize?.conference?.errors?.activated]]),E(s("small",tN," Use the Conference ID that your conference provided you. This will update automatically the anonymization options based on the conference preferences. ",512),[[B,!e.conference_data]])]),t[27]||(t[27]=s("div",{class:"paper-section-eyebrow anonymize-section-title"},[s("i",{class:"fas fa-shield-alt"}),y(" Anonymization Options ")],-1)),f(" Pull Request ID "),s("div",sN,[t[6]||(t[6]=s("label",{for:"pullRequestId"},"Anonymized pull request id",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId"},null,2),[[r,{state:e.viewState,set:i=>{e.pullRequestId=i},value:e.pullRequestId,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",nN,"Id used in the url: https://anonymous.4open.science/r/"+c(e.pullRequestId),1),E(s("div",oN," Repository id can only contain letters and numbers ",512),[[B,e.anonymize?.pullRequestId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used ",513),[[B,e.anonymize?.pullRequestId?.errors?.used]])]),f(" Terms "),s("div",rN,[t[7]||(t[7]=s("label",{for:"terms"},"Terms to anonymize",-1)),E(s("textarea",{class:O(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"3"},null,2),[[r,{state:e.viewState,set:i=>{e.terms=i},value:e.terms,form:"anonymizeForm",options:{debounce:250}}]]),t[8]||(t[8]=s("small",{id:"termsHelp",class:"form-text text-muted"},"One term per line. Each term will be replaced by XXX.",-1)),E(s("div",iN," Terms are in an invalid format ",512),[[B,e.anonymize?.terms?.errors?.format]])]),s("div",aN,[t[10]||(t[10]=s("label",{for:"expiration"},"Expiration strategy",-1)),E((l(),d("select",lN,[...t[9]||(t[9]=[s("option",{value:"never",selected:""},"Never expire",-1),s("option",{value:"redirect"}," Redirect to GitHub when expired ",-1),s("option",{value:"remove"},"Remove when expired",-1)])])),[[r,{state:e.viewState,set:i=>{e.options.expirationMode=i},value:e.options?.expirationMode,form:"anonymizeForm",options:{}}]]),t[11]||(t[11]=s("small",{class:"form-text text-muted"},"Define the expiration strategy for the anonymized repository.",-1))]),E(s("div",dN,[t[12]||(t[12]=s("label",{for:"expirationDate"},"Expiration date of the anonymized repository",-1)),E(s("input",uN,null,512),[[r,{state:e.viewState,set:i=>{e.options.expirationDate=i},value:e.options?.expirationDate,form:"anonymizeForm",options:{}}]]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the repository will be removed and the visitor will not be able to see the content of the repository.",513),[[B,e.options?.expirationMode=="remove"]]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the visitors of the anonymized repository will be redirected to "+c(e.pullRequestUrl)+".",513),[[B,e.options?.expirationMode=="redirect"]])],512),[[B,e.options?.expirationMode!="never"]]),s("div",cN,[s("div",pN,[t[25]||(t[25]=s("div",{class:"card-header",id:"headingOne"},[s("h2",{class:"mb-0"},[s("button",{class:"btn btn-block text-left",type:"button","data-toggle":"collapse","data-target":"#collapseOne","aria-expanded":"true","aria-controls":"collapseOne"},[s("i",{class:"fas fa-cog mr-1"}),y(" Advanced options ")])])],-1)),s("div",fN,[s("div",mN,[s("div",hN,[s("div",vN,[E(s("input",yN,null,512),[[r,{state:e.viewState,set:i=>{e.options.link=i},value:e.options?.link,form:"anonymizeForm",options:{}}]]),t[13]||(t[13]=s("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[14]||(t[14]=s("small",{class:"form-text text-muted"},"Keep or remove all the links.",-1))]),s("div",gN,[E(s("input",bN,null,512),[[r,{state:e.viewState,set:i=>{e.options.image=i},value:e.options?.image,form:"anonymizeForm",options:{}}]]),t[15]||(t[15]=s("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[16]||(t[16]=s("small",{class:"form-text text-muted"},"Images are not anonymized",-1))]),s("div",wN,[E(s("input",kN,null,512),[[r,{state:e.viewState,set:i=>{e.options.date=i},value:e.options?.date,form:"anonymizeForm",options:{}}]]),t[17]||(t[17]=s("label",{class:"form-check-label",for:"date"},"Display dates",-1)),t[18]||(t[18]=s("small",{class:"form-text text-muted"},"Display the date of the Pull Request and the date of the comments.",-1))]),s("div",_N,[E(s("input",EN,null,512),[[r,{state:e.viewState,set:i=>{e.options.username=i},value:e.options?.username,form:"anonymizeForm",options:{}}]]),t[19]||(t[19]=s("label",{class:"form-check-label",for:"username"},"Display username",-1))]),s("div",CN,[E(s("input",NN,null,512),[[r,{state:e.viewState,set:i=>{e.options.comments=i},value:e.options?.comments,form:"anonymizeForm",options:{}}]]),t[20]||(t[20]=s("label",{class:"form-check-label",for:"comments"},"Display comments",-1))]),s("div",SN,[E(s("input",DN,null,512),[[r,{state:e.viewState,set:i=>{e.options.diff=i},value:e.options?.diff,form:"anonymizeForm",options:{}}]]),t[21]||(t[21]=s("label",{class:"form-check-label",for:"diff"},"Display diff",-1))]),s("div",RN,[E(s("input",TN,null,512),[[r,{state:e.viewState,set:i=>{e.options.origin=i},value:e.options?.origin,form:"anonymizeForm",options:{}}]]),t[22]||(t[22]=s("label",{class:"form-check-label",for:"origin"},"Display the project name",-1))]),s("div",ON,[E(s("input",AN,null,512),[[r,{state:e.viewState,set:i=>{e.options.title=i},value:e.options?.title,form:"anonymizeForm",options:{}}]]),t[23]||(t[23]=s("label",{class:"form-check-label",for:"title"},"Display the PR title",-1))]),s("div",IN,[E(s("input",VN,null,512),[[r,{state:e.viewState,set:i=>{e.options.body=i},value:e.options?.body,form:"anonymizeForm",options:{}}]]),t[24]||(t[24]=s("label",{class:"form-check-label",for:"body"},"Display the PR body and comment bodies",-1))])])])])])])],512),[[B,e.pullRequestUrl]]),e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,PN)):f("v-if",!0),E(s("div",qN,[e.isUpdate?f("v-if",!0):(l(),d("button",{key:0,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[0]||(t[0]=we(i=>e.submitForm(i,()=>{e.anonymizePullRequest(i)}),["prevent"]))},[...t[28]||(t[28]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize ",-1)])])),e.isUpdate?(l(),d("button",{key:1,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[1]||(t[1]=we(i=>e.submitForm(i,()=>{e.updatePullRequest(i)}),["prevent"]))},[...t[29]||(t[29]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update ",-1)])])):f("v-if",!0)],512),[[B,e.pullRequestUrl]])],2)),[[n,e.viewState]])],2)]),e.details?(l(),d("div",MN,[s("div",$N,[s("h2",UN,[e.options?.title?(l(),d("span",LN,c(e.anonymize(e.details?.pullRequest?.title)),1)):f("v-if",!0),s("span",{class:O(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,FN)):f("v-if",!0)]),e.options?.origin?(l(),d("small",zN,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):f("v-if",!0),e.options?.body?(l(),d("div",HN,[De(o,{content:e.anonymize(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0),s("ul",BN,[e.options?.diff?(l(),d("li",GN,[...t[31]||(t[31]=[s("button",{class:"nav-link active",id:"pills-diff-tab","data-toggle":"pill","data-target":"#pills-diff",type:"button",role:"tab","aria-controls":"pills-diff","aria-selected":"true"}," Diff ",-1)])])):f("v-if",!0),e.options?.comments?(l(),d("li",jN,[s("button",{class:O(["nav-link",{active:!e.options?.diff}]),id:"pills-comments-tab","data-toggle":"pill","data-target":"#pills-comments",type:"button",role:"tab","aria-controls":"pills-comments","aria-selected":"false"},[s("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comment",one:"One Comment",other:"{} Comments"}))},null,8,WN)],2)])):f("v-if",!0)]),s("div",KN,[s("div",YN,[e.options?.diff?(l(),d("div",JN,[s("pre",QN,[s("code",{innerHTML:e.sanitize(e.fmt?.diff(e.anonymize(e.details?.pullRequest?.diff)))},null,8,XN)])])):f("v-if",!0)]),s("div",{class:O(["tab-pane",{"show active":!e.options?.diff}]),id:"pills-comments",role:"tabpanel","aria-labelledby":"pills-comments-tab"},[e.options?.comments?(l(),d("ul",ZN,[(l(!0),d(J,null,ne(e.details?.pullRequest?.comments,(i,a)=>(l(),d("li",xN,[s("div",eS,[e.options?.username?(l(),d("h5",tS," @"+c(e.anonymize(i?.author)),1)):f("v-if",!0),e.options?.date?(l(),d("small",{key:1,textContent:c(e.fmt?.date(i?.updatedDate))},null,8,sS)):f("v-if",!0)]),s("p",nS,[e.options?.body?(l(),ks(o,{key:0,class:"pr-comment-body",content:e.anonymize(i?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])):f("v-if",!0)])]))),256))])):f("v-if",!0)],2)])])):f("v-if",!0)])])}var oS={class:"container paper-page"},rS={class:"paper-settings-main claim-form"},iS={class:"form-group"},aS={class:"invalid-feedback"},lS={class:"form-group"};function ol(e,t){let o=be("field"),r=be("form");return l(),d("div",oS,[t[6]||(t[6]=ge('
My work \xA0/\xA0 Claim

Claim an anonymization

Take ownership of an existing anonymized repository so it appears on your dashboard.

',3)),s("div",rS,[t[5]||(t[5]=s("p",{class:"paper-section-copy"},"Use this when an anonymization was created by a co-author or from another account. You must have access to the GitHub repository it was made from.",-1)),E((l(),d("form",{class:"form needs-validation",name:"claimForm",novalidate:"",onSubmit:t[0]||(t[0]=we(n=>e.submitForm(n,()=>{e.claim()}),["prevent"]))},[s("div",iS,[t[1]||(t[1]=s("label",{class:"paper-field-label",for:"repoUrl"},"GitHub repository URL",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.claimForm?.repoUrl?.invalid&&(e.claimForm?.repoUrl?.touched||e.claimForm?.submitted)}]),name:"repoUrl",id:"repoUrl",required:""},null,2),[[o,{state:e.viewState,set:n=>{e.repoUrl=n},value:e.repoUrl,form:"claimForm",options:{}}]]),E(s("div",aS," No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub. ",512),[[B,e.claimForm?.repoUrl?.errors?.not_found]])]),s("div",lS,[t[2]||(t[2]=s("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.claimForm?.repoId?.invalid&&(e.claimForm?.repoId?.touched||e.claimForm?.submitted)}]),name:"repoId",id:"repoId",required:""},null,2),[[o,{state:e.viewState,set:n=>{e.repoId=n},value:e.repoId,form:"claimForm",options:{}}]]),t[3]||(t[3]=s("small",{id:"idHelp",class:"form-text text-muted"},[y("The ID is the last part of the anonymized URL: "),s("code",null,"anonymous.4open.science/r/"),y(".")],-1))]),t[4]||(t[4]=s("button",{id:"submit",type:"submit",class:"btn btn-ink"}," Claim anonymization ",-1))],32)),[[r,e.viewState]])])])}var dS={class:"container page paper-page"},uS={class:"paper-crumbs"},cS={class:"here"},pS={class:"d-flex align-items-end flex-wrap",style:{gap:"12px","justify-content":"space-between"}},fS=["textContent"],mS={key:0,class:"paper-page-lede"},hS=["textContent","href"],vS={class:"d-flex align-items-center flex-wrap",style:{gap:"10px"}},yS=["textContent"],gS=["href"],bS={class:"paper-meta-rule"},wS=["textContent"],kS=["textContent"],_S={key:0},ES={class:"search-wrap"},CS={type:"search",id:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search by ID or source repository\u2026",autocomplete:"off"},NS={class:"dashboard-filter-controls"},SS={class:"dropdown"},DS={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},RS={class:"filter-btn-value"},TS={class:"dropdown-menu","aria-labelledby":"dropdownSort"},OS={class:"form-check dropdown-item"},AS={class:"form-check-input",type:"radio",name:"sort",id:"anonymizeDate",value:"-anonymizeDate"},IS={class:"form-check dropdown-item"},VS={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"repoId"},PS={class:"form-check dropdown-item"},qS={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},MS={class:"form-check dropdown-item"},$S={class:"form-check-input",type:"radio",name:"sort",id:"sortViews",value:"-pageView"},US={class:"dropdown"},LS={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},FS={key:0,class:"filter-btn-value"},zS={key:1,class:"filter-btn-value"},HS={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},BS={class:"form-check dropdown-item"},GS=["id"],jS=["for"],WS={class:"dashboard-meta"},KS={class:"dashboard-count"},YS={key:0},JS={key:0},QS={key:1},XS={key:1},ZS={key:0,class:"filter-chip"},xS=["onClick","aria-label"],e2={class:"paper-table paper-table-repos w-100",role:"table","aria-label":"Repositories"},t2={class:"cell-anon",role:"cell"},s2={class:"anon-text"},n2=["textContent","href"],o2={class:"anon-sub"},r2={class:"anon-source"},i2=["textContent","href"],a2={key:0},l2=["textContent","href"],d2={key:1},u2=["href"],c2={class:"cell-status",role:"cell"},p2={class:"status-line"},f2=["textContent"],m2={key:0,class:"status-sub"},h2=["textContent"],v2={class:"cell-expires",role:"cell"},y2={key:0,class:"expires-never"},g2=["textContent"],b2={key:2,class:"expires-past"},w2={key:0},k2={key:3,class:"empty-dash","aria-label":"Not applicable"},_2={class:"cell-actions",role:"cell"},E2={class:"dropdown"},C2=["aria-label"],N2={class:"dropdown-menu dropdown-menu-right"},S2=["href"],D2=["href"],R2={key:0,class:"paper-table-empty"},T2={key:0},O2={key:1},A2={key:2,class:"paper-table-empty-actions"};function rl(e,t){let o=be("field"),r=be("form");return l(),d("div",dS,[s("div",null,[s("div",uS,[t[2]||(t[2]=s("a",{href:"/dashboard"},"My work",-1)),t[3]||(t[3]=y(" \xA0/\xA0 ",-1)),t[4]||(t[4]=s("a",{href:"/conferences"},"Conferences",-1)),t[5]||(t[5]=y(" \xA0/\xA0 ",-1)),s("span",cS,c(e.conference?.conferenceID),1)]),s("div",pS,[s("div",null,[s("h1",{class:"paper-page-title",textContent:c(e.conference?.name)},null,8,fS),e.conference?.url?(l(),d("p",mS,[s("a",{target:"_blank",rel:"noopener",textContent:c(e.conference?.url),href:e.safeUrl(e.conference?.url)},null,8,hS)])):f("v-if",!0)]),s("div",vS,[s("span",{class:O(["status-pill",{"status-pill-ready":e.conference?.status=="ready","status-pill-removed":e.conference?.status=="removed"||e.conference?.status=="expired"}])},[s("span",{class:O(["status-dot","status-"+e.conference?.status]),"aria-hidden":"true"},null,2),s("span",{textContent:c(e.fmt?.statusLabel(e.conference?.status))},null,8,yS)],2),s("a",{class:"btn btn-outline-ink",href:e.safeUrl("/conference/"+e.conference?.conferenceID+"/edit")},[...t[6]||(t[6]=[s("i",{class:"far fa-edit mr-1","aria-hidden":"true"},null,-1),y(" Edit conference",-1)])],8,gS)])]),s("div",bS,[s("span",null,[t[7]||(t[7]=y("ID ",-1)),s("b",{class:"commit-hash",textContent:c(e.conference?.conferenceID)},null,8,wS)]),s("span",null,[t[8]||(t[8]=y("Review window ",-1)),s("b",null,c(e.fmt?.date(e.conference?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(e.conference?.endDate,"mediumDate")),1)]),s("span",null,[t[9]||(t[9]=y("Repositories ",-1)),s("b",null,c(e.fmt?.number(e.conference?.repositories?.length)),1)]),s("span",null,[t[10]||(t[10]=y("Plan ",-1)),s("b",{textContent:c(e.conference?.plan?.name||e.conference?.plan?.planID||"Free")},null,8,kS)]),e.conference?.price?(l(),d("span",_S,[t[11]||(t[11]=y("Cost so far ",-1)),s("b",null,c(e.fmt?.number(e.conference?.price,2))+" \u20AC",1)])):f("v-if",!0)]),t[29]||(t[29]=s("div",{class:"paper-section-eyebrow"},"Repositories",-1)),E((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter repositories","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=we(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[s("div",ES,[E(s("input",CS,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",NS,[s("div",SS,[s("button",DS,[t[12]||(t[12]=s("span",{class:"filter-btn-label"},"Sort",-1)),s("span",RS,c({"-anonymizeDate":"Anonymize date",repoId:"ID","-status":"Status","-pageView":"Views"}[e.orderBy]||"Custom"),1)]),s("div",TS,[t[17]||(t[17]=s("h6",{class:"dropdown-header"},"Order by",-1)),s("div",OS,[E(s("input",AS,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[13]||(t[13]=s("label",{class:"form-check-label",for:"anonymizeDate"},"Anonymize date",-1))]),s("div",IS,[E(s("input",VS,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[14]||(t[14]=s("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),s("div",PS,[E(s("input",qS,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[15]||(t[15]=s("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),s("div",MS,[E(s("input",$S,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[16]||(t[16]=s("label",{class:"form-check-label",for:"sortViews"},"Views",-1))])])]),s("div",US,[s("button",LS,[t[18]||(t[18]=s("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(l(),d("span",FS,"All")):f("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?f("v-if",!0):(l(),d("span",zS,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),s("div",HS,[t[19]||(t[19]=s("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(J,null,ne(e.statusLabels,(n,i,a)=>(l(),d("div",BS,[E(s("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,GS),[[o,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),s("label",{class:"form-check-label",for:"status-"+i},c(n),9,jS)]))),256))])])])],32)),[[r,e.viewState]]),s("div",WS,[s("span",KS,[e.filteredRepositories?.length===e.conference?.repositories?.length?(l(),d("span",YS,[y(c(e.fmt?.number(e.conference?.repositories?.length))+" repositor",1),e.conference?.repositories?.length===1?(l(),d("span",JS,"y")):f("v-if",!0),e.conference?.repositories?.length!==1?(l(),d("span",QS,"ies")):f("v-if",!0)])):f("v-if",!0),e.filteredRepositories?.length!==e.conference?.repositories?.length?(l(),d("span",XS,c(e.fmt?.number(e.filteredRepositories?.length))+" of "+c(e.fmt?.number(e.conference?.repositories?.length))+" shown",1)):f("v-if",!0)]),(l(!0),d(J,null,ne(e.filters?.status,(n,i,a)=>(l(),d(J,null,[n===!1?(l(),d("span",ZS,[y(" Hiding "+c(e.statusLabels[i])+" ",1),s("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusLabels[i]+" again"},"\xD7",8,xS)])):f("v-if",!0)],64))),256))]),s("div",e2,[t[28]||(t[28]=s("div",{class:"paper-table-head",role:"row"},[s("div",{role:"columnheader"},"Repository"),s("div",{role:"columnheader"},"Status"),s("div",{role:"columnheader",class:"num"},"Views"),s("div",{role:"columnheader"},"Expires"),s("div",{role:"columnheader"},[s("span",{class:"sr-only"},"Actions")])],-1)),(l(!0),d(J,null,ne(e.filteredRepositories,(n,i)=>(l(),d("div",{class:O(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error"}]),role:"row",key:n?.repoId},[s("div",t2,[t[22]||(t[22]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",s2,[s("a",{class:"repo-name",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId+"/")},null,8,n2),s("div",o2,[s("span",r2,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,i2),n?.options?.update&&n?.source?.branch?(l(),d("span",a2,[t[20]||(t[20]=y(" \xB7 ",-1)),s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,l2)])):f("v-if",!0),n?.source?.commit?(l(),d("span",d2,[t[21]||(t[21]=y(" \xB7 ",-1)),s("a",{class:"commit-hash",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},"@"+c(n?.source?.commit?.substring(0,8)),9,u2)])):f("v-if",!0)])])])]),s("div",c2,[s("div",p2,[s("span",{class:O(["status-dot","status-"+(n?.status=="error"?"error":n?.status=="ready"?"ready":n?.status=="expired"||n?.status=="removed"?n?.status:"progress")]),"aria-hidden":"true"},null,2),s("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,f2)]),n?.anonymizeDate?(l(),d("div",m2,"anonymized "+c(e.fmt?.humanTime(n?.anonymizeDate)),1)):f("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView))},null,8,h2),s("div",v2,[n?.status=="ready"&&(n?.options?.expirationMode==="never"||!n?.options?.expirationDate)?(l(),d("span",y2,"Never")):f("v-if",!0),n?.status=="ready"&&n?.options?.expirationMode!=="never"&&n?.options?.expirationDate?(l(),d("span",{key:1,textContent:c(e.fmt?.humanTime(n?.options?.expirationDate))},null,8,g2)):f("v-if",!0),n?.status=="expired"?(l(),d("span",b2,[t[23]||(t[23]=y("Expired",-1)),n?.options?.expirationDate?(l(),d("span",w2,c(e.fmt?.humanTime(n?.options?.expirationDate)),1)):f("v-if",!0)])):f("v-if",!0),n?.status!="ready"&&n?.status!="expired"?(l(),d("span",k2,"\u2014")):f("v-if",!0)]),s("div",_2,[s("div",E2,[s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+n?.repoId},[...t[24]||(t[24]=[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"},null,-1)])],8,C2),s("div",N2,[s("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[25]||(t[25]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View ",-1)])],8,S2),s("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[26]||(t[26]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,D2)])])])],2))),128)),e.filteredRepositories?.length==0?(l(),d("div",R2,[t[27]||(t[27]=s("i",{class:"fas fa-inbox","aria-hidden":"true"},null,-1)),e.conference?.repositories?.length?f("v-if",!0):(l(),d("span",T2,"No repository has been submitted to this conference yet.")),e.conference?.repositories?.length?(l(),d("span",O2,"Nothing matches the current filters.")):f("v-if",!0),e.conference?.repositories?.length?(l(),d("div",A2,[s("button",{type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=n=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")])):f("v-if",!0)])):f("v-if",!0)])])])}var I2={class:"container page paper-page"},V2={class:"row"},P2={class:"w-100"},q2={class:"search-wrap"},M2={type:"search",id:"search",class:"form-control","aria-label":"Search conferences",placeholder:"Search by name or ID\u2026",autocomplete:"off"},$2={class:"dashboard-filter-controls"},U2={class:"dropdown"},L2={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},F2={class:"filter-btn-value"},z2={class:"dropdown-menu","aria-labelledby":"dropdownSort"},H2={class:"form-check dropdown-item"},B2={class:"form-check-input",type:"radio",name:"sort",id:"sortName",value:"name"},G2={class:"form-check dropdown-item"},j2={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"conferenceID"},W2={class:"form-check dropdown-item"},K2={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},Y2={class:"dropdown"},J2={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},Q2={key:0,class:"filter-btn-value"},X2={key:1,class:"filter-btn-value"},Z2={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},x2={class:"form-check dropdown-item"},eD=["id"],tD=["for"],sD={class:"dashboard-meta"},nD={class:"dashboard-count"},oD={key:0},rD={key:0},iD={key:1},aD={key:0,class:"filter-chip"},lD=["onClick","aria-label"],dD={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},uD={class:"cell-anon",role:"cell"},cD={class:"anon-text"},pD=["textContent","href"],fD={class:"anon-sub"},mD={class:"anon-source"},hD=["textContent"],vD={key:0},yD=["textContent","href"],gD={class:"cell-status",role:"cell"},bD={class:"status-line"},wD=["textContent"],kD=["textContent"],_D={class:"cell-expires",role:"cell"},ED={key:0},CD={key:1,class:"empty-dash","aria-label":"No review window"},ND={class:"cell-actions",role:"cell"},SD={class:"dropdown"},DD=["aria-label"],RD={class:"dropdown-menu dropdown-menu-right"},TD=["href"],OD=["href"],AD={key:0},ID=["onClick"],VD={key:0,class:"paper-table-empty"},PD={key:0},qD={key:1},MD={class:"paper-table-empty-actions"},$D={key:1,href:"/conference/new",class:"btn btn-ink"};function il(e,t){let o=be("field"),r=be("form");return l(),d("div",I2,[s("div",V2,[s("div",P2,[t[9]||(t[9]=ge('
My work \xA0/\xA0 Conferences

Your conferences

Group anonymizations by venue, give chairs a shared dashboard, and set one expiry for every submission.

New conference
',2)),E((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter conferences","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=we(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[s("div",q2,[E(s("input",M2,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",$2,[s("div",U2,[s("button",L2,[t[2]||(t[2]=s("span",{class:"filter-btn-label"},"Sort",-1)),s("span",F2,c({name:"Name",conferenceID:"ID","-status":"Status"}[e.orderBy]||"Custom"),1)]),s("div",z2,[t[6]||(t[6]=s("h6",{class:"dropdown-header"},"Order by",-1)),s("div",H2,[E(s("input",B2,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=s("label",{class:"form-check-label",for:"sortName"},"Name",-1))]),s("div",G2,[E(s("input",j2,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=s("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),s("div",W2,[E(s("input",K2,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[5]||(t[5]=s("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))])])]),s("div",Y2,[s("button",J2,[t[7]||(t[7]=s("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(l(),d("span",Q2,"All")):f("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?f("v-if",!0):(l(),d("span",X2,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),s("div",Z2,[t[8]||(t[8]=s("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(J,null,ne(e.statusLabels,(n,i,a)=>(l(),d("div",x2,[E(s("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,eD),[[o,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),s("label",{class:"form-check-label",for:"status-"+i},c(n),9,tD)]))),256))])])])],32)),[[r,e.viewState]]),s("div",sD,[s("span",nD,[e.filteredConferences?.length===e.conferences?.length?(l(),d("span",oD,[y(c(e.fmt?.number(e.conferences?.length))+" conference",1),e.conferences?.length!==1?(l(),d("span",rD,"s")):f("v-if",!0)])):f("v-if",!0),e.filteredConferences?.length!==e.conferences?.length?(l(),d("span",iD,c(e.fmt?.number(e.filteredConferences?.length))+" of "+c(e.fmt?.number(e.conferences?.length))+" shown",1)):f("v-if",!0)]),(l(!0),d(J,null,ne(e.filters?.status,(n,i,a)=>(l(),d(J,null,[n===!1?(l(),d("span",aD,[y(" Hiding "+c(e.statusLabels[i])+" ",1),s("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusLabels[i]+" again"},"\xD7",8,lD)])):f("v-if",!0)],64))),256))])]),s("div",dD,[t[20]||(t[20]=s("div",{class:"paper-table-head",role:"row"},[s("div",{role:"columnheader"},"Conference"),s("div",{role:"columnheader"},"Status"),s("div",{role:"columnheader",class:"num"},"Repos"),s("div",{role:"columnheader"},"Review window"),s("div",{role:"columnheader"},[s("span",{class:"sr-only"},"Actions")])],-1)),(l(!0),d(J,null,ne(e.filteredConferences,(n,i)=>(l(),d("div",{class:O(["paper-table-row row-clickable",{"repo-inactive":n?.status=="expired"||n?.status=="removed"}]),role:"row",key:n?.conferenceID},[s("div",uD,[t[12]||(t[12]=s("span",{class:"type-badge type-repo"},"Conf",-1)),s("div",cD,[s("a",{class:"repo-name",textContent:c(n?.name),href:e.safeUrl("/conference/"+n?.conferenceID)},null,8,pD),s("div",fD,[s("span",mD,[t[11]||(t[11]=y("ID ",-1)),s("span",{class:"commit-hash",textContent:c(n?.conferenceID)},null,8,hD),n?.url?(l(),d("span",vD,[t[10]||(t[10]=y(" \xB7 ",-1)),s("a",{target:"_blank",rel:"noopener",textContent:c(e.fmt?.limitTo(n?.url,60)),href:e.safeUrl(n?.url)},null,8,yD)])):f("v-if",!0)])])])]),s("div",gD,[s("div",bD,[s("span",{class:O(["status-dot","status-"+n?.status]),"aria-hidden":"true"},null,2),s("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,wD)])]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.nbRepositories||0))},null,8,kD),s("div",_D,[n?.startDate?(l(),d("span",ED,c(e.fmt?.date(n?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(n?.endDate,"mediumDate")),1)):f("v-if",!0),n?.startDate?f("v-if",!0):(l(),d("span",CD,"\u2014"))]),s("div",ND,[s("div",SD,[s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+n?.name},[...t[13]||(t[13]=[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"},null,-1)])],8,DD),s("div",RD,[s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/")},[...t[14]||(t[14]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View ",-1)])],8,TD),s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/edit")},[...t[15]||(t[15]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,OD),n?.status!="removed"?(l(),d("div",AD,[t[17]||(t[17]=s("div",{class:"dropdown-divider"},null,-1)),s("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:a=>e.removeConference(n)},[...t[16]||(t[16]=[s("i",{class:"fas fa-trash-alt","aria-hidden":"true"},null,-1),y(" Remove ",-1)])],8,ID)])):f("v-if",!0)])])])],2))),128)),e.filteredConferences?.length==0?(l(),d("div",VD,[t[19]||(t[19]=s("i",{class:"fas fa-inbox","aria-hidden":"true"},null,-1)),e.conferences?.length==0?(l(),d("span",PD,"You have not created a conference yet.")):f("v-if",!0),e.conferences?.length>0?(l(),d("span",qD,"Nothing matches the current filters.")):f("v-if",!0),s("div",MD,[e.conferences?.length>0?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=n=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")):f("v-if",!0),e.conferences?.length==0?(l(),d("a",$D,[...t[18]||(t[18]=[s("i",{class:"fa fa-plus-circle mr-1","aria-hidden":"true"},null,-1),y(" New conference",-1)])])):f("v-if",!0)])])):f("v-if",!0)])])])}var UD={class:"container page dashboard-page paper-page"},LD={class:"row"},FD={class:"w-100"},zD={key:0,class:"quota-row"},HD={class:"quota-item"},BD={class:"quota-header"},GD={class:"quota-label"},jD={key:0,class:"quota-value"},WD={key:0},KD={key:1,class:"quota-unlimited-tag"},YD={key:1,class:"quota-value"},JD={key:0},QD={key:1,class:"quota-unlimited-tag"},XD=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],ZD={class:"search-wrap"},xD={type:"search",id:"search",class:"form-control","aria-label":"Search anonymizations",placeholder:"Search by name, source, or conference\u2026",autocomplete:"off"},eR={class:"dashboard-filter-controls"},tR={class:"btn-group",role:"group","aria-label":"Type"},sR=["aria-pressed"],nR=["aria-pressed"],oR=["aria-pressed"],rR=["aria-pressed"],iR={class:"dropdown"},aR={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},lR={class:"filter-btn-value"},dR={class:"sr-only"},uR={class:"dropdown-menu","aria-labelledby":"dropdownSort"},cR={class:"form-check dropdown-item"},pR=["onClick","checked","id"],fR=["for"],mR={class:"dropdown"},hR={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},vR={key:0,class:"filter-btn-value"},yR={key:1,class:"filter-btn-value"},gR={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},bR={class:"form-check dropdown-item"},wR=["id"],kR=["for"],_R={key:1,class:"dashboard-meta"},ER={class:"dashboard-count"},CR={key:0},NR={key:0},SR={key:1},DR={key:0,class:"filter-chip"},RR=["onClick","aria-label"],TR=["aria-busy"],OR={class:"paper-table-head",role:"row"},AR=["aria-sort"],IR=["aria-sort"],VR=["aria-sort"],PR=["aria-sort"],qR={key:0,class:"paper-table-row paper-table-skeleton",role:"row","aria-hidden":"true"},MR=["onClick"],$R={class:"cell-anon",role:"cell"},UR={class:"anon-text"},LR={class:"anon-title"},FR=["textContent","href"],zR=["textContent"],HR={key:2,class:"type-badge type-coauthor",title:"You are a co-author on this anonymization"},BR={key:0,class:"anon-sub"},GR={key:0,class:"anon-source"},jR=["textContent","href"],WR={key:0},KR=["textContent","href"],YR={key:1},JR=["href"],QR={key:1,class:"anon-source"},XR=["textContent","href"],ZR={key:2,class:"anon-source"},xR=["textContent","href"],eT=["title"],tT=["textContent"],sT={class:"cell-status",role:"cell"},nT={class:"status-line"},oT=["textContent"],rT=["textContent","title"],iT=["title"],aT={key:2,class:"status-sub"},lT=["textContent"],dT={class:"cell-expires",role:"cell"},uT={key:0,class:"expires-never"},cT=["textContent"],pT={key:2,class:"expires-past"},fT={key:3,class:"expires-past"},mT={key:4,class:"empty-dash","aria-label":"Not applicable"},hT={class:"cell-actions",role:"cell"},vT={key:0,class:"dropdown"},yT=["aria-label"],gT={class:"dropdown-menu dropdown-menu-right"},bT=["href"],wT=["href"],kT=["href"],_T=["onClick"],ET=["onClick"],CT=["onClick"],NT={key:4},ST=["onClick"],DT={key:0,class:"paper-table-empty"},RT={key:0},TT={key:1},OT={class:"paper-table-empty-actions"},AT={key:1,href:"/anonymize",class:"btn btn-ink"};function al(e,t){let o=be("field"),r=be("form");return l(),d("div",UD,[s("div",LD,[s("div",FD,[t[18]||(t[18]=ge('
My work \xA0/\xA0 Dashboard

Your anonymizations

Every repository, pull request, and gist you\u2019ve mirrored, with live status and stats.

',2)),f(" Quota "),e.quota?(l(),d("div",zD,[(l(),d(J,null,ne([{key:"repository",label:"Repositories",kind:"count"},{key:"storage",label:"Storage",kind:"bytes"},{key:"file",label:"Files",kind:"count"}],(n,i)=>s("div",HD,[s("div",BD,[s("span",GD,c(n?.label),1),n?.kind==="count"?(l(),d("span",jD,[y(c(e.fmt?.number(e.quota[n?.key].used)),1),e.quota[n?.key].unlimited?f("v-if",!0):(l(),d("span",WD," / "+c(e.fmt?.number(e.quota[n?.key].total)),1)),e.quota[n?.key].unlimited?(l(),d("span",KD,"Unlimited")):f("v-if",!0)])):f("v-if",!0),n?.kind==="bytes"?(l(),d("span",YD,[y(c(e.fmt?.humanFileSize(e.quota[n?.key].used)),1),e.quota[n?.key].unlimited?f("v-if",!0):(l(),d("span",JD," / "+c(e.fmt?.humanFileSize(e.quota[n?.key].total)),1)),e.quota[n?.key].unlimited?(l(),d("span",QD,"Unlimited")):f("v-if",!0)])):f("v-if",!0)]),s("div",{class:O(["quota-track","quota-"+e.quota[n?.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":n?.label+" quota","aria-valuenow":e.quota[n?.key].used,"aria-valuemax":e.quota[n?.key].unlimited?e.quota[n?.key].used:e.quota[n?.key].total,"aria-valuetext":e.quota[n?.key].unlimited?"unlimited":e.fmt.number(e.quota[n?.key].percent,0)+"% used"},[e.quota[n?.key].unlimited?f("v-if",!0):(l(),d("div",{key:0,class:"quota-fill",style:Pe({width:e.quota[n?.key].percent+"%"})},null,4))],10,XD)])),64))])):f("v-if",!0),f(" Search + filters "),E((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter anonymizations","accept-charset":"UTF-8",onSubmit:t[5]||(t[5]=we(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[s("div",ZD,[E(s("input",xD,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",eR,[s("div",tR,[s("button",{type:"button",class:O(["btn",{"btn-primary":e.typeFilter==="all"}]),onClick:t[0]||(t[0]=n=>e.typeFilter="all"),"aria-pressed":e.typeFilter==="all"},"All",10,sR),s("button",{type:"button",class:O(["btn",{"btn-primary":e.typeFilter==="repo"}]),onClick:t[1]||(t[1]=n=>e.typeFilter="repo"),"aria-pressed":e.typeFilter==="repo"},"Repos",10,nR),s("button",{type:"button",class:O(["btn",{"btn-primary":e.typeFilter==="pr"}]),onClick:t[2]||(t[2]=n=>e.typeFilter="pr"),"aria-pressed":e.typeFilter==="pr"},"PRs",10,oR),s("button",{type:"button",class:O(["btn",{"btn-primary":e.typeFilter==="gist"}]),onClick:t[3]||(t[3]=n=>e.typeFilter="gist"),"aria-pressed":e.typeFilter==="gist"},"Gists",10,rR)]),s("div",iR,[s("button",aR,[t[12]||(t[12]=s("span",{class:"filter-btn-label"},"Sort",-1)),s("span",lR,c(e.sortLabel()),1),s("i",{class:O(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2),s("span",dR,c(e.sortDesc()?"descending":"ascending"),1)]),s("div",uR,[t[14]||(t[14]=s("h6",{class:"dropdown-header"},"Order by",-1)),(l(!0),d(J,null,ne(e.sortFields,(n,i,a)=>(l(),d("div",cR,[s("input",{class:"form-check-input",type:"radio",name:"sort",onClick:u=>e.setSort(i,n.defaultDesc),checked:e.isSortedBy(i),id:"sort-"+a},null,8,pR),s("label",{class:"form-check-label",for:"sort-"+a},c(n?.label),9,fR)]))),256)),t[15]||(t[15]=s("div",{class:"dropdown-divider"},null,-1)),s("button",{type:"button",class:"dropdown-item",onClick:t[4]||(t[4]=n=>e.toggleSortDirection())},[t[13]||(t[13]=s("i",{class:"fas fa-exchange-alt fa-rotate-90","aria-hidden":"true"},null,-1)),y(" "+c(e.sortDesc()?"Switch to ascending":"Switch to descending"),1)])])]),s("div",mR,[s("button",hR,[t[16]||(t[16]=s("span",{class:"filter-btn-label"},"Status",-1)),e.hasHiddenStatus()?f("v-if",!0):(l(),d("span",vR,"All")),e.hasHiddenStatus()?(l(),d("span",yR,c(e.hiddenStatusCount())+" hidden",1)):f("v-if",!0)]),s("div",gR,[t[17]||(t[17]=s("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(J,null,ne(e.statusKeyLabels,(n,i,a)=>(l(),d("div",bR,[E(s("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,wR),[[o,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),s("label",{class:"form-check-label",for:"status-"+i},c(n),9,kR)]))),256))])])])],32)),[[r,e.viewState]]),f(" Result count + active filter chips "),e.loading?f("v-if",!0):(l(),d("div",_R,[s("span",ER,[e.filteredItems?.length===e.items?.length?(l(),d("span",CR,[y(c(e.fmt?.number(e.items?.length))+" anonymization",1),e.items?.length!==1?(l(),d("span",NR,"s")):f("v-if",!0)])):f("v-if",!0),e.filteredItems?.length!==e.items?.length?(l(),d("span",SR,c(e.fmt?.number(e.filteredItems?.length))+" of "+c(e.fmt?.number(e.items?.length))+" shown",1)):f("v-if",!0)]),(l(!0),d(J,null,ne(e.filters?.status,(n,i,a)=>(l(),d(J,null,[n===!1?(l(),d("span",DR,[y(" Hiding "+c(e.statusKeyLabels[i])+" ",1),s("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusKeyLabels[i]+" again"},"\xD7",8,RR)])):f("v-if",!0)],64))),256)),e.hasActiveFilters()?(l(),d("button",{key:0,type:"button",class:"btn-link-inline",onClick:t[6]||(t[6]=n=>e.clearFilters())},"Clear filters")):f("v-if",!0)]))]),f(" Table "),s("div",{class:"paper-table paper-table-dashboard w-100",role:"table","aria-label":"Anonymizations","aria-busy":e.loading},[s("div",OR,[s("div",{role:"columnheader","aria-sort":e.isSortedBy("_name")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:O(["sortable",{active:e.isSortedBy("_name")}]),onClick:t[7]||(t[7]=n=>e.setSort("_name"))},[t[19]||(t[19]=y(" Anonymization ",-1)),e.isSortedBy("_name")?(l(),d("i",{key:0,class:O(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):f("v-if",!0)],2)],8,AR),s("div",{role:"columnheader","aria-sort":e.isSortedBy("status")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:O(["sortable",{active:e.isSortedBy("status")}]),onClick:t[8]||(t[8]=n=>e.setSort("status"))},[t[20]||(t[20]=y(" Status ",-1)),e.isSortedBy("status")?(l(),d("i",{key:0,class:O(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):f("v-if",!0)],2)],8,IR),s("div",{role:"columnheader",class:"num","aria-sort":e.isSortedBy("pageView")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:O(["sortable",{active:e.isSortedBy("pageView")}]),onClick:t[9]||(t[9]=n=>e.setSort("pageView"))},[t[21]||(t[21]=y(" Views ",-1)),e.isSortedBy("pageView")?(l(),d("i",{key:0,class:O(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):f("v-if",!0)],2)],8,VR),s("div",{role:"columnheader","aria-sort":e.isSortedBy("options.expirationDate")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:O(["sortable",{active:e.isSortedBy("options.expirationDate")}]),onClick:t[10]||(t[10]=n=>e.setSort("options.expirationDate"))},[t[22]||(t[22]=y(" Expires ",-1)),e.isSortedBy("options.expirationDate")?(l(),d("i",{key:0,class:O(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):f("v-if",!0)],2)],8,PR),t[23]||(t[23]=s("div",{role:"columnheader"},[s("span",{class:"sr-only"},"Actions")],-1))]),f(" Loading skeleton: keeps the layout stable while the three lists load "),(l(),d(J,null,ne([1,2,3,4],(n,i)=>(l(),d(J,null,[e.loading?(l(),d("div",qR,[...t[24]||(t[24]=[s("div",{class:"cell-anon",role:"cell"},[s("span",{class:"skeleton skeleton-badge"}),s("div",{class:"anon-text"},[s("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),s("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),s("div",{class:"cell-status",role:"cell"},[s("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),s("div",{class:"cell-views num",role:"cell"},[s("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),s("div",{class:"cell-expires",role:"cell"},[s("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),s("div",{class:"cell-actions",role:"cell"},null,-1)])])):f("v-if",!0)],64))),64)),(l(!0),d(J,null,ne(e.filteredItems,(n,i)=>(l(),d(J,{key:n?._type+":"+(n?._id||i)},[e.loading?f("v-if",!0):(l(),d("div",{key:0,class:O(["paper-table-row",{"repo-inactive":n?._statusKey=="expired"||n?._statusKey=="removed","repo-error":n?.status=="error","row-clickable":!!n?._viewUrl}]),role:"row",onClick:a=>e.openItem(n,a)},[s("div",$R,[s("span",{class:O(["type-badge",{"type-repo":n?._type==="repo","type-pr":n?._type==="pr","type-gist":n?._type==="gist"}])},c(n?._type==="repo"?"Repo":n?._type==="pr"?"PR":"Gist"),3),s("div",UR,[s("div",LR,[n?._viewUrl?(l(),d("a",{key:0,class:"repo-name",textContent:c(n?._name),href:e.safeUrl(n?._viewUrl)},null,8,FR)):f("v-if",!0),n?._viewUrl?f("v-if",!0):(l(),d("span",{key:1,class:"repo-name repo-name-static",textContent:c(n?._name)},null,8,zR)),n?.role==="coauthor"?(l(),d("span",HR,"Co-author")):f("v-if",!0)]),!n?._broken||n?.conference?(l(),d("div",BR,[n?._type==="repo"&&n?.source?.fullName&&!n?._broken?(l(),d("span",GR,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,jR),n?.options?.update&&n?.source?.branch?(l(),d("span",WR,[t[25]||(t[25]=y(" \xB7 ",-1)),s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,KR)])):f("v-if",!0),n?.source?.commit?(l(),d("span",YR,[t[26]||(t[26]=y(" \xB7 ",-1)),s("a",{class:"commit-hash",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},"@"+c(n?.source?.commit?.substring(0,8)),9,JR)])):f("v-if",!0)])):f("v-if",!0),n?._type==="pr"&&n?.source?.repositoryFullName&&!n?._broken?(l(),d("span",QR,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?._source),href:e.safeUrl("https://github.com/"+n?.source?.repositoryFullName+"/pull/"+n?.source?.pullRequestId)},null,8,XR)])):f("v-if",!0),n?._type==="gist"&&n?.source?.gistId&&!n?._broken?(l(),d("span",ZR,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?._source),href:e.safeUrl("https://gist.github.com/"+n?.source?.gistId)},null,8,xR)])):f("v-if",!0),n?.conference?(l(),d("span",{key:3,class:"cell-conf conf-tag",title:n?.conference},[t[27]||(t[27]=s("i",{class:"fas fa-university","aria-hidden":"true"},null,-1)),t[28]||(t[28]=y()),s("span",{textContent:c(n?.conference)},null,8,tT)],8,eT)):f("v-if",!0)])):f("v-if",!0)])]),s("div",sT,[s("div",nT,[s("span",{class:O(["status-dot","status-"+n?._statusKey]),"aria-hidden":"true"},null,2),s("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,oT)]),n?.status=="error"&&n?.statusMessage?(l(),d("div",{key:0,class:"status-sub status-sub-error",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,rT)):f("v-if",!0),n?._stale?(l(),d("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(n?.anonymizeDate||n?.lastView)}," Last activity "+c(e.fmt?.humanTime(n?.anonymizeDate||n?.lastView))+" \xB7 may be stuck ",9,iT)):f("v-if",!0),n?.status!="error"&&!n?._stale&&n?.anonymizeDate?(l(),d("div",aT," anonymized "+c(e.fmt?.humanTime(n?.anonymizeDate)),1)):f("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView))},null,8,lT),s("div",dT,[n?._expiry?.kind==="never"?(l(),d("span",uT,"Never")):f("v-if",!0),n?._expiry?.kind==="date"?(l(),d("span",{key:1,textContent:c(e.fmt?.humanTime(n?._expiry?.date))},null,8,cT)):f("v-if",!0),n?._expiry?.kind==="expired"&&n?._expiry?.date?(l(),d("span",pT,"Expired "+c(e.fmt?.humanTime(n?._expiry?.date)),1)):f("v-if",!0),n?._expiry?.kind==="expired"&&!n?._expiry?.date?(l(),d("span",fT,"Expired")):f("v-if",!0),n?._expiry?.kind==="none"?(l(),d("span",mT,"\u2014")):f("v-if",!0)]),s("div",hT,[n?._broken?f("v-if",!0):(l(),d("div",vT,[s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+n?._name},[...t[29]||(t[29]=[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"},null,-1)])],8,yT),s("div",gT,[s("a",{class:"dropdown-item",href:e.safeUrl(n?._viewUrl)},[...t[30]||(t[30]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View ",-1)])],8,bT),n?._type==="repo"&&n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[31]||(t[31]=[s("i",{class:"fas fa-globe","aria-hidden":"true"},null,-1),y(" View page ",-1)])],8,wT)):f("v-if",!0),s("a",{class:"dropdown-item",href:e.safeUrl(n?._editUrl)},[...t[32]||(t[32]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,kT),n?.status=="ready"||n?.status=="error"?(l(),d("button",{key:1,type:"button",class:"dropdown-item",onClick:a=>e.refreshItem(n)},[...t[33]||(t[33]=[s("i",{class:"fas fa-sync","aria-hidden":"true"},null,-1),y(" Force update ",-1)])],8,_T)):f("v-if",!0),n?.status=="removed"?(l(),d("button",{key:2,type:"button",class:"dropdown-item",onClick:a=>e.refreshItem(n)},[...t[34]||(t[34]=[s("i",{class:"fas fa-check-circle","aria-hidden":"true"},null,-1),y(" Enable ",-1)])],8,ET)):f("v-if",!0),n?.status=="expired"?(l(),d("button",{key:3,type:"button",class:"dropdown-item",onClick:a=>e.extendItem(n)},[...t[35]||(t[35]=[s("i",{class:"fas fa-calendar-plus","aria-hidden":"true"},null,-1),y(" Extend 6 months ",-1)])],8,CT)):f("v-if",!0),(n?.status=="ready"||n?.status=="expired"||n?.status=="error")&&n?.role!=="coauthor"?(l(),d("div",NT,[t[37]||(t[37]=s("div",{class:"dropdown-divider"},null,-1)),s("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:a=>e.removeItem(n)},[...t[36]||(t[36]=[s("i",{class:"fas fa-trash-alt","aria-hidden":"true"},null,-1),y(" Remove ",-1)])],8,ST)])):f("v-if",!0)])]))])],10,MR))],64))),128)),!e.loading&&e.filteredItems?.length==0?(l(),d("div",DT,[t[39]||(t[39]=s("i",{class:"fas fa-inbox","aria-hidden":"true"},null,-1)),e.items?.length==0?(l(),d("span",RT,"You have no anonymizations yet.")):f("v-if",!0),e.items?.length>0?(l(),d("span",TT,"Nothing matches the current filters.")):f("v-if",!0),s("div",OT,[e.hasActiveFilters()?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[11]||(t[11]=n=>e.clearFilters())},"Clear filters")):f("v-if",!0),e.items?.length==0?(l(),d("a",AT,[...t[38]||(t[38]=[s("i",{class:"fa fa-plus-circle mr-1","aria-hidden":"true"},null,-1),y(" New anonymization",-1)])])):f("v-if",!0)])])):f("v-if",!0)],8,TR)])])}var IT={class:"explorer-page"},VT=["aria-label"],PT=["textContent"],qT={class:"leftCol-head"},MT={class:"leftCol-search"},$T={class:"tree-search-box"},UT={type:"text",class:"tree-search-input",placeholder:"Search files","aria-label":"Search files"},LT={class:"leftCol-project-header"},FT=["textContent"],zT={class:"project-file-count"},HT={class:"leftCol-body"},BT={key:0,class:"paper-inline-warning",role:"alert"},GT={key:1,class:"paper-inline-warning",role:"alert"},jT={class:"leftCol-foot"},WT=["title"],KT=["title"],YT=["title"],JT={key:2,class:"last-update",title:"Older repositories have no recorded publication date. The source commit date does not establish when files became available here."},QT={class:"explorer-main"},XT={class:"status-bar"},ZT={class:"breadcrumb paths","aria-label":"Path"},xT=["textContent"],eO={class:"status-bar-actions"},tO=["href"],sO={class:"d-none d-md-inline"},nO={class:"d-none d-md-inline"},oO=["href"],rO=["href"],iO=["href"],aO=["href"],lO={class:"explorer-content"};function ll(e,t){let o=et("tree"),r=et("partial-view"),n=be("field");return l(),d("div",IT,[E(s("button",{class:"sidebar-toggle",onClick:t[0]||(t[0]=i=>e.sidebarCollapsed=!e.sidebarCollapsed),"aria-label":e.sidebarCollapsed?"Show files":"Hide files"},[s("i",{class:O(["fas",e.sidebarCollapsed?"fa-folder-open":"fa-times"])},null,2),s("span",{textContent:c(e.sidebarCollapsed?"Files":"Close")},null,8,PT)],8,VT),[[B,e.files?.length]]),E(s("div",{class:O(["leftCol",{collapsed:e.sidebarCollapsed}])},[s("div",qT,[t[7]||(t[7]=s("span",{class:"leftCol-eyebrow"},"Files",-1)),s("button",{class:"leftCol-close","aria-label":"Close files",onClick:t[1]||(t[1]=i=>e.sidebarCollapsed=!0)},[...t[6]||(t[6]=[s("i",{class:"fas fa-times"},null,-1)])])]),s("div",MT,[s("div",$T,[s("i",{class:O(["fas tree-search-icon",e.fileSearchLoading?"fa-spinner fa-spin":"fa-search"])},null,2),E(s("input",UT,null,512),[[n,{state:e.viewState,set:i=>{e.fileSearchQuery=i},value:e.fileSearchQuery,form:null,options:{debounce:300},change:()=>{e.onFileSearchChange()}}]]),E(s("kbd",{class:"tree-search-kbd"},c(e.isMac?"\u2318":"Ctrl+")+"K",513),[[B,!e.fileSearchQuery]]),E(s("button",{class:"tree-search-clear","aria-label":"Clear search",onClick:t[2]||(t[2]=i=>{e.fileSearchQuery="",e.onFileSearchChange()})},"\xD7",512),[[B,e.fileSearchQuery]])])]),s("div",LT,[s("span",{class:"project-name",textContent:c(e.repoId)},null,8,FT),s("span",zT,c(e.fileCounts?.[""]||e.files?.length)+" files",1)]),s("div",HT,[e.options?.truncatedFolders?.length>0?(l(),d("div",BT,[t[8]||(t[8]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fmt?.translate("WARNINGS.repo_truncated")),1)])):f("v-if",!0),e.options?.hasSubmodules?(l(),d("div",GT,[t[9]||(t[9]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fmt?.translate("WARNINGS.submodules_not_included")),1)])):f("v-if",!0),De(o,{class:"files",file:e.files,"search-query":e.fileSearchQuery,"search-results":e.fileSearchResults,page:e.viewState},null,8,["file","search-query","search-results","page"])]),s("div",jT,[s("span",{class:"last-update",title:e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate},c(e.options?.sourceCommitDate?"Source commit":e.options?.anonymizedAt?"Anonymized":"Updated")+" "+c(e.fmt?.date(e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),9,WT),e.options?.settingsSavedAt?(l(),d("span",{key:0,class:"last-update",title:e.options.settingsSavedAt}," Settings saved "+c(e.fmt?.date(e.options.settingsSavedAt)),9,KT)):f("v-if",!0),e.options?.publishedAt?(l(),d("span",{key:1,class:"last-update",title:e.options.publishedAt}," Snapshot ready "+c(e.fmt?.date(e.options.publishedAt)),9,YT)):f("v-if",!0),e.options?.anonymizedAt&&!e.options?.publishedAt?(l(),d("span",JT," Snapshot ready date not recorded ")):f("v-if",!0)])],2),[[B,e.files?.length]]),E(s("div",{class:"leftCol-backdrop",onClick:t[3]||(t[3]=i=>e.sidebarCollapsed=!0)},null,512),[[B,e.files?.length&&!e.sidebarCollapsed]]),s("div",QT,[s("div",XT,[s("ol",ZT,[(l(!0),d(J,null,ne(e.paths,(i,a)=>(l(),d("li",{class:"breadcrumb-item",textContent:c(i)},null,8,xT))),256))]),s("div",eO,[e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[10]||(t[10]=[s("i",{class:"far fa-edit"},null,-1),s("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,tO)):f("v-if",!0),e.type=="html-doc"&&!e.showSource?(l(),d("button",{key:1,class:O(["btn btn-sm",{"btn-active":e.allowScripts}]),"aria-label":"Allow this document to run JavaScript",title:"Scripts in this file are blocked by default. Enable them only if you trust the repository \u2014 the document stays isolated from your session either way.",onClick:t[4]||(t[4]=i=>e.toggleAllowScripts())},[t[11]||(t[11]=s("i",{class:"fab fa-js"},null,-1)),s("span",sO,c(e.allowScripts?"JS on":"JS off"),1)],2)):f("v-if",!0),e.type=="html-doc"?(l(),d("button",{key:2,class:"btn btn-sm","aria-label":"Toggle between the rendered document and its source",title:"Toggle between the rendered document and its source",onClick:t[5]||(t[5]=i=>e.toggleSource())},[s("i",{class:O(["fas",e.showSource?"fa-eye":"fa-code"])},null,2),s("span",nO,c(e.showSource?"Rendered":"Source"),1)])):f("v-if",!0),E(s("a",{target:"_self",class:"btn btn-sm","aria-label":"View raw current file",title:"View the raw content of the current file",href:e.safeUrl(e.url)},[...t[12]||(t[12]=[s("i",{class:"fas fa-file-alt"},null,-1),s("span",{class:"d-none d-md-inline"}," Raw",-1)])],8,oO),[[B,e.content!=null]]),E(s("a",{target:"_self",class:"btn btn-sm","aria-label":"Download current file",title:"Download the current file",href:e.safeUrl(e.url+"&download=true")},[...t[13]||(t[13]=[s("i",{class:"fas fa-download"},null,-1),s("span",{class:"d-none d-md-inline"}," Download",-1)])],8,rO),[[B,e.content!=null]]),e.options?.download?(l(),d("a",{key:3,target:"_self",class:"btn btn-sm","aria-label":"Download full repository as ZIP",title:"Download the full repository as a ZIP archive",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[14]||(t[14]=[s("i",{class:"fas fa-file-archive"},null,-1),s("span",{class:"d-none d-md-inline"}," Full repo ZIP",-1)])],8,iO)):f("v-if",!0),e.options?.hasWebsite?(l(),d("a",{key:4,target:"_self",class:"btn btn-sm","aria-label":"Website",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[15]||(t[15]=[s("i",{class:"fas fa-globe"},null,-1),s("span",{class:"d-none d-md-inline"}," Website",-1)])],8,aO)):f("v-if",!0)])]),s("div",lO,[De(r,{name:"partials/pageView.htm",state:e.viewState},null,8,["state"])])])])}var dO={class:"paper-faq"};function dl(e,t){return l(),d("div",dO,[...t[0]||(t[0]=[ge('
Help

Answers to the questions that come up most.

If something's missing, write to us \u2014 report a bug on GitHub.

',1),s("div",{class:"paper-faq-body"},[s("aside",{class:"paper-faq-toc"},[s("div",{class:"paper-faq-toc-head"},"Contents"),s("nav",null,[s("a",{href:"#faq-general"},"General"),s("a",{href:"#faq-features"},"Features"),s("a",{href:"#faq-limitations"},"Limitations"),s("a",{href:"#faq-privacy"},"Privacy & Security"),s("a",{href:"#faq-hosting"},"Self-Hosting")])]),s("section",{class:"faq-section","aria-label":"FAQs"},[s("div",null,[f(" General "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-info-circle mr-2"}),y("General ")]),s("div",{class:"panel-group",id:"faq-general",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingWhatIs"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#whatIs","aria-expanded":"false","aria-controls":"whatIs"}," What is Anonymous GitHub? ")])]),s("div",{id:"whatIs",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingWhatIs"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub is a free, open-source tool that anonymizes GitHub repositories and pull requests for double-anonymous (double-blind) peer review. It replaces identifying information \u2014 such as the repository owner, organization name, and custom terms \u2014 so that reviewers cannot determine the identity of the authors through the code repository. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingHowWork"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#howWork","aria-expanded":"false","aria-controls":"howWork"}," How does Anonymous GitHub work? ")])]),s("div",{id:"howWork",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingHowWork"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub either downloads the complete repository and anonymizes the content, or proxies requests to GitHub on the fly. In both cases, the original and anonymized versions of files are cached on the server. The system automatically detects and replaces the repository owner, organization name, and repository name. You can also specify additional custom terms to anonymize using one-per-line regex patterns. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingScope"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#scope","aria-expanded":"false","aria-controls":"scope"}," What is the scope of anonymization? ")])]),s("div",{id:"scope",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingScope"},[s("div",{class:"panel-body p-3"},[s("p",null," In double-anonymous peer review, the boundary of anonymization is the paper plus its online appendix \u2014 not the entire internet. Searching for any part of the paper or the online appendix can be considered a deliberate attempt to break anonymity. Anonymous GitHub anonymizes the repository owner, organization, repository name, file and directory names, and file contents across all text-based file types. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingCost"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#cost","aria-expanded":"false","aria-controls":"cost"}," How much does it cost? ")])]),s("div",{id:"cost",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCost"},[s("div",{class:"panel-body p-3"},[s("p",null,[y(" Anonymous GitHub is completely free to use. However, the server costs hundreds of dollars per year to maintain. If you find the service useful, a small donation would be greatly appreciated. You can support the project by "),s("a",{href:"https://github.com/sponsors/tdurieux/",target:"_blank"},"sponsoring on GitHub"),y(", donating through "),s("a",{href:"https://ko-fi.com/tdurieux",target:"_blank"},"Ko-fi"),y(', or by clicking the "Support me" button on the site. ')])])])])]),f(" Features "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-cogs mr-2"}),y("Features ")]),s("div",{class:"panel-group",id:"faq-features",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingFormats"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#formats","aria-expanded":"false","aria-controls":"formats"}," Which file formats are supported? ")])]),s("div",{id:"formats",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingFormats"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub can display and render a wide variety of file types: "),s("ul",null,[s("li",null,[s("strong",null,"Text and source code"),y(" \u2014 displayed with syntax highlighting")]),s("li",null,[s("strong",null,"Markdown"),y(" \u2014 rendered as formatted HTML")]),s("li",null,[s("strong",null,"Images"),y(" (PNG, JPG, SVG, etc.) \u2014 displayed inline")]),s("li",null,[s("strong",null,"PDFs"),y(" \u2014 rendered directly in the browser")]),s("li",null,[s("strong",null,"Jupyter Notebooks"),y(" \u2014 rendered with code cells and outputs")])]),s("p",null," Only text-based files are anonymized. Anonymous GitHub analyzes the content of each file to determine whether it is textual or binary. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingPR"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#pullRequests","aria-expanded":"false","aria-controls":"pullRequests"}," Can I anonymize pull requests? ")])]),s("div",{id:"pullRequests",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPR"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. In addition to full repositories, Anonymous GitHub supports anonymizing individual pull requests. Simply paste the URL of a GitHub pull request when creating a new anonymized repository, and the system will automatically detect that it is a pull request and anonymize it accordingly. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingConference"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#conference","aria-expanded":"false","aria-controls":"conference"}," What is the Conference ID feature? ")])]),s("div",{id:"conference",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingConference"},[s("div",{class:"panel-body p-3"},[s("p",null," When creating an anonymized repository, you can associate it with a Conference ID. This allows conferences to define default anonymization settings (such as expiration dates) that are automatically applied to repositories submitted under that conference. If your conference provides a Conference ID, enter it during the anonymization setup. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingExpiration"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#expiration","aria-expanded":"false","aria-controls":"expiration"}," What happens when an anonymized repository expires? ")])]),s("div",{id:"expiration",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingExpiration"},[s("div",{class:"panel-body p-3"},[s("p",null," You can configure one of three expiration strategies when creating your anonymized repository: "),s("ul",null,[s("li",null,[s("strong",null,"Never expire"),y(" \u2014 the anonymized repository remains accessible indefinitely.")]),s("li",null,[s("strong",null,"Redirect to GitHub"),y(" \u2014 after expiration, visitors are redirected to the original GitHub repository.")]),s("li",null,[s("strong",null,"Remove content"),y(" \u2014 after expiration, the anonymized content is deleted from the server.")])])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingDownload"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#download","aria-expanded":"false","aria-controls":"download"}," Can I download an anonymized repository? ")])]),s("div",{id:"download",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDownload"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. Anonymized repositories can be downloaded as a ZIP file. This is useful if reviewers want to build or test the code locally. The downloaded archive contains the fully anonymized version of the repository. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingUpdates"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#updates","aria-expanded":"false","aria-controls":"updates"}," Are updates to the original repository reflected in the anonymized version? ")])]),s("div",{id:"updates",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingUpdates"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. The anonymized repository tracks the source on GitHub: when you push new commits to the original repository, the anonymized view picks up those changes (cached files are refreshed against GitHub). This means you can keep iterating on the code while reviewers have the link, and you do not need to recreate the anonymized repository every time you update the source. "),s("p",null," A few practical implications worth keeping in mind: "),s("ul",null,[s("li",null," You can safely create the anonymized repository early in the writing process \u2014 later commits will be visible to reviewers without any additional action. "),s("li",null," If you rename files, add new identifiers, or introduce new contributor names after creation, revisit the anonymization options (custom terms, file filters) to make sure the new content is still properly anonymized. "),s("li",null," If the original repository is made private or deleted, the anonymized repository will no longer be able to fetch updated content. ")])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingCLI"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#cli","aria-expanded":"false","aria-controls":"cli"}," Is there a command-line tool? ")])]),s("div",{id:"cli",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCLI"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. Anonymous GitHub provides a CLI tool that lets you anonymize repositories locally, generating an anonymized ZIP file on your machine. Install it via npm: "),s("pre",{style:{"background-color":"var(--hover-bg-color)",padding:"12px","border-radius":"4px","margin-top":"8px",color:"var(--color)"}},[s("code",null,`npm install -g @tdurieux/anonymous_github +`)],{type:"text/csv;charset=utf-8"}),C=URL.createObjectURL(I),A=document.createElement("a");A.href=C,A.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(C)};function b(N){e.copyHint=`${N} copied`,n.timeout(()=>{e.copyHint=""},1500)}e.copyJson=N=>{navigator.clipboard.writeText(N._detailJson).then(()=>b("JSON"))},e.copyCurl=N=>{if(!N._url)return;let I=`curl -X ${N._method||"GET"} '${window.location.origin}${N._url}'`;navigator.clipboard.writeText(I).then(()=>b("curl"))},w();let T=r(()=>{e.query.autoRefresh&&w()},15e3);e.on("dispose",()=>r.cancel(T)),e.watch("query.search",k),e.watch("query.bucket",k),e.watch("query.sort",k),e.watch("query.group",k)},Ga=function(e,t,o,r){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null;function n(p){if(p==null)return"\u2014";for(var g=["B","KB","MB","GB","TB"],w=0,b=p;b>=1024&&w0?1:0)+" "+g[w]}e.humanBytes=n;function i(p){if(!p)return"\u2014";var g=Math.floor(p/86400),w=Math.floor(p%86400/3600),b=Math.floor(p%3600/60);return g>0?g+"d "+(w<10?"0":"")+w+"h":w>0?w+"h "+(b<10?"0":"")+b+"m":b+"m"}e.humanDuration=i;function a(p){return p==null?"\u2014":p>=1e6?(p/1e6).toFixed(1)+"M":p>=1e3?(p/1e3).toFixed(1)+"K":String(p)}e.humanNum=a,e.queueTotal=function(p){return p?(p.waiting||0)+(p.active||0)+(p.delayed||0)+(p.failed||0):0},e.statusCount=function(p){if(!e.data||!e.data.repos)return 0;for(var g=e.data.repos.statusBreakdown||[],w=0;wh[w])&&(h[w]=g[w])})})},function(p){e.loading=!1,e.error=p.data&&p.data.error||"Failed to load overview"})}v();var k=r(v,3e4);e.on("dispose",function(){r.cancel(k)})};var ja=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ma(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>$a(e,t.http)},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>Ta(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Oa(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Aa(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Pa(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Jo(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Jo(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId",template:"partials/conference.htm",title:"Conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>qa(e,t.http,t.location,t.params)},{path:"/faq",template:"partials/faq.htm",title:"FAQ \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Sa(e,t.http)},{path:"/profile",template:"partials/profile.htm",title:"Your settings \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Da(e,t.http,t.translate,t.timeout,t.quotaService)},{path:"/claim",template:"partials/claim.htm",title:"Claim an anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ra(e,t.http,t.location)},{path:"/pr/:pullRequestId/:path(.*)*",template:"partials/pullRequest.htm",title:"Anonymous pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ia(e,t.http,t.location,t.params,t.html)},{path:"/gist/:gistId/:path(.*)*",template:"partials/gist.htm",title:"Anonymous gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Va(e,t.http,t.location,t.params,t.html)},{path:"/r/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Yo(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/repository/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Yo(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/admin/",template:"partials/admin/overview.htm",title:"Admin \xB7 Overview \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ga(e,t.http,t.location,t.interval)},{path:"/admin/repositories",template:"partials/admin/repositories.htm",title:"Admin \xB7 Repositories \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ua(e,t.http,t.location)},{path:"/admin/users",template:"partials/admin/users.htm",title:"Admin \xB7 Users \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>La(e,t.http,t.location)},{path:"/admin/users/:username",template:"partials/admin/user.htm",title:"Admin \xB7 User details \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Fa(e,t.http,t.location,t.params)},{path:"/admin/conferences",template:"partials/admin/conferences.htm",title:"Admin \xB7 Conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>za(e,t.http,t.location)},{path:"/admin/queues",template:"partials/admin/queues.htm",title:"Admin \xB7 Queues \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ha(e,t.http,t.location,t.interval,t.timeout)},{path:"/admin/errors",template:"partials/admin/errors.htm",title:"Admin \xB7 Errors \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ba(e,t.http,t.location,t.interval)},{path:"/404",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/:pathMatch(.*)*",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",setup:()=>{}}];var Hc={class:"container paper-page connections-page"},Bc={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},Gc={key:1,role:"status"},jc=["disabled"],Wc={key:3},Kc={class:"connections-grid"},Yc={key:0},Jc={class:"connection-title"},Qc={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},Xc={class:"connection-actions"},Zc={key:0,class:"btn btn-ink",target:"_self",href:"/github/app/install"},xc={key:1,class:"connection-installations"},ep={key:0},tp=["href"],sp={class:"sr-only"},np=["disabled"],op={class:"connection-title"},rp={key:0,target:"_self",href:"/github/login",class:"btn btn-outline-ink"},ip={key:1,class:"connection-revoke"},ap={key:0},lp=["disabled"],dp={class:"connection-resources"},up={class:"connection-title"},cp={class:"connection-count"},pp={key:0,class:"connection-empty"},fp={class:"connection-resource-name"},mp={key:0,class:"connection-resource-actions"},hp=["disabled","onClick"],vp=["disabled","onClick"],yp={key:1,class:"connection-help",role:"status"},gp=["disabled","onClick"];function Wa(e,t){return l(),d("div",Hc,[t[20]||(t[20]=ge('
My work / GitHub connections

GitHub connections

Manage how GitHub shares your code. Your anonymizations and URLs stay the same.

',2)),e.connectionError?(l(),d("p",Bc,c(e.connectionError),1)):f("v-if",!0),!e.connections&&!e.connectionError?(l(),d("p",Gc,"Loading your connections\u2026")):f("v-if",!0),!e.connections&&e.connectionError?(l(),d("button",{key:2,class:"btn btn-outline-ink",disabled:e.busy,onClick:t[0]||(t[0]=o=>e.loadConnections())},"Try again",8,jc)):f("v-if",!0),e.connections?(l(),d("div",Wc,[s("div",Kc,[e.connections.appEnabled?(l(),d("section",Yc,[t[8]||(t[8]=s("div",{class:"connection-top"},[s("i",{class:"fab fa-github","aria-hidden":"true"}),s("span",{class:"connection-badge"},"Recommended")],-1)),s("div",Jc,[t[3]||(t[3]=s("h2",null,"GitHub App",-1)),s("span",{class:O(["connection-status",{"is-connected":e.connections.appConnected&&!e.connections.appError}])},c(e.connections.appError?"Needs attention":e.connections.appConnected?"Connected":"Not connected"),3)]),t[9]||(t[9]=s("p",null,"Read-only access to the repositories you choose.",-1)),e.connections.appError?(l(),d("p",Qc,c(e.connections.appError)+". Reconnect to restore access.",1)):f("v-if",!0),s("div",Xc,[e.connections.appConnected&&!e.connections.appError?(l(),d("a",Zc,[...t[4]||(t[4]=[y("Manage repository access ",-1),s("i",{class:"fas fa-external-link-alt","aria-hidden":"true"},null,-1)])])):f("v-if",!0),s("a",{class:O(e.connections.appConnected&&!e.connections.appError?"connection-link":"btn btn-ink"),target:"_self",href:"/github/app/login"},c(e.connections.appConnected?"Reconnect account":"Connect GitHub account"),3)]),t[10]||(t[10]=s("p",{class:"connection-help"},"Choose repositories on GitHub. Organization access may need an administrator's approval.",-1)),e.connections.installations?.length?(l(),d("ul",xc,[(l(!0),d(J,null,ne(e.connections.installations,o=>(l(),d("li",{key:o.id},[s("div",null,[s("strong",null,c(o.account),1),o.suspended?(l(),d("span",ep," \xB7 Suspended")):f("v-if",!0)]),s("a",{target:"_self",href:"/github/app/install?installationId="+o.id},[t[5]||(t[5]=y("Manage access ",-1)),s("span",sp,"for "+c(o.account),1),t[6]||(t[6]=y(" \u2192",-1))],8,tp)]))),128))])):f("v-if",!0),s("button",{class:"connection-link",disabled:e.busy,onClick:t[1]||(t[1]=o=>e.loadConnections())},[...t[7]||(t[7]=[s("i",{class:"fas fa-sync-alt","aria-hidden":"true"},null,-1),y(" Refresh access",-1)])],8,np)])):f("v-if",!0),s("section",null,[t[13]||(t[13]=s("div",{class:"connection-top"},[s("i",{class:"fas fa-key","aria-hidden":"true"}),s("span",{class:"connection-badge connection-badge-muted"},"Legacy")],-1)),s("div",op,[t[11]||(t[11]=s("h2",null,"GitHub OAuth",-1)),s("span",{class:O(["connection-status",{"is-connected":e.connections.oauthConnected}])},c(e.connections.oauthConnected?"Connected":"Not connected"),3)]),t[14]||(t[14]=s("p",null,"For existing OAuth anonymizations and gists.",-1)),t[15]||(t[15]=s("p",{class:"connection-help"},"This connection uses GitHub's broader repository permissions. Existing work keeps using it until you switch below.",-1)),e.connections.oauthEnabled?(l(),d("a",rp,c(e.connections.oauthConnected?"Reconnect OAuth":"Connect legacy OAuth"),1)):f("v-if",!0),e.connections.oauthConnected?(l(),d("div",ip,[e.connections.gistCount?(l(),d("p",ap,c(e.connections.gistCount)+" gist(s) still require OAuth.",1)):f("v-if",!0),t[12]||(t[12]=s("p",null,"Switch all dependent repositories before revoking access. Gists still require OAuth.",-1)),e.connections.appConnected?(l(),d("button",{key:1,class:"connection-link connection-danger",disabled:e.busy||e.connections.gistCount||e.connections.resources.some(o=>o.connection==="oauth"),onClick:t[2]||(t[2]=o=>e.disconnectOAuth())},"Revoke OAuth access",8,lp)):f("v-if",!0)])):f("v-if",!0)])]),s("section",dp,[s("div",up,[t[16]||(t[16]=s("h2",null,"Repository connections",-1)),s("span",cp,c(e.connections.resources?.length||0)+" resources",1)]),t[18]||(t[18]=s("p",null,"Check access, then switch each resource to the GitHub App. After reinstalling the App, reconnect existing resources here to keep their anonymous URLs and published snapshots.",-1)),e.connections.resources?.length?f("v-if",!0):(l(),d("div",pp,[...t[17]||(t[17]=[s("i",{class:"fas fa-code-branch","aria-hidden":"true"},null,-1),s("div",null,[s("h3",null,"No repository connections yet"),s("p",null,"Your repositories and pull requests will appear here once you anonymize them.")],-1),s("a",{class:"connection-link",href:"/anonymize"},"New anonymization \u2192",-1)])])),(l(!0),d(J,null,ne(e.connections.resources,o=>(l(),d("div",{class:"connection-resource",key:o.type+o.id},[s("div",fp,[s("strong",null,c(o.name||o.id),1),s("small",null,c(o.type)+" \xB7 "+c(o.id),1)]),s("span",{class:O(["connection-badge",{"connection-badge-muted":o.connection==="oauth"}])},c(o.connection==="github-app"?"Read-only App":"Legacy OAuth"),3),!["archived","removed","preparing","queue","download","removing","expiring"].includes(o.status)&&e.connections.appEnabled&&e.connections.appConnected?(l(),d("div",mp,[s("button",{class:"btn btn-outline-ink",disabled:e.busy,onClick:r=>e.changeConnection(o,"github-app",!0)},"Check read-only access",8,hp),o.eligible?(l(),d("button",{key:0,class:"btn btn-ink",disabled:e.busy,onClick:r=>e.changeConnection(o,"github-app",!1)},c(o.connection==="github-app"?"Reconnect read-only access":"Switch to read-only access"),9,vp)):f("v-if",!0),o.eligible===!1?(l(),d("span",yp,"Access unavailable. Allow this repository on GitHub, then check again.")):f("v-if",!0)])):f("v-if",!0),!["archived","removed","preparing","queue","download","removing","expiring"].includes(o.status)&&o.connection==="github-app"&&e.connections.oauthConnected?(l(),d("button",{key:1,class:"connection-link",disabled:e.busy,onClick:r=>e.changeConnection(o,"oauth",!1)},"Use OAuth",8,gp)):f("v-if",!0)]))),128)),t[19]||(t[19]=s("p",{class:"connection-footnote"},[s("i",{class:"fas fa-info-circle","aria-hidden":"true"}),y(" Removing access stops new fetches from GitHub. Published content keeps its current expiration and removal settings.")],-1))])])):f("v-if",!0)])}var bp={class:"container paper-page auth-page"},wp={class:"auth-layout"},kp={class:"auth-options"},_p={key:0},Ep={key:0,class:"btn btn-ink auth-continue",target:"_self",href:"/github/login?recover=1"},Cp={key:1},Np={key:1},Sp={key:2,class:"auth-legacy"},Dp={key:3,role:"status"};function Ka(e,t){return l(),d("div",bp,[t[5]||(t[5]=s("a",{class:"auth-back",href:"/"},[s("i",{class:"fas fa-arrow-left","aria-hidden":"true"}),y(" Anonymous GitHub")],-1)),s("div",wp,[t[4]||(t[4]=ge('
Your research, ready for review

Your code.
Your identity,
protected.
Sign in to GitHub

Sign in to create and manage your anonymizations.

',1)),s("div",kp,[e.accountRecovery?(l(),d("section",_p,[t[0]||(t[0]=s("h2",null,"Verify your existing account",-1)),t[1]||(t[1]=s("p",null,"We found an existing account. Verify it with your previous GitHub connection to keep your anonymizations. Future sign-ins will use the GitHub App.",-1)),e.site_options?.GITHUB_OAUTH_ENABLED?(l(),d("a",Ep,"Verify with previous GitHub connection")):(l(),d("p",Cp,"Account verification is currently unavailable. Please try again later."))])):f("v-if",!0),e.site_options?.GITHUB_APP_ENABLED&&!e.accountRecovery?(l(),d("section",Np,[...t[2]||(t[2]=[ge('
Read-only access

Continue with GitHub

Connect through the GitHub App with read-only repository access.

  • You choose which repositories to share
  • No permission to write to your code
Sign in with GitHub Your existing anonymizations and connections stay with your account.',6)])])):f("v-if",!0),!e.site_options?.GITHUB_APP_ENABLED&&e.site_options?.GITHUB_OAUTH_ENABLED&&!e.accountRecovery?(l(),d("section",Sp,[...t[3]||(t[3]=[s("div",{class:"connection-title"},[s("h2",null,"Continue with GitHub")],-1),s("p",null,"Sign in to access your account. GitHub OAuth includes write access to private repositories.",-1),s("a",{class:"connection-link",target:"_self",href:"/github/login"},[y("Sign in with GitHub "),s("i",{class:"fas fa-arrow-right","aria-hidden":"true"})],-1)])])):f("v-if",!0),e.site_options&&!e.site_options.GITHUB_APP_ENABLED&&!e.site_options.GITHUB_OAUTH_ENABLED?(l(),d("p",Dp,"GitHub sign-in is currently unavailable. Please try again later.")):f("v-if",!0)])])])}var Rp={class:"paper-empty"};function Ya(e,t){return l(),d("div",Rp,[...t[0]||(t[0]=[ge('
Error \xB7 404

This link
isn\u2019t here.

The anonymous mirror you\u2019re looking for has expired, been removed by its owner, or never existed. If you received this URL from an author, ask them to re-issue it.

',1)])])}var Tp={class:"container paper-page admin-page"},Op={class:"admin-summary"},Ap={class:"summary-total"},Ip={class:"count"},Vp={class:"count"},Pp={class:"count"},qp={class:"count"},Mp={class:"count"},$p={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},Up={class:"w-100 admin-filter-toolbar","aria-label":"Conferences","accept-charset":"UTF-8"},Lp={class:"admin-filter-row"},Fp={class:"search-wrap"},zp={type:"search",class:"form-control",placeholder:"Search conferences\u2026",autocomplete:"off"},Hp={key:0,class:"admin-search-hint"},Bp={class:"admin-filter-inline","aria-label":"Pagination"},Gp=["disabled"],jp={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},Wp=["disabled"],Kp={key:0,class:"admin-filter-row"},Yp={class:"admin-active-chips"},Jp={class:"key"},Qp=["onClick"],Xp={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},Zp={class:"paper-table-head",role:"row"},xp={role:"columnheader"},ef={role:"columnheader"},tf={role:"columnheader"},sf={class:"paper-table-row",role:"row"},nf={class:"cell-anon",role:"cell"},of={class:"anon-text"},rf=["textContent","href"],af={class:"anon-sub"},lf={class:"cell-status",role:"cell"},df=["textContent"],uf={class:"cell-views num",role:"cell"},cf=["textContent","href"],pf={class:"cell-expires",role:"cell"},ff={class:"cell-actions",role:"cell"},mf={class:"dropdown"},hf={class:"dropdown-menu dropdown-menu-right"},vf=["href"],yf=["href"],gf=["href"],bf=["onClick"],wf={key:0,class:"paper-table-empty"},kf={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},_f={style:{"font-size":"12px",color:"var(--ink-muted)"}},Ef={key:0,class:"pagination-compact"},Cf=["disabled"],Nf=["max"],Sf=["disabled"],Df={class:"admin-filter-inline"},Rf={class:"form-control form-control-sm"};function Ja(e,t){let o=be("field"),r=be("form");return l(),d("div",Tp,[t[42]||(t[42]=ge('
Admin \xA0/\xA0 Conferences

Conferences

',3)),s("div",Op,[s("span",Ap,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),s("span",{class:O(["summary-pill ok",{active:e.query?.ready}]),title:"Toggle ready filter",onClick:t[0]||(t[0]=n=>{e.query.ready=!e.query.ready,e.query.page=1})},[t[13]||(t[13]=y("Ready ",-1)),s("span",Ip,c(e.fmt?.number(e.statusCountFor("ready"))),1)],2),s("span",{class:O(["summary-pill warn",{active:e.query?.preparing}]),title:"Toggle preparing filter",onClick:t[1]||(t[1]=n=>{e.query.preparing=!e.query.preparing,e.query.page=1})},[t[14]||(t[14]=y("Preparing ",-1)),s("span",Vp,c(e.fmt?.number(e.statusCountFor("preparing"))),1)],2),s("span",{class:O(["summary-pill error",{active:e.query?.error}]),title:"Toggle errored filter",onClick:t[2]||(t[2]=n=>{e.query.error=!e.query.error,e.query.page=1})},[t[15]||(t[15]=y("Errored ",-1)),s("span",Pp,c(e.fmt?.number(e.statusCountFor("error"))),1)],2),s("span",{class:O(["summary-pill",{active:e.query?.expired}]),title:"Toggle expired filter",onClick:t[3]||(t[3]=n=>{e.query.expired=!e.query.expired,e.query.page=1})},[t[16]||(t[16]=y("Expired ",-1)),s("span",qp,c(e.fmt?.number(e.statusCountFor("expired"))),1)],2),s("span",{class:O(["summary-pill",{active:e.query?.removed}]),title:"Toggle removed filter",onClick:t[4]||(t[4]=n=>{e.query.removed=!e.query.removed,e.query.page=1})},[t[17]||(t[17]=y("Removed ",-1)),s("span",Mp,c(e.fmt?.number(e.statusCountFor("removed"))),1)],2)]),e.fetchError?(l(),d("div",$p,[t[18]||(t[18]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fetchError),1)])):f("v-if",!0),E((l(),d("form",Up,[s("div",Lp,[s("div",Fp,[E(s("input",zp,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(l(),d("span",Hp,"/"))]),t[22]||(t[22]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",onClick:t[5]||(t[5]=n=>e.exportCsv())},[...t[19]||(t[19]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])]),s("span",Bp,[s("button",{class:"btn btn-sm",type:"button",onClick:t[6]||(t[6]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[20]||(t[20]=[s("i",{class:"fas fa-chevron-left"},null,-1)])],8,Gp),s("span",jp,c(e.query?.page)+"/"+c(e.totalPage||1),1),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[21]||(t[21]=[s("i",{class:"fas fa-chevron-right"},null,-1)])],8,Wp)])]),e.chips?.length?(l(),d("div",Kp,[s("div",Yp,[(l(!0),d(J,null,ne(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[s("span",Jp,c(n?.label),1),s("span",null,c(n?.value),1),s("button",{type:"button",onClick:a=>e.clearFilter(n.key)},[...t[23]||(t[23]=[s("i",{class:"fas fa-times"},null,-1)])],8,Qp)]))),128))])])):f("v-if",!0)])),[[r,e.viewState]]),s("div",Xp,[s("div",Zp,[s("div",xp,[s("span",{class:O(["sortable",{active:e.query?.sort=="name"}]),onClick:t[8]||(t[8]=n=>e.sortBy("name"))},[t[24]||(t[24]=y("Conference ",-1)),s("i",{class:O(["fas",e.sortIcon("name")])},null,2)],2)]),s("div",ef,[s("span",{class:O(["sortable",{active:e.query?.sort=="status"}]),onClick:t[9]||(t[9]=n=>e.sortBy("status"))},[t[25]||(t[25]=y("Status ",-1)),s("i",{class:O(["fas",e.sortIcon("status")])},null,2)],2)]),t[27]||(t[27]=s("div",{role:"columnheader",class:"num"},"Repos",-1)),s("div",tf,[s("span",{class:O(["sortable",{active:e.query?.sort=="startDate"}]),onClick:t[10]||(t[10]=n=>e.sortBy("startDate"))},[t[26]||(t[26]=y("Window ",-1)),s("i",{class:O(["fas",e.sortIcon("startDate")])},null,2)],2)]),t[28]||(t[28]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(J,null,ne(e.filteredConferences,(n,i)=>(l(),d("div",sf,[s("div",nf,[t[30]||(t[30]=s("span",{class:"type-badge type-repo"},"Conf",-1)),s("div",of,[s("a",{class:"repo-name",textContent:c(n?.name),href:e.safeUrl("/conference/"+n?.conferenceID)},null,8,rf),s("div",af,[s("span",null,c(n?.conferenceID),1),t[29]||(t[29]=y("\xA0\xB7\xA0",-1)),s("span",null,c(e.fmt?.number(n?.price||0))+" \u20AC",1)])])]),s("div",lf,[s("span",{class:O(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,df)]),s("div",uf,[s("a",{title:"Show repositories in this conference",textContent:c(e.fmt?.number(n?.repositories?.length||0)),href:e.safeUrl("/admin/?conference="+n?.conferenceID)},null,8,cf)]),s("div",pf,c(e.fmt?.date(n?.startDate))+" \u2013 "+c(e.fmt?.date(n?.endDate)),1),s("div",ff,[s("div",mf,[t[36]||(t[36]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",hf,[s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/edit")},[...t[31]||(t[31]=[s("i",{class:"far fa-edit"},null,-1),y(" Edit",-1)])],8,vf),s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/")},[...t[32]||(t[32]=[s("i",{class:"fa fa-eye"},null,-1),y(" View",-1)])],8,yf),s("a",{class:"dropdown-item",href:e.safeUrl("/admin/?conference="+n?.conferenceID)},[...t[33]||(t[33]=[s("i",{class:"fas fa-code-branch"},null,-1),y(" View repositories",-1)])],8,gf),t[35]||(t[35]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:we(a=>e.removeConference(n),["prevent"])},[...t[34]||(t[34]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,bf),[[B,n?.status!="removed"]])])])])]))),256)),e.filteredConferences?.length==0?(l(),d("div",wf,[...t[37]||(t[37]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No conferences match the current filters.",-1)])])):f("v-if",!0)]),s("div",kf,[s("span",_f,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",Ef,[s("button",{class:"btn btn-sm",onClick:t[11]||(t[11]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[38]||(t[38]=[s("i",{class:"fas fa-chevron-left"},null,-1),y(" Previous",-1)])],8,Cf),E(s("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,Nf),[[o,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),s("span",null,"of "+c(e.totalPage),1),s("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[39]||(t[39]=[y("Next ",-1),s("i",{class:"fas fa-chevron-right"},null,-1)])],8,Sf)])):f("v-if",!0),s("span",Df,[t[41]||(t[41]=s("label",null,"Per page",-1)),E((l(),d("select",Rf,[...t[40]||(t[40]=[ge('',5)])])),[[o,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var Tf={class:"container paper-page admin-page errors-page"},Of={class:"errors-header"},Af={class:"errors-actions"},If={class:"kpi-grid"},Vf={class:"kpi-card"},Pf={class:"kpi-value"},qf={key:0},Mf={key:1},$f={class:"kpi-card kpi-error"},Uf={class:"kpi-value"},Lf={class:"kpi-sub"},Ff={class:"kpi-card kpi-warn"},zf={class:"kpi-value"},Hf={class:"kpi-sub"},Bf={class:"kpi-card kpi-info"},Gf={class:"kpi-value"},jf={class:"kpi-sub"},Wf={class:"kpi-value"},Kf={class:"kpi-sub"},Yf={key:0,class:"dropped-warn"},Jf={class:"volume-chart"},Qf={class:"volume-bars"},Xf=["title"],Zf={class:"errors-toolbar","aria-label":"Error filters"},xf={class:"seg-tabs"},em={class:"search-wrap"},tm={type:"search",class:"form-control",placeholder:"code:repo_not_found module:route status:>=400",autocomplete:"off"},sm={key:0,class:"filter-count"},nm={class:"select-wrap"},om={class:"form-control form-control-sm"},rm={class:"select-wrap"},im={class:"form-control form-control-sm"},am={class:"autoref"},lm={type:"checkbox"},dm={key:0,class:"admin-empty"},um={key:1,class:"errors-pager"},cm={key:2,class:"errors-list"},pm=["onClick"],fm={class:"col-when"},mm={class:"when-rel"},hm={class:"when-abs"},vm={class:"col-sev"},ym={class:"sev-label"},gm={class:"col-mod"},bm={class:"pill pill-module"},wm={class:"col-msg"},km={class:"msg-code"},_m={key:0,class:"msg-context"},Em={key:1,class:"msg-detail"},Cm={key:2,class:"msg-url"},Nm={class:"col-count"},Sm={key:0,class:"count-pill"},Dm={key:1,class:"count-pill count-pill-muted"},Rm={class:"col-status"},Tm={key:0,class:"errors-row-detail"},Om={class:"detail-tabs"},Am=["onClick"],Im=["onClick"],Vm=["onClick"],Pm={class:"detail-body"},qm={class:"detail-main"},Mm={key:0},$m={key:1,class:"stack-pre"},Um={key:2,class:"related-list"},Lm={class:"when-abs"},Fm={class:"msg-url"},zm={class:"detail-actions"},Hm=["onClick"],Bm=["onClick"],Gm={key:0,class:"copy-hint"},jm={class:"detail-aside"},Wm={class:"aside-block"},Km=["title"],Ym={class:"aside-block"},Jm=["title"],Qm={class:"aside-block"},Xm={class:"aside-value"},Zm={key:0,class:"aside-sub"},xm={key:0,class:"aside-block"},eh=["href"],th={key:1,class:"aside-block"},sh={class:"aside-value mono"};function Qa(e,t){let o=be("field"),r=be("form");return l(),d("div",Tf,[t[32]||(t[32]=s("div",{class:"paper-crumbs"},[y("Admin \xA0/\xA0 "),s("span",{class:"here"},"Errors")],-1)),s("header",Of,[t[10]||(t[10]=s("h1",{class:"paper-page-title"},"Errors",-1)),s("div",Af,[s("button",{class:"btn btn-sm",type:"button",onClick:t[0]||(t[0]=n=>e.exportCsv())},[...t[8]||(t[8]=[s("i",{class:"fas fa-file-export"},null,-1),y(" Export CSV",-1)])]),s("button",{class:"btn btn-sm btn-danger",type:"button",onClick:t[1]||(t[1]=n=>e.clearAll())},[...t[9]||(t[9]=[s("i",{class:"fas fa-trash"},null,-1),y(" Clear all",-1)])])])]),t[33]||(t[33]=ge('',1)),s("section",If,[s("div",Vf,[t[11]||(t[11]=s("div",{class:"kpi-label"},"Last 24h",-1)),s("div",Pf,c(e.stats?.last24h),1),s("div",{class:O(["kpi-sub",{up:e.stats?.delta>0,down:e.stats?.delta<0}])},[e.stats?.prev24h?(l(),d("span",qf,c(e.stats?.delta>0?"+":"")+c(e.stats?.delta)+"% vs yesterday",1)):f("v-if",!0),e.stats?.prev24h?f("v-if",!0):(l(),d("span",Mf,"no prior baseline"))],2)]),s("div",$f,[t[12]||(t[12]=s("div",{class:"kpi-label"},"Errors (5xx)",-1)),s("div",Uf,c(e.stats?.severity?.error),1),s("div",Lf,c(e.stats?.unique?.error)+" unique",1)]),s("div",Ff,[t[13]||(t[13]=s("div",{class:"kpi-label"},"Warnings (4xx)",-1)),s("div",zf,c(e.stats?.severity?.warn),1),s("div",Hf,c(e.stats?.unique?.warn)+" unique",1)]),s("div",Bf,[t[14]||(t[14]=s("div",{class:"kpi-label"},"Info (auth, 404)",-1)),s("div",Gf,c(e.stats?.severity?.info),1),s("div",jf,c(e.stats?.unique?.info)+" unique",1)]),s("div",{class:O(["kpi-card",{"kpi-error":e.stats?.dropped>0}])},[t[15]||(t[15]=s("div",{class:"kpi-label"},"Captured",-1)),s("div",Wf,c(e.total),1),s("div",Kf,[y(" cap "+c(e.cap)+" \xB7 "+c(e.available?"live":"redis off")+" ",1),e.stats?.dropped>0?(l(),d("span",Yf," \xB7 "+c(e.stats?.dropped)+" dropped",1)):f("v-if",!0)])],2)]),s("section",Jf,[t[16]||(t[16]=ge('
Volume \xB7 24h \xB7 1h bucketserror warn info
',1)),s("div",Qf,[(l(!0),d(J,null,ne(e.stats?.buckets,(n,i)=>(l(),d("div",{class:"volume-bar",key:i,title:e.bucketTitle(n)},[s("span",{class:"seg seg-error",style:Pe({height:e.barPx(n,"error")+"px"})},null,4),s("span",{class:"seg seg-warn",style:Pe({height:e.barPx(n,"warn")+"px"})},null,4),s("span",{class:"seg seg-info",style:Pe({height:e.barPx(n,"info")+"px"})},null,4)],8,Xf))),128))])]),E((l(),d("form",Zf,[s("div",xf,[s("button",{type:"button",class:O({active:e.query?.bucket===""}),onClick:t[2]||(t[2]=n=>e.setBucket(""))},"All",2),s("button",{type:"button",class:O({active:e.query?.bucket==="error"}),onClick:t[3]||(t[3]=n=>e.setBucket("error"))},"5xx",2),s("button",{type:"button",class:O({active:e.query?.bucket==="warn"}),onClick:t[4]||(t[4]=n=>e.setBucket("warn"))},"4xx",2),s("button",{type:"button",class:O({active:e.query?.bucket==="info"}),onClick:t[5]||(t[5]=n=>e.setBucket("info"))},"Info",2)]),s("div",em,[t[17]||(t[17]=s("i",{class:"fas fa-search search-icon"},null,-1)),E(s("input",tm,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.parsedFilterCount?(l(),d("span",sm,c(e.parsedFilterCount)+" filter"+c(e.parsedFilterCount>1?"s":""),1)):f("v-if",!0)]),s("div",nm,[t[19]||(t[19]=s("label",null,"Sort",-1)),E((l(),d("select",om,[...t[18]||(t[18]=[s("option",{value:"recent"},"Most recent",-1),s("option",{value:"count"},"Most frequent",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.sort=n},value:e.query?.sort,form:null,options:{}}]])]),s("div",rm,[t[21]||(t[21]=s("label",null,"Group",-1)),E((l(),d("select",im,[...t[20]||(t[20]=[s("option",{value:""},"Off",-1),s("option",{value:"code"},"By code",-1),s("option",{value:"module"},"By module",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.group=n},value:e.query?.group,form:null,options:{}}]])]),s("label",am,[E(s("input",lm,null,512),[[o,{state:e.viewState,set:n=>{e.query.autoRefresh=n},value:e.query?.autoRefresh,form:null,options:{}}]]),t[22]||(t[22]=y(" Auto-refresh ",-1))]),s("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[6]||(t[6]=n=>e.refreshNow())},[...t[23]||(t[23]=[s("i",{class:"fas fa-sync"},null,-1)])])])),[[r,e.viewState]]),e.visible?.length?f("v-if",!0):(l(),d("div",dm,"No errors captured.")),e.canLoadMore()&&e.visible?.length?(l(),d("div",um,[s("span",null,"Showing "+c(e.entries?.length)+" of "+c(e.total)+" captured",1),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>e.loadMore())},"Load older")])):f("v-if",!0),e.visible?.length?(l(),d("div",cm,[t[31]||(t[31]=ge('
WhenSeverityModuleMessageCountStatus
',1)),(l(!0),d(J,null,ne(e.visible,(n,i)=>(l(),d("div",{class:O(["errors-row",{open:e.expanded[n?._key]}]),key:n?._key},[s("div",{class:"errors-row-main",onClick:a=>e.toggle(n)},[s("div",fm,[s("div",mm,c(e.relTime(n?.ts)),1),s("div",hm,c(e.absTimeShort(n?.ts)),1)]),s("div",vm,[s("span",{class:O(["sev-dot","sev-"+n?._bucket])},null,2),s("span",ym,c(e.fmt?.uppercase(n?._bucket)),1)]),s("div",gm,[s("span",bm,c(n?.module),1)]),s("div",wm,[s("strong",km,c(n?.displayMessage),1),n?.displayContext&&n?.displayContext!==n?.displayMessage?(l(),d("span",_m,c(n?.displayContext),1)):f("v-if",!0),n?._detail?(l(),d("span",Em,c(n?._detail),1)):f("v-if",!0),n?._url?(l(),d("div",Cm,c(n?._url),1)):f("v-if",!0)]),s("div",Nm,[n?.count>1?(l(),d("span",Sm,"\xD7"+c(n?.count),1)):f("v-if",!0),n?.count===1?(l(),d("span",Dm,"\xD71")):f("v-if",!0)]),s("div",Rm,[n?._status?(l(),d("span",{key:0,class:O(["status-pill","status-"+n?._bucket])},c(n?._status),3)):f("v-if",!0)])],8,pm),e.expanded[n?._key]?(l(),d("div",Tm,[s("div",Om,[s("button",{type:"button",class:O({active:e.detailTab[n?._key]==="raw"||!e.detailTab[n?._key]}),onClick:a=>e.detailTab[n._key]="raw"},"Raw",10,Am),n?._stack?(l(),d("button",{key:0,type:"button",class:O({active:e.detailTab[n?._key]==="stack"}),onClick:a=>e.detailTab[n._key]="stack"},"Stack",10,Im)):f("v-if",!0),n?.count>1?(l(),d("button",{key:1,type:"button",class:O({active:e.detailTab[n?._key]==="related"}),onClick:a=>e.detailTab[n._key]="related"},"Related ("+c(n?.count)+")",11,Vm)):f("v-if",!0)]),s("div",Pm,[s("div",qm,[(e.detailTab[n?._key]||"raw")==="raw"?(l(),d("pre",Mm,c(n?._detailJson),1)):f("v-if",!0),e.detailTab[n?._key]==="stack"?(l(),d("pre",$m,c(n?._stack),1)):f("v-if",!0),e.detailTab[n?._key]==="related"?(l(),d("div",Um,[(l(!0),d(J,null,ne(n?._related,(a,u)=>(l(),d("div",{class:"related-row",key:u},[s("span",Lm,c(e.absTimeShort(a?.ts)),1),s("span",Fm,c(a?._url),1),a?._status?(l(),d("span",{key:0,class:O(["status-pill","status-"+a?._bucket])},c(a?._status),3)):f("v-if",!0)]))),128))])):f("v-if",!0),s("div",zm,[s("button",{class:"btn btn-sm",type:"button",title:"Copy a curl that reproduces the request",onClick:a=>e.copyCurl(n)},[...t[24]||(t[24]=[s("i",{class:"fas fa-terminal"},null,-1),y(" Copy curl",-1)])],8,Hm),s("button",{class:"btn btn-sm",type:"button",onClick:a=>e.copyJson(n)},[...t[25]||(t[25]=[s("i",{class:"fas fa-clipboard"},null,-1),y(" Copy JSON",-1)])],8,Bm),e.copyHint?(l(),d("span",Gm,c(e.copyHint),1)):f("v-if",!0)])]),s("aside",jm,[s("div",Wm,[t[26]||(t[26]=s("div",{class:"aside-label"},"First seen",-1)),s("div",{class:"aside-value",title:e.absTime(n?._firstSeen)},c(e.relTime(n?._firstSeen)),9,Km)]),s("div",Ym,[t[27]||(t[27]=s("div",{class:"aside-label"},"Last seen",-1)),s("div",{class:"aside-value",title:e.absTime(n?.ts)},c(e.relTime(n?.ts)),9,Jm)]),s("div",Qm,[t[28]||(t[28]=s("div",{class:"aside-label"},"Occurrences",-1)),s("div",Xm,[y(c(n?.count),1),n?._lastHourCount?(l(),d("span",Zm," \xB7 "+c(n?._lastHourCount)+" this hour",1)):f("v-if",!0)])]),n?._repoId?(l(),d("div",xm,[t[29]||(t[29]=s("div",{class:"aside-label"},"Repository",-1)),s("a",{class:"aside-value",href:e.safeUrl("/r/"+n?._repoId)},c(n?._repoId),9,eh)])):f("v-if",!0),n?._url?(l(),d("div",th,[t[30]||(t[30]=s("div",{class:"aside-label"},"URL",-1)),s("div",sh,c(n?._url),1)])):f("v-if",!0)])])])):f("v-if",!0)],2))),128))])):f("v-if",!0)])}var nh={class:"container paper-page admin-page overview-page"},oh={key:0,class:"admin-empty"},rh={key:1,class:"alert alert-danger",style:{margin:"12px 0"}},ih={key:2},ah={class:"ov-kpi-row"},lh={class:"ov-kpi-card"},dh={class:"ov-kpi-value"},uh={class:"ov-kpi-sub"},ch={class:"ov-kpi-card"},ph={class:"ov-kpi-sub"},fh={class:"ov-kpi-card"},mh={class:"ov-kpi-sub"},hh={class:"ov-kpi-card"},vh={class:"ov-kpi-sub"},yh={class:"ov-kpi-card"},gh={class:"ov-kpi-value"},bh={class:"ov-kpi-sub"},wh={class:"ov-daily-row"},kh={class:"ov-daily-card"},_h={class:"ov-daily-value"},Eh={class:"ov-daily-card"},Ch={class:"ov-daily-value"},Nh={class:"ov-daily-sub"},Sh={class:"ov-daily-card"},Dh={class:"ov-daily-value"},Rh={class:"ov-chart-row"},Th={class:"ov-chart-card"},Oh={key:0,class:"ov-spark-bars"},Ah=["data-tip","aria-label"],Ih={key:1,class:"ov-spark-x"},Vh={class:"ov-chart-card"},Ph={key:0,class:"ov-spark-bars"},qh=["data-tip","aria-label"],Mh={key:1,class:"ov-spark-x"},$h={class:"ov-chart-card"},Uh={key:0,class:"ov-spark-bars"},Lh=["data-tip","aria-label"],Fh={key:1,class:"ov-spark-x"},zh={class:"ov-chart-card"},Hh={key:0,class:"ov-spark-bars"},Bh=["data-tip","aria-label"],Gh={key:1,class:"ov-spark-x"},jh={class:"ov-triple-row"},Wh={class:"ov-panel-card"},Kh={class:"ov-panel-head"},Yh={class:"ov-panel-meta"},Jh={class:"ov-stacked-bar"},Qh={class:"ov-bar-legend"},Xh={href:"/admin/repositories",class:"ov-legend-item"},Zh={class:"ov-legend-n"},xh={href:"/admin/repositories",class:"ov-legend-item"},ev={class:"ov-legend-n"},tv={href:"/admin/repositories",class:"ov-legend-item"},sv={class:"ov-legend-n"},nv={href:"/admin/repositories",class:"ov-legend-item"},ov={class:"ov-legend-n"},rv={href:"/admin/repositories",class:"ov-legend-item"},iv={class:"ov-legend-n"},av={class:"ov-panel-card"},lv={class:"ov-panel-head"},dv={class:"ov-panel-meta"},uv={class:"ov-error-bars"},cv={class:"ov-ebar-row"},pv={class:"ov-ebar-track"},fv={class:"ov-ebar-n"},mv={class:"ov-ebar-row"},hv={class:"ov-ebar-track"},vv={class:"ov-ebar-n"},yv={class:"ov-ebar-row"},gv={class:"ov-ebar-track"},bv={class:"ov-ebar-n"},wv={key:0,class:"ov-panel-foot"},kv={href:"/admin/errors"},_v={class:"ov-panel-card"},Ev={class:"ov-routes-table"},Cv={class:"ov-route-row",href:"/admin/queues"},Nv={class:"ov-route-n"},Sv={class:"ov-route-n"},Dv={class:"ov-route-row",href:"/admin/queues"},Rv={class:"ov-route-n"},Tv={class:"ov-route-n"},Ov={class:"ov-route-row",href:"/admin/queues"},Av={class:"ov-route-n"},Iv={class:"ov-route-n"},Vv={class:"ov-services-card"},Pv={class:"ov-services-head"},qv={class:"ov-panel-meta"},Mv={class:"ov-services-grid"},$v={class:"ov-svc"},Uv={class:"ov-svc-info"},Lv={class:"ov-svc-meta"},Fv={class:"ov-svc-detail"},zv={class:"ov-svc"},Hv={class:"ov-svc-info"},Bv={key:0,class:"ov-svc-meta"},Gv={key:1,class:"ov-svc-meta"},jv={class:"ov-svc"},Wv={class:"ov-svc-info"},Kv={key:0,class:"ov-svc-meta"},Yv={key:1,class:"ov-svc-meta"},Jv={class:"ov-svc"},Qv={class:"ov-svc-info"},Xv={key:0,class:"ov-svc-meta"},Zv={key:1,class:"ov-svc-meta"},xv={class:"ov-svc"},ey={class:"ov-svc-info"},ty={class:"ov-svc-meta"};function Xa(e,t){return l(),d("div",nh,[t[42]||(t[42]=ge('
Admin \xB7 System Health

Overview

',3)),e.loading?(l(),d("div",oh,"Loading overview\u2026")):f("v-if",!0),e.error?(l(),d("div",rh,[t[0]||(t[0]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.error),1)])):f("v-if",!0),e.data?(l(),d("div",ih,[f(" \u2500\u2500 Top KPI row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",ah,[s("div",lh,[t[1]||(t[1]=s("div",{class:"ov-kpi-label"},[y("Repositories "),s("span",{class:"ov-dot ov-dot-ok"})],-1)),s("div",dh,c(e.humanNum(e.data?.repos?.total)),1),s("div",uh,"+"+c(e.data?.repos?.newRepos24h)+" \xB7 last 24h",1)]),s("div",ch,[t[2]||(t[2]=s("div",{class:"ov-kpi-label"},"CPU",-1)),s("div",{class:O(["ov-kpi-value",{"ov-val-warn":e.data?.system?.cpuPercent>80}])},c(e.data?.system?.cpuPercent)+"%",3),s("div",ph,c(e.data?.system?.cpuCount)+" cores \xB7 load "+c(e.data?.system?.loadAvg?.[0]?.toFixed(1)),1)]),s("div",fh,[t[3]||(t[3]=s("div",{class:"ov-kpi-label"},"Memory",-1)),s("div",{class:O(["ov-kpi-value",{"ov-val-warn":e.data?.system?.memPercent>85}])},c(e.data?.system?.memPercent)+"%",3),s("div",mh,c(e.humanBytes(e.data?.system?.memUsed))+" / "+c(e.humanBytes(e.data?.system?.memTotal)),1)]),s("div",hh,[t[4]||(t[4]=s("div",{class:"ov-kpi-label"},"Disk",-1)),s("div",{class:O(["ov-kpi-value",{"ov-val-warn":e.data?.system?.diskPercent>85}])},c(e.data?.system?.diskPercent)+"%",3),s("div",vh,c(e.humanBytes(e.data?.system?.diskUsed))+" / "+c(e.humanBytes(e.data?.system?.diskTotal))+" \xB7 "+c(e.data?.system?.diskMount),1)]),s("div",yh,[t[5]||(t[5]=s("div",{class:"ov-kpi-label"},"Uptime",-1)),s("div",gh,c(e.humanDuration(e.data?.system?.uptime)),1),s("div",bh,c(e.data?.system?.nodeVersion)+" \xB7 "+c(e.data?.system?.platform),1)])]),f(" \u2500\u2500 Daily activity highlights \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",wh,[s("div",kh,[t[6]||(t[6]=s("div",{class:"ov-daily-label"},"New repos today",-1)),s("div",_h,"+"+c(e.fmt?.number(e.data?.daily?.today?.repositories)),1),t[7]||(t[7]=s("div",{class:"ov-daily-sub"},"since yesterday",-1))]),s("div",Eh,[t[8]||(t[8]=s("div",{class:"ov-daily-label"},"New users today",-1)),s("div",Ch,"+"+c(e.fmt?.number(e.data?.daily?.today?.users)),1),s("div",Nh,c(e.fmt?.number(e.data?.users?.total))+" total users",1)]),s("div",Sh,[t[9]||(t[9]=s("div",{class:"ov-daily-label"},"Page views today",-1)),s("div",Dh,"+"+c(e.fmt?.number(e.data?.daily?.today?.pageViews)),1),t[10]||(t[10]=s("div",{class:"ov-daily-sub"},"since yesterday",-1))])]),f(" \u2500\u2500 Daily charts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",Rh,[s("div",Th,[t[11]||(t[11]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"Daily page views \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-accent"}),y("views/day")])],-1)),e.data?.history?.length?(l(),d("div",Oh,[(l(!0),d(J,null,ne(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyPageViews)+" views","aria-label":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyPageViews)+" views"},[s("span",{class:"ov-spark-fill",style:Pe({height:e.historyBarH(o,"dailyPageViews")+"px"})},null,4)],8,Ah))),128))])):f("v-if",!0),e.data?.history?.length?(l(),d("div",Ih,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),s("div",Vh,[t[12]||(t[12]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"New repos \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-ok-fill"}),y("repos/day")])],-1)),e.data?.history?.length?(l(),d("div",Ph,[(l(!0),d(J,null,ne(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyRepositories)+" repos","aria-label":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyRepositories)+" repos"},[s("span",{class:"ov-spark-fill ov-spark-fill-alt",style:Pe({height:e.historyBarH(o,"dailyRepositories")+"px"})},null,4)],8,qh))),128))])):f("v-if",!0),e.data?.history?.length?(l(),d("div",Mh,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),s("div",$h,[t[13]||(t[13]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"Users \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-user-fill"}),y("total users")])],-1)),e.data?.history?.length?(l(),d("div",Uh,[(l(!0),d(J,null,ne(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": "+e.fmt?.number(o?.nbUsers)+" users","aria-label":e.historyLabel(o)+": "+e.fmt?.number(o?.nbUsers)+" users"},[s("span",{class:"ov-spark-fill ov-spark-fill-user",style:Pe({height:e.historyBarH(o,"nbUsers")+"px"})},null,4)],8,Lh))),128))])):f("v-if",!0),e.data?.history?.length?(l(),d("div",Fh,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),s("div",zh,[t[14]||(t[14]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"New users \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-new-user-fill"}),y("users/day")])],-1)),e.data?.history?.length?(l(),d("div",Hh,[(l(!0),d(J,null,ne(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyUsers)+" users","aria-label":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyUsers)+" users"},[s("span",{class:"ov-spark-fill ov-spark-fill-new-user",style:Pe({height:e.historyBarH(o,"dailyUsers")+"px"})},null,4)],8,Bh))),128))])):f("v-if",!0),e.data?.history?.length?(l(),d("div",Gh,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)])]),f(" \u2500\u2500 Three-panel row: Status / Errors / Queues \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",jh,[f(" Repo status breakdown "),s("div",Wh,[s("div",Kh,[t[15]||(t[15]=s("span",{class:"ov-panel-title"},"Repo status",-1)),s("span",Yh,c(e.fmt?.number(e.data?.repos?.total))+" total",1)]),s("div",Jh,[s("span",{class:"ov-bar-seg ov-bar-ready",title:"Ready",style:Pe({width:e.barPct("ready")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-preparing",title:"Preparing",style:Pe({width:e.barPct("preparing")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-error",title:"Error",style:Pe({width:e.barPct("error")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-expired",title:"Expired",style:Pe({width:e.barPct("expired")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-removed",title:"Removed",style:Pe({width:e.barPct("removed")+"%"})},null,4)]),s("div",Qh,[s("a",Xh,[t[16]||(t[16]=s("span",{class:"ov-swatch ov-bar-ready"},null,-1)),t[17]||(t[17]=y(" ready ",-1)),s("span",Zh,c(e.fmt?.number(e.statusCount("ready"))),1)]),s("a",xh,[t[18]||(t[18]=s("span",{class:"ov-swatch ov-bar-preparing"},null,-1)),t[19]||(t[19]=y(" preparing ",-1)),s("span",ev,c(e.fmt?.number(e.statusCount("preparing")+e.statusCount("download"))),1)]),s("a",tv,[t[20]||(t[20]=s("span",{class:"ov-swatch ov-bar-error"},null,-1)),t[21]||(t[21]=y(" error ",-1)),s("span",sv,c(e.fmt?.number(e.statusCount("error"))),1)]),s("a",nv,[t[22]||(t[22]=s("span",{class:"ov-swatch ov-bar-expired"},null,-1)),t[23]||(t[23]=y(" expired ",-1)),s("span",ov,c(e.fmt?.number(e.statusCount("expired")+e.statusCount("expiring"))),1)]),s("a",rv,[t[24]||(t[24]=s("span",{class:"ov-swatch ov-bar-removed"},null,-1)),t[25]||(t[25]=y(" removed ",-1)),s("span",iv,c(e.fmt?.number(e.statusCount("removed")+e.statusCount("removing"))),1)])])]),f(" Error breakdown "),s("div",av,[s("div",lv,[t[26]||(t[26]=s("span",{class:"ov-panel-title"},"Errors \xB7 24h",-1)),s("span",dv,c(e.data?.errors?.last24h)+" total",1)]),s("div",uv,[s("div",cv,[t[27]||(t[27]=s("span",{class:"ov-ebar-label"},"5xx",-1)),s("span",pv,[s("span",{class:"ov-ebar-fill ov-ebar-error",style:Pe({width:e.errPct("error")+"%"})},null,4)]),s("span",fv,c(e.data?.errors?.severity?.error),1)]),s("div",mv,[t[28]||(t[28]=s("span",{class:"ov-ebar-label"},"4xx",-1)),s("span",hv,[s("span",{class:"ov-ebar-fill ov-ebar-warn",style:Pe({width:e.errPct("warn")+"%"})},null,4)]),s("span",vv,c(e.data?.errors?.severity?.warn),1)]),s("div",yv,[t[29]||(t[29]=s("span",{class:"ov-ebar-label"},"Info",-1)),s("span",gv,[s("span",{class:"ov-ebar-fill ov-ebar-info",style:Pe({width:e.errPct("info")+"%"})},null,4)]),s("span",bv,c(e.data?.errors?.severity?.info),1)])]),e.data?.repos?.recentErrors24h?(l(),d("div",wv,[s("a",kv,c(e.data?.repos?.recentErrors24h)+" repos in error state \u2192",1)])):f("v-if",!0)]),f(" Top routes / queues "),s("div",_v,[t[34]||(t[34]=s("div",{class:"ov-panel-head"},[s("span",{class:"ov-panel-title"},"Queues"),s("span",{class:"ov-panel-meta"},"by state")],-1)),s("div",Ev,[t[33]||(t[33]=ge('
QueueActiveWaitFailed
',1)),s("a",Cv,[t[30]||(t[30]=s("span",{class:"ov-route-name"},"download",-1)),s("span",Nv,c(e.data?.queues?.download?.active),1),s("span",Sv,c(e.data?.queues?.download?.waiting),1),s("span",{class:O(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.download?.failed>0}])},c(e.data?.queues?.download?.failed),3)]),s("a",Dv,[t[31]||(t[31]=s("span",{class:"ov-route-name"},"remove",-1)),s("span",Rv,c(e.data?.queues?.remove?.active),1),s("span",Tv,c(e.data?.queues?.remove?.waiting),1),s("span",{class:O(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.remove?.failed>0}])},c(e.data?.queues?.remove?.failed),3)]),s("a",Ov,[t[32]||(t[32]=s("span",{class:"ov-route-name"},"cache",-1)),s("span",Av,c(e.data?.queues?.cache?.active),1),s("span",Iv,c(e.data?.queues?.cache?.waiting),1),s("span",{class:O(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.cache?.failed>0}])},c(e.data?.queues?.cache?.failed),3)])])])]),f(" \u2500\u2500 Services bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",Vv,[s("div",Pv,[t[35]||(t[35]=s("span",{class:"ov-panel-title"},"Services",-1)),s("span",qv,c(e.fmt?.number(e.data?.users?.total))+" users \xB7 "+c(e.data?.conferences?.total)+" conferences",1)]),s("div",Mv,[s("div",$v,[t[37]||(t[37]=s("span",{class:"ov-svc-dot ov-dot-ok"},null,-1)),s("div",Uv,[t[36]||(t[36]=s("span",{class:"ov-svc-name"},"web",-1)),s("span",Lv,c(e.data?.system?.nodeVersion),1)]),s("span",Fv,"uptime "+c(e.humanDuration(e.data?.system?.uptime)),1)]),s("div",zv,[s("span",{class:O(["ov-svc-dot",e.queueTotal(e.data?.queues?.download)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),s("div",Hv,[t[38]||(t[38]=s("span",{class:"ov-svc-name"},"download",-1)),e.queueTotal(e.data?.queues?.download)?(l(),d("span",Bv,c(e.queueTotal(e.data?.queues?.download))+" jobs",1)):f("v-if",!0),e.queueTotal(e.data?.queues?.download)?f("v-if",!0):(l(),d("span",Gv,"idle"))])]),s("div",jv,[s("span",{class:O(["ov-svc-dot",e.queueTotal(e.data?.queues?.cache)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),s("div",Wv,[t[39]||(t[39]=s("span",{class:"ov-svc-name"},"cache",-1)),e.queueTotal(e.data?.queues?.cache)?(l(),d("span",Kv,c(e.queueTotal(e.data?.queues?.cache))+" jobs",1)):f("v-if",!0),e.queueTotal(e.data?.queues?.cache)?f("v-if",!0):(l(),d("span",Yv,"idle"))])]),s("div",Jv,[s("span",{class:O(["ov-svc-dot",e.queueTotal(e.data?.queues?.remove)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),s("div",Qv,[t[40]||(t[40]=s("span",{class:"ov-svc-name"},"remove",-1)),e.queueTotal(e.data?.queues?.remove)?(l(),d("span",Xv,c(e.queueTotal(e.data?.queues?.remove))+" jobs",1)):f("v-if",!0),e.queueTotal(e.data?.queues?.remove)?f("v-if",!0):(l(),d("span",Zv,"idle"))])]),s("div",xv,[s("span",{class:O(["ov-svc-dot",e.data?.repos?.recentErrors24h>10?"ov-dot-warn":"ov-dot-ok"])},null,2),s("div",ey,[t[41]||(t[41]=s("span",{class:"ov-svc-name"},"errors",-1)),s("span",ty,c(e.data?.errors?.last24h)+" / 24h",1)])])])])])):f("v-if",!0)])}var sy={class:"container paper-page admin-page"},ny={class:"q-header"},oy={class:"q-header-actions"},ry={class:"q-range-btns"},iy={class:"q-cards"},ay=["onClick"],ly={class:"q-card-head"},dy=["textContent"],uy=["textContent"],cy={class:"q-card-sub"},py={key:0,class:"q-card-bar"},fy={key:0,class:"q-detail"},my={class:"q-throughput"},hy={class:"q-section-label"},vy={class:"q-section-right"},yy={class:"q-stats-panel"},gy={class:"q-section-label"},by={class:"q-stats-grid"},wy={class:"q-stat"},ky=["textContent"],_y={class:"q-stat"},Ey=["textContent"],Cy={class:"q-stat"},Ny=["textContent"],Sy={class:"q-stat"},Dy=["textContent"],Ry={class:"q-stat"},Ty=["textContent"],Oy={class:"q-stat"},Ay=["textContent"],Iy={class:"q-stats-actions"},Vy=["disabled"],Py={class:"q-jobs"},qy={class:"q-jobs-header"},My={class:"q-section-label"},$y={class:"q-state-filters"},Uy={class:"q-state-toggle"},Ly={type:"checkbox"},Fy={class:"q-search-row"},zy={type:"search",class:"form-control",placeholder:"Search by job/repo id\u2026",autocomplete:"off"},Hy={class:"q-auto-refresh"},By={type:"checkbox"},Gy={key:0,class:"q-table"},jy=["onClick"],Wy={class:"q-cell-state"},Ky=["textContent"],Yy=["textContent"],Jy={class:"q-cell-id"},Qy=["textContent","href"],Xy={class:"q-cell-payload"},Zy=["textContent"],xy={key:0,class:"q-payload-detail"},eg=["textContent"],tg=["textContent"],sg={class:"q-cell-progress"},ng={key:0,class:"q-progress-wrap"},og=["textContent"],rg={class:"q-cell-actions"},ig=["onClick"],ag=["onClick"],lg={key:0,class:"q-detail-row"},dg={colspan:"7"},ug={class:"q-job-detail"},cg={class:"q-job-detail-grid"},pg={class:"q-job-detail-item"},fg={class:"q-job-detail-value"},mg=["textContent","href"],hg={class:"q-job-detail-item"},vg={class:"q-job-detail-value"},yg=["textContent"],gg={key:0,class:"q-job-detail-item"},bg=["textContent"],wg={key:1,class:"q-job-detail-item"},kg=["textContent"],_g={key:2,class:"q-job-detail-item"},Eg={class:"q-job-detail-value"},Cg={key:3,class:"q-job-detail-item"},Ng=["textContent"],Sg={key:4,class:"q-job-detail-item"},Dg=["textContent"],Rg={key:5,class:"q-job-detail-item"},Tg=["textContent"],Og={key:6,class:"q-job-detail-item"},Ag=["textContent"],Ig={key:7,class:"q-job-detail-item"},Vg=["textContent"],Pg={key:0,class:"q-job-detail-error"},qg=["textContent"],Mg={key:1},$g=["textContent"],Ug={class:"q-job-detail-actions"},Lg=["onClick"],Fg=["onClick"],zg=["href"],Hg={key:1,class:"paper-table-empty",style:{border:"1px solid var(--border-color)","border-radius":"10px",background:"var(--paper-card)"}},Bg={key:0},Gg={key:1};function Za(e,t){let o=be("field");return l(),d("div",sy,[t[47]||(t[47]=s("div",{class:"paper-crumbs"},[y("Admin \xA0/\xA0 "),s("span",{class:"here"},"Queues")],-1)),s("div",ny,[t[12]||(t[12]=s("h1",{class:"paper-page-title"},"Queues",-1)),s("div",oy,[s("div",ry,[s("button",{class:O(["btn btn-sm",{active:e.range=="1h"}]),onClick:t[0]||(t[0]=r=>e.setRange("1h"))},"1h",2),s("button",{class:O(["btn btn-sm",{active:e.range=="6h"}]),onClick:t[1]||(t[1]=r=>e.setRange("6h"))},"6h",2),s("button",{class:O(["btn btn-sm",{active:e.range=="24h"}]),onClick:t[2]||(t[2]=r=>e.setRange("24h"))},"24h",2),s("button",{class:O(["btn btn-sm",{active:e.range=="7d"}]),onClick:t[3]||(t[3]=r=>e.setRange("7d"))},"7d",2)]),s("button",{class:"btn btn-sm",onClick:t[4]||(t[4]=r=>e.pauseAll())},"Pause all"),s("button",{class:"btn btn-sm btn-dark",onClick:t[5]||(t[5]=r=>e.drainSelected())},"Drain "+c(e.selectedQueue),1)])]),t[48]||(t[48]=ge('',1)),f(" Queue overview cards "),s("div",iy,[(l(!0),d(J,null,ne(e.queueList,(r,n)=>(l(),d("div",{class:O(["q-card",{selected:e.selectedQueue==r?.key,paused:r?.paused}]),onClick:i=>e.selectQueue(r.key)},[s("div",ly,[s("span",{class:O(["q-dot",{"q-dot-red":r?.paused||r?.counts?.failed>0}])},null,2),s("span",{class:"q-card-name",textContent:c(r?.label)},null,8,dy)]),s("div",{class:"q-card-count",textContent:c((r?.counts?.waiting||0)+(r?.counts?.active||0)+(r?.counts?.delayed||0))},null,8,uy),s("div",cy,[s("span",null,"waiting \xB7 "+c(r?.counts?.active||0)+" active",1),r?.counts?.active?(l(),d("div",py,[s("div",{class:"q-card-bar-fill",style:Pe({width:r?.counts?.active/((r?.counts?.waiting||0)+(r?.counts?.active||0)+(r?.counts?.delayed||0)||1)*100+"%"})},null,4)])):f("v-if",!0)])],10,ay))),256))]),f(" Detail: throughput chart + stats panel "),e.selectedStats?(l(),d("div",fy,[s("div",my,[s("div",hy,[y(c(e.selectedQueue)+"\xB7throughput ",1),s("span",vy,[t[13]||(t[13]=s("span",{class:"q-legend-completed"},"\u25CF",-1)),t[14]||(t[14]=y(" completed ",-1)),t[15]||(t[15]=s("span",{class:"q-legend-failed"},"\u25CF",-1)),t[16]||(t[16]=y(" failed ",-1)),t[17]||(t[17]=s("span",{class:"q-legend-exec"},"- -",-1)),y(" avg time \xB7 "+c(e.fmt?.uppercase(e.range)),1)])]),t[18]||(t[18]=s("div",{class:"q-chart-wrap"},[s("canvas",{id:"q-throughput-chart",height:"180"}),s("div",{id:"q-chart-tooltip",class:"q-chart-tooltip",style:{display:"none"}}),s("div",{id:"q-chart-crosshair",class:"q-chart-crosshair",style:{display:"none"}})],-1))]),s("div",yy,[s("div",gy,c(e.selectedQueue)+"\xB7stats",1),s("div",by,[s("div",wy,[t[19]||(t[19]=s("div",{class:"q-stat-label"},"WAITING",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.waiting||0)},null,8,ky)]),s("div",_y,[t[20]||(t[20]=s("div",{class:"q-stat-label"},"ACTIVE",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.active||0)},null,8,Ey)]),s("div",Cy,[t[21]||(t[21]=s("div",{class:"q-stat-label"},"COMPLETED (24H)",-1)),s("div",{class:"q-stat-value",textContent:c(e.fmt?.number(e.selectedStats?.completed24h))},null,8,Ny)]),s("div",Sy,[t[22]||(t[22]=s("div",{class:"q-stat-label"},"FAILED (24H)",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.failed24h||0)},null,8,Dy)]),s("div",Ry,[t[23]||(t[23]=s("div",{class:"q-stat-label"},"DELAYED",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.delayed||0)},null,8,Ty)]),s("div",Oy,[t[24]||(t[24]=s("div",{class:"q-stat-label"},"WORKERS",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.workers||0)},null,8,Ay)])]),s("div",Iy,[s("button",{class:"btn btn-sm",onClick:t[6]||(t[6]=r=>e.togglePause())},c(e.selectedStats?.paused?"Resume":"Pause"),1),s("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=r=>e.retryFailed()),disabled:!e.selectedStats?.counts?.failed},"Retry failed",8,Vy),s("button",{class:"btn btn-sm",onClick:t[8]||(t[8]=r=>e.emptyQueue())},"Empty")])])])):f("v-if",!0),e.actionError?(l(),d("div",{key:1,class:"q-toast-error",onClick:t[9]||(t[9]=r=>e.actionError=null)},[t[25]||(t[25]=s("i",{class:"fas fa-exclamation-circle"},null,-1)),y(" "+c(e.actionError),1)])):f("v-if",!0),f(" Jobs table "),s("div",Py,[s("div",qy,[s("div",My,"ALL JOBS \xB7 "+c(e.fmt?.uppercase(e.selectedQueue)),1),s("div",$y,[(l(!0),d(J,null,ne(e.allStates,(r,n)=>(l(),d("label",Uy,[E(s("input",Ly,null,512),[[o,{state:e.viewState,set:i=>{e.stateFilter[r]=i},value:e.stateFilter[r],form:null,options:{}}]]),s("span",{class:O("q-state-chip q-state-"+r)},c(r),3)]))),256))])]),s("div",Fy,[E(s("input",zy,null,512),[[o,{state:e.viewState,set:r=>{e.query.search=r},value:e.query?.search,form:null,options:{}}]]),s("label",Hy,[E(s("input",By,null,512),[[o,{state:e.viewState,set:r=>{e.query.autoRefresh=r},value:e.query?.autoRefresh,form:null,options:{}}]]),t[26]||(t[26]=y(" Auto-refresh ",-1))]),s("button",{class:"btn btn-sm",type:"button",title:"Refresh now",onClick:t[10]||(t[10]=r=>e.refreshNow())},[...t[27]||(t[27]=[s("i",{class:"fas fa-sync"},null,-1)])])]),e.filteredJobs().length>0?(l(),d("table",Gy,[t[45]||(t[45]=s("thead",null,[s("tr",null,[s("th",null,"STATE"),s("th",null,"JOB ID"),s("th",null,"PAYLOAD"),s("th",null,"ATTEMPTS"),s("th",null,"DURATION"),s("th",null,"PROGRESS"),s("th")])],-1)),(l(!0),d(J,null,ne(e.filteredJobs(),(r,n)=>(l(),d("tbody",null,[s("tr",{style:{cursor:"pointer"},class:O({"q-row-failed":r?._state=="failed","q-row-expanded":e.expanded[r?.id]}),onClick:i=>e.toggleJob(r)},[s("td",Wy,[s("span",{textContent:c(r?._state),class:O("q-state-badge q-state-"+r?._state)},null,10,Ky),r?._state=="delayed"&&r?.delayUntil?(l(),d("span",{key:0,class:"q-delay-hint",textContent:c(e.delayCountdown(r?.delayUntil))},null,8,Yy)):f("v-if",!0)]),s("td",Jy,[s("i",{class:O(["fas fa-chevron-right q-chevron",{"q-chevron-open":e.expanded[r?.id]}])},null,2),s("a",{target:"_blank",textContent:c("job:"+e.fmt.limitTo(r?.id,6)),onClick:t[11]||(t[11]=i=>i.stopPropagation()),href:e.safeUrl("/r/"+r?.id)},null,8,Qy)]),s("td",Xy,[s("span",{textContent:c(r?.name||"anonymize")},null,8,Zy),r?.data?.repoId&&r?.data?.repoId!==r?.name?(l(),d("span",xy," \xB7 "+c(r?.data?.repoId),1)):f("v-if",!0)]),s("td",{class:"q-cell-num",textContent:c(r?.attemptsMade||1)},null,8,eg),s("td",{class:"q-cell-num",textContent:c(e.jobDuration(r))},null,8,tg),s("td",sg,[e.jobProgressPct(r)!==null?(l(),d("div",ng,[s("div",{class:"q-progress-bar",style:Pe({"--pct":e.jobProgressPct(r)+"%"})},null,4),s("span",{class:"q-progress-label",textContent:c(e.jobProgressPct(r)+"%")},null,8,og)])):f("v-if",!0)]),s("td",rg,[r?._state=="failed"?(l(),d("button",{key:0,class:"btn btn-sm",title:"Retry",onClick:i=>{e.retryJob(r),i.stopPropagation()}},[...t[28]||(t[28]=[s("i",{class:"fas fa-sync"},null,-1)])],8,ig)):f("v-if",!0),s("button",{class:"btn btn-sm",title:"Remove",onClick:i=>{e.removeJob(r),i.stopPropagation()}},[...t[29]||(t[29]=[s("i",{class:"fas fa-trash-alt"},null,-1)])],8,ag)])],10,jy),e.expanded[r?.id]?(l(),d("tr",lg,[s("td",dg,[s("div",ug,[s("div",cg,[s("div",pg,[t[30]||(t[30]=s("span",{class:"q-job-detail-label"},"JOB ID",-1)),s("span",fg,[s("a",{target:"_blank",textContent:c(r?.id),href:e.safeUrl("/r/"+r?.id)},null,8,mg)])]),s("div",hg,[t[31]||(t[31]=s("span",{class:"q-job-detail-label"},"STATE",-1)),s("span",vg,[s("span",{textContent:c(r?._state),class:O("q-state-badge q-state-"+r?._state)},null,10,yg)])]),r?.data?.repoId?(l(),d("div",gg,[t[32]||(t[32]=s("span",{class:"q-job-detail-label"},"REPO ID",-1)),s("span",{class:"q-job-detail-value",textContent:c(r?.data?.repoId)},null,8,bg)])):f("v-if",!0),r?.timestamp?(l(),d("div",wg,[t[33]||(t[33]=s("span",{class:"q-job-detail-label"},"CREATED",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.timestamp))},null,8,kg)])):f("v-if",!0),r?._state=="delayed"&&r?.delayUntil?(l(),d("div",_g,[t[34]||(t[34]=s("span",{class:"q-job-detail-label"},"RETRY AT",-1)),s("span",Eg,c(e.humanTime(r?.delayUntil))+" ("+c(e.delayCountdown(r?.delayUntil))+")",1)])):f("v-if",!0),r?.processedOn?(l(),d("div",Cg,[t[35]||(t[35]=s("span",{class:"q-job-detail-label"},"PROCESSED",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.processedOn))},null,8,Ng)])):f("v-if",!0),r?.finishedOn?(l(),d("div",Sg,[t[36]||(t[36]=s("span",{class:"q-job-detail-label"},"FINISHED",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.finishedOn))},null,8,Dg)])):f("v-if",!0),r?.attemptsMade?(l(),d("div",Rg,[t[37]||(t[37]=s("span",{class:"q-job-detail-label"},"ATTEMPTS",-1)),s("span",{class:"q-job-detail-value",textContent:c(r?.attemptsMade)},null,8,Tg)])):f("v-if",!0),r?.progress&&r?.progress?.status?(l(),d("div",Og,[t[38]||(t[38]=s("span",{class:"q-job-detail-label"},"STATUS",-1)),s("span",{class:"q-job-detail-value",textContent:c(r?.progress?.status)},null,8,Ag)])):f("v-if",!0),e.jobProgressPct(r)!==null?(l(),d("div",Ig,[t[39]||(t[39]=s("span",{class:"q-job-detail-label"},"PROGRESS",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.jobProgressPct(r)+"%")},null,8,Vg)])):f("v-if",!0)]),r?.failedReason?(l(),d("div",Pg,[t[40]||(t[40]=s("span",{class:"q-job-detail-label"},"ERROR",-1)),s("div",{class:"q-error-reason",textContent:c(r?.failedReason)},null,8,qg)])):f("v-if",!0),r?.stacktrace?.length?(l(),d("div",Mg,[t[41]||(t[41]=s("span",{class:"q-job-detail-label"},"STACKTRACE",-1)),(l(!0),d(J,null,ne(r?.stacktrace,(i,a)=>(l(),d("pre",{class:"q-error-stack",key:a},[s("code",{textContent:c(i)},null,8,$g)]))),128))])):f("v-if",!0),s("div",Ug,[r?._state=="failed"?(l(),d("button",{key:0,class:"btn btn-sm",onClick:i=>e.retryJob(r)},[...t[42]||(t[42]=[s("i",{class:"fas fa-sync"},null,-1),y(" Retry",-1)])],8,Lg)):f("v-if",!0),s("button",{class:"btn btn-sm",onClick:i=>e.removeJob(r)},[...t[43]||(t[43]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,Fg),s("a",{class:"btn btn-sm",target:"_blank",href:e.safeUrl("/r/"+r?.id)},[...t[44]||(t[44]=[s("i",{class:"fas fa-external-link-alt"},null,-1),y(" View repo",-1)])],8,zg)])])])])):f("v-if",!0)]))),256))])):f("v-if",!0),e.filteredJobs().length==0?(l(),d("div",Hg,[t[46]||(t[46]=s("i",{class:"fas fa-check-circle"},null,-1)),e.query?.search?f("v-if",!0):(l(),d("span",Bg,"No jobs in the "+c(e.selectedQueue)+" queue.",1)),e.query?.search?(l(),d("span",Gg,"No jobs match the current filters.")):f("v-if",!0)])):f("v-if",!0)])])}var jg={class:"container paper-page admin-page"},Wg={class:"admin-summary"},Kg={class:"summary-total"},Yg={class:"summary-meta"},Jg={class:"count"},Qg={class:"count"},Xg={class:"count"},Zg={class:"count"},xg={class:"count"},eb={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},tb={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},sb={class:"admin-filter-row"},ob={class:"search-wrap"},rb={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repoId, source repo, error message\u2026",autocomplete:"off"},ib={key:0,class:"admin-search-hint"},ab={class:"admin-filter-inline"},lb={type:"text",class:"form-control form-control-sm",placeholder:"username"},db={class:"admin-filter-inline"},ub={type:"text",class:"form-control form-control-sm",placeholder:"ID"},cb={class:"admin-filter-inline","aria-label":"Pagination"},pb=["disabled"],fb={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},mb=["disabled"],hb={key:0,class:"admin-filter-row"},vb={class:"admin-active-chips"},yb={class:"key"},gb=["onClick"],bb={key:1,class:"bulk-bar"},wb={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},kb={class:"paper-table-head",role:"row"},_b={role:"columnheader",style:{width:"28px"}},Eb=["checked"],Cb={role:"columnheader"},Nb={role:"columnheader"},Sb={role:"columnheader",class:"num"},Db={role:"columnheader"},Rb={role:"cell",style:{width:"28px"}},Tb={type:"checkbox","aria-label":"Select repository"},Ob={class:"cell-anon",role:"cell"},Ab={class:"anon-text"},Ib=["textContent","href"],Vb={class:"anon-sub"},Pb=["textContent","href"],qb={key:0},Mb=["textContent","href"],$b={key:1},Ub=["textContent","href"],Lb={key:2},Fb={class:"cell-status",role:"cell"},zb={class:"status-line"},Hb=["textContent"],Bb=["textContent","title"],Gb=["textContent"],jb=["textContent"],Wb={class:"cell-actions",role:"cell"},Kb={class:"dropdown"},Yb={class:"dropdown-menu dropdown-menu-right"},Jb=["href"],Qb=["href"],Xb=["href"],Zb=["onClick"],xb=["onClick"],e1=["onClick"],t1=["onClick"],s1=["onClick"],n1=["onClick"],o1={key:0,class:"paper-table-empty"},r1={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},i1={style:{"font-size":"12px",color:"var(--ink-muted)"}},a1={key:0,class:"pagination-compact"},l1=["disabled"],d1=["max"],u1=["disabled"],c1={class:"admin-filter-inline"},p1={class:"form-control form-control-sm"};function xa(e,t){let o=be("field"),r=be("form");return l(),d("div",jg,[t[61]||(t[61]=ge('
Admin \xA0/\xA0 Repositories

Repositories

',3)),s("div",Wg,[s("span",Kg,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),s("span",Yg,c(e.fmt?.humanFileSize(e.totalSize))+" on disk",1),s("span",{class:O(["summary-pill ok",{active:e.query?.ready}]),title:"Toggle ready filter",onClick:t[0]||(t[0]=n=>{e.query.ready=!e.query.ready,e.query.page=1})},[t[18]||(t[18]=y("Ready ",-1)),s("span",Jg,c(e.fmt?.number(e.statusCountFor("ready"))),1)],2),s("span",{class:O(["summary-pill warn",{active:e.query?.preparing}]),title:"Toggle preparing filter",onClick:t[1]||(t[1]=n=>{e.query.preparing=!e.query.preparing,e.query.page=1})},[t[19]||(t[19]=y("Preparing ",-1)),s("span",Qg,c(e.fmt?.number(e.statusCountFor("preparing")+e.statusCountFor("download"))),1)],2),s("span",{class:O(["summary-pill error",{active:e.query?.error}]),title:"Toggle errored filter",onClick:t[2]||(t[2]=n=>{e.query.error=!e.query.error,e.query.page=1})},[t[20]||(t[20]=y("Errored ",-1)),s("span",Xg,c(e.fmt?.number(e.statusCountFor("error"))),1)],2),s("span",{class:O(["summary-pill",{active:e.query?.expired}]),title:"Toggle expired filter",onClick:t[3]||(t[3]=n=>{e.query.expired=!e.query.expired,e.query.page=1})},[t[21]||(t[21]=y("Expired ",-1)),s("span",Zg,c(e.fmt?.number(e.statusCountFor("expired")+e.statusCountFor("expiring"))),1)],2),s("span",{class:O(["summary-pill",{active:e.query?.removed}]),title:"Toggle removed filter",onClick:t[4]||(t[4]=n=>{e.query.removed=!e.query.removed,e.query.page=1})},[t[22]||(t[22]=y("Removed ",-1)),s("span",xg,c(e.fmt?.number(e.statusCountFor("removed")+e.statusCountFor("removing"))),1)],2)]),e.fetchError?(l(),d("div",eb,[t[23]||(t[23]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fetchError),1)])):f("v-if",!0),E((l(),d("form",tb,[f(" Row 1: search + scoped inputs + headline actions "),s("div",sb,[s("div",ob,[E(s("input",rb,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(l(),d("span",ib,"/"))]),s("span",ab,[t[24]||(t[24]=s("label",null,"Owner",-1)),E(s("input",lb,null,512),[[o,{state:e.viewState,set:n=>{e.query.owner=n},value:e.query?.owner,form:null,options:{}}]])]),s("span",db,[t[25]||(t[25]=s("label",null,"Conference",-1)),E(s("input",ub,null,512),[[o,{state:e.viewState,set:n=>{e.query.conference=n},value:e.query?.conference,form:null,options:{}}]])]),t[29]||(t[29]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[5]||(t[5]=n=>e.exportCsv())},[...t[26]||(t[26]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])]),s("span",cb,[s("button",{class:"btn btn-sm",type:"button",onClick:t[6]||(t[6]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[27]||(t[27]=[s("i",{class:"fas fa-chevron-left"},null,-1)])],8,pb),s("span",fb,c(e.query?.page)+"/"+c(e.totalPage||1),1),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[28]||(t[28]=[s("i",{class:"fas fa-chevron-right"},null,-1)])],8,mb)])]),f(" Row 2: appears only when there are active filter chips "),e.chips?.length?(l(),d("div",hb,[s("div",vb,[(l(!0),d(J,null,ne(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[s("span",yb,c(n?.label),1),s("span",null,c(n?.value),1),s("button",{type:"button","aria-label":"Remove filter",onClick:a=>e.clearFilter(n.key)},[...t[30]||(t[30]=[s("i",{class:"fas fa-times"},null,-1)])],8,gb)]))),128))])])):f("v-if",!0)])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",bb,[s("span",null,[s("strong",null,c(e.selectedCount()),1),t[31]||(t[31]=y(" selected",-1))]),s("button",{class:"btn btn-sm",type:"button",onClick:t[8]||(t[8]=n=>e.bulkRefresh())},[...t[32]||(t[32]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force refresh",-1)])]),s("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[9]||(t[9]=n=>e.bulkRemoveCache())},[...t[33]||(t[33]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])]),s("button",{class:"btn btn-sm",type:"button",onClick:t[10]||(t[10]=n=>e.clearSelection())},"Clear")])):f("v-if",!0),s("div",wb,[s("div",kb,[s("div",_b,[s("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[11]||(t[11]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,Eb)]),s("div",Cb,[s("span",{class:O(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[12]||(t[12]=n=>e.sortBy("source.repositoryName"))},[t[34]||(t[34]=y("Repository ",-1)),s("i",{class:O(["fas",e.sortIcon("source.repositoryName")])},null,2)],2)]),s("div",Nb,[s("span",{class:O(["sortable",{active:e.query?.sort=="status"}]),onClick:t[13]||(t[13]=n=>e.sortBy("status"))},[t[35]||(t[35]=y("Status ",-1)),s("i",{class:O(["fas",e.sortIcon("status")])},null,2)],2)]),s("div",Sb,[s("span",{class:O(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[14]||(t[14]=n=>e.sortBy("pageView"))},[t[36]||(t[36]=y("Views ",-1)),s("i",{class:O(["fas",e.sortIcon("pageView")])},null,2)],2)]),s("div",Db,[s("span",{class:O(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[15]||(t[15]=n=>e.sortBy("anonymizeDate"))},[t[37]||(t[37]=y("Anonymized ",-1)),s("i",{class:O(["fas",e.sortIcon("anonymizeDate")])},null,2)],2)]),t[38]||(t[38]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(J,null,ne(e.filteredRepositories,(n,i)=>(l(),d("div",{class:O(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error","row-selected":e.selected[n?.repoId]}]),role:"row"},[s("div",Rb,[E(s("input",Tb,null,512),[[o,{state:e.viewState,set:a=>{e.selected[n.repoId]=a},value:e.selected[n?.repoId],form:null,options:{}}]])]),s("div",Ob,[t[43]||(t[43]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",Ab,[s("a",{class:"repo-name",target:"_blank",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId)},null,8,Ib),s("div",Vb,[s("a",{textContent:c(n?.source?.repositoryName),href:e.safeUrl("https://github.com/"+n?.source?.repositoryName+"/")},null,8,Pb),n?.options?.update?(l(),d("span",qb,[t[39]||(t[39]=y("\xA0\xB7\xA0",-1)),s("a",{textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,Mb)])):f("v-if",!0),n?.options?.update?f("v-if",!0):(l(),d("span",$b,[t[40]||(t[40]=y("\xA0\xB7\xA0@",-1)),s("a",{textContent:c(n?.source?.commit?.substring(0,8)),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},null,8,Ub)])),n?.conference?(l(),d("span",Lb,[t[41]||(t[41]=y("\xA0\xB7\xA0",-1)),t[42]||(t[42]=s("i",{class:"fas fa-chalkboard-teacher"},null,-1)),y(" "+c(n?.conference),1)])):f("v-if",!0),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.humanFileSize(n?.size?.storage)),1),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.number(n?.options?.terms?.length))+" terms",1)])])]),s("div",Fb,[s("span",zb,[s("span",{class:O(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,Hb)]),n?.statusMessage?(l(),d("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,Bb)):f("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView||0))},null,8,Gb),s("div",{class:"cell-expires",role:"cell",textContent:c(e.fmt?.humanTime(n?.anonymizeDate))},null,8,jb),s("div",Wb,[s("div",Kb,[t[55]||(t[55]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",Yb,[s("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[44]||(t[44]=[s("i",{class:"far fa-edit"},null,-1),y(" Edit",-1)])],8,Jb),s("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[45]||(t[45]=[s("i",{class:"fa fa-eye"},null,-1),y(" View repo",-1)])],8,Qb),n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[46]||(t[46]=[s("i",{class:"fas fa-globe"},null,-1),y(" View page",-1)])],8,Xb)):f("v-if",!0),s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.fetchGithubInfo(n),["prevent"])},[...t[47]||(t[47]=[s("i",{class:"fab fa-github"},null,-1),y(" Live GitHub info",-1)])],8,Zb),t[53]||(t[53]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.updateRepository(n),["prevent"])},[...t[48]||(t[48]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force update",-1)])],8,xb),[[B,n?.status=="ready"||n?.status=="error"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.updateRepository(n),["prevent"])},[...t[49]||(t[49]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Enable",-1)])],8,e1),[[B,n?.status=="removed"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.showStatusMessage(n),["prevent"])},[...t[50]||(t[50]=[s("i",{class:"fas fa-exclamation-triangle"},null,-1),y(" View status message",-1)])],8,t1),[[B,n?.statusMessage]]),t[54]||(t[54]=s("div",{class:"dropdown-divider"},null,-1)),s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.removeCache(n),["prevent"])},[...t[51]||(t[51]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])],8,s1),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:we(a=>e.removeRepository(n),["prevent"])},[...t[52]||(t[52]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,n1),[[B,n?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(l(),d("div",o1,[...t[56]||(t[56]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No repositories match the current filters.",-1)])])):f("v-if",!0)]),s("div",r1,[s("span",i1,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",a1,[s("button",{class:"btn btn-sm",onClick:t[16]||(t[16]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[57]||(t[57]=[s("i",{class:"fas fa-chevron-left"},null,-1),y(" Previous ",-1)])],8,l1),E(s("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,d1),[[o,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),s("span",null,"of "+c(e.totalPage),1),s("button",{class:"btn btn-sm",onClick:t[17]||(t[17]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[58]||(t[58]=[y(" Next ",-1),s("i",{class:"fas fa-chevron-right"},null,-1)])],8,u1)])):f("v-if",!0),s("span",c1,[t[60]||(t[60]=s("label",null,"Per page",-1)),E((l(),d("select",p1,[...t[59]||(t[59]=[ge('',5)])])),[[o,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var f1={class:"container paper-page admin-page"},m1={class:"paper-crumbs"},h1={class:"here"},v1={class:"paper-page-title"},y1={key:0,class:"user-detail-card"},g1={class:"user-header"},b1=["src"],w1={class:"status-dot-wrap"},k1=["textContent"],_1={key:0,class:"type-badge type-repo"},E1={class:"user-actions",style:{"margin-top":"4px"}},C1={class:"user-detail-grid"},N1={class:"detail-value"},S1={class:"detail-value"},D1={class:"detail-value",style:{"font-family":"var(--font-mono)","font-size":"0.85rem"}},R1={class:"detail-value"},T1=["href"],O1={class:"detail-value"},A1={class:"detail-value"},I1={key:0},V1={key:1,class:"text-muted"},P1={class:"detail-value"},q1={key:0,style:{"margin-top":"20px"}},M1={class:"paper-table w-100",style:{"margin-top":"10px"}},$1={class:"paper-table-row",style:{"grid-template-columns":"1fr 160px"}},U1={class:"cell-anon",role:"cell"},L1={class:"anon-text"},F1=["textContent"],z1={class:"cell-expires",role:"cell"},H1={key:1,class:"admin-section-header"},B1={class:"section-count"},G1={key:2,class:"user-detail-card"},j1={type:"text",class:"form-control",placeholder:"Token name (e.g. dev-laptop)",required:""},W1={key:0,class:"alert alert-warning",role:"alert"},K1={style:{"white-space":"pre-wrap","word-break":"break-all",margin:"8px 0 0","font-family":"var(--font-mono)","font-size":"0.85rem"}},Y1={key:1,class:"paper-table w-100"},J1={class:"paper-table-row",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},Q1=["textContent"],X1=["textContent"],Z1={role:"cell"},x1={key:0},ew={key:1,class:"text-muted"},tw={role:"cell"},sw=["onClick"],nw={key:2,class:"paper-table-empty"},ow={class:"admin-section-header"},rw={class:"section-count"},iw={class:"admin-summary"},aw={class:"summary-total"},lw={class:"count"},dw={class:"count"},uw={class:"count"},cw={class:"count"},pw={class:"count"},fw={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},mw={class:"admin-filter-row"},hw={class:"search-wrap"},vw={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repoId, source repo, error message\u2026",autocomplete:"off"},yw={key:3,class:"bulk-bar"},gw={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},bw={class:"paper-table-head",role:"row"},ww={role:"columnheader",style:{width:"28px"}},kw=["checked"],_w={role:"columnheader"},Ew={role:"columnheader"},Cw={role:"columnheader",class:"num"},Nw={role:"columnheader"},Sw={role:"cell",style:{width:"28px"}},Dw={type:"checkbox","aria-label":"Select repository"},Rw={class:"cell-anon",role:"cell"},Tw={class:"anon-text"},Ow=["textContent","href"],Aw={class:"anon-sub"},Iw=["textContent","href"],Vw={key:0},Pw=["textContent","href"],qw={key:1},Mw=["textContent","href"],$w={key:2},Uw={class:"cell-status",role:"cell"},Lw={class:"status-line"},Fw=["textContent"],zw=["textContent","title"],Hw=["textContent"],Bw=["textContent"],Gw={class:"cell-actions",role:"cell"},jw={class:"dropdown"},Ww={class:"dropdown-menu dropdown-menu-right"},Kw=["href"],Yw=["href"],Jw=["href"],Qw=["onClick"],Xw=["onClick"],Zw=["onClick"],xw=["onClick"],ek=["onClick"],tk=["onClick"],sk={key:0,class:"paper-table-empty"};function el(e,t){let o=be("field"),r=be("form");return l(),d("div",f1,[s("div",m1,[t[22]||(t[22]=s("a",{href:"/admin/users"},"Users",-1)),t[23]||(t[23]=y(" \xA0/\xA0 ",-1)),s("span",h1,c(e.userInfo?.username||"Profile"),1)]),s("h1",v1,c(e.userInfo?.username||"User"),1),t[81]||(t[81]=ge('',1)),e.userInfo?(l(),d("div",y1,[s("div",g1,[e.userInfo?.photo?(l(),d("img",{key:0,width:"56",height:"56",src:e.safeUrl(e.userInfo?.photo)},null,8,b1)):f("v-if",!0),s("div",null,[s("h1",null,[y(c(e.userInfo?.username)+" ",1),s("span",w1,[s("span",{class:O(["status-dot",{"status-ready":e.userInfo?.status=="active","status-removed":e.userInfo?.status!="active"}])},null,2),s("span",{textContent:c(e.fmt?.title(e.userInfo?.status))},null,8,k1)]),e.userInfo?.isAdmin?(l(),d("span",_1,"Admin")):f("v-if",!0)]),s("div",E1,[e.userInfo?.status!=="banned"?(l(),d("button",{key:0,class:"btn btn-sm text-danger",onClick:t[0]||(t[0]=n=>e.banUser())},[...t[24]||(t[24]=[s("i",{class:"fas fa-ban"},null,-1),y(" Ban",-1)])])):f("v-if",!0),e.userInfo?.status==="banned"||e.userInfo?.status==="removed"?(l(),d("button",{key:1,class:"btn btn-sm",onClick:t[1]||(t[1]=n=>e.activateUser())},[...t[25]||(t[25]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Activate",-1)])])):f("v-if",!0),e.userInfo?.isAdmin?f("v-if",!0):(l(),d("button",{key:2,class:"btn btn-sm",onClick:t[2]||(t[2]=n=>e.promoteUser())},[...t[26]||(t[26]=[s("i",{class:"fas fa-user-shield"},null,-1),y(" Promote to admin",-1)])])),e.userInfo?.isAdmin?(l(),d("button",{key:3,class:"btn btn-sm text-danger",onClick:t[3]||(t[3]=n=>e.demoteUser())},[...t[27]||(t[27]=[s("i",{class:"fas fa-user-minus"},null,-1),y(" Remove admin",-1)])])):f("v-if",!0)])])]),s("div",C1,[t[30]||(t[30]=s("div",{class:"detail-label"},"ID",-1)),s("div",N1,c(e.userInfo?._id),1),t[31]||(t[31]=s("div",{class:"detail-label"},"Email",-1)),s("div",S1,c(e.userInfo?.emails?.[0]?.email),1),t[32]||(t[32]=s("div",{class:"detail-label"},"Access token",-1)),s("div",D1,c(e.userInfo?.accessTokens?.github),1),t[33]||(t[33]=s("div",{class:"detail-label"},"GitHub",-1)),s("div",R1,[s("a",{target:"_blank",href:e.safeUrl("https://github.com/"+e.userInfo?.username)},[t[28]||(t[28]=s("i",{class:"fab fa-github"},null,-1)),y(" "+c(e.userInfo?.username),1)],8,T1)]),t[34]||(t[34]=s("div",{class:"detail-label"},"Created",-1)),s("div",O1,c(e.fmt?.humanTime(e.userInfo?.dateOfEntry)),1),t[35]||(t[35]=s("div",{class:"detail-label"},"Last connection",-1)),s("div",A1,[e.userInfo?.accessTokenDates?.github?(l(),d("span",I1,c(e.fmt?.humanTime(e.userInfo?.accessTokenDates?.github)),1)):f("v-if",!0),e.userInfo?.accessTokenDates?.github?f("v-if",!0):(l(),d("span",V1,"never"))]),t[36]||(t[36]=s("div",{class:"detail-label"},"GitHub repos",-1)),s("div",P1,[y(c(e.userInfo?.repositories?.length)+" repositories ",1),s("button",{class:"btn btn-sm ml-2",onClick:t[4]||(t[4]=n=>e.showRepos=!e.showRepos)},c(e.showRepos?"Hide":"Show"),1),s("button",{class:"btn btn-sm ml-1",onClick:t[5]||(t[5]=n=>e.getGitHubRepositories())},[...t[29]||(t[29]=[s("i",{class:"fas fa-sync"},null,-1),y(" Refresh ",-1)])])])]),e.showRepos?(l(),d("div",q1,[t[39]||(t[39]=s("div",{class:"paper-section-eyebrow"},"GitHub repositories",-1)),s("div",M1,[(l(!0),d(J,null,ne(e.userInfo?.repositories,(n,i)=>(l(),d("div",$1,[s("div",U1,[t[37]||(t[37]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",L1,[s("span",{class:"repo-name",textContent:c(n?.name)},null,8,F1)])]),s("div",z1,[t[38]||(t[38]=s("i",{class:"fas fa-database"},null,-1)),y(" "+c(e.fmt?.humanFileSize(n?.size)),1)])]))),256))])])):f("v-if",!0)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(l(),d("div",H1,[t[40]||(t[40]=s("h2",null,[s("i",{class:"fas fa-key"}),y(" API tokens")],-1)),s("span",B1,c(e.tokens?.length),1)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(l(),d("div",G1,[t[46]||(t[46]=s("p",{class:"paper-page-lede"},[y("Personal API tokens for this admin account. Send as "),s("code",null,"Authorization: Bearer "),y(" to authenticate without GitHub OAuth (useful for development).")],-1)),E((l(),d("form",{class:"d-flex",style:{gap:"8px","margin-bottom":"12px"},onSubmit:t[6]||(t[6]=we(n=>e.submitForm(n,()=>{e.createToken()}),["prevent"]))},[E(s("input",j1,null,512),[[o,{state:e.viewState,set:n=>{e.tokenForm.name=n},value:e.tokenForm?.name,form:null,options:{}}]]),t[41]||(t[41]=s("button",{type:"submit",class:"btn btn-primary"},[s("i",{class:"fas fa-plus"}),y(" Generate")],-1))],32)),[[r,e.viewState]]),e.tokenForm?.plaintext?(l(),d("div",W1,[t[42]||(t[42]=s("strong",null,"Copy this token now \u2014 it will not be shown again:",-1)),s("pre",K1,c(e.tokenForm?.plaintext),1),s("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=n=>e.tokenForm.plaintext=null)},"Dismiss")])):f("v-if",!0),e.tokens?.length?(l(),d("div",Y1,[t[44]||(t[44]=s("div",{class:"paper-table-head",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},[s("div",{role:"columnheader"},"Name"),s("div",{role:"columnheader"},"Created"),s("div",{role:"columnheader"},"Last used"),s("div",{role:"columnheader","aria-label":"Actions"})],-1)),(l(!0),d(J,null,ne(e.tokens,(n,i)=>(l(),d("div",J1,[s("div",{role:"cell",textContent:c(n?.name)},null,8,Q1),s("div",{role:"cell",textContent:c(e.fmt?.humanTime(n?.createdAt))},null,8,X1),s("div",Z1,[n?.lastUsedAt?(l(),d("span",x1,c(e.fmt?.humanTime(n?.lastUsedAt)),1)):f("v-if",!0),n?.lastUsedAt?f("v-if",!0):(l(),d("span",ew,"never"))]),s("div",tw,[s("button",{class:"btn btn-sm text-danger",title:"Revoke",onClick:a=>e.revokeToken(n)},[...t[43]||(t[43]=[s("i",{class:"fas fa-trash-alt"},null,-1)])],8,sw)])]))),256))])):f("v-if",!0),e.tokens?.length?f("v-if",!0):(l(),d("div",nw,[...t[45]||(t[45]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No tokens yet.",-1)])]))])):f("v-if",!0),s("div",ow,[t[47]||(t[47]=s("h2",null,[s("i",{class:"fas fa-code-branch"}),y(" Anonymized repositories")],-1)),s("span",rw,c(e.repositories?.length),1)]),s("div",iw,[s("span",aw,c(e.fmt?.number(e.repositories?.length)),1),s("span",{class:O(["summary-pill ok",{active:e.filters?.status?.ready===!1}]),title:"Toggle ready filter",onClick:t[8]||(t[8]=n=>e.filters.status.ready=!e.filters.status.ready)},[t[48]||(t[48]=y("Ready ",-1)),s("span",lw,c(e.fmt?.number(e.statusCountFor("ready"))),1)],2),s("span",{class:O(["summary-pill warn",{active:e.filters?.status?.preparing===!1}]),title:"Toggle preparing filter",onClick:t[9]||(t[9]=n=>e.filters.status.preparing=!e.filters.status.preparing)},[t[49]||(t[49]=y("Preparing ",-1)),s("span",dw,c(e.fmt?.number(e.statusCountFor("preparing"))),1)],2),s("span",{class:O(["summary-pill error",{active:e.filters?.status?.error===!1}]),title:"Toggle errored filter",onClick:t[10]||(t[10]=n=>e.filters.status.error=!e.filters.status.error)},[t[50]||(t[50]=y("Errored ",-1)),s("span",uw,c(e.fmt?.number(e.statusCountFor("error"))),1)],2),s("span",{class:O(["summary-pill",{active:e.filters?.status?.expired===!1}]),title:"Toggle expired filter",onClick:t[11]||(t[11]=n=>e.filters.status.expired=!e.filters.status.expired)},[t[51]||(t[51]=y("Expired ",-1)),s("span",cw,c(e.fmt?.number(e.statusCountFor("expired"))),1)],2),s("span",{class:O(["summary-pill",{active:e.filters?.status?.removed===!1}]),title:"Toggle removed filter",onClick:t[12]||(t[12]=n=>e.filters.status.removed=!e.filters.status.removed)},[t[52]||(t[52]=y("Removed ",-1)),s("span",pw,c(e.fmt?.number(e.statusCountFor("removed"))),1)],2)]),E((l(),d("form",fw,[s("div",mw,[s("div",hw,[E(s("input",vw,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),t[54]||(t[54]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[13]||(t[13]=n=>e.exportCsv())},[...t[53]||(t[53]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])])])])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",yw,[s("span",null,[s("strong",null,c(e.selectedCount()),1),t[55]||(t[55]=y(" selected",-1))]),s("button",{class:"btn btn-sm",type:"button",onClick:t[14]||(t[14]=n=>e.bulkRefresh())},[...t[56]||(t[56]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force refresh",-1)])]),s("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[15]||(t[15]=n=>e.bulkRemoveCache())},[...t[57]||(t[57]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])]),s("button",{class:"btn btn-sm",type:"button",onClick:t[16]||(t[16]=n=>e.clearSelection())},"Clear")])):f("v-if",!0),s("div",gw,[s("div",bw,[s("div",ww,[s("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[17]||(t[17]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,kw)]),s("div",_w,[s("span",{class:O(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[18]||(t[18]=n=>e.sortBy("source.repositoryName"))},[t[58]||(t[58]=y("Repository ",-1)),s("i",{class:O(["fas",e.sortIcon("source.repositoryName")])},null,2)],2)]),s("div",Ew,[s("span",{class:O(["sortable",{active:e.query?.sort=="status"}]),onClick:t[19]||(t[19]=n=>e.sortBy("status"))},[t[59]||(t[59]=y("Status ",-1)),s("i",{class:O(["fas",e.sortIcon("status")])},null,2)],2)]),s("div",Cw,[s("span",{class:O(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[20]||(t[20]=n=>e.sortBy("pageView"))},[t[60]||(t[60]=y("Views ",-1)),s("i",{class:O(["fas",e.sortIcon("pageView")])},null,2)],2)]),s("div",Nw,[s("span",{class:O(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[21]||(t[21]=n=>e.sortBy("anonymizeDate"))},[t[61]||(t[61]=y("Anonymized ",-1)),s("i",{class:O(["fas",e.sortIcon("anonymizeDate")])},null,2)],2)]),t[62]||(t[62]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(J,null,ne(e.filteredRepositories,(n,i)=>(l(),d("div",{class:O(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error","row-selected":e.selected[n?.repoId]}]),role:"row"},[s("div",Sw,[E(s("input",Dw,null,512),[[o,{state:e.viewState,set:a=>{e.selected[n.repoId]=a},value:e.selected[n?.repoId],form:null,options:{}}]])]),s("div",Rw,[t[67]||(t[67]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",Tw,[s("a",{class:"repo-name",target:"_blank",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId)},null,8,Ow),s("div",Aw,[s("a",{textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,Iw),n?.options?.update?(l(),d("span",Vw,[t[63]||(t[63]=y("\xA0\xB7\xA0",-1)),s("a",{textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,Pw)])):f("v-if",!0),n?.options?.update?f("v-if",!0):(l(),d("span",qw,[t[64]||(t[64]=y("\xA0\xB7\xA0@",-1)),s("a",{textContent:c(n?.source?.commit?.substring(0,8)),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},null,8,Mw)])),n?.conference?(l(),d("span",$w,[t[65]||(t[65]=y("\xA0\xB7\xA0",-1)),t[66]||(t[66]=s("i",{class:"fas fa-chalkboard-teacher"},null,-1)),y(" "+c(n?.conference),1)])):f("v-if",!0),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.humanFileSize(n?.size?.storage)),1),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.number(n?.options?.terms?.length))+" terms",1)])])]),s("div",Uw,[s("span",Lw,[s("span",{class:O(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,Fw)]),n?.statusMessage?(l(),d("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,zw)):f("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView||0))},null,8,Hw),s("div",{class:"cell-expires",role:"cell",textContent:c(e.fmt?.humanTime(n?.anonymizeDate))},null,8,Bw),s("div",Gw,[s("div",jw,[t[79]||(t[79]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",Ww,[s("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[68]||(t[68]=[s("i",{class:"far fa-edit"},null,-1),y(" Edit",-1)])],8,Kw),s("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[69]||(t[69]=[s("i",{class:"fa fa-eye"},null,-1),y(" View repo",-1)])],8,Yw),n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[70]||(t[70]=[s("i",{class:"fas fa-globe"},null,-1),y(" View page",-1)])],8,Jw)):f("v-if",!0),s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.fetchGithubInfo(n),["prevent"])},[...t[71]||(t[71]=[s("i",{class:"fab fa-github"},null,-1),y(" Live GitHub info",-1)])],8,Qw),t[77]||(t[77]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.updateRepository(n),["prevent"])},[...t[72]||(t[72]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force update",-1)])],8,Xw),[[B,n?.status=="ready"||n?.status=="error"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.updateRepository(n),["prevent"])},[...t[73]||(t[73]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Enable",-1)])],8,Zw),[[B,n?.status=="removed"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.showStatusMessage(n),["prevent"])},[...t[74]||(t[74]=[s("i",{class:"fas fa-exclamation-triangle"},null,-1),y(" View status message",-1)])],8,xw),[[B,n?.statusMessage]]),t[78]||(t[78]=s("div",{class:"dropdown-divider"},null,-1)),s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.removeCache(n),["prevent"])},[...t[75]||(t[75]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])],8,ek),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:we(a=>e.removeRepository(n),["prevent"])},[...t[76]||(t[76]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,tk),[[B,n?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(l(),d("div",sk,[...t[80]||(t[80]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No repositories match the current filters.",-1)])])):f("v-if",!0)])])}var nk={class:"container paper-page admin-page"},ok={class:"admin-summary"},rk={class:"summary-total"},ik={class:"count"},ak={class:"count"},lk={class:"count"},dk={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},uk={class:"w-100 admin-filter-toolbar","aria-label":"Users","accept-charset":"UTF-8"},ck={class:"admin-filter-row"},pk={class:"search-wrap"},fk={type:"search",class:"form-control","aria-label":"Search users",placeholder:"Search username or email\u2026",autocomplete:"off"},mk={key:0,class:"admin-search-hint"},hk={class:"admin-filter-inline"},vk={class:"form-control form-control-sm"},yk={class:"admin-filter-inline","aria-label":"Pagination"},gk=["disabled"],bk={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},wk=["disabled"],kk={key:0,class:"admin-filter-row"},_k={class:"admin-active-chips"},Ek={class:"key"},Ck=["onClick"],Nk={key:1,class:"bulk-bar"},Sk={class:"paper-table w-100",role:"table","aria-label":"Users",style:{"--cols":"28px minmax(280px, 2.4fr) 100px 140px 140px 52px"}},Dk={class:"paper-table-head admin-users-row",role:"row"},Rk={role:"columnheader",style:{width:"28px"}},Tk=["checked"],Ok={role:"columnheader"},Ak={role:"columnheader"},Ik={role:"cell",style:{width:"28px"}},Vk={type:"checkbox","aria-label":"Select user"},Pk={class:"cell-anon",role:"cell"},qk=["src"],Mk={class:"anon-text"},$k=["textContent","href"],Uk={class:"anon-sub"},Lk={key:0},Fk={key:1},zk=["href"],Hk={key:2},Bk={class:"cell-views num",role:"cell"},Gk=["textContent","href"],jk={class:"cell-status",role:"cell"},Wk=["textContent"],Kk={class:"cell-status",role:"cell"},Yk={key:0,class:"type-badge type-repo"},Jk={key:1,class:"empty-dash"},Qk={class:"cell-actions",role:"cell"},Xk={class:"dropdown"},Zk={class:"dropdown-menu dropdown-menu-right"},xk=["href"],e0=["href"],t0=["onClick"],s0=["onClick"],n0={key:0,class:"paper-table-empty"},o0={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},r0={style:{"font-size":"12px",color:"var(--ink-muted)"}},i0={key:0,class:"pagination-compact"},a0=["disabled"],l0=["max"],d0=["disabled"],u0={class:"admin-filter-inline"},c0={class:"form-control form-control-sm"};function tl(e,t){let o=be("field"),r=be("form");return l(),d("div",nk,[t[43]||(t[43]=ge('
Admin \xA0/\xA0 Users

Users

',3)),s("div",ok,[s("span",rk,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),s("span",{class:O(["summary-pill ok",{active:e.query?.status=="active"}]),onClick:t[0]||(t[0]=n=>{e.query.status=e.query.status=="active"?"":"active",e.query.page=1})},[t[13]||(t[13]=y("Active ",-1)),s("span",ik,c(e.fmt?.number(e.statusCountFor("active"))),1)],2),s("span",{class:O(["summary-pill error",{active:e.query?.status=="banned"}]),onClick:t[1]||(t[1]=n=>{e.query.status=e.query.status=="banned"?"":"banned",e.query.page=1})},[t[14]||(t[14]=y("Banned ",-1)),s("span",ak,c(e.fmt?.number(e.statusCountFor("banned"))),1)],2),s("span",{class:O(["summary-pill",{active:e.query?.status=="removed"}]),onClick:t[2]||(t[2]=n=>{e.query.status=e.query.status=="removed"?"":"removed",e.query.page=1})},[t[15]||(t[15]=y("Removed ",-1)),s("span",lk,c(e.fmt?.number(e.statusCountFor("removed"))),1)],2)]),e.fetchError?(l(),d("div",dk,[t[16]||(t[16]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fetchError),1)])):f("v-if",!0),E((l(),d("form",uk,[s("div",ck,[s("div",pk,[E(s("input",fk,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(l(),d("span",mk,"/"))]),s("span",hk,[t[18]||(t[18]=s("label",null,"Role",-1)),E((l(),d("select",vk,[...t[17]||(t[17]=[s("option",{value:""},"Any",-1),s("option",{value:"admin"},"Admin",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.role=n},value:e.query?.role,form:null,options:{}}]])]),t[22]||(t[22]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",onClick:t[3]||(t[3]=n=>e.exportCsv())},[...t[19]||(t[19]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])]),s("span",yk,[s("button",{class:"btn btn-sm",type:"button",onClick:t[4]||(t[4]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[20]||(t[20]=[s("i",{class:"fas fa-chevron-left"},null,-1)])],8,gk),s("span",bk,c(e.query?.page)+"/"+c(e.totalPage||1),1),s("button",{class:"btn btn-sm",type:"button",onClick:t[5]||(t[5]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[21]||(t[21]=[s("i",{class:"fas fa-chevron-right"},null,-1)])],8,wk)])]),e.chips?.length?(l(),d("div",kk,[s("div",_k,[(l(!0),d(J,null,ne(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[s("span",Ek,c(n?.label),1),s("span",null,c(n?.value),1),s("button",{type:"button",onClick:a=>e.clearFilter(n.key)},[...t[23]||(t[23]=[s("i",{class:"fas fa-times"},null,-1)])],8,Ck)]))),128))])])):f("v-if",!0)])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",Nk,[s("span",null,[s("strong",null,c(e.selectedCount()),1),t[24]||(t[24]=y(" selected",-1))]),s("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[6]||(t[6]=n=>e.bulkBan())},[...t[25]||(t[25]=[s("i",{class:"fas fa-ban"},null,-1),y(" Ban",-1)])]),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>{e.selected={},e.allSelected=!1})},"Clear")])):f("v-if",!0),s("div",Sk,[s("div",Dk,[s("div",Rk,[s("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[8]||(t[8]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,Tk)]),s("div",Ok,[s("span",{class:O(["sortable",{active:e.query?.sort=="username"}]),onClick:t[9]||(t[9]=n=>e.sortBy("username"))},[t[26]||(t[26]=y("User ",-1)),s("i",{class:O(["fas",e.sortIcon("username")])},null,2)],2)]),t[28]||(t[28]=s("div",{role:"columnheader",class:"num"},"Repos",-1)),s("div",Ak,[s("span",{class:O(["sortable",{active:e.query?.sort=="status"}]),onClick:t[10]||(t[10]=n=>e.sortBy("status"))},[t[27]||(t[27]=y("Status ",-1)),s("i",{class:O(["fas",e.sortIcon("status")])},null,2)],2)]),t[29]||(t[29]=s("div",{role:"columnheader"},"Role",-1)),t[30]||(t[30]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(J,null,ne(e.filteredUsers,(n,i)=>(l(),d("div",{class:O(["paper-table-row admin-users-row",{"row-selected":e.selected[n?.username]}]),role:"row"},[s("div",Ik,[E(s("input",Vk,null,512),[[o,{state:e.viewState,set:a=>{e.selected[n.username]=a},value:e.selected[n?.username],form:null,options:{}}]])]),s("div",Pk,[n?.photo?(l(),d("img",{key:0,width:"28",height:"28",class:"rounded-circle",style:{"flex-shrink":"0"},src:e.safeUrl(n?.photo)},null,8,qk)):f("v-if",!0),s("div",Mk,[s("a",{class:"repo-name",textContent:c(n?.username),href:e.safeUrl("/admin/users/"+n?.username)},null,8,$k),s("div",Uk,[n?.emails[0].email?(l(),d("span",Lk,c(n?.emails[0].email),1)):f("v-if",!0),n?.emails[0].email?(l(),d("span",Fk,"\xA0\xB7\xA0")):f("v-if",!0),s("a",{target:"_blank",href:e.safeUrl("https://github.com/"+n?.username)},[t[31]||(t[31]=s("i",{class:"fab fa-github"},null,-1)),y(" "+c(n?.username),1)],8,zk),n?.dateOfEntry?(l(),d("span",Hk,"\xA0\xB7\xA0Joined "+c(e.fmt?.humanTime(n?.dateOfEntry)),1)):f("v-if",!0)])])]),s("div",Bk,[s("a",{title:"Show this user's repositories",textContent:c(e.fmt?.number(n?.repoCount||0)),href:e.safeUrl("/admin/?owner="+n?.username)},null,8,Gk)]),s("div",jk,[s("span",{class:O(["status-dot",{"status-ready":n?.status=="active","status-removed":n?.status=="removed"||n?.status=="banned"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,Wk)]),s("div",Kk,[n?.isAdmin?(l(),d("span",Yk,"Admin")):f("v-if",!0),n?.isAdmin?f("v-if",!0):(l(),d("span",Jk,"\u2014"))]),s("div",Qk,[s("div",Xk,[t[37]||(t[37]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",Zk,[s("a",{class:"dropdown-item",href:e.safeUrl("/admin/users/"+n?.username)},[...t[32]||(t[32]=[s("i",{class:"far fa-eye"},null,-1),y(" View details",-1)])],8,xk),s("a",{class:"dropdown-item",href:e.safeUrl("/admin/?owner="+n?.username)},[...t[33]||(t[33]=[s("i",{class:"fas fa-code-branch"},null,-1),y(" View repositories",-1)])],8,e0),t[36]||(t[36]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:we(a=>e.banUser(n),["prevent"])},[...t[34]||(t[34]=[s("i",{class:"fas fa-ban"},null,-1),y(" Ban",-1)])],8,t0),[[B,n?.status=="active"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.activateUser(n),["prevent"])},[...t[35]||(t[35]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Activate",-1)])],8,s0),[[B,n?.status=="removed"||n?.status=="banned"]])])])])],2))),256)),e.filteredUsers?.length==0?(l(),d("div",n0,[...t[38]||(t[38]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No users match the current filters.",-1)])])):f("v-if",!0)]),s("div",o0,[s("span",r0,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",i0,[s("button",{class:"btn btn-sm",onClick:t[11]||(t[11]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[39]||(t[39]=[s("i",{class:"fas fa-chevron-left"},null,-1),y(" Previous",-1)])],8,a0),E(s("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,l0),[[o,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),s("span",null,"of "+c(e.totalPage),1),s("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[40]||(t[40]=[y("Next ",-1),s("i",{class:"fas fa-chevron-right"},null,-1)])],8,d0)])):f("v-if",!0),s("span",u0,[t[42]||(t[42]=s("label",null,"Per page",-1)),E((l(),d("select",c0,[...t[41]||(t[41]=[s("option",{value:"10"},"10",-1),s("option",{value:"25"},"25",-1),s("option",{value:"50"},"50",-1),s("option",{value:"100"},"100",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var p0={class:"anonymize-page h-100"},f0={class:"anonymize-landing"},m0={class:"anonymize-landing-inner"},h0={class:"form-group mt-4 mb-2"},v0={class:"source-url-label-row"},y0={key:0,class:"repo-access","aria-label":"GitHub access"},g0={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},b0=["aria-pressed","disabled"],w0=["aria-pressed","disabled"],k0={key:1,class:"connection-badge"},_0={id:"sourceUrl-landing",type:"text",class:"form-control form-control-lg",placeholder:"https://github.com/owner/repository"},E0={key:0,class:"alert alert-info",role:"status"},C0={key:1},N0={key:1,class:"repo-access-details","aria-label":"GitHub access"},S0={class:"repo-access-main"},D0={class:"repo-access-controls"},R0={key:1,class:"connection-link",href:"/connections"},T0={class:"repo-access-note"},O0={key:0},A0={class:"anonymize-workspace"},I0={class:"anonymize-topbar"},V0={class:"anonymize-topbar-inner"},P0={class:"paper-crumbs"},q0={class:"here"},M0={class:"anonymize-topbar-head"},$0={class:"paper-page-title anonymize-topbar-title"},U0={key:0},L0={key:1},F0={class:"anonymize-split"},z0={class:"anonymize-form-col overflow-auto"},H0={class:"form needs-validation paper-settings-main",name:"anonymize",novalidate:""},B0={class:"paper-settings-section"},G0={class:"form-group"},j0={class:"source-url-label-row"},W0={key:0,class:"repo-access","aria-label":"GitHub access"},K0={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},Y0=["aria-pressed","disabled"],J0=["aria-pressed","disabled"],Q0={key:1,class:"connection-badge"},X0=["disabled"],Z0={class:"invalid-feedback"},x0={class:"invalid-feedback"},e_={class:"invalid-feedback"},t_={class:"invalid-feedback"},s_={key:0,class:"repo-access-details","aria-label":"GitHub access"},n_={class:"repo-access-main"},o_={class:"repo-access-controls"},r_={key:1,class:"connection-link",href:"/connections"},i_={class:"repo-access-note"},a_={key:0},l_={key:1,class:"repo-access-details"},d_={key:0,role:"status"},u_={key:2,class:"form-grid-2"},c_={class:"form-group"},p_={class:"input-group"},f_={class:"form-control",id:"branch",name:"branch"},m_=["textContent","value"],h_={class:"input-group-append"},v_={class:"form-group"},y_=["disabled"],g_={class:"invalid-feedback"},b_={class:"invalid-feedback"},w_={class:"form-check"},k_={class:"form-check-input",type:"checkbox",id:"update",name:"update"},__={class:"paper-settings-section"},E_={class:"form-group"},C_=["disabled"],N_={class:"form-text text-muted"},S_={class:"invalid-feedback"},D_={class:"form-group"},R_=["disabled"],T_={class:"form-text text-muted"},O_={class:"invalid-feedback"},A_={class:"form-group"},I_=["disabled"],V_={class:"form-text text-muted"},P_={class:"invalid-feedback"},q_={class:"form-group"},M_={class:"form-text text-muted"},$_=["href"],U_={class:"invalid-feedback"},L_={class:"form-text text-muted"},F_={class:"paper-settings-section"},z_={class:"form-group"},H_={class:"form-text text-muted"},B_={class:"warning-feedback"},G_={class:"invalid-feedback"},j_={class:"paper-settings-section"},W_={class:"form-check"},K_={class:"form-check-input",type:"checkbox",id:"link",name:"link"},Y_={class:"form-check"},J_={class:"form-check-input",type:"checkbox",id:"image",name:"image"},Q_={class:"form-check"},X_={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},Z_={class:"form-check"},x_={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},eE={class:"form-check"},tE=["disabled"],sE={class:"form-check"},nE={class:"form-check-input",type:"checkbox",id:"title-gist",name:"title-gist"},oE={class:"form-check"},rE={class:"form-check-input",type:"checkbox",id:"content-gist",name:"content-gist"},iE={class:"form-check"},aE={class:"form-check-input",type:"checkbox",id:"comments-gist",name:"comments-gist"},lE={class:"form-check"},dE={class:"form-check-input",type:"checkbox",id:"username-gist",name:"username-gist"},uE={class:"form-check"},cE={class:"form-check-input",type:"checkbox",id:"date-gist",name:"date-gist"},pE={class:"form-check"},fE={class:"form-check-input",type:"checkbox",id:"origin-gist",name:"origin-gist"},mE={class:"form-check"},hE={class:"form-check-input",type:"checkbox",id:"title",name:"title"},vE={class:"form-check"},yE={class:"form-check-input",type:"checkbox",id:"body",name:"body"},gE={class:"form-check"},bE={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},wE={class:"form-check"},kE={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},_E={class:"form-check"},EE={class:"form-check-input",type:"checkbox",id:"username",name:"username"},CE={class:"form-check"},NE={class:"form-check-input",type:"checkbox",id:"date",name:"date"},SE={class:"form-check"},DE={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},RE={class:"paper-settings-section"},TE={class:"form-grid-2"},OE={class:"form-group"},AE={class:"form-control",id:"expiration",name:"expiration"},IE={class:"form-group"},VE=["min","max"],PE={class:"invalid-feedback"},qE={class:"invalid-feedback"},ME={class:"paper-settings-section"},$E={class:"form-group"},UE={style:{position:"relative"}},LE={type:"text",id:"coauthorSearch",class:"form-control",placeholder:"Search GitHub username\u2026",autocomplete:"off"},FE={class:"dropdown-menu show",style:{display:"block","max-height":"220px","overflow-y":"auto",width:"100%"}},zE=["onClick"],HE=["src"],BE=["textContent"],GE=["textContent"],jE={class:"coauthor-list"},WE={class:"coauthor-row d-flex align-items-center",style:{padding:"6px 0",gap:"8px"}},KE=["src"],YE=["textContent","href"],JE=["onClick"],QE={class:"form-text text-muted"},XE=["textContent"],ZE={class:"anonymize-submit-bar"},xE={key:0,class:"anonymize-preview-col"},eC=["innerHTML"],tC={key:1,class:"anonymize-preview-col"},sC={class:"anonymize-preview-body"},nC={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},oC={class:"pr-title mb-1"},rC={key:0},iC=["textContent"],aC={key:0},lC={key:1},dC={key:2},uC={class:"pr-comments mt-3"},cC={class:"pr-comment"},pC={class:"pr-comment-head"},fC=["textContent"],mC={key:0,class:"pr-comment-date"},hC={key:3},vC={class:"pr-comments"},yC={class:"pr-comment"},gC={class:"pr-comment-head"},bC={key:0,class:"pr-comment-author"},wC=["textContent"],kC=["textContent"],_C={key:0,class:"pr-comment-body"},EC={key:2,class:"anonymize-preview-col"},CC={class:"anonymize-preview-body"},NC={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},SC={class:"pr-title mb-1"},DC={key:0},RC=["textContent"],TC={key:0},OC={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--paper-bg-alt)"}},AC={key:2,class:"paper-tabs",role:"tablist"},IC=["textContent"],VC={class:"paper-tab-content"},PC={key:0},qC=["innerHTML"],MC={key:1},$C={class:"pr-comments"},UC={class:"pr-comment"},LC={class:"pr-comment-head"},FC={key:0,class:"pr-comment-author"},zC=["textContent"],HC=["textContent"],BC={key:0,class:"pr-comment-body"};function sl(e,t){let o=et("gist-file"),r=et("markdown"),n=be("field"),i=be("form");return l(),d("div",p0,[f(" ===== STATE 1: No URL \u2014 centered input ===== "),E(s("div",f0,[s("div",m0,[t[23]||(t[23]=s("div",{class:"paper-crumbs"},[y("My work \xA0/\xA0 "),s("span",{class:"here"},"New anonymization")],-1)),t[24]||(t[24]=s("h1",{class:"paper-page-title"},[y("New "),s("em",null,"anonymization")],-1)),t[25]||(t[25]=s("p",{class:"paper-page-lede"}," Paste a GitHub repository, pull-request, or gist URL. We\u2019ll fetch it, strip every trace of identity, and hand you back a stable link. ",-1)),s("div",h0,[s("div",v0,[t[18]||(t[18]=s("label",{class:"paper-field-label",for:"sourceUrl-landing"},"Source URL",-1)),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",y0,[!e.isUpdate&&e.detectedType!=="gist"?(l(),d("div",g0,[s("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[0]||(t[0]=a=>e.chooseGitHubConnection("github-app"))},[...t[17]||(t[17]=[s("i",{class:"fas fa-shield-alt","aria-hidden":"true"},null,-1),y(),s("span",{class:"sr-only"},"Read-only ",-1),y("GitHub App",-1)])],8,b0),s("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[1]||(t[1]=a=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,w0)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(l(),d("span",k0,c(e.detectedType!=="gist"&&e.githubConnection==="github-app"?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),E(s("input",_0,null,512),[[n,{state:e.viewState,set:a=>{e.sourceUrl=a},value:e.sourceUrl,form:null,options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]])]),t[26]||(t[26]=s("small",{class:"form-text",style:{color:"var(--ink-muted)"}}," Repository, pull request (\u2026/pull/42) and gist (gist.github.com/\u2026) URLs are all accepted. ",-1)),e.detectedType==="gist"&&e.gistOAuthRequired?(l(),d("aside",E0,[t[19]||(t[19]=s("p",null,"Connect GitHub OAuth to access gists. Your account and existing anonymizations stay the same, and your draft will be restored when you return.",-1)),t[20]||(t[20]=s("p",null,"GitHub's legacy OAuth connection includes write access to private repositories.",-1)),e.githubConnections?.oauthEnabled?(l(),d("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[2]||(t[2]=a=>e.connectGistOAuth())},"Connect GitHub OAuth to access gists")):(l(),d("p",C0,"GitHub OAuth is currently unavailable. Please try again later."))])):f("v-if",!0),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",N0,[s("div",S0,[s("div",D0,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=a=>e.grantGitHubAccess())},[...t[21]||(t[21]=[y("Manage access ",-1),s("i",{class:"fas fa-external-link-alt","aria-hidden":"true"},null,-1)])])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(l(),d("a",R0,c(e.isUpdate?"Change connection":"Manage connections")+" \u2192",1)):f("v-if",!0)])]),s("div",T0,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("span",O0,"Select repositories on GitHub, then return here.")):f("v-if",!0),t[22]||(t[22]=s("span",null,[s("i",{class:"fas fa-info-circle","aria-hidden":"true"}),y(" Selected content will be published, including content from private repositories.")],-1))])])):f("v-if",!0)])],512),[[B,!e.sourceUrl]]),f(" ===== STATE 2: URL provided \u2014 form (left) + preview (right) ===== "),E(s("div",A0,[s("header",I0,[s("div",V0,[s("div",P0,[t[27]||(t[27]=s("a",{href:"/dashboard"},"My work",-1)),t[28]||(t[28]=y(" \xA0/\xA0 ",-1)),s("span",q0,c(e.isUpdate?"Edit anonymization":"New anonymization"),1)]),s("div",M0,[s("h1",$0,[e.isUpdate?f("v-if",!0):(l(),d("span",U0,[...t[29]||(t[29]=[y("New ",-1),s("em",null,"anonymization",-1)])])),e.isUpdate?(l(),d("span",L0,[...t[30]||(t[30]=[y("Edit ",-1),s("em",null,"anonymization",-1)])])):f("v-if",!0)]),E(s("span",{class:O(["type-badge",{"type-repo":e.detectedType==="repo","type-pr":e.detectedType==="pr","type-gist":e.detectedType==="gist"}])},c(e.detectedType==="repo"?"Repo":e.detectedType==="pr"?"PR":"Gist"),3),[[B,e.detectedType]])])])]),s("div",F0,[f(" Form column (left) "),s("div",z0,[E((l(),d("form",H0,[s("section",B0,[t[41]||(t[41]=s("div",{class:"paper-section-eyebrow"},"Source",-1)),s("div",G0,[s("div",j0,[t[32]||(t[32]=s("label",{class:"paper-field-label",for:"sourceUrl"},"GitHub URL",-1)),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",W0,[!e.isUpdate&&e.detectedType!=="gist"?(l(),d("div",K0,[s("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[4]||(t[4]=a=>e.chooseGitHubConnection("github-app"))},[...t[31]||(t[31]=[s("i",{class:"fas fa-shield-alt","aria-hidden":"true"},null,-1),y(),s("span",{class:"sr-only"},"Read-only ",-1),y("GitHub App",-1)])],8,Y0),s("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[5]||(t[5]=a=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,J0)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(l(),d("span",Q0,c(e.detectedType!=="gist"&&e.githubConnection==="github-app"?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.sourceUrl?.invalid}]),name:"sourceUrl",id:"sourceUrl",disabled:e.isUpdate&&e.detectedType!=="repo",placeholder:"Paste a GitHub repo or pull request URL"},null,10,X0),[[n,{state:e.viewState,set:a=>{e.sourceUrl=a},value:e.sourceUrl,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),E(s("div",Z0," Please provide a valid GitHub URL. ",512),[[B,e.anonymize?.sourceUrl?.errors?.github]]),E(s("div",x0," Not accessible. The organization may restrict access. ",512),[[B,e.anonymize?.sourceUrl?.errors?.access]]),E(s("div",e_," Does not exist or is not accessible. ",512),[[B,e.anonymize?.sourceUrl?.errors?.missing]]),E(s("div",t_," Already anonymized. ",512),[[B,e.anonymize?.sourceUrl?.errors?.used]])]),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",s_,[s("div",n_,[s("div",o_,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[6]||(t[6]=a=>e.grantGitHubAccess())},[...t[33]||(t[33]=[y("Manage access ",-1),s("i",{class:"fas fa-external-link-alt","aria-hidden":"true"},null,-1)])])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(l(),d("a",r_,c(e.isUpdate?"Change connection":"Manage connections")+" \u2192",1)):f("v-if",!0)])]),s("div",i_,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("span",a_,"Select repositories on GitHub, then return here.")):f("v-if",!0),t[34]||(t[34]=s("span",null,[s("i",{class:"fas fa-info-circle","aria-hidden":"true"}),y(" Selected content will be published, including content from private repositories.")],-1))])])):f("v-if",!0),e.isUpdate&&e.detectedType==="repo"&&e.role==="owner"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(l(),d("aside",l_,[t[35]||(t[35]=s("p",null,"If you deleted and recreated this repository, reconnect it before choosing a branch.",-1)),s("button",{type:"button",class:"btn btn-outline-ink",onClick:t[7]||(t[7]=a=>e.reconnectSource())},"Reconnect source repository"),e.reconnectRepositoryId?(l(),d("p",d_,"Source reloaded. Review the branch, commit, and anonymization preview, then save to replace the published snapshot.")):f("v-if",!0)])):f("v-if",!0),e.detectedType==="repo"?(l(),d("div",u_,[s("div",c_,[t[37]||(t[37]=s("label",{class:"paper-field-label",for:"branch"},"Branch",-1)),s("div",p_,[E((l(),d("select",f_,[(l(!0),d(J,null,ne(e.branches,(a,u)=>(l(),d("option",{textContent:c(a?.name),value:a?.name},null,8,m_))),256))])),[[n,{state:e.viewState,set:a=>{e.source.branch=a},value:e.source?.branch,form:"anonymize",options:{}}]]),s("div",h_,[s("button",{class:"btn",type:"button",title:"Refresh","data-toggle":"tooltip","data-placement":"bottom",onClick:t[8]||(t[8]=a=>e.getBranches(!0))},[...t[36]||(t[36]=[s("i",{class:"fas fa-sync","aria-hidden":"true"},null,-1)])])])])]),s("div",v_,[t[38]||(t[38]=s("label",{class:"paper-field-label",for:"commit"},"Commit",-1)),E(s("input",{class:O(["form-control",{"is-invalid":e.anonymize?.commit?.invalid}]),id:"commit",disabled:e.options.update,name:"commit",pattern:"[a-fA-Z0-9]{6,}",required:""},null,10,y_),[[n,{state:e.viewState,set:a=>{e.source.commit=a},value:e.source?.commit,form:"anonymize",options:{}}]]),E(s("div",g_," The commit SHA is not valid. ",512),[[B,e.anonymize?.commit?.errors?.pattern||e.anonymize?.commit?.errors?.required]]),E(s("div",b_," This commit no longer exists in the repository. Click refresh to get the latest. ",512),[[B,e.anonymize?.commit?.errors?.exists]])])])):f("v-if",!0),E(s("div",w_,[E(s("input",k_,null,512),[[n,{state:e.viewState,set:a=>{e.options.update=a},value:e.options?.update,form:"anonymize",options:{}}]]),t[39]||(t[39]=s("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[40]||(t[40]=s("small",{class:"form-text text-muted"},"Follow the branch and pull the latest commit automatically, at most once an hour.",-1))],512),[[B,e.detectedType]])]),E(s("section",__,[t[52]||(t[52]=s("div",{class:"paper-section-eyebrow"},"Identity",-1)),E(s("div",E_,[t[44]||(t[44]=s("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.repoId?.invalid}]),name:"repoId",id:"repoId",disabled:e.isUpdate},null,10,C_),[[n,{state:e.viewState,set:a=>{e.repoId=a},value:e.repoId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",N_,[t[42]||(t[42]=y("Your share link will be ",-1)),s("code",null,"anonymous.4open.science/r/"+c(e.repoId),1),t[43]||(t[43]=y(".",-1))]),E(s("div",S_,"ID can only contain letters and numbers.",512),[[B,e.anonymize?.repoId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.repoId)+" is already used.",513),[[B,e.anonymize?.repoId?.errors?.used]])],512),[[B,e.detectedType==="repo"]]),E(s("div",D_,[t[47]||(t[47]=s("label",{class:"paper-field-label",for:"pullRequestId"},"Anonymized pull request ID",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId",disabled:e.isUpdate},null,10,R_),[[n,{state:e.viewState,set:a=>{e.pullRequestId=a},value:e.pullRequestId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",T_,[t[45]||(t[45]=y("Your share link will be ",-1)),s("code",null,"anonymous.4open.science/pr/"+c(e.pullRequestId),1),t[46]||(t[46]=y(".",-1))]),E(s("div",O_,"ID can only contain letters and numbers.",512),[[B,e.anonymize?.pullRequestId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used.",513),[[B,e.anonymize?.pullRequestId?.errors?.used]])],512),[[B,e.detectedType==="pr"]]),E(s("div",A_,[t[50]||(t[50]=s("label",{class:"paper-field-label",for:"gistId"},"Anonymized gist ID",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.gistId?.invalid}]),name:"gistId",id:"gistId",disabled:e.isUpdate},null,10,I_),[[n,{state:e.viewState,set:a=>{e.gistId=a},value:e.gistId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",V_,[t[48]||(t[48]=y("Your share link will be ",-1)),s("code",null,"anonymous.4open.science/gist/"+c(e.gistId),1),t[49]||(t[49]=y(".",-1))]),E(s("div",P_,"ID can only contain letters and numbers.",512),[[B,e.anonymize?.gistId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.gistId)+" is already used.",513),[[B,e.anonymize?.gistId?.errors?.used]])],512),[[B,e.detectedType==="gist"]]),s("div",q_,[t[51]||(t[51]=s("label",{class:"paper-field-label",for:"conference"},[y("Conference "),s("span",{class:"paper-optional"},"(optional)")],-1)),E(s("input",{class:O(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[n,{state:e.viewState,set:a=>{e.conference=a},value:e.conference,form:"anonymize",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),E(s("small",M_,[s("a",{target:"_blank",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,$_),y(" expires "+c(e.fmt?.date(e.conference_data?.endDate))+". ",1)],512),[[B,e.conference_data]]),E(s("div",U_,"The conference is not activated.",512),[[B,e.anonymize?.conference?.errors?.activated]]),E(s("small",L_,"Link to a conference to apply its shared defaults.",512),[[B,!e.conference_data]])])],512),[[B,e.detectedType]]),E(s("section",F_,[t[60]||(t[60]=s("div",{class:"paper-section-eyebrow"},"Anonymization",-1)),s("div",z_,[t[59]||(t[59]=s("label",{class:"paper-field-label",for:"terms"},"Terms to redact",-1)),E(s("textarea",{class:O(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"4"},null,2),[[n,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"anonymize",options:{debounce:250}}]]),s("small",H_,[t[53]||(t[53]=y("One term per line (regex allowed). Replaced by ",-1)),s("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[54]||(t[54]=y(", or use ",-1)),t[55]||(t[55]=s("code",null,"term=>replacement",-1)),t[56]||(t[56]=y(" to pick your own (e.g. ",-1)),t[57]||(t[57]=s("code",null,"Anonymous=>ABC",-1)),t[58]||(t[58]=y(").",-1))]),E(s("div",B_,"Regex characters detected. Escape them if unintentional.",512),[[B,e.termsRegexWarning]]),E(s("div",G_,"Terms are in an invalid format.",512),[[B,e.anonymize?.terms?.errors?.format]])])],512),[[B,e.detectedType]]),E(s("section",j_,[t[79]||(t[79]=s("div",{class:"paper-section-eyebrow"},"Display",-1)),E(s("div",null,[s("div",W_,[E(s("input",K_,null,512),[[n,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"anonymize",options:{}}]]),t[61]||(t[61]=s("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),s("div",Y_,[E(s("input",J_,null,512),[[n,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"anonymize",options:{}}]]),t[62]||(t[62]=s("label",{class:"form-check-label",for:"image"},"Display images",-1))]),s("div",Q_,[E(s("input",X_,null,512),[[n,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[63]||(t[63]=s("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),s("div",Z_,[E(s("input",x_,null,512),[[n,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[64]||(t[64]=s("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))]),s("div",eE,[E(s("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,tE),[[n,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"anonymize",options:{}}]]),t[65]||(t[65]=s("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),E(s("small",{class:"form-text text-muted d-block"},c(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),513),[[B,!e.details?.hasPage]]),E(s("small",{class:"form-text text-muted d-block"},c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),513),[[B,e.details?.hasPage&&e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch]])])],512),[[B,e.detectedType==="repo"]]),E(s("div",null,[s("div",sE,[E(s("input",nE,null,512),[[n,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[66]||(t[66]=s("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),s("div",oE,[E(s("input",rE,null,512),[[n,{state:e.viewState,set:a=>{e.options.content=a},value:e.options?.content,form:"anonymize",options:{}}]]),t[67]||(t[67]=s("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),s("div",iE,[E(s("input",aE,null,512),[[n,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[68]||(t[68]=s("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),s("div",lE,[E(s("input",dE,null,512),[[n,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[69]||(t[69]=s("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),s("div",uE,[E(s("input",cE,null,512),[[n,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[70]||(t[70]=s("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),s("div",pE,[E(s("input",fE,null,512),[[n,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[71]||(t[71]=s("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[B,e.detectedType==="gist"]]),E(s("div",null,[s("div",mE,[E(s("input",hE,null,512),[[n,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[72]||(t[72]=s("label",{class:"form-check-label",for:"title"},"PR title",-1))]),s("div",vE,[E(s("input",yE,null,512),[[n,{state:e.viewState,set:a=>{e.options.body=a},value:e.options?.body,form:"anonymize",options:{}}]]),t[73]||(t[73]=s("label",{class:"form-check-label",for:"body"},"PR body",-1))]),s("div",gE,[E(s("input",bE,null,512),[[n,{state:e.viewState,set:a=>{e.options.diff=a},value:e.options?.diff,form:"anonymize",options:{}}]]),t[74]||(t[74]=s("label",{class:"form-check-label",for:"diff"},"Diff",-1))]),s("div",wE,[E(s("input",kE,null,512),[[n,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[75]||(t[75]=s("label",{class:"form-check-label",for:"comments"},"Comments",-1))]),s("div",_E,[E(s("input",EE,null,512),[[n,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[76]||(t[76]=s("label",{class:"form-check-label",for:"username"},"Usernames",-1))]),s("div",CE,[E(s("input",NE,null,512),[[n,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[77]||(t[77]=s("label",{class:"form-check-label",for:"date"},"Dates",-1))]),s("div",SE,[E(s("input",DE,null,512),[[n,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[78]||(t[78]=s("label",{class:"form-check-label",for:"origin"},"Project name",-1))])],512),[[B,e.detectedType==="pr"]])],512),[[B,e.detectedType]]),E(s("section",RE,[t[83]||(t[83]=s("div",{class:"paper-section-eyebrow"},"Expiration",-1)),s("div",TE,[s("div",OE,[t[81]||(t[81]=s("label",{class:"paper-field-label",for:"expiration"},"Strategy",-1)),E((l(),d("select",AE,[...t[80]||(t[80]=[s("option",{value:"redirect"},"Redirect to GitHub when expired",-1),s("option",{value:"remove",selected:""},"Remove when expired",-1)])])),[[n,{state:e.viewState,set:a=>{e.options.expirationMode=a},value:e.options?.expirationMode,form:"anonymize",options:{}}]])]),s("div",IE,[t[82]||(t[82]=s("label",{class:"paper-field-label",for:"expirationDate"},"Expiration date",-1)),E(s("input",{class:O(["form-control",{"is-invalid":e.anonymize?.expirationDate?.invalid}]),type:"date",name:"expirationDate",id:"expirationDate",required:"",min:e.minExpirationDate,max:e.maxExpirationDate},null,10,VE),[[n,{state:e.viewState,set:a=>{e.options.expirationDate=a},value:e.options?.expirationDate,form:"anonymize",options:{}}]]),E(s("div",PE,"Pick a date in the future.",512),[[B,e.anonymize?.expirationDate?.errors?.min]]),E(s("div",{class:"invalid-feedback"},"Pick a date on or before "+c(e.fmt?.date(e.maxExpirationDate))+".",513),[[B,e.anonymize?.expirationDate?.errors?.max]]),E(s("div",qE,"Enter a valid expiration date.",512),[[B,e.anonymize?.expirationDate?.errors?.required||e.anonymize?.expirationDate?.errors?.date]])])]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the content will be removed.",513),[[B,e.options?.expirationMode=="remove"&&e.options?.expirationDate]]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", visitors will be redirected to GitHub.",513),[[B,e.options?.expirationMode=="redirect"&&e.options?.expirationDate]])],512),[[B,e.detectedType]]),E(s("section",ME,[t[87]||(t[87]=s("div",{class:"paper-section-eyebrow"},"Co-authors",-1)),t[88]||(t[88]=s("p",{class:"form-text text-muted",style:{"margin-bottom":"8px"}}," Co-authors can view and edit these settings. They cannot delete the anonymization or manage co-authors. ",-1)),E(s("div",$E,[t[84]||(t[84]=s("label",{class:"paper-field-label",for:"coauthorSearch"},"Add a GitHub user",-1)),s("div",UE,[E(s("input",LE,null,512),[[n,{state:e.viewState,set:a=>{e.coauthorSearch=a},value:e.coauthorSearch,form:"anonymize",options:{debounce:300},change:()=>{e.searchCoauthors()}}]]),E(s("div",FE,[(l(!0),d(J,null,ne(e.coauthorResults,(a,u)=>(l(),d("a",{href:"#",class:"dropdown-item d-flex align-items-center",onClick:we(m=>e.addCoauthor(a,m),["prevent"])},[s("img",{alt:"",style:{width:"22px",height:"22px","border-radius":"50%","margin-right":"8px"},src:e.safeUrl(a?.photo)},null,8,HE),s("span",{textContent:c(a?.username)},null,8,BE)],8,zE))),256))],512),[[B,e.coauthorResults?.length>0]])]),E(s("small",{class:"form-text text-muted",textContent:c(e.coauthorError)},null,8,GE),[[B,e.coauthorError]])],512),[[B,e.role==="owner"||e.role==="admin"]]),s("div",jE,[(l(!0),d(J,null,ne(e.coauthors,(a,u)=>(l(),d("div",WE,[a?.photo?(l(),d("img",{key:0,alt:"",style:{width:"24px",height:"24px","border-radius":"50%"},src:e.safeUrl(a?.photo)},null,8,KE)):f("v-if",!0),s("a",{target:"_blank",textContent:c(a?.username),href:e.safeUrl("https://github.com/"+a?.username)},null,8,YE),t[86]||(t[86]=s("span",{class:"type-badge type-coauthor"},"Co-author",-1)),E(s("button",{type:"button",class:"btn btn-sm",style:{"margin-left":"auto"},title:"Remove co-author",onClick:m=>e.removeCoauthor(a)},[...t[85]||(t[85]=[s("i",{class:"fas fa-times"},null,-1)])],8,JE),[[B,e.role==="owner"||e.role==="admin"]])]))),256)),E(s("div",QE," No co-authors yet. ",512),[[B,!e.coauthors||e.coauthors?.length===0]])])],512),[[B,e.isUpdate&&e.detectedType==="repo"]]),e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,XE)):f("v-if",!0),E(s("div",ZE,[e.detectedType==="repo"&&!e.isUpdate?(l(),d("button",{key:0,type:"submit",class:"btn btn-ink",onClick:t[9]||(t[9]=we(a=>e.submitForm(a,()=>{e.anonymizeRepo(a)}),["prevent"]))},[...t[89]||(t[89]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize Repository ",-1)])])):f("v-if",!0),e.detectedType==="repo"&&e.isUpdate?(l(),d("button",{key:1,type:"submit",class:"btn btn-ink",onClick:t[10]||(t[10]=we(a=>e.submitForm(a,()=>{e.anonymizeRepo(a)}),["prevent"]))},[...t[90]||(t[90]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update Repository ",-1)])])):f("v-if",!0),e.detectedType==="pr"&&!e.isUpdate?(l(),d("button",{key:2,type:"submit",class:"btn btn-ink",onClick:t[11]||(t[11]=we(a=>e.submitForm(a,()=>{e.anonymizePullRequest(a)}),["prevent"]))},[...t[91]||(t[91]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize Pull Request ",-1)])])):f("v-if",!0),e.detectedType==="pr"&&e.isUpdate?(l(),d("button",{key:3,type:"submit",class:"btn btn-ink",onClick:t[12]||(t[12]=we(a=>e.submitForm(a,()=>{e.anonymizePullRequest(a)}),["prevent"]))},[...t[92]||(t[92]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update Pull Request ",-1)])])):f("v-if",!0),e.detectedType==="gist"&&!e.isUpdate?(l(),d("button",{key:4,type:"submit",class:"btn btn-ink",onClick:t[13]||(t[13]=we(a=>e.submitForm(a,()=>{e.anonymizeGist(a)}),["prevent"]))},[...t[93]||(t[93]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize Gist ",-1)])])):f("v-if",!0),e.detectedType==="gist"&&e.isUpdate?(l(),d("button",{key:5,type:"submit",class:"btn btn-ink",onClick:t[14]||(t[14]=we(a=>e.submitForm(a,()=>{e.anonymizeGist(a)}),["prevent"]))},[...t[94]||(t[94]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update Gist ",-1)])])):f("v-if",!0)],512),[[B,e.detectedType]])])),[[i,e.viewState]])]),f(" Preview column (right) "),e.detectedType==="repo"&&e.html_readme?(l(),d("div",xE,[t[95]||(t[95]=s("div",{class:"anonymize-preview-head"},[s("span",{class:"paper-eyebrow"},"Live preview"),s("span",{class:"anonymize-preview-sub"},"README with redactions applied")],-1)),s("div",{class:"anonymize-preview-body markdown-body body",innerHTML:e.sanitize(e.html_readme)},null,8,eC)])):f("v-if",!0),e.detectedType==="gist"&&e.details?(l(),d("div",tC,[t[99]||(t[99]=s("div",{class:"anonymize-preview-head"},[s("span",{class:"paper-eyebrow"},"Live preview"),s("span",{class:"anonymize-preview-sub"},"Gist with redactions applied")],-1)),s("div",sC,[s("div",nC,[s("h2",oC,[e.options?.title?(l(),d("span",rC,c(e.anonymizeGistContent(e.details?.gist?.description)||"Untitled gist"),1)):f("v-if",!0),s("span",{class:O(["badge",{"badge-success":e.details?.gist?.isPublic,"badge-secondary":!e.details?.gist?.isPublic}])},c(e.details?.gist?.isPublic?"public":"secret"),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.gist?.updatedDate))},null,8,iC)):f("v-if",!0)]),e.options?.origin?(l(),d("small",aC,"Gist ID: "+c(e.details?.source?.gistId),1)):f("v-if",!0),e.options?.username&&e.details?.gist?.ownerLogin?(l(),d("small",lC,"By @"+c(e.anonymizeGistContent(e.details?.gist?.ownerLogin)),1)):f("v-if",!0),e.options?.content&&e.previewGistFiles?.length?(l(),d("div",dC,[s("ul",uC,[(l(!0),d(J,null,ne(e.previewGistFiles,(a,u)=>(l(),d("li",cC,[s("div",pC,[s("strong",{textContent:c(a?.filename)},null,8,fC),a?.language?(l(),d("span",mC,c(a?.language),1)):f("v-if",!0)]),De(o,{file:a,terms:e.terms,options:e.options},null,8,["file","terms","options"])]))),256))])])):f("v-if",!0),e.options?.comments&&e.details?.gist?.comments&&e.details?.gist?.comments?.length?(l(),d("div",hC,[t[98]||(t[98]=s("h3",{class:"paper-section-eyebrow mt-3"},"Comments",-1)),s("ul",vC,[(l(!0),d(J,null,ne(e.details?.gist?.comments,(a,u)=>(l(),d("li",yC,[s("div",gC,[e.options?.username?(l(),d("span",bC,[t[96]||(t[96]=s("i",{class:"far fa-user"},null,-1)),t[97]||(t[97]=y(" @",-1)),s("span",{textContent:c(e.anonymizeGistContent(a?.author))},null,8,wC)])):f("v-if",!0),e.options?.date?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(a?.updatedDate))},null,8,kC)):f("v-if",!0)]),e.options?.body?(l(),d("div",_C,[De(r,{content:e.anonymizeGistContent(a?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0)]))),256))])])):f("v-if",!0)])])):f("v-if",!0),e.detectedType==="pr"&&e.details?(l(),d("div",EC,[t[104]||(t[104]=s("div",{class:"anonymize-preview-head"},[s("span",{class:"paper-eyebrow"},"Live preview"),s("span",{class:"anonymize-preview-sub"},"Pull request with redactions applied")],-1)),s("div",CC,[s("div",NC,[s("h2",SC,[e.options?.title?(l(),d("span",DC,c(e.anonymizePrContent(e.details?.pullRequest?.title)),1)):f("v-if",!0),s("span",{class:O(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,RC)):f("v-if",!0)]),e.options?.origin?(l(),d("small",TC,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):f("v-if",!0),e.options?.body?(l(),d("div",OC,[De(r,{content:e.anonymizePrContent(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0),e.options?.diff||e.options?.comments?(l(),d("nav",AC,[e.options?.diff?(l(),d("button",{key:0,class:O(["paper-tab",{active:e.prTabState?.active=="diff"}]),type:"button",role:"tab",onClick:t[15]||(t[15]=a=>e.prTabState.active="diff")},[...t[100]||(t[100]=[s("i",{class:"fas fa-code"},null,-1),y(" Diff ",-1)])],2)):f("v-if",!0),e.options?.comments?(l(),d("button",{key:1,class:O(["paper-tab",{active:e.prTabState?.active=="comments"}]),type:"button",role:"tab",onClick:t[16]||(t[16]=a=>e.prTabState.active="comments")},[t[101]||(t[101]=s("i",{class:"far fa-comment-dots"},null,-1)),s("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,IC)],2)):f("v-if",!0)])):f("v-if",!0),s("div",VC,[e.options?.diff&&e.prTabState?.active=="diff"?(l(),d("div",PC,[s("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.anonymizePrContent(e.details?.pullRequest?.diff)))},null,8,qC)])):f("v-if",!0),e.options?.comments&&e.prTabState?.active=="comments"?(l(),d("div",MC,[s("ul",$C,[(l(!0),d(J,null,ne(e.details?.pullRequest?.comments,(a,u)=>(l(),d("li",UC,[s("div",LC,[e.options?.username?(l(),d("span",FC,[t[102]||(t[102]=s("i",{class:"far fa-user"},null,-1)),t[103]||(t[103]=y(" @",-1)),s("span",{textContent:c(e.anonymizePrContent(a?.author))},null,8,zC)])):f("v-if",!0),e.options?.date?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(a?.updatedDate))},null,8,HC)):f("v-if",!0)]),e.options?.body?(l(),d("div",BC,[De(r,{content:e.anonymizePrContent(a?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0)]))),256))])])):f("v-if",!0)])])])):f("v-if",!0)])],512),[[B,e.sourceUrl]])])}var GC={class:"container-fluid h-100 anonymize-page"},jC={class:"row h-100 flex-column flex-md-row"},WC={class:"col-md sidePanel shadow overflow-auto anonymize-form-col"},KC={class:"form-group"},YC={class:"form-group"},JC={class:"form-check"},QC={class:"form-check-input",type:"checkbox",id:"update",name:"update"},XC={class:"form-group"},ZC={class:"form-text text-muted"},xC=["href"],eN={class:"invalid-feedback"},tN={class:"form-text text-muted"},sN={class:"form-group"},nN={id:"idHelp",class:"form-text text-muted"},oN={class:"invalid-feedback"},rN={class:"form-group"},iN={class:"invalid-feedback"},aN={class:"form-group"},lN={class:"form-control",id:"expiration",name:"expiration"},dN={class:"form-group",id:"expiration-date-form"},uN={class:"form-control",type:"date",name:"expirationDate",id:"expirationDate"},cN={class:"accordion mb-3",id:"options"},pN={class:"card"},fN={id:"collapseOne",class:"collapse show","aria-labelledby":"headingOne","data-parent":"#options"},mN={class:"card-body"},hN={class:"form-group mb-0"},vN={class:"form-check"},yN={class:"form-check-input",type:"checkbox",id:"link",name:"link"},gN={class:"form-check"},bN={class:"form-check-input",type:"checkbox",id:"image",name:"image"},wN={class:"form-check"},kN={class:"form-check-input",type:"checkbox",id:"date",name:"date"},_N={class:"form-check"},EN={class:"form-check-input",type:"checkbox",id:"username",name:"username"},CN={class:"form-check"},NN={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},SN={class:"form-check"},DN={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},RN={class:"form-check"},TN={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},ON={class:"form-check"},AN={class:"form-check-input",type:"checkbox",id:"title",name:"title"},IN={class:"form-check"},VN={class:"form-check-input",type:"checkbox",id:"body",name:"body"},PN=["textContent"],qN={class:"anonymize-submit-bar"},MN={key:0,class:"col-md-8 p-2 overflow-auto anonymize-preview-col"},$N={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},UN={class:"pr-title mb-1"},LN={key:0},FN=["textContent"],zN={key:0},HN={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},BN={class:"nav nav-tabs",id:"myTab",role:"tablist"},GN={key:0,class:"nav-item",role:"presentation"},jN={key:1,class:"nav-item",role:"presentation"},WN=["textContent"],KN={class:"tab-content",id:"pills-tabContent"},YN={class:"tab-pane show active",id:"pills-diff",role:"tabpanel","aria-labelledby":"pills-diff-tab"},JN={key:0,class:"pr-diff shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},QN={style:{"overflow-x":"auto"}},XN=["innerHTML"],ZN={key:0,class:"pr-comments list-group"},xN={class:"pr-comment list-group-item"},eS={class:"d-flex w-100 justify-content-between flex-wrap"},tS={key:0,class:"mb-1"},sS=["textContent"],nS={class:"mb-1"};function nl(e,t){let o=et("markdown"),r=be("field"),n=be("form");return l(),d("div",GC,[s("div",jC,[s("div",WC,[s("div",{class:O(["p-0 py-2 m-auto",{card:!e.pullRequestUrl,container:e.pullRequestUrl}])},[E((l(),d("form",{class:O(["form needs-validation",{"card-body":!e.pullRequestUrl}]),name:"anonymizeForm",novalidate:""},[t[30]||(t[30]=ge('
Anonymize \xA0/\xA0 Pull request

Anonymize a pull request

Fill in the details \u2014 it only takes a minute.

Source
',4)),f(" pullRequestUrl "),s("div",KC,[t[2]||(t[2]=s("label",{for:"pullRequestUrl"},"URL of your pull request",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.pullRequestUrl?.invalid}]),name:"pullRequestUrl",id:"pullRequestUrl",placeholder:"https://github.com/owner/repo/pull/123"},null,2),[[r,{state:e.viewState,set:i=>{e.pullRequestUrl=i},value:e.pullRequestUrl,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.pullRequestSelected()}}]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is not accessible. Some organizations are restricting the access to the repositories. ",513),[[B,e.anonymize?.pullRequestUrl?.errors?.access]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" does not exist or is not accessible ",513),[[B,e.anonymize?.pullRequestUrl?.errors?.missing]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is already anonymized ",513),[[B,e.anonymize?.pullRequestUrl?.errors?.used]])]),E(s("div",null,[s("div",YC,[s("div",JC,[E(s("input",QC,null,512),[[r,{state:e.viewState,set:i=>{e.options.update=i},value:e.options?.update,form:"anonymizeForm",options:{}}]]),t[3]||(t[3]=s("label",{class:"form-check-label",for:"update"},"Auto update",-1)),t[4]||(t[4]=s("small",{id:"updateHelp",class:"form-text text-muted"},"Automatically update the anonymized pull request with the latest updates. The pull request is updated once per day maximum.",-1))])]),t[26]||(t[26]=s("div",{class:"paper-section-eyebrow anonymize-section-title"},[s("i",{class:"fas fa-chalkboard-teacher"}),y(" Conference ID ")],-1)),f(" Conference "),s("div",XC,[t[5]||(t[5]=s("label",{for:"conference"},[y("Conference ID "),s("span",{class:"text-muted"},"(Optional)")],-1)),E(s("input",{class:O(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[r,{state:e.viewState,set:i=>{e.conference=i},value:e.conference,form:"anonymizeForm",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),E(s("small",ZC,[s("a",{target:"_target",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,xC),y(" will expire on "+c(e.fmt?.date(e.conference_data?.endDate))+".",1)],512),[[B,e.conference_data]]),E(s("div",eN," The conference is not activated. ",512),[[B,e.anonymize?.conference?.errors?.activated]]),E(s("small",tN," Use the Conference ID that your conference provided you. This will update automatically the anonymization options based on the conference preferences. ",512),[[B,!e.conference_data]])]),t[27]||(t[27]=s("div",{class:"paper-section-eyebrow anonymize-section-title"},[s("i",{class:"fas fa-shield-alt"}),y(" Anonymization Options ")],-1)),f(" Pull Request ID "),s("div",sN,[t[6]||(t[6]=s("label",{for:"pullRequestId"},"Anonymized pull request id",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId"},null,2),[[r,{state:e.viewState,set:i=>{e.pullRequestId=i},value:e.pullRequestId,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",nN,"Id used in the url: https://anonymous.4open.science/r/"+c(e.pullRequestId),1),E(s("div",oN," Repository id can only contain letters and numbers ",512),[[B,e.anonymize?.pullRequestId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used ",513),[[B,e.anonymize?.pullRequestId?.errors?.used]])]),f(" Terms "),s("div",rN,[t[7]||(t[7]=s("label",{for:"terms"},"Terms to anonymize",-1)),E(s("textarea",{class:O(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"3"},null,2),[[r,{state:e.viewState,set:i=>{e.terms=i},value:e.terms,form:"anonymizeForm",options:{debounce:250}}]]),t[8]||(t[8]=s("small",{id:"termsHelp",class:"form-text text-muted"},"One term per line. Each term will be replaced by XXX.",-1)),E(s("div",iN," Terms are in an invalid format ",512),[[B,e.anonymize?.terms?.errors?.format]])]),s("div",aN,[t[10]||(t[10]=s("label",{for:"expiration"},"Expiration strategy",-1)),E((l(),d("select",lN,[...t[9]||(t[9]=[s("option",{value:"never",selected:""},"Never expire",-1),s("option",{value:"redirect"}," Redirect to GitHub when expired ",-1),s("option",{value:"remove"},"Remove when expired",-1)])])),[[r,{state:e.viewState,set:i=>{e.options.expirationMode=i},value:e.options?.expirationMode,form:"anonymizeForm",options:{}}]]),t[11]||(t[11]=s("small",{class:"form-text text-muted"},"Define the expiration strategy for the anonymized repository.",-1))]),E(s("div",dN,[t[12]||(t[12]=s("label",{for:"expirationDate"},"Expiration date of the anonymized repository",-1)),E(s("input",uN,null,512),[[r,{state:e.viewState,set:i=>{e.options.expirationDate=i},value:e.options?.expirationDate,form:"anonymizeForm",options:{}}]]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the repository will be removed and the visitor will not be able to see the content of the repository.",513),[[B,e.options?.expirationMode=="remove"]]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the visitors of the anonymized repository will be redirected to "+c(e.pullRequestUrl)+".",513),[[B,e.options?.expirationMode=="redirect"]])],512),[[B,e.options?.expirationMode!="never"]]),s("div",cN,[s("div",pN,[t[25]||(t[25]=s("div",{class:"card-header",id:"headingOne"},[s("h2",{class:"mb-0"},[s("button",{class:"btn btn-block text-left",type:"button","data-toggle":"collapse","data-target":"#collapseOne","aria-expanded":"true","aria-controls":"collapseOne"},[s("i",{class:"fas fa-cog mr-1"}),y(" Advanced options ")])])],-1)),s("div",fN,[s("div",mN,[s("div",hN,[s("div",vN,[E(s("input",yN,null,512),[[r,{state:e.viewState,set:i=>{e.options.link=i},value:e.options?.link,form:"anonymizeForm",options:{}}]]),t[13]||(t[13]=s("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[14]||(t[14]=s("small",{class:"form-text text-muted"},"Keep or remove all the links.",-1))]),s("div",gN,[E(s("input",bN,null,512),[[r,{state:e.viewState,set:i=>{e.options.image=i},value:e.options?.image,form:"anonymizeForm",options:{}}]]),t[15]||(t[15]=s("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[16]||(t[16]=s("small",{class:"form-text text-muted"},"Images are not anonymized",-1))]),s("div",wN,[E(s("input",kN,null,512),[[r,{state:e.viewState,set:i=>{e.options.date=i},value:e.options?.date,form:"anonymizeForm",options:{}}]]),t[17]||(t[17]=s("label",{class:"form-check-label",for:"date"},"Display dates",-1)),t[18]||(t[18]=s("small",{class:"form-text text-muted"},"Display the date of the Pull Request and the date of the comments.",-1))]),s("div",_N,[E(s("input",EN,null,512),[[r,{state:e.viewState,set:i=>{e.options.username=i},value:e.options?.username,form:"anonymizeForm",options:{}}]]),t[19]||(t[19]=s("label",{class:"form-check-label",for:"username"},"Display username",-1))]),s("div",CN,[E(s("input",NN,null,512),[[r,{state:e.viewState,set:i=>{e.options.comments=i},value:e.options?.comments,form:"anonymizeForm",options:{}}]]),t[20]||(t[20]=s("label",{class:"form-check-label",for:"comments"},"Display comments",-1))]),s("div",SN,[E(s("input",DN,null,512),[[r,{state:e.viewState,set:i=>{e.options.diff=i},value:e.options?.diff,form:"anonymizeForm",options:{}}]]),t[21]||(t[21]=s("label",{class:"form-check-label",for:"diff"},"Display diff",-1))]),s("div",RN,[E(s("input",TN,null,512),[[r,{state:e.viewState,set:i=>{e.options.origin=i},value:e.options?.origin,form:"anonymizeForm",options:{}}]]),t[22]||(t[22]=s("label",{class:"form-check-label",for:"origin"},"Display the project name",-1))]),s("div",ON,[E(s("input",AN,null,512),[[r,{state:e.viewState,set:i=>{e.options.title=i},value:e.options?.title,form:"anonymizeForm",options:{}}]]),t[23]||(t[23]=s("label",{class:"form-check-label",for:"title"},"Display the PR title",-1))]),s("div",IN,[E(s("input",VN,null,512),[[r,{state:e.viewState,set:i=>{e.options.body=i},value:e.options?.body,form:"anonymizeForm",options:{}}]]),t[24]||(t[24]=s("label",{class:"form-check-label",for:"body"},"Display the PR body and comment bodies",-1))])])])])])])],512),[[B,e.pullRequestUrl]]),e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,PN)):f("v-if",!0),E(s("div",qN,[e.isUpdate?f("v-if",!0):(l(),d("button",{key:0,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[0]||(t[0]=we(i=>e.submitForm(i,()=>{e.anonymizePullRequest(i)}),["prevent"]))},[...t[28]||(t[28]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize ",-1)])])),e.isUpdate?(l(),d("button",{key:1,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[1]||(t[1]=we(i=>e.submitForm(i,()=>{e.updatePullRequest(i)}),["prevent"]))},[...t[29]||(t[29]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update ",-1)])])):f("v-if",!0)],512),[[B,e.pullRequestUrl]])],2)),[[n,e.viewState]])],2)]),e.details?(l(),d("div",MN,[s("div",$N,[s("h2",UN,[e.options?.title?(l(),d("span",LN,c(e.anonymize(e.details?.pullRequest?.title)),1)):f("v-if",!0),s("span",{class:O(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,FN)):f("v-if",!0)]),e.options?.origin?(l(),d("small",zN,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):f("v-if",!0),e.options?.body?(l(),d("div",HN,[De(o,{content:e.anonymize(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0),s("ul",BN,[e.options?.diff?(l(),d("li",GN,[...t[31]||(t[31]=[s("button",{class:"nav-link active",id:"pills-diff-tab","data-toggle":"pill","data-target":"#pills-diff",type:"button",role:"tab","aria-controls":"pills-diff","aria-selected":"true"}," Diff ",-1)])])):f("v-if",!0),e.options?.comments?(l(),d("li",jN,[s("button",{class:O(["nav-link",{active:!e.options?.diff}]),id:"pills-comments-tab","data-toggle":"pill","data-target":"#pills-comments",type:"button",role:"tab","aria-controls":"pills-comments","aria-selected":"false"},[s("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comment",one:"One Comment",other:"{} Comments"}))},null,8,WN)],2)])):f("v-if",!0)]),s("div",KN,[s("div",YN,[e.options?.diff?(l(),d("div",JN,[s("pre",QN,[s("code",{innerHTML:e.sanitize(e.fmt?.diff(e.anonymize(e.details?.pullRequest?.diff)))},null,8,XN)])])):f("v-if",!0)]),s("div",{class:O(["tab-pane",{"show active":!e.options?.diff}]),id:"pills-comments",role:"tabpanel","aria-labelledby":"pills-comments-tab"},[e.options?.comments?(l(),d("ul",ZN,[(l(!0),d(J,null,ne(e.details?.pullRequest?.comments,(i,a)=>(l(),d("li",xN,[s("div",eS,[e.options?.username?(l(),d("h5",tS," @"+c(e.anonymize(i?.author)),1)):f("v-if",!0),e.options?.date?(l(),d("small",{key:1,textContent:c(e.fmt?.date(i?.updatedDate))},null,8,sS)):f("v-if",!0)]),s("p",nS,[e.options?.body?(l(),ks(o,{key:0,class:"pr-comment-body",content:e.anonymize(i?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])):f("v-if",!0)])]))),256))])):f("v-if",!0)],2)])])):f("v-if",!0)])])}var oS={class:"container paper-page"},rS={class:"paper-settings-main claim-form"},iS={class:"form-group"},aS={class:"invalid-feedback"},lS={class:"form-group"};function ol(e,t){let o=be("field"),r=be("form");return l(),d("div",oS,[t[6]||(t[6]=ge('
My work \xA0/\xA0 Claim

Claim an anonymization

Take ownership of an existing anonymized repository so it appears on your dashboard.

',3)),s("div",rS,[t[5]||(t[5]=s("p",{class:"paper-section-copy"},"Use this when an anonymization was created by a co-author or from another account. You must have access to the GitHub repository it was made from.",-1)),E((l(),d("form",{class:"form needs-validation",name:"claimForm",novalidate:"",onSubmit:t[0]||(t[0]=we(n=>e.submitForm(n,()=>{e.claim()}),["prevent"]))},[s("div",iS,[t[1]||(t[1]=s("label",{class:"paper-field-label",for:"repoUrl"},"GitHub repository URL",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.claimForm?.repoUrl?.invalid&&(e.claimForm?.repoUrl?.touched||e.claimForm?.submitted)}]),name:"repoUrl",id:"repoUrl",required:""},null,2),[[o,{state:e.viewState,set:n=>{e.repoUrl=n},value:e.repoUrl,form:"claimForm",options:{}}]]),E(s("div",aS," No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub. ",512),[[B,e.claimForm?.repoUrl?.errors?.not_found]])]),s("div",lS,[t[2]||(t[2]=s("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.claimForm?.repoId?.invalid&&(e.claimForm?.repoId?.touched||e.claimForm?.submitted)}]),name:"repoId",id:"repoId",required:""},null,2),[[o,{state:e.viewState,set:n=>{e.repoId=n},value:e.repoId,form:"claimForm",options:{}}]]),t[3]||(t[3]=s("small",{id:"idHelp",class:"form-text text-muted"},[y("The ID is the last part of the anonymized URL: "),s("code",null,"anonymous.4open.science/r/"),y(".")],-1))]),t[4]||(t[4]=s("button",{id:"submit",type:"submit",class:"btn btn-ink"}," Claim anonymization ",-1))],32)),[[r,e.viewState]])])])}var dS={class:"container page paper-page"},uS={class:"paper-crumbs"},cS={class:"here"},pS={class:"d-flex align-items-end flex-wrap",style:{gap:"12px","justify-content":"space-between"}},fS=["textContent"],mS={key:0,class:"paper-page-lede"},hS=["textContent","href"],vS={class:"d-flex align-items-center flex-wrap",style:{gap:"10px"}},yS=["textContent"],gS=["href"],bS={class:"paper-meta-rule"},wS=["textContent"],kS=["textContent"],_S={key:0},ES={class:"search-wrap"},CS={type:"search",id:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search by ID or source repository\u2026",autocomplete:"off"},NS={class:"dashboard-filter-controls"},SS={class:"dropdown"},DS={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},RS={class:"filter-btn-value"},TS={class:"dropdown-menu","aria-labelledby":"dropdownSort"},OS={class:"form-check dropdown-item"},AS={class:"form-check-input",type:"radio",name:"sort",id:"anonymizeDate",value:"-anonymizeDate"},IS={class:"form-check dropdown-item"},VS={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"repoId"},PS={class:"form-check dropdown-item"},qS={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},MS={class:"form-check dropdown-item"},$S={class:"form-check-input",type:"radio",name:"sort",id:"sortViews",value:"-pageView"},US={class:"dropdown"},LS={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},FS={key:0,class:"filter-btn-value"},zS={key:1,class:"filter-btn-value"},HS={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},BS={class:"form-check dropdown-item"},GS=["id"],jS=["for"],WS={class:"dashboard-meta"},KS={class:"dashboard-count"},YS={key:0},JS={key:0},QS={key:1},XS={key:1},ZS={key:0,class:"filter-chip"},xS=["onClick","aria-label"],e2={class:"paper-table paper-table-repos w-100",role:"table","aria-label":"Repositories"},t2={class:"cell-anon",role:"cell"},s2={class:"anon-text"},n2=["textContent","href"],o2={class:"anon-sub"},r2={class:"anon-source"},i2=["textContent","href"],a2={key:0},l2=["textContent","href"],d2={key:1},u2=["href"],c2={class:"cell-status",role:"cell"},p2={class:"status-line"},f2=["textContent"],m2={key:0,class:"status-sub"},h2=["textContent"],v2={class:"cell-expires",role:"cell"},y2={key:0,class:"expires-never"},g2=["textContent"],b2={key:2,class:"expires-past"},w2={key:0},k2={key:3,class:"empty-dash","aria-label":"Not applicable"},_2={class:"cell-actions",role:"cell"},E2={class:"dropdown"},C2=["aria-label"],N2={class:"dropdown-menu dropdown-menu-right"},S2=["href"],D2=["href"],R2={key:0,class:"paper-table-empty"},T2={key:0},O2={key:1},A2={key:2,class:"paper-table-empty-actions"};function rl(e,t){let o=be("field"),r=be("form");return l(),d("div",dS,[s("div",null,[s("div",uS,[t[2]||(t[2]=s("a",{href:"/dashboard"},"My work",-1)),t[3]||(t[3]=y(" \xA0/\xA0 ",-1)),t[4]||(t[4]=s("a",{href:"/conferences"},"Conferences",-1)),t[5]||(t[5]=y(" \xA0/\xA0 ",-1)),s("span",cS,c(e.conference?.conferenceID),1)]),s("div",pS,[s("div",null,[s("h1",{class:"paper-page-title",textContent:c(e.conference?.name)},null,8,fS),e.conference?.url?(l(),d("p",mS,[s("a",{target:"_blank",rel:"noopener",textContent:c(e.conference?.url),href:e.safeUrl(e.conference?.url)},null,8,hS)])):f("v-if",!0)]),s("div",vS,[s("span",{class:O(["status-pill",{"status-pill-ready":e.conference?.status=="ready","status-pill-removed":e.conference?.status=="removed"||e.conference?.status=="expired"}])},[s("span",{class:O(["status-dot","status-"+e.conference?.status]),"aria-hidden":"true"},null,2),s("span",{textContent:c(e.fmt?.statusLabel(e.conference?.status))},null,8,yS)],2),s("a",{class:"btn btn-outline-ink",href:e.safeUrl("/conference/"+e.conference?.conferenceID+"/edit")},[...t[6]||(t[6]=[s("i",{class:"far fa-edit mr-1","aria-hidden":"true"},null,-1),y(" Edit conference",-1)])],8,gS)])]),s("div",bS,[s("span",null,[t[7]||(t[7]=y("ID ",-1)),s("b",{class:"commit-hash",textContent:c(e.conference?.conferenceID)},null,8,wS)]),s("span",null,[t[8]||(t[8]=y("Review window ",-1)),s("b",null,c(e.fmt?.date(e.conference?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(e.conference?.endDate,"mediumDate")),1)]),s("span",null,[t[9]||(t[9]=y("Repositories ",-1)),s("b",null,c(e.fmt?.number(e.conference?.repositories?.length)),1)]),s("span",null,[t[10]||(t[10]=y("Plan ",-1)),s("b",{textContent:c(e.conference?.plan?.name||e.conference?.plan?.planID||"Free")},null,8,kS)]),e.conference?.price?(l(),d("span",_S,[t[11]||(t[11]=y("Cost so far ",-1)),s("b",null,c(e.fmt?.number(e.conference?.price,2))+" \u20AC",1)])):f("v-if",!0)]),t[29]||(t[29]=s("div",{class:"paper-section-eyebrow"},"Repositories",-1)),E((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter repositories","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=we(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[s("div",ES,[E(s("input",CS,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",NS,[s("div",SS,[s("button",DS,[t[12]||(t[12]=s("span",{class:"filter-btn-label"},"Sort",-1)),s("span",RS,c({"-anonymizeDate":"Anonymize date",repoId:"ID","-status":"Status","-pageView":"Views"}[e.orderBy]||"Custom"),1)]),s("div",TS,[t[17]||(t[17]=s("h6",{class:"dropdown-header"},"Order by",-1)),s("div",OS,[E(s("input",AS,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[13]||(t[13]=s("label",{class:"form-check-label",for:"anonymizeDate"},"Anonymize date",-1))]),s("div",IS,[E(s("input",VS,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[14]||(t[14]=s("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),s("div",PS,[E(s("input",qS,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[15]||(t[15]=s("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),s("div",MS,[E(s("input",$S,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[16]||(t[16]=s("label",{class:"form-check-label",for:"sortViews"},"Views",-1))])])]),s("div",US,[s("button",LS,[t[18]||(t[18]=s("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(l(),d("span",FS,"All")):f("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?f("v-if",!0):(l(),d("span",zS,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),s("div",HS,[t[19]||(t[19]=s("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(J,null,ne(e.statusLabels,(n,i,a)=>(l(),d("div",BS,[E(s("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,GS),[[o,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),s("label",{class:"form-check-label",for:"status-"+i},c(n),9,jS)]))),256))])])])],32)),[[r,e.viewState]]),s("div",WS,[s("span",KS,[e.filteredRepositories?.length===e.conference?.repositories?.length?(l(),d("span",YS,[y(c(e.fmt?.number(e.conference?.repositories?.length))+" repositor",1),e.conference?.repositories?.length===1?(l(),d("span",JS,"y")):f("v-if",!0),e.conference?.repositories?.length!==1?(l(),d("span",QS,"ies")):f("v-if",!0)])):f("v-if",!0),e.filteredRepositories?.length!==e.conference?.repositories?.length?(l(),d("span",XS,c(e.fmt?.number(e.filteredRepositories?.length))+" of "+c(e.fmt?.number(e.conference?.repositories?.length))+" shown",1)):f("v-if",!0)]),(l(!0),d(J,null,ne(e.filters?.status,(n,i,a)=>(l(),d(J,null,[n===!1?(l(),d("span",ZS,[y(" Hiding "+c(e.statusLabels[i])+" ",1),s("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusLabels[i]+" again"},"\xD7",8,xS)])):f("v-if",!0)],64))),256))]),s("div",e2,[t[28]||(t[28]=s("div",{class:"paper-table-head",role:"row"},[s("div",{role:"columnheader"},"Repository"),s("div",{role:"columnheader"},"Status"),s("div",{role:"columnheader",class:"num"},"Views"),s("div",{role:"columnheader"},"Expires"),s("div",{role:"columnheader"},[s("span",{class:"sr-only"},"Actions")])],-1)),(l(!0),d(J,null,ne(e.filteredRepositories,(n,i)=>(l(),d("div",{class:O(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error"}]),role:"row",key:n?.repoId},[s("div",t2,[t[22]||(t[22]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",s2,[s("a",{class:"repo-name",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId+"/")},null,8,n2),s("div",o2,[s("span",r2,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,i2),n?.options?.update&&n?.source?.branch?(l(),d("span",a2,[t[20]||(t[20]=y(" \xB7 ",-1)),s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,l2)])):f("v-if",!0),n?.source?.commit?(l(),d("span",d2,[t[21]||(t[21]=y(" \xB7 ",-1)),s("a",{class:"commit-hash",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},"@"+c(n?.source?.commit?.substring(0,8)),9,u2)])):f("v-if",!0)])])])]),s("div",c2,[s("div",p2,[s("span",{class:O(["status-dot","status-"+(n?.status=="error"?"error":n?.status=="ready"?"ready":n?.status=="expired"||n?.status=="removed"?n?.status:"progress")]),"aria-hidden":"true"},null,2),s("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,f2)]),n?.anonymizeDate?(l(),d("div",m2,"anonymized "+c(e.fmt?.humanTime(n?.anonymizeDate)),1)):f("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView))},null,8,h2),s("div",v2,[n?.status=="ready"&&(n?.options?.expirationMode==="never"||!n?.options?.expirationDate)?(l(),d("span",y2,"Never")):f("v-if",!0),n?.status=="ready"&&n?.options?.expirationMode!=="never"&&n?.options?.expirationDate?(l(),d("span",{key:1,textContent:c(e.fmt?.humanTime(n?.options?.expirationDate))},null,8,g2)):f("v-if",!0),n?.status=="expired"?(l(),d("span",b2,[t[23]||(t[23]=y("Expired",-1)),n?.options?.expirationDate?(l(),d("span",w2,c(e.fmt?.humanTime(n?.options?.expirationDate)),1)):f("v-if",!0)])):f("v-if",!0),n?.status!="ready"&&n?.status!="expired"?(l(),d("span",k2,"\u2014")):f("v-if",!0)]),s("div",_2,[s("div",E2,[s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+n?.repoId},[...t[24]||(t[24]=[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"},null,-1)])],8,C2),s("div",N2,[s("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[25]||(t[25]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View ",-1)])],8,S2),s("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[26]||(t[26]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,D2)])])])],2))),128)),e.filteredRepositories?.length==0?(l(),d("div",R2,[t[27]||(t[27]=s("i",{class:"fas fa-inbox","aria-hidden":"true"},null,-1)),e.conference?.repositories?.length?f("v-if",!0):(l(),d("span",T2,"No repository has been submitted to this conference yet.")),e.conference?.repositories?.length?(l(),d("span",O2,"Nothing matches the current filters.")):f("v-if",!0),e.conference?.repositories?.length?(l(),d("div",A2,[s("button",{type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=n=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")])):f("v-if",!0)])):f("v-if",!0)])])])}var I2={class:"container page paper-page"},V2={class:"row"},P2={class:"w-100"},q2={class:"search-wrap"},M2={type:"search",id:"search",class:"form-control","aria-label":"Search conferences",placeholder:"Search by name or ID\u2026",autocomplete:"off"},$2={class:"dashboard-filter-controls"},U2={class:"dropdown"},L2={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},F2={class:"filter-btn-value"},z2={class:"dropdown-menu","aria-labelledby":"dropdownSort"},H2={class:"form-check dropdown-item"},B2={class:"form-check-input",type:"radio",name:"sort",id:"sortName",value:"name"},G2={class:"form-check dropdown-item"},j2={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"conferenceID"},W2={class:"form-check dropdown-item"},K2={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},Y2={class:"dropdown"},J2={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},Q2={key:0,class:"filter-btn-value"},X2={key:1,class:"filter-btn-value"},Z2={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},x2={class:"form-check dropdown-item"},eD=["id"],tD=["for"],sD={class:"dashboard-meta"},nD={class:"dashboard-count"},oD={key:0},rD={key:0},iD={key:1},aD={key:0,class:"filter-chip"},lD=["onClick","aria-label"],dD={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},uD={class:"cell-anon",role:"cell"},cD={class:"anon-text"},pD=["textContent","href"],fD={class:"anon-sub"},mD={class:"anon-source"},hD=["textContent"],vD={key:0},yD=["textContent","href"],gD={class:"cell-status",role:"cell"},bD={class:"status-line"},wD=["textContent"],kD=["textContent"],_D={class:"cell-expires",role:"cell"},ED={key:0},CD={key:1,class:"empty-dash","aria-label":"No review window"},ND={class:"cell-actions",role:"cell"},SD={class:"dropdown"},DD=["aria-label"],RD={class:"dropdown-menu dropdown-menu-right"},TD=["href"],OD=["href"],AD={key:0},ID=["onClick"],VD={key:0,class:"paper-table-empty"},PD={key:0},qD={key:1},MD={class:"paper-table-empty-actions"},$D={key:1,href:"/conference/new",class:"btn btn-ink"};function il(e,t){let o=be("field"),r=be("form");return l(),d("div",I2,[s("div",V2,[s("div",P2,[t[9]||(t[9]=ge('
My work \xA0/\xA0 Conferences

Your conferences

Group anonymizations by venue, give chairs a shared dashboard, and set one expiry for every submission.

New conference
',2)),E((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter conferences","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=we(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[s("div",q2,[E(s("input",M2,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",$2,[s("div",U2,[s("button",L2,[t[2]||(t[2]=s("span",{class:"filter-btn-label"},"Sort",-1)),s("span",F2,c({name:"Name",conferenceID:"ID","-status":"Status"}[e.orderBy]||"Custom"),1)]),s("div",z2,[t[6]||(t[6]=s("h6",{class:"dropdown-header"},"Order by",-1)),s("div",H2,[E(s("input",B2,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=s("label",{class:"form-check-label",for:"sortName"},"Name",-1))]),s("div",G2,[E(s("input",j2,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=s("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),s("div",W2,[E(s("input",K2,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[5]||(t[5]=s("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))])])]),s("div",Y2,[s("button",J2,[t[7]||(t[7]=s("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(l(),d("span",Q2,"All")):f("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?f("v-if",!0):(l(),d("span",X2,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),s("div",Z2,[t[8]||(t[8]=s("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(J,null,ne(e.statusLabels,(n,i,a)=>(l(),d("div",x2,[E(s("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,eD),[[o,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),s("label",{class:"form-check-label",for:"status-"+i},c(n),9,tD)]))),256))])])])],32)),[[r,e.viewState]]),s("div",sD,[s("span",nD,[e.filteredConferences?.length===e.conferences?.length?(l(),d("span",oD,[y(c(e.fmt?.number(e.conferences?.length))+" conference",1),e.conferences?.length!==1?(l(),d("span",rD,"s")):f("v-if",!0)])):f("v-if",!0),e.filteredConferences?.length!==e.conferences?.length?(l(),d("span",iD,c(e.fmt?.number(e.filteredConferences?.length))+" of "+c(e.fmt?.number(e.conferences?.length))+" shown",1)):f("v-if",!0)]),(l(!0),d(J,null,ne(e.filters?.status,(n,i,a)=>(l(),d(J,null,[n===!1?(l(),d("span",aD,[y(" Hiding "+c(e.statusLabels[i])+" ",1),s("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusLabels[i]+" again"},"\xD7",8,lD)])):f("v-if",!0)],64))),256))])]),s("div",dD,[t[20]||(t[20]=s("div",{class:"paper-table-head",role:"row"},[s("div",{role:"columnheader"},"Conference"),s("div",{role:"columnheader"},"Status"),s("div",{role:"columnheader",class:"num"},"Repos"),s("div",{role:"columnheader"},"Review window"),s("div",{role:"columnheader"},[s("span",{class:"sr-only"},"Actions")])],-1)),(l(!0),d(J,null,ne(e.filteredConferences,(n,i)=>(l(),d("div",{class:O(["paper-table-row row-clickable",{"repo-inactive":n?.status=="expired"||n?.status=="removed"}]),role:"row",key:n?.conferenceID},[s("div",uD,[t[12]||(t[12]=s("span",{class:"type-badge type-repo"},"Conf",-1)),s("div",cD,[s("a",{class:"repo-name",textContent:c(n?.name),href:e.safeUrl("/conference/"+n?.conferenceID)},null,8,pD),s("div",fD,[s("span",mD,[t[11]||(t[11]=y("ID ",-1)),s("span",{class:"commit-hash",textContent:c(n?.conferenceID)},null,8,hD),n?.url?(l(),d("span",vD,[t[10]||(t[10]=y(" \xB7 ",-1)),s("a",{target:"_blank",rel:"noopener",textContent:c(e.fmt?.limitTo(n?.url,60)),href:e.safeUrl(n?.url)},null,8,yD)])):f("v-if",!0)])])])]),s("div",gD,[s("div",bD,[s("span",{class:O(["status-dot","status-"+n?.status]),"aria-hidden":"true"},null,2),s("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,wD)])]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.nbRepositories||0))},null,8,kD),s("div",_D,[n?.startDate?(l(),d("span",ED,c(e.fmt?.date(n?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(n?.endDate,"mediumDate")),1)):f("v-if",!0),n?.startDate?f("v-if",!0):(l(),d("span",CD,"\u2014"))]),s("div",ND,[s("div",SD,[s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+n?.name},[...t[13]||(t[13]=[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"},null,-1)])],8,DD),s("div",RD,[s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/")},[...t[14]||(t[14]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View ",-1)])],8,TD),s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/edit")},[...t[15]||(t[15]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,OD),n?.status!="removed"?(l(),d("div",AD,[t[17]||(t[17]=s("div",{class:"dropdown-divider"},null,-1)),s("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:a=>e.removeConference(n)},[...t[16]||(t[16]=[s("i",{class:"fas fa-trash-alt","aria-hidden":"true"},null,-1),y(" Remove ",-1)])],8,ID)])):f("v-if",!0)])])])],2))),128)),e.filteredConferences?.length==0?(l(),d("div",VD,[t[19]||(t[19]=s("i",{class:"fas fa-inbox","aria-hidden":"true"},null,-1)),e.conferences?.length==0?(l(),d("span",PD,"You have not created a conference yet.")):f("v-if",!0),e.conferences?.length>0?(l(),d("span",qD,"Nothing matches the current filters.")):f("v-if",!0),s("div",MD,[e.conferences?.length>0?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=n=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")):f("v-if",!0),e.conferences?.length==0?(l(),d("a",$D,[...t[18]||(t[18]=[s("i",{class:"fa fa-plus-circle mr-1","aria-hidden":"true"},null,-1),y(" New conference",-1)])])):f("v-if",!0)])])):f("v-if",!0)])])])}var UD={class:"container page dashboard-page paper-page"},LD={class:"row"},FD={class:"w-100"},zD={key:0,class:"quota-row"},HD={class:"quota-item"},BD={class:"quota-header"},GD={class:"quota-label"},jD={key:0,class:"quota-value"},WD={key:0},KD={key:1,class:"quota-unlimited-tag"},YD={key:1,class:"quota-value"},JD={key:0},QD={key:1,class:"quota-unlimited-tag"},XD=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],ZD={class:"search-wrap"},xD={type:"search",id:"search",class:"form-control","aria-label":"Search anonymizations",placeholder:"Search by name, source, or conference\u2026",autocomplete:"off"},eR={class:"dashboard-filter-controls"},tR={class:"btn-group",role:"group","aria-label":"Type"},sR=["aria-pressed"],nR=["aria-pressed"],oR=["aria-pressed"],rR=["aria-pressed"],iR={class:"dropdown"},aR={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},lR={class:"filter-btn-value"},dR={class:"sr-only"},uR={class:"dropdown-menu","aria-labelledby":"dropdownSort"},cR={class:"form-check dropdown-item"},pR=["onClick","checked","id"],fR=["for"],mR={class:"dropdown"},hR={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},vR={key:0,class:"filter-btn-value"},yR={key:1,class:"filter-btn-value"},gR={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},bR={class:"form-check dropdown-item"},wR=["id"],kR=["for"],_R={key:1,class:"dashboard-meta"},ER={class:"dashboard-count"},CR={key:0},NR={key:0},SR={key:1},DR={key:0,class:"filter-chip"},RR=["onClick","aria-label"],TR=["aria-busy"],OR={class:"paper-table-head",role:"row"},AR=["aria-sort"],IR=["aria-sort"],VR=["aria-sort"],PR=["aria-sort"],qR={key:0,class:"paper-table-row paper-table-skeleton",role:"row","aria-hidden":"true"},MR=["onClick"],$R={class:"cell-anon",role:"cell"},UR={class:"anon-text"},LR={class:"anon-title"},FR=["textContent","href"],zR=["textContent"],HR={key:2,class:"type-badge type-coauthor",title:"You are a co-author on this anonymization"},BR={key:0,class:"anon-sub"},GR={key:0,class:"anon-source"},jR=["textContent","href"],WR={key:0},KR=["textContent","href"],YR={key:1},JR=["href"],QR={key:1,class:"anon-source"},XR=["textContent","href"],ZR={key:2,class:"anon-source"},xR=["textContent","href"],eT=["title"],tT=["textContent"],sT={class:"cell-status",role:"cell"},nT={class:"status-line"},oT=["textContent"],rT=["textContent","title"],iT=["title"],aT={key:2,class:"status-sub"},lT=["textContent"],dT={class:"cell-expires",role:"cell"},uT={key:0,class:"expires-never"},cT=["textContent"],pT={key:2,class:"expires-past"},fT={key:3,class:"expires-past"},mT={key:4,class:"empty-dash","aria-label":"Not applicable"},hT={class:"cell-actions",role:"cell"},vT={key:0,class:"dropdown"},yT=["aria-label"],gT={class:"dropdown-menu dropdown-menu-right"},bT=["href"],wT=["href"],kT=["href"],_T=["onClick"],ET=["onClick"],CT=["onClick"],NT={key:4},ST=["onClick"],DT={key:0,class:"paper-table-empty"},RT={key:0},TT={key:1},OT={class:"paper-table-empty-actions"},AT={key:1,href:"/anonymize",class:"btn btn-ink"};function al(e,t){let o=be("field"),r=be("form");return l(),d("div",UD,[s("div",LD,[s("div",FD,[t[18]||(t[18]=ge('
My work \xA0/\xA0 Dashboard

Your anonymizations

Every repository, pull request, and gist you\u2019ve mirrored, with live status and stats.

',2)),f(" Quota "),e.quota?(l(),d("div",zD,[(l(),d(J,null,ne([{key:"repository",label:"Repositories",kind:"count"},{key:"storage",label:"Storage",kind:"bytes"},{key:"file",label:"Files",kind:"count"}],(n,i)=>s("div",HD,[s("div",BD,[s("span",GD,c(n?.label),1),n?.kind==="count"?(l(),d("span",jD,[y(c(e.fmt?.number(e.quota[n?.key].used)),1),e.quota[n?.key].unlimited?f("v-if",!0):(l(),d("span",WD," / "+c(e.fmt?.number(e.quota[n?.key].total)),1)),e.quota[n?.key].unlimited?(l(),d("span",KD,"Unlimited")):f("v-if",!0)])):f("v-if",!0),n?.kind==="bytes"?(l(),d("span",YD,[y(c(e.fmt?.humanFileSize(e.quota[n?.key].used)),1),e.quota[n?.key].unlimited?f("v-if",!0):(l(),d("span",JD," / "+c(e.fmt?.humanFileSize(e.quota[n?.key].total)),1)),e.quota[n?.key].unlimited?(l(),d("span",QD,"Unlimited")):f("v-if",!0)])):f("v-if",!0)]),s("div",{class:O(["quota-track","quota-"+e.quota[n?.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":n?.label+" quota","aria-valuenow":e.quota[n?.key].used,"aria-valuemax":e.quota[n?.key].unlimited?e.quota[n?.key].used:e.quota[n?.key].total,"aria-valuetext":e.quota[n?.key].unlimited?"unlimited":e.fmt.number(e.quota[n?.key].percent,0)+"% used"},[e.quota[n?.key].unlimited?f("v-if",!0):(l(),d("div",{key:0,class:"quota-fill",style:Pe({width:e.quota[n?.key].percent+"%"})},null,4))],10,XD)])),64))])):f("v-if",!0),f(" Search + filters "),E((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter anonymizations","accept-charset":"UTF-8",onSubmit:t[5]||(t[5]=we(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[s("div",ZD,[E(s("input",xD,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",eR,[s("div",tR,[s("button",{type:"button",class:O(["btn",{"btn-primary":e.typeFilter==="all"}]),onClick:t[0]||(t[0]=n=>e.typeFilter="all"),"aria-pressed":e.typeFilter==="all"},"All",10,sR),s("button",{type:"button",class:O(["btn",{"btn-primary":e.typeFilter==="repo"}]),onClick:t[1]||(t[1]=n=>e.typeFilter="repo"),"aria-pressed":e.typeFilter==="repo"},"Repos",10,nR),s("button",{type:"button",class:O(["btn",{"btn-primary":e.typeFilter==="pr"}]),onClick:t[2]||(t[2]=n=>e.typeFilter="pr"),"aria-pressed":e.typeFilter==="pr"},"PRs",10,oR),s("button",{type:"button",class:O(["btn",{"btn-primary":e.typeFilter==="gist"}]),onClick:t[3]||(t[3]=n=>e.typeFilter="gist"),"aria-pressed":e.typeFilter==="gist"},"Gists",10,rR)]),s("div",iR,[s("button",aR,[t[12]||(t[12]=s("span",{class:"filter-btn-label"},"Sort",-1)),s("span",lR,c(e.sortLabel()),1),s("i",{class:O(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2),s("span",dR,c(e.sortDesc()?"descending":"ascending"),1)]),s("div",uR,[t[14]||(t[14]=s("h6",{class:"dropdown-header"},"Order by",-1)),(l(!0),d(J,null,ne(e.sortFields,(n,i,a)=>(l(),d("div",cR,[s("input",{class:"form-check-input",type:"radio",name:"sort",onClick:u=>e.setSort(i,n.defaultDesc),checked:e.isSortedBy(i),id:"sort-"+a},null,8,pR),s("label",{class:"form-check-label",for:"sort-"+a},c(n?.label),9,fR)]))),256)),t[15]||(t[15]=s("div",{class:"dropdown-divider"},null,-1)),s("button",{type:"button",class:"dropdown-item",onClick:t[4]||(t[4]=n=>e.toggleSortDirection())},[t[13]||(t[13]=s("i",{class:"fas fa-exchange-alt fa-rotate-90","aria-hidden":"true"},null,-1)),y(" "+c(e.sortDesc()?"Switch to ascending":"Switch to descending"),1)])])]),s("div",mR,[s("button",hR,[t[16]||(t[16]=s("span",{class:"filter-btn-label"},"Status",-1)),e.hasHiddenStatus()?f("v-if",!0):(l(),d("span",vR,"All")),e.hasHiddenStatus()?(l(),d("span",yR,c(e.hiddenStatusCount())+" hidden",1)):f("v-if",!0)]),s("div",gR,[t[17]||(t[17]=s("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(J,null,ne(e.statusKeyLabels,(n,i,a)=>(l(),d("div",bR,[E(s("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,wR),[[o,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),s("label",{class:"form-check-label",for:"status-"+i},c(n),9,kR)]))),256))])])])],32)),[[r,e.viewState]]),f(" Result count + active filter chips "),e.loading?f("v-if",!0):(l(),d("div",_R,[s("span",ER,[e.filteredItems?.length===e.items?.length?(l(),d("span",CR,[y(c(e.fmt?.number(e.items?.length))+" anonymization",1),e.items?.length!==1?(l(),d("span",NR,"s")):f("v-if",!0)])):f("v-if",!0),e.filteredItems?.length!==e.items?.length?(l(),d("span",SR,c(e.fmt?.number(e.filteredItems?.length))+" of "+c(e.fmt?.number(e.items?.length))+" shown",1)):f("v-if",!0)]),(l(!0),d(J,null,ne(e.filters?.status,(n,i,a)=>(l(),d(J,null,[n===!1?(l(),d("span",DR,[y(" Hiding "+c(e.statusKeyLabels[i])+" ",1),s("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusKeyLabels[i]+" again"},"\xD7",8,RR)])):f("v-if",!0)],64))),256)),e.hasActiveFilters()?(l(),d("button",{key:0,type:"button",class:"btn-link-inline",onClick:t[6]||(t[6]=n=>e.clearFilters())},"Clear filters")):f("v-if",!0)]))]),f(" Table "),s("div",{class:"paper-table paper-table-dashboard w-100",role:"table","aria-label":"Anonymizations","aria-busy":e.loading},[s("div",OR,[s("div",{role:"columnheader","aria-sort":e.isSortedBy("_name")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:O(["sortable",{active:e.isSortedBy("_name")}]),onClick:t[7]||(t[7]=n=>e.setSort("_name"))},[t[19]||(t[19]=y(" Anonymization ",-1)),e.isSortedBy("_name")?(l(),d("i",{key:0,class:O(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):f("v-if",!0)],2)],8,AR),s("div",{role:"columnheader","aria-sort":e.isSortedBy("status")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:O(["sortable",{active:e.isSortedBy("status")}]),onClick:t[8]||(t[8]=n=>e.setSort("status"))},[t[20]||(t[20]=y(" Status ",-1)),e.isSortedBy("status")?(l(),d("i",{key:0,class:O(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):f("v-if",!0)],2)],8,IR),s("div",{role:"columnheader",class:"num","aria-sort":e.isSortedBy("pageView")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:O(["sortable",{active:e.isSortedBy("pageView")}]),onClick:t[9]||(t[9]=n=>e.setSort("pageView"))},[t[21]||(t[21]=y(" Views ",-1)),e.isSortedBy("pageView")?(l(),d("i",{key:0,class:O(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):f("v-if",!0)],2)],8,VR),s("div",{role:"columnheader","aria-sort":e.isSortedBy("options.expirationDate")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:O(["sortable",{active:e.isSortedBy("options.expirationDate")}]),onClick:t[10]||(t[10]=n=>e.setSort("options.expirationDate"))},[t[22]||(t[22]=y(" Expires ",-1)),e.isSortedBy("options.expirationDate")?(l(),d("i",{key:0,class:O(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):f("v-if",!0)],2)],8,PR),t[23]||(t[23]=s("div",{role:"columnheader"},[s("span",{class:"sr-only"},"Actions")],-1))]),f(" Loading skeleton: keeps the layout stable while the three lists load "),(l(),d(J,null,ne([1,2,3,4],(n,i)=>(l(),d(J,null,[e.loading?(l(),d("div",qR,[...t[24]||(t[24]=[s("div",{class:"cell-anon",role:"cell"},[s("span",{class:"skeleton skeleton-badge"}),s("div",{class:"anon-text"},[s("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),s("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),s("div",{class:"cell-status",role:"cell"},[s("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),s("div",{class:"cell-views num",role:"cell"},[s("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),s("div",{class:"cell-expires",role:"cell"},[s("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),s("div",{class:"cell-actions",role:"cell"},null,-1)])])):f("v-if",!0)],64))),64)),(l(!0),d(J,null,ne(e.filteredItems,(n,i)=>(l(),d(J,{key:n?._type+":"+(n?._id||i)},[e.loading?f("v-if",!0):(l(),d("div",{key:0,class:O(["paper-table-row",{"repo-inactive":n?._statusKey=="expired"||n?._statusKey=="removed","repo-error":n?.status=="error","row-clickable":!!n?._viewUrl}]),role:"row",onClick:a=>e.openItem(n,a)},[s("div",$R,[s("span",{class:O(["type-badge",{"type-repo":n?._type==="repo","type-pr":n?._type==="pr","type-gist":n?._type==="gist"}])},c(n?._type==="repo"?"Repo":n?._type==="pr"?"PR":"Gist"),3),s("div",UR,[s("div",LR,[n?._viewUrl?(l(),d("a",{key:0,class:"repo-name",textContent:c(n?._name),href:e.safeUrl(n?._viewUrl)},null,8,FR)):f("v-if",!0),n?._viewUrl?f("v-if",!0):(l(),d("span",{key:1,class:"repo-name repo-name-static",textContent:c(n?._name)},null,8,zR)),n?.role==="coauthor"?(l(),d("span",HR,"Co-author")):f("v-if",!0)]),!n?._broken||n?.conference?(l(),d("div",BR,[n?._type==="repo"&&n?.source?.fullName&&!n?._broken?(l(),d("span",GR,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,jR),n?.options?.update&&n?.source?.branch?(l(),d("span",WR,[t[25]||(t[25]=y(" \xB7 ",-1)),s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,KR)])):f("v-if",!0),n?.source?.commit?(l(),d("span",YR,[t[26]||(t[26]=y(" \xB7 ",-1)),s("a",{class:"commit-hash",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},"@"+c(n?.source?.commit?.substring(0,8)),9,JR)])):f("v-if",!0)])):f("v-if",!0),n?._type==="pr"&&n?.source?.repositoryFullName&&!n?._broken?(l(),d("span",QR,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?._source),href:e.safeUrl("https://github.com/"+n?.source?.repositoryFullName+"/pull/"+n?.source?.pullRequestId)},null,8,XR)])):f("v-if",!0),n?._type==="gist"&&n?.source?.gistId&&!n?._broken?(l(),d("span",ZR,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?._source),href:e.safeUrl("https://gist.github.com/"+n?.source?.gistId)},null,8,xR)])):f("v-if",!0),n?.conference?(l(),d("span",{key:3,class:"cell-conf conf-tag",title:n?.conference},[t[27]||(t[27]=s("i",{class:"fas fa-university","aria-hidden":"true"},null,-1)),t[28]||(t[28]=y()),s("span",{textContent:c(n?.conference)},null,8,tT)],8,eT)):f("v-if",!0)])):f("v-if",!0)])]),s("div",sT,[s("div",nT,[s("span",{class:O(["status-dot","status-"+n?._statusKey]),"aria-hidden":"true"},null,2),s("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,oT)]),n?.status=="error"&&n?.statusMessage?(l(),d("div",{key:0,class:"status-sub status-sub-error",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,rT)):f("v-if",!0),n?._stale?(l(),d("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(n?.anonymizeDate||n?.lastView)}," Last activity "+c(e.fmt?.humanTime(n?.anonymizeDate||n?.lastView))+" \xB7 may be stuck ",9,iT)):f("v-if",!0),n?.status!="error"&&!n?._stale&&n?.anonymizeDate?(l(),d("div",aT," anonymized "+c(e.fmt?.humanTime(n?.anonymizeDate)),1)):f("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView))},null,8,lT),s("div",dT,[n?._expiry?.kind==="never"?(l(),d("span",uT,"Never")):f("v-if",!0),n?._expiry?.kind==="date"?(l(),d("span",{key:1,textContent:c(e.fmt?.humanTime(n?._expiry?.date))},null,8,cT)):f("v-if",!0),n?._expiry?.kind==="expired"&&n?._expiry?.date?(l(),d("span",pT,"Expired "+c(e.fmt?.humanTime(n?._expiry?.date)),1)):f("v-if",!0),n?._expiry?.kind==="expired"&&!n?._expiry?.date?(l(),d("span",fT,"Expired")):f("v-if",!0),n?._expiry?.kind==="none"?(l(),d("span",mT,"\u2014")):f("v-if",!0)]),s("div",hT,[n?._broken?f("v-if",!0):(l(),d("div",vT,[s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+n?._name},[...t[29]||(t[29]=[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"},null,-1)])],8,yT),s("div",gT,[s("a",{class:"dropdown-item",href:e.safeUrl(n?._viewUrl)},[...t[30]||(t[30]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View ",-1)])],8,bT),n?._type==="repo"&&n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[31]||(t[31]=[s("i",{class:"fas fa-globe","aria-hidden":"true"},null,-1),y(" View page ",-1)])],8,wT)):f("v-if",!0),s("a",{class:"dropdown-item",href:e.safeUrl(n?._editUrl)},[...t[32]||(t[32]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,kT),n?.status=="ready"||n?.status=="error"?(l(),d("button",{key:1,type:"button",class:"dropdown-item",onClick:a=>e.refreshItem(n)},[...t[33]||(t[33]=[s("i",{class:"fas fa-sync","aria-hidden":"true"},null,-1),y(" Force update ",-1)])],8,_T)):f("v-if",!0),n?.status=="removed"?(l(),d("button",{key:2,type:"button",class:"dropdown-item",onClick:a=>e.refreshItem(n)},[...t[34]||(t[34]=[s("i",{class:"fas fa-check-circle","aria-hidden":"true"},null,-1),y(" Enable ",-1)])],8,ET)):f("v-if",!0),n?.status=="expired"?(l(),d("button",{key:3,type:"button",class:"dropdown-item",onClick:a=>e.extendItem(n)},[...t[35]||(t[35]=[s("i",{class:"fas fa-calendar-plus","aria-hidden":"true"},null,-1),y(" Extend 6 months ",-1)])],8,CT)):f("v-if",!0),(n?.status=="ready"||n?.status=="expired"||n?.status=="error")&&n?.role!=="coauthor"?(l(),d("div",NT,[t[37]||(t[37]=s("div",{class:"dropdown-divider"},null,-1)),s("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:a=>e.removeItem(n)},[...t[36]||(t[36]=[s("i",{class:"fas fa-trash-alt","aria-hidden":"true"},null,-1),y(" Remove ",-1)])],8,ST)])):f("v-if",!0)])]))])],10,MR))],64))),128)),!e.loading&&e.filteredItems?.length==0?(l(),d("div",DT,[t[39]||(t[39]=s("i",{class:"fas fa-inbox","aria-hidden":"true"},null,-1)),e.items?.length==0?(l(),d("span",RT,"You have no anonymizations yet.")):f("v-if",!0),e.items?.length>0?(l(),d("span",TT,"Nothing matches the current filters.")):f("v-if",!0),s("div",OT,[e.hasActiveFilters()?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[11]||(t[11]=n=>e.clearFilters())},"Clear filters")):f("v-if",!0),e.items?.length==0?(l(),d("a",AT,[...t[38]||(t[38]=[s("i",{class:"fa fa-plus-circle mr-1","aria-hidden":"true"},null,-1),y(" New anonymization",-1)])])):f("v-if",!0)])])):f("v-if",!0)],8,TR)])])}var IT={class:"explorer-page"},VT=["aria-label"],PT=["textContent"],qT={class:"leftCol-head"},MT={class:"leftCol-search"},$T={class:"tree-search-box"},UT={type:"text",class:"tree-search-input",placeholder:"Search files","aria-label":"Search files"},LT={class:"leftCol-project-header"},FT=["textContent"],zT={class:"project-file-count"},HT={class:"leftCol-body"},BT={key:0,class:"paper-inline-warning",role:"alert"},GT={key:1,class:"paper-inline-warning",role:"alert"},jT={class:"leftCol-foot"},WT=["title"],KT=["title"],YT=["title"],JT={key:2,class:"last-update",title:"Older repositories have no recorded publication date. The source commit date does not establish when files became available here."},QT={class:"explorer-main"},XT={class:"status-bar"},ZT={class:"breadcrumb paths","aria-label":"Path"},xT=["textContent"],eO={class:"status-bar-actions"},tO=["href"],sO={class:"d-none d-md-inline"},nO={class:"d-none d-md-inline"},oO=["href"],rO=["href"],iO=["href"],aO=["href"],lO={class:"explorer-content"};function ll(e,t){let o=et("tree"),r=et("partial-view"),n=be("field");return l(),d("div",IT,[E(s("button",{class:"sidebar-toggle",onClick:t[0]||(t[0]=i=>e.sidebarCollapsed=!e.sidebarCollapsed),"aria-label":e.sidebarCollapsed?"Show files":"Hide files"},[s("i",{class:O(["fas",e.sidebarCollapsed?"fa-folder-open":"fa-times"])},null,2),s("span",{textContent:c(e.sidebarCollapsed?"Files":"Close")},null,8,PT)],8,VT),[[B,e.files?.length]]),E(s("div",{class:O(["leftCol",{collapsed:e.sidebarCollapsed}])},[s("div",qT,[t[7]||(t[7]=s("span",{class:"leftCol-eyebrow"},"Files",-1)),s("button",{class:"leftCol-close","aria-label":"Close files",onClick:t[1]||(t[1]=i=>e.sidebarCollapsed=!0)},[...t[6]||(t[6]=[s("i",{class:"fas fa-times"},null,-1)])])]),s("div",MT,[s("div",$T,[s("i",{class:O(["fas tree-search-icon",e.fileSearchLoading?"fa-spinner fa-spin":"fa-search"])},null,2),E(s("input",UT,null,512),[[n,{state:e.viewState,set:i=>{e.fileSearchQuery=i},value:e.fileSearchQuery,form:null,options:{debounce:300},change:()=>{e.onFileSearchChange()}}]]),E(s("kbd",{class:"tree-search-kbd"},c(e.isMac?"\u2318":"Ctrl+")+"K",513),[[B,!e.fileSearchQuery]]),E(s("button",{class:"tree-search-clear","aria-label":"Clear search",onClick:t[2]||(t[2]=i=>{e.fileSearchQuery="",e.onFileSearchChange()})},"\xD7",512),[[B,e.fileSearchQuery]])])]),s("div",LT,[s("span",{class:"project-name",textContent:c(e.repoId)},null,8,FT),s("span",zT,c(e.fileCounts?.[""]||e.files?.length)+" files",1)]),s("div",HT,[e.options?.truncatedFolders?.length>0?(l(),d("div",BT,[t[8]||(t[8]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fmt?.translate("WARNINGS.repo_truncated")),1)])):f("v-if",!0),e.options?.hasSubmodules?(l(),d("div",GT,[t[9]||(t[9]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fmt?.translate("WARNINGS.submodules_not_included")),1)])):f("v-if",!0),De(o,{class:"files",file:e.files,"search-query":e.fileSearchQuery,"search-results":e.fileSearchResults,page:e.viewState},null,8,["file","search-query","search-results","page"])]),s("div",jT,[s("span",{class:"last-update",title:e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate},c(e.options?.sourceCommitDate?"Source commit":e.options?.anonymizedAt?"Anonymized":"Updated")+" "+c(e.fmt?.date(e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),9,WT),e.options?.settingsSavedAt?(l(),d("span",{key:0,class:"last-update",title:e.options.settingsSavedAt}," Settings saved "+c(e.fmt?.date(e.options.settingsSavedAt)),9,KT)):f("v-if",!0),e.options?.publishedAt?(l(),d("span",{key:1,class:"last-update",title:e.options.publishedAt}," Snapshot ready "+c(e.fmt?.date(e.options.publishedAt)),9,YT)):f("v-if",!0),e.options?.anonymizedAt&&!e.options?.publishedAt?(l(),d("span",JT," Snapshot ready date not recorded ")):f("v-if",!0)])],2),[[B,e.files?.length]]),E(s("div",{class:"leftCol-backdrop",onClick:t[3]||(t[3]=i=>e.sidebarCollapsed=!0)},null,512),[[B,e.files?.length&&!e.sidebarCollapsed]]),s("div",QT,[s("div",XT,[s("ol",ZT,[(l(!0),d(J,null,ne(e.paths,(i,a)=>(l(),d("li",{class:"breadcrumb-item",textContent:c(i)},null,8,xT))),256))]),s("div",eO,[e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[10]||(t[10]=[s("i",{class:"far fa-edit"},null,-1),s("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,tO)):f("v-if",!0),e.type=="html-doc"&&!e.showSource?(l(),d("button",{key:1,class:O(["btn btn-sm",{"btn-active":e.allowScripts}]),"aria-label":"Allow this document to run JavaScript",title:"Scripts in this file are blocked by default. Enable them only if you trust the repository \u2014 the document stays isolated from your session either way.",onClick:t[4]||(t[4]=i=>e.toggleAllowScripts())},[t[11]||(t[11]=s("i",{class:"fab fa-js"},null,-1)),s("span",sO,c(e.allowScripts?"JS on":"JS off"),1)],2)):f("v-if",!0),e.type=="html-doc"?(l(),d("button",{key:2,class:"btn btn-sm","aria-label":"Toggle between the rendered document and its source",title:"Toggle between the rendered document and its source",onClick:t[5]||(t[5]=i=>e.toggleSource())},[s("i",{class:O(["fas",e.showSource?"fa-eye":"fa-code"])},null,2),s("span",nO,c(e.showSource?"Rendered":"Source"),1)])):f("v-if",!0),E(s("a",{target:"_self",class:"btn btn-sm","aria-label":"View raw current file",title:"View the raw content of the current file",href:e.safeUrl(e.url)},[...t[12]||(t[12]=[s("i",{class:"fas fa-file-alt"},null,-1),s("span",{class:"d-none d-md-inline"}," Raw",-1)])],8,oO),[[B,e.content!=null]]),E(s("a",{target:"_self",class:"btn btn-sm","aria-label":"Download current file",title:"Download the current file",href:e.safeUrl(e.url+"&download=true")},[...t[13]||(t[13]=[s("i",{class:"fas fa-download"},null,-1),s("span",{class:"d-none d-md-inline"}," Download",-1)])],8,rO),[[B,e.content!=null]]),e.options?.download?(l(),d("a",{key:3,target:"_self",class:"btn btn-sm","aria-label":"Download full repository as ZIP",title:"Download the full repository as a ZIP archive",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[14]||(t[14]=[s("i",{class:"fas fa-file-archive"},null,-1),s("span",{class:"d-none d-md-inline"}," Full repo ZIP",-1)])],8,iO)):f("v-if",!0),e.options?.hasWebsite?(l(),d("a",{key:4,target:"_self",class:"btn btn-sm","aria-label":"Website",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[15]||(t[15]=[s("i",{class:"fas fa-globe"},null,-1),s("span",{class:"d-none d-md-inline"}," Website",-1)])],8,aO)):f("v-if",!0)])]),s("div",lO,[De(r,{name:"partials/pageView.htm",state:e.viewState},null,8,["state"])])])])}var dO={class:"paper-faq"};function dl(e,t){return l(),d("div",dO,[...t[0]||(t[0]=[ge('
Help

Answers to the questions that come up most.

If something's missing, write to us \u2014 report a bug on GitHub.

',1),s("div",{class:"paper-faq-body"},[s("aside",{class:"paper-faq-toc"},[s("div",{class:"paper-faq-toc-head"},"Contents"),s("nav",null,[s("a",{href:"#faq-general"},"General"),s("a",{href:"#faq-features"},"Features"),s("a",{href:"#faq-limitations"},"Limitations"),s("a",{href:"#faq-privacy"},"Privacy & Security"),s("a",{href:"#faq-hosting"},"Self-Hosting")])]),s("section",{class:"faq-section","aria-label":"FAQs"},[s("div",null,[f(" General "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-info-circle mr-2"}),y("General ")]),s("div",{class:"panel-group",id:"faq-general",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingWhatIs"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#whatIs","aria-expanded":"false","aria-controls":"whatIs"}," What is Anonymous GitHub? ")])]),s("div",{id:"whatIs",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingWhatIs"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub is a free, open-source tool that anonymizes GitHub repositories and pull requests for double-anonymous (double-blind) peer review. It replaces identifying information \u2014 such as the repository owner, organization name, and custom terms \u2014 so that reviewers cannot determine the identity of the authors through the code repository. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingHowWork"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#howWork","aria-expanded":"false","aria-controls":"howWork"}," How does Anonymous GitHub work? ")])]),s("div",{id:"howWork",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingHowWork"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub either downloads the complete repository and anonymizes the content, or proxies requests to GitHub on the fly. In both cases, the original and anonymized versions of files are cached on the server. The system automatically detects and replaces the repository owner, organization name, and repository name. You can also specify additional custom terms to anonymize using one-per-line regex patterns. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingScope"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#scope","aria-expanded":"false","aria-controls":"scope"}," What is the scope of anonymization? ")])]),s("div",{id:"scope",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingScope"},[s("div",{class:"panel-body p-3"},[s("p",null," In double-anonymous peer review, the boundary of anonymization is the paper plus its online appendix \u2014 not the entire internet. Searching for any part of the paper or the online appendix can be considered a deliberate attempt to break anonymity. Anonymous GitHub anonymizes the repository owner, organization, repository name, file and directory names, and file contents across all text-based file types. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingCost"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#cost","aria-expanded":"false","aria-controls":"cost"}," How much does it cost? ")])]),s("div",{id:"cost",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCost"},[s("div",{class:"panel-body p-3"},[s("p",null,[y(" Anonymous GitHub is completely free to use. However, the server costs hundreds of dollars per year to maintain. If you find the service useful, a small donation would be greatly appreciated. You can support the project by "),s("a",{href:"https://github.com/sponsors/tdurieux/",target:"_blank"},"sponsoring on GitHub"),y(", donating through "),s("a",{href:"https://ko-fi.com/tdurieux",target:"_blank"},"Ko-fi"),y(', or by clicking the "Support me" button on the site. ')])])])])]),f(" Features "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-cogs mr-2"}),y("Features ")]),s("div",{class:"panel-group",id:"faq-features",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingFormats"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#formats","aria-expanded":"false","aria-controls":"formats"}," Which file formats are supported? ")])]),s("div",{id:"formats",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingFormats"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub can display and render a wide variety of file types: "),s("ul",null,[s("li",null,[s("strong",null,"Text and source code"),y(" \u2014 displayed with syntax highlighting")]),s("li",null,[s("strong",null,"Markdown"),y(" \u2014 rendered as formatted HTML")]),s("li",null,[s("strong",null,"Images"),y(" (PNG, JPG, SVG, etc.) \u2014 displayed inline")]),s("li",null,[s("strong",null,"PDFs"),y(" \u2014 rendered directly in the browser")]),s("li",null,[s("strong",null,"Jupyter Notebooks"),y(" \u2014 rendered with code cells and outputs")])]),s("p",null," Only text-based files are anonymized. Anonymous GitHub analyzes the content of each file to determine whether it is textual or binary. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingPR"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#pullRequests","aria-expanded":"false","aria-controls":"pullRequests"}," Can I anonymize pull requests? ")])]),s("div",{id:"pullRequests",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPR"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. In addition to full repositories, Anonymous GitHub supports anonymizing individual pull requests. Simply paste the URL of a GitHub pull request when creating a new anonymized repository, and the system will automatically detect that it is a pull request and anonymize it accordingly. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingConference"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#conference","aria-expanded":"false","aria-controls":"conference"}," What is the Conference ID feature? ")])]),s("div",{id:"conference",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingConference"},[s("div",{class:"panel-body p-3"},[s("p",null," When creating an anonymized repository, you can associate it with a Conference ID. This allows conferences to define default anonymization settings (such as expiration dates) that are automatically applied to repositories submitted under that conference. If your conference provides a Conference ID, enter it during the anonymization setup. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingExpiration"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#expiration","aria-expanded":"false","aria-controls":"expiration"}," What happens when an anonymized repository expires? ")])]),s("div",{id:"expiration",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingExpiration"},[s("div",{class:"panel-body p-3"},[s("p",null," You can configure one of three expiration strategies when creating your anonymized repository: "),s("ul",null,[s("li",null,[s("strong",null,"Never expire"),y(" \u2014 the anonymized repository remains accessible indefinitely.")]),s("li",null,[s("strong",null,"Redirect to GitHub"),y(" \u2014 after expiration, visitors are redirected to the original GitHub repository.")]),s("li",null,[s("strong",null,"Remove content"),y(" \u2014 after expiration, the anonymized content is deleted from the server.")])])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingDownload"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#download","aria-expanded":"false","aria-controls":"download"}," Can I download an anonymized repository? ")])]),s("div",{id:"download",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDownload"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. Anonymized repositories can be downloaded as a ZIP file. This is useful if reviewers want to build or test the code locally. The downloaded archive contains the fully anonymized version of the repository. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingUpdates"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#updates","aria-expanded":"false","aria-controls":"updates"}," Are updates to the original repository reflected in the anonymized version? ")])]),s("div",{id:"updates",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingUpdates"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. The anonymized repository tracks the source on GitHub: when you push new commits to the original repository, the anonymized view picks up those changes (cached files are refreshed against GitHub). This means you can keep iterating on the code while reviewers have the link, and you do not need to recreate the anonymized repository every time you update the source. "),s("p",null," A few practical implications worth keeping in mind: "),s("ul",null,[s("li",null," You can safely create the anonymized repository early in the writing process \u2014 later commits will be visible to reviewers without any additional action. "),s("li",null," If you rename files, add new identifiers, or introduce new contributor names after creation, revisit the anonymization options (custom terms, file filters) to make sure the new content is still properly anonymized. "),s("li",null," If the original repository is made private or deleted, the anonymized repository will no longer be able to fetch updated content. ")])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingCLI"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#cli","aria-expanded":"false","aria-controls":"cli"}," Is there a command-line tool? ")])]),s("div",{id:"cli",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCLI"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. Anonymous GitHub provides a CLI tool that lets you anonymize repositories locally, generating an anonymized ZIP file on your machine. Install it via npm: "),s("pre",{style:{"background-color":"var(--hover-bg-color)",padding:"12px","border-radius":"4px","margin-top":"8px",color:"var(--color)"}},[s("code",null,`npm install -g @tdurieux/anonymous_github anonymous_github`)])])])])]),f(" Limitations "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-exclamation-triangle mr-2"}),y("Limitations ")]),s("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),s("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[s("div",{class:"panel-body p-3"},[s("ul",null,[s("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),s("li",null," Files larger than 8 MB are not supported. "),s("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),s("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),f(" Privacy & Security "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-shield-alt mr-2"}),y("Privacy & Security ")]),s("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),s("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[s("div",{class:"panel-body p-3"},[s("p",null," Data stored on Anonymous GitHub is never shared or used for any purpose beyond providing the anonymization service. When a repository is removed or expires, only its configuration is retained \u2014 this makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),s("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub only reads your repositories \u2014 it never pushes commits, opens issues, modifies settings, or deletes anything. From your perspective as a user, the service is read-only. "),s("p",null,[y(" However, GitHub's OAuth scopes do not offer a read-only option for private repositories: the only scope that grants access to private repos is "),s("code",null,"repo"),y(", which is documented as full read/write access. To support users who want to anonymize a private repository, Anonymous GitHub must request that scope, and GitHub then displays the broader permission text at sign-in. The application itself only ever performs read operations against the GitHub API. ")]),s("p",null,[y(" If you only anonymize public repositories, the source code is open and can be audited on the "),s("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),y(", or you can self-host your own instance. ")])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),s("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[s("div",{class:"panel-body p-3"},[s("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),f(" Self-Hosting "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-server mr-2"}),y("Self-Hosting ")]),s("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),s("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[s("div",{class:"panel-body p-3"},[s("p",null,[y(" Yes. Anonymous GitHub is fully open source (GPL-3.0) and supports Docker-based deployment. You will need to configure a GitHub OAuth app and provide a GitHub token. Detailed setup instructions are available on the "),s("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),y(". ")]),s("p",null," The basic steps are: "),s("ol",null,[s("li",null,"Clone the repository and install dependencies"),s("li",null,[y("Create a "),s("code",null,".env"),y(" file with your GitHub token, OAuth client ID, and client secret")]),s("li",null,[y("Run "),s("code",null,"docker-compose up -d")])])])])])]),s("div",{class:"text-center mt-5 mb-5 p-4",style:{"background-color":"var(--hover-bg-color)","border-radius":"8px"}},[s("p",{class:"mb-2",style:{"font-size":"1.1rem"}}," Still have questions? "),s("p",{class:"text-muted mb-0"},[y(" Open an issue on the "),s("a",{href:"https://github.com/tdurieux/anonymous_github/issues",target:"_blank"},"GitHub repository"),y(" and we'll be happy to help. ")])])])])],-1)])])}var uO={class:"pr-page"},cO={class:"container paper-page pr-page-inner"},pO={class:"pr-header"},fO={class:"paper-page-title pr-title"},mO=["textContent"],hO={key:1,class:"text-muted"},vO=["href"],yO={class:"pr-header-meta"},gO={key:0,class:"pr-meta-item"},bO=["textContent"],wO={key:1,class:"pr-meta-item"},kO=["textContent"],_O={key:2,class:"pr-meta-item"},EO=["textContent"],CO={key:0,class:"paper-tabs",role:"tablist"},NO=["textContent"],SO=["textContent"],DO={class:"paper-tab-content"},RO={key:0},TO={class:"pr-comments"},OO={class:"pr-comment"},AO={class:"pr-comment-head"},IO=["textContent"],VO={key:0,class:"pr-comment-date"},PO={key:0,class:"paper-table-empty"},qO={key:1},MO={class:"pr-comments"},$O={class:"pr-comment"},UO={class:"pr-comment-head"},LO={key:0,class:"pr-comment-author"},FO=["textContent"],zO=["textContent"],HO={key:0,class:"pr-comment-body"},BO={key:0,class:"paper-table-empty"};function ul(e,t){let o=et("gist-file"),r=et("markdown");return l(),d("div",uO,[s("div",cO,[t[15]||(t[15]=s("div",{class:"paper-crumbs"},[s("a",{href:"/dashboard"},"Reviewer"),y(" \xA0/\xA0 "),s("span",{class:"here"},"Gist")],-1)),s("header",pO,[s("h1",fO,[e.details?.description?(l(),d("span",{key:0,textContent:c(e.details?.description)},null,8,mO)):f("v-if",!0),e.details?.description?f("v-if",!0):(l(),d("span",hO,"Untitled gist")),e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:2,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/gist-anonymize/"+e.gistId)},[...t[2]||(t[2]=[s("i",{class:"far fa-edit"},null,-1),s("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,vO)):f("v-if",!0)]),s("div",yO,[s("span",{class:O(["paper-pill",{good:e.details?.isPublic,warn:!e.details?.isPublic}])},c(e.details?.isPublic?"Public":"Secret"),3),e.details?.ownerLogin?(l(),d("span",gO,[t[3]||(t[3]=s("i",{class:"far fa-user"},null,-1)),t[4]||(t[4]=y(" @",-1)),s("span",{textContent:c(e.details?.ownerLogin)},null,8,bO)])):f("v-if",!0),e.details?.updatedDate?(l(),d("span",wO,[t[5]||(t[5]=s("i",{class:"far fa-clock"},null,-1)),t[6]||(t[6]=y()),s("span",{textContent:c(e.fmt?.date(e.details?.updatedDate))},null,8,kO)])):f("v-if",!0),e.details?.anonymizeDate?(l(),d("span",_O,[t[7]||(t[7]=s("i",{class:"fas fa-user-secret"},null,-1)),t[8]||(t[8]=y(" Anonymized ",-1)),s("span",{textContent:c(e.fmt?.date(e.details?.anonymizeDate))},null,8,EO)])):f("v-if",!0)])]),e.details?.files&&e.details?.files?.length||e.details?.comments&&e.details?.comments?.length?(l(),d("nav",CO,[e.details?.files?(l(),d("button",{key:0,class:O(["paper-tab",{active:e.tabState?.active=="files"}]),type:"button",role:"tab",onClick:t[0]||(t[0]=n=>e.tabState.active="files")},[t[9]||(t[9]=s("i",{class:"fas fa-file-code"},null,-1)),s("span",{textContent:c(e.fmt.plural(e.details?.files?.length,{0:"No files",one:"1 file",other:"{} files"}))},null,8,NO)],2)):f("v-if",!0),e.details?.comments?(l(),d("button",{key:1,class:O(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",onClick:t[1]||(t[1]=n=>e.tabState.active="comments")},[t[10]||(t[10]=s("i",{class:"far fa-comment-dots"},null,-1)),s("span",{textContent:c(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,SO)],2)):f("v-if",!0)])):f("v-if",!0),s("div",DO,[e.details?.files&&e.tabState?.active=="files"?(l(),d("div",RO,[s("ul",TO,[(l(!0),d(J,null,ne(e.details?.files,(n,i)=>(l(),d("li",OO,[s("div",AO,[s("strong",{textContent:c(n?.filename)},null,8,IO),n?.language?(l(),d("span",VO,c(n?.language),1)):f("v-if",!0)]),De(o,{file:n},null,8,["file"])]))),256)),e.details?.files?.length?f("v-if",!0):(l(),d("li",PO,[...t[11]||(t[11]=[s("i",{class:"fas fa-file"},null,-1),s("span",null,"No files in this gist.",-1)])]))])])):f("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(l(),d("div",qO,[s("ul",MO,[(l(!0),d(J,null,ne(e.details?.comments,(n,i)=>(l(),d("li",$O,[s("div",UO,[n?.author?(l(),d("span",LO,[t[12]||(t[12]=s("i",{class:"far fa-user"},null,-1)),t[13]||(t[13]=y(" @",-1)),s("span",{textContent:c(n?.author)},null,8,FO)])):f("v-if",!0),n?.updatedDate?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(n?.updatedDate))},null,8,zO)):f("v-if",!0)]),n?.body?(l(),d("div",HO,[De(r,{content:n?.body},null,8,["content"])])):f("v-if",!0)]))),256)),e.details?.comments?.length?f("v-if",!0):(l(),d("li",BO,[...t[14]||(t[14]=[s("i",{class:"far fa-comment-dots"},null,-1),s("span",null,"No comments on this gist.",-1)])]))])])):f("v-if",!0)])])])}var GO={class:"collapse navbar-collapse",id:"navbarSupportedContent"},jO={class:"navbar-nav mr-auto smooth-scroll"},WO={key:0,class:"nav-item"},KO={key:1,class:"nav-item"},YO={key:2,class:"nav-item"},JO={key:3,class:"nav-item"},QO={class:"nav-item"},XO={key:4,class:"nav-item"},ZO={class:"navbar-nav"},xO={key:0,class:"nav-item"},eA={key:1,class:"nav-item"},tA={key:2,class:"nav-item"},sA={key:3,class:"nav-item dropdown user-chip-wrap"},nA={class:"nav-link user-chip dropdown-toggle",href:"#",id:"navbarDropdownMenuLink",role:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},oA=["src"],rA={class:"user-chip-name"},iA={class:"dropdown-menu dropdown-menu-right user-menu","aria-labelledby":"navbarDropdownMenuLink"},aA={class:"dropdown-header"},lA=["innerHTML"];function cl(e,t){return l(),d(J,null,[s("nav",{class:O(["navbar navbar-expand-lg",{"navbar-dark":e.isDarkMode}])},[t[13]||(t[13]=s("a",{class:"navbar-brand",href:"/"},[y("Anonymous "),s("em",null,"GitHub")],-1)),t[14]||(t[14]=s("button",{class:"navbar-toggler",type:"button","data-toggle":"collapse","data-target":"#navbarSupportedContent","aria-controls":"navbarSupportedContent","aria-expanded":"false","aria-label":"Toggle navigation"},[s("span",{class:"navbar-toggler-icon"})],-1)),s("div",GO,[s("ul",jO,[e.user?f("v-if",!0):(l(),d("li",WO,[s("a",{class:O(["nav-link",{active:e.path=="/"}]),href:"/"}," Home ",2)])),e.user?(l(),d("li",KO,[s("a",{class:O(["nav-link",{active:e.path=="/dashboard"}]),href:"/dashboard"},[...t[2]||(t[2]=[s("i",{class:"fas fa-th-large d-lg-none mr-1"},null,-1),y(" My work ",-1)])],2)])):f("v-if",!0),e.user?(l(),d("li",YO,[s("a",{class:O(["nav-link",{active:e.path=="/anonymize"||e.path=="/pull-request-anonymize"}]),href:"/anonymize"},[...t[3]||(t[3]=[s("i",{class:"fas fa-user-secret d-lg-none mr-1"},null,-1),y(" Anonymize ",-1)])],2)])):f("v-if",!0),e.user?(l(),d("li",JO,[s("a",{class:O(["nav-link",{active:e.path=="/conferences"}]),href:"/conferences"},[...t[4]||(t[4]=[s("i",{class:"fas fa-chalkboard-teacher d-lg-none mr-1"},null,-1),y(" Conferences ",-1)])],2)])):f("v-if",!0),s("li",QO,[s("a",{class:O(["nav-link",{active:e.path=="/faq"}]),href:"/faq"},[...t[5]||(t[5]=[s("i",{class:"fas fa-question-circle d-lg-none mr-1"},null,-1),y("FAQ",-1)])],2)]),e.user&&e.user?.isAdmin?(l(),d("li",XO,[s("a",{class:O(["nav-link",{active:e.path?.indexOf("/admin")===0}]),href:"/admin/"},[...t[6]||(t[6]=[s("i",{class:"fas fa-cog d-lg-none mr-1"},null,-1),y(" Admin ",-1)])],2)])):f("v-if",!0)]),s("ul",ZO,[t[11]||(t[11]=s("li",{class:"nav-item"},[s("a",{class:"nav-link nav-icon",target:"_blank",href:"https://github.com/tdurieux/anonymous_github/",title:"Anonymous GitHub source code","aria-label":"Anonymous GitHub source code on GitHub",rel:"noopener","data-offset":"30"},[s("i",{class:"fab fa-github","aria-hidden":"true"})])],-1)),f(` "Report a bug" is about this service. Reviewers who land on an anonymized repository often think it is about the paper, so the label names the service and the tooltip says who to contact. `),t[12]||(t[12]=s("li",{class:"nav-item d-none d-lg-block"},[s("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[s("i",{class:"fas fa-bug d-lg-none mr-1","aria-hidden":"true"}),y("Report a bug ")])],-1)),e.isDarkMode?f("v-if",!0):(l(),d("li",xO,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=we(o=>{e.darkMode(!0)},["prevent"]))},[...t[7]||(t[7]=[s("i",{class:"fas fa-moon","aria-hidden":"true"},null,-1)])])])),e.isDarkMode?(l(),d("li",eA,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=we(o=>{e.darkMode(!1)},["prevent"]))},[...t[8]||(t[8]=[s("i",{class:"fas fa-sun","aria-hidden":"true"},null,-1)])])])):f("v-if",!0),e.user?f("v-if",!0):(l(),d("li",tA,[...t[9]||(t[9]=[s("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[s("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?(l(),d("li",sA,[s("a",nA,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,oA)):f("v-if",!0),s("span",rA,c(e.user?.username),1)]),s("div",iA,[s("h6",aA,"Signed in as @"+c(e.user?.username),1),t[10]||(t[10]=ge('SettingsDefaults, quotas, accountGitHub connectionsRepository access and OAuthClaim an anonymizationAttach an existing mirror to your accountReport a bugAbout this service, not a paperSource codeSign out',8))])])):f("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,lA)):f("v-if",!0)],64)}var dA={class:"paper-landing"},uA={class:"paper-hero"},cA={class:"paper-hero-copy"},pA={class:"paper-cta-row"},fA={key:0,href:"/signin",target:"_self",class:"btn-hero"},mA={key:1,href:"/anonymize",class:"btn-hero"},hA={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},vA={class:"paper-stats-grid"},yA={class:"paper-stat-value"},gA={class:"paper-stat-label"},bA=["viewBox"],wA=["x","y","width","height"],kA={key:1,class:"paper-stat-delta"},_A={class:"paper-features paper-wrap","aria-label":"Product features"},EA={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},CA=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],NA={class:"paper-eyebrow"},SA={class:"paper-feature-title"},DA={class:"paper-feature-more"},RA={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},TA=["href","target"],OA={class:"paper-features-stage"},AA=["id","aria-labelledby"],IA={class:"paper-frame"},VA={class:"paper-frame-bar","aria-hidden":"true"},PA={class:"url"},qA=["src","alt"],MA={class:"paper-footer"},$A={class:"paper-footer-inner"},UA={class:"paper-footer-col"},LA={key:0,href:"/dashboard"},FA={key:1,href:"/conferences"},zA={class:"paper-footer-foot"};function pl(e,t){return l(),d("div",dA,[f(" Hero: copy on the left, the product on the right "),s("section",uA,[s("div",cA,[t[2]||(t[2]=s("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=s("h1",{class:"hero-title"},[y(" Share the code,"),s("br"),s("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=s("p",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist with every trace of identity removed, so you can attach a link to your submission without breaking anonymity. ",-1)),s("div",pA,[e.user?f("v-if",!0):(l(),d("a",fA,[...t[0]||(t[0]=[s("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),y("Sign in with GitHub ",-1)])])),e.user?(l(),d("a",mA," Anonymize a repository \u2192 ")):f("v-if",!0),t[1]||(t[1]=s("a",{class:"paper-link-arrow",target:"_self",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/"},"See an anonymized repository \u2192",-1))]),t[5]||(t[5]=s("ul",{class:"paper-reassure"},[s("li",null,"Free and open source"),s("li",null,"Read-only: never writes to your repos"),s("li",null,"Expires on the date you set")],-1))]),t[6]||(t[6]=ge('
The anonymize form with a live README preview showing the redactions
',1))]),f(" Proof "),t[16]||(t[16]=ge('
Trusted by authors at
ICSEFSEOOPSLA
',1)),f(" Live stats "),s("section",hA,[t[7]||(t[7]=s("div",{class:"paper-stats-meta"},[s("div",{class:"paper-stats-meta-left"},"Live \xB7 last 60 days"),s("div",{class:"paper-stats-meta-right"},[s("span",{class:"paper-stats-dot","aria-hidden":"true"}),y(" updated daily ")])],-1)),s("div",vA,[(l(!0),d(J,null,ne(e.cards,(o,r)=>(l(),d("div",{class:"paper-stat-card",key:o?.key},[s("div",yA,c(e.fmt?.bigNum(o?.total)),1),s("div",gA,c(o?.label),1),e.history[o?.key].bars?.length>1?(l(),d("svg",{key:0,class:"paper-stat-bars",preserveAspectRatio:"none","aria-hidden":"true",viewBox:"0 0 "+e.history[o?.key].viewW+" 36"},[(l(!0),d(J,null,ne(e.history[o?.key].bars,(n,i)=>(l(),d("rect",{key:i,class:O({"is-latest":i===e.history[o.key].bars.length-1}),x:n?.x,y:n?.y,width:n?.w,height:n?.h},null,10,wA))),128))],8,bA)):f("v-if",!0),e.history[o?.key].bars?.length>1?(l(),d("div",kA," +"+c(e.fmt?.number(e.history[o?.key].deltaToday))+" today ",1)):f("v-if",!0)]))),128))])]),f(" Before / after "),t[17]||(t[17]=s("section",{class:"paper-section-head paper-wrap"},[s("div",null,[s("div",{class:"paper-eyebrow"},"Before \xB7 after"),s("h2",null,[y("The same repository, "),s("em",null,"minus you.")])]),s("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),t[18]||(t[18]=s("div",{class:"paper-preview paper-wrap","aria-label":"Before and after example"},[s("div",{class:"pane"},[s("div",{class:"pane-header"},[s("span",{class:"pane-label"},"Before \xB7 your repo"),s("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")]),s("div",{class:"pane-body"},[s("div",null,[s("span",{class:"tok"},"#"),y(),s("strong",null,"DeepLearnUtils")]),s("div",null,"Developed by Jane Smith at MIT CSAIL."),s("div",null,"See Smith et\xA0al., \u201CAttention That Works,\u201D 2026."),s("div",null,"Contact: jane.smith@mit.edu")])]),s("div",{class:"pane"},[s("div",{class:"pane-header"},[s("span",{class:"pane-label"},"After \xB7 anonymous mirror"),s("span",{class:"pane-url"},"anonymous.4open.science/r/paper-7f2a")]),s("div",{class:"pane-body"},[s("div",null,[s("span",{class:"tok"},"#"),y(),s("strong",null,"DeepLearnUtils")]),s("div",null,[y("Developed by "),s("span",{class:"redact",role:"img","aria-label":"redacted author name"},"XXXX-1"),y(" at "),s("span",{class:"redact",role:"img","aria-label":"redacted affiliation"},"XXXX-2"),y(".")]),s("div",null,[y("See "),s("span",{class:"redact",role:"img","aria-label":"redacted author name"},"XXXX-1"),y(" et\xA0al., \u201CAttention That Works,\u201D 2026.")]),s("div",null,[y("Contact: "),s("span",{class:"redact",role:"img","aria-label":"redacted email address"},"XXXX-3")])])])],-1)),f(" What you get: one screenshot, three tabs "),t[19]||(t[19]=s("section",{class:"paper-section-head paper-wrap",id:"about"},[s("div",null,[s("div",{class:"paper-eyebrow"},"What you get"),s("h2",null,[y("Anonymize, review, "),s("em",null,"manage.")])]),s("p",null," Every mirror is read-only and passes through the same filter, from the README to a PDF's link targets. Monitor it, update it, or remove it the day the decision is out. ")],-1)),s("section",_A,[s("div",EA,[(l(!0),d(J,null,ne(e.features,(o,r)=>(l(),d("div",{class:O(["paper-feature",{"is-on":e.feature===o?.key}]),key:o?.key},[s("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:n=>e.selectFeature(o.key),onKeydown:n=>e.featureKeydown(n,r),id:"feature-tab-"+o?.key,"aria-controls":"feature-panel-"+o?.key,"aria-selected":e.feature===o?.key,tabindex:e.feature===o?.key?0:-1},[s("span",NA,c(o?.num)+" \xB7 "+c(o?.eyebrow),1),s("span",SA,[y(c(o?.title)+" ",1),s("em",null,c(o?.accent),1)])],40,CA),s("div",DA,[s("span",RA,[y(c(o?.title)+" ",1),s("em",null,c(o?.accent),1)]),s("p",null,c(o?.text),1),s("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(o)),target:e.featureTarget(o)},c(o?.cta)+" \u2192",9,TA)])],2))),128))]),s("div",OA,[(l(!0),d(J,null,ne(e.features,(o,r)=>E((l(),d("div",{class:"paper-feature-panel",role:"tabpanel",key:o?.key,id:"feature-panel-"+o?.key,"aria-labelledby":"feature-tab-"+o?.key},[s("div",IA,[s("div",VA,[t[8]||(t[8]=s("span",{class:"dots"},[s("i"),s("i"),s("i")],-1)),s("span",PA,c(o?.url),1)]),s("div",{class:O("paper-crop paper-crop-"+o?.key)},[s("img",{loading:"lazy",width:"2880",height:"1800",src:e.safeUrl(o?.img),alt:o?.alt},null,8,qA)],2)])],8,AA)),[[B,e.feature===o?.key]])),128))])]),f(" FAQ teaser "),t[20]||(t[20]=ge('
Before you sign in

The questions that come up most.

Read the full FAQ \u2192
Why does GitHub ask for write access at sign-in?

GitHub's OAuth scopes have no read-only option for private repositories. Anonymous GitHub only ever reads your repositories; it never pushes, modifies, or deletes anything.

Which file formats are supported?

Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Everything passes through the same redaction filter.

What happens when an anonymized repository expires?

You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over.

',1)),s("footer",MA,[s("div",$A,[t[12]||(t[12]=s("div",{class:"paper-footer-brand"},[s("div",{class:"paper-footer-mark"},[y("Anonymous "),s("em",null,"GitHub")]),s("p",{class:"paper-footer-tag"}," A read-only, identity-stripped mirror of your repository, built for double-blind peer review. ")],-1)),s("div",UA,[t[9]||(t[9]=s("div",{class:"paper-footer-head"},"Product",-1)),t[10]||(t[10]=s("a",{href:"/anonymize"},"Anonymize",-1)),e.user?(l(),d("a",LA,"My work")):f("v-if",!0),e.user?(l(),d("a",FA,"Conferences")):f("v-if",!0),t[11]||(t[11]=s("a",{href:"/faq"},"FAQ",-1))]),t[13]||(t[13]=ge('',2))]),t[15]||(t[15]=s("div",{class:"paper-footer-rule"},null,-1)),s("div",zA,[s("span",null,"\xA9 "+c(e.year||2026)+" Anonymous GitHub \xB7 MIT licensed",1),t[14]||(t[14]=s("span",{class:"paper-footer-meta"},"Built for reviewers, by researchers.",-1))])])])}var HA={class:"paper-empty"},BA={class:"paper-empty-inner"},GA={key:0,class:"paper-eyebrow"},jA={key:1,class:"paper-eyebrow"},WA={key:2,class:"paper-empty-title"},KA=["textContent"];function fl(e,t){return l(),d("div",HA,[s("div",BA,[e.error?f("v-if",!0):(l(),d("div",GA,"Working")),e.error?(l(),d("div",jA,"Error")):f("v-if",!0),e.error?f("v-if",!0):(l(),d("h1",WA,[...t[0]||(t[0]=[y(" Loading",-1),s("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(l(),d("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,KA)):f("v-if",!0)])])}var YA={class:"container paper-page paper-settings"},JA={class:"paper-crumbs"},QA={class:"here"},XA={class:"paper-page-title"},ZA={class:"paper-settings-body"},xA={class:"paper-settings-toc"},eI={href:"#conf-billing"},tI={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},sI={id:"conf-basics",class:"paper-settings-section"},nI={class:"form-group"},oI={class:"invalid-feedback"},rI={class:"invalid-feedback"},iI={class:"form-group"},aI={class:"invalid-feedback"},lI={class:"form-group"},dI={class:"invalid-feedback"},uI={class:"invalid-feedback"},cI={id:"conf-window",class:"paper-settings-section"},pI={class:"form-grid-2"},fI={class:"form-group"},mI={class:"invalid-feedback"},hI={class:"invalid-feedback"},vI={class:"form-group"},yI={class:"invalid-feedback"},gI={class:"invalid-feedback"},bI={id:"conf-rendering",class:"paper-settings-section"},wI={class:"form-check"},kI={class:"form-check-input",type:"checkbox",id:"link",name:"link"},_I={class:"form-check"},EI={class:"form-check-input",type:"checkbox",id:"image",name:"image"},CI={class:"form-check"},NI={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},SI={class:"form-check"},DI={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},RI={id:"conf-features",class:"paper-settings-section"},TI={class:"form-check"},OI={class:"form-check-input",type:"checkbox",id:"update",name:"update"},AI={class:"form-check"},II={class:"form-check-input",type:"checkbox",id:"page",name:"page"},VI={id:"conf-plan",class:"paper-settings-section"},PI={class:"paper-plan-grid"},qI=["value"],MI=["textContent"],$I={class:"paper-plan-price"},UI=["innerHTML"],LI={key:0,id:"conf-billing",class:"paper-settings-section"},FI={class:"form-group"},zI={class:"form-group"},HI={class:"form-group"},BI={class:"form-group"},GI={class:"form-grid-3"},jI={class:"form-group"},WI={class:"form-group"},KI={class:"form-group"},YI={class:"form-group"},JI={class:"paper-settings-footer"},QI=["textContent"],XI=["textContent"];function ml(e,t){let o=be("paper-scrollspy"),r=be("field"),n=be("form");return l(),d("div",YA,[s("div",JA,[t[1]||(t[1]=s("a",{href:"/dashboard"},"My work",-1)),t[2]||(t[2]=y(" \xA0/\xA0 ",-1)),t[3]||(t[3]=s("a",{href:"/conferences"},"Conferences",-1)),t[4]||(t[4]=y(" \xA0/\xA0 ",-1)),s("span",QA,c(e.editionMode?"Edit":"New"),1)]),s("h1",XA,[y(c(e.editionMode?"Edit":"Create a")+" ",1),t[5]||(t[5]=s("em",null,"conference",-1))]),t[42]||(t[42]=s("p",{class:"paper-page-lede"}," Give chairs access to every anonymization submitted to a venue, and lift author quotas during the review window. ",-1)),s("div",ZA,[E((l(),d("aside",xA,[t[7]||(t[7]=s("div",{class:"paper-settings-toc-head"},"On this page",-1)),s("nav",null,[t[6]||(t[6]=ge('BasicsReview windowRendering defaultsFeaturesPlan',5)),E(s("a",eI,"Billing",512),[[B,e.plan?.pricePerRepo>0]])])])),[[o]]),E((l(),d("form",tI,[s("section",sI,[t[12]||(t[12]=s("div",{class:"paper-section-eyebrow"},"Basics",-1)),s("div",nI,[t[8]||(t[8]=s("label",{class:"paper-field-label",for:"name"},"Conference name",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.conference?.name?.invalid&&(e.conference?.name?.touched||e.conference?.submitted)}]),name:"name",id:"name",required:"",placeholder:"e.g. International Conference on Software Engineering"},null,2),[[r,{state:e.viewState,set:i=>{e.options.name=i},value:e.options?.name,form:"conference",options:{}}]]),E(s("div",oI," The name of the conference is invalid. ",512),[[B,e.conference?.name?.errors?.invalid]]),E(s("div",rI," The name of the conference is required. ",512),[[B,e.conference?.name?.errors?.required]])]),s("div",iI,[t[9]||(t[9]=s("label",{class:"paper-field-label",for:"url"},"Website",-1)),E(s("input",{type:"url",class:O(["form-control",{"is-invalid":e.conference?.url?.invalid&&(e.conference?.url?.touched||e.conference?.submitted)}]),name:"url",id:"url",placeholder:"https://example.org"},null,2),[[r,{state:e.viewState,set:i=>{e.options.url=i},value:e.options?.url,form:"conference",options:{}}]]),E(s("div",aI," The url of the conference is invalid. ",512),[[B,e.conference?.url?.errors?.invalid]])]),s("div",lI,[t[10]||(t[10]=s("label",{class:"paper-field-label",for:"conferenceID"},"Conference ID",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.conference?.conferenceID?.invalid&&(e.conference?.conferenceID?.touched||e.conference?.submitted)}]),name:"conferenceID",id:"conferenceID",required:"",pattern:"[a-zA-Z0-9\\-_]{3,10}",placeholder:"ICSE26"},null,2),[[r,{state:e.viewState,set:i=>{e.options.conferenceID=i},value:e.options?.conferenceID,form:"conference",options:{}}]]),t[11]||(t[11]=s("small",{class:"form-text text-muted"},[y("3\u201310 characters, letters, numbers, "),s("code",null,"-"),y(" and "),s("code",null,"_"),y(". Authors reference this when they anonymize.")],-1)),E(s("div",{class:"invalid-feedback"}," The conference ID '"+c(e.options?.conferenceID)+"' is already used. ",513),[[B,e.conference?.conferenceID?.errors?.used]]),E(s("div",dI," The conference ID is required. ",512),[[B,e.conference?.conferenceID?.errors?.required]]),E(s("div",uI," The format of the conference ID is incorrect ([a-zA-Z0-9-_]{3,10}). ",512),[[B,e.conference?.conferenceID?.errors?.pattern]])])]),s("section",cI,[t[17]||(t[17]=s("div",{class:"paper-section-eyebrow"},"Review window",-1)),s("div",pI,[s("div",fI,[t[13]||(t[13]=s("label",{class:"paper-field-label",for:"startDate"},"Start date",-1)),E(s("input",{type:"date",class:O(["form-control",{"is-invalid":e.conference?.startDate?.invalid&&(e.conference?.startDate?.touched||e.conference?.submitted)}]),name:"startDate",id:"startDate",required:""},null,2),[[r,{state:e.viewState,set:i=>{e.options.startDate=i},value:e.options?.startDate,form:"conference",options:{}}]]),t[14]||(t[14]=s("small",{class:"form-text text-muted"},"Beginning of the review process.",-1)),E(s("div",mI," Start date is required. ",512),[[B,e.conference?.startDate?.errors?.required]]),E(s("div",hI," Start date must be before end date. ",512),[[B,e.conference?.startDate?.errors?.invalid]])]),s("div",vI,[t[15]||(t[15]=s("label",{class:"paper-field-label",for:"endDate"},"End date",-1)),E(s("input",{type:"date",class:O(["form-control",{"is-invalid":e.conference?.endDate?.invalid&&(e.conference?.endDate?.touched||e.conference?.submitted)}]),name:"endDate",id:"endDate",required:""},null,2),[[r,{state:e.viewState,set:i=>{e.options.endDate=i},value:e.options?.endDate,form:"conference",options:{}}]]),t[16]||(t[16]=s("small",{class:"form-text text-muted"},"All repositories expire on this date.",-1)),E(s("div",yI," End date is required. ",512),[[B,e.conference?.endDate?.errors?.required]]),E(s("div",gI," End date is invalid. ",512),[[B,e.conference?.endDate?.errors?.invalid]])])])]),s("section",bI,[t[25]||(t[25]=s("div",{class:"paper-section-eyebrow"},"Rendering defaults",-1)),s("div",wI,[E(s("input",kI,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.link=i},value:e.options?.options?.link,form:"conference",options:{}}]]),t[18]||(t[18]=s("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[19]||(t[19]=s("small",{class:"form-text text-muted"},"Keep or remove all links from text files.",-1))]),s("div",_I,[E(s("input",EI,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.image=i},value:e.options?.options?.image,form:"conference",options:{}}]]),t[20]||(t[20]=s("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[21]||(t[21]=s("small",{class:"form-text text-muted"},"Images are not anonymized.",-1))]),s("div",CI,[E(s("input",NI,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.pdf=i},value:e.options?.options?.pdf,form:"conference",options:{}}]]),t[22]||(t[22]=s("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[23]||(t[23]=s("small",{class:"form-text text-muted"},"PDFs are not anonymized.",-1))]),s("div",SI,[E(s("input",DI,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.notebook=i},value:e.options?.options?.notebook,form:"conference",options:{}}]]),t[24]||(t[24]=s("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))])]),s("section",RI,[t[30]||(t[30]=s("div",{class:"paper-section-eyebrow"},"Features",-1)),s("div",TI,[E(s("input",OI,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.update=i},value:e.options?.options?.update,form:"conference",options:{}}]]),t[26]||(t[26]=s("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[27]||(t[27]=s("small",{class:"form-text text-muted"},"Pull the latest commit automatically (hourly maximum).",-1))]),s("div",AI,[E(s("input",II,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.page=i},value:e.options?.options?.page,form:"conference",options:{}}]]),t[28]||(t[28]=s("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),t[29]||(t[29]=s("small",{class:"form-text text-muted"},"Enable anonymized GitHub pages.",-1))])]),s("section",VI,[t[32]||(t[32]=s("div",{class:"paper-section-eyebrow"},"Plan",-1)),t[33]||(t[33]=s("p",{class:"paper-section-copy"},"Billed per repository per month, prorated by the day for as long as a repository stays in the conference.",-1)),s("div",PI,[(l(!0),d(J,null,ne(e.plans,(i,a)=>(l(),d("label",{class:O(["paper-plan-card",{selected:e.options?.plan?.planID==i?.id}])},[E(s("input",{type:"radio",name:"planPicker",value:i?.id},null,8,qI),[[r,{state:e.viewState,set:u=>{e.options.plan.planID=u},value:e.options?.plan?.planID,form:"conference",options:{}}]]),s("div",{class:"paper-plan-head",textContent:c(i?.name)},null,8,MI),s("div",$I,[y(c(e.fmt?.number(i?.pricePerRepo))+"\u20AC ",1),t[31]||(t[31]=s("span",{class:"paper-plan-per"},"/ repo / month",-1))]),s("div",{class:"paper-plan-desc",innerHTML:e.sanitize(i?.description)},null,8,UI)],2))),256))])]),e.plan?.pricePerRepo>0?(l(),d("section",LI,[t[41]||(t[41]=s("div",{class:"paper-section-eyebrow"},"Billing",-1)),s("div",FI,[t[34]||(t[34]=s("label",{class:"paper-field-label",for:"billing_name"},"Name",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.conference?.billing_name?.invalid&&(e.conference?.billing_name?.touched||e.conference?.submitted)}]),name:"billing_name",id:"billing_name",required:"",placeholder:"First & last name"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.name=i},value:e.options?.billing?.name,form:"conference",options:{}}]])]),s("div",zI,[t[35]||(t[35]=s("label",{class:"paper-field-label",for:"email"},"Email",-1)),E(s("input",{type:"email",class:O(["form-control",{"is-invalid":e.conference?.email?.invalid&&(e.conference?.email?.touched||e.conference?.submitted)}]),name:"email",id:"email",required:"",placeholder:"you@example.org"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.email=i},value:e.options?.billing?.email,form:"conference",options:{}}]])]),s("div",HI,[t[36]||(t[36]=s("label",{class:"paper-field-label",for:"inputAddress"},"Address",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.conference?.inputAddress?.invalid&&(e.conference?.inputAddress?.touched||e.conference?.submitted)}]),name:"inputAddress",id:"inputAddress",required:"",placeholder:"1234 Main St"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.address=i},value:e.options?.billing?.address,form:"conference",options:{}}]])]),s("div",BI,[E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.conference?.inputAddress2?.invalid&&(e.conference?.inputAddress2?.touched||e.conference?.submitted)}]),name:"inputAddress2",id:"inputAddress2",placeholder:"Apartment, studio, or floor"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.address2=i},value:e.options?.billing?.address2,form:"conference",options:{}}]])]),s("div",GI,[s("div",jI,[t[37]||(t[37]=s("label",{class:"paper-field-label",for:"city"},"City",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.conference?.city?.invalid&&(e.conference?.city?.touched||e.conference?.submitted)}]),name:"city",id:"city",required:"",placeholder:"City"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.city=i},value:e.options?.billing?.city,form:"conference",options:{}}]])]),s("div",WI,[t[38]||(t[38]=s("label",{class:"paper-field-label",for:"country"},"Country",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.conference?.country?.invalid&&(e.conference?.country?.touched||e.conference?.submitted)}]),name:"country",id:"country",required:"",placeholder:"Country"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.country=i},value:e.options?.billing?.country,form:"conference",options:{}}]])]),s("div",KI,[t[39]||(t[39]=s("label",{class:"paper-field-label",for:"zip"},"Zip",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.conference?.zip?.invalid&&(e.conference?.zip?.touched||e.conference?.submitted)}]),name:"zip",id:"zip",required:"",placeholder:"Zip"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.zip=i},value:e.options?.billing?.zip,form:"conference",options:{}}]])])]),s("div",YI,[t[40]||(t[40]=s("label",{class:"paper-field-label",for:"vat"},"VAT number",-1)),E(s("input",{type:"text",class:O(["form-control",{"is-invalid":e.conference?.vat?.invalid&&(e.conference?.vat?.touched||e.conference?.submitted)}]),name:"vat",id:"vat",placeholder:"VAT Number"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.vat=i},value:e.options?.billing?.vat,form:"conference",options:{}}]])])])):f("v-if",!0),s("div",JI,[e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,QI)):f("v-if",!0),e.message?(l(),d("div",{key:1,class:"alert alert-success",role:"alert",textContent:c(e.message)},null,8,XI)):f("v-if",!0),s("button",{id:"send",type:"submit",class:"btn btn-ink",onClick:t[0]||(t[0]=we(i=>e.submitForm(i,()=>{e.submit(i)}),["prevent"]))},c(e.editionMode?"Update":"Create")+" conference ",1)])])),[[n,e.viewState]])])])}var ZI={key:0},xI=["innerHTML"],eV={key:3},tV=["src"],sV=["src"],nV={key:7},oV={controls:"controls"},rV=["src"],iV={key:8},aV={key:9,class:"file-error container d-flex h-100"},lV={class:"paper-ratelimit-card m-auto",style:{"max-width":"520px"}},dV={class:"paper-error-msg"},uV={key:10,class:"file-error container d-flex h-100"},cV=["textContent"],pV={key:11,class:"file-error container d-flex h-100"},fV={key:12,class:"file-error container d-flex h-100"},mV={key:13,class:"file-error container d-flex h-100"},hV={key:14,class:"file-error container d-flex h-100"},vV={class:"paper-empty-title m-auto"},yV=["href"];function hl(e,t){let o=et("html-doc"),r=et("pdfviewer"),n=et("notebook"),i=be("code-editor");return l(),d(J,null,[e.type=="text"?E((l(),d("div",ZI,null,512)),[[i,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"?(l(),d("div",{key:1,class:"file-content markdown-body",innerHTML:e.sanitize(e.content)},null,8,xI)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(l(),ks(o,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),(e.type=="code"||e.type=="html-doc"&&e.showSource)&&e.content!=null?E((l(),d("div",eV,null,512)),[[i,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="image"?(l(),d("img",{key:4,class:"image-content",src:e.safeUrl(e.url)},null,8,tV)):f("v-if",!0),e.type=="media"?(l(),d("iframe",{key:5,class:"h-100 overflow-auto w-100 b-0",src:e.safeUrl(e.url)},null,8,sV)):f("v-if",!0),e.type=="pdf"?(l(),ks(r,{key:6,src:e.safeUrl(e.url)},null,8,["src"])):f("v-if",!0),e.type=="audio"?(l(),d("div",nV,[s("audio",oV,[s("source",{src:e.safeUrl(e.url)},null,8,rV)])])):f("v-if",!0),e.type=="IPython"?(l(),d("div",iV,[De(n,{file:e.url,content:e.content},null,8,["file","content"])])):f("v-if",!0),e.type=="rate_limited"?(l(),d("div",aV,[s("div",lV,[t[2]||(t[2]=s("div",{class:"paper-ratelimit-head"},[s("i",{class:"fas fa-hourglass-half"}),s("div",null,[s("div",{class:"paper-error-eyebrow"},"Temporarily paused"),s("div",{class:"paper-error-title"},"GitHub API rate limit reached")])],-1)),s("p",dV,[t[0]||(t[0]=y("This repository will be available in ",-1)),s("strong",null,c(e.rateLimitCountdown),1),t[1]||(t[1]=y(". The page will reload automatically.",-1))])])])):f("v-if",!0),e.type=="error"?(l(),d("div",uV,[s("h1",{class:"paper-empty-title m-auto",textContent:c(e.fmt.translate("ERRORS."+e.content))},null,8,cV)])):f("v-if",!0),e.type=="loading"&&!e.error?(l(),d("div",pV,[...t[3]||(t[3]=[s("h1",{class:"paper-empty-title m-auto"},"Loading\u2026",-1)])])):f("v-if",!0),e.type=="empty"?(l(),d("div",fV,[...t[4]||(t[4]=[s("h1",{class:"paper-empty-title m-auto"},[y("Empty "),s("em",null,"repository"),y(".")],-1)])])):f("v-if",!0),e.content==null&&e.type!="empty"?(l(),d("div",mV,[...t[5]||(t[5]=[s("h1",{class:"paper-empty-title m-auto"},[y("Empty "),s("em",null,"file"),y(".")],-1)])])):f("v-if",!0),e.type=="binary"?(l(),d("div",hV,[s("h1",vV,[t[6]||(t[6]=y("Unsupported ",-1)),t[7]||(t[7]=s("em",null,"binary file",-1)),t[8]||(t[8]=y(". You can ",-1)),s("a",{target:"_blank",href:e.safeUrl(e.url+"&download=true")},"download it",8,yV),t[9]||(t[9]=y(".",-1))])])):f("v-if",!0)],64)}var gV={class:"container page dashboard-page paper-page"},bV={class:"row"},wV={class:"w-100"},kV={class:"w-100","aria-label":"Pull Requests","accept-charset":"UTF-8"},_V={class:"d-flex flex-column flex-md-row align-items-md-center",style:{gap:"8px"}},EV={class:"flex-grow-1"},CV={type:"search",id:"search",class:"form-control","aria-label":"Find a pull request...",placeholder:"Find a pull request...",autocomplete:"off"},NV={class:"d-flex flex-wrap",style:{gap:"6px"}},SV={class:"dropdown"},DV={class:"dropdown-menu","aria-labelledby":"dropdownSort"},RV={class:"form-check dropdown-item"},TV={class:"form-check-input",type:"radio",name:"sort",id:"sortFullName",value:"fullName"},OV={class:"form-check dropdown-item"},AV={class:"form-check-input",type:"radio",name:"sort",id:"sortAnonymizeDate",value:"-anonymizeDate"},IV={class:"form-check dropdown-item"},VV={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},PV={class:"form-check dropdown-item"},qV={class:"form-check-input",type:"radio",name:"sort",id:"sortLastView",value:"-lastView"},MV={class:"form-check dropdown-item"},$V={class:"form-check-input",type:"radio",name:"sort",id:"sortPageView",value:"-pageView"},UV={class:"dropdown"},LV={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},FV={class:"form-check dropdown-item"},zV={class:"form-check-input",type:"checkbox",name:"sort",id:"statusReady",value:"ready"},HV={class:"form-check dropdown-item"},BV={class:"form-check-input",type:"checkbox",name:"sort",id:"statusExpired",value:"expired"},GV={class:"form-check dropdown-item"},jV={class:"form-check-input",type:"checkbox",name:"sort",id:"statusRemoved",value:"removed"},WV={class:"d-flex flex-wrap mt-2",style:{gap:"6px"}},KV={class:"filter-chip"},YV=["onClick"],JV={class:"repo-list w-100"},QV={class:"repo-list-item-content"},XV={class:"repo-list-item-main"},ZV={class:"repo-list-item-header"},xV=["textContent","href"],eP=["textContent"],tP=["textContent"],sP={class:"repo-source"},nP=["href"],oP={class:"repo-date"},rP={class:"repo-meta"},iP={key:0,title:"Conference"},aP=["title"],lP=["title"],dP=["title"],uP={key:1},cP={class:"repo-list-item-actions"},pP={class:"dropdown"},fP={class:"dropdown-menu dropdown-menu-right"},mP=["href"],hP=["onClick"],vP=["onClick"],yP=["onClick"],gP=["href"],bP={key:0,class:"repo-list-empty"};function vl(e,t){let o=be("field"),r=be("form");return l(),d("div",gV,[s("div",bV,[s("div",wV,[t[12]||(t[12]=ge('
My work \xA0/\xA0 Pull requests

Anonymized pull requests

Track PR mirrors you\u2019ve created and their reviewer traffic.

',2)),f(" Search + filters row "),E((l(),d("form",kV,[s("div",_V,[s("div",EV,[E(s("input",CV,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",NV,[s("div",SV,[t[6]||(t[6]=s("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Sort ",-1)),s("div",DV,[t[5]||(t[5]=s("h6",{class:"dropdown-header"},"Select order",-1)),s("div",RV,[E(s("input",TV,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[0]||(t[0]=s("label",{class:"form-check-label",for:"sortFullName"},"Pull Request",-1))]),s("div",OV,[E(s("input",AV,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[1]||(t[1]=s("label",{class:"form-check-label",for:"sortAnonymizeDate"},"Anonymize Date",-1))]),s("div",IV,[E(s("input",VV,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[2]||(t[2]=s("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),s("div",PV,[E(s("input",qV,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=s("label",{class:"form-check-label",for:"sortLastView"},"Last View",-1))]),s("div",MV,[E(s("input",$V,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=s("label",{class:"form-check-label",for:"sortPageView"},"Page View",-1))])])]),s("div",UV,[t[11]||(t[11]=s("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Status ",-1)),s("div",LV,[t[10]||(t[10]=s("h6",{class:"dropdown-header"},"Select status",-1)),s("div",FV,[E(s("input",zV,null,512),[[o,{state:e.viewState,set:n=>{e.filters.status.ready=n},value:e.filters?.status?.ready,form:null,options:{}}]]),t[7]||(t[7]=s("label",{class:"form-check-label",for:"statusReady"},"Ready",-1))]),s("div",HV,[E(s("input",BV,null,512),[[o,{state:e.viewState,set:n=>{e.filters.status.expired=n},value:e.filters?.status?.expired,form:null,options:{}}]]),t[8]||(t[8]=s("label",{class:"form-check-label",for:"statusExpired"},"Expired",-1))]),s("div",GV,[E(s("input",jV,null,512),[[o,{state:e.viewState,set:n=>{e.filters.status.removed=n},value:e.filters?.status?.removed,form:null,options:{}}]]),t[9]||(t[9]=s("label",{class:"form-check-label",for:"statusRemoved"},"Removed",-1))])])])])])])),[[r,e.viewState]]),f(" Active filter chips "),E(s("div",WV,[(l(!0),d(J,null,ne(e.filters?.status,(n,i,a)=>E((l(),d("span",KV,[y(c(e.fmt?.title(i))+" ",1),s("button",{type:"button",class:"filter-chip-close","aria-label":"Remove filter",onClick:u=>{e.filters.status[i]=!0}}," \xD7 ",8,YV)],512)),[[B,!n]])),256))],512),[[B,e.filters?.status?.ready===!1||e.filters?.status?.expired===!1||e.filters?.status?.removed===!1]])]),f(" Pull request list "),s("ul",JV,[(l(!0),d(J,null,ne(e.filteredPullRequests,(n,i)=>(l(),d("li",{class:O(["repo-list-item",{"repo-inactive":n?.status=="expired"||n?.status=="removed"||n?.status=="error"}])},[s("div",QV,[s("div",XV,[s("div",ZV,[s("a",{class:"repo-name",textContent:c(n?.pullRequestId),href:e.safeUrl("/pr/"+n?.pullRequestId)},null,8,xV),s("span",{class:O(["status-badge",{"status-removed":n?.status=="removed"||n?.status=="expired"||n?.status=="removing"||n?.status=="expiring","status-preparing":n?.status=="preparing"||n?.status=="download","status-ready":n?.status=="ready","status-error":n?.status=="error"}])},[s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,eP),n?.status=="error"?(l(),d("span",{key:0,textContent:c(": "+n?.statusMessage)},null,8,tP)):f("v-if",!0)],2)]),s("div",sP,[s("span",null,[t[13]||(t[13]=s("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)),s("a",{href:e.safeUrl("https://github.com/"+n?.source?.repositoryFullName+"/pull/"+n?.source?.pullRequestId)},c(n?.source?.repositoryFullName)+"#"+c(n?.source?.pullRequestId),9,nP)]),s("span",{class:O(["status-badge",{"status-ready":n?.merged,"status-removed":n?.state=="open","status-error":n?.state=="closed"&&!n?.merged}]),style:{"font-size":"10px"}},c(e.fmt?.title(n?.merged?"merged":n?.state)),3),s("span",oP,"anonymized "+c(e.fmt?.humanTime(n?.anonymizeDate)),1)])]),s("div",rP,[n?.conference?(l(),d("span",iP,[t[14]||(t[14]=s("i",{class:"fas fa-chalkboard-teacher"},null,-1)),y(" "+c(n?.conference),1)])):f("v-if",!0),s("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Terms: "+n?.options?.terms?.join(", ")},[t[15]||(t[15]=s("i",{class:"fas fa-shield-alt"},null,-1)),y(" "+c(e.fmt?.number(n?.options?.terms?.length)),1)],8,aP),s("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Views: "+e.fmt?.number(n?.pageView)},[t[16]||(t[16]=s("i",{class:"far fa-eye"},null,-1)),y(" "+c(e.fmt?.number(n?.pageView)),1)],8,lP),s("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Last view: "+e.fmt?.date(n?.lastView)},[t[17]||(t[17]=s("i",{class:"far fa-calendar-alt"},null,-1)),y(" "+c(e.fmt?.humanTime(n?.lastView)),1)],8,dP),n?.options?.expirationMode!="never"&&n?.status=="ready"?(l(),d("span",uP,[t[18]||(t[18]=s("i",{class:"far fa-clock"},null,-1)),y(" Expire: "+c(e.fmt?.humanTime(n?.options?.expirationDate)),1)])):f("v-if",!0)])]),s("div",cP,[s("div",pP,[t[24]||(t[24]=s("button",{class:"btn btn-sm dropdown-toggle",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Actions ",-1)),s("div",fP,[s("a",{class:"dropdown-item",href:e.safeUrl("/pull-request-anonymize/"+n?.pullRequestId)},[...t[19]||(t[19]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,mP),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.updatePullRequest(n),["prevent"])},[...t[20]||(t[20]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force update ",-1)])],8,hP),[[B,n?.status=="ready"||n?.status=="error"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.updatePullRequest(n),["prevent"])},[...t[21]||(t[21]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Enable ",-1)])],8,vP),[[B,n?.status=="removed"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:we(a=>e.removePullRequest(n),["prevent"])},[...t[22]||(t[22]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove ",-1)])],8,yP),[[B,n?.status=="ready"]]),s("a",{class:"dropdown-item",href:e.safeUrl("/pr/"+n?.pullRequestId+"/")},[...t[23]||(t[23]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View PR ",-1)])],8,gP)])])])],2))),256)),e.filteredPullRequests?.length==0?(l(),d("li",bP,[...t[25]||(t[25]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No pull requests to display.",-1)])])):f("v-if",!0)])])])}var wP={class:"container paper-page paper-settings"},kP={class:"paper-settings-body"},_P={class:"paper-settings-toc"},EP={class:"paper-settings-main"},CP={id:"settings-quota",class:"paper-settings-section"},NP={key:0,class:"quota-row"},SP={class:"quota-item"},DP={class:"quota-header"},RP={class:"quota-label"},TP={key:0,class:"quota-value"},OP={key:0},AP={key:1,class:"quota-unlimited-tag"},IP={key:1,class:"quota-value"},VP={key:0},PP={key:1,class:"quota-unlimited-tag"},qP=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],MP={key:1,class:"quota-row","aria-hidden":"true"},$P={class:"quota-item"},UP={id:"settings-terms",class:"paper-settings-section"},LP={class:"form-group"},FP={class:"form-control",id:"terms",name:"terms",rows:"4",placeholder:`Jane Smith diff --git a/scripts/benchmark-anonymizer.js b/scripts/benchmark-anonymizer.js new file mode 100644 index 0000000..0ffc9e7 --- /dev/null +++ b/scripts/benchmark-anonymizer.js @@ -0,0 +1,31 @@ +// Run with node scripts/benchmark-anonymizer.js [path-to-anonymize-utils.ts]. +// Fixtures are synthetic; reported timings exclude fixture creation and I/O. +const path = require("node:path"); +const { performance } = require("node:perf_hooks"); +require("ts-node/register/transpile-only"); +const { ContentAnonimizer } = require(process.argv[2] + ? path.resolve(process.argv[2]) : "../src/core/anonymize-utils"); +const terms = ["first.last", "user@example.org", "dept.example.edu", "lab.io", "project.org", "Author X. Name", + ...Array.from({ length: 41 }, (_, i) => `Researcher${i}`)]; +const row = "123,456,78.91234,-45.123456\n"; +const cases = [ + ["2 MB CSV, 47 absent terms", () => row.repeat(70000), terms], + ["100 MB CSV, 47 absent terms", () => row.repeat(3600000), terms], + ["50 MB CSV, sparse matches", () => `first.last\n${row.repeat(1800000)}\nhttps://host/user@example.org`, terms], + ["22 MB text, 1.2 million replacements", () => "Alice 123 first.last,45.678,-23.456\n".repeat(600000), ["Alice", ...terms]], +]; +for (const [name, fixture, rules] of cases) { + const input = fixture(); + const startCompile = performance.now(); + const anonymizer = new ContentAnonimizer({ terms: rules }); + const compileMs = performance.now() - startCompile; + const started = performance.now(); + try { + const output = anonymizer.anonymize(input); + console.log(JSON.stringify({ name, inputBytes: Buffer.byteLength(input), outputBytes: Buffer.byteLength(output), + compileMs: +compileMs.toFixed(1), matchMs: +(performance.now() - started).toFixed(1) })); + } catch (error) { + console.log(JSON.stringify({ name, inputBytes: Buffer.byteLength(input), + compileMs: +compileMs.toFixed(1), matchMs: +(performance.now() - started).toFixed(1), error: error.code || error.message })); + } +} diff --git a/src/core/anonymize-utils.ts b/src/core/anonymize-utils.ts index 379f481..24e03a1 100644 --- a/src/core/anonymize-utils.ts +++ b/src/core/anonymize-utils.ts @@ -6,6 +6,7 @@ import { isBinaryFileSync } from "isbinaryfile"; import { lookup as lookupMime } from "mime-types"; import config from "../config"; +import { TermPresenceIndex } from "./term-presence"; import { parseTermSpec, termVariants, @@ -211,9 +212,13 @@ const markdownImageRegex = interface CompiledTermVariant { // RE2 for regular patterns; time-limited native fallback for JS extensions. pattern: RE2JS | RegExp; - // A boundary-free, fixed-width native search can cheaply rule out literal - // terms before RE2 scans a large file. A hit still uses the usual matcher. + // A boundary-free native search for fixed-width patterns can rule out + // absent terms. Candidate replacement retains RE2's boundary semantics. literalPrefilter?: RegExp; + asciiPattern?: RegExp; + asciiReplacement?: string; + asciiBefore?: boolean; + asciiAfter?: boolean; before: boolean; after: boolean; mask: string; @@ -269,11 +274,14 @@ function compileTerms(terms: string[] | undefined): CompiledTermVariant[] { if (!useAsRegex || hasCatastrophicBacktracking(term)) { term = term.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"); } - // Only plain literals qualify: expanding their letters produces fixed - // character classes, never user-controlled backtracking. Do not apply - // this shortcut to regex syntax, including escaped literals. - const isLiteral = !/[\\^$.*+?()[\]{}|]/.test(term); + // Plain text and unquantified dots have fixed width in code points. + // Exclude all other regex syntax so the native search cannot backtrack + // exponentially. This includes dotted names, emails and domains. + const isFixedWidth = !/[\\^$*+?()[\]{}|]/.test(term); for (const variant of termVariants(term)) { + // Stripping a combining-mark-only term can produce an empty variant. + // Keep zero-width matches on RE2's progress-aware iterator. + const fixedWidth = isFixedWidth && variant.pattern.length > 0; const bounded = withWordBoundaries(variant.pattern, { sniffSource: variant.sniff, unicode: variant.unicode, @@ -286,9 +294,15 @@ function compileTerms(terms: string[] | undefined): CompiledTermVariant[] { RE2JS.CASE_INSENSITIVE ); compiled.push({ pattern, before, after, mask, + asciiPattern: fixedWidth ? new RegExp(bounded.replace(/\./g, "[^\\n]"), "giu") : undefined, + asciiReplacement: fixedWidth ? mask.replace(/\$/g, () => "$$") : undefined, + asciiBefore: !variant.unicode && bounded.startsWith("\\b"), + asciiAfter: !variant.unicode && bounded.endsWith("\\b"), // RE2 uses Unicode case folding even for the non-diacritic pass. // Omit boundaries so this search can only rule out absent terms. - literalPrefilter: isLiteral ? new RegExp(variant.pattern, "iu") : undefined }); + literalPrefilter: fixedWidth + // RE2's dot excludes only LF; JS dot also excludes CR and U+2028/9. + ? new RegExp(variant.pattern.replace(/\./g, "[^\\n]"), "iu") : undefined }); } catch { // Retain JavaScript-only syntax and large repetition counts under // the execution deadline; RE2 handles the common case without backtracking. @@ -303,13 +317,37 @@ function compileTerms(terms: string[] | undefined): CompiledTermVariant[] { return compiled; } +interface CompiledTermPlan { + terms: CompiledTermVariant[]; + presence: TermPresenceIndex | null; +} + +// Every file in a ZIP uses the same rules. Reuse immutable compiled patterns +// across transformers, with bounded retention for unrelated repositories. +const termPlans = new Map(); +function compiledTermPlan(terms: string[] | undefined): CompiledTermPlan { + const key = JSON.stringify([config.ANONYMIZATION_MASK, terms || []]); + const cached = termPlans.get(key); + if (cached) return cached; + const compiled = compileTerms(terms); + const plan = { + terms: compiled, + presence: compiled.length && compiled.length <= 256 && compiled.every(term => term.literalPrefilter) + ? new TermPresenceIndex(compiled.map(term => term.literalPrefilter!)) : null, + }; + if (key.length <= 8192 && compiled.length <= 256) { + if (termPlans.size >= 64) termPlans.delete(termPlans.keys().next().value!); + termPlans.set(key, plan); + } + return plan; +} + export class ContentAnonimizer { public wasAnonymized = false; - // Compiled once per instance and reused for every anonymize() call. - // Streamed files invoke anonymize() many times per file (one per chunk), - // so caching here avoids rebuilding regexes on every chunk. + // Per-instance metadata references the bounded cache of compiled rules. private compiledTerms: CompiledTermVariant[]; private selfLinkRegexes: RegExp[] | null = null; + private termPresence: TermPresenceIndex | null = null; constructor( readonly opt: { @@ -321,7 +359,11 @@ export class ContentAnonimizer { repoId?: string; } ) { - this.compiledTerms = compileTerms(opt.terms); + const plan = compiledTermPlan(opt.terms); + // Keep per-instance metadata independent. Regex matching is synchronous; + // native replacement resets lastIndex and RE2 creates a fresh matcher. + this.compiledTerms = plan.terms.map(term => ({ ...term })); + this.termPresence = plan.presence; if (opt.repoName && opt.branchName) { const r = escapeRegex(opt.repoName); const b = escapeRegex(opt.branchName); @@ -370,19 +412,36 @@ export class ContentAnonimizer { } private replaceTerms(content: string): string { - for (const c of this.compiledTerms) { - // remove whole url if it contains the term + if (!this.compiledTerms.length) return content; + let candidates = this.termPresence?.candidates(content); + // On ASCII input both engines have identical fixed-width matching and + // word boundaries. Native replacement avoids allocating one JS match + // object per CSV value. Non-ASCII input keeps RE2 validation below. + let asciiContent = (!candidates || candidates.size > 0) && /^\p{ASCII}*$/u.test(content); + for (let index = 0; index < this.compiledTerms.length; index++) { + if (candidates && !candidates.has(index)) continue; + const c = this.compiledTerms[index]; + // An absent term cannot occur inside a URL either. + if (c.literalPrefilter && !c.literalPrefilter.test(content)) continue; + const previous = content; content = content.replace(urlRegex, (match) => { - if (replaceTerm(match, c) !== match) { + if (replaceTerm(match, c, true) !== match) { this.wasAnonymized = true; return c.mask; } return match; }); - // remove the term in the text - const replaced = replaceTerm(content, c); + // URL replacement may already have inserted a non-ASCII custom mask. + if (content !== previous) asciiContent = asciiContent && /^\p{ASCII}*$/u.test(c.mask); + const replaced = replaceTerm(content, c, asciiContent); if (replaced !== content) this.wasAnonymized = true; content = replaced; + // Masks and changed boundaries can introduce later matches. Re-index + // only after a real change, never once per absent term. + if (content !== previous) { + asciiContent = asciiContent && /^\p{ASCII}*$/u.test(c.mask); + candidates = this.termPresence?.candidates(content, index); + } } return content; } @@ -437,38 +496,62 @@ function runWithAnonymizationDeadline(run: () => string): string { return anonymizationScript.runInNewContext({ run }, { timeout: 1000 }); } -function replaceTerm(content: string, term: CompiledTermVariant): string { - if (term.literalPrefilter && !term.literalPrefilter.test(content)) return content; +function replaceTerm(content: string, term: CompiledTermVariant, asciiContent = false): string { if (term.pattern instanceof RegExp) { return content.replace(term.pattern, () => term.mask); } - // Fixed-width literal searches run natively. Validate each candidate with - // RE2 on a small window to preserve its case folding and boundary semantics - // without scanning megabytes of notebook outputs in the JS regex engine. - const candidates = term.literalPrefilter - ? content.matchAll(new RegExp(term.literalPrefilter.source, "giu")) - : null; - const matcher = candidates ? null : term.pattern.matcher(content); + if (term.literalPrefilter && asciiContent && term.asciiPattern) { + return content.replace(term.asciiPattern, term.asciiReplacement!); + } + if (term.literalPrefilter) { + const validated = new Map(); + const candidates = new RegExp(term.literalPrefilter.source, "giu"); + const pieces: string[] = []; + let cursor = 0; + let match: RegExpExecArray | null; + while ((match = candidates.exec(content))) { + const candidate = match[0], start = match.index, end = start + candidate.length; + let valid = true; + if (term.before && /[\p{L}\p{N}_]$/u.test(content.slice(Math.max(0, start - 2), start))) valid = false; + if (term.after && /^[\p{L}\p{N}_]/u.test(content.slice(end, end + 2))) valid = false; + // On ASCII candidates the fixed-width native and RE2 searches agree. + // Check RE2's ASCII word boundaries explicitly: JS /iu\b/ also treats + // Kelvin sign and long s as word characters, while RE2 does not. + if (valid && /^\p{ASCII}*$/u.test(candidate)) { + if (term.asciiBefore && asciiWordAt(content, start - 1) === asciiWordAt(content, start)) valid = false; + if (term.asciiAfter && asciiWordAt(content, end - 1) === asciiWordAt(content, end)) valid = false; + } else if (valid) { + // Keep RE2 authoritative for Unicode case folding. Repeated values in + // datasets share small contexts; cap this cache independently of size. + const offset = Math.max(0, start - 2); + const window = content.slice(offset, end + 2); + const key = `${start - offset}:${window}`; + const cached = validated.get(key); + if (cached === undefined) { + const check = (term.pattern as RE2JS).matcher(window); + valid = check.find(start - offset) && check.start() === start - offset && check.end() === end - offset; + if (validated.size < 256) validated.set(key, valid); + } else valid = cached; + } + if (!valid) { + // A boundary-rejected candidate must not hide an overlapping match, + // e.g. the second a-a in "xa-a-a". Advance by one Unicode code point. + candidates.lastIndex = start + (content.codePointAt(start)! > 0xffff ? 2 : 1); + continue; + } + pieces.push(content.slice(cursor, start), term.mask); + cursor = end; + } + if (!pieces.length) return content; + pieces.push(content.slice(cursor)); + return pieces.join(""); + } + + const matcher = term.pattern.matcher(content); const pieces: string[] = []; let cursor = 0; - const matches = function* () { - if (candidates) { - for (const candidate of candidates) { - const start = candidate.index!; - const end = start + candidate[0].length; - const offset = Math.max(0, start - 2); - const check = (term.pattern as RE2JS).matcher(content.slice(offset, end + 2)); - if (check.find(start - offset) && check.start() === start - offset && check.end() === end - offset) { - yield { start, end }; - } - } - } else { - while (matcher!.find()) yield { start: matcher!.start(), end: matcher!.end() }; - } - }; - for (const { start, end } of matches()) { - // RE2 has no lookahead. Check the generated Unicode word boundaries - // outside the engine, without executing any user-supplied native regex. + while (matcher.find()) { + const start = matcher.start(), end = matcher.end(); if (term.before && /[\p{L}\p{N}_]$/u.test(content.slice(Math.max(0, start - 2), start))) continue; if (term.after && /^[\p{L}\p{N}_]/u.test(content.slice(end, end + 2))) continue; pieces.push(content.slice(cursor, start), term.mask); @@ -478,3 +561,8 @@ function replaceTerm(content: string, term: CompiledTermVariant): string { pieces.push(content.slice(cursor)); return pieces.join(""); } + +function asciiWordAt(content: string, index: number): boolean { + const code = content.charCodeAt(index); + return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || code === 95; +} diff --git a/src/core/github-app.ts b/src/core/github-app.ts index 64dc54f..83d0bea 100644 --- a/src/core/github-app.ts +++ b/src/core/github-app.ts @@ -253,7 +253,7 @@ export async function boundAppToken(ownerId: string, binding: RepositoryAccess, return token; } -export async function selectRepositoryAccess(ownerId: string, fullName: string, choice?: unknown, repositoryId?: number): Promise<{ token: string; binding: RepositoryAccess }> { +export async function selectRepositoryAccess(ownerId: string, fullName: string, choice?: unknown, repositoryId?: number): Promise<{ token: string; binding: RepositoryAccess; fullName?: string }> { if (!/^[^/\s]+\/[^/\s]+$/.test(fullName)) throw appError("repo_not_found", 400); if (choice !== undefined && choice !== "oauth" && choice !== "github-app") throw appError("invalid_connection", 400); const hasApp = config.GITHUB_APP_ENABLED && await CredentialModel.exists({ ownerId, provider: APP_PROVIDER }); @@ -262,14 +262,14 @@ export async function selectRepositoryAccess(ownerId: string, fullName: string, if (!repo) { const userToken = await appUserToken(ownerId); const publicRepo = await githubRequest( - `/repos/${fullName.split("/").map(encodeURIComponent).join("/")}`, userToken); + repositoryId === undefined ? `/repos/${fullName.split("/").map(encodeURIComponent).join("/")}` : `/repositories/${repositoryId}`, userToken); if (publicRepo.private !== false || publicRepo.visibility !== "public" || !Number.isSafeInteger(publicRepo.id)) throw appError("github_app_access_required"); const binding: RepositoryAccess = { kind: "github-app", publicRead: true, repositoryId: publicRepo.id, revision: randomUUID() }; - return { binding, token: await boundAppToken(ownerId, binding, fullName) }; + return { binding, fullName: publicRepo.full_name, token: await boundAppToken(ownerId, binding, publicRepo.full_name) }; } const binding: RepositoryAccess = { kind: "github-app", repositoryId: repo.id, installationId: repo.installationId, revision: randomUUID() }; - return { binding, token: await boundAppToken(ownerId, binding, fullName) }; + return { binding, fullName: repo.full_name, token: await boundAppToken(ownerId, binding, repo.full_name) }; } const token = await getCredentialToken(ownerId); if (!token) throw appError("github_oauth_required"); diff --git a/src/core/term-presence.ts b/src/core/term-presence.ts new file mode 100644 index 0000000..934344d --- /dev/null +++ b/src/core/term-presence.ts @@ -0,0 +1,67 @@ +/** + * Candidate index for nonempty, capture-free, fixed-width compiler patterns. + * False positives are safe; false negatives are not. + */ +export class TermPresenceIndex { + private groups: { indices: number[]; characters: string[] | null }[] = []; + + constructor(private readonly patterns: RegExp[]) { + for (let index = 0; index < patterns.length; index++) { + const characters = firstCharacters(patterns[index].source); + const group = { indices: [index], characters }; + // Merge groups whose first characters can overlap under Unicode folding. + // Then a combined search can identify one group without hiding another + // alternative at the same position (Alice versus AliceSmith, for example). + for (let i = this.groups.length - 1; i >= 0; i--) { + const other = this.groups[i]; + if (overlap(group.characters, other.characters)) { + group.indices.push(...other.indices); + group.characters = group.characters && other.characters + ? [...new Set([...group.characters, ...other.characters])] : null; + this.groups.splice(i, 1); + } + } + this.groups.push(group); + } + } + + candidates(content: string, after = -1): Set { + const found = new Set(); + const remaining = this.groups.map(group => group.indices.filter(index => index > after)) + .filter(indices => indices.length); + let offset = 0; + while (remaining.length) { + // Fixed-width inputs contain no captures or quantifiers. Removing a + // discovered group avoids revisiting millions of identical CSV values. + const search = new RegExp(remaining.map(indices => + `(${indices.map(index => this.patterns[index].source).join("|")})`).join("|"), "giu"); + search.lastIndex = offset; + const match = search.exec(content); + if (!match) break; + const selected = match.slice(1).findIndex(value => value !== undefined); + for (const index of remaining[selected]) found.add(index); + remaining.splice(selected, 1); + // Another group's match may start inside this one. Search from the next + // code point, not from the end of the match, to retain nested candidates. + offset = match.index + (content.codePointAt(match.index)! > 0xffff ? 2 : 1); + } + return found; + } +} + +function firstCharacters(source: string): string[] | null { + if (source.startsWith("[")) { + const characters = source.slice(1, source.indexOf("]")); + // Only the compiler's expanded letter classes have an enumerable prefix. + // Dot's [^\n], escapes and any future syntax conservatively join all groups. + return /^[\p{L}\p{N}]+$/u.test(characters) ? Array.from(characters) : null; + } + if (source.startsWith("\\")) return null; + return [Array.from(source)[0]]; +} + +function overlap(left: string[] | null, right: string[] | null): boolean { + if (!left || !right) return true; + const pattern = new RegExp(`^(?:${left.map(char => char.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})$`, "iu"); + return right.some(char => pattern.test(char)); +} diff --git a/src/server/routes/github-app.ts b/src/server/routes/github-app.ts index 68ceaa9..b6edecc 100644 --- a/src/server/routes/github-app.ts +++ b/src/server/routes/github-app.ts @@ -191,7 +191,7 @@ router.post("/connections/migrate", async (req, res) => { const isRepo = type === "repository"; const model = isRepo ? await RepositoryModel.findOne({ repoId: id, owner: user.id }) : await PullRequestModel.findOne({ pullRequestId: id, owner: user.id }); if (!model || ["removed", "archived"].includes(model.status || "")) throw appError("repo_not_found", 404); - if (["preparing", "removing", "expiring"].includes(model.status || "")) throw appError("repository_busy", 409); + if (["preparing", "queue", "download", "removing", "expiring"].includes(model.status || "")) throw appError("repository_busy", 409); const source = model.source as { repositoryName?: string; repositoryFullName?: string; commit?: string; pullRequestId?: number }; const name = source.repositoryName || source.repositoryFullName || ""; const repositoryId = model.githubAccess?.kind === "github-app" && connection === "github-app" @@ -201,9 +201,10 @@ router.post("/connections/migrate", async (req, res) => { // recreated at the same name. Replacing a source requires its own preview. if (model.githubAccess?.kind === "github-app" && selected.binding.kind === "github-app" && model.githubAccess.repositoryId !== selected.binding.repositoryId) throw appError("connection_changed", 409); - const parts = name.split("/").map(encodeURIComponent).join("/"); - const repositoryPath = repositoryId === undefined ? `/repos/${parts}` : `/repositories/${repositoryId}`; - await githubRequest(`${repositoryPath}/${isRepo ? `commits/${encodeURIComponent(source.commit || "")}` : `pulls/${source.pullRequestId}`}`, selected.token); + const parts = (selected.fullName || name).split("/").map(encodeURIComponent).join("/"); + const repositoryPath = `/repos/${parts}`; + const token = selected.binding.publicRead ? await appUserToken(user.id) : selected.token; + await githubRequest(`${repositoryPath}/${isRepo ? `commits/${encodeURIComponent(source.commit || "")}` : `pulls/${source.pullRequestId}`}`, token); if (preview === true) return res.json({ eligible: true, connection }); const filter = { _id: model._id, owner: user.id, status: model.status, source: model.source, githubAccess: model.githubAccess ? model.githubAccess : { $exists: false } }; diff --git a/src/server/routes/repository-public.ts b/src/server/routes/repository-public.ts index 092b3ea..fcfa4f1 100644 --- a/src/server/routes/repository-public.ts +++ b/src/server/routes/repository-public.ts @@ -112,10 +112,11 @@ router.get( upstreamStatus, upstreamBody: upstreamBody?.slice(0, 500), url: config.STREAMER_ENTRYPOINT - ? join(config.STREAMER_ENTRYPOINT, "api/zip") + ? join(config.STREAMER_ENTRYPOINT, "api/download") : undefined, err: serializeError(err), }); + const streaming = res.headersSent; handleError( new AnonymousError(errCode, { url: req.originalUrl, @@ -124,6 +125,10 @@ router.get( }), res ); + // Once ZIP bytes have been sent, handleError cannot send JSON. + // Terminate the truncated response so the client reports failure + // instead of waiting forever for the ZIP's central directory. + if (streaming && !res.writableEnded) res.destroy(); }); reqStream.pipe(res); res.on("close", () => { diff --git a/test/anonymizer-large-files.test.js b/test/anonymizer-large-files.test.js new file mode 100644 index 0000000..38573d7 --- /dev/null +++ b/test/anonymizer-large-files.test.js @@ -0,0 +1,28 @@ +const { expect } = require("chai"); +const { Readable } = require("node:stream"); +require("ts-node/register/transpile-only"); +const { AnonymizeTransformer, ContentAnonimizer } = require("../src/core/anonymize-utils"); +const terms = ["first.last", "user@example.org", "dept.example.edu", "lab.io", "project.org", "Author X. Name", + ...Array.from({ length: 41 }, (_, i) => `Researcher${i}`)]; + +describe("large files with many anonymization terms", function () { + this.timeout(10000); + it("handles a 50 MB numeric dataset without exhausting the one-second deadline", function () { + const input = "123,456,78.91234,-45.123456\n".repeat(1800000); + expect(new ContentAnonimizer({ terms }).anonymize(input)).to.equal(input); + }); + it("redacts dotted terms and their URLs around a large payload", async function () { + const payload = "123,456,78.91234,-45.123456\n".repeat(200000); + const input = Buffer.from(`first.last\n${payload}\nhttps://host/user@example.org/path\nfirstXlast`); + const stream = new AnonymizeTransformer({ filePath: "coords.csv", terms }); + Readable.from([input.subarray(0, 6), input.subarray(6)]).pipe(stream); + const chunks = []; + for await (const chunk of stream) chunks.push(chunk); + expect(Buffer.concat(chunks).toString()).to.equal(`XXXX-1\n${payload}\nXXXX-2\nXXXX-1`); + }); + it("handles many repeated matches while preserving the surrounding values", function () { + const input = "Alice,123,45.678,-23.456\n".repeat(100000); + expect(new ContentAnonimizer({ terms: ["Alice", ...terms] }).anonymize(input)) + .to.equal("XXXX-1,123,45.678,-23.456\n".repeat(100000)); + }); +}); diff --git a/test/app-reinstall-recovery.test.js b/test/app-reinstall-recovery.test.js index a1e8341..e3b2f63 100644 --- a/test/app-reinstall-recovery.test.js +++ b/test/app-reinstall-recovery.test.js @@ -55,11 +55,18 @@ for (const type of ["repository", "pull-request"]) { expect(writes[0].update).to.deep.equal({ $set: { githubAccess: selected.binding } }); expect(writes[0].filter.githubAccess).to.deep.equal(model.githubAccess); expect(writes[0].filter.source).to.deep.equal(model.source); - expect(checks).to.deep.equal([{ url: type === "repository" ? "/repositories/42/commits/saved-sha" : "/repositories/42/pulls/7", token: "fresh-token" }]); + expect(checks).to.deep.equal([{ url: type === "repository" ? "/repos/owner/private/commits/saved-sha" : "/repos/owner/private/pulls/7", token: "fresh-token" }]); }); it("rejects a replacement repository at the same name", async function () { selected.binding.repositoryId = 99; await fails("connection_changed"); expect(checks).to.have.length(0); }); + for (const status of ["preparing", "queue", "download", "removing", "expiring"]) { + it("rejects reconnect during " + status, async function () { + model.status = status; + await fails("repository_busy"); + expect(checks).to.have.length(0); + }); + } it("requires access to the existing snapshot before saving", async function () { stub(app, "githubRequest", async () => { throw new Error("github_app_access_required"); }); await fails("github_app_access_required"); diff --git a/test/asset-build.test.js b/test/asset-build.test.js index e5d992c..8b30d77 100644 --- a/test/asset-build.test.js +++ b/test/asset-build.test.js @@ -66,6 +66,23 @@ describe("asset build", function () { } }); + it("ships the upstream PDF.js bytes without a second minification pass", function () { + const upstream = fs.readFileSync(path.join(path.dirname(gulpfile), groups.pdfFiles[0])); + fs.writeFileSync(path.join(directory, groups.pdfFiles[0]), upstream); + const result = build(); + expect(result.status, result.stderr).to.equal(0); + const bundled = fs.readFileSync(path.join(directory, "public/script/pdf.min.js")); + expect(bundled.equals(upstream)).to.equal(true); + }); + + it("rejects invalid PDF.js without publishing a manifest", function () { + fs.writeFileSync(path.join(directory, groups.pdfFiles[0]), "function {"); + const result = build(); + expect(result.status).not.to.equal(0); + expect(result.stderr).to.include("SyntaxError"); + expect(fs.existsSync(path.join(directory, "public/asset-manifest.json"))).to.equal(false); + }); + it("fails on missing input without publishing a manifest", function () { fs.unlinkSync(path.join(directory, groups.coreJsFiles[0])); const result = build(); @@ -75,7 +92,7 @@ describe("asset build", function () { }); it("fails on invalid JavaScript without publishing a manifest", function () { - fs.writeFileSync(path.join(directory, groups.pdfFiles[0]), "function {"); + fs.writeFileSync(path.join(directory, groups.markdownFiles[0]), "function {"); const result = build(); expect(result.status).not.to.equal(0); expect(result.stderr).to.include("uglify"); diff --git a/test/github-app.test.js b/test/github-app.test.js index b735bdc..feaccd1 100644 --- a/test/github-app.test.js +++ b/test/github-app.test.js @@ -335,7 +335,7 @@ describeMongo("GitHub App credential and repository integration", function () { it("does not require scoped-token minting for an uninstalled public repository", async () => { await app.saveAppGrant(owner.id, data()); mock(url => url.includes("/user/installations") ? { installations: [] } : - { id: 7, private: false, visibility: "public" }, () => ({ status: 403 })); + { id: 7, full_name: "other/public", private: false, visibility: "public" }, () => ({ status: 403 })); const selected = await app.selectRepositoryAccess(owner.id, "other/public", "github-app"); expect(selected.token).to.match(/^public-read:/); expect(calls.some(call => call.url.endsWith("/token/scoped"))).to.equal(false); @@ -496,6 +496,29 @@ describeMongo("GitHub App credential and repository integration", function () { expect(await Credentials.countDocuments()).to.equal(0); expect(await Users.countDocuments()).to.equal(1); }); + it("reconnects an uninstalled public repository with a real user token", async () => { + const Repos = require("../src/core/model/anonymizedRepositories/anonymizedRepositories.model").default; + await app.saveAppGrant(owner.id, data()); + const resource = await Repos.create({ repoId: "public-reconnect", owner: owner.id, status: "ready", + source: { type: "GitHubStream", repositoryName: "other/public", commit: "abc", branch: "main" }, + githubAccess: { kind: "github-app", repositoryId: 42, publicRead: true, revision: "old" } }); + mock((url, options) => { + if (url.includes("/user/installations?")) return { installations: [] }; + if (url.endsWith("/repositories/42") || url.endsWith("/repos/other/public")) return { + id: 42, full_name: "other/public", private: false, visibility: "public", + }; + if (url.endsWith("/repos/other/public/commits/abc")) { + expect(new globalThis.Headers(options.headers).get("authorization")).to.equal("Bearer ghu_access1"); + return { sha: "abc" }; + } + throw new Error("Unexpected request " + url); + }); + const body = { type: "repository", id: resource.repoId, connection: "github-app" }; + expect((await request("/github/connections/migrate", { ...body, preview: true })).status).to.equal(200); + expect((await request("/github/connections/migrate", body)).status).to.equal(200); + expect((await Repos.findById(resource.id)).githubAccess.publicRead).to.equal(true); + }); + it("recovers a renamed private pull request through its stable repository ID", async () => { const PRs = require("../src/core/model/anonymizedPullRequests/anonymizedPullRequests.model").default; await app.saveAppGrant(owner.id, data()); @@ -510,7 +533,7 @@ describeMongo("GitHub App credential and repository integration", function () { if (url.endsWith("/repositories/42")) return { id: 42 }; if (url.endsWith("/app/installations/4")) return { app_id: 123, permissions: { contents: "read", metadata: "read" } }; if (url.endsWith("/access_tokens")) return { token: "ghs_reinstalled", expires_at: new Date(Date.now() + 3600000).toISOString() }; - if (url.endsWith("/repositories/42/pulls/7")) return { number: 7 }; + if (url.endsWith("/repos/owner/new-name/pulls/7")) return { number: 7 }; throw new Error("Unexpected request " + url); }); const body = { type: "pull-request", id: resource.pullRequestId, connection: "github-app" }; diff --git a/test/term-presence.test.js b/test/term-presence.test.js new file mode 100644 index 0000000..63c7544 --- /dev/null +++ b/test/term-presence.test.js @@ -0,0 +1,75 @@ +const { expect } = require("chai"); +require("ts-node/register/transpile-only"); +const { TermPresenceIndex } = require("../src/core/term-presence"); +const { compileTerms, ContentAnonimizer } = require("../src/core/anonymize-utils"); + +function reference(terms, text) { + const anonymizer = new ContentAnonimizer({ terms }); + anonymizer.termPresence = null; + for (const term of anonymizer.compiledTerms) delete term.literalPrefilter; + return anonymizer.anonymize(text); +} + +describe("term candidate index", function () { + it("retains shared prefixes, nested matches and Unicode-folded alternatives", function () { + const patterns = [/Alice/iu, /AliceSmith/iu, /Smith/iu, /[sśŝşšș]/iu, /ſ/iu, /K/iu, /k/iu, /研究/iu]; + const index = new TermPresenceIndex(patterns); + for (const text of ["AliceSmith", "ALICESMITH K ſ 研究", "nothing", "ś", "k", "aAliceSmith"]) { + for (let after = -1; after < patterns.length; after++) { + const candidates = index.candidates(text, after); + patterns.forEach((pattern, i) => { + if (i > after && pattern.test(text)) expect(candidates.has(i), `${text}: ${i}`).to.equal(true); + if (i <= after) expect(candidates.has(i)).to.equal(false); + }); + } + } + }); + + it("keeps dot's CR and Unicode line-separator matches", function () { + for (const text of ["first\rlast", "first\u2028last", "first\u2029last", "first\nlast", "first😀last"]) { + expect(new ContentAnonimizer({ terms: ["first.last"] }).anonymize(text)).to.equal(reference(["first.last"], text)); + } + }); + + it("retains ordered cascades, URL removal, and matches created across replacement boundaries", function () { + const cases = [ + [["Alice=>Bob", "Bob=>Hidden"], "Alice Bob https://host/Alice"], + [["Alice=>", "@Bob=>Hidden"], "@AliceBob"], + [["a-a", "Alice"], "xa-a-a Alice https://host/Alice/file"], + [["first.last", "firstXlast=>other"], "firstXlast first.last"], + [["Alice=>Bob", "Bob"], "https://host/Alice"], + [["k", "s"], "K ſ ék k_ xK Kx"], + [["Alice=>Bob", "B.b=>Done"], "Alice"], + [["k=>Kk"], "https://host/k"], + [["Alice=>$&", "Bob=>$$"], "Alice Bob"], + [["\u0301"], "abc"], + [["a.*b", "Alice"], "axxb Alice"], + ]; + for (const [terms, text] of cases) { + expect(new ContentAnonimizer({ terms }).anonymize(text), JSON.stringify([terms, text])).to.equal(reference(terms, text)); + } + }); + + it("matches the RE2 path for fixed-width terms and surrounding characters", function () { + const terms = ["a-a", "a.a", "k", "s", "k.s", "Alice", "@Alice", "Σ", "研究", "😀", "..", "a.", "a..b"]; + const edges = ["", "x", "_", "é", "K", "ſ", "😀", "𐐀", "\r", "\n", "\u2028"]; + for (const term of terms) { + const input = edges.flatMap(left => edges.map(right => `${left}${term}${right} ${left}${term.replaceAll(".", "\r")}${right}`)).join(" "); + expect(new ContentAnonimizer({ terms: [term] }).anonymize(input), term).to.equal(reference([term], input)); + } + }); + + it("does not reuse stale rules after the caller edits its term list", function () { + const terms = ["Alice=>first"]; + expect(new ContentAnonimizer({ terms }).anonymize("Alice")).to.equal("first"); + terms[0] = "Alice=>second"; + expect(new ContentAnonimizer({ terms }).anonymize("Alice")).to.equal("second"); + expect(new ContentAnonimizer({ terms: ["Alice=>first"] }).anonymize("Alice")).to.equal("first"); + }); + + it("does not index quantified, capturing, or escaped user patterns", function () { + for (const term of ["a.*b", "a+b", "(Alice)", "a\\.b", "a(?=b)"]) { + expect(compileTerms([term]).every(c => !c.literalPrefilter), term).to.equal(true); + } + }); +}); diff --git a/test/vue-ui.test.js b/test/vue-ui.test.js index b7000c2..9fff8f0 100644 --- a/test/vue-ui.test.js +++ b/test/vue-ui.test.js @@ -155,10 +155,11 @@ describe("Vue 3 UI", function () { expect(ui.errors).to.deep.equal([]); }); - it("hides connection changes on archived resources", async function () { + for (const status of ["archived", "preparing", "queue", "download", "removing", "expiring"]) { + it(`hides connection changes on ${status} resources`, async function () { ui = await browser("/connections", { "/github/connections": { appEnabled: true, appConnected: true, oauthConnected: true, - resources: [{ type: "repository", id: "archived", connection: "github-app", status: "archived", eligible: true }] }, + resources: [{ type: "repository", id: "archived", connection: "github-app", status, eligible: true }] }, }); const resource = ui.window.document.querySelector(".connection-resource"); expect(resource).not.to.equal(null); @@ -166,6 +167,8 @@ describe("Vue 3 UI", function () { expect(ui.errors).to.deep.equal([]); }); + } + for (const connection of ["oauth", "github-app"]) { it(`previews and saves ${connection} access with CSRF protection`, async function () { const action = connection === "github-app" ? "Reconnect read-only access" : "Switch to read-only access"; diff --git a/test/zip-proxy-errors.test.js b/test/zip-proxy-errors.test.js new file mode 100644 index 0000000..d6a1ebe --- /dev/null +++ b/test/zip-proxy-errors.test.js @@ -0,0 +1,94 @@ +const { expect } = require("chai"); +const express = require("express"); +const compression = require("compression"); +const { gunzipSync } = require("node:zlib"); +const http = require("node:http"); +const { PassThrough } = require("node:stream"); +const got = require("got"); +require("ts-node/register/transpile-only"); +const config = require("../src/config").default; +const utils = require("../src/server/routes/route-utils"); +const router = require("../src/server/routes/repository-public").default; + +describe("ZIP proxy failures", function () { + let restore, upstream, server; + beforeEach(async function () { + const previous = { download: config.ENABLE_DOWNLOAD, endpoint: config.STREAMER_ENTRYPOINT, + getRepo: utils.getRepo, getUser: utils.getUser, stream: got.stream }; + restore = () => { + config.ENABLE_DOWNLOAD = previous.download; + config.STREAMER_ENTRYPOINT = previous.endpoint; + utils.getRepo = previous.getRepo; utils.getUser = previous.getUser; got.stream = previous.stream; + }; + config.ENABLE_DOWNLOAD = true; + config.STREAMER_ENTRYPOINT = "http://streamer.test/"; + utils.getUser = async () => { throw new Error("anonymous"); }; + utils.getRepo = async () => ({ repoId: "test", options: {}, + model: { source: { repositoryName: "owner/repo", commit: "abc" } }, + countView: async () => {}, getToken: async () => "", + generateAnonymizeTransformer: () => ({ opt: {} }), + }); + upstream = new PassThrough(); + got.stream = () => upstream; + const app = express(); app.use(compression({ filter: () => true })); app.use(router); + server = await new Promise(resolve => { + const listening = app.listen(0, "127.0.0.1", () => resolve(listening)); + }); + }); + afterEach(async function () { + upstream.destroy(); server.closeAllConnections(); + await new Promise(resolve => server.close(resolve)); restore(); + }); + function request(onResponse, headers = {}) { + return http.get(`http://127.0.0.1:${server.address().port}/test/zip`, { headers }, onResponse); + } + it("aborts a partial ZIP when the upstream fails after headers", async function () { + const result = new Promise((resolve, reject) => { + const client = request(response => { + expect(response.statusCode).to.equal(200); + response.once("data", () => upstream.destroy(new Error("upstream disconnected"))); + response.on("aborted", resolve); + response.on("end", () => reject(new Error("truncated ZIP reported as complete"))); + response.on("error", () => {}); + }); + client.on("error", reject); + }); + upstream.write(Buffer.from("PK partial archive")); + await result; + }); + it("finishes compressed JSON errors before any ZIP bytes are sent", async function () { + const error = "unavailable".repeat(300); + const result = new Promise((resolve, reject) => { + request(response => { + const chunks = []; + response.on("data", chunk => chunks.push(chunk)); + response.on("error", reject); + response.on("end", () => resolve({ + status: response.statusCode, encoding: response.headers["content-encoding"], + body: JSON.parse(gunzipSync(Buffer.concat(chunks)).toString()), + })); + }, { "Accept-Encoding": "gzip" }).on("error", reject); + }); + upstream.once("newListener", event => { + if (event === "error") globalThis.queueMicrotask(() => upstream.destroy(Object.assign(new Error("unavailable"), { + response: { statusCode: 503, body: JSON.stringify({ error }) }, + }))); + }); + expect(await result).to.deep.equal({ status: 502, encoding: "gzip", body: { error } }); + }); + it("keeps JSON errors before any ZIP bytes are sent", async function () { + const result = new Promise((resolve, reject) => { + request(response => { + let body = ""; response.on("data", chunk => { body += chunk; }); + response.on("end", () => resolve({ status: response.statusCode, body: JSON.parse(body) })); + }).on("error", reject); + }); + // Fail only after the route has attached its upstream listener. + upstream.once("newListener", event => { + if (event === "error") globalThis.queueMicrotask(() => upstream.destroy(Object.assign(new Error("unavailable"), { + response: { statusCode: 503, body: '{"error":"zip_not_available"}' }, + }))); + }); + expect(await result).to.deep.equal({ status: 502, body: { error: "zip_not_available" } }); + }); +});