quasar-ui-danx 0.4.77 → 0.4.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/danx.umd.js CHANGED
@@ -150,5 +150,5 @@ ${e}
150
150
 
151
151
  Use Save As... to download, then click back to return to this page.`)&&(location.href=w),!0;var C=document.createElement("iframe");document.body.appendChild(C),x||(w="data:"+w.replace(/^data:([\w/\-+]+)/,o)),C.src=w,setTimeout(function(){document.body.removeChild(C)},333)}if(navigator.msSaveBlob)return navigator.msSaveBlob(m,f);if(r.URL)g(r.URL.createObjectURL(m),!0);else{if(typeof m=="string"||m.constructor===u)try{return g("data:"+s+";base64,"+r.btoa(m))}catch{return g("data:"+s+","+encodeURIComponent(m))}_=new FileReader,_.onload=function(w){g(this.result)},_.readAsDataURL(m)}return!0}async function n_(t,e="",n=null){var l;let r;n&&(r={method:"POST",headers:{...(l=ne.value.request)==null?void 0:l.headers},body:JSON.stringify(n)});const o=await fetch(t,r);if(!o.ok)throw Error("File download failed: invalid response from server");let s;try{const a=JSON.parse(new TextDecoder().decode(o.data));console.error("Error downloading file:",a),s=a.message,a.errors&&(s=a.errors[0].message)}catch{}if(s)throw new Error("Failed to download file: "+s);await r_(o,e)}async function r_(t,e=""){const n=sa(t,"content-disposition",""),r=sa(t,"content-type",""),o=n.match(/filename="([^"]+)"/);e=e||o&&o[1]||"download.pdf";let s=t.data;s||(s=await t.blob()),Fi(s,e,r)}function sa(t,e,n){if(t.headers)return typeof t.headers.get=="function"?t.headers.get(e)||n:t.headers[e]||n}let o_=class{constructor(e){if(qS(e))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=e,this.byteLength=this.buffer.length}getUint8(e){return this.buffer.readUInt8(e)}getUint16(e,n){return n?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}getUint32(e,n){return n?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}getInt32(e,n){return n?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}};function qS(t){return typeof t!="object"||t.length===void 0||t.readUInt8===void 0||t.readUInt16LE===void 0||t.readUInt16BE===void 0||t.readUInt32LE===void 0||t.readUInt32BE===void 0||t.readInt32LE===void 0||t.readInt32BE===void 0}function i_(t,e,n){try{return new DataView(t,e,n)}catch{return new o_(t,e,n)}}function R(t,e,n){const r=[];for(let o=0;o<n&&e+o<t.byteLength;o++)r.push(t.getUint8(e+o));return xr(r)}function kr(t,e){const n=[];let r=0;for(;e+r<t.byteLength;){const o=t.getUint8(e+r);if(o===0)break;n.push(o),r++}return xr(n)}function HS(t,e,n){const r=[];for(let o=0;o<n&&e+o<t.byteLength;o+=2)r.push(t.getUint16(e+o));return r[r.length-1]===0&&r.pop(),xr(r)}function s_(t,e){const n=t.getUint8(e),r=R(t,e+1,n);return[n,r]}function xr(t){return t.map(e=>String.fromCharCode(e)).join("")}function z(){for(let t=1;t<arguments.length;t++)for(const e in arguments[t])arguments[0][e]=arguments[t][e];return arguments[0]}function l_(t,e,n){let r=!1;Object.defineProperty(t,e,{get(){return r||(r=!0,Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n.apply(t),writable:!0})),t[e]},configurable:!0,enumerable:!0})}function a_(t){if(typeof btoa<"u")return btoa(typeof t=="string"?t:Array.prototype.reduce.call(new Uint8Array(t),(e,n)=>e+String.fromCharCode(n),""));if(!(typeof Buffer>"u"))return typeof Buffer.from<"u"?Buffer.from(t).toString("base64"):new Buffer(t).toString("base64")}function GS(t){const e=t.substring(t.indexOf(",")+1);if(t.indexOf(";base64")!==-1)return typeof atob<"u"?Uint8Array.from(atob(e),r=>r.charCodeAt(0)).buffer:typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(e,"base64"):new Buffer(e,"base64");const n=decodeURIComponent(e);return typeof Buffer<"u"?typeof Buffer.from<"u"?Buffer.from(n):new Buffer(n):Uint8Array.from(n,r=>r.charCodeAt(0)).buffer}function ZS(t,e,n){return c_(n,e-t.length)+t}function WS(t,e){return parseInt(t.replace(".",""),e)/Math.pow(e,(t.split(".")[1]||"").length)}function c_(t,e){return new Array(e+1).join(t)}const Ai=void 0,u_=0;function d_(t,e,n,r="string"){if(e===u_&&typeof DecompressionStream=="function"){const o=new DecompressionStream("deflate"),s=new Blob([t]).stream().pipeThrough(o);return r==="dataview"?new Response(s).arrayBuffer().then(l=>new DataView(l)):new Response(s).arrayBuffer().then(l=>new TextDecoder(n).decode(l))}return e!==void 0?Promise.reject(`Unknown compression method ${e}.`):t}const f_={USE_FILE:!0,USE_JFIF:!0,USE_PNG_FILE:!0,USE_EXIF:!0,USE_IPTC:!0,USE_XMP:!0,USE_ICC:!0,USE_MPF:!0,USE_PHOTOSHOP:!0,USE_THUMBNAIL:!0,USE_TIFF:!0,USE_JPEG:!0,USE_PNG:!0,USE_HEIC:!0,USE_AVIF:!0,USE_WEBP:!0,USE_GIF:!0,USE_MAKER_NOTES:!0};function _e(t){return t.map(e=>String.fromCharCode(e)).join("")}function la(t){if(t.length>=8){const e=_e(t.slice(0,8));if(e==="ASCII\0\0\0")return _e(t.slice(8));if(e==="JIS\0\0\0\0\0")return"[JIS encoded text]";if(e==="UNICODE\0")return"[Unicode encoded text]";if(e==="\0\0\0\0\0\0\0\0")return"[Undefined encoding]"}return"Undefined"}function Oi(t){return t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600}const aa=18761,ca=19789,Fn={BIG_ENDIAN:ca,LITTLE_ENDIAN:aa,getByteOrder:jS};function jS(t,e){if(t.getUint16(e)===aa)return aa;if(t.getUint16(e)===ca)return ca;throw new Error("Illegal byte order value. Faulty image.")}const m_={isTiffFile:YS,findTiffOffsets:QS};function YS(t){return!!t&&t.byteLength>=4&&KS(t)}function KS(t){const r=t.getUint16(0)===Fn.LITTLE_ENDIAN;return t.getUint16(2,r)===42}function QS(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}const __={isJpegFile:m3,findJpegOffsets:_3},XS=2,JS=65496,h_=2,nt=4,Ne=2,e3=2,t3=10,n3=18,p_=33,g_=79,y_=18,r3=8,ua="ICC_PROFILE\0",b_=nt+ua.length,o3=b_+1,w_="MPF\0",k_=65472,x_=65474,i3=65476,s3=65499,l3=65501,a3=65498,S_=65504,da=65505,C_=65506,c3=65517,u3=65519,d3=65534,f3=65535,E_="JFIF",T_="Exif",B_="http://ns.adobe.com/xap/1.0/\0",N_="http://ns.adobe.com/xmp/extension/\0",I_="Photoshop 3.0";function m3(t){return!!t&&t.byteLength>=XS&&t.getUint16(0)===JS}function _3(t){let e=h_,n,r,o,s,l,a,c,u,d;for(;e+nt+5<=t.byteLength;){if(h3(t,e))n=t.getUint16(e+Ne),r=e+Ne;else if(p3(t,e))n=t.getUint16(e+Ne),o=e+Ne;else if(b3(t,e))n=t.getUint16(e+Ne),s=e+e3;else if(w3(t,e))n=t.getUint16(e+Ne),l=e+t3;else if(k3(t,e))c||(c=[]),n=t.getUint16(e+Ne),c.push(E3(e,n));else if(S3(t,e))c||(c=[]),n=t.getUint16(e+Ne),c.push(T3(e,n));else if(B3(t,e))n=t.getUint16(e+Ne),a=e+n3;else if(g3(t,e)){n=t.getUint16(e+Ne);const f=e+y_,m=n-(y_-Ne),_=t.getUint8(e+b_),p=t.getUint8(e+o3);u||(u=[]),u.push({offset:f,length:m,chunkNumber:_,chunksTotal:p})}else if(y3(t,e))n=t.getUint16(e+Ne),d=e+r3;else if(N3(t,e))n=t.getUint16(e+Ne);else if(I3(t,e)){e++;continue}else break;e+=Ne+n}return{hasAppMarkers:e>h_,fileDataOffset:r||o,jfifDataOffset:s,tiffHeaderOffset:l,iptcDataOffset:a,xmpChunks:c,iccChunks:u,mpfDataOffset:d}}function h3(t,e){return t.getUint16(e)===k_}function p3(t,e){return t.getUint16(e)===x_}function g3(t,e){const n=ua.length;return t.getUint16(e)===C_&&R(t,e+nt,n)===ua}function y3(t,e){const n=w_.length;return t.getUint16(e)===C_&&R(t,e+nt,n)===w_}function b3(t,e){const n=E_.length;return t.getUint16(e)===S_&&R(t,e+nt,n)===E_&&t.getUint8(e+nt+n)===0}function w3(t,e){const n=T_.length;return t.getUint16(e)===da&&R(t,e+nt,n)===T_&&t.getUint8(e+nt+n)===0}function k3(t,e){return t.getUint16(e)===da&&x3(t,e)}function x3(t,e){const n=B_.length;return R(t,e+nt,n)===B_}function S3(t,e){return t.getUint16(e)===da&&C3(t,e)}function C3(t,e){const n=N_.length;return R(t,e+nt,n)===N_}function E3(t,e){return{dataOffset:t+p_,length:e-(p_-Ne)}}function T3(t,e){return{dataOffset:t+g_,length:e-(g_-Ne)}}function B3(t,e){const n=I_.length;return t.getUint16(e)===c3&&R(t,e+nt,n)===I_&&t.getUint8(e+nt+n)===0}function N3(t,e){const n=t.getUint16(e);return n>=S_&&n<=u3||n===d3||n===k_||n===x_||n===i3||n===s3||n===l3||n===a3}function I3(t,e){return t.getUint16(e)===f3}const $_={isPngFile:A3,findPngOffsets:O3},fa=`‰PNG\r
152
152
  
