@readium/navigator 2.6.1 → 2.7.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/Navigator.js +1 -0
- package/dist/_virtual/index.js +1 -0
- package/dist/_virtual/preload-helper.js +1 -0
- package/dist/audio/AudioNavigator.js +1 -0
- package/dist/audio/AudioPoolManager.js +1 -0
- package/dist/audio/engine/PreservePitchProcessor.js +215 -0
- package/dist/audio/engine/PreservePitchWorklet.js +1 -0
- package/dist/audio/engine/WebAudioEngine.js +1 -0
- package/dist/audio/preferences/AudioDefaults.js +1 -0
- package/dist/audio/preferences/AudioPreferences.js +1 -0
- package/dist/audio/preferences/AudioPreferencesEditor.js +1 -0
- package/dist/audio/preferences/AudioSettings.js +1 -0
- package/dist/audio/protection/AudioNavigatorProtector.js +1 -0
- package/dist/css/Properties.js +1 -0
- package/dist/dom/_readium_cssSelectorGenerator.js +1 -0
- package/dist/dom/_readium_executionCleanup.js +14 -0
- package/dist/dom/_readium_executionPrevention.js +66 -0
- package/dist/dom/_readium_webpubExecution.js +5 -0
- package/dist/epub/EpubNavigator.js +1 -0
- package/dist/epub/css/Properties.js +1 -0
- package/dist/epub/css/ReadiumCSS.js +1 -0
- package/dist/epub/frame/FrameBlobBuilder.js +1 -0
- package/dist/epub/frame/FrameComms.js +1 -0
- package/dist/epub/frame/FrameManager.js +1 -0
- package/dist/epub/frame/FramePoolManager.js +1 -0
- package/dist/epub/fxl/FXLCoordinator.js +1 -0
- package/dist/epub/fxl/FXLFrameManager.js +1 -0
- package/dist/epub/fxl/FXLFramePoolManager.js +1 -0
- package/dist/epub/fxl/FXLPeripherals.js +4 -0
- package/dist/epub/fxl/FXLPeripheralsDebug.js +1 -0
- package/dist/epub/fxl/FXLSpreader.js +1 -0
- package/dist/epub/preferences/EpubDefaults.js +1 -0
- package/dist/epub/preferences/EpubPreferences.js +1 -0
- package/dist/epub/preferences/EpubPreferencesEditor.js +1 -0
- package/dist/epub/preferences/EpubSettings.js +1 -0
- package/dist/helpers/dimensions.js +1 -0
- package/dist/helpers/dist/sML.js +1 -0
- package/dist/helpers/lineLength.js +1 -0
- package/dist/helpers/minify.js +1 -0
- package/dist/helpers/scriptMode.js +1 -0
- package/dist/index.js +1 -11006
- package/dist/injection/Injector.js +1 -0
- package/dist/injection/epubInjectables.js +1 -0
- package/dist/injection/webpubInjectables.js +1 -0
- package/dist/{ReadiumCSS-after-D7unrNI9.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/ReadiumCSS-after.css.js} +2 -5
- package/dist/{ReadiumCSS-before-DwBLxUVH.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/ReadiumCSS-before.css.js} +2 -5
- package/dist/{ReadiumCSS-default-AIAk8uwU.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/ReadiumCSS-default.css.js} +2 -5
- package/dist/{ReadiumCSS-ebpaj_fonts_patch-Dt2XliTg.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/ReadiumCSS-ebpaj_fonts_patch.css.js} +2 -5
- package/dist/{ReadiumCSS-after-XUKPAxfT.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-horizontal/ReadiumCSS-after.css.js} +2 -5
- package/dist/{ReadiumCSS-before-8FMq19-x.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-horizontal/ReadiumCSS-before.css.js} +2 -5
- package/dist/{ReadiumCSS-default-N65xNiIp.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-horizontal/ReadiumCSS-default.css.js} +2 -5
- package/dist/{ReadiumCSS-after-ClF4TBzj.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-vertical/ReadiumCSS-after.css.js} +2 -5
- package/dist/{ReadiumCSS-before-BNTwR8Qm.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-vertical/ReadiumCSS-before.css.js} +2 -5
- package/dist/{ReadiumCSS-default-BesyZHRU.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-vertical/ReadiumCSS-default.css.js} +2 -5
- package/dist/{ReadiumCSS-after-d5mC4cme.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/rtl/ReadiumCSS-after.css.js} +2 -5
- package/dist/{ReadiumCSS-before-CG-KmDa3.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/rtl/ReadiumCSS-before.css.js} +2 -5
- package/dist/{ReadiumCSS-default-BhdLiyWp.js → node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/rtl/ReadiumCSS-default.css.js} +2 -5
- package/dist/node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/webPub/ReadiumCSS-webPub.css.js +274 -0
- package/dist/node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/vars/colors.json.js +1 -0
- package/dist/node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/vars/experiments.json.js +1 -0
- package/dist/node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/vars/fontStacks.json.js +1 -0
- package/dist/node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/vars/i18n.json.js +1 -0
- package/dist/node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/vars/settings.json.js +1 -0
- package/dist/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js +1 -0
- package/dist/peripherals/KeyboardConditionBridge.js +1 -0
- package/dist/peripherals/KeyboardPeripherals.js +1 -0
- package/dist/preferences/Preference.js +1 -0
- package/dist/preferences/Types.js +1 -0
- package/dist/preferences/guards.js +1 -0
- package/dist/protection/AutomationDetector.js +1 -0
- package/dist/protection/ContextMenuProtector.js +1 -0
- package/dist/protection/CopyProtector.js +1 -0
- package/dist/protection/DevToolsDetector.js +1 -0
- package/dist/protection/DragAndDropProtector.js +1 -0
- package/dist/protection/IframeEmbeddingDetector.js +1 -0
- package/dist/protection/NavigatorProtector.js +1 -0
- package/dist/protection/PrintProtector.js +15 -0
- package/dist/protection/utils/WorkerConsole.js +12 -0
- package/dist/protection/utils/console.js +1 -0
- package/dist/protection/utils/match.js +1 -0
- package/dist/protection/utils/platform.js +1 -0
- package/dist/webpub/WebPubBlobBuilder.js +2 -0
- package/dist/webpub/WebPubFrameManager.js +1 -0
- package/dist/webpub/WebPubFramePoolManager.js +1 -0
- package/dist/webpub/WebPubNavigator.js +1 -0
- package/dist/webpub/css/Properties.js +1 -0
- package/dist/webpub/css/WebPubCSS.js +1 -0
- package/dist/webpub/preferences/WebPubDefaults.js +1 -0
- package/dist/webpub/preferences/WebPubPreferences.js +1 -0
- package/dist/webpub/preferences/WebPubPreferencesEditor.js +1 -0
- package/dist/webpub/preferences/WebPubSettings.js +1 -0
- package/package.json +11 -9
- package/src/Navigator.ts +4 -1
- package/src/audio/AudioNavigator.ts +8 -8
- package/src/decorations/index.ts +24 -127
- package/src/epub/EpubNavigator.ts +149 -20
- package/src/epub/frame/FrameManager.ts +8 -3
- package/src/epub/frame/FramePoolManager.ts +5 -2
- package/src/epub/fxl/FXLCoordinator.ts +1 -1
- package/src/epub/fxl/FXLFrameManager.ts +1 -1
- package/src/epub/preferences/EpubDefaults.ts +1 -1
- package/src/epub/preferences/EpubSettings.ts +1 -1
- package/src/protection/DevToolsDetector.ts +1 -1
- package/src/webpub/WebPubFrameManager.ts +9 -3
- package/src/webpub/WebPubFramePoolManager.ts +5 -2
- package/src/webpub/WebPubNavigator.ts +100 -19
- package/src/webpub/preferences/WebPubDefaults.ts +1 -1
- package/src/webpub/preferences/WebPubSettings.ts +1 -1
- package/types/src/Navigator.d.ts +3 -1
- package/types/src/decorations/index.d.ts +5 -59
- package/types/src/epub/EpubNavigator.d.ts +13 -3
- package/types/src/epub/frame/FrameManager.d.ts +2 -1
- package/types/src/epub/frame/FramePoolManager.d.ts +2 -1
- package/types/src/epub/fxl/FXLFramePoolManager.d.ts +1 -1
- package/types/src/webpub/WebPubFrameManager.d.ts +2 -1
- package/types/src/webpub/WebPubFramePoolManager.d.ts +2 -1
- package/types/src/webpub/WebPubNavigator.d.ts +12 -3
- package/dist/ar-DyHX_uy2.js +0 -7
- package/dist/da-Dct0PS3E.js +0 -7
- package/dist/fr-C5HEel98.js +0 -7
- package/dist/index.umd.cjs +0 -5615
- package/dist/it-DFOBoXGy.js +0 -7
- package/dist/pt_PT-Di3sVjze.js +0 -7
- package/dist/sv-BfzAFsVN.js +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const p=s=>{if("blob"in s&&s.blob.type)return s.blob.type;if(s.as==="script")return"text/javascript";if(s.as==="link"&&"url"in s){const t=s.url.toLowerCase();if(t.endsWith(".css"))return"text/css";if([".js",".mjs",".cjs"].some(e=>t.endsWith(e)))return"text/javascript"}},d=(s,t)=>{t.attributes&&Object.entries(t.attributes).forEach(([e,r])=>{e==="type"||e==="rel"||e==="href"||e==="src"||r!=null&&(typeof r=="boolean"?r&&s.setAttribute(e,""):s.setAttribute(e,r))})},f=(s,t,e)=>{const r=s.createElement("script");r.dataset.readium="true",t.id&&(r.id=t.id);const n=t.type||p(t);return n&&(r.type=n),d(r,t),r.src=e,r},o=(s,t,e)=>{const r=s.createElement("link");r.dataset.readium="true",t.id&&(r.id=t.id),t.rel&&(r.rel=t.rel);const n=t.type||p(t);return n&&(r.type=n),d(r,t),r.href=e,r};class h{constructor(t){this.blobStore=new Map,this.createdBlobUrls=new Set,this.allowedDomains=[],this.injectableIdCounter=0,this.allowedDomains=(t.allowedDomains||[]).map(e=>{try{return new URL(e),e}catch{throw new Error(`Invalid allowed domain: "${e}". Must be a valid URL (e.g., "https://fonts.googleapis.com").`)}}),this.rules=t.rules.map(e=>{const r={...e};return e.prepend&&(r.prepend=e.prepend.map(n=>({...n,id:n.id||`injectable-${this.injectableIdCounter++}`})).reverse()),e.append&&(r.append=e.append.map(n=>({...n,id:n.id||`injectable-${this.injectableIdCounter++}`}))),r})}dispose(){for(const t of this.createdBlobUrls)try{URL.revokeObjectURL(t)}catch(e){console.warn("Failed to revoke blob URL:",t,e)}this.createdBlobUrls.clear()}getAllowedDomains(){return[...this.allowedDomains]}async injectForDocument(t,e){for(const r of this.rules)this.matchesRule(r,e)&&await this.applyRule(t,r)}matchesRule(t,e){const r=e.href;return t.resources.some(n=>n instanceof RegExp?n.test(r):r===n)}async getOrCreateBlobUrl(t){const e=t.id;if(this.blobStore.has(e)){const r=this.blobStore.get(e);return r.refCount++,r.url}if("blob"in t){const r=URL.createObjectURL(t.blob);return this.blobStore.set(e,{url:r,refCount:1}),this.createdBlobUrls.add(r),r}throw new Error("Resource must have a blob property")}async releaseBlobUrl(t){if(!this.createdBlobUrls.has(t))return;const e=Array.from(this.blobStore.values()).find(r=>r.url===t);if(e&&(e.refCount--,e.refCount<=0)){URL.revokeObjectURL(t),this.createdBlobUrls.delete(t);for(const[r,n]of this.blobStore.entries())if(n.url===t){this.blobStore.delete(r);break}}}async getResourceUrl(t,e){if("url"in t){const r=new URL(t.url,e.baseURI).toString();if(!this.isValidUrl(r,e))throw new Error(`Invalid URL: Only HTTPS, data:, blob:, or localhost HTTP URLs are allowed. Got: ${t.url}`);return r}else return this.getOrCreateBlobUrl(t)}createPreloadLink(t,e,r){if(e.as!=="link"||e.rel!=="preload")return;const n={...e,rel:"preload",attributes:{...e.attributes,as:e.as}},l=o(t,n,r);t.head.appendChild(l)}createElement(t,e,r){if(e.as==="script")return f(t,e,r);if(e.as==="link")return o(t,e,r);throw new Error(`Unsupported element type: ${e.as}`)}async applyRule(t,e){const r=[],n=e.prepend?e.prepend.filter(i=>!i.condition||i.condition(t)):[],l=e.append?e.append.filter(i=>!i.condition||i.condition(t)):[];try{for(const i of n)await this.processInjectable(i,t,r,"prepend");for(const i of l)await this.processInjectable(i,t,r,"append")}catch(i){for(const{element:a,url:c}of r)try{a.remove(),await this.releaseBlobUrl(c)}catch(b){console.error("Error during cleanup:",b)}throw i}}async processInjectable(t,e,r,n){const l=t.target==="body"?e.body:e.head;if(!l)return;let i=null;try{if(i=await this.getResourceUrl(t,e),t.rel==="preload"&&"url"in t)this.createPreloadLink(e,t,i);else{const a=this.createElement(e,t,i);r.push({element:a,url:i}),n==="prepend"?l.prepend(a):l.append(a)}}catch(a){throw console.error("Failed to process resource:",a),i&&"blob"in t&&await this.releaseBlobUrl(i),a}}isValidUrl(t,e){try{const r=new URL(t,e.baseURI);if(r.protocol==="data:"||r.protocol==="blob:"&&this.createdBlobUrls.has(t))return!0;if(this.allowedDomains.length>0){const n=r.origin;return this.allowedDomains.some(l=>{const i=new URL(l).origin;return n===i})}return!1}catch{return!1}}}export{h as Injector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__vitePreload as t}from"../_virtual/preload-helper.js";import{stripJS as _,stripCSS as d}from"../helpers/minify.js";import{Layout as y}from"@readium/shared";import{getScriptMode as E}from"../helpers/scriptMode.js";import v from"../dom/_readium_cssSelectorGenerator.js";import h from"../dom/_readium_executionPrevention.js";import P from"../dom/_readium_executionCleanup.js";async function j(n,f){const b=n.effectiveLayout===y.fixed,p=f.filter(e=>e.mediaType.isHTML).map(e=>e.href),m=p.length>0?p:[/\.xhtml$/,/\.html$/],u=[{id:"css-selector-generator",as:"script",target:"head",blob:new Blob([_(v)],{type:"text/javascript"})},{id:"execution-prevention",as:"script",target:"head",blob:new Blob([_(h)],{type:"text/javascript"}),condition:e=>!!(e.querySelector("script")||e.querySelector("body[onload]:not(body[onload=''])"))}],c=[{id:"onload-proxy",as:"script",target:"head",blob:new Blob([_(P)],{type:"text/javascript"}),condition:e=>!!(e.querySelector("script")||e.querySelector("body[onload]:not(body[onload=''])"))}];if(!b){const e=E(n);let a,s,l;switch(e){case"rtl":{const[o,r,i]=await Promise.all([t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/rtl/ReadiumCSS-before.css.js"),[]),t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/rtl/ReadiumCSS-default.css.js"),[]),t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/rtl/ReadiumCSS-after.css.js"),[])]);a=o.default,s=r.default,l=i.default;break}case"cjk-horizontal":{const[o,r,i]=await Promise.all([t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-horizontal/ReadiumCSS-before.css.js"),[]),t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-horizontal/ReadiumCSS-default.css.js"),[]),t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-horizontal/ReadiumCSS-after.css.js"),[])]);a=o.default,s=r.default,l=i.default;break}case"cjk-vertical":case"mongolian-vertical":{const[o,r,i]=await Promise.all([t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-vertical/ReadiumCSS-before.css.js"),[]),t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-vertical/ReadiumCSS-default.css.js"),[]),t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/cjk-vertical/ReadiumCSS-after.css.js"),[])]);a=o.default,s=r.default,l=i.default;break}default:{const[o,r,i]=await Promise.all([t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/ReadiumCSS-before.css.js"),[]),t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/ReadiumCSS-default.css.js"),[]),t(()=>import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/ReadiumCSS-after.css.js"),[])]);a=o.default,s=r.default,l=i.default;break}}if(u.unshift({id:"readium-css-before",as:"link",target:"head",blob:new Blob([d(a)],{type:"text/css"}),rel:"stylesheet"}),c.unshift({id:"readium-css-default",as:"link",target:"head",blob:new Blob([d(s)],{type:"text/css"}),rel:"stylesheet",condition:o=>!(o.querySelector("link[rel='stylesheet']")||o.querySelector("style")||o.querySelector("[style]:not([style=''])"))},{id:"readium-css-after",as:"link",target:"head",blob:new Blob([d(l)],{type:"text/css"}),rel:"stylesheet"}),(e==="cjk-horizontal"||e==="cjk-vertical")&&(n.description==="ebpaj-guide-1.0"||n.otherMetadata?.["ebpaj:guide-version"]!==void 0)){const{default:r}=await t(async()=>{const{default:i}=await import("../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/ReadiumCSS-ebpaj_fonts_patch.css.js");return{default:i}},[]);c.push({id:"readium-css-ebpaj",as:"link",target:"head",blob:new Blob([d(r)],{type:"text/css"}),rel:"stylesheet"})}}return[{resources:m,prepend:u,append:c}]}export{j as createReadiumEpubRules};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{stripJS as t,stripCSS as p}from"../helpers/minify.js";import i from"../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/dist/webPub/ReadiumCSS-webPub.css.js";import l from"../dom/_readium_cssSelectorGenerator.js";import b from"../dom/_readium_webpubExecution.js";import c from"../dom/_readium_executionCleanup.js";function x(r){const o=r.filter(e=>e.mediaType.isHTML).map(e=>e.href),n=o.length>0?o:[/\.html$/,/\.xhtml$/,/\/$/],s=[{id:"css-selector-generator",as:"script",target:"head",blob:new Blob([t(l)],{type:"text/javascript"})},{id:"webpub-execution",as:"script",target:"head",blob:new Blob([t(b)],{type:"text/javascript"})}],a=[{id:"onload-proxy",as:"script",target:"head",blob:new Blob([t(c)],{type:"text/javascript"}),condition:e=>!!(e.querySelector("script")||e.querySelector("body[onload]:not(body[onload=''])"))},{id:"readium-css-webpub",as:"link",target:"head",blob:new Blob([p(i)],{type:"text/css"}),rel:"stylesheet"}];return[{resources:n,prepend:s,append:a}]}export{x as createReadiumWebPubRules};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -586,7 +586,4 @@ body{
|
|
|
586
586
|
|
|
587
587
|
:root[style*="readium-iPadOSPatch-on"] p:not(:has(b, cite, em, i, q, s, small, span, strong)):first-line{
|
|
588
588
|
-webkit-text-zoom:normal;
|
|
589
|
-
}`;
|
|
590
|
-
export {
|
|
591
|
-
n as default
|
|
592
|
-
};
|
|
589
|
+
}`;export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -523,7 +523,4 @@ audio{
|
|
|
523
523
|
table{
|
|
524
524
|
max-width:var(--RS__maxMediaWidth);
|
|
525
525
|
box-sizing:var(--RS__boxSizingTable);
|
|
526
|
-
}`;
|
|
527
|
-
export {
|
|
528
|
-
n as default
|
|
529
|
-
};
|
|
526
|
+
}`;export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -156,7 +156,4 @@ th{
|
|
|
156
156
|
th, td{
|
|
157
157
|
padding:4px;
|
|
158
158
|
border:1px solid currentcolor;
|
|
159
|
-
}`;
|
|
160
|
-
export {
|
|
161
|
-
n as default
|
|
162
|
-
};
|
|
159
|
+
}`;export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const o
|
|
1
|
+
const o=`/* Readium CSS
|
|
2
2
|
EBPAJ Fonts Patch module
|
|
3
3
|
|
|
4
4
|
A stylesheet improving EBPAJ @font-face declarations to cover all platforms
|
|
@@ -76,7 +76,4 @@ const o = `/* Readium CSS
|
|
|
76
76
|
local("YuGothic-Medium"), local("YuGothic"), /* 游ゴシック体(macOS) */
|
|
77
77
|
local("Yu Gothic Medium"), local("Yu Gothic"), /* 游ゴシック(Windows) "Yu Gothic" is a fallback. */
|
|
78
78
|
local("BIZ UDGothic"); /* BIZ UDゴシック */
|
|
79
|
-
}`;
|
|
80
|
-
export {
|
|
81
|
-
o as default
|
|
82
|
-
};
|
|
79
|
+
}`;export{o as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t
|
|
1
|
+
const t=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -484,7 +484,4 @@ body{
|
|
|
484
484
|
|
|
485
485
|
:root[style*="readium-iPadOSPatch-on"] p:not(:has(b, cite, em, i, q, s, small, span, strong)):first-line{
|
|
486
486
|
-webkit-text-zoom:normal;
|
|
487
|
-
}`;
|
|
488
|
-
export {
|
|
489
|
-
t as default
|
|
490
|
-
};
|
|
487
|
+
}`;export{t as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -523,7 +523,4 @@ audio{
|
|
|
523
523
|
table{
|
|
524
524
|
max-width:var(--RS__maxMediaWidth);
|
|
525
525
|
box-sizing:var(--RS__boxSizingTable);
|
|
526
|
-
}`;
|
|
527
|
-
export {
|
|
528
|
-
n as default
|
|
529
|
-
};
|
|
526
|
+
}`;export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -174,7 +174,4 @@ th{
|
|
|
174
174
|
th, td{
|
|
175
175
|
padding:4px;
|
|
176
176
|
border:1px solid currentcolor;
|
|
177
|
-
}`;
|
|
178
|
-
export {
|
|
179
|
-
n as default
|
|
180
|
-
};
|
|
177
|
+
}`;export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -469,7 +469,4 @@ body{
|
|
|
469
469
|
|
|
470
470
|
:root[style*="readium-iPadOSPatch-on"] p:not(:has(b, cite, em, i, q, s, small, span, strong)):first-line{
|
|
471
471
|
-webkit-text-zoom:normal;
|
|
472
|
-
}`;
|
|
473
|
-
export {
|
|
474
|
-
n as default
|
|
475
|
-
};
|
|
472
|
+
}`;export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -524,7 +524,4 @@ audio{
|
|
|
524
524
|
table{
|
|
525
525
|
max-height:var(--RS__maxMediaWidth);
|
|
526
526
|
box-sizing:var(--RS__boxSizingTable);
|
|
527
|
-
}`;
|
|
528
|
-
export {
|
|
529
|
-
n as default
|
|
530
|
-
};
|
|
527
|
+
}`;export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -177,7 +177,4 @@ th{
|
|
|
177
177
|
th, td{
|
|
178
178
|
padding:4px;
|
|
179
179
|
border:1px solid currentcolor;
|
|
180
|
-
}`;
|
|
181
|
-
export {
|
|
182
|
-
n as default
|
|
183
|
-
};
|
|
180
|
+
}`;export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -524,7 +524,4 @@ body{
|
|
|
524
524
|
|
|
525
525
|
:root[style*="readium-iPadOSPatch-on"] p:not(:has(b, cite, em, i, q, s, small, span, strong)):first-line{
|
|
526
526
|
-webkit-text-zoom:normal;
|
|
527
|
-
}`;
|
|
528
|
-
export {
|
|
529
|
-
n as default
|
|
530
|
-
};
|
|
527
|
+
}`;export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -523,7 +523,4 @@ audio{
|
|
|
523
523
|
table{
|
|
524
524
|
max-width:var(--RS__maxMediaWidth);
|
|
525
525
|
box-sizing:var(--RS__boxSizingTable);
|
|
526
|
-
}`;
|
|
527
|
-
export {
|
|
528
|
-
n as default
|
|
529
|
-
};
|
|
526
|
+
}`;export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n
|
|
1
|
+
const n=`/*!
|
|
2
2
|
* Readium CSS v.2.0.5
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
@@ -156,7 +156,4 @@ th{
|
|
|
156
156
|
th, td{
|
|
157
157
|
padding:4px;
|
|
158
158
|
border:1px solid currentcolor;
|
|
159
|
-
}`;
|
|
160
|
-
export {
|
|
161
|
-
n as default
|
|
162
|
-
};
|
|
159
|
+
}`;export{n as default};
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
const t=`/*!
|
|
2
|
+
* Readium CSS v.2.0.5
|
|
3
|
+
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
|
+
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
|
+
* LICENSE file present in the project repository where this source code is maintained.
|
|
6
|
+
* Core maintainer: Jiminy Panoz <jiminy.panoz@edrlab.org>
|
|
7
|
+
* Contributors:
|
|
8
|
+
* Daniel Weck
|
|
9
|
+
* Hadrien Gardeur
|
|
10
|
+
* Innovimax
|
|
11
|
+
* L. Le Meur
|
|
12
|
+
* Mickaël Menu
|
|
13
|
+
* k_taka
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
:root[style*="--USER__textAlign"]{
|
|
17
|
+
text-align:var(--USER__textAlign);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:root[style*="--USER__textAlign"] body,
|
|
21
|
+
:root[style*="--USER__textAlign"] p:not(
|
|
22
|
+
blockquote p,
|
|
23
|
+
figcaption p,
|
|
24
|
+
header p,
|
|
25
|
+
hgroup p,
|
|
26
|
+
:root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"],
|
|
27
|
+
:root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p,
|
|
28
|
+
:root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1)
|
|
29
|
+
),
|
|
30
|
+
:root[style*="--USER__textAlign"] li,
|
|
31
|
+
:root[style*="--USER__textAlign"] dd{
|
|
32
|
+
text-align:var(--USER__textAlign) !important;
|
|
33
|
+
-moz-text-align-last:auto !important;
|
|
34
|
+
-epub-text-align-last:auto !important;
|
|
35
|
+
text-align-last:auto !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:root[style*="--USER__bodyHyphens"]{
|
|
39
|
+
-webkit-hyphens:var(--USER__bodyHyphens) !important;
|
|
40
|
+
-moz-hyphens:var(--USER__bodyHyphens) !important;
|
|
41
|
+
-ms-hyphens:var(--USER__bodyHyphens) !important;
|
|
42
|
+
-epub-hyphens:var(--USER__bodyHyphens) !important;
|
|
43
|
+
hyphens:var(--USER__bodyHyphens) !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:root[style*="--USER__bodyHyphens"] body,
|
|
47
|
+
:root[style*="--USER__bodyHyphens"] p,
|
|
48
|
+
:root[style*="--USER__bodyHyphens"] li,
|
|
49
|
+
:root[style*="--USER__bodyHyphens"] div,
|
|
50
|
+
:root[style*="--USER__bodyHyphens"] dd{
|
|
51
|
+
-webkit-hyphens:var(--USER__bodyHyphens) !important;
|
|
52
|
+
-moz-hyphens:var(--USER__bodyHyphens) !important;
|
|
53
|
+
-ms-hyphens:var(--USER__bodyHyphens) !important;
|
|
54
|
+
-epub-hyphens:var(--USER__bodyHyphens) !important;
|
|
55
|
+
hyphens:var(--USER__bodyHyphens) !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:root[style*="--USER__fontFamily"]{
|
|
59
|
+
font-family:var(--USER__fontFamily) !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:root[style*="--USER__fontFamily"] *{
|
|
63
|
+
font-family:revert !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:root[style*="readium-a11y-on"]{
|
|
67
|
+
font-style:normal !important;
|
|
68
|
+
font-weight:normal !important;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:root[style*="readium-a11y-on"] body *:not(code):not(var):not(kbd):not(samp){
|
|
72
|
+
font-family:inherit !important;
|
|
73
|
+
font-style:inherit !important;
|
|
74
|
+
font-weight:inherit !important;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:root[style*="readium-a11y-on"] body *:not(a){
|
|
78
|
+
text-decoration:none !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:root[style*="readium-a11y-on"] body *{
|
|
82
|
+
font-variant-caps:normal !important;
|
|
83
|
+
font-variant-numeric:normal !important;
|
|
84
|
+
font-variant-position:normal !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:root[style*="readium-a11y-on"] sup,
|
|
88
|
+
:root[style*="readium-a11y-on"] sub{
|
|
89
|
+
font-size:1rem !important;
|
|
90
|
+
vertical-align:baseline !important;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:root:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] body{
|
|
94
|
+
zoom:var(--USER__zoom) !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:root[style*="readium-iOSPatch-on"][style*="--USER__zoom"] body{
|
|
98
|
+
-webkit-text-size-adjust:var(--USER__zoom) !important;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@supports selector(figure:has(> img)){
|
|
102
|
+
|
|
103
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> img),
|
|
104
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> video),
|
|
105
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> svg),
|
|
106
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> canvas),
|
|
107
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> iframe),
|
|
108
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> audio),
|
|
109
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> img:only-child),
|
|
110
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> video:only-child),
|
|
111
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> svg:only-child),
|
|
112
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> canvas:only-child),
|
|
113
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> iframe:only-child),
|
|
114
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> audio:only-child),
|
|
115
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] table{
|
|
116
|
+
zoom:calc(100% / var(--USER__zoom)) !important;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figcaption,
|
|
120
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] caption,
|
|
121
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] td,
|
|
122
|
+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] th{
|
|
123
|
+
zoom:var(--USER__zoom) !important;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:root[style*="--USER__lineHeight"]{
|
|
128
|
+
line-height:var(--USER__lineHeight) !important;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:root[style*="--USER__lineHeight"] body,
|
|
132
|
+
:root[style*="--USER__lineHeight"] p,
|
|
133
|
+
:root[style*="--USER__lineHeight"] li,
|
|
134
|
+
:root[style*="--USER__lineHeight"] div{
|
|
135
|
+
line-height:var(--USER__lineHeight) !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:root[style*="--USER__paraSpacing"] p{
|
|
139
|
+
margin-top:var(--USER__paraSpacing) !important;
|
|
140
|
+
margin-bottom:var(--USER__paraSpacing) !important;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:root[style*="--USER__paraIndent"] p:not(
|
|
144
|
+
blockquote p,
|
|
145
|
+
figcaption p,
|
|
146
|
+
header p,
|
|
147
|
+
hgroup p,
|
|
148
|
+
:root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"],
|
|
149
|
+
:root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p,
|
|
150
|
+
:root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1)
|
|
151
|
+
){
|
|
152
|
+
text-indent:var(--USER__paraIndent) !important;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:root[style*="--USER__paraIndent"] p *{
|
|
156
|
+
text-indent:0 !important;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:root[style*="--USER__wordSpacing"] h1,
|
|
160
|
+
:root[style*="--USER__wordSpacing"] h2,
|
|
161
|
+
:root[style*="--USER__wordSpacing"] h3,
|
|
162
|
+
:root[style*="--USER__wordSpacing"] h4,
|
|
163
|
+
:root[style*="--USER__wordSpacing"] h5,
|
|
164
|
+
:root[style*="--USER__wordSpacing"] h6,
|
|
165
|
+
:root[style*="--USER__wordSpacing"] p,
|
|
166
|
+
:root[style*="--USER__wordSpacing"] li,
|
|
167
|
+
:root[style*="--USER__wordSpacing"] div,
|
|
168
|
+
:root[style*="--USER__wordSpacing"] dt,
|
|
169
|
+
:root[style*="--USER__wordSpacing"] dd{
|
|
170
|
+
word-spacing:var(--USER__wordSpacing) !important;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:root[style*="--USER__letterSpacing"] h1,
|
|
174
|
+
:root[style*="--USER__letterSpacing"] h2,
|
|
175
|
+
:root[style*="--USER__letterSpacing"] h3,
|
|
176
|
+
:root[style*="--USER__letterSpacing"] h4,
|
|
177
|
+
:root[style*="--USER__letterSpacing"] h5,
|
|
178
|
+
:root[style*="--USER__letterSpacing"] h6,
|
|
179
|
+
:root[style*="--USER__letterSpacing"] p,
|
|
180
|
+
:root[style*="--USER__letterSpacing"] li,
|
|
181
|
+
:root[style*="--USER__letterSpacing"] div,
|
|
182
|
+
:root[style*="--USER__letterSpacing"] dt,
|
|
183
|
+
:root[style*="--USER__letterSpacing"] dd{
|
|
184
|
+
letter-spacing:var(--USER__letterSpacing) !important;
|
|
185
|
+
font-variant:none !important;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
:root[style*="--USER__fontWeight"] body{
|
|
189
|
+
font-weight:var(--USER__fontWeight) !important;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:root[style*="--USER__fontWeight"] b,
|
|
193
|
+
:root[style*="--USER__fontWeight"] strong{
|
|
194
|
+
font-weight:bolder;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:root[style*="--USER__fontWidth"] body{
|
|
198
|
+
font-stretch:var(--USER__fontWidth) !important;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:root[style*="--USER__fontOpticalSizing"] body{
|
|
202
|
+
font-optical-sizing:var(--USER__fontOpticalSizing) !important;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:root[style*="readium-noRuby-on"] body rt,
|
|
206
|
+
:root[style*="readium-noRuby-on"] body rp{
|
|
207
|
+
display:none;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
:root[style*="--USER__ligatures"]{
|
|
211
|
+
font-variant-ligatures:var(--USER__ligatures) !important;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:root[style*="--USER__ligatures"] *{
|
|
215
|
+
font-variant-ligatures:inherit !important;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:root[style*="readium-iPadOSPatch-on"] body{
|
|
219
|
+
-webkit-text-size-adjust:none;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:root[style*="readium-iPadOSPatch-on"] p,
|
|
223
|
+
:root[style*="readium-iPadOSPatch-on"] h1,
|
|
224
|
+
:root[style*="readium-iPadOSPatch-on"] h2,
|
|
225
|
+
:root[style*="readium-iPadOSPatch-on"] h3,
|
|
226
|
+
:root[style*="readium-iPadOSPatch-on"] h4,
|
|
227
|
+
:root[style*="readium-iPadOSPatch-on"] h5,
|
|
228
|
+
:root[style*="readium-iPadOSPatch-on"] h6,
|
|
229
|
+
:root[style*="readium-iPadOSPatch-on"] li,
|
|
230
|
+
:root[style*="readium-iPadOSPatch-on"] th,
|
|
231
|
+
:root[style*="readium-iPadOSPatch-on"] td,
|
|
232
|
+
:root[style*="readium-iPadOSPatch-on"] dt,
|
|
233
|
+
:root[style*="readium-iPadOSPatch-on"] dd,
|
|
234
|
+
:root[style*="readium-iPadOSPatch-on"] pre,
|
|
235
|
+
:root[style*="readium-iPadOSPatch-on"] address,
|
|
236
|
+
:root[style*="readium-iPadOSPatch-on"] details,
|
|
237
|
+
:root[style*="readium-iPadOSPatch-on"] summary,
|
|
238
|
+
:root[style*="readium-iPadOSPatch-on"] figcaption,
|
|
239
|
+
:root[style*="readium-iPadOSPatch-on"] div:not(:has(p, h1, h2, h3, h4, h5, h6, li, th, td, dt, dd, pre, address, aside, details, figcaption, summary)),
|
|
240
|
+
:root[style*="readium-iPadOSPatch-on"] aside:not(:has(p, h1, h2, h3, h4, h5, h6, li, th, td, dt, dd, pre, address, aside, details, figcaption, summary)){
|
|
241
|
+
-webkit-text-zoom:reset;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
:root[style*="readium-iPadOSPatch-on"] abbr,
|
|
245
|
+
:root[style*="readium-iPadOSPatch-on"] b,
|
|
246
|
+
:root[style*="readium-iPadOSPatch-on"] bdi,
|
|
247
|
+
:root[style*="readium-iPadOSPatch-on"] bdo,
|
|
248
|
+
:root[style*="readium-iPadOSPatch-on"] cite,
|
|
249
|
+
:root[style*="readium-iPadOSPatch-on"] code,
|
|
250
|
+
:root[style*="readium-iPadOSPatch-on"] dfn,
|
|
251
|
+
:root[style*="readium-iPadOSPatch-on"] em,
|
|
252
|
+
:root[style*="readium-iPadOSPatch-on"] i,
|
|
253
|
+
:root[style*="readium-iPadOSPatch-on"] kbd,
|
|
254
|
+
:root[style*="readium-iPadOSPatch-on"] mark,
|
|
255
|
+
:root[style*="readium-iPadOSPatch-on"] q,
|
|
256
|
+
:root[style*="readium-iPadOSPatch-on"] rp,
|
|
257
|
+
:root[style*="readium-iPadOSPatch-on"] rt,
|
|
258
|
+
:root[style*="readium-iPadOSPatch-on"] ruby,
|
|
259
|
+
:root[style*="readium-iPadOSPatch-on"] s,
|
|
260
|
+
:root[style*="readium-iPadOSPatch-on"] samp,
|
|
261
|
+
:root[style*="readium-iPadOSPatch-on"] small,
|
|
262
|
+
:root[style*="readium-iPadOSPatch-on"] span,
|
|
263
|
+
:root[style*="readium-iPadOSPatch-on"] strong,
|
|
264
|
+
:root[style*="readium-iPadOSPatch-on"] sub,
|
|
265
|
+
:root[style*="readium-iPadOSPatch-on"] sup,
|
|
266
|
+
:root[style*="readium-iPadOSPatch-on"] time,
|
|
267
|
+
:root[style*="readium-iPadOSPatch-on"] u,
|
|
268
|
+
:root[style*="readium-iPadOSPatch-on"] var{
|
|
269
|
+
-webkit-text-zoom:normal;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
:root[style*="readium-iPadOSPatch-on"] p:not(:has(b, cite, em, i, q, s, small, span, strong)):first-line{
|
|
273
|
+
-webkit-text-zoom:normal;
|
|
274
|
+
}`;export{t as default};
|
package/dist/node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/vars/colors.json.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="#FFFFFF",t="#121212",n="#0000EE",e="#551A8B",l="#b4d8fe",s="inherit",c={backgroundColor:o,textColor:t,linkColor:n,visitedColor:e,selectionBackgroundColor:l,selectionTextColor:s};export{o as backgroundColor,c as default,n as linkColor,l as selectionBackgroundColor,s as selectionTextColor,t as textColor,e as visitedColor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={description:"Attempts to filter out paragraphs that are implicitly headings or part of headers",scope:"RS",value:"readium-experimentalHeaderFiltering-on"},t={description:"Attempts to filter out elements that are sized using viewport units and should not be scaled directly e.g. tables, images, iframes, etc.",scope:"RS",value:"readium-experimentalZoom-on"},i={experimentalHeaderFiltering:e,experimentalZoom:t};export{i as default,e as experimentalHeaderFiltering,t as experimentalZoom};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif",a={oldStyleTf:t};export{a as default,t as oldStyleTf};
|
package/dist/node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/vars/i18n.json.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o={baseFontFamily:"var(--RS__oldStyleTf)",lineHeightCompensation:1},a={baseFontFamily:"Kefa, Nyala, Roboto, Noto, 'Noto Sans Ethiopic', serif",lineHeightCompensation:1.167},n={baseFontFamily:"'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif"},i={baseFontFamily:"'Kohinoor Bangla', 'Bangla Sangam MN', Vrinda, Roboto, Noto, 'Noto Sans Bengali', sans-serif",lineHeightCompensation:1.067},t={baseFontFamily:"Kailasa, 'Microsoft Himalaya', Roboto, Noto, 'Noto Sans Tibetan', sans-serif"},e={baseFontFamily:"'Plantagenet Cherokee', Roboto, Noto, 'Noto Sans Cherokee'",lineHeightCompensation:1.167},s={baseFontFamily:"'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif"},m={baseFontFamily:"'Gujarati Sangam MN', 'Nirmala UI', Shruti, Roboto, Noto, 'Noto Sans Gujarati', sans-serif",lineHeightCompensation:1.167},l={baseFontFamily:"'New Peninim MT', 'Arial Hebrew', Gisha, 'Times New Roman', Roboto, Noto, 'Noto Sans Hebrew', sans-serif",lineHeightCompensation:1.1},r={baseFontFamily:"'Kohinoor Devanagari', 'Devanagari Sangam MN', Kokila, 'Nirmala UI', Roboto, Noto, 'Noto Sans Devanagari', sans-serif",lineHeightCompensation:1.1},N={baseFontFamily:"Mshtakan, Sylfaen, Roboto, Noto, 'Noto Serif Armenian', serif"},g={baseFontFamily:"'Euphemia UCAS', Euphemia, Roboto, Noto, 'Noto Sans Canadian Aboriginal', sans-serif"},h={baseFontFamily:"YuGothic, 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo UI', 'MS Gothic', Roboto, Noto, 'Noto Sans CJK JP', sans-serif",lineHeightCompensation:1.167},b={baseFontFamily:"'Khmer Sangam MN', 'Leelawadee UI', 'Khmer UI', Roboto, Noto, 'Noto Sans Khmer', sans-serif",lineHeightCompensation:1.067},F={baseFontFamily:"'Kannada Sangam MN', 'Nirmala UI', Tunga, Roboto, Noto, 'Noto Sans Kannada', sans-serif",lineHeightCompensation:1.1},S={baseFontFamily:"'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', Roboto, Noto, 'Noto Sans CJK KR', sans-serif",lineHeightCompensation:1.167},c={baseFontFamily:"'Lao Sangam MN', 'Leelawadee UI', 'Lao UI', Roboto, Noto, 'Noto Sans Lao', sans-serif"},C={baseFontFamily:"'Malayalam Sangam MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Malayalam', sans-serif",lineHeightCompensation:1.067},f={baseFontFamily:"'Oriya Sangam MN', 'Nirmala UI', Kalinga, Roboto, Noto, 'Noto Sans Oriya', sans-serif",lineHeightCompensation:1.167},H={baseFontFamily:"'Gurmukhi MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Gurmukhi', sans-serif",lineHeightCompensation:1.1},y={baseFontFamily:"'Sinhala Sangam MN', 'Nirmala UI', 'Iskoola Pota', Roboto, Noto, 'Noto Sans Sinhala', sans-serif",lineHeightCompensation:1.167},R={baseFontFamily:"'Tamil Sangam MN', 'Nirmala UI', Latha, Roboto, Noto, 'Noto Sans Tamil', sans-serif",lineHeightCompensation:1.067},p={baseFontFamily:"'Kohinoor Telugu', 'Telugu Sangam MN', 'Nirmala UI', Gautami, Roboto, Noto, 'Noto Sans Telugu', sans-serif"},M={baseFontFamily:"Thonburi, 'Leelawadee UI', 'Cordia New', Roboto, Noto, 'Noto Sans Thai', sans-serif",lineHeightCompensation:1.067},u={baseFontFamily:"'方体', 'PingFang SC', '黑体', 'Heiti SC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK SC', sans-serif",lineHeightCompensation:1.167},T={latin:o,am:a,ar:n,bn:i,bo:t,chr:e,fa:s,gu:m,he:l,hi:r,hy:N,iu:g,ja:h,km:b,kn:F,ko:S,lo:c,ml:C,or:f,pa:H,si:y,ta:R,te:p,th:M,zh:u,"zh-Hant":{baseFontFamily:"'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif",lineHeightCompensation:1.167},"zh-TW":{baseFontFamily:"'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif",lineHeightCompensation:1.167},"zh-HK":{baseFontFamily:"'方體', 'PingFang HK', '方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif",lineHeightCompensation:1.167}};export{a as am,n as ar,i as bn,t as bo,e as chr,T as default,s as fa,m as gu,l as he,r as hi,N as hy,g as iu,h as ja,b as km,F as kn,S as ko,o as latin,c as lo,C as ml,f as or,H as pa,y as si,R as ta,p as te,M as th,u as zh};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const d={disabled:[],added:[]},a={disabled:["bodyHyphens","a11yNormalize","letterSpacing"],added:[]},e={ltr:d,rtl:a,"cjk-horizontal":{disabled:["textAlign","bodyHyphens","a11yNormalize","ligatures","paraIndent","wordSpacing"],added:["noRuby"]},"cjk-vertical":{disabled:["colCount","textAlign","bodyHyphens","a11yNormalize","ligatures","paraIndent","wordSpacing"],added:["noRuby"]}};export{e as default,d as ltr,a as rtl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m,C;function k(){if(C)return m;C=1;function v(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function A(o,e){for(var r="",i=0,f=-1,t=0,n,l=0;l<=o.length;++l){if(l<o.length)n=o.charCodeAt(l);else{if(n===47)break;n=47}if(n===47){if(!(f===l-1||t===1))if(f!==l-1&&t===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){s===-1?(r="",i=0):(r=r.slice(0,s),i=r.length-1-r.lastIndexOf("/")),f=l,t=0;continue}}else if(r.length===2||r.length===1){r="",i=0,f=l,t=0;continue}}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+o.slice(f+1,l):r=o.slice(f+1,l),i=l-f-1;f=l,t=0}else n===46&&t!==-1?++t:t=-1}return r}function b(o,e){var r=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+i:r+o+i:i}var g={resolve:function(){for(var e="",r=!1,i,f=arguments.length-1;f>=-1&&!r;f--){var t;f>=0?t=arguments[f]:(i===void 0&&(i=process.cwd()),t=i),v(t),t.length!==0&&(e=t+"/"+e,r=t.charCodeAt(0)===47)}return e=A(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(v(e),e.length===0)return".";var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=A(e,!r),e.length===0&&!r&&(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return v(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];v(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":g.normalize(e)},relative:function(e,r){if(v(e),v(r),e===r||(e=g.resolve(e),r=g.resolve(r),e===r))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var f=e.length,t=f-i,n=1;n<r.length&&r.charCodeAt(n)===47;++n);for(var l=r.length,s=l-n,c=t<s?t:s,u=-1,a=0;a<=c;++a){if(a===c){if(s>c){if(r.charCodeAt(n+a)===47)return r.slice(n+a+1);if(a===0)return r.slice(n+a)}else t>c&&(e.charCodeAt(i+a)===47?u=a:a===0&&(u=0));break}var h=e.charCodeAt(i+a),y=r.charCodeAt(n+a);if(h!==y)break;h===47&&(u=a)}var d="";for(a=i+u+1;a<=f;++a)(a===f||e.charCodeAt(a)===47)&&(d.length===0?d+="..":d+="/..");return d.length>0?d+r.slice(n+u):(n+=u,r.charCodeAt(n)===47&&++n,r.slice(n))},_makeLong:function(e){return e},dirname:function(e){if(v(e),e.length===0)return".";for(var r=e.charCodeAt(0),i=r===47,f=-1,t=!0,n=e.length-1;n>=1;--n)if(r=e.charCodeAt(n),r===47){if(!t){f=n;break}}else t=!1;return f===-1?i?"/":".":i&&f===1?"//":e.slice(0,f)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');v(e);var i=0,f=-1,t=!0,n;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var l=r.length-1,s=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(c===47){if(!t){i=n+1;break}}else s===-1&&(t=!1,s=n+1),l>=0&&(c===r.charCodeAt(l)?--l===-1&&(f=n):(l=-1,f=s))}return i===f?f=s:f===-1&&(f=e.length),e.slice(i,f)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!t){i=n+1;break}}else f===-1&&(t=!1,f=n+1);return f===-1?"":e.slice(i,f)}},extname:function(e){v(e);for(var r=-1,i=0,f=-1,t=!0,n=0,l=e.length-1;l>=0;--l){var s=e.charCodeAt(l);if(s===47){if(!t){i=l+1;break}continue}f===-1&&(t=!1,f=l+1),s===46?r===-1?r=l:n!==1&&(n=1):r!==-1&&(n=-1)}return r===-1||f===-1||n===0||n===1&&r===f-1&&r===i+1?"":e.slice(r,f)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return b("/",e)},parse:function(e){v(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var i=e.charCodeAt(0),f=i===47,t;f?(r.root="/",t=1):t=0;for(var n=-1,l=0,s=-1,c=!0,u=e.length-1,a=0;u>=t;--u){if(i=e.charCodeAt(u),i===47){if(!c){l=u+1;break}continue}s===-1&&(c=!1,s=u+1),i===46?n===-1?n=u:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===l+1?s!==-1&&(l===0&&f?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(l,s)):(l===0&&f?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(l,n),r.base=e.slice(l,s)),r.ext=e.slice(n,s)),l>0?r.dir=e.slice(0,l-1):f&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return g.posix=g,m=g,m}export{k as __require};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class u{constructor(i,s){this.config=i,this.onUpdate=s,this.unsubs=[],this.conditionValues=new Map}setup(){let i=!0;this.config.forEach(s=>s.keyCombos.forEach(t=>{if(t.condition){const n=t.condition.subscribe(o=>{this.conditionValues.set(t,o),i||this.onUpdate(this.buildSerializable())});this.unsubs.push(n)}})),i=!1,this.onUpdate(this.buildSerializable())}buildSerializable(){return this.config.map(i=>({...i,keyCombos:i.keyCombos.filter(s=>!s.condition||this.conditionValues.get(s)===!0).map(({condition:s,...t})=>t)})).filter(i=>i.keyCombos.length>0)}destroy(){this.unsubs.forEach(i=>i()),this.unsubs=[],this.conditionValues.clear()}}export{u as KeyboardConditionBridge};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{KeyCombinationManager as d}from"@readium/navigator-html-injectables";const o="readium:navigator:keyboardPeripheral";class s{constructor(e={}){this.keyManager=new d,this.setupKeyboardPeripherals(e.keyboardPeripherals||[])}setupKeyboardPeripherals(e){if(e.length>0){const n=t=>{const r=new CustomEvent(o,{detail:t});window.dispatchEvent(r)};this.keydownHandler=this.keyManager.createUnifiedHandler("",e,n),this.keydownHandler&&document.addEventListener("keydown",this.keydownHandler,!0)}window.addEventListener("unload",()=>this.destroy())}destroy(){this.keydownHandler&&(document.removeEventListener("keydown",this.keydownHandler,!0),this.keydownHandler=void 0)}}export{s as KeyboardPeripherals,o as NAVIGATOR_KEYBOARD_PERIPHERAL_EVENT};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class h{constructor({initialValue:e=null,effectiveValue:t,isEffective:s,onChange:i}){this._value=e,this._effectiveValue=t,this._isEffective=s,this._onChange=i}set value(e){this._value=e,this._onChange(this._value)}get value(){return this._value}get effectiveValue(){return this._effectiveValue}get isEffective(){return this._isEffective}clear(){this._value=null}}class n extends h{set value(e){this._value=e,this._onChange(this._value)}get value(){return this._value}get effectiveValue(){return this._effectiveValue}get isEffective(){return this._isEffective}clear(){this._value=null}toggle(){this._value=!this._value,this._onChange(this._value)}}class l extends h{constructor({initialValue:e=null,effectiveValue:t,isEffective:s,onChange:i,supportedValues:r}){super({initialValue:e,effectiveValue:t,isEffective:s,onChange:i}),this._supportedValues=r}set value(e){if(e&&!this._supportedValues.includes(e))throw new Error(`Value '${String(e)}' is not in the supported values for this preference.`);this._value=e,this._onChange(this._value)}get value(){return this._value}get effectiveValue(){return this._effectiveValue}get isEffective(){return this._isEffective}get supportedValues(){return this._supportedValues}clear(){this._value=null}}class _ extends h{constructor({initialValue:e=null,effectiveValue:t,isEffective:s,onChange:i,supportedRange:r,step:a}){super({initialValue:e,effectiveValue:t,isEffective:s,onChange:i}),this._supportedRange=r,this._step=a,this._decimals=this._step.toString().includes(".")?this._step.toString().split(".")[1].length:0}set value(e){if(e&&(e<this._supportedRange[0]||e>this._supportedRange[1]))throw new Error(`Value '${String(e)}' is out of the supported range for this preference.`);this._value=e,this._onChange(this._value)}get value(){return this._value}get effectiveValue(){return this._effectiveValue}get isEffective(){return this._isEffective}get supportedRange(){return this._supportedRange}get step(){return this._step}increment(){this._value&&this._value<this._supportedRange[1]&&(this._value=Math.min(Math.round((this._value+this._step)*10**this._decimals)/10**this._decimals,this._supportedRange[1]),this._onChange(this._value))}decrement(){this._value&&this._value>this._supportedRange[0]&&(this._value=Math.max(Math.round((this._value-this._step)*10**this._decimals)/10**this._decimals,this._supportedRange[0]),this._onChange(this._value))}format(e){return e.toString()}clear(){this._value=null}}export{n as BooleanPreference,l as EnumPreference,h as Preference,_ as RangePreference};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/vars/experiments.json.js";import t from"../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/vars/settings.json.js";import g from"../node_modules/.pnpm/@readium_css@2.0.5/node_modules/@readium/css/css/vars/i18n.json.js";const i=e,p=t,f=g;var o=(n=>(n.start="start",n.left="left",n.right="right",n.justify="justify",n))(o||{});const c={range:[0,100],step:1},R={range:[.7,4],step:.05},C={range:[100,1e3],step:100},S={range:[50,250],step:10},h={range:[0,1],step:.125},m={range:[1,2.5],step:.1},l={range:[20,100],step:1},u={range:[0,3],step:.25},d={range:[0,3],step:.25},v={range:[0,2],step:.125},y={range:[.7,4],step:.05},I={range:[0,1],step:.1},j={range:[.5,4],step:.1},k={range:[5,60],step:5};export{o as TextAlignment,i as experiments,c as filterRangeConfig,R as fontSizeRangeConfig,C as fontWeightRangeConfig,S as fontWidthRangeConfig,f as i18n,h as letterSpacingRangeConfig,m as lineHeightRangeConfig,l as lineLengthRangeConfig,u as paragraphIndentRangeConfig,d as paragraphSpacingRangeConfig,j as playbackRateRangeConfig,p as settings,k as skipIntervalRangeConfig,I as volumeRangeConfig,v as wordSpacingRangeConfig,y as zoomRangeConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{experiments as o}from"./Types.js";function e(n,r){return n==null||r==null||n<=r?n:void 0}function f(n,r){return n==null||r==null||n>=r?n:void 0}function d(n){return typeof n=="string"?n:n===null?null:void 0}function l(n){return typeof n=="boolean"||n==null?n:void 0}function s(n,r){if(n!==void 0)return n===null?null:r[n]!==void 0?n:void 0}function c(n){return typeof n=="boolean"||typeof n=="number"&&n>=0?n:n===null?null:void 0}function h(n){if(n!==void 0)return n===null?null:n<0?void 0:n}function b(n,r){if(n===void 0)return;if(n===null)return null;const i=Math.min(...r),t=Math.max(...r);return n>=i&&n<=t?n:void 0}function m(n,r){return n===void 0?r:n}function y(n){if(n!==void 0)return n===null?null:n.filter(r=>r in o)}export{l as ensureBoolean,s as ensureEnumValue,y as ensureExperiment,c as ensureFilter,e as ensureLessThanOrEqual,f as ensureMoreThanOrEqual,h as ensureNonNegative,d as ensureString,b as ensureValueInRange,m as withFallback};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class r{constructor(e){if(this.detectedTools=new Set,!e.onDetected)throw new Error("onDetected callback is required");this.options=e,this.setupDetection()}isAutomationToolPresent(){const e=window;return e.domAutomation||e.domAutomationController?"Selenium":navigator.webdriver===!0?"Puppeteer/Playwright":e.__webdriver_evaluate||e.__selenium_evaluate?"Chrome Automation":e.callPhantom||e._phantom?"PhantomJS":e.__nightmare?"Nightmare":e.$testCafe?"TestCafe":null}setupDetection(){const e=this.isAutomationToolPresent();if(e){this.handleDetected(e);return}this.observer=new MutationObserver(()=>{const t=this.isAutomationToolPresent();t&&!this.detectedTools.has(t)&&this.handleDetected(t)}),this.observer.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),window.addEventListener("unload",()=>this.destroy())}handleDetected(e){this.detectedTools.add(e),this.options.onDetected?.(e)}destroy(){this.observer?.disconnect(),this.observer=void 0,this.detectedTools.clear()}}export{r as AutomationDetector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class o{constructor(t={}){this.onContextMenuBlocked=t.onContextMenuBlocked,this.contextMenuHandler=this.handleContextMenu.bind(this),document.addEventListener("contextmenu",this.contextMenuHandler,!0),window.addEventListener("unload",()=>this.destroy())}handleContextMenu(t){t.preventDefault(),t.stopPropagation();const e={type:"context_menu",timestamp:Date.now(),clientX:t.clientX,clientY:t.clientY,targetFrameSrc:""};return this.onContextMenuBlocked&&this.onContextMenuBlocked(e),!1}destroy(){this.contextMenuHandler&&(document.removeEventListener("contextmenu",this.contextMenuHandler,!0),this.contextMenuHandler=void 0)}}export{o as ContextMenuProtector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class n{constructor(o={}){this.copyHandler=e=>{e.preventDefault(),e.stopPropagation(),o.onCopyBlocked?.()},this.unloadHandler=()=>this.destroy(),document.addEventListener("copy",this.copyHandler,!0),window.addEventListener("unload",this.unloadHandler)}destroy(){document.removeEventListener("copy",this.copyHandler,!0),window.removeEventListener("unload",this.unloadHandler)}}export{n as CopyProtector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{sML as i}from"../helpers/dist/sML.js";import{WorkerConsole as s}from"./utils/WorkerConsole.js";import{table as o,log as c,clear as l}from"./utils/console.js";import{isBrave as n}from"./utils/platform.js";import{match as h}from"./utils/match.js";class d{constructor(e={}){if(this.isOpen=!1,this.checkCount=0,this.maxChecks=10,this.maxPrintTime=0,this.largeObjectArray=null,this.options={onDetected:e.onDetected||(()=>{}),onClosed:e.onClosed||(()=>{}),interval:e.interval||1e3,enableDebuggerDetection:e.enableDebuggerDetection||!1},!i.UA.Firefox)try{const t=new Blob([s.workerScript],{type:"application/javascript"}),r=URL.createObjectURL(t),a=new Worker(r);this.workerConsole=new s(a,r)}catch(t){console.warn("Failed to create Web Worker for DevTools detection:",t)}this.startDetection()}createLargeObjectArray(){const e={};for(let r=0;r<500;r++)e[`${r}`]=`${r}`;const t=[];for(let r=0;r<50;r++)t.push(e);return t}getLargeObjectArray(){return this.largeObjectArray===null&&(this.largeObjectArray=this.createLargeObjectArray()),this.largeObjectArray}async calcTablePrintTime(){const e=this.getLargeObjectArray();if(this.workerConsole)try{return(await this.workerConsole.table(e)).time}catch{const r=performance.now();return o(e),performance.now()-r}else{const t=performance.now();return o(e),performance.now()-t}}async calcLogPrintTime(){const e=this.getLargeObjectArray();if(this.workerConsole)return(await this.workerConsole.log(e)).time;{const t=performance.now();return c(e),performance.now()-t}}isPerformanceDetectionEnabled(){return h({includes:[()=>!!i.UA.Chrome,()=>!!i.UA.Chromium,()=>!!i.UA.Safari,()=>!!i.UA.Firefox],excludes:[]})}isDebuggerDetectionEnabled(){return this.options.enableDebuggerDetection}async checkPerformanceBased(){if(!this.isPerformanceDetectionEnabled())return!1;const e=await this.calcTablePrintTime(),t=Math.max(await this.calcLogPrintTime(),await this.calcLogPrintTime());return this.maxPrintTime=Math.max(this.maxPrintTime,t),this.workerConsole?await this.workerConsole.clear():l(),e===0?!1:this.maxPrintTime===0?!!await n():e>this.maxPrintTime*10}async checkDebuggerBased(){if(!this.isDebuggerDetectionEnabled()||await n())return!1;const e=performance.now();try{(()=>{}).constructor("debugger")()}catch{debugger}return performance.now()-e>100}async detectDevTools(){return await this.checkPerformanceBased()?!0:this.options.enableDebuggerDetection&&this.checkCount>=this.maxChecks?await this.checkDebuggerBased():!1}startDetection(){this.intervalId=window.setInterval(async()=>{this.checkCount++;const e=await this.detectDevTools();e!==this.isOpen&&(this.isOpen=e,e?this.options.onDetected():this.options.onClosed()),this.checkCount>this.maxChecks*2&&(this.checkCount=0)},this.options.interval),window.addEventListener("beforeunload",()=>this.destroy())}isDevToolsOpen(){return this.isOpen}async checkNow(){const e=this.isOpen;return this.isOpen=await this.detectDevTools(),this.isOpen!==e&&(this.isOpen?this.options.onDetected():this.options.onClosed()),this.isOpen}destroy(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this.workerConsole&&(this.workerConsole.destroy(),this.workerConsole=void 0),this.isOpen=!1,this.checkCount=0}}export{d as DevToolsDetector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class n{constructor(e={}){this.dragstartHandler=r=>{r.preventDefault(),r.stopPropagation(),e.onDragDetected?.(Array.from(r.dataTransfer?.types??[]))},this.dragoverHandler=r=>{r.preventDefault(),r.stopPropagation()},this.dropHandler=r=>{r.preventDefault(),r.stopPropagation();const t=Array.from(r.dataTransfer?.types??[]),a=r.dataTransfer?.files.length??0;e.onDropDetected?.(t,a)},this.unloadHandler=()=>this.destroy(),document.addEventListener("dragstart",this.dragstartHandler,!0),document.addEventListener("dragover",this.dragoverHandler,!0),document.addEventListener("drop",this.dropHandler,!0),window.addEventListener("unload",this.unloadHandler)}destroy(){document.removeEventListener("dragstart",this.dragstartHandler,!0),document.removeEventListener("dragover",this.dragoverHandler,!0),document.removeEventListener("drop",this.dropHandler,!0),window.removeEventListener("unload",this.unloadHandler)}}export{n as DragAndDropProtector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class d{constructor(e){if(this.detected=!1,!e.onDetected)throw new Error("onDetected callback is required");this.options=e,this.setupDetection()}isIframed(){try{return window.self!==window.top?{isEmbedded:!0,isCrossOrigin:!window.top.location.href}:{isEmbedded:!1,isCrossOrigin:!1}}catch{return{isEmbedded:!0,isCrossOrigin:!0}}}setupDetection(){const{isEmbedded:e,isCrossOrigin:t}=this.isIframed();if(e){this.handleDetected(t);return}this.observer=new MutationObserver(()=>{const{isEmbedded:s,isCrossOrigin:i}=this.isIframed();s&&!this.detected&&(this.handleDetected(i),this.observer?.disconnect())}),this.observer.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),window.addEventListener("unload",()=>this.destroy())}handleDetected(e){this.detected=!0,this.options.onDetected?.(e)}destroy(){this.observer?.disconnect(),this.observer=void 0,this.detected=!1}}export{d as IframeEmbeddingDetector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AutomationDetector as i}from"./AutomationDetector.js";import{DevToolsDetector as r}from"./DevToolsDetector.js";import{IframeEmbeddingDetector as s}from"./IframeEmbeddingDetector.js";import{PrintProtector as c}from"./PrintProtector.js";import{ContextMenuProtector as n}from"./ContextMenuProtector.js";const d="readium:navigator:suspiciousActivity";class l{dispatchSuspiciousActivity(t,e){const o=new CustomEvent(d,{detail:{type:t,timestamp:Date.now(),...e}});window.dispatchEvent(o)}constructor(t={}){t.monitorDevTools&&(this.devToolsDetector=new r({onDetected:()=>{this.dispatchSuspiciousActivity("developer_tools",{targetFrameSrc:"",key:"",code:"",keyCode:-1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1})}})),t.checkAutomation&&(this.automationDetector=new i({onDetected:e=>{this.dispatchSuspiciousActivity("automation_detected",{tool:e})}})),t.checkIFrameEmbedding&&(this.iframeEmbeddingDetector=new s({onDetected:e=>{this.dispatchSuspiciousActivity("iframe_embedding_detected",{isCrossOrigin:e})}})),t.protectPrinting?.disable&&(this.printProtector=new c({...t.protectPrinting,onPrintAttempt:()=>{this.dispatchSuspiciousActivity("print",{})}})),t.disableContextMenu&&(this.contextMenuProtector=new n({onContextMenuBlocked:e=>{this.dispatchSuspiciousActivity("context_menu",e)}}))}destroy(){this.automationDetector?.destroy(),this.devToolsDetector?.destroy(),this.iframeEmbeddingDetector?.destroy(),this.printProtector?.destroy(),this.contextMenuProtector?.destroy()}}export{d as NAVIGATOR_SUSPICIOUS_ACTIVITY_EVENT,l as NavigatorProtector};
|