@vue-pdf-viewer/viewer 2.1.0-beta.7 → 2.1.0-rc.0

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/index.js CHANGED
@@ -4052,7 +4052,7 @@ class dZ {
4052
4052
  }
4053
4053
  }
4054
4054
  }
4055
- const Ul = dZ.getInstance(), ot = /* @__PURE__ */ new Date("2025-01-28T10:48:56.455Z"), uF = "Please visit https://www.vue-pdf-viewer.dev/license-management/ to generate a new license key.", WZ = {
4055
+ const Ul = dZ.getInstance(), ot = /* @__PURE__ */ new Date("2025-01-29T10:02:42.946Z"), uF = "Please visit https://www.vue-pdf-viewer.dev/license-management/ to generate a new license key.", WZ = {
4056
4056
  invalidLicense: `You are currently using without a valid license. ${uF}`,
4057
4057
  mismatchedDomain: `Your license key is not valid for the current domain / IP. ${uF}`,
4058
4058
  expired: `Your license key has expired. ${uF}`,
@@ -29,7 +29,7 @@
29
29
  <div class="${d}"></div>
30
30
  `,U.appendChild(F),F},wZ=U=>{const d=new Date(U),F=d.getDate(),Z=d.getMonth()+1,Q=d.getFullYear(),c=d.getHours(),V=d.getMinutes(),W=d.getSeconds(),R=c>=12?"PM":"AM",b=`${c%12||12}:${V<10?"0":""}${V}:${W<10?"0":""}${W} ${R}`;return`${F}/${Z<10?"0":""}${Z}/${Q}, ${b}`};function xZ(U,d,F,Z,Q,c){let V=F;switch([_.DualPage].includes(Q)&&c>=3&&(V=2*F),!0){case(Q===_.DualPage&&c>=3):break;default:V=F;break}switch(Z){case tl.ActualSize:return 1;case tl.PageFit:return Math.min((U.clientWidth-$d)/V,(U.clientHeight-2*tW)/d);case tl.PageWidth:return(U.clientWidth-$d)/V}}function OU(){const d=new Error().stack?.split(`
31
31
  `);if(!d||d.length<4)return"unknown";const F=d[3],Z=F.match(/\((.+?)\)/)||F.match(/at\s+(.+)/);return Z?Z[1].split("/").slice(-2).join("/"):"unknown"}function Qd(U){const d=U.level==="debug",F=`[VPV ${U.level.charAt(0).toUpperCase()+U.level.slice(1)}]`,Z=U.origin||OU();return d?[`%c ${F}(${Z}):
32
- `,"color: #2563eb;",...U.args]:[F,`(${Z}):`,...U.args]}class BU{static instance;isProduction;constructor(){this.isProduction=!0}static getInstance(){return BU.instance||(BU.instance=new BU),BU.instance}debug(...d){if(!this.isProduction){const F={level:"debug",args:d,origin:OU()};console.debug(...Qd(F))}}info(...d){if(this.isProduction)console.info("[VPV Info]:",...d);else{const F={level:"info",args:d,origin:OU()};console.info(...Qd(F))}}warn(...d){if(this.isProduction)console.warn("[VPV Warning]:",...d);else{const F={level:"warn",args:d,origin:OU()};console.warn(...Qd(F))}}error(...d){if(this.isProduction)console.error("[VPV Error]:",...d);else{const F={level:"error",args:d,origin:OU()};console.error(...Qd(F))}}}const O=BU.getInstance(),VW=new Date("2025-01-28T10:48:56.455Z"),fd="Please visit https://www.vue-pdf-viewer.dev/license-management/ to generate a new license key.",SU={invalidLicense:`You are currently using without a valid license. ${fd}`,mismatchedDomain:`Your license key is not valid for the current domain / IP. ${fd}`,expired:`Your license key has expired. ${fd}`,exceededVersion:"Your license does not support the current version of Vue PDF Viewer. The library version you are using exceeds the supported range of your license.",invalidSignature:"Invalid license key: Signature mismatch"};function WW(U){const d=atob(U),F=new Uint8Array(d.length);for(let Z=0;Z<d.length;Z++)F[Z]=d.charCodeAt(Z);return F.buffer}const jZ=window.crypto.getRandomValues(new Uint8Array(32)).reduce((U,d)=>U+d.toString(16).padStart(2,"0"),"");function RW(U){const d=U.replace(/-----BEGIN PUBLIC KEY-----/,"").replace(/-----END PUBLIC KEY-----/,"").replace(/\s+/g,""),F=atob(d),Z=new Uint8Array(F.length);for(let Q=0;Q<F.length;Q++)Z[Q]=F.charCodeAt(Q);return Z.buffer}function NW(U){try{const d=JSON.stringify(U);return btoa(d+jZ)}catch(d){return O.error("Error encoding license data:",d),""}}function bW(U){if(!U)return null;try{const F=atob(U).slice(0,-jZ.length);return JSON.parse(F)}catch(d){return O.error("Error decoding license data:",d),null}}async function aW(U,d="SHA-256"){try{const{data:F,signature:Z}=JSON.parse(atob(U)),Q=RW(`-----BEGIN PUBLIC KEY-----
32
+ `,"color: #2563eb;",...U.args]:[F,`(${Z}):`,...U.args]}class BU{static instance;isProduction;constructor(){this.isProduction=!0}static getInstance(){return BU.instance||(BU.instance=new BU),BU.instance}debug(...d){if(!this.isProduction){const F={level:"debug",args:d,origin:OU()};console.debug(...Qd(F))}}info(...d){if(this.isProduction)console.info("[VPV Info]:",...d);else{const F={level:"info",args:d,origin:OU()};console.info(...Qd(F))}}warn(...d){if(this.isProduction)console.warn("[VPV Warning]:",...d);else{const F={level:"warn",args:d,origin:OU()};console.warn(...Qd(F))}}error(...d){if(this.isProduction)console.error("[VPV Error]:",...d);else{const F={level:"error",args:d,origin:OU()};console.error(...Qd(F))}}}const O=BU.getInstance(),VW=new Date("2025-01-29T10:02:42.946Z"),fd="Please visit https://www.vue-pdf-viewer.dev/license-management/ to generate a new license key.",SU={invalidLicense:`You are currently using without a valid license. ${fd}`,mismatchedDomain:`Your license key is not valid for the current domain / IP. ${fd}`,expired:`Your license key has expired. ${fd}`,exceededVersion:"Your license does not support the current version of Vue PDF Viewer. The library version you are using exceeds the supported range of your license.",invalidSignature:"Invalid license key: Signature mismatch"};function WW(U){const d=atob(U),F=new Uint8Array(d.length);for(let Z=0;Z<d.length;Z++)F[Z]=d.charCodeAt(Z);return F.buffer}const jZ=window.crypto.getRandomValues(new Uint8Array(32)).reduce((U,d)=>U+d.toString(16).padStart(2,"0"),"");function RW(U){const d=U.replace(/-----BEGIN PUBLIC KEY-----/,"").replace(/-----END PUBLIC KEY-----/,"").replace(/\s+/g,""),F=atob(d),Z=new Uint8Array(F.length);for(let Q=0;Q<F.length;Q++)Z[Q]=F.charCodeAt(Q);return Z.buffer}function NW(U){try{const d=JSON.stringify(U);return btoa(d+jZ)}catch(d){return O.error("Error encoding license data:",d),""}}function bW(U){if(!U)return null;try{const F=atob(U).slice(0,-jZ.length);return JSON.parse(F)}catch(d){return O.error("Error decoding license data:",d),null}}async function aW(U,d="SHA-256"){try{const{data:F,signature:Z}=JSON.parse(atob(U)),Q=RW(`-----BEGIN PUBLIC KEY-----
33
33
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxBYxngKoXlUVluqotveU
34
34
  Uo8+98JHEHr6exhswsBqEVS3T4ZqvsVjyBm3FDEE4A5YpwyqISj5Wp1QS+9rhK0L
35
35
  s0fAhxRYtziHJGiARcHURSjLbsVuH9IsBDzIjay3j+MD42TumiVh8IzQ8SJvBmTL
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/viewer",
3
3
  "private": false,
4
- "version": "2.1.0-beta.7",
4
+ "version": "2.1.0-rc.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
7
7
  "module": "./dist/index.js",