153
- `,Di=4,ct=4,Sr=0,tn=Di,be=Di+ct,ma="XML:com.adobe.xmp\0",_a="tEXt",An="iTXt",Mi="zTXt",F_="pHYs",A_="tIME",$3="eXIf",F3="iCCP";function A3(t){return!!t&&R(t,0,fa.length)===fa}function O3(t,e){const r={hasAppMarkers:!1};let o=fa.length;for(;o+Di+ct<=t.byteLength;){if(D3(t,o))r.hasAppMarkers=!0,r.pngHeaderOffset=o+be;else if(M3(t,o)){const s=R3(t,o);s!==void 0&&(r.hasAppMarkers=!0,r.xmpChunks=[{dataOffset:s,length:t.getUint32(o+Sr)-(s-(o+be))}])}else if(P3(t,o,e)){r.hasAppMarkers=!0;const s=R(t,o+tn,ct);r.pngTextChunks||(r.pngTextChunks=[]),r.pngTextChunks.push({length:t.getUint32(o+Sr),type:s,offset:o+be})}else if(v3(t,o))r.hasAppMarkers=!0,r.tiffHeaderOffset=o+be;else if(e&&L3(t,o)){r.hasAppMarkers=!0;const s=t.getUint32(o+Sr),l=o+be,{profileName:a,compressionMethod:c,compressedProfileOffset:u}=U3(t,l);r.iccChunks||(r.iccChunks=[]),r.iccChunks.push({offset:u,length:s-(u-l),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:c})}else V3(t,o)&&(r.hasAppMarkers=!0,r.pngChunkOffsets||(r.pngChunkOffsets=[]),r.pngChunkOffsets.push(o+Sr));o+=t.getUint32(o+Sr)+Di+ct+4}return r}function D3(t,e){return R(t,e+tn,ct)==="IHDR"}function M3(t,e){return R(t,e+tn,ct)===An&&R(t,e+be,ma.length)===ma}function P3(t,e,n){const r=R(t,e+tn,ct);return r===_a||r===An||r===Mi&&n}function v3(t,e){return R(t,e+tn,ct)===$3}function L3(t,e){return R(t,e+tn,ct)===F3}function V3(t,e){const n=[F_,A_],r=R(t,e+tn,ct);return n.includes(r)}function R3(t,e){e+=be+ma.length+1+1;let o=0;for(;o<2&&e<t.byteLength;)t.getUint8(e)===0&&o++,e++;if(!(o<2))return e}function U3(t,e){const o=kr(t,e);e+=o.length+1;const s=t.getUint8(e);return e+=1,{profileName:o,compressionMethod:s,compressedProfileOffset:e}}function z3(t,e){return t.getUint32(e+4)}function q3(t,e,n,r){const{offsets:s,sizes:l}=H3(e,n+3),a=t.getUint8(s.offsetSize)>>4;l.item.extent.extentOffset=a;const c=t.getUint8(s.lengthSize)&15;l.item.extent.extentLength=c;const u=t.getUint8(s.baseOffsetSize)>>4;l.item.baseOffset=u;const d=G3(t,s.indexSize,e);l.item.extent.extentIndex=d!==void 0?d:0;const f=Z3(t,s.itemCount,e);return{type:"iloc",items:W3(t,e,s,l,a,c,d,f),length:r}}function H3(t,e){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};t<2?(n.itemCount=2,n.item.itemId=2):t===2&&(n.itemCount=4,n.item.itemId=4),t===1||t===2?n.item.constructionMethod=2:n.item.constructionMethod=0;const r={offsetSize:e,lengthSize:e,baseOffsetSize:e+1,indexSize:e+1};return r.itemCount=e+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}function G3(t,e,n){if(n===1||n===2)return t.getUint8(e)&15}function Z3(t,e,n){if(n<2)return t.getUint16(e);if(n===2)return t.getUint32(e)}function W3(t,e,n,r,o,s,l,a){if(a===void 0)return[];const c=[];let u=n.items;for(let d=0;d<a;d++){const f={extents:[]};f.itemId=j3(t,u,e),u+=r.item.itemId,f.constructionMethod=e===1||e===2?t.getUint16(u)&15:void 0,u+=r.item.constructionMethod,f.dataReferenceIndex=t.getUint16(u),u+=r.item.dataReferenceIndex,f.baseOffset=Pi(t,u,r.item.baseOffset),u+=r.item.baseOffset,f.extentCount=t.getUint16(u),u+=r.item.extentCount;for(let m=0;m<f.extentCount;m++){const _={};_.extentIndex=Y3(t,e,u,l),u+=r.item.extent.extentIndex,_.extentOffset=Pi(t,u,o),u+=r.item.extent.extentOffset,_.extentLength=Pi(t,u,s),u+=r.item.extent.extentLength,f.extents.push(_)}c.push(f)}return c}function j3(t,e,n){if(n<2)return t.getUint16(e);if(n===2)return t.getUint32(e)}function Y3(t,e,n,r){if((e===1||e===2)&&r>0)return Pi(t,n,r)}function Pi(t,e,n){return n===4?t.getUint32(e):n===8?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),z3(t,e)):0}const K3=1718909296,Q3=1768977008,X3=1835365473,J3=1768714083,e4=1768517222,t4=1768842853,n4=1768973167,r4=1668246642,O_=1165519206,ha=1835625829,o4=1970432288;function vi(t,e){const{length:s,contentOffset:l}=i4(t,e);if(s<8)return;const a=t.getUint32(e+4);if(a===K3)return p4(t,l,s);if(a===Q3)return g4(t,e,l,s);if(a===n4)return y4(t,e,l,s);if(a===r4)return b4(t,l,s);const c=t.getUint8(l);return a===X3?k4(t,e,l+1,s):a===J3?q3(t,c,l+1,s):a===e4?x4(t,e,c,l+1,s):a===t4?C4(t,e,c,l+1,s):{type:void 0,length:s}}function i4(t,e){const l=t.getUint32(e);return s4(l)?{length:t.byteLength-e,contentOffset:e+4+4}:l4(l)&&a4(t,e)?{length:t.getUint32(e+12),contentOffset:e+4+4+8}:{length:l,contentOffset:e+4+4}}function s4(t){return t===0}function l4(t){return t===1}function a4(t,e){return t.getUint32(e+8)===0}function D_(t){{const e={},n=c4(t);return n?(e.tiffHeaderOffset=u4(t,n),e.xmpChunks=m4(n),e.iccChunks=h4(n),e.hasAppMarkers=e.tiffHeaderOffset!==void 0||e.xmpChunks!==void 0||e.iccChunks!==void 0,e):{hasAppMarkers:!1}}}function c4(t){let r=0;for(;r+4+4<=t.byteLength;){const o=vi(t,r);if(o===void 0)break;if(o.type==="meta")return o;r+=o.length}}function u4(t,e){try{const n=d4(e).itemId,r=pa(e,n),o=r.baseOffset+r.extents[0].extentOffset;return f4(t,o)}catch{return}}function d4(t){return t.subBoxes.find(e=>e.type==="iinf").itemInfos.find(e=>e.itemType===O_)}function pa(t,e){return t.subBoxes.find(n=>n.type==="iloc").items.find(n=>n.itemId===e)}function f4(t,e){return e+4+t.getUint32(e)}function m4(t){try{const e=_4(t).itemId,n=pa(t,e),r=pa(t,e).extents[0];return[{dataOffset:n.baseOffset+r.extentOffset,length:r.extentLength}]}catch{return}}function _4(t){return t.subBoxes.find(e=>e.type==="iinf").itemInfos.find(e=>e.itemType===ha&&e.contentType==="application/rdf+xml")}function h4(t){try{const e=t.subBoxes.find(n=>n.type==="iprp").subBoxes.find(n=>n.type==="ipco").properties.find(n=>n.type==="colr").icc;if(e)return[e]}catch{}}function p4(t,e,n){return{type:"ftyp",majorBrand:R(t,e,4),length:n}}function g4(t,e,n,r){return{type:"iprp",subBoxes:Li(t,n,r-(n-e)),length:r}}function y4(t,e,n,r){return{type:"ipco",properties:Li(t,n,r-(n-e)),length:r}}function b4(t,e,n){return{type:"colr",icc:w4(t,e),length:n}}function w4(t,e){const r=R(t,e,4);if(!(r!=="prof"&&r!=="rICC"))return{offset:e+4,length:t.getUint32(e+4),chunkNumber:1,chunksTotal:1}}function k4(t,e,n,r){return{type:"meta",subBoxes:Li(t,n+3,r-(n+3-e)),length:r}}function Li(t,e,n){const r=[O_,ha],o=[];let s=e;for(;s<e+n;){const l=vi(t,s);if(l===void 0)break;l.type!==void 0&&(l.itemType===void 0||r.indexOf(l.itemType)!==-1)&&o.push(l),s+=l.length}return o}function x4(t,e,n,r,o){const{offsets:s}=S4(n,r);return{type:"iinf",itemInfos:Li(t,s.itemInfos,o-(s.itemInfos-e)),length:o}}function S4(t,e){const r={entryCount:e+3},o={};return t===0?o.entryCount=2:o.entryCount=4,r.itemInfos=r.entryCount+o.entryCount,{offsets:r}}function C4(t,e,n,r,o){r+=3;const l={type:"infe",length:o};return(n===0||n===1)&&(l.itemId=t.getUint16(r),r+=2,l.itemProtectionIndex=t.getUint16(r),r+=2,l.itemName=kr(t,r),r+=l.itemName.length+1),n>=2&&(n===2?(l.itemId=t.getUint16(r),r+=2):n===3&&(l.itemId=t.getUint32(r),r+=4),l.itemProtectionIndex=t.getUint16(r),r+=2,l.itemType=t.getUint32(r),r+=4,l.itemName=kr(t,r),r+=l.itemName.length+1,l.itemType===ha?(l.contentType=kr(t,r),r+=l.contentType.length+1,e+o>r&&(l.contentEncoding=kr(t,r),r+=l.contentEncoding.length+1)):l.itemType===o4&&(l.itemUri=kr(t,r),r+=l.itemUri.length+1)),l}const M_={isHeicFile:E4,findHeicOffsets:T4};function E4(t){if(!t)return!1;const e=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=vi(t,0);return n&&e.indexOf(n.majorBrand)!==-1}catch{return!1}}function T4(t){return D_(t)}const P_={isAvifFile:B4,findAvifOffsets:N4};function B4(t){if(!t)return!1;try{const e=vi(t,0);return e&&e.majorBrand==="avif"}catch{return!1}}function N4(t){return D_(t)}const v_={isWebpFile:I4,findOffsets:$4};function I4(t){const n="RIFF",o="WEBP";return!!t&&R(t,0,n.length)===n&&R(t,8,o.length)===o}function $4(t){const r="Exif\0\0";let s=12,l=!1,a,c,u,d;for(;s+8<t.byteLength;){const f=R(t,s,4),m=t.getUint32(s+4,!0);f==="EXIF"?(l=!0,R(t,s+8,r.length)===r?a=s+8+r.length:a=s+8):f==="XMP "?(l=!0,c=[{dataOffset:s+8,length:m}]):f==="ICCP"?(l=!0,u=[{offset:s+8,length:m,chunkNumber:1,chunksTotal:1}]):f==="VP8X"&&(l=!0,d=s+8),s+=8+(m%2===0?m:m+1)}return{hasAppMarkers:l,tiffHeaderOffset:a,xmpChunks:c,iccChunks:u,vp8xChunkOffset:d}}const L_={isGifFile:O4,findOffsets:D4},F4=6,A4=["GIF87a","GIF89a"];function O4(t){return!!t&&A4.includes(R(t,0,F4))}function D4(){return{gifHeaderOffset:0}}const V_={isXMLFile:M4,findOffsets:P4},R_=0,U_="<?xpacket begin";function M4(t){return!!t&&R(t,R_,U_.length)===U_}function P4(t){const e=[];return e.push({dataOffset:R_,length:t.byteLength}),{xmpChunks:e}}const v4={parseAppMarkers:L4};function L4(t,e){if(m_.isTiffFile(t))return nn(m_.findTiffOffsets(),"tiff","TIFF");if(__.isJpegFile(t))return nn(__.findJpegOffsets(t),"jpeg","JPEG");if($_.isPngFile(t))return nn($_.findPngOffsets(t,e),"png","PNG");if(M_.isHeicFile(t))return nn(M_.findHeicOffsets(t),"heic","HEIC");if(P_.isAvifFile(t))return nn(P_.findAvifOffsets(t),"avif","AVIF");if(v_.isWebpFile(t))return nn(v_.findOffsets(t),"webp","WebP");if(L_.isGifFile(t))return nn(L_.findOffsets(t),"gif","GIF");if(V_.isXMLFile(t))return nn(V_.findOffsets(t),"xml","XML");throw new Error("Invalid image format")}function nn(t,e,n){return z({},t,{fileType:{value:e,description:n}})}const U={ApertureValue:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2),ColorSpace(t){return t===1?"sRGB":t===65535?"Uncalibrated":"Unknown"},ComponentsConfiguration(t){return t.map(e=>{if(e===49)return"Y";if(e===50)return"Cb";if(e===51)return"Cr";if(e===52)return"R";if(e===53)return"G";if(e===54)return"B"}).join("")},Contrast(t){return t===0?"Normal":t===1?"Soft":t===2?"Hard":"Unknown"},CustomRendered(t){return t===0?"Normal process":t===1?"Custom process":"Unknown"},ExposureMode(t){return t===0?"Auto exposure":t===1?"Manual exposure":t===2?"Auto bracket":"Unknown"},ExposureProgram(t){return t===0?"Undefined":t===1?"Manual":t===2?"Normal program":t===3?"Aperture priority":t===4?"Shutter priority":t===5?"Creative program":t===6?"Action program":t===7?"Portrait mode":t===8?"Landscape mode":t===9?"Bulb":"Unknown"},ExposureTime(t){if(t[0]/t[1]>.25){const e=t[0]/t[1];return Number.isInteger(e)?""+e:e.toFixed(1)}return t[0]!==0?`1/${Math.round(t[1]/t[0])}`:`0/${t[1]}`},FNumber:t=>`f/${t[0]/t[1]}`,FocalLength:t=>t[0]/t[1]+" mm",FocalPlaneResolutionUnit(t){return t===2?"inches":t===3?"centimeters":"Unknown"},LightSource:t=>t===1?"Daylight":t===2?"Fluorescent":t===3?"Tungsten (incandescent light)":t===4?"Flash":t===9?"Fine weather":t===10?"Cloudy weather":t===11?"Shade":t===12?"Daylight fluorescent (D 5700 – 7100K)":t===13?"Day white fluorescent (N 4600 – 5400K)":t===14?"Cool white fluorescent (W 3900 – 4500K)":t===15?"White fluorescent (WW 3200 – 3700K)":t===17?"Standard light A":t===18?"Standard light B":t===19?"Standard light C":t===20?"D55":t===21?"D65":t===22?"D75":t===23?"D50":t===24?"ISO studio tungsten":t===255?"Other light source":"Unknown",MeteringMode(t){return t===1?"Average":t===2?"CenterWeightedAverage":t===3?"Spot":t===4?"MultiSpot":t===5?"Pattern":t===6?"Partial":t===255?"Other":"Unknown"},ResolutionUnit(t){return t===2?"inches":t===3?"centimeters":"Unknown"},Saturation(t){return t===0?"Normal":t===1?"Low saturation":t===2?"High saturation":"Unknown"},SceneCaptureType(t){return t===0?"Standard":t===1?"Landscape":t===2?"Portrait":t===3?"Night scene":"Unknown"},Sharpness(t){return t===0?"Normal":t===1?"Soft":t===2?"Hard":"Unknown"},ShutterSpeedValue(t){const e=Math.pow(2,t[0]/t[1]);return e<=1?`${Math.round(1/e)}`:`1/${Math.round(e)}`},WhiteBalance(t){return t===0?"Auto white balance":t===1?"Manual white balance":"Unknown"},XResolution:t=>""+Math.round(t[0]/t[1]),YResolution:t=>""+Math.round(t[0]/t[1])},z_={11:"ProcessingSoftware",254:{name:"SubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"})[t]||"Unknown"},255:{name:"OldSubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"})[t]||"Unknown"},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:t=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"})[t]||"Unknown"},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:t=>({1:"Normal",2:"Reversed"})[t]||"Unknown"},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:t=>t===1?"top-left":t===2?"top-right":t===3?"bottom-right":t===4?"bottom-left":t===5?"left-top":t===6?"right-top":t===7?"right-bottom":t===8?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:U.XResolution},283:{name:"YResolution",description:U.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:t=>""+Math.round(t[0]/t[1])},287:{name:"YPosition",description:t=>""+Math.round(t[0]/t[1])},290:{name:"GrayResponseUnit",description:t=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"})[t]||"Unknown"},296:{name:"ResolutionUnit",description:U.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:t=>t.map(e=>`${e[0]}/${e[1]}`).join(", ")},319:{name:"PrimaryChromaticities",description:t=>t.map(e=>`${e[0]}/${e[1]}`).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:t=>({1:"CMYK",2:"Not CMYK"})[t]||"Unknown"},337:"TargetPrinter",338:{name:"ExtraSamples",description:t=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"})[t]||"Unknown"},339:{name:"SampleFormat",description:t=>{const e={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(t)?t.map(n=>e[n]||"Unknown").join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:t=>t.map(e=>""+e[0]/e[1]).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:t=>t===1?"centered":t===2?"co-sited":"undefined "+t},532:{name:"ReferenceBlackWhite",description:t=>t.map(e=>""+e[0]/e[1]).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:t=>t.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:po},40092:{name:"XPComment",description:po},40093:{name:"XPAuthor",description:po},40094:{name:"XPKeywords",description:po},40095:{name:"XPSubject",description:po},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:t=>({0:"Unsafe",1:"Safe"})[t]||"Unknown"},50778:{name:"CalibrationIlluminant1",description:U.LightSource},50779:{name:"CalibrationIlluminant2",description:U.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:t=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"})[t]||"Unknown"},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:t=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"})[t]||"Unknown"},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:t=>({0:"Linear",1:"sRGB"})[t]||"Unknown"},51108:{name:"ProfileLookTableEncoding",description:t=>({0:"Linear",1:"sRGB"})[t]||"Unknown"},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:t=>({0:"Auto",1:"None"})[t]||"Unknown"},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function po(t){return new TextDecoder("utf-16").decode(new Uint8Array(t)).replace(/\u0000+$/,"")}const V4={33434:{name:"ExposureTime",description:U.ExposureTime},33437:{name:"FNumber",description:U.FNumber},34850:{name:"ExposureProgram",description:U.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:t=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"})[t]||"Unknown"},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:t=>_e(t)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:U.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:U.ShutterSpeedValue},37378:{name:"ApertureValue",description:U.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2)},37382:{name:"SubjectDistance",description:t=>t[0]/t[1]+" m"},37383:{name:"MeteringMode",description:U.MeteringMode},37384:{name:"LightSource",description:U.LightSource},37385:{name:"Flash",description:t=>t===0?"Flash did not fire":t===1?"Flash fired":t===5?"Strobe return light not detected":t===7?"Strobe return light detected":t===9?"Flash fired, compulsory flash mode":t===13?"Flash fired, compulsory flash mode, return light not detected":t===15?"Flash fired, compulsory flash mode, return light detected":t===16?"Flash did not fire, compulsory flash mode":t===24?"Flash did not fire, auto mode":t===25?"Flash fired, auto mode":t===29?"Flash fired, auto mode, return light not detected":t===31?"Flash fired, auto mode, return light detected":t===32?"No flash function":t===65?"Flash fired, red-eye reduction mode":t===69?"Flash fired, red-eye reduction mode, return light not detected":t===71?"Flash fired, red-eye reduction mode, return light detected":t===73?"Flash fired, compulsory flash mode, red-eye reduction mode":t===77?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":t===79?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":t===89?"Flash fired, auto mode, red-eye reduction mode":t===93?"Flash fired, auto mode, return light not detected, red-eye reduction mode":t===95?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:U.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:t=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"})[t]||"Unknown"},37395:"ImageHistory",37396:{name:"SubjectArea",description:t=>t.length===2?`Location; X: ${t[0]}, Y: ${t[1]}`:t.length===3?`Circle; X: ${t[0]}, Y: ${t[1]}, diameter: ${t[2]}`:t.length===4?`Rectangle; X: ${t[0]}, Y: ${t[1]}, width: ${t[2]}, height: ${t[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:la},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:t=>t[0]/t[1]+" °C"},37889:{name:"Humidity",description:t=>t[0]/t[1]+" %"},37890:{name:"Pressure",description:t=>t[0]/t[1]+" hPa"},37891:{name:"WaterDepth",description:t=>t[0]/t[1]+" m"},37892:{name:"Acceleration",description:t=>t[0]/t[1]+" mGal"},37893:{name:"CameraElevationAngle",description:t=>t[0]/t[1]+" °"},40960:{name:"FlashpixVersion",description:t=>t.map(e=>String.fromCharCode(e)).join("")},40961:{name:"ColorSpace",description:U.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:U.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([t,e])=>`X: ${t}, Y: ${e}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:t=>t===1?"Undefined":t===2?"One-chip color area sensor":t===3?"Two-chip color area sensor":t===4?"Three-chip color area sensor":t===5?"Color sequential area sensor":t===7?"Trilinear sensor":t===8?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:t=>t===3?"DSC":"Unknown"},41729:{name:"SceneType",description:t=>t===1?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:U.CustomRendered},41986:{name:"ExposureMode",description:U.ExposureMode},41987:{name:"WhiteBalance",description:U.WhiteBalance},41988:{name:"DigitalZoomRatio",description:t=>t[0]===0?"Digital zoom was not used":""+t[0]/t[1]},41989:{name:"FocalLengthIn35mmFilm",description:t=>t===0?"Unknown":t},41990:{name:"SceneCaptureType",description:U.SceneCaptureType},41991:{name:"GainControl",description:t=>t===0?"None":t===1?"Low gain up":t===2?"High gain up":t===3?"Low gain down":t===4?"High gain down":"Unknown"},41992:{name:"Contrast",description:U.Contrast},41993:{name:"Saturation",description:U.Saturation},41994:{name:"Sharpness",description:U.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:t=>t===1?"Macro":t===2?"Close view":t===3?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:t=>{const e=parseFloat((t[0][0]/t[0][1]).toFixed(5)),n=parseFloat((t[1][0]/t[1][1]).toFixed(5)),r=`${e}-${n} mm`;if(t[3][1]===0)return`${r} f/?`;const o=1/(t[2][1]/t[2][1]/(t[3][0]/t[3][1]));return`${r} f/${parseFloat(o.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:t=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"})[t]||"Unknown"},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},R4={0:{name:"GPSVersionID",description:t=>t[0]===2&&t[1]===2&&t[2]===0&&t[3]===0?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:t=>{const e=t.join("");return e==="N"?"North latitude":e==="S"?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:Oi},3:{name:"GPSLongitudeRef",description:t=>{const e=t.join("");return e==="E"?"East longitude":e==="W"?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:Oi},5:{name:"GPSAltitudeRef",description:t=>t===0?"Sea level":t===1?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:t=>t[0]/t[1]+" m"},7:{name:"GPSTimeStamp",description:t=>t.map(([e,n])=>{const r=e/n;return/^\d(\.|$)/.test(`${r}`)?`0${r}`:r}).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:t=>{const e=t.join("");return e==="A"?"Measurement in progress":e==="V"?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:t=>{const e=t.join("");return e==="2"?"2-dimensional measurement":e==="3"?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:t=>{const e=t.join("");return e==="K"?"Kilometers per hour":e==="M"?"Miles per hour":e==="N"?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:t=>{const e=t.join("");return e==="N"?"North latitude":e==="S"?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:t=>{const e=t.join("");return e==="E"?"East longitude":e==="W"?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},23:{name:"GPSDestBearingRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:t=>{const e=t.join("");return e==="K"?"Kilometers":e==="M"?"Miles":e==="N"?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:la},28:{name:"GPSAreaInformation",description:la},29:"GPSDateStamp",30:{name:"GPSDifferential",description:t=>t===0?"Measurement without differential correction":t===1?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},U4={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:t=>_e(t)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},z4={45056:{name:"MPFVersion",description:t=>_e(t)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},q4={4:{name:"ShotInfo",description:t=>t}},q_=z({},z_,V4),ga="0th",H_="1st",G_="exif",Z_="gps",W_="interoperability",j_="mpf",Y_="canon",rn={[ga]:q_,[H_]:z_,[G_]:q_,[Z_]:R4,[W_]:U4,[j_]:z4,[Y_]:q4},K_={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},ya={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},F={getAsciiValue:H4,getByteAt:Q_,getAsciiAt:G4,getShortAt:Z4,getLongAt:Vi,getRationalAt:W4,getUndefinedAt:j4,getSlongAt:ba,getSrationalAt:Y4,getIfdPointerAt:K4,typeSizes:K_,tagTypes:ya,getTypeSize:Q4};function H4(t){return t.map(e=>String.fromCharCode(e))}function Q_(t,e){return t.getUint8(e)}function G4(t,e){return t.getUint8(e)}function Z4(t,e,n){return t.getUint16(e,n===Fn.LITTLE_ENDIAN)}function Vi(t,e,n){return t.getUint32(e,n===Fn.LITTLE_ENDIAN)}function W4(t,e,n){return[Vi(t,e,n),Vi(t,e+4,n)]}function j4(t,e){return Q_(t,e)}function ba(t,e,n){return t.getInt32(e,n===Fn.LITTLE_ENDIAN)}function Y4(t,e,n){return[ba(t,e,n),ba(t,e+4,n)]}function K4(t,e,n){return Vi(t,e,n)}function Q4(t){if(ya[t]===void 0)throw new Error("No such type found.");return K_[ya[t]]}const X4={1:F.getByteAt,2:F.getAsciiAt,3:F.getShortAt,4:F.getLongAt,5:F.getRationalAt,7:F.getUndefinedAt,9:F.getSlongAt,10:F.getSrationalAt,13:F.getIfdPointerAt};function X_(t,e,n){return e+F.getLongAt(t,e+4,n)}function On(t,e,n,r,o,s){const l=F.getTypeSize("SHORT"),a=12,c={},u=J4(t,r,o);r+=l;for(let d=0;d<u&&!(r+a>t.byteLength);d++){const f=eC(t,e,n,r,o,s);f!==void 0&&(c[f.name]={id:f.id,value:f.value,description:f.description},f.name==="MakerNote"&&(c[f.name].__offset=f.__offset)),r+=a}if(r<t.byteLength-F.getTypeSize("LONG")){const d=F.getLongAt(t,r,o);d!==0&&e===ga&&(c.Thumbnail=On(t,H_,n,n+d,o,s))}return c}function J4(t,e,n){return e+F.getTypeSize("SHORT")<=t.byteLength?F.getShortAt(t,e,n):0}function eC(t,e,n,r,o,s){const a=F.getTypeSize("SHORT"),c=a+F.getTypeSize("SHORT"),u=c+F.getTypeSize("LONG"),d=F.getShortAt(t,r,o),f=F.getShortAt(t,r+a,o),m=F.getLongAt(t,r+c,o);let _,p;if(F.typeSizes[f]===void 0||!s&&rn[e][d]===void 0)return;if(tC(f,m))p=r+u,_=J_(t,p,f,m,o);else if(p=F.getLongAt(t,r+u,o),nC(t,n,p,f,m)){const w=d===33723;_=J_(t,n+p,f,m,o,w)}else _="<faulty value>";f===F.tagTypes.ASCII&&(_=rC(_),_=oC(_));let h=`undefined-${d}`,g=_;if(rn[e][d]!==void 0)if(rn[e][d].name!==void 0&&rn[e][d].description!==void 0){h=rn[e][d].name;try{g=rn[e][d].description(_)}catch{g=e1(_)}}else f===F.tagTypes.RATIONAL||f===F.tagTypes.SRATIONAL?(h=rn[e][d],g=""+_[0]/_[1]):(h=rn[e][d],g=e1(_));return{id:d,name:h,value:_,description:g,__offset:p}}function tC(t,e){return F.typeSizes[t]*e<=F.getTypeSize("LONG")}function J_(t,e,n,r,o,s=!1){let l=[];s&&(r=r*F.typeSizes[n],n=F.tagTypes.BYTE);for(let a=0;a<r;a++)l.push(X4[n](t,e,o)),e+=F.typeSizes[n];return n===F.tagTypes.ASCII?l=F.getAsciiValue(l):l.length===1&&(l=l[0]),l}function nC(t,e,n,r,o){return e+n+F.typeSizes[r]*o<=t.byteLength}function rC(t){const e=[];let n=0;for(let r=0;r<t.length;r++){if(t[r]==="\0"){n++;continue}e[n]===void 0&&(e[n]=""),e[n]+=t[r]}return e}function oC(t){try{return t.map(e=>decodeURIComponent(escape(e)))}catch{return t}}function e1(t){return t instanceof Array?t.join(", "):t}const t1="Exif IFD Pointer",n1="GPS Info IFD Pointer",r1="Interoperability IFD Pointer",o1={read:iC};function iC(t,e,n){const r=Fn.getByteOrder(t,e);let o=sC(t,e,r,n);return o=lC(o,t,e,r,n),o=aC(o,t,e,r,n),o=cC(o,t,e,r,n),{tags:o,byteOrder:r}}function sC(t,e,n,r){return On(t,ga,e,X_(t,e,n),n,r)}function lC(t,e,n,r,o){return t[t1]!==void 0?z(t,On(e,G_,n,n+t[t1].value,r,o)):t}function aC(t,e,n,r,o){return t[n1]!==void 0?z(t,On(e,Z_,n,n+t[n1].value,r,o)):t}function cC(t,e,n,r,o){return t[r1]!==void 0?z(t,On(e,W_,n,n+t[r1].value,r,o)):t}const uC={read:dC},Cr=16;function dC(t,e,n){const r=Fn.getByteOrder(t,e),o=On(t,j_,e,X_(t,e,r),r,n);return fC(t,e,o,r)}function fC(t,e,n,r){if(!n.MPEntry)return n;const o=[];for(let s=0;s<Math.ceil(n.MPEntry.value.length/Cr);s++){o[s]={};const l=go(n.MPEntry.value,s*Cr,F.getTypeSize("LONG"),r);o[s].ImageFlags=mC(l),o[s].ImageFormat=_C(l),o[s].ImageType=hC(l);const a=go(n.MPEntry.value,s*Cr+4,F.getTypeSize("LONG"),r);o[s].ImageSize={value:a,description:""+a};const c=pC(s,n.MPEntry,r,e);o[s].ImageOffset={value:c,description:""+c};const u=go(n.MPEntry.value,s*Cr+12,F.getTypeSize("SHORT"),r);o[s].DependentImage1EntryNumber={value:u,description:""+u};const d=go(n.MPEntry.value,s*Cr+14,F.getTypeSize("SHORT"),r);o[s].DependentImage2EntryNumber={value:d,description:""+d},o[s].image=t.buffer.slice(c,c+a),l_(o[s],"base64",function(){return a_(this.image)})}return n.Images=o,n}function go(t,e,n,r){if(r===Fn.LITTLE_ENDIAN){let s=0;for(let l=0;l<n;l++)s+=t[e+l]<<8*l;return s}let o=0;for(let s=0;s<n;s++)o+=t[e+s]<<8*(n-1-s);return o}function mC(t){const e=[t>>31&1,t>>30&1,t>>29&1],n=[];return e[0]&&n.push("Dependent Parent Image"),e[1]&&n.push("Dependent Child Image"),e[2]&&n.push("Representative Image"),{value:e,description:n.join(", ")||"None"}}function _C(t){const e=t>>24&7;return{value:e,description:e===0?"JPEG":"Unknown"}}function hC(t){const e=t&16777215;return{value:e,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[e]||"Unknown"}}function pC(t,e,n,r){return gC(t)?0:go(e.value,t*Cr+8,F.getTypeSize("LONG"),n)+r}function gC(t){return t===0}const yC={read:bC};function bC(t,e){const n=wC(t,e),r=CC(t,e,n);return{"Bits Per Sample":kC(t,e,n),"Image Height":xC(t,e,n),"Image Width":SC(t,e,n),"Color Components":r,Subsampling:r&&EC(t,e,r.value,n)}}function wC(t,e){return F.getShortAt(t,e)}function kC(t,e,n){if(3>n)return;const s=F.getByteAt(t,e+2);return{value:s,description:""+s}}function xC(t,e,n){if(5>n)return;const s=F.getShortAt(t,e+3);return{value:s,description:`${s}px`}}function SC(t,e,n){if(7>n)return;const s=F.getShortAt(t,e+5);return{value:s,description:`${s}px`}}function CC(t,e,n){if(8>n)return;const s=F.getByteAt(t,e+7);return{value:s,description:""+s}}function EC(t,e,n,r){if(8+3*n>r)return;const l=[];for(let a=0;a<n;a++){const c=e+8+a*3;l.push([F.getByteAt(t,c),F.getByteAt(t,c+1),F.getByteAt(t,c+2)])}return{value:l,description:l.length>1?TC(l)+BC(l):""}}function TC(t){const e={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return t.map(n=>e[n[0]]).join("")}function BC(t){const e={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return t.length===0||t[0][1]===void 0||e[t[0][1]]===void 0?"":e[t[0][1]]}const NC={read:IC};function IC(t,e){const n=$C(t,e),r=PC(t,e,n),o=vC(t,e,n),s={"JFIF Version":FC(t,e,n),"Resolution Unit":AC(t,e,n),XResolution:DC(t,e,n),YResolution:MC(t,e,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":o};if(r!==void 0&&o!==void 0){const l=LC(t,e,3*r.value*o.value,n);l&&(s["JFIF Thumbnail"]=l)}for(const l in s)s[l]===void 0&&delete s[l];return s}function $C(t,e){return F.getShortAt(t,e)}function FC(t,e,n){if(9>n)return;const s=F.getByteAt(t,e+7),l=F.getByteAt(t,e+7+1);return{value:s*256+l,description:s+"."+l}}function AC(t,e,n){if(10>n)return;const s=F.getByteAt(t,e+9);return{value:s,description:OC(s)}}function OC(t){return t===0?"None":t===1?"inches":t===2?"cm":"Unknown"}function DC(t,e,n){if(12>n)return;const s=F.getShortAt(t,e+10);return{value:s,description:""+s}}function MC(t,e,n){if(14>n)return;const s=F.getShortAt(t,e+12);return{value:s,description:""+s}}function PC(t,e,n){if(15>n)return;const s=F.getByteAt(t,e+14);return{value:s,description:`${s}px`}}function vC(t,e,n){if(16>n)return;const s=F.getByteAt(t,e+15);return{value:s,description:`${s}px`}}function LC(t,e,n,r){return n===0||16+n>r?void 0:{value:t.buffer.slice(e+16,e+16+n),description:"<24-bit RGB pixel data>"}}const on={iptc:{256:{name:"Model Version",description:t=>((t[0]<<8)+t[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:t=>((t[0]<<8)+t[1]).toString()},278:{name:"File Format Version",description:t=>((t[0]<<8)+t[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:wa},336:{name:"Time Sent",description:ka},346:{name:"Coded Character Set",description:i1,encoding_name:i1},356:"UNO",376:{name:"ARM Identifier",description:t=>((t[0]<<8)+t[1]).toString()},378:{name:"ARM Version",description:t=>((t[0]<<8)+t[1]).toString()},512:{name:"Record Version",description:t=>((t[0]<<8)+t[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:t=>_e(t)==="01"?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:t=>{const e=_e(t).split(":");return e[2]+(e[3]?"/"+e[3]:"")+(e[4]?"/"+e[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:t=>{const e=_e(t);return e==="01"?"Object Kill":e==="02"?"Object Replace":e==="03"?"Object Append":e==="04"?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:wa},572:{name:"Time Created",description:ka},574:{name:"Digital Creation Date",description:wa},575:{name:"Digital Creation Time",description:ka},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:t=>{const e=_e(t);return e==="a"?"morning":e==="p"?"evening":e==="b"?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:t=>t},642:"Image Type",643:{name:"Image Orientation",description:t=>{const e=_e(t);return e==="P"?"Portrait":e==="L"?"Landscape":e==="S"?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:t=>{const e=_e(t),n=e.charAt(0),r=e.charAt(1);let o="";return n==="1"?o+="Mono":n==="2"&&(o+="Stereo"),r==="A"?o+=", actuality":r==="C"?o+=", question and answer session":r==="M"?o+=", music, transmitted by itself":r==="Q"?o+=", response to a question":r==="R"?o+=", raw sound":r==="S"?o+=", scener":r==="V"?o+=", voicer":r==="W"&&(o+=", wrap"),o!==""?o:e}},663:{name:"Audio Sampling Rate",description:t=>parseInt(_e(t),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:t=>{const e=parseInt(_e(t),10);return e+(e===1?" bit":" bits")}},665:{name:"Audio Duration",description:t=>{const e=_e(t);return e.length>=6?e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2):e}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:t=>t.length===2?"ObjectData Preview File Format":"Record 2 destination",description:t=>{if(t.length===2){const e=(t[0]<<8)+t[1];return e===0?"No ObjectData":e===1?"IPTC-NAA Digital Newsphoto Parameter Record":e===2?"IPTC7901 Recommended Message Format":e===3?"Tagged Image File Format (Adobe/Aldus Image data)":e===4?"Illustrator (Adobe Graphics data)":e===5?"AppleSingle (Apple Computer Inc)":e===6?"NAA 89-3 (ANPA 1312)":e===7?"MacBinary II":e===8?"IPTC Unstructured Character Oriented File Format (UCOFF)":e===9?"United Press International ANPA 1312 variant":e===10?"United Press International Down-Load Message":e===11?"JPEG File Interchange (JFIF)":e===12?"Photo-CD Image-Pac (Eastman Kodak)":e===13?"Microsoft Bit Mapped Graphics File [*.BMP]":e===14?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":e===15?"Audio plus Moving Video [*.AVI] (Microsoft)":e===16?"PC DOS/Windows Executable Files [*.COM][*.EXE]":e===17?"Compressed Binary File [*.ZIP] (PKWare Inc)":e===18?"Audio Interchange File Format AIFF (Apple Computer Inc)":e===19?"RIFF Wave (Microsoft Corporation)":e===20?"Freehand (Macromedia/Aldus)":e===21?'Hypertext Markup Language "HTML" (The Internet Society)':e===22?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":e===23?"MPEG 2 Audio Layer 3, ISO/IEC":e===24?"Portable Document File (*.PDF) Adobe":e===25?"News Industry Text Format (NITF)":e===26?"Tape Archive (*.TAR)":e===27?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":e===28?"Ritzaus Bureau NITF version (RBNITF DTD)":e===29?"Corel Draw [*.CDR]":`Unknown format ${e}`}return _e(t)}},713:{name:"ObjectData Preview File Format Version",description:(t,e)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=_e(t);if(e["ObjectData Preview File Format"]){const o=_e(e["ObjectData Preview File Format"].value);if(n[o]&&n[o][r])return n[o][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:t=>t[0].toString()},1812:{name:"Max Subfile Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1882:{name:"ObjectData Size Announced",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1887:{name:"Maximum ObjectData Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}}}};function wa(t){const e=_e(t);return e.length>=8?e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2):e}function ka(t){const e=_e(t);let n=e;return e.length>=6&&(n=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2),e.length===11&&(n+=e.substr(6,1)+e.substr(7,2)+":"+e.substr(9,2))),n}function i1(t){const e=_e(t);return e==="\x1B%G"?"UTF-8":e==="\x1B%5"?"Windows-1252":e==="\x1B%/G"?"UTF-8 Level 1":e==="\x1B%/H"?"UTF-8 Level 2":e==="\x1B%/I"?"UTF-8 Level 3":e==="\x1B/A"?"ISO-8859-1":e==="\x1B/B"?"ISO-8859-2":e==="\x1B/C"?"ISO-8859-3":e==="\x1B/D"?"ISO-8859-4":e==="\x1B/@"?"ISO-8859-5":e==="\x1B/G"?"ISO-8859-6":e==="\x1B/F"?"ISO-8859-7":e==="\x1B/H"?"ISO-8859-8":"Unknown"}const VC={get:RC};function RC(){if(typeof TextDecoder<"u")return TextDecoder}const s1={decode:UC,TAG_HEADER_SIZE:5};function UC(t,e){const n=VC.get();if(typeof n<"u"&&t!==void 0)try{return new n(t).decode(e instanceof DataView?e.buffer:Uint8Array.from(e))}catch{}const r=e.map(o=>String.fromCharCode(o)).join("");return zC(r)}function zC(t){try{return decodeURIComponent(escape(t))}catch{return t}}const qC=943868237,yo=4,Ri=2,HC=1,GC=2,l1=4,ZC=yo+Ri+GC+l1,WC=1028,a1=5,xa={read:jC};function jC(t,e,n){try{if(Array.isArray(t))return c1(new DataView(Uint8Array.from(t).buffer),{size:t.length},0,n);const{naaBlock:r,dataOffset:o}=YC(t,e);return c1(t,r,o,n)}catch{return{}}}function YC(t,e){for(;e+ZC<=t.byteLength;){const n=KC(t,e);if(QC(n))return{naaBlock:n,dataOffset:e+n.headerSize};e+=n.headerSize+n.size+XC(n)}throw new Error("No IPTC NAA resource block.")}function KC(t,e){if(t.getUint32(e,!1)!==qC)throw new Error("Not an IPTC resource block.");const n=t.getUint8(e+yo+Ri),r=(n%2===0?n+1:n)+HC;return{headerSize:yo+Ri+r+l1,type:t.getUint16(e+yo),size:t.getUint32(e+yo+Ri+r)}}function QC(t){return t.type===WC}function XC(t){return t.size%2!==0?1:0}function c1(t,e,n,r){const o={};let s;const l=n+e.size;for(;n<l&&n<t.byteLength;){const{tag:a,tagSize:c}=JC(t,n,o,s,r);if(a===null)break;a&&("encoding"in a&&(s=a.encoding),o[a.name]===void 0||a.repeatable===void 0?o[a.name]={id:a.id,value:a.value,description:a.description}:(o[a.name]instanceof Array||(o[a.name]=[{id:o[a.name].id,value:o[a.name].value,description:o[a.name].description}]),o[a.name].push({id:a.id,value:a.value,description:a.description}))),n+=a1+c}return o}function JC(t,e,n,r,o){if(eE(t,e))return{tag:null,tagSize:0};const a=t.getUint16(e+1),c=t.getUint16(e+3);if(!o&&!on.iptc[a])return{tag:void 0,tagSize:c};const u=tE(t,e+a1,c),d={id:a,name:nE(on.iptc[a],a,u),value:u,description:iE(on.iptc[a],u,n,r)};return aE(a)&&(d.repeatable=!0),cE(a)&&(d.encoding=on.iptc[a].encoding_name(u)),{tag:d,tagSize:c}}function eE(t,e){return t.getUint8(e)!==28}function tE(t,e,n){const r=[];for(let o=0;o<n;o++)r.push(t.getUint8(e+o));return r}function nE(t,e,n){return t?rE(t)?t:oE(t)?t.name(n):t.name:`undefined-${e}`}function rE(t){return typeof t=="string"}function oE(t){return typeof t.name=="function"}function iE(t,e,n,r){if(lE(t))try{return t.description(e,n)}catch{}return sE(t,e)?s1.decode(r,e):e}function sE(t,e){return t&&e instanceof Array}function lE(t){return t&&t.description!==void 0}function aE(t){return on.iptc[t]&&on.iptc[t].repeatable}function cE(t){return on.iptc[t]&&on.iptc[t].encoding_name!==void 0}const Ui={"tiff:Orientation"(t){return t==="1"?"Horizontal (normal)":t==="2"?"Mirror horizontal":t==="3"?"Rotate 180":t==="4"?"Mirror vertical":t==="5"?"Mirror horizontal and rotate 270 CW":t==="6"?"Rotate 90 CW":t==="7"?"Mirror horizontal and rotate 90 CW":t==="8"?"Rotate 270 CW":t},"tiff:ResolutionUnit":t=>U.ResolutionUnit(parseInt(t,10)),"tiff:XResolution":t=>Er(U.XResolution,t),"tiff:YResolution":t=>Er(U.YResolution,t),"exif:ApertureValue":t=>Er(U.ApertureValue,t),"exif:GPSLatitude":d1,"exif:GPSLongitude":d1,"exif:FNumber":t=>Er(U.FNumber,t),"exif:FocalLength":t=>Er(U.FocalLength,t),"exif:FocalPlaneResolutionUnit":t=>U.FocalPlaneResolutionUnit(parseInt(t,10)),"exif:ColorSpace":t=>U.ColorSpace(uE(t)),"exif:ComponentsConfiguration"(t,e){if(/^\d, \d, \d, \d$/.test(e)){const n=e.split(", ").map(r=>r.charCodeAt(0));return U.ComponentsConfiguration(n)}return e},"exif:Contrast":t=>U.Contrast(parseInt(t,10)),"exif:CustomRendered":t=>U.CustomRendered(parseInt(t,10)),"exif:ExposureMode":t=>U.ExposureMode(parseInt(t,10)),"exif:ExposureProgram":t=>U.ExposureProgram(parseInt(t,10)),"exif:ExposureTime"(t){return u1(t)?U.ExposureTime(t.split("/").map(e=>parseInt(e,10))):t},"exif:MeteringMode":t=>U.MeteringMode(parseInt(t,10)),"exif:Saturation":t=>U.Saturation(parseInt(t,10)),"exif:SceneCaptureType":t=>U.SceneCaptureType(parseInt(t,10)),"exif:Sharpness":t=>U.Sharpness(parseInt(t,10)),"exif:ShutterSpeedValue":t=>Er(U.ShutterSpeedValue,t),"exif:WhiteBalance":t=>U.WhiteBalance(parseInt(t,10))};function Er(t,e){return u1(e)?t(e.split("/")):e}function uE(t){return t.substring(0,2)==="0x"?parseInt(t.substring(2),16):parseInt(t,10)}function u1(t){return/^-?\d+\/-?\d+$/.test(t)}function d1(t){const[e,n]=t.split(",");if(e!==void 0&&n!==void 0){const r=parseFloat(e),o=parseFloat(n),s=n.charAt(n.length-1);if(!Number.isNaN(r)&&!Number.isNaN(o))return""+(r+o/60)+s}return t}const dE={get:fE};function fE(){if(typeof DOMParser<"u")return new DOMParser;try{const{DOMParser:t,onErrorStopParsing:e}=__non_webpack_require__("@xmldom/xmldom");return new t({onError:e})}catch{return}}const f1={read:mE};function mE(t,e){const n={};if(typeof t=="string")return zi(n,t),n;const[r,o]=_E(t,e),s=zi(n,r);if(o){const l=zi(n,o);!s&&!l&&(delete n._raw,zi(n,Sa(t,e)))}return n}function _E(t,e){if(e.length===0)return[];const n=[Sa(t,e.slice(0,1))];return e.length>1&&n.push(Sa(t,e.slice(1))),n}function Sa(t,e){const n=e.reduce((s,l)=>s+l.length,0),r=new Uint8Array(n);let o=0;for(let s=0;s<e.length;s++){const l=e[s],a=t.buffer.slice(l.dataOffset,l.dataOffset+l.length);r.set(new Uint8Array(a),o),o+=l.length}return new DataView(r.buffer)}function zi(t,e){try{const{doc:n,raw:r}=hE(e);t._raw=(t._raw||"")+r;const o=m1(n);return z(t,h1(_1(o,!0))),!0}catch{return!1}}function hE(t){const e=dE.get();if(!e)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const n=typeof t=="string"?t:R(t,0,t.byteLength),r=e.parseFromString(pE(n),"application/xml");if(r.documentElement.nodeName==="parsererror")throw new Error(r.documentElement.textContent);return{doc:r,raw:n}}function pE(t){return t.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")}function m1(t){for(let e=0;e<t.childNodes.length;e++){if(t.childNodes[e].tagName==="x:xmpmeta")return m1(t.childNodes[e]);if(t.childNodes[e].tagName==="rdf:RDF")return t.childNodes[e]}throw new Error}function _1(t,e=!1){const n=gE(t);return yE(n)?e?{}:bE(n[0]):wE(n)}function gE(t){const e=[];for(let n=0;n<t.childNodes.length;n++)e.push(t.childNodes[n]);return e}function yE(t){return t.length===1&&t[0].nodeName==="#text"}function bE(t){return t.nodeValue}function wE(t){const e={};return t.forEach(n=>{if(kE(n)){const r=xE(n);e[n.nodeName]!==void 0?(Array.isArray(e[n.nodeName])||(e[n.nodeName]=[e[n.nodeName]]),e[n.nodeName].push(r)):e[n.nodeName]=r}}),e}function kE(t){return t.nodeName&&t.nodeName!=="#text"}function xE(t){return{attributes:SE(t),value:_1(t)}}function SE(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].nodeName]=decodeURIComponent(escape(t.attributes[n].value));return e}function h1(t){const e={};if(typeof t=="string")return t;for(const n in t){let r=t[n];Array.isArray(r)||(r=[r]),r.forEach(o=>{z(e,Ca(o.attributes)),typeof o.value=="object"&&z(e,p1(o.value))})}return e}function Ca(t){const e={};for(const n in t)try{CE(n)&&(e[Hi(n)]={value:t[n],attributes:{},description:Dt(t[n],n)})}catch{}return e}function CE(t){return t!=="rdf:parseType"&&!qi(t)}function qi(t){return t.split(":")[0]==="xmlns"}function Hi(t){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(t)?"RatingPercent":t.split(":")[1]}function Dt(t,e=void 0){if(Array.isArray(t)){const n=EE(t);return e&&typeof Ui[e]=="function"?Ui[e](t,n):n}if(typeof t=="object")return TE(t);try{return e&&typeof Ui[e]=="function"?Ui[e](t):decodeURIComponent(escape(t))}catch{return t}}function EE(t){return t.map(e=>e.value!==void 0?Dt(e.value):Dt(e)).join(", ")}function TE(t){const e=[];for(const n in t)e.push(`${BE(n)}: ${Dt(t[n].value)}`);return e.join("; ")}function BE(t){return t==="CiAdrCity"?"CreatorCity":t==="CiAdrCtry"?"CreatorCountry":t==="CiAdrExtadr"?"CreatorAddress":t==="CiAdrPcode"?"CreatorPostalCode":t==="CiAdrRegion"?"CreatorRegion":t==="CiEmailWork"?"CreatorWorkEmail":t==="CiTelWork"?"CreatorWorkPhone":t==="CiUrlWork"?"CreatorWorkUrl":t}function p1(t){const e={};for(const n in t)try{qi(n)||(e[Hi(n)]=NE(t[n],n))}catch{}return e}function NE(t,e){return $E(t)?FE(t,e):IE(t)?{value:"",attributes:{},description:""}:g1(t)?y1(t,e):b1(t)?w1(t,e):k1(t)?x1(t,e):DE(t)?ME(t,e):Ea(t,e)}function IE(t){return t.attributes["rdf:parseType"]==="Resource"&&typeof t.value=="string"&&t.value.trim()===""}function $E(t){return Array.isArray(t)}function FE(t,e){return Ea(t[t.length-1],e)}function g1(t){return t.attributes["rdf:parseType"]==="Resource"&&t.value["rdf:value"]!==void 0||t.value["rdf:Description"]!==void 0&&t.value["rdf:Description"].value["rdf:value"]!==void 0}function y1(t,e){const n=bo(t);t.value["rdf:Description"]!==void 0&&(t=t.value["rdf:Description"]),z(n,bo(t),AE(t));const r=OE(t);return{value:r,attributes:n,description:Dt(r,e)}}function bo(t){const e={};for(const n in t.attributes)n!=="rdf:parseType"&&n!=="rdf:resource"&&!qi(n)&&(e[Hi(n)]=t.attributes[n]);return e}function AE(t){const e={};for(const n in t.value)n!=="rdf:value"&&!qi(n)&&(e[Hi(n)]=t.value[n].value);return e}function OE(t){return C1(t.value["rdf:value"])||t.value["rdf:value"].value}function b1(t){return t.attributes["rdf:parseType"]==="Resource"||t.value["rdf:Description"]!==void 0&&t.value["rdf:Description"].value["rdf:value"]===void 0}function w1(t,e){const n={value:{},attributes:{}};return t.value["rdf:Description"]!==void 0&&(z(n.value,Ca(t.value["rdf:Description"].attributes)),z(n.attributes,bo(t)),t=t.value["rdf:Description"]),z(n.value,p1(t.value)),n.description=Dt(n.value,e),n}function k1(t){return Object.keys(t.value).length===0&&t.attributes["xml:lang"]===void 0&&t.attributes["rdf:resource"]===void 0}function x1(t,e){const n=Ca(t.attributes);return{value:n,attributes:{},description:Dt(n,e)}}function DE(t){return S1(t.value)!==void 0}function S1(t){return t["rdf:Bag"]||t["rdf:Seq"]||t["rdf:Alt"]}function ME(t,e){let n=S1(t.value).value["rdf:li"];const r=bo(t),o=[];return n===void 0?n=[]:Array.isArray(n)||(n=[n]),n.forEach(s=>{o.push(PE(s))}),{value:o,attributes:r,description:Dt(o,e)}}function PE(t){return g1(t)?y1(t):b1(t)?w1(t).value:k1(t)?x1(t).value:Ea(t)}function Ea(t,e){const n=C1(t)||h1(t.value);return{value:n,attributes:bo(t),description:Dt(n,e)}}function C1(t){return t.attributes&&t.attributes["rdf:resource"]}const Mt={CLOSED_SUBPATH_LENGTH:0,CLOSED_SUBPATH_BEZIER_LINKED:1,CLOSED_SUBPATH_BEZIER_UNLINKED:2,OPEN_SUBPATH_LENGTH:3,OPEN_SUBPATH_BEZIER_LINKED:4,OPEN_SUBPATH_BEZIER_UNLINKED:5,FILL_RULE:6,CLIPBOARD:7,INITIAL_FILL_RULE:8},E1=24,Ta={2e3:{name:"PathInformation",description:vE},2999:{name:"ClippingPathName",description(t){const[,e]=s_(t,0);return e}}};function vE(t){const n={},r=[];for(let o=0;o<t.byteLength;o+=2+E1){const s=F.getShortAt(t,o);Ba[s]&&(n[s]||(n[s]=Ba[s].description),r.push({type:s,path:Ba[s].path(t,o+2)}))}return JSON.stringify({types:n,paths:r})}const Ba={[Mt.CLOSED_SUBPATH_LENGTH]:{description:"Closed subpath length",path:(t,e)=>[F.getShortAt(t,e)]},[Mt.CLOSED_SUBPATH_BEZIER_LINKED]:{description:"Closed subpath Bezier knot, linked",path:Gi},[Mt.CLOSED_SUBPATH_BEZIER_UNLINKED]:{description:"Closed subpath Bezier knot, unlinked",path:Gi},[Mt.OPEN_SUBPATH_LENGTH]:{description:"Open subpath length",path:(t,e)=>[F.getShortAt(t,e)]},[Mt.OPEN_SUBPATH_BEZIER_LINKED]:{description:"Open subpath Bezier knot, linked",path:Gi},[Mt.OPEN_SUBPATH_BEZIER_UNLINKED]:{description:"Open subpath Bezier knot, unlinked",path:Gi},[Mt.FILL_RULE]:{description:"Path fill rule",path:()=>[]},[Mt.INITIAL_FILL_RULE]:{description:"Initial fill rule",path:(t,e)=>[F.getShortAt(t,e)]},[Mt.CLIPBOARD]:{description:"Clipboard",path:VE}};function Gi(t,e){const r=[];for(let o=0;o<E1;o+=8)r.push(LE(t,e+o));return r}function LE(t,e){const n=Dn(t,e,8);return[Dn(t,e+4,8),n]}function VE(t,e){return[[Dn(t,e,8),Dn(t,e+4,8),Dn(t,e+8,8),Dn(t,e+12,8)],Dn(t,e+16,8)]}function Dn(t,e,n){const r=F.getLongAt(t,e),o=r>>>31?-1:1,s=(r&2130706432)>>>32-n,l=r&parseInt(c_("1",32-n),2);return o*WS(s.toString(2)+"."+ZS(l.toString(2),32-n,"0"),2)}const RE={read:qE},T1="8BIM",UE=2,zE=4,B1=T1.length;function qE(t,e){const n=i_(new Uint8Array(t).buffer),r={};let o=0;for(;o<t.length;){const s=R(n,o,B1);o+=B1;const l=F.getShortAt(n,o);o+=UE;const{tagName:a,tagNameSize:c}=HE(n,o);o+=c;const u=F.getLongAt(n,o);if(o+=zE,s===T1){const d=i_(n.buffer,o,u),f={id:l,value:R(d,0,u)};if(Ta[l]){try{f.description=Ta[l].description(d)}catch{f.description="<no description formatter>"}r[a||Ta[l].name]=f}else e&&(r[`undefined-${l}`]=f)}o+=u+u%2}return r}function HE(t,e){const[n,r]=s_(t,e);return{tagName:r,tagNameSize:1+n+(n%2===0?1:0)}}const N1={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},I1={4:{name:"Preferred CMM type",value:(t,e)=>R(t,e,4),description:t=>t!==null?Na(t):""},8:{name:"Profile Version",value:(t,e)=>t.getUint8(e).toString(10)+"."+(t.getUint8(e+1)>>4).toString(10)+"."+(t.getUint8(e+1)%16).toString(10)},12:{name:"Profile/Device class",value:(t,e)=>R(t,e,4),description:t=>{switch(t.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return t}}},16:{name:"Color Space",value:(t,e)=>R(t,e,4)},20:{name:"Connection Space",value:(t,e)=>R(t,e,4)},24:{name:"ICC Profile Date",value:(t,e)=>GE(t,e).toISOString()},36:{name:"ICC Signature",value:(t,e)=>ZE(t.buffer.slice(e,e+4))},40:{name:"Primary Platform",value:(t,e)=>R(t,e,4),description:t=>Na(t)},48:{name:"Device Manufacturer",value:(t,e)=>R(t,e,4),description:t=>Na(t)},52:{name:"Device Model Number",value:(t,e)=>R(t,e,4)},64:{name:"Rendering Intent",value:(t,e)=>t.getUint32(e),description:t=>{switch(t){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return t}}},80:{name:"Profile Creator",value:(t,e)=>R(t,e,4)}};function GE(t,e){const n=t.getUint16(e),r=t.getUint16(e+2)-1,o=t.getUint16(e+4),s=t.getUint16(e+6),l=t.getUint16(e+8),a=t.getUint16(e+10);return new Date(Date.UTC(n,r,o,s,l,a))}function ZE(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function Na(t){switch(t.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return t}}const $1={read:tT},WE=84,jE=128,YE="acsp",KE="desc",QE="mluc",XE="text",JE="sig ",eT=12;function tT(t,e,n){return n&&e[0].compressionMethod!==Ai?nT(t,e):oT(t,e)}function nT(t,e){if(!rT(e[0].compressionMethod))return{};const n=new DataView(t.buffer.slice(e[0].offset,e[0].offset+e[0].length));return d_(n,e[0].compressionMethod,"utf-8","dataview").then(F1).catch(()=>({}))}function rT(t){return t===u_}function oT(t,e){try{const n=e.reduce((l,a)=>l+a.length,0),r=new Uint8Array(n);let o=0;const s=iT(t);for(let l=1;l<=e.length;l++){const a=e.find(d=>d.chunkNumber===l);if(!a)throw new Error(`ICC chunk ${l} not found`);const c=s.slice(a.offset,a.offset+a.length),u=new Uint8Array(c);r.set(u,o),o+=u.length}return F1(new DataView(r.buffer))}catch{return{}}}function iT(t){return Array.isArray(t)?new DataView(Uint8Array.from(t).buffer).buffer:t.buffer}function sT(t){return t.length<jE+4}function lT(t,e){return t.length<e+eT}function F1(t){const e=t.buffer,n=t.getUint32();if(t.byteLength!==n)throw new Error("ICC profile length not matching");if(t.length<WE)throw new Error("ICC profile too short");const r={},o=Object.keys(I1);for(let c=0;c<o.length;c++){const u=o[c],d=I1[u],f=d.value(t,parseInt(u,10));let m=f;d.description&&(m=d.description(f)),r[d.name]={value:f,description:m}}if(Zi(e.slice(36,40))!==YE)throw new Error("ICC profile: missing signature");if(sT(e))return r;const l=t.getUint32(128);let a=132;for(let c=0;c<l;c++){if(lT(e,a))return r;const u=R(t,a,4),d=t.getUint32(a+4),f=t.getUint32(a+8);if(d>e.length)return r;const m=R(t,d,4);if(m===KE){const _=t.getUint32(d+8);if(_>f)return r;const p=Zi(e.slice(d+12,d+_+11));wo(r,u,p)}else if(m===QE){const _=t.getUint32(d+8),p=t.getUint32(d+12);let h=d+16;const g=[];for(let w=0;w<_;w++){const x=R(t,h+0,2),C=R(t,h+2,2),T=t.getUint32(h+4),k=t.getUint32(h+8),y=HS(t,d+k,T);g.push({languageCode:x,countryCode:C,text:y}),h+=p}if(_===1)wo(r,u,g[0].text);else{const w={};for(let x=0;x<g.length;x++)w[`${g[x].languageCode}-${g[x].countryCode}`]=g[x].text;wo(r,u,w)}}else if(m===XE){const _=Zi(e.slice(d+8,d+f-7));wo(r,u,_)}else if(m===JE){const _=Zi(e.slice(d+8,d+12));wo(r,u,_)}a=a+12}return r}function Zi(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function wo(t,e,n){N1[e]?t[N1[e].name]={value:n,description:n}:t[e]={value:n,description:n}}const Wi=27,aT={read:cT,SHOT_INFO_AUTO_ROTATE:Wi};function cT(t,e,n,r,o){let s=On(t,Y_,e,e+n,r,o);return s.ShotInfo&&(s=z({},s,uT(s.ShotInfo.value)),delete s.ShotInfo),s}function uT(t){const e={};return t[Wi]!==void 0&&(e.AutoRotate={value:t[Wi],description:dT(t[Wi])}),e}function dT(t){return t===0?"None":t===1?"Rotate 90 CW":t===2?"Rotate 180":t===3?"Rotate 270 CW":"Unknown"}const fT={read:mT};function mT(t,e){return{"Image Width":_T(t,e),"Image Height":hT(t,e),"Bit Depth":pT(t,e),"Color Type":gT(t,e),Compression:yT(t,e),Filter:bT(t,e),Interlace:wT(t,e)}}function _T(t,e){if(e+0+4>t.byteLength)return;const o=F.getLongAt(t,e);return{value:o,description:`${o}px`}}function hT(t,e){if(e+4+4>t.byteLength)return;const o=F.getLongAt(t,e+4);return{value:o,description:`${o}px`}}function pT(t,e){if(e+8+1>t.byteLength)return;const o=F.getByteAt(t,e+8);return{value:o,description:`${o}`}}function gT(t,e){const o={0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"};if(e+9+1>t.byteLength)return;const s=F.getByteAt(t,e+9);return{value:s,description:o[s]||"Unknown"}}function yT(t,e){if(e+10+1>t.byteLength)return;const o=F.getByteAt(t,e+10);return{value:o,description:o===0?"Deflate/Inflate":"Unknown"}}function bT(t,e){if(e+11+1>t.byteLength)return;const o=F.getByteAt(t,e+11);return{value:o,description:o===0?"Adaptive":"Unknown"}}function wT(t,e){const o={0:"Noninterlaced",1:"Adam7 Interlace"};if(e+12+1>t.byteLength)return;const s=F.getByteAt(t,e+12);return{value:s,description:o[s]||"Unknown"}}const kT={read:TT},Ia="STATE_KEYWORD",$a="STATE_COMPRESSION",Fa="STATE_LANG",xT="STATE_TRANSLATED_KEYWORD",Aa="STATE_TEXT",ST=1,CT=1,ET=6;function TT(t,e,n,r){const o={},s=[];for(let l=0;l<e.length;l++){const{offset:a,length:c,type:u}=e[l],d=BT(t,a,c,u,n);if(d instanceof Promise)s.push(d.then(({name:f,value:m,description:_})=>{try{if(f_.USE_EXIF&&O1(f,m))return{__exif:o1.read(M1(m),ET,r).tags};if(f_.USE_IPTC&&D1(f,m))return{__iptc:xa.read(M1(m),0,r)};if(f&&!O1(f,m)&&!D1(f,m))return{[f]:{value:m,description:_}}}catch{}return{}}));else{const{name:f,value:m,description:_}=d;f&&(o[f]={value:m,description:_})}}return{readTags:o,readTagsPromise:s.length>0?Promise.all(s):void 0}}function BT(t,e,n,r,o){const s=[],l=[];let a,c=Ia,u=Ai;for(let f=0;f<n&&e+f<t.byteLength;f++){if(c===$a){u=NT({type:r,dataView:t,offset:e+f}),r===An&&(f+=ST),c=A1(r,c);continue}else if(c===Aa){a=new DataView(t.buffer.slice(e+f,e+n));break}const m=t.getUint8(e+f);m===0?c=A1(r,c):c===Ia?s.push(m):c===Fa&&l.push(m)}if(u!==Ai&&!o)return{};const d=d_(a,u,IT(r));return d instanceof Promise?d.then(f=>Oa(f,r,l,s)).catch(()=>Oa("<text using unknown compression>".split(""),r,l,s)):Oa(d,r,l,s)}function NT({type:t,dataView:e,offset:n}){if(t===An){if(e.getUint8(n)===CT)return e.getUint8(n+1)}else if(t===Mi)return e.getUint8(n);return Ai}function A1(t,e){return e===Ia&&[An,Mi].includes(t)?$a:e===$a?t===An?Fa:Aa:e===Fa?xT:Aa}function IT(t){return t===_a||t===Mi?"latin1":"utf-8"}function Oa(t,e,n,r){const o=FT(t);return{name:$T(e,n,r),value:o,description:e===An?AT(t):o}}function $T(t,e,n){const r=xr(n);if(t===_a||e.length===0)return r;const o=xr(e);return`${r} (${o})`}function FT(t){return t instanceof DataView?R(t,0,t.byteLength):t}function AT(t){return s1.decode("UTF-8",t)}function O1(t,e){return t.toLowerCase()==="raw profile type exif"&&e.substring(1,5)==="exif"}function D1(t,e){return t.toLowerCase()==="raw profile type iptc"&&e.substring(1,5)==="iptc"}function M1(t){const e=t.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/);return OT(e[2].replace(/\n/g,""))}function OT(t){const e=new DataView(new ArrayBuffer(t.length/2));for(let n=0;n<t.length;n+=2)e.setUint8(n/2,parseInt(t.substring(n,n+2),16));return e}const DT={read:MT};function MT(t,e){const n={};for(let r=0;r<e.length;r++){const o=F.getLongAt(t,e[r]+Sr),s=R(t,e[r]+tn,ct);s===F_?(n["Pixels Per Unit X"]=PT(t,e[r],o),n["Pixels Per Unit Y"]=vT(t,e[r],o),n["Pixel Units"]=LT(t,e[r],o)):s===A_&&(n["Modify Date"]=VT(t,e[r],o))}return n}function PT(t,e,n){if(!ji(t,e,n,0,4))return;const s=F.getLongAt(t,e+be+0);return{value:s,description:""+s}}function vT(t,e,n){if(!ji(t,e,n,4,4))return;const s=F.getLongAt(t,e+be+4);return{value:s,description:""+s}}function LT(t,e,n){if(!ji(t,e,n,8,1))return;const s=F.getByteAt(t,e+be+8);return{value:s,description:s===1?"meters":"Unknown"}}function VT(t,e,n){if(!ji(t,e,n,0,7))return;const o=F.getShortAt(t,e+be),s=F.getByteAt(t,e+be+2),l=F.getByteAt(t,e+be+3),a=F.getByteAt(t,e+be+4),c=F.getByteAt(t,e+be+5),u=F.getByteAt(t,e+be+6);return{value:[o,s,l,a,c,u],description:`${Tr(o,4)}-${Tr(s,2)}-${Tr(l,2)} ${Tr(a,2)}:${Tr(c,2)}:${Tr(u,2)}`}}function ji(t,e,n,r,o){return r+o<=n&&e+be+r+o<=t.byteLength}function Tr(t,e){return`${"0".repeat(e-(""+t).length)}${t}`}const RT={read:qT},UT=4,zT=7;function qT(t,e){const n={},r=F.getByteAt(t,e);return n.Alpha=HT(r),n.Animation=GT(r),n.ImageWidth=P1(t,e+UT),n.ImageHeight=P1(t,e+zT),n}function HT(t){const e=t&16;return{value:e?1:0,description:e?"Yes":"No"}}function GT(t){const e=t&2;return{value:e?1:0,description:e?"Yes":"No"}}function P1(t,e){const n=F.getByteAt(t,e)+256*F.getByteAt(t,e+1)+65536*F.getByteAt(t,e+2)+1;return{value:n,description:n+"px"}}const ZT={read:WT};function WT(t){return{"GIF Version":jT(t),"Image Width":YT(t),"Image Height":KT(t),"Global Color Map":QT(t),"Bits Per Pixel":JT(t),"Color Resolution Depth":XT(t)}}function jT(t){if(6>t.byteLength)return;const r=R(t,3,3);return{value:r,description:r}}function YT(t){if(8>t.byteLength)return;const r=t.getUint16(6,!0);return{value:r,description:`${r}px`}}function KT(t){if(10>t.byteLength)return;const r=t.getUint16(8,!0);return{value:r,description:`${r}px`}}function QT(t){if(11>t.byteLength)return;const o=(t.getUint8(10)&128)>>>7;return{value:o,description:o===1?"Yes":"No"}}function XT(t){if(11>t.byteLength)return;const o=((t.getUint8(10)&112)>>>4)+1;return{value:o,description:`${o} ${o===1?"bit":"bits"}`}}function JT(t){if(11>t.byteLength)return;const o=(t.getUint8(10)&7)+1;return{value:o,description:`${o} ${o===1?"bit":"bits"}`}}const e6=[6,7,99],t6={get:n6};function n6(t,e,n){if(r6(e)){e.type="image/jpeg";const r=n+e.JPEGInterchangeFormat.value;e.image=t.buffer.slice(r,r+e.JPEGInterchangeFormatLength.value),l_(e,"base64",function(){return a_(this.image)})}return e}function r6(t){return t&&(t.Compression===void 0||e6.includes(t.Compression.value))&&t.JPEGInterchangeFormat&&t.JPEGInterchangeFormat.value&&t.JPEGInterchangeFormatLength&&t.JPEGInterchangeFormatLength.value}function v1(t){this.name="MetadataMissingError",this.message=t||"No Exif data",this.stack=new Error().stack}v1.prototype=new Error;const L1={MetadataMissingError:v1},o6={load:i6,loadView:V1,errors:L1};function i6(t,e={}){return s6(t)?(e.async=!0,l6(t,e).then(n=>Da(n,e))):_6(t)?(e.async=!0,h6(t).then(n=>Da(n,e))):Da(t,e)}function s6(t){return typeof t=="string"}function l6(t,e){return/^\w+:\/\//.test(t)?typeof fetch<"u"?a6(t,e):c6(t,e):d6(t)?Promise.resolve(GS(t)):f6(t,e)}function a6(t,{length:e}={}){const n={method:"GET"};return Number.isInteger(e)&&e>=0&&(n.headers={range:`bytes=0-${e-1}`}),fetch(t,n).then(r=>r.arrayBuffer())}function c6(t,{length:e}={}){return new Promise((n,r)=>{const o={};Number.isInteger(e)&&e>=0&&(o.headers={range:`bytes=0-${e-1}`}),u6(t)(t,o,l=>{if(l.statusCode>=200&&l.statusCode<=299){const a=[];l.on("data",c=>a.push(Buffer.from(c))),l.on("error",c=>r(c)),l.on("end",()=>n(Buffer.concat(a)))}else r(`Could not fetch file: ${l.statusCode} ${l.statusMessage}`),l.resume()}).on("error",l=>r(l))})}function u6(t){return/^https:\/\//.test(t)?__non_webpack_require__("https").get:__non_webpack_require__("http").get}function d6(t){return/^data:[^;,]*(;base64)?,/.test(t)}function f6(t,{length:e}={}){return new Promise((n,r)=>{const o=m6();o.open(t,(s,l)=>{s?r(s):o.stat(t,(a,c)=>{if(a)r(a);else{const u=Math.min(c.size,e!==void 0?e:c.size),d=Buffer.alloc(u),f={buffer:d,length:u};o.read(l,f,m=>{m?r(m):o.close(l,_=>{_&&console.warn(`Could not close file ${t}:`,_),n(d)})})}})})})}function m6(){try{return __non_webpack_require__("fs")}catch{return}}function _6(t){return typeof File<"u"&&t instanceof File}function h6(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=o=>e(o.target.result),r.onerror=()=>n(r.error),r.readAsArrayBuffer(t)})}function Da(t,e){return p6(t)&&(t=new Uint8Array(t).buffer),V1(g6(t),e)}function p6(t){try{return Buffer.isBuffer(t)}catch{return!1}}function g6(t){try{return new DataView(t)}catch{return new o_(t)}}function V1(t,{expanded:e=!1,async:n=!1,includeUnknown:r=!1}={expanded:!1,async:!1,includeUnknown:!1}){let o=!1,s={};const l=[],{fileType:a,fileDataOffset:c,jfifDataOffset:u,tiffHeaderOffset:d,iptcDataOffset:f,xmpChunks:m,iccChunks:_,mpfDataOffset:p,pngHeaderOffset:h,pngTextChunks:g,pngChunkOffsets:w,vp8xChunkOffset:x,gifHeaderOffset:C}=v4.parseAppMarkers(t,n);if(y6(c)){o=!0;const b=yC.read(t,c);e?s.file=b:s=z({},s,b)}if(b6(u)){o=!0;const b=NC.read(t,u);e?s.jfif=b:s=z({},s,b)}if(w6(d)){o=!0;const{tags:b,byteOrder:E}=o1.read(t,d,r);if(b.Thumbnail&&(s.Thumbnail=b.Thumbnail,delete b.Thumbnail),e?(s.exif=b,k6(s)):s=z({},s,b),b["IPTC-NAA"]&&!R1(f)){const B=xa.read(b["IPTC-NAA"].value,0,r);e?s.iptc=B:s=z({},s,B)}if(b.ApplicationNotes&&!U1(m)){const B=f1.read(xr(b.ApplicationNotes.value));e?s.xmp=B:(delete B._raw,s=z({},s,B))}if(b.ImageSourceData){const B=RE.read(b.PhotoshopSettings.value,r);e?s.photoshop=B:s=z({},s,B)}if(b.ICC_Profile&&!z1(_)){const B=$1.read(b.ICC_Profile.value,[{offset:0,length:b.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);e?s.icc=B:s=z({},s,B)}if(x6(b)){const B=aT.read(t,d,b.MakerNote.__offset,E,r);e?s.makerNotes=B:s=z({},s,B)}b.MakerNote&&delete b.MakerNote.__offset}if(R1(f)){o=!0;const b=xa.read(t,f,r);e?s.iptc=b:s=z({},s,b)}if(U1(m)){o=!0;const b=f1.read(t,m);e?s.xmp=b:(delete b._raw,s=z({},s,b))}if(z1(_)){o=!0;const b=$1.read(t,_,n);b instanceof Promise?l.push(b.then(k)):k(b)}if(S6(p)){o=!0;const b=uC.read(t,p,r);e?s.mpf=b:s=z({},s,b)}if(C6(h)){o=!0;const b=fT.read(t,h);e?(s.png=s.png?z({},s.png,b):b,s.pngFile=b):s=z({},s,b)}if(E6(g)){o=!0;const{readTags:b,readTagsPromise:E}=kT.read(t,g,n,r);y(b),E&&l.push(E.then(B=>B.forEach(y)))}if(T6(w)){o=!0;const b=DT.read(t,w);e?s.png=s.png?z({},s.png,b):b:s=z({},s,b)}if(B6(x)){o=!0;const b=RT.read(t,x);e?s.riff=s.riff?z({},s.riff,b):b:s=z({},s,b)}if(N6(C)){o=!0;const b=ZT.read(t,C);e?s.gif=s.gif?z({},s.gif,b):b:s=z({},s,b)}const T=t6.get(t,s.Thumbnail,d);if(T?(o=!0,s.Thumbnail=T):delete s.Thumbnail,a&&(e?(s.file||(s.file={}),s.file.FileType=a):s.FileType=a,o=!0),!o)throw new L1.MetadataMissingError;if(n)return Promise.all(l).then(()=>s);return s;function k(b){e?s.icc=b:s=z({},s,b)}function y(b){if(e){for(const E of["exif","iptc"]){const B=`__${E}`;b[B]&&(s[E]=s[E]?z({},s.exif,b[B]):b[B],delete b[B])}s.png=s.png?z({},s.png,b):b,s.pngText=s.pngText?z({},s.png,b):b}else s=z({},s,b.__exif?b.__exif:{},b.__iptc?b.__iptc:{},b),delete s.__exif,delete s.__iptc}}function y6(t){return t!==void 0}function b6(t){return t!==void 0}function w6(t){return t!==void 0}function k6(t){if(t.exif){if(t.exif.GPSLatitude&&t.exif.GPSLatitudeRef)try{t.gps=t.gps||{},t.gps.Latitude=Oi(t.exif.GPSLatitude.value),t.exif.GPSLatitudeRef.value.join("")==="S"&&(t.gps.Latitude=-t.gps.Latitude)}catch{}if(t.exif.GPSLongitude&&t.exif.GPSLongitudeRef)try{t.gps=t.gps||{},t.gps.Longitude=Oi(t.exif.GPSLongitude.value),t.exif.GPSLongitudeRef.value.join("")==="W"&&(t.gps.Longitude=-t.gps.Longitude)}catch{}if(t.exif.GPSAltitude&&t.exif.GPSAltitudeRef)try{t.gps=t.gps||{},t.gps.Altitude=t.exif.GPSAltitude.value[0]/t.exif.GPSAltitude.value[1],t.exif.GPSAltitudeRef.value===1&&(t.gps.Altitude=-t.gps.Altitude)}catch{}}}function R1(t){return t!==void 0}function U1(t){return Array.isArray(t)&&t.length>0}function z1(t){return Array.isArray(t)&&t.length>0}function x6(t){return t.Make&&t.Make.value&&Array.isArray(t.Make.value)&&t.Make.value[0]==="Canon"&&t.MakerNote&&t.MakerNote.__offset}function S6(t){return t!==void 0}function C6(t){return t!==void 0}function E6(t){return t!==void 0}function T6(t){return t!==void 0}function B6(t){return t!==void 0}function N6(t){return t!==void 0}async function q1(t,e=null){if(t.location)return t.location;try{const n=await o6.load(t.blobUrl||t.url||"",{expanded:!0});if(n.gps)return{latitude:n.gps.Latitude,longitude:n.gps.Longitude}}catch(n){console.error("Failed to load EXIF data from file:",n)}try{const{waitForLocation:n,location:r}=Cd();if(e&&setTimeout(()=>{!r.value&&e&&Ve.warning(e)},1e3),window.location.protocol==="https:")await n();else if(window.location.href.match("localhost"))return{latitude:37.7749,longitude:-122.4194,accuracy:1,altitude:0,altitudeAccuracy:0};return r.value?{latitude:r.value.latitude,longitude:r.value.longitude,accuracy:r.value.accuracy,altitude:r.value.altitude,altitudeAccuracy:r.value.altitudeAccuracy}:null}catch(n){return console.error(n),null}}class ko{constructor(e,n){if(this.files=[],this.fileUploads=[],this.onErrorCb=null,this.onProgressCb=null,this.onCompleteCb=null,this.onAllCompleteCb=null,this.files=!Array.isArray(e)&&!(e instanceof FileList)?[e]:e,this.fileUploads=[],this.onErrorCb=null,this.onProgressCb=null,this.onCompleteCb=null,this.onAllCompleteCb=null,this.options={createPresignedUpload:null,completePresignedUpload:null,refreshFile:null,...ne.value.fileUpload,...n},!this.options.createPresignedUpload||!this.options.completePresignedUpload)throw new Error("Please configure danxOptions.fileUpload: import { configure } from 'quasar-ui-danx';")}prepare(){for(const e of this.files){if(!(e instanceof File))throw Error("FileUpload constructor requires a File object or a list of File objects");e.id=he.uid(),e.blobUrl=URL.createObjectURL(e);const n=new FormData;n.append("file",e),this.fileUploads.push({file:e,xhr:null,formData:n,isComplete:!1})}return this}onAllComplete(e){return this.onAllCompleteCb=e,this}onComplete(e){return this.onCompleteCb=e,this}onProgress(e){return this.onProgressCb=e,this}onError(e){return this.onErrorCb=e,this}errorHandler(e,n,r=null){this.onErrorCb&&this.onErrorCb({e,file:n,error:r})}async resolveLocation(e=null){for(const n of this.fileUploads)n.file.location=await q1(n.file,e),n.formData.append("meta",JSON.stringify(n.file.location));return this}fireProgressCallback(e,n){e.file.progress=n,this.onProgressCb&&this.onProgressCb({file:this.wrapFile(e.file),progress:n})}fireCompleteCallback(e,n){e.isComplete=!0,e.file.progress=1,this.onCompleteCb&&this.onCompleteCb({file:this.wrapFile(e.file),uploadedFile:n})}checkAllComplete(){this.onAllCompleteCb&&this.fileUploads.every(e=>e.isComplete)&&this.onAllCompleteCb({files:this.fileUploads})}wrapFile(e){return{id:e.id,name:e.name,size:e.size,type:e.type,progress:e.progress,location:e.location,blobUrl:e.blobUrl,url:"",__type:"BrowserFile"}}setXhrCallbacks(){var e,n,r;for(const o of this.fileUploads)(e=o.xhr)==null||e.addEventListener("error",s=>this.errorHandler(s,o.file),!1);if(this.onProgressCb)for(const o of this.fileUploads)(n=o.xhr)==null||n.upload.addEventListener("progress",s=>{const l=Math.min(.95,s.loaded/s.total);this.fireProgressCallback(o,l)},!1);for(const o of this.fileUploads)(r=o.xhr)==null||r.addEventListener("load",async s=>{try{let l=await this.completePresignedUpload(o);l=oe(l),this.fireCompleteCallback(o,l),this.checkAllComplete(),await this.waitForTranscode(l)}catch(l){this.errorHandler(s,o.file,l)}},!1)}async completePresignedUpload(e){if(this.fireProgressCallback(e,.95),!e.file.resource_id)throw new Error("File resource ID is required to complete presigned upload");if(!this.options.completePresignedUpload)throw new Error("Please configure danxOptions.fileUpload.completePresignedUpload");return await this.options.completePresignedUpload(e.file.resource_id,e)}async refreshFile(e){if(!this.options.refreshFile)return null;const n=await this.options.refreshFile(e.id);return n&&oe(n)}isTranscoding(e){var r;const n=((r=e==null?void 0:e.meta)==null?void 0:r.transcodes)||[];for(const o of Object.keys(n)){const s=n[o];if(s.status==="Pending"||s.status==="In Progress"){const l=St(s.started_at),a=l&&D.now().diff(l,"minutes");if(!(a!=null&&a.minutes)||a.minutes<30)return!0}}return!1}async waitForTranscode(e){if(!e.meta||e.meta.is_waiting_transcode)return;e.meta.is_waiting_transcode=!0;let n=e;for(;n&&this.isTranscoding(n);)await Gr(1e3),n=await this.refreshFile(n)}async upload(){var e;for(const n of this.fileUploads){const r=n.file.mimeType||n.file.type;if(!this.options.createPresignedUpload)throw new Error("Please configure danxOptions.fileUpload.createPresignedUpload");const o=await this.options.createPresignedUpload(this.options.directory||"",n.file.name,r);if(!o.url){Ve.error("Could not fetch presigned upload URL for file "+n.file.name);continue}const s=!o.url.match("upload-presigned-url-contents");n.file.resource_id=o.id;const l=new XMLHttpRequest;s?(l.open("PUT",o.url),l.setRequestHeader("Content-Type",r),n.body=n.file):(l.open("POST",o.url),n.body=n.formData),n.xhr=l}this.setXhrCallbacks();for(const n of this.fileUploads)(e=n.xhr)==null||e.send(n.body)}}const Yi=i.ref([]),Ki=i.ref([]);function I6(t){Yi.value=[...Yi.value,t]}function $6(t,e,n){Ki.value.push({id:n,name:t,callback:e})}function F6(t){Ki.value=Ki.value.filter(e=>e.id!==t)}function H1(t,e,n){for(let r of Yi.value)if(r.type===t&&r.key===e&&n.ctrlKey===!!r.ctrl&&n.altKey===!!r.alt&&n.shiftKey===!!r.shift)for(let o of Ki.value)o.name===r.name&&o.callback(n)}function G1(t){return t.key?(""+t.key).toLowerCase():t.keyCode}function A6(t){Yi.value=t,window.addEventListener("keydown",e=>{H1("keydown",G1(e),e)}),window.addEventListener("keyup",e=>{H1("keyup",G1(e),e)})}function O6(t){return new Promise((e,n)=>{const r=new FileReader;let o=null;r.onload=async s=>{var l;try{o=JSON.parse((l=s.target)==null?void 0:l.result),e(o)}catch(a){console.error("Invalid JSON file:",a),n(a)}},r.readAsText(t)})}function Z1(t){const e=i.ref([]),n=i.ref(null),r=i.ref(null),o=f=>{e.value=[...e.value,...f.target.files],new ko(f.target.files,t).prepare().onProgress(({file:m})=>{m&&s(m)}).onComplete(({file:m,uploadedFile:_})=>{m&&s(m,_)}).onError(({file:m,error:_})=>{console.error("Failed to upload",m,_),Ve.error(`Failed to upload ${m.name}: ${_}`)}).onAllComplete(()=>{n.value&&n.value({file:e.value[0],uploadedFile:e.value[0]}),r.value&&r.value(e.value)}).upload()};function s(f,m=null){const _=e.value.findIndex(p=>p.id===f.id);_!==-1&&e.value.splice(_,1,m||f),r.value&&r.value(e.value)}return{clearUploadedFiles:()=>{e.value=[],r.value&&r.value(e.value),n.value&&n.value({file:null,uploadedFile:null})},onRemove:f=>{const m=e.value.findIndex(_=>_.id===f.id);m!==-1&&e.value.splice(m,1),r.value&&r.value(e.value),n.value&&n.value({file:f,uploadedFile:f})},onComplete:f=>{n.value=f},onFilesChange:f=>{r.value=f},onDrop:f=>{var m;o({target:{files:(m=f.dataTransfer)==null?void 0:m.files}})},onFilesSelected:o,uploadedFiles:e}}const we={activeRequests:{},url(t){var e;return t.startsWith("http")?t:(((e=ne.value.request)==null?void 0:e.baseUrl)||"").replace(/\/$/,"")+"/"+t},async call(t,e){var p,h;e=e||{};const n=(e==null?void 0:e.requestKey)||t+JSON.stringify(e.params||""),r=!!(e!=null&&e.waitOnPrevious),o=!!(e!=null&&e.useMostRecentResponse),s=!r,l=Date.now(),a=we.activeRequests[n],c={timestamp:l};if(we.activeRequests[n]=c,s){a&&((p=a.abortController)==null||p.abort("Request was aborted due to a newer request being made"));const g=new AbortController;c.abortController=g,e.signal=g.signal}if(e.params){for(const[g,w]of Object.entries(e.params))typeof w=="object"&&w!==null&&(e.params[g]=JSON.stringify(w));t+=(t.match(/\?/)?"&":"?")+new URLSearchParams(e.params).toString(),delete e.params}let u,d;if(c.requestPromise=new Promise((g,w)=>{u=g,d=w}),r&&(a!=null&&a.requestPromise))try{await a.requestPromise}catch{}let f;try{f=await fetch(we.url(t),e)}catch(g){if(e.ignoreAbort&&(g+"").match(/Request was aborted/)){const w={abort:!0};return u(w),w}throw d(g),g}D6(f);let m=we.activeRequests[n],_=await f.json();if(u(_),m.timestamp!==l){if(s)_={abort:!0};else if(o)do if(m=we.activeRequests[n],_=await m.requestPromise,we.activeRequests[n].timestamp===m.timestamp)break;while(m.timestamp!==we.activeRequests[n].timestamp)}if(f.status===401){const g=(h=ne.value.request)==null?void 0:h.onUnauthorized;return g?g(_,f):{error:!0,message:"Unauthorized",..._}}return f.status>400&&_.exception&&!_.error&&(_.error=!0),_},async poll(t,e,n,r){let o;r||(r=s=>!!s);do o=await we.call(t,e),await Gr(n||1e3);while(!r(o));return o},async get(t,e){var n;return await we.call(t,{method:"get",...e,headers:{Accept:"application/json","Content-Type":"application/json",...(n=ne.value.request)==null?void 0:n.headers,...e==null?void 0:e.headers}})},async post(t,e,n){var r;return await we.call(t,{method:"post",body:e&&JSON.stringify(e),...n,headers:{Accept:"application/json","Content-Type":"application/json",...(r=ne.value.request)==null?void 0:r.headers,...n==null?void 0:n.headers}})}};function D6(t){const e=ne.value.request;if(!e||!e.headers||!e.onAppVersionMismatch)return;const n=e.headers["X-App-Version"]||"",r=t.headers.get("X-App-Version");n&&n!==r&&e.onAppVersionMismatch(r)}async function M6(t,e,n,r){let o;n&&(o=e.value.find(s=>s.id===n)||(await t({id:n}))[0]),e.value=await t(r),o&&!e.value.find(s=>s.id===n)&&e.value.push(o)}function W1(t,e){return new URLSearchParams((e==null?void 0:e.replace(/.*\?/,""))||window.location.search).get(t)}function P6(t,e){return{async list(n,r){r={...r,ignoreAbort:!0};const o=await we.post(`${t}/list`,n,r);return o.data&&(o.data=dd(o.data)),o},summary(n,r){return r={...r,ignoreAbort:!0},we.post(`${t}/summary`,{filter:n},r)},async details(n,r,o){o={...o,ignoreAbort:!0},r&&(o.params={fields:r});const s=await we.get(`${t}/${n.id}/details`,o);return oe(s)},fieldOptions(n){return we.get(`${t}/field-options`,n)},async applyAction(n,r,o,s){var a,c;s={...s,waitOnPrevious:!0,useMostRecentResponse:!0,headers:{...s==null?void 0:s.headers,"X-Timestamp":Date.now().toString()}},o=o||{};const l=await we.post(`${t}/${r?r.id:"new"}/apply-action`,{action:n,data:o},s);return l.item&&(l.item=oe(l.item)),(a=l.result)!=null&&a.__type&&((c=l.result)!=null&&c.id)&&(l.result=oe(l.result)),l},batchAction(n,r,o,s){return s={...s,waitOnPrevious:!0},we.post(`${t}/batch-action`,{action:n,filter:{id:r.map(l=>l.id)},data:o},s)},export(n,r){return n_(`${t}/export`,r||"export.csv",{filter:n})},...e}}function j1(t=null){const e=i.ref(null),n=i.ref(null),r=i.ref(null),o=d=>{var f;e.value=null,new ko((f=d.target)==null?void 0:f.files[0],t).prepare().onProgress(({file:m})=>{m&&(e.value=m,r.value&&r.value(e.value))}).onComplete(({uploadedFile:m})=>{m&&(e.value=m,n.value&&n.value(e.value),r.value&&r.value(e.value))}).onError(({file:m,error:_})=>{console.error("Failed to upload",m,_),Ve.error(`Failed to upload ${m.name}: ${_}`)}).upload()},s=d=>{var f;o({target:{files:(f=d.dataTransfer)==null?void 0:f.files}})};return{isFileUploaded:i.computed(()=>e.value&&e.value.url),clearUploadedFile:()=>{e.value=null,r.value&&r.value(e.value),n.value&&n.value(e.value)},onComplete:d=>{n.value=d},onFileChange:d=>{r.value=d},onDrop:s,onFileSelected:o,uploadedFile:e}}function Pt(t,e){localStorage.setItem(t,JSON.stringify(e))}function Ct(t,e=null){const n=localStorage.getItem(t);try{return n?JSON.parse(n):e}catch{return}}function v6(t,e=""){const n=Ma(t,e),r=document.createElement("style");r.innerHTML=`:root {${n}}`,document.head.appendChild(r)}function Ma(t,e=""){return Object.entries(t).map(([n,r])=>typeof r=="object"?Ma(r,`${e}${n}-`):`--${e}${n}: ${r}`).join(";")}const L6={version:"0.4.77"},{version:Y1}=L6;function V6(){console.log(`Installing Danx UI ${Y1}... Nothing to do really.`)}S.ActionButton=Co,S.ActionForm=Sc,S.ActionFormDialog=rp,S.ActionMenu=Ks,S.ActionTable=cd,S.ActionTableColumn=Zu,S.ActionTableHeaderColumn=Ku,S.ActionTableLayout=H2,S.ActionToolbar=ud,S.ActionVnode=ky,S.AddressFormat=dy,S.AuditHistoryItem=tw,S.AuditHistoryItemValue=el,S.AutoHeightTransition=Ay,S.BadgeTab=Ty,S.BooleanField=ts,S.CaretDownIcon=Wa,S.CollapsableFiltersSidebar=rd,S.CollapsableSidebar=Ec,S.ColumnListItem=Xs,S.ColumnSettingsDialog=s2,S.ConfirmActionDialog=sc,S.ConfirmDialog=Tt,S.ConfirmPasswordField=Tp,S.ContentDrawer=as,S.CreateNewWithNameDialog=lc,S.DateField=rs,S.DateRangeField=os,S.DateTime=D,S.DateTimeField=vp,S.DateTimePicker=is,S.DragAndDrop=Qs,S.DragHandleDotsIcon=ja,S.DragHandleIcon=Ya,S.EditOnClickTextField=zp,S.EditableDiv=uc,S.EmptyTableState=ld,S.ExportButton=Ga,S.FieldLabel=ft,S.FilePreview=Ir,S.FileUpload=ko,S.FileUploadButton=Hp,S.FilterIcon=Ka,S.FilterItem=td,S.FilterList=nd,S.FilterListToggle=od,S.FilterToolbarLayout=x2,S.FilterableField=Js,S.FlashMessages=Ve,S.FlatListFormat=fy,S.FullScreenCarouselDialog=ac,S.FullScreenDialog=pp,S.GpsCoordinatesFormat=hy,S.HandleDraggable=Wu,S.IconWithTextFormat=gy,S.ImageIcon=es,S.IndicatorTab=Iy,S.InfoDialog=cc,S.InlineDateTimeField=Wp,S.InputDialog=yp,S.IntegerField=fc,S.InteractiveTooltip=Sy,S.LabelPillWidget=Kb,S.LabelValueBlock=Jp,S.LabelValueFormat=by,S.LabelValuePillWidget=Jb,S.LabeledInput=ns,S.ListDragAndDrop=ju,S.ListItemDraggable=Yu,S.ListTransition=Ic,S.MaxHeightTransition=Oy,S.MaxLengthCounter=dc,S.MultiFileField=mc,S.MultiKeywordField=_c,S.NavigationMenu=ow,S.NewPasswordField=ng,S.NumberField=Nr,S.NumberRangeField=No,S.PanelsDrawer=sd,S.PanelsDrawerTabs=id,S.PdfIcon=Qa,S.PercentIcon=Xa,S.PopoverMenu=Nc,S.PreviousNextControls=nc,S.RefreshButton=Za,S.RenderComponent=Bc,S.RenderVnode=un,S.RenderedForm=ls,S.RenderedFormDialog=Zg,S.SERVER_TZ=ta,S.SaveStateIndicator=xc,S.SelectDrawer=lg,S.SelectField=Pn,S.SelectOrCreateField=_g,S.SelectWithChildrenField=hc,S.SelectionMenuField=fg,S.ShowHideButton=Eo,S.SingleFileField=pc,S.SkipNextIcon=Ja,S.SkipPreviousIcon=ec,S.SlideTransition=Dy,S.SliderNumberField=kg,S.StaggeredListTransition=Yb,S.SvgImg=Cc,S.TableSummaryRow=ad,S.TextField=an,S.TitleColumnFormat=Qu,S.TrashIcon=To,S.VisibleColumnsToggleButtons=d2,S.WarningIcon=tc,S.WysiwygField=kc,S.XIcon=Bo,S.activeActionVnode=kn,S.addHotkey=I6,S.applyCssVars=v6,S.autoRefreshObject=_d,S.buildCssVars=Ma,S.centerTruncate=vS,S.cloneDeep=dw,S.configure=e0,S.danxOptions=ne,S.dbDateTime=ra,S.diffInDays=zS,S.download=Fi,S.downloadFile=n_,S.downloadFileResponse=r_,S.fBoolean=Xm,S.fCurrency=Ii,S.fCurrencyNoCents=DS,S.fDate=xt,S.fDateTime=Ni,S.fDuration=OS,S.fJSON=t_,S.fLocalizedDateTime=wr,S.fMarkdownCode=US,S.fNameOrCount=e_,S.fNumber=Ot,S.fPercent=Jm,S.fPhone=LS,S.fQDate=$S,S.fSecondsToDuration=Km,S.fSecondsToTime=AS,S.fShortCurrency=MS,S.fShortNumber=Qm,S.fShortSize=PS,S.fetchResourceListWithSelected=M6,S.getFilterFromUrl=ed,S.getItem=Ct,S.getResponseHeader=sa,S.getUrlParam=W1,S.importJson=O6,S.incrementName=wd,S.install=V6,S.isJSON=kd,S.latestCallOnly=il,S.listen=$6,S.localizedDateTime=na,S.mapSortBy=Ju,S.metersToMiles=_w,S.milesToMeters=hw,S.minmax=mw,S.notify=iw,S.parseCoords=pw,S.parseDateTime=St,S.parseGenericDateTime=Ym,S.parseMarkdownCode=$i,S.parseMarkdownJSON=VS,S.parseMarkdownYAML=RS,S.parseQDate=oa,S.parseQDateTime=ia,S.parseSqlDateTime=FS,S.pollUntil=fw,S.refreshApplication=uw,S.registerHotkeys=A6,S.registerStickyScrolling=Xu,S.remoteDateTime=jm,S.remove=Hr,S.replace=rl,S.request=we,S.resolveFileLocation=q1,S.setItem=Pt,S.sleep=Gr,S.stopAutoRefreshObject=hd,S.storeObject=oe,S.storeObjects=dd,S.uniqueBy=bd,S.unlisten=F6,S.useActionRoutes=P6,S.useActionStore=cw,S.useActions=lw,S.useCompatibility=Cd,S.useControls=f2,S.useDebounceFn=ln,S.useMultiFileUpload=Z1,S.useSingleFileUpload=j1,S.useTableColumns=G2,S.version=Y1,S.waitForRef=ol,S.withDefaultActions=aw,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
153
+ `,Di=4,ct=4,Sr=0,tn=Di,be=Di+ct,ma="XML:com.adobe.xmp\0",_a="tEXt",An="iTXt",Mi="zTXt",F_="pHYs",A_="tIME",$3="eXIf",F3="iCCP";function A3(t){return!!t&&R(t,0,fa.length)===fa}function O3(t,e){const r={hasAppMarkers:!1};let o=fa.length;for(;o+Di+ct<=t.byteLength;){if(D3(t,o))r.hasAppMarkers=!0,r.pngHeaderOffset=o+be;else if(M3(t,o)){const s=R3(t,o);s!==void 0&&(r.hasAppMarkers=!0,r.xmpChunks=[{dataOffset:s,length:t.getUint32(o+Sr)-(s-(o+be))}])}else if(P3(t,o,e)){r.hasAppMarkers=!0;const s=R(t,o+tn,ct);r.pngTextChunks||(r.pngTextChunks=[]),r.pngTextChunks.push({length:t.getUint32(o+Sr),type:s,offset:o+be})}else if(v3(t,o))r.hasAppMarkers=!0,r.tiffHeaderOffset=o+be;else if(e&&L3(t,o)){r.hasAppMarkers=!0;const s=t.getUint32(o+Sr),l=o+be,{profileName:a,compressionMethod:c,compressedProfileOffset:u}=U3(t,l);r.iccChunks||(r.iccChunks=[]),r.iccChunks.push({offset:u,length:s-(u-l),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:c})}else V3(t,o)&&(r.hasAppMarkers=!0,r.pngChunkOffsets||(r.pngChunkOffsets=[]),r.pngChunkOffsets.push(o+Sr));o+=t.getUint32(o+Sr)+Di+ct+4}return r}function D3(t,e){return R(t,e+tn,ct)==="IHDR"}function M3(t,e){return R(t,e+tn,ct)===An&&R(t,e+be,ma.length)===ma}function P3(t,e,n){const r=R(t,e+tn,ct);return r===_a||r===An||r===Mi&&n}function v3(t,e){return R(t,e+tn,ct)===$3}function L3(t,e){return R(t,e+tn,ct)===F3}function V3(t,e){const n=[F_,A_],r=R(t,e+tn,ct);return n.includes(r)}function R3(t,e){e+=be+ma.length+1+1;let o=0;for(;o<2&&e<t.byteLength;)t.getUint8(e)===0&&o++,e++;if(!(o<2))return e}function U3(t,e){const o=kr(t,e);e+=o.length+1;const s=t.getUint8(e);return e+=1,{profileName:o,compressionMethod:s,compressedProfileOffset:e}}function z3(t,e){return t.getUint32(e+4)}function q3(t,e,n,r){const{offsets:s,sizes:l}=H3(e,n+3),a=t.getUint8(s.offsetSize)>>4;l.item.extent.extentOffset=a;const c=t.getUint8(s.lengthSize)&15;l.item.extent.extentLength=c;const u=t.getUint8(s.baseOffsetSize)>>4;l.item.baseOffset=u;const d=G3(t,s.indexSize,e);l.item.extent.extentIndex=d!==void 0?d:0;const f=Z3(t,s.itemCount,e);return{type:"iloc",items:W3(t,e,s,l,a,c,d,f),length:r}}function H3(t,e){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};t<2?(n.itemCount=2,n.item.itemId=2):t===2&&(n.itemCount=4,n.item.itemId=4),t===1||t===2?n.item.constructionMethod=2:n.item.constructionMethod=0;const r={offsetSize:e,lengthSize:e,baseOffsetSize:e+1,indexSize:e+1};return r.itemCount=e+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}function G3(t,e,n){if(n===1||n===2)return t.getUint8(e)&15}function Z3(t,e,n){if(n<2)return t.getUint16(e);if(n===2)return t.getUint32(e)}function W3(t,e,n,r,o,s,l,a){if(a===void 0)return[];const c=[];let u=n.items;for(let d=0;d<a;d++){const f={extents:[]};f.itemId=j3(t,u,e),u+=r.item.itemId,f.constructionMethod=e===1||e===2?t.getUint16(u)&15:void 0,u+=r.item.constructionMethod,f.dataReferenceIndex=t.getUint16(u),u+=r.item.dataReferenceIndex,f.baseOffset=Pi(t,u,r.item.baseOffset),u+=r.item.baseOffset,f.extentCount=t.getUint16(u),u+=r.item.extentCount;for(let m=0;m<f.extentCount;m++){const _={};_.extentIndex=Y3(t,e,u,l),u+=r.item.extent.extentIndex,_.extentOffset=Pi(t,u,o),u+=r.item.extent.extentOffset,_.extentLength=Pi(t,u,s),u+=r.item.extent.extentLength,f.extents.push(_)}c.push(f)}return c}function j3(t,e,n){if(n<2)return t.getUint16(e);if(n===2)return t.getUint32(e)}function Y3(t,e,n,r){if((e===1||e===2)&&r>0)return Pi(t,n,r)}function Pi(t,e,n){return n===4?t.getUint32(e):n===8?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),z3(t,e)):0}const K3=1718909296,Q3=1768977008,X3=1835365473,J3=1768714083,e4=1768517222,t4=1768842853,n4=1768973167,r4=1668246642,O_=1165519206,ha=1835625829,o4=1970432288;function vi(t,e){const{length:s,contentOffset:l}=i4(t,e);if(s<8)return;const a=t.getUint32(e+4);if(a===K3)return p4(t,l,s);if(a===Q3)return g4(t,e,l,s);if(a===n4)return y4(t,e,l,s);if(a===r4)return b4(t,l,s);const c=t.getUint8(l);return a===X3?k4(t,e,l+1,s):a===J3?q3(t,c,l+1,s):a===e4?x4(t,e,c,l+1,s):a===t4?C4(t,e,c,l+1,s):{type:void 0,length:s}}function i4(t,e){const l=t.getUint32(e);return s4(l)?{length:t.byteLength-e,contentOffset:e+4+4}:l4(l)&&a4(t,e)?{length:t.getUint32(e+12),contentOffset:e+4+4+8}:{length:l,contentOffset:e+4+4}}function s4(t){return t===0}function l4(t){return t===1}function a4(t,e){return t.getUint32(e+8)===0}function D_(t){{const e={},n=c4(t);return n?(e.tiffHeaderOffset=u4(t,n),e.xmpChunks=m4(n),e.iccChunks=h4(n),e.hasAppMarkers=e.tiffHeaderOffset!==void 0||e.xmpChunks!==void 0||e.iccChunks!==void 0,e):{hasAppMarkers:!1}}}function c4(t){let r=0;for(;r+4+4<=t.byteLength;){const o=vi(t,r);if(o===void 0)break;if(o.type==="meta")return o;r+=o.length}}function u4(t,e){try{const n=d4(e).itemId,r=pa(e,n),o=r.baseOffset+r.extents[0].extentOffset;return f4(t,o)}catch{return}}function d4(t){return t.subBoxes.find(e=>e.type==="iinf").itemInfos.find(e=>e.itemType===O_)}function pa(t,e){return t.subBoxes.find(n=>n.type==="iloc").items.find(n=>n.itemId===e)}function f4(t,e){return e+4+t.getUint32(e)}function m4(t){try{const e=_4(t).itemId,n=pa(t,e),r=pa(t,e).extents[0];return[{dataOffset:n.baseOffset+r.extentOffset,length:r.extentLength}]}catch{return}}function _4(t){return t.subBoxes.find(e=>e.type==="iinf").itemInfos.find(e=>e.itemType===ha&&e.contentType==="application/rdf+xml")}function h4(t){try{const e=t.subBoxes.find(n=>n.type==="iprp").subBoxes.find(n=>n.type==="ipco").properties.find(n=>n.type==="colr").icc;if(e)return[e]}catch{}}function p4(t,e,n){return{type:"ftyp",majorBrand:R(t,e,4),length:n}}function g4(t,e,n,r){return{type:"iprp",subBoxes:Li(t,n,r-(n-e)),length:r}}function y4(t,e,n,r){return{type:"ipco",properties:Li(t,n,r-(n-e)),length:r}}function b4(t,e,n){return{type:"colr",icc:w4(t,e),length:n}}function w4(t,e){const r=R(t,e,4);if(!(r!=="prof"&&r!=="rICC"))return{offset:e+4,length:t.getUint32(e+4),chunkNumber:1,chunksTotal:1}}function k4(t,e,n,r){return{type:"meta",subBoxes:Li(t,n+3,r-(n+3-e)),length:r}}function Li(t,e,n){const r=[O_,ha],o=[];let s=e;for(;s<e+n;){const l=vi(t,s);if(l===void 0)break;l.type!==void 0&&(l.itemType===void 0||r.indexOf(l.itemType)!==-1)&&o.push(l),s+=l.length}return o}function x4(t,e,n,r,o){const{offsets:s}=S4(n,r);return{type:"iinf",itemInfos:Li(t,s.itemInfos,o-(s.itemInfos-e)),length:o}}function S4(t,e){const r={entryCount:e+3},o={};return t===0?o.entryCount=2:o.entryCount=4,r.itemInfos=r.entryCount+o.entryCount,{offsets:r}}function C4(t,e,n,r,o){r+=3;const l={type:"infe",length:o};return(n===0||n===1)&&(l.itemId=t.getUint16(r),r+=2,l.itemProtectionIndex=t.getUint16(r),r+=2,l.itemName=kr(t,r),r+=l.itemName.length+1),n>=2&&(n===2?(l.itemId=t.getUint16(r),r+=2):n===3&&(l.itemId=t.getUint32(r),r+=4),l.itemProtectionIndex=t.getUint16(r),r+=2,l.itemType=t.getUint32(r),r+=4,l.itemName=kr(t,r),r+=l.itemName.length+1,l.itemType===ha?(l.contentType=kr(t,r),r+=l.contentType.length+1,e+o>r&&(l.contentEncoding=kr(t,r),r+=l.contentEncoding.length+1)):l.itemType===o4&&(l.itemUri=kr(t,r),r+=l.itemUri.length+1)),l}const M_={isHeicFile:E4,findHeicOffsets:T4};function E4(t){if(!t)return!1;const e=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=vi(t,0);return n&&e.indexOf(n.majorBrand)!==-1}catch{return!1}}function T4(t){return D_(t)}const P_={isAvifFile:B4,findAvifOffsets:N4};function B4(t){if(!t)return!1;try{const e=vi(t,0);return e&&e.majorBrand==="avif"}catch{return!1}}function N4(t){return D_(t)}const v_={isWebpFile:I4,findOffsets:$4};function I4(t){const n="RIFF",o="WEBP";return!!t&&R(t,0,n.length)===n&&R(t,8,o.length)===o}function $4(t){const r="Exif\0\0";let s=12,l=!1,a,c,u,d;for(;s+8<t.byteLength;){const f=R(t,s,4),m=t.getUint32(s+4,!0);f==="EXIF"?(l=!0,R(t,s+8,r.length)===r?a=s+8+r.length:a=s+8):f==="XMP "?(l=!0,c=[{dataOffset:s+8,length:m}]):f==="ICCP"?(l=!0,u=[{offset:s+8,length:m,chunkNumber:1,chunksTotal:1}]):f==="VP8X"&&(l=!0,d=s+8),s+=8+(m%2===0?m:m+1)}return{hasAppMarkers:l,tiffHeaderOffset:a,xmpChunks:c,iccChunks:u,vp8xChunkOffset:d}}const L_={isGifFile:O4,findOffsets:D4},F4=6,A4=["GIF87a","GIF89a"];function O4(t){return!!t&&A4.includes(R(t,0,F4))}function D4(){return{gifHeaderOffset:0}}const V_={isXMLFile:M4,findOffsets:P4},R_=0,U_="<?xpacket begin";function M4(t){return!!t&&R(t,R_,U_.length)===U_}function P4(t){const e=[];return e.push({dataOffset:R_,length:t.byteLength}),{xmpChunks:e}}const v4={parseAppMarkers:L4};function L4(t,e){if(m_.isTiffFile(t))return nn(m_.findTiffOffsets(),"tiff","TIFF");if(__.isJpegFile(t))return nn(__.findJpegOffsets(t),"jpeg","JPEG");if($_.isPngFile(t))return nn($_.findPngOffsets(t,e),"png","PNG");if(M_.isHeicFile(t))return nn(M_.findHeicOffsets(t),"heic","HEIC");if(P_.isAvifFile(t))return nn(P_.findAvifOffsets(t),"avif","AVIF");if(v_.isWebpFile(t))return nn(v_.findOffsets(t),"webp","WebP");if(L_.isGifFile(t))return nn(L_.findOffsets(t),"gif","GIF");if(V_.isXMLFile(t))return nn(V_.findOffsets(t),"xml","XML");throw new Error("Invalid image format")}function nn(t,e,n){return z({},t,{fileType:{value:e,description:n}})}const U={ApertureValue:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2),ColorSpace(t){return t===1?"sRGB":t===65535?"Uncalibrated":"Unknown"},ComponentsConfiguration(t){return t.map(e=>{if(e===49)return"Y";if(e===50)return"Cb";if(e===51)return"Cr";if(e===52)return"R";if(e===53)return"G";if(e===54)return"B"}).join("")},Contrast(t){return t===0?"Normal":t===1?"Soft":t===2?"Hard":"Unknown"},CustomRendered(t){return t===0?"Normal process":t===1?"Custom process":"Unknown"},ExposureMode(t){return t===0?"Auto exposure":t===1?"Manual exposure":t===2?"Auto bracket":"Unknown"},ExposureProgram(t){return t===0?"Undefined":t===1?"Manual":t===2?"Normal program":t===3?"Aperture priority":t===4?"Shutter priority":t===5?"Creative program":t===6?"Action program":t===7?"Portrait mode":t===8?"Landscape mode":t===9?"Bulb":"Unknown"},ExposureTime(t){if(t[0]/t[1]>.25){const e=t[0]/t[1];return Number.isInteger(e)?""+e:e.toFixed(1)}return t[0]!==0?`1/${Math.round(t[1]/t[0])}`:`0/${t[1]}`},FNumber:t=>`f/${t[0]/t[1]}`,FocalLength:t=>t[0]/t[1]+" mm",FocalPlaneResolutionUnit(t){return t===2?"inches":t===3?"centimeters":"Unknown"},LightSource:t=>t===1?"Daylight":t===2?"Fluorescent":t===3?"Tungsten (incandescent light)":t===4?"Flash":t===9?"Fine weather":t===10?"Cloudy weather":t===11?"Shade":t===12?"Daylight fluorescent (D 5700 – 7100K)":t===13?"Day white fluorescent (N 4600 – 5400K)":t===14?"Cool white fluorescent (W 3900 – 4500K)":t===15?"White fluorescent (WW 3200 – 3700K)":t===17?"Standard light A":t===18?"Standard light B":t===19?"Standard light C":t===20?"D55":t===21?"D65":t===22?"D75":t===23?"D50":t===24?"ISO studio tungsten":t===255?"Other light source":"Unknown",MeteringMode(t){return t===1?"Average":t===2?"CenterWeightedAverage":t===3?"Spot":t===4?"MultiSpot":t===5?"Pattern":t===6?"Partial":t===255?"Other":"Unknown"},ResolutionUnit(t){return t===2?"inches":t===3?"centimeters":"Unknown"},Saturation(t){return t===0?"Normal":t===1?"Low saturation":t===2?"High saturation":"Unknown"},SceneCaptureType(t){return t===0?"Standard":t===1?"Landscape":t===2?"Portrait":t===3?"Night scene":"Unknown"},Sharpness(t){return t===0?"Normal":t===1?"Soft":t===2?"Hard":"Unknown"},ShutterSpeedValue(t){const e=Math.pow(2,t[0]/t[1]);return e<=1?`${Math.round(1/e)}`:`1/${Math.round(e)}`},WhiteBalance(t){return t===0?"Auto white balance":t===1?"Manual white balance":"Unknown"},XResolution:t=>""+Math.round(t[0]/t[1]),YResolution:t=>""+Math.round(t[0]/t[1])},z_={11:"ProcessingSoftware",254:{name:"SubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"})[t]||"Unknown"},255:{name:"OldSubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"})[t]||"Unknown"},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:t=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"})[t]||"Unknown"},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:t=>({1:"Normal",2:"Reversed"})[t]||"Unknown"},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:t=>t===1?"top-left":t===2?"top-right":t===3?"bottom-right":t===4?"bottom-left":t===5?"left-top":t===6?"right-top":t===7?"right-bottom":t===8?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:U.XResolution},283:{name:"YResolution",description:U.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:t=>""+Math.round(t[0]/t[1])},287:{name:"YPosition",description:t=>""+Math.round(t[0]/t[1])},290:{name:"GrayResponseUnit",description:t=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"})[t]||"Unknown"},296:{name:"ResolutionUnit",description:U.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:t=>t.map(e=>`${e[0]}/${e[1]}`).join(", ")},319:{name:"PrimaryChromaticities",description:t=>t.map(e=>`${e[0]}/${e[1]}`).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:t=>({1:"CMYK",2:"Not CMYK"})[t]||"Unknown"},337:"TargetPrinter",338:{name:"ExtraSamples",description:t=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"})[t]||"Unknown"},339:{name:"SampleFormat",description:t=>{const e={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(t)?t.map(n=>e[n]||"Unknown").join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:t=>t.map(e=>""+e[0]/e[1]).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:t=>t===1?"centered":t===2?"co-sited":"undefined "+t},532:{name:"ReferenceBlackWhite",description:t=>t.map(e=>""+e[0]/e[1]).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:t=>t.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:po},40092:{name:"XPComment",description:po},40093:{name:"XPAuthor",description:po},40094:{name:"XPKeywords",description:po},40095:{name:"XPSubject",description:po},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:t=>({0:"Unsafe",1:"Safe"})[t]||"Unknown"},50778:{name:"CalibrationIlluminant1",description:U.LightSource},50779:{name:"CalibrationIlluminant2",description:U.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:t=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"})[t]||"Unknown"},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:t=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"})[t]||"Unknown"},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:t=>({0:"Linear",1:"sRGB"})[t]||"Unknown"},51108:{name:"ProfileLookTableEncoding",description:t=>({0:"Linear",1:"sRGB"})[t]||"Unknown"},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:t=>({0:"Auto",1:"None"})[t]||"Unknown"},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function po(t){return new TextDecoder("utf-16").decode(new Uint8Array(t)).replace(/\u0000+$/,"")}const V4={33434:{name:"ExposureTime",description:U.ExposureTime},33437:{name:"FNumber",description:U.FNumber},34850:{name:"ExposureProgram",description:U.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:t=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"})[t]||"Unknown"},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:t=>_e(t)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:U.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:U.ShutterSpeedValue},37378:{name:"ApertureValue",description:U.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2)},37382:{name:"SubjectDistance",description:t=>t[0]/t[1]+" m"},37383:{name:"MeteringMode",description:U.MeteringMode},37384:{name:"LightSource",description:U.LightSource},37385:{name:"Flash",description:t=>t===0?"Flash did not fire":t===1?"Flash fired":t===5?"Strobe return light not detected":t===7?"Strobe return light detected":t===9?"Flash fired, compulsory flash mode":t===13?"Flash fired, compulsory flash mode, return light not detected":t===15?"Flash fired, compulsory flash mode, return light detected":t===16?"Flash did not fire, compulsory flash mode":t===24?"Flash did not fire, auto mode":t===25?"Flash fired, auto mode":t===29?"Flash fired, auto mode, return light not detected":t===31?"Flash fired, auto mode, return light detected":t===32?"No flash function":t===65?"Flash fired, red-eye reduction mode":t===69?"Flash fired, red-eye reduction mode, return light not detected":t===71?"Flash fired, red-eye reduction mode, return light detected":t===73?"Flash fired, compulsory flash mode, red-eye reduction mode":t===77?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":t===79?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":t===89?"Flash fired, auto mode, red-eye reduction mode":t===93?"Flash fired, auto mode, return light not detected, red-eye reduction mode":t===95?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:U.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:t=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"})[t]||"Unknown"},37395:"ImageHistory",37396:{name:"SubjectArea",description:t=>t.length===2?`Location; X: ${t[0]}, Y: ${t[1]}`:t.length===3?`Circle; X: ${t[0]}, Y: ${t[1]}, diameter: ${t[2]}`:t.length===4?`Rectangle; X: ${t[0]}, Y: ${t[1]}, width: ${t[2]}, height: ${t[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:la},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:t=>t[0]/t[1]+" °C"},37889:{name:"Humidity",description:t=>t[0]/t[1]+" %"},37890:{name:"Pressure",description:t=>t[0]/t[1]+" hPa"},37891:{name:"WaterDepth",description:t=>t[0]/t[1]+" m"},37892:{name:"Acceleration",description:t=>t[0]/t[1]+" mGal"},37893:{name:"CameraElevationAngle",description:t=>t[0]/t[1]+" °"},40960:{name:"FlashpixVersion",description:t=>t.map(e=>String.fromCharCode(e)).join("")},40961:{name:"ColorSpace",description:U.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:U.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([t,e])=>`X: ${t}, Y: ${e}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:t=>t===1?"Undefined":t===2?"One-chip color area sensor":t===3?"Two-chip color area sensor":t===4?"Three-chip color area sensor":t===5?"Color sequential area sensor":t===7?"Trilinear sensor":t===8?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:t=>t===3?"DSC":"Unknown"},41729:{name:"SceneType",description:t=>t===1?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:U.CustomRendered},41986:{name:"ExposureMode",description:U.ExposureMode},41987:{name:"WhiteBalance",description:U.WhiteBalance},41988:{name:"DigitalZoomRatio",description:t=>t[0]===0?"Digital zoom was not used":""+t[0]/t[1]},41989:{name:"FocalLengthIn35mmFilm",description:t=>t===0?"Unknown":t},41990:{name:"SceneCaptureType",description:U.SceneCaptureType},41991:{name:"GainControl",description:t=>t===0?"None":t===1?"Low gain up":t===2?"High gain up":t===3?"Low gain down":t===4?"High gain down":"Unknown"},41992:{name:"Contrast",description:U.Contrast},41993:{name:"Saturation",description:U.Saturation},41994:{name:"Sharpness",description:U.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:t=>t===1?"Macro":t===2?"Close view":t===3?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:t=>{const e=parseFloat((t[0][0]/t[0][1]).toFixed(5)),n=parseFloat((t[1][0]/t[1][1]).toFixed(5)),r=`${e}-${n} mm`;if(t[3][1]===0)return`${r} f/?`;const o=1/(t[2][1]/t[2][1]/(t[3][0]/t[3][1]));return`${r} f/${parseFloat(o.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:t=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"})[t]||"Unknown"},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},R4={0:{name:"GPSVersionID",description:t=>t[0]===2&&t[1]===2&&t[2]===0&&t[3]===0?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:t=>{const e=t.join("");return e==="N"?"North latitude":e==="S"?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:Oi},3:{name:"GPSLongitudeRef",description:t=>{const e=t.join("");return e==="E"?"East longitude":e==="W"?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:Oi},5:{name:"GPSAltitudeRef",description:t=>t===0?"Sea level":t===1?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:t=>t[0]/t[1]+" m"},7:{name:"GPSTimeStamp",description:t=>t.map(([e,n])=>{const r=e/n;return/^\d(\.|$)/.test(`${r}`)?`0${r}`:r}).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:t=>{const e=t.join("");return e==="A"?"Measurement in progress":e==="V"?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:t=>{const e=t.join("");return e==="2"?"2-dimensional measurement":e==="3"?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:t=>{const e=t.join("");return e==="K"?"Kilometers per hour":e==="M"?"Miles per hour":e==="N"?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:t=>{const e=t.join("");return e==="N"?"North latitude":e==="S"?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:t=>{const e=t.join("");return e==="E"?"East longitude":e==="W"?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},23:{name:"GPSDestBearingRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:t=>{const e=t.join("");return e==="K"?"Kilometers":e==="M"?"Miles":e==="N"?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:la},28:{name:"GPSAreaInformation",description:la},29:"GPSDateStamp",30:{name:"GPSDifferential",description:t=>t===0?"Measurement without differential correction":t===1?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},U4={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:t=>_e(t)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},z4={45056:{name:"MPFVersion",description:t=>_e(t)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},q4={4:{name:"ShotInfo",description:t=>t}},q_=z({},z_,V4),ga="0th",H_="1st",G_="exif",Z_="gps",W_="interoperability",j_="mpf",Y_="canon",rn={[ga]:q_,[H_]:z_,[G_]:q_,[Z_]:R4,[W_]:U4,[j_]:z4,[Y_]:q4},K_={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},ya={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},F={getAsciiValue:H4,getByteAt:Q_,getAsciiAt:G4,getShortAt:Z4,getLongAt:Vi,getRationalAt:W4,getUndefinedAt:j4,getSlongAt:ba,getSrationalAt:Y4,getIfdPointerAt:K4,typeSizes:K_,tagTypes:ya,getTypeSize:Q4};function H4(t){return t.map(e=>String.fromCharCode(e))}function Q_(t,e){return t.getUint8(e)}function G4(t,e){return t.getUint8(e)}function Z4(t,e,n){return t.getUint16(e,n===Fn.LITTLE_ENDIAN)}function Vi(t,e,n){return t.getUint32(e,n===Fn.LITTLE_ENDIAN)}function W4(t,e,n){return[Vi(t,e,n),Vi(t,e+4,n)]}function j4(t,e){return Q_(t,e)}function ba(t,e,n){return t.getInt32(e,n===Fn.LITTLE_ENDIAN)}function Y4(t,e,n){return[ba(t,e,n),ba(t,e+4,n)]}function K4(t,e,n){return Vi(t,e,n)}function Q4(t){if(ya[t]===void 0)throw new Error("No such type found.");return K_[ya[t]]}const X4={1:F.getByteAt,2:F.getAsciiAt,3:F.getShortAt,4:F.getLongAt,5:F.getRationalAt,7:F.getUndefinedAt,9:F.getSlongAt,10:F.getSrationalAt,13:F.getIfdPointerAt};function X_(t,e,n){return e+F.getLongAt(t,e+4,n)}function On(t,e,n,r,o,s){const l=F.getTypeSize("SHORT"),a=12,c={},u=J4(t,r,o);r+=l;for(let d=0;d<u&&!(r+a>t.byteLength);d++){const f=eC(t,e,n,r,o,s);f!==void 0&&(c[f.name]={id:f.id,value:f.value,description:f.description},f.name==="MakerNote"&&(c[f.name].__offset=f.__offset)),r+=a}if(r<t.byteLength-F.getTypeSize("LONG")){const d=F.getLongAt(t,r,o);d!==0&&e===ga&&(c.Thumbnail=On(t,H_,n,n+d,o,s))}return c}function J4(t,e,n){return e+F.getTypeSize("SHORT")<=t.byteLength?F.getShortAt(t,e,n):0}function eC(t,e,n,r,o,s){const a=F.getTypeSize("SHORT"),c=a+F.getTypeSize("SHORT"),u=c+F.getTypeSize("LONG"),d=F.getShortAt(t,r,o),f=F.getShortAt(t,r+a,o),m=F.getLongAt(t,r+c,o);let _,p;if(F.typeSizes[f]===void 0||!s&&rn[e][d]===void 0)return;if(tC(f,m))p=r+u,_=J_(t,p,f,m,o);else if(p=F.getLongAt(t,r+u,o),nC(t,n,p,f,m)){const w=d===33723;_=J_(t,n+p,f,m,o,w)}else _="<faulty value>";f===F.tagTypes.ASCII&&(_=rC(_),_=oC(_));let h=`undefined-${d}`,g=_;if(rn[e][d]!==void 0)if(rn[e][d].name!==void 0&&rn[e][d].description!==void 0){h=rn[e][d].name;try{g=rn[e][d].description(_)}catch{g=e1(_)}}else f===F.tagTypes.RATIONAL||f===F.tagTypes.SRATIONAL?(h=rn[e][d],g=""+_[0]/_[1]):(h=rn[e][d],g=e1(_));return{id:d,name:h,value:_,description:g,__offset:p}}function tC(t,e){return F.typeSizes[t]*e<=F.getTypeSize("LONG")}function J_(t,e,n,r,o,s=!1){let l=[];s&&(r=r*F.typeSizes[n],n=F.tagTypes.BYTE);for(let a=0;a<r;a++)l.push(X4[n](t,e,o)),e+=F.typeSizes[n];return n===F.tagTypes.ASCII?l=F.getAsciiValue(l):l.length===1&&(l=l[0]),l}function nC(t,e,n,r,o){return e+n+F.typeSizes[r]*o<=t.byteLength}function rC(t){const e=[];let n=0;for(let r=0;r<t.length;r++){if(t[r]==="\0"){n++;continue}e[n]===void 0&&(e[n]=""),e[n]+=t[r]}return e}function oC(t){try{return t.map(e=>decodeURIComponent(escape(e)))}catch{return t}}function e1(t){return t instanceof Array?t.join(", "):t}const t1="Exif IFD Pointer",n1="GPS Info IFD Pointer",r1="Interoperability IFD Pointer",o1={read:iC};function iC(t,e,n){const r=Fn.getByteOrder(t,e);let o=sC(t,e,r,n);return o=lC(o,t,e,r,n),o=aC(o,t,e,r,n),o=cC(o,t,e,r,n),{tags:o,byteOrder:r}}function sC(t,e,n,r){return On(t,ga,e,X_(t,e,n),n,r)}function lC(t,e,n,r,o){return t[t1]!==void 0?z(t,On(e,G_,n,n+t[t1].value,r,o)):t}function aC(t,e,n,r,o){return t[n1]!==void 0?z(t,On(e,Z_,n,n+t[n1].value,r,o)):t}function cC(t,e,n,r,o){return t[r1]!==void 0?z(t,On(e,W_,n,n+t[r1].value,r,o)):t}const uC={read:dC},Cr=16;function dC(t,e,n){const r=Fn.getByteOrder(t,e),o=On(t,j_,e,X_(t,e,r),r,n);return fC(t,e,o,r)}function fC(t,e,n,r){if(!n.MPEntry)return n;const o=[];for(let s=0;s<Math.ceil(n.MPEntry.value.length/Cr);s++){o[s]={};const l=go(n.MPEntry.value,s*Cr,F.getTypeSize("LONG"),r);o[s].ImageFlags=mC(l),o[s].ImageFormat=_C(l),o[s].ImageType=hC(l);const a=go(n.MPEntry.value,s*Cr+4,F.getTypeSize("LONG"),r);o[s].ImageSize={value:a,description:""+a};const c=pC(s,n.MPEntry,r,e);o[s].ImageOffset={value:c,description:""+c};const u=go(n.MPEntry.value,s*Cr+12,F.getTypeSize("SHORT"),r);o[s].DependentImage1EntryNumber={value:u,description:""+u};const d=go(n.MPEntry.value,s*Cr+14,F.getTypeSize("SHORT"),r);o[s].DependentImage2EntryNumber={value:d,description:""+d},o[s].image=t.buffer.slice(c,c+a),l_(o[s],"base64",function(){return a_(this.image)})}return n.Images=o,n}function go(t,e,n,r){if(r===Fn.LITTLE_ENDIAN){let s=0;for(let l=0;l<n;l++)s+=t[e+l]<<8*l;return s}let o=0;for(let s=0;s<n;s++)o+=t[e+s]<<8*(n-1-s);return o}function mC(t){const e=[t>>31&1,t>>30&1,t>>29&1],n=[];return e[0]&&n.push("Dependent Parent Image"),e[1]&&n.push("Dependent Child Image"),e[2]&&n.push("Representative Image"),{value:e,description:n.join(", ")||"None"}}function _C(t){const e=t>>24&7;return{value:e,description:e===0?"JPEG":"Unknown"}}function hC(t){const e=t&16777215;return{value:e,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[e]||"Unknown"}}function pC(t,e,n,r){return gC(t)?0:go(e.value,t*Cr+8,F.getTypeSize("LONG"),n)+r}function gC(t){return t===0}const yC={read:bC};function bC(t,e){const n=wC(t,e),r=CC(t,e,n);return{"Bits Per Sample":kC(t,e,n),"Image Height":xC(t,e,n),"Image Width":SC(t,e,n),"Color Components":r,Subsampling:r&&EC(t,e,r.value,n)}}function wC(t,e){return F.getShortAt(t,e)}function kC(t,e,n){if(3>n)return;const s=F.getByteAt(t,e+2);return{value:s,description:""+s}}function xC(t,e,n){if(5>n)return;const s=F.getShortAt(t,e+3);return{value:s,description:`${s}px`}}function SC(t,e,n){if(7>n)return;const s=F.getShortAt(t,e+5);return{value:s,description:`${s}px`}}function CC(t,e,n){if(8>n)return;const s=F.getByteAt(t,e+7);return{value:s,description:""+s}}function EC(t,e,n,r){if(8+3*n>r)return;const l=[];for(let a=0;a<n;a++){const c=e+8+a*3;l.push([F.getByteAt(t,c),F.getByteAt(t,c+1),F.getByteAt(t,c+2)])}return{value:l,description:l.length>1?TC(l)+BC(l):""}}function TC(t){const e={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return t.map(n=>e[n[0]]).join("")}function BC(t){const e={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return t.length===0||t[0][1]===void 0||e[t[0][1]]===void 0?"":e[t[0][1]]}const NC={read:IC};function IC(t,e){const n=$C(t,e),r=PC(t,e,n),o=vC(t,e,n),s={"JFIF Version":FC(t,e,n),"Resolution Unit":AC(t,e,n),XResolution:DC(t,e,n),YResolution:MC(t,e,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":o};if(r!==void 0&&o!==void 0){const l=LC(t,e,3*r.value*o.value,n);l&&(s["JFIF Thumbnail"]=l)}for(const l in s)s[l]===void 0&&delete s[l];return s}function $C(t,e){return F.getShortAt(t,e)}function FC(t,e,n){if(9>n)return;const s=F.getByteAt(t,e+7),l=F.getByteAt(t,e+7+1);return{value:s*256+l,description:s+"."+l}}function AC(t,e,n){if(10>n)return;const s=F.getByteAt(t,e+9);return{value:s,description:OC(s)}}function OC(t){return t===0?"None":t===1?"inches":t===2?"cm":"Unknown"}function DC(t,e,n){if(12>n)return;const s=F.getShortAt(t,e+10);return{value:s,description:""+s}}function MC(t,e,n){if(14>n)return;const s=F.getShortAt(t,e+12);return{value:s,description:""+s}}function PC(t,e,n){if(15>n)return;const s=F.getByteAt(t,e+14);return{value:s,description:`${s}px`}}function vC(t,e,n){if(16>n)return;const s=F.getByteAt(t,e+15);return{value:s,description:`${s}px`}}function LC(t,e,n,r){return n===0||16+n>r?void 0:{value:t.buffer.slice(e+16,e+16+n),description:"<24-bit RGB pixel data>"}}const on={iptc:{256:{name:"Model Version",description:t=>((t[0]<<8)+t[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:t=>((t[0]<<8)+t[1]).toString()},278:{name:"File Format Version",description:t=>((t[0]<<8)+t[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:wa},336:{name:"Time Sent",description:ka},346:{name:"Coded Character Set",description:i1,encoding_name:i1},356:"UNO",376:{name:"ARM Identifier",description:t=>((t[0]<<8)+t[1]).toString()},378:{name:"ARM Version",description:t=>((t[0]<<8)+t[1]).toString()},512:{name:"Record Version",description:t=>((t[0]<<8)+t[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:t=>_e(t)==="01"?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:t=>{const e=_e(t).split(":");return e[2]+(e[3]?"/"+e[3]:"")+(e[4]?"/"+e[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:t=>{const e=_e(t);return e==="01"?"Object Kill":e==="02"?"Object Replace":e==="03"?"Object Append":e==="04"?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:wa},572:{name:"Time Created",description:ka},574:{name:"Digital Creation Date",description:wa},575:{name:"Digital Creation Time",description:ka},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:t=>{const e=_e(t);return e==="a"?"morning":e==="p"?"evening":e==="b"?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:t=>t},642:"Image Type",643:{name:"Image Orientation",description:t=>{const e=_e(t);return e==="P"?"Portrait":e==="L"?"Landscape":e==="S"?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:t=>{const e=_e(t),n=e.charAt(0),r=e.charAt(1);let o="";return n==="1"?o+="Mono":n==="2"&&(o+="Stereo"),r==="A"?o+=", actuality":r==="C"?o+=", question and answer session":r==="M"?o+=", music, transmitted by itself":r==="Q"?o+=", response to a question":r==="R"?o+=", raw sound":r==="S"?o+=", scener":r==="V"?o+=", voicer":r==="W"&&(o+=", wrap"),o!==""?o:e}},663:{name:"Audio Sampling Rate",description:t=>parseInt(_e(t),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:t=>{const e=parseInt(_e(t),10);return e+(e===1?" bit":" bits")}},665:{name:"Audio Duration",description:t=>{const e=_e(t);return e.length>=6?e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2):e}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:t=>t.length===2?"ObjectData Preview File Format":"Record 2 destination",description:t=>{if(t.length===2){const e=(t[0]<<8)+t[1];return e===0?"No ObjectData":e===1?"IPTC-NAA Digital Newsphoto Parameter Record":e===2?"IPTC7901 Recommended Message Format":e===3?"Tagged Image File Format (Adobe/Aldus Image data)":e===4?"Illustrator (Adobe Graphics data)":e===5?"AppleSingle (Apple Computer Inc)":e===6?"NAA 89-3 (ANPA 1312)":e===7?"MacBinary II":e===8?"IPTC Unstructured Character Oriented File Format (UCOFF)":e===9?"United Press International ANPA 1312 variant":e===10?"United Press International Down-Load Message":e===11?"JPEG File Interchange (JFIF)":e===12?"Photo-CD Image-Pac (Eastman Kodak)":e===13?"Microsoft Bit Mapped Graphics File [*.BMP]":e===14?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":e===15?"Audio plus Moving Video [*.AVI] (Microsoft)":e===16?"PC DOS/Windows Executable Files [*.COM][*.EXE]":e===17?"Compressed Binary File [*.ZIP] (PKWare Inc)":e===18?"Audio Interchange File Format AIFF (Apple Computer Inc)":e===19?"RIFF Wave (Microsoft Corporation)":e===20?"Freehand (Macromedia/Aldus)":e===21?'Hypertext Markup Language "HTML" (The Internet Society)':e===22?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":e===23?"MPEG 2 Audio Layer 3, ISO/IEC":e===24?"Portable Document File (*.PDF) Adobe":e===25?"News Industry Text Format (NITF)":e===26?"Tape Archive (*.TAR)":e===27?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":e===28?"Ritzaus Bureau NITF version (RBNITF DTD)":e===29?"Corel Draw [*.CDR]":`Unknown format ${e}`}return _e(t)}},713:{name:"ObjectData Preview File Format Version",description:(t,e)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=_e(t);if(e["ObjectData Preview File Format"]){const o=_e(e["ObjectData Preview File Format"].value);if(n[o]&&n[o][r])return n[o][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:t=>t[0].toString()},1812:{name:"Max Subfile Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1882:{name:"ObjectData Size Announced",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1887:{name:"Maximum ObjectData Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}}}};function wa(t){const e=_e(t);return e.length>=8?e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2):e}function ka(t){const e=_e(t);let n=e;return e.length>=6&&(n=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2),e.length===11&&(n+=e.substr(6,1)+e.substr(7,2)+":"+e.substr(9,2))),n}function i1(t){const e=_e(t);return e==="\x1B%G"?"UTF-8":e==="\x1B%5"?"Windows-1252":e==="\x1B%/G"?"UTF-8 Level 1":e==="\x1B%/H"?"UTF-8 Level 2":e==="\x1B%/I"?"UTF-8 Level 3":e==="\x1B/A"?"ISO-8859-1":e==="\x1B/B"?"ISO-8859-2":e==="\x1B/C"?"ISO-8859-3":e==="\x1B/D"?"ISO-8859-4":e==="\x1B/@"?"ISO-8859-5":e==="\x1B/G"?"ISO-8859-6":e==="\x1B/F"?"ISO-8859-7":e==="\x1B/H"?"ISO-8859-8":"Unknown"}const VC={get:RC};function RC(){if(typeof TextDecoder<"u")return TextDecoder}const s1={decode:UC,TAG_HEADER_SIZE:5};function UC(t,e){const n=VC.get();if(typeof n<"u"&&t!==void 0)try{return new n(t).decode(e instanceof DataView?e.buffer:Uint8Array.from(e))}catch{}const r=e.map(o=>String.fromCharCode(o)).join("");return zC(r)}function zC(t){try{return decodeURIComponent(escape(t))}catch{return t}}const qC=943868237,yo=4,Ri=2,HC=1,GC=2,l1=4,ZC=yo+Ri+GC+l1,WC=1028,a1=5,xa={read:jC};function jC(t,e,n){try{if(Array.isArray(t))return c1(new DataView(Uint8Array.from(t).buffer),{size:t.length},0,n);const{naaBlock:r,dataOffset:o}=YC(t,e);return c1(t,r,o,n)}catch{return{}}}function YC(t,e){for(;e+ZC<=t.byteLength;){const n=KC(t,e);if(QC(n))return{naaBlock:n,dataOffset:e+n.headerSize};e+=n.headerSize+n.size+XC(n)}throw new Error("No IPTC NAA resource block.")}function KC(t,e){if(t.getUint32(e,!1)!==qC)throw new Error("Not an IPTC resource block.");const n=t.getUint8(e+yo+Ri),r=(n%2===0?n+1:n)+HC;return{headerSize:yo+Ri+r+l1,type:t.getUint16(e+yo),size:t.getUint32(e+yo+Ri+r)}}function QC(t){return t.type===WC}function XC(t){return t.size%2!==0?1:0}function c1(t,e,n,r){const o={};let s;const l=n+e.size;for(;n<l&&n<t.byteLength;){const{tag:a,tagSize:c}=JC(t,n,o,s,r);if(a===null)break;a&&("encoding"in a&&(s=a.encoding),o[a.name]===void 0||a.repeatable===void 0?o[a.name]={id:a.id,value:a.value,description:a.description}:(o[a.name]instanceof Array||(o[a.name]=[{id:o[a.name].id,value:o[a.name].value,description:o[a.name].description}]),o[a.name].push({id:a.id,value:a.value,description:a.description}))),n+=a1+c}return o}function JC(t,e,n,r,o){if(eE(t,e))return{tag:null,tagSize:0};const a=t.getUint16(e+1),c=t.getUint16(e+3);if(!o&&!on.iptc[a])return{tag:void 0,tagSize:c};const u=tE(t,e+a1,c),d={id:a,name:nE(on.iptc[a],a,u),value:u,description:iE(on.iptc[a],u,n,r)};return aE(a)&&(d.repeatable=!0),cE(a)&&(d.encoding=on.iptc[a].encoding_name(u)),{tag:d,tagSize:c}}function eE(t,e){return t.getUint8(e)!==28}function tE(t,e,n){const r=[];for(let o=0;o<n;o++)r.push(t.getUint8(e+o));return r}function nE(t,e,n){return t?rE(t)?t:oE(t)?t.name(n):t.name:`undefined-${e}`}function rE(t){return typeof t=="string"}function oE(t){return typeof t.name=="function"}function iE(t,e,n,r){if(lE(t))try{return t.description(e,n)}catch{}return sE(t,e)?s1.decode(r,e):e}function sE(t,e){return t&&e instanceof Array}function lE(t){return t&&t.description!==void 0}function aE(t){return on.iptc[t]&&on.iptc[t].repeatable}function cE(t){return on.iptc[t]&&on.iptc[t].encoding_name!==void 0}const Ui={"tiff:Orientation"(t){return t==="1"?"Horizontal (normal)":t==="2"?"Mirror horizontal":t==="3"?"Rotate 180":t==="4"?"Mirror vertical":t==="5"?"Mirror horizontal and rotate 270 CW":t==="6"?"Rotate 90 CW":t==="7"?"Mirror horizontal and rotate 90 CW":t==="8"?"Rotate 270 CW":t},"tiff:ResolutionUnit":t=>U.ResolutionUnit(parseInt(t,10)),"tiff:XResolution":t=>Er(U.XResolution,t),"tiff:YResolution":t=>Er(U.YResolution,t),"exif:ApertureValue":t=>Er(U.ApertureValue,t),"exif:GPSLatitude":d1,"exif:GPSLongitude":d1,"exif:FNumber":t=>Er(U.FNumber,t),"exif:FocalLength":t=>Er(U.FocalLength,t),"exif:FocalPlaneResolutionUnit":t=>U.FocalPlaneResolutionUnit(parseInt(t,10)),"exif:ColorSpace":t=>U.ColorSpace(uE(t)),"exif:ComponentsConfiguration"(t,e){if(/^\d, \d, \d, \d$/.test(e)){const n=e.split(", ").map(r=>r.charCodeAt(0));return U.ComponentsConfiguration(n)}return e},"exif:Contrast":t=>U.Contrast(parseInt(t,10)),"exif:CustomRendered":t=>U.CustomRendered(parseInt(t,10)),"exif:ExposureMode":t=>U.ExposureMode(parseInt(t,10)),"exif:ExposureProgram":t=>U.ExposureProgram(parseInt(t,10)),"exif:ExposureTime"(t){return u1(t)?U.ExposureTime(t.split("/").map(e=>parseInt(e,10))):t},"exif:MeteringMode":t=>U.MeteringMode(parseInt(t,10)),"exif:Saturation":t=>U.Saturation(parseInt(t,10)),"exif:SceneCaptureType":t=>U.SceneCaptureType(parseInt(t,10)),"exif:Sharpness":t=>U.Sharpness(parseInt(t,10)),"exif:ShutterSpeedValue":t=>Er(U.ShutterSpeedValue,t),"exif:WhiteBalance":t=>U.WhiteBalance(parseInt(t,10))};function Er(t,e){return u1(e)?t(e.split("/")):e}function uE(t){return t.substring(0,2)==="0x"?parseInt(t.substring(2),16):parseInt(t,10)}function u1(t){return/^-?\d+\/-?\d+$/.test(t)}function d1(t){const[e,n]=t.split(",");if(e!==void 0&&n!==void 0){const r=parseFloat(e),o=parseFloat(n),s=n.charAt(n.length-1);if(!Number.isNaN(r)&&!Number.isNaN(o))return""+(r+o/60)+s}return t}const dE={get:fE};function fE(){if(typeof DOMParser<"u")return new DOMParser;try{const{DOMParser:t,onErrorStopParsing:e}=__non_webpack_require__("@xmldom/xmldom");return new t({onError:e})}catch{return}}const f1={read:mE};function mE(t,e){const n={};if(typeof t=="string")return zi(n,t),n;const[r,o]=_E(t,e),s=zi(n,r);if(o){const l=zi(n,o);!s&&!l&&(delete n._raw,zi(n,Sa(t,e)))}return n}function _E(t,e){if(e.length===0)return[];const n=[Sa(t,e.slice(0,1))];return e.length>1&&n.push(Sa(t,e.slice(1))),n}function Sa(t,e){const n=e.reduce((s,l)=>s+l.length,0),r=new Uint8Array(n);let o=0;for(let s=0;s<e.length;s++){const l=e[s],a=t.buffer.slice(l.dataOffset,l.dataOffset+l.length);r.set(new Uint8Array(a),o),o+=l.length}return new DataView(r.buffer)}function zi(t,e){try{const{doc:n,raw:r}=hE(e);t._raw=(t._raw||"")+r;const o=m1(n);return z(t,h1(_1(o,!0))),!0}catch{return!1}}function hE(t){const e=dE.get();if(!e)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const n=typeof t=="string"?t:R(t,0,t.byteLength),r=e.parseFromString(pE(n),"application/xml");if(r.documentElement.nodeName==="parsererror")throw new Error(r.documentElement.textContent);return{doc:r,raw:n}}function pE(t){return t.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")}function m1(t){for(let e=0;e<t.childNodes.length;e++){if(t.childNodes[e].tagName==="x:xmpmeta")return m1(t.childNodes[e]);if(t.childNodes[e].tagName==="rdf:RDF")return t.childNodes[e]}throw new Error}function _1(t,e=!1){const n=gE(t);return yE(n)?e?{}:bE(n[0]):wE(n)}function gE(t){const e=[];for(let n=0;n<t.childNodes.length;n++)e.push(t.childNodes[n]);return e}function yE(t){return t.length===1&&t[0].nodeName==="#text"}function bE(t){return t.nodeValue}function wE(t){const e={};return t.forEach(n=>{if(kE(n)){const r=xE(n);e[n.nodeName]!==void 0?(Array.isArray(e[n.nodeName])||(e[n.nodeName]=[e[n.nodeName]]),e[n.nodeName].push(r)):e[n.nodeName]=r}}),e}function kE(t){return t.nodeName&&t.nodeName!=="#text"}function xE(t){return{attributes:SE(t),value:_1(t)}}function SE(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].nodeName]=decodeURIComponent(escape(t.attributes[n].value));return e}function h1(t){const e={};if(typeof t=="string")return t;for(const n in t){let r=t[n];Array.isArray(r)||(r=[r]),r.forEach(o=>{z(e,Ca(o.attributes)),typeof o.value=="object"&&z(e,p1(o.value))})}return e}function Ca(t){const e={};for(const n in t)try{CE(n)&&(e[Hi(n)]={value:t[n],attributes:{},description:Dt(t[n],n)})}catch{}return e}function CE(t){return t!=="rdf:parseType"&&!qi(t)}function qi(t){return t.split(":")[0]==="xmlns"}function Hi(t){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(t)?"RatingPercent":t.split(":")[1]}function Dt(t,e=void 0){if(Array.isArray(t)){const n=EE(t);return e&&typeof Ui[e]=="function"?Ui[e](t,n):n}if(typeof t=="object")return TE(t);try{return e&&typeof Ui[e]=="function"?Ui[e](t):decodeURIComponent(escape(t))}catch{return t}}function EE(t){return t.map(e=>e.value!==void 0?Dt(e.value):Dt(e)).join(", ")}function TE(t){const e=[];for(const n in t)e.push(`${BE(n)}: ${Dt(t[n].value)}`);return e.join("; ")}function BE(t){return t==="CiAdrCity"?"CreatorCity":t==="CiAdrCtry"?"CreatorCountry":t==="CiAdrExtadr"?"CreatorAddress":t==="CiAdrPcode"?"CreatorPostalCode":t==="CiAdrRegion"?"CreatorRegion":t==="CiEmailWork"?"CreatorWorkEmail":t==="CiTelWork"?"CreatorWorkPhone":t==="CiUrlWork"?"CreatorWorkUrl":t}function p1(t){const e={};for(const n in t)try{qi(n)||(e[Hi(n)]=NE(t[n],n))}catch{}return e}function NE(t,e){return $E(t)?FE(t,e):IE(t)?{value:"",attributes:{},description:""}:g1(t)?y1(t,e):b1(t)?w1(t,e):k1(t)?x1(t,e):DE(t)?ME(t,e):Ea(t,e)}function IE(t){return t.attributes["rdf:parseType"]==="Resource"&&typeof t.value=="string"&&t.value.trim()===""}function $E(t){return Array.isArray(t)}function FE(t,e){return Ea(t[t.length-1],e)}function g1(t){return t.attributes["rdf:parseType"]==="Resource"&&t.value["rdf:value"]!==void 0||t.value["rdf:Description"]!==void 0&&t.value["rdf:Description"].value["rdf:value"]!==void 0}function y1(t,e){const n=bo(t);t.value["rdf:Description"]!==void 0&&(t=t.value["rdf:Description"]),z(n,bo(t),AE(t));const r=OE(t);return{value:r,attributes:n,description:Dt(r,e)}}function bo(t){const e={};for(const n in t.attributes)n!=="rdf:parseType"&&n!=="rdf:resource"&&!qi(n)&&(e[Hi(n)]=t.attributes[n]);return e}function AE(t){const e={};for(const n in t.value)n!=="rdf:value"&&!qi(n)&&(e[Hi(n)]=t.value[n].value);return e}function OE(t){return C1(t.value["rdf:value"])||t.value["rdf:value"].value}function b1(t){return t.attributes["rdf:parseType"]==="Resource"||t.value["rdf:Description"]!==void 0&&t.value["rdf:Description"].value["rdf:value"]===void 0}function w1(t,e){const n={value:{},attributes:{}};return t.value["rdf:Description"]!==void 0&&(z(n.value,Ca(t.value["rdf:Description"].attributes)),z(n.attributes,bo(t)),t=t.value["rdf:Description"]),z(n.value,p1(t.value)),n.description=Dt(n.value,e),n}function k1(t){return Object.keys(t.value).length===0&&t.attributes["xml:lang"]===void 0&&t.attributes["rdf:resource"]===void 0}function x1(t,e){const n=Ca(t.attributes);return{value:n,attributes:{},description:Dt(n,e)}}function DE(t){return S1(t.value)!==void 0}function S1(t){return t["rdf:Bag"]||t["rdf:Seq"]||t["rdf:Alt"]}function ME(t,e){let n=S1(t.value).value["rdf:li"];const r=bo(t),o=[];return n===void 0?n=[]:Array.isArray(n)||(n=[n]),n.forEach(s=>{o.push(PE(s))}),{value:o,attributes:r,description:Dt(o,e)}}function PE(t){return g1(t)?y1(t):b1(t)?w1(t).value:k1(t)?x1(t).value:Ea(t)}function Ea(t,e){const n=C1(t)||h1(t.value);return{value:n,attributes:bo(t),description:Dt(n,e)}}function C1(t){return t.attributes&&t.attributes["rdf:resource"]}const Mt={CLOSED_SUBPATH_LENGTH:0,CLOSED_SUBPATH_BEZIER_LINKED:1,CLOSED_SUBPATH_BEZIER_UNLINKED:2,OPEN_SUBPATH_LENGTH:3,OPEN_SUBPATH_BEZIER_LINKED:4,OPEN_SUBPATH_BEZIER_UNLINKED:5,FILL_RULE:6,CLIPBOARD:7,INITIAL_FILL_RULE:8},E1=24,Ta={2e3:{name:"PathInformation",description:vE},2999:{name:"ClippingPathName",description(t){const[,e]=s_(t,0);return e}}};function vE(t){const n={},r=[];for(let o=0;o<t.byteLength;o+=2+E1){const s=F.getShortAt(t,o);Ba[s]&&(n[s]||(n[s]=Ba[s].description),r.push({type:s,path:Ba[s].path(t,o+2)}))}return JSON.stringify({types:n,paths:r})}const Ba={[Mt.CLOSED_SUBPATH_LENGTH]:{description:"Closed subpath length",path:(t,e)=>[F.getShortAt(t,e)]},[Mt.CLOSED_SUBPATH_BEZIER_LINKED]:{description:"Closed subpath Bezier knot, linked",path:Gi},[Mt.CLOSED_SUBPATH_BEZIER_UNLINKED]:{description:"Closed subpath Bezier knot, unlinked",path:Gi},[Mt.OPEN_SUBPATH_LENGTH]:{description:"Open subpath length",path:(t,e)=>[F.getShortAt(t,e)]},[Mt.OPEN_SUBPATH_BEZIER_LINKED]:{description:"Open subpath Bezier knot, linked",path:Gi},[Mt.OPEN_SUBPATH_BEZIER_UNLINKED]:{description:"Open subpath Bezier knot, unlinked",path:Gi},[Mt.FILL_RULE]:{description:"Path fill rule",path:()=>[]},[Mt.INITIAL_FILL_RULE]:{description:"Initial fill rule",path:(t,e)=>[F.getShortAt(t,e)]},[Mt.CLIPBOARD]:{description:"Clipboard",path:VE}};function Gi(t,e){const r=[];for(let o=0;o<E1;o+=8)r.push(LE(t,e+o));return r}function LE(t,e){const n=Dn(t,e,8);return[Dn(t,e+4,8),n]}function VE(t,e){return[[Dn(t,e,8),Dn(t,e+4,8),Dn(t,e+8,8),Dn(t,e+12,8)],Dn(t,e+16,8)]}function Dn(t,e,n){const r=F.getLongAt(t,e),o=r>>>31?-1:1,s=(r&2130706432)>>>32-n,l=r&parseInt(c_("1",32-n),2);return o*WS(s.toString(2)+"."+ZS(l.toString(2),32-n,"0"),2)}const RE={read:qE},T1="8BIM",UE=2,zE=4,B1=T1.length;function qE(t,e){const n=i_(new Uint8Array(t).buffer),r={};let o=0;for(;o<t.length;){const s=R(n,o,B1);o+=B1;const l=F.getShortAt(n,o);o+=UE;const{tagName:a,tagNameSize:c}=HE(n,o);o+=c;const u=F.getLongAt(n,o);if(o+=zE,s===T1){const d=i_(n.buffer,o,u),f={id:l,value:R(d,0,u)};if(Ta[l]){try{f.description=Ta[l].description(d)}catch{f.description="<no description formatter>"}r[a||Ta[l].name]=f}else e&&(r[`undefined-${l}`]=f)}o+=u+u%2}return r}function HE(t,e){const[n,r]=s_(t,e);return{tagName:r,tagNameSize:1+n+(n%2===0?1:0)}}const N1={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},I1={4:{name:"Preferred CMM type",value:(t,e)=>R(t,e,4),description:t=>t!==null?Na(t):""},8:{name:"Profile Version",value:(t,e)=>t.getUint8(e).toString(10)+"."+(t.getUint8(e+1)>>4).toString(10)+"."+(t.getUint8(e+1)%16).toString(10)},12:{name:"Profile/Device class",value:(t,e)=>R(t,e,4),description:t=>{switch(t.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return t}}},16:{name:"Color Space",value:(t,e)=>R(t,e,4)},20:{name:"Connection Space",value:(t,e)=>R(t,e,4)},24:{name:"ICC Profile Date",value:(t,e)=>GE(t,e).toISOString()},36:{name:"ICC Signature",value:(t,e)=>ZE(t.buffer.slice(e,e+4))},40:{name:"Primary Platform",value:(t,e)=>R(t,e,4),description:t=>Na(t)},48:{name:"Device Manufacturer",value:(t,e)=>R(t,e,4),description:t=>Na(t)},52:{name:"Device Model Number",value:(t,e)=>R(t,e,4)},64:{name:"Rendering Intent",value:(t,e)=>t.getUint32(e),description:t=>{switch(t){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return t}}},80:{name:"Profile Creator",value:(t,e)=>R(t,e,4)}};function GE(t,e){const n=t.getUint16(e),r=t.getUint16(e+2)-1,o=t.getUint16(e+4),s=t.getUint16(e+6),l=t.getUint16(e+8),a=t.getUint16(e+10);return new Date(Date.UTC(n,r,o,s,l,a))}function ZE(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function Na(t){switch(t.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return t}}const $1={read:tT},WE=84,jE=128,YE="acsp",KE="desc",QE="mluc",XE="text",JE="sig ",eT=12;function tT(t,e,n){return n&&e[0].compressionMethod!==Ai?nT(t,e):oT(t,e)}function nT(t,e){if(!rT(e[0].compressionMethod))return{};const n=new DataView(t.buffer.slice(e[0].offset,e[0].offset+e[0].length));return d_(n,e[0].compressionMethod,"utf-8","dataview").then(F1).catch(()=>({}))}function rT(t){return t===u_}function oT(t,e){try{const n=e.reduce((l,a)=>l+a.length,0),r=new Uint8Array(n);let o=0;const s=iT(t);for(let l=1;l<=e.length;l++){const a=e.find(d=>d.chunkNumber===l);if(!a)throw new Error(`ICC chunk ${l} not found`);const c=s.slice(a.offset,a.offset+a.length),u=new Uint8Array(c);r.set(u,o),o+=u.length}return F1(new DataView(r.buffer))}catch{return{}}}function iT(t){return Array.isArray(t)?new DataView(Uint8Array.from(t).buffer).buffer:t.buffer}function sT(t){return t.length<jE+4}function lT(t,e){return t.length<e+eT}function F1(t){const e=t.buffer,n=t.getUint32();if(t.byteLength!==n)throw new Error("ICC profile length not matching");if(t.length<WE)throw new Error("ICC profile too short");const r={},o=Object.keys(I1);for(let c=0;c<o.length;c++){const u=o[c],d=I1[u],f=d.value(t,parseInt(u,10));let m=f;d.description&&(m=d.description(f)),r[d.name]={value:f,description:m}}if(Zi(e.slice(36,40))!==YE)throw new Error("ICC profile: missing signature");if(sT(e))return r;const l=t.getUint32(128);let a=132;for(let c=0;c<l;c++){if(lT(e,a))return r;const u=R(t,a,4),d=t.getUint32(a+4),f=t.getUint32(a+8);if(d>e.length)return r;const m=R(t,d,4);if(m===KE){const _=t.getUint32(d+8);if(_>f)return r;const p=Zi(e.slice(d+12,d+_+11));wo(r,u,p)}else if(m===QE){const _=t.getUint32(d+8),p=t.getUint32(d+12);let h=d+16;const g=[];for(let w=0;w<_;w++){const x=R(t,h+0,2),C=R(t,h+2,2),T=t.getUint32(h+4),k=t.getUint32(h+8),y=HS(t,d+k,T);g.push({languageCode:x,countryCode:C,text:y}),h+=p}if(_===1)wo(r,u,g[0].text);else{const w={};for(let x=0;x<g.length;x++)w[`${g[x].languageCode}-${g[x].countryCode}`]=g[x].text;wo(r,u,w)}}else if(m===XE){const _=Zi(e.slice(d+8,d+f-7));wo(r,u,_)}else if(m===JE){const _=Zi(e.slice(d+8,d+12));wo(r,u,_)}a=a+12}return r}function Zi(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function wo(t,e,n){N1[e]?t[N1[e].name]={value:n,description:n}:t[e]={value:n,description:n}}const Wi=27,aT={read:cT,SHOT_INFO_AUTO_ROTATE:Wi};function cT(t,e,n,r,o){let s=On(t,Y_,e,e+n,r,o);return s.ShotInfo&&(s=z({},s,uT(s.ShotInfo.value)),delete s.ShotInfo),s}function uT(t){const e={};return t[Wi]!==void 0&&(e.AutoRotate={value:t[Wi],description:dT(t[Wi])}),e}function dT(t){return t===0?"None":t===1?"Rotate 90 CW":t===2?"Rotate 180":t===3?"Rotate 270 CW":"Unknown"}const fT={read:mT};function mT(t,e){return{"Image Width":_T(t,e),"Image Height":hT(t,e),"Bit Depth":pT(t,e),"Color Type":gT(t,e),Compression:yT(t,e),Filter:bT(t,e),Interlace:wT(t,e)}}function _T(t,e){if(e+0+4>t.byteLength)return;const o=F.getLongAt(t,e);return{value:o,description:`${o}px`}}function hT(t,e){if(e+4+4>t.byteLength)return;const o=F.getLongAt(t,e+4);return{value:o,description:`${o}px`}}function pT(t,e){if(e+8+1>t.byteLength)return;const o=F.getByteAt(t,e+8);return{value:o,description:`${o}`}}function gT(t,e){const o={0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"};if(e+9+1>t.byteLength)return;const s=F.getByteAt(t,e+9);return{value:s,description:o[s]||"Unknown"}}function yT(t,e){if(e+10+1>t.byteLength)return;const o=F.getByteAt(t,e+10);return{value:o,description:o===0?"Deflate/Inflate":"Unknown"}}function bT(t,e){if(e+11+1>t.byteLength)return;const o=F.getByteAt(t,e+11);return{value:o,description:o===0?"Adaptive":"Unknown"}}function wT(t,e){const o={0:"Noninterlaced",1:"Adam7 Interlace"};if(e+12+1>t.byteLength)return;const s=F.getByteAt(t,e+12);return{value:s,description:o[s]||"Unknown"}}const kT={read:TT},Ia="STATE_KEYWORD",$a="STATE_COMPRESSION",Fa="STATE_LANG",xT="STATE_TRANSLATED_KEYWORD",Aa="STATE_TEXT",ST=1,CT=1,ET=6;function TT(t,e,n,r){const o={},s=[];for(let l=0;l<e.length;l++){const{offset:a,length:c,type:u}=e[l],d=BT(t,a,c,u,n);if(d instanceof Promise)s.push(d.then(({name:f,value:m,description:_})=>{try{if(f_.USE_EXIF&&O1(f,m))return{__exif:o1.read(M1(m),ET,r).tags};if(f_.USE_IPTC&&D1(f,m))return{__iptc:xa.read(M1(m),0,r)};if(f&&!O1(f,m)&&!D1(f,m))return{[f]:{value:m,description:_}}}catch{}return{}}));else{const{name:f,value:m,description:_}=d;f&&(o[f]={value:m,description:_})}}return{readTags:o,readTagsPromise:s.length>0?Promise.all(s):void 0}}function BT(t,e,n,r,o){const s=[],l=[];let a,c=Ia,u=Ai;for(let f=0;f<n&&e+f<t.byteLength;f++){if(c===$a){u=NT({type:r,dataView:t,offset:e+f}),r===An&&(f+=ST),c=A1(r,c);continue}else if(c===Aa){a=new DataView(t.buffer.slice(e+f,e+n));break}const m=t.getUint8(e+f);m===0?c=A1(r,c):c===Ia?s.push(m):c===Fa&&l.push(m)}if(u!==Ai&&!o)return{};const d=d_(a,u,IT(r));return d instanceof Promise?d.then(f=>Oa(f,r,l,s)).catch(()=>Oa("<text using unknown compression>".split(""),r,l,s)):Oa(d,r,l,s)}function NT({type:t,dataView:e,offset:n}){if(t===An){if(e.getUint8(n)===CT)return e.getUint8(n+1)}else if(t===Mi)return e.getUint8(n);return Ai}function A1(t,e){return e===Ia&&[An,Mi].includes(t)?$a:e===$a?t===An?Fa:Aa:e===Fa?xT:Aa}function IT(t){return t===_a||t===Mi?"latin1":"utf-8"}function Oa(t,e,n,r){const o=FT(t);return{name:$T(e,n,r),value:o,description:e===An?AT(t):o}}function $T(t,e,n){const r=xr(n);if(t===_a||e.length===0)return r;const o=xr(e);return`${r} (${o})`}function FT(t){return t instanceof DataView?R(t,0,t.byteLength):t}function AT(t){return s1.decode("UTF-8",t)}function O1(t,e){return t.toLowerCase()==="raw profile type exif"&&e.substring(1,5)==="exif"}function D1(t,e){return t.toLowerCase()==="raw profile type iptc"&&e.substring(1,5)==="iptc"}function M1(t){const e=t.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/);return OT(e[2].replace(/\n/g,""))}function OT(t){const e=new DataView(new ArrayBuffer(t.length/2));for(let n=0;n<t.length;n+=2)e.setUint8(n/2,parseInt(t.substring(n,n+2),16));return e}const DT={read:MT};function MT(t,e){const n={};for(let r=0;r<e.length;r++){const o=F.getLongAt(t,e[r]+Sr),s=R(t,e[r]+tn,ct);s===F_?(n["Pixels Per Unit X"]=PT(t,e[r],o),n["Pixels Per Unit Y"]=vT(t,e[r],o),n["Pixel Units"]=LT(t,e[r],o)):s===A_&&(n["Modify Date"]=VT(t,e[r],o))}return n}function PT(t,e,n){if(!ji(t,e,n,0,4))return;const s=F.getLongAt(t,e+be+0);return{value:s,description:""+s}}function vT(t,e,n){if(!ji(t,e,n,4,4))return;const s=F.getLongAt(t,e+be+4);return{value:s,description:""+s}}function LT(t,e,n){if(!ji(t,e,n,8,1))return;const s=F.getByteAt(t,e+be+8);return{value:s,description:s===1?"meters":"Unknown"}}function VT(t,e,n){if(!ji(t,e,n,0,7))return;const o=F.getShortAt(t,e+be),s=F.getByteAt(t,e+be+2),l=F.getByteAt(t,e+be+3),a=F.getByteAt(t,e+be+4),c=F.getByteAt(t,e+be+5),u=F.getByteAt(t,e+be+6);return{value:[o,s,l,a,c,u],description:`${Tr(o,4)}-${Tr(s,2)}-${Tr(l,2)} ${Tr(a,2)}:${Tr(c,2)}:${Tr(u,2)}`}}function ji(t,e,n,r,o){return r+o<=n&&e+be+r+o<=t.byteLength}function Tr(t,e){return`${"0".repeat(e-(""+t).length)}${t}`}const RT={read:qT},UT=4,zT=7;function qT(t,e){const n={},r=F.getByteAt(t,e);return n.Alpha=HT(r),n.Animation=GT(r),n.ImageWidth=P1(t,e+UT),n.ImageHeight=P1(t,e+zT),n}function HT(t){const e=t&16;return{value:e?1:0,description:e?"Yes":"No"}}function GT(t){const e=t&2;return{value:e?1:0,description:e?"Yes":"No"}}function P1(t,e){const n=F.getByteAt(t,e)+256*F.getByteAt(t,e+1)+65536*F.getByteAt(t,e+2)+1;return{value:n,description:n+"px"}}const ZT={read:WT};function WT(t){return{"GIF Version":jT(t),"Image Width":YT(t),"Image Height":KT(t),"Global Color Map":QT(t),"Bits Per Pixel":JT(t),"Color Resolution Depth":XT(t)}}function jT(t){if(6>t.byteLength)return;const r=R(t,3,3);return{value:r,description:r}}function YT(t){if(8>t.byteLength)return;const r=t.getUint16(6,!0);return{value:r,description:`${r}px`}}function KT(t){if(10>t.byteLength)return;const r=t.getUint16(8,!0);return{value:r,description:`${r}px`}}function QT(t){if(11>t.byteLength)return;const o=(t.getUint8(10)&128)>>>7;return{value:o,description:o===1?"Yes":"No"}}function XT(t){if(11>t.byteLength)return;const o=((t.getUint8(10)&112)>>>4)+1;return{value:o,description:`${o} ${o===1?"bit":"bits"}`}}function JT(t){if(11>t.byteLength)return;const o=(t.getUint8(10)&7)+1;return{value:o,description:`${o} ${o===1?"bit":"bits"}`}}const e6=[6,7,99],t6={get:n6};function n6(t,e,n){if(r6(e)){e.type="image/jpeg";const r=n+e.JPEGInterchangeFormat.value;e.image=t.buffer.slice(r,r+e.JPEGInterchangeFormatLength.value),l_(e,"base64",function(){return a_(this.image)})}return e}function r6(t){return t&&(t.Compression===void 0||e6.includes(t.Compression.value))&&t.JPEGInterchangeFormat&&t.JPEGInterchangeFormat.value&&t.JPEGInterchangeFormatLength&&t.JPEGInterchangeFormatLength.value}function v1(t){this.name="MetadataMissingError",this.message=t||"No Exif data",this.stack=new Error().stack}v1.prototype=new Error;const L1={MetadataMissingError:v1},o6={load:i6,loadView:V1,errors:L1};function i6(t,e={}){return s6(t)?(e.async=!0,l6(t,e).then(n=>Da(n,e))):_6(t)?(e.async=!0,h6(t).then(n=>Da(n,e))):Da(t,e)}function s6(t){return typeof t=="string"}function l6(t,e){return/^\w+:\/\//.test(t)?typeof fetch<"u"?a6(t,e):c6(t,e):d6(t)?Promise.resolve(GS(t)):f6(t,e)}function a6(t,{length:e}={}){const n={method:"GET"};return Number.isInteger(e)&&e>=0&&(n.headers={range:`bytes=0-${e-1}`}),fetch(t,n).then(r=>r.arrayBuffer())}function c6(t,{length:e}={}){return new Promise((n,r)=>{const o={};Number.isInteger(e)&&e>=0&&(o.headers={range:`bytes=0-${e-1}`}),u6(t)(t,o,l=>{if(l.statusCode>=200&&l.statusCode<=299){const a=[];l.on("data",c=>a.push(Buffer.from(c))),l.on("error",c=>r(c)),l.on("end",()=>n(Buffer.concat(a)))}else r(`Could not fetch file: ${l.statusCode} ${l.statusMessage}`),l.resume()}).on("error",l=>r(l))})}function u6(t){return/^https:\/\//.test(t)?__non_webpack_require__("https").get:__non_webpack_require__("http").get}function d6(t){return/^data:[^;,]*(;base64)?,/.test(t)}function f6(t,{length:e}={}){return new Promise((n,r)=>{const o=m6();o.open(t,(s,l)=>{s?r(s):o.stat(t,(a,c)=>{if(a)r(a);else{const u=Math.min(c.size,e!==void 0?e:c.size),d=Buffer.alloc(u),f={buffer:d,length:u};o.read(l,f,m=>{m?r(m):o.close(l,_=>{_&&console.warn(`Could not close file ${t}:`,_),n(d)})})}})})})}function m6(){try{return __non_webpack_require__("fs")}catch{return}}function _6(t){return typeof File<"u"&&t instanceof File}function h6(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=o=>e(o.target.result),r.onerror=()=>n(r.error),r.readAsArrayBuffer(t)})}function Da(t,e){return p6(t)&&(t=new Uint8Array(t).buffer),V1(g6(t),e)}function p6(t){try{return Buffer.isBuffer(t)}catch{return!1}}function g6(t){try{return new DataView(t)}catch{return new o_(t)}}function V1(t,{expanded:e=!1,async:n=!1,includeUnknown:r=!1}={expanded:!1,async:!1,includeUnknown:!1}){let o=!1,s={};const l=[],{fileType:a,fileDataOffset:c,jfifDataOffset:u,tiffHeaderOffset:d,iptcDataOffset:f,xmpChunks:m,iccChunks:_,mpfDataOffset:p,pngHeaderOffset:h,pngTextChunks:g,pngChunkOffsets:w,vp8xChunkOffset:x,gifHeaderOffset:C}=v4.parseAppMarkers(t,n);if(y6(c)){o=!0;const b=yC.read(t,c);e?s.file=b:s=z({},s,b)}if(b6(u)){o=!0;const b=NC.read(t,u);e?s.jfif=b:s=z({},s,b)}if(w6(d)){o=!0;const{tags:b,byteOrder:E}=o1.read(t,d,r);if(b.Thumbnail&&(s.Thumbnail=b.Thumbnail,delete b.Thumbnail),e?(s.exif=b,k6(s)):s=z({},s,b),b["IPTC-NAA"]&&!R1(f)){const B=xa.read(b["IPTC-NAA"].value,0,r);e?s.iptc=B:s=z({},s,B)}if(b.ApplicationNotes&&!U1(m)){const B=f1.read(xr(b.ApplicationNotes.value));e?s.xmp=B:(delete B._raw,s=z({},s,B))}if(b.ImageSourceData){const B=RE.read(b.PhotoshopSettings.value,r);e?s.photoshop=B:s=z({},s,B)}if(b.ICC_Profile&&!z1(_)){const B=$1.read(b.ICC_Profile.value,[{offset:0,length:b.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);e?s.icc=B:s=z({},s,B)}if(x6(b)){const B=aT.read(t,d,b.MakerNote.__offset,E,r);e?s.makerNotes=B:s=z({},s,B)}b.MakerNote&&delete b.MakerNote.__offset}if(R1(f)){o=!0;const b=xa.read(t,f,r);e?s.iptc=b:s=z({},s,b)}if(U1(m)){o=!0;const b=f1.read(t,m);e?s.xmp=b:(delete b._raw,s=z({},s,b))}if(z1(_)){o=!0;const b=$1.read(t,_,n);b instanceof Promise?l.push(b.then(k)):k(b)}if(S6(p)){o=!0;const b=uC.read(t,p,r);e?s.mpf=b:s=z({},s,b)}if(C6(h)){o=!0;const b=fT.read(t,h);e?(s.png=s.png?z({},s.png,b):b,s.pngFile=b):s=z({},s,b)}if(E6(g)){o=!0;const{readTags:b,readTagsPromise:E}=kT.read(t,g,n,r);y(b),E&&l.push(E.then(B=>B.forEach(y)))}if(T6(w)){o=!0;const b=DT.read(t,w);e?s.png=s.png?z({},s.png,b):b:s=z({},s,b)}if(B6(x)){o=!0;const b=RT.read(t,x);e?s.riff=s.riff?z({},s.riff,b):b:s=z({},s,b)}if(N6(C)){o=!0;const b=ZT.read(t,C);e?s.gif=s.gif?z({},s.gif,b):b:s=z({},s,b)}const T=t6.get(t,s.Thumbnail,d);if(T?(o=!0,s.Thumbnail=T):delete s.Thumbnail,a&&(e?(s.file||(s.file={}),s.file.FileType=a):s.FileType=a,o=!0),!o)throw new L1.MetadataMissingError;if(n)return Promise.all(l).then(()=>s);return s;function k(b){e?s.icc=b:s=z({},s,b)}function y(b){if(e){for(const E of["exif","iptc"]){const B=`__${E}`;b[B]&&(s[E]=s[E]?z({},s.exif,b[B]):b[B],delete b[B])}s.png=s.png?z({},s.png,b):b,s.pngText=s.pngText?z({},s.png,b):b}else s=z({},s,b.__exif?b.__exif:{},b.__iptc?b.__iptc:{},b),delete s.__exif,delete s.__iptc}}function y6(t){return t!==void 0}function b6(t){return t!==void 0}function w6(t){return t!==void 0}function k6(t){if(t.exif){if(t.exif.GPSLatitude&&t.exif.GPSLatitudeRef)try{t.gps=t.gps||{},t.gps.Latitude=Oi(t.exif.GPSLatitude.value),t.exif.GPSLatitudeRef.value.join("")==="S"&&(t.gps.Latitude=-t.gps.Latitude)}catch{}if(t.exif.GPSLongitude&&t.exif.GPSLongitudeRef)try{t.gps=t.gps||{},t.gps.Longitude=Oi(t.exif.GPSLongitude.value),t.exif.GPSLongitudeRef.value.join("")==="W"&&(t.gps.Longitude=-t.gps.Longitude)}catch{}if(t.exif.GPSAltitude&&t.exif.GPSAltitudeRef)try{t.gps=t.gps||{},t.gps.Altitude=t.exif.GPSAltitude.value[0]/t.exif.GPSAltitude.value[1],t.exif.GPSAltitudeRef.value===1&&(t.gps.Altitude=-t.gps.Altitude)}catch{}}}function R1(t){return t!==void 0}function U1(t){return Array.isArray(t)&&t.length>0}function z1(t){return Array.isArray(t)&&t.length>0}function x6(t){return t.Make&&t.Make.value&&Array.isArray(t.Make.value)&&t.Make.value[0]==="Canon"&&t.MakerNote&&t.MakerNote.__offset}function S6(t){return t!==void 0}function C6(t){return t!==void 0}function E6(t){return t!==void 0}function T6(t){return t!==void 0}function B6(t){return t!==void 0}function N6(t){return t!==void 0}async function q1(t,e=null){if(t.location)return t.location;try{const n=await o6.load(t.blobUrl||t.url||"",{expanded:!0});if(n.gps)return{latitude:n.gps.Latitude,longitude:n.gps.Longitude}}catch(n){console.error("Failed to load EXIF data from file:",n)}try{const{waitForLocation:n,location:r}=Cd();if(e&&setTimeout(()=>{!r.value&&e&&Ve.warning(e)},1e3),window.location.protocol==="https:")await n();else if(window.location.href.match("localhost"))return{latitude:37.7749,longitude:-122.4194,accuracy:1,altitude:0,altitudeAccuracy:0};return r.value?{latitude:r.value.latitude,longitude:r.value.longitude,accuracy:r.value.accuracy,altitude:r.value.altitude,altitudeAccuracy:r.value.altitudeAccuracy}:null}catch(n){return console.error(n),null}}class ko{constructor(e,n){if(this.files=[],this.fileUploads=[],this.onErrorCb=null,this.onProgressCb=null,this.onCompleteCb=null,this.onAllCompleteCb=null,this.files=!Array.isArray(e)&&!(e instanceof FileList)?[e]:e,this.fileUploads=[],this.onErrorCb=null,this.onProgressCb=null,this.onCompleteCb=null,this.onAllCompleteCb=null,this.options={createPresignedUpload:null,completePresignedUpload:null,refreshFile:null,...ne.value.fileUpload,...n},!this.options.createPresignedUpload||!this.options.completePresignedUpload)throw new Error("Please configure danxOptions.fileUpload: import { configure } from 'quasar-ui-danx';")}prepare(){for(const e of this.files){if(!(e instanceof File))throw Error("FileUpload constructor requires a File object or a list of File objects");e.id=he.uid(),e.blobUrl=URL.createObjectURL(e);const n=new FormData;n.append("file",e),this.fileUploads.push({file:e,xhr:null,formData:n,isComplete:!1})}return this}onAllComplete(e){return this.onAllCompleteCb=e,this}onComplete(e){return this.onCompleteCb=e,this}onProgress(e){return this.onProgressCb=e,this}onError(e){return this.onErrorCb=e,this}errorHandler(e,n,r=null){this.onErrorCb&&this.onErrorCb({e,file:n,error:r})}async resolveLocation(e=null){for(const n of this.fileUploads)n.file.location=await q1(n.file,e),n.formData.append("meta",JSON.stringify(n.file.location));return this}fireProgressCallback(e,n){e.file.progress=n,this.onProgressCb&&this.onProgressCb({file:this.wrapFile(e.file),progress:n})}fireCompleteCallback(e,n){e.isComplete=!0,e.file.progress=1,this.onCompleteCb&&this.onCompleteCb({file:this.wrapFile(e.file),uploadedFile:n})}checkAllComplete(){this.onAllCompleteCb&&this.fileUploads.every(e=>e.isComplete)&&this.onAllCompleteCb({files:this.fileUploads})}wrapFile(e){return{id:e.id,name:e.name,size:e.size,type:e.type,progress:e.progress,location:e.location,blobUrl:e.blobUrl,url:"",__type:"BrowserFile"}}setXhrCallbacks(){var e,n,r;for(const o of this.fileUploads)(e=o.xhr)==null||e.addEventListener("error",s=>this.errorHandler(s,o.file),!1);if(this.onProgressCb)for(const o of this.fileUploads)(n=o.xhr)==null||n.upload.addEventListener("progress",s=>{const l=Math.min(.95,s.loaded/s.total);this.fireProgressCallback(o,l)},!1);for(const o of this.fileUploads)(r=o.xhr)==null||r.addEventListener("load",async s=>{try{let l=await this.completePresignedUpload(o);l=oe(l),this.fireCompleteCallback(o,l),this.checkAllComplete(),await this.waitForTranscode(l)}catch(l){this.errorHandler(s,o.file,l)}},!1)}async completePresignedUpload(e){if(this.fireProgressCallback(e,.95),!e.file.resource_id)throw new Error("File resource ID is required to complete presigned upload");if(!this.options.completePresignedUpload)throw new Error("Please configure danxOptions.fileUpload.completePresignedUpload");return await this.options.completePresignedUpload(e.file.resource_id,e)}async refreshFile(e){if(!this.options.refreshFile)return null;const n=await this.options.refreshFile(e.id);return n&&oe(n)}isTranscoding(e){var r;const n=((r=e==null?void 0:e.meta)==null?void 0:r.transcodes)||[];for(const o of Object.keys(n)){const s=n[o];if(s.status==="Pending"||s.status==="In Progress"){const l=St(s.started_at),a=l&&D.now().diff(l,"minutes");if(!(a!=null&&a.minutes)||a.minutes<30)return!0}}return!1}async waitForTranscode(e){if(!e.meta||e.meta.is_waiting_transcode)return;e.meta.is_waiting_transcode=!0;let n=e;for(;n&&this.isTranscoding(n);)await Gr(1e3),n=await this.refreshFile(n)}async upload(){var e;for(const n of this.fileUploads){const r=n.file.mimeType||n.file.type;if(!this.options.createPresignedUpload)throw new Error("Please configure danxOptions.fileUpload.createPresignedUpload");const o=await this.options.createPresignedUpload(this.options.directory||"",n.file.name,r);if(!o.url){Ve.error("Could not fetch presigned upload URL for file "+n.file.name);continue}const s=!o.url.match("upload-presigned-url-contents");n.file.resource_id=o.id;const l=new XMLHttpRequest;s?(l.open("PUT",o.url),l.setRequestHeader("Content-Type",r),n.body=n.file):(l.open("POST",o.url),n.body=n.formData),n.xhr=l}this.setXhrCallbacks();for(const n of this.fileUploads)(e=n.xhr)==null||e.send(n.body)}}const Yi=i.ref([]),Ki=i.ref([]);function I6(t){Yi.value=[...Yi.value,t]}function $6(t,e,n){Ki.value.push({id:n,name:t,callback:e})}function F6(t){Ki.value=Ki.value.filter(e=>e.id!==t)}function H1(t,e,n){for(let r of Yi.value)if(r.type===t&&r.key===e&&n.ctrlKey===!!r.ctrl&&n.altKey===!!r.alt&&n.shiftKey===!!r.shift)for(let o of Ki.value)o.name===r.name&&o.callback(n)}function G1(t){return t.key?(""+t.key).toLowerCase():t.keyCode}function A6(t){Yi.value=t,window.addEventListener("keydown",e=>{H1("keydown",G1(e),e)}),window.addEventListener("keyup",e=>{H1("keyup",G1(e),e)})}function O6(t){return new Promise((e,n)=>{const r=new FileReader;let o=null;r.onload=async s=>{var l;try{o=JSON.parse((l=s.target)==null?void 0:l.result),e(o)}catch(a){console.error("Invalid JSON file:",a),n(a)}},r.readAsText(t)})}function Z1(t){const e=i.ref([]),n=i.ref(null),r=i.ref(null),o=f=>{e.value=[...e.value,...f.target.files],new ko(f.target.files,t).prepare().onProgress(({file:m})=>{m&&s(m)}).onComplete(({file:m,uploadedFile:_})=>{m&&s(m,_)}).onError(({file:m,error:_})=>{console.error("Failed to upload",m,_),Ve.error(`Failed to upload ${m.name}: ${_}`)}).onAllComplete(()=>{n.value&&n.value({file:e.value[0],uploadedFile:e.value[0]}),r.value&&r.value(e.value)}).upload()};function s(f,m=null){const _=e.value.findIndex(p=>p.id===f.id);_!==-1&&e.value.splice(_,1,m||f),r.value&&r.value(e.value)}return{clearUploadedFiles:()=>{e.value=[],r.value&&r.value(e.value),n.value&&n.value({file:null,uploadedFile:null})},onRemove:f=>{const m=e.value.findIndex(_=>_.id===f.id);m!==-1&&e.value.splice(m,1),r.value&&r.value(e.value),n.value&&n.value({file:f,uploadedFile:f})},onComplete:f=>{n.value=f},onFilesChange:f=>{r.value=f},onDrop:f=>{var m;o({target:{files:(m=f.dataTransfer)==null?void 0:m.files}})},onFilesSelected:o,uploadedFiles:e}}const we={activeRequests:{},url(t){var e;return t.startsWith("http")?t:(((e=ne.value.request)==null?void 0:e.baseUrl)||"").replace(/\/$/,"")+"/"+t},async call(t,e){var p,h;e=e||{};const n=(e==null?void 0:e.requestKey)||t+JSON.stringify(e.params||""),r=!!(e!=null&&e.waitOnPrevious),o=!!(e!=null&&e.useMostRecentResponse),s=!r,l=Date.now(),a=we.activeRequests[n],c={timestamp:l};if(we.activeRequests[n]=c,s){a&&((p=a.abortController)==null||p.abort("Request was aborted due to a newer request being made"));const g=new AbortController;c.abortController=g,e.signal=g.signal}if(e.params){for(const[g,w]of Object.entries(e.params))typeof w=="object"&&w!==null&&(e.params[g]=JSON.stringify(w));t+=(t.match(/\?/)?"&":"?")+new URLSearchParams(e.params).toString(),delete e.params}let u,d;if(c.requestPromise=new Promise((g,w)=>{u=g,d=w}),r&&(a!=null&&a.requestPromise))try{await a.requestPromise}catch{}let f;try{f=await fetch(we.url(t),e)}catch(g){if(e.ignoreAbort&&(g+"").match(/Request was aborted/)){const w={abort:!0};return u(w),w}throw d(g),g}D6(f);let m=we.activeRequests[n],_=await f.json();if(u(_),m.timestamp!==l){if(s)_={abort:!0};else if(o)do if(m=we.activeRequests[n],_=await m.requestPromise,we.activeRequests[n].timestamp===m.timestamp)break;while(m.timestamp!==we.activeRequests[n].timestamp)}if(f.status===401){const g=(h=ne.value.request)==null?void 0:h.onUnauthorized;return g?g(_,f):{error:!0,message:"Unauthorized",..._}}return f.status>400&&_.exception&&!_.error&&(_.error=!0),_},async poll(t,e,n,r){let o;r||(r=s=>!!s);do o=await we.call(t,e),await Gr(n||1e3);while(!r(o));return o},async get(t,e){var n;return await we.call(t,{method:"get",...e,headers:{Accept:"application/json","Content-Type":"application/json",...(n=ne.value.request)==null?void 0:n.headers,...e==null?void 0:e.headers}})},async post(t,e,n){var r;return await we.call(t,{method:"post",body:e&&JSON.stringify(e),...n,headers:{Accept:"application/json","Content-Type":"application/json",...(r=ne.value.request)==null?void 0:r.headers,...n==null?void 0:n.headers}})}};function D6(t){const e=ne.value.request;if(!e||!e.headers||!e.onAppVersionMismatch)return;const n=e.headers["X-App-Version"]||"",r=t.headers.get("X-App-Version");n&&n!==r&&e.onAppVersionMismatch(r)}async function M6(t,e,n,r){let o;n&&(o=e.value.find(s=>s.id===n)||(await t({id:n}))[0]),e.value=await t(r),o&&!e.value.find(s=>s.id===n)&&e.value.push(o)}function W1(t,e){return new URLSearchParams((e==null?void 0:e.replace(/.*\?/,""))||window.location.search).get(t)}function P6(t,e){return{async list(n,r){r={...r,ignoreAbort:!0};const o=await we.post(`${t}/list`,n,r);return o.data&&(o.data=dd(o.data)),o},summary(n,r){return r={...r,ignoreAbort:!0},we.post(`${t}/summary`,{filter:n},r)},async details(n,r,o){o={...o,ignoreAbort:!0},r&&(o.params={fields:r});const s=await we.get(`${t}/${n.id}/details`,o);return oe(s)},fieldOptions(n){return we.get(`${t}/field-options`,n)},async applyAction(n,r,o,s){var a,c;s={...s,waitOnPrevious:!0,useMostRecentResponse:!0,headers:{...s==null?void 0:s.headers,"X-Timestamp":Date.now().toString()}},o=o||{};const l=await we.post(`${t}/${r?r.id+"/":""}apply-action`,{action:n,data:o},s);return l.item&&(l.item=oe(l.item)),(a=l.result)!=null&&a.__type&&((c=l.result)!=null&&c.id)&&(l.result=oe(l.result)),l},batchAction(n,r,o,s){return s={...s,waitOnPrevious:!0},we.post(`${t}/batch-action`,{action:n,filter:{id:r.map(l=>l.id)},data:o},s)},export(n,r){return n_(`${t}/export`,r||"export.csv",{filter:n})},...e}}function j1(t=null){const e=i.ref(null),n=i.ref(null),r=i.ref(null),o=d=>{var f;e.value=null,new ko((f=d.target)==null?void 0:f.files[0],t).prepare().onProgress(({file:m})=>{m&&(e.value=m,r.value&&r.value(e.value))}).onComplete(({uploadedFile:m})=>{m&&(e.value=m,n.value&&n.value(e.value),r.value&&r.value(e.value))}).onError(({file:m,error:_})=>{console.error("Failed to upload",m,_),Ve.error(`Failed to upload ${m.name}: ${_}`)}).upload()},s=d=>{var f;o({target:{files:(f=d.dataTransfer)==null?void 0:f.files}})};return{isFileUploaded:i.computed(()=>e.value&&e.value.url),clearUploadedFile:()=>{e.value=null,r.value&&r.value(e.value),n.value&&n.value(e.value)},onComplete:d=>{n.value=d},onFileChange:d=>{r.value=d},onDrop:s,onFileSelected:o,uploadedFile:e}}function Pt(t,e){localStorage.setItem(t,JSON.stringify(e))}function Ct(t,e=null){const n=localStorage.getItem(t);try{return n?JSON.parse(n):e}catch{return}}function v6(t,e=""){const n=Ma(t,e),r=document.createElement("style");r.innerHTML=`:root {${n}}`,document.head.appendChild(r)}function Ma(t,e=""){return Object.entries(t).map(([n,r])=>typeof r=="object"?Ma(r,`${e}${n}-`):`--${e}${n}: ${r}`).join(";")}const L6={version:"0.4.78"},{version:Y1}=L6;function V6(){console.log(`Installing Danx UI ${Y1}... Nothing to do really.`)}S.ActionButton=Co,S.ActionForm=Sc,S.ActionFormDialog=rp,S.ActionMenu=Ks,S.ActionTable=cd,S.ActionTableColumn=Zu,S.ActionTableHeaderColumn=Ku,S.ActionTableLayout=H2,S.ActionToolbar=ud,S.ActionVnode=ky,S.AddressFormat=dy,S.AuditHistoryItem=tw,S.AuditHistoryItemValue=el,S.AutoHeightTransition=Ay,S.BadgeTab=Ty,S.BooleanField=ts,S.CaretDownIcon=Wa,S.CollapsableFiltersSidebar=rd,S.CollapsableSidebar=Ec,S.ColumnListItem=Xs,S.ColumnSettingsDialog=s2,S.ConfirmActionDialog=sc,S.ConfirmDialog=Tt,S.ConfirmPasswordField=Tp,S.ContentDrawer=as,S.CreateNewWithNameDialog=lc,S.DateField=rs,S.DateRangeField=os,S.DateTime=D,S.DateTimeField=vp,S.DateTimePicker=is,S.DragAndDrop=Qs,S.DragHandleDotsIcon=ja,S.DragHandleIcon=Ya,S.EditOnClickTextField=zp,S.EditableDiv=uc,S.EmptyTableState=ld,S.ExportButton=Ga,S.FieldLabel=ft,S.FilePreview=Ir,S.FileUpload=ko,S.FileUploadButton=Hp,S.FilterIcon=Ka,S.FilterItem=td,S.FilterList=nd,S.FilterListToggle=od,S.FilterToolbarLayout=x2,S.FilterableField=Js,S.FlashMessages=Ve,S.FlatListFormat=fy,S.FullScreenCarouselDialog=ac,S.FullScreenDialog=pp,S.GpsCoordinatesFormat=hy,S.HandleDraggable=Wu,S.IconWithTextFormat=gy,S.ImageIcon=es,S.IndicatorTab=Iy,S.InfoDialog=cc,S.InlineDateTimeField=Wp,S.InputDialog=yp,S.IntegerField=fc,S.InteractiveTooltip=Sy,S.LabelPillWidget=Kb,S.LabelValueBlock=Jp,S.LabelValueFormat=by,S.LabelValuePillWidget=Jb,S.LabeledInput=ns,S.ListDragAndDrop=ju,S.ListItemDraggable=Yu,S.ListTransition=Ic,S.MaxHeightTransition=Oy,S.MaxLengthCounter=dc,S.MultiFileField=mc,S.MultiKeywordField=_c,S.NavigationMenu=ow,S.NewPasswordField=ng,S.NumberField=Nr,S.NumberRangeField=No,S.PanelsDrawer=sd,S.PanelsDrawerTabs=id,S.PdfIcon=Qa,S.PercentIcon=Xa,S.PopoverMenu=Nc,S.PreviousNextControls=nc,S.RefreshButton=Za,S.RenderComponent=Bc,S.RenderVnode=un,S.RenderedForm=ls,S.RenderedFormDialog=Zg,S.SERVER_TZ=ta,S.SaveStateIndicator=xc,S.SelectDrawer=lg,S.SelectField=Pn,S.SelectOrCreateField=_g,S.SelectWithChildrenField=hc,S.SelectionMenuField=fg,S.ShowHideButton=Eo,S.SingleFileField=pc,S.SkipNextIcon=Ja,S.SkipPreviousIcon=ec,S.SlideTransition=Dy,S.SliderNumberField=kg,S.StaggeredListTransition=Yb,S.SvgImg=Cc,S.TableSummaryRow=ad,S.TextField=an,S.TitleColumnFormat=Qu,S.TrashIcon=To,S.VisibleColumnsToggleButtons=d2,S.WarningIcon=tc,S.WysiwygField=kc,S.XIcon=Bo,S.activeActionVnode=kn,S.addHotkey=I6,S.applyCssVars=v6,S.autoRefreshObject=_d,S.buildCssVars=Ma,S.centerTruncate=vS,S.cloneDeep=dw,S.configure=e0,S.danxOptions=ne,S.dbDateTime=ra,S.diffInDays=zS,S.download=Fi,S.downloadFile=n_,S.downloadFileResponse=r_,S.fBoolean=Xm,S.fCurrency=Ii,S.fCurrencyNoCents=DS,S.fDate=xt,S.fDateTime=Ni,S.fDuration=OS,S.fJSON=t_,S.fLocalizedDateTime=wr,S.fMarkdownCode=US,S.fNameOrCount=e_,S.fNumber=Ot,S.fPercent=Jm,S.fPhone=LS,S.fQDate=$S,S.fSecondsToDuration=Km,S.fSecondsToTime=AS,S.fShortCurrency=MS,S.fShortNumber=Qm,S.fShortSize=PS,S.fetchResourceListWithSelected=M6,S.getFilterFromUrl=ed,S.getItem=Ct,S.getResponseHeader=sa,S.getUrlParam=W1,S.importJson=O6,S.incrementName=wd,S.install=V6,S.isJSON=kd,S.latestCallOnly=il,S.listen=$6,S.localizedDateTime=na,S.mapSortBy=Ju,S.metersToMiles=_w,S.milesToMeters=hw,S.minmax=mw,S.notify=iw,S.parseCoords=pw,S.parseDateTime=St,S.parseGenericDateTime=Ym,S.parseMarkdownCode=$i,S.parseMarkdownJSON=VS,S.parseMarkdownYAML=RS,S.parseQDate=oa,S.parseQDateTime=ia,S.parseSqlDateTime=FS,S.pollUntil=fw,S.refreshApplication=uw,S.registerHotkeys=A6,S.registerStickyScrolling=Xu,S.remoteDateTime=jm,S.remove=Hr,S.replace=rl,S.request=we,S.resolveFileLocation=q1,S.setItem=Pt,S.sleep=Gr,S.stopAutoRefreshObject=hd,S.storeObject=oe,S.storeObjects=dd,S.uniqueBy=bd,S.unlisten=F6,S.useActionRoutes=P6,S.useActionStore=cw,S.useActions=lw,S.useCompatibility=Cd,S.useControls=f2,S.useDebounceFn=ln,S.useMultiFileUpload=Z1,S.useSingleFileUpload=j1,S.useTableColumns=G2,S.version=Y1,S.waitForRef=ol,S.withDefaultActions=aw,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
154
154
  //# sourceMappingURL=danx.umd.js.map