This commit is contained in:
Hanson.xyz Dev
2026-01-04 17:50:08 -06:00
parent 7e45ce0756
commit acc8ac87a0
4131 changed files with 232562 additions and 250244 deletions
+20 -41
View File
@@ -30,68 +30,47 @@ var x = (y) => {
var y = (x) => (() => (x))
const interactivity_namespaceObject = x({ ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store) });
;// ./node_modules/@wordpress/block-library/build-module/file/utils/index.js
/**
* Uses a combination of user agent matching and feature detection to determine whether
* the current browser supports rendering PDFs inline.
*
* @return {boolean} Whether or not the browser supports inline PDFs.
*/
const browserSupportsPdfs = () => {
// Most mobile devices include "Mobi" in their UA.
if (window.navigator.userAgent.indexOf('Mobi') > -1) {
if (window.navigator.pdfViewerEnabled) {
return true;
}
if (window.navigator.userAgent.indexOf("Mobi") > -1) {
return false;
}
// Android tablets are the notable exception.
if (window.navigator.userAgent.indexOf('Android') > -1) {
if (window.navigator.userAgent.indexOf("Android") > -1) {
return false;
}
// iPad pretends to be a Mac.
if (window.navigator.userAgent.indexOf('Macintosh') > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) {
if (window.navigator.userAgent.indexOf("Macintosh") > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) {
return false;
}
// IE only supports PDFs when there's an ActiveX object available for it.
if (!!(window.ActiveXObject || 'ActiveXObject' in window) && !(createActiveXObject('AcroPDF.PDF') || createActiveXObject('PDF.PdfCtrl'))) {
if (!!(window.ActiveXObject || "ActiveXObject" in window) && !(createActiveXObject("AcroPDF.PDF") || createActiveXObject("PDF.PdfCtrl"))) {
return false;
}
return true;
};
/**
* Helper function for creating ActiveX objects, catching any errors that are thrown
* when it's generated.
*
* @param {string} type The name of the ActiveX object to create.
* @return {window.ActiveXObject|undefined} The generated ActiveXObject, or null if it failed.
*/
const createActiveXObject = type => {
const createActiveXObject = (type) => {
let ax;
try {
ax = new window.ActiveXObject(type);
} catch (e) {
ax = undefined;
ax = void 0;
}
return ax;
};
;// ./node_modules/@wordpress/block-library/build-module/file/view.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
(0,interactivity_namespaceObject.store)('core/file', {
state: {
get hasPdfPreview() {
return browserSupportsPdfs();
(0,interactivity_namespaceObject.store)(
"core/file",
{
state: {
get hasPdfPreview() {
return browserSupportsPdfs();
}
}
}
}, {
lock: true
});
},
{ lock: true }
